// var album = { 
//   startup: function() { 
//     new PeriodicalExecuter(album.cycle, 10) // change image every 5 seconds 
//   }, 
//   cycle: function() { 
//     new Effect.Fade('image', { // the id of the <DIV> containing the photos 
//       duration: 1, 
//       fps: 50, 
//       afterFinish: function() { 
//         new Ajax.Updater('image','advertisements/helper.php', { // URL for next <IMG> tag 
//           asynchronous: true, 
//           onSuccess: function() { 
//             new Effect.Appear('image', {
//               duration: 1,
//               fps: 50,
//               queue:'end'
//             })
//           } 
//         }) 
//       } 
//     }) 
//   } 
// } 

var slideShow = { 
  startup: function() { 
    new PeriodicalExecuter(slideShow.cycle, 8) // change image every 5 seconds 
  }, 

  // fadeOut: function() {
  //    // console.log('Fade out!')
  //    
  //    new Effect.Fade('image', {
  //       duration: 1,
  //       afterFinish: function () {
  //          console.log('Done Fading Out!')
  //          
  //         slideShow.fadeIn() 
  //       }
  //    })
  // },
  // 
  // fadeIn: function() {
  //    // console.log('Fade In!')
  //    
  //    new Effect.Appear('image', {
  //      duration: 1,
  //      fps: 50,
  //    })
  //    
  // },
  
  cycle: function() { 
      new Ajax.Updater('image','advertisements/helper.php', { // URL for next <IMG> tag 
       asynchronous: true, 

       // onSuccess: function() {
         // console.log('doing it!')
         // slideShow.fadeOut()
       // } 
     }) 
  } 
} 



window.onload = slideShow.startup


