$(document).ready(function() {     
      
        //Get the screen height and width  
        var maskHeight = $(document).height();  
        var maskWidth = $(window).width();  
      
        //Set height and width to mask to fill up the whole screen  
        $('#mask').css({'width':maskWidth,'height':maskHeight});  
          
        //transition effect         
        
		//Get the window height and width  
        var winH = $(window).height();
        var winW = $(window).width();  
                
        //Set the popup window to center  
        $('#slidediv').css('top', '-612px');  
        $('#slidediv').css('left', winW/2-$('#slidediv').width()/2);  
      
        //transition effect  
		
		$('#mask').delay(1500).fadeTo(500, 0.7); 
		$('#slidediv').delay(2000).animate({top: '+=642px'}, 3000);
      
    //if close button is clicked  
    $('.window .close').click(function (e) {  
        //Cancel the link behavior  
        e.preventDefault();  
        $('#mask, .slidewindow').hide();  
    });       
      
    //if mask is clicked  
    $('#mask').click(function () {  
        $(this).hide();  
        $('.slidewindow').hide();  
    }); 
	
	$('.slide-close').click(function () {  
        $('#mask').hide();  
        $('.slidewindow').hide();  
    });   
      
});  
