/*
 * 	Easy Tooltip 1.0 - jQuery plugin
 *	written by Alen Grakalic	
 *	http://cssglobe.com/post/4380/easy-tooltip--jquery-plugin
 *
 *	Copyright (c) 2009 Alen Grakalic (http://cssglobe.com)
 *	Dual licensed under the MIT (MIT-LICENSE.txt)
 *	and GPL (GPL-LICENSE.txt) licenses.
 *
 *	Built for jQuery library
 *	http://jquery.com
 *
 */

this.easyTooltip = function(){	
	/* CONFIG */
		
		xOffset = -20;
		yOffset = -120;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("a.link").hover(function(e){
		this.t = this.title;
		this.title = "";	
		//var c = (this.t != "") ? "<br/>" + this.t : "";
		var c = this.t;
		$("body").append("<div id='easyTooltip2'>"+ c +"</div>");						 
		$("#easyTooltip2")
			.css("position","absolute")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.css("display","none")
			.fadeIn("medium")
    },
	function(){
		this.title = this.t;	
		$("#easyTooltip2").remove();
		//$(this).attr("title",title);
    });	
	$("a.link").mousemove(function(e){
		$("#easyTooltip2")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});	

	
};
$(document).ready(function(){
	easyTooltip();
});
