function overlay() {

		//$('html').css({'overflow-y':'hidden'});
		
		//Get the A tag
		//var id = $(this).attr('href');
		var id = '#dialog';
		
		//Get the screen height and width
		var maskHeight = '5500px'; //$(document).height();
		
		//Set heigth and width to mask to fill up the whole screen
		$('#mask').css({'height':maskHeight, 'background-color':'#000000'});
		
		//transition effect		
		$('#mask').show();
				
		//Get the window height and width
		var winW = $(window).width();
		
		if($(window).height() > 768) {
			var winH = $(window).height();
		} else {
			var winH = $(window).height()+200;
		}
		
		//Set the popup window to center
		$(id).css('top',  0);
		$(id).css('left', winW/2-$(id).width()/2);
		
		//transition effect
		$(id).show();

		//if close button is clicked
		$('.window .close').click(function (e) {
			$('#mask').hide();
			$('.window').hide();
			$('html').css({'overflow-y':'scroll'});
			createCookie('agreedterms',true,1);
			//console();
		});
	};
