(function(e){e.fn.hoverIntent=function(n,p){var d={sensitivity:7,interval:100,timeout:0},d=e.extend(d,p?{over:n,out:p}:n),f,h,k,l,m=function(c){f=c.pageX;h=c.pageY},q=function(c,a){a.hoverIntent_t=clearTimeout(a.hoverIntent_t);if(Math.abs(k-f)+Math.abs(l-h)<d.sensitivity)return e(a).unbind("mousemove",m),a.hoverIntent_s=1,d.over.apply(a,[c]);k=f;l=h;a.hoverIntent_t=setTimeout(function(){q(c,a)},d.interval)},r=function(c){for(var a=("mouseover"==c.type?c.fromElement:c.toElement)||c.relatedTarget;a&&
a!=this;)try{a=a.parentNode}catch(f){a=this}if(a==this)return!1;var g=jQuery.extend({},c),b=this;b.hoverIntent_t&&(b.hoverIntent_t=clearTimeout(b.hoverIntent_t));"mouseover"==c.type?(k=g.pageX,l=g.pageY,e(b).bind("mousemove",m),1!=b.hoverIntent_s&&(b.hoverIntent_t=setTimeout(function(){q(g,b)},d.interval))):(e(b).unbind("mousemove",m),1==b.hoverIntent_s&&(b.hoverIntent_t=setTimeout(function(){b.hoverIntent_t=clearTimeout(b.hoverIntent_t);b.hoverIntent_s=0;d.out.apply(b,[g])},d.timeout)))};return this.mouseover(r).mouseout(r)}})(jQuery);