jQuery(document).ready(function(){

    // BOUNCE DE TIBO
    jQuery("ul.menu_gauche li ul li a").mouseenter(function(){
        jQuery(this).animate({ paddingLeft: "40px" }, 150 )
                    .animate({ backgroundPosition: "0px" }, 50 )
                    .animate({ backgroundPosition: "20px" }, 150 );
    }).mouseleave(function(){
        jQuery(this).stop(true, false);
        jQuery(this).animate({ backgroundPosition: "10" }, 150 );
        jQuery(this).animate({ paddingLeft: "30" }, 150 );
                     
    }); 
        
    ResizeSiteHeight();
    
});



    function ResizeSiteHeight()
    {	
        var max = 0;
        jQuery("#colonne_principale #content img").each(function (index, domEle) {
            var lastImgTop = jQuery(domEle).offset().top;
            hauteur_image = lastImgTop + jQuery(domEle).height() - jQuery("#colonne_principale #content").offset().top;
            if (hauteur_image>max)
                max = hauteur_image;
        });
        max += 50;
        
        var contentDroite = jQuery("#colonne_principale #title").outerHeight() + jQuery("#colonne_principale #content").outerHeight();        
        var hauteurContentDroite = Math.max(max, contentDroite);
        hauteurContentDroite += 300;
        
        // handle bottom div
        var hauteur_max = Math.max(jQuery("#colonne_gauche").outerHeight(), hauteurContentDroite);              
        
        jQuery("#colonne_gauche").css("height", hauteur_max);   
        jQuery("#backgroundBottom").css("margin-top", hauteur_max+147); 
        jQuery("#colonne_principale").css("height", hauteur_max);
    }
