this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
	/* END CONFIG */
	$("a.JQueryImagePreview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		//alert("<p id='JQueryImagePreview'><img src='"+ this.href +"' alt='Image preview' width='" + this.style.width + "' height='" + this.style.height + "' />"+ c +"</p>");	
		var strData = "<p id='JQueryImagePreview'><img src='"+ this.href +"' alt='Image preview' style='";
		if(this.style.width.length > 0)
		{
			strData += "width:" + this.style.width + ";"
		}
		if(this.style.width.length > 0)
		{
			strData += "height:" + this.style.height + ";"
		}
		strData += "'  />"+ c +"</p>";
		//$("body").append("<p id='JQueryImagePreview'><img src='"+ this.href +"' alt='Image preview' width='" + this.style.width + "' height='" + this.style.height + "' />"+ c +"</p>");								 
		$("body").append(strData);
		$("#JQueryImagePreview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#JQueryImagePreview").remove();
    });	
	$("a.JQueryImagePreview").mousemove(function(e){
		$("#JQueryImagePreview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


// starting the script on page load
$(document).ready(function(){
	imagePreview();
});