this.tooltip = function() { this.xOffset = -10; this.yOffset = -30; $(".tooltip").mouseover( function(e) { this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset); $('body').append($('<p id="tooltip"><img id="tooltipImg" src="'+ this.rel +'" /></p>')); $('p#tooltip').css( { margin:0, padding:0, top: this.top+"px", left: this.left+"px"
}).stop(true).delay(300).fadeIn("slow");}
)
.mouseout( function(e) { $("p#tooltip").stop(true).fadeOut("slow").remove();}
)
.mousemove( function(e) { this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset); $("p#tooltip").css("top", this.top+"px").css("left", this.left+"px");} );}; 
