(function(){
parent.window.porno = function(el,s,l){
l = l.replace(/-text/g,"-thumb");
el.href=""+ el.href;
// el.href="http://www.porn2.com/cgi-bin/atx/out.cgi?s=" + s + "&c=1&l=" + l + "&u="+ el.href;
el.onmousedown="";return true;};
})();
function pornshowwebmasterlink (){
// document.write('<a target="_blank" href="'+unescape( "%68%74%74%70%3A%2F%2F%77%77%77%2E%69%6E%78%69%6F%2E%63%6F%6D%2F" ) +'">Webmasters</a>');
document.write('!!!');
}
var def_val="Search Porn";
function inp_txt_focus (object,default_string){
if (object.value == default_string) object.value = "";
object.style.color="#0780db";
}
function inp_txt_blur (object,default_string){
if (object.value == "")
object.value = default_string;
object.style.color="#000";
}
function inp_submit(q){
if (q == def_val || q == '') return false;
else { window.location = 'http://www.porn2.com/tag/' + q.replace(/ /g,"-"); return false; }
}
function showShareBox() { $('embedbox').style.display = 'none'; $('sharebox').style.display = 'inline'; }
function hideShareBox() { $('sharebox').style.display = 'none'; }
function showEmbedBox() { $('sharebox').style.display = 'none'; $('embedbox').style.display = 'inline'; }
function hideEmbedBox() { $('embedbox').style.display = 'none'; }
function selectAll(el) { el.focus(); el.select(); }


window.addEvent('domready', function() {

// RANDOMIZE SLOGANS
// var r=Math.floor(Math.random()*3);
// $('slogan').src = "http://i.porn2.com/porn/slogan" + (r+1) + ".png";

// NEW SLOGAN
//$('slogan').src = "http://www.xxx-filmy.pl/t/porn/slogan.png";

// ROTATE THUMB IMAGES
var periodical, a_image, t_images, m_num, t_num = 2;

var rotateImage = function() {
if (t_num < (m_num-1)) t_num++;
else t_num = 0;
a_image.src = t_images[t_num];
}

$$('.videothumb').addEvent('mouseenter', function(){
a_image = this;
t_images = new Array();
m_num = this.getProperty('rel');
// m_num = 3;
if (m_num > 1) {
for(i=0;i<m_num;i++) t_images[i] = this.src.replace("1.jpg", (i+1)+".jpg");
a_image.src = t_images[t_num-1];
periodical = rotateImage.periodical(800);
}
});

$$('.videothumb').addEvent('mouseleave', function(){
if (m_num > 1) {
a_image.src = t_images[0]; t_num = 2;
$clear(periodical);
}
});

}); // DOM
