(function(a){a.fn.hoverIntent=function(m,n){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,n?{over:m,out:n}:m);var j,k,h,i;var b=function(f){j=f.pageX;k=f.pageY;};var e=function(f,g){g.hoverIntent_t=clearTimeout(g.hoverIntent_t);if((Math.abs(h-j)+Math.abs(i-k))<l.sensitivity){a(g).unbind("mousemove",b);g.hoverIntent_s=1;return l.over.apply(g,[f]);}else{h=j;i=k;g.hoverIntent_t=setTimeout(function(){e(f,g);},l.interval);}};var c=function(f,g){g.hoverIntent_t=clearTimeout(g.hoverIntent_t);g.hoverIntent_s=0;return l.out.apply(g,[f]);};var d=function(o){var g=jQuery.extend({},o);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);}if(o.type=="mouseenter"){h=g.pageX;i=g.pageY;a(f).bind("mousemove",b);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){e(g,f);},l.interval);}}else{a(f).unbind("mousemove",b);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){c(g,f);},l.timeout);}}};return this.bind("mouseenter",d).bind("mouseleave",d);};})(jQuery);
