$(document).ready(function(){

//Larger thumbnail preview 
var toog=1;
$(".thumb_td").hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-50px', 
			marginLeft: '-100px', 
			top: '50%', 
			left: '42%', 
			width: '150px', 
			height: '53px',
			padding: '20px' 
		}, 250);
		$(this).find('img').attr("title",$(this).find('img').title);
	
	} , function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '90px', 
			height: '35px', 
			padding: '2px'
		}, 250);
		
	//setTimeout(online, 1000);
	//setInterval(online, 20000);
});

//Swap Image on Ctdck
	$(".thumb_td a").click(function() {
		
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#main_view img").attr({ src: mainImage });
		return true;		
	});
	
	$("#xit").click(function() {
		$("#x").fadeOut(1000);
		$("#info").fadeOut(1000);	
	});
	
	$("#max").click(function() {
							 if(toog) {
		$("#info").css("display","block");
		$("#max").attr("value","-");
		$("#info").animate({height:'60px'},1000); 
		toog=0;
							 }
							 else {
								 $("#max").attr("value","?");
								 $("#info").animate({height:'0px'},1000); 
								toog=1; 
							 }
	});
	
 
});

function noLeftClick()
{
if (event.button==1)
{f
//alert('Not allowed')
a;
}
}
document.onmousedown=noLeftClick;

function kliks(id, href) {
	$.get("kliks.php?click="+id,{});
	$.post('/stats/setstat.php', { link : href });
}


//var int2=setInterval(whoisonline, 120000);
function resend() {
	document.getElementById('onlines').innerHTML="Online: <img src='loading.gif' align='absmiddle' /> users";
	setTimeout('whoisonline()', 500);
	online();
	return;
}

function online()
{
	$.get("online.php?online=" + whereisuser, {}, function(r) {
		//console.log(r);
	});
	
	return true;
}


function whoisonline() { console.log(1);
	$.get("whoisonline.php?whoisonline=1", {}, function(r) {
		//console.log(r);
	});
	
	return true;
}


