// Permet d'afficher les flyovers
function screenFlyover() {

	// Positionne la popup
	$("#content_Flyover").css({
		"left"				:	"50%",
		"margin-left"		:	"-"+(parseInt( $("#content_Flyover").width()/2 )+"px"),
		"top"				:	"40%",
		"margin-top" 		: 	"-"+(parseInt( $("#content_Flyover").height() / 2 )+"px")
	});

	/* Permet de mettre la popup au coin supérieur si cette dernière est plus grande que la taille de l'écran */
	if ( $(window).height() <= $("#content_Flyover").height() ) {
		var diffSize = ( parseInt($("#content_Flyover").height() / 2) - parseInt($(window).height() / 2 ) );
		$("#content_Flyover").css("margin-top",parseInt($("#content_Flyover").css("margin-top")) + diffSize + 20);
		$("#content_Flyover").css("padding-bottom","20px");
	}
	
	/* Permet de le centrer par rapport au scrool */
	$("#content_Flyover").css("margin-top", ( parseInt($("#content_Flyover").css("margin-top")) + ($(window).scrollTop()) )+"px");
	
	/* Permet d'agrandir le background_Flyover */
	if ( $("body").height() > $(window).height() ) {
		if ($("html").height() > $("body").height()) {
			sizeBackgroundFlyover = $("html").height();
		} else {
			// IE
			sizeBackgroundFlyover = $("body").height();
		}
	} else {
		sizeBackgroundFlyover = $(window).height();
	}
	
	$("#background_Flyover").height(sizeBackgroundFlyover);
	
	// Ferme la popup quand on clique sur l'arrière plan
	$("#background_Flyover").click(function() {
		closeFlyover();
	});
}

function closeFlyover () {
	$("#background_Flyover").hide();
	$("#content_Flyover").hide();
}
