(function($){
	$.fn.tooltip = function(config){
		config = jQuery.extend({opacidade:1}, config)

		$(this).mouseover(function(e){
			this.t = $(this).attr("title");
			// BUG do jQuery: A função removeAttr não funciona no IE6 - Contornado alterando o atributo para vazio ao invés de remover
			//$(this).removeAttr("title");
			$(this).attr("title", "");
			$("body").append("<div id='tooltip'>"+ this.t + "</div>");
			$("#tooltip").css("opacity", config.opacidade).fadeIn("fast");
		});

		$(this).mouseout(function(){
			$(this).attr("title", this.t);
			$("#tooltip").remove();
		});

		$(this).mousemove(function(e){
			$("#tooltip").css("top", (e.pageY + 12) + "px").css("left", (e.pageX + 8) + "px");
		});
	};
})(jQuery);
