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