$(document).ready(function() { 
   // Initialise le menu déroulant
   $("#mainmenu ul").superfish({ 
      delay: 0,
      speed: 0,
      autoArrows: false,                            // disable generation of arrow mark-up 
      dropShadows: false                            // disable drop shadows
   });

   
   // Affiche ou cache le texte des boîtes de dialogue
   $("input.hideText").each(function(){
      $(this).attr("showText", $(this).attr("value"));
   }).focusin(function(){
      if($(this).val()==$(this).attr("showText")){
         $(this).val(""); 
      }
   }).focusout(function(){
      if($(this).val()==""){
         $(this).val($(this).attr("showText"));
      }
   });
   
   // Initialise le slider d'image
   $("#banners").bxSlider({
      auto: true,
      pause: 7000,
      easing: 'easeInCirc',
      controls: false,
      pager: true
   });
   
   // Affecte le script pour afficher les liens des sous-catégories 
   $(".boites.liens .cat_titre").click(function(){
      $(this).parent().find('.sublinks').each(function(){
         if($(this).css("display")=="none"){
            $(this).show();
            $(this).parent().find('.cat_titre').addClass('active');
         }
         else{
            $(this).hide();
            $(this).parent().find('.cat_titre').removeClass('active');
         }
      });
   });
}); 
