//correction PNG ie6
var blank = new Image();
blank.src = '../img/blank.gif';




 

$(document).ready(function() {
 
 
	


/************************************************
//ADAPTATION MENU
**************************************************/

	// pour tous les li sauf le dernier
	$(".jd_menu  li:not(.last) a").each(function(i) {
	
		// pour les li root j'ajoute un &mdash; après le <a> (sans lien) 
		if($(this).attr("class")=="root"){
	
     		$(this).after("<span style='font-size:10px'>&nbsp;<\/span>&mdash;");
   	
     	}
     	
		//ajout des puces pour le premier niveau après root
		if($(this).parent().parent().parent().parent().attr("class")=="jd_menu"){
	
     		$(this).prepend( "&bull;&nbsp;");
     	
     	}
     	
     	
     	//ajout de > si c'est un noeud
     	if($(this).attr("class")=="node"){
     		
     		$(this).append( "&nbsp;&gt;");
     	}
     	
     	
     	
     	
	});
	
		

/************************************************
//FILTRE POUR LA TRANSPARENCE DES PNG (IE5/6)
**************************************************/

	
   var badBrowser = (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
   if (badBrowser) {
   
   
   	//correction cartel   	
   	$("#cartel").css("marginTop","8px")
   
   
     // get all pngs on page
     $('img[src$=.png]').each(function() {
     
       if (!this.complete) {
         this.onload = function() { fixPng(this) };
       } else {
         fixPng(this);
       }
     });
   }


	
	

  	 
 });
 



	 function fixPng(png) {
	   // get src
	   var src = png.src;
	   // set width and height
	   if (!png.style.width) { png.style.width = $(png).width(); }
	   if (!png.style.height) { png.style.height = $(png).height(); }
	   // replace by blank image
	   png.onload = function() { };
	   png.src = blank.src;
	   // set filter (display original image)
	   png.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
	 } 


