/**
 * @author spetz
 */
(function ($) {
  	
	$.fn.tooltip = function () {
    	
		this.mouseover(function(e) {
			
			var display = $(this).attr('class');
			display = display.substr(display.indexOf(' ')+1);
				
			var cursor = {'y':e.pageY, 'x':e.pageX};
			$('#'+display).show();
			$('#'+display).css({top: cursor.y-20, left: cursor.x+20});
		
		});
		
		this.mouseout(function() {
			var display = $(this).attr('class');
			display = display.substr(display.indexOf(' ')+1);
				
			$('#'+display).hide("fast");
		});
		
		return this;
		
  	};
	
})(jQuery);