$('a').each(function() {
if (this.href.match('/tp/') this.target='_blank');
});(function(){
})();
var def_val="Search porn videos..";
function inp_txt_focus (object,default_string){
	object.style.fontWeight="bold";
	if (object.value == default_string) object.value = "";
}
function inp_txt_blur (object,default_string){
	object.style.fontWeight="normal";
	if (object.value == "")
	object.value = default_string;
}
function inp_submit(q){
	if (q == def_val || q == '') return false;
}
function showShareBox() { $('#embedbox').hide(); $('#sharebox input').attr('value',window.location.href); $('#sharebox').show(); }
function hideShareBox() { $('#sharebox').hide(); }
function showEmbedBox() { $('#sharebox').hide(); $('#embedbox textarea').attr('value',$('#embedcodeholder').html()); $('#embedbox').show(); }
function hideEmbedBox() { $('#embedbox').hide(); }
function selectAll(el) { el.focus(); el.select(); }

var thumbs=new Array();
var stat=new Array();
var thumb=new Array();

function rotatethumb(i,str)
{ var loop=0;

if (stat[str])
{
	while ((thumbs[str][i]==0 || i>=5) && loop<100)
	{ if (i>=5) { i=0; }
	else
	{ i++;
	}
	loop++;
	}

	if (thumb[str][i].complete)
	{	
		document.getElementById(str).src=thumb[str][i].src;
	setTimeout("rotatethumb("+(i+1)+",'"+str+"')",500);
	}
	else
	{	setTimeout("rotatethumb("+i+",'"+str+"')",20);
	}
}


}

function loadthumb(url,str,j)
{	if (stat[str]) { thumb[str][j].src=url; }
}

function startr(str,ta,te)
{	stat[str]=1;
var num;
var first=1;
for(var j=0;j<16;j++)
{ if (thumbs[str][j]==1)
{ thumb[str][j]=new Image();
num=j+1;
if (first) { first=0; loadthumb(ta+num+te,str,j); }
else { setTimeout("loadthumb('"+ta+num+te+"','"+str+"',"+j+")",j*50); }
}
}
rotatethumb(0,str);
}

function endr(str)
{
	stat[str]=0;
}
