(function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)})(function(g){function d(i,j){var m,e,l,k=i.nodeName.toLowerCase();return"area"===k?(m=i.parentNode,e=m.name,i.href&&e&&"map"===m.nodeName.toLowerCase()?(l=g("img[usemap='#"+e+"']")[0],!!l&&c(l)):!1):(/input|select|textarea|button|object/.test(k)?!i.disabled:"a"===k?i.href||j:j)&&c(i)}function c(a){return g.expr.filters.visible(a)&&!g(a).parents().addBack().filter(function(){return"hidden"===g.css(this,"visibility")}).length}g.ui=g.ui||{},g.extend(g.ui,{version:"0.0.0",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),g.fn.extend({scrollParent:function(k){var j=this.css("position"),l="absolute"===j,m=k?/(auto|scroll|hidden)/:/(auto|scroll)/,e=this.parents().filter(function(){var a=g(this);return l&&"static"===a.css("position")?!1:m.test(a.css("overflow")+a.css("overflow-y")+a.css("overflow-x"))}).eq(0);return"fixed"!==j&&e.length?e:g(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&g(this).removeAttr("id")})}}),g.extend(g.expr[":"],{data:g.expr.createPseudo?g.expr.createPseudo(function(a){return function(e){return !!g.data(e,a)}}):function(e,a,j){return !!g.data(e,j[3])},focusable:function(a){return d(a,!isNaN(g.attr(a,"tabindex")))},tabbable:function(a){var e=g.attr(a,"tabindex"),j=isNaN(e);return(j||e>=0)&&d(a,!j)}}),g("<a>").outerWidth(1).jquery||g.each(["Width","Height"],function(k,j){function l(q,o,r,n){return g.each(p,function(){o-=parseFloat(g.css(q,"padding"+this))||0,r&&(o-=parseFloat(g.css(q,"border"+this+"Width"))||0),n&&(o-=parseFloat(g.css(q,"margin"+this))||0)}),o}var p="Width"===j?["Left","Right"]:["Top","Bottom"],e=j.toLowerCase(),m={innerWidth:g.fn.innerWidth,innerHeight:g.fn.innerHeight,outerWidth:g.fn.outerWidth,outerHeight:g.fn.outerHeight};g.fn["inner"+j]=function(a){return void 0===a?m["inner"+j].call(this):this.each(function(){g(this).css(e,l(this,a)+"px")})},g.fn["outer"+j]=function(a,i){return"number"!=typeof a?m["outer"+j].call(this,a):this.each(function(){g(this).css(e,l(this,a,!0,i)+"px")})}}),g.fn.addBack||(g.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),g("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(g.fn.removeData=function(a){return function(e){return arguments.length?a.call(this,g.camelCase(e)):a.call(this)}}(g.fn.removeData)),g.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),g.fn.extend({focus:function(a){return function(e,j){return"number"==typeof e?this.each(function(){var i=this;setTimeout(function(){g(i).focus(),j&&j.call(i)},e)}):a.apply(this,arguments)}}(g.fn.focus),disableSelection:function(){var a="onselectstart" in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(i){i.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e){return this.css("zIndex",e)}if(this.length){for(var a,j,k=g(this[0]);k.length&&k[0]!==document;){if(a=k.css("position"),("absolute"===a||"relative"===a||"fixed"===a)&&(j=parseInt(k.css("zIndex"),10),!isNaN(j)&&0!==j)){return j}k=k.parent()}}return 0}}),g.ui.plugin={add:function(k,j,l){var m,e=g.ui[k].prototype;for(m in l){e.plugins[m]=e.plugins[m]||[],e.plugins[m].push([j,l[m]])}},call:function(o,l,k,m){var p,j=o.plugins[l];if(j&&(m||o.element[0].parentNode&&11!==o.element[0].parentNode.nodeType)){for(p=0;j.length>p;p++){o.options[j[p][0]]&&j[p][1].apply(o.element,k)}}}};var f=0,h=Array.prototype.slice;g.cleanData=function(a){return function(j){var k,m,e;for(e=0;null!=(m=j[e]);e++){try{k=g._data(m,"events"),k&&k.remove&&g(m).triggerHandler("remove")}catch(l){}}a(j)}}(g.cleanData),g.widget=function(v,p,w){var k,u,j,e,q={},m=v.split(".")[0];return v=v.split(".")[1],k=m+"-"+v,w||(w=p,p=g.Widget),g.expr[":"][k.toLowerCase()]=function(a){return !!g.data(a,k)},g[m]=g[m]||{},u=g[m][v],j=g[m][v]=function(i,a){return this._createWidget?(arguments.length&&this._createWidget(i,a),void 0):new j(i,a)},g.extend(j,u,{version:w.version,_proto:g.extend({},w),_childConstructors:[]}),e=new p,e.options=g.widget.extend({},e.options),g.each(w,function(a,i){return g.isFunction(i)?(q[a]=function(){var l=function(){return p.prototype[a].apply(this,arguments)},o=function(n){return p.prototype[a].apply(this,n)};return function(){var s,r=this._super,n=this._superApply;return this._super=l,this._superApply=o,s=i.apply(this,arguments),this._super=r,this._superApply=n,s}}(),void 0):(q[a]=i,void 0)}),j.prototype=g.widget.extend(e,{widgetEventPrefix:u?e.widgetEventPrefix||v:v},q,{constructor:j,namespace:m,widgetName:v,widgetFullName:k}),u?(g.each(u._childConstructors,function(l,a){var n=a.prototype;g.widget(n.namespace+"."+n.widgetName,j,a._proto)}),delete u._childConstructors):p._childConstructors.push(j),g.widget.bridge(v,j),j},g.widget.extend=function(k){for(var j,l,e=h.call(arguments,1),n=0,m=e.length;m>n;n++){for(j in e[n]){l=e[n][j],e[n].hasOwnProperty(j)&&void 0!==l&&(k[j]=g.isPlainObject(l)?g.isPlainObject(k[j])?g.widget.extend({},k[j],l):g.widget.extend({},l):l)}}return k},g.widget.bridge=function(e,a){var j=a.prototype.widgetFullName||e;g.fn[e]=function(i){var m="string"==typeof i,l=h.call(arguments,1),k=this;return i=!m&&l.length?g.widget.extend.apply(null,[i].concat(l)):i,m?this.each(function(){var o,p=g.data(this,j);return"instance"===i?(k=p,!1):p?g.isFunction(p[i])&&"_"!==i.charAt(0)?(o=p[i].apply(p,l),o!==p&&void 0!==o?(k=o&&o.jquery?k.pushStack(o.get()):o,!1):void 0):g.error("no such method '"+i+"' for "+e+" widget instance"):g.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+i+"'")}):this.each(function(){var n=g.data(this,j);n?(n.option(i||{}),n._init&&n._init()):g.data(this,j,new a(i,this))}),k}},g.Widget=function(){},g.Widget._childConstructors=[],g.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,a){a=g(a||this.defaultElement||this)[0],this.element=g(a),this.uuid=f++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=g.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=g(),this.hoverable=g(),this.focusable=g(),a!==this&&(g.data(a,this.widgetFullName,this),this._on(!0,this.element,{remove:function(i){i.target===a&&this.destroy()}}),this.document=g(a.style?a.ownerDocument:a.document||a),this.window=g(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:g.noop,_getCreateEventData:g.noop,_create:g.noop,_init:g.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(g.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:g.noop,widget:function(){return this.element},option:function(k,j){var l,p,e,m=k;if(0===arguments.length){return g.widget.extend({},this.options)}if("string"==typeof k){if(m={},l=k.split("."),k=l.shift(),l.length){for(p=m[k]=g.widget.extend({},this.options[k]),e=0;l.length-1>e;e++){p[l[e]]=p[l[e]]||{},p=p[l[e]]}if(k=l.pop(),1===arguments.length){return void 0===p[k]?null:p[k]}p[k]=j}else{if(1===arguments.length){return void 0===this.options[k]?null:this.options[k]}m[k]=j}}return this._setOptions(m),this},_setOptions:function(i){var a;for(a in i){this._setOption(a,i[a])}return this},_setOption:function(i,a){return this.options[i]=a,"disabled"===i&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!a),a&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(k,j,l){var m,e=this;"boolean"!=typeof k&&(l=j,j=k,k=!1),l?(j=m=g(j),this.bindings=this.bindings.add(j)):(l=j,j=this.element,m=this.widget()),g.each(l,function(p,t){function q(){return k||e.options.disabled!==!0&&!g(this).hasClass("ui-state-disabled")?("string"==typeof t?e[t]:t).apply(e,arguments):void 0}"string"!=typeof t&&(q.guid=t.guid=t.guid||q.guid||g.guid++);var n=p.match(/^([\w:-]*)\s*(.*)$/),a=n[1]+e.eventNamespace,i=n[2];i?m.delegate(i,a,q):j.bind(a,q)})},_off:function(i,a){a=(a||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,i.unbind(a).undelegate(a)},_delay:function(l,j){function a(){return("string"==typeof l?k[l]:l).apply(k,arguments)}var k=this;return setTimeout(a,j||0)},_hoverable:function(a){this.hoverable=this.hoverable.add(a),this._on(a,{mouseenter:function(e){g(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){g(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(a){this.focusable=this.focusable.add(a),this._on(a,{focusin:function(e){g(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){g(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(k,j,l){var p,e,m=this.options[k];if(l=l||{},j=g.Event(j),j.type=(k===this.widgetEventPrefix?k:this.widgetEventPrefix+k).toLowerCase(),j.target=this.element[0],e=j.originalEvent){for(p in e){p in j||(j[p]=e[p])}}return this.element.trigger(j,l),!(g.isFunction(m)&&m.apply(this.element[0],[j].concat(l))===!1||j.isDefaultPrevented())}},g.each({show:"fadeIn",hide:"fadeOut"},function(e,a){g.Widget.prototype["_"+e]=function(j,m,i){"string"==typeof m&&(m={effect:m});var l,k=m?m===!0||"number"==typeof m?a:m.effect||a:e;m=m||{},"number"==typeof m&&(m={duration:m}),l=!g.isEmptyObject(m),m.complete=i,m.delay&&j.delay(m.delay),l&&g.effects&&g.effects.effect[k]?j[e](m):k!==e&&j[k]?j[k](m.duration,m.easing,i):j.queue(function(n){g(this)[e](),i&&i.call(j[0]),n()})}}),g.widget;var b=!1;g(document).mouseup(function(){b=!1}),g.widget("ui.mouse",{version:"0.0.0",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(i){return a._mouseDown(i)}).bind("click."+this.widgetName,function(e){return !0===g.data(e.target,a.widgetName+".preventClickEvent")?(g.removeData(e.target,a.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!b){this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var a=this,j=1===e.which,k="string"==typeof this.options.cancel&&e.target.nodeName?g(e.target).closest(this.options.cancel).length:!1;return j&&!k&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){a.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===g.data(e.target,this.widgetName+".preventClickEvent")&&g.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(i){return a._mouseMove(i)},this._mouseUpDelegate=function(i){return a._mouseUp(i)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),b=!0,!0)):!0}},_mouseMove:function(a){return g.ui.ie&&(!document.documentMode||9>document.documentMode)&&!a.button?this._mouseUp(a):a.which?this._mouseStarted?(this._mouseDrag(a),a.preventDefault()):(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==!1,this._mouseStarted?this._mouseDrag(a):this._mouseUp(a)),!this._mouseStarted):this._mouseUp(a)},_mouseUp:function(a){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,a.target===this._mouseDownEvent.target&&g.data(a.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(a)),b=!1,!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return !0}}),g.widget("ui.slider",g.ui.mouse,{version:"0.0.0",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var k,j,l=this.options,p=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),e="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",m=[];for(j=l.values&&l.values.length||1,p.length>j&&(p.slice(j).remove(),p=p.slice(0,j)),k=p.length;j>k;k++){m.push(e)}this.handles=p.add(g(m.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(a){g(this).data("ui-slider-handle-index",a)})},_createRange:function(){var e=this.options,a="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:g.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=g("<div></div>").appendTo(this.element),a="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(a+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(y){var p,z,k,w,j,e,q,m,x=this,v=this.options;return v.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),p={x:y.pageX,y:y.pageY},z=this._normValueFromMouse(p),k=this._valueMax()-this._valueMin()+1,this.handles.each(function(l){var a=Math.abs(z-x.values(l));(k>a||k===a&&(l===x._lastChangedValue||x.values(l)===v.min))&&(k=a,w=g(this),j=l)}),e=this._start(y,j),e===!1?!1:(this._mouseSliding=!0,this._handleIndex=j,w.addClass("ui-state-active").focus(),q=w.offset(),m=!g(y.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=m?{left:0,top:0}:{left:y.pageX-q.left-w.width()/2,top:y.pageY-q.top-w.height()/2-(parseInt(w.css("borderTopWidth"),10)||0)-(parseInt(w.css("borderBottomWidth"),10)||0)+(parseInt(w.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(y,j,z),this._animateOff=!0,!0))},_mouseStart:function(){return !0},_mouseDrag:function(k){var j={x:k.pageX,y:k.pageY},a=this._normValueFromMouse(j);return this._slide(k,this._handleIndex,a),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(o){var l,k,m,p,j;return"horizontal"===this.orientation?(l=this.elementSize.width,k=o.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(l=this.elementSize.height,k=o.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),m=k/l,m>1&&(m=1),0>m&&(m=0),"vertical"===this.orientation&&(m=1-m),p=this._valueMax()-this._valueMin(),j=this._valueMin()+m*p,this._trimAlignValue(j)},_start:function(k,j){var a={handle:this.handles[j],value:this.value()};return this.options.values&&this.options.values.length&&(a.value=this.values(j),a.values=this.values()),this._trigger("start",k,a)},_slide:function(o,l,k){var m,p,j;this.options.values&&this.options.values.length?(m=this.values(l?0:1),2===this.options.values.length&&this.options.range===!0&&(0===l&&k>m||1===l&&m>k)&&(k=m),k!==this.values(l)&&(p=this.values(),p[l]=k,j=this._trigger("slide",o,{handle:this.handles[l],value:k,values:p}),m=this.values(l?0:1),j!==!1&&this.values(l,k))):k!==this.value()&&(j=this._trigger("slide",o,{handle:this.handles[l],value:k}),j!==!1&&this.value(k))},_stop:function(k,j){var a={handle:this.handles[j],value:this.value()};this.options.values&&this.options.values.length&&(a.value=this.values(j),a.values=this.values()),this._trigger("stop",k,a)},_change:function(k,j){if(!this._keySliding&&!this._mouseSliding){var a={handle:this.handles[j],value:this.value()};this.options.values&&this.options.values.length&&(a.value=this.values(j),a.values=this.values()),this._lastChangedValue=j,this._trigger("change",k,a)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(k,j){var l,m,e;if(arguments.length>1){return this.options.values[k]=this._trimAlignValue(j),this._refreshValue(),this._change(null,k),void 0}if(!arguments.length){return this._values()}if(!g.isArray(arguments[0])){return this.options.values&&this.options.values.length?this._values(k):this.value()}for(l=this.options.values,m=arguments[0],e=0;l.length>e;e+=1){l[e]=this._trimAlignValue(m[e]),this._change(null,e)}this._refreshValue()},_setOption:function(e,a){var j,k=0;switch("range"===e&&this.options.range===!0&&("min"===a?(this.options.value=this._values(0),this.options.values=null):"max"===a&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),g.isArray(this.options.values)&&(k=this.options.values.length),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!a),this._super(e,a),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===a?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),j=0;k>j;j+=1){this._change(null,j)}this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(l){var j,a,k;if(arguments.length){return j=this.options.values[l],j=this._trimAlignValue(j)}if(this.options.values&&this.options.values.length){for(a=this.options.values.slice(),k=0;a.length>k;k+=1){a[k]=this._trimAlignValue(a[k])}return a}return[]},_trimAlignValue:function(l){if(this._valueMin()>=l){return this._valueMin()}if(l>=this._valueMax()){return this._valueMax()}var j=this.options.step>0?this.options.step:1,a=(l-this._valueMin())%j,k=l-a;return 2*Math.abs(a)>=j&&(k+=a>0?j:-j),parseFloat(k.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var x,p,y,k,v,j=this.options.range,e=this.options,q=this,m=this._animateOff?!1:e.animate,w={};this.options.values&&this.options.values.length?this.handles.each(function(a){p=100*((q.values(a)-q._valueMin())/(q._valueMax()-q._valueMin())),w["horizontal"===q.orientation?"left":"bottom"]=p+"%",g(this).stop(1,1)[m?"animate":"css"](w,e.animate),q.options.range===!0&&("horizontal"===q.orientation?(0===a&&q.range.stop(1,1)[m?"animate":"css"]({left:p+"%"},e.animate),1===a&&q.range[m?"animate":"css"]({width:p-x+"%"},{queue:!1,duration:e.animate})):(0===a&&q.range.stop(1,1)[m?"animate":"css"]({bottom:p+"%"},e.animate),1===a&&q.range[m?"animate":"css"]({height:p-x+"%"},{queue:!1,duration:e.animate}))),x=p}):(y=this.value(),k=this._valueMin(),v=this._valueMax(),p=v!==k?100*((y-k)/(v-k)):0,w["horizontal"===this.orientation?"left":"bottom"]=p+"%",this.handle.stop(1,1)[m?"animate":"css"](w,e.animate),"min"===j&&"horizontal"===this.orientation&&this.range.stop(1,1)[m?"animate":"css"]({width:p+"%"},e.animate),"max"===j&&"horizontal"===this.orientation&&this.range[m?"animate":"css"]({width:100-p+"%"},{queue:!1,duration:e.animate}),"min"===j&&"vertical"===this.orientation&&this.range.stop(1,1)[m?"animate":"css"]({height:p+"%"},e.animate),"max"===j&&"vertical"===this.orientation&&this.range[m?"animate":"css"]({height:100-p+"%"},{queue:!1,duration:e.animate}))},_handleEvents:{keydown:function(k){var j,l,p,e,m=g(k.target).data("ui-slider-handle-index");switch(k.keyCode){case g.ui.keyCode.HOME:case g.ui.keyCode.END:case g.ui.keyCode.PAGE_UP:case g.ui.keyCode.PAGE_DOWN:case g.ui.keyCode.UP:case g.ui.keyCode.RIGHT:case g.ui.keyCode.DOWN:case g.ui.keyCode.LEFT:if(k.preventDefault(),!this._keySliding&&(this._keySliding=!0,g(k.target).addClass("ui-state-active"),j=this._start(k,m),j===!1)){return}}switch(e=this.options.step,l=p=this.options.values&&this.options.values.length?this.values(m):this.value(),k.keyCode){case g.ui.keyCode.HOME:p=this._valueMin();break;case g.ui.keyCode.END:p=this._valueMax();break;case g.ui.keyCode.PAGE_UP:p=this._trimAlignValue(l+(this._valueMax()-this._valueMin())/this.numPages);break;case g.ui.keyCode.PAGE_DOWN:p=this._trimAlignValue(l-(this._valueMax()-this._valueMin())/this.numPages);break;case g.ui.keyCode.UP:case g.ui.keyCode.RIGHT:if(l===this._valueMax()){return}p=this._trimAlignValue(l+e);break;case g.ui.keyCode.DOWN:case g.ui.keyCode.LEFT:if(l===this._valueMin()){return}p=this._trimAlignValue(l-e)}this._slide(k,m,p)},keyup:function(e){var a=g(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,a),this._change(e,a),g(e.target).removeClass("ui-state-active"))}}})});