var SlideShow = Class.create({

	initialize: function(idArray, wait) {

		this.wait = wait;
		this.i = 0;
		this.slideArray = idArray;

		// Start the show
		this.startup();
	},
	startup: function() {
		new PeriodicalExecuter(this.cycle.bind(this), this.wait)
	},
	cycle: function() {

		new Effect.Fade(this.slideArray[this.i], {duration:1.5, from:1.0, to:0.0});

		this.i++;

		if(this.i == this.slideArray.length) this.i = 0;

		new Effect.Appear(this.slideArray[this.i], {duration:1.5, from:0.0, to:1.0});
  }
}); 

