function centerPopup(){
	$("#travel-popup").css({
		top:$(window).height()/2-$("#travel-popup").height()/2
	});
}

$(document).ready(function() {

	$(window).resize(function(){
		centerPopup();
	});
	
	$("#closePopup").mouseup(function() {
	    $("#travel-popup").fadeOut(200,function(){
			 $("#popup-zone").hide();
		});
	    $("#alpha-mask").fadeOut(200);
	});
	
	$("#btn-return-site").mouseup(function() {
	    $("#travel-popup").fadeOut(200,function(){
			 $("#popup-zone").hide();
	    });
	    $("#alpha-mask").fadeOut(200);
	    $("#alpha-mask").css("display", "none");
	});
	
	$("#alpha-mask").mouseup(function() {
	    $("#travel-popup").fadeOut(200,function(){
			 $("#popup-zone").hide();
		});
	    $(this).fadeOut(200);
	});
	
	$("#alpha-mask").css({
		opacity:0.3,
		height:$(document).height()+"px"
	});
	
	$("#popup-zone").hide();
});
