(function(n){n.fn.hoverIntent=function(t,i,r){var u={interval:100,sensitivity:6,timeout:0};u=typeof t=="object"?n.extend(u,t):n.isFunction(i)?n.extend(u,{over:t,out:i,selector:r}):n.extend(u,{over:t,out:t,selector:i});var f,e,o,s,h=function(n){f=n.pageX;e=n.pageY},c=function(t,i){if(i.hoverIntent_t=clearTimeout(i.hoverIntent_t),Math.sqrt((o-f)*(o-f)+(s-e)*(s-e))<u.sensitivity)return n(i).off("mousemove.hoverIntent",h),i.hoverIntent_s=!0,u.over.apply(i,[t]);o=f;s=e;i.hoverIntent_t=setTimeout(function(){c(t,i)},u.interval)},a=function(n,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=!1,u.out.apply(t,[n])},l=function(t){var r=n.extend({},t),i=this;if(i.hoverIntent_t&&(i.hoverIntent_t=clearTimeout(i.hoverIntent_t)),t.type==="mouseenter"){o=r.pageX;s=r.pageY;n(i).on("mousemove.hoverIntent",h);i.hoverIntent_s||(i.hoverIntent_t=setTimeout(function(){c(r,i)},u.interval))}else n(i).off("mousemove.hoverIntent",h),i.hoverIntent_s&&(i.hoverIntent_t=setTimeout(function(){a(r,i)},u.timeout))};return this.on({"mouseenter.hoverIntent":l,"mouseleave.hoverIntent":l},u.selector)}})(jQuery)