/*
 * 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.tooltipa = function(){	
	/* CONFIG */		
		xOffseta = 10;
		yOffseta = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$(".tooltip").hover(function(ea){											  
		this.ta = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.ta +"</p>");
		$("#tooltip")
			.css("top",(ea.pageY - xOffseta) + "px")
			.css("left",(ea.pageX + yOffseta) + "px")
			.fadeIn("slow");		
    },
	function(){
		this.title = this.ta;		
		$("#tooltip").remove();
    });	
	$(".tooltip").mousemove(function(ea){
		$("#tooltip")
			.css("top",(ea.pageY - xOffseta) + "px")
			.css("left",(ea.pageX + yOffseta) + "px");
	});			
};



// starting the script on page load
$(document).ready(function(){
	tooltipa();
});
