var Slideshow = new Class({					 

	Implements: [Events, Options],
	
	options:{},

	initialize: function(options){
		this.options = options;		
		this.ss_timer;	
		this.elements = this.options.container.getElements(this.options.element);	
		this.current_element = this.elements.length;		
		this.ss_timer = this.get_previous.delay(this.options.delay, this);		
	},
	
	get_previous: function(){		
		var current = this.elements[this.current_element-1];
		current.fade('out').retrieve('tween').chain(function(){
			current.clone().setStyles({'visibility':'hidden', 'opacity':.999}).inject(this.options.container, 'top');
			current.dispose();			
			this.elements = this.options.container.getElements(this.options.element);	
			this.ss_timer = this.get_previous.delay(this.options.delay, this);			
		}.bind(this));		
	}	
	
});
