jQuery.tooltip = function() {
    xOffset = 0;
    yOffset = -40;
    $("a.toolTips").hover(function(e) {
        if (e) { trigger = $(e.target); }
        this.t = this.title;
        this.title = "";
        var top = trigger.position().top - 123;
        var height = 123 + trigger.outerHeight();
        top += height;
        // horizontal axis
        var width = trigger.outerWidth();
        var left = trigger.position().left;
        left -= width / 2;
        // offset
        top += xOffset;
        left += yOffset;

        $("body").append("<div id='tooltip'>" + this.t + "</div>");
        $("#tooltip")
			.css("top", (top) + "px")
			.css("left", (left) + "px")
			.fadeIn("fast");
    },
	function() {
	    this.title = this.t;
	    $("#tooltip").remove();
	});
    $("a.tooltip").mousemove(function(e) {
        $("#tooltip")
			.css("top", (e.pageY - xOffset) + "px")
			.css("left", (e.pageX + yOffset) + "px");
    });
};

