     function mycarousel_initCallback(carousel) {
        $('.myCarouselPrec').bind('click', function() {
            carousel.prev();
            return false;
        });

        $('.myCarouselSuiv').bind('click', function() {
            carousel.next();
            return false;
        });

    };
  
  
  function mycarouselDiapo_initCallback(carousel) {
     $('.confortAbsolu').bind('click', function() {
          carousel.scroll(jQuery.jcarousel.intval(1));
      return false;
        });
      $('.solutionsEco').bind('click', function() {
          carousel.scroll(jQuery.jcarousel.intval(2));
            return false;
        });
    
    
    };
  
  
  function mycarouselBreves_initCallback(carousel) {
        $('.myCarouselBrevesPrec').bind('click', function() {
            carousel.prev();
            return false;
        });

        $('.myCarouselBrevesSuiv').bind('click', function() {
            carousel.next();
            return false;
        });
    };

    function mycarouselMenu_initCallback(carousel) {
        $('.myCarouselMenuPrec').bind('click', function() {
            carousel.prev();
            return false;
        });

        $('.myCarouselMenuSuiv').bind('click', function() {
            carousel.next();
            return false;
        });
    };

    // Ride the carousel...
    jQuery(document).ready(function($) {

        if ($('#mycarrousel li').length > 1) {
            $("#mycarousel").jcarousel({
                scroll: 1,
                wrap: 'circular',
                auto:8,
                initCallback: mycarousel_initCallback,
                // This tells jCarousel NOT to autobuild prev/next buttons
                buttonNextHTML: null,
                buttonPrevHTML: null
            });
        } else {
            $('#lnkCarouselPrec2').remove();
            $('#lnkCarouselSuiv2').remove();
        }

        $("#mycarouselDiapo").jcarousel({
            scroll: 1,
            initCallback: mycarouselDiapo_initCallback,
            // This tells jCarousel NOT to autobuild prev/next buttons
            buttonNextHTML: null,
            buttonPrevHTML: null
        });
    
    $("#mycarouselBreves").jcarousel({
            scroll: 1,
            wrap: 'circular',
      auto: 5,
            initCallback: mycarouselBreves_initCallback,
            // This tells jCarousel NOT to autobuild prev/next buttons
            buttonNextHTML: null,
            buttonPrevHTML: null
        });
    
    $("#mycarouselBrevesHome").jcarousel({
            scroll: 1,
            wrap: 'circular',
      auto: 5,
            initCallback: mycarouselBreves_initCallback,
            // This tells jCarousel NOT to autobuild prev/next buttons
            buttonNextHTML: null,
            buttonPrevHTML: null
        });
    


        $(".mycarouselMenu").jcarousel({
            scroll: 1,
            wrap: 'circular',
            initCallback: mycarouselMenu_initCallback,
            // This tells jCarousel NOT to autobuild prev/next buttons
            buttonNextHTML: null,
            buttonPrevHTML: null
        });

    });
  // Gestion du coverflow//
  jQuery(document).ready(function($) { 
    $("#coverflow_menu_0 a").click( function() {
      $("#coverflow_menu_1").attr("class", "unactive");
      $("#coverflow_menu_2").attr("class", "unactive");
      $("#coverflow_menu_0").attr("class", "active");
    });
    $("#coverflow_menu_1 a").click( function() {
      $("#coverflow_menu_0").attr("class", "unactive");
      $("#coverflow_menu_2").attr("class", "unactive");
      $("#coverflow_menu_1").attr("class", "active");
    });
    
    $("#coverflow_menu_2 a").click( function() {
      $("#coverflow_menu_0").attr("class", "unactive");
      $("#coverflow_menu_1").attr("class", "unactive");
      $("#coverflow_menu_2").attr("class", "active");
    });
    
    setTimeout(function(){
      $('canvas.toogdblclick').dblclick(function(event){
        event.preventDefault();
        toogloadconsole('/element/edit?inpageid='+this.id.split('_')[1]);        
      });    
    }, 2000);
    
  });
  
  
  
  
  // Gestion des encart dans le diaporama//
    $(document).ready(function() {
      $(".encart1").hover(function(){
        $("#encartDiapo1").css({display: 'block'});
            $("#encartDiapo1").animate({opacity:'1'}, 200 );
          });
      
      $("#encartDiapo1").mouseout(function(){        
            $("#encartDiapo1").animate({opacity:'0'}, 200 );    
          $("#encartDiapo1").css({display: 'none'});
      }); 
      
      
      $(".encart2").hover(function(){
        $("#encartDiapo2").css({display: 'block'});
            $("#encartDiapo2").animate({opacity:'1'}, 200 );
          });
      
      $("#encartDiapo2").mouseout(function(){        
            $("#encartDiapo2").animate({opacity:'0'}, 200 );    
          $("#encartDiapo2").css({display: 'none'});
      }); 
      
      
      $(".encart3").hover(function(){
        $("#encartDiapo3").css({display: 'block'});
            $("#encartDiapo3").animate({opacity:'1'}, 200 );
          });
      
      $("#encartDiapo3").mouseout(function(){        
            $("#encartDiapo3").animate({opacity:'0'}, 200 );    
          $("#encartDiapo3").css({display: 'none'});
      }); 
      
     });
    
    


