(function(n){n.widget("ui.labeledslider",n.ui.slider,{version:"@VERSION",options:{tickInterval:0,tweenLabels:!0,tickLabels:null,tickArray:[]},uiSlider:null,tickInterval:0,tweenLabels:!0,_create:function(){this._detectOrientation();this.uiSlider=this.element.wrap('<div class="ui-slider-wrapper ui-widget"><\/div>').before('<div class="ui-slider-labels"><\/div>').parent().addClass(this.orientation).css("font-size",this.element.css("font-size"));this._super();this.element.removeClass("ui-widget");this._alignWithStep();this.orientation=="horizontal"?this.uiSlider.width(this.element.css("width")):this.uiSlider.height(this.element.css("height"));this._drawLabels()},_drawLabels:function(){var r=this.options.tickLabels||{},u=this.uiSlider.children(".ui-slider-labels"),h=this.orientation=="horizontal"?"left":"bottom",i=this.options.min,c=this.options.max,l=this.tickInterval,f=c-i,e=this.options.tickArray,o=e.length>0,s,t=0;for(u.html("");t<=f;t++)(!o&&t%l==0||o&&e.indexOf(t+i)>-1)&&(s=r[t+i]?r[t+i]:this.options.tweenLabels?t+i:"",n("<div>").addClass("ui-slider-label-ticks").css(h,Math.round(t/f*1e4)/100+"%").html("<span>"+s+"<\/span>").appendTo(u))},_setOption:function(n,t){this._super(n,t);switch(n){case"tickInterval":case"tickLabels":case"tickArray":case"min":case"max":case"step":this._alignWithStep();this._drawLabels();break;case"orientation":this.element.removeClass("horizontal vertical").addClass(this.orientation);this._drawLabels()}},_alignWithStep:function(){this.tickInterval=this.options.tickInterval<this.options.step?this.options.step:this.options.tickInterval},_destroy:function(){this._super();this.uiSlider.replaceWith(this.element)},widget:function(){return this.uiSlider}})})(jQuery)