// JavaScript Document
// scripts for the Smooth Pop Up

//SETTING UP OUR POPUP #1 
//0 means disabled; 1 means enabled;  

	var popupStatus = 0;
	
//loading popup with jQuery magic!  
 function loadPopup(){  

	//loads popup only if it is disabled  
 	if(popupStatus==0){  
 
 	jQuery("#backgroundPopup").css({  
 	"opacity": "0.7"  
 	});  
 
 	jQuery("#backgroundPopup").fadeIn("slow");
	
	jQuery("#popupContact").css({  
 	"opacity": "1.0",
	});  
	
 	jQuery("#popupContact").fadeIn("slow");  
 	
	popupStatus = 1;  
  	}  
 } 
  
  
//disabling popup with jQuery magic!  
 function disablePopup(){
	 
	 //disables popup only if it is enabled  
 	if(popupStatus==1){
	 
 	jQuery("#backgroundPopup").fadeOut("slow");  
 	jQuery("#popupContact").fadeOut("slow");  
 	popupStatus = 0;  
 
 	}  
 }
 
 //centering popup  
 function centerPopup(){
	 
 	//request data for centering  
 	//var windowWidth = document.documentElement.clientWidth;  
 	var windowHeight = document.documentElement.clientHeight;  
 	//var popupHeight = jQuery("#popupContact").height();  
 	//var popupWidth = jQuery("#popupContact").width();  

	//centering  
	 jQuery("#popupContact").css({  
 	"position": "absolute",  
 	//"top": windowHeight/2-popupHeight/2,  
 	//"left": windowWidth/2-popupWidth/2,
	"top":"0px",
	"left":"235px"
	});
	 
 	//only need force for IE6  
   
 	jQuery("#backgroundPopup").css({  
 	"height": windowHeight  
	 });
   
 }  
 
// THE MAIN EVENT
jQuery(document).ready(function(){  
 //following code will be here  
	
	//LOADING POPUP  
 	//Click the button event!  
 	jQuery("a#free_website").click(function(){
				  
		//centering with css  
 		centerPopup();  
 		//load popup  
 		loadPopup();
		//disable the default behaviour
		return false;
 	 });
	
	//CLOSING POPUP  
    //Click the x event!  
  	 jQuery("#popupContactClose").click(function(){  
   		disablePopup();  
     });  
   
   //Click out event!  
   jQuery("#backgroundPopup").click(function(){  
   		disablePopup();  
   });
   
   //Press Escape event!  
	jQuery(document).keypress(function(e){  
		if((e.keyCode==27)&&(popupStatus==1)){  
		disablePopup();  
		}  
	});
		 
});  //End of Document Ready Function




//SETTING UP OUR POPUP #2
//0 means disabled; 1 means enabled;  

	var popupStatus2 = 0;
	
//loading popup with jQuery magic!  
 function loadPopup2(){  

	//loads popup only if it is disabled  
 	if(popupStatus2==0){  
 
 	jQuery("#backgroundPopup2").css({  
 	"opacity": "0.7"  
 	});  
 
 	jQuery("#backgroundPopup2").fadeIn("slow");
	
	jQuery("#popupContact2").css({  
 	"opacity": "1.0",
	});  
	
 	jQuery("#popupContact2").fadeIn("slow");  
 	
	popupStatus2 = 1;  
  	}  
 } 
  
  
//disabling popup with jQuery magic!  
 function disablePopup2(){
	 
	 //disables popup only if it is enabled  
 	if(popupStatus2==1){
	 
 	jQuery("#backgroundPopup2").fadeOut("slow");  
 	jQuery("#popupContact2").fadeOut("slow");  
 	popupStatus2 = 0;  
 
 	}  
 }
 
 //centering popup  
 function centerPopup2(){
	 
 	//request data for centering  
 	//var windowWidth = document.documentElement.clientWidth;  
 	var windowHeight2 = document.documentElement.clientHeight;  
 	//var popupHeight = jQuery("#popupContact").height();  
 	//var popupWidth = jQuery("#popupContact").width();  

	//centering  
	 jQuery("#popupContact2").css({  
 	"position": "absolute",  
 	//"top": windowHeight/2-popupHeight/2,  
 	//"left": windowWidth/2-popupWidth/2,
	"top":"0px",
	"left":"235px"
	});
	 
 	//only need force for IE6  
   
 	jQuery("#backgroundPopup2").css({  
 	"height": windowHeight2  
	 });
   
 }  
 
