function setpng(img) { if(document.all && (IEver=parseFloat(navigator.appVersion.split("MSIE")[1])) && (IEver>=5.5) && (IEver<7) && document.body.filters && img) {
	imgName=img.src.toUpperCase();
	if(imgName.substring(imgName.length-3,imgName.length)=="PNG") img.outerHTML=
		"<span "+(img.id?"id='"+img.id+"' ":"")+(img.className?"class='"+img.className+"' ":"")+(img.title?"title=\""+img.title+"\" ":"")
		+"style=\"width:"+img.width+"px;height:"+img.height+"px;"+(img.align=="left"?"float:left;":(img.align=="right"?"float:right;":""))
		+(img.parentElement.href?"cursor:hand;":"")+"display:inline-block;"+img.style.cssText+";"
		+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"',sizingMethod='scale');\"></span>";
}}


$().ready(function() { 	
						
	// animation du pied de page   	
	var delayAnim = 300;
	$(".vignette:not(.actif)").hover(function() {
		$(this).stop().animate({"marginTop": "-60px", "marginBottom": "60px"}, delayAnim);
	}, function() {
		$(this).stop().animate({"marginTop": "0px", "marginBottom": "0px"}, delayAnim);
	});
	
	// Hack IE<7 transparence des png
	if ($.browser.msie) {
		$("img").each(function() {
			$(this).load(function() {
				setpng(this);				  
			});
		});
	}
		
	// Hack appareils mobiles	
	if (('ontouchstart' in document.documentElement) && (typeof orientation != 'undefined')) {
	    $("#footer").css("position", "absolute");
		window.onresize = window.onscroll = function () {			
			var lowerleft = [window.pageXOffset,(window.pageYOffset+window.innerHeight)];
			$("#footer").stop().animate({"top": lowerleft[1]-100+65 + 'px'}, 100);
		}		
		window.onload = function () {
			window.onresize();
		}
	}
	
	// Vérification des liens externes : ajout d'une icone en hover
	$("a[target=_blank]").hover(function() {
		$(this).append("<img src='../../img/icone_lien_externe.png' alt='External Link' class='external_link' />");
	}, function() {
		$(this).children("img.external_link").remove();
	});
	
	// désactivation du click droit
    $(document).bind("contextmenu",function(e){
      //  return false;
    });

});
