(function (a) { a.fn.setTooltip = function (a) { this[0]._title = a }, a.fn.getTooltip = function () { return this[0]._title }, a.fn.easyTooltip = function (b) { var c = { xOffset: 10, yOffset: 25, tooltipId: "easyTooltip", clickRemove: false, content: "", useElement: "" }; var b = a.extend(c, b); var d; this.each(function () { this._title = this.title; if (this.alt != "") this._title = this.alt; this.title = ""; a(this).bind("mouseover", function (c) { d = b.content != "" ? b.content : this._title; d = b.useElement != "" ? a("#" + b.useElement).html() : d; if (d != "" && d != undefined) { a("body").append("<div id='" + b.tooltipId + "'>" + d + "</div>"); a("#" + b.tooltipId).css("position", "absolute").css("top", c.pageY - b.yOffset + "px").css("left", c.pageX + b.xOffset + "px").css("display", "none").fadeIn("fast") } }); a(this).bind("mouseout", function (c) { a("#" + b.tooltipId).remove() }); a(this).mousemove(function (c) { a("#" + b.tooltipId).css("top", c.pageY - b.yOffset + "px").css("left", c.pageX + b.xOffset + "px") }); if (b.clickRemove) { a(this).mousedown(function (c) { a("#" + b.tooltipId).remove() }) } }) } })(jQuery)
