jQuery(document).ready(function(){function placementPhoto(){tps=jQuery(".diapo1 img");photo=131;jQuery(tps[0]).show("fast");i=1;k=0;tps.each(function(){if(k==3){k=-1;photo=0;}
jQuery(tps[i]).fadeIn("fast");jQuery(tps[i]).animate({marginLeft:photo+"px"},1000);i++;photo=photo+132;k++;});photo=0;i=1;k=0;tps.each(function(){if(k==3){k=-1;photo=photo+115;}
jQuery(tps[i]).animate({marginTop:photo+'px'},1000);i++;k++;});}
placementPhoto();});
setInterval("animPhoto()",6000);function animPhoto(){var tab=jQuery(".diapo1 img");var nombreAleatoire3=Math.floor(Math.random()*9)+1;var nombreAleatoire4=Math.floor(Math.random()*9)+1;while(nombreAleatoire3==nombreAleatoire4){nombreAleatoire4=Math.floor(Math.random()*9)+1;}
var horizontal1=parseInt(jQuery(tab[nombreAleatoire3]).css('marginLeft').replace("px",""));var horizontal2=parseInt(jQuery(tab[nombreAleatoire4]).css('marginLeft').replace("px",""));var vertical1=parseInt(jQuery(tab[nombreAleatoire3]).css('marginTop').replace("px",""));var vertical2=parseInt(jQuery(tab[nombreAleatoire4]).css('marginTop').replace("px",""));jQuery(tab[nombreAleatoire3]).animate({marginLeft:horizontal2+'px',marginTop:vertical2+'px'},700);jQuery(tab[nombreAleatoire4]).animate({marginLeft:horizontal1+'px',marginTop:vertical1+'px'},700);}
