/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
 
 function mostrar() { 
   $("#pop").fadeIn('slow'); 
} //checkHover
  function esconder() { 
   $("#pop").fadeOut('slow'); 
} //checkHover

$(document).ready(function (){
							
							   //Conseguir valores de la img 
   var img_w = $("#pop img").width() + 200; 
   var img_h = $("#pop img").height() + 150; 
    
   //Darle el alto y ancho 
   $("#pop").css('width', img_w + 'px'); 
   $("#pop").css('height', img_h + 'px'); 
    
   //Esconder el popup 
   $("#pop").hide();
   
   
      //Consigue valores de la ventana del navegador 
   var w = $(this).width(); 
   var h = $(this).height(); 
    
   //Centra el popup    
   w = (w/2) - (img_w/2); 
   h = (h/2) - (img_h/2); 
   $("#pop").css("left",w + "100 px"); 
   $("#pop").css("top",h + "100 px");
   
     //temporizador, para que no aparezca de golpe 
   setTimeout("mostrar()",1500);
   setTimeout("esconder()",10000);
   
   //Función para cerrar el popup
//Click imagen
$("#pop").click(function (){
$(this).fadeOut('slow');
$("#cerrar").fadeOut('slow');
});
   
   });


