/*
Tooltip 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.balao = function(){
	xOffset = -10;
	yOffset = 0;
	
	$("a.balao").hover(function(e){
		this.t = this.title;
		this.title = "";
		$("body").append("<p id='balao'>"+ this.t +"</p>");
		$("#balao")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");
	},
	function(){
		this.title = this.t;
		$("#balao").remove();
    });
	$("a.balao").mousemove(function(e){
		$("#balao")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
};

// iniciar o script no carregamento da página
$(document).ready(function(){
	balao();
});
