$(document).ready(function() {	

	$('.window .close').click(function (e) {
		e.preventDefault();
		
		$('#mask').hide();
		$('.window').hide();
	});	
		
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();
	
		$('#mask').css({'width':maskWidth,'height':maskHeight});
        //define o efeito do azul o mask do css
		$('#mask').fadeIn(1000);	
		$('#mask').fadeTo("slow",0.9);	
	
		//tamanho da janela
		var winH = $(window).height();
		var winW = $(window).width();
              
		$(id).css('top',  winH/2-$(id).height()/2);
		$(id).css('left', winW/2-$(id).width()/2);
	
		$(id).fadeIn(2000); 
	
	
	//Esse comando permite que o box feche ao clicar na tela novamente por isso está desabilitado
	//$('#mask').click(function () {
	//	$(this).hide();
//		$('.window').hide();
//	});			
	
});
