(function(C){var F=C.fn.remove,B=C.browser.mozilla&&(parseFloat(C.browser.version)<1.9);
C.ui={version:"1.6rc6",plugin:{add:function(J,N,L){var M=C.ui[J].prototype;
for(var K in L){M.plugins[K]=M.plugins[K]||[];
M.plugins[K].push([N,L[K]])
}},call:function(K,N,J){var L=K.plugins[N];
if(!L){return 
}for(var M=0;
M<L.length;
M++){if(K.options[L[M][0]]){L[M][1].apply(K.element,J)
}}}},contains:function(K,J){return document.compareDocumentPosition?K.compareDocumentPosition(J)&16:K!==J&&K.contains(J)
},cssCache:{},css:function(J){if(C.ui.cssCache[J]){return C.ui.cssCache[J]
}var L=C('<div class="ui-gen"></div>').addClass(J).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");
C.ui.cssCache[J]=!!((!(/auto|default/).test(L.css("cursor"))||(/^[1-9]/).test(L.css("height"))||(/^[1-9]/).test(L.css("width"))||!(/none/).test(L.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(L.css("backgroundColor"))));
try{C("body").get(0).removeChild(L.get(0))
}catch(K){}return C.ui.cssCache[J]
},hasScroll:function(L,J){if(C(L).css("overflow")=="hidden"){return false
}var K=(J&&J=="left")?"scrollLeft":"scrollTop",M=false;
if(L[K]>0){return true
}L[K]=1;
M=(L[K]>0);
L[K]=0;
return M
},isOverAxis:function(L,J,K){return(L>J)&&(L<(J+K))
},isOver:function(L,J,M,N,K,O){return C.ui.isOverAxis(L,M,K)&&C.ui.isOverAxis(J,N,O)
},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};
if(B){var I=C.attr,A=C.fn.removeAttr,G="http://www.w3.org/2005/07/aaa",E=/^aria-/,D=/^wairole:/;
C.attr=function(J,K,M){var L=M!==undefined;
return(K=="role"?(L?I.call(this,J,K,"wairole:"+M):(I.apply(this,arguments)||"").replace(D,"")):(E.test(K)?(L?J.setAttributeNS(G,K.replace(E,"aaa:"),M):I.call(this,J,K.replace(E,"aaa:"))):I.apply(this,arguments)))
};
C.fn.removeAttr=function(J){return(E.test(J)?this.each(function(){this.removeAttributeNS(G,J.replace(E,""))
}):A.call(this,J))
}
}C.fn.extend({remove:function(){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")
});
return F.apply(this,arguments)
},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")
},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false
})
},scrollParent:function(){var J;
if((C.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(C.curCSS(this,"position",1))&&(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))
}).eq(0)
}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))
}).eq(0)
}return(/fixed/).test(this.css("position"))||!J.length?C(document):J
}});
C.extend(C.expr[":"],{data:function(K,L,J){return !!C.data(K,J[3])
},focusable:function(L){var K=L.nodeName.toLowerCase(),J=C.attr(L,"tabindex");
return(/input|select|textarea|button|object/.test(K)?!L.disabled:"a"==K||"area"==K?L.href||!isNaN(J):!isNaN(J))&&!C(L)["area"==K?"parents":"closest"](":hidden").length
},tabbable:function(K){var J=C.attr(K,"tabindex");
return(isNaN(J)||J>=0)&&C(K).is(":focusable")
}});
function H(N,M,L,O){function J(P){var Q=C[N][M][P]||[];
return(typeof Q=="string"?Q.split(/,?\s+/):Q)
}var K=J("getter");
if(O.length==1&&typeof O[0]=="string"){K=K.concat(J("getterSetter"))
}return(C.inArray(L,K)!=-1)
}C.widget=function(L,J){var K=L.split(".")[0];
L=L.split(".")[1];
C.fn[L]=function(N){var P=(typeof N=="string"),O=Array.prototype.slice.call(arguments,1);
if(P&&N.substring(0,1)=="_"){return this
}if(P&&H(K,L,N,O)){var M=C.data(this[0],L);
return(M?M[N].apply(M,O):undefined)
}return this.each(function(){var Q=C.data(this,L);
(!Q&&!P&&C.data(this,L,new C[K][L](this,N))._init());
(Q&&P&&C.isFunction(Q[N])&&Q[N].apply(Q,O))
})
};
C[K]=C[K]||{};
C[K][L]=function(N,O){var M=this;
this.namespace=K;
this.widgetName=L;
this.widgetEventPrefix=C[K][L].eventPrefix||L;
this.widgetBaseClass=K+"-"+L;
this.options=C.extend({},C.widget.defaults,C[K][L].defaults,C.metadata&&C.metadata.get(N)[L],O);
this.element=C(N).bind("setData."+L,function(Q,R,P){if(Q.target==N){return M._setData(R,P)
}}).bind("getData."+L,function(P,Q){if(P.target==N){return M._getData(Q)
}}).bind("remove",function(){return M.destroy()
})
};
C[K][L].prototype=C.extend({},C.widget.prototype,J);
C[K][L].getterSetter="option"
};
C.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")
},option:function(M,L){var J=M,K=this;
if(typeof M=="string"){if(L===undefined){return this._getData(M)
}J={};
J[M]=L
}C.each(J,function(O,N){K._setData(O,N)
})
},_getData:function(J){return this.options[J]
},_setData:function(J,K){this.options[J]=K;
if(J=="disabled"){this.element[K?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",K)
}},enable:function(){this._setData("disabled",false)
},disable:function(){this._setData("disabled",true)
},_trigger:function(P,O,N){var L=this.options[P],K=(P==this.widgetEventPrefix?P:this.widgetEventPrefix+P);
O=C.Event(O);
O.type=K;
if(O.originalEvent){for(var J=C.event.props.length,M;
J;
){M=C.event.props[--J];
O[M]=O.originalEvent[M]
}}this.element.trigger(O,N);
return !(C.isFunction(L)&&L.call(this.element[0],O,N)===false||O.isDefaultPrevented())
}};
C.widget.defaults={disabled:false};
C.ui.mouse={_mouseInit:function(){var J=this;
this.element.bind("mousedown."+this.widgetName,function(K){return J._mouseDown(K)
}).bind("click."+this.widgetName,function(K){if(J._preventClickEvent){J._preventClickEvent=false;
return false
}});
if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");
this.element.attr("unselectable","on")
}this.started=false
},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);
(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))
},_mouseDown:function(M){if(M.originalEvent.mouseHandled){return 
}(this._mouseStarted&&this._mouseUp(M));
this._mouseDownEvent=M;
var J=this,L=(M.which==1),K=(typeof this.options.cancel=="string"?C(M.target).parents().add(M.target).filter(this.options.cancel).length:false);
if(!L||K||!this._mouseCapture(M)){return true
}this.mouseDelayMet=!this.options.delay;
if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){J.mouseDelayMet=true
},this.options.delay)
}if(this._mouseDistanceMet(M)&&this._mouseDelayMet(M)){this._mouseStarted=(this._mouseStart(M)!==false);
if(!this._mouseStarted){M.preventDefault();
return true
}}this._mouseMoveDelegate=function(N){return J._mouseMove(N)
};
this._mouseUpDelegate=function(N){return J._mouseUp(N)
};
C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
(C.browser.safari||M.preventDefault());
M.originalEvent.mouseHandled=true;
return true
},_mouseMove:function(J){if(C.browser.msie&&!J.button){return this._mouseUp(J)
}if(this._mouseStarted){this._mouseDrag(J);
return J.preventDefault()
}if(this._mouseDistanceMet(J)&&this._mouseDelayMet(J)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,J)!==false);
(this._mouseStarted?this._mouseDrag(J):this._mouseUp(J))
}return !this._mouseStarted
},_mouseUp:function(J){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=false;
this._preventClickEvent=true;
this._mouseStop(J)
}return false
},_mouseDistanceMet:function(J){return(Math.max(Math.abs(this._mouseDownEvent.pageX-J.pageX),Math.abs(this._mouseDownEvent.pageY-J.pageY))>=this.options.distance)
},_mouseDelayMet:function(J){return this.mouseDelayMet
},_mouseStart:function(J){},_mouseDrag:function(J){},_mouseStop:function(J){},_mouseCapture:function(J){return true
}};
C.ui.mouse.defaults={cancel:null,distance:1,delay:0}
})(jQuery);
(function(A){A.widget("ui.slider",A.extend({},A.ui.mouse,{_init:function(){var C=this,B=this.options;
this._keySliding=false;
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.range=A([]);
if(B.range){if(B.range===true){this.range=A("<div></div>");
if(!B.values){B.values=[this._valueMin(),this._valueMin()]
}if(B.values.length&&B.values.length!=2){B.values=[B.values[0],B.values[0]]
}}else{this.range=A("<div></div>")
}this.range.appendTo(this.element).addClass("ui-slider-range ui-widget-header");
(B.range=="min")&&(this.orientation=="horizontal")&&this.range.css({left:0});
(B.range=="max")&&(this.orientation=="horizontal")&&this.range.css({right:0});
(B.range=="min")&&(this.orientation=="vertical")&&this.range.css({bottom:0});
(B.range=="max")&&(this.orientation=="vertical")&&this.range.css({top:0})
}if(A(".ui-slider-handle",this.element).length==0){A('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")
}if(B.values&&B.values.length){while(A(".ui-slider-handle",this.element).length<B.values.length){A('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")
}}this.handles=A(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");
this.handle=this.handles.eq(0);
this.handles.add(this.range).filter("a").click(function(D){D.preventDefault()
}).hover(function(){A(this).addClass("ui-state-hover")
},function(){A(this).removeClass("ui-state-hover")
}).focus(function(){C.handles.removeClass("ui-state-focus");
A(this).addClass("ui-state-focus")
}).blur(function(){A(this).removeClass("ui-state-focus")
});
this.handles.each(function(D){A(this).data("index.ui-slider-handle",D)
});
this.handles.keydown(function(D){var G=A(this).data("index.ui-slider-handle");
if(C.options.disabled){return 
}switch(D.keyCode){case A.ui.keyCode.HOME:case A.ui.keyCode.END:case A.ui.keyCode.UP:case A.ui.keyCode.RIGHT:case A.ui.keyCode.DOWN:case A.ui.keyCode.LEFT:if(!C._keySliding){C._keySliding=true;
A(this).addClass("ui-state-active");
C._start(D)
}break
}var F,H,E=C._step();
if(C.options.values&&C.options.values.length){F=H=C.values(G)
}else{F=H=C.value()
}switch(D.keyCode){case A.ui.keyCode.HOME:H=C._valueMin();
break;
case A.ui.keyCode.END:H=C._valueMax();
break;
case A.ui.keyCode.UP:case A.ui.keyCode.RIGHT:if(F==C._valueMax()){return 
}H=F+E;
break;
case A.ui.keyCode.DOWN:case A.ui.keyCode.LEFT:if(F==C._valueMin()){return 
}H=F-E;
break
}C._slide(D,G,H)
}).keyup(function(D){if(C._keySliding){C._stop(D);
C._change(D);
C._keySliding=false;
A(this).removeClass("ui-state-active")
}});
this._refreshValue()
},destroy:function(){this.handles.remove();
this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
this._mouseDestroy()
},_mouseCapture:function(G){var F=this.options;
if(F.disabled){return false
}this._start(G);
this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};
this.elementOffset=this.element.offset();
var C={x:G.pageX,y:G.pageY};
var K=this._normValueFromMouse(C);
var H=this._valueMax()+1,E;
var J=this,B;
this.handles.each(function(L){var M=Math.abs(K-J.values(L));
if(H>M){H=M;
E=A(this);
B=L
}});
if(F.range&&(this.values(0)+this.values(1))==0){E=A(this.handles[++B])
}J._handleIndex=B;
E.addClass("ui-state-active").focus();
var D=E.offset();
var I=!A(G.target).parents().andSelf().is(".ui-slider-handle");
this._clickOffset=I?{left:0,top:0}:{left:G.pageX-D.left+(parseInt(E.css("marginLeft"),10)||0),top:G.pageY-D.top+(parseInt(E.css("marginTop"),10)||0)};
K=this._normValueFromMouse(C);
this._slide(G,B,K);
return true
},_mouseStart:function(B){return true
},_mouseDrag:function(D){var C={x:D.pageX,y:D.pageY};
var B=this._normValueFromMouse(C);
this._slide(D,this._handleIndex,B);
return false
},_mouseStop:function(B){this.handles.removeClass("ui-state-active");
this._stop(B);
this._change(B);
this._handleIndex=null;
this._clickOffset=null;
return false
},_detectOrientation:function(){this.orientation=this.options.orientation=="auto"?(this.element[0].offsetWidth/this.element[0].offsetHeight>1?"horizontal":"vertical"):this.options.orientation
},_normValueFromMouse:function(E){var C,H;
if("horizontal"==this.orientation){C=this.elementSize.width;
H=E.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)
}else{C=this.elementSize.height;
H=E.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)
}var B=(H/C);
if(B>1){B=1
}if(B<0){B=0
}if("vertical"==this.orientation){B=1-B
}var D=this._valueMax()-this._valueMin(),G=B*D,F=G%this.options.step,I=this._valueMin()+G-F;
if(F>(this.options.step/2)){I+=this.options.step
}return I
},_start:function(B){this._trigger("start",B,{value:this.value()})
},_slide:function(D,E,F){var C=this.handles[E];
if(this.options.values&&this.options.values.length){var G=this.values(E?0:1);
if((E==0&&F>=G)||(E==1&&F<=G)){F=G
}if(F!=this.values(E)){var B=this.values();
B[E]=F;
var H=this._trigger("slide",D,{handle:C,value:F,values:B});
var G=this.values(E?0:1);
if(H!==false){this.values(E,F,!(D.type=="mousedown"&&this.options.animate))
}}}else{if(F!=this.value()){var H=this._trigger("slide",D,{handle:C,value:F});
if(H!==false){this._setData("value",F,(D.type=="mousedown"&&this.options.animate))
}}}},_stop:function(B){this._trigger("stop",B,{value:this.value()})
},_change:function(B){this._trigger("change",B,{value:this.value()})
},value:function(B){if(arguments.length){this._setData("value",B);
this._change()
}return this._value()
},values:function(B,D,C){if(!this.options.animate){C=true
}if(arguments.length>1){this.options.values[B]=D;
this._refreshValue(!C);
this._change()
}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(B)
}else{return this.value()
}}else{return this._values()
}},_setData:function(C,B){A.widget.prototype._setData.apply(this,arguments);
switch(C){case"orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);
this._refreshValue();
break;
case"value":this._refreshValue();
break
}},_step:function(){var B=this.options.step;
return B
},_value:function(){var B=this.options.value;
if(B<this._valueMin()){B=this._valueMin()
}if(B>this._valueMax()){B=this._valueMax()
}return B
},_values:function(C){if(arguments.length){var B=this.options.values[C];
if(B<this._valueMin()){B=this._valueMin()
}if(B>this._valueMax()){B=this._valueMax()
}return B
}else{return this.options.values
}},_valueMin:function(){var B=this.options.min;
return B
},_valueMax:function(){var B=this.options.max;
return B
},_refreshValue:function(D){var H=this.options.range,I=this.options,E=this;
if(this.options.values&&this.options.values.length){var C,G;
this.handles.each(function(J,L){var K=(E.values(J)-E._valueMin())/(E._valueMax()-E._valueMin())*100;
var M={};
M[E.orientation=="horizontal"?"left":"bottom"]=K+"%";
A(this).stop(1,1)[D?"animate":"css"](M,I.animate);
if(E.options.range===true){if(E.orientation=="horizontal"){(J==0)&&E.range.stop(1,1)[D?"animate":"css"]({left:K+"%"},I.animate);
(J==1)&&E.range[D?"animate":"css"]({width:(K-lastValPercent)+"%"},{queue:false,duration:I.animate})
}else{(J==0)&&E.range.stop(1,1)[D?"animate":"css"]({bottom:(K)+"%"},I.animate);
(J==1)&&E.range[D?"animate":"css"]({height:(K-lastValPercent)+"%"},{queue:false,duration:I.animate})
}}lastValPercent=K
})
}else{var B=(this.value()-this._valueMin())/(this._valueMax()-this._valueMin())*100;
var F={};
F[E.orientation=="horizontal"?"left":"bottom"]=B+"%";
this.handle.stop(1,1)[D?"animate":"css"](F,I.animate);
(H=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[D?"animate":"css"]({left:0,width:B+"%"},I.animate);
(H=="max")&&(this.orientation=="horizontal")&&this.range[D?"animate":"css"]({left:B+"%",width:(100-B)+"%"},{queue:false,duration:I.animate});
(H=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[D?"animate":"css"]({top:(100-B)+"%",height:B+"%"},I.animate);
(H=="max")&&(this.orientation=="vertical")&&this.range[D?"animate":"css"]({bottom:B+"%",height:(100-B)+"%"},{queue:false,duration:I.animate})
}}}));
A.extend(A.ui.slider,{getter:"value values",version:"1.6rc6",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"auto",range:false,step:1,value:0,values:null}})
})(jQuery);
