
var i1;
var i2;

$(document).ready(function(){

	i1 = "#promo1";
	i2 = "#promo2";					
	animation();

});


function animation()
{

	setTimeout("changeImg()",5000);
}	


function changeImg()
{
		
		$(i1).animate({opacity:0},1000);			
		setTimeout("affichImage()",1000);

}

function affichImage()
{

	var temp;
	$(i1).hide();
	$(i2).show();
	$(i2).animate({opacity:1},2000);	
	temp = i1;
	i1 = i2;
	i2 = temp;
	animation();		

}

