(function(e){var t=function(e,t){var n=e.data("mousepresstimer");n&&clearTimeout(n),t&&e.unbind("mouseup.mousepressext mouseleave.mousepressext"),e=null};e.event.special.mousepress={setup:function(){e(this).bind("mousedown.mousepressext",function(n){var r=e(this),o=function(a){var i=0;t(r),r.data("mousepresstimer",setInterval(function(){e.event.special.mousepress.handler(r[0],n),i++,i>3&&a>45&&o(a-40)},a))},a=e(n.target).trigger("mousepressstart",[n]);t(r),r.data("mousepresstimer",setTimeout(function(){o(180)},200)),r.bind("mouseup.mousepressext mouseleave.mousepressext",function(e){t(r,!0),a.trigger("mousepressend",[e]),r=null,a=null})})},teardown:function(){t(e(this).unbind(".mousepressext"),!0)},handler:function(t,n){return e.event.dispatch.call(t,{type:"mousepress",target:n.target,pageX:n.pageX,pageY:n.pageY})}}})(jQuery);