$.fn.numberPicker=function(d){var a=$.extend({initNumber:1,numberRangeStart:1,numberRangeEnd:10,disableColor:"#989c9c",enableColor:"#ff5722",arrowTopSymbol:"\x26#9650;",arrowBottomSymbol:"\x26#9660;",scrollPos:528,buttonText:"SET"},d);d=a.initNumber;$(".picked-number").val(d);$(".picked-number-wrapper .picked-number").on("click",function(){$(this).parent().next().slideToggle()});$(".pick-number-now").append('\x3cdiv class\x3d"set-number-wrapper"\x3e\x3ca href\x3d"#"\x3e'+a.buttonText+"\x3c/a\x3e\x3c/div\x3e");
$(".set-number-wrapper a").on("click",function(){$(this).parents(".pick-number-now").hide()});for(var e,c=a.numberRangeStart;c<=a.numberRangeEnd;c++)d==c?e="current-number":e="normal-number",$(".number ul").append("\x3cli class\x3d'"+e+"' data-value\x3d'"+c+"'\x3e"+c+"\x3c/li\x3e");$(".hr-timer.number .movable-area").before('\x3cspan class\x3d"arrow-top"\x3e'+a.arrowTopSymbol+"\x3c/span\x3e");$(".hr-timer.number .movable-area").after('\x3cspan class\x3d"arrow-bottom"\x3e'+a.arrowBottomSymbol+"\x3c/span\x3e");
$(".arrow-top,.arrow-bottom").css("color",a.enableColor);var b=0;$(".number-picker .hr-timer span").on("click",function(){var c=$(".number-picker .hr-timer.number li").innerHeight();0==b?$(".arrow-top").css({color:a.disableColor}):$(".arrow-top").css({color:a.enableColor});b>=a.scrollPos?$(".arrow-bottom").css({color:a.disableColor}):$(".arrow-bottom").css({color:a.enableColor});b<=a.scrollPos&&"arrow-bottom"===this.className&&(b+=c+1);0!=b&&"arrow-top"===this.className&&(b-=c+1);$(".number-picker .hr-timer.number ul").css({top:-b+
"px",bottom:"auto"})});$(".number-picker").on("click",".number li",function(){$(this).closest("ul").is(".number-picker .number ul")&&($(".picked-number").val(this.textContent).trigger("keydown"),$(this).parents(".number.hr-timer").find("li").removeClass("current-number"),$(this).addClass("current-number"))})};