$(document).ready(function(){

   var nb = 0;
   var total =  $('.diapo-img').length;
   setInterval(function(){
      catourne();
   },4000);

   function catourne(){
      nb++;
      if(nb == total || nb > total)
         nb = 0;

      $('#big #diapo').animate({
         marginLeft: -nb *472
         },800);
   }

   var nb2 = 0;
   var total2 =  $('.mem-diapo').length;
   setInterval(function(){
      catourne2();
   },4000);

   function catourne2(){
      nb2++;
      if(nb2 == total2 || nb2 > total2)
         nb2 = 0;

      $('#img_membres').animate({
         marginLeft: -nb2 *276
         },800);
   }
   $('#txt-actu').hide();
   $('#txt-parcours').hide();
   $('#diapo-content').hide();
   $('#txt-membre').hide();

   $('#big').hover(function(){
      $('.diapo-img').css("opacity", "0.3");
      $('#diapo-content').show();
   },function(){
      $('.diapo-img').css("opacity", "1.0");
      $('#diapo-content').hide();
   });

   $('#big_membre').hover(function(){
      $('.mem-diapo').css("opacity", "0.3");
      $('#txt-membre').show();
   },function(){
      $('.mem-diapo').css("opacity", "1.0");
      $('#txt-membre').hide();
   });

   $('#img_actu').hover(function(){
      $('#img_actu img').css("opacity", "0.3");
      $('#txt-actu').show();
   },function(){
      $('#img_actu img').css("opacity", "1.0");
      $('#txt-actu').hide();
   });

   $('#img_parcours').hover(function(){
      $('#img_parcours img').css("opacity", "0.3");
      $('#txt-parcours').show();
   },function(){
      $('#img_parcours img').css("opacity", "1.0");
      $('#txt-parcours').hide();
   });


});
