/**
*
*	simpleTooltip jQuery plugin, by Marius ILIE
*	visit http://dev.mariusilie.net for details
*
**/
(function($){ $.fn.simpletooltip = function(text){
	var with_title = false;
	if(text == undefined && $(this).attr("title") != undefined) {
		text = $(this).attr("title");
		$(this).attr("title", "");
		with_title = true;
	}
	if(text != undefined) {
		$(this).mouseover(function(){
			if(with_title == true) $(this).attr("title", ""); 
			$("body").append("<div id='simpleTooltip' style='position: absolute; z-index: 100; display: none;'>" + text + "</div>")
		});
		$(this).mousemove(function(e){
			var tipX = e.pageX + 12;
			var tipY = e.pageY + 12;
			$("#simpleTooltip").css("left", tipX).css("top", tipY).fadeIn("medium");
		});
		$(this).mouseout(function(){
			$("#simpleTooltip").fadeOut("fast", function(){$(this).remove();})
			if(with_title == true) $(this).attr("title", text);
		});
	}
}})(jQuery);
