$(document).ready(function(){
    // Boucle sur les images pour gérer le chargement
    $("#CarreCentral img, #CarreCentral p").css({'opacity':0,'visibility':'visible'});
    $("#CarreCentral img").each(function(index,el){
        if (el.complete){
        	$(this).animate({ opacity: 1 }, 4500);
        } else {
            $(el).load(function(){
            	$(this).animate({ opacity: 1 }, 4500);
            });
        }
    });
    // Effet sur les images du menu de la page d'accueil
    $('.DIV-Accueil a').hover(
        function(){
            if ($(this).find('.IMG-AccueilNB')) {
                $(this).find('.IMG-AccueilNB').animate({ opacity: 0 }, 100);
            }
            $(this).find('p').animate({'opacity':'1'},100);
        },
        function() {
            $(this).find('p').stop().animate({ opacity: 0 }, 500);
       }
    );
    $('#IMG-AccueilEntree').hover(function(){$(this).stop().animate({ opacity: 0.5 }, 100);}, function() {$(this).stop().animate({ opacity: 1 }, 1500);});

//    $(".IMG-AccueilNB[title],#IMG-AccueilEntree").tooltip({
//        // place tooltip on the right edge
//        position: "bottom center",
//        // a little tweaking of the position
//        offset: [0, 0],
//        // use the built-in fadeIn/fadeOut effect
//        effect: "fade",
//        // use this single tooltip element
//        tip: '#demotip'
//    });
});

