	function getWindowHeight() {
			var windowHeight = 0;
				windowHeight = $(window).height();	
				if(parseInt(windowHeight) +4>= parseInt($(document).height()) && parseInt(windowHeight) - 4 <= parseInt($(document).height())){
					if(windowHeight != 0){
						if($('.footMenuOrange').length > 0){
							windowHeight-=parseInt($(".footMenuOrange").css("height").replace("px",""));
							windowHeight-= 1;
						}
						if($('.footMenuBleu').length > 0){
							windowHeight-=parseInt($(".footMenuBleu").css("height").replace("px",""));
							windowHeight-= 1;
						}
						if($('.footLogo').length > 0){
							windowHeight-=parseInt($(".footLogo").css("height").replace("px","")) ;
							windowHeight-= 1;
						}
						$(".foot").css("position","absolute");
						$(".foot").css("top", windowHeight + "px");
						$(".backGround").css("height", windowHeight + "px");
					}
				}else{
					$(".foot").css("position","relative");
					$(".foot").css("top","0px");
				}
		}

		function init() {

		    $(".panorama").css("display","inline")
		    $(".panorama").panorama({
                viewport_width: 780,
                speed: 70000,
                direction: 'left',
                control_display: 'no'
            });

		    $("#headmenu").css("margin-left", ($("#headmenu").width() - $("#headmenu ul").width()) / 2 + "px");

		    if (!$.fontAvailable('Mistral')) {
		        $("#headtitre").removeClass('headtitre').addClass("headtitrespe");
            }

			$(".lnkDownload").fancybox({
			    'width': 400,
			    'height': 190,
			    'transitionIn': 'none',
			    'transitionOut': 'none',
			    'type': 'iframe',
			    'onComplete': function () {
			        if ($('#divPrint').length != 0) {
			            $("#divPrint").html("");
			        }
			    }
			});

			$(".lnkSend, .infoImportante").fancybox({
			    'width': 450,
			    'height': 330,
			    'transitionIn': 'none',
			    'transitionOut': 'none',
			    'type': 'iframe',
			    'onComplete': function () {
			        if ($('#divPrint').length != 0) {
			            $("#divPrint").html("");
			        }
			    }
			});


			$(".prix_sejours").fancybox({

			    'onComplete': function () {
			        if ($('#divPrint').length == 0) {
			            $("#fancybox-outer").append("<div id=\"divPrint\" style=\"padding:4px;text-align:right\"><a target=\"blank\" href=\"" + $("#fancybox-outer").find("img").attr("src") + "\">Version imprimable</a></div>");
			        } else {
			            $('#divPrint').html("<a target=\"blank\" href=\"" + $("#fancybox-outer").find("img").attr("src") + "\">Version imprimable</a>");
			        }
			    },
			    autoScale: false
			});
			
			
			$(window).resize(function() {
				getWindowHeight();
			});


getWindowHeight();



		}


		$(document).ready(function () {
		    init();
		});
