var mix;
var miy;


$(document).ready(comenzar);

function comenzar()
{
//$("#vineta2").simpletip({ persistent: true, content: '<img src="/projects/simpletip/images/logo_small.png" />' }); 
$(".tabla_foto").hover(buscar_img, esconder_img);
//$(".tabla_foto2").hover(buscar_img2, esconder_img2);
}



function buscar_img(e)
{

mix = e.clientX+document.body.scrollLeft;
miy = e.clientY+document.body.scrollTop;

id = $(this).attr('id');
 window.parent.mover_vineta( mix,miy,id);

 /* $.ajax({
           async:true,
           type: "GET",
           dataType: "html",
           contentType: "application/x-www-form-urlencoded",
           url:"ver_imagen.php",
           data:"id="+$(this).attr('id'),
           beforeSend:inicioEnvio,
           success:llegadaDatos,
           timeout:4000,
           error:problemas
         }); 
  return false;
 */
 
}



function esconder_img()
{
  window.parent.ocultar_vineta();
}





var mix2;
var miy2;







function buscar_img2(e)
{
var nleft;
if(screen.width == 1440)
{
nleft = 0 + 30;
}else if(screen.width == 1024)
{
nleft =30 + 100;
}else if(screen.width == 800)
{
nleft = 200 + 30;
}else if(screen.width == 1280)
{
nleft = 200 + 30;
}else if(screen.width == 1152)
{
nleft = 200 + 30;
}
mix2 = e.clientX+document.body.scrollLeft-nleft;
miy2 = e.clientY+document.body.scrollTop;
//alert(mix2);
//alert(miy2);
id = $(this).attr('id');
 window.parent.mover_vineta2( mix2,miy2,id);

 /* $.ajax({
           async:true,
           type: "GET",
           dataType: "html",
           contentType: "application/x-www-form-urlencoded",
           url:"ver_imagen.php",
           data:"id="+$(this).attr('id'),
           beforeSend:inicioEnvio,
           success:llegadaDatos,
           timeout:4000,
           error:problemas
         }); 
  return false;
 */
 
}


function esconder_img2()
{
  window.parent.ocultar_vineta2();
}