 var annonce_count;
 var annonce_interval;
 var old_annonce = 0;
 var current_annonce = 0;
 var time = 8000;
 var box_width = 1000;
 var temps_defilement = 1000;
 $(document).ready(function(){
   annonce_count = $("div.annonce").size();
   $("div.annonce:eq("+current_annonce+")").css('left','5px');

   annonce_interval = setInterval(annonce_rotate,time); //time in milliseconds
   $('#annonces').hover(function() {
     clearInterval(annonce_interval);
   }, function() {
     annonce_interval = setInterval(annonce_rotate,time); //time in milliseconds

   });
 });

 function annonce_rotate() {
   current_annonce = (old_annonce + 1) % annonce_count;
   $("div.annonce:eq(" + old_annonce + ")").animate({left: -(box_width-10)},temps_defilement, function() {
     $(this).css('left',box_width + 'px');
   });
   $("div.annonce:eq(" + current_annonce + ")").show().animate({left: 5},temps_defilement);
   old_annonce = current_annonce;
 }

