//requere jqueryUtil

this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 0;
		yOffset = 0;
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */
	jQuery.each($(".tooltip"), function(){
	    $(this).addData('title', $(this).attr('title'));
	    $(this).attr('title','');		
	    $(this).hover(function(e){											  								  
		    var radom = "tooltip" + parseInt(100000*(Math.random()));
		    var idRandom = "#"+radom;
		    $("body").append("<p id='"+radom+"' class='tooltipT'>"+ ($(this).getData()).title +"</p>");
		    $(idRandom)
			    .css("top",(e.pageY - xOffset) + "px")
			    .css("left",(e.pageX + yOffset) + "px")
			    .show();
			    setInterval(function(){$(idRandom).remove();},4000);		
        },
	    function(){
		    $(".tooltipT").remove();
        });	
	    $(this).mousemove(function(e){
		    $(".tooltipT")
			    .css("top",(e.pageY - xOffset) + "px")
			    .css("left",(e.pageX + yOffset) + "px");
	    });
	});			
};



// starting the script on page load
$(document).ready(function(){
	
});
