$(document).ready(function(){
	if (jQuery.browser.msie && jQuery.browser.version == "6.0"){
    	DD_belatedPNG.fix('.DP-IMG_Masque');
    }

    // Préchargement des vignettes et affichage au fur et à mesure
    // Récupération des zones vignettes et des images 
    $("#DP_Gallerie li").css('opacity',0);
    if (jQuery.support.opacity){
        IMG_Survol=$(".DP-IMG_Survol");
        IMG_Survol.css('opacity',0);
    }else{
        $(".DP-IMG_Survol").css('visibility','hidden');
    }
    
    // Boucle sur les images pour gérer le chargement
    $(".DP-IMG").each(function(index,el){
        if (el.complete){
        	$(this).parents("li").animate({ opacity: 1 }, 1000);
        } else {
            $(el).load(function(){
            	$(this).parents("li").animate({ opacity: 1 }, 1500);
            });
        }
    });

    // Effet de survol des vignettes : IE bug sur transparence d'une image avec canal alpha.... 
    if (jQuery.support.opacity){
        IMG_Survol.hover(function() {$(this).stop().animate({ opacity: 1 }, 50);}, function() {$(this).stop().animate({ opacity: 0 }, 800);});
    }else if (parseFloat(jQuery.browser.version) > 6){
       $("#DP_Gallerie a").hover(function() {jQuery(">.DP-IMG_Survol", this).css('visibility','visible');}, function() {jQuery(">.DP-IMG_Survol", this).css('visibility','hidden');});
    } else {
 	// Pour IE6, effet par changement de transparence de l'image principale car le survol par image avec transparence ne fonctionne pas.
       $("#DP_Gallerie a").hover(function() {jQuery("+.DP-IMG", this).css('opacity','0.5');}, function() {jQuery("+.DP-IMG", this).css('opacity','1');});
	}


});
