$(document).ready(function() {
nudevistaHTML = '
';
nudevistaHTML += '';
$('#nudevista').html(nudevistaHTML);
$("td.gallery img").hover(
function() {
$(this).parent().prev().addClass('stable');
cImg = this.id;
cTmt = window.setTimeout('nudevista_shownext()',50);
},
function() {
$(this).parent().prev().removeClass('stable');
nudevista_stop(cImg);
cImg = false;
window.clearTimeout(cTmt);
}
);
nudevista_shownext();
});
cTmt = false;
cImg = false;
cGid = false
function nudevista_stop(id) {
iImg = $('#'+id);
src = iImg.attr('src');
cur = src.split('.');
cur = cur[cur.length-2];
return iImg.attr('src',src.replace(Math.floor(id/10)+'.'+cur+'.jpg',Math.floor(id/10)+'.jpg'));
}
function nudevista_shownext() {
window.clearTimeout(cTmt);
if (cImg==false) return;
iImg = $('#'+cImg);
oSrc = nudevista_icount(iImg.attr('num'),iImg.attr('src'),cImg);
if (oSrc!=false) iImg.attr('src',oSrc);
if (iImg.parent().attr('href').indexOf('slutload')==-1) cTmt = window.setTimeout('nudevista_shownext()',750);
}
function nudevista_icount(cnt,src,id) {
if (!cnt) return false;
cnt = cnt*1 - 1;
if (cnt==0) return false;
cur = src.split('.');
cur = cur[cur.length-2];
if (cur.length!=1) return src.replace(Math.floor(id/10)+'.jpg',Math.floor(id/10)+'.'+1+'.jpg');
if ( (cur*1) == cnt) return src.replace(Math.floor(id/10)+'.'+cur+'.jpg',Math.floor(id/10)+'.jpg');
return src.replace(Math.floor(id/10)+'.'+cur+'.jpg',Math.floor(id/10)+'.'+(cur*1+1)+'.jpg');
}