/*
Code from http://habtm.com/articles/2006/01/19/easy-scriptaculous-slideshow
*/

var album = { 
  startup: function() { 
    new PeriodicalExecuter(album.cycle, 4) // change image every 4 seconds 
  }, 
  cycle: function() { 
    new Effect.Fade('photodisplay', { // the id of the <DIV> containing the photos 
      duration: .3, 
      fps: 30, 
      afterFinish: function() { 
        new Ajax.Updater('photodisplay','/i/homegallery/next.php', { // URL for next <IMG> tag 
          asynchronous: true, 
          onSuccess: function() { 
            new Effect.Appear('photodisplay', {
              duration: .3,
              fps: 30,
              queue:'end'
            })
          } 
        }) 
      } 
    }) 
  } 
} 
 
window.onload = album.startup

