(function($) {
$.fn.stmuToolTip = function() {		

	$("body").append("<div id='stmuTip'></div>");
	
	return this.each(function() {
			var obj = $(this);
			// grab title foreach element
			var title = obj.attr('title');
			//remove title foreach element
			obj.removeAttr("title");
			
			obj.hover(function(e) {
					
					$(document).mousemove(function(e) {
							
							//var x = e.pageX - this.offsetLeft;
							//var y = e.pageY - this.offsetTop;

							var tipX = e.pageX + 16;
							var tipY = e.pageY + 16;
							
							$('#stmuTip').css({'top': tipY+'px', 'left': tipX+'px'});
					});

					$('#stmuTip').html(title).stop(true,true).fadeIn("fast");
					// you can use this to create fancy tooltips with title and rel string values separated by a <hr>
					//$('#stmuTip').html(obj.attr('rel') + '<hr> this is me').stop(true,true).fadeIn("fast");
			}, function() {
				$('#stmuTip').stop(true,true).fadeOut("fast");
			});
	});

	}
})(jQuery);

