$(document).ready(function(){
	$('img[src$=.png]').ifixpng();
	
	if(typeof sIFR == "function"){
		sIFR.replaceElement(named({sSelector:"body h2.sifr", sFlashSrc:"swf/eurostile.swf", sColor:"#ffffff", sLinkColor:"#000000", sBgColor:"#240f09", sHoverColor:"#CCCCCC", sFlashVars:"textalign=left&offsetTop=0", sWmode:"transparent",sCase: "upper"}));
		
		
		sIFR.replaceElement(named({sSelector:"body #blocDef1 h2", sFlashSrc:"swf/eurostile.swf", sColor:"#FFAA3C", sLinkColor:"#000000", sBgColor:"#240f09", sHoverColor:"#CCCCCC", sFlashVars:"textalign=left&offsetTop=0", sWmode:"transparent",sCase: "upper"}));
		
		sIFR.replaceElement(named({sSelector:"body h2.sifr2", sFlashSrc:"swf/eurostile_bold.swf", sColor:"#ffffff", sLinkColor:"#000000", sBgColor:"#240f09", sHoverColor:"#CCCCCC", sFlashVars:"textalign=left&offsetTop=0", sWmode:"transparent",sCase: "upper"}));
		
		sIFR.replaceElement(named({sSelector:"body h3.sifr", sFlashSrc:"swf/eurostile_bold.swf", sColor:"#ffffff", sLinkColor:"#000000", sBgColor:"#240f09", sHoverColor:"#CCCCCC", sFlashVars:"textalign=left&offsetTop=0", sWmode:"transparent",sCase: "upper"}));
		
		sIFR.replaceElement(named({sSelector:"body h4.sifr", sFlashSrc:"swf/eurostile_bold.swf", sColor:"#ffffff", sLinkColor:"#000000", sBgColor:"#240f09", sHoverColor:"#CCCCCC", sFlashVars:"textalign=left&offsetTop=0", sWmode:"transparent",sCase: "upper"}));
	};
	
	$('div#colGauche div.item li a').mouseenter(function(){
		 $(this).animate({
			backgroundPosition: "0"
		},100);
	});
	
	$('div#colGauche div.item li a').mouseleave(function(){
		 $(this).animate({
			backgroundPosition: "-160px"
		},100);
	});
	
	
	
/*	$('#advanced_search #advanced_search_products').attr('disabled','disabled');
	$('#advanced_search #advanced_search_property').attr('disabled','disabled');*/
	
	/*$('#advanced_search select').change(function(){
		if($('#advanced_search_country').val() != 0){
			$.ajax({
			   type: "POST",
			   url: "php/search_select.php",
			   data: "idPays="+$('#advanced_search_country').val()+"&idPropriete="+$('#advanced_search_property').val(),
			   success: function(html){
				   $('#conteneur_advanced_search').html(html);
				 //$('#advanced_search #advanced_search_products').attr('disabled','');
			   }
			 });
		}else{
			$('#advanced_search #advanced_search_products').attr('disabled','disabled');
		}											
	});*/
});

function afficheActivity(id,idLien){	
	//$("div.blocActivite").fadeOut(0);
	$('h4.lienActivite').removeClass('actif');
	$(idLien).addClass('actif');
   	//$(id).fadeIn("slow"); 
	return false;
}

function afficheDefinition(id,idLien){	
	$("div.blocDefinition").fadeOut(0);
	$('a.lienDefinition').removeClass('actif');
	$(idLien).addClass('actif');
   	$(id).fadeIn("slow");
	sIFR.replaceElement(named({sSelector:id+" h2", sFlashSrc:"swf/eurostile.swf", sColor:"#ffbc3c", sLinkColor:"#000000", sBgColor:"#240f09", sHoverColor:"#CCCCCC", sFlashVars:"textalign=left&offsetTop=0", sWmode:"transparent",sCase: "upper"}));
	return false;
}

function afficheTraining(id){	
	$("div.blocTraining").fadeOut(0);
   	$(id).fadeIn("slow"); 
	return false;
}

function afficheContacts(id){
	$('.blockContacts').fadeOut(0);
	$(id).fadeIn("slow");
	
	if(id == '#contacts_1'){
		$('img#laCarte').attr('src','images/mep/carte_jaune.png');
		$('img[src$=/images/mep/carte_jaune.png]').ifixpng();
		return false;
	}
	if(id == '#contacts_2'){
		$('img#laCarte').attr('src','images/mep/carte_bleue.png');
		$('img[src$=/images/mep/carte_bleue.png]').ifixpng();
		return false;
	}
	if(id == '#contacts_3'){
		$('img#laCarte').attr('src','images/mep/carte_orange.png');
		$('img[src$=/images/mep/carte_orange.png]').ifixpng();
		return false;
	}
}
