/**
 * name:          jquery-foxitip-0.1.min.js
 * author:        Stefan Benicke - www.opusonline.at
 * version:       0.1
 * last update:   19.08.2009
 * category:      jQuery plugin
 * copyright:     (c) 2009 Stefan Benicke (www.opusonline.at)
 * license:       GNU GPLv3 <http://www.gnu.org/licenses/>.
 * documentation: http://www.opusonline.at/foxitools/foxitip/
 */
(function(a){a.fn.foxitip=function(e){var d;var k;var j;var i;var h;var g;var l;e=jQuery.extend({title:true,url:true,offsetX:15,offsetY:18,className:"foxitip",callback:function(){}},e);m();f();a(window).resize(function(){m()});a(window).scroll(function(){f()});var b=0;a("body").find('div[id^="foxitip"]').each(function(){b++});a(this).each(function(){b++;if(!a(this).attr("rel")){var o="foxitip"+b;var n='<div id="'+o+'" class="'+e.className+'">';if(e.title&&a(this).attr("title")){n+='<div class="foxitip_title">'+a(this).attr("title")+"</div>"}if(e.title&&!a(this).attr("title")){n+='<div class="foxitip_title">'+a(this).text()+"</div>"}if(e.url){n+='<div class="foxitip_url">'+a(this).attr("href")+"</div>"}n+="</div>";a("body").append(n);a("#"+o).hide().bind("mouseenter",function(){a(this).show()}).bind("mouseleave",function(){a(this).hide()});a(this).attr("rel","#"+o)}a(this).bind("mouseenter",function(p){l=a(this).attr("rel");h=a(l).outerWidth();g=a(l).outerHeight();c(p.pageX,p.pageY);a(l).show();return false}).bind("mousemove",function(p){c(p.pageX,p.pageY);return false}).bind("mouseleave",function(){a(l).hide()})});function c(p,q){var o=p+e.offsetX;var n=q+e.offsetY;if(o+h>d+i){o=d+i-h}if(n+g>k+j){n=k+j-g}a(l).css({left:o,top:n})}function m(){d=a(window).width();k=a(window).height()}function f(){j=a(document).scrollTop();i=a(document).scrollLeft()}}})(jQuery);
