/* build & parse encoded email */
$(function(){
	sextansInfoMail=jsCourriel("","&#105;&#110;&#102;&#111;","&#115;&#101;&#120;&#116;&#97;&#110;&#115;","&#99;&#111;&#109;","","");
	$("#emailSextansInfo").append(sextansInfoMail);
});
function jsCourriel(text,first,domaine,ext,classe,title) {
	if(text==""){
		text=first + "&#64" + domaine + "&#46;" + ext;
	}
	return"<a href='mailto:" + first + "&#64" + domaine + "&#46;" + ext + "'>" + text + "</a>";
}

/* font perso */
$(function(){
		Cufon.replace('#page h2');
});

/* pngfix */
$(function(){
		//$(document).pngFix();
});

/* first-navig */
$(function(){
    $hauteurMarche="-1.6em";
    if($.browser.safari == true){
        $hauteurMarche="-1.5em";
    }
    if($.browser.msie == true){
        if($.browser.version != 8.0){
            $hauteurMarche="-1.7em";
        }else{
            $hauteurMarche="-1.55em";
        }
    }
    $("#navig-prime").css({right:$hackNavigPrime});
	$("#navig-prime li a").css({color:"#61CBE6",cursor:"pointer"});
	
	$("#navig-prime ul li").each(function(){
		oClass=$(this).children().attr("class");
		if(oClass!=""){
			$(this).addClass(oClass);
		}
		result='<span>'+$(this).text()+'</span>';
		$(this).prepend(result);
	});
	$("#navig-prime li").css({position:"relative"});
	$("#navig-prime li[class=on]").children("span").css({color:"#454038", fontWeight:"bold", cursor:"default"});
	$("#navig-prime li").mouseover(function(){
		if($(this).hasClass("on")==false){
			$(this).stop();
			$(this).animate({top:$hauteurMarche},140);
		}
	});
	$("#navig-prime li").mouseout(function(){
		if($(this).hasClass("on")==false){
			$(this).stop();
			$(this).animate({top:"0px"},140);
		}
	});
});
/* footer alonger lorsque écran trop grosse */
$(function(){
    resizeFooter();
    $(window).resize(resizeFooter);
});
function resizeFooter(){
    if($(window).height() > $("body").height() ){
        $("#footerContent").height($(window).height()-$("#footerContent").offset().top-47);
    }
}



