// defined variables
var i = 0;
var j = 0;
// fade the images
function swapFade() {
	j=i+1; 
	if (j == $('image_container').childElements().length){
		j = 0;
	}

	new Effect.Parallel([ 
		new Effect.Fade($('image_container').childElements()[i], { 
			sync: 		true, 
			duration:	1.5, 
			from:		1.0, 
			to:			0.0 }) , 
		new Effect.Appear($('image_container').childElements()[j], { 
			sync: 		true, 
			duration:	1.5, 
			from:		0.0, 
			to:			1.0 }) ], 
		{duration: 1.5}); 
	i=j; 
}
// defined autoload
Event.observe(window,"load",function() {
	setInterval('swapFade()',9000); 
});
