/*
 * Url preview script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 
this.screenshotPreview = function(){	

	//$("a.screenshot").hover(function(e){
	$("tr.screenshot").hover(function(e){
		this.t = $(this).find("a").attr("rel");
		$(this).addClass("hover");
		//this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		//$(".preview").append("<p id='screenshot'><img src='"+ this.t +"' alt='url preview' /></p>");
		$(".preview").append("<p id='screenshot'><img src='script/thumbnailer.php?image="+ this.t +"' alt='no preview' /></p>");								 
		$("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("slow");						
    },
	function(){
		this.title = this.t;	
		$("#screenshot").remove();
    });	
};


// starting the script on page load
$(document).ready(function(){
	screenshotPreview();
});









	$(".listtable tr").click(function() {
		window.location=$(this).find("a").attr("href");
		return false;
	});