window.addEvent('domready',function() {
	/* settings */
	var showDuration = 5000;
	var container = document.getElement('.slider_container');
	var slides = container.getElements('.slide');
	var currentIndex = 0;
	var interval;
	/* opacity and fade */
	slides.each(function(slide,i){ 
		if(i > 0) {
			slide.set('opacity',0);
		}
	});
	/* worker */
	var show = function() {
		slides[currentIndex].fade('out');
		slides[currentIndex = currentIndex < slides.length - 1 ? currentIndex+1 : 0].fade('in');
	};
	/* start once the page is finished loading */
	window.addEvent('load',function(){
		interval = show.periodical(showDuration);
	});
});