// THE MAIN EVENT
jQuery(document).ready(function(){  
 //following code will be here  
	
	//LOADING POPUP  
 	//Click the button event!  
 	jQuery("a#free_website2").click(function(){
				  
		//centering with css  
 		centerPopup2();  
 		//load popup  
 		loadPopup2();
		//disable the default behaviour
		return false;
 	 });
	
	//CLOSING POPUP  
    //Click the x event!  
  	 jQuery("#popupContactClose2").click(function(){  
   		disablePopup2();  
     });  
   
   //Click out event!  
   jQuery("#backgroundPopup2").click(function(){  
   		disablePopup2();  
   });
   
   //Press Escape event!  
	jQuery(document).keypress(function(e){  
		if((e.keyCode==27)&&(popupStatus2==1)){  
		disablePopup2();  
		}  
	});
		 
});  //End of Document Ready Function



//SETTING UP OUR POPUP #3
//0 means disabled; 1 means enabled;  

	var popupStatus3 = 0;
	
//loading popup with jQuery magic!  
 function loadPopup3(){  

	//loads popup only if it is disabled  
 	if(popupStatus3==0){  
 
 	jQuery("#backgroundPopup3").css({  
 	"opacity": "0.7"  
 	});  
 
 	jQuery("#backgroundPopup3").fadeIn("slow");
	
	jQuery("#popupContact3").css({  
 	"opacity": "1.0",
	});  
	
 	jQuery("#popupContact3").fadeIn("slow");  
 	
	popupStatus3 = 1;  
  	}  
 } 
  
  
//disabling popup with jQuery magic!  
 function disablePopup3(){
	 
	 //disables popup only if it is enabled  
 	if(popupStatus3==1){
	 
 	jQuery("#backgroundPopup3").fadeOut("slow");  
 	jQuery("#popupContact3").fadeOut("slow");  
 	popupStatus3 = 0;  
 
 	}  
 }
 
 //centering popup  
 function centerPopup3(){
	 
 	//request data for centering  
 	//var windowWidth = document.documentElement.clientWidth;  
 	var windowHeight3 = document.documentElement.clientHeight;  
 	//var popupHeight = jQuery("#popupContact").height();  
 	//var popupWidth = jQuery("#popupContact").width();  

	//centering  
	 jQuery("#popupContact3").css({  
 	"position": "absolute",  
 	//"top": windowHeight/2-popupHeight/2,  
 	//"left": windowWidth/2-popupWidth/2,
	"top":"0px",
	"left":"235px"
	});
	 
 	//only need force for IE6  
   
 	jQuery("#backgroundPopup3").css({  
 	"height": windowHeight3  
	 });
   
 }  
 
// THE MAIN EVENT
jQuery(document).ready(function(){  
 //following code will be here  
	
	//LOADING POPUP  
 	//Click the button event!  
 	jQuery("a#free_website3").click(function(){
				  
		//centering with css  
 		centerPopup3();  
 		//load popup  
 		loadPopup3();
		//disable the default behaviour
		return false;
 	 });
	
	//CLOSING POPUP  
    //Click the x event!  
  	 jQuery("#popupContactClose3").click(function(){  
   		disablePopup3();  
     });  
   
   //Click out event!  
   jQuery("#backgroundPopup3").click(function(){  
   		disablePopup3();  
   });
   
   //Press Escape event!  
	jQuery(document).keypress(function(e){  
		if((e.keyCode==27)&&(popupStatus3==1)){  
		disablePopup3();  
		}  
	});
		 
});  //End of Document Ready Function

 
