this.wait_ = function(){	
		 $('#wait').hide();		 
//		 $('#main').show();
		 $('#main').fadeIn('slow');
	 }
 
this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 100;
		yOffset = 50;
				
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("a.preview").hover(function(e){	
        if(this.rev!='') $("body").append("<div id='preview' style='width:250px'><div id='wait' class='loading' /><div align='center' style='padding:5px'>" + this.rev + "</div></div>");
        if(this.rel!='') $("body").append("<div id='preview'><div id='wait' class='loading' /><div align='center' style='padding:5px'><img src='../" + this.rel + "' style='width:500px'/></div></div>");
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");
//		$("#proType").hide();
    },
	function(){
		//this.title = this.t;	
		$("#preview").remove();
//		$("#proType").show();
    });	
	$("a.preview").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});		
};


// starting the script on page load
$(document).ready(function(){
	imagePreview();
});