var number = 0;
window.addEvent('domready', function(){
	$('showcase').getElements('.bigimage').each(function(i,x) {
		i.setStyles({'opacity':'0'});
	});
});
window.addEvent('load', function(){
	animation();
});
function animation() {
	var nav = $('showcase');
	if (number > nav.getElements('.bigimage').length-1) {number = 0;}
	var fx = nav.effects({duration: 1200, transition: Fx.Transitions.Quart.easeOut});
	fx.start().chain(
		function(){this.start(showshowcase(number));},
		function(){this.start(number = number + 1);},
		function(){this.start(animation());}
	);
}
function showshowcase(number) {
	var big = 'showcase-' + number + '-big';
	$('showcase-loader').setStyles({'display':'none'});
	$('showcase').getElements('.bigimage').each(function(i) {
		var fx = $(i).effects({duration: 3000, transition: Fx.Transitions.Quart.easeOut});
		if (i.get('id') !== big) {
			fx.start({'opacity':'0'});
		}
		else {
			fx.start({'opacity':'1'});
		}
	});
}