
function XuxuModal(url, w, h) {
  
  
	$('body').append('<div id="mw-xuxumodal-fundo-escurecer">  </div> <img id="mw-xuxumodal-btfechar" alt="Fechar" src="imagens/xuxumodal_fechar.png"/>  <iframe id="mw-xuxumodal-iframe" border="0" frameborder="0" allowtransparency="true" src="' + url + '" height="' + h  + '" width="' + w + '"></iframe>');

	$('#mw-xuxumodal-fundo-escurecer').css({
	'position': 'fixed',
	'background-color': 'rgb(0,0,0)',
	'width': '100%',
	'height': '100%',
	'margin': '0',
	'top': '0',
	'left': '0',
	'padding': '0',
	'display': 'none',
	'opacity': '.9',               /* Estilo padrao para transparency */
	'-moz-opacity': '.9',          /* Transparencia para Mozillas antigos */
	'filter': 'alpha(opacity=90)',  /* Transparencia para IE */
	'z-index': 99999999
	});
    
    
    
	$('#mw-xuxumodal-btfechar').css({
	'position': 'fixed',
	'margin': '0',
	'top': '0',
	'right': '0',
	'margin-top': '10px',
	'margin-right': '20px',
	'padding': '0',
	'cursor':'pointer',
	'display': 'none',
	'z-index': 99999999999
	});
    

	$('#mw-xuxumodal-iframe').css({
	'position': 'fixed',
	'margin': '0',
	'top': '0',
	'left': '0',
	'padding': '0',
	'display': 'none',
	'z-index': 99999999999
	});
    
	$('#mw-xuxumodal-iframe').unbind().load(function() {   
		$(this).contents().find('body').css({'top':'0', 'left':'0', 'margin': '0', 'padding': '0', 'background-color': 'transparent'}); 
		
	});
		



	var margem_left = ($(window).width() - $('#mw-xuxumodal-iframe').width())  / 2;
	var margem_top  = ($(window).height() - $('#mw-xuxumodal-iframe').height())  / 2;
	$('#mw-xuxumodal-iframe').css({'margin-left': margem_left, 'margin-top': margem_top});


	$('#mw-xuxumodal-fundo-escurecer').fadeIn(500, function() {
		$('#mw-xuxumodal-btfechar').show();
		$('#mw-xuxumodal-iframe').fadeIn(300);
	});

	$('#mw-xuxumodal-fundo-escurecer,#mw-xuxumodal-btfechar').unbind().click(function() {

		$('#mw-xuxumodal-btfechar').remove();

		$('#mw-xuxumodal-iframe').fadeOut(300, function(){ 
		
			$(this).remove(); 

			$('#mw-xuxumodal-fundo-escurecer').fadeOut(300, function(){ 
				$(this).remove(); 
			});
			
		});
		
	});
  
  
}


