(function(d,a){function b(a,b){var g=a.nodeName.toLowerCase();if("area"===g){var g=a.parentNode,i=g.name;if(!a.href||!i||g.nodeName.toLowerCase()!=="map")return!1;g=d("img[usemap=#"+i+"]")[0];return!!g&&e(g)}return(/input|select|textarea|button|object/.test(g)?!a.disabled:"a"==g?a.href||b:b)&&e(a)}function e(a){return!d(a).parents().andSelf().filter(function(){return d.curCSS(this,"visibility")==="hidden"||d.expr.filters.hidden(this)}).length}d.ui=d.ui||{};d.ui.version||(d.extend(d.ui,{version:"1.8.16",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,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,WINDOWS:91}}),d.fn.extend({propAttr:d.fn.prop||d.fn.attr,_focus:d.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var e=
this;setTimeout(function(){d(e).focus();b&&b.call(e)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=d.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(d.curCSS(this,"position",1))&&/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(d.curCSS(this,
"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?d(document):a},zIndex:function(b){if(b!==a)return this.css("zIndex",b);if(this.length)for(var b=d(this[0]),e;b.length&&b[0]!==document;){e=b.css("position");if(e==="absolute"||e==="relative"||e==="fixed")if(e=parseInt(b.css("zIndex"),10),!isNaN(e)&&e!==0)return e;b=b.parent()}return 0},disableSelection:function(){return this.bind((d.support.selectstart?"selectstart":
"mousedown")+".ui-disableSelection",function(d){d.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),d.each(["Width","Height"],function(b,e){function g(a,b,e,h){d.each(i,function(){b-=parseFloat(d.curCSS(a,"padding"+this,!0))||0;e&&(b-=parseFloat(d.curCSS(a,"border"+this+"Width",!0))||0);h&&(b-=parseFloat(d.curCSS(a,"margin"+this,!0))||0)});return b}var i=e==="Width"?["Left","Right"]:["Top","Bottom"],j=e.toLowerCase(),k={innerWidth:d.fn.innerWidth,innerHeight:d.fn.innerHeight,
outerWidth:d.fn.outerWidth,outerHeight:d.fn.outerHeight};d.fn["inner"+e]=function(i){return i===a?k["inner"+e].call(this):this.each(function(){d(this).css(j,g(this,i)+"px")})};d.fn["outer"+e]=function(a,i){return typeof a!=="number"?k["outer"+e].call(this,a):this.each(function(){d(this).css(j,g(this,a,!0,i)+"px")})}}),d.extend(d.expr[":"],{data:function(a,b,e){return!!d.data(a,e[3])},focusable:function(a){return b(a,!isNaN(d.attr(a,"tabindex")))},tabbable:function(a){var e=d.attr(a,"tabindex"),g=
isNaN(e);return(g||e>=0)&&b(a,!g)}}),d(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));d.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});d.support.minHeight=b.offsetHeight===100;d.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"}),d.extend(d.ui,{plugin:{add:function(a,b,e){var a=d.ui[a].prototype,i;for(i in e)a.plugins[i]=a.plugins[i]||[],a.plugins[i].push([b,e[i]])},call:function(d,a,b){if((a=d.plugins[a])&&d.element[0].parentNode)for(var i=
0;i<a.length;i++)d.options[a[i][0]]&&a[i][1].apply(d.element,b)}},contains:function(d,a){return document.compareDocumentPosition?d.compareDocumentPosition(a)&16:d!==a&&d.contains(a)},hasScroll:function(a,b){if(d(a).css("overflow")==="hidden")return!1;var e=b&&b==="left"?"scrollLeft":"scrollTop",i=!1;if(a[e]>0)return!0;a[e]=1;i=a[e]>0;a[e]=0;return i},isOverAxis:function(d,a,b){return d>a&&d<a+b},isOver:function(a,b,e,i,j,k){return d.ui.isOverAxis(a,e,j)&&d.ui.isOverAxis(b,i,k)}}))})(jQuery);
(function(d,a){if(d.cleanData){var b=d.cleanData;d.cleanData=function(a){for(var e=0,g;(g=a[e])!=null;e++)try{d(g).triggerHandler("remove")}catch(i){}b(a)}}else{var e=d.fn.remove;d.fn.remove=function(a,b){return this.each(function(){b||(!a||d.filter(a,[this]).length)&&d("*",this).add([this]).each(function(){try{d(this).triggerHandler("remove")}catch(a){}});return e.call(d(this),a,b)})}}d.widget=function(a,b,e){var i=a.split(".")[0],j,a=a.split(".")[1];j=i+"-"+a;if(!e)e=b,b=d.Widget;d.expr[":"][j]=
function(b){return!!d.data(b,a)};d[i]=d[i]||{};d[i][a]=function(d,a){arguments.length&&this._createWidget(d,a)};b=new b;b.options=d.extend(!0,{},b.options);d[i][a].prototype=d.extend(!0,b,{namespace:i,widgetName:a,widgetEventPrefix:d[i][a].prototype.widgetEventPrefix||a,widgetBaseClass:j},e);d.widget.bridge(a,d[i][a])};d.widget.bridge=function(b,e){d.fn[b]=function(g){var i=typeof g==="string",j=Array.prototype.slice.call(arguments,1),k=this,g=!i&&j.length?d.extend.apply(null,[!0,g].concat(j)):g;
if(i&&g.charAt(0)==="_")return k;i?this.each(function(){var i=d.data(this,b),e=i&&d.isFunction(i[g])?i[g].apply(i,j):i;if(e!==i&&e!==a)return k=e,!1}):this.each(function(){var a=d.data(this,b);a?a.option(g||{})._init():d.data(this,b,new e(g,this))});return k}};d.Widget=function(d,a){arguments.length&&this._createWidget(d,a)};d.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(a,b){d.data(b,this.widgetName,this);this.element=d(b);this.options=d.extend(!0,
{},this.options,this._getCreateOptions(),a);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return d.metadata&&d.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+
"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,e){var g=b;if(arguments.length===0)return d.extend({},this.options);if(typeof b==="string"){if(e===a)return this.options[b];g={};g[b]=e}this._setOptions(g);return this},_setOptions:function(a){var b=this;d.each(a,function(d,a){b._setOption(d,a)});return this},_setOption:function(d,a){this.options[d]=a;d==="disabled"&&this.widget()[a?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",
a);return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(a,b,e){var i=this.options[a],b=d.Event(b);b.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();e=e||{};if(b.originalEvent)for(var a=d.event.props.length,j;a;)j=d.event.props[--a],b[j]=b.originalEvent[j];this.element.trigger(b,e);return!(d.isFunction(i)&&i.call(this.element[0],b,e)===!1||b.isDefaultPrevented())}}})(jQuery);
(function(d){var a=!1;d(document).mouseup(function(){a=!1});d.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(d){return a._mouseDown(d)}).bind("click."+this.widgetName,function(e){if(!0===d.data(e.target,a.widgetName+".preventClickEvent"))return d.removeData(e.target,a.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+
this.widgetName)},_mouseDown:function(b){if(!a){this._mouseStarted&&this._mouseUp(b);this._mouseDownEvent=b;var e=this,f=b.which==1,h=typeof this.options.cancel=="string"&&b.target.nodeName?d(b.target).closest(this.options.cancel).length:!1;if(!f||h||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay);if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=
this._mouseStart(b)!==!1,!this._mouseStarted))return b.preventDefault(),!0;!0===d.data(b.target,this.widgetName+".preventClickEvent")&&d.removeData(b.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(d){return e._mouseMove(d)};this._mouseUpDelegate=function(d){return e._mouseUp(d)};d(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);b.preventDefault();return a=!0}},_mouseMove:function(a){if(d.browser.msie&&
!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted)return this._mouseDrag(a),a.preventDefault();if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==!1)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){d(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted)this._mouseStarted=
!1,a.target==this._mouseDownEvent.target&&d.data(a.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(a);return!1},_mouseDistanceMet:function(d){return Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);
(function(d){d.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||d(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||d(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||d(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||d(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if(b.navigation){var e=a.element.find("a").filter(b.navigationFilter).eq(0);if(e.length){var f=e.closest(".ui-accordion-header");a.active=f.length?f:e.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",
function(d){return a._keydown(d)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);d.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(d){a._clickHandler.call(a,d,this);d.preventDefault()})},_createIcons:function(){var a=
this.options;a.icons&&(d("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");
this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");(a.autoHeight||a.fillHeight)&&b.css("height","");return d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);a=="icons"&&(this._destroyIcons(),
b&&this._createIcons());if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!this.options.disabled&&!a.altKey&&!a.ctrlKey){var b=d.ui.keyCode,e=this.headers.length,f=this.headers.index(a.target),h=!1;switch(a.keyCode){case b.RIGHT:case b.DOWN:h=this.headers[(f+1)%e];break;case b.LEFT:case b.UP:h=this.headers[(f-1+e)%e];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target),a.preventDefault()}return h?
(d(a.target).attr("tabIndex",-1),d(h).attr("tabIndex",0),h.focus(),!1):!0}},resize:function(){var a=this.options,b;if(a.fillSpace){if(d.browser.msie){var e=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();d.browser.msie&&this.element.parent().css("overflow",e);this.headers.each(function(){b-=d(this).outerHeight(!0)});this.headers.next().each(function(){d(this).height(Math.max(0,b-d(this).innerHeight()+d(this).height()))}).css("overflow",
"auto")}else a.autoHeight&&(b=0,this.headers.next().each(function(){b=Math.max(b,d(this).height("").height())}).height(b));return this},activate:function(d){this.options.active=d;d=this._findActive(d)[0];this._clickHandler({target:d},d);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===!1?d([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var e=this.options;if(!e.disabled)if(a.target){var f=d(a.currentTarget||
b),h=f[0]===this.active[0];e.active=e.collapsible&&h?!1:this.headers.index(f);if(!(this.running||!e.collapsible&&h)){var g=this.active,i=f.next(),j=this.active.next(),k={options:e,newHeader:h&&e.collapsible?d([]):f,oldHeader:this.active,newContent:h&&e.collapsible?d([]):i,oldContent:j},l=this.headers.index(this.active[0])>this.headers.index(f[0]);this.active=h?d([]):f;this._toggle(i,j,k,h,l);g.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header);
h||(f.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(e.icons.header).addClass(e.icons.headerSelected),f.next().addClass("ui-accordion-content-active"))}}else if(e.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header);this.active.next().addClass("ui-accordion-content-active");var j=this.active.next(),
k={options:e,newHeader:d([]),oldHeader:e.active,newContent:d([]),oldContent:j},i=this.active=d([]);this._toggle(i,j,k)}},_toggle:function(a,b,e,f,h){var g=this,i=g.options;g.toShow=a;g.toHide=b;g.data=e;var j=function(){return!g?void 0:g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(i.animated){e={};e=i.collapsible&&f?{toShow:d([]),toHide:b,complete:j,down:h,autoHeight:i.autoHeight||i.fillSpace}:{toShow:a,toHide:b,complete:j,down:h,
autoHeight:i.autoHeight||i.fillSpace};if(!i.proxied)i.proxied=i.animated;if(!i.proxiedDuration)i.proxiedDuration=i.duration;i.animated=d.isFunction(i.proxied)?i.proxied(e):i.proxied;i.duration=d.isFunction(i.proxiedDuration)?i.proxiedDuration(e):i.proxiedDuration;var f=d.ui.accordion.animations,k=i.duration,l=i.animated;l&&!f[l]&&!d.easing[l]&&(l="slide");f[l]||(f[l]=function(d){this.slide(d,{easing:l,duration:k||700})});f[l](e)}else i.collapsible&&f?a.toggle():(b.hide(),a.show()),j(!0);b.prev().attr({"aria-expanded":"false",
"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(d){this.running=d?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});d.extend(d.ui.accordion,{version:"1.8.16",
animations:{slide:function(a,b){a=d.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var e=a.toShow.css("overflow"),f=0,h={},g={},i,j=a.toShow;i=j[0].style.width;j.width(parseInt(j.parent().width(),10)-parseInt(j.css("paddingLeft"),10)-parseInt(j.css("paddingRight"),10)-(parseInt(j.css("borderLeftWidth"),10)||0)-(parseInt(j.css("borderRightWidth"),10)||0));d.each(["height","paddingTop","paddingBottom"],function(b,i){g[i]="hide";var e=(""+d.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);
h[i]={value:e[1],unit:e[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(d,b){b.prop=="height"&&(f=b.end-b.start===0?0:(b.now-b.start)/(b.end-b.start));a.toShow[0].style[b.prop]=f*h[b.prop].value+h[b.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:i,overflow:e});a.complete()}})}else a.toHide.animate({height:"hide",
paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(d){this.slide(d,{easing:d.down?"easeOutBounce":"swing",duration:d.down?1E3:200})}}})})(jQuery);
(function(d){var a=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,e=this.element[0].ownerDocument,f;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!a.options.disabled&&!a.element.propAttr("readOnly")){f=
!1;var g=d.ui.keyCode;switch(e.keyCode){case g.PAGE_UP:a._move("previousPage",e);break;case g.PAGE_DOWN:a._move("nextPage",e);break;case g.UP:a._move("previous",e);e.preventDefault();break;case g.DOWN:a._move("next",e);e.preventDefault();break;case g.ENTER:case g.NUMPAD_ENTER:a.menu.active&&(f=!0,e.preventDefault());case g.TAB:if(!a.menu.active)break;a.menu.select(e);break;case g.ESCAPE:a.element.val(a.term);a.close(e);break;default:clearTimeout(a.searching),a.searching=setTimeout(function(){if(a.term!=
a.element.val())a.selectedItem=null,a.search(null,e)},a.options.delay)}}}).bind("keypress.autocomplete",function(d){f&&(f=!1,d.preventDefault())}).bind("focus.autocomplete",function(){if(!a.options.disabled)a.selectedItem=null,a.previous=a.element.val()}).bind("blur.autocomplete",function(d){if(!a.options.disabled)clearTimeout(a.searching),a.closing=setTimeout(function(){a.close(d);a._change(d)},150)});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||
"body",e)[0]).mousedown(function(e){var f=a.menu.element[0];d(e.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(i){i.target!==a.element[0]&&i.target!==f&&!d.ui.contains(f,i.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(d,e){var i=e.item.data("item.autocomplete");!1!==a._trigger("focus",d,{item:i})&&/^key/.test(d.originalEvent.type)&&a.element.val(i.value)},selected:function(d,f){var i=f.item.data("item.autocomplete"),
j=a.previous;if(a.element[0]!==e.activeElement)a.element.focus(),a.previous=j,setTimeout(function(){a.previous=j;a.selectedItem=i},1);!1!==a._trigger("select",d,{item:i})&&a.element.val(i.value);a.term=a.element.val();a.close(d);a.selectedItem=i},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,e){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();a==="appendTo"&&this.menu.element.appendTo(d(e||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&e&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,e,f;d.isArray(this.options.source)?(e=this.options.source,this.source=function(a,b){b(d.ui.autocomplete.filter(e,a.term))}):typeof this.options.source==="string"?
(f=this.options.source,this.source=function(e,g){b.xhr&&b.xhr.abort();b.xhr=d.ajax({url:f,data:e,dataType:"json",autocompleteRequest:++a,success:function(d){this.autocompleteRequest===a&&g(d)},error:function(){this.autocompleteRequest===a&&g([])}})}):this.source=this.options.source},search:function(d,a){d=d!=null?d:this.element.val();this.term=this.element.val();if(d.length<this.options.minLength)return this.close(a);clearTimeout(this.closing);return this._trigger("search",a)===!1?void 0:this._search(d)},
_search:function(d){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:d},this.response)},_response:function(d){!this.options.disabled&&d&&d.length?(d=this._normalize(d),this._suggest(d),this._trigger("open")):this.close();this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(d){clearTimeout(this.closing);this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",d))},_change:function(d){this.previous!==
this.element.val()&&this._trigger("change",d,{item:this.selectedItem})},_normalize:function(a){return a.length&&a[0].label&&a[0].value?a:d.map(a,function(a){return typeof a==="string"?{label:a,value:a}:d.extend({label:a.label||a.value,value:a.value||a.label},a)})},_suggest:function(a){var e=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(e,a);this.menu.deactivate();this.menu.refresh();e.show();this._resizeMenu();e.position(d.extend({of:this.element},this.options.position));
this.options.autoFocus&&this.menu.next(new d.Event("mouseover"))},_resizeMenu:function(){var d=this.menu.element;d.outerWidth(Math.max(d.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,e){var f=this;d.each(e,function(d,e){f._renderItem(a,e)})},_renderItem:function(a,e){return d("<li></li>").data("item.autocomplete",e).append(d("<a></a>").text(e.label)).appendTo(a)},_move:function(d,a){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&&
/^next/.test(d))this.element.val(this.term),this.menu.deactivate();else this.menu[d](a);else this.search(null,a)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(d){return d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(a,e){var f=RegExp(d.ui.autocomplete.escapeRegex(e),"i");return d.grep(a,function(d){return f.test(d.label||d.value||d)})}})})(jQuery);
(function(d){d.widget("ui.menu",{_create:function(){var a=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(b){d(b.target).closest(".ui-menu-item a").length&&(b.preventDefault(),a.select(b))});this.refresh()},refresh:function(){var a=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
-1).mouseenter(function(b){a.activate(b,d(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(d,b){this.deactivate();if(this.hasScroll()){var e=b.offset().top-this.element.offset().top,f=this.element.scrollTop(),h=this.element.height();e<0?this.element.scrollTop(f+e):e>=h&&this.element.scrollTop(f+e-h+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",d,{item:b})},deactivate:function(){if(this.active)this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),
this._trigger("blur"),this.active=null},next:function(d){this.move("next",".ui-menu-item:first",d)},previous:function(d){this.move("prev",".ui-menu-item:last",d)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(d,b,e){this.active?(d=this.active[d+"All"](".ui-menu-item").eq(0),d.length?this.activate(e,d):this.activate(e,this.element.children(b))):this.activate(e,this.element.children(b))},
nextPage:function(a){if(this.hasScroll())if(!this.active||this.last())this.activate(a,this.element.children(".ui-menu-item:first"));else{var b=this.active.offset().top,e=this.element.height(),f=this.element.children(".ui-menu-item").filter(function(){var a=d(this).offset().top-b-e+d(this).height();return a<10&&a>-10});f.length||(f=this.element.children(".ui-menu-item:last"));this.activate(a,f)}else this.activate(a,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},
previousPage:function(a){if(this.hasScroll())if(!this.active||this.first())this.activate(a,this.element.children(".ui-menu-item:last"));else{var b=this.active.offset().top,e=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var a=d(this).offset().top-b+e-d(this).height();return a<10&&a>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(a,result)}else this.activate(a,this.element.children(".ui-menu-item").filter(!this.active||
this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[d.fn.prop?"prop":"attr"]("scrollHeight")},select:function(d){this._trigger("selected",d,{item:this.active})}})})(jQuery);
(function(d){var a,b,e,f,h=function(){var a=d(this).find(":ui-button");setTimeout(function(){a.button("refresh")},1)},g=function(a){var b=a.name,e=a.form,f=d([]);b&&(f=e?d(e).find("[name='"+b+"']"):d("[name='"+b+"']",a.ownerDocument).filter(function(){return!this.form}));return f};d.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",h);if(typeof this.options.disabled!==
"boolean")this.options.disabled=this.element.propAttr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var i=this,j=this.options,k=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(!k?" ui-state-active":"");if(j.label===null)j.label=this.buttonElement.html();if(this.element.is(":disabled"))j.disabled=!0;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){j.disabled||
(d(this).addClass("ui-state-hover"),this===a&&d(this).addClass("ui-state-active"))}).bind("mouseleave.button",function(){j.disabled||d(this).removeClass(l)}).bind("click.button",function(d){j.disabled&&(d.preventDefault(),d.stopImmediatePropagation())});this.element.bind("focus.button",function(){i.buttonElement.addClass("ui-state-focus")}).bind("blur.button",function(){i.buttonElement.removeClass("ui-state-focus")});k&&(this.element.bind("change.button",function(){f||i.refresh()}),this.buttonElement.bind("mousedown.button",
function(d){if(!j.disabled)f=!1,b=d.pageX,e=d.pageY}).bind("mouseup.button",function(d){if(!j.disabled&&(b!==d.pageX||e!==d.pageY))f=!0}));this.type==="checkbox"?this.buttonElement.bind("click.button",function(){if(j.disabled||f)return!1;d(this).toggleClass("ui-state-active");i.buttonElement.attr("aria-pressed",i.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click.button",function(){if(j.disabled||f)return!1;d(this).addClass("ui-state-active");i.buttonElement.attr("aria-pressed",
"true");var a=i.element[0];g(a).not(a).map(function(){return d(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){if(j.disabled)return!1;d(this).addClass("ui-state-active");a=this;d(document).one("mouseup",function(){a=null})}).bind("mouseup.button",function(){if(j.disabled)return!1;d(this).removeClass("ui-state-active")}).bind("keydown.button",function(a){if(j.disabled)return!1;(a.keyCode==d.ui.keyCode.SPACE||
a.keyCode==d.ui.keyCode.ENTER)&&d(this).addClass("ui-state-active")}).bind("keyup.button",function(){d(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(a){a.keyCode===d.ui.keyCode.SPACE&&d(this).click()}));this._setOption("disabled",j.disabled);this._resetButton()},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||
this.type==="radio"){var d=this.element.parents().filter(":last"),a="label[for='"+this.element.attr("id")+"']";this.buttonElement=d.find(a);if(!this.buttonElement.length&&(d=d.length?d.siblings():this.element.siblings(),this.buttonElement=d.filter(a),!this.buttonElement.length))this.buttonElement=d.find(a);this.element.addClass("ui-helper-hidden-accessible");(d=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",d)}else this.buttonElement=
this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||
this.buttonElement.removeAttr("title");d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="disabled"?b?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1):this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);this.type==="radio"?g(this.element[0]).each(function(){d(this).is(":checked")?d(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
"true"):d(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
b=d("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,h=[];e.primary||e.secondary?(this.options.text&&h.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary")),e.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>"),e.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>"),this.options.text||(h.push(f?"ui-button-icons-only":
"ui-button-icon-only"),this.hasTitle||a.attr("title",b))):h.push("ui-button-text-only");a.addClass(h.join(" "))}}});d.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){a==="disabled"&&this.buttons.button("option",a,b);d.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")==="ltr";
this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return d(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return d(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");
d.Widget.prototype.destroy.call(this)}})})(jQuery);
(function(d,a){function b(){this.debug=!1;this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._inDialog=this._datepickerShowing=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,
maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};d.extend(this._defaults,this.regional[""]);this.dpDiv=e(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function e(a){return a.bind("mouseout",function(a){a=
d(a.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");a.length&&a.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!d.datepicker._isDisabledDatepicker(g.inline?a.parent()[0]:g.input[0])&&b.length)b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),b.addClass("ui-state-hover"),
b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover"),b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")})}function f(i,b){d.extend(i,b);for(var e in b)if(b[e]==null||b[e]==a)i[e]=b[e];return i}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var h=(new Date).getTime(),g;d.extend(b.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(d){f(this._defaults,
d||{});return this},_attachDatepicker:function(a,b){var e=null,f;for(f in this._defaults){var h=a.getAttribute("date:"+f);if(h){e=e||{};try{e[f]=eval(h)}catch(g){e[f]=h}}}f=a.nodeName.toLowerCase();h=f=="div"||f=="span";if(!a.id)this.uuid+=1,a.id="dp"+this.uuid;var p=this._newInst(d(a),h);p.settings=d.extend({},b||{},e||{});f=="input"?this._connectDatepicker(a,p):h&&this._inlineDatepicker(a,p)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,
selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:e(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(a,b){var e=d(a);b.append=d([]);b.trigger=d([]);e.hasClass(this.markerClassName)||(this._attachments(e,b),e.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(d,a,i){b.settings[a]=i}).bind("getData.datepicker",
function(d,a){return this._get(b,a)}),this._autoSize(b),d.data(a,"datepicker",b),b.settings.disabled&&this._disableDatepicker(a))},_attachments:function(a,b){var e=this._get(b,"appendText"),f=this._get(b,"isRTL");b.append&&b.append.remove();if(e)b.append=d('<span class="'+this._appendClass+'">'+e+"</span>"),a[f?"before":"after"](b.append);a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||
e=="both"){var e=this._get(b,"buttonText"),h=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:h,alt:e,title:e}):d('<button type="button"></button>').addClass(this._triggerClass).html(h==""?e:d("<img/>").attr({src:h,alt:e,title:e})));a[f?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return!1})}},
_autoSize:function(d){if(this._get(d,"autoSize")&&!d.inline){var a=new Date(2009,11,20),b=this._get(d,"dateFormat");if(b.match(/[DM]/)){var e=function(d){for(var a=0,b=0,i=0;i<d.length;i++)if(d[i].length>a)a=d[i].length,b=i;return b};a.setMonth(e(this._get(d,b.match(/MM/)?"monthNames":"monthNamesShort")));a.setDate(e(this._get(d,b.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())}d.input.attr("size",this._formatDate(d,a).length)}},_inlineDatepicker:function(a,b){var e=d(a);e.hasClass(this.markerClassName)||
(e.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(d,a,i){b.settings[a]=i}).bind("getData.datepicker",function(d,a){return this._get(b,a)}),d.data(a,"datepicker",b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block"))},_dialogDatepicker:function(a,b,e,h,g){a=this._dialogInst;if(!a)this.uuid+=1,this._dialogInput=d('<input type="text" id="dp'+this.uuid+
'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),d("body").append(this._dialogInput),a=this._dialogInst=this._newInst(this._dialogInput,!1),a.settings={},d.data(this._dialogInput[0],"datepicker",a);f(a.settings,h||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=g?g.length?g:[g.pageX,g.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||
document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=e;this._inDialog=!0;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),e=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var f=
a.nodeName.toLowerCase();d.removeData(a,"datepicker");f=="input"?(e.append.remove(),e.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(f=="div"||f=="span")&&b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),e=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var f=a.nodeName.toLowerCase();if(f=="input")a.disabled=
!1,e.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(f=="div"||f=="span")b=b.children("."+this._inlineClass),b.children().removeClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled");this._disabledInputs=d.map(this._disabledInputs,function(d){return d==a?null:d})}},_disableDatepicker:function(a){var b=d(a),e=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var f=
a.nodeName.toLowerCase();if(f=="input")a.disabled=!0,e.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(f=="div"||f=="span")b=b.children("."+this._inlineClass),b.children().addClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled");this._disabledInputs=d.map(this._disabledInputs,function(d){return d==a?null:d});this._disabledInputs[this._disabledInputs.length]=
a}},_isDisabledDatepicker:function(d){if(!d)return!1;for(var a=0;a<this._disabledInputs.length;a++)if(this._disabledInputs[a]==d)return!0;return!1},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(b,e,h){var g=this._getInst(b);if(arguments.length==2&&typeof e=="string")return e=="defaults"?d.extend({},d.datepicker._defaults):g?e=="all"?d.extend({},g.settings):this._get(g,e):null;var m=e||{};typeof e=="string"&&
(m={},m[e]=h);if(g){this._curInst==g&&this._hideDatepicker();var o=this._getDateDatepicker(b,!0),p=this._getMinMaxDate(g,"min"),n=this._getMinMaxDate(g,"max");f(g.settings,m);if(p!==null&&m.dateFormat!==a&&m.minDate===a)g.settings.minDate=this._formatDate(g,p);if(n!==null&&m.dateFormat!==a&&m.maxDate===a)g.settings.maxDate=this._formatDate(g,n);this._attachments(d(b),g);this._autoSize(g);this._setDate(g,o);this._updateAlternate(g);this._updateDatepicker(g)}},_changeDatepicker:function(d,a,b){this._optionDatepicker(d,
a,b)},_refreshDatepicker:function(d){(d=this._getInst(d))&&this._updateDatepicker(d)},_setDateDatepicker:function(d,a){var b=this._getInst(d);b&&(this._setDate(b,a),this._updateDatepicker(b),this._updateAlternate(b))},_getDateDatepicker:function(d,a){var b=this._getInst(d);b&&!b.inline&&this._setDateFromField(b,a);return b?this._getDate(b):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),e=!0,f=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();
e=!1;break;case 13:return e=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv),e[0]&&d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]),(a=d.datepicker._get(b,"onSelect"))?(e=d.datepicker._formatDate(b),a.apply(b.input?b.input[0]:null,[e,b])):d.datepicker._hideDatepicker(),!1;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");
break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&d.datepicker._clearDate(a.target);e=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&d.datepicker._gotoToday(a.target);e=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,f?1:-1,"D");e=a.ctrlKey||a.metaKey;a.originalEvent.altKey&&d.datepicker._adjustDate(a.target,a.ctrlKey?
-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&d.datepicker._adjustDate(a.target,-7,"D");e=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,f?-1:1,"D");e=a.ctrlKey||a.metaKey;a.originalEvent.altKey&&d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&d.datepicker._adjustDate(a.target,
7,"D");e=a.ctrlKey||a.metaKey;break;default:e=!1}else a.keyCode==36&&a.ctrlKey?d.datepicker._showDatepicker(this):e=!1;e&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(b){var e=d.datepicker._getInst(b.target);if(d.datepicker._get(e,"constrainInput")){var e=d.datepicker._possibleChars(d.datepicker._get(e,"dateFormat")),f=String.fromCharCode(b.charCode==a?b.keyCode:b.charCode);return b.ctrlKey||b.metaKey||f<" "||!e||e.indexOf(f)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);
if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a)))d.datepicker._setDateFromField(a),d.datepicker._updateAlternate(a),d.datepicker._updateDatepicker(a)}catch(b){d.datepicker.log(b)}return!0},_showDatepicker:function(a){a=a.target||a;a.nodeName.toLowerCase()!="input"&&(a=d("input",a.parentNode)[0]);if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);
d.datepicker._curInst&&d.datepicker._curInst!=b&&(d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst),d.datepicker._curInst.dpDiv.stop(!0,!0));var e=d.datepicker._get(b,"beforeShow"),e=e?e.apply(a,[a,b]):{};if(e!==!1){f(b.settings,e);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos)d.datepicker._pos=d.datepicker._findPos(a),d.datepicker._pos[1]+=a.offsetHeight;var h=!1;d(a).parents().each(function(){h|=
d(this).css("position")=="fixed";return!h});h&&d.browser.opera&&(d.datepicker._pos[0]-=document.documentElement.scrollLeft,d.datepicker._pos[1]-=document.documentElement.scrollTop);e={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);e=d.datepicker._checkOffset(b,e,h);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":h?"fixed":"absolute",display:"none",
left:e.left+"px",top:e.top+"px"});if(!b.inline){var e=d.datepicker._get(b,"showAnim"),g=d.datepicker._get(b,"duration"),o=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(a.length){var e=d.datepicker._getBorders(b.dpDiv);a.css({left:-e[0],top:-e[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=!0;if(d.effects&&d.effects[e])b.dpDiv.show(e,d.datepicker._get(b,"showOptions"),g,o);else b.dpDiv[e||"show"](e?g:null,
o);(!e||!g)&&o();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);g=a;a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);e=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
e>1&&a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);
f=a.yearshtml=null},0)}},_getBorders:function(a){var d=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(d(a.css("border-left-width"))),parseFloat(d(a.css("border-top-width")))]},_checkOffset:function(a,b,e){var f=a.dpDiv.outerWidth(),h=a.dpDiv.outerHeight(),g=a.input?a.input.outerWidth():0,p=a.input?a.input.outerHeight():0,n=document.documentElement.clientWidth+d(document).scrollLeft(),r=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?
f-g:0;b.left-=e&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=e&&b.top==a.input.offset().top+p?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+f>n&&n>f?Math.abs(b.left+f-n):0);b.top-=Math.min(b.top,b.top+h>r&&r>h?Math.abs(h+p):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var d=
this._get(a,"onClose");d&&d.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(b&&!(a&&b!=d.data(a,"datepicker"))&&this._datepickerShowing){var a=this._get(b,"showAnim"),e=this._get(b,"duration"),f=function(){d.datepicker._tidyDialog(b);this._curInst=null};if(d.effects&&d.effects[a])b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),e,f);else b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?e:null,f);a||f();d.datepicker._triggerOnClose(b);
this._datepickerShowing=!1;this._lastInput=null;this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),d.blockUI&&(d.unblockUI(),d("body").append(this.dpDiv)));this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){d.datepicker._curInst&&(a=d(a.target),a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&
!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&(!d.datepicker._inDialog||!d.blockUI)&&d.datepicker._hideDatepicker())},_adjustDate:function(a,b,e){var a=d(a),f=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(f,b+(e=="M"?this._get(f,"showCurrentAtPos"):0),e),this._updateDatepicker(f))},_gotoToday:function(a){var a=d(a),b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay)b.selectedDay=b.currentDay,b.drawMonth=b.selectedMonth=b.currentMonth,
b.drawYear=b.selectedYear=b.currentYear;else{var e=new Date;b.selectedDay=e.getDate();b.drawMonth=b.selectedMonth=e.getMonth();b.drawYear=b.selectedYear=e.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,e){var a=d(a),f=this._getInst(a[0]);f["selected"+(e=="M"?"Month":"Year")]=f["draw"+(e=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(f);this._adjustDate(a)},_selectDay:function(a,b,e,f){var h=d(a);if(!d(f).hasClass(this._unselectableClass)&&
!this._isDisabledDatepicker(h[0]))h=this._getInst(h[0]),h.selectedDay=h.currentDay=d("a",f).html(),h.selectedMonth=h.currentMonth=b,h.selectedYear=h.currentYear=e,this._selectDate(a,this._formatDate(h,h.currentDay,h.currentMonth,h.currentYear))},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){var e=this._getInst(d(a)[0]),b=b!=null?b:this._formatDate(e);e.input&&e.input.val(b);this._updateAlternate(e);var f=this._get(e,"onSelect");f?f.apply(e.input?
e.input[0]:null,[b,e]):e.input&&e.input.trigger("change");e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],typeof e.input[0]!="object"&&e.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var e=this._get(a,"altFormat")||this._get(a,"dateFormat"),f=this._getDate(a),h=this.formatDate(e,f,this._getFormatConfig(a));d(b).each(function(){d(this).val(h)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=
new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var d=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((d-a)/864E5)/7)+1},parseDate:function(a,b,e){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;for(var f=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,f=typeof f!="string"?f:(new Date).getFullYear()%100+parseInt(f,10),h=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,g=(e?e.dayNames:null)||
this._defaults.dayNames,p=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,n=(e?e.monthNames:null)||this._defaults.monthNames,r=e=-1,u=-1,x=-1,q=!1,w=function(d){(d=F+1<a.length&&a.charAt(F+1)==d)&&F++;return d},s=function(a){var d=w(a),a=b.substring(C).match(RegExp("^\\d{1,"+(a=="@"?14:a=="!"?20:a=="y"&&d?4:a=="o"?3:2)+"}"));if(!a)throw"Missing number at position "+C;C+=a[0].length;return parseInt(a[0],10)},v=function(a,e,f){var a=d.map(w(a)?f:e,function(a,d){return[[d,a]]}).sort(function(a,
d){return-(a[1].length-d[1].length)}),i=-1;d.each(a,function(a,d){var e=d[1];if(b.substr(C,e.length).toLowerCase()==e.toLowerCase())return i=d[0],C+=e.length,!1});if(i!=-1)return i+1;else throw"Unknown name at position "+C;},z=function(){if(b.charAt(C)!=a.charAt(F))throw"Unexpected literal at position "+C;C++},C=0,F=0;F<a.length;F++)if(q)a.charAt(F)=="'"&&!w("'")?q=!1:z();else switch(a.charAt(F)){case "d":u=s("d");break;case "D":v("D",h,g);break;case "o":x=s("o");break;case "m":r=s("m");break;case "M":r=
v("M",p,n);break;case "y":e=s("y");break;case "@":var B=new Date(s("@")),e=B.getFullYear(),r=B.getMonth()+1,u=B.getDate();break;case "!":B=new Date((s("!")-this._ticksTo1970)/1E4);e=B.getFullYear();r=B.getMonth()+1;u=B.getDate();break;case "'":w("'")?z():q=!0;break;default:z()}if(C<b.length)throw"Extra/unparsed characters found in date: "+b.substring(C);e==-1?e=(new Date).getFullYear():e<100&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(e<=f?0:-100));if(x>-1){r=1;u=x;do{f=this._getDaysInMonth(e,
r-1);if(u<=f)break;r++;u-=f}while(1)}B=this._daylightSavingAdjust(new Date(e,r-1,u));if(B.getFullYear()!=e||B.getMonth()+1!=r||B.getDate()!=u)throw"Invalid date";return B},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*864E9,formatDate:function(a,d,b){if(!d)return"";
var e=(b?b.dayNamesShort:null)||this._defaults.dayNamesShort,f=(b?b.dayNames:null)||this._defaults.dayNames,h=(b?b.monthNamesShort:null)||this._defaults.monthNamesShort,b=(b?b.monthNames:null)||this._defaults.monthNames,g=function(d){(d=q+1<a.length&&a.charAt(q+1)==d)&&q++;return d},n=function(a,d,b){d=""+d;if(g(a))for(;d.length<b;)d="0"+d;return d},r=function(a,d,b,e){return g(a)?e[d]:b[d]},u="",x=!1;if(d)for(var q=0;q<a.length;q++)if(x)a.charAt(q)=="'"&&!g("'")?x=!1:u+=a.charAt(q);else switch(a.charAt(q)){case "d":u+=
n("d",d.getDate(),2);break;case "D":u+=r("D",d.getDay(),e,f);break;case "o":u+=n("o",Math.round(((new Date(d.getFullYear(),d.getMonth(),d.getDate())).getTime()-(new Date(d.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":u+=n("m",d.getMonth()+1,2);break;case "M":u+=r("M",d.getMonth(),h,b);break;case "y":u+=g("y")?d.getFullYear():(d.getYear()%100<10?"0":"")+d.getYear()%100;break;case "@":u+=d.getTime();break;case "!":u+=d.getTime()*1E4+this._ticksTo1970;break;case "'":g("'")?u+="'":x=!0;break;
default:u+=a.charAt(q)}return u},_possibleChars:function(a){for(var d="",b=!1,e=function(d){(d=f+1<a.length&&a.charAt(f+1)==d)&&f++;return d},f=0;f<a.length;f++)if(b)a.charAt(f)=="'"&&!e("'")?b=!1:d+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":d+="0123456789";break;case "D":case "M":return null;case "'":e("'")?d+="'":b=!0;break;default:d+=a.charAt(f)}return d},_get:function(d,b){return d.settings[b]!==a?d.settings[b]:this._defaults[b]},_setDateFromField:function(a,d){if(a.input.val()!=
a.lastVal){var b=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{f=this.parseDate(b,e,g)||h}catch(n){this.log(n),e=d?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,
this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,e){var i;var f=function(a){var d=new Date;d.setDate(d.getDate()+a);return d};if(i=(b=b==null||b===""?e:typeof b=="string"?function(b){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),b,d.datepicker._getFormatConfig(a))}catch(e){}for(var f=(b.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,h=f.getFullYear(),g=f.getMonth(),f=f.getDate(),j=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=j.exec(b);k;){switch(k[2]||
"d"){case "d":case "D":f+=parseInt(k[1],10);break;case "w":case "W":f+=parseInt(k[1],10)*7;break;case "m":case "M":g+=parseInt(k[1],10);f=Math.min(f,d.datepicker._getDaysInMonth(h,g));break;case "y":case "Y":h+=parseInt(k[1],10),f=Math.min(f,d.datepicker._getDaysInMonth(h,g))}k=j.exec(b)}return new Date(h,g,f)}(b):typeof b=="number"?isNaN(b)?e:f(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?e:b,b=i)b.setHours(0),b.setMinutes(0),b.setSeconds(0),b.setMilliseconds(0);return this._daylightSavingAdjust(b)},
_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,d,b){var e=!d,f=a.selectedMonth,h=a.selectedYear,d=this._restrictMinMax(a,this._determineDate(a,d,new Date));a.selectedDay=a.currentDay=d.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=d.getMonth();a.drawYear=a.selectedYear=a.currentYear=d.getFullYear();(f!=a.selectedMonth||h!=a.selectedYear)&&!b&&this._notifyChange(a);this._adjustInstDate(a);a.input&&a.input.val(e?
"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date,b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate())),e=this._get(a,"isRTL"),f=this._get(a,"showButtonPanel"),g=this._get(a,"hideIfNoPrevNext"),o=this._get(a,"navigationAsDateFormat"),p=this._getNumberOfMonths(a),n=this._get(a,"showCurrentAtPos"),r=this._get(a,
"stepMonths"),u=p[0]!=1||p[1]!=1,x=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),q=this._getMinMaxDate(a,"min"),w=this._getMinMaxDate(a,"max"),n=a.drawMonth-n,s=a.drawYear;n<0&&(n+=12,s--);if(w)for(var v=this._daylightSavingAdjust(new Date(w.getFullYear(),w.getMonth()-p[0]*p[1]+1,w.getDate())),v=q&&v<q?q:v;this._daylightSavingAdjust(new Date(s,n,1))>v;)n--,n<0&&(n=11,s--);a.drawMonth=n;a.drawYear=s;var v=this._get(a,"prevText"),v=
!o?v:this.formatDate(v,this._daylightSavingAdjust(new Date(s,n-r,1)),this._getFormatConfig(a)),v=this._canAdjustMonth(a,-1,s,n)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+h+".datepicker._adjustDate('#"+a.id+"', -"+r+", 'M');\" title=\""+v+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"e":"w")+'">'+v+"</span></a>":g?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+v+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"e":"w")+'">'+v+"</span></a>",
z=this._get(a,"nextText"),z=!o?z:this.formatDate(z,this._daylightSavingAdjust(new Date(s,n+r,1)),this._getFormatConfig(a)),g=this._canAdjustMonth(a,1,s,n)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+h+".datepicker._adjustDate('#"+a.id+"', +"+r+", 'M');\" title=\""+z+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"w":"e")+'">'+z+"</span></a>":g?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+z+'"><span class="ui-icon ui-icon-circle-triangle-'+
(e?"w":"e")+'">'+z+"</span></a>",r=this._get(a,"currentText"),z=this._get(a,"gotoCurrent")&&a.currentDay?x:b,r=!o?r:this.formatDate(r,z,this._getFormatConfig(a)),o=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+h+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"",f=f?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(e?o:"")+(this._isInRange(a,z)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
h+".datepicker._gotoToday('#"+a.id+"');\">"+r+"</button>":"")+(e?"":o)+"</div>":"",o=parseInt(this._get(a,"firstDay"),10),o=isNaN(o)?0:o,r=this._get(a,"showWeek"),z=this._get(a,"dayNames");this._get(a,"dayNamesShort");var C=this._get(a,"dayNamesMin"),F=this._get(a,"monthNames"),B=this._get(a,"monthNamesShort"),N=this._get(a,"beforeShowDay"),K=this._get(a,"showOtherMonths"),T=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var O=this._getDefaultDate(a),L="",H=0;H<p[0];H++){var P=
"";this.maxRows=4;for(var I=0;I<p[1];I++){var Q=this._daylightSavingAdjust(new Date(s,n,a.selectedDay)),A=" ui-corner-all",D="";if(u){D+='<div class="ui-datepicker-group';if(p[1]>1)switch(I){case 0:D+=" ui-datepicker-group-first";A=" ui-corner-"+(e?"right":"left");break;case p[1]-1:D+=" ui-datepicker-group-last";A=" ui-corner-"+(e?"left":"right");break;default:D+=" ui-datepicker-group-middle",A=""}D+='">'}D+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+A+'">'+(/all|left/.test(A)&&
H==0?e?g:v:"")+(/all|right/.test(A)&&H==0?e?v:g:"")+this._generateMonthYearHeader(a,n,s,q,w,H>0||I>0,F,B)+'</div><table class="ui-datepicker-calendar"><thead><tr>';for(var E=r?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"",A=0;A<7;A++){var y=(A+o)%7;E+="<th"+((A+o+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+z[y]+'">'+C[y]+"</span></th>"}D+=E+"</tr></thead><tbody>";E=this._getDaysInMonth(s,n);if(s==a.selectedYear&&n==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,
E);A=(this._getFirstDayOfMonth(s,n)-o+7)%7;E=Math.ceil((A+E)/7);this.maxRows=E=u?this.maxRows>E?this.maxRows:E:E;for(var y=this._daylightSavingAdjust(new Date(s,n,1-A)),R=0;R<E;R++){D+="<tr>";for(var S=!r?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(y)+"</td>",A=0;A<7;A++){var J=N?N.apply(a.input?a.input[0]:null,[y]):[!0,""],G=y.getMonth()!=n,M=G&&!T||!J[0]||q&&y<q||w&&y>w;S+='<td class="'+((A+o+6)%7>=5?" ui-datepicker-week-end":"")+(G?" ui-datepicker-other-month":"")+(y.getTime()==
Q.getTime()&&n==a.selectedMonth&&a._keyEvent||O.getTime()==y.getTime()&&O.getTime()==Q.getTime()?" "+this._dayOverClass:"")+(M?" "+this._unselectableClass+" ui-state-disabled":"")+(G&&!K?"":" "+J[1]+(y.getTime()==x.getTime()?" "+this._currentClass:"")+(y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!G||K)&&J[2]?' title="'+J[2]+'"':"")+(M?"":' onclick="DP_jQuery_'+h+".datepicker._selectDay('#"+a.id+"',"+y.getMonth()+","+y.getFullYear()+', this);return false;"')+">"+(G&&!K?"&#xa0;":M?'<span class="ui-state-default">'+
y.getDate()+"</span>":'<a class="ui-state-default'+(y.getTime()==b.getTime()?" ui-state-highlight":"")+(y.getTime()==x.getTime()?" ui-state-active":"")+(G?" ui-priority-secondary":"")+'" href="#">'+y.getDate()+"</a>")+"</td>";y.setDate(y.getDate()+1);y=this._daylightSavingAdjust(y)}D+=S+"</tr>"}n++;n>11&&(n=0,s++);D+="</tbody></table>"+(u?"</div>"+(p[0]>0&&I==p[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");P+=D}L+=P}L+=f+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
"");a._keyEvent=!1;return L},_generateMonthYearHeader:function(a,d,b,e,f,g,p,n){var r=this._get(a,"changeMonth"),u=this._get(a,"changeYear"),x=this._get(a,"showMonthAfterYear"),q='<div class="ui-datepicker-title">',w="";if(g||!r)w+='<span class="ui-datepicker-month">'+p[d]+"</span>";else{var p=e&&e.getFullYear()==b,s=f&&f.getFullYear()==b;w+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+h+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" >";for(var v=0;v<12;v++)if((!p||v>=e.getMonth())&&
(!s||v<=f.getMonth()))w+='<option value="'+v+'"'+(v==d?' selected="selected"':"")+">"+n[v]+"</option>";w+="</select>"}x||(q+=w+(g||!r||!u?"&#xa0;":""));if(!a.yearshtml)if(a.yearshtml="",g||!u)q+='<span class="ui-datepicker-year">'+b+"</span>";else{var n=this._get(a,"yearRange").split(":"),z=(new Date).getFullYear(),p=function(a){a=a.match(/c[+-].*/)?b+parseInt(a.substring(1),10):a.match(/[+-].*/)?z+parseInt(a,10):parseInt(a,10);return isNaN(a)?z:a},d=p(n[0]),n=Math.max(d,p(n[1]||"")),d=e?Math.max(d,
e.getFullYear()):d,n=f?Math.min(n,f.getFullYear()):n;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+h+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" >";d<=n;d++)a.yearshtml+='<option value="'+d+'"'+(d==b?' selected="selected"':"")+">"+d+"</option>";a.yearshtml+="</select>";q+=a.yearshtml;a.yearshtml=null}q+=this._get(a,"yearSuffix");x&&(q+=(g||!r||!u?"&#xa0;":"")+w);q+="</div>";return q},_adjustInstDate:function(a,d,b){var e=a.drawYear+(b=="Y"?d:0),f=a.drawMonth+
(b=="M"?d:0),d=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(b=="D"?d:0),e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,d)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();(b=="M"||b=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,d){var b=this._getMinMaxDate(a,"min"),e=this._getMinMaxDate(a,"max"),b=b&&d<b?b:d;return e&&b>e?e:b},_notifyChange:function(a){var d=this._get(a,"onChangeMonthYear");d&&d.apply(a.input?
a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,d){return this._determineDate(a,this._get(a,d+"Date"),null)},_getDaysInMonth:function(a,d){return 32-this._daylightSavingAdjust(new Date(a,d,32)).getDate()},_getFirstDayOfMonth:function(a,d){return(new Date(a,d,1)).getDay()},_canAdjustMonth:function(a,d,b,e){var f=this._getNumberOfMonths(a),b=this._daylightSavingAdjust(new Date(b,
e+(d<0?d:f[0]*f[1]),1));d<0&&b.setDate(this._getDaysInMonth(b.getFullYear(),b.getMonth()));return this._isInRange(a,b)},_isInRange:function(a,d){var b=this._getMinMaxDate(a,"min"),e=this._getMinMaxDate(a,"max");return(!b||d.getTime()>=b.getTime())&&(!e||d.getTime()<=e.getTime())},_getFormatConfig:function(a){var d=this._get(a,"shortYearCutoff"),d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);return{shortYearCutoff:d,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,
"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,d,b,e){if(!d)a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear;d=d?typeof d=="object"?d:this._daylightSavingAdjust(new Date(e,b,d)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),d,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this;
if(!d.datepicker.initialized)d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv),d.datepicker.initialized=!0;var b=Array.prototype.slice.call(arguments,1);return typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget")?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b)):a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b)):this.each(function(){typeof a==
"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new b;d.datepicker.initialized=!1;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+h]=d})(jQuery);
(function(d,a){var b={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},f=d.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};d.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(a){var b=
d(this).css(a).offset().top;b<0&&d(this).css("top",a.top-b)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,e=b.title||"&#160;",f=d.ui.dialog.getTitleId(a.element),k=(a.uiDialog=d("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(e){b.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===d.ui.keyCode.ESCAPE&&(a.close(e),e.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(d){a.moveToTop(!1,d)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k);var l=(a.uiDialogTitlebar=d("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),
m=d('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){m.addClass("ui-state-hover")},function(){m.removeClass("ui-state-hover")}).focus(function(){m.addClass("ui-state-focus")}).blur(function(){m.removeClass("ui-state-focus")}).click(function(d){a.close(d);return!1}).appendTo(l);(a.uiDialogTitlebarCloseText=d("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(m);d("<span></span>").addClass("ui-dialog-title").attr("id",
f).html(e).prependTo(l);if(d.isFunction(b.beforeclose)&&!d.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;l.find("*").add(l).disableSelection();b.draggable&&d.fn.draggable&&a._makeDraggable();b.resizable&&d.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=!1;d.fn.bgiframe&&k.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
this.uiDialog.remove();this.originalTitle&&this.element.attr("title",this.originalTitle);return this},widget:function(){return this.uiDialog},close:function(a){var b=this,e,f;if(!1!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=!1;b.options.hide?b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)}):(b.uiDialog.hide(),b._trigger("close",a));d.ui.dialog.overlay.resize();if(b.options.modal)e=0,d(".ui-dialog").each(function(){this!==
b.uiDialog[0]&&(f=d(this).css("z-index"),isNaN(f)||(e=Math.max(e,f)))}),d.ui.dialog.maxZ=e;return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var e=this.options;if(e.modal&&!a||!e.stack&&!e.modal)return this._trigger("focus",b);if(e.zIndex>d.ui.dialog.maxZ)d.ui.dialog.maxZ=e.zIndex;if(this.overlay)d.ui.dialog.maxZ+=1,this.overlay.$el.css("z-index",d.ui.dialog.overlay.maxZ=d.ui.dialog.maxZ);e={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()};d.ui.dialog.maxZ+=
1;this.uiDialog.css("z-index",d.ui.dialog.maxZ);this.element.attr(e);this._trigger("focus",b);return this},open:function(){if(!this._isOpen){var a=this.options,b=this.uiDialog;this.overlay=a.modal?new d.ui.dialog.overlay(this):null;this._size();this._position(a.position);b.show(a.show);this.moveToTop(!0);a.modal&&b.bind("keypress.ui-dialog",function(a){if(a.keyCode===d.ui.keyCode.TAB){var b=d(":tabbable",this),e=b.filter(":first"),b=b.filter(":last");if(a.target===b[0]&&!a.shiftKey)return e.focus(1),
!1;else if(a.target===e[0]&&a.shiftKey)return b.focus(1),!1}});d(this.element.find(":tabbable").get().concat(b.find(".ui-dialog-buttonpane :tabbable").get().concat(b.get()))).eq(0).focus();this._isOpen=!0;this._trigger("open");return this}},_createButtons:function(a){var b=this,e=!1,j=d("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),k=d("<div></div>").addClass("ui-dialog-buttonset").appendTo(j);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&
a!==null&&d.each(a,function(){return!(e=!0)});e&&(d.each(a,function(a,e){var e=d.isFunction(e)?{click:e,text:a}:e,h=d('<button type="button"></button>').click(function(){e.click.apply(b.element[0],arguments)}).appendTo(k);d.each(e,function(a,d){if(a!=="click")if(a in f)h[a](d);else h.attr(a,d)});d.fn.button&&h.button()}),j.appendTo(b.uiDialog))},_makeDraggable:function(){function a(d){return{position:d.position,offset:d.offset}}var b=this,e=b.options,f=d(document),k;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
handle:".ui-dialog-titlebar",containment:"document",start:function(f,m){k=e.height==="auto"?"auto":d(this).height();d(this).height(d(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(m))},drag:function(d,e){b._trigger("drag",d,a(e))},stop:function(l,m){e.position=[m.position.left-f.scrollLeft(),m.position.top-f.scrollTop()];d(this).removeClass("ui-dialog-dragging").height(k);b._trigger("dragStop",l,a(m));d.ui.dialog.overlay.resize()}})},_makeResizable:function(b){function e(a){return{originalPosition:a.originalPosition,
originalSize:a.originalSize,position:a.position,size:a.size}}var b=b===a?this.options.resizable:b,f=this,j=f.options,k=f.uiDialog.css("position"),b=typeof b==="string"?b:"n,e,s,w,se,sw,ne,nw";f.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:f.element,maxWidth:j.maxWidth,maxHeight:j.maxHeight,minWidth:j.minWidth,minHeight:f._minHeight(),handles:b,start:function(a,b){d(this).addClass("ui-dialog-resizing");f._trigger("resizeStart",a,e(b))},resize:function(a,d){f._trigger("resize",
a,e(d))},stop:function(a,b){d(this).removeClass("ui-dialog-resizing");j.height=d(this).height();j.width=d(this).width();f._trigger("resizeStop",a,e(b));d.ui.dialog.overlay.resize()}}).css("position",k).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],e=[0,0],f;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a)b=a.split?a.split(" "):
[a[0],a[1]],b.length===1&&(b[1]=b[0]),d.each(["left","top"],function(a,d){+b[a]===b[a]&&(e[a]=b[a],b[a]=d)}),a={my:b.join(" "),at:b.join(" "),offset:e.join(" ")};a=d.extend({},d.ui.dialog.prototype.options.position,a)}else a=d.ui.dialog.prototype.options.position;(f=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(d.extend({of:window},a));f||this.uiDialog.hide()},_setOptions:function(a){var f=this,i={},j=!1;d.each(a,function(a,d){f._setOption(a,d);a in
b&&(j=!0);a in e&&(i[a]=d)});j&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",i)},_setOption:function(a,b){var e=this.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":this._createButtons(b);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):
e.removeClass("ui-dialog-disabled");break;case "draggable":var f=e.is(":data(draggable)");f&&!b&&e.draggable("destroy");!f&&b&&this._makeDraggable();break;case "position":this._position(b);break;case "resizable":(f=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");f&&typeof b==="string"&&e.resizable("option","handles",b);!f&&b!==!1&&this._makeResizable(b);break;case "title":d(".ui-dialog-title",this.uiDialogTitlebar).html(""+(b||"&#160;"))}d.Widget.prototype._setOption.apply(this,arguments)},
_size:function(){var a=this.options,b,e,f=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();e=Math.max(0,a.minHeight-b);a.height==="auto"?d.support.minHeight?this.element.css({minHeight:e,height:"auto"}):(this.uiDialog.show(),a=this.element.css("height","auto").height(),f||this.uiDialog.hide(),this.element.height(Math.max(a,e))):this.element.height(Math.max(a.height-
b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});d.extend(d.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a)this.uuid+=1,a=this.uuid;return"ui-dialog-title-"+a},overlay:function(a){this.$el=d.ui.dialog.overlay.create(a)}});d.extend(d.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:d.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
create:function(a){this.instances.length===0&&(setTimeout(function(){d.ui.dialog.overlay.instances.length&&d(document).bind(d.ui.dialog.overlay.events,function(a){if(d(a.target).zIndex()<d.ui.dialog.overlay.maxZ)return!1})},1),d(document).bind("keydown.dialog-overlay",function(b){a.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===d.ui.keyCode.ESCAPE&&(a.close(b),b.preventDefault())}),d(window).bind("resize.dialog-overlay",d.ui.dialog.overlay.resize));var b=(this.oldInstances.pop()||
d("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});d.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=d.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&d([document,window]).unbind(".dialog-overlay");a.remove();var e=0;d.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){var a,b;return d.browser.msie&&
d.browser.version<7?(a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),a<b?d(window).height()+"px":a+"px"):d(document).height()+"px"},width:function(){var a,b;return d.browser.msie?(a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),a<b?d(window).width()+"px":a+"px"):d(document).width()+"px"},resize:function(){var a=
d([]);d.each(d.ui.dialog.overlay.instances,function(){a=a.add(this)});a.css({width:0,height:0}).css({width:d.ui.dialog.overlay.width(),height:d.ui.dialog.overlay.height()})}});d.extend(d.ui.dialog.overlay.prototype,{destroy:function(){d.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position=
"relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(a){var b=this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return!1;
this.handle=this._getHandle(a);if(!this.handle)return!1;b.iframeFix&&d(b.iframeFix===!0?"iframe":b.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return!0},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=
this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;
this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===!1)return this._clear(),!1;this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,!0);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return!0},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");
if(!b){var e=this._uiHash();if(this._trigger("drag",a,e)===!1)return this._mouseUp({}),!1;this.position=e.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return!1},_mouseStop:function(a){var b=!1;d.ui.ddmanager&&!this.options.dropBehaviour&&(b=d.ui.ddmanager.drop(this,a));if(this.dropped)b=this.dropped,this.dropped=
!1;if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return!1;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===!0||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var e=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){e._trigger("stop",a)!==!1&&e._clear()})}else this._trigger("stop",a)!==!1&&this._clear();return!1},_mouseUp:function(a){this.options.iframeFix===
!0&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?!0:!1;d(this.options.handle,this.element).find("*").andSelf().each(function(){this==a.target&&(b=!0)});return b},_createHelper:function(a){var b=
this.options,a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){typeof a=="string"&&(a=a.split(" "));d.isArray(a)&&(a={left:+a[0],top:+a[1]||0});if("left"in a)this.offset.click.left=
a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+=
this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),
10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},
_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-
this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var a=d(a.containment),b=a[0];if(b){a.offset();var e=d(b).css("overflow")!="hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),
10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(e?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==
Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;var e=a=="absolute"?1:-1,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=/(html|body)/i.test(f[0].tagName);return{top:b.top+this.offset.relative.top*e+this.offset.parent.top*e-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
h?0:f.scrollTop())*e),left:b.left+this.offset.relative.left*e+this.offset.parent.left*e-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:f.scrollLeft())*e)}},_generatePosition:function(a){var b=this.options,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName),h=a.pageX,g=a.pageY;
if(this.originalPosition){var i;if(this.containment)this.relative_container?(i=this.relative_container.offset(),i=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):i=this.containment,a.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),a.pageY-this.offset.click.top<i[1]&&(g=i[1]+this.offset.click.top),a.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),a.pageY-this.offset.click.top>i[3]&&(g=i[3]+this.offset.click.top);
b.grid&&(g=b.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY,g=i?!(g-this.offset.click.top<i[1]||g-this.offset.click.top>i[3])?g:!(g-this.offset.click.top<i[1])?g-b.grid[1]:g+b.grid[1]:g,h=b.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/b.grid[0])*b.grid[0]:this.originalPageX,h=i?!(h-this.offset.click.left<i[0]||h-this.offset.click.left>i[2])?h:!(h-this.offset.click.left<i[0])?h-b.grid[0]:h+b.grid[0]:h)}return{top:g-this.offset.click.top-
this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop()),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=
this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1},_trigger:function(a,b,e){e=e||this._uiHash();d.ui.plugin.call(this,a,[b,e]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,e)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.16"});d.ui.plugin.add("draggable",
"connectToSortable",{start:function(a,b){var e=d(this).data("draggable"),f=e.options,h=d.extend({},b,{item:e.element});e.sortables=[];d(f.connectToSortable).each(function(){var b=d.data(this,"sortable");b&&!b.options.disabled&&(e.sortables.push({instance:b,shouldRevert:b.options.revert}),b.refreshPositions(),b._trigger("activate",a,h))})},stop:function(a,b){var e=d(this).data("draggable"),f=d.extend({},b,{item:e.element});d.each(e.sortables,function(){if(this.instance.isOver){this.instance.isOver=
0;e.cancelHelperRemoval=!0;this.instance.cancelHelperRemoval=!1;if(this.shouldRevert)this.instance.options.revert=!0;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;e.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",a,f)})},drag:function(a,b){var e=d(this).data("draggable"),f=this;d.each(e.sortables,function(){this.instance.positionAbs=e.positionAbs;
this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver)this.instance.isOver=1,this.instance.currentItem=d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return b.helper[0]},a.target=this.instance.currentItem[0],this.instance._mouseCapture(a,
!0),this.instance._mouseStart(a,!0,!0),this.instance.offset.click.top=e.offset.click.top,this.instance.offset.click.left=e.offset.click.left,this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top,e._trigger("toSortable",a),e.dropped=this.instance.element,e.currentItem=e.element,this.instance.fromOutside=e;this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver)this.instance.isOver=
0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",a,this.instance._uiHash(this.instance)),this.instance._mouseStop(a,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),e._trigger("fromSortable",a),e.dropped=!1})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=
a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){var e=d(b.helper),f=d(this).data("draggable").options;if(e.css("opacity"))f._opacity=e.css("opacity");e.css("opacity",f.opacity)},stop:function(a,b){var e=d(this).data("draggable").options;e._opacity&&d(b.helper).css("opacity",e._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=
d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),e=b.options,f=!1;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<e.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+e.scrollSpeed;else if(a.pageY-b.overflowOffset.top<e.scrollSensitivity)b.scrollParent[0].scrollTop=
f=b.scrollParent[0].scrollTop-e.scrollSpeed;if(!e.axis||e.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<e.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+e.scrollSpeed;else if(a.pageX-b.overflowOffset.left<e.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-e.scrollSpeed}else{if(!e.axis||e.axis!="x")a.pageY-d(document).scrollTop()<e.scrollSensitivity?f=d(document).scrollTop(d(document).scrollTop()-e.scrollSpeed):
d(window).height()-(a.pageY-d(document).scrollTop())<e.scrollSensitivity&&(f=d(document).scrollTop(d(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")a.pageX-d(document).scrollLeft()<e.scrollSensitivity?f=d(document).scrollLeft(d(document).scrollLeft()-e.scrollSpeed):d(window).width()-(a.pageX-d(document).scrollLeft())<e.scrollSensitivity&&(f=d(document).scrollLeft(d(document).scrollLeft()+e.scrollSpeed))}f!==!1&&d.ui.ddmanager&&!e.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});
d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var b=d(this),f=b.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var e=d(this).data("draggable"),f=e.options,h=f.snapTolerance,g=b.offset.left,i=g+e.helperProportions.width,j=b.offset.top,k=j+e.helperProportions.height,
l=e.snapElements.length-1;l>=0;l--){var m=e.snapElements[l].left,o=m+e.snapElements[l].width,p=e.snapElements[l].top,n=p+e.snapElements[l].height;if(m-h<g&&g<o+h&&p-h<j&&j<n+h||m-h<g&&g<o+h&&p-h<k&&k<n+h||m-h<i&&i<o+h&&p-h<j&&j<n+h||m-h<i&&i<o+h&&p-h<k&&k<n+h){if(f.snapMode!="inner"){var r=Math.abs(p-k)<=h,u=Math.abs(n-j)<=h,x=Math.abs(m-i)<=h,q=Math.abs(o-g)<=h;if(r)b.position.top=e._convertPositionTo("relative",{top:p-e.helperProportions.height,left:0}).top-e.margins.top;if(u)b.position.top=e._convertPositionTo("relative",
{top:n,left:0}).top-e.margins.top;if(x)b.position.left=e._convertPositionTo("relative",{top:0,left:m-e.helperProportions.width}).left-e.margins.left;if(q)b.position.left=e._convertPositionTo("relative",{top:0,left:o}).left-e.margins.left}var w=r||u||x||q;if(f.snapMode!="outer"){r=Math.abs(p-j)<=h;u=Math.abs(n-k)<=h;x=Math.abs(m-g)<=h;q=Math.abs(o-i)<=h;if(r)b.position.top=e._convertPositionTo("relative",{top:p,left:0}).top-e.margins.top;if(u)b.position.top=e._convertPositionTo("relative",{top:n-e.helperProportions.height,
left:0}).top-e.margins.top;if(x)b.position.left=e._convertPositionTo("relative",{top:0,left:m}).left-e.margins.left;if(q)b.position.left=e._convertPositionTo("relative",{top:0,left:o-e.helperProportions.width}).left-e.margins.left}!e.snapElements[l].snapping&&(r||u||x||q||w)&&e.options.snap.snap&&e.options.snap.snap.call(e.element,a,d.extend(e._uiHash(),{snapItem:e.snapElements[l].item}));e.snapElements[l].snapping=r||u||x||q||w}else e.snapElements[l].snapping&&e.options.snap.release&&e.options.snap.release.call(e.element,
a,d.extend(e._uiHash(),{snapItem:e.snapElements[l].item})),e.snapElements[l].snapping=!1}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options,a=d.makeArray(d(a.stack)).sort(function(a,b){return(parseInt(d(a).css("zIndex"),10)||0)-(parseInt(d(b).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(a){this.style.zIndex=b+a});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,
b){var e=d(b.helper),f=d(this).data("draggable").options;if(e.css("zIndex"))f._zIndex=e.css("zIndex");e.css("zIndex",f.zIndex)},stop:function(a,b){var e=d(this).data("draggable").options;e._zIndex&&d(b.helper).css("zIndex",e._zIndex)}})})(jQuery);
(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(a){return a.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this);
a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(a){return a.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&
this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(b&&(b.currentItem||b.element)[0]!=this.element[0])if(this.accept.call(this.element[0],b.currentItem||b.element))this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",
a,this.ui(b))},_out:function(a){var b=d.ui.ddmanager.current;if(b&&(b.currentItem||b.element)[0]!=this.element[0])if(this.accept.call(this.element[0],b.currentItem||b.element))this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",a,this.ui(b))},_drop:function(a,b){var e=b||d.ui.ddmanager.current;if(!e||(e.currentItem||e.element)[0]==this.element[0])return!1;var f=!1;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var a=d.data(this,
"droppable");if(a.options.greedy&&!a.options.disabled&&a.options.scope==e.options.scope&&a.accept.call(a.element[0],e.currentItem||e.element)&&d.ui.intersect(e,d.extend(a,{offset:a.element.offset()}),a.options.tolerance))return f=!0,!1});return f?!1:this.accept.call(this.element[0],e.currentItem||e.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",a,this.ui(e)),this.element):
!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.16"});d.ui.intersect=function(a,b,e){if(!b.offset)return!1;var f=(a.positionAbs||a.position.absolute).left,h=f+a.helperProportions.width,g=(a.positionAbs||a.position.absolute).top,i=g+a.helperProportions.height,j=b.offset.left,k=j+b.proportions.width,l=b.offset.top,m=l+b.proportions.height;switch(e){case "fit":return j<=f&&h<=k&&l<=g&&i<=m;
case "intersect":return j<f+a.helperProportions.width/2&&h-a.helperProportions.width/2<k&&l<g+a.helperProportions.height/2&&i-a.helperProportions.height/2<m;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,l,j,b.proportions.height,b.proportions.width);case "touch":return(g>=l&&g<=m||i>=l&&i<=m||g<l&&i>m)&&(f>=j&&f<=k||h>=j&&h<=k||f<j&&h>k);default:return!1}};
d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var e=d.ui.ddmanager.droppables[a.options.scope]||[],f=b?b.type:null,h=(a.currentItem||a.element).find(":data(droppable)").andSelf(),g=0;a:for(;g<e.length;g++)if(!(e[g].options.disabled||a&&!e[g].accept.call(e[g].element[0],a.currentItem||a.element))){for(var i=0;i<h.length;i++)if(h[i]==e[g].element[0]){e[g].proportions.height=0;continue a}e[g].visible=e[g].element.css("display")!="none";if(e[g].visible)f=="mousedown"&&
e[g]._activate.call(e[g],b),e[g].offset=e[g].element.offset(),e[g].proportions={width:e[g].element[0].offsetWidth,height:e[g].element[0].offsetHeight}}},drop:function(a,b){var e=!1;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options&&(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance)&&(e=e||this._drop.call(this,b)),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||a.element)))this.isout=1,this.isover=
0,this._deactivate.call(this,b)});return e},dragStart:function(a,b){a.element.parents(":not(body,html)").bind("scroll.droppable",function(){a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)})},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var e=d.ui.intersect(a,this,this.options.tolerance);if(e=!e&&this.isover==1?"isout":e&&this.isover==
0?"isover":null){var f;if(this.options.greedy){var h=this.element.parents(":data(droppable):eq(0)");if(h.length)f=d.data(h[0],"droppable"),f.greedyChild=e=="isover"?1:0}if(f&&e=="isover")f.isover=0,f.isout=1,f._out.call(f,b);this[e]=1;this[e=="isout"?"isover":"isout"]=0;this[e=="isover"?"_over":"_out"].call(this,b);if(f&&e=="isout")f.isout=0,f.isover=1,f._over.call(f,b)}}})},dragStop:function(a,b){a.element.parents(":not(body,html)").unbind("scroll.droppable");a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,
b)}}})(jQuery);
(function(d){d.widget("ui.panel",{options:{event:"click",collapsible:!0,collapseType:"default",collapsed:!1,accordion:!1,collapseSpeed:"fast",draggable:!1,trueVerticalText:!0,vHeight:"220px",stackable:!0,width:"auto",controls:!1,cookie:null,widgetClass:"ui-helper-reset ui-widget ui-panel",headerClass:"ui-helper-reset ui-widget-header ui-panel-header ui-corner-top",contentClass:"ui-helper-reset ui-widget-content ui-panel-content ui-corner-bottom",contentTextClass:"ui-panel-content-text",rightboxClass:"ui-panel-rightbox",
controlsClass:"ui-panel-controls",titleClass:"ui-panel-title",titleTextClass:"ui-panel-title-text",iconClass:"ui-icon",hoverClass:"ui-state-hover",collapsePnlClass:"ui-panel-clps-pnl",headerIconClpsd:"ui-icon-triangle-1-e",headerIcon:"ui-icon-triangle-1-s",slideRIconClpsd:"ui-icon-arrowthickstop-1-w",slideRIcon:"ui-icon-arrowthickstop-1-e",slideLIconClpsd:"ui-icon-arrowthickstop-1-e",slideLIcon:"ui-icon-arrowthickstop-1-w"},_init:function(){this._panelize()},_panelize:function(){if(this.element.is("div")){var a=
this,b=this.options;this.panelBox=this.element;b.width=="auto"?b.width=this.panelBox.css("width"):this.panelBox.css("width",b.width);this.panelBox.attr("role","panel");b.id=this.panelBox.attr("id");this.headerBox=this.element.children(":first");this.contentBox=this.element.children().eq(1);b.content=this.contentBox.html();this.contentBox.wrapInner("<div/>");this.contentTextBox=this.contentBox.children(":first").addClass(b.contentTextClass);this.headerBox.wrapInner("<div><span/></div>");this.titleBox=
this.headerBox.children(":first");this.titleTextBox=this.titleBox.children(":first");this.titleText=this.titleTextBox.html();this.headerBox.prepend("<span/>");this.rightBox=this.headerBox.children(":first").addClass(b.rightboxClass);b.controls!=!1?(this.rightBox.append("<span/>"),this.controlsBox=this.rightBox.children(":first").addClass(b.controlsClass).html(b.controls)):this.controlsBox=null;this.panelBox.addClass(b.widgetClass);this.headerBox.addClass(b.headerClass);this.titleBox.addClass(b.titleClass);
this.titleTextBox.addClass(b.titleTextClass);this.contentBox.addClass(b.contentClass);if(b.collapsible){switch(b.collapseType){case "slide-right":var e=0;b.controls&&(e=1);this.rightBox.append("<span><span/></span>");this.collapsePanel=this.rightBox.children().eq(e).addClass(b.collapsePnlClass);this.collapseButton=this.collapsePanel.children(":first").addClass(b.slideRIcon);this.iconBtnClpsd=b.slideRIconClpsd;this.iconBtn=b.slideRIcon;this.ctrlBox=this.controlsBox;break;case "slide-left":this.headerBox.prepend("<span><span/></span>");
this.collapsePanel=this.headerBox.children(":first").addClass(b.collapsePnlClass);this.collapseButton=this.collapsePanel.children(":first").addClass(b.slideLIcon);this.iconBtnClpsd=b.slideLIconClpsd;this.iconBtn=b.slideLIcon;this.ctrlBox=this.rightBox;break;default:this.headerBox.prepend("<span><span/></span>"),this.collapseButton=this.headerBox.children(":first").addClass(b.headerIcon),this.iconBtnClpsd=b.headerIconClpsd,this.iconBtn=b.headerIcon,this.ctrlBox=this.controlsBox}this._buttonHover(this.collapseButton);
this.collapseButton.addClass(b.iconClass);b.event&&(this.collapseButton.bind(b.event+".panel",function(d){return a._clickHandler.call(a,d,this)}),this.titleTextBox.bind(b.event+".panel",function(d){return a._clickHandler.call(a,d,this)}));if(b.accordion)b.collapsed=!0,b.trueVerticalText=!1;if(b.cookie)b.collapsed=a._cookie()==0?!1:!0;this.panelBox.data("collapsed",b.collapsed);if(b.stackable&&d.inArray(b.collapseType,["slide-right","slide-left"])>-1){this.panelDock=this.panelBox.siblings("div[role=panelDock]:first");
this.panelFrame=this.panelBox.siblings("div[role=panelFrame]:first");if(this.panelDock.length==0)this.panelDock=this.panelBox.parent(0).prepend("<div>").children(":first"),this.panelFrame=this.panelDock.after("<div>").next(":first"),this.panelDock.attr("role","panelDock").css("float",b.collapseType=="slide-left"?"left":"right"),this.panelFrame.attr("role","panelFrame").css({"float":b.collapseType=="slide-left"?"left":"right",overflow:"hidden"});b.collapsed?this.panelDock.append(this.panelBox):this.panelFrame.append(this.panelBox)}b.collapsed&&
a.toggle(0,!0)}else this.titleTextBox.css("cursor","default");!b.accordion&&b.draggable&&d.fn.draggable&&this._makeDraggable();this.panelBox.show()}},_cookie:function(){var a=this.cookie||(this.cookie=this.options.cookie.name||"ui-panel-"+this.options.id);return d.cookie.apply(null,[a].concat(d.makeArray(arguments)))},_makeDraggable:function(){this.panelBox.draggable({containment:"document",handle:".ui-panel-header",cancel:".ui-panel-content",cursor:"move"});this.contentBox.css("position","absolute")},
_clickHandler:function(){var a=this.options;if(a.disabled)return!1;this.toggle(a.collapseSpeed);return!1},toggle:function(a,b){var e=this.options,f=this.panelBox,h=this.contentBox,g=this.headerBox,i=this.titleTextBox,j=this.titleText,k=this.ctrlBox,l=this.panelDock,m="";jQuery.support.leadingWhitespace||(m="-ie");h.css("display")=="none"?this._trigger("unfold"):this._trigger("fold");k&&k.toggle(0);e.collapseType=="default"?a==0?(k&&k.hide(),h.hide()):h.slideToggle(a):(a==0?(e.collapsed=!1,k&&k.hide(),
h.hide()):h.toggle(),e.collapsed==!1?(e.trueVerticalText?(g.toggleClass("ui-panel-vtitle").css("height",e.vHeight),m==""&&(h="height:"+(parseInt(e.vHeight)-50)+"px;width:100%;position:absolute;bottom:0;left:0;",i.empty().append('<div style="'+h+'z-index:3;"></div><object style="'+h+'z-index:2;" type="image/svg+xml" data="data:image/svg+xml;charset=utf-8,<svg xmlns=\'http://www.w3.org/2000/svg\'><text x=\'-'+(parseInt(e.vHeight)-60)+"px' y='16px' style='font-weight:"+i.css("font-weight")+";font-family:"+
i.css("font-family").replace(/"/g,"")+";font-size:"+i.css("font-size")+";fill:"+i.css("color")+";' transform='rotate(-90)' text-rendering='optimizeSpeed'>"+j+'</text></svg>"></object>').css("height",e.vHeight)),i.toggleClass("ui-panel-vtext"+m)):(g.attr("align","center"),i.html(i.text().replace(/(.)/g,"$1<BR>"))),f.animate({width:"2.4em"},a),e.stackable&&(b?l.append(f):l.prepend(f))):(e.stackable&&this.panelFrame.append(f),e.trueVerticalText?(g.toggleClass("ui-panel-vtitle").css("height","auto"),
i.empty().append(j),i.toggleClass("ui-panel-vtext"+m)):(g.attr("align","left"),i.html(i.text().replace(/<BR>/g," "))),f.animate({width:e.width},a)));if((a!=0||e.trueVerticalText)&&e.cookie==null||!b&&e.cookie!=null)e.collapsed=!e.collapsed;this.panelBox.data("collapsed",e.collapsed);b||(e.cookie&&this._cookie(Number(e.collapsed),e.cookie),e.accordion&&d("."+e.accordion+"[role='panel'][id!='"+e.id+"']:not(:data(collapsed))").panel("toggle",a,!0));this.collapseButton.toggleClass(this.iconBtnClpsd).toggleClass(this.iconBtn);
g.toggleClass("ui-corner-all")},content:function(a){this.contentTextBox.html(a)},destroy:function(){var a=this.options;this.headerBox.html(this.titleText).removeAttr("align").removeAttr("style").removeClass("ui-panel-vtitle ui-corner-all "+a.headerClass);this.contentBox.removeClass(a.contentClass).removeAttr("style").html(a.content);this.panelBox.removeAttr("role").removeAttr("style").removeData("collapsed").unbind(".panel").removeClass(a.widgetClass);a.stackable&&d.inArray(a.collapseType,["slide-right",
"slide-left"])>-1&&(this.panelDock.before(this.panelBox),this.panelDock.children("div[role=panel]").length==0&&this.panelFrame.children("div[role=panel]").length==0&&(this.panelDock.remove(),this.panelFrame.remove()));a.cookie&&this._cookie(null,a.cookie);return this},_buttonHover:function(a){var b=this.options;a.bind({mouseover:function(){d(this).addClass(b.hoverClass)},mouseout:function(){d(this).removeClass(b.hoverClass)}})}});d.extend(d.ui.panel,{version:"0.6"})})(jQuery);
(function(d){d.ui=d.ui||{};var a=/left|center|right/,b=/top|center|bottom/,e=d.fn.position,f=d.fn.offset;d.fn.position=function(f){if(!f||!f.of)return e.apply(this,arguments);var f=d.extend({},f),g=d(f.of),i=g[0],j=(f.collision||"flip").split(" "),k=f.offset?f.offset.split(" "):[0,0],l,m,o;i.nodeType===9?(l=g.width(),m=g.height(),o={top:0,left:0}):i.setTimeout?(l=g.width(),m=g.height(),o={top:g.scrollTop(),left:g.scrollLeft()}):i.preventDefault?(f.at="left top",l=m=0,o={top:f.of.pageY,left:f.of.pageX}):
(l=g.outerWidth(),m=g.outerHeight(),o=g.offset());d.each(["my","at"],function(){var d=(f[this]||"").split(" ");d.length===1&&(d=a.test(d[0])?d.concat(["center"]):b.test(d[0])?["center"].concat(d):["center","center"]);d[0]=a.test(d[0])?d[0]:"center";d[1]=b.test(d[1])?d[1]:"center";f[this]=d});j.length===1&&(j[1]=j[0]);k[0]=parseInt(k[0],10)||0;k.length===1&&(k[1]=k[0]);k[1]=parseInt(k[1],10)||0;f.at[0]==="right"?o.left+=l:f.at[0]==="center"&&(o.left+=l/2);f.at[1]==="bottom"?o.top+=m:f.at[1]==="center"&&
(o.top+=m/2);o.left+=k[0];o.top+=k[1];return this.each(function(){var a=d(this),b=a.outerWidth(),e=a.outerHeight(),g=parseInt(d.curCSS(this,"marginLeft",!0))||0,i=parseInt(d.curCSS(this,"marginTop",!0))||0,q=b+g+(parseInt(d.curCSS(this,"marginRight",!0))||0),w=e+i+(parseInt(d.curCSS(this,"marginBottom",!0))||0),s=d.extend({},o),v;f.my[0]==="right"?s.left-=b:f.my[0]==="center"&&(s.left-=b/2);f.my[1]==="bottom"?s.top-=e:f.my[1]==="center"&&(s.top-=e/2);s.left=Math.round(s.left);s.top=Math.round(s.top);
v={left:s.left-g,top:s.top-i};d.each(["left","top"],function(a,g){if(d.ui.position[j[a]])d.ui.position[j[a]][g](s,{targetWidth:l,targetHeight:m,elemWidth:b,elemHeight:e,collisionPosition:v,collisionWidth:q,collisionHeight:w,offset:k,my:f.my,at:f.at})});d.fn.bgiframe&&a.bgiframe();a.offset(d.extend(s,{using:f.using}))})};d.ui.position={fit:{left:function(a,b){var e=d(window),e=b.collisionPosition.left+b.collisionWidth-e.width()-e.scrollLeft();a.left=e>0?a.left-e:Math.max(a.left-b.collisionPosition.left,
a.left)},top:function(a,b){var e=d(window),e=b.collisionPosition.top+b.collisionHeight-e.height()-e.scrollTop();a.top=e>0?a.top-e:Math.max(a.top-b.collisionPosition.top,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var e=d(window),e=b.collisionPosition.left+b.collisionWidth-e.width()-e.scrollLeft(),f=b.my[0]==="left"?-b.elemWidth:b.my[0]==="right"?b.elemWidth:0,k=b.at[0]==="left"?b.targetWidth:-b.targetWidth,l=-2*b.offset[0];a.left+=b.collisionPosition.left<0?f+k+l:e>0?f+k+l:0}},top:function(a,
b){if(b.at[1]!=="center"){var e=d(window),e=b.collisionPosition.top+b.collisionHeight-e.height()-e.scrollTop(),f=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,k=b.at[1]==="top"?b.targetHeight:-b.targetHeight,l=-2*b.offset[1];a.top+=b.collisionPosition.top<0?f+k+l:e>0?f+k+l:0}}}};if(!d.offset.setOffset)d.offset.setOffset=function(a,b){if(/static/.test(d.curCSS(a,"position")))a.style.position="relative";var e=d(a),f=e.offset(),k=parseInt(d.curCSS(a,"top",!0),10)||0,l=parseInt(d.curCSS(a,
"left",!0),10)||0,f={top:b.top-f.top+k,left:b.left-f.left+l};"using"in b?b.using.call(a,f):e.css(f)},d.fn.offset=function(a){var b=this[0];return!b||!b.ownerDocument?null:a?this.each(function(){d.offset.setOffset(this,a)}):f.call(this)}})(jQuery);
(function(d,a){d.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=d("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove();d.Widget.prototype.destroy.apply(this,arguments)},value:function(d){if(d===a)return this._value();this._setOption("value",d);return this},_setOption:function(a,e){if(a==="value")this.options.value=e,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete");d.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;typeof a!=="number"&&(a=0);return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*
this._value()/this.options.max},_refreshValue:function(){var a=this.value(),d=this._percentage();if(this.oldValue!==a)this.oldValue=a,this._trigger("change");this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(d.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});d.extend(d.ui.progressbar,{version:"1.8.16"})})(jQuery);
(function(d){d.widget("ui.resizable",d.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var a=this,b=this.options;this.element.addClass("ui-resizable");d.extend(this,{_aspectRatio:!!b.aspectRatio,aspectRatio:b.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],
_helper:b.helper||b.ghost||b.animate?b.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i))/relative/.test(this.element.css("position"))&&d.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"}),this.element.wrap(d('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),
this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize",
"none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize();this.handles=b.handles||(!d(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles==
"all")this.handles="n,e,s,w,se,sw,ne,nw";var h=this.handles.split(",");this.handles={};for(var g=0;g<h.length;g++){var i=d.trim(h[g]),j=d('<div class="ui-resizable-handle ui-resizable-'+i+'"></div>');/sw|se|ne|nw/.test(i)&&j.css({zIndex:++b.zIndex});"se"==i&&j.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[i]=".ui-resizable-"+i;this.element.append(j)}}this._renderAxis=function(a){var a=a||this.element,b;for(b in this.handles){this.handles[b].constructor==String&&(this.handles[b]=d(this.handles[b],
this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var e=d(this.handles[b],this.element),f=0,f=/sw|ne|nw|se|n|s/.test(b)?e.outerHeight():e.outerWidth(),e=["padding",/ne|nw|n/.test(b)?"Top":/se|sw|s/.test(b)?"Bottom":/^e$/.test(b)?"Right":"Left"].join("");a.css(e,f);this._proportionallyResize()}d(this.handles[b])}};this._renderAxis(this.element);this._handles=d(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!a.resizing){if(this.className)var d=
this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);a.axis=d&&d[1]?d[1]:"se"}});b.autoHide&&(this._handles.hide(),d(this.element).addClass("ui-resizable-autohide").hover(function(){b.disabled||(d(this).removeClass("ui-resizable-autohide"),a._handles.show())},function(){!b.disabled&&!a.resizing&&(d(this).addClass("ui-resizable-autohide"),a._handles.hide())}));this._mouseInit()},destroy:function(){this._mouseDestroy();var a=function(a){d(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
if(this.elementIsWrapper){a(this.element);var b=this.element;b.after(this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);a(this.originalElement);return this},_mouseCapture:function(a){var b=!1,h;for(h in this.handles)d(this.handles[h])[0]==a.target&&(b=!0);return!this.options.disabled&&b},_mouseStart:function(b){var f=this.options,h=this.element.position(),
g=this.element;this.resizing=!0;this.documentScroll={top:d(document).scrollTop(),left:d(document).scrollLeft()};(g.is(".ui-draggable")||/absolute/.test(g.css("position")))&&g.css({position:"absolute",top:h.top,left:h.left});d.browser.opera&&/relative/.test(g.css("position"))&&g.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();var h=a(this.helper.css("left")),i=a(this.helper.css("top"));f.containment&&(h+=d(f.containment).scrollLeft()||0,i+=d(f.containment).scrollTop()||0);this.offset=
this.helper.offset();this.position={left:h,top:i};this.size=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalPosition={left:h,top:i};this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof f.aspectRatio=="number"?f.aspectRatio:
this.originalSize.width/this.originalSize.height||1;f=d(".ui-resizable-"+this.axis).css("cursor");d("body").css("cursor",f=="auto"?this.axis+"-resize":f);g.addClass("ui-resizable-resizing");this._propagate("start",b);return!0},_mouseDrag:function(a){var d=this.helper,b=this.originalMousePosition,g=this._change[this.axis];if(!g)return!1;b=g.apply(this,[a,a.pageX-b.left||0,a.pageY-b.top||0]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)b=this._updateRatio(b,a);b=this._respectSize(b,
a);this._propagate("resize",a);d.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(b);this._trigger("resize",a,this.ui());return!1},_mouseStop:function(a){this.resizing=!1;var b=this.options;if(this._helper){var h=this._proportionallyResizeElements,g=h.length&&/textarea/i.test(h[0].nodeName),h=g&&d.ui.hasScroll(h[0],"left")?0:
this.sizeDiff.height,g=g?0:this.sizeDiff.width,g={width:this.helper.width()-g,height:this.helper.height()-h},h=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,i=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;b.animate||this.element.css(d.extend(g,{top:i,left:h}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!b.animate&&this._proportionallyResize()}d("body").css("cursor","auto");
this.element.removeClass("ui-resizable-resizing");this._propagate("stop",a);this._helper&&this.helper.remove();return!1},_updateVirtualBoundaries:function(a){var d=this.options,h,g,i,d={minWidth:b(d.minWidth)?d.minWidth:0,maxWidth:b(d.maxWidth)?d.maxWidth:Infinity,minHeight:b(d.minHeight)?d.minHeight:0,maxHeight:b(d.maxHeight)?d.maxHeight:Infinity};if(this._aspectRatio||a){a=d.minHeight*this.aspectRatio;g=d.minWidth/this.aspectRatio;h=d.maxHeight*this.aspectRatio;i=d.maxWidth/this.aspectRatio;if(a>
d.minWidth)d.minWidth=a;if(g>d.minHeight)d.minHeight=g;if(h<d.maxWidth)d.maxWidth=h;if(i<d.maxHeight)d.maxHeight=i}this._vBoundaries=d},_updateCache:function(a){this.offset=this.helper.offset();if(b(a.left))this.position.left=a.left;if(b(a.top))this.position.top=a.top;if(b(a.height))this.size.height=a.height;if(b(a.width))this.size.width=a.width},_updateRatio:function(a){var d=this.position,h=this.size,g=this.axis;if(b(a.height))a.width=a.height*this.aspectRatio;else if(b(a.width))a.height=a.width/
this.aspectRatio;if(g=="sw")a.left=d.left+(h.width-a.width),a.top=null;if(g=="nw")a.top=d.top+(h.height-a.height),a.left=d.left+(h.width-a.width);return a},_respectSize:function(a){var d=this._vBoundaries,h=this.axis,g=b(a.width)&&d.maxWidth&&d.maxWidth<a.width,i=b(a.height)&&d.maxHeight&&d.maxHeight<a.height,j=b(a.width)&&d.minWidth&&d.minWidth>a.width,k=b(a.height)&&d.minHeight&&d.minHeight>a.height;if(j)a.width=d.minWidth;if(k)a.height=d.minHeight;if(g)a.width=d.maxWidth;if(i)a.height=d.maxHeight;
var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,o=/sw|nw|w/.test(h),h=/nw|ne|n/.test(h);if(j&&o)a.left=l-d.minWidth;if(g&&o)a.left=l-d.maxWidth;if(k&&h)a.top=m-d.minHeight;if(i&&h)a.top=m-d.maxHeight;if((d=!a.width&&!a.height)&&!a.left&&a.top)a.top=null;else if(d&&!a.top&&a.left)a.left=null;return a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a=this.helper||this.element,b=0;b<this._proportionallyResizeElements.length;b++){var h=
this._proportionallyResizeElements[b];if(!this.borderDif){var g=[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],i=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];this.borderDif=d.map(g,function(a,d){var b=parseInt(a,10)||0,e=parseInt(i[d],10)||0;return b+e})}if(!d.browser.msie||!d(a).is(":hidden")&&!d(a).parents(":hidden").length)h.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-
this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var a=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||d('<div style="overflow:hidden;"></div>');var b=d.browser.msie&&d.browser.version<7,h=b?1:0,b=b?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+b,height:this.element.outerHeight()+b,position:"absolute",left:this.elementOffset.left-h+"px",top:this.elementOffset.top-h+"px",zIndex:++a.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=
this.element},_change:{e:function(a,d){return{width:this.originalSize.width+d}},w:function(a,d){return{left:this.originalPosition.left+d,width:this.originalSize.width-d}},n:function(a,d,b){return{top:this.originalPosition.top+b,height:this.originalSize.height-b}},s:function(a,d,b){return{height:this.originalSize.height+b}},se:function(a,b,h){return d.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[a,b,h]))},sw:function(a,b,h){return d.extend(this._change.s.apply(this,arguments),
this._change.w.apply(this,[a,b,h]))},ne:function(a,b,h){return d.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[a,b,h]))},nw:function(a,b,h){return d.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,b,h]))}},_propagate:function(a,b){d.ui.plugin.call(this,a,[b,this.ui()]);a!="resize"&&this._trigger(a,b,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,
originalSize:this.originalSize,originalPosition:this.originalPosition}}});d.extend(d.ui.resizable,{version:"1.8.16"});d.ui.plugin.add("resizable","alsoResize",{start:function(){var a=d(this).data("resizable").options,b=function(a){d(a).each(function(){var a=d(this);a.data("resizable-alsoresize",{width:parseInt(a.width(),10),height:parseInt(a.height(),10),left:parseInt(a.css("left"),10),top:parseInt(a.css("top"),10),position:a.css("position")})})};typeof a.alsoResize=="object"&&!a.alsoResize.parentNode?
a.alsoResize.length?(a.alsoResize=a.alsoResize[0],b(a.alsoResize)):d.each(a.alsoResize,function(a){b(a)}):b(a.alsoResize)},resize:function(a,b){var h=d(this).data("resizable"),g=h.options,i=h.originalSize,j=h.originalPosition,k={height:h.size.height-i.height||0,width:h.size.width-i.width||0,top:h.position.top-j.top||0,left:h.position.left-j.left||0},l=function(a,e){d(a).each(function(){var a=d(this),g=d(this).data("resizable-alsoresize"),i={},m=e&&e.length?e:a.parents(b.originalElement[0]).length?
["width","height"]:["width","height","top","left"];d.each(m,function(a,d){var b=(g[d]||0)+(k[d]||0);b&&b>=0&&(i[d]=b||null)});if(d.browser.opera&&/relative/.test(a.css("position")))h._revertToRelativePosition=!0,a.css({position:"absolute",top:"auto",left:"auto"});a.css(i)})};typeof g.alsoResize=="object"&&!g.alsoResize.nodeType?d.each(g.alsoResize,function(a,d){l(a,d)}):l(g.alsoResize)},stop:function(){var a=d(this).data("resizable"),b=a.options,h=function(a){d(a).each(function(){var a=d(this);a.css({position:a.data("resizable-alsoresize").position})})};
if(a._revertToRelativePosition)a._revertToRelativePosition=!1,typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?d.each(b.alsoResize,function(a){h(a)}):h(b.alsoResize);d(this).removeData("resizable-alsoresize")}});d.ui.plugin.add("resizable","animate",{stop:function(a){var b=d(this).data("resizable"),h=b.options,g=b._proportionallyResizeElements,i=g.length&&/textarea/i.test(g[0].nodeName),j=i&&d.ui.hasScroll(g[0],"left")?0:b.sizeDiff.height,i={width:b.size.width-(i?0:b.sizeDiff.width),height:b.size.height-
j},j=parseInt(b.element.css("left"),10)+(b.position.left-b.originalPosition.left)||null,k=parseInt(b.element.css("top"),10)+(b.position.top-b.originalPosition.top)||null;b.element.animate(d.extend(i,k&&j?{top:k,left:j}:{}),{duration:h.animateDuration,easing:h.animateEasing,step:function(){var h={width:parseInt(b.element.css("width"),10),height:parseInt(b.element.css("height"),10),top:parseInt(b.element.css("top"),10),left:parseInt(b.element.css("left"),10)};g&&g.length&&d(g[0]).css({width:h.width,
height:h.height});b._updateCache(h);b._propagate("resize",a)}})}});d.ui.plugin.add("resizable","containment",{start:function(){var b=d(this).data("resizable"),f=b.element,h=b.options.containment;if(f=h instanceof d?h.get(0):/parent/.test(h)?f.parent().get(0):h)if(b.containerElement=d(f),/document/.test(h)||h==document)b.containerOffset={left:0,top:0},b.containerPosition={left:0,top:0},b.parentData={element:d(document),left:0,top:0,width:d(document).width(),height:d(document).height()||document.body.parentNode.scrollHeight};
else{var g=d(f),i=[];d(["Top","Right","Left","Bottom"]).each(function(d,b){i[d]=a(g.css("padding"+b))});b.containerOffset=g.offset();b.containerPosition=g.position();b.containerSize={height:g.innerHeight()-i[3],width:g.innerWidth()-i[1]};var h=b.containerOffset,j=b.containerSize.height,k=b.containerSize.width,k=d.ui.hasScroll(f,"left")?f.scrollWidth:k,j=d.ui.hasScroll(f)?f.scrollHeight:j;b.parentData={element:f,left:h.left,top:h.top,width:k,height:j}}},resize:function(a){var b=d(this).data("resizable"),
h=b.options,g=b.containerOffset,i=b.position,a=b._aspectRatio||a.shiftKey,j={top:0,left:0},k=b.containerElement;k[0]!=document&&/static/.test(k.css("position"))&&(j=g);if(i.left<(b._helper?g.left:0)){b.size.width+=b._helper?b.position.left-g.left:b.position.left-j.left;if(a)b.size.height=b.size.width/h.aspectRatio;b.position.left=h.helper?g.left:0}if(i.top<(b._helper?g.top:0)){b.size.height+=b._helper?b.position.top-g.top:b.position.top;if(a)b.size.width=b.size.height*h.aspectRatio;b.position.top=
b._helper?g.top:0}b.offset.left=b.parentData.left+b.position.left;b.offset.top=b.parentData.top+b.position.top;h=Math.abs((b._helper?b.offset.left-j.left:b.offset.left-j.left)+b.sizeDiff.width);g=Math.abs((b._helper?b.offset.top-j.top:b.offset.top-g.top)+b.sizeDiff.height);i=b.containerElement.get(0)==b.element.parent().get(0);j=/relative|absolute/.test(b.containerElement.css("position"));i&&j&&(h-=b.parentData.left);if(h+b.size.width>=b.parentData.width&&(b.size.width=b.parentData.width-h,a))b.size.height=
b.size.width/b.aspectRatio;if(g+b.size.height>=b.parentData.height&&(b.size.height=b.parentData.height-g,a))b.size.width=b.size.height*b.aspectRatio},stop:function(){var a=d(this).data("resizable"),b=a.options,h=a.containerOffset,g=a.containerPosition,i=a.containerElement,j=d(a.helper),k=j.offset(),l=j.outerWidth()-a.sizeDiff.width,j=j.outerHeight()-a.sizeDiff.height;a._helper&&!b.animate&&/relative/.test(i.css("position"))&&d(this).css({left:k.left-g.left-h.left,width:l,height:j});a._helper&&!b.animate&&
/static/.test(i.css("position"))&&d(this).css({left:k.left-g.left-h.left,width:l,height:j})}});d.ui.plugin.add("resizable","ghost",{start:function(){var a=d(this).data("resizable"),b=a.options,h=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:0.25,display:"block",position:"relative",height:h.height,width:h.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof b.ghost=="string"?b.ghost:"");a.ghost.appendTo(a.helper)},resize:function(){var a=d(this).data("resizable");
a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=d(this).data("resizable");a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});d.ui.plugin.add("resizable","grid",{resize:function(){var a=d(this).data("resizable"),b=a.options,h=a.size,g=a.originalSize,i=a.originalPosition,j=a.axis;b.grid=typeof b.grid=="number"?[b.grid,b.grid]:b.grid;var k=Math.round((h.width-g.width)/(b.grid[0]||1))*(b.grid[0]||1),b=Math.round((h.height-g.height)/
(b.grid[1]||1))*(b.grid[1]||1);/^(se|s|e)$/.test(j)?(a.size.width=g.width+k,a.size.height=g.height+b):/^(ne)$/.test(j)?(a.size.width=g.width+k,a.size.height=g.height+b,a.position.top=i.top-b):(/^(sw)$/.test(j)?(a.size.width=g.width+k,a.size.height=g.height+b):(a.size.width=g.width+k,a.size.height=g.height+b,a.position.top=i.top-b),a.position.left=i.left-k)}});var a=function(a){return parseInt(a,10)||0},b=function(a){return!isNaN(parseInt(a,10))}})(jQuery);
(function(d){d.widget("ui.selectable",d.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var a=this;this.element.addClass("ui-selectable");this.dragged=!1;var b;this.refresh=function(){b=d(a.options.filter,a.element[0]);b.each(function(){var a=d(this),b=a.offset();d.data(this,"selectable-item",{element:this,$element:a,left:b.left,top:b.top,right:b.left+a.outerWidth(),bottom:b.top+a.outerHeight(),startselected:!1,selected:a.hasClass("ui-selected"),
selecting:a.hasClass("ui-selecting"),unselecting:a.hasClass("ui-unselecting")})})};this.refresh();this.selectees=b.addClass("ui-selectee");this._mouseInit();this.helper=d("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(a){var b=this;this.opos=[a.pageX,
a.pageY];if(!this.options.disabled){var e=this.options;this.selectees=d(e.filter,this.element[0]);this._trigger("start",a);d(e.appendTo).append(this.helper);this.helper.css({left:a.clientX,top:a.clientY,width:0,height:0});e.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var e=d.data(this,"selectable-item");e.startselected=!0;if(!a.metaKey)e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,b._trigger("unselecting",
a,{unselecting:e.element})});d(a.target).parents().andSelf().each(function(){var e=d.data(this,"selectable-item");if(e){var h=!a.metaKey||!e.$element.hasClass("ui-selected");e.$element.removeClass(h?"ui-unselecting":"ui-selected").addClass(h?"ui-selecting":"ui-unselecting");e.unselecting=!h;e.selecting=h;(e.selected=h)?b._trigger("selecting",a,{selecting:e.element}):b._trigger("unselecting",a,{unselecting:e.element});return!1}})}},_mouseDrag:function(a){var b=this;this.dragged=!0;if(!this.options.disabled){var e=
this.options,f=this.opos[0],h=this.opos[1],g=a.pageX,i=a.pageY;if(f>g)var j=g,g=f,f=j;h>i&&(j=i,i=h,h=j);this.helper.css({left:f,top:h,width:g-f,height:i-h});this.selectees.each(function(){var j=d.data(this,"selectable-item");if(j&&j.element!=b.element[0]){var l=!1;e.tolerance=="touch"?l=!(j.left>g||j.right<f||j.top>i||j.bottom<h):e.tolerance=="fit"&&(l=j.left>f&&j.right<g&&j.top>h&&j.bottom<i);if(l){if(j.selected)j.$element.removeClass("ui-selected"),j.selected=!1;if(j.unselecting)j.$element.removeClass("ui-unselecting"),
j.unselecting=!1;if(!j.selecting)j.$element.addClass("ui-selecting"),j.selecting=!0,b._trigger("selecting",a,{selecting:j.element})}else{if(j.selecting)if(a.metaKey&&j.startselected)j.$element.removeClass("ui-selecting"),j.selecting=!1,j.$element.addClass("ui-selected"),j.selected=!0;else{j.$element.removeClass("ui-selecting");j.selecting=!1;if(j.startselected)j.$element.addClass("ui-unselecting"),j.unselecting=!0;b._trigger("unselecting",a,{unselecting:j.element})}if(j.selected&&!a.metaKey&&!j.startselected)j.$element.removeClass("ui-selected"),
j.selected=!1,j.$element.addClass("ui-unselecting"),j.unselecting=!0,b._trigger("unselecting",a,{unselecting:j.element})}}});return!1}},_mouseStop:function(a){var b=this;this.dragged=!1;d(".ui-unselecting",this.element[0]).each(function(){var e=d.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=!1;e.startselected=!1;b._trigger("unselected",a,{unselected:e.element})});d(".ui-selecting",this.element[0]).each(function(){var e=d.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");
e.selecting=!1;e.selected=!0;e.startselected=!0;b._trigger("selected",a,{selected:e.element})});this._trigger("stop",a);this.helper.remove();return!1}});d.extend(d.ui.selectable,{version:"1.8.16"})})(jQuery);
(function(d){d.widget("ui.selectmenu",{getter:"value",version:"1.8",eventPrefix:"selectmenu",options:{transferClasses:!0,typeAhead:"sequential",style:"dropdown",positionOptions:{my:"left top",at:"left bottom",offset:null},width:null,menuWidth:null,handleWidth:26,maxHeight:null,icons:null,format:null,bgImage:function(){},wrapperElement:"<div />"},_create:function(){var a=this,b=this.options,e=this.element.attr("id")||"ui-selectmenu-"+Math.random().toString(16).slice(2,10);this.ids=[e+"-button",e+"-menu"];
this._safemouseup=!0;this.newelement=d("<a />",{"class":this.widgetBaseClass+" ui-widget ui-state-default ui-corner-all",id:this.ids[0],role:"button",href:"#",tabindex:this.element.attr("disabled")?1:0,"aria-haspopup":!0,"aria-owns":this.ids[1]});this.newelementWrap=d(b.wrapperElement).append(this.newelement).insertAfter(this.element);var f=this.element.attr("tabindex");f&&this.newelement.attr("tabindex",f);this.newelement.data("selectelement",this.element);this.selectmenuIcon=d('<span class="'+this.widgetBaseClass+
'-icon ui-icon"></span>').prependTo(this.newelement);this.newelement.prepend('<span class="'+a.widgetBaseClass+'-status" />');d('label[for="'+e+'"]').attr("for",this.ids[0]).bind("click.selectmenu",function(){a.newelement[0].focus();return!1});this.newelement.bind("mousedown.selectmenu",function(d){a._toggle(d,!0);if(b.style=="popup")a._safemouseup=!1,setTimeout(function(){a._safemouseup=!0},300);return!1}).bind("click.selectmenu",function(){return!1}).bind("keydown.selectmenu",function(b){var e=
!1;switch(b.keyCode){case d.ui.keyCode.ENTER:e=!0;break;case d.ui.keyCode.SPACE:a._toggle(b);break;case d.ui.keyCode.UP:b.altKey?a.open(b):a._moveSelection(-1);break;case d.ui.keyCode.DOWN:b.altKey?a.open(b):a._moveSelection(1);break;case d.ui.keyCode.LEFT:a._moveSelection(-1);break;case d.ui.keyCode.RIGHT:a._moveSelection(1);break;case d.ui.keyCode.TAB:e=!0;break;default:e=!0}return e}).bind("keypress.selectmenu",function(b){a._typeAhead(b.which,"mouseup");return!0}).bind("mouseover.selectmenu focus.selectmenu",
function(){b.disabled||d(this).addClass(a.widgetBaseClass+"-focus ui-state-hover")}).bind("mouseout.selectmenu blur.selectmenu",function(){b.disabled||d(this).removeClass(a.widgetBaseClass+"-focus ui-state-hover")});d(document).bind("mousedown.selectmenu",function(b){a.close(b)});this.element.bind("click.selectmenu",function(){a._refreshValue()}).bind("focus.selectmenu",function(){a.newelement&&a.newelement[0].focus()});if(!b.width)b.width=this.element.outerWidth();this.newelement.width(b.width);
this.element.hide();this.list=d("<ul />",{"class":"ui-widget ui-widget-content","aria-hidden":!0,role:"listbox","aria-labelledby":this.ids[0],id:this.ids[1]});this.listWrap=d(b.wrapperElement).addClass(a.widgetBaseClass+"-menu").append(this.list).appendTo("body");this.list.bind("keydown.selectmenu",function(b){var e=!1;switch(b.keyCode){case d.ui.keyCode.UP:b.altKey?a.close(b,!0):a._moveFocus(-1);break;case d.ui.keyCode.DOWN:b.altKey?a.close(b,!0):a._moveFocus(1);break;case d.ui.keyCode.LEFT:a._moveFocus(-1);
break;case d.ui.keyCode.RIGHT:a._moveFocus(1);break;case d.ui.keyCode.HOME:a._moveFocus(":first");break;case d.ui.keyCode.PAGE_UP:a._scrollPage("up");break;case d.ui.keyCode.PAGE_DOWN:a._scrollPage("down");break;case d.ui.keyCode.END:a._moveFocus(":last");break;case d.ui.keyCode.ENTER:case d.ui.keyCode.SPACE:a.close(b,!0);d(b.target).parents("li:eq(0)").trigger("mouseup");break;case d.ui.keyCode.TAB:e=!0;a.close(b,!0);d(b.target).parents("li:eq(0)").trigger("mouseup");break;case d.ui.keyCode.ESCAPE:a.close(b,
!0);break;default:e=!0}return e}).bind("keypress.selectmenu",function(b){a._typeAhead(b.which,"focus");return!0}).bind("mousedown.selectmenu mouseup.selectmenu",function(){return!1})},_init:function(){var a=this,b=this.options,e=[];this.element.find("option").each(function(){var f=d(this);e.push({value:f.attr("value"),text:a._formatText(f.text()),selected:f.attr("selected"),disabled:f.attr("disabled"),classes:f.attr("class"),typeahead:f.attr("typeahead"),parentOptGroup:f.parent("optgroup"),bgImage:b.bgImage.call(f)})});
var f=a.options.style=="popup"?" ui-state-active":"";this.list.html("");if(e.length)for(var h=0;h<e.length;h++){var g={role:"presentation"};e[h].disabled&&(g["class"]=this.namespace+"-state-disabled");var i={html:e[h].text,href:"#",tabindex:-1,role:"option","aria-selected":!1};if(e[h].disabled)i["aria-disabled"]=e[h].disabled;if(e[h].typeahead)i.typeahead=e[h].typeahead;i=d("<a/>",i);g=d("<li/>",g).append(i).data("index",h).addClass(e[h].classes).data("optionClasses",e[h].classes||"").bind("mouseup.selectmenu",
function(b){if(a._safemouseup&&!a._disabled(b.currentTarget)&&!a._disabled(d(b.currentTarget).parents("ul>li."+a.widgetBaseClass+"-group "))){var e=d(this).data("index")!=a._selectedIndex();a.index(d(this).data("index"));a.select(b);e&&a.change(b);a.close(b,!0)}return!1}).bind("click.selectmenu",function(){return!1}).bind("mouseover.selectmenu focus.selectmenu",function(b){!d(b.currentTarget).hasClass(a.namespace+"-state-disabled")&&!d(b.currentTarget).parent("ul").parent("li").hasClass(a.namespace+
"-state-disabled")&&(a._selectedOptionLi().addClass(f),a._focusedOptionLi().removeClass(a.widgetBaseClass+"-item-focus ui-state-hover"),d(this).removeClass("ui-state-active").addClass(a.widgetBaseClass+"-item-focus ui-state-hover"))}).bind("mouseout.selectmenu blur.selectmenu",function(){d(this).is(a._selectedOptionLi().selector)&&d(this).addClass(f);d(this).removeClass(a.widgetBaseClass+"-item-focus ui-state-hover")});e[h].parentOptGroup.length?(i=a.widgetBaseClass+"-group-"+this.element.find("optgroup").index(e[h].parentOptGroup),
this.list.find("li."+i).length?this.list.find("li."+i+":last ul").append(g):d(' <li role="presentation" class="'+a.widgetBaseClass+"-group "+i+(e[h].parentOptGroup.attr("disabled")?" "+this.namespace+'-state-disabled" aria-disabled="true"':'"')+'><span class="'+a.widgetBaseClass+'-group-label">'+e[h].parentOptGroup.attr("label")+"</span><ul></ul></li> ").appendTo(this.list).find("ul").append(g)):g.appendTo(this.list);if(b.icons)for(var j in b.icons)g.is(b.icons[j].find)&&(g.data("optionClasses",e[h].classes+
" "+a.widgetBaseClass+"-hasIcon").addClass(a.widgetBaseClass+"-hasIcon"),i=b.icons[j].icon||"",g.find("a:eq(0)").prepend('<span class="'+a.widgetBaseClass+"-item-icon ui-icon "+i+'"></span>'),e[h].bgImage&&g.find("span").css("background-image",e[h].bgImage))}else d('<li role="presentation"><a href="#" tabindex="-1" role="option"></a></li>').appendTo(this.list);h=b.style=="dropdown";this.newelement.toggleClass(a.widgetBaseClass+"-dropdown",h).toggleClass(a.widgetBaseClass+"-popup",!h);this.list.toggleClass(a.widgetBaseClass+
"-menu-dropdown ui-corner-bottom",h).toggleClass(a.widgetBaseClass+"-menu-popup ui-corner-all",!h).find("li:first").toggleClass("ui-corner-top",!h).end().find("li:last").addClass("ui-corner-bottom");this.selectmenuIcon.toggleClass("ui-icon-triangle-1-s",h).toggleClass("ui-icon-triangle-2-n-s",!h);b.transferClasses&&(h=this.element.attr("class")||"",this.newelement.add(this.list).addClass(h));b.style=="dropdown"?this.list.width(b.menuWidth?b.menuWidth:b.width):this.list.width(b.menuWidth?b.menuWidth:
b.width-b.handleWidth);this.list.css("height","auto");h=this.listWrap.height();b.maxHeight&&b.maxHeight<h?this.list.height(b.maxHeight):(j=d(window).height()/3,j<h&&this.list.height(j));this._optionLis=this.list.find("li:not(."+a.widgetBaseClass+"-group)");this.element.attr("disabled")?this.disable():this.enable();this.index(this._selectedIndex());window.setTimeout(function(){a._refreshPosition()},200)},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+
this.namespace+"-state-disabled").removeAttr("aria-disabled").unbind(".selectmenu");d(document).unbind(".selectmenu");d("label[for="+this.newelement.attr("id")+"]").attr("for",this.element.attr("id")).unbind(".selectmenu");this.newelementWrap.remove();this.listWrap.remove();this.element.show();d.Widget.prototype.destroy.apply(this,arguments)},_typeAhead:function(a,b){var e=this,f=!1,h=String.fromCharCode(a).toUpperCase();c=h.toLowerCase();if(e.options.typeAhead=="sequential"){window.clearTimeout("ui.selectmenu-"+
e.selectmenuId);var g=typeof e._prevChar=="undefined"?"":e._prevChar.join(""),i=function(a,h,g){f=!0;d(a).trigger(b);typeof e._prevChar=="undefined"?e._prevChar=[g]:e._prevChar[e._prevChar.length]=g};this.list.find("li a").each(function(a){if(!f){var b=d(this).attr("typeahead")||d(this).text();b.indexOf(g+h)===0?i(this,a,h):b.indexOf(g+c)===0&&i(this,a,c)}});window.setTimeout(function(){e._prevChar=void 0},1E3,e)}else{if(!e._prevChar)e._prevChar=["",0];f=!1;this.list.find("li a").each(function(a){if(!f){var g=
d(this).text();if(g.indexOf(h)===0||g.indexOf(c)===0)e._prevChar[0]==h?e._prevChar[1]<a&&(f=!0,d(this).trigger(b),e._prevChar[1]=a):(f=!0,d(this).trigger(b),e._prevChar[1]=a)}});this._prevChar[0]=h}},_uiHash:function(){var a=this.index();return{index:a,option:d("option",this.element).get(a),value:this.element[0].value}},open:function(a){var b=this.options;this.newelement.attr("aria-disabled")!="true"&&(this._closeOthers(a),this.newelement.addClass("ui-state-active"),this.listWrap.appendTo(b.appendTo),
this.list.attr("aria-hidden",!1),b.style=="dropdown"&&this.newelement.removeClass("ui-corner-all").addClass("ui-corner-top"),this.listWrap.addClass(this.widgetBaseClass+"-open"),d.browser.msie&&d.browser.version.substr(0,1)==7&&this._refreshPosition(),b=this.list.attr("aria-hidden",!1).find("li:not(."+this.widgetBaseClass+"-group):eq("+this._selectedIndex()+"):visible a"),b.length&&b[0].focus(),this._refreshPosition(),this._trigger("open",a,this._uiHash()))},close:function(a,b){this.newelement.is(".ui-state-active")&&
(this.newelement.removeClass("ui-state-active"),this.listWrap.removeClass(this.widgetBaseClass+"-open"),this.list.attr("aria-hidden",!0),this.options.style=="dropdown"&&this.newelement.removeClass("ui-corner-top").addClass("ui-corner-all"),b&&this.newelement.focus(),this._trigger("close",a,this._uiHash()))},change:function(a){this.element.trigger("change");this._trigger("change",a,this._uiHash())},select:function(a){if(this._disabled(a.currentTarget))return!1;this._trigger("select",a,this._uiHash())},
_closeOthers:function(a){d("."+this.widgetBaseClass+".ui-state-active").not(this.newelement).each(function(){d(this).data("selectelement").selectmenu("close",a)});d("."+this.widgetBaseClass+".ui-state-hover").trigger("mouseout")},_toggle:function(a,b){this.list.is("."+this.widgetBaseClass+"-open")?this.close(a,b):this.open(a)},_formatText:function(a){return this.options.format?this.options.format(a):a},_selectedIndex:function(){return this.element[0].selectedIndex},_selectedOptionLi:function(){return this._optionLis.eq(this._selectedIndex())},
_focusedOptionLi:function(){return this.list.find("."+this.widgetBaseClass+"-item-focus")},_moveSelection:function(a,b){if(!this.options.disabled){var d=parseInt(this._selectedOptionLi().data("index")||0,10)+a;d<0&&(d=0);d>this._optionLis.size()-1&&(d=this._optionLis.size()-1);if(d===b)return!1;if(this._optionLis.eq(d).hasClass(this.namespace+"-state-disabled"))a>0?++a:--a,this._moveSelection(a,d);else return this._optionLis.eq(d).trigger("mouseup")}},_moveFocus:function(a,b){var d=isNaN(a)?parseInt(this._optionLis.filter(a).data("index"),
10):parseInt(this._focusedOptionLi().data("index")||0,10)+a;d<0&&(d=0);d>this._optionLis.size()-1&&(d=this._optionLis.size()-1);if(d===b)return!1;var f=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this._focusedOptionLi().find("a:eq(0)").attr("id","");this._optionLis.eq(d).hasClass(this.namespace+"-state-disabled")?(a>0?++a:--a,this._moveFocus(a,d)):this._optionLis.eq(d).find("a:eq(0)").attr("id",f).focus();this.list.attr("aria-activedescendant",f)},_scrollPage:function(a){var b=Math.floor(this.list.outerHeight()/
this.list.find("li:first").outerHeight());this._moveFocus(a=="up"?-b:b)},_setOption:function(a,b){this.options[a]=b;a=="disabled"&&(this.close(),this.element.add(this.newelement).add(this.list)[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",b))},disable:function(a,b){typeof a=="undefined"?this._setOption("disabled",!0):b=="optgroup"?this._disableOptgroup(a):this._disableOption(a)},enable:function(a,b){typeof a=="undefined"?this._setOption("disabled",
!1):b=="optgroup"?this._enableOptgroup(a):this._enableOption(a)},_disabled:function(a){return d(a).hasClass(this.namespace+"-state-disabled")},_disableOption:function(a){var b=this._optionLis.eq(a);b&&(b.addClass(this.namespace+"-state-disabled").find("a").attr("aria-disabled",!0),this.element.find("option").eq(a).attr("disabled","disabled"))},_enableOption:function(a){var b=this._optionLis.eq(a);b&&(b.removeClass(this.namespace+"-state-disabled").find("a").attr("aria-disabled",!1),this.element.find("option").eq(a).removeAttr("disabled"))},
_disableOptgroup:function(a){var b=this.list.find("li."+this.widgetBaseClass+"-group-"+a);b&&(b.addClass(this.namespace+"-state-disabled").attr("aria-disabled",!0),this.element.find("optgroup").eq(a).attr("disabled","disabled"))},_enableOptgroup:function(a){var b=this.list.find("li."+this.widgetBaseClass+"-group-"+a);b&&(b.removeClass(this.namespace+"-state-disabled").attr("aria-disabled",!1),this.element.find("optgroup").eq(a).removeAttr("disabled"))},index:function(a){if(arguments.length)if(this._disabled(d(this._optionLis[a])))return!1;
else this.element[0].selectedIndex=a,this._refreshValue();else return this._selectedIndex()},value:function(a){if(arguments.length)this.element[0].value=a,this._refreshValue();else return this.element[0].value},_refreshValue:function(){var a=this.options.style=="popup"?" ui-state-active":"",b=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this.list.find("."+this.widgetBaseClass+"-item-selected").removeClass(this.widgetBaseClass+"-item-selected"+a).find("a").attr("aria-selected","false").attr("id",
"");this._selectedOptionLi().addClass(this.widgetBaseClass+"-item-selected"+a).find("a").attr("aria-selected","true").attr("id",b);var a=this.newelement.data("optionClasses")?this.newelement.data("optionClasses"):"",d=this._selectedOptionLi().data("optionClasses")?this._selectedOptionLi().data("optionClasses"):"";this.newelement.removeClass(a).data("optionClasses",d).addClass(d).find("."+this.widgetBaseClass+"-status").html(this._selectedOptionLi().find("a:eq(0)").html());this.list.attr("aria-activedescendant",
b)},_refreshPosition:function(){var a=this.options;if(a.style=="popup"&&!a.positionOptions.offset)var b=this._selectedOptionLi(),b="0 -"+(b.outerHeight()+b.offset().top-this.list.offset().top);var d=this.element.zIndex();d&&this.listWrap.css("zIndex",d);this.listWrap.position({of:a.positionOptions.of||this.newelement,my:a.positionOptions.my,at:a.positionOptions.at,offset:a.positionOptions.offset||b,collision:a.positionOptions.collision||"flip"})}})})(jQuery);
(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var a=this,b=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=b.values&&b.values.length||1,h=[];this._mouseSliding=this._keySliding=!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"+(b.disabled?" ui-slider-disabled ui-disabled":""));this.range=d([]);if(b.range){if(b.range===!0){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]]}this.range=d("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var g=e.length;g<f;g+=1)h.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
this.handles=e.add(d(h.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){b.disabled?d(this).blur():(d(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),d(this).addClass("ui-state-focus"))}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(a){d(this).data("index.ui-slider-handle",
a)});this.handles.keydown(function(b){var e=!0,f=d(this).data("index.ui-slider-handle"),h,g,o;if(!a.options.disabled){switch(b.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(e=!1,!a._keySliding&&(a._keySliding=!0,d(this).addClass("ui-state-active"),h=a._start(b,f),h===!1))return}o=a.options.step;h=a.options.values&&a.options.values.length?g=a.values(f):
g=a.value();switch(b.keyCode){case d.ui.keyCode.HOME:g=a._valueMin();break;case d.ui.keyCode.END:g=a._valueMax();break;case d.ui.keyCode.PAGE_UP:g=a._trimAlignValue(h+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=a._trimAlignValue(h-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h===a._valueMax())return;g=a._trimAlignValue(h+o);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===a._valueMin())return;g=a._trimAlignValue(h-o)}a._slide(b,
f,g);return e}}).keyup(function(b){var e=d(this).data("index.ui-slider-handle");if(a._keySliding)a._keySliding=!1,a._stop(b,e),a._change(b,e),d(this).removeClass("ui-state-active")});this._refreshValue();this._animateOff=!1},destroy:function(){this.handles.remove();this.range.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();return this},_mouseCapture:function(a){var b=
this.options,e,f,h,g,i;if(b.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();e=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;g=this;this.handles.each(function(a){var b=Math.abs(e-g.values(a));f>b&&(f=b,h=d(this),i=a)});b.range===!0&&this.values(1)===b.min&&(i+=1,h=d(this.handles[i]));if(this._start(a,i)===!1)return!1;this._mouseSliding=!0;g._handleIndex=i;h.addClass("ui-state-active").focus();
b=h.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-h.width()/2,top:a.pageY-b.top-h.height()/2-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,i,e);return this._animateOff=!0},_mouseStart:function(){return!0},_mouseDrag:function(a){var b=this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,
this._handleIndex,b);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=!1;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;this.orientation==="horizontal"?(b=this.elementSize.width,a=a.x-this.elementOffset.left-(this._clickOffset?
this._clickOffset.left:0)):(b=this.elementSize.height,a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0));b=a/b;b>1&&(b=1);b<0&&(b=0);this.orientation==="vertical"&&(b=1-b);a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var d={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length)d.value=this.values(b),d.values=this.values();return this._trigger("start",a,d)},_slide:function(a,
b,d){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===!0&&(b===0&&d>f||b===1&&d<f))d=f;d!==this.values(b)&&(f=this.values(),f[b]=d,a=this._trigger("slide",a,{handle:this.handles[b],value:d,values:f}),this.values(b?0:1),a!==!1&&this.values(b,d,!0))}else d!==this.value()&&(a=this._trigger("slide",a,{handle:this.handles[b],value:d}),a!==!1&&this.value(d))},_stop:function(a,b){var d={handle:this.handles[b],value:this.value()};
if(this.options.values&&this.options.values.length)d.value=this.values(b),d.values=this.values();this._trigger("stop",a,d)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var d={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length)d.value=this.values(b),d.values=this.values();this._trigger("change",a,d)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},
values:function(a,b){var e,f,h;if(arguments.length>1)this.options.values[a]=this._trimAlignValue(b),this._refreshValue(),this._change(null,a);else if(arguments.length)if(d.isArray(arguments[0])){e=this.options.values;f=arguments[0];for(h=0;h<e.length;h+=1)e[h]=this._trimAlignValue(f[h]),this._change(null,h);this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(a):this.value();else return this._values()},_setOption:function(a,b){var e,f=0;if(d.isArray(this.options.values))f=
this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(a){case "disabled":b?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case "orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);
this._refreshValue();break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(e=0;e<f;e+=1)this._change(null,e);this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,d;if(arguments.length)b=this.options.values[a],b=this._trimAlignValue(b);else{b=this.options.values.slice();for(d=0;d<b.length;d+=1)b[d]=this._trimAlignValue(b[d])}return b},
_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,d=(a-this._valueMin())%b;a-=d;Math.abs(d)*2>=b&&(a+=d>0?b:-b);return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a=this.options.range,b=this.options,e=this,f=!this._animateOff?b.animate:!1,h,g={},i,j,k,l;if(this.options.values&&this.options.values.length)this.handles.each(function(a){h=
(e.values(a)-e._valueMin())/(e._valueMax()-e._valueMin())*100;g[e.orientation==="horizontal"?"left":"bottom"]=h+"%";d(this).stop(1,1)[f?"animate":"css"](g,b.animate);if(e.options.range===!0)if(e.orientation==="horizontal"){if(a===0)e.range.stop(1,1)[f?"animate":"css"]({left:h+"%"},b.animate);if(a===1)e.range[f?"animate":"css"]({width:h-i+"%"},{queue:!1,duration:b.animate})}else{if(a===0)e.range.stop(1,1)[f?"animate":"css"]({bottom:h+"%"},b.animate);if(a===1)e.range[f?"animate":"css"]({height:h-i+
"%"},{queue:!1,duration:b.animate})}i=h});else{j=this.value();k=this._valueMin();l=this._valueMax();h=l!==k?(j-k)/(l-k)*100:0;g[e.orientation==="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[f?"animate":"css"](g,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:h+"%"},b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-h+"%"},{queue:!1,duration:b.animate});if(a==="min"&&this.orientation===
"vertical")this.range.stop(1,1)[f?"animate":"css"]({height:h+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-h+"%"},{queue:!1,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery);
(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();
this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){a==="disabled"?(this.options[a]=
b,this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")):d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(a);var e=null,f=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==f)return e=d(this),!1});d.data(a.target,"sortable-item")==f&&(e=d(a.target));if(!e)return!1;if(this.options.handle&&!b){var h=!1;d(this.options.handle,
e).find("*").andSelf().each(function(){this==a.target&&(h=!0)});if(!h)return!1}this.currentItem=e;this._removeCurrentsFromItems();return!0},_mouseStart:function(a,b,e){b=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position",
"absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();
this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=
this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!e)for(e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("activate",a,this._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return!0},_mouseDrag:function(a){this.position=this._generatePosition(a);
this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,e=!1;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<b.scrollSensitivity)this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop-
b.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-b.scrollSpeed}else a.pageY-d(document).scrollTop()<b.scrollSensitivity?e=d(document).scrollTop(d(document).scrollTop()-b.scrollSpeed):d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity&&
(e=d(document).scrollTop(d(document).scrollTop()+b.scrollSpeed)),a.pageX-d(document).scrollLeft()<b.scrollSensitivity?e=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed):d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity&&(e=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed));e!==!1&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=
this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){var e=this.items[b],f=e.item[0],h=this._intersectsWithPointer(e);if(h&&f!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=f&&!d.ui.contains(this.placeholder[0],f)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],f):1)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e))this._rearrange(a,
e);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var e=this,f=e.placeholder.offset();e.reverting=!0;d(this.helper).animate({left:f.left-this.offset.parent.left-e.margins.left+(this.offsetParent[0]==document.body?
0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-e.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){e._clear(a)})}else this._clear(a,b);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var a=this.containers.length-1;a>=0;a--)if(this.containers[a]._trigger("deactivate",
null,this._uiHash(this)),this.containers[a].containerCache.over)this.containers[a]._trigger("out",null,this._uiHash(this)),this.containers[a].containerCache.over=0}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),d.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):
d(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),e=[],a=a||{};d(b).each(function(){var b=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);b&&e.push((a.key||b[1]+"[]")+"="+(a.key&&a.expression?b[1]:b[2]))});!e.length&&a.key&&e.push(a.key+"=");return e.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),e=[],a=a||{};b.each(function(){e.push(d(a.item||this).attr(a.attribute||
"id")||"")});return e},_intersectsWith:function(a){var b=this.positionAbs.left,d=b+this.helperProportions.width,f=this.positionAbs.top,h=f+this.helperProportions.height,g=a.left,i=g+a.width,j=a.top,k=j+a.height,l=this.offset.click.top,m=this.offset.click.left;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?f+l>j&&f+l<k&&b+m>g&&b+m<i:g<b+this.helperProportions.width/
2&&d-this.helperProportions.width/2<i&&j<f+this.helperProportions.height/2&&h-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height),a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width),b=b&&a,a=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return!b?!1:this.floating?e&&e=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},_intersectsWithSides:function(a){var b=
d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height),a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?f=="right"&&a||f=="left"&&!a:e&&(e=="down"&&b||e=="up"&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-
this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],e=[],f=this._connectWith();if(f&&a)for(a=f.length-1;a>=0;a--)for(var h=d(f[a]),g=h.length-1;g>=0;g--){var i=d.data(h[g],"sortable");i&&i!=this&&!i.options.disabled&&e.push([d.isFunction(i.options.items)?i.options.items.call(i.element):
d(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i])}e.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=e.length-1;a>=0;a--)e[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var d=
0;d<a.length;d++)a[d]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,e=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),this]],f=this._connectWith();if(f)for(var h=f.length-1;h>=0;h--)for(var g=d(f[h]),i=g.length-1;i>=0;i--){var j=d.data(g[i],"sortable");j&&j!=this&&!j.options.disabled&&(e.push([d.isFunction(j.options.items)?j.options.items.call(j.element[0],
a,{item:this.currentItem}):d(j.options.items,j.element),j]),this.containers.push(j))}for(h=e.length-1;h>=0;h--){a=e[h][1];f=e[h][0];i=0;for(g=f.length;i<g;i++)j=d(f[i]),j.data("sortable-item",a),b.push({item:j,instance:a,width:0,height:0,left:0,top:0})}},refreshPositions:function(a){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var b=this.items.length-1;b>=0;b--){var e=this.items[b];if(!(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0])){var f=
this.options.toleranceElement?d(this.options.toleranceElement,e.item):e.item;if(!a)e.width=f.outerWidth(),e.height=f.outerHeight();f=f.offset();e.left=f.left;e.top=f.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--)f=this.containers[b].element.offset(),this.containers[b].containerCache.left=f.left,this.containers[b].containerCache.top=f.top,this.containers[b].containerCache.width=this.containers[b].element.outerWidth(),
this.containers[b].containerCache.height=this.containers[b].element.outerHeight();return this},_createPlaceholder:function(a){var b=a||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var f=e.placeholder;e.placeholder={element:function(){var a=d(document.createElement(b.currentItem[0].nodeName)).addClass(f||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!f)a.style.visibility="hidden";return a},update:function(a,d){if(!f||e.forcePlaceholderSize)d.height()||
d.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10)),d.width()||d.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}b.placeholder=d(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,e=null,f=this.containers.length-
1;f>=0;f--)if(!d.ui.contains(this.currentItem[0],this.containers[f].element[0]))if(this._intersectsWith(this.containers[f].containerCache)){if(!b||!d.ui.contains(this.containers[f].element[0],b.element[0]))b=this.containers[f],e=f}else if(this.containers[f].containerCache.over)this.containers[f]._trigger("out",a,this._uiHash(this)),this.containers[f].containerCache.over=0;if(b)if(this.containers.length===1)this.containers[e]._trigger("over",a,this._uiHash(this)),this.containers[e].containerCache.over=
1;else if(this.currentContainer!=this.containers[e]){for(var b=1E4,f=null,h=this.positionAbs[this.containers[e].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[e].element[0],this.items[g].item[0])){var i=this.items[g][this.containers[e].floating?"left":"top"];Math.abs(i-h)<b&&(b=Math.abs(i-h),f=this.items[g])}if(f||this.options.dropOnEmpty)this.currentContainer=this.containers[e],f?this._rearrange(a,f,null,!0):this._rearrange(a,null,this.containers[e].element,
!0),this._trigger("change",a,this._uiHash()),this.containers[e]._trigger("change",a,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[e]._trigger("over",a,this._uiHash(this)),this.containers[e].containerCache.over=1}},_createHelper:function(a){var b=this.options,a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||d(b.appendTo!=
"parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};(a[0].style.width==""||b.forceHelperSize)&&a.width(this.currentItem.width());(a[0].style.height==""||b.forceHelperSize)&&a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){typeof a==
"string"&&(a=a.split(" "));d.isArray(a)&&(a={left:+a[0],top:+a[1]||0});if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();this.cssPosition==
"absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+=this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==
"relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},
_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0],a=d(a.containment).offset(),e=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(e?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||
0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(e?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=this.position;var e=a=="absolute"?1:-1,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?
this.offsetParent:this.scrollParent,h=/(html|body)/i.test(f[0].tagName);return{top:b.top+this.offset.relative.top*e+this.offset.parent.top*e-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():h?0:f.scrollTop())*e),left:b.left+this.offset.relative.left*e+this.offset.parent.left*e-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:f.scrollLeft())*e)}},_generatePosition:function(a){var b=
this.options,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var h=a.pageX,g=a.pageY;this.originalPosition&&(this.containment&&(a.pageX-this.offset.click.left<this.containment[0]&&(h=this.containment[0]+
this.offset.click.left),a.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),a.pageX-this.offset.click.left>this.containment[2]&&(h=this.containment[2]+this.offset.click.left),a.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top)),b.grid&&(g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1],g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?
g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g,h=this.originalPageX+Math.round((h-this.originalPageX)/b.grid[0])*b.grid[0],h=this.containment?!(h-this.offset.click.left<this.containment[0]||h-this.offset.click.left>this.containment[2])?h:!(h-this.offset.click.left<this.containment[0])?h-b.grid[0]:h+b.grid[0]:h));return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
f?0:e.scrollTop()),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())}},_rearrange:function(a,b,d,f){d?d[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var h=this,g=this.counter;window.setTimeout(function(){g==
h.counter&&h.refreshPositions(!f)},0)},_clear:function(a,b){this.reverting=!1;var e=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&e.push(function(a){this._trigger("receive",
a,this._uiHash(this.fromOutside))});(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b&&e.push(function(a){this._trigger("update",a,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||e.push(function(a){this._trigger("remove",a,this._uiHash())});for(f=this.containers.length-1;f>=0;f--)d.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!b&&(e.push(function(a){return function(b){a._trigger("receive",
b,this._uiHash(this))}}.call(this,this.containers[f])),e.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(f=this.containers.length-1;f>=0;f--)if(b||e.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over)e.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=
0;this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=!1;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(f=0;f<e.length;f++)e[f].call(this,a);this._trigger("stop",a,this._uiHash())}return!1}b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(f=0;f<e.length;f++)e[f].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,
{version:"1.8.16"})})(jQuery);
(function(d,a){var b=0,e=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(a,b){a=="selected"?this.options.collapsible&&b==this.options.selected||this.select(b):
(this.options[a]=b,this._tabify())},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+ ++b},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var a=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++e);return d.cookie.apply(null,[a].concat(d.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var a=
d(this);a.html(a.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(a,b){a.css("display","");!d.support.opacity&&b.opacity&&a[0].style.removeAttribute("filter")}var g=this,i=this.options,j=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(a,b){var e=d(b).attr("href"),f=e.split("#")[0],h;if(f&&(f===location.toString().split("#")[0]||
(h=d("base")[0])&&f===h.href))e=b.hash,b.href=e;j.test(e)?g.panels=g.panels.add(g.element.find(g._sanitizeSelector(e))):e&&e!=="#"?(d.data(b,"href.tabs",e),d.data(b,"load.tabs",e.replace(/#.*$/,"")),e=g._tabId(b),b.href="#"+e,f=g.element.find("#"+e),f.length||(f=d(i.panelTemplate).attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(g.panels[a-1]||g.list),f.data("destroy.tabs",!0)),g.panels=g.panels.add(f)):i.disabled.push(a)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(i.selected===a){location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return i.selected=a,!1});if(typeof i.selected!=="number"&&i.cookie)i.selected=parseInt(g._cookie(),10);if(typeof i.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)i.selected=
this.lis.index(this.lis.filter(".ui-tabs-selected"));i.selected=i.selected||(this.lis.length?0:-1)}else if(i.selected===null)i.selected=-1;i.selected=i.selected>=0&&this.anchors[i.selected]||i.selected<0?i.selected:0;i.disabled=d.unique(i.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(a){return g.lis.index(a)}))).sort();d.inArray(i.selected,i.disabled)!=-1&&i.disabled.splice(d.inArray(i.selected,i.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
i.selected>=0&&this.anchors.length&&(g.element.find(g._sanitizeSelector(g.anchors[i.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(i.selected).addClass("ui-tabs-selected ui-state-active"),g.element.queue("tabs",function(){g._trigger("show",null,g._ui(g.anchors[i.selected],g.element.find(g._sanitizeSelector(g.anchors[i.selected].hash))[0]))}),this.load(i.selected));d(window).bind("unload",function(){g.lis.add(g.anchors).unbind(".tabs");g.lis=g.anchors=g.panels=null})}else i.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
this.element[i.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");i.cookie&&this._cookie(i.selected,i.cookie);for(var b=0,k;k=this.lis[b];b++)d(k)[d.inArray(b,i.disabled)!=-1&&!d(k).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");i.cache===!1&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(i.event!=="mouseover"){var l=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",
function(){l("hover",d(this))});this.lis.bind("mouseout.tabs",function(){d(this).removeClass("ui-state-hover")});this.anchors.bind("focus.tabs",function(){l("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){d(this).closest("li").removeClass("ui-state-focus")})}var m,o;if(i.fx)d.isArray(i.fx)?(m=i.fx[0],o=i.fx[1]):m=o=i.fx;var p=o?function(a,b){d(a).closest("li").addClass("ui-tabs-selected ui-state-active");b.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
function(){e(b,o);g._trigger("show",null,g._ui(a,b[0]))})}:function(a,b){d(a).closest("li").addClass("ui-tabs-selected ui-state-active");b.removeClass("ui-tabs-hide");g._trigger("show",null,g._ui(a,b[0]))},n=m?function(a,b){b.animate(m,m.duration||"normal",function(){g.lis.removeClass("ui-tabs-selected ui-state-active");b.addClass("ui-tabs-hide");e(b,m);g.element.dequeue("tabs")})}:function(a,b){g.lis.removeClass("ui-tabs-selected ui-state-active");b.addClass("ui-tabs-hide");g.element.dequeue("tabs")};
this.anchors.bind(i.event+".tabs",function(){var a=this,b=d(a).closest("li"),e=g.panels.filter(":not(.ui-tabs-hide)"),f=g.element.find(g._sanitizeSelector(a.hash));if(b.hasClass("ui-tabs-selected")&&!i.collapsible||b.hasClass("ui-state-disabled")||b.hasClass("ui-state-processing")||g.panels.filter(":animated").length||g._trigger("select",null,g._ui(this,f[0]))===!1)return this.blur(),!1;i.selected=g.anchors.index(this);g.abort();if(i.collapsible)if(b.hasClass("ui-tabs-selected"))return i.selected=
-1,i.cookie&&g._cookie(i.selected,i.cookie),g.element.queue("tabs",function(){n(a,e)}).dequeue("tabs"),this.blur(),!1;else if(!e.length)return i.cookie&&g._cookie(i.selected,i.cookie),g.element.queue("tabs",function(){p(a,f)}),g.load(g.anchors.index(this)),this.blur(),!1;i.cookie&&g._cookie(i.selected,i.cookie);if(f.length)e.length&&g.element.queue("tabs",function(){n(a,e)}),g.element.queue("tabs",function(){p(a,f)}),g.load(g.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";
d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$="+a+"]")));return a},destroy:function(){var a=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var a=
d.data(this,"href.tabs");if(a)this.href=a;var b=d(this).unbind(".tabs");d.each(["href","load","cache"],function(a,d){b.removeData(d+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});a.cookie&&this._cookie(null,a.cookie);return this},add:function(b,
e,g){if(g===a)g=this.anchors.length;var i=this,j=this.options,e=d(j.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e)),b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var k=i.element.find("#"+b);k.length||(k=d(j.panelTemplate).attr("id",b).data("destroy.tabs",!0));k.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");g>=this.lis.length?(e.appendTo(this.list),k.appendTo(this.list[0].parentNode)):
(e.insertBefore(this.lis[g]),k.insertBefore(this.panels[g]));j.disabled=d.map(j.disabled,function(a){return a>=g?++a:a});this._tabify();if(this.anchors.length==1)j.selected=0,e.addClass("ui-tabs-selected ui-state-active"),k.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){i._trigger("show",null,i._ui(i.anchors[0],i.panels[0]))}),this.load(0);this._trigger("add",null,this._ui(this.anchors[g],this.panels[g]));return this},remove:function(a){var a=this._getIndex(a),b=this.options,e=this.lis.eq(a).remove(),
i=this.panels.eq(a).remove();e.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(a+(a+1<this.anchors.length?1:-1));b.disabled=d.map(d.grep(b.disabled,function(b){return b!=a}),function(b){return b>=a?--b:b});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],i[0]));return this},enable:function(a){var a=this._getIndex(a),b=this.options;if(d.inArray(a,b.disabled)!=-1)return this.lis.eq(a).removeClass("ui-state-disabled"),b.disabled=d.grep(b.disabled,function(b){return b!=
a}),this._trigger("enable",null,this._ui(this.anchors[a],this.panels[a])),this},disable:function(a){var a=this._getIndex(a),b=this.options;a!=b.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),b.disabled.push(a),b.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a])));return this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;this.anchors.eq(a).trigger(this.options.event+
".tabs");return this},load:function(a){var a=this._getIndex(a),b=this,e=this.options,i=this.anchors.eq(a)[0],j=d.data(i,"load.tabs");this.abort();if(!j||this.element.queue("tabs").length!==0&&d.data(i,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(a).addClass("ui-state-processing");if(e.spinner){var k=d("span",i);k.data("label.tabs",k.html()).html(e.spinner)}this.xhr=d.ajax(d.extend({},e.ajaxOptions,{url:j,success:function(j,m){b.element.find(b._sanitizeSelector(i.hash)).html(j);b._cleanup();
e.cache&&d.data(i,"cache.tabs",!0);b._trigger("load",null,b._ui(b.anchors[a],b.panels[a]));try{e.ajaxOptions.success(j,m)}catch(o){}},error:function(d,j){b._cleanup();b._trigger("load",null,b._ui(b.anchors[a],b.panels[a]));try{e.ajaxOptions.error(d,j,a,i)}catch(o){}}}));b.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(!1,!0);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));this.xhr&&(this.xhr.abort(),delete this.xhr);this._cleanup();
return this},url:function(a,b){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var d=this,e=this.options,j=d._rotate||(d._rotate=function(b){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var a=e.selected;d.select(++a<d.anchors.length?a:0)},a);b&&b.stopPropagation()}),k=d._unrotate||(d._unrotate=!b?function(a){a.clientX&&
d.rotate(null)}:function(){t=e.selected;j()});a?(this.element.bind("tabsshow",j),this.anchors.bind(e.event+".tabs",k),j()):(clearTimeout(d.rotation),this.element.unbind("tabsshow",j),this.anchors.unbind(e.event+".tabs",k),delete this._rotate,delete this._unrotate);return this}})})(jQuery);
jQuery.effects||function(d,a){function b(a){var b;return a&&a.constructor==Array&&a.length==3?a:(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))?[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10)]:(b=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a))?[parseFloat(b[1])*2.55,parseFloat(b[2])*2.55,parseFloat(b[3])*2.55]:(b=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))?[parseInt(b[1],16),parseInt(b[2],
16),parseInt(b[3],16)]:(b=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a))?[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)]:/rgba\(0, 0, 0, 0\)/.exec(a)?j.transparent:j[d.trim(a).toLowerCase()]}function e(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},d,e;if(a&&a.length&&a[0]&&a[a[0]])for(var f=a.length;f--;)d=a[f],typeof a[d]=="string"&&(e=d.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[e]=a[d]);else for(d in a)typeof a[d]===
"string"&&(b[d]=a[d]);return b}function f(a){var b,e;for(b in a)e=a[b],(e==null||d.isFunction(e)||b in l||/scrollbar/.test(b)||!/color/i.test(b)&&isNaN(parseFloat(e)))&&delete a[b];return a}function h(a,b){var d={_:0},e;for(e in b)a[e]!=b[e]&&(d[e]=b[e]);return d}function g(a,b,e,f){if(typeof a=="object")f=b,e=null,b=a,a=b.effect;d.isFunction(b)&&(f=b,e=null,b={});if(typeof b=="number"||d.fx.speeds[b])f=e,e=b,b={};d.isFunction(e)&&(f=e,e=null);b=b||{};e=e||b.duration;e=d.fx.off?0:typeof e=="number"?
e:e in d.fx.speeds?d.fx.speeds[e]:d.fx.speeds._default;f=f||b.complete;return[a,b,e,f]}function i(a){return!a||typeof a==="number"||d.fx.speeds[a]?!0:typeof a==="string"&&!d.effects[a]?!0:!1}d.effects={};d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(a,e){d.fx.step[e]=function(a){if(!a.colorInit){var f;f=a.elem;var g=e,h;do{h=d.curCSS(f,g);if(h!=""&&h!="transparent"||d.nodeName(f,"body"))break;g="backgroundColor"}while(f=
f.parentNode);f=b(h);a.start=f;a.end=b(a.end);a.colorInit=!0}a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var j={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],
darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],
maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},k=["add","remove","toggle"],l={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};d.effects.animateClass=function(a,b,g,i){d.isFunction(g)&&(i=g,g=null);return this.queue(function(){var j=d(this),l=j.attr("style")||
" ",x=f(e.call(this)),q,w=j.attr("class");d.each(k,function(b,d){if(a[d])j[d+"Class"](a[d])});q=f(e.call(this));j.attr("class",w);j.animate(h(x,q),{queue:!1,duration:b,easing:g,complete:function(){d.each(k,function(b,d){if(a[d])j[d+"Class"](a[d])});typeof j.attr("style")=="object"?(j.attr("style").cssText="",j.attr("style").cssText=l):j.attr("style",l);i&&i.apply(this,arguments);d.dequeue(this)}})})};d.fn.extend({_addClass:d.fn.addClass,addClass:function(a,b,e,f){return b?d.effects.animateClass.apply(this,
[{add:a},b,e,f]):this._addClass(a)},_removeClass:d.fn.removeClass,removeClass:function(a,b,e,f){return b?d.effects.animateClass.apply(this,[{remove:a},b,e,f]):this._removeClass(a)},_toggleClass:d.fn.toggleClass,toggleClass:function(b,e,f,g,h){return typeof e=="boolean"||e===a?f?d.effects.animateClass.apply(this,[e?{add:b}:{remove:b},f,g,h]):this._toggleClass(b,e):d.effects.animateClass.apply(this,[{toggle:b},e,f,g])},switchClass:function(a,b,e,f,g){return d.effects.animateClass.apply(this,[{add:b,
remove:a},e,f,g])}});d.extend(d.effects,{version:"1.8.16",save:function(a,b){for(var d=0;d<b.length;d++)b[d]!==null&&a.data("ec.storage."+b[d],a[0].style[b[d]])},restore:function(a,b){for(var d=0;d<b.length;d++)b[d]!==null&&a.css(b[d],a.data("ec.storage."+b[d]))},setMode:function(a,b){b=="toggle"&&(b=a.is(":hidden")?"show":"hide");return b},getBaseline:function(a,b){var d,e;switch(a[0]){case "top":d=0;break;case "middle":d=0.5;break;case "bottom":d=1;break;default:d=a[0]/b.height}switch(a[1]){case "left":e=
0;break;case "center":e=0.5;break;case "right":e=1;break;default:e=a[1]/b.width}return{x:e,y:d}},createWrapper:function(a){if(a.parent().is(".ui-effects-wrapper"))return a.parent();var b={width:a.outerWidth(!0),height:a.outerHeight(!0),"float":a.css("float")},e=d("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),f=document.activeElement;a.wrap(e);(a[0]===f||d.contains(a[0],f))&&d(f).focus();e=a.parent();a.css("position")==
"static"?(e.css({position:"relative"}),a.css({position:"relative"})):(d.extend(b,{position:a.css("position"),zIndex:a.css("z-index")}),d.each(["top","left","bottom","right"],function(d,e){b[e]=a.css(e);isNaN(parseInt(b[e],10))&&(b[e]="auto")}),a.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));return e.css(b).show()},removeWrapper:function(a){var b,e=document.activeElement;return a.parent().is(".ui-effects-wrapper")?(b=a.parent().replaceWith(a),(a[0]===e||d.contains(a[0],e))&&d(e).focus(),
b):a},setTransition:function(a,b,e,f){f=f||{};d.each(b,function(b,d){unit=a.cssUnit(d);unit[0]>0&&(f[d]=unit[0]*e+unit[1])});return f}});d.fn.extend({effect:function(a,b,e,f){var h=g.apply(this,arguments),i={options:h[1],duration:h[2],callback:h[3]},h=i.options.mode,j=d.effects[a];return d.fx.off||!j?h?this[h](i.duration,i.callback):this.each(function(){i.callback&&i.callback.call(this)}):j.call(this,i)},_show:d.fn.show,show:function(a){if(i(a))return this._show.apply(this,arguments);else{var b=g.apply(this,
arguments);b[1].mode="show";return this.effect.apply(this,b)}},_hide:d.fn.hide,hide:function(a){if(i(a))return this._hide.apply(this,arguments);else{var b=g.apply(this,arguments);b[1].mode="hide";return this.effect.apply(this,b)}},__toggle:d.fn.toggle,toggle:function(a){if(i(a)||typeof a==="boolean"||d.isFunction(a))return this.__toggle.apply(this,arguments);else{var b=g.apply(this,arguments);b[1].mode="toggle";return this.effect.apply(this,b)}},cssUnit:function(a){var b=this.css(a),e=[];d.each(["em",
"px","%","pt"],function(a,d){b.indexOf(d)>0&&(e=[parseFloat(b),d])});return e}});d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(a,b,e,f,g){return d.easing[d.easing.def](a,b,e,f,g)},easeInQuad:function(a,b,d,e,f){return e*(b/=f)*b+d},easeOutQuad:function(a,b,d,e,f){return-e*(b/=f)*(b-2)+d},easeInOutQuad:function(a,b,d,e,f){return(b/=f/2)<1?e/2*b*b+d:-e/2*(--b*(b-2)-1)+d},easeInCubic:function(a,b,d,e,f){return e*(b/=f)*b*b+d},easeOutCubic:function(a,b,d,e,f){return e*
((b=b/f-1)*b*b+1)+d},easeInOutCubic:function(a,b,d,e,f){return(b/=f/2)<1?e/2*b*b*b+d:e/2*((b-=2)*b*b+2)+d},easeInQuart:function(a,b,d,e,f){return e*(b/=f)*b*b*b+d},easeOutQuart:function(a,b,d,e,f){return-e*((b=b/f-1)*b*b*b-1)+d},easeInOutQuart:function(a,b,d,e,f){return(b/=f/2)<1?e/2*b*b*b*b+d:-e/2*((b-=2)*b*b*b-2)+d},easeInQuint:function(a,b,d,e,f){return e*(b/=f)*b*b*b*b+d},easeOutQuint:function(a,b,d,e,f){return e*((b=b/f-1)*b*b*b*b+1)+d},easeInOutQuint:function(a,b,d,e,f){return(b/=f/2)<1?e/2*
b*b*b*b*b+d:e/2*((b-=2)*b*b*b*b+2)+d},easeInSine:function(a,b,d,e,f){return-e*Math.cos(b/f*(Math.PI/2))+e+d},easeOutSine:function(a,b,d,e,f){return e*Math.sin(b/f*(Math.PI/2))+d},easeInOutSine:function(a,b,d,e,f){return-e/2*(Math.cos(Math.PI*b/f)-1)+d},easeInExpo:function(a,b,d,e,f){return b==0?d:e*Math.pow(2,10*(b/f-1))+d},easeOutExpo:function(a,b,d,e,f){return b==f?d+e:e*(-Math.pow(2,-10*b/f)+1)+d},easeInOutExpo:function(a,b,d,e,f){return b==0?d:b==f?d+e:(b/=f/2)<1?e/2*Math.pow(2,10*(b-1))+d:e/
2*(-Math.pow(2,-10*--b)+2)+d},easeInCirc:function(a,b,d,e,f){return-e*(Math.sqrt(1-(b/=f)*b)-1)+d},easeOutCirc:function(a,b,d,e,f){return e*Math.sqrt(1-(b=b/f-1)*b)+d},easeInOutCirc:function(a,b,d,e,f){return(b/=f/2)<1?-e/2*(Math.sqrt(1-b*b)-1)+d:e/2*(Math.sqrt(1-(b-=2)*b)+1)+d},easeInElastic:function(a,b,d,e,f){var a=1.70158,g=0,h=e;if(b==0)return d;if((b/=f)==1)return d+e;g||(g=f*0.3);h<Math.abs(e)?(h=e,a=g/4):a=g/(2*Math.PI)*Math.asin(e/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*f-a)*2*Math.PI/
g))+d},easeOutElastic:function(a,b,d,e,f){var a=1.70158,g=0,h=e;if(b==0)return d;if((b/=f)==1)return d+e;g||(g=f*0.3);h<Math.abs(e)?(h=e,a=g/4):a=g/(2*Math.PI)*Math.asin(e/h);return h*Math.pow(2,-10*b)*Math.sin((b*f-a)*2*Math.PI/g)+e+d},easeInOutElastic:function(a,b,d,e,f){var a=1.70158,g=0,h=e;if(b==0)return d;if((b/=f/2)==2)return d+e;g||(g=f*0.3*1.5);h<Math.abs(e)?(h=e,a=g/4):a=g/(2*Math.PI)*Math.asin(e/h);return b<1?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*f-a)*2*Math.PI/g)+d:h*Math.pow(2,-10*
(b-=1))*Math.sin((b*f-a)*2*Math.PI/g)*0.5+e+d},easeInBack:function(b,d,e,f,g,h){h==a&&(h=1.70158);return f*(d/=g)*d*((h+1)*d-h)+e},easeOutBack:function(b,d,e,f,g,h){h==a&&(h=1.70158);return f*((d=d/g-1)*d*((h+1)*d+h)+1)+e},easeInOutBack:function(b,d,e,f,h,g){g==a&&(g=1.70158);return(d/=h/2)<1?f/2*d*d*(((g*=1.525)+1)*d-g)+e:f/2*((d-=2)*d*(((g*=1.525)+1)*d+g)+2)+e},easeInBounce:function(a,b,e,f,g){return f-d.easing.easeOutBounce(a,g-b,0,f,g)+e},easeOutBounce:function(a,b,d,e,f){return(b/=f)<1/2.75?
e*7.5625*b*b+d:b<2/2.75?e*(7.5625*(b-=1.5/2.75)*b+0.75)+d:b<2.5/2.75?e*(7.5625*(b-=2.25/2.75)*b+0.9375)+d:e*(7.5625*(b-=2.625/2.75)*b+0.984375)+d},easeInOutBounce:function(a,b,e,f,g){return b<g/2?d.easing.easeInBounce(a,b*2,0,f,g)*0.5+e:d.easing.easeOutBounce(a,b*2-g,0,f,g)*0.5+f*0.5+e}})}(jQuery);
(function(d){d.effects.blind=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"],f=d.effects.setMode(b,a.options.mode||"hide"),h=a.options.direction||"vertical";d.effects.save(b,e);b.show();var g=d.effects.createWrapper(b).css({overflow:"hidden"}),i=h=="vertical"?"height":"width",h=h=="vertical"?g.height():g.width();f=="show"&&g.css(i,0);var j={};j[i]=f=="show"?h:0;g.animate(j,a.duration,a.options.easing,function(){f=="hide"&&b.hide();d.effects.restore(b,
e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
(function(d){d.effects.bounce=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"],f=d.effects.setMode(b,a.options.mode||"effect"),h=a.options.direction||"up",g=a.options.distance||20,i=a.options.times||5,j=a.duration||250;/show|hide/.test(f)&&e.push("opacity");d.effects.save(b,e);b.show();d.effects.createWrapper(b);var k=h=="up"||h=="down"?"top":"left",h=h=="up"||h=="left"?"pos":"neg",g=a.options.distance||(k=="top"?b.outerHeight({margin:!0})/3:b.outerWidth({margin:!0})/
3);f=="show"&&b.css("opacity",0).css(k,h=="pos"?-g:g);f=="hide"&&(g/=i*2);f!="hide"&&i--;if(f=="show"){var l={opacity:1};l[k]=(h=="pos"?"+=":"-=")+g;b.animate(l,j/2,a.options.easing);g/=2;i--}for(l=0;l<i;l++){var m={},o={};m[k]=(h=="pos"?"-=":"+=")+g;o[k]=(h=="pos"?"+=":"-=")+g;b.animate(m,j/2,a.options.easing).animate(o,j/2,a.options.easing);g=f=="hide"?g*2:g/2}f=="hide"?(l={opacity:0},l[k]=(h=="pos"?"-=":"+=")+g,b.animate(l,j/2,a.options.easing,function(){b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b);
a.callback&&a.callback.apply(this,arguments)})):(m={},o={},m[k]=(h=="pos"?"-=":"+=")+g,o[k]=(h=="pos"?"+=":"-=")+g,b.animate(m,j/2,a.options.easing).animate(o,j/2,a.options.easing,function(){d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)}));b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
(function(d){d.effects.clip=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right","height","width"],f=d.effects.setMode(b,a.options.mode||"hide"),h=a.options.direction||"vertical";d.effects.save(b,e);b.show();var g=d.effects.createWrapper(b).css({overflow:"hidden"}),g=b[0].tagName=="IMG"?g:b,i={size:h=="vertical"?"height":"width",position:h=="vertical"?"top":"left"},h=h=="vertical"?g.height():g.width();f=="show"&&(g.css(i.size,0),g.css(i.position,h/2));
var j={};j[i.size]=f=="show"?h:0;j[i.position]=f=="show"?0:h/2;g.animate(j,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){f=="hide"&&b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()}})})}})(jQuery);
(function(d){d.effects.drop=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right","opacity"],f=d.effects.setMode(b,a.options.mode||"hide"),h=a.options.direction||"left";d.effects.save(b,e);b.show();d.effects.createWrapper(b);var g=h=="up"||h=="down"?"top":"left",h=h=="up"||h=="left"?"pos":"neg",i=a.options.distance||(g=="top"?b.outerHeight({margin:!0})/2:b.outerWidth({margin:!0})/2);f=="show"&&b.css("opacity",0).css(g,h=="pos"?-i:i);var j={opacity:f=="show"?
1:0};j[g]=(f=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i;b.animate(j,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){f=="hide"&&b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery);
(function(d){d.effects.explode=function(a){return this.queue(function(){var b=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,e=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?d(this).is(":visible")?"hide":"show":a.options.mode;var f=d(this).show().css("visibility","hidden"),h=f.offset();h.top-=parseInt(f.css("marginTop"),10)||0;h.left-=parseInt(f.css("marginLeft"),10)||0;for(var g=f.outerWidth(!0),i=f.outerHeight(!0),j=0;j<b;j++)for(var k=
0;k<e;k++)f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-k*(g/e),top:-j*(i/b)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:i/b,left:h.left+k*(g/e)+(a.options.mode=="show"?(k-Math.floor(e/2))*(g/e):0),top:h.top+j*(i/b)+(a.options.mode=="show"?(j-Math.floor(b/2))*(i/b):0),opacity:a.options.mode=="show"?0:1}).animate({left:h.left+k*(g/e)+(a.options.mode=="show"?0:(k-Math.floor(e/2))*(g/e)),top:h.top+
j*(i/b)+(a.options.mode=="show"?0:(j-Math.floor(b/2))*(i/b)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?f.css({visibility:"visible"}):f.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(f[0]);f.dequeue();d("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
(function(d){d.effects.fade=function(a){return this.queue(function(){var b=d(this),e=d.effects.setMode(b,a.options.mode||"hide");b.animate({opacity:e},{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery);
(function(d){d.effects.fold=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"],f=d.effects.setMode(b,a.options.mode||"hide"),h=a.options.size||15,g=!!a.options.horizFirst,i=a.duration?a.duration/2:d.fx.speeds._default/2;d.effects.save(b,e);b.show();var j=d.effects.createWrapper(b).css({overflow:"hidden"}),k=f=="show"!=g,l=k?["width","height"]:["height","width"],k=k?[j.width(),j.height()]:[j.height(),j.width()],m=/([0-9]+)%/.exec(h);m&&(h=parseInt(m[1],
10)/100*k[f=="hide"?0:1]);f=="show"&&j.css(g?{height:0,width:h}:{height:h,width:0});g={};m={};g[l[0]]=f=="show"?k[0]:h;m[l[1]]=f=="show"?k[1]:0;j.animate(g,i,a.options.easing).animate(m,i,a.options.easing,function(){f=="hide"&&b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
(function(d){d.effects.highlight=function(a){return this.queue(function(){var b=d(this),e=["backgroundImage","backgroundColor","opacity"],f=d.effects.setMode(b,a.options.mode||"show"),h={backgroundColor:b.css("backgroundColor")};if(f=="hide")h.opacity=0;d.effects.save(b,e);b.show().css({backgroundImage:"none",backgroundColor:a.options.color||"#ffff99"}).animate(h,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){f=="hide"&&b.hide();d.effects.restore(b,e);f=="show"&&!d.support.opacity&&
this.style.removeAttribute("filter");a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery);
(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),e=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;isVisible||(b.css("opacity",0).show(),animateTo=1);(e=="hide"&&isVisible||e=="show"&&!isVisible)&&times--;for(e=0;e<times;e++)b.animate({opacity:animateTo},duration,a.options.easing),animateTo=(animateTo+1)%2;b.animate({opacity:animateTo},duration,
a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);
(function(d){d.effects.puff=function(a){return this.queue(function(){var b=d(this),e=d.effects.setMode(b,a.options.mode||"hide"),f=parseInt(a.options.percent,10)||150,h=f/100,g={height:b.height(),width:b.width()};d.extend(a.options,{fade:!0,mode:e,percent:e=="hide"?f:100,from:e=="hide"?g:{height:g.height*h,width:g.width*h}});b.effect("scale",a.options,a.duration,a.callback);b.dequeue()})};d.effects.scale=function(a){return this.queue(function(){var b=d(this),e=d.extend(!0,{},a.options),f=d.effects.setMode(b,
a.options.mode||"effect"),h=parseInt(a.options.percent,10)||(parseInt(a.options.percent,10)==0?0:f=="hide"?0:100),g=a.options.direction||"both",i=a.options.origin;if(f!="effect")e.origin=i||["middle","center"],e.restore=!0;i={height:b.height(),width:b.width()};b.from=a.options.from||(f=="show"?{height:0,width:0}:i);h={y:g!="horizontal"?h/100:1,x:g!="vertical"?h/100:1};b.to={height:i.height*h.y,width:i.width*h.x};if(a.options.fade){if(f=="show")b.from.opacity=0,b.to.opacity=1;if(f=="hide")b.from.opacity=
1,b.to.opacity=0}e.from=b.from;e.to=b.to;e.mode=f;b.effect("size",e,a.duration,a.callback);b.dequeue()})};d.effects.size=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],f=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],g=["fontSize"],i=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],j=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
k=d.effects.setMode(b,a.options.mode||"effect"),l=a.options.restore||!1,m=a.options.scale||"both",o=a.options.origin,p={height:b.height(),width:b.width()};b.from=a.options.from||p;b.to=a.options.to||p;if(o)o=d.effects.getBaseline(o,p),b.from.top=(p.height-b.from.height)*o.y,b.from.left=(p.width-b.from.width)*o.x,b.to.top=(p.height-b.to.height)*o.y,b.to.left=(p.width-b.to.width)*o.x;var n={from:{y:b.from.height/p.height,x:b.from.width/p.width},to:{y:b.to.height/p.height,x:b.to.width/p.width}};if(m==
"box"||m=="both"){if(n.from.y!=n.to.y)e=e.concat(i),b.from=d.effects.setTransition(b,i,n.from.y,b.from),b.to=d.effects.setTransition(b,i,n.to.y,b.to);if(n.from.x!=n.to.x)e=e.concat(j),b.from=d.effects.setTransition(b,j,n.from.x,b.from),b.to=d.effects.setTransition(b,j,n.to.x,b.to)}if((m=="content"||m=="both")&&n.from.y!=n.to.y)e=e.concat(g),b.from=d.effects.setTransition(b,g,n.from.y,b.from),b.to=d.effects.setTransition(b,g,n.to.y,b.to);d.effects.save(b,l?e:f);b.show();d.effects.createWrapper(b);
b.css("overflow","hidden").css(b.from);if(m=="content"||m=="both")i=i.concat(["marginTop","marginBottom"]).concat(g),j=j.concat(["marginLeft","marginRight"]),h=e.concat(i).concat(j),b.find("*[width]").each(function(){child=d(this);l&&d.effects.save(child,h);var b={height:child.height(),width:child.width()};child.from={height:b.height*n.from.y,width:b.width*n.from.x};child.to={height:b.height*n.to.y,width:b.width*n.to.x};if(n.from.y!=n.to.y)child.from=d.effects.setTransition(child,i,n.from.y,child.from),
child.to=d.effects.setTransition(child,i,n.to.y,child.to);if(n.from.x!=n.to.x)child.from=d.effects.setTransition(child,j,n.from.x,child.from),child.to=d.effects.setTransition(child,j,n.to.x,child.to);child.css(child.from);child.animate(child.to,a.duration,a.options.easing,function(){l&&d.effects.restore(child,h)})});b.animate(b.to,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){b.to.opacity===0&&b.css("opacity",b.from.opacity);k=="hide"&&b.hide();d.effects.restore(b,l?e:
f);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery);
(function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"];d.effects.setMode(b,a.options.mode||"effect");var f=a.options.direction||"left",h=a.options.distance||20,g=a.options.times||3,i=a.duration||a.options.duration||140;d.effects.save(b,e);b.show();d.effects.createWrapper(b);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",f={},l={},m={};f[j]=(k=="pos"?"-=":"+=")+h;l[j]=(k=="pos"?"+=":"-=")+h*2;m[j]=(k==
"pos"?"-=":"+=")+h*2;b.animate(f,i,a.options.easing);for(h=1;h<g;h++)b.animate(l,i,a.options.easing).animate(m,i,a.options.easing);b.animate(l,i,a.options.easing).animate(f,i/2,a.options.easing,function(){d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
(function(d){d.effects.slide=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"],f=d.effects.setMode(b,a.options.mode||"show"),h=a.options.direction||"left";d.effects.save(b,e);b.show();d.effects.createWrapper(b).css({overflow:"hidden"});var g=h=="up"||h=="down"?"top":"left",h=h=="up"||h=="left"?"pos":"neg",i=a.options.distance||(g=="top"?b.outerHeight({margin:!0}):b.outerWidth({margin:!0}));f=="show"&&b.css(g,h=="pos"?isNaN(i)?"-"+i:-i:i);var j={};
j[g]=(f=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i;b.animate(j,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){f=="hide"&&b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery);
(function(d){d.effects.transfer=function(a){return this.queue(function(){var b=d(this),e=d(a.options.to),f=e.offset(),e={top:f.top,left:f.left,height:e.innerHeight(),width:e.innerWidth()},f=b.offset(),h=d('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:f.top,left:f.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(e,a.duration,a.options.easing,function(){h.remove();a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
