(function(a,n){function e(b,f){var d,c;d=b.nodeName.toLowerCase();if("area"===d){d=b.parentNode;c=d.name;if(!b.href||!c||"map"!==d.nodeName.toLowerCase())return!1;d=a("img[usemap=#"+c+"]")[0];return!!d&&g(d)}return(/input|select|textarea|button|object/.test(d)?!b.disabled:"a"===d?b.href||f:f)&&g(b)}function g(b){return a.expr.filters.visible(b)&&!a(b).parents().andSelf().filter(function(){return"hidden"===a.css(this,"visibility")}).length}var c=0,d=/^ui-id-\d+$/;a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,
{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({_focus:a.fn.focus,focus:function(b,f){return"number"===typeof b?this.each(function(){var d=this;setTimeout(function(){a(d).focus();f&&f.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;
b=a.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.css(this,"position"))&&/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0);return/fixed/.test(this.css("position"))||!b.length?a(document):
b},zIndex:function(b){if(b!==n)return this.css("zIndex",b);if(this.length){b=a(this[0]);for(var f;b.length&&b[0]!==document;){f=b.css("position");if("absolute"===f||"relative"===f||"fixed"===f)if(f=parseInt(b.css("zIndex"),10),!isNaN(f)&&0!==f)return f;b=b.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++c)})},removeUniqueId:function(){return this.each(function(){d.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?
a.expr.createPseudo(function(b){return function(f){return!!a.data(f,b)}}):function(b,f,d){return!!a.data(b,d[3])},focusable:function(b){return e(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var f=a.attr(b,"tabindex"),d=isNaN(f);return(d||0<=f)&&e(b,!d)}}),a(function(){var b=document.body,f=b.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=100===f.offsetHeight;a.support.selectstart=
"onselectstart"in f;b.removeChild(f).style.display="none"}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,f){function d(f,b,h,e){a.each(c,function(){b-=parseFloat(a.css(f,"padding"+this))||0;h&&(b-=parseFloat(a.css(f,"border"+this+"Width"))||0);e&&(b-=parseFloat(a.css(f,"margin"+this))||0)});return b}var c="Width"===f?["Left","Right"]:["Top","Bottom"],e=f.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};
a.fn["inner"+f]=function(b){return b===n?g["inner"+f].call(this):this.each(function(){a(this).css(e,d(this,b)+"px")})};a.fn["outer"+f]=function(b,c){return"number"!==typeof b?g["outer"+f].call(this,b):this.each(function(){a(this).css(e,d(this,b,!0,c)+"px")})}}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(f){return arguments.length?b.call(this,a.camelCase(f)):b.call(this)}}(a.fn.removeData)),function(){var b=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||
[];a.ui.ie=b.length?!0:!1;a.ui.ie6=6===parseFloat(b[1],10)}(),a.fn.extend({disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.extend(a.ui,{plugin:{add:function(b,f,d){var c;b=a.ui[b].prototype;for(c in d)b.plugins[c]=b.plugins[c]||[],b.plugins[c].push([f,d[c]])},call:function(a,f,d){var c=a.plugins[f];if(c&&a.element[0].parentNode&&
11!==a.element[0].parentNode.nodeType)for(f=0;f<c.length;f++)a.options[c[f][0]]&&c[f][1].apply(a.element,d)}},contains:a.contains,hasScroll:function(b,f){if("hidden"===a(b).css("overflow"))return!1;var d=f&&"left"===f?"scrollLeft":"scrollTop",c=!1;if(0<b[d])return!0;b[d]=1;c=0<b[d];b[d]=0;return c},isOverAxis:function(a,f,d){return a>f&&a<f+d},isOver:function(b,f,d,c,e,g){return a.ui.isOverAxis(b,d,e)&&a.ui.isOverAxis(f,c,g)}}))})(jQuery);
(function(a,n){var e=0,g=Array.prototype.slice,c=a.cleanData;a.cleanData=function(d){for(var b=0,f;null!=(f=d[b]);b++)try{a(f).triggerHandler("remove")}catch(h){}c(d)};a.widget=function(d,b,f){var c,e,g,m,p=d.split(".")[0];d=d.split(".")[1];c=p+"-"+d;f||(f=b,b=a.Widget);a.expr[":"][c.toLowerCase()]=function(f){return!!a.data(f,c)};a[p]=a[p]||{};e=a[p][d];g=a[p][d]=function(f,a){if(!this._createWidget)return new g(f,a);arguments.length&&this._createWidget(f,a)};a.extend(g,e,{version:f.version,_proto:a.extend({},
f),_childConstructors:[]});m=new b;m.options=a.widget.extend({},m.options);a.each(f,function(d,c){a.isFunction(c)&&(f[d]=function(){var f=function(){return b.prototype[d].apply(this,arguments)},a=function(f){return b.prototype[d].apply(this,f)};return function(){var b=this._super,d=this._superApply,h;this._super=f;this._superApply=a;h=c.apply(this,arguments);this._super=b;this._superApply=d;return h}}())});g.prototype=a.widget.extend(m,{widgetEventPrefix:e?m.widgetEventPrefix:d},f,{constructor:g,
namespace:p,widgetName:d,widgetBaseClass:c,widgetFullName:c});e?(a.each(e._childConstructors,function(f,b){var d=b.prototype;a.widget(d.namespace+"."+d.widgetName,g,b._proto)}),delete e._childConstructors):b._childConstructors.push(g);a.widget.bridge(d,g)};a.widget.extend=function(d){for(var b=g.call(arguments,1),f=0,c=b.length,e,k;f<c;f++)for(e in b[f])k=b[f][e],b[f].hasOwnProperty(e)&&k!==n&&(a.isPlainObject(k)?d[e]=a.isPlainObject(d[e])?a.widget.extend({},d[e],k):a.widget.extend({},k):d[e]=k);
return d};a.widget.bridge=function(d,b){var f=b.prototype.widgetFullName||d;a.fn[d]=function(c){var e="string"===typeof c,k=g.call(arguments,1),m=this;c=!e&&k.length?a.widget.extend.apply(null,[c].concat(k)):c;e?this.each(function(){var b,e=a.data(this,f);if(!e)return a.error("cannot call methods on "+d+" prior to initialization; attempted to call method '"+c+"'");if(!a.isFunction(e[c])||"_"===c.charAt(0))return a.error("no such method '"+c+"' for "+d+" widget instance");b=e[c].apply(e,k);if(b!==
e&&b!==n)return m=b&&b.jquery?m.pushStack(b.get()):b,!1}):this.each(function(){var d=a.data(this,f);d?d.option(c||{})._init():a.data(this,f,new b(c,this))});return m}};a.Widget=function(){};a.Widget._childConstructors=[];a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(d,b){b=a(b||this.defaultElement||this)[0];this.element=a(b);this.uuid=e++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=a.widget.extend({},
this.options,this._getCreateOptions(),d);this.bindings=a();this.hoverable=a();this.focusable=a();b!==this&&(a.data(b,this.widgetName,this),a.data(b,this.widgetFullName,this),this._on(!0,this.element,{remove:function(f){f.target===b&&this.destroy()}}),this.document=a(b.style?b.ownerDocument:b.document||b),this.window=a(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,
_create:a.noop,_init:a.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},
option:function(d,b){var f=d,c,e,g;if(0===arguments.length)return a.widget.extend({},this.options);if("string"===typeof d)if(f={},c=d.split("."),d=c.shift(),c.length){e=f[d]=a.widget.extend({},this.options[d]);for(g=0;g<c.length-1;g++)e[c[g]]=e[c[g]]||{},e=e[c[g]];d=c.pop();if(b===n)return e[d]===n?null:e[d];e[d]=b}else{if(b===n)return this.options[d]===n?null:this.options[d];f[d]=b}this._setOptions(f);return this},_setOptions:function(a){for(var b in a)this._setOption(b,a[b]);return this},_setOption:function(a,
b){this.options[a]=b;"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!b).attr("aria-disabled",b),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"));return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(d,b,f){var c,e=this;"boolean"!==typeof d&&(f=b,b=d,d=!1);f?(b=c=a(b),this.bindings=this.bindings.add(b)):(f=b,b=this.element,c=
this.widget());a.each(f,function(f,g){function p(){if(d||!(!0===e.options.disabled||a(this).hasClass("ui-state-disabled")))return("string"===typeof g?e[g]:g).apply(e,arguments)}"string"!==typeof g&&(p.guid=g.guid=g.guid||p.guid||a.guid++);var t=f.match(/^(\w+)\s*(.*)$/),q=t[1]+e.eventNamespace;(t=t[2])?c.delegate(t,q,p):b.bind(q,p)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;a.unbind(b).undelegate(b)},_delay:function(a,b){var f=this;return setTimeout(function(){return("string"===
typeof a?f[a]:a).apply(f,arguments)},b||0)},_hoverable:function(d){this.hoverable=this.hoverable.add(d);this._on(d,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(d){this.focusable=this.focusable.add(d);this._on(d,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(d,b,f){var c,
e=this.options[d];f=f||{};b=a.Event(b);b.type=(d===this.widgetEventPrefix?d:this.widgetEventPrefix+d).toLowerCase();b.target=this.element[0];if(d=b.originalEvent)for(c in d)c in b||(b[c]=d[c]);this.element.trigger(b,f);return!(a.isFunction(e)&&!1===e.apply(this.element[0],[b].concat(f))||b.isDefaultPrevented())}};a.each({show:"fadeIn",hide:"fadeOut"},function(d,b){a.Widget.prototype["_"+d]=function(f,c,e){"string"===typeof c&&(c={effect:c});var g,m=!c?d:!0===c||"number"===typeof c?b:c.effect||b;c=
c||{};"number"===typeof c&&(c={duration:c});g=!a.isEmptyObject(c);c.complete=e;c.delay&&f.delay(c.delay);if(g&&a.effects&&(a.effects.effect[m]||!1!==a.uiBackCompat&&a.effects[m]))f[d](c);else if(m!==d&&f[m])f[m](c.duration,c.easing,e);else f.queue(function(b){a(this)[d]();e&&e.call(f[0]);b()})}});!1!==a.uiBackCompat&&(a.Widget.prototype._getCreateOptions=function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]})})(jQuery);
(function(a,n){var e=!1;a(document).mouseup(function(a){e=!1});a.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(a){return e._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,e.widgetName+".preventClickEvent"))return a.removeData(c.target,e.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1});this.started=
!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(g){if(!e){this._mouseStarted&&this._mouseUp(g);this._mouseDownEvent=g;var c=this,d=1===g.which,b="string"===typeof this.options.cancel&&g.target.nodeName?a(g.target).closest(this.options.cancel).length:!1;if(!d||b||!this._mouseCapture(g))return!0;(this.mouseDelayMet=
!this.options.delay)||(this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(g)&&this._mouseDelayMet(g)&&(this._mouseStarted=!1!==this._mouseStart(g),!this._mouseStarted))return g.preventDefault(),!0;!0===a.data(g.target,this.widgetName+".preventClickEvent")&&a.removeData(g.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(f){return c._mouseMove(f)};this._mouseUpDelegate=function(f){return c._mouseUp(f)};a(document).bind("mousemove."+
this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);g.preventDefault();return e=!0}},_mouseMove:function(e){if(a.ui.ie&&!(9<=document.documentMode)&&!e.button)return this._mouseUp(e);if(this._mouseStarted)return this._mouseDrag(e),e.preventDefault();this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e))?this._mouseDrag(e):this._mouseUp(e));return!this._mouseStarted},_mouseUp:function(e){a(document).unbind("mousemove."+
this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&a.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e));return!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},
_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);
(function(a,n){function e(a,f,b){return[parseInt(a[0],10)*(m.test(a[0])?f/100:1),parseInt(a[1],10)*(m.test(a[1])?b/100:1)]}a.ui=a.ui||{};var g,c=Math.max,d=Math.abs,b=Math.round,f=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+%?/,k=/^\w+/,m=/%$/,p=a.fn.position;a.position={scrollbarWidth:function(){if(g!==n)return g;var f,b,d=a("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>");b=d.children()[0];a("body").append(d);f=b.offsetWidth;
d.css("overflow","scroll");b=b.offsetWidth;f===b&&(b=d[0].clientWidth);d.remove();return g=f-b},getScrollInfo:function(f){var b=f.isWindow?"":f.element.css("overflow-x"),d=f.isWindow?"":f.element.css("overflow-y"),d="scroll"===d||"auto"===d&&f.height<f.element[0].scrollHeight;return{width:"scroll"===b||"auto"===b&&f.width<f.element[0].scrollWidth?a.position.scrollbarWidth():0,height:d?a.position.scrollbarWidth():0}},getWithinInfo:function(f){f=a(f||window);var b=a.isWindow(f[0]);return{element:f,
isWindow:b,offset:f.offset()||{left:0,top:0},scrollLeft:f.scrollLeft(),scrollTop:f.scrollTop(),width:b?f.width():f.outerWidth(),height:b?f.height():f.outerHeight()}}};a.fn.position=function(g){if(!g||!g.of)return p.apply(this,arguments);g=a.extend({},g);var m,s,r,v,u,w=a(g.of),x=a.position.getWithinInfo(g.within),G=a.position.getScrollInfo(x),y=w[0],H=(g.collision||"flip").split(" "),n={};9===y.nodeType?(s=w.width(),r=w.height(),v={top:0,left:0}):a.isWindow(y)?(s=w.width(),r=w.height(),v={top:w.scrollTop(),
left:w.scrollLeft()}):y.preventDefault?(g.at="left top",s=r=0,v={top:y.pageY,left:y.pageX}):(s=w.outerWidth(),r=w.outerHeight(),v=w.offset());u=a.extend({},v);a.each(["my","at"],function(){var a=(g[this]||"").split(" "),b,d;1===a.length&&(a=f.test(a[0])?a.concat(["center"]):h.test(a[0])?["center"].concat(a):["center","center"]);a[0]=f.test(a[0])?a[0]:"center";a[1]=h.test(a[1])?a[1]:"center";b=l.exec(a[0]);d=l.exec(a[1]);n[this]=[b?b[0]:0,d?d[0]:0];g[this]=[k.exec(a[0])[0],k.exec(a[1])[0]]});1===H.length&&
(H[1]=H[0]);"right"===g.at[0]?u.left+=s:"center"===g.at[0]&&(u.left+=s/2);"bottom"===g.at[1]?u.top+=r:"center"===g.at[1]&&(u.top+=r/2);m=e(n.at,s,r);u.left+=m[0];u.top+=m[1];return this.each(function(){var f,h,l=a(this),k=l.outerWidth(),p=l.outerHeight(),y=parseInt(a.css(this,"marginLeft"),10)||0,I=parseInt(a.css(this,"marginTop"),10)||0,M=k+y+(parseInt(a.css(this,"marginRight"),10)||0)+G.width,J=p+I+(parseInt(a.css(this,"marginBottom"),10)||0)+G.height,z=a.extend({},u),A=e(n.my,l.outerWidth(),l.outerHeight());
"right"===g.my[0]?z.left-=k:"center"===g.my[0]&&(z.left-=k/2);"bottom"===g.my[1]?z.top-=p:"center"===g.my[1]&&(z.top-=p/2);z.left+=A[0];z.top+=A[1];a.support.offsetFractions||(z.left=b(z.left),z.top=b(z.top));f={marginLeft:y,marginTop:I};a.each(["left","top"],function(b,d){if(a.ui.position[H[b]])a.ui.position[H[b]][d](z,{targetWidth:s,targetHeight:r,elemWidth:k,elemHeight:p,collisionPosition:f,collisionWidth:M,collisionHeight:J,offset:[m[0]+A[0],m[1]+A[1]],my:g.my,at:g.at,within:x,elem:l})});a.fn.bgiframe&&
l.bgiframe();g.using&&(h=function(f){var a=v.left-z.left,b=a+s-k,h=v.top-z.top,e=h+r-p,m={target:{element:w,left:v.left,top:v.top,width:s,height:r},element:{element:l,left:z.left,top:z.top,width:k,height:p},horizontal:0>b?"left":0<a?"right":"center",vertical:0>e?"top":0<h?"bottom":"middle"};s<k&&d(a+b)<s&&(m.horizontal="center");r<p&&d(h+e)<r&&(m.vertical="middle");c(d(a),d(b))>c(d(h),d(e))?m.important="horizontal":m.important="vertical";g.using.call(this,f,m)});l.offset(a.extend(z,{using:h}))})};
a.ui.position={fit:{left:function(f,a){var b=a.within,d=b.isWindow?b.scrollLeft:b.offset.left,h=b.width,e=f.left-a.collisionPosition.marginLeft,b=d-e,g=e+a.collisionWidth-h-d;a.collisionWidth>h?0<b&&0>=g?(d=f.left+b+a.collisionWidth-h-d,f.left+=b-d):f.left=0<g&&0>=b?d:b>g?d+h-a.collisionWidth:d:f.left=0<b?f.left+b:0<g?f.left-g:c(f.left-e,f.left)},top:function(f,a){var b=a.within,d=b.isWindow?b.scrollTop:b.offset.top,h=a.within.height,e=f.top-a.collisionPosition.marginTop,b=d-e,g=e+a.collisionHeight-
h-d;a.collisionHeight>h?0<b&&0>=g?(d=f.top+b+a.collisionHeight-h-d,f.top+=b-d):f.top=0<g&&0>=b?d:b>g?d+h-a.collisionHeight:d:f.top=0<b?f.top+b:0<g?f.top-g:c(f.top-e,f.top)}},flip:{left:function(f,a){var b=a.within,c=b.offset.left+b.scrollLeft,h=b.width,e=b.isWindow?b.scrollLeft:b.offset.left,g=f.left-a.collisionPosition.marginLeft,b=g-e,l=g+a.collisionWidth-h-e,g="left"===a.my[0]?-a.elemWidth:"right"===a.my[0]?a.elemWidth:0,k="left"===a.at[0]?a.targetWidth:"right"===a.at[0]?-a.targetWidth:0,m=-2*
a.offset[0];if(0>b){if(c=f.left+g+k+m+a.collisionWidth-h-c,0>c||c<d(b))f.left+=g+k+m}else if(0<l&&(c=f.left-a.collisionPosition.marginLeft+g+k+m-e,0<c||d(c)<l))f.left+=g+k+m},top:function(f,a){var b=a.within,c=b.offset.top+b.scrollTop,h=b.height,e=b.isWindow?b.scrollTop:b.offset.top,g=f.top-a.collisionPosition.marginTop,b=g-e,l=g+a.collisionHeight-h-e,g="top"===a.my[1]?-a.elemHeight:"bottom"===a.my[1]?a.elemHeight:0,k="top"===a.at[1]?a.targetHeight:"bottom"===a.at[1]?-a.targetHeight:0,m=-2*a.offset[1];
if(0>b){if(c=f.top+g+k+m+a.collisionHeight-h-c,f.top+g+k+m>b&&(0>c||c<d(b)))f.top+=g+k+m}else if(0<l&&(c=f.top-a.collisionPosition.marginTop+g+k+m-e,f.top+g+k+m>l&&(0<c||d(c)<l)))f.top+=g+k+m}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments);a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments);a.ui.position.fit.top.apply(this,arguments)}}};(function(){var f,b,d,c,h=document.getElementsByTagName("body")[0];d=document.createElement("div");
f=document.createElement(h?"div":"body");b={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};h&&a.extend(b,{position:"absolute",left:"-1000px",top:"-1000px"});for(c in b)f.style[c]=b[c];f.appendChild(d);b=h||document.documentElement;b.insertBefore(f,b.firstChild);d.style.cssText="position: absolute; left: 10.7432222px;";d=a(d).offset().left;a.support.offsetFractions=10<d&&11>d;f.innerHTML="";b.removeChild(f)})();!1!==a.uiBackCompat&&function(f){var a=f.fn.position;f.fn.position=
function(b){if(!b||!b.offset)return a.call(this,b);var d=b.offset.split(" "),c=b.at.split(" ");1===d.length&&(d[1]=d[0]);/^\d/.test(d[0])&&(d[0]="+"+d[0]);/^\d/.test(d[1])&&(d[1]="+"+d[1]);1===c.length&&(/left|center|right/.test(c[0])?c[1]="center":(c[1]=c[0],c[0]="center"));return a.call(this,f.extend(b,{at:c[0]+d[0]+" "+c[1]+d[1],offset:n}))}}(jQuery)})(jQuery);
(function(a,n){a.widget("ui.draggable",a.ui.mouse,{version:"1.9.2",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(){"original"==this.options.helper&&!/^(?: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(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(e){var g=this.options;if(this.helper||g.disabled||a(e.target).is(".ui-resizable-handle"))return!1;this.handle=this._getHandle(e);if(!this.handle)return!1;a(!0===
g.iframeFix?"iframe":g.iframeFix).each(function(){a('<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(a(this).offset()).appendTo("body")});return!0},_mouseStart:function(e){var g=this.options;this.helper=this._createHelper(e);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();a.ui.ddmanager&&(a.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};a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;
g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt);g.containment&&this._setContainment();if(!1===this._trigger("start",e))return this._clear(),!1;this._cacheHelperProportions();a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,e);this._mouseDrag(e,!0);a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,e);return!0},_mouseDrag:function(e,g){this.position=this._generatePosition(e);this.positionAbs=this._convertPositionTo("absolute");if(!g){var c=this._uiHash();if(!1===this._trigger("drag",
e,c))return this._mouseUp({}),!1;this.position=c.position}if(!this.options.axis||"y"!=this.options.axis)this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||"x"!=this.options.axis)this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,e);return!1},_mouseStop:function(e){var g=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(g=a.ui.ddmanager.drop(this,e));this.dropped&&(g=this.dropped,this.dropped=!1);for(var c=this.element[0],d=!1;c&&(c=c.parentNode);)c==
document&&(d=!0);if(!d&&"original"===this.options.helper)return!1;if("invalid"==this.options.revert&&!g||"valid"==this.options.revert&&g||!0===this.options.revert||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,g)){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==b._trigger("stop",e)&&b._clear()})}else!1!==this._trigger("stop",e)&&this._clear();return!1},_mouseUp:function(e){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});
a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,e);return a.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(e){var g=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;a(this.options.handle,this.element).find("*").andSelf().each(function(){this==e.target&&(g=!0)});return g},_createHelper:function(e){var g=this.options;e=a.isFunction(g.helper)?a(g.helper.apply(this.element[0],
[e])):"clone"==g.helper?this.element.clone().removeAttr("id"):this.element;e.parents("body").length||e.appendTo("parent"==g.appendTo?this.element[0].parentNode:g.appendTo);e[0]!=this.element[0]&&!/(fixed|absolute)/.test(e.css("position"))&&e.css("position","absolute");return e},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" "));a.isArray(e)&&(e={left:+e[0],top:+e[1]||0});"left"in e&&(this.offset.click.left=e.left+this.margins.left);"right"in e&&(this.offset.click.left=this.helperProportions.width-
e.right+this.margins.left);"top"in e&&(this.offset.click.top=e.top+this.margins.top);"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==
document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)e={top:0,left:0};return{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){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()}}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 e=this.options;"parent"==e.containment&&
(e.containment=this.helper[0].parentNode);if("document"==e.containment||"window"==e.containment)this.containment=["document"==e.containment?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==e.containment?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==e.containment?0:a(window).scrollLeft())+a("document"==e.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==e.containment?0:a(window).scrollTop())+
(a("document"==e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(e.containment)&&e.containment.constructor!=Array){var e=a(e.containment),g=e[0];if(g){e.offset();var c="hidden"!=a(g).css("overflow");this.containment=[(parseInt(a(g).css("borderLeftWidth"),10)||0)+(parseInt(a(g).css("paddingLeft"),10)||0),(parseInt(a(g).css("borderTopWidth"),10)||0)+(parseInt(a(g).css("paddingTop"),10)||
0),(c?Math.max(g.scrollWidth,g.offsetWidth):g.offsetWidth)-(parseInt(a(g).css("borderLeftWidth"),10)||0)-(parseInt(a(g).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(g.scrollHeight,g.offsetHeight):g.offsetHeight)-(parseInt(a(g).css("borderTopWidth"),10)||0)-(parseInt(a(g).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=e}}else e.containment.constructor==Array&&(this.containment=
e.containment)},_convertPositionTo:function(e,g){g||(g=this.position);var c="absolute"==e?1:-1,d="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,b=/(html|body)/i.test(d[0].tagName);return{top:g.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():b?0:d.scrollTop())*c,left:g.left+this.offset.relative.left*c+this.offset.parent.left*c-
("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():b?0:d.scrollLeft())*c}},_generatePosition:function(e){var g=this.options,c="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,d=/(html|body)/i.test(c[0].tagName),b=e.pageX,f=e.pageY;if(this.originalPosition){var h;this.containment&&(this.relative_container?(h=this.relative_container.offset(),h=[this.containment[0]+h.left,this.containment[1]+
h.top,this.containment[2]+h.left,this.containment[3]+h.top]):h=this.containment,e.pageX-this.offset.click.left<h[0]&&(b=h[0]+this.offset.click.left),e.pageY-this.offset.click.top<h[1]&&(f=h[1]+this.offset.click.top),e.pageX-this.offset.click.left>h[2]&&(b=h[2]+this.offset.click.left),e.pageY-this.offset.click.top>h[3]&&(f=h[3]+this.offset.click.top));g.grid&&(f=g.grid[1]?this.originalPageY+Math.round((f-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,f=h?!(f-this.offset.click.top<h[1]||
f-this.offset.click.top>h[3])?f:!(f-this.offset.click.top<h[1])?f-g.grid[1]:f+g.grid[1]:f,b=g.grid[0]?this.originalPageX+Math.round((b-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,b=h?!(b-this.offset.click.left<h[0]||b-this.offset.click.left>h[2])?b:!(b-this.offset.click.left<h[0])?b-g.grid[0]:b+g.grid[0]:b)}return{top:f-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():d?0:c.scrollTop()),left:b-this.offset.click.left-
this.offset.relative.left-this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():d?0:c.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(e,g,c){c=c||this._uiHash();a.ui.plugin.call(this,e,[g,c]);"drag"==e&&(this.positionAbs=this._convertPositionTo("absolute"));return a.Widget.prototype._trigger.call(this,
e,g,c)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.ui.plugin.add("draggable","connectToSortable",{start:function(e,g){var c=a(this).data("draggable"),d=c.options,b=a.extend({},g,{item:c.element});c.sortables=[];a(d.connectToSortable).each(function(){var f=a.data(this,"sortable");f&&!f.options.disabled&&(c.sortables.push({instance:f,shouldRevert:f.options.revert}),f.refreshPositions(),f._trigger("activate",
e,b))})},stop:function(e,g){var c=a(this).data("draggable"),d=a.extend({},g,{item:c.element});a.each(c.sortables,function(){this.instance.isOver?(this.instance.isOver=0,c.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"==c.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",
e,d))})},drag:function(e,g){var c=a(this).data("draggable"),d=this;a.each(c.sortables,function(b){var f=!1,h=this;this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;this.instance._intersectsWith(this.instance.containerCache)&&(f=!0,a.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;this!=h&&this.instance._intersectsWith(this.instance.containerCache)&&
a.ui.contains(h.instance.element[0],this.instance.element[0])&&(f=!1);return f}));f?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(d).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 g.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=
c.offset.click.top,this.instance.offset.click.left=c.offset.click.left,this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top,c._trigger("toSortable",e),c.dropped=this.instance.element,c.currentItem=c.element,this.instance.fromOutside=c),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=
!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),c._trigger("fromSortable",e),c.dropped=!1)})}});a.ui.plugin.add("draggable","cursor",{start:function(e,g){var c=a("body"),d=a(this).data("draggable").options;c.css("cursor")&&(d._cursor=c.css("cursor"));c.css("cursor",d.cursor)},stop:function(e,
g){var c=a(this).data("draggable").options;c._cursor&&a("body").css("cursor",c._cursor)}});a.ui.plugin.add("draggable","opacity",{start:function(e,g){var c=a(g.helper),d=a(this).data("draggable").options;c.css("opacity")&&(d._opacity=c.css("opacity"));c.css("opacity",d.opacity)},stop:function(e,g){var c=a(this).data("draggable").options;c._opacity&&a(g.helper).css("opacity",c._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(e,g){var c=a(this).data("draggable");c.scrollParent[0]!=
document&&"HTML"!=c.scrollParent[0].tagName&&(c.overflowOffset=c.scrollParent.offset())},drag:function(e,g){var c=a(this).data("draggable"),d=c.options,b=!1;if(c.scrollParent[0]!=document&&"HTML"!=c.scrollParent[0].tagName){if(!d.axis||"x"!=d.axis)c.overflowOffset.top+c.scrollParent[0].offsetHeight-e.pageY<d.scrollSensitivity?c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+d.scrollSpeed:e.pageY-c.overflowOffset.top<d.scrollSensitivity&&(c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-
d.scrollSpeed);if(!d.axis||"y"!=d.axis)c.overflowOffset.left+c.scrollParent[0].offsetWidth-e.pageX<d.scrollSensitivity?c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+d.scrollSpeed:e.pageX-c.overflowOffset.left<d.scrollSensitivity&&(c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-d.scrollSpeed)}else{if(!d.axis||"x"!=d.axis)e.pageY-a(document).scrollTop()<d.scrollSensitivity?b=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed):a(window).height()-(e.pageY-a(document).scrollTop())<
d.scrollSensitivity&&(b=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed));if(!d.axis||"y"!=d.axis)e.pageX-a(document).scrollLeft()<d.scrollSensitivity?b=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed):a(window).width()-(e.pageX-a(document).scrollLeft())<d.scrollSensitivity&&(b=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed))}!1!==b&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,e)}});a.ui.plugin.add("draggable","snap",{start:function(e,
g){var c=a(this).data("draggable"),d=c.options;c.snapElements=[];a(d.snap.constructor!=String?d.snap.items||":data(draggable)":d.snap).each(function(){var b=a(this),f=b.offset();this!=c.element[0]&&c.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:f.top,left:f.left})})},drag:function(e,g){for(var c=a(this).data("draggable"),d=c.options,b=d.snapTolerance,f=g.offset.left,h=f+c.helperProportions.width,l=g.offset.top,k=l+c.helperProportions.height,m=c.snapElements.length-
1;0<=m;m--){var p=c.snapElements[m].left,t=p+c.snapElements[m].width,q=c.snapElements[m].top,s=q+c.snapElements[m].height;if(p-b<f&&f<t+b&&q-b<l&&l<s+b||p-b<f&&f<t+b&&q-b<k&&k<s+b||p-b<h&&h<t+b&&q-b<l&&l<s+b||p-b<h&&h<t+b&&q-b<k&&k<s+b){if("inner"!=d.snapMode){var r=Math.abs(q-k)<=b,v=Math.abs(s-l)<=b,u=Math.abs(p-h)<=b,w=Math.abs(t-f)<=b;r&&(g.position.top=c._convertPositionTo("relative",{top:q-c.helperProportions.height,left:0}).top-c.margins.top);v&&(g.position.top=c._convertPositionTo("relative",
{top:s,left:0}).top-c.margins.top);u&&(g.position.left=c._convertPositionTo("relative",{top:0,left:p-c.helperProportions.width}).left-c.margins.left);w&&(g.position.left=c._convertPositionTo("relative",{top:0,left:t}).left-c.margins.left)}var x=r||v||u||w;"outer"!=d.snapMode&&(r=Math.abs(q-l)<=b,v=Math.abs(s-k)<=b,u=Math.abs(p-f)<=b,w=Math.abs(t-h)<=b,r&&(g.position.top=c._convertPositionTo("relative",{top:q,left:0}).top-c.margins.top),v&&(g.position.top=c._convertPositionTo("relative",{top:s-c.helperProportions.height,
left:0}).top-c.margins.top),u&&(g.position.left=c._convertPositionTo("relative",{top:0,left:p}).left-c.margins.left),w&&(g.position.left=c._convertPositionTo("relative",{top:0,left:t-c.helperProportions.width}).left-c.margins.left));!c.snapElements[m].snapping&&(r||v||u||w||x)&&c.options.snap.snap&&c.options.snap.snap.call(c.element,e,a.extend(c._uiHash(),{snapItem:c.snapElements[m].item}));c.snapElements[m].snapping=r||v||u||w||x}else c.snapElements[m].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,
e,a.extend(c._uiHash(),{snapItem:c.snapElements[m].item})),c.snapElements[m].snapping=!1}}});a.ui.plugin.add("draggable","stack",{start:function(e,g){var c=a(this).data("draggable").options,c=a.makeArray(a(c.stack)).sort(function(b,f){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(f).css("zIndex"),10)||0)});if(c.length){var d=parseInt(c[0].style.zIndex)||0;a(c).each(function(a){this.style.zIndex=d+a});this[0].style.zIndex=d+c.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(e,
g){var c=a(g.helper),d=a(this).data("draggable").options;c.css("zIndex")&&(d._zIndex=c.css("zIndex"));c.css("zIndex",d.zIndex)},stop:function(e,g){var c=a(this).data("draggable").options;c._zIndex&&a(g.helper).css("zIndex",c._zIndex)}})})(jQuery);
(function(a,n){a.widget("ui.droppable",{version:"1.9.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var e=this.options,g=e.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(g)?g:function(a){return a.is(g)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[e.scope]=a.ui.ddmanager.droppables[e.scope]||[];a.ui.ddmanager.droppables[e.scope].push(this);
e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=a.ui.ddmanager.droppables[this.options.scope],g=0;g<e.length;g++)e[g]==this&&e.splice(g,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,g){"accept"==e&&(this.accept=a.isFunction(g)?g:function(a){return a.is(g)});a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var g=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);
g&&this._trigger("activate",e,this.ui(g))},_deactivate:function(e){var g=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);g&&this._trigger("deactivate",e,this.ui(g))},_over:function(e){var g=a.ui.ddmanager.current;if(g&&(g.currentItem||g.element)[0]!=this.element[0])if(this.accept.call(this.element[0],g.currentItem||g.element))this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(g))},_out:function(e){var g=
a.ui.ddmanager.current;if(g&&(g.currentItem||g.element)[0]!=this.element[0])if(this.accept.call(this.element[0],g.currentItem||g.element))this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(g))},_drop:function(e,g){var c=g||a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return!1;var d=!1;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&
!b.options.disabled&&b.options.scope==c.options.scope&&b.accept.call(b.element[0],c.currentItem||c.element)&&a.ui.intersect(c,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return d=!0,!1});return d?!1:this.accept.call(this.element[0],c.currentItem||c.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(c)),this.element):!1},ui:function(a){return{draggable:a.currentItem||
a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});a.ui.intersect=function(e,g,c){if(!g.offset)return!1;var d=(e.positionAbs||e.position.absolute).left,b=d+e.helperProportions.width,f=(e.positionAbs||e.position.absolute).top,h=f+e.helperProportions.height,l=g.offset.left,k=l+g.proportions.width,m=g.offset.top,p=m+g.proportions.height;switch(c){case "fit":return l<=d&&b<=k&&m<=f&&h<=p;case "intersect":return l<d+e.helperProportions.width/2&&b-e.helperProportions.width/2<k&&m<f+
e.helperProportions.height/2&&h-e.helperProportions.height/2<p;case "pointer":return a.ui.isOver((e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,m,l,g.proportions.height,g.proportions.width);case "touch":return(f>=m&&f<=p||h>=m&&h<=p||f<m&&h>p)&&(d>=l&&d<=k||b>=l&&b<=k||d<l&&b>k);default:return!1}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var c=a.ui.ddmanager.droppables[e.options.scope]||
[],d=g?g.type:null,b=(e.currentItem||e.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||e&&!c[f].accept.call(c[f].element[0],e.currentItem||e.element))){for(var h=0;h<b.length;h++)if(b[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible="none"!=c[f].element.css("display");c[f].visible&&("mousedown"==d&&c[f]._activate.call(c[f],g),c[f].offset=c[f].element.offset(),c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight})}},
drop:function(e,g){var c=!1;a.each(a.ui.ddmanager.droppables[e.options.scope]||[],function(){if(this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(e,this,this.options.tolerance)&&(c=this._drop.call(this,g)||c),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)))this.isout=1,this.isover=0,this._deactivate.call(this,g)});return c},dragStart:function(e,g){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||
a.ui.ddmanager.prepareOffsets(e,g)})},drag:function(e,g){e.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(e,g);a.each(a.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var c=a.ui.intersect(e,this,this.options.tolerance);if(c=!c&&1==this.isover?"isout":c&&0==this.isover?"isover":null){var d;if(this.options.greedy){var b=this.options.scope,f=this.element.parents(":data(droppable)").filter(function(){return a.data(this,"droppable").options.scope===
b});f.length&&(d=a.data(f[0],"droppable"),d.greedyChild="isover"==c?1:0)}d&&"isover"==c&&(d.isover=0,d.isout=1,d._out.call(d,g));this[c]=1;this["isout"==c?"isover":"isout"]=0;this["isover"==c?"_over":"_out"].call(this,g);d&&"isout"==c&&(d.isout=0,d.isover=1,d._over.call(d,g))}}})},dragStop:function(e,g){e.element.parentsUntil("body").unbind("scroll.droppable");e.options.refreshPositions||a.ui.ddmanager.prepareOffsets(e,g)}}})(jQuery);
(function(a,n){a.widget("ui.resizable",a.ui.mouse,{version:"1.9.2",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 c=this,d=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!d.aspectRatio,aspectRatio:d.aspectRatio,originalElement:this.element,
_proportionallyResizeElements:[],_helper:d.helper||d.ghost||d.animate?d.helper||"ui-resizable-helper":null});this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a('<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=d.handles||(!a(".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){"all"==this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var b=this.handles.split(",");
this.handles={};for(var f=0;f<b.length;f++){var h=a.trim(b[f]),e=a('<div class="ui-resizable-handle ui-resizable-'+h+'"></div>');e.css({zIndex:d.zIndex});"se"==h&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[h]=".ui-resizable-"+h;this.element.append(e)}}this._renderAxis=function(f){f=f||this.element;for(var b in this.handles){this.handles[b].constructor==String&&(this.handles[b]=a(this.handles[b],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=
a(this.handles[b],this.element),c=0,c=/sw|ne|nw|se|n|s/.test(b)?d.outerHeight():d.outerWidth(),d=["padding",/ne|nw|n/.test(b)?"Top":/se|sw|s/.test(b)?"Bottom":/^e$/.test(b)?"Right":"Left"].join("");f.css(d,c);this._proportionallyResize()}a(this.handles[b])}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!c.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);c.axis=
a&&a[1]?a[1]:"se"}});d.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){d.disabled||(a(this).removeClass("ui-resizable-autohide"),c._handles.show())}).mouseleave(function(){!d.disabled&&!c.resizing&&(a(this).addClass("ui-resizable-autohide"),c._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy();var c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
if(this.elementIsWrapper){c(this.element);var d=this.element;this.originalElement.css({position:d.css("position"),width:d.outerWidth(),height:d.outerHeight(),top:d.css("top"),left:d.css("left")}).insertAfter(d);d.remove()}this.originalElement.css("resize",this.originalResizeStyle);c(this.originalElement);return this},_mouseCapture:function(c){var d=!1,b;for(b in this.handles)a(this.handles[b])[0]==c.target&&(d=!0);return!this.options.disabled&&d},_mouseStart:function(c){var d=this.options,b=this.element.position(),
f=this.element;this.resizing=!0;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&&f.css({position:"absolute",top:b.top,left:b.left});this._renderProxy();var b=e(this.helper.css("left")),h=e(this.helper.css("top"));d.containment&&(b+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0);this.offset=this.helper.offset();this.position={left:b,top:h};this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:
{width:f.width(),height:f.height()};this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()};this.originalPosition={left:b,top:h};this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()};this.originalMousePosition={left:c.pageX,top:c.pageY};this.aspectRatio="number"==typeof d.aspectRatio?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;d=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",
"auto"==d?this.axis+"-resize":d);f.addClass("ui-resizable-resizing");this._propagate("start",c);return!0},_mouseDrag:function(a){var d=this.helper,b=this.originalMousePosition,f=this._change[this.axis];if(!f)return!1;b=f.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(c){this.resizing=!1;var d=this.options;if(this._helper){var b=this._proportionallyResizeElements,f=b.length&&/textarea/i.test(b[0].nodeName),b=f&&a.ui.hasScroll(b[0],"left")?0:this.sizeDiff.height,f=f?0:this.sizeDiff.width,f={width:this.helper.width()-f,height:this.helper.height()-b},b=parseInt(this.element.css("left"),
10)+(this.position.left-this.originalPosition.left)||null,h=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;d.animate||this.element.css(a.extend(f,{top:h,left:b}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!d.animate&&this._proportionallyResize()}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",c);this._helper&&this.helper.remove();return!1},_updateVirtualBoundaries:function(a){var d=
this.options,b,f,h,d={minWidth:g(d.minWidth)?d.minWidth:0,maxWidth:g(d.maxWidth)?d.maxWidth:Infinity,minHeight:g(d.minHeight)?d.minHeight:0,maxHeight:g(d.maxHeight)?d.maxHeight:Infinity};if(this._aspectRatio||a)a=d.minHeight*this.aspectRatio,f=d.minWidth/this.aspectRatio,b=d.maxHeight*this.aspectRatio,h=d.maxWidth/this.aspectRatio,a>d.minWidth&&(d.minWidth=a),f>d.minHeight&&(d.minHeight=f),b<d.maxWidth&&(d.maxWidth=b),h<d.maxHeight&&(d.maxHeight=h);this._vBoundaries=d},_updateCache:function(a){this.offset=
this.helper.offset();g(a.left)&&(this.position.left=a.left);g(a.top)&&(this.position.top=a.top);g(a.height)&&(this.size.height=a.height);g(a.width)&&(this.size.width=a.width)},_updateRatio:function(a,d){var b=this.position,f=this.size,h=this.axis;g(a.height)?a.width=a.height*this.aspectRatio:g(a.width)&&(a.height=a.width/this.aspectRatio);"sw"==h&&(a.left=b.left+(f.width-a.width),a.top=null);"nw"==h&&(a.top=b.top+(f.height-a.height),a.left=b.left+(f.width-a.width));return a},_respectSize:function(a,
d){var b=this._vBoundaries,f=this.axis,h=g(a.width)&&b.maxWidth&&b.maxWidth<a.width,e=g(a.height)&&b.maxHeight&&b.maxHeight<a.height,k=g(a.width)&&b.minWidth&&b.minWidth>a.width,m=g(a.height)&&b.minHeight&&b.minHeight>a.height;k&&(a.width=b.minWidth);m&&(a.height=b.minHeight);h&&(a.width=b.maxWidth);e&&(a.height=b.maxHeight);var p=this.originalPosition.left+this.originalSize.width,t=this.position.top+this.size.height,q=/sw|nw|w/.test(f),f=/nw|ne|n/.test(f);k&&q&&(a.left=p-b.minWidth);h&&q&&(a.left=
p-b.maxWidth);m&&f&&(a.top=t-b.minHeight);e&&f&&(a.top=t-b.maxHeight);(b=!a.width&&!a.height)&&!a.left&&a.top?a.top=null:b&&!a.top&&a.left&&(a.left=null);return a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var c=this.helper||this.element,d=0;d<this._proportionallyResizeElements.length;d++){var b=this._proportionallyResizeElements[d];if(!this.borderDif){var f=[b.css("borderTopWidth"),b.css("borderRightWidth"),b.css("borderBottomWidth"),b.css("borderLeftWidth")],
h=[b.css("paddingTop"),b.css("paddingRight"),b.css("paddingBottom"),b.css("paddingLeft")];this.borderDif=a.map(f,function(a,f){var b=parseInt(a,10)||0,d=parseInt(h[f],10)||0;return b+d})}b.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var c=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var d=a.ui.ie6?1:0,b=a.ui.ie6?
2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+b,height:this.element.outerHeight()+b,position:"absolute",left:this.elementOffset.left-d+"px",top:this.elementOffset.top-d+"px",zIndex:++c.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,d,b){return{width:this.originalSize.width+d}},w:function(a,d,b){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(c,d,b){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[c,d,b]))},sw:function(c,d,b){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[c,d,b]))},ne:function(c,d,b){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[c,d,b]))},nw:function(c,d,b){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,
[c,d,b]))}},_propagate:function(c,d){a.ui.plugin.call(this,c,[d,this.ui()]);"resize"!=c&&this._trigger(c,d,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}}});a.ui.plugin.add("resizable","alsoResize",{start:function(c,d){var b=a(this).data("resizable").options,f=function(f){a(f).each(function(){var f=a(this);f.data("resizable-alsoresize",
{width:parseInt(f.width(),10),height:parseInt(f.height(),10),left:parseInt(f.css("left"),10),top:parseInt(f.css("top"),10)})})};"object"==typeof b.alsoResize&&!b.alsoResize.parentNode?b.alsoResize.length?(b.alsoResize=b.alsoResize[0],f(b.alsoResize)):a.each(b.alsoResize,function(a){f(a)}):f(b.alsoResize)},resize:function(c,d){var b=a(this).data("resizable"),f=b.options,h=b.originalSize,e=b.originalPosition,g={height:b.size.height-h.height||0,width:b.size.width-h.width||0,top:b.position.top-e.top||
0,left:b.position.left-e.left||0},m=function(f,b){a(f).each(function(){var f=a(this),c=a(this).data("resizable-alsoresize"),h={},e=b&&b.length?b:f.parents(d.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(e,function(a,f){var b=(c[f]||0)+(g[f]||0);b&&0<=b&&(h[f]=b||null)});f.css(h)})};"object"==typeof f.alsoResize&&!f.alsoResize.nodeType?a.each(f.alsoResize,function(a,f){m(a,f)}):m(f.alsoResize)},stop:function(c,d){a(this).removeData("resizable-alsoresize")}});
a.ui.plugin.add("resizable","animate",{stop:function(c,d){var b=a(this).data("resizable"),f=b.options,h=b._proportionallyResizeElements,e=h.length&&/textarea/i.test(h[0].nodeName),g=e&&a.ui.hasScroll(h[0],"left")?0:b.sizeDiff.height,e={width:b.size.width-(e?0:b.sizeDiff.width),height:b.size.height-g},g=parseInt(b.element.css("left"),10)+(b.position.left-b.originalPosition.left)||null,m=parseInt(b.element.css("top"),10)+(b.position.top-b.originalPosition.top)||null;b.element.animate(a.extend(e,m&&
g?{top:m,left:g}:{}),{duration:f.animateDuration,easing:f.animateEasing,step:function(){var f={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)};h&&h.length&&a(h[0]).css({width:f.width,height:f.height});b._updateCache(f);b._propagate("resize",c)}})}});a.ui.plugin.add("resizable","containment",{start:function(c,d){var b=a(this).data("resizable"),f=b.element,h=b.options.containment;if(f=
h instanceof a?h.get(0):/parent/.test(h)?f.parent().get(0):h)if(b.containerElement=a(f),/document/.test(h)||h==document)b.containerOffset={left:0,top:0},b.containerPosition={left:0,top:0},b.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var g=a(f),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,f){k[a]=e(g.css("padding"+f))});b.containerOffset=g.offset();b.containerPosition=g.position();b.containerSize=
{height:g.innerHeight()-k[3],width:g.innerWidth()-k[1]};var h=b.containerOffset,m=b.containerSize.height,p=b.containerSize.width,p=a.ui.hasScroll(f,"left")?f.scrollWidth:p,m=a.ui.hasScroll(f)?f.scrollHeight:m;b.parentData={element:f,left:h.left,top:h.top,width:p,height:m}}},resize:function(c,d){var b=a(this).data("resizable"),f=b.options,h=b.containerOffset,e=b.position,g=b._aspectRatio||c.shiftKey,m={top:0,left:0},p=b.containerElement;p[0]!=document&&/static/.test(p.css("position"))&&(m=h);if(e.left<
(b._helper?h.left:0))b.size.width+=b._helper?b.position.left-h.left:b.position.left-m.left,g&&(b.size.height=b.size.width/b.aspectRatio),b.position.left=f.helper?h.left:0;if(e.top<(b._helper?h.top:0))b.size.height+=b._helper?b.position.top-h.top:b.position.top,g&&(b.size.width=b.size.height*b.aspectRatio),b.position.top=b._helper?h.top:0;b.offset.left=b.parentData.left+b.position.left;b.offset.top=b.parentData.top+b.position.top;f=Math.abs(b.offset.left-m.left+b.sizeDiff.width);h=Math.abs((b._helper?
b.offset.top-m.top:b.offset.top-h.top)+b.sizeDiff.height);m=b.containerElement.get(0)==b.element.parent().get(0);e=/relative|absolute/.test(b.containerElement.css("position"));m&&e&&(f-=b.parentData.left);f+b.size.width>=b.parentData.width&&(b.size.width=b.parentData.width-f,g&&(b.size.height=b.size.width/b.aspectRatio));h+b.size.height>=b.parentData.height&&(b.size.height=b.parentData.height-h,g&&(b.size.width=b.size.height*b.aspectRatio))},stop:function(c,d){var b=a(this).data("resizable"),f=b.options,
h=b.containerOffset,e=b.containerPosition,g=b.containerElement,m=a(b.helper),p=m.offset(),t=m.outerWidth()-b.sizeDiff.width,m=m.outerHeight()-b.sizeDiff.height;b._helper&&!f.animate&&/relative/.test(g.css("position"))&&a(this).css({left:p.left-e.left-h.left,width:t,height:m});b._helper&&!f.animate&&/static/.test(g.css("position"))&&a(this).css({left:p.left-e.left-h.left,width:t,height:m})}});a.ui.plugin.add("resizable","ghost",{start:function(c,d){var b=a(this).data("resizable"),f=b.options,h=b.size;
b.ghost=b.originalElement.clone();b.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("string"==typeof f.ghost?f.ghost:"");b.ghost.appendTo(b.helper)},resize:function(c,d){var b=a(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(c,d){var b=a(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});
a.ui.plugin.add("resizable","grid",{resize:function(c,d){var b=a(this).data("resizable"),f=b.options,h=b.size,e=b.originalSize,g=b.originalPosition,m=b.axis;f.grid="number"==typeof f.grid?[f.grid,f.grid]:f.grid;var p=Math.round((h.width-e.width)/(f.grid[0]||1))*(f.grid[0]||1),f=Math.round((h.height-e.height)/(f.grid[1]||1))*(f.grid[1]||1);/^(se|s|e)$/.test(m)?(b.size.width=e.width+p,b.size.height=e.height+f):/^(ne)$/.test(m)?(b.size.width=e.width+p,b.size.height=e.height+f,b.position.top=g.top-f):
(/^(sw)$/.test(m)?(b.size.width=e.width+p,b.size.height=e.height+f):(b.size.width=e.width+p,b.size.height=e.height+f,b.position.top=g.top-f),b.position.left=g.left-p)}});var e=function(a){return parseInt(a,10)||0},g=function(a){return!isNaN(parseInt(a,10))}})(jQuery);
(function(a,n){a.widget("ui.selectable",a.ui.mouse,{version:"1.9.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var e=this;this.element.addClass("ui-selectable");this.dragged=!1;var g;this.refresh=function(){g=a(e.options.filter,e.element[0]);g.addClass("ui-selectee");g.each(function(){var c=a(this),d=c.offset();a.data(this,"selectable-item",{element:this,$element:c,left:d.left,top:d.top,right:d.left+c.outerWidth(),bottom:d.top+c.outerHeight(),
startselected:!1,selected:c.hasClass("ui-selected"),selecting:c.hasClass("ui-selecting"),unselecting:c.hasClass("ui-unselecting")})})};this.refresh();this.selectees=g.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(e){var g=this;this.opos=[e.pageX,
e.pageY];if(!this.options.disabled){var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",e);a(c.appendTo).append(this.helper);this.helper.css({left:e.clientX,top:e.clientY,width:0,height:0});c.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0;!e.metaKey&&!e.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,g._trigger("unselecting",
e,{unselecting:d.element}))});a(e.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var b=!e.metaKey&&!e.ctrlKey||!d.$element.hasClass("ui-selected");d.$element.removeClass(b?"ui-unselecting":"ui-selected").addClass(b?"ui-selecting":"ui-unselecting");d.unselecting=!b;d.selecting=b;(d.selected=b)?g._trigger("selecting",e,{selecting:d.element}):g._trigger("unselecting",e,{unselecting:d.element});return!1}})}},_mouseDrag:function(e){var g=this;this.dragged=!0;if(!this.options.disabled){var c=
this.options,d=this.opos[0],b=this.opos[1],f=e.pageX,h=e.pageY;if(d>f)var l=f,f=d,d=l;b>h&&(l=h,h=b,b=l);this.helper.css({left:d,top:b,width:f-d,height:h-b});this.selectees.each(function(){var l=a.data(this,"selectable-item");if(l&&l.element!=g.element[0]){var m=!1;"touch"==c.tolerance?m=!(l.left>f||l.right<d||l.top>h||l.bottom<b):"fit"==c.tolerance&&(m=l.left>d&&l.right<f&&l.top>b&&l.bottom<h);m?(l.selected&&(l.$element.removeClass("ui-selected"),l.selected=!1),l.unselecting&&(l.$element.removeClass("ui-unselecting"),
l.unselecting=!1),l.selecting||(l.$element.addClass("ui-selecting"),l.selecting=!0,g._trigger("selecting",e,{selecting:l.element}))):(l.selecting&&((e.metaKey||e.ctrlKey)&&l.startselected?(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.$element.addClass("ui-selected"),l.selected=!0):(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.startselected&&(l.$element.addClass("ui-unselecting"),l.unselecting=!0),g._trigger("unselecting",e,{unselecting:l.element}))),l.selected&&!e.metaKey&&!e.ctrlKey&&
!l.startselected&&(l.$element.removeClass("ui-selected"),l.selected=!1,l.$element.addClass("ui-unselecting"),l.unselecting=!0,g._trigger("unselecting",e,{unselecting:l.element})))}});return!1}},_mouseStop:function(e){var g=this;this.dragged=!1;a(".ui-unselecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-unselecting");c.unselecting=!1;c.startselected=!1;g._trigger("unselected",e,{unselected:c.element})});a(".ui-selecting",this.element[0]).each(function(){var c=
a.data(this,"selectable-item");c.$element.removeClass("ui-selecting").addClass("ui-selected");c.selecting=!1;c.selected=!0;c.startselected=!0;g._trigger("selected",e,{selected:c.element})});this._trigger("stop",e);this.helper.remove();return!1}})})(jQuery);
(function(a,n){a.widget("ui.sortable",a.ui.mouse,{version:"1.9.2",widgetEventPrefix:"sort",ready:!1,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?"x"===a.axis||/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();this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var a=this.items.length-1;0<=a;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,g){"disabled"===e?(this.options[e]=
g,this.widget().toggleClass("ui-sortable-disabled",!!g)):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,g){var c=this;if(this.reverting||this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(e);var d=null;a(e.target).parents().each(function(){if(a.data(this,c.widgetName+"-item")==c)return d=a(this),!1});a.data(e.target,c.widgetName+"-item")==c&&(d=a(e.target));if(!d)return!1;if(this.options.handle&&!g){var b=!1;a(this.options.handle,d).find("*").andSelf().each(function(){this==
e.target&&(b=!0)});if(!b)return!1}this.currentItem=d;this._removeCurrentsFromItems();return!0},_mouseStart:function(e,g,c){g=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);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};a.extend(this.offset,{click:{left:e.pageX-this.offset.left,
top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();
g.containment&&this._setContainment();g.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",g.cursor));g.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",g.opacity));g.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",g.zIndex));this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());
this._trigger("start",e,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;0<=c;c--)this.containers[c]._trigger("activate",e,this._uiHash(this));a.ui.ddmanager&&(a.ui.ddmanager.current=this);a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,e);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return!0},_mouseDrag:function(e){this.position=this._generatePosition(e);this.positionAbs=this._convertPositionTo("absolute");
this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var g=this.options,c=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<g.scrollSensitivity?this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+g.scrollSpeed:e.pageY-this.overflowOffset.top<g.scrollSensitivity&&(this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-g.scrollSpeed),this.overflowOffset.left+
this.scrollParent[0].offsetWidth-e.pageX<g.scrollSensitivity?this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+g.scrollSpeed:e.pageX-this.overflowOffset.left<g.scrollSensitivity&&(this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-g.scrollSpeed)):(e.pageY-a(document).scrollTop()<g.scrollSensitivity?c=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed):a(window).height()-(e.pageY-a(document).scrollTop())<g.scrollSensitivity&&(c=a(document).scrollTop(a(document).scrollTop()+
g.scrollSpeed)),e.pageX-a(document).scrollLeft()<g.scrollSensitivity?c=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed):a(window).width()-(e.pageX-a(document).scrollLeft())<g.scrollSensitivity&&(c=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)));!1!==c&&a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,e)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||"y"!=this.options.axis)this.helper[0].style.left=this.position.left+"px";
if(!this.options.axis||"x"!=this.options.axis)this.helper[0].style.top=this.position.top+"px";for(g=this.items.length-1;0<=g;g--){var c=this.items[g],d=c.item[0],b=this._intersectsWithPointer(c);if(b&&c.instance===this.currentContainer&&d!=this.currentItem[0]&&this.placeholder[1==b?"next":"prev"]()[0]!=d&&!a.contains(this.placeholder[0],d)&&("semi-dynamic"==this.options.type?!a.contains(this.element[0],d):1)){this.direction=1==b?"down":"up";if("pointer"==this.options.tolerance||this._intersectsWithSides(c))this._rearrange(e,
c);else break;this._trigger("change",e,this._uiHash());break}}this._contactContainers(e);a.ui.ddmanager&&a.ui.ddmanager.drag(this,e);this._trigger("sort",e,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(e,g){if(e){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,e);if(this.options.revert){var c=this,d=this.placeholder.offset();this.reverting=!0;a(this.helper).animate({left:d.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==
document.body?0:this.offsetParent[0].scrollLeft),top:d.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(e)})}else this._clear(e,g);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;0<=e;e--)this.containers[e]._trigger("deactivate",
null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):
a(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(e){var g=this._getItemsAsjQuery(e&&e.connected),c=[];e=e||{};a(g).each(function(){var d=(a(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);d&&c.push((e.key||d[1]+"[]")+"="+(e.key&&e.expression?d[1]:d[2]))});!c.length&&e.key&&c.push(e.key+"=");return c.join("&")},toArray:function(e){var g=this._getItemsAsjQuery(e&&e.connected),c=[];e=e||{};g.each(function(){c.push(a(e.item||this).attr(e.attribute||
"id")||"")});return c},_intersectsWith:function(a){var g=this.positionAbs.left,c=g+this.helperProportions.width,d=this.positionAbs.top,b=d+this.helperProportions.height,f=a.left,h=f+a.width,l=a.top,k=l+a.height,m=this.offset.click.top,p=this.offset.click.left;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?d+m>l&&d+m<k&&g+p>f&&g+p<h:f<g+this.helperProportions.width/
2&&c-this.helperProportions.width/2<h&&l<d+this.helperProportions.height/2&&b-this.helperProportions.height/2<k},_intersectsWithPointer:function(e){var g="x"===this.options.axis||a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height);e="y"===this.options.axis||a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);g=g&&e;e=this._getDragVerticalDirection();var c=this._getDragHorizontalDirection();return!g?!1:this.floating?c&&"right"==c||"down"==e?2:1:e&&("down"==
e?2:1)},_intersectsWithSides:function(e){var g=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height);e=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width);var c=this._getDragVerticalDirection(),d=this._getDragHorizontalDirection();return this.floating&&d?"right"==d&&e||"left"==d&&!e:c&&("down"==c&&g||"up"==c&&!g)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!=a&&(0<a?"down":"up")},
_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return 0!=a&&(0<a?"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(e){var g=[],c=[],d=this._connectWith();if(d&&e)for(e=d.length-1;0<=e;e--)for(var b=a(d[e]),f=b.length-1;0<=f;f--){var h=a.data(b[f],this.widgetName);h&&
h!=this&&!h.options.disabled&&c.push([a.isFunction(h.options.items)?h.options.items.call(h.element):a(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(e=c.length-1;0<=e;e--)c[e][0].each(function(){g.push(this)});return a(g)},_removeCurrentsFromItems:function(){var e=
this.currentItem.find(":data("+this.widgetName+"-item)");this.items=a.grep(this.items,function(a){for(var c=0;c<e.length;c++)if(e[c]==a.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[];this.containers=[this];var g=this.items,c=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):a(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(var b=d.length-1;0<=b;b--)for(var f=a(d[b]),h=f.length-1;0<=h;h--){var l=
a.data(f[h],this.widgetName);l&&l!=this&&!l.options.disabled&&(c.push([a.isFunction(l.options.items)?l.options.items.call(l.element[0],e,{item:this.currentItem}):a(l.options.items,l.element),l]),this.containers.push(l))}for(b=c.length-1;0<=b;b--){e=c[b][1];d=c[b][0];h=0;for(f=d.length;h<f;h++)l=a(d[h]),l.data(this.widgetName+"-item",e),g.push({item:l,instance:e,width:0,height:0,left:0,top:0})}},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());
for(var g=this.items.length-1;0<=g;g--){var c=this.items[g];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var d=this.options.toleranceElement?a(this.options.toleranceElement,c.item):c.item;e||(c.width=d.outerWidth(),c.height=d.outerHeight());d=d.offset();c.left=d.left;c.top=d.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(g=this.containers.length-1;0<=g;g--)d=this.containers[g].element.offset(),
this.containers[g].containerCache.left=d.left,this.containers[g].containerCache.top=d.top,this.containers[g].containerCache.width=this.containers[g].element.outerWidth(),this.containers[g].containerCache.height=this.containers[g].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var g=e.options;if(!g.placeholder||g.placeholder.constructor==String){var c=g.placeholder;g.placeholder={element:function(){var d=a(document.createElement(e.currentItem[0].nodeName)).addClass(c||
e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];c||(d.style.visibility="hidden");return d},update:function(a,b){if(!c||g.forcePlaceholderSize)b.height()||b.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10))}}}e.placeholder=a(g.placeholder.element.call(e.element,
e.currentItem));e.currentItem.after(e.placeholder);g.placeholder.update(e,e.placeholder)},_contactContainers:function(e){for(var g=null,c=null,d=this.containers.length-1;0<=d;d--)if(!a.contains(this.currentItem[0],this.containers[d].element[0]))if(this._intersectsWith(this.containers[d].containerCache)){if(!g||!a.contains(this.containers[d].element[0],g.element[0]))g=this.containers[d],c=d}else this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",e,this._uiHash(this)),this.containers[d].containerCache.over=
0);if(g)if(1===this.containers.length)this.containers[c]._trigger("over",e,this._uiHash(this)),this.containers[c].containerCache.over=1;else{for(var g=1E4,d=null,b=this.containers[c].floating?"left":"top",f=this.containers[c].floating?"width":"height",h=this.positionAbs[b]+this.offset.click[b],l=this.items.length-1;0<=l;l--)if(a.contains(this.containers[c].element[0],this.items[l].item[0])&&this.items[l].item[0]!=this.currentItem[0]){var k=this.items[l].item.offset()[b],m=!1;Math.abs(k-h)>Math.abs(k+
this.items[l][f]-h)&&(m=!0,k+=this.items[l][f]);Math.abs(k-h)<g&&(g=Math.abs(k-h),d=this.items[l],this.direction=m?"up":"down")}if(d||this.options.dropOnEmpty)this.currentContainer=this.containers[c],d?this._rearrange(e,d,null,!0):this._rearrange(e,null,this.containers[c].element,!0),this._trigger("change",e,this._uiHash()),this.containers[c]._trigger("change",e,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[c]._trigger("over",e,this._uiHash(this)),
this.containers[c].containerCache.over=1}},_createHelper:function(e){var g=this.options;e=a.isFunction(g.helper)?a(g.helper.apply(this.element[0],[e,this.currentItem])):"clone"==g.helper?this.currentItem.clone():this.currentItem;e.parents("body").length||a("parent"!=g.appendTo?g.appendTo:this.currentItem[0].parentNode)[0].appendChild(e[0]);e[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")});(""==e[0].style.width||g.forceHelperSize)&&e.width(this.currentItem.width());(""==e[0].style.height||g.forceHelperSize)&&e.height(this.currentItem.height());return e},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" "));a.isArray(e)&&(e={left:+e[0],top:+e[1]||0});"left"in e&&(this.offset.click.left=e.left+this.margins.left);"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left);
"top"in e&&(this.offset.click.top=e.top+this.margins.top);"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&
"html"==this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)e={top:0,left:0};return{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){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()}}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 e=this.options;"parent"==e.containment&&(e.containment=this.helper[0].parentNode);if("document"==e.containment||"window"==e.containment)this.containment=[0-this.offset.relative.left-this.offset.parent.left,
0-this.offset.relative.top-this.offset.parent.top,a("document"==e.containment?document:window).width()-this.helperProportions.width-this.margins.left,(a("document"==e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(e.containment)){var g=a(e.containment)[0],e=a(e.containment).offset(),c="hidden"!=a(g).css("overflow");this.containment=[e.left+(parseInt(a(g).css("borderLeftWidth"),10)||
0)+(parseInt(a(g).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(g).css("borderTopWidth"),10)||0)+(parseInt(a(g).css("paddingTop"),10)||0)-this.margins.top,e.left+(c?Math.max(g.scrollWidth,g.offsetWidth):g.offsetWidth)-(parseInt(a(g).css("borderLeftWidth"),10)||0)-(parseInt(a(g).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(c?Math.max(g.scrollHeight,g.offsetHeight):g.offsetHeight)-(parseInt(a(g).css("borderTopWidth"),10)||0)-(parseInt(a(g).css("paddingBottom"),
10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(e,g){g||(g=this.position);var c="absolute"==e?1:-1,d="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,b=/(html|body)/i.test(d[0].tagName);return{top:g.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():b?0:d.scrollTop())*c,left:g.left+this.offset.relative.left*
c+this.offset.parent.left*c-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():b?0:d.scrollLeft())*c}},_generatePosition:function(e){var g=this.options,c="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,d=/(html|body)/i.test(c[0].tagName);"relative"==this.cssPosition&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());
var b=e.pageX,f=e.pageY;this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(b=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(f=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(b=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(f=this.containment[3]+this.offset.click.top)),g.grid&&(f=this.originalPageY+Math.round((f-
this.originalPageY)/g.grid[1])*g.grid[1],f=this.containment?!(f-this.offset.click.top<this.containment[1]||f-this.offset.click.top>this.containment[3])?f:!(f-this.offset.click.top<this.containment[1])?f-g.grid[1]:f+g.grid[1]:f,b=this.originalPageX+Math.round((b-this.originalPageX)/g.grid[0])*g.grid[0],b=this.containment?!(b-this.offset.click.left<this.containment[0]||b-this.offset.click.left>this.containment[2])?b:!(b-this.offset.click.left<this.containment[0])?b-g.grid[0]:b+g.grid[0]:b));return{top:f-
this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():d?0:c.scrollTop()),left:b-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():d?0:c.scrollLeft())}},_rearrange:function(a,g,c,d){c?c[0].appendChild(this.placeholder[0]):g.item[0].parentNode.insertBefore(this.placeholder[0],"down"==this.direction?g.item[0]:g.item[0].nextSibling);var b=this.counter=
this.counter?++this.counter:1;this._delay(function(){b==this.counter&&this.refreshPositions(!d)})},_clear:function(e,g){this.reverting=!1;var c=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var d in this._storedCSS)if("auto"==this._storedCSS[d]||"static"==this._storedCSS[d])this._storedCSS[d]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();
this.fromOutside&&!g&&c.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])&&!g&&c.push(function(a){this._trigger("update",a,this._uiHash())});this!==this.currentContainer&&!g&&(c.push(function(a){this._trigger("remove",a,this._uiHash())}),c.push(function(a){return function(f){a._trigger("receive",f,this._uiHash(this))}}.call(this,
this.currentContainer)),c.push(function(a){return function(f){a._trigger("update",f,this._uiHash(this))}}.call(this,this.currentContainer)));for(d=this.containers.length-1;0<=d;d--)g||c.push(function(a){return function(f){a._trigger("deactivate",f,this._uiHash(this))}}.call(this,this.containers[d])),this.containers[d].containerCache.over&&(c.push(function(a){return function(f){a._trigger("out",f,this._uiHash(this))}}.call(this,this.containers[d])),this.containers[d].containerCache.over=0);this._storedCursor&&
a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex);this.dragging=!1;if(this.cancelHelperRemoval){if(!g){this._trigger("beforeStop",e,this._uiHash());for(d=0;d<c.length;d++)c[d].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1}g||this._trigger("beforeStop",e,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!g){for(d=0;d<c.length;d++)c[d].call(this,e);this._trigger("stop",e,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){!1===a.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var g=e||this;return{helper:g.helper,placeholder:g.placeholder||a([]),position:g.position,originalPosition:g.originalPosition,offset:g.positionAbs,item:g.currentItem,sender:e?e.element:null}}})})(jQuery);
(function(a,n){var e=0,g={},c={};g.height=g.paddingTop=g.paddingBottom=g.borderTopWidth=g.borderBottomWidth="hide";c.height=c.paddingTop=c.paddingBottom=c.borderTopWidth=c.borderBottomWidth="show";a.widget("ui.accordion",{version:"1.9.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var d=this.accordionId=
"ui-accordion-"+(this.element.attr("id")||++e),b=this.options;this.prevShow=this.prevHide=a();this.element.addClass("ui-accordion ui-widget ui-helper-reset");this.headers=this.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this._hoverable(this.headers);this._focusable(this.headers);this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide();if(!b.collapsible&&(!1===b.active||null==b.active))b.active=
0;0>b.active&&(b.active+=this.headers.length);this.active=this._findActive(b.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top");this.active.next().addClass("ui-accordion-content-active").show();this._createIcons();this.refresh();this.element.attr("role","tablist");this.headers.attr("role","tab").each(function(f){var b=a(this),c=b.attr("id"),e=b.next(),g=e.attr("id");c||(c=d+"-header-"+f,b.attr("id",c));g||(g=d+"-panel-"+f,e.attr("id",g));b.attr("aria-controls",
g);e.attr("aria-labelledby",c)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide();this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._on(this.headers,{keydown:"_keydown"});this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._setupEvents(b.event)},
_getCreateEventData:function(){return{header:this.active,content:!this.active.length?a():this.active.next()}},_createIcons:function(){var d=this.options.icons;d&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+d.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(d.header).addClass(d.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},
_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});this._destroyIcons();a=this.headers.next().css("display",
"").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){"active"===a?this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),
this._setupEvents(b)),this._super(a,b),"collapsible"===a&&!b&&!1===this.options.active&&this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),"disabled"===a&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b))},_keydown:function(d){if(!d.altKey&&!d.ctrlKey){var b=a.ui.keyCode,f=this.headers.length,c=this.headers.index(d.target),e=!1;switch(d.keyCode){case b.RIGHT:case b.DOWN:e=this.headers[(c+1)%f];break;case b.LEFT:case b.UP:e=this.headers[(c-1+f)%f];
break;case b.SPACE:case b.ENTER:this._eventHandler(d);break;case b.HOME:e=this.headers[0];break;case b.END:e=this.headers[f-1]}e&&(a(d.target).attr("tabIndex",-1),a(e).attr("tabIndex",0),e.focus(),d.preventDefault())}},_panelKeyDown:function(d){d.keyCode===a.ui.keyCode.UP&&d.ctrlKey&&a(d.currentTarget).prev().focus()},refresh:function(){var d,b,f=this.options.heightStyle,c=this.element.parent();"fill"===f?(a.support.minHeight||(b=c.css("overflow"),c.css("overflow","hidden")),d=c.height(),this.element.siblings(":visible").each(function(){var f=
a(this),b=f.css("position");"absolute"===b||"fixed"===b||(d-=f.outerHeight(!0))}),b&&c.css("overflow",b),this.headers.each(function(){d-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,d-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===f&&(d=0,this.headers.next().each(function(){d=Math.max(d,a(this).css("height","").height())}).height(d))},_activate:function(d){d=this._findActive(d)[0];d!==this.active[0]&&(d=d||this.active[0],this._eventHandler({target:d,
currentTarget:d,preventDefault:a.noop}))},_findActive:function(d){return"number"===typeof d?this.headers.eq(d):a()},_setupEvents:function(d){var b={};d&&(a.each(d.split(" "),function(a,d){b[d]="_eventHandler"}),this._on(this.headers,b))},_eventHandler:function(d){var b=this.options,f=this.active,c=a(d.currentTarget),e=c[0]===f[0],g=e&&b.collapsible,m=g?a():c.next(),p=f.next(),m={oldHeader:f,oldPanel:p,newHeader:g?a():c,newPanel:m};d.preventDefault();e&&!b.collapsible||!1===this._trigger("beforeActivate",
d,m)||(b.active=g?!1:this.headers.index(c),this.active=e?a():c,this._toggle(m),f.removeClass("ui-accordion-header-active ui-state-active"),b.icons&&f.children(".ui-accordion-header-icon").removeClass(b.icons.activeHeader).addClass(b.icons.header),e||(c.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),b.icons&&c.children(".ui-accordion-header-icon").removeClass(b.icons.header).addClass(b.icons.activeHeader),c.next().addClass("ui-accordion-content-active")))},
_toggle:function(d){var b=d.newPanel,f=this.prevShow.length?this.prevShow:d.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0);this.prevShow=b;this.prevHide=f;this.options.animate?this._animate(b,f,d):(f.hide(),b.show(),this._toggleComplete(d));f.attr({"aria-expanded":"false","aria-hidden":"true"});f.prev().attr("aria-selected","false");b.length&&f.length?f.prev().attr("tabIndex",-1):b.length&&this.headers.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1);b.attr({"aria-expanded":"true",
"aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(a,b,f){var h,e,k,m=this,p=0,t=a.length&&(!b.length||a.index()<b.index()),q=this.options.animate||{},t=t&&q.down||q,s=function(){m._toggleComplete(f)};"number"===typeof t&&(k=t);"string"===typeof t&&(e=t);e=e||t.easing||q.easing;k=k||t.duration||q.duration;if(!b.length)return a.animate(c,k,e,s);if(!a.length)return b.animate(g,k,e,s);h=a.show().outerHeight();b.animate(g,{duration:k,easing:e,step:function(a,f){f.now=
Math.round(a)}});a.hide().animate(c,{duration:k,easing:e,complete:s,step:function(a,f){f.now=Math.round(a);"height"!==f.prop?p+=f.now:"content"!==m.options.heightStyle&&(f.now=Math.round(h-b.outerHeight()-p),p=0)}})},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all");b.length&&(b.parent()[0].className=b.parent()[0].className);this._trigger("activate",null,a)}});!1!==a.uiBackCompat&&(function(a,b){a.extend(b.options,
{navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}});var f=b._create;b._create=function(){if(this.options.navigation){var b=this,c=this.element.find(this.options.header),e=c.next(),g=c.add(e).find("a").filter(this.options.navigationFilter)[0];g&&c.add(e).each(function(f){if(a.contains(this,g))return b.options.active=Math.floor(f/2),!1})}f.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(a,b){a.extend(b.options,{heightStyle:null,autoHeight:!0,
clearStyle:!1,fillSpace:!1});var f=b._create,c=b._setOption;a.extend(b,{_create:function(){this.options.heightStyle=this.options.heightStyle||this._mergeHeightStyle();f.call(this)},_setOption:function(a){if("autoHeight"===a||"clearStyle"===a||"fillSpace"===a)this.options.heightStyle=this._mergeHeightStyle();c.apply(this,arguments)},_mergeHeightStyle:function(){var a=this.options;if(a.fillSpace)return"fill";if(a.clearStyle)return"content";if(a.autoHeight)return"auto"}})}(jQuery,jQuery.ui.accordion.prototype),
function(a,b){a.extend(b.options.icons,{activeHeader:null,headerSelected:"ui-icon-triangle-1-s"});var f=b._createIcons;b._createIcons=function(){this.options.icons&&(this.options.icons.activeHeader=this.options.icons.activeHeader||this.options.icons.headerSelected);f.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(a,b){b.activate=b._activate;var f=b._findActive;b._findActive=function(a){-1===a&&(a=!1);a&&"number"!==typeof a&&(a=this.headers.index(this.headers.filter(a)),-1===a&&(a=!1));
return f.call(this,a)}}(jQuery,jQuery.ui.accordion.prototype),jQuery.ui.accordion.prototype.resize=jQuery.ui.accordion.prototype.refresh,function(a,b){a.extend(b.options,{change:null,changestart:null});var f=b._trigger;b._trigger=function(a,b,d){var c=f.apply(this,arguments);if(!c)return!1;"beforeActivate"===a?c=f.call(this,"changestart",b,{oldHeader:d.oldHeader,oldContent:d.oldPanel,newHeader:d.newHeader,newContent:d.newPanel}):"activate"===a&&(c=f.call(this,"change",b,{oldHeader:d.oldHeader,oldContent:d.oldPanel,
newHeader:d.newHeader,newContent:d.newPanel}));return c}}(jQuery,jQuery.ui.accordion.prototype),function(a,b){a.extend(b.options,{animate:null,animated:"slide"});var f=b._create;b._create=function(){var a=this.options;null===a.animate&&(a.animate=a.animated?"slide"===a.animated?300:"bounceslide"===a.animated?{duration:200,down:{easing:"easeOutBounce",duration:1E3}}:a.animated:!1);f.call(this)}}(jQuery,jQuery.ui.accordion.prototype))})(jQuery);
(function(a,n){var e=0;a.widget("ui.autocomplete",{version:"1.9.2",defaultElement:"<input>",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,c,d;this.isMultiLine=this._isMultiLine();this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"];this.isNewMenu=!0;this.element.addClass("ui-autocomplete-input").attr("autocomplete",
"off");this._on(this.element,{keydown:function(b){if(this.element.prop("readOnly"))c=d=e=!0;else{c=d=e=!1;var f=a.ui.keyCode;switch(b.keyCode){case f.PAGE_UP:e=!0;this._move("previousPage",b);break;case f.PAGE_DOWN:e=!0;this._move("nextPage",b);break;case f.UP:e=!0;this._keyEvent("previous",b);break;case f.DOWN:e=!0;this._keyEvent("next",b);break;case f.ENTER:case f.NUMPAD_ENTER:this.menu.active&&(e=!0,b.preventDefault(),this.menu.select(b));break;case f.TAB:this.menu.active&&this.menu.select(b);
break;case f.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(b),b.preventDefault());break;default:c=!0,this._searchTimeout(b)}}},keypress:function(b){if(e)e=!1,b.preventDefault();else if(!c){var f=a.ui.keyCode;switch(b.keyCode){case f.PAGE_UP:this._move("previousPage",b);break;case f.PAGE_DOWN:this._move("nextPage",b);break;case f.UP:this._keyEvent("previous",b);break;case f.DOWN:this._keyEvent("next",b)}}},input:function(a){d?(d=!1,a.preventDefault()):this._searchTimeout(a)},
focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),this._change(a))}});this._initSource();this.menu=a("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:a(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu");this._on(this.menu.element,{mousedown:function(b){b.preventDefault();this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur});
var f=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(d){d.target!==b.element[0]&&d.target!==f&&!a.contains(f,d.target)&&b.close()})})},menufocus:function(b,f){if(this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type)))this.menu.blur(),this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)});else{var d=f.item.data("ui-autocomplete-item")||f.item.data("item.autocomplete");
!1!==this._trigger("focus",b,{item:d})?b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(d.value):this.liveRegion.text(d.value)}},menuselect:function(a,f){var d=f.item.data("ui-autocomplete-item")||f.item.data("item.autocomplete"),c=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=c,this._delay(function(){this.previous=c;this.selectedItem=d}));!1!==this._trigger("select",a,{item:d})&&this._value(d.value);this.term=this._value();this.close(a);
this.selectedItem=d}});this.liveRegion=a("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element);a.fn.bgiframe&&this.menu.element.bgiframe();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(a,c){this._super(a,
c);"source"===a&&this._initSource();"appendTo"===a&&this.menu.element.appendTo(this.document.find(c||"body")[0]);"disabled"===a&&c&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is("textarea")?!0:this.element.is("input")?!1:this.element.prop("isContentEditable")},_initSource:function(){var e,c,d=this;a.isArray(this.options.source)?(e=this.options.source,this.source=function(b,f){f(a.ui.autocomplete.filter(e,b.term))}):"string"===typeof this.options.source?(c=this.options.source,
this.source=function(b,f){d.xhr&&d.xhr.abort();d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){f(a)},error:function(){f([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching);this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,c){a=null!=a?a:this._value();this.term=this._value();if(a.length<this.options.minLength)return this.close(c);if(!1!==this._trigger("search",
c))return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:a},this._response())},_response:function(){var a=this,c=++e;return function(d){c===e&&a.__response(d);a.pending--;a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){a&&(a=this._normalize(a));this._trigger("response",null,{content:a});!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):
this._close()},close:function(a){this.cancelSearch=!0;this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:a.map(e,function(c){return"string"===typeof c?{label:c,value:c}:a.extend({label:c.label||c.value,value:c.value||c.label},c)})},
_suggest:function(e){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,e);this.menu.refresh();c.show();this._resizeMenu();c.position(a.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,c){var d=this;a.each(c,function(a,f){d._renderItemData(e,f)})},_renderItemData:function(a,c){return this._renderItem(a,
c).data("ui-autocomplete-item",c)},_renderItem:function(e,c){return a("<li>").append(a("<a>").text(c.label)).appendTo(e)},_move:function(a,c){if(this.menu.element.is(":visible"))if(this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a))this._value(this.term),this.menu.blur();else this.menu[a](c);else this.search(null,c)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,c){if(!this.isMultiLine||
this.menu.element.is(":visible"))this._move(a,c),c.preventDefault()}});a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,c){var d=RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(e,function(a){return d.test(a.label||a.value||a)})}});a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(1<a?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},
__response:function(a){var c;this._superApply(arguments);!this.options.disabled&&!this.cancelSearch&&(c=a&&a.length?this.options.messages.results(a.length):this.options.messages.noResults,this.liveRegion.text(c))}})})(jQuery);
(function(a,n){var e,g,c,d,b=function(){var f=a(this).find(":ui-button");setTimeout(function(){f.button("refresh")},1)},f=function(f){var b=f.name,d=f.form,c=a([]);b&&(c=d?a(d).find("[name='"+b+"']"):a("[name='"+b+"']",f.ownerDocument).filter(function(){return!this.form}));return c};a.widget("ui.button",{version:"1.9.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+
this.eventNamespace,b);"boolean"!==typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var h=this,l=this.options,k="checkbox"===this.type||"radio"===this.type,m=!k?"ui-state-active":"";null===l.label&&(l.label="input"===this.type?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role",
"button").bind("mouseenter"+this.eventNamespace,function(){l.disabled||this===e&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){l.disabled||a(this).removeClass(m)}).bind("click"+this.eventNamespace,function(a){l.disabled&&(a.preventDefault(),a.stopImmediatePropagation())});this.element.bind("focus"+this.eventNamespace,function(){h.buttonElement.addClass("ui-state-focus")}).bind("blur"+this.eventNamespace,function(){h.buttonElement.removeClass("ui-state-focus")});
k&&(this.element.bind("change"+this.eventNamespace,function(){d||h.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(a){l.disabled||(d=!1,g=a.pageX,c=a.pageY)}).bind("mouseup"+this.eventNamespace,function(a){if(!l.disabled&&(g!==a.pageX||c!==a.pageY))d=!0}));"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(l.disabled||d)return!1;a(this).toggleClass("ui-state-active");h.buttonElement.attr("aria-pressed",h.element[0].checked)}):"radio"===
this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(l.disabled||d)return!1;a(this).addClass("ui-state-active");h.buttonElement.attr("aria-pressed","true");var b=h.element[0];f(b).not(b).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(l.disabled)return!1;a(this).addClass("ui-state-active");e=this;h.document.one("mouseup",function(){e=null})}).bind("mouseup"+
this.eventNamespace,function(){if(l.disabled)return!1;a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(f){if(l.disabled)return!1;(f.keyCode===a.ui.keyCode.SPACE||f.keyCode===a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(f){f.keyCode===a.ui.keyCode.SPACE&&a(this).click()}));this._setOption("disabled",l.disabled);
this._resetButton()},_determineButtonType:function(){var a,f;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";"checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),f="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(f),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(f),this.buttonElement.length||
(this.buttonElement=a.find(f))),this.element.addClass("ui-helper-hidden-accessible"),(a=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",a)):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")},_setOption:function(a,f){this._super(a,f);"disabled"===a?f?this.element.prop("disabled",!0):this.element.prop("disabled",!1):this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b);"radio"===this.type?f(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
"true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(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("input"===this.type)this.options.label&&this.element.val(this.options.label);else{var f=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=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(f.empty()).text(),d=this.options.icons,c=d.primary&&d.secondary,e=[];d.primary||d.secondary?(this.options.text&&e.push("ui-button-text-icon"+(c?"s":d.primary?"-primary":"-secondary")),d.primary&&f.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&f.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(e.push(c?"ui-button-icons-only":
"ui-button-icon-only"),this.hasTitle||f.attr("title",a.trim(b)))):e.push("ui-button-text-only");f.addClass(e.join(" "))}}});a.widget("ui.buttonset",{version:"1.9.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,f){"disabled"===a&&this.buttons.button("option",a,f);this._super(a,f)},refresh:function(){var f=
"rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(f?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(f?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);
(function(a,n){function e(){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".split(" "),monthNamesShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),dayNames:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),dayNamesShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),dayNamesMin:"Su Mo Tu We Th Fr Sa".split(" "),
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};a.extend(this._defaults,this.regional[""]);this.dpDiv=g(a('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function g(f){return f.delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a",
"mouseout",function(){a(this).removeClass("ui-state-hover");-1!=this.className.indexOf("ui-datepicker-prev")&&a(this).removeClass("ui-datepicker-prev-hover");-1!=this.className.indexOf("ui-datepicker-next")&&a(this).removeClass("ui-datepicker-next-hover")}).delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseover",function(){if(!a.datepicker._isDisabledDatepicker(b.inline?f.parent()[0]:b.input[0]))a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),
a(this).addClass("ui-state-hover"),-1!=this.className.indexOf("ui-datepicker-prev")&&a(this).addClass("ui-datepicker-prev-hover"),-1!=this.className.indexOf("ui-datepicker-next")&&a(this).addClass("ui-datepicker-next-hover")})}function c(f,b){a.extend(f,b);for(var d in b)if(null==b[d]||b[d]==n)f[d]=b[d];return f}a.extend(a.ui,{datepicker:{version:"1.9.2"}});var d=(new Date).getTime(),b;a.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",
arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){c(this._defaults,a||{});return this},_attachDatepicker:function(f,b){var d=null,c;for(c in this._defaults){var e=f.getAttribute("date:"+c);if(e){d=d||{};try{d[c]=eval(e)}catch(g){d[c]=e}}}c=f.nodeName.toLowerCase();e="div"==c||"span"==c;f.id||(this.uuid+=1,f.id="dp"+this.uuid);var t=this._newInst(a(f),e);t.settings=a.extend({},b||{},d||{});"input"==c?this._connectDatepicker(f,t):e&&this._inlineDatepicker(f,t)},_newInst:function(f,
b){return{id:f[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:f,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:g(a('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(f,b){var d=a(f);b.append=a([]);b.trigger=a([]);d.hasClass(this.markerClassName)||(this._attachments(d,b),d.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
function(a,f,d){b.settings[f]=d}).bind("getData.datepicker",function(a,f){return this._get(b,f)}),this._autoSize(b),a.data(f,"datepicker",b),b.settings.disabled&&this._disableDatepicker(f))},_attachments:function(f,b){var d=this._get(b,"appendText"),c=this._get(b,"isRTL");b.append&&b.append.remove();d&&(b.append=a('<span class="'+this._appendClass+'">'+d+"</span>"),f[c?"before":"after"](b.append));f.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();d=this._get(b,"showOn");("focus"==
d||"both"==d)&&f.focus(this._showDatepicker);if("button"==d||"both"==d){var d=this._get(b,"buttonText"),e=this._get(b,"buttonImage");b.trigger=a(this._get(b,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:e,alt:d,title:d}):a('<button type="button"></button>').addClass(this._triggerClass).html(""==e?d:a("<img/>").attr({src:e,alt:d,title:d})));f[c?"before":"after"](b.trigger);b.trigger.click(function(){a.datepicker._datepickerShowing&&a.datepicker._lastInput==f[0]?a.datepicker._hideDatepicker():
(a.datepicker._datepickerShowing&&a.datepicker._lastInput!=f[0]&&a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(f[0]));return!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),d=this._get(a,"dateFormat");if(d.match(/[DM]/)){var c=function(a){for(var f=0,b=0,d=0;d<a.length;d++)a[d].length>f&&(f=a[d].length,b=d);return b};b.setMonth(c(this._get(a,d.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(c(this._get(a,d.match(/DD/)?"dayNames":
"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(f,b){var d=a(f);d.hasClass(this.markerClassName)||(d.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,f,d){b.settings[f]=d}).bind("getData.datepicker",function(a,f){return this._get(b,f)}),a.data(f,"datepicker",b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(f),
b.dpDiv.css("display","block"))},_dialogDatepicker:function(f,b,d,e,g){(f=this._dialogInst)||(this.uuid+=1,this._dialogInput=a('<input type="text" id="dp'+this.uuid+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},a.data(this._dialogInput[0],"datepicker",f));c(f.settings,e||{});b=b&&b.constructor==Date?this._formatDate(f,b):b;this._dialogInput.val(b);
(this._pos=g?g.length?g:[g.pageX,g.pageY]:null)||(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");f.settings.onSelect=d;this._inDialog=!0;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);a.blockUI&&a.blockUI(this.dpDiv);
a.data(this._dialogInput[0],"datepicker",f);return this},_destroyDatepicker:function(f){var b=a(f),d=a.data(f,"datepicker");if(b.hasClass(this.markerClassName)){var c=f.nodeName.toLowerCase();a.removeData(f,"datepicker");"input"==c?(d.append.remove(),d.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"==c||"span"==c)&&b.removeClass(this.markerClassName).empty()}},
_enableDatepicker:function(f){var b=a(f),d=a.data(f,"datepicker");if(b.hasClass(this.markerClassName)){var c=f.nodeName.toLowerCase();if("input"==c)f.disabled=!1,d.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"==c||"span"==c)b=b.children("."+this._inlineClass),b.children().removeClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1);this._disabledInputs=a.map(this._disabledInputs,
function(a){return a==f?null:a})}},_disableDatepicker:function(f){var b=a(f),d=a.data(f,"datepicker");if(b.hasClass(this.markerClassName)){var c=f.nodeName.toLowerCase();if("input"==c)f.disabled=!0,d.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"==c||"span"==c)b=b.children("."+this._inlineClass),b.children().addClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",
!0);this._disabledInputs=a.map(this._disabledInputs,function(a){return a==f?null:a});this._disabledInputs[this._disabledInputs.length]=f}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(f){try{return a.data(f,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(f,b,d){var e=this._getInst(f);if(2==arguments.length&&"string"==typeof b)return"defaults"==
b?a.extend({},a.datepicker._defaults):e?"all"==b?a.extend({},e.settings):this._get(e,b):null;var g=b||{};"string"==typeof b&&(g={},g[b]=d);if(e){this._curInst==e&&this._hideDatepicker();var p=this._getDateDatepicker(f,!0),t=this._getMinMaxDate(e,"min"),q=this._getMinMaxDate(e,"max");c(e.settings,g);null!==t&&g.dateFormat!==n&&g.minDate===n&&(e.settings.minDate=this._formatDate(e,t));null!==q&&g.dateFormat!==n&&g.maxDate===n&&(e.settings.maxDate=this._formatDate(e,q));this._attachments(a(f),e);this._autoSize(e);
this._setDate(e,p);this._updateAlternate(e);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,d){this._optionDatepicker(a,b,d)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){var d=this._getInst(a);d&&(this._setDate(d,b),this._updateDatepicker(d),this._updateAlternate(d))},_getDateDatepicker:function(a,b){var d=this._getInst(a);d&&!d.inline&&this._setDateFromField(d,b);return d?this._getDate(d):null},_doKeyDown:function(f){var b=
a.datepicker._getInst(f.target),d=!0,c=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if(a.datepicker._datepickerShowing)switch(f.keyCode){case 9:a.datepicker._hideDatepicker();d=!1;break;case 13:return d=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",b.dpDiv),d[0]&&a.datepicker._selectDay(f.target,b.selectedMonth,b.selectedYear,d[0]),(f=a.datepicker._get(b,"onSelect"))?(d=a.datepicker._formatDate(b),f.apply(b.input?b.input[0]:null,[d,b])):a.datepicker._hideDatepicker(),
!1;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(f.target,f.ctrlKey?-a.datepicker._get(b,"stepBigMonths"):-a.datepicker._get(b,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(f.target,f.ctrlKey?+a.datepicker._get(b,"stepBigMonths"):+a.datepicker._get(b,"stepMonths"),"M");break;case 35:(f.ctrlKey||f.metaKey)&&a.datepicker._clearDate(f.target);d=f.ctrlKey||f.metaKey;break;case 36:(f.ctrlKey||f.metaKey)&&a.datepicker._gotoToday(f.target);d=f.ctrlKey||f.metaKey;
break;case 37:if(f.ctrlKey||f.metaKey)a.datepicker._adjustDate(f.target,c?1:-1,"D");d=f.ctrlKey||f.metaKey;f.originalEvent.altKey&&a.datepicker._adjustDate(f.target,f.ctrlKey?-a.datepicker._get(b,"stepBigMonths"):-a.datepicker._get(b,"stepMonths"),"M");break;case 38:(f.ctrlKey||f.metaKey)&&a.datepicker._adjustDate(f.target,-7,"D");d=f.ctrlKey||f.metaKey;break;case 39:if(f.ctrlKey||f.metaKey)a.datepicker._adjustDate(f.target,c?-1:1,"D");d=f.ctrlKey||f.metaKey;f.originalEvent.altKey&&a.datepicker._adjustDate(f.target,
f.ctrlKey?+a.datepicker._get(b,"stepBigMonths"):+a.datepicker._get(b,"stepMonths"),"M");break;case 40:(f.ctrlKey||f.metaKey)&&a.datepicker._adjustDate(f.target,7,"D");d=f.ctrlKey||f.metaKey;break;default:d=!1}else 36==f.keyCode&&f.ctrlKey?a.datepicker._showDatepicker(this):d=!1;d&&(f.preventDefault(),f.stopPropagation())},_doKeyPress:function(f){var b=a.datepicker._getInst(f.target);if(a.datepicker._get(b,"constrainInput")){var b=a.datepicker._possibleChars(a.datepicker._get(b,"dateFormat")),d=String.fromCharCode(f.charCode==
n?f.keyCode:f.charCode);return f.ctrlKey||f.metaKey||" ">d||!b||-1<b.indexOf(d)}},_doKeyUp:function(f){f=a.datepicker._getInst(f.target);if(f.input.val()!=f.lastVal)try{if(a.datepicker.parseDate(a.datepicker._get(f,"dateFormat"),f.input?f.input.val():null,a.datepicker._getFormatConfig(f)))a.datepicker._setDateFromField(f),a.datepicker._updateAlternate(f),a.datepicker._updateDatepicker(f)}catch(b){a.datepicker.log(b)}return!0},_showDatepicker:function(f){f=f.target||f;"input"!=f.nodeName.toLowerCase()&&
(f=a("input",f.parentNode)[0]);if(!(a.datepicker._isDisabledDatepicker(f)||a.datepicker._lastInput==f)){var b=a.datepicker._getInst(f);a.datepicker._curInst&&a.datepicker._curInst!=b&&(a.datepicker._curInst.dpDiv.stop(!0,!0),b&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0]));var d=a.datepicker._get(b,"beforeShow"),d=d?d.apply(f,[f,b]):{};if(!1!==d){c(b.settings,d);b.lastVal=null;a.datepicker._lastInput=f;a.datepicker._setDateFromField(b);a.datepicker._inDialog&&
(f.value="");a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(f),a.datepicker._pos[1]+=f.offsetHeight);var e=!1;a(f).parents().each(function(){e|="fixed"==a(this).css("position");return!e});d={left:a.datepicker._pos[0],top:a.datepicker._pos[1]};a.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});a.datepicker._updateDatepicker(b);d=a.datepicker._checkOffset(b,d,e);b.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":e?"fixed":
"absolute",display:"none",left:d.left+"px",top:d.top+"px"});if(!b.inline){var d=a.datepicker._get(b,"showAnim"),g=a.datepicker._get(b,"duration"),p=function(){var f=b.dpDiv.find("iframe.ui-datepicker-cover");if(f.length){var d=a.datepicker._getBorders(b.dpDiv);f.css({left:-d[0],top:-d[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(a(f).zIndex()+1);a.datepicker._datepickerShowing=!0;if(a.effects&&(a.effects.effect[d]||a.effects[d]))b.dpDiv.show(d,a.datepicker._get(b,
"showOptions"),g,p);else b.dpDiv[d||"show"](d?g:null,p);(!d||!g)&&p();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();a.datepicker._curInst=b}}}},_updateDatepicker:function(f){this.maxRows=4;var d=a.datepicker._getBorders(f.dpDiv);b=f;f.dpDiv.empty().append(this._generateHTML(f));this._attachHandlers(f);var c=f.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-d[0],top:-d[1],width:f.dpDiv.outerWidth(),height:f.dpDiv.outerHeight()});f.dpDiv.find("."+this._dayOverClass+
" a").mouseover();d=this._getNumberOfMonths(f);c=d[1];f.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");1<c&&f.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");f.dpDiv[(1!=d[0]||1!=d[1]?"add":"remove")+"Class"]("ui-datepicker-multi");f.dpDiv[(this._get(f,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");f==a.datepicker._curInst&&a.datepicker._datepickerShowing&&f.input&&(f.input.is(":visible")&&!f.input.is(":disabled")&&f.input[0]!=
document.activeElement)&&f.input.focus();if(f.yearshtml){var e=f.yearshtml;setTimeout(function(){e===f.yearshtml&&f.yearshtml&&f.dpDiv.find("select.ui-datepicker-year:first").replaceWith(f.yearshtml);e=f.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(b,d,c){var e=b.dpDiv.outerWidth(),g=b.dpDiv.outerHeight(),p=b.input?b.input.outerWidth():
0,t=b.input?b.input.outerHeight():0,q=document.documentElement.clientWidth+(c?0:a(document).scrollLeft()),s=document.documentElement.clientHeight+(c?0:a(document).scrollTop());d.left-=this._get(b,"isRTL")?e-p:0;d.left-=c&&d.left==b.input.offset().left?a(document).scrollLeft():0;d.top-=c&&d.top==b.input.offset().top+t?a(document).scrollTop():0;d.left-=Math.min(d.left,d.left+e>q&&q>e?Math.abs(d.left+e-q):0);d.top-=Math.min(d.top,d.top+g>s&&s>g?Math.abs(g+t):0);return d},_findPos:function(b){for(var d=
this._getInst(b),d=this._get(d,"isRTL");b&&("hidden"==b.type||1!=b.nodeType||a.expr.filters.hidden(b));)b=b[d?"previousSibling":"nextSibling"];b=a(b).offset();return[b.left,b.top]},_hideDatepicker:function(b){var d=this._curInst;if(d&&!(b&&d!=a.data(b,"datepicker"))&&this._datepickerShowing){b=this._get(d,"showAnim");var c=this._get(d,"duration"),e=function(){a.datepicker._tidyDialog(d)};if(a.effects&&(a.effects.effect[b]||a.effects[b]))d.dpDiv.hide(b,a.datepicker._get(d,"showOptions"),c,e);else d.dpDiv["slideDown"==
b?"slideUp":"fadeIn"==b?"fadeOut":"hide"](b?c:null,e);b||e();this._datepickerShowing=!1;(b=this._get(d,"onClose"))&&b.apply(d.input?d.input[0]:null,[d.input?d.input.val():"",d]);this._lastInput=null;this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv)));this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){b=
a(b.target);var d=a.datepicker._getInst(b[0]);(b[0].id!=a.datepicker._mainDivId&&0==b.parents("#"+a.datepicker._mainDivId).length&&!b.hasClass(a.datepicker.markerClassName)&&!b.closest("."+a.datepicker._triggerClass).length&&a.datepicker._datepickerShowing&&(!a.datepicker._inDialog||!a.blockUI)||b.hasClass(a.datepicker.markerClassName)&&a.datepicker._curInst!=d)&&a.datepicker._hideDatepicker()}},_adjustDate:function(b,d,c){b=a(b);var e=this._getInst(b[0]);this._isDisabledDatepicker(b[0])||(this._adjustInstDate(e,
d+("M"==c?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e))},_gotoToday:function(b){b=a(b);var d=this._getInst(b[0]);if(this._get(d,"gotoCurrent")&&d.currentDay)d.selectedDay=d.currentDay,d.drawMonth=d.selectedMonth=d.currentMonth,d.drawYear=d.selectedYear=d.currentYear;else{var c=new Date;d.selectedDay=c.getDate();d.drawMonth=d.selectedMonth=c.getMonth();d.drawYear=d.selectedYear=c.getFullYear()}this._notifyChange(d);this._adjustDate(b)},_selectMonthYear:function(b,d,c){b=a(b);var e=
this._getInst(b[0]);e["selected"+("M"==c?"Month":"Year")]=e["draw"+("M"==c?"Month":"Year")]=parseInt(d.options[d.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(b)},_selectDay:function(b,d,c,e){var g=a(b);!a(e).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(g[0])&&(g=this._getInst(g[0]),g.selectedDay=g.currentDay=a("a",e).html(),g.selectedMonth=g.currentMonth=d,g.selectedYear=g.currentYear=c,this._selectDate(b,this._formatDate(g,g.currentDay,g.currentMonth,g.currentYear)))},
_clearDate:function(b){b=a(b);this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(b,d){var c=a(b),c=this._getInst(c[0]);d=null!=d?d:this._formatDate(c);c.input&&c.input.val(d);this._updateAlternate(c);var e=this._get(c,"onSelect");e?e.apply(c.input?c.input[0]:null,[d,c]):c.input&&c.input.trigger("change");c.inline?this._updateDatepicker(c):(this._hideDatepicker(),this._lastInput=c.input[0],"object"!=typeof c.input[0]&&c.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var d=
this._get(b,"altField");if(d){var c=this._get(b,"altFormat")||this._get(b,"dateFormat"),e=this._getDate(b),g=this.formatDate(c,e,this._getFormatConfig(b));a(d).each(function(){a(this).val(g)})}},noWeekends:function(a){a=a.getDay();return[0<a&&6>a,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(b,d,c){if(null==b||null==d)throw"Invalid arguments";
d="object"==typeof d?d.toString():d+"";if(""==d)return null;for(var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff,e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),g=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,p=(c?c.dayNames:null)||this._defaults.dayNames,t=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,q=(c?c.monthNames:null)||this._defaults.monthNames,s=c=-1,r=-1,v=-1,u=!1,w=function(a){(a=F+1<b.length&&b.charAt(F+1)==a)&&F++;return a},x=function(a){var b=
w(a);a=RegExp("^\\d{1,"+("@"==a?14:"!"==a?20:"y"==a&&b?4:"o"==a?3:2)+"}");a=d.substring(n).match(a);if(!a)throw"Missing number at position "+n;n+=a[0].length;return parseInt(a[0],10)},G=function(b,f,c){b=a.map(w(b)?c:f,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});var e=-1;a.each(b,function(a,b){var f=b[1];if(d.substr(n,f.length).toLowerCase()==f.toLowerCase())return e=b[0],n+=f.length,!1});if(-1!=e)return e+1;throw"Unknown name at position "+n;},y=function(){if(d.charAt(n)!=
b.charAt(F))throw"Unexpected literal at position "+n;n++},n=0,F=0;F<b.length;F++)if(u)"'"==b.charAt(F)&&!w("'")?u=!1:y();else switch(b.charAt(F)){case "d":r=x("d");break;case "D":G("D",g,p);break;case "o":v=x("o");break;case "m":s=x("m");break;case "M":s=G("M",t,q);break;case "y":c=x("y");break;case "@":var D=new Date(x("@"));c=D.getFullYear();s=D.getMonth()+1;r=D.getDate();break;case "!":D=new Date((x("!")-this._ticksTo1970)/1E4);c=D.getFullYear();s=D.getMonth()+1;r=D.getDate();break;case "'":w("'")?
y():u=!0;break;default:y()}if(n<d.length&&(g=d.substr(n),!/^\s+/.test(g)))throw"Extra/unparsed characters found in date: "+g;-1==c?c=(new Date).getFullYear():100>c&&(c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100));if(-1<v){s=1;r=v;do{e=this._getDaysInMonth(c,s-1);if(r<=e)break;s++;r-=e}while(1)}D=this._daylightSavingAdjust(new Date(c,s-1,r));if(D.getFullYear()!=c||D.getMonth()+1!=s||D.getDate()!=r)throw"Invalid date";return D},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:864E9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(a,b,d){if(!b)return"";var c=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort,e=(d?d.dayNames:null)||this._defaults.dayNames,g=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort;d=(d?d.monthNames:null)||this._defaults.monthNames;var t=
function(b){(b=u+1<a.length&&a.charAt(u+1)==b)&&u++;return b},q=function(a,b,d){b=""+b;if(t(a))for(;b.length<d;)b="0"+b;return b},s=function(a,b,d,f){return t(a)?f[b]:d[b]},r="",v=!1;if(b)for(var u=0;u<a.length;u++)if(v)"'"==a.charAt(u)&&!t("'")?v=!1:r+=a.charAt(u);else switch(a.charAt(u)){case "d":r+=q("d",b.getDate(),2);break;case "D":r+=s("D",b.getDay(),c,e);break;case "o":r+=q("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/
864E5),3);break;case "m":r+=q("m",b.getMonth()+1,2);break;case "M":r+=s("M",b.getMonth(),g,d);break;case "y":r+=t("y")?b.getFullYear():(10>b.getYear()%100?"0":"")+b.getYear()%100;break;case "@":r+=b.getTime();break;case "!":r+=1E4*b.getTime()+this._ticksTo1970;break;case "'":t("'")?r+="'":v=!0;break;default:r+=a.charAt(u)}return r},_possibleChars:function(a){for(var b="",d=!1,c=function(b){(b=e+1<a.length&&a.charAt(e+1)==b)&&e++;return b},e=0;e<a.length;e++)if(d)"'"==a.charAt(e)&&!c("'")?d=!1:b+=
a.charAt(e);else switch(a.charAt(e)){case "d":case "m":case "y":case "@":b+="0123456789";break;case "D":case "M":return null;case "'":c("'")?b+="'":d=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==n?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var d=this._get(a,"dateFormat"),c=a.lastVal=a.input?a.input.val():null,e,g;e=g=this._getDefaultDate(a);var t=this._getFormatConfig(a);try{e=this.parseDate(d,c,t)||g}catch(q){this.log(q),
c=b?"":c}a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();a.currentDay=c?e.getDate():0;a.currentMonth=c?e.getMonth():0;a.currentYear=c?e.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(b,d,c){var e=function(a){var b=new Date;b.setDate(b.getDate()+a);return b},g=function(d){try{return a.datepicker.parseDate(a.datepicker._get(b,
"dateFormat"),d,a.datepicker._getFormatConfig(b))}catch(c){}for(var e=(d.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,g=e.getFullYear(),h=e.getMonth(),e=e.getDate(),l=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=l.exec(d);k;){switch(k[2]||"d"){case "d":case "D":e+=parseInt(k[1],10);break;case "w":case "W":e+=7*parseInt(k[1],10);break;case "m":case "M":h+=parseInt(k[1],10);e=Math.min(e,a.datepicker._getDaysInMonth(g,h));break;case "y":case "Y":g+=parseInt(k[1],10),e=Math.min(e,a.datepicker._getDaysInMonth(g,
h))}k=l.exec(d)}return new Date(g,h,e)};if(d=(d=null==d||""===d?c:"string"==typeof d?g(d):"number"==typeof d?isNaN(d)?c:e(d):new Date(d.getTime()))&&"Invalid Date"==d.toString()?c:d)d.setHours(0),d.setMinutes(0),d.setSeconds(0),d.setMilliseconds(0);return this._daylightSavingAdjust(d)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(12<a.getHours()?a.getHours()+2:0);return a},_setDate:function(a,b,d){var c=!b,e=a.selectedMonth,g=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,
b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();(e!=a.selectedMonth||g!=a.selectedYear)&&!d&&this._notifyChange(a);this._adjustInstDate(a);a.input&&a.input.val(c?"":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))},_attachHandlers:function(b){var c=this._get(b,
"stepMonths"),e="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){a(this).bind(this.getAttribute("data-event"),{prev:function(){window["DP_jQuery_"+d].datepicker._adjustDate(e,-c,"M")},next:function(){window["DP_jQuery_"+d].datepicker._adjustDate(e,+c,"M")},hide:function(){window["DP_jQuery_"+d].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+d].datepicker._gotoToday(e)},selectDay:function(){window["DP_jQuery_"+d].datepicker._selectDay(e,+this.getAttribute("data-month"),
+this.getAttribute("data-year"),this);return!1},selectMonth:function(){window["DP_jQuery_"+d].datepicker._selectMonthYear(e,this,"M");return!1},selectYear:function(){window["DP_jQuery_"+d].datepicker._selectMonthYear(e,this,"Y");return!1}}[this.getAttribute("data-handler")])})},_generateHTML:function(b){var d=new Date,d=this._daylightSavingAdjust(new Date(d.getFullYear(),d.getMonth(),d.getDate())),c=this._get(b,"isRTL"),e=this._get(b,"showButtonPanel"),g=this._get(b,"hideIfNoPrevNext"),p=this._get(b,
"navigationAsDateFormat"),t=this._getNumberOfMonths(b),q=this._get(b,"showCurrentAtPos"),s=this._get(b,"stepMonths"),r=1!=t[0]||1!=t[1],v=this._daylightSavingAdjust(!b.currentDay?new Date(9999,9,9):new Date(b.currentYear,b.currentMonth,b.currentDay)),u=this._getMinMaxDate(b,"min"),w=this._getMinMaxDate(b,"max"),q=b.drawMonth-q,x=b.drawYear;0>q&&(q+=12,x--);if(w)for(var n=this._daylightSavingAdjust(new Date(w.getFullYear(),w.getMonth()-t[0]*t[1]+1,w.getDate())),n=u&&n<u?u:n;this._daylightSavingAdjust(new Date(x,
q,1))>n;)q--,0>q&&(q=11,x--);b.drawMonth=q;b.drawYear=x;var n=this._get(b,"prevText"),n=!p?n:this.formatDate(n,this._daylightSavingAdjust(new Date(x,q-s,1)),this._getFormatConfig(b)),n=this._canAdjustMonth(b,-1,x,q)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":g?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+
(c?"e":"w")+'">'+n+"</span></a>",y=this._get(b,"nextText"),y=!p?y:this.formatDate(y,this._daylightSavingAdjust(new Date(x,q+s,1)),this._getFormatConfig(b)),g=this._canAdjustMonth(b,1,x,q)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+y+"</span></a>":g?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":
"e")+'">'+y+"</span></a>",s=this._get(b,"currentText"),y=this._get(b,"gotoCurrent")&&b.currentDay?v:d,s=!p?s:this.formatDate(s,y,this._getFormatConfig(b)),p=!b.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(b,"closeText")+"</button>":"",e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?p:"")+(this._isInRange(b,y)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+
s+"</button>":"")+(c?"":p)+"</div>":"",p=parseInt(this._get(b,"firstDay"),10),p=isNaN(p)?0:p,s=this._get(b,"showWeek"),y=this._get(b,"dayNames");this._get(b,"dayNamesShort");var H=this._get(b,"dayNamesMin"),F=this._get(b,"monthNames"),D=this._get(b,"monthNamesShort"),R=this._get(b,"beforeShowDay"),O=this._get(b,"showOtherMonths"),U=this._get(b,"selectOtherMonths");this._get(b,"calculateWeek");for(var S=this._getDefaultDate(b),L="",I=0;I<t[0];I++){var M="";this.maxRows=4;for(var J=0;J<t[1];J++){var z=
this._daylightSavingAdjust(new Date(x,q,b.selectedDay)),A=" ui-corner-all",C="";if(r){C+='<div class="ui-datepicker-group';if(1<t[1])switch(J){case 0:C+=" ui-datepicker-group-first";A=" ui-corner-"+(c?"right":"left");break;case t[1]-1:C+=" ui-datepicker-group-last";A=" ui-corner-"+(c?"left":"right");break;default:C+=" ui-datepicker-group-middle",A=""}C+='">'}for(var C=C+('<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+A+'">'+(/all|left/.test(A)&&0==I?c?g:n:"")+(/all|right/.test(A)&&
0==I?c?n:g:"")+this._generateMonthYearHeader(b,q,x,u,w,0<I||0<J,F,D)+'</div><table class="ui-datepicker-calendar"><thead><tr>'),E=s?'<th class="ui-datepicker-week-col">'+this._get(b,"weekHeader")+"</th>":"",A=0;7>A;A++)var B=(A+p)%7,E=E+("<th"+(5<=(A+p+6)%7?' class="ui-datepicker-week-end"':"")+'><span title="'+y[B]+'">'+H[B]+"</span></th>");C+=E+"</tr></thead><tbody>";E=this._getDaysInMonth(x,q);x==b.selectedYear&&q==b.selectedMonth&&(b.selectedDay=Math.min(b.selectedDay,E));A=(this._getFirstDayOfMonth(x,
q)-p+7)%7;E=Math.ceil((A+E)/7);this.maxRows=E=r?this.maxRows>E?this.maxRows:E:E;for(var B=this._daylightSavingAdjust(new Date(x,q,1-A)),T=0;T<E;T++){for(var C=C+"<tr>",P=!s?"":'<td class="ui-datepicker-week-col">'+this._get(b,"calculateWeek")(B)+"</td>",A=0;7>A;A++){var N=R?R.apply(b.input?b.input[0]:null,[B]):[!0,""],K=B.getMonth()!=q,Q=K&&!U||!N[0]||u&&B<u||w&&B>w,P=P+('<td class="'+(5<=(A+p+6)%7?" ui-datepicker-week-end":"")+(K?" ui-datepicker-other-month":"")+(B.getTime()==z.getTime()&&q==b.selectedMonth&&
b._keyEvent||S.getTime()==B.getTime()&&S.getTime()==z.getTime()?" "+this._dayOverClass:"")+(Q?" "+this._unselectableClass+" ui-state-disabled":"")+(K&&!O?"":" "+N[1]+(B.getTime()==v.getTime()?" "+this._currentClass:"")+(B.getTime()==d.getTime()?" ui-datepicker-today":""))+'"'+((!K||O)&&N[2]?' title="'+N[2]+'"':"")+(Q?"":' data-handler="selectDay" data-event="click" data-month="'+B.getMonth()+'" data-year="'+B.getFullYear()+'"')+">"+(K&&!O?"&#xa0;":Q?'<span class="ui-state-default">'+B.getDate()+"</span>":
'<a class="ui-state-default'+(B.getTime()==d.getTime()?" ui-state-highlight":"")+(B.getTime()==v.getTime()?" ui-state-active":"")+(K?" ui-priority-secondary":"")+'" href="#">'+B.getDate()+"</a>")+"</td>");B.setDate(B.getDate()+1);B=this._daylightSavingAdjust(B)}C+=P+"</tr>"}q++;11<q&&(q=0,x++);C+="</tbody></table>"+(r?"</div>"+(0<t[0]&&J==t[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");M+=C}L+=M}L+=e+(a.ui.ie6&&!b.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
"");b._keyEvent=!1;return L},_generateMonthYearHeader:function(a,b,d,c,e,g,t,q){var s=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),v=this._get(a,"showMonthAfterYear"),u='<div class="ui-datepicker-title">',w="";if(g||!s)w+='<span class="ui-datepicker-month">'+t[b]+"</span>";else{t=c&&c.getFullYear()==d;for(var x=e&&e.getFullYear()==d,w=w+'<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">',n=0;12>n;n++)if((!t||n>=c.getMonth())&&(!x||n<=e.getMonth()))w+='<option value="'+
n+'"'+(n==b?' selected="selected"':"")+">"+q[n]+"</option>";w+="</select>"}v||(u+=w+(g||!s||!r?"&#xa0;":""));if(!a.yearshtml)if(a.yearshtml="",g||!r)u+='<span class="ui-datepicker-year">'+d+"</span>";else{q=this._get(a,"yearRange").split(":");var y=(new Date).getFullYear();t=function(a){a=a.match(/c[+-].*/)?d+parseInt(a.substring(1),10):a.match(/[+-].*/)?y+parseInt(a,10):parseInt(a,10);return isNaN(a)?y:a};b=t(q[0]);q=Math.max(b,t(q[1]||""));b=c?Math.max(b,c.getFullYear()):b;q=e?Math.min(q,e.getFullYear()):
q;for(a.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';b<=q;b++)a.yearshtml+='<option value="'+b+'"'+(b==d?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>";u+=a.yearshtml;a.yearshtml=null}u+=this._get(a,"yearSuffix");v&&(u+=(g||!s||!r?"&#xa0;":"")+w);return u+"</div>"},_adjustInstDate:function(a,b,d){var c=a.drawYear+("Y"==d?b:0),e=a.drawMonth+("M"==d?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(c,e))+("D"==d?b:0);c=this._restrictMinMax(a,
this._daylightSavingAdjust(new Date(c,e,b)));a.selectedDay=c.getDate();a.drawMonth=a.selectedMonth=c.getMonth();a.drawYear=a.selectedYear=c.getFullYear();("M"==d||"Y"==d)&&this._notifyChange(a)},_restrictMinMax:function(a,b){var d=this._getMinMaxDate(a,"min"),c=this._getMinMaxDate(a,"max"),d=d&&b<d?d:b;return c&&d>c?c:d},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,
"numberOfMonths");return null==a?[1,1]:"number"==typeof a?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,d,c){var e=this._getNumberOfMonths(a);d=this._daylightSavingAdjust(new Date(d,c+(0>b?b:e[0]*e[1]),1));0>b&&d.setDate(this._getDaysInMonth(d.getFullYear(),
d.getMonth()));return this._isInRange(a,d)},_isInRange:function(a,b){var d=this._getMinMaxDate(a,"min"),c=this._getMinMaxDate(a,"max");return(!d||b.getTime()>=d.getTime())&&(!c||b.getTime()<=c.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff"),b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,
"monthNames")}},_formatDate:function(a,b,d,c){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);b=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(c,d,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick).find(document.body).append(a.datepicker.dpDiv),
a.datepicker.initialized=!0);var d=Array.prototype.slice.call(arguments,1);return"string"==typeof b&&("isDisabled"==b||"getDate"==b||"widget"==b)||"option"==b&&2==arguments.length&&"string"==typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(d)):this.each(function(){"string"==typeof b?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(d)):a.datepicker._attachDatepicker(this,b)})};a.datepicker=new e;a.datepicker.initialized=!1;a.datepicker.uuid=
(new Date).getTime();a.datepicker.version="1.9.2";window["DP_jQuery_"+d]=a})(jQuery);
(function(a,n){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},g={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{version:"1.9.2",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",of:window,collision:"fit",using:function(c){var d=a(this).css(c).offset().top;0>d&&a(this).css("top",
c.top-d)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");"string"!==typeof this.originalTitle&&(this.originalTitle="");this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.options.title=this.options.title||this.originalTitle;var c=this,d=this.options,b=d.title||"&#160;",f,e,g,k;f=(this.uiDialog=a("<div>")).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
d.dialogClass).css({display:"none",outline:0,zIndex:d.zIndex}).attr("tabIndex",-1).keydown(function(b){d.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE&&(c.close(b),b.preventDefault())}).mousedown(function(a){c.moveToTop(!1,a)}).appendTo("body");this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(f);e=(this.uiDialogTitlebar=a("<div>")).addClass("ui-dialog-titlebar  ui-widget-header  ui-corner-all  ui-helper-clearfix").bind("mousedown",
function(){f.focus()}).prependTo(f);g=a("<a href='#'></a>").addClass("ui-dialog-titlebar-close  ui-corner-all").attr("role","button").click(function(a){a.preventDefault();c.close(a)}).appendTo(e);(this.uiDialogTitlebarCloseText=a("<span>")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(g);b=a("<span>").uniqueId().addClass("ui-dialog-title").html(b).prependTo(e);k=(this.uiDialogButtonPane=a("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");(this.uiButtonSet=
a("<div>")).addClass("ui-dialog-buttonset").appendTo(k);f.attr({role:"dialog","aria-labelledby":b.attr("id")});e.find("*").add(e).disableSelection();this._hoverable(g);this._focusable(g);d.draggable&&a.fn.draggable&&this._makeDraggable();d.resizable&&a.fn.resizable&&this._makeResizable();this._createButtons(d.buttons);this._isOpen=!1;a.fn.bgiframe&&f.bgiframe();this._on(f,{keydown:function(b){if(d.modal&&b.keyCode===a.ui.keyCode.TAB){var c=a(":tabbable",f),e=c.filter(":first"),c=c.filter(":last");
if(b.target===c[0]&&!b.shiftKey)return e.focus(1),!1;if(b.target===e[0]&&b.shiftKey)return c.focus(1),!1}}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var a,d=this.oldPosition;this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();this.originalTitle&&this.element.attr("title",this.originalTitle);a=d.parent.children().eq(d.index);a.length&&a[0]!==this.element[0]?
a.before(this.element):d.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(c){var d=this,b,f;if(this._isOpen&&!1!==this._trigger("beforeClose",c))return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){d._trigger("close",c)}):(this.uiDialog.hide(),this._trigger("close",c)),a.ui.dialog.overlay.resize(),this.options.modal&&(b=0,a(".ui-dialog").each(function(){this!==d.uiDialog[0]&&(f=a(this).css("z-index"),
isNaN(f)||(b=Math.max(b,f)))}),a.ui.dialog.maxZ=b),this},isOpen:function(){return this._isOpen},moveToTop:function(c,d){var b=this.options;if(b.modal&&!c||!b.stack&&!b.modal)return this._trigger("focus",d);b.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=b.zIndex);this.overlay&&(a.ui.dialog.maxZ+=1,a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ,this.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ));b={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()};a.ui.dialog.maxZ+=1;this.uiDialog.css("z-index",
a.ui.dialog.maxZ);this.element.attr(b);this._trigger("focus",d);return this},open:function(){if(!this._isOpen){var c;c=this.options;var d=this.uiDialog;this._size();this._position(c.position);d.show(c.show);this.overlay=c.modal?new a.ui.dialog.overlay(this):null;this.moveToTop(!0);c=this.element.find(":tabbable");c.length||(c=this.uiDialogButtonPane.find(":tabbable"),c.length||(c=d));c.eq(0).focus();this._isOpen=!0;this._trigger("open");return this}},_createButtons:function(c){var d=this,b=!1;this.uiDialogButtonPane.remove();
this.uiButtonSet.empty();"object"===typeof c&&null!==c&&a.each(c,function(){return!(b=!0)});b?(a.each(c,function(b,c){var e,g;c=a.isFunction(c)?{click:c,text:b}:c;c=a.extend({type:"button"},c);g=c.click;c.click=function(){g.apply(d.element[0],arguments)};e=a("<button></button>",c).appendTo(d.uiButtonSet);a.fn.button&&e.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function c(a){return{position:a.position,
offset:a.offset}}var d=this,b=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(b,e){a(this).addClass("ui-dialog-dragging");d._trigger("dragStart",b,c(e))},drag:function(a,b){d._trigger("drag",a,c(b))},stop:function(f,e){b.position=[e.position.left-d.document.scrollLeft(),e.position.top-d.document.scrollTop()];a(this).removeClass("ui-dialog-dragging");d._trigger("dragStop",f,c(e));a.ui.dialog.overlay.resize()}})},
_makeResizable:function(c){function d(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===n?this.options.resizable:c;var b=this,f=this.options,e=this.uiDialog.css("position");c="string"===typeof c?c:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:this._minHeight(),handles:c,start:function(c,f){a(this).addClass("ui-dialog-resizing");
b._trigger("resizeStart",c,d(f))},resize:function(a,c){b._trigger("resize",a,d(c))},stop:function(c,e){a(this).removeClass("ui-dialog-resizing");f.height=a(this).height();f.width=a(this).width();b._trigger("resizeStop",c,d(e));a.ui.dialog.overlay.resize()}}).css("position",e).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(c){var d=[],b=[0,0],f;if(c){if("string"===
typeof c||"object"===typeof c&&"0"in c)d=c.split?c.split(" "):[c[0],c[1]],1===d.length&&(d[1]=d[0]),a.each(["left","top"],function(a,c){+d[a]===d[a]&&(b[a]=d[a],d[a]=c)}),c={my:d[0]+(0>b[0]?b[0]:"+"+b[0])+" "+d[1]+(0>b[1]?b[1]:"+"+b[1]),at:d.join(" ")};c=a.extend({},a.ui.dialog.prototype.options.position,c)}else c=a.ui.dialog.prototype.options.position;(f=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.position(c);f||this.uiDialog.hide()},_setOptions:function(c){var d=this,b={},
f=!1;a.each(c,function(a,c){d._setOption(a,c);a in e&&(f=!0);a in g&&(b[a]=c)});f&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",b)},_setOption:function(c,d){var b,f=this.uiDialog;switch(c){case "buttons":this._createButtons(d);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+d);break;case "dialogClass":f.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+d);break;case "disabled":d?f.addClass("ui-dialog-disabled"):
f.removeClass("ui-dialog-disabled");break;case "draggable":(b=f.is(":data(draggable)"))&&!d&&f.draggable("destroy");!b&&d&&this._makeDraggable();break;case "position":this._position(d);break;case "resizable":(b=f.is(":data(resizable)"))&&!d&&f.resizable("destroy");b&&"string"===typeof d&&f.resizable("option","handles",d);!b&&!1!==d&&this._makeResizable(d);break;case "title":a(".ui-dialog-title",this.uiDialogTitlebar).html(""+(d||"&#160;"))}this._super(c,d)},_size:function(){var c,d,b=this.options,
f=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});b.minWidth>b.width&&(b.width=b.minWidth);c=this.uiDialog.css({height:"auto",width:b.width}).outerHeight();d=Math.max(0,b.minHeight-c);"auto"===b.height?a.support.minHeight?this.element.css({minHeight:d,height:"auto"}):(this.uiDialog.show(),c=this.element.css("height","auto").height(),f||this.uiDialog.hide(),this.element.height(Math.max(c,d))):this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&&
this.uiDialog.resizable("option","minHeight",this._minHeight())}});a.extend(a.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(a){(a=a.attr("id"))||(a=this.uuid+=1);return"ui-dialog-title-"+a},overlay:function(c){this.$el=a.ui.dialog.overlay.create(c)}});a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus mousedown mouseup keydown keypress click".split(" "),function(a){return a+".dialog-overlay"}).join(" "),create:function(c){0===this.instances.length&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&
a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ)return!1})},1),a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize));var d=this.oldInstances.pop()||a("<div>").addClass("ui-widget-overlay");a(document).bind("keydown.dialog-overlay",function(b){var f=a.ui.dialog.overlay.instances;0!==f.length&&f[f.length-1]===d&&c.options.closeOnEscape&&(!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)&&(c.close(b),b.preventDefault())});
d.appendTo(document.body).css({width:this.width(),height:this.height()});a.fn.bgiframe&&d.bgiframe();this.instances.push(d);return d},destroy:function(c){var d=a.inArray(c,this.instances),b=0;-1!==d&&this.oldInstances.push(this.instances.splice(d,1)[0]);0===this.instances.length&&a([document,window]).unbind(".dialog-overlay");c.height(0).width(0).remove();a.each(this.instances,function(){b=Math.max(b,this.css("z-index"))});this.maxZ=b},height:function(){var c,d;return a.ui.ie?(c=Math.max(document.documentElement.scrollHeight,
document.body.scrollHeight),d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),c<d?a(window).height()+"px":c+"px"):a(document).height()+"px"},width:function(){var c,d;return a.ui.ie?(c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),d=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),c<d?a(window).width()+"px":c+"px"):a(document).width()+"px"},resize:function(){var c=a([]);a.each(a.ui.dialog.overlay.instances,function(){c=c.add(this)});
c.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(a,n){var e=!1;a.widget("ui.menu",{version:"1.9.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"top",at:"bottom"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,
a.proxy(function(a){this.options.disabled&&a.preventDefault()},this));this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item > a":function(a){a.preventDefault()},"click .ui-state-disabled > a":function(a){a.preventDefault()},"click .ui-menu-item:has(a)":function(g){var c=a(g.target).closest(".ui-menu-item");!e&&c.not(".ui-state-disabled").length&&(e=!0,this.select(g),c.has(".ui-menu").length?this.expand(g):this.element.is(":focus")||
(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var c=a(e.currentTarget);c.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(e,c)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,c){var d=this.active||this.element.children(".ui-menu-item").eq(0);c||this.focus(a,d)},blur:function(e){this._delay(function(){a.contains(this.element[0],
this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(g){a(g.target).closest(".ui-menu").length||this.collapseAll(g);e=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();
this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=a(this);e.data("ui-menu-submenu-carat")&&e.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function c(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,
"\\$&")}var d,b,f,h,l=!0;switch(e.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(e);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case a.ui.keyCode.HOME:this._move("first","first",e);break;case a.ui.keyCode.END:this._move("last","last",e);break;case a.ui.keyCode.UP:this.previous(e);break;case a.ui.keyCode.DOWN:this.next(e);break;case a.ui.keyCode.LEFT:this.collapse(e);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(e);
break;case a.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,d=this.previousFilter||"",b=String.fromCharCode(e.keyCode),f=!1,clearTimeout(this.filterTimer),b===d?f=!0:b=d+b,h=RegExp("^"+c(b),"i"),d=this.activeMenu.children(".ui-menu-item").filter(function(){return h.test(a(this).children("a").text())}),d=f&&-1!==d.index(this.active.next())?this.active.nextAll(".ui-menu-item"):d,d.length||(b=String.fromCharCode(e.keyCode),h=RegExp("^"+c(b),"i"),d=this.activeMenu.children(".ui-menu-item").filter(function(){return h.test(a(this).children("a").text())})),
d.length?(this.focus(e,d),1<d.length?(this.previousFilter=b,this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var e,c=this.options.icons.submenu;e=this.element.find(this.options.menus);e.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,
"aria-hidden":"true","aria-expanded":"false"}).each(function(){var d=a(this),b=d.prev("a"),f=a("<span>").addClass("ui-menu-icon ui-icon "+c).data("ui-menu-submenu-carat",!0);b.attr("aria-haspopup","true").prepend(f);d.attr("aria-labelledby",b.attr("id"))});e=e.add(this.element);e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});e.children(":not(.ui-menu-item)").each(function(){var d=
a(this);/[^\-\u2014\u2013\s]/.test(d.text())||d.addClass("ui-widget-content ui-menu-divider")});e.children(".ui-state-disabled").attr("aria-disabled","true");this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(a,c){var d;this.blur(a,a&&"focus"===a.type);this._scrollIntoView(c);this.active=c.first();d=this.active.children("a").addClass("ui-state-focus");this.options.role&&this.element.attr("aria-activedescendant",
d.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);d=c.children(".ui-menu");d.length&&/^mouse/.test(a.type)&&this._startOpening(d);this.activeMenu=c.parent();this._trigger("focus",a,{item:c})},_scrollIntoView:function(e){var c,d,b;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],
"paddingTop"))||0,c=e.offset().top-this.activeMenu.offset().top-c-d,d=this.activeMenu.scrollTop(),b=this.activeMenu.height(),e=e.height(),0>c?this.activeMenu.scrollTop(d+c):c+e>b&&this.activeMenu.scrollTop(d+c-b+e))},blur:function(a,c){c||clearTimeout(this.timer);this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer);"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close();
this._open(a)},this.delay))},_open:function(e){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true");e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(e,c){clearTimeout(this.timer);this.timer=this._delay(function(){var d=c?this.element:a(e&&e.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element);this._close(d);this.blur(e);
this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element);a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(a){var c=this.active&&this.active.parent().closest(".ui-menu-item",this.element);c&&c.length&&(this._close(),this.focus(a,c))},expand:function(a){var c=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();
c&&c.length&&(this._open(c.parent()),this._delay(function(){this.focus(a,c)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,c,d){var b;this.active&&(b="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+
"All"](".ui-menu-item").eq(0));if(!b||!b.length||!this.active)b=this.activeMenu.children(".ui-menu-item")[c]();this.focus(d,b)},nextPage:function(e){var c,d,b;this.active?this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,b=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){c=a(this);return 0>c.offset().top-d-b}),this.focus(e,c)):this.focus(e,this.activeMenu.children(".ui-menu-item")[!this.active?"first":"last"]())):this.next(e)},previousPage:function(e){var c,
d,b;this.active?this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,b=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){c=a(this);return 0<c.offset().top-d+b}),this.focus(e,c)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||a(e.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||
this.collapseAll(e,!0);this._trigger("select",e,c)}})})(jQuery);
(function(a,n){a.widget("ui.progressbar",{version:"1.9.2",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=a("<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()},value:function(a){if(a===n)return this._value();this._setOption("value",a);return this},_setOption:function(a,g){"value"===a&&(this.options.value=g,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete"));this._super(a,g)},_value:function(){var a=this.options.value;"number"!==typeof a&&(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(),
g=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change"));this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(g.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}})})(jQuery);
(function(a,n){a.widget("ui.slider",a.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var e,g,c=this.options,d=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),b=[];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"+(c.disabled?" ui-slider-disabled ui-disabled":""));this.range=a([]);c.range&&(!0===c.range&&(c.values||(c.values=[this._valueMin(),this._valueMin()]),c.values.length&&2!==c.values.length&&(c.values=[c.values[0],c.values[0]])),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===c.range||"max"===c.range?" ui-slider-range-"+c.range:"")));g=c.values&&c.values.length||1;for(e=d.length;e<g;e++)b.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
this.handles=d.add(a(b.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).mouseenter(function(){c.disabled||a(this).addClass("ui-state-hover")}).mouseleave(function(){a(this).removeClass("ui-state-hover")}).focus(function(){c.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")});
this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)});this._on(this.handles,{keydown:function(b){var d,c,e,g=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),d=this._start(b,g),!1===
d))return}e=this.options.step;d=this.options.values&&this.options.values.length?c=this.values(g):c=this.value();switch(b.keyCode){case a.ui.keyCode.HOME:c=this._valueMin();break;case a.ui.keyCode.END:c=this._valueMax();break;case a.ui.keyCode.PAGE_UP:c=this._trimAlignValue(d+(this._valueMax()-this._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:c=this._trimAlignValue(d-(this._valueMax()-this._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(d===this._valueMax())return;c=this._trimAlignValue(d+
e);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d===this._valueMin())return;c=this._trimAlignValue(d-e)}this._slide(b,g,c)},keyup:function(b){var d=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,d),this._change(b,d),a(b.target).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");
this._mouseDestroy()},_mouseCapture:function(e){var g,c,d,b,f,h=this;f=this.options;if(f.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();g=this._normValueFromMouse({x:e.pageX,y:e.pageY});c=this._valueMax()-this._valueMin()+1;this.handles.each(function(e){var f=g-h.values(e),m=Math.abs(g-h.values(e));c>=m&&(h.values(e)===h.values(e-1)?0<=f&&(c=m,d=a(this),b=e):(c=m,d=a(this),b=e))});!0===f.range&&this.values(1)===
f.min&&(b+=1,d=a(this.handles[b]));if(!1===this._start(e,b))return!1;this._mouseSliding=!0;this._handleIndex=b;d.addClass("ui-state-active").focus();f=d.offset();this._clickOffset=!a(e.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:e.pageX-f.left-d.width()/2,top:e.pageY-f.top-d.height()/2-(parseInt(d.css("borderTopWidth"),10)||0)-(parseInt(d.css("borderBottomWidth"),10)||0)+(parseInt(d.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(e,b,g);
return this._animateOff=!0},_mouseStart:function(){return!0},_mouseDrag:function(a){var g=this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,g);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="vertical"===this.options.orientation?"vertical":
"horizontal"},_normValueFromMouse:function(a){var g;"horizontal"===this.orientation?(g=this.elementSize.width,a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(g=this.elementSize.height,a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0));g=a/g;1<g&&(g=1);0>g&&(g=0);"vertical"===this.orientation&&(g=1-g);a=this._valueMax()-this._valueMin();g=this._valueMin()+g*a;return this._trimAlignValue(g)},_start:function(a,g){var c={handle:this.handles[g],value:this.value()};
this.options.values&&this.options.values.length&&(c.value=this.values(g),c.values=this.values());return this._trigger("start",a,c)},_slide:function(a,g,c){var d;if(this.options.values&&this.options.values.length){d=this.values(g?0:1);if(2===this.options.values.length&&!0===this.options.range&&(0===g&&c>d||1===g&&c<d))c=d;c!==this.values(g)&&(d=this.values(),d[g]=c,a=this._trigger("slide",a,{handle:this.handles[g],value:c,values:d}),this.values(g?0:1),!1!==a&&this.values(g,c,!0))}else c!==this.value()&&
(a=this._trigger("slide",a,{handle:this.handles[g],value:c}),!1!==a&&this.value(c))},_stop:function(a,g){var c={handle:this.handles[g],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(g),c.values=this.values());this._trigger("stop",a,c)},_change:function(a,g){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[g],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(g),c.values=this.values());this._trigger("change",
a,c)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},values:function(e,g){var c,d,b;if(1<arguments.length)this.options.values[e]=this._trimAlignValue(g),this._refreshValue(),this._change(null,e);else if(arguments.length)if(a.isArray(arguments[0])){c=this.options.values;d=arguments[0];for(b=0;b<c.length;b+=1)c[b]=this._trimAlignValue(d[b]),this._change(null,b);this._refreshValue()}else return this.options.values&&
this.options.values.length?this._values(e):this.value();else return this._values()},_setOption:function(e,g){var c,d=0;a.isArray(this.options.values)&&(d=this.options.values.length);a.Widget.prototype._setOption.apply(this,arguments);switch(e){case "disabled":g?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("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(c=0;c<d;c+=1)this._change(null,c);this._animateOff=!1;break;case "min":case "max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){return this._trimAlignValue(this.options.value)},
_values:function(a){var g,c;if(arguments.length)return g=this.options.values[a],this._trimAlignValue(g);g=this.options.values.slice();for(c=0;c<g.length;c+=1)g[c]=this._trimAlignValue(g[c]);return g},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var g=0<this.options.step?this.options.step:1,c=(a-this._valueMin())%g;a-=c;2*Math.abs(c)>=g&&(a+=0<c?g:-g);return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},
_valueMax:function(){return this.options.max},_refreshValue:function(){var e,g,c,d,b,f=this.options.range,h=this.options,l=this,k=!this._animateOff?h.animate:!1,m={};if(this.options.values&&this.options.values.length)this.handles.each(function(b){g=100*((l.values(b)-l._valueMin())/(l._valueMax()-l._valueMin()));m["horizontal"===l.orientation?"left":"bottom"]=g+"%";a(this).stop(1,1)[k?"animate":"css"](m,h.animate);if(!0===l.options.range)if("horizontal"===l.orientation){if(0===b)l.range.stop(1,1)[k?
"animate":"css"]({left:g+"%"},h.animate);if(1===b)l.range[k?"animate":"css"]({width:g-e+"%"},{queue:!1,duration:h.animate})}else{if(0===b)l.range.stop(1,1)[k?"animate":"css"]({bottom:g+"%"},h.animate);if(1===b)l.range[k?"animate":"css"]({height:g-e+"%"},{queue:!1,duration:h.animate})}e=g});else{c=this.value();d=this._valueMin();b=this._valueMax();g=b!==d?100*((c-d)/(b-d)):0;m["horizontal"===this.orientation?"left":"bottom"]=g+"%";this.handle.stop(1,1)[k?"animate":"css"](m,h.animate);if("min"===f&&
"horizontal"===this.orientation)this.range.stop(1,1)[k?"animate":"css"]({width:g+"%"},h.animate);if("max"===f&&"horizontal"===this.orientation)this.range[k?"animate":"css"]({width:100-g+"%"},{queue:!1,duration:h.animate});if("min"===f&&"vertical"===this.orientation)this.range.stop(1,1)[k?"animate":"css"]({height:g+"%"},h.animate);if("max"===f&&"vertical"===this.orientation)this.range[k?"animate":"css"]({height:100-g+"%"},{queue:!1,duration:h.animate})}}})})(jQuery);
(function(a){function n(a){return function(){var g=this.element.val();a.apply(this,arguments);this._refresh();g!==this.element.val()&&this._trigger("change")}}a.widget("ui.spinner",{version:"1.9.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);
this._setOption("min",this.options.min);this._setOption("step",this.options.step);this._value(this.element.val(),!0);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},g=this.element;a.each(["min","max","step"],function(a,d){var b=g.attr(d);void 0!==b&&b.length&&(e[d]=b)});return e},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",
focus:function(){this.previous=this.element.val()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(this._refresh(),this.previous!==this.element.val()&&this._trigger("change",a))},mousewheel:function(a,g){if(g){if(!this.spinning&&!this._start(a))return!1;this._spin((0<g?1:-1)*this.options.step,a);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100);a.preventDefault()}},"mousedown .ui-spinner-button":function(e){function g(){this.element[0]!==
this.document[0].activeElement&&(this.element.focus(),this.previous=c,this._delay(function(){this.previous=c}))}var c;c=this.element[0]===this.document[0].activeElement?this.previous:this.element.val();e.preventDefault();g.call(this);this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur;g.call(this)});!1!==this._start(e)&&this._repeat(null,a(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(a(e.currentTarget).hasClass("ui-state-active")){if(!1===
this._start(e))return!1;this._repeat(null,a(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)}},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");this.buttons.height()>Math.ceil(0.5*a.height())&&0<a.height()&&
a.height(a.height());this.options.disabled&&this.disable()},_keydown:function(e){var g=this.options,c=a.ui.keyCode;switch(e.keyCode){case c.UP:return this._repeat(null,1,e),!0;case c.DOWN:return this._repeat(null,-1,e),!0;case c.PAGE_UP:return this._repeat(null,g.page,e),!0;case c.PAGE_DOWN:return this._repeat(null,-g.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+
this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){if(!this.spinning&&!1===this._trigger("start",a))return!1;this.counter||(this.counter=1);return this.spinning=!0},_repeat:function(a,g,c){a=a||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,g,c)},a);this._spin(g*this.options.step,c)},_spin:function(a,g){var c=this.value()||0;this.counter||
(this.counter=1);c=this._adjustValue(c+a*this._increment(this.counter));if(!this.spinning||!1!==this._trigger("spin",g,{value:c}))this._value(c),this.counter++},_increment:function(e){var g=this.options.incremental;return g?a.isFunction(g)?g(e):Math.floor(e*e*e/5E4-e*e/500+17*e/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min)));return a},_precisionOf:function(a){a=a.toString();var g=a.indexOf(".");
return-1===g?0:a.length-g-1},_adjustValue:function(a){var g,c=this.options;g=null!==c.min?c.min:0;a=Math.round((a-g)/c.step)*c.step;a=parseFloat((g+a).toFixed(this._precision()));return null!==c.max&&a>c.max?c.max:null!==c.min&&a<c.min?c.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,g){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());this.options[a]=
g;this.element.val(this._format(c))}else{if("max"===a||"min"===a||"step"===a)"string"===typeof g&&(g=this._parse(g));this._super(a,g);"disabled"===a&&(g?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))}},_setOptions:n(function(a){this._super(a);this._value(this.element.val())}),_parse:function(a){"string"===typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):
+a);return""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(a,g){var c;""!==a&&(c=this._parse(a),null!==c&&(g||(c=this._adjustValue(c)),a=this._format(c)));this.element.val(a);this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",
!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.uiSpinner.replaceWith(this.element)},stepUp:n(function(a){this._stepUp(a)}),_stepUp:function(a){this._spin((a||1)*this.options.step)},stepDown:n(function(a){this._stepDown(a)}),_stepDown:function(a){this._spin((a||1)*-this.options.step)},pageUp:n(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:n(function(a){this._stepDown((a||1)*this.options.page)}),
value:function(a){if(!arguments.length)return this._parse(this.element.val());n(this._value).call(this,a)},widget:function(){return this.uiSpinner}})})(jQuery);
(function(a,n){function e(a){return 1<a.hash.length&&a.href.replace(c,"")===location.href.replace(c,"").replace(/\s/g,"%20")}var g=0,c=/#.*$/;a.widget("ui.tabs",{version:"1.9.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var d=this,b=this.options,c=b.active,e=location.hash.substring(1);this.running=!1;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",
b.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()});this._processTabs();if(null===c&&(e&&this.tabs.each(function(b,d){if(a(d).attr("aria-controls")===e)return c=b,!1}),null===c&&(c=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null===c||-1===c))c=this.tabs.length?0:!1;!1!==
c&&(c=this.tabs.index(this.tabs.eq(c)),-1===c&&(c=b.collapsible?!1:0));b.active=c;!b.collapsible&&!1===b.active&&this.anchors.length&&(b.active=0);a.isArray(b.disabled)&&(b.disabled=a.unique(b.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return d.tabs.index(a)}))).sort());this.active=!1!==this.options.active&&this.anchors.length?this._findActive(this.options.active):a();this._refresh();this.active.length&&this.load(b.active)},_getCreateEventData:function(){return{tab:this.active,
panel:!this.active.length?a():this._getPanelForTab(this.active)}},_tabKeydown:function(d){var b=a(this.document[0].activeElement).closest("li"),c=this.tabs.index(b),e=!0;if(!this._handlePageNav(d)){switch(d.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:c++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1;c--;break;case a.ui.keyCode.END:c=this.anchors.length-1;break;case a.ui.keyCode.HOME:c=0;break;case a.ui.keyCode.SPACE:d.preventDefault();clearTimeout(this.activating);this._activate(c);
return;case a.ui.keyCode.ENTER:d.preventDefault();clearTimeout(this.activating);this._activate(c===this.options.active?!1:c);return;default:return}d.preventDefault();clearTimeout(this.activating);c=this._focusNextTab(c,e);d.ctrlKey||(b.attr("aria-selected","false"),this.tabs.eq(c).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",c)},this.delay))}},_panelKeydown:function(d){!this._handlePageNav(d)&&d.ctrlKey&&d.keyCode===a.ui.keyCode.UP&&(d.preventDefault(),
this.active.focus())},_handlePageNav:function(d){if(d.altKey&&d.keyCode===a.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(d.altKey&&d.keyCode===a.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(d,b){function c(){d>e&&(d=0);0>d&&(d=e);return d}for(var e=this.tabs.length-1;-1!==a.inArray(c(),this.options.disabled);)d=b?d+1:d-1;return d},_focusNextTab:function(a,b){a=this._findNextTab(a,
b);this.tabs.eq(a).focus();return a},_setOption:function(a,b){"active"===a?this._activate(b):"disabled"===a?this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),!b&&!1===this.options.active&&this._activate(0)),"event"===a&&this._setupEvents(b),"heightStyle"===a&&this._setupHeightStyle(b))},_tabId:function(a){return a.attr("aria-controls")||"ui-tabs-"+ ++g},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,
"\\$&"):""},refresh:function(){var d=this.options,b=this.tablist.children(":has(a[href])");d.disabled=a.map(b.filter(".ui-state-disabled"),function(a){return b.index(a)});this._processTabs();!1===d.active||!this.anchors.length?(d.active=!1,this.active=a()):this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===d.disabled.length?(d.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,d.active-1),!1)):d.active=this.tabs.index(this.active);this._refresh()},
_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true",
"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var d=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=
a();this.anchors.each(function(b,c){var g,l,k,m=a(c).uniqueId().attr("id"),p=a(c).closest("li"),t=p.attr("aria-controls");e(c)?(g=c.hash,l=d.element.find(d._sanitizeSelector(g))):(k=d._tabId(p),g="#"+k,l=d.element.find(g),l.length||(l=d._createPanel(k),l.insertAfter(d.panels[b-1]||d.tablist)),l.attr("aria-live","polite"));l.length&&(d.panels=d.panels.add(l));t&&p.data("ui-tabs-aria-controls",t);p.attr({"aria-controls":g.substring(1),"aria-labelledby":m});l.attr("aria-labelledby",m)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role",
"tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(d){return a("<div>").attr("id",d).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(d){a.isArray(d)&&(d.length?d.length===this.anchors.length&&(d=!0):d=!1);for(var b=0,c;c=this.tabs[b];b++)!0===d||-1!==a.inArray(b,d)?a(c).addClass("ui-state-disabled").attr("aria-disabled","true"):a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");
this.options.disabled=d},_setupEvents:function(d){var b={click:function(a){a.preventDefault()}};d&&a.each(d.split(" "),function(a,d){b[d]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,b);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(d){var b,c,e=this.element.parent();"fill"===d?(a.support.minHeight||(c=e.css("overflow"),e.css("overflow",
"hidden")),b=e.height(),this.element.siblings(":visible").each(function(){var d=a(this),c=d.css("position");"absolute"===c||"fixed"===c||(b-=d.outerHeight(!0))}),c&&e.css("overflow",c),this.element.children().not(this.panels).each(function(){b-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===d&&(b=0,this.panels.each(function(){b=Math.max(b,a(this).height("").height())}).height(b))},_eventHandler:function(d){var b=
this.options,c=this.active,e=a(d.currentTarget).closest("li"),g=e[0]===c[0],k=g&&b.collapsible,m=k?a():this._getPanelForTab(e),p=!c.length?a():this._getPanelForTab(c),c={oldTab:c,oldPanel:p,newTab:k?a():e,newPanel:m};d.preventDefault();if(!e.hasClass("ui-state-disabled")&&!e.hasClass("ui-tabs-loading")&&!this.running&&!(g&&!b.collapsible||!1===this._trigger("beforeActivate",d,c)))b.active=k?!1:this.tabs.index(e),this.active=g?a():e,this.xhr&&this.xhr.abort(),!p.length&&!m.length&&a.error("jQuery UI Tabs: Mismatching fragment identifier."),
m.length&&this.load(this.tabs.index(e),d),this._toggle(d,c)},_toggle:function(d,b){function c(){g.running=!1;g._trigger("activate",d,b)}function e(){b.newTab.closest("li").addClass("ui-tabs-active ui-state-active");k.length&&g.options.show?g._show(k,g.options.show,c):(k.show(),c())}var g=this,k=b.newPanel,m=b.oldPanel;this.running=!0;m.length&&this.options.hide?this._hide(m,this.options.hide,function(){b.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");e()}):(b.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),
m.hide(),e());m.attr({"aria-expanded":"false","aria-hidden":"true"});b.oldTab.attr("aria-selected","false");k.length&&m.length?b.oldTab.attr("tabIndex",-1):k.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1);k.attr({"aria-expanded":"true","aria-hidden":"false"});b.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(d){d=this._findActive(d);d[0]!==this.active[0]&&(d.length||(d=this.active),d=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:d,
currentTarget:d,preventDefault:a.noop}))},_findActive:function(d){return!1===d?a():this.tabs.eq(d)},_getIndex:function(a){"string"===typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']")));return a},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId();
this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")});this.tabs.each(function(){var d=a(this),b=d.data("ui-tabs-aria-controls");
b?d.attr("aria-controls",b):d.removeAttr("aria-controls")});this.panels.show();"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(d){var b=this.options.disabled;!1!==b&&(d===n?b=!1:(d=this._getIndex(d),b=a.isArray(b)?a.map(b,function(a){return a!==d?a:null}):a.map(this.tabs,function(a,b){return b!==d?b:null})),this._setupDisabled(b))},disable:function(d){var b=this.options.disabled;if(!0!==b){if(d===n)b=!0;else{d=this._getIndex(d);if(-1!==a.inArray(d,b))return;b=a.isArray(b)?
a.merge([d],b).sort():[d]}this._setupDisabled(b)}},load:function(d,b){d=this._getIndex(d);var c=this,g=this.tabs.eq(d),l=g.find(".ui-tabs-anchor"),k=this._getPanelForTab(g),m={tab:g,panel:k};if(!e(l[0])&&(this.xhr=a.ajax(this._ajaxSettings(l,b,m)))&&"canceled"!==this.xhr.statusText)g.addClass("ui-tabs-loading"),k.attr("aria-busy","true"),this.xhr.success(function(a){setTimeout(function(){k.html(a);c._trigger("load",b,m)},1)}).complete(function(a,b){setTimeout(function(){"abort"===b&&c.panels.stop(!1,
!0);g.removeClass("ui-tabs-loading");k.removeAttr("aria-busy");a===c.xhr&&delete c.xhr},1)})},_ajaxSettings:function(d,b,c){var e=this;return{url:d.attr("href"),beforeSend:function(d,g){return e._trigger("beforeLoad",b,a.extend({jqXHR:d,ajaxSettings:g},c))}}},_getPanelForTab:function(d){d=a(d).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+d))}});!1!==a.uiBackCompat&&(a.ui.tabs.prototype._ui=function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},a.widget("ui.tabs",
a.ui.tabs,{url:function(a,b){this.anchors.eq(a).attr("href",b)}}),a.widget("ui.tabs",a.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var d=this;this._on({tabsbeforeload:function(b,c){a.data(c.tab[0],"cache.tabs")?b.preventDefault():c.jqXHR.success(function(){d.options.cache&&a.data(c.tab[0],"cache.tabs",!0)})}})},_ajaxSettings:function(d,b,c){var e=this.options.ajaxOptions;return a.extend({},e,{error:function(a,b){try{e.error(a,b,c.tab.closest("li").index(),c.tab[0])}catch(d){}}},
this._superApply(arguments))},_setOption:function(a,b){"cache"===a&&!1===b&&this.anchors.removeData("cache.tabs");this._super(a,b)},_destroy:function(){this.anchors.removeData("cache.tabs");this._super()},url:function(a){this.anchors.eq(a).removeData("cache.tabs");this._superApply(arguments)}}),a.widget("ui.tabs",a.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),a.widget("ui.tabs",a.ui.tabs,{options:{spinner:"<em>Loading&#8230;</em>"},_create:function(){this._super();this._on({tabsbeforeload:function(a,
b){if(a.target===this.element[0]&&this.options.spinner){var c=b.tab.find("span"),e=c.html();c.html(this.options.spinner);b.jqXHR.complete(function(){c.html(e)})}}})}}),a.widget("ui.tabs",a.ui.tabs,{options:{enable:null,disable:null},enable:function(d){var b=this.options,c;if(d&&!0===b.disabled||a.isArray(b.disabled)&&-1!==a.inArray(d,b.disabled))c=!0;this._superApply(arguments);c&&this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]))},disable:function(d){var b=this.options,c;if(d&&
!1===b.disabled||a.isArray(b.disabled)&&-1===a.inArray(d,b.disabled))c=!0;this._superApply(arguments);c&&this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}}),a.widget("ui.tabs",a.ui.tabs,{options:{add:null,remove:null,tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},add:function(d,b,c){c===n&&(c=this.anchors.length);var e,g=this.options;b=a(g.tabTemplate.replace(/#\{href\}/g,d).replace(/#\{label\}/g,b));var k=!d.indexOf("#")?d.replace("#",""):this._tabId(b);
b.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0);b.attr("aria-controls",k);d=c>=this.tabs.length;e=this.element.find("#"+k);e.length||(e=this._createPanel(k),d?0<c?e.insertAfter(this.panels.eq(-1)):e.appendTo(this.element):e.insertBefore(this.panels[c]));e.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide();d?b.appendTo(this.tablist):b.insertBefore(this.tabs[c]);g.disabled=a.map(g.disabled,function(a){return a>=c?++a:a});this.refresh();1===this.tabs.length&&
!1===g.active&&this.option("active",0);this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]));return this},remove:function(d){d=this._getIndex(d);var b=this.options,c=this.tabs.eq(d).remove(),e=this._getPanelForTab(c).remove();c.hasClass("ui-tabs-active")&&2<this.anchors.length&&this._activate(d+(d+1<this.anchors.length?1:-1));b.disabled=a.map(a.grep(b.disabled,function(a){return a!==d}),function(a){return a>=d?--a:a});this.refresh();this._trigger("remove",null,this._ui(c.find("a")[0],
e[0]));return this}}),a.widget("ui.tabs",a.ui.tabs,{length:function(){return this.anchors.length}}),a.widget("ui.tabs",a.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(d){d=d.is("li")?d.find("a[href]"):d;d=d[0];return a(d).closest("li").attr("aria-controls")||d.title&&d.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+ ++g}}),a.widget("ui.tabs",a.ui.tabs,{options:{panelTemplate:"<div></div>"},_createPanel:function(d){return a(this.options.panelTemplate).attr("id",
d).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),a.widget("ui.tabs",a.ui.tabs,{_create:function(){var a=this.options;null===a.active&&a.selected!==n&&(a.active=-1===a.selected?!1:a.selected);this._super();a.selected=a.active;!1===a.selected&&(a.selected=-1)},_setOption:function(a,b){if("selected"!==a)return this._super(a,b);var c=this.options;this._super("active",-1===b?!1:b);c.selected=c.active;!1===c.selected&&(c.selected=-1)},_eventHandler:function(){this._superApply(arguments);
this.options.selected=this.options.active;!1===this.options.selected&&(this.options.selected=-1)}}),a.widget("ui.tabs",a.ui.tabs,{options:{show:null,select:null},_create:function(){this._super();!1!==this.options.active&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(a,b,c){var e,g;e=this._superApply(arguments);if(!e)return!1;"beforeActivate"===a?(e=c.newTab.length?c.newTab:c.oldTab,g=c.newPanel.length?c.newPanel:
c.oldPanel,e=this._super("select",b,{tab:e.find(".ui-tabs-anchor")[0],panel:g[0],index:e.closest("li").index()})):"activate"===a&&c.newTab.length&&(e=this._super("show",b,{tab:c.newTab.find(".ui-tabs-anchor")[0],panel:c.newPanel[0],index:c.newTab.closest("li").index()}));return e}}),a.widget("ui.tabs",a.ui.tabs,{select:function(a){a=this._getIndex(a);if(-1===a)if(this.options.collapsible&&-1!==this.options.selected)a=this.options.selected;else return;this.anchors.eq(a).trigger(this.options.event+
this.eventNamespace)}}),function(){var d=0;a.widget("ui.tabs",a.ui.tabs,{options:{cookie:null},_create:function(){var a=this.options,d;null==a.active&&a.cookie&&(d=parseInt(this._cookie(),10),-1===d&&(d=!1),a.active=d);this._super()},_cookie:function(b){var c=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++d)];arguments.length&&(c.push(!1===b?-1:b),c.push(this.options.cookie));return a.cookie.apply(null,c)},_refresh:function(){this._super();this.options.cookie&&this._cookie(this.options.active,
this.options.cookie)},_eventHandler:function(){this._superApply(arguments);this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super();this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),a.widget("ui.tabs",a.ui.tabs,{_trigger:function(d,b,c){c=a.extend({},c);"load"===d&&(c.panel=c.panel[0],c.tab=c.tab.find(".ui-tabs-anchor")[0]);return this._super(d,b,c)}}),a.widget("ui.tabs",a.ui.tabs,{options:{fx:null},_getFx:function(){var d,b,c=this.options.fx;
c&&(a.isArray(c)?(d=c[0],b=c[1]):d=b=c);return c?{show:b,hide:d}:null},_toggle:function(a,b){function c(){g.running=!1;g._trigger("activate",a,b)}function e(){b.newTab.closest("li").addClass("ui-tabs-active ui-state-active");k.length&&p.show?k.animate(p.show,p.show.duration,function(){c()}):(k.show(),c())}var g=this,k=b.newPanel,m=b.oldPanel,p=this._getFx();if(!p)return this._super(a,b);g.running=!0;m.length&&p.hide?m.animate(p.hide,p.hide.duration,function(){b.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");
e()}):(b.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),m.hide(),e())}}))})(jQuery);
(function(a){function n(c,d){var b=(c.attr("aria-describedby")||"").split(/\s+/);b.push(d);c.data("ui-tooltip-id",d).attr("aria-describedby",a.trim(b.join(" ")))}function e(c){var d=c.data("ui-tooltip-id"),b=(c.attr("aria-describedby")||"").split(/\s+/),d=a.inArray(d,b);-1!==d&&b.splice(d,1);c.removeData("ui-tooltip-id");(b=a.trim(b.join(" ")))?c.attr("aria-describedby",b):c.removeAttr("aria-describedby")}var g=0;a.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return a(this).attr("title")},
hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable()},_setOption:function(c,d){var b=this;"disabled"===c?(this[d?"_disable":"_enable"](),this.options[c]=d):(this._super(c,d),"content"===c&&a.each(this.tooltips,function(a,d){b._updateContent(d)}))},_disable:function(){var c=
this;a.each(this.tooltips,function(d,b){var e=a.Event("blur");e.target=e.currentTarget=b[0];c.close(e,!0)});this.element.find(this.options.items).andSelf().each(function(){var d=a(this);d.is("[title]")&&d.data("ui-tooltip-title",d.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var c=a(this);c.data("ui-tooltip-title")&&c.attr("title",c.data("ui-tooltip-title"))})},open:function(c){var d=this,b=a(c?c.target:this.element).closest(this.options.items);
b.length&&!b.data("ui-tooltip-id")&&(b.attr("title")&&b.data("ui-tooltip-title",b.attr("title")),b.data("ui-tooltip-open",!0),c&&"mouseover"===c.type&&b.parents().each(function(){var b=a(this),c;b.data("ui-tooltip-open")&&(c=a.Event("blur"),c.target=c.currentTarget=this,d.close(c,!0));b.attr("title")&&(b.uniqueId(),d.parents[this.id]={element:this,title:b.attr("title")},b.attr("title",""))}),this._updateContent(b,c))},_updateContent:function(a,d){var b;b=this.options.content;var e=this,g=d?d.type:
null;if("string"===typeof b)return this._open(d,a,b);(b=b.call(a[0],function(b){a.data("ui-tooltip-open")&&e._delay(function(){d&&(d.type=g);this._open(d,a,b)})}))&&this._open(d,a,b)},_open:function(c,d,b){function e(a){k.of=a;g.is(":hidden")||g.position(k)}var g,l,k=a.extend({},this.options.position);if(b)if(g=this._find(d),g.length)g.find(".ui-tooltip-content").html(b);else{d.is("[title]")&&(c&&"mouseover"===c.type?d.attr("title",""):d.removeAttr("title"));g=this._tooltip(d);n(d,g.attr("id"));g.find(".ui-tooltip-content").html(b);
this.options.track&&c&&/^mouse/.test(c.type)?(this._on(this.document,{mousemove:e}),e(c)):g.position(a.extend({of:d},this.options.position));g.hide();this._show(g,this.options.show);this.options.show&&this.options.show.delay&&(l=setInterval(function(){g.is(":visible")&&(e(k.of),clearInterval(l))},a.fx.interval));this._trigger("open",c,{tooltip:g});b={keyup:function(b){b.keyCode===a.ui.keyCode.ESCAPE&&(b=a.Event(b),b.currentTarget=d[0],this.close(b,!0))},remove:function(){this._removeTooltip(g)}};
if(!c||"mouseover"===c.type)b.mouseleave="close";if(!c||"focusin"===c.type)b.focusout="close";this._on(!0,d,b)}},close:function(c){var d=this,b=a(c?c.currentTarget:this.element),f=this._find(b);this.closing||(b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title")),e(b),f.stop(!0),this._hide(f,this.options.hide,function(){d._removeTooltip(a(this))}),b.removeData("ui-tooltip-open"),this._off(b,"mouseleave focusout keyup"),b[0]!==this.element[0]&&this._off(b,"remove"),this._off(this.document,
"mousemove"),c&&"mouseleave"===c.type&&a.each(this.parents,function(b,c){a(c.element).attr("title",c.title);delete d.parents[b]}),this.closing=!0,this._trigger("close",c,{tooltip:f}),this.closing=!1)},_tooltip:function(c){var d="ui-tooltip-"+g++,b=a("<div>").attr({id:d,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));a("<div>").addClass("ui-tooltip-content").appendTo(b);b.appendTo(this.document[0].body);a.fn.bgiframe&&b.bgiframe();
this.tooltips[d]=c;return b},_find:function(c){return(c=c.data("ui-tooltip-id"))?a("#"+c):a()},_removeTooltip:function(a){a.remove();delete this.tooltips[a.attr("id")]},_destroy:function(){var c=this;a.each(this.tooltips,function(d,b){var e=a.Event("blur");e.target=e.currentTarget=b[0];c.close(e,!0);a("#"+d).remove();b.data("ui-tooltip-title")&&(b.attr("title",b.data("ui-tooltip-title")),b.removeData("ui-tooltip-title"))})}})})(jQuery);
jQuery.effects||function(a,n){var e=!1!==a.uiBackCompat;a.effects={effect:{}};(function(e,c){function d(a,b,d){var c=p[b.type]||{};if(null==a)return d||!b.def?null:b.def;a=c.floor?~~a:parseFloat(a);return isNaN(a)?b.def:c.mod?(a+c.mod)%c.mod:0>a?0:c.max<a?c.max:a}function b(a){var b=k(),d=b._rgba=[];a=a.toLowerCase();r(l,function(c,e){var f,g=e.re.exec(a);f=g&&e.parse(g);g=e.space||"rgba";if(f)return f=b[g](f),b[m[g].cache]=f[m[g].cache],d=b._rgba=f._rgba,!1});return d.length?("0,0,0,0"===d.join()&&
e.extend(d,n.transparent),b):n[a]}function f(a,b,d){d=(d+1)%1;return 1>6*d?a+6*(b-a)*d:1>2*d?b:2>3*d?a+6*(b-a)*(2/3-d):a}var h=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],k=e.Color=function(a,b,d,c){return new e.Color.fn.parse(a,b,d,c)},m={rgba:{props:{red:{idx:0,type:"byte"},
green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},p={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},t=k.support={},q=e("<p>")[0],n,r=e.each;q.style.cssText="background-color:rgba(1,1,1,.5)";t.rgba=-1<q.style.backgroundColor.indexOf("rgba");r(m,function(a,b){b.cache="_"+a;b.props.alpha={idx:3,type:"percent",def:1}});k.fn=e.extend(k.prototype,{parse:function(f,h,l,
p){if(f===c)return this._rgba=[null,null,null,null],this;if(f.jquery||f.nodeType)f=e(f).css(h),h=c;var q=this,t=e.type(f),H=this._rgba=[];h!==c&&(f=[f,h,l,p],t="array");if("string"===t)return this.parse(b(f)||n._default);if("array"===t)return r(m.rgba.props,function(a,b){H[b.idx]=d(f[b.idx],b)}),this;if("object"===t)return f instanceof k?r(m,function(a,b){f[b.cache]&&(q[b.cache]=f[b.cache].slice())}):r(m,function(b,c){var e=c.cache;r(c.props,function(a,b){if(!q[e]&&c.to){if("alpha"===a||null==f[a])return;
q[e]=c.to(q._rgba)}q[e][b.idx]=d(f[a],b,!0)});q[e]&&0>a.inArray(null,q[e].slice(0,3))&&(q[e][3]=1,c.from&&(q._rgba=c.from(q[e])))}),this},is:function(a){var b=k(a),d=!0,c=this;r(m,function(a,e){var f,g=b[e.cache];g&&(f=c[e.cache]||e.to&&e.to(c._rgba)||[],r(e.props,function(a,b){if(null!=g[b.idx])return d=g[b.idx]===f[b.idx]}));return d});return d},_space:function(){var a=[],b=this;r(m,function(d,c){b[c.cache]&&a.push(d)});return a.pop()},transition:function(a,b){var c=k(a),e=c._space(),f=m[e],g=0===
this.alpha()?k("transparent"):this,h=g[f.cache]||f.to(g._rgba),l=h.slice(),c=c[f.cache];r(f.props,function(a,e){var f=e.idx,g=h[f],k=c[f],m=p[e.type]||{};null!==k&&(null===g?l[f]=k:(m.mod&&(k-g>m.mod/2?g+=m.mod:g-k>m.mod/2&&(g-=m.mod)),l[f]=d((k-g)*b+g,e)))});return this[e](l)},blend:function(a){if(1===this._rgba[3])return this;var b=this._rgba.slice(),d=b.pop(),c=k(a)._rgba;return k(e.map(b,function(a,b){return(1-d)*c[b]+d*a}))},toRgbaString:function(){var a="rgba(",b=e.map(this._rgba,function(a,
b){return null==a?2<b?1:0:a});1===b[3]&&(b.pop(),a="rgb(");return a+b.join()+")"},toHslaString:function(){var a="hsla(",b=e.map(this.hsla(),function(a,b){null==a&&(a=2<b?1:0);b&&3>b&&(a=Math.round(100*a)+"%");return a});1===b[3]&&(b.pop(),a="hsl(");return a+b.join()+")"},toHexString:function(a){var b=this._rgba.slice(),d=b.pop();a&&b.push(~~(255*d));return"#"+e.map(b,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":
this.toRgbaString()}});k.fn.parse.prototype=k.fn;m.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/255,d=a[1]/255,c=a[2]/255;a=a[3];var e=Math.max(b,d,c),f=Math.min(b,d,c),g=e-f,h=e+f,k=0.5*h;return[Math.round(f===e?0:b===e?60*(d-c)/g+360:d===e?60*(c-b)/g+120:60*(b-d)/g+240)%360,0===k||1===k?k:0.5>=k?g/h:g/(2-h),k,null==a?1:a]};m.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,d=a[1],c=a[2];a=a[3];
d=0.5>=c?c*(1+d):c+d-c*d;c=2*c-d;return[Math.round(255*f(c,d,b+1/3)),Math.round(255*f(c,d,b)),Math.round(255*f(c,d,b-1/3)),a]};r(m,function(a,b){var f=b.props,l=b.cache,m=b.to,p=b.from;k.fn[a]=function(a){m&&!this[l]&&(this[l]=m(this._rgba));if(a===c)return this[l].slice();var b,h=e.type(a),q="array"===h||"object"===h?a:arguments,t=this[l].slice();r(f,function(a,b){var c=q["object"===h?a:b.idx];null==c&&(c=t[b.idx]);t[b.idx]=d(c,b)});return p?(b=k(p(t)),b[l]=t,b):k(t)};r(f,function(b,d){k.fn[b]||
(k.fn[b]=function(c){var f=e.type(c),k="alpha"===b?this._hsla?"hsla":"rgba":a,l=this[k](),m=l[d.idx];if("undefined"===f)return m;"function"===f&&(c=c.call(this,m),f=e.type(c));if(null==c&&d.empty)return this;"string"===f&&(f=h.exec(c))&&(c=m+parseFloat(f[2])*("+"===f[1]?1:-1));l[d.idx]=c;return this[k](l)})})});r("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),function(a,d){e.cssHooks[d]=
{set:function(a,c){var f,h="";if("string"!==e.type(c)||(f=b(c))){c=k(f||c);if(!t.rgba&&1!==c._rgba[3]){for(f="backgroundColor"===d?a.parentNode:a;(""===h||"transparent"===h)&&f&&f.style;)try{h=e.css(f,"backgroundColor"),f=f.parentNode}catch(l){}c=c.blend(h&&"transparent"!==h?h:"_default")}c=c.toRgbaString()}try{a.style[d]=c}catch(m){}}};e.fx.step[d]=function(a){a.colorInit||(a.start=k(a.elem,d),a.end=k(a.end),a.colorInit=!0);e.cssHooks[d].set(a.elem,a.start.transition(a.end,a.pos))}});e.cssHooks.borderColor=
{expand:function(a){var b={};r(["Top","Right","Bottom","Left"],function(d,c){b["border"+c+"Color"]=a});return b}};n=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);(function(){function e(){var b=this.ownerDocument.defaultView?
this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,d={},c,g;if(b&&b.length&&b[0]&&b[b[0]])for(g=b.length;g--;)c=b[g],"string"===typeof b[c]&&(d[a.camelCase(c)]=b[c]);else for(c in b)"string"===typeof b[c]&&(d[c]=b[c]);return d}var c=["add","remove","toggle"],d={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,d){a.fx.step[d]=
function(a){if("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)jQuery.style(a.elem,d,a.end),a.setAttr=!0}});a.effects.animateClass=function(b,f,h,l){var k=a.speed(f,h,l);return this.queue(function(){var f=a(this),h=f.attr("class")||"",l,q=k.children?f.find("*").andSelf():f,q=q.map(function(){return{el:a(this),start:e.call(this)}});l=function(){a.each(c,function(a,d){if(b[d])f[d+"Class"](b[d])})};l();q=q.map(function(){this.end=e.call(this.el[0]);var b=this.start,c=this.end,f={},h,k;for(h in c)if(k=
c[h],b[h]!==k&&!d[h]&&(a.fx.step[h]||!isNaN(parseFloat(k))))f[h]=k;this.diff=f;return this});f.attr("class",h);q=q.map(function(){var b=this,d=a.Deferred(),c=jQuery.extend({},k,{queue:!1,complete:function(){d.resolve(b)}});this.el.animate(this.diff,c);return d.promise()});a.when.apply(a,q.get()).done(function(){l();a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})});k.complete.call(f[0])})})};a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,d,c,e){return d?
a.effects.animateClass.call(this,{add:b},d,c,e):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,d,c,e){return d?a.effects.animateClass.call(this,{remove:b},d,c,e):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(b,d,c,e,g){return"boolean"===typeof d||d===n?c?a.effects.animateClass.call(this,d?{add:b}:{remove:b},c,e,g):this._toggleClass(b,d):a.effects.animateClass.call(this,{toggle:b},d,c,e)},switchClass:function(b,d,c,e,g){return a.effects.animateClass.call(this,
{add:d,remove:b},c,e,g)}})})();(function(){function g(d,b,c,e){a.isPlainObject(d)&&(b=d,d=d.effect);d={effect:d};null==b&&(b={});a.isFunction(b)&&(e=b,c=null,b={});if("number"===typeof b||a.fx.speeds[b])e=c,c=b,b={};a.isFunction(c)&&(e=c,c=null);b&&a.extend(d,b);c=c||b.duration;d.duration=a.fx.off?0:"number"===typeof c?c:c in a.fx.speeds?a.fx.speeds[c]:a.fx.speeds._default;d.complete=e||b.complete;return d}function c(d){return!d||"number"===typeof d||a.fx.speeds[d]?!0:"string"===typeof d&&!a.effects.effect[d]?
e&&a.effects[d]?!1:!0:!1}a.extend(a.effects,{version:"1.9.2",save:function(a,b){for(var c=0;c<b.length;c++)null!==b[c]&&a.data("ui-effects-"+b[c],a[0].style[b[c]])},restore:function(a,b){var c,e;for(e=0;e<b.length;e++)null!==b[e]&&(c=a.data("ui-effects-"+b[e]),c===n&&(c=""),a.css(b[e],c))},setMode:function(a,b){"toggle"===b&&(b=a.is(":hidden")?"show":"hide");return b},getBaseline:function(a,b){var c,e;switch(a[0]){case "top":c=0;break;case "middle":c=0.5;break;case "bottom":c=1;break;default:c=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:c}},createWrapper:function(d){if(d.parent().is(".ui-effects-wrapper"))return d.parent();var b={width:d.outerWidth(!0),height:d.outerHeight(!0),"float":d.css("float")},c=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:d.width(),height:d.height()},g=document.activeElement;try{g.id}catch(k){g=
document.body}d.wrap(c);(d[0]===g||a.contains(d[0],g))&&a(g).focus();c=d.parent();"static"===d.css("position")?(c.css({position:"relative"}),d.css({position:"relative"})):(a.extend(b,{position:d.css("position"),zIndex:d.css("z-index")}),a.each(["top","left","bottom","right"],function(a,c){b[c]=d.css(c);isNaN(parseInt(b[c],10))&&(b[c]="auto")}),d.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));d.css(e);return c.css(b).show()},removeWrapper:function(c){var b=document.activeElement;
c.parent().is(".ui-effects-wrapper")&&(c.parent().replaceWith(c),(c[0]===b||a.contains(c[0],b))&&a(b).focus());return c},setTransition:function(c,b,e,g){g=g||{};a.each(b,function(a,b){var m=c.cssUnit(b);0<m[0]&&(g[b]=m[0]*e+m[1])});return g}});a.fn.extend({effect:function(){function c(d){function e(){a.isFunction(g)&&g.call(f[0]);a.isFunction(d)&&d()}var f=a(this),g=b.complete,h=b.mode;(f.is(":hidden")?"hide"===h:"show"===h)?e():l.call(f[0],b,e)}var b=g.apply(this,arguments),f=b.mode,h=b.queue,l=
a.effects.effect[b.effect],k=!l&&e&&a.effects[b.effect];return a.fx.off||!l&&!k?f?this[f](b.duration,b.complete):this.each(function(){b.complete&&b.complete.call(this)}):l?!1===h?this.each(c):this.queue(h||"fx",c):k.call(this,{options:b,duration:b.duration,callback:b.complete,mode:b.mode})},_show:a.fn.show,show:function(a){if(c(a))return this._show.apply(this,arguments);var b=g.apply(this,arguments);b.mode="show";return this.effect.call(this,b)},_hide:a.fn.hide,hide:function(a){if(c(a))return this._hide.apply(this,
arguments);var b=g.apply(this,arguments);b.mode="hide";return this.effect.call(this,b)},__toggle:a.fn.toggle,toggle:function(d){if(c(d)||"boolean"===typeof d||a.isFunction(d))return this.__toggle.apply(this,arguments);var b=g.apply(this,arguments);b.mode="toggle";return this.effect.call(this,b)},cssUnit:function(c){var b=this.css(c),e=[];a.each(["em","px","%","pt"],function(a,c){0<b.indexOf(c)&&(e=[parseFloat(b),c])});return e}})})();(function(){var e={};a.each(["Quad","Cubic","Quart","Quint","Expo"],
function(a,d){e[d]=function(b){return Math.pow(b,a+2)}});a.extend(e,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var d,b=4;a<((d=Math.pow(2,--b))-1)/11;);return 1/Math.pow(4,3-b)-7.5625*Math.pow((3*d-2)/22-a,2)}});a.each(e,function(c,d){a.easing["easeIn"+c]=d;a.easing["easeOut"+c]=function(a){return 1-
d(1-a)};a.easing["easeInOut"+c]=function(a){return 0.5>a?d(2*a)/2:1-d(-2*a+2)/2}})})()}(jQuery);
(function(a,n){var e=/up|down|vertical/,g=/up|left|vertical|horizontal/;a.effects.effect.blind=function(c,d){var b=a(this),f="position top bottom left right height width".split(" "),h=a.effects.setMode(b,c.mode||"hide"),l=c.direction||"up",k=e.test(l),m=k?"height":"width",p=k?"top":"left",l=g.test(l),n={},q="show"===h,s,r,v;b.parent().is(".ui-effects-wrapper")?a.effects.save(b.parent(),f):a.effects.save(b,f);b.show();s=a.effects.createWrapper(b).css({overflow:"hidden"});r=s[m]();v=parseFloat(s.css(p))||
0;n[m]=q?r:0;l||(b.css(k?"bottom":"right",0).css(k?"top":"left","auto").css({position:"absolute"}),n[p]=q?v:r+v);q&&(s.css(m,0),l||s.css(p,v+r));s.animate(n,{duration:c.duration,easing:c.easing,queue:!1,complete:function(){"hide"===h&&b.hide();a.effects.restore(b,f);a.effects.removeWrapper(b);d()}})}})(jQuery);
(function(a,n){a.effects.effect.bounce=function(e,g){var c=a(this),d="position top bottom left right height width".split(" "),b=a.effects.setMode(c,e.mode||"effect"),f="hide"===b,h="show"===b,l=e.direction||"up",b=e.distance,k=e.times||5,m=2*k+(h||f?1:0),p=e.duration/m,n=e.easing,q="up"===l||"down"===l?"top":"left",l="up"===l||"left"===l,s,r,v=c.queue(),u=v.length;(h||f)&&d.push("opacity");a.effects.save(c,d);c.show();a.effects.createWrapper(c);b||(b=c["top"===q?"outerHeight":"outerWidth"]()/3);h&&
(r={opacity:1},r[q]=0,c.css("opacity",0).css(q,l?2*-b:2*b).animate(r,p,n));f&&(b/=Math.pow(2,k-1));r={};for(h=r[q]=0;h<k;h++)s={},s[q]=(l?"-=":"+=")+b,c.animate(s,p,n).animate(r,p,n),b=f?2*b:b/2;f&&(s={opacity:0},s[q]=(l?"-=":"+=")+b,c.animate(s,p,n));c.queue(function(){f&&c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);g()});1<u&&v.splice.apply(v,[1,0].concat(v.splice(u,m+1)));c.dequeue()}})(jQuery);
(function(a,n){a.effects.effect.clip=function(e,g){var c=a(this),d="position top bottom left right height width".split(" "),b="show"===a.effects.setMode(c,e.mode||"hide"),f="vertical"===(e.direction||"vertical"),h=f?"height":"width",f=f?"top":"left",l={},k,m;a.effects.save(c,d);c.show();k=a.effects.createWrapper(c).css({overflow:"hidden"});k="IMG"===c[0].tagName?k:c;m=k[h]();b&&(k.css(h,0),k.css(f,m/2));l[h]=b?m:0;l[f]=b?0:m/2;k.animate(l,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){b||
c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);g()}})}})(jQuery);
(function(a,n){a.effects.effect.drop=function(e,g){var c=a(this),d="position top bottom left right opacity height width".split(" "),b=a.effects.setMode(c,e.mode||"hide"),f="show"===b,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",h="up"===h||"left"===h?"pos":"neg",k={opacity:f?1:0},m;a.effects.save(c,d);c.show();a.effects.createWrapper(c);m=e.distance||c["top"===l?"outerHeight":"outerWidth"](!0)/2;f&&c.css("opacity",0).css(l,"pos"===h?-m:m);k[l]=(f?"pos"===h?"+=":"-=":"pos"===h?"-=":"+=")+
m;c.animate(k,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===b&&c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);g()}})}})(jQuery);
(function(a,n){a.effects.effect.explode=function(e,g){function c(){p.push(this);p.length===d*b&&(f.css({visibility:"visible"}),a(p).remove(),h||f.hide(),g())}var d=e.pieces?Math.round(Math.sqrt(e.pieces)):3,b=d,f=a(this),h="show"===a.effects.setMode(f,e.mode||"hide"),l=f.show().css("visibility","hidden").offset(),k=Math.ceil(f.outerWidth()/b),m=Math.ceil(f.outerHeight()/d),p=[],n,q,s,r,v,u;for(n=0;n<d;n++){r=l.top+n*m;u=n-(d-1)/2;for(q=0;q<b;q++)s=l.left+q*k,v=q-(b-1)/2,f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",
visibility:"visible",left:-q*k,top:-n*m}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:k,height:m,left:s+(h?v*k:0),top:r+(h?u*m:0),opacity:h?0:1}).animate({left:s+(h?0:v*k),top:r+(h?0:u*m),opacity:h?1:0},e.duration||500,e.easing,c)}}})(jQuery);(function(a,n){a.effects.effect.fade=function(e,g){var c=a(this),d=a.effects.setMode(c,e.mode||"toggle");c.animate({opacity:d},{queue:!1,duration:e.duration,easing:e.easing,complete:g})}})(jQuery);
(function(a,n){a.effects.effect.fold=function(e,g){var c=a(this),d="position top bottom left right height width".split(" "),b=a.effects.setMode(c,e.mode||"hide"),f="show"===b,h="hide"===b,b=e.size||15,l=/([0-9]+)%/.exec(b),k=!!e.horizFirst,m=f!==k,p=m?["width","height"]:["height","width"],n=e.duration/2,q,s={},r={};a.effects.save(c,d);c.show();q=a.effects.createWrapper(c).css({overflow:"hidden"});m=m?[q.width(),q.height()]:[q.height(),q.width()];l&&(b=parseInt(l[1],10)/100*m[h?0:1]);f&&q.css(k?{height:0,
width:b}:{height:b,width:0});s[p[0]]=f?m[0]:b;r[p[1]]=f?m[1]:0;q.animate(s,n,e.easing).animate(r,n,e.easing,function(){h&&c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);g()})}})(jQuery);
(function(a,n){a.effects.effect.highlight=function(e,g){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],b=a.effects.setMode(c,e.mode||"show"),f={backgroundColor:c.css("backgroundColor")};"hide"===b&&(f.opacity=0);a.effects.save(c,d);c.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===b&&c.hide();a.effects.restore(c,d);g()}})}})(jQuery);
(function(a,n){a.effects.effect.pulsate=function(e,g){var c=a(this),d=a.effects.setMode(c,e.mode||"show"),b="show"===d,f="hide"===d,d=2*(e.times||5)+(b||"hide"===d?1:0),h=e.duration/d,l=0,k=c.queue(),m=k.length;if(b||!c.is(":visible"))c.css("opacity",0).show(),l=1;for(b=1;b<d;b++)c.animate({opacity:l},h,e.easing),l=1-l;c.animate({opacity:l},h,e.easing);c.queue(function(){f&&c.hide();g()});1<m&&k.splice.apply(k,[1,0].concat(k.splice(m,d+1)));c.dequeue()}})(jQuery);
(function(a,n){a.effects.effect.puff=function(e,g){var c=a(this),d=a.effects.setMode(c,e.mode||"hide"),b="hide"===d,f=parseInt(e.percent,10)||150,h=f/100,l={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};a.extend(e,{effect:"scale",queue:!1,fade:!0,mode:d,complete:g,percent:b?f:100,from:b?l:{height:l.height*h,width:l.width*h,outerHeight:l.outerHeight*h,outerWidth:l.outerWidth*h}});c.effect(e)};a.effects.effect.scale=function(e,g){var c=a(this),d=a.extend(!0,
{},e),b=a.effects.setMode(c,e.mode||"effect"),f=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===b?0:100),h=e.direction||"both",l=e.origin,k={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()},m="horizontal"!==h?f/100:1,f="vertical"!==h?f/100:1;d.effect="size";d.queue=!1;d.complete=g;"effect"!==b&&(d.origin=l||["middle","center"],d.restore=!0);d.from=e.from||("show"===b?{height:0,width:0,outerHeight:0,outerWidth:0}:k);d.to={height:k.height*m,width:k.width*
f,outerHeight:k.outerHeight*m,outerWidth:k.outerWidth*f};d.fade&&("show"===b&&(d.from.opacity=0,d.to.opacity=1),"hide"===b&&(d.from.opacity=1,d.to.opacity=0));c.effect(d)};a.effects.effect.size=function(e,g){var c,d,b,f,h,l,k=a(this),m="position top bottom left right width height overflow opacity".split(" ");h="position top bottom left right overflow opacity".split(" ");var p=["width","height","overflow"],n=["fontSize"],q=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],s=["borderLeftWidth",
"borderRightWidth","paddingLeft","paddingRight"],r=a.effects.setMode(k,e.mode||"effect"),v=e.restore||"effect"!==r,u=e.scale||"both";l=e.origin||["middle","center"];var w=k.css("position"),x=v?m:h,G={height:0,width:0,outerHeight:0,outerWidth:0};"show"===r&&k.show();h={height:k.height(),width:k.width(),outerHeight:k.outerHeight(),outerWidth:k.outerWidth()};"toggle"===e.mode&&"show"===r?(k.from=e.to||G,k.to=e.from||h):(k.from=e.from||("show"===r?G:h),k.to=e.to||("hide"===r?G:h));b=k.from.height/h.height;
f=k.from.width/h.width;c=k.to.height/h.height;d=k.to.width/h.width;if("box"===u||"both"===u)b!==c&&(x=x.concat(q),k.from=a.effects.setTransition(k,q,b,k.from),k.to=a.effects.setTransition(k,q,c,k.to)),f!==d&&(x=x.concat(s),k.from=a.effects.setTransition(k,s,f,k.from),k.to=a.effects.setTransition(k,s,d,k.to));if(("content"===u||"both"===u)&&b!==c)x=x.concat(n).concat(p),k.from=a.effects.setTransition(k,n,b,k.from),k.to=a.effects.setTransition(k,n,c,k.to);a.effects.save(k,x);k.show();a.effects.createWrapper(k);
k.css("overflow","hidden").css(k.from);l&&(l=a.effects.getBaseline(l,h),k.from.top=(h.outerHeight-k.outerHeight())*l.y,k.from.left=(h.outerWidth-k.outerWidth())*l.x,k.to.top=(h.outerHeight-k.to.outerHeight)*l.y,k.to.left=(h.outerWidth-k.to.outerWidth)*l.x);k.css(k.from);if("content"===u||"both"===u)q=q.concat(["marginTop","marginBottom"]).concat(n),s=s.concat(["marginLeft","marginRight"]),p=m.concat(q).concat(s),k.find("*[width]").each(function(){var g=a(this),h=g.height(),k=g.width(),l=g.outerHeight(),
m=g.outerWidth();v&&a.effects.save(g,p);g.from={height:h*b,width:k*f,outerHeight:l*b,outerWidth:m*f};g.to={height:h*c,width:k*d,outerHeight:h*c,outerWidth:k*d};b!==c&&(g.from=a.effects.setTransition(g,q,b,g.from),g.to=a.effects.setTransition(g,q,c,g.to));f!==d&&(g.from=a.effects.setTransition(g,s,f,g.from),g.to=a.effects.setTransition(g,s,d,g.to));g.css(g.from);g.animate(g.to,e.duration,e.easing,function(){v&&a.effects.restore(g,p)})});k.animate(k.to,{queue:!1,duration:e.duration,easing:e.easing,
complete:function(){0===k.to.opacity&&k.css("opacity",k.from.opacity);"hide"===r&&k.hide();a.effects.restore(k,x);v||("static"===w?k.css({position:"relative",top:k.to.top,left:k.to.left}):a.each(["top","left"],function(a,b){k.css(b,function(b,c){var d=parseInt(c,10),e=a?k.to.left:k.to.top;return"auto"===c?e+"px":d+e+"px"})}));a.effects.removeWrapper(k);g()}})}})(jQuery);
(function(a,n){a.effects.effect.shake=function(e,g){var c=a(this),d="position top bottom left right height width".split(" "),b=a.effects.setMode(c,e.mode||"effect"),f=e.direction||"left",h=e.distance||20,l=e.times||3,k=2*l+1,m=Math.round(e.duration/k),p="up"===f||"down"===f?"top":"left",n="up"===f||"left"===f,f={},q={},s={},r=c.queue(),v=r.length;a.effects.save(c,d);c.show();a.effects.createWrapper(c);f[p]=(n?"-=":"+=")+h;q[p]=(n?"+=":"-=")+2*h;s[p]=(n?"-=":"+=")+2*h;c.animate(f,m,e.easing);for(h=
1;h<l;h++)c.animate(q,m,e.easing).animate(s,m,e.easing);c.animate(q,m,e.easing).animate(f,m/2,e.easing).queue(function(){"hide"===b&&c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);g()});1<v&&r.splice.apply(r,[1,0].concat(r.splice(v,k+1)));c.dequeue()}})(jQuery);
(function(a,n){a.effects.effect.slide=function(e,g){var c=a(this),d="position top bottom left right width height".split(" "),b=a.effects.setMode(c,e.mode||"show"),f="show"===b,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",h="up"===h||"left"===h,k,m={};a.effects.save(c,d);c.show();k=e.distance||c["top"===l?"outerHeight":"outerWidth"](!0);a.effects.createWrapper(c).css({overflow:"hidden"});f&&c.css(l,h?isNaN(k)?"-"+k:-k:k);m[l]=(f?h?"+=":"-=":h?"-=":"+=")+k;c.animate(m,{queue:!1,duration:e.duration,
easing:e.easing,complete:function(){"hide"===b&&c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);g()}})}})(jQuery);
(function(a,n){a.effects.effect.transfer=function(e,g){var c=a(this),d=a(e.to),b="fixed"===d.css("position"),f=a("body"),h=b?f.scrollTop():0,f=b?f.scrollLeft():0,l=d.offset(),d={top:l.top-h,left:l.left-f,height:d.innerHeight(),width:d.innerWidth()},l=c.offset(),k=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(e.className).css({top:l.top-h,left:l.left-f,height:c.innerHeight(),width:c.innerWidth(),position:b?"fixed":"absolute"}).animate(d,e.duration,e.easing,function(){k.remove();
g()})}})(jQuery);
