function overlay(){
	
		//Get the A tag
		var id ="#overlay2";
		
		//Get the screen height and width
		var maskHeight = $j(document).height();
		var maskWidth = $j(window).width();
	
		//Set height and width to mask to fill up the whole screen
		$j('#mask').css({'width':maskWidth,'height':maskHeight});
		
		//transition effect		
	
		$j('#mask').fadeTo("fast");	
	
		//Get the window height and width
		var winH = $j(window).height();
		var winW = $j(window).width();
              
		//Set the popup window to center
		$j(id).css('top',  winH/2-$j(id).height()/2);
		$j(id).css('left', winW/2-$j(id).width()/2);
	
		//transition effect
		$j(id).fadeIn(0); 
		
		//if mask is clicked
	$j('#mask').click(function () {
		$j(this).hide();
		$j('.window').hide();
	});		
	
	//if overlay is clicked
		$j('#overlay2').click(function () {
		$j(this).hide();
		$j('.window').hide();
	});	
		
}

function exit(){
	$j('.window').hide();
}
$j(document).ready(function() {	
	//time delay until overlay appears
	setTimeout('overlay()',1000);
	setTimeout('exit()',10000);
});


