/***************************/
//@Author: Adrian "yEnS" Mato Gondelle
//@website: www.yensdesign.com
//@email: yensamg@gmail.com
//@license: Feel free to use it, but keep this credits please!					
/***************************/
//About Page Pop Up
			var popupAboutStatus = 0;
			
			function loadPopupAbout(){
				if(popupAboutStatus==0){
					$("#popupAbout").fadeIn("slow");
					popupAboutStatus = 1;
				}
			}
			
			function disablePopupAbout(){
				if(popupAboutStatus==1){
					$("#popupAbout").fadeOut("slow");
					popupAboutStatus = 0;
				}
			}
			
			function centerPopupAbout(){
				var windowWidth = document.documentElement.clientWidth;
				var windowHeight = document.documentElement.clientHeight;
				var popupAboutHeight = $("#popupAbout").height();
				var popupAboutWidth = $("#popupAbout").width();
				$("#popupAbout").css({
					"position": "absolute",
					"top": windowHeight/2-popupAboutHeight/2,
					"left": windowWidth/2-popupAboutWidth/2
				});
			}
			
			
			$(document).ready(function(){
				$("#popupAbout").fadeOut();
				popupAboutStatus = 0;
				$("#about").click(function(){
				$("#popupAbout").css({
					"visibility": "visible"	});
					disablePopupServices();
					disablePopupContact();
					centerPopupAbout();
					loadPopupAbout();
				});
				$("#popupAboutClose").click(function(){
					disablePopupAbout();
				});
			});

$("#popupAbout").click(function(){
                         disablePopupAbout();
                         });
			$(function()
			{
				$('#popupAbout').jScrollPane();
				$('.popupAbout').jScrollPane(
					{
						showArrows: true,
						horizontalGutter: 10
					}
				);
			});





//Services Page Pop Up
			var popupServicesStatus = 0;
			
			function loadPopupServices(){
				if(popupServicesStatus==0){
					$("#popupServices").fadeIn("slow");
					popupServicesStatus = 1;
				}
			}
			
			function disablePopupServices(){
				if(popupServicesStatus==1){
					$("#popupServices").fadeOut("slow");
					popupServicesStatus = 0;
				}
			}
			
			function centerPopupServices(){
				var windowWidth = document.documentElement.clientWidth;
				var windowHeight = document.documentElement.clientHeight;
				var popupServicesHeight = $("#popupServices").height();
				var popupServicesWidth = $("#popupServices").width();
				$("#popupServices").css({
					"position": "absolute",
					"top": windowHeight/2-popupServicesHeight/2,
					"left": windowWidth/2-popupServicesWidth/2
				});
			}
			
			
			$(document).ready(function(){
				$("#popupServices").fadeOut();
				popupServicesStatus = 0;
				$("#services").click(function(){
				$("#popupServices").css({
					"visibility": "visible"	});
					disablePopupAbout();
					disablePopupContact();					
					centerPopupServices();
					loadPopupServices();
				});
				$("#popupServicesClose").click(function(){
					disablePopupServices();
				});
			});

$("#popupServices").click(function(){
                         disablePopupServices();
                         });
			$(function()
			{
				$('#popupServices').jScrollPane();
				$('.popupServices').jScrollPane(
					{
						showArrows: true,
						horizontalGutter: 10
					}
				);
			});
//Contact Page Pop Up
			var popupContactStatus = 0;
			
			function loadPopupContact(){
				if(popupContactStatus==0){
					$("#popupContact").fadeIn("slow");
					popupContactStatus = 1;
				}
			}
			
			function disablePopupContact(){
				if(popupContactStatus==1){
					$("#popupContact").fadeOut("slow");
					popupContactStatus = 0;
				}
			}
			
			function centerPopupContact(){
				var windowWidth = document.documentElement.clientWidth;
				var windowHeight = document.documentElement.clientHeight;
				var popupContactHeight = $("#popupContact").height();
				var popupContactWidth = $("#popupContact").width();
				$("#popupContact").css({
					"position": "absolute",
					"top": windowHeight/2-popupContactHeight/2,
					"left": windowWidth/2-popupContactWidth/2
				});
			}
			
			
			$(document).ready(function(){
				$("#popupContact").fadeOut();
				popupContactStatus = 0;
				$("#contact").click(function(){
				$("#popupContact").css({
					"visibility": "visible"	});
					disablePopupAbout();
					disablePopupServices();					
					centerPopupContact();
					loadPopupContact();
				});
				$("#popupContactClose").click(function(){
					disablePopupContact();
				});
                              
                              $("#popupContact").click(function(){
                                                            disablePopupContact();
                                                            });
			});
			$(function()
			{
				$('#popupContact').jScrollPane();
				$('.popupContact').jScrollPane(
					{
						showArrows: true,
						horizontalGutter: 10
					}
				);
			});

