$(document).ready(function(){
$(".rollover").hover(
 function() {
  curr = $(this).find("img").attr("src");
  overlen = curr.length;
  over = curr.substr(0, overlen-4);
  over = over+'-h.gif';
  $(this).find("img").attr({ src: over});
 },
 function() {
  $(this).find("img").attr({ src: curr});
 }
)

$(".rollover").find("img").each(function(i) {
  temp = this.src;
  prelen = temp.length;
  pre = temp.substr(0, prelen-4);
  pre = pre+'-h.gif';
  preload_image_object = new Image();
  preload_image_object.src = pre;
});


// $('#Msg').fadeIn(4000);

});




function pop(img){
foto1= new Image();
foto1.src=(img);
Control(img);
}

function Control(img){
if((foto1.width!=0)&&(foto1.height!=0)){
verFoto(img);
}
else{
funcion="Control('"+img+"')";
intervalo=setTimeout(funcion,20);
}
}

function verFoto(img){
	anchom = screen.width/2-320;
	altom = screen.height/2-220;

ancho=foto1.width+20;
alto=foto1.height+20;
cadena="width="+ancho+",height="+alto+",left="+anchom+",top="+altom;
ventana=window.open(img,"",cadena);
}