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