function HoldButton(e){function y(e){g=$(e),$(e).data("button_class",p),$(e).on(vdown,B),touchDevice||$(e).on(vup,I)}function b(){h=!1,$(e).addClass("disabled")}function w(){h=!0,$(e).removeClass("disabled")}function E(e){l=e}function S(e){a=e}function x(e){f=e}function T(e){s=e}function N(e){o=e}function C(e){u=e}function k(e){c=e}function L(e){r=e}function A(e){l!=null&&l(e),clearTimeout(n);var i=new Date;i.getTime()-t.getTime()>=r&&H(e)}function O(e){a!=null&&a(e)}function M(e){f!=null&&f(e)}function _(e){s!=null&&s(e)}function D(e){o!=null&&o(e)}function P(e){u!=null&&u(e)}function H(e){c!=null&&c(e)}function B(e){if(h){i=e;var s;e.originalEvent!=undefined&&e.originalEvent.touches!=undefined&&(s=e.originalEvent.touches),s==undefined?(d=e.clientX,v=e.clientY):s.length==1&&(d=s[0].clientX,v=s[0].clientY),O(e),touchDevice?$(document).on(vup,{button_class:this},F):$(document).on(vup,{button_class:this},q),t=new Date,n=setTimeout(function(){j()},r)}}function j(){D(i)}function F(e){var t,n;if(e.originalEvent!=undefined&&e.originalEvent.changedTouches!=undefined){var r=e.originalEvent.changedTouches[0].pageX-window.pageXOffset,s=e.originalEvent.changedTouches[0].pageY-window.pageYOffset;t=document.elementFromPoint(r,s)}t&&(n=$(t)),n!==null&&(n.is(g)||n.parents().is(g))?I(i):q(i)}function I(e){if(h){var i,s,o;e.originalEvent!=undefined&&e.originalEvent.changedTouches!=undefined&&(o=e.originalEvent.changedTouches),o==undefined?(i=e.clientX-d,s=e.clientY-v):o.length==1&&(i=o[0].clientX-d,s=o[0].clientY-v),M(e),$(document).off(vup),clearTimeout(n);if(i!=undefined&&s!=undefined&&Math.abs(i)<m&&Math.abs(s)<m){var u=new Date;u.getTime()-t.getTime()<r?_(e):P(e)}}}function q(e){A(i),$(document).off(vup)}var t,n,r=300,i,s,o,u,a,f,l,c,h=!0,p=this,d,v,m=10,g;this.set_release_outside=E,this.set_every_press=S,this.set_every_release=x,this.set_press_and_release=T,this.set_press_and_hold_start=N,this.set_press_and_hold_end=C,this.set_press_and_hold_end_outside=k,this.set_hold_time_amount=L,this.set_disabled=b,this.set_enabled=w,y(e)};