mayaFish.addEvent('onload', function () {
	
	var imgs, actual = 0, preActual = -1, setoz = function (e, o, z) {
		mayaFish.animate.setOpacity(e, o);
		e.style.zIndex = z;
		e.style.display = 'block';
	}, nextFade = function () {
		preActual = actual; actual++;
		if (actual >= imgs.length) actual = 0;
		imgs[actual].style.zIndex = '-1';
		imgs[preActual].style.zIndex = '-2';
		mayaFish.animate.fade('in', {
			'node': imgs[actual],
			'duration': 6660,
			'onEnd': function () {
				mayaFish.animate.fade('out', {
					'node': imgs[preActual],
					'duration': 3330,
					'onEnd': function () {
						setTimeout(nextFade, 10);
					}
				});
			}
		});
	}
	
	imgs = mayaFish.$select('#imageContainer img');
	if (imgs == null) return;
	
	for (i = 1; i < imgs.length; i++)
		setoz(imgs[i], 0, '-2');
	
	if (!!imgs[0]) {
		setoz(imgs[0], 0.99, '-1');
		setTimeout(nextFade, 3330);
	}
	
});

