$(window).bind("load", function() { 

	   var footerHeight = 0,
		   footerTop = 0,
		   $footer = $("#footer");

	   positionFooter();
	   $("#footer").fadeIn(1200);

	   function positionFooter() {

				footerHeight = $footer.height();
				footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";

			   if ( $(window).height() > ($(document.body).height()+footerHeight)) {
				   $footer.css({
						position: "absolute"
				   }).css({
						top: footerTop
				   })
			   } else {
				   $footer.css({
						position: "static"
				   })
			   }

	   }

	   $(window)
			   .scroll(positionFooter)
			   .resize(positionFooter)

});


$(document).ready(function(){

	if ($.browser.msie && $.browser.version == '6.0') {
		$('.btonPlayVideo').css("display","none");
		$('.btonPlayVideoRoll').css("display","none");
	}
	
	$("a[rel^='prettyPhoto']").prettyPhoto();
	
	$("#vignetteQuickTour").hover(function(){
	   $(this).find("img.btonPlayVideo").hide();
	   $(this).find("img.btonPlayVideoRoll").show();
	},function(){
	   $(this).find("img.btonPlayVideoRoll").hide();
	   $(this).find("img.btonPlayVideo").show();
	});
	
	$("img.imgListeNouveaute").hover(function(){
		$(this).css("border-color","#D9D9D9");
	},function(){
		$(this).css("border-color","#f2f2f2");
	});
	 
	 
	// Tooltips
	
	var navTimers = [];  
     $('.toolTip').hover(  
    	function () {  
        	var id = jQuery.data(this);  
			var $this = $(this);  
			navTimers[id] = setTimeout(function() {
				 $this.find("div").css({opacity:0.95}).fadeIn(300);
				navTimers[id] = ""; 
			}, 200 );  
		},  
		function () {  
			var id = jQuery.data(this);  
			if (navTimers[id] != "" ) {  
				clearTimeout( navTimers[id] );  
			} else { 
				$(this).find("div").fadeOut(100);  
			}  
		}  
	);
	
});
