this.contactModal = function(){	
	
	
   
     //select all the a tag with name equal to modal  
     jQuery('a[id=modal]').click(function(e) {  
         //Cancel the link behavior  
         e.preventDefault();
		 //alert("Toto");
         //Get the A tag  
         var id = jQuery(this).attr('href');  
       
         //Get the screen height and width  
         var maskHeight = jQuery(document).height();  
         var maskWidth = jQuery(window).width();  
       
         //Set height and width to mask to fill up the whole screen  
         jQuery('#mask').css({'width':maskWidth,'height':maskHeight});  
           
         //transition effect       
         jQuery('#mask').fadeIn(1000);      
         jQuery('#mask').fadeTo("slow",0.6);    
       
         //Get the window height and width  
         var winH = jQuery(document).height();  
         var winW = jQuery(document).width();
         
         //alert(winW); 
                 
         //Set the popup window to center  
         jQuery(".window").css('top',  (winH-jQuery(".window").height())/2);  
         jQuery(".window").css('left', (winW-jQuery(".window").width())/2);  
       
         //transition effect  
         jQuery(id).fadeIn(2000);   
       
     });  
       
     //if close button is clicked  
     jQuery('.window .close').click(function (e) {  
         //Cancel the link behavior  
         e.preventDefault();  
         jQuery('#mask, .window').hide();  
     });       
       
     //if mask is clicked  
     jQuery('#mask').click(function () {  
         jQuery(this).hide();  
         jQuery('.window').hide();  
     });           
};


// starting the script on page load
jQuery(document).ready(function(){
	contactModal();
});