var popupStatus = 0;
function loadPopup_5(){
	if(popupStatus==0){
		$("#backgroundPopup_5").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup_5").fadeIn("slow");
		$("#popupContact_5").fadeIn("slow");
		popupStatus = 1;
	}
}
function disablePopup_5(){
	if(popupStatus==1){
		$("#backgroundPopup_5").fadeOut("slow");
		$("#popupContact_5").fadeOut("slow");
		popupStatus = 0;
	}
}
function centerPopup_5(){
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupContact_5").height();
	var popupWidth = $("#popupContact_5").width();
	$("#popupContact_5").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	$("#backgroundPopup_5").css({
		"height": windowHeight
	});
	
}
$(document).ready(function(){
	$("#button_5").click(function(){
		centerPopup_5();
		loadPopup_5();
	});
	$("#popupContactClose_5").click(function(){
		disablePopup_5();
	});
	$("#backgroundPopup_5").click(function(){
		disablePopup_5();
	});
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup_5();
		}
	});
});

