(function(c){c.fn.tooltip=function(h){var a={container:undefined,img:undefined,imgdim:{height:300,width:250},text:undefined,width:undefined,height:undefined,follow:undefined,offset:{top:10,left:15}};c.extend(a,h);var b=c("#ttContainerDiv");if(!b.length||b.length<=0){if(typeof a.container==="string")c('<div id="ttContainerDiv" style="display:none;position:fixed"> <span id="ttText"></span></div>').appendTo(a.container);else a.container instanceof
jQuery?a.container.append('<div id="ttContainerDiv" style="display:none;position:fixed"> <span id="ttText"></span></div>'):c('<div id="ttContainerDiv" style="display:none;position:fixed"> <span id="ttText"></span></div>').appendTo("body");b=c("#ttContainerDiv")}var d=c("#ttText");this.each(function(){var e=c(this).attr("title");if(e||a.text||a.img)c(this).hover(function(f){c(this).attr("title",
"");b.css({width:"",height:""});if(a.img){b.prepend('<img src="'+a.img+'" id="ttImage" height="'+a.imgdim.height+'px" width="'+a.imgdim.width+'px" />');d.hide()}else{d.text(a.text?a.text:e);d.show()}a.width&&b.width()>a.width&&b.width(a.width);a.height&&b.height()>a.height&&b.height(a.height);a.follow?c(this).mousemove(function(g){b.css({top:g.clientY+a.offset.top,left:g.clientX+a.offset.left})}):b.css({top:f.clientY+a.offset.top,left:f.clientX+a.offset.left});b.show()},function(){a.follow&&c(this).unbind("mousemove");
b.hide();d.text("");a.img&&b.children("img").remove();c(this).attr("title",e)})});return this}})(jQuery);
