/* jQuery UI - v1.11.1 - 2014-08-19
* http://jqueryui.com
* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, resizable.js, button.js, datepicker.js, dialog.js, slider.js
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
(function(A){if(typeof define==="function"&&define.amd){define(["jquery"],A)}else{A(jQuery)}}(function(U){
/*
     * jQuery UI Core 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/category/ui-core/
     */
U.ui=U.ui||{};U.extend(U.ui,{version:"1.11.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});U.fn.extend({scrollParent:function(a){var c=this.css("position"),d=c==="absolute",e=a?/(auto|scroll|hidden)/:/(auto|scroll)/,b=this.parents().filter(function(){var f=U(this);if(d&&f.css("position")==="static"){return false}return e.test(f.css("overflow")+f.css("overflow-y")+f.css("overflow-x"))}).eq(0);return c==="fixed"||!b.length?U(this[0].ownerDocument||document):b},uniqueId:(function(){var a=0;return function(){return this.each(function(){if(!this.id){this.id="ui-id-"+(++a)}})}})(),removeUniqueId:function(){return this.each(function(){if(/^ui-id-\d+$/.test(this.id)){U(this).removeAttr("id")}})}});function A(d,f){var a,b,e,c=d.nodeName.toLowerCase();if("area"===c){a=d.parentNode;b=a.name;if(!d.href||!b||a.nodeName.toLowerCase()!=="map"){return false}e=U("img[usemap='#"+b+"']")[0];return !!e&&K(e)}return(/input|select|textarea|button|object/.test(c)?!d.disabled:"a"===c?d.href||f:f)&&K(d)}function K(a){return U.expr.filters.visible(a)&&!U(a).parents().addBack().filter(function(){return U.css(this,"visibility")==="hidden"}).length}U.extend(U.expr[":"],{data:U.expr.createPseudo?U.expr.createPseudo(function(a){return function(b){return !!U.data(b,a)}}):function(c,a,b){return !!U.data(c,b[3])},focusable:function(a){return A(a,!isNaN(U.attr(a,"tabindex")))},tabbable:function(a){var c=U.attr(a,"tabindex"),b=isNaN(c);return(b||c>=0)&&A(a,!b)}});if(!U("<a>").outerWidth(1).jquery){U.each(["Width","Height"],function(b,c){var e=c==="Width"?["Left","Right"]:["Top","Bottom"],a=c.toLowerCase(),d={innerWidth:U.fn.innerWidth,innerHeight:U.fn.innerHeight,outerWidth:U.fn.outerWidth,outerHeight:U.fn.outerHeight};function f(i,g,j,h){U.each(e,function(){g-=parseFloat(U.css(i,"padding"+this))||0;if(j){g-=parseFloat(U.css(i,"border"+this+"Width"))||0}if(h){g-=parseFloat(U.css(i,"margin"+this))||0}});return g}U.fn["inner"+c]=function(g){if(g===undefined){return d["inner"+c].call(this)}return this.each(function(){U(this).css(a,f(this,g)+"px")})};U.fn["outer"+c]=function(g,h){if(typeof g!=="number"){return d["outer"+c].call(this,g)}return this.each(function(){U(this).css(a,f(this,g,true,h)+"px")})}})}if(!U.fn.addBack){U.fn.addBack=function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}if(U("<a>").data("a-b","a").removeData("a-b").data("a-b")){U.fn.removeData=(function(a){return function(b){if(arguments.length){return a.call(this,U.camelCase(b))}else{return a.call(this)}}})(U.fn.removeData)}U.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());U.fn.extend({focus:(function(a){return function(c,b){return typeof c==="number"?this.each(function(){var d=this;setTimeout(function(){U(d).focus();if(b){b.call(d)}},c)}):a.apply(this,arguments)}})(U.fn.focus),disableSelection:(function(){var a="onselectstart" in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(b){b.preventDefault()})}})(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(b!==undefined){return this.css("zIndex",b)}if(this.length){var c=U(this[0]),a,d;while(c.length&&c[0]!==document){a=c.css("position");if(a==="absolute"||a==="relative"||a==="fixed"){d=parseInt(c.css("zIndex"),10);if(!isNaN(d)&&d!==0){return d}}c=c.parent()}}return 0}});U.ui.plugin={add:function(d,a,e){var b,c=U.ui[d].prototype;for(b in e){c.plugins[b]=c.plugins[b]||[];c.plugins[b].push([a,e[b]])}},call:function(b,c,f,e){var a,d=b.plugins[c];if(!d){return}if(!e&&(!b.element[0].parentNode||b.element[0].parentNode.nodeType===11)){return}for(a=0;a<d.length;a++){if(b.options[d[a][0]]){d[a][1].apply(b.element,f)}}}};
/*
     * jQuery UI Widget 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/jQuery.widget/
     */
var Z=0,P=Array.prototype.slice;U.cleanData=(function(a){return function(d){var g,f,b;for(b=0;(f=d[b])!=null;b++){try{g=U._data(f,"events");if(g&&g.remove){U(f).triggerHandler("remove")}}catch(c){}}a(d)}})(U.cleanData);U.widget=function(c,b,h){var f,e,a,g,d={},i=c.split(".")[0];c=c.split(".")[1];f=i+"-"+c;if(!h){h=b;b=U.Widget}U.expr[":"][f.toLowerCase()]=function(j){return !!U.data(j,f)};U[i]=U[i]||{};e=U[i][c];a=U[i][c]=function(j,k){if(!this._createWidget){return new a(j,k)}if(arguments.length){this._createWidget(j,k)}};U.extend(a,e,{version:h.version,_proto:U.extend({},h),_childConstructors:[]});g=new b();g.options=U.widget.extend({},g.options);U.each(h,function(j,k){if(!U.isFunction(k)){d[j]=k;return}d[j]=(function(){var l=function(){return b.prototype[j].apply(this,arguments)},m=function(n){return b.prototype[j].apply(this,n)};return function(){var o=this._super,p=this._superApply,n;this._super=l;this._superApply=m;n=k.apply(this,arguments);this._super=o;this._superApply=p;return n}})()});a.prototype=U.widget.extend(g,{widgetEventPrefix:e?(g.widgetEventPrefix||c):c},d,{constructor:a,namespace:i,widgetName:c,widgetFullName:f});if(e){U.each(e._childConstructors,function(j,k){var l=k.prototype;U.widget(l.namespace+"."+l.widgetName,a,k._proto)});delete e._childConstructors}else{b._childConstructors.push(a)}U.widget.bridge(c,a);return a};U.widget.extend=function(e){var c=P.call(arguments,1),a=0,f=c.length,b,d;for(;a<f;a++){for(b in c[a]){d=c[a][b];if(c[a].hasOwnProperty(b)&&d!==undefined){if(U.isPlainObject(d)){e[b]=U.isPlainObject(e[b])?U.widget.extend({},e[b],d):U.widget.extend({},d)}else{e[b]=d}}}}return e};U.widget.bridge=function(b,a){var c=a.prototype.widgetFullName||b;U.fn[b]=function(e){var f=typeof e==="string",g=P.call(arguments,1),d=this;e=!f&&g.length?U.widget.extend.apply(null,[e].concat(g)):e;if(f){this.each(function(){var h,i=U.data(this,c);if(e==="instance"){d=i;return false}if(!i){return U.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+e+"'")}if(!U.isFunction(i[e])||e.charAt(0)==="_"){return U.error("no such method '"+e+"' for "+b+" widget instance")}h=i[e].apply(i,g);if(h!==i&&h!==undefined){d=h&&h.jquery?d.pushStack(h.get()):h;return false}})}else{this.each(function(){var h=U.data(this,c);if(h){h.option(e||{});if(h._init){h._init()}}else{U.data(this,c,new a(e,this))}})}return d}};U.Widget=function(){};U.Widget._childConstructors=[];U.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:false,create:null},_createWidget:function(a,b){b=U(b||this.defaultElement||this)[0];this.element=U(b);this.uuid=Z++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=U.widget.extend({},this.options,this._getCreateOptions(),a);this.bindings=U();this.hoverable=U();this.focusable=U();if(b!==this){U.data(b,this.widgetFullName,this);this._on(true,this.element,{remove:function(c){if(c.target===b){this.destroy()}}});this.document=U(b.style?b.ownerDocument:b.document||b);this.window=U(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:U.noop,_getCreateEventData:U.noop,_create:U.noop,_init:U.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(U.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:U.noop,widget:function(){return this.element},option:function(b,e){var d=b,a,f,c;if(arguments.length===0){return U.widget.extend({},this.options)}if(typeof b==="string"){d={};a=b.split(".");b=a.shift();if(a.length){f=d[b]=U.widget.extend({},this.options[b]);for(c=0;c<a.length-1;c++){f[a[c]]=f[a[c]]||{};f=f[a[c]]}b=a.pop();if(arguments.length===1){return f[b]===undefined?null:f[b]}f[b]=e}else{if(arguments.length===1){return this.options[b]===undefined?null:this.options[b]}d[b]=e}}this._setOptions(d);return this},_setOptions:function(b){var a;for(a in b){this._setOption(a,b[a])}return this},_setOption:function(a,b){this.options[a]=b;if(a==="disabled"){this.widget().toggleClass(this.widgetFullName+"-disabled",!!b);if(b){this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")}}return this},enable:function(){return this._setOptions({disabled:false})},disable:function(){return this._setOptions({disabled:true})},_on:function(c,d,a){var e,b=this;if(typeof c!=="boolean"){a=d;d=c;c=false}if(!a){a=d;d=this.element;e=this.widget()}else{d=e=U(d);this.bindings=this.bindings.add(d)}U.each(a,function(i,g){function k(){if(!c&&(b.options.disabled===true||U(this).hasClass("ui-state-disabled"))){return}return(typeof g==="string"?b[g]:g).apply(b,arguments)}if(typeof g!=="string"){k.guid=g.guid=g.guid||k.guid||U.guid++}var f=i.match(/^([\w:-]*)\s*(.*)$/),h=f[1]+b.eventNamespace,j=f[2];if(j){e.delegate(j,h,k)}else{d.bind(h,k)}})},_off:function(b,a){a=(a||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;b.unbind(a).undelegate(a)},_delay:function(b,d){function c(){return(typeof b==="string"?a[b]:b).apply(a,arguments)}var a=this;return setTimeout(c,d||0)},_hoverable:function(a){this.hoverable=this.hoverable.add(a);this._on(a,{mouseenter:function(b){U(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){U(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(a){this.focusable=this.focusable.add(a);this._on(a,{focusin:function(b){U(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){U(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(a,d,f){var c,b,e=this.options[a];f=f||{};d=U.Event(d);d.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d.target=this.element[0];b=d.originalEvent;if(b){for(c in b){if(!(c in d)){d[c]=b[c]}}}this.element.trigger(d,f);return !(U.isFunction(e)&&e.apply(this.element[0],[d].concat(f))===false||d.isDefaultPrevented())}};U.each({show:"fadeIn",hide:"fadeOut"},function(a,b){U.Widget.prototype["_"+a]=function(g,e,c){if(typeof e==="string"){e={effect:e}}var d,f=!e?a:e===true||typeof e==="number"?b:e.effect||b;e=e||{};if(typeof e==="number"){e={duration:e}}d=!U.isEmptyObject(e);e.complete=c;if(e.delay){g.delay(e.delay)}if(d&&U.effects&&U.effects.effect[f]){g[a](e)}else{if(f!==a&&g[f]){g[f](e.duration,e.easing,c)}else{g.queue(function(h){U(this)[a]();if(c){c.call(g[0])}h()})}}}});var O=U.widget;
/*
     * jQuery UI Mouse 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/mouse/
     */
var R=false;U(document).mouseup(function(){R=false});var W=U.widget("ui.mouse",{version:"1.11.1",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(true===U.data(b.target,a.widgetName+".preventClickEvent")){U.removeData(b.target,a.widgetName+".preventClickEvent");b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);if(this._mouseMoveDelegate){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)}},_mouseDown:function(c){if(R){return}(this._mouseStarted&&this._mouseUp(c));this._mouseDownEvent=c;var a=this,d=(c.which===1),b=(typeof this.options.cancel==="string"&&c.target.nodeName?U(c.target).closest(this.options.cancel).length:false);if(!d||b||!this._mouseCapture(c)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){a.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=(this._mouseStart(c)!==false);if(!this._mouseStarted){c.preventDefault();return true}}if(true===U.data(c.target,this.widgetName+".preventClickEvent")){U.removeData(c.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(e){return a._mouseMove(e)};this._mouseUpDelegate=function(e){return a._mouseUp(e)};this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.preventDefault();R=true;return true},_mouseMove:function(a){if(U.ui.ie&&(!document.documentMode||document.documentMode<9)&&!a.button){return this._mouseUp(a)}else{if(!a.which){return this._mouseUp(a)}}if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,a)!==false);(this._mouseStarted?this._mouseDrag(a):this._mouseUp(a))}return !this._mouseStarted},_mouseUp:function(a){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(a.target===this._mouseDownEvent.target){U.data(a.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(a)}R=false;return false},_mouseDistanceMet:function(a){return(Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance)},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}});
/*
     * jQuery UI Position 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/position/
     */
(function(){U.ui=U.ui||{};var j,i,c=Math.max,l=Math.abs,g=Math.round,a=/left|center|right/,b=/top|center|bottom/,f=/[\+\-]\d+(\.[\d]+)?%?/,k=/^\w+/,n=/%$/,d=U.fn.position;function m(p,q,o){return[parseFloat(p[0])*(n.test(p[0])?q/100:1),parseFloat(p[1])*(n.test(p[1])?o/100:1)]}function h(p,o){return parseInt(U.css(p,o),10)||0}function e(o){var p=o[0];if(p.nodeType===9){return{width:o.width(),height:o.height(),offset:{top:0,left:0}}}if(U.isWindow(p)){return{width:o.width(),height:o.height(),offset:{top:o.scrollTop(),left:o.scrollLeft()}}}if(p.preventDefault){return{width:0,height:0,offset:{top:p.pageY,left:p.pageX}}}return{width:o.outerWidth(),height:o.outerHeight(),offset:o.offset()}}U.position={scrollbarWidth:function(){if(j!==undefined){return j}var q,o,p=U("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=p.children()[0];U("body").append(p);q=r.offsetWidth;p.css("overflow","scroll");o=r.offsetWidth;if(q===o){o=p[0].clientWidth}p.remove();return(j=q-o)},getScrollInfo:function(p){var r=p.isWindow||p.isDocument?"":p.element.css("overflow-x"),o=p.isWindow||p.isDocument?"":p.element.css("overflow-y"),q=r==="scroll"||(r==="auto"&&p.width<p.element[0].scrollWidth),s=o==="scroll"||(o==="auto"&&p.height<p.element[0].scrollHeight);return{width:s?U.position.scrollbarWidth():0,height:q?U.position.scrollbarWidth():0}},getWithinInfo:function(r){var p=U(r||window),q=U.isWindow(p[0]),o=!!p[0]&&p[0].nodeType===9;return{element:p,isWindow:q,isDocument:o,offset:p.offset()||{left:0,top:0},scrollLeft:p.scrollLeft(),scrollTop:p.scrollTop(),width:q||o?p.width():p.outerWidth(),height:q||o?p.height():p.outerHeight()}}};U.fn.position=function(w){if(!w||!w.of){return d.apply(this,arguments)}w=U.extend({},w);var p,z,t,u,s,o,x=U(w.of),y=U.position.getWithinInfo(w.within),r=U.position.getScrollInfo(y),q=(w.collision||"flip").split(" "),v={};o=e(x);if(x[0].preventDefault){w.at="left top"}z=o.width;t=o.height;u=o.offset;s=U.extend({},u);U.each(["my","at"],function(){var Ab=(w[this]||"").split(" "),Aa,Ac;if(Ab.length===1){Ab=a.test(Ab[0])?Ab.concat(["center"]):b.test(Ab[0])?["center"].concat(Ab):["center","center"]}Ab[0]=a.test(Ab[0])?Ab[0]:"center";Ab[1]=b.test(Ab[1])?Ab[1]:"center";Aa=f.exec(Ab[0]);Ac=f.exec(Ab[1]);v[this]=[Aa?Aa[0]:0,Ac?Ac[0]:0];w[this]=[k.exec(Ab[0])[0],k.exec(Ab[1])[0]]});if(q.length===1){q[1]=q[0]}if(w.at[0]==="right"){s.left+=z}else{if(w.at[0]==="center"){s.left+=z/2}}if(w.at[1]==="bottom"){s.top+=t}else{if(w.at[1]==="center"){s.top+=t/2}}p=m(v.at,z,t);s.left+=p[0];s.top+=p[1];return this.each(function(){var Aa,Ah,Ad=U(this),Aj=Ad.outerWidth(),Ac=Ad.outerHeight(),Ak=h(this,"marginLeft"),Ag=h(this,"marginTop"),Ae=Aj+Ak+h(this,"marginRight")+r.width,Ab=Ac+Ag+h(this,"marginBottom")+r.height,Af=U.extend({},s),Ai=m(v.my,Ad.outerWidth(),Ad.outerHeight());if(w.my[0]==="right"){Af.left-=Aj}else{if(w.my[0]==="center"){Af.left-=Aj/2}}if(w.my[1]==="bottom"){Af.top-=Ac}else{if(w.my[1]==="center"){Af.top-=Ac/2}}Af.left+=Ai[0];Af.top+=Ai[1];if(!i){Af.left=g(Af.left);Af.top=g(Af.top)}Aa={marginLeft:Ak,marginTop:Ag};U.each(["left","top"],function(Am,Al){if(U.ui.position[q[Am]]){U.ui.position[q[Am]][Al](Af,{targetWidth:z,targetHeight:t,elemWidth:Aj,elemHeight:Ac,collisionPosition:Aa,collisionWidth:Ae,collisionHeight:Ab,offset:[p[0]+Ai[0],p[1]+Ai[1]],my:w.my,at:w.at,within:y,elem:Ad})}});if(w.using){Ah=function(Ao){var Am=u.left-Af.left,Al=Am+z-Aj,An=u.top-Af.top,Aq=An+t-Ac,Ap={target:{element:x,left:u.left,top:u.top,width:z,height:t},element:{element:Ad,left:Af.left,top:Af.top,width:Aj,height:Ac},horizontal:Al<0?"left":Am>0?"right":"center",vertical:Aq<0?"top":An>0?"bottom":"middle"};if(z<Aj&&l(Am+Al)<z){Ap.horizontal="center"}if(t<Ac&&l(An+Aq)<t){Ap.vertical="middle"}if(c(l(Am),l(Al))>c(l(An),l(Aq))){Ap.important="horizontal"}else{Ap.important="vertical"}w.using.call(this,Ao,Ap)}}Ad.offset(U.extend(Af,{using:Ah}))})};U.ui.position={fit:{left:function(v,p){var w=p.within,o=w.isWindow?w.scrollLeft:w.offset.left,r=w.width,u=v.left-p.collisionPosition.marginLeft,q=o-u,s=u+p.collisionWidth-r-o,t;if(p.collisionWidth>r){if(q>0&&s<=0){t=v.left+q+p.collisionWidth-r-o;v.left+=q-t}else{if(s>0&&q<=0){v.left=o}else{if(q>s){v.left=o+r-p.collisionWidth}else{v.left=o}}}}else{if(q>0){v.left+=q}else{if(s>0){v.left-=s}else{v.left=c(v.left-u,v.left)}}}},top:function(v,q){var w=q.within,p=w.isWindow?w.scrollTop:w.offset.top,t=q.within.height,r=v.top-q.collisionPosition.marginTop,u=p-r,s=r+q.collisionHeight-t-p,o;if(q.collisionHeight>t){if(u>0&&s<=0){o=v.top+u+q.collisionHeight-t-p;v.top+=u-o}else{if(s>0&&u<=0){v.top=p}else{if(u>s){v.top=p+t-q.collisionHeight}else{v.top=p}}}}else{if(u>0){v.top+=u}else{if(s>0){v.top-=s}else{v.top=c(v.top-r,v.top)}}}}},flip:{left:function(z,s){var Ab=s.within,p=Ab.offset.left+Ab.scrollLeft,u=Ab.width,o=Ab.isWindow?Ab.scrollLeft:Ab.offset.left,y=z.left-s.collisionPosition.marginLeft,t=y-o,v=y+s.collisionWidth-u-o,w=s.my[0]==="left"?-s.elemWidth:s.my[0]==="right"?s.elemWidth:0,r=s.at[0]==="left"?s.targetWidth:s.at[0]==="right"?-s.targetWidth:0,q=-2*s.offset[0],x,Aa;if(t<0){x=z.left+w+r+q+s.collisionWidth-u-p;if(x<0||x<l(t)){z.left+=w+r+q}}else{if(v>0){Aa=z.left-s.collisionPosition.marginLeft+w+r+q-o;if(Aa>0||l(Aa)<v){z.left+=w+r+q}}}},top:function(z,s){var Aa=s.within,q=Aa.offset.top+Aa.scrollTop,x=Aa.height,Ac=Aa.isWindow?Aa.scrollTop:Aa.offset.top,t=z.top-s.collisionPosition.marginTop,y=t-Ac,v=t+s.collisionHeight-x-Ac,u=s.my[1]==="top",w=u?-s.elemHeight:s.my[1]==="bottom"?s.elemHeight:0,o=s.at[1]==="top"?s.targetHeight:s.at[1]==="bottom"?-s.targetHeight:0,r=-2*s.offset[1],Ab,p;if(y<0){p=z.top+w+o+r+s.collisionHeight-x-q;if((z.top+w+o+r)>y&&(p<0||p<l(y))){z.top+=w+o+r}}else{if(v>0){Ab=z.top-s.collisionPosition.marginTop+w+o+r-Ac;if((z.top+w+o+r)>v&&(Ab>0||l(Ab)<v)){z.top+=w+o+r}}}}},flipfit:{left:function(){U.ui.position.flip.left.apply(this,arguments);U.ui.position.fit.left.apply(this,arguments)},top:function(){U.ui.position.flip.top.apply(this,arguments);U.ui.position.fit.top.apply(this,arguments)}}};(function(){var o,p,q,t,r,s=document.getElementsByTagName("body")[0],u=document.createElement("div");o=document.createElement(s?"div":"body");q={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};if(s){U.extend(q,{position:"absolute",left:"-1000px",top:"-1000px"})}for(r in q){o.style[r]=q[r]}o.appendChild(u);p=s||document.documentElement;p.insertBefore(o,p.firstChild);u.style.cssText="position: absolute; left: 10.7432222px;";t=U(u).offset().left;i=t>10&&t<11;o.innerHTML="";p.removeChild(o)})()})();var T=U.ui.position;
/*
     * jQuery UI Draggable 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/draggable/
     */
U.widget("ui.draggable",U.ui.mouse,{version:"1.11.1",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}if(this.options.addClasses){this.element.addClass("ui-draggable")}if(this.options.disabled){this.element.addClass("ui-draggable-disabled")}this._setHandleClassName();this._mouseInit()},_setOption:function(a,b){this._super(a,b);if(a==="handle"){this._removeHandleClassName();this._setHandleClassName()}},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=true;return}this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._removeHandleClassName();this._mouseDestroy()},_mouseCapture:function(c){var a=this.document[0],b=this.options;try{if(a.activeElement&&a.activeElement.nodeName.toLowerCase()!=="body"){U(a.activeElement).blur()}}catch(d){}if(this.helper||b.disabled||U(c.target).closest(".ui-resizable-handle").length>0){return false}this.handle=this._getHandle(c);if(!this.handle){return false}U(b.iframeFix===true?"iframe":b.iframeFix).each(function(){U("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(U(this).offset()).appendTo("body")});return true},_mouseStart:function(b){var a=this.options;this.helper=this._createHelper(b);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();if(U.ui.ddmanager){U.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(true);this.offsetParent=this.helper.offsetParent();this.offsetParentCssPosition=this.offsetParent.css("position");this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.scroll=false;U.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(b,false);this.originalPageX=b.pageX;this.originalPageY=b.pageY;(a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt));this._setContainment();if(this._trigger("start",b)===false){this._clear();return false}this._cacheHelperProportions();if(U.ui.ddmanager&&!a.dropBehaviour){U.ui.ddmanager.prepareOffsets(this,b)}this._mouseDrag(b,true);if(U.ui.ddmanager){U.ui.ddmanager.dragStart(this,b)}return true},_mouseDrag:function(c,b){if(this.offsetParentCssPosition==="fixed"){this.offset.parent=this._getParentOffset()}this.position=this._generatePosition(c,true);this.positionAbs=this._convertPositionTo("absolute");if(!b){var a=this._uiHash();if(this._trigger("drag",c,a)===false){this._mouseUp({});return false}this.position=a.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";if(U.ui.ddmanager){U.ui.ddmanager.drag(this,c)}return false},_mouseStop:function(c){var b=this,a=false;if(U.ui.ddmanager&&!this.options.dropBehaviour){a=U.ui.ddmanager.drop(this,c)}if(this.dropped){a=this.dropped;this.dropped=false}if((this.options.revert==="invalid"&&!a)||(this.options.revert==="valid"&&a)||this.options.revert===true||(U.isFunction(this.options.revert)&&this.options.revert.call(this.element,a))){U(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(b._trigger("stop",c)!==false){b._clear()}})}else{if(this._trigger("stop",c)!==false){this._clear()}}return false},_mouseUp:function(a){U("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});if(U.ui.ddmanager){U.ui.ddmanager.dragStop(this,a)}this.element.focus();return U.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(a){return this.options.handle?!!U(a.target).closest(this.element.find(this.options.handle)).length:true},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(b){var a=this.options,c=U.isFunction(a.helper)?U(a.helper.apply(this.element[0],[b])):(a.helper==="clone"?this.element.clone().removeAttr("id"):this.element);if(!c.parents("body").length){c.appendTo((a.appendTo==="parent"?this.element[0].parentNode:a.appendTo))}if(c[0]!==this.element[0]&&!(/(fixed|absolute)/).test(c.css("position"))){c.css("position","absolute")}return c},_adjustOffsetFromHelper:function(a){if(typeof a==="string"){a=a.split(" ")}if(U.isArray(a)){a={left:+a[0],top:+a[1]||0}}if("left" in a){this.offset.click.left=a.left+this.margins.left}if("right" in a){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if("top" in a){this.offset.click.top=a.top+this.margins.top}if("bottom" in a){this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top}},_isRootNode:function(a){return(/(html|body)/i).test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var b=this.offsetParent.offset(),a=this.document[0];if(this.cssPosition==="absolute"&&this.scrollParent[0]!==a&&U.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this._isRootNode(this.offsetParent[0])){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition!=="relative"){return{top:0,left:0}}var b=this.element.position(),a=this._isRootNode(this.scrollParent[0]);return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+(!a?this.scrollParent.scrollTop():0),left:b.left-(parseInt(this.helper.css("left"),10)||0)+(!a?this.scrollParent.scrollLeft():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 f,e,b,d=this.options,a=this.document[0];this.relativeContainer=null;if(!d.containment){this.containment=null;return}if(d.containment==="window"){this.containment=[U(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,U(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,U(window).scrollLeft()+U(window).width()-this.helperProportions.width-this.margins.left,U(window).scrollTop()+(U(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(d.containment==="document"){this.containment=[0,0,U(a).width()-this.helperProportions.width-this.margins.left,(U(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(d.containment.constructor===Array){this.containment=d.containment;return}if(d.containment==="parent"){d.containment=this.helper[0].parentNode}e=U(d.containment);b=e[0];if(!b){return}f=e.css("overflow")!=="hidden";this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(f?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relativeContainer=e},_convertPositionTo:function(a,b){if(!b){b=this.position}var e=a==="absolute"?1:-1,c=this._isRootNode(this.scrollParent[0]);return{top:(b.top+this.offset.relative.top*e+this.offset.parent.top*e-((this.cssPosition==="fixed"?-this.offset.scroll.top:(c?0:this.offset.scroll.top))*e)),left:(b.left+this.offset.relative.left*e+this.offset.parent.left*e-((this.cssPosition==="fixed"?-this.offset.scroll.left:(c?0:this.offset.scroll.left))*e))}},_generatePosition:function(c,h){var f,b,d,e,g=this.options,a=this._isRootNode(this.scrollParent[0]),j=c.pageX,i=c.pageY;if(!a||!this.offset.scroll){this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}}if(h){if(this.containment){if(this.relativeContainer){b=this.relativeContainer.offset();f=[this.containment[0]+b.left,this.containment[1]+b.top,this.containment[2]+b.left,this.containment[3]+b.top]}else{f=this.containment}if(c.pageX-this.offset.click.left<f[0]){j=f[0]+this.offset.click.left}if(c.pageY-this.offset.click.top<f[1]){i=f[1]+this.offset.click.top}if(c.pageX-this.offset.click.left>f[2]){j=f[2]+this.offset.click.left}if(c.pageY-this.offset.click.top>f[3]){i=f[3]+this.offset.click.top}}if(g.grid){d=g.grid[1]?this.originalPageY+Math.round((i-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY;i=f?((d-this.offset.click.top>=f[1]||d-this.offset.click.top>f[3])?d:((d-this.offset.click.top>=f[1])?d-g.grid[1]:d+g.grid[1])):d;e=g.grid[0]?this.originalPageX+Math.round((j-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX;j=f?((e-this.offset.click.left>=f[0]||e-this.offset.click.left>f[2])?e:((e-this.offset.click.left>=f[0])?e-g.grid[0]:e+g.grid[0])):e}if(g.axis==="y"){j=this.originalPageX}if(g.axis==="x"){i=this.originalPageY}}return{top:(i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.offset.scroll.top:(a?0:this.offset.scroll.top))),left:(j-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.offset.scroll.left:(a?0:this.offset.scroll.left)))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false;if(this.destroyOnClear){this.destroy()}},_trigger:function(a,c,b){b=b||this._uiHash();U.ui.plugin.call(this,a,[c,b,this],true);if(a==="drag"){this.positionAbs=this._convertPositionTo("absolute")}return U.Widget.prototype._trigger.call(this,a,c,b)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});U.ui.plugin.add("draggable","connectToSortable",{start:function(d,a,c){var b=c.options,e=U.extend({},a,{item:c.element});c.sortables=[];U(b.connectToSortable).each(function(){var f=U(this).sortable("instance");if(f&&!f.options.disabled){c.sortables.push({instance:f,shouldRevert:f.options.revert});f.refreshPositions();f._trigger("activate",d,e)}})},stop:function(c,a,b){var d=U.extend({},a,{item:b.element});U.each(b.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;b.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=this.shouldRevert}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(b.options.helper==="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,d)}})},drag:function(d,a,c){var b=this;U.each(c.sortables,function(){var f=false,e=this;this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){f=true;U.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this!==e&&this.instance._intersectsWith(this.instance.containerCache)&&U.contains(e.instance.element[0],this.instance.element[0])){f=false}return f})}if(f){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=U(b).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return a.helper[0]};d.target=this.instance.currentItem[0];this.instance._mouseCapture(d,true);this.instance._mouseStart(d,true,true);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",d);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}if(this.instance.currentItem){this.instance._mouseDrag(d)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",d,this.instance._uiHash(this.instance));this.instance._mouseStop(d,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}c._trigger("fromSortable",d);c.dropped=false}}})}});U.ui.plugin.add("draggable","cursor",{start:function(d,a,b){var e=U("body"),c=b.options;if(e.css("cursor")){c._cursor=e.css("cursor")}e.css("cursor",c.cursor)},stop:function(d,a,b){var c=b.options;if(c._cursor){U("body").css("cursor",c._cursor)}}});U.ui.plugin.add("draggable","opacity",{start:function(d,a,b){var e=U(a.helper),c=b.options;if(e.css("opacity")){c._opacity=e.css("opacity")}e.css("opacity",c.opacity)},stop:function(d,a,b){var c=b.options;if(c._opacity){U(a.helper).css("opacity",c._opacity)}}});U.ui.plugin.add("draggable","scroll",{start:function(c,a,b){if(!b.scrollParentNotHidden){b.scrollParentNotHidden=b.helper.scrollParent(false)}if(b.scrollParentNotHidden[0]!==b.document[0]&&b.scrollParentNotHidden[0].tagName!=="HTML"){b.overflowOffset=b.scrollParentNotHidden.offset()}},drag:function(f,a,b){var d=b.options,e=false,c=b.scrollParentNotHidden[0],g=b.document[0];if(c!==g&&c.tagName!=="HTML"){if(!d.axis||d.axis!=="x"){if((b.overflowOffset.top+c.offsetHeight)-f.pageY<d.scrollSensitivity){c.scrollTop=e=c.scrollTop+d.scrollSpeed}else{if(f.pageY-b.overflowOffset.top<d.scrollSensitivity){c.scrollTop=e=c.scrollTop-d.scrollSpeed}}}if(!d.axis||d.axis!=="y"){if((b.overflowOffset.left+c.offsetWidth)-f.pageX<d.scrollSensitivity){c.scrollLeft=e=c.scrollLeft+d.scrollSpeed}else{if(f.pageX-b.overflowOffset.left<d.scrollSensitivity){c.scrollLeft=e=c.scrollLeft-d.scrollSpeed}}}}else{if(!d.axis||d.axis!=="x"){if(f.pageY-U(g).scrollTop()<d.scrollSensitivity){e=U(g).scrollTop(U(g).scrollTop()-d.scrollSpeed)}else{if(U(window).height()-(f.pageY-U(g).scrollTop())<d.scrollSensitivity){e=U(g).scrollTop(U(g).scrollTop()+d.scrollSpeed)}}}if(!d.axis||d.axis!=="y"){if(f.pageX-U(g).scrollLeft()<d.scrollSensitivity){e=U(g).scrollLeft(U(g).scrollLeft()-d.scrollSpeed)}else{if(U(window).width()-(f.pageX-U(g).scrollLeft())<d.scrollSensitivity){e=U(g).scrollLeft(U(g).scrollLeft()+d.scrollSpeed)}}}}if(e!==false&&U.ui.ddmanager&&!d.dropBehaviour){U.ui.ddmanager.prepareOffsets(b,f)}}});U.ui.plugin.add("draggable","snap",{start:function(d,a,b){var c=b.options;b.snapElements=[];U(c.snap.constructor!==String?(c.snap.items||":data(ui-draggable)"):c.snap).each(function(){var f=U(this),e=f.offset();if(this!==b.element[0]){b.snapElements.push({item:this,width:f.outerWidth(),height:f.outerHeight(),top:e.top,left:e.left})}})},drag:function(s,g,n){var e,j,k,z,m,a,f,p,h,c,w=n.options,q=w.snapTolerance,u=g.offset.left,x=u+n.helperProportions.width,v=g.offset.top,y=v+n.helperProportions.height;for(h=n.snapElements.length-1;h>=0;h--){m=n.snapElements[h].left;a=m+n.snapElements[h].width;f=n.snapElements[h].top;p=f+n.snapElements[h].height;if(x<m-q||u>a+q||y<f-q||v>p+q||!U.contains(n.snapElements[h].item.ownerDocument,n.snapElements[h].item)){if(n.snapElements[h].snapping){(n.options.snap.release&&n.options.snap.release.call(n.element,s,U.extend(n._uiHash(),{snapItem:n.snapElements[h].item})))}n.snapElements[h].snapping=false;continue}if(w.snapMode!=="inner"){e=Math.abs(f-y)<=q;j=Math.abs(p-v)<=q;k=Math.abs(m-x)<=q;z=Math.abs(a-u)<=q;if(e){g.position.top=n._convertPositionTo("relative",{top:f-n.helperProportions.height,left:0}).top-n.margins.top}if(j){g.position.top=n._convertPositionTo("relative",{top:p,left:0}).top-n.margins.top}if(k){g.position.left=n._convertPositionTo("relative",{top:0,left:m-n.helperProportions.width}).left-n.margins.left}if(z){g.position.left=n._convertPositionTo("relative",{top:0,left:a}).left-n.margins.left}}c=(e||j||k||z);if(w.snapMode!=="outer"){e=Math.abs(f-v)<=q;j=Math.abs(p-y)<=q;k=Math.abs(m-u)<=q;z=Math.abs(a-x)<=q;if(e){g.position.top=n._convertPositionTo("relative",{top:f,left:0}).top-n.margins.top}if(j){g.position.top=n._convertPositionTo("relative",{top:p-n.helperProportions.height,left:0}).top-n.margins.top}if(k){g.position.left=n._convertPositionTo("relative",{top:0,left:m}).left-n.margins.left}if(z){g.position.left=n._convertPositionTo("relative",{top:0,left:a-n.helperProportions.width}).left-n.margins.left}}if(!n.snapElements[h].snapping&&(e||j||k||z||c)){(n.options.snap.snap&&n.options.snap.snap.call(n.element,s,U.extend(n._uiHash(),{snapItem:n.snapElements[h].item})))}n.snapElements[h].snapping=(e||j||k||z||c)}}});U.ui.plugin.add("draggable","stack",{start:function(e,a,c){var f,d=c.options,b=U.makeArray(U(d.stack)).sort(function(h,g){return(parseInt(U(h).css("zIndex"),10)||0)-(parseInt(U(g).css("zIndex"),10)||0)});if(!b.length){return}f=parseInt(U(b[0]).css("zIndex"),10)||0;U(b).each(function(g){U(this).css("zIndex",f+g)});this.css("zIndex",(f+b.length))}});U.ui.plugin.add("draggable","zIndex",{start:function(d,a,b){var e=U(a.helper),c=b.options;if(e.css("zIndex")){c._zIndex=e.css("zIndex")}e.css("zIndex",c.zIndex)},stop:function(d,a,b){var c=b.options;if(c._zIndex){U(a.helper).css("zIndex",c._zIndex)}}});var Q=U.ui.draggable;
/*
     * jQuery UI Resizable 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/resizable/
     */
U.widget("ui.resizable",U.ui.mouse,{version:"1.11.1",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a,10)||0},_isNumber:function(a){return !isNaN(parseInt(a,10))},_hasScroll:function(b,d){if(U(b).css("overflow")==="hidden"){return false}var c=(d&&d==="left")?"scrollLeft":"scrollTop",e=false;if(b[c]>0){return true}b[c]=1;e=(b[c]>0);b[c]=0;return e},_create:function(){var c,b,a,g,f,d=this,e=this.options;this.element.addClass("ui-resizable");U.extend(this,{_aspectRatio:!!(e.aspectRatio),aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(U("<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("ui-resizable",this.element.resizable("instance"));this.elementIsWrapper=true;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=e.handles||(!U(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor===String){if(this.handles==="all"){this.handles="n,e,s,w,se,sw,ne,nw"}c=this.handles.split(",");this.handles={};for(b=0;b<c.length;b++){a=U.trim(c[b]);f="ui-resizable-"+a;g=U("<div class='ui-resizable-handle "+f+"'></div>");g.css({zIndex:e.zIndex});if("se"===a){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[a]=".ui-resizable-"+a;this.element.append(g)}}this._renderAxis=function(l){var h,m,j,k;l=l||this.element;for(h in this.handles){if(this.handles[h].constructor===String){this.handles[h]=this.element.children(this.handles[h]).first().show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){m=U(this.handles[h],this.element);k=/sw|ne|nw|se|n|s/.test(h)?m.outerHeight():m.outerWidth();j=["padding",/ne|nw|n/.test(h)?"Top":/se|sw|s/.test(h)?"Bottom":/^e$/.test(h)?"Right":"Left"].join("");l.css(j,k);this._proportionallyResize()}if(!U(this.handles[h]).length){continue}}};this._renderAxis(this.element);this._handles=U(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!d.resizing){if(this.className){g=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}d.axis=g&&g[1]?g[1]:"se"}});if(e.autoHide){this._handles.hide();U(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(e.disabled){return}U(this).removeClass("ui-resizable-autohide");d._handles.show()}).mouseleave(function(){if(e.disabled){return}if(!d.resizing){U(this).addClass("ui-resizable-autohide");d._handles.hide()}})}this._mouseInit()},_destroy:function(){this._mouseDestroy();var a,b=function(c){U(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);a=this.element;this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")}).insertAfter(a);a.remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(c){var b,a,d=false;for(b in this.handles){a=U(this.handles[b])[0];if(a===c.target||U.contains(a,c.target)){d=true}}return !this.options.disabled&&d},_mouseStart:function(d){var c,e,a,b=this.options,f=this.element;this.resizing=true;this._renderProxy();c=this._num(this.helper.css("left"));e=this._num(this.helper.css("top"));if(b.containment){c+=U(b.containment).scrollLeft()||0;e+=U(b.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:e};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:f.width(),height:f.height()};this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()};this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()};this.originalPosition={left:c,top:e};this.originalMousePosition={left:d.pageX,top:d.pageY};this.aspectRatio=(typeof b.aspectRatio==="number")?b.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);a=U(".ui-resizable-"+this.axis).css("cursor");U("body").css("cursor",a==="auto"?this.axis+"-resize":a);f.addClass("ui-resizable-resizing");this._propagate("start",d);return true},_mouseDrag:function(d){var c,e,i=this.originalMousePosition,h=this.axis,g=(d.pageX-i.left)||0,f=(d.pageY-i.top)||0,b=this._change[h];this._updatePrevProperties();if(!b){return false}c=b.apply(this,[d,g,f]);this._updateVirtualBoundaries(d.shiftKey);if(this._aspectRatio||d.shiftKey){c=this._updateRatio(c,d)}c=this._respectSize(c,d);this._updateCache(c);this._propagate("resize",d);e=this._applyChanges();if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}if(!U.isEmptyObject(e)){this._updatePrevProperties();this._trigger("resize",d,this.ui());this._applyChanges()}return false},_mouseStop:function(d){this.resizing=false;var b,a,h,j,c,f,e,i=this.options,g=this;if(this._helper){b=this._proportionallyResizeElements;a=b.length&&(/textarea/i).test(b[0].nodeName);h=a&&this._hasScroll(b[0],"left")?0:g.sizeDiff.height;j=a?0:g.sizeDiff.width;c={width:(g.helper.width()-j),height:(g.helper.height()-h)};f=(parseInt(g.element.css("left"),10)+(g.position.left-g.originalPosition.left))||null;e=(parseInt(g.element.css("top"),10)+(g.position.top-g.originalPosition.top))||null;if(!i.animate){this.element.css(U.extend(c,{top:e,left:f}))}g.helper.height(g.size.height);g.helper.width(g.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}U("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",d);if(this._helper){this.helper.remove()}return false},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};if(this.position.top!==this.prevPosition.top){a.top=this.position.top+"px"}if(this.position.left!==this.prevPosition.left){a.left=this.position.left+"px"}if(this.size.width!==this.prevSize.width){a.width=this.size.width+"px"}if(this.size.height!==this.prevSize.height){a.height=this.size.height+"px"}this.helper.css(a);return a},_updateVirtualBoundaries:function(e){var f,g,d,c,h,a=this.options;h={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:Infinity,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:Infinity};if(this._aspectRatio||e){f=h.minHeight*this.aspectRatio;d=h.minWidth/this.aspectRatio;g=h.maxHeight*this.aspectRatio;c=h.maxWidth/this.aspectRatio;if(f>h.minWidth){h.minWidth=f}if(d>h.minHeight){h.minHeight=d}if(g<h.maxWidth){h.maxWidth=g}if(c<h.maxHeight){h.maxHeight=c}}this._vBoundaries=h},_updateCache:function(a){this.offset=this.helper.offset();if(this._isNumber(a.left)){this.position.left=a.left}if(this._isNumber(a.top)){this.position.top=a.top}if(this._isNumber(a.height)){this.size.height=a.height}if(this._isNumber(a.width)){this.size.width=a.width}},_updateRatio:function(e){var c=this.position,b=this.size,d=this.axis;if(this._isNumber(e.height)){e.width=(e.height*this.aspectRatio)}else{if(this._isNumber(e.width)){e.height=(e.width/this.aspectRatio)}}if(d==="sw"){e.left=c.left+(b.width-e.width);e.top=null}if(d==="nw"){e.top=c.top+(b.height-e.height);e.left=c.left+(b.width-e.width)}return e},_respectSize:function(e){var i=this._vBoundaries,l=this.axis,g=this._isNumber(e.width)&&i.maxWidth&&(i.maxWidth<e.width),c=this._isNumber(e.height)&&i.maxHeight&&(i.maxHeight<e.height),h=this._isNumber(e.width)&&i.minWidth&&(i.minWidth>e.width),d=this._isNumber(e.height)&&i.minHeight&&(i.minHeight>e.height),f=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,b=/sw|nw|w/.test(l),k=/nw|ne|n/.test(l);if(h){e.width=i.minWidth}if(d){e.height=i.minHeight}if(g){e.width=i.maxWidth}if(c){e.height=i.maxHeight}if(h&&b){e.left=f-i.minWidth}if(g&&b){e.left=f-i.maxWidth}if(d&&k){e.top=j-i.minHeight}if(c&&k){e.top=j-i.maxHeight}if(!e.width&&!e.height&&!e.left&&e.top){e.top=null}else{if(!e.width&&!e.height&&!e.top&&e.left){e.left=null}}return e},_getPaddingPlusBorderDimensions:function(d){var b=0,a=[],e=[d.css("borderTopWidth"),d.css("borderRightWidth"),d.css("borderBottomWidth"),d.css("borderLeftWidth")],c=[d.css("paddingTop"),d.css("paddingRight"),d.css("paddingBottom"),d.css("paddingLeft")];for(;b<4;b++){a[b]=(parseInt(e[b],10)||0);a[b]+=(parseInt(c[b],10)||0)}return{height:a[0]+a[2],width:a[1]+a[3]}},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return}var c,a=0,b=this.helper||this.element;for(;a<this._proportionallyResizeElements.length;a++){c=this._proportionallyResizeElements[a];if(!this.outerDimensions){this.outerDimensions=this._getPaddingPlusBorderDimensions(c)}c.css({height:(b.height()-this.outerDimensions.height)||0,width:(b.width()-this.outerDimensions.width)||0})}},_renderProxy:function(){var a=this.element,b=this.options;this.elementOffset=a.offset();if(this._helper){this.helper=this.helper||U("<div style='overflow:hidden;'></div>");this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(c,b){var d=this.originalSize,a=this.originalPosition;return{left:a.left+b,width:d.width-b}},n:function(d,c,a){var e=this.originalSize,b=this.originalPosition;return{top:b.top+a,height:e.height-a}},s:function(c,b,a){return{height:this.originalSize.height+a}},se:function(c,b,a){return U.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[c,b,a]))},sw:function(c,b,a){return U.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[c,b,a]))},ne:function(c,b,a){return U.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[c,b,a]))},nw:function(c,b,a){return U.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[c,b,a]))}},_propagate:function(a,b){U.ui.plugin.call(this,a,[b,this.ui()]);(a!=="resize"&&this._trigger(a,b,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});U.ui.plugin.add("resizable","animate",{stop:function(d){var g=U(this).resizable("instance"),h=g.options,i=g._proportionallyResizeElements,a=i.length&&(/textarea/i).test(i[0].nodeName),b=a&&g._hasScroll(i[0],"left")?0:g.sizeDiff.height,j=a?0:g.sizeDiff.width,f={width:(g.size.width-j),height:(g.size.height-b)},c=(parseInt(g.element.css("left"),10)+(g.position.left-g.originalPosition.left))||null,e=(parseInt(g.element.css("top"),10)+(g.position.top-g.originalPosition.top))||null;g.element.animate(U.extend(f,e&&c?{top:e,left:c}:{}),{duration:h.animateDuration,easing:h.animateEasing,step:function(){var k={width:parseInt(g.element.css("width"),10),height:parseInt(g.element.css("height"),10),top:parseInt(g.element.css("top"),10),left:parseInt(g.element.css("left"),10)};if(i&&i.length){U(i[0]).css({width:k.width,height:k.height})}g._updateCache(k);g._propagate("resize",d)}})}});U.ui.plugin.add("resizable","containment",{start:function(){var a,c,d,e,k,h,b,f=U(this).resizable("instance"),g=f.options,i=f.element,l=g.containment,j=(l instanceof U)?l.get(0):(/parent/.test(l))?i.parent().get(0):l;if(!j){return}f.containerElement=U(j);if(/document/.test(l)||l===document){f.containerOffset={left:0,top:0};f.containerPosition={left:0,top:0};f.parentData={element:U(document),left:0,top:0,width:U(document).width(),height:U(document).height()||document.body.parentNode.scrollHeight}}else{a=U(j);c=[];U(["Top","Right","Left","Bottom"]).each(function(m,n){c[m]=f._num(a.css("padding"+n))});f.containerOffset=a.offset();f.containerPosition=a.position();f.containerSize={height:(a.innerHeight()-c[3]),width:(a.innerWidth()-c[1])};d=f.containerOffset;e=f.containerSize.height;k=f.containerSize.width;h=(f._hasScroll(j,"left")?j.scrollWidth:k);b=(f._hasScroll(j)?j.scrollHeight:e);f.parentData={element:j,left:d.left,top:d.top,width:h,height:b}}},resize:function(e){var j,g,a,c,h=U(this).resizable("instance"),i=h.options,d=h.containerOffset,m=h.position,k=h._aspectRatio||e.shiftKey,f={top:0,left:0},b=h.containerElement,l=true;if(b[0]!==document&&(/static/).test(b.css("position"))){f=d}if(m.left<(h._helper?d.left:0)){h.size.width=h.size.width+(h._helper?(h.position.left-d.left):(h.position.left-f.left));if(k){h.size.height=h.size.width/h.aspectRatio;l=false}h.position.left=i.helper?d.left:0}if(m.top<(h._helper?d.top:0)){h.size.height=h.size.height+(h._helper?(h.position.top-d.top):h.position.top);if(k){h.size.width=h.size.height*h.aspectRatio;l=false}h.position.top=h._helper?d.top:0}a=h.containerElement.get(0)===h.element.parent().get(0);c=/relative|absolute/.test(h.containerElement.css("position"));if(a&&c){h.offset.left=h.parentData.left+h.position.left;h.offset.top=h.parentData.top+h.position.top}else{h.offset.left=h.element.offset().left;h.offset.top=h.element.offset().top}j=Math.abs(h.sizeDiff.width+(h._helper?h.offset.left-f.left:(h.offset.left-d.left)));g=Math.abs(h.sizeDiff.height+(h._helper?h.offset.top-f.top:(h.offset.top-d.top)));if(j+h.size.width>=h.parentData.width){h.size.width=h.parentData.width-j;if(k){h.size.height=h.size.width/h.aspectRatio;l=false}}if(g+h.size.height>=h.parentData.height){h.size.height=h.parentData.height-g;if(k){h.size.width=h.size.height*h.aspectRatio;l=false}}if(!l){h.position.left=h.prevPosition.left;h.position.top=h.prevPosition.top;h.size.width=h.prevSize.width;h.size.height=h.prevSize.height}},stop:function(){var e=U(this).resizable("instance"),f=e.options,c=e.containerOffset,d=e.containerPosition,i=e.containerElement,j=U(e.helper),a=j.offset(),b=j.outerWidth()-e.sizeDiff.width,g=j.outerHeight()-e.sizeDiff.height;if(e._helper&&!f.animate&&(/relative/).test(i.css("position"))){U(this).css({left:a.left-d.left-c.left,width:b,height:g})}if(e._helper&&!f.animate&&(/static/).test(i.css("position"))){U(this).css({left:a.left-d.left-c.left,width:b,height:g})}}});U.ui.plugin.add("resizable","alsoResize",{start:function(){var a=U(this).resizable("instance"),b=a.options,c=function(d){U(d).each(function(){var e=U(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};if(typeof(b.alsoResize)==="object"&&!b.alsoResize.parentNode){if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];c(b.alsoResize)}else{U.each(b.alsoResize,function(d){c(d)})}}else{c(b.alsoResize)}},resize:function(c,a){var d=U(this).resizable("instance"),e=d.options,h=d.originalSize,g=d.originalPosition,f={height:(d.size.height-h.height)||0,width:(d.size.width-h.width)||0,top:(d.position.top-g.top)||0,left:(d.position.left-g.left)||0},b=function(i,j){U(i).each(function(){var k=U(this),n=U(this).data("ui-resizable-alsoresize"),l={},m=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];U.each(m,function(o,p){var q=(n[p]||0)+(f[p]||0);if(q&&q>=0){l[p]=q||null}});k.css(l)})};if(typeof(e.alsoResize)==="object"&&!e.alsoResize.nodeType){U.each(e.alsoResize,function(i,j){b(i,j)})}else{b(e.alsoResize)}},stop:function(){U(this).removeData("resizable-alsoresize")}});U.ui.plugin.add("resizable","ghost",{start:function(){var a=U(this).resizable("instance"),b=a.options,c=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof b.ghost==="string"?b.ghost:"");a.ghost.appendTo(a.helper)},resize:function(){var a=U(this).resizable("instance");if(a.ghost){a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})}},stop:function(){var a=U(this).resizable("instance");if(a.ghost&&a.helper){a.helper.get(0).removeChild(a.ghost.get(0))}}});U.ui.plugin.add("resizable","grid",{resize:function(){var k,r=U(this).resizable("instance"),g=r.options,h=r.size,f=r.originalSize,q=r.originalPosition,j=r.axis,b=typeof g.grid==="number"?[g.grid,g.grid]:g.grid,s=(b[0]||1),d=(b[1]||1),c=Math.round((h.width-f.width)/s)*s,m=Math.round((h.height-f.height)/d)*d,l=f.width+c,p=f.height+m,t=g.maxWidth&&(g.maxWidth<l),e=g.maxHeight&&(g.maxHeight<p),n=g.minWidth&&(g.minWidth>l),i=g.minHeight&&(g.minHeight>p);g.grid=b;if(n){l+=s}if(i){p+=d}if(t){l-=s}if(e){p-=d}if(/^(se|s|e)$/.test(j)){r.size.width=l;r.size.height=p}else{if(/^(ne)$/.test(j)){r.size.width=l;r.size.height=p;r.position.top=q.top-m}else{if(/^(sw)$/.test(j)){r.size.width=l;r.size.height=p;r.position.left=q.left-c}else{if(p-d<=0||l-s<=0){k=r._getPaddingPlusBorderDimensions(this)}if(p-d>0){r.size.height=p;r.position.top=q.top-m}else{p=d-k.height;r.size.height=p;r.position.top=q.top+f.height-p}if(l-s>0){r.size.width=l;r.position.left=q.left-c}else{l=d-k.height;r.size.width=l;r.position.left=q.left+f.width-l}}}}}});var M=U.ui.resizable;
/*
     * jQuery UI Button 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/button/
     */
var C,F="ui-button ui-widget ui-state-default ui-corner-all",Y="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",H=function(){var a=U(this);setTimeout(function(){a.find(":ui-button").button("refresh")},1)},D=function(b){var c=b.name,a=b.form,d=U([]);if(c){c=c.replace(/'/g,"\\'");if(a){d=U(a).find("[name='"+c+"'][type=radio]")}else{d=U("[name='"+c+"'][type=radio]",b.ownerDocument).filter(function(){return !this.form})}}return d};U.widget("ui.button",{version:"1.11.1",defaultElement:"<button>",options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,H);if(typeof this.options.disabled!=="boolean"){this.options.disabled=!!this.element.prop("disabled")}else{this.element.prop("disabled",this.options.disabled)}this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,c=this.options,b=this.type==="checkbox"||this.type==="radio",d=!b?"ui-state-active":"";if(c.label===null){c.label=(this.type==="input"?this.buttonElement.val():this.buttonElement.html())}this._hoverable(this.buttonElement);this.buttonElement.addClass(F).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){if(c.disabled){return}if(this===C){U(this).addClass("ui-state-active")}}).bind("mouseleave"+this.eventNamespace,function(){if(c.disabled){return}U(this).removeClass(d)}).bind("click"+this.eventNamespace,function(e){if(c.disabled){e.preventDefault();e.stopImmediatePropagation()}});this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}});if(b){this.element.bind("change"+this.eventNamespace,function(){a.refresh()})}if(this.type==="checkbox"){this.buttonElement.bind("click"+this.eventNamespace,function(){if(c.disabled){return false}})}else{if(this.type==="radio"){this.buttonElement.bind("click"+this.eventNamespace,function(){if(c.disabled){return false}U(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed","true");var e=a.element[0];D(e).not(e).map(function(){return U(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")})}else{this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(c.disabled){return false}U(this).addClass("ui-state-active");C=this;a.document.one("mouseup",function(){C=null})}).bind("mouseup"+this.eventNamespace,function(){if(c.disabled){return false}U(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){if(c.disabled){return false}if(e.keyCode===U.ui.keyCode.SPACE||e.keyCode===U.ui.keyCode.ENTER){U(this).addClass("ui-state-active")}}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){U(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(e){if(e.keyCode===U.ui.keyCode.SPACE){U(this).click()}})}}}this._setOption("disabled",c.disabled);this._resetButton()},_determineButtonType:function(){var b,a,c;if(this.element.is("[type=checkbox]")){this.type="checkbox"}else{if(this.element.is("[type=radio]")){this.type="radio"}else{if(this.element.is("input")){this.type="input"}else{this.type="button"}}}if(this.type==="checkbox"||this.type==="radio"){b=this.element.parents().last();a="label[for='"+this.element.attr("id")+"']";this.buttonElement=b.find(a);if(!this.buttonElement.length){b=b.length?b.siblings():this.element.siblings();this.buttonElement=b.filter(a);if(!this.buttonElement.length){this.buttonElement=b.find(a)}}this.element.addClass("ui-helper-hidden-accessible");c=this.element.is(":checked");if(c){this.buttonElement.addClass("ui-state-active")}this.buttonElement.prop("aria-pressed",c)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(F+" ui-state-active "+Y).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title")}},_setOption:function(a,b){this._super(a,b);if(a==="disabled"){this.widget().toggleClass("ui-state-disabled",!!b);this.element.prop("disabled",!!b);if(b){if(this.type==="checkbox"||this.type==="radio"){this.buttonElement.removeClass("ui-state-focus")}else{this.buttonElement.removeClass("ui-state-focus ui-state-active")}}return}this._resetButton()},refresh:function(){var a=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");if(a!==this.options.disabled){this._setOption("disabled",a)}if(this.type==="radio"){D(this.element[0]).each(function(){if(U(this).is(":checked")){U(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true")}else{U(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}})}else{if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true")}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")}}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)}return}var e=this.buttonElement.removeClass(Y),d=U("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),a=this.options.icons,b=a.primary&&a.secondary,c=[];if(a.primary||a.secondary){if(this.options.text){c.push("ui-button-text-icon"+(b?"s":(a.primary?"-primary":"-secondary")))}if(a.primary){e.prepend("<span class='ui-button-icon-primary ui-icon "+a.primary+"'></span>")}if(a.secondary){e.append("<span class='ui-button-icon-secondary ui-icon "+a.secondary+"'></span>")}if(!this.options.text){c.push(b?"ui-button-icons-only":"ui-button-icon-only");if(!this.hasTitle){e.attr("title",U.trim(d))}}}else{c.push("ui-button-text-only")}e.addClass(c.join(" "))}});U.widget("ui.buttonset",{version:"1.11.1",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){if(a==="disabled"){this.buttons.button("option",a,b)}this._super(a,b)},refresh:function(){var b=this.element.css("direction")==="rtl",c=this.element.find(this.options.items),a=c.filter(":ui-button");c.not(":ui-button").button();a.button("refresh");this.buttons=c.map(function(){return U(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return U(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}});var L=U.ui.button;
/*
     * jQuery UI Datepicker 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/datepicker/
     */
U.extend(U.ui,{datepicker:{version:"1.11.1"}});var X;function S(b){var a,c;while(b.length&&b[0]!==document){a=b.css("position");if(a==="absolute"||a==="relative"||a==="fixed"){c=parseInt(b.css("zIndex"),10);if(!isNaN(c)&&c!==0){return c}}b=b.parent()}return 0}function E(){this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,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:true,showButtonPanel:false,autoSize:false,disabled:false};U.extend(this._defaults,this.regional[""]);this.regional.en=U.extend(true,{},this.regional[""]);this.regional["en-US"]=U.extend(true,{},this.regional.en);this.dpDiv=N(U("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}U.extend(E.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){V(this._defaults,a||{});return this},_attachDatepicker:function(d,c){var e,a,b;e=d.nodeName.toLowerCase();a=(e==="div"||e==="span");if(!d.id){this.uuid+=1;d.id="dp"+this.uuid}b=this._newInst(U(d),a);b.settings=U.extend({},c||{});if(e==="input"){this._connectDatepicker(d,b)}else{if(a){this._inlineDatepicker(d,b)}}},_newInst:function(b,a){var c=b[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:c,input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:a,dpDiv:(!a?this.dpDiv:N(U("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))}},_connectDatepicker:function(c,a){var b=U(c);a.append=U([]);a.trigger=U([]);if(b.hasClass(this.markerClassName)){return}this._attachments(b,a);b.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp);this._autoSize(a);U.data(c,"datepicker",a);if(a.settings.disabled){this._disableDatepicker(c)}},_attachments:function(e,d){var a,g,f,b=this._get(d,"appendText"),c=this._get(d,"isRTL");if(d.append){d.append.remove()}if(b){d.append=U("<span class='"+this._appendClass+"'>"+b+"</span>");e[c?"before":"after"](d.append)}e.unbind("focus",this._showDatepicker);if(d.trigger){d.trigger.remove()}a=this._get(d,"showOn");if(a==="focus"||a==="both"){e.focus(this._showDatepicker)}if(a==="button"||a==="both"){g=this._get(d,"buttonText");f=this._get(d,"buttonImage");d.trigger=U(this._get(d,"buttonImageOnly")?U("<img/>").addClass(this._triggerClass).attr({src:f,alt:g,title:g}):U("<button type='button'></button>").addClass(this._triggerClass).html(!f?g:U("<img/>").attr({src:f,alt:g,title:g})));e[c?"before":"after"](d.trigger);d.trigger.click(function(){if(U.datepicker._datepickerShowing&&U.datepicker._lastInput===e[0]){U.datepicker._hideDatepicker()}else{if(U.datepicker._datepickerShowing&&U.datepicker._lastInput!==e[0]){U.datepicker._hideDatepicker();U.datepicker._showDatepicker(e[0])}else{U.datepicker._showDatepicker(e[0])}}return false})}},_autoSize:function(c){if(this._get(c,"autoSize")&&!c.inline){var a,g,e,b,f=new Date(2009,12-1,20),d=this._get(c,"dateFormat");if(d.match(/[DM]/)){a=function(h){g=0;e=0;for(b=0;b<h.length;b++){if(h[b].length>g){g=h[b].length;e=b}}return e};f.setMonth(a(this._get(c,(d.match(/MM/)?"monthNames":"monthNamesShort"))));f.setDate(a(this._get(c,(d.match(/DD/)?"dayNames":"dayNamesShort")))+20-f.getDay())}c.input.attr("size",this._formatDate(c,f).length)}},_inlineDatepicker:function(c,b){var a=U(c);if(a.hasClass(this.markerClassName)){return}a.addClass(this.markerClassName).append(b.dpDiv);U.data(c,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);if(b.settings.disabled){this._disableDatepicker(c)}b.dpDiv.css("display","block")},_dialogDatepicker:function(i,k,e,a,f){var g,j,b,c,h,d=this._dialogInst;if(!d){this.uuid+=1;g="dp"+this.uuid;this._dialogInput=U("<input type='text' id='"+g+"' style='position: absolute; top: -100px; width: 0px;'/>");this._dialogInput.keydown(this._doKeyDown);U("body").append(this._dialogInput);d=this._dialogInst=this._newInst(this._dialogInput,false);d.settings={};U.data(this._dialogInput[0],"datepicker",d)}V(d.settings,a||{});k=(k&&k.constructor===Date?this._formatDate(d,k):k);this._dialogInput.val(k);this._pos=(f?(f.length?f:[f.pageX,f.pageY]):null);if(!this._pos){j=document.documentElement.clientWidth;b=document.documentElement.clientHeight;c=document.documentElement.scrollLeft||document.body.scrollLeft;h=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(j/2)-100+c,(b/2)-150+h]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");d.settings.onSelect=e;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if(U.blockUI){U.blockUI(this.dpDiv)}U.data(this._dialogInput[0],"datepicker",d);return this},_destroyDatepicker:function(c){var d,b=U(c),a=U.data(c,"datepicker");if(!b.hasClass(this.markerClassName)){return}d=c.nodeName.toLowerCase();U.removeData(c,"datepicker");if(d==="input"){a.append.remove();a.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(d==="div"||d==="span"){b.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(d){var e,a,c=U(d),b=U.data(d,"datepicker");if(!c.hasClass(this.markerClassName)){return}e=d.nodeName.toLowerCase();if(e==="input"){d.disabled=false;b.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(e==="div"||e==="span"){a=c.children("."+this._inlineClass);a.children().removeClass("ui-state-disabled");a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false)}}this._disabledInputs=U.map(this._disabledInputs,function(f){return(f===d?null:f)})},_disableDatepicker:function(d){var e,a,c=U(d),b=U.data(d,"datepicker");if(!c.hasClass(this.markerClassName)){return}e=d.nodeName.toLowerCase();if(e==="input"){d.disabled=true;b.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(e==="div"||e==="span"){a=c.children("."+this._inlineClass);a.children().addClass("ui-state-disabled");a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true)}}this._disabledInputs=U.map(this._disabledInputs,function(f){return(f===d?null:f)});this._disabledInputs[this._disabledInputs.length]=d},_isDisabledDatepicker:function(b){if(!b){return false}for(var a=0;a<this._disabledInputs.length;a++){if(this._disabledInputs[a]===b){return true}}return false},_getInst:function(b){try{return U.data(b,"datepicker")}catch(a){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(g,b,e){var a,h,d,f,c=this._getInst(g);if(arguments.length===2&&typeof b==="string"){return(b==="defaults"?U.extend({},U.datepicker._defaults):(c?(b==="all"?U.extend({},c.settings):this._get(c,b)):null))}a=b||{};if(typeof b==="string"){a={};a[b]=e}if(c){if(this._curInst===c){this._hideDatepicker()}h=this._getDateDatepicker(g,true);d=this._getMinMaxDate(c,"min");f=this._getMinMaxDate(c,"max");V(c.settings,a);if(d!==null&&a.dateFormat!==undefined&&a.minDate===undefined){c.settings.minDate=this._formatDate(c,d)}if(f!==null&&a.dateFormat!==undefined&&a.maxDate===undefined){c.settings.maxDate=this._formatDate(c,f)}if("disabled" in a){if(a.disabled){this._disableDatepicker(g)}else{this._enableDatepicker(g)}}this._attachments(U(g),c);this._autoSize(c);this._setDate(c,h);this._updateAlternate(c);this._updateDatepicker(c)}},_changeDatepicker:function(c,a,b){this._optionDatepicker(c,a,b)},_refreshDatepicker:function(b){var a=this._getInst(b);if(a){this._updateDatepicker(a)}},_setDateDatepicker:function(b,c){var a=this._getInst(b);if(a){this._setDate(a,c);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(c,a){var b=this._getInst(c);if(b&&!b.inline){this._setDateFromField(b,a)}return(b?this._getDate(b):null)},_doKeyDown:function(e){var g,c,f,d=U.datepicker._getInst(e.target),a=true,b=d.dpDiv.is(".ui-datepicker-rtl");d._keyEvent=true;if(U.datepicker._datepickerShowing){switch(e.keyCode){case 9:U.datepicker._hideDatepicker();a=false;break;case 13:f=U("td."+U.datepicker._dayOverClass+":not(."+U.datepicker._currentClass+")",d.dpDiv);if(f[0]){U.datepicker._selectDay(e.target,d.selectedMonth,d.selectedYear,f[0])}g=U.datepicker._get(d,"onSelect");if(g){c=U.datepicker._formatDate(d);g.apply((d.input?d.input[0]:null),[c,d])}else{U.datepicker._hideDatepicker()}return false;case 27:U.datepicker._hideDatepicker();break;case 33:U.datepicker._adjustDate(e.target,(e.ctrlKey?-U.datepicker._get(d,"stepBigMonths"):-U.datepicker._get(d,"stepMonths")),"M");break;case 34:U.datepicker._adjustDate(e.target,(e.ctrlKey?+U.datepicker._get(d,"stepBigMonths"):+U.datepicker._get(d,"stepMonths")),"M");break;case 35:if(e.ctrlKey||e.metaKey){U.datepicker._clearDate(e.target)}a=e.ctrlKey||e.metaKey;break;case 36:if(e.ctrlKey||e.metaKey){U.datepicker._gotoToday(e.target)}a=e.ctrlKey||e.metaKey;break;case 37:if(e.ctrlKey||e.metaKey){U.datepicker._adjustDate(e.target,(b?+1:-1),"D")}a=e.ctrlKey||e.metaKey;if(e.originalEvent.altKey){U.datepicker._adjustDate(e.target,(e.ctrlKey?-U.datepicker._get(d,"stepBigMonths"):-U.datepicker._get(d,"stepMonths")),"M")}break;case 38:if(e.ctrlKey||e.metaKey){U.datepicker._adjustDate(e.target,-7,"D")}a=e.ctrlKey||e.metaKey;break;case 39:if(e.ctrlKey||e.metaKey){U.datepicker._adjustDate(e.target,(b?-1:+1),"D")}a=e.ctrlKey||e.metaKey;if(e.originalEvent.altKey){U.datepicker._adjustDate(e.target,(e.ctrlKey?+U.datepicker._get(d,"stepBigMonths"):+U.datepicker._get(d,"stepMonths")),"M")}break;case 40:if(e.ctrlKey||e.metaKey){U.datepicker._adjustDate(e.target,+7,"D")}a=e.ctrlKey||e.metaKey;break;default:a=false}}else{if(e.keyCode===36&&e.ctrlKey){U.datepicker._showDatepicker(this)}else{a=false}}if(a){e.preventDefault();e.stopPropagation()}},_doKeyPress:function(b){var d,c,a=U.datepicker._getInst(b.target);if(U.datepicker._get(a,"constrainInput")){d=U.datepicker._possibleChars(U.datepicker._get(a,"dateFormat"));c=String.fromCharCode(b.charCode==null?b.keyCode:b.charCode);return b.ctrlKey||b.metaKey||(c<" "||!d||d.indexOf(c)>-1)}},_doKeyUp:function(b){var d,a=U.datepicker._getInst(b.target);if(a.input.val()!==a.lastVal){try{d=U.datepicker.parseDate(U.datepicker._get(a,"dateFormat"),(a.input?a.input.val():null),U.datepicker._getFormatConfig(a));if(d){U.datepicker._setDateFromField(a);U.datepicker._updateAlternate(a);U.datepicker._updateDatepicker(a)}}catch(c){}}return true},_showDatepicker:function(h){h=h.target||h;if(h.nodeName.toLowerCase()!=="input"){h=U("input",h.parentNode)[0]}if(U.datepicker._isDisabledDatepicker(h)||U.datepicker._lastInput===h){return}var e,g,d,f,c,b,a;e=U.datepicker._getInst(h);if(U.datepicker._curInst&&U.datepicker._curInst!==e){U.datepicker._curInst.dpDiv.stop(true,true);if(e&&U.datepicker._datepickerShowing){U.datepicker._hideDatepicker(U.datepicker._curInst.input[0])}}g=U.datepicker._get(e,"beforeShow");d=g?g.apply(h,[h,e]):{};if(d===false){return}V(e.settings,d);e.lastVal=null;U.datepicker._lastInput=h;U.datepicker._setDateFromField(e);if(U.datepicker._inDialog){h.value=""}if(!U.datepicker._pos){U.datepicker._pos=U.datepicker._findPos(h);U.datepicker._pos[1]+=h.offsetHeight}f=false;U(h).parents().each(function(){f|=U(this).css("position")==="fixed";return !f});c={left:U.datepicker._pos[0],top:U.datepicker._pos[1]};U.datepicker._pos=null;e.dpDiv.empty();e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});U.datepicker._updateDatepicker(e);c=U.datepicker._checkOffset(e,c,f);e.dpDiv.css({position:(U.datepicker._inDialog&&U.blockUI?"static":(f?"fixed":"absolute")),display:"none",left:c.left+"px",top:c.top+"px"});if(!e.inline){b=U.datepicker._get(e,"showAnim");a=U.datepicker._get(e,"duration");e.dpDiv.css("z-index",S(U(h))+1);U.datepicker._datepickerShowing=true;if(U.effects&&U.effects.effect[b]){e.dpDiv.show(b,U.datepicker._get(e,"showOptions"),a)}else{e.dpDiv[b||"show"](b?a:null)}if(U.datepicker._shouldFocusInput(e)){e.input.focus()}U.datepicker._curInst=e}},_updateDatepicker:function(e){this.maxRows=4;X=e;e.dpDiv.empty().append(this._generateHTML(e));this._attachHandlers(e);var a,c=this._getNumberOfMonths(e),b=c[1],f=17,d=e.dpDiv.find("."+this._dayOverClass+" a");if(d.length>0){B.apply(d.get(0))}e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(b>1){e.dpDiv.addClass("ui-datepicker-multi-"+b).css("width",(f*b)+"em")}e.dpDiv[(c[0]!==1||c[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(e===U.datepicker._curInst&&U.datepicker._datepickerShowing&&U.datepicker._shouldFocusInput(e)){e.input.focus()}if(e.yearshtml){a=e.yearshtml;setTimeout(function(){if(a===e.yearshtml&&e.yearshtml){e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml)}a=e.yearshtml=null},0)}},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(d,c,e){var f=d.dpDiv.outerWidth(),a=d.dpDiv.outerHeight(),h=d.input?d.input.outerWidth():0,g=d.input?d.input.outerHeight():0,i=document.documentElement.clientWidth+(e?0:U(document).scrollLeft()),b=document.documentElement.clientHeight+(e?0:U(document).scrollTop());c.left-=(this._get(d,"isRTL")?(f-h):0);c.left-=(e&&c.left===d.input.offset().left)?U(document).scrollLeft():0;c.top-=(e&&c.top===(d.input.offset().top+g))?U(document).scrollTop():0;c.left-=Math.min(c.left,(c.left+f>i&&i>f)?Math.abs(c.left+f-i):0);c.top-=Math.min(c.top,(c.top+a>b&&b>a)?Math.abs(a+g):0);return c},_findPos:function(a){var c,d=this._getInst(a),b=this._get(d,"isRTL");while(a&&(a.type==="hidden"||a.nodeType!==1||U.expr.filters.hidden(a))){a=a[b?"previousSibling":"nextSibling"]}c=U(a).offset();return[c.left,c.top]},_hideDatepicker:function(d){var c,f,b,a,e=this._curInst;if(!e||(d&&e!==U.data(d,"datepicker"))){return}if(this._datepickerShowing){c=this._get(e,"showAnim");f=this._get(e,"duration");b=function(){U.datepicker._tidyDialog(e)};if(U.effects&&(U.effects.effect[c]||U.effects[c])){e.dpDiv.hide(c,U.datepicker._get(e,"showOptions"),f,b)}else{e.dpDiv[(c==="slideDown"?"slideUp":(c==="fadeIn"?"fadeOut":"hide"))]((c?f:null),b)}if(!c){b()}this._datepickerShowing=false;a=this._get(e,"onClose");if(a){a.apply((e.input?e.input[0]:null),[(e.input?e.input.val():""),e])}this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(U.blockUI){U.unblockUI();U("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(c){if(!U.datepicker._curInst){return}var a=U(c.target),b=U.datepicker._getInst(a[0]);if(((a[0].id!==U.datepicker._mainDivId&&a.parents("#"+U.datepicker._mainDivId).length===0&&!a.hasClass(U.datepicker.markerClassName)&&!a.closest("."+U.datepicker._triggerClass).length&&U.datepicker._datepickerShowing&&!(U.datepicker._inDialog&&U.blockUI)))||(a.hasClass(U.datepicker.markerClassName)&&U.datepicker._curInst!==b)){U.datepicker._hideDatepicker()}},_adjustDate:function(e,a,b){var d=U(e),c=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0])){return}this._adjustInstDate(c,a+(b==="M"?this._get(c,"showCurrentAtPos"):0),b);this._updateDatepicker(c)},_gotoToday:function(d){var c,b=U(d),a=this._getInst(b[0]);if(this._get(a,"gotoCurrent")&&a.currentDay){a.selectedDay=a.currentDay;a.drawMonth=a.selectedMonth=a.currentMonth;a.drawYear=a.selectedYear=a.currentYear}else{c=new Date();a.selectedDay=c.getDate();a.drawMonth=a.selectedMonth=c.getMonth();a.drawYear=a.selectedYear=c.getFullYear()}this._notifyChange(a);this._adjustDate(b)},_selectMonthYear:function(e,c,a){var d=U(e),b=this._getInst(d[0]);b["selected"+(a==="M"?"Month":"Year")]=b["draw"+(a==="M"?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10);this._notifyChange(b);this._adjustDate(d)},_selectDay:function(f,a,b,c){var d,e=U(f);if(U(c).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0])){return}d=this._getInst(e[0]);d.selectedDay=d.currentDay=U("a",c).html();d.selectedMonth=d.currentMonth=a;d.selectedYear=d.currentYear=b;this._selectDate(f,this._formatDate(d,d.currentDay,d.currentMonth,d.currentYear))},_clearDate:function(b){var a=U(b);this._selectDate(a,"")},_selectDate:function(e,a){var d,c=U(e),b=this._getInst(c[0]);a=(a!=null?a:this._formatDate(b));if(b.input){b.input.val(a)}this._updateAlternate(b);d=this._get(b,"onSelect");if(d){d.apply((b.input?b.input[0]:null),[a,b])}else{if(b.input){b.input.trigger("change")}}if(b.inline){this._updateDatepicker(b)}else{this._hideDatepicker();this._lastInput=b.input[0];if(typeof(b.input[0])!=="object"){b.input.focus()}this._lastInput=null}},_updateAlternate:function(b){var c,e,a,d=this._get(b,"altField");if(d){c=this._get(b,"altFormat")||this._get(b,"dateFormat");e=this._getDate(b);a=this.formatDate(c,e,this._getFormatConfig(b));U(d).each(function(){U(this).val(a)})}},noWeekends:function(b){var a=b.getDay();return[(a>0&&a<6),""]},iso8601Week:function(b){var a,c=new Date(b.getTime());c.setDate(c.getDate()+4-(c.getDay()||7));a=c.getTime();c.setMonth(0);c.setDate(1);return Math.floor(Math.round((a-c)/86400000)/7)+1},parseDate:function(p,c,l){if(p==null||c==null){throw"Invalid arguments"}c=(typeof c==="object"?c.toString():c+"");if(c===""){return null}var h,i,f,o=0,j=(l?l.shortYearCutoff:null)||this._defaults.shortYearCutoff,r=(typeof j!=="string"?j:new Date().getFullYear()%100+parseInt(j,10)),d=(l?l.dayNamesShort:null)||this._defaults.dayNamesShort,a=(l?l.dayNames:null)||this._defaults.dayNames,e=(l?l.monthNamesShort:null)||this._defaults.monthNamesShort,t=(l?l.monthNames:null)||this._defaults.monthNames,m=-1,w=-1,u=-1,b=-1,v=false,g,n=function(y){var x=(h+1<p.length&&p.charAt(h+1)===y);if(x){h++}return x},q=function(z){var Aa=n(z),x=(z==="@"?14:(z==="!"?20:(z==="y"&&Aa?4:(z==="o"?3:2)))),Ac=(z==="y"?x:1),y=new RegExp("^\\d{"+Ac+","+x+"}"),Ab=c.substring(o).match(y);if(!Ab){throw"Missing number at position "+o}o+=Ab[0].length;return parseInt(Ab[0],10)},s=function(x,z,y){var Ab=-1,Aa=U.map(n(x)?y:z,function(Ac,Ad){return[[Ad,Ac]]}).sort(function(Ad,Ac){return -(Ad[1].length-Ac[1].length)});U.each(Aa,function(Ac,Ae){var Ad=Ae[1];if(c.substr(o,Ad.length).toLowerCase()===Ad.toLowerCase()){Ab=Ae[0];o+=Ad.length;return false}});if(Ab!==-1){return Ab+1}else{throw"Unknown name at position "+o}},k=function(){if(c.charAt(o)!==p.charAt(h)){throw"Unexpected literal at position "+o}o++};for(h=0;h<p.length;h++){if(v){if(p.charAt(h)==="'"&&!n("'")){v=false}else{k()}}else{switch(p.charAt(h)){case"d":u=q("d");break;case"D":s("D",d,a);break;case"o":b=q("o");break;case"m":w=q("m");break;case"M":w=s("M",e,t);break;case"y":m=q("y");break;case"@":g=new Date(q("@"));m=g.getFullYear();w=g.getMonth()+1;u=g.getDate();break;case"!":g=new Date((q("!")-this._ticksTo1970)/10000);m=g.getFullYear();w=g.getMonth()+1;u=g.getDate();break;case"'":if(n("'")){k()}else{v=true}break;default:k()}}}if(o<c.length){f=c.substr(o);if(!/^\s+/.test(f)){throw"Extra/unparsed characters found in date: "+f}}if(m===-1){m=new Date().getFullYear()}else{if(m<100){m+=new Date().getFullYear()-new Date().getFullYear()%100+(m<=r?0:-100)}}if(b>-1){w=1;u=b;do{i=this._getDaysInMonth(m,w-1);if(u<=i){break}w++;u-=i}while(true)}g=this._daylightSavingAdjust(new Date(m,w-1,u));if(g.getFullYear()!==m||g.getMonth()+1!==w||g.getDate()!==u){throw"Invalid date"}return g},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:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(d,m,b){if(!m){return""}var a,g=(b?b.dayNamesShort:null)||this._defaults.dayNamesShort,h=(b?b.dayNames:null)||this._defaults.dayNames,j=(b?b.monthNamesShort:null)||this._defaults.monthNamesShort,l=(b?b.monthNames:null)||this._defaults.monthNames,i=function(o){var n=(a+1<d.length&&d.charAt(a+1)===o);if(n){a++}return n},c=function(n,p,o){var q=""+p;if(i(n)){while(q.length<o){q="0"+q}}return q},f=function(o,q,n,p){return(i(o)?p[q]:n[q])},e="",k=false;if(m){for(a=0;a<d.length;a++){if(k){if(d.charAt(a)==="'"&&!i("'")){k=false}else{e+=d.charAt(a)}}else{switch(d.charAt(a)){case"d":e+=c("d",m.getDate(),2);break;case"D":e+=f("D",m.getDay(),g,h);break;case"o":e+=c("o",Math.round((new Date(m.getFullYear(),m.getMonth(),m.getDate()).getTime()-new Date(m.getFullYear(),0,0).getTime())/86400000),3);break;case"m":e+=c("m",m.getMonth()+1,2);break;case"M":e+=f("M",m.getMonth(),j,l);break;case"y":e+=(i("y")?m.getFullYear():(m.getYear()%100<10?"0":"")+m.getYear()%100);break;case"@":e+=m.getTime();break;case"!":e+=m.getTime()*10000+this._ticksTo1970;break;case"'":if(i("'")){e+="'"}else{k=true}break;default:e+=d.charAt(a)}}}}return e},_possibleChars:function(c){var a,e="",d=false,b=function(g){var f=(a+1<c.length&&c.charAt(a+1)===g);if(f){a++}return f};for(a=0;a<c.length;a++){if(d){if(c.charAt(a)==="'"&&!b("'")){d=false}else{e+=c.charAt(a)}}else{switch(c.charAt(a)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":if(b("'")){e+="'"}else{d=true}break;default:e+=c.charAt(a)}}}return e},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(d,g){if(d.input.val()===d.lastVal){return}var c=this._get(d,"dateFormat"),f=d.lastVal=d.input?d.input.val():null,b=this._getDefaultDate(d),h=b,a=this._getFormatConfig(d);try{h=this.parseDate(c,f,a)||b}catch(e){f=(g?"":f)}d.selectedDay=h.getDate();d.drawMonth=d.selectedMonth=h.getMonth();d.drawYear=d.selectedYear=h.getFullYear();d.currentDay=(f?h.getDate():0);d.currentMonth=(f?h.getMonth():0);d.currentYear=(f?h.getFullYear():0);this._adjustInstDate(d)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date()))},_determineDate:function(d,f,b){var e=function(g){var h=new Date();h.setDate(h.getDate()+g);return h},a=function(m){try{return U.datepicker.parseDate(U.datepicker._get(d,"dateFormat"),m,U.datepicker._getFormatConfig(d))}catch(g){}var n=(m.toLowerCase().match(/^c/)?U.datepicker._getDate(d):null)||new Date(),l=n.getFullYear(),h=n.getMonth(),j=n.getDate(),i=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=i.exec(m);while(k){switch(k[2]||"d"){case"d":case"D":j+=parseInt(k[1],10);break;case"w":case"W":j+=parseInt(k[1],10)*7;break;case"m":case"M":h+=parseInt(k[1],10);j=Math.min(j,U.datepicker._getDaysInMonth(l,h));break;case"y":case"Y":l+=parseInt(k[1],10);j=Math.min(j,U.datepicker._getDaysInMonth(l,h));break}k=i.exec(m)}return new Date(l,h,j)},c=(f==null||f===""?b:(typeof f==="string"?a(f):(typeof f==="number"?(isNaN(f)?b:e(f)):new Date(f.getTime()))));c=(c&&c.toString()==="Invalid Date"?b:c);if(c){c.setHours(0);c.setMinutes(0);c.setSeconds(0);c.setMilliseconds(0)}return this._daylightSavingAdjust(c)},_daylightSavingAdjust:function(a){if(!a){return null}a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(c,g,e){var f=!g,a=c.selectedMonth,d=c.selectedYear,b=this._restrictMinMax(c,this._determineDate(c,g,new Date()));c.selectedDay=c.currentDay=b.getDate();c.drawMonth=c.selectedMonth=c.currentMonth=b.getMonth();c.drawYear=c.selectedYear=c.currentYear=b.getFullYear();if((a!==c.selectedMonth||d!==c.selectedYear)&&!e){this._notifyChange(c)}this._adjustInstDate(c);if(c.input){c.input.val(f?"":this._formatDate(c))}},_getDate:function(a){var b=(!a.currentYear||(a.input&&a.input.val()==="")?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay)));return b},_attachHandlers:function(b){var a=this._get(b,"stepMonths"),c="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){var d={prev:function(){U.datepicker._adjustDate(c,-a,"M")},next:function(){U.datepicker._adjustDate(c,+a,"M")},hide:function(){U.datepicker._hideDatepicker()},today:function(){U.datepicker._gotoToday(c)},selectDay:function(){U.datepicker._selectDay(c,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false},selectMonth:function(){U.datepicker._selectMonthYear(c,this,"M");return false},selectYear:function(){U.datepicker._selectMonthYear(c,this,"Y");return false}};U(this).bind(this.getAttribute("data-event"),d[this.getAttribute("data-handler")])})},_generateHTML:function(u){var An,AB,d,e,c,AA,Ak,Ap,Ah,Ae,s,Au,o,Ab,AC,Al,Am,f,Ay,q,a,x,Aj,As,m,At,Ag,Ao,Af,i,r,j,p,Aa,Ad,Ar,b,w,l,z=new Date(),v=this._daylightSavingAdjust(new Date(z.getFullYear(),z.getMonth(),z.getDate())),y=this._get(u,"isRTL"),n=this._get(u,"showButtonPanel"),Ai=this._get(u,"hideIfNoPrevNext"),Ax=this._get(u,"navigationAsDateFormat"),Az=this._getNumberOfMonths(u),k=this._get(u,"showCurrentAtPos"),g=this._get(u,"stepMonths"),Aw=(Az[0]!==1||Az[1]!==1),t=this._daylightSavingAdjust((!u.currentDay?new Date(9999,9,9):new Date(u.currentYear,u.currentMonth,u.currentDay))),Aq=this._getMinMaxDate(u,"min"),h=this._getMinMaxDate(u,"max"),Ac=u.drawMonth-k,Av=u.drawYear;if(Ac<0){Ac+=12;Av--}if(h){An=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth()-(Az[0]*Az[1])+1,h.getDate()));An=(Aq&&An<Aq?Aq:An);while(this._daylightSavingAdjust(new Date(Av,Ac,1))>An){Ac--;if(Ac<0){Ac=11;Av--}}}u.drawMonth=Ac;u.drawYear=Av;AB=this._get(u,"prevText");AB=(!Ax?AB:this.formatDate(AB,this._daylightSavingAdjust(new Date(Av,Ac-g,1)),this._getFormatConfig(u)));d=(this._canAdjustMonth(u,-1,Av,Ac)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+AB+"'><span class='ui-icon ui-icon-circle-triangle-"+(y?"e":"w")+"'>"+AB+"</span></a>":(Ai?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+AB+"'><span class='ui-icon ui-icon-circle-triangle-"+(y?"e":"w")+"'>"+AB+"</span></a>"));e=this._get(u,"nextText");e=(!Ax?e:this.formatDate(e,this._daylightSavingAdjust(new Date(Av,Ac+g,1)),this._getFormatConfig(u)));c=(this._canAdjustMonth(u,+1,Av,Ac)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(y?"w":"e")+"'>"+e+"</span></a>":(Ai?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(y?"w":"e")+"'>"+e+"</span></a>"));AA=this._get(u,"currentText");Ak=(this._get(u,"gotoCurrent")&&u.currentDay?t:v);AA=(!Ax?AA:this.formatDate(AA,Ak,this._getFormatConfig(u)));Ap=(!u.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(u,"closeText")+"</button>":"");Ah=(n)?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(y?Ap:"")+(this._isInRange(u,Ak)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+AA+"</button>":"")+(y?"":Ap)+"</div>":"";Ae=parseInt(this._get(u,"firstDay"),10);Ae=(isNaN(Ae)?0:Ae);s=this._get(u,"showWeek");Au=this._get(u,"dayNames");o=this._get(u,"dayNamesMin");Ab=this._get(u,"monthNames");AC=this._get(u,"monthNamesShort");Al=this._get(u,"beforeShowDay");Am=this._get(u,"showOtherMonths");f=this._get(u,"selectOtherMonths");Ay=this._getDefaultDate(u);q="";a;for(x=0;x<Az[0];x++){Aj="";this.maxRows=4;for(As=0;As<Az[1];As++){m=this._daylightSavingAdjust(new Date(Av,Ac,u.selectedDay));At=" ui-corner-all";Ag="";if(Aw){Ag+="<div class='ui-datepicker-group";if(Az[1]>1){switch(As){case 0:Ag+=" ui-datepicker-group-first";At=" ui-corner-"+(y?"right":"left");break;case Az[1]-1:Ag+=" ui-datepicker-group-last";At=" ui-corner-"+(y?"left":"right");break;default:Ag+=" ui-datepicker-group-middle";At="";break}}Ag+="'>"}Ag+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+At+"'>"+(/all|left/.test(At)&&x===0?(y?c:d):"")+(/all|right/.test(At)&&x===0?(y?d:c):"")+this._generateMonthYearHeader(u,Ac,Av,Aq,h,x>0||As>0,Ab,AC)+"</div><table class='ui-datepicker-calendar'><thead><tr>";Ao=(s?"<th class='ui-datepicker-week-col'>"+this._get(u,"weekHeader")+"</th>":"");for(a=0;a<7;a++){Af=(a+Ae)%7;Ao+="<th scope='col'"+((a+Ae+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+Au[Af]+"'>"+o[Af]+"</span></th>"}Ag+=Ao+"</tr></thead><tbody>";i=this._getDaysInMonth(Av,Ac);if(Av===u.selectedYear&&Ac===u.selectedMonth){u.selectedDay=Math.min(u.selectedDay,i)}r=(this._getFirstDayOfMonth(Av,Ac)-Ae+7)%7;j=Math.ceil((r+i)/7);p=(Aw?this.maxRows>j?this.maxRows:j:j);this.maxRows=p;Aa=this._daylightSavingAdjust(new Date(Av,Ac,1-r));for(Ad=0;Ad<p;Ad++){Ag+="<tr>";Ar=(!s?"":"<td class='ui-datepicker-week-col'>"+this._get(u,"calculateWeek")(Aa)+"</td>");for(a=0;a<7;a++){b=(Al?Al.apply((u.input?u.input[0]:null),[Aa]):[true,""]);w=(Aa.getMonth()!==Ac);l=(w&&!f)||!b[0]||(Aq&&Aa<Aq)||(h&&Aa>h);Ar+="<td class='"+((a+Ae+6)%7>=5?" ui-datepicker-week-end":"")+(w?" ui-datepicker-other-month":"")+((Aa.getTime()===m.getTime()&&Ac===u.selectedMonth&&u._keyEvent)||(Ay.getTime()===Aa.getTime()&&Ay.getTime()===m.getTime())?" "+this._dayOverClass:"")+(l?" "+this._unselectableClass+" ui-state-disabled":"")+(w&&!Am?"":" "+b[1]+(Aa.getTime()===t.getTime()?" "+this._currentClass:"")+(Aa.getTime()===v.getTime()?" ui-datepicker-today":""))+"'"+((!w||Am)&&b[2]?" title='"+b[2].replace(/'/g,"&#39;")+"'":"")+(l?"":" data-handler='selectDay' data-event='click' data-month='"+Aa.getMonth()+"' data-year='"+Aa.getFullYear()+"'")+">"+(w&&!Am?"&#xa0;":(l?"<span class='ui-state-default'>"+Aa.getDate()+"</span>":"<a class='ui-state-default"+(Aa.getTime()===v.getTime()?" ui-state-highlight":"")+(Aa.getTime()===t.getTime()?" ui-state-active":"")+(w?" ui-priority-secondary":"")+"' href='#'>"+Aa.getDate()+"</a>"))+"</td>";Aa.setDate(Aa.getDate()+1);Aa=this._daylightSavingAdjust(Aa)}Ag+=Ar+"</tr>"}Ac++;if(Ac>11){Ac=0;Av++}Ag+="</tbody></table>"+(Aw?"</div>"+((Az[0]>0&&As===Az[1]-1)?"<div class='ui-datepicker-row-break'></div>":""):"");Aj+=Ag}q+=Aj}q+=Ah;u._keyEvent=false;return q},_generateMonthYearHeader:function(i,e,r,s,b,f,o,d){var j,p,u,q,h,g,n,k,m=this._get(i,"changeMonth"),a=this._get(i,"changeYear"),c=this._get(i,"showMonthAfterYear"),l="<div class='ui-datepicker-title'>",t="";if(f||!m){t+="<span class='ui-datepicker-month'>"+o[e]+"</span>"}else{j=(s&&s.getFullYear()===r);p=(b&&b.getFullYear()===r);t+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";for(u=0;u<12;u++){if((!j||u>=s.getMonth())&&(!p||u<=b.getMonth())){t+="<option value='"+u+"'"+(u===e?" selected='selected'":"")+">"+d[u]+"</option>"}}t+="</select>"}if(!c){l+=t+(f||!(m&&a)?"&#xa0;":"")}if(!i.yearshtml){i.yearshtml="";if(f||!a){l+="<span class='ui-datepicker-year'>"+r+"</span>"}else{q=this._get(i,"yearRange").split(":");h=new Date().getFullYear();g=function(w){var v=(w.match(/c[+\-].*/)?r+parseInt(w.substring(1),10):(w.match(/[+\-].*/)?h+parseInt(w,10):parseInt(w,10)));return(isNaN(v)?h:v)};n=g(q[0]);k=Math.max(n,g(q[1]||""));n=(s?Math.max(n,s.getFullYear()):n);k=(b?Math.min(k,b.getFullYear()):k);i.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";for(;n<=k;n++){i.yearshtml+="<option value='"+n+"'"+(n===r?" selected='selected'":"")+">"+n+"</option>"}i.yearshtml+="</select>";l+=i.yearshtml;i.yearshtml=null}}l+=this._get(i,"yearSuffix");if(c){l+=(f||!(m&&a)?"&#xa0;":"")+t}l+="</div>";return l},_adjustInstDate:function(e,a,d){var f=e.drawYear+(d==="Y"?a:0),b=e.drawMonth+(d==="M"?a:0),g=Math.min(e.selectedDay,this._getDaysInMonth(f,b))+(d==="D"?a:0),c=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(f,b,g)));e.selectedDay=c.getDate();e.drawMonth=e.selectedMonth=c.getMonth();e.drawYear=e.selectedYear=c.getFullYear();if(d==="M"||d==="Y"){this._notifyChange(e)}},_restrictMinMax:function(d,e){var a=this._getMinMaxDate(d,"min"),b=this._getMinMaxDate(d,"max"),c=(a&&e<a?a:e);return(b&&c>b?b:c)},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b){b.apply((a.input?a.input[0]:null),[a.selectedYear,a.selectedMonth+1,a])}},_getNumberOfMonths:function(b){var a=this._get(b,"numberOfMonths");return(a==null?[1,1]:(typeof a==="number"?[1,a]:a))},_getMinMaxDate:function(b,a){return this._determineDate(b,this._get(b,a+"Date"),null)},_getDaysInMonth:function(b,a){return 32-this._daylightSavingAdjust(new Date(b,a,32)).getDate()},_getFirstDayOfMonth:function(b,a){return new Date(b,a,1).getDay()},_canAdjustMonth:function(d,a,b,f){var c=this._getNumberOfMonths(d),e=this._daylightSavingAdjust(new Date(b,f+(a<0?a:c[0]*c[1]),1));if(a<0){e.setDate(this._getDaysInMonth(e.getFullYear(),e.getMonth()))}return this._isInRange(d,e)},_isInRange:function(a,i){var h,b,g=this._getMinMaxDate(a,"min"),e=this._getMinMaxDate(a,"max"),d=null,f=null,c=this._get(a,"yearRange");if(c){h=c.split(":");b=new Date().getFullYear();d=parseInt(h[0],10);f=parseInt(h[1],10);if(h[0].match(/[+\-].*/)){d+=b}if(h[1].match(/[+\-].*/)){f+=b}}return((!g||i.getTime()>=g.getTime())&&(!e||i.getTime()<=e.getTime())&&(!d||i.getFullYear()>=d)&&(!f||i.getFullYear()<=f))},_getFormatConfig:function(b){var a=this._get(b,"shortYearCutoff");a=(typeof a!=="string"?a:new Date().getFullYear()%100+parseInt(a,10));return{shortYearCutoff:a,dayNamesShort:this._get(b,"dayNamesShort"),dayNames:this._get(b,"dayNames"),monthNamesShort:this._get(b,"monthNamesShort"),monthNames:this._get(b,"monthNames")}},_formatDate:function(c,b,a,d){if(!b){c.currentDay=c.selectedDay;c.currentMonth=c.selectedMonth;c.currentYear=c.selectedYear}var e=(b?(typeof b==="object"?b:this._daylightSavingAdjust(new Date(d,a,b))):this._daylightSavingAdjust(new Date(c.currentYear,c.currentMonth,c.currentDay)));return this.formatDate(this._get(c,"dateFormat"),e,this._getFormatConfig(c))}});function N(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.delegate(b,"mouseout",function(){U(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){U(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){U(this).removeClass("ui-datepicker-next-hover")}}).delegate(b,"mouseover",B)}function B(){if(!U.datepicker._isDisabledDatepicker(X.inline?X.dpDiv.parent()[0]:X.input[0])){U(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");U(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){U(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){U(this).addClass("ui-datepicker-next-hover")}}}function V(c,b){U.extend(c,b);for(var a in b){if(b[a]==null){c[a]=b[a]}}return c}U.fn.datepicker=function(a){if(U(this).is("input")){U(this).blur(function(){var d=U(this).val();var c=/^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)/;if(d!=""){if(!c.test(d)){U(this).addClass("error");alert("请输入正确的日期格式！")}}});U(this).click(function(){if(U(this).hasClass("error")){U(this).val("");U(this).removeClass("error")}})}if(!this.length){return this}if(!U.datepicker.initialized){U(document).mousedown(U.datepicker._checkExternalClick);U.datepicker.initialized=true}if(U("#"+U.datepicker._mainDivId).length===0){U("body").append(U.datepicker.dpDiv)}var b=Array.prototype.slice.call(arguments,1);if(typeof a==="string"&&(a==="isDisabled"||a==="getDate"||a==="widget")){return U.datepicker["_"+a+"Datepicker"].apply(U.datepicker,[this[0]].concat(b))}if(a==="option"&&arguments.length===2&&typeof arguments[1]==="string"){return U.datepicker["_"+a+"Datepicker"].apply(U.datepicker,[this[0]].concat(b))}return this.each(function(){typeof a==="string"?U.datepicker["_"+a+"Datepicker"].apply(U.datepicker,[this].concat(b)):U.datepicker._attachDatepicker(this,a)})};U.datepicker=new E();U.datepicker.initialized=false;U.datepicker.uuid=new Date().getTime();U.datepicker.version="1.11.1";var J=U.datepicker;
/*
     * jQuery UI Dialog 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/dialog/
     */
var G=U.widget("ui.dialog",{version:"1.11.1",options:{appendTo:"body",autoOpen:true,buttons:[],closeOnEscape:true,closeText:"Close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var a=U(this).css(b).offset().top;if(a<0){U(this).css("top",b.top-a)}}},resizable:true,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},resizableRelatedOptions:{maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();if(this.options.draggable&&U.fn.draggable){this._makeDraggable()}if(this.options.resizable&&U.fn.resizable){this._makeResizable()}this._isOpen=false;this._trackFocus()},_init:function(){if(this.options.autoOpen){this.open()}},_appendTo:function(){var a=this.options.appendTo;if(a&&(a.jquery||a.nodeType)){return U(a)}return this.document.find(a||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(true,true).remove();if(this.originalTitle){this.element.attr("title",this.originalTitle)}a=b.parent.children().eq(b.index);if(a.length&&a[0]!==this.element[0]){a.before(this.element)}else{b.parent.append(this.element)}},widget:function(){return this.uiDialog},disable:U.noop,enable:U.noop,close:function(c){var b,a=this;if(!this._isOpen||this._trigger("beforeClose",c)===false){return}this._isOpen=false;this._focusedElement=null;this._destroyOverlay();this._untrackInstance();if(!this.opener.filter(":focusable").focus().length){try{b=this.document[0].activeElement;if(b&&b.nodeName.toLowerCase()!=="body"){U(b).blur()}}catch(d){}}this._hide(this.uiDialog,this.options.hide,function(){a._trigger("close",c)})},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(b,e){var d=false,a=this.uiDialog.siblings(".ui-front:visible").map(function(){return +U(this).css("z-index")}).get(),c=Math.max.apply(null,a);if(c>=+this.uiDialog.css("z-index")){this.uiDialog.css("z-index",c+1);d=true}if(d&&!e){this._trigger("focus",b)}return d},open:function(){var a=this;if(this._isOpen){if(this._moveToTop()){this._focusTabbable()}return}this._isOpen=true;this.opener=U(this.document[0].activeElement);this._size();this._position();this._createOverlay();this._moveToTop(null,true);if(this.overlay){this.overlay.css("z-index",this.uiDialog.css("z-index")-1)}this._show(this.uiDialog,this.options.show,function(){a._focusTabbable();a._trigger("focus")});this._makeFocusTarget();this._trigger("open")},_focusTabbable:function(){var a=this._focusedElement;if(!a){a=this.element.find("[autofocus]")}if(!a.length){a=this.element.find(":tabbable")}if(!a.length){a=this.uiDialogButtonPane.find(":tabbable")}if(!a.length){a=this.uiDialogTitlebarClose.filter(":tabbable")}if(!a.length){a=this.uiDialog}a.eq(0).focus()},_keepFocus:function(b){function a(){var d=this.document[0].activeElement,c=this.uiDialog[0]===d||U.contains(this.uiDialog[0],d);if(!c){this._focusTabbable()}}b.preventDefault();a.call(this);this._delay(a)},_createWrapper:function(){this.uiDialog=U("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===U.ui.keyCode.ESCAPE){b.preventDefault();this.close(b);return}if(b.keyCode!==U.ui.keyCode.TAB||b.isDefaultPrevented()){return}var c=this.uiDialog.find(":tabbable"),a=c.filter(":first"),d=c.filter(":last");if((b.target===d[0]||b.target===this.uiDialog[0])&&!b.shiftKey){this._delay(function(){a.focus()});b.preventDefault()}else{if((b.target===a[0]||b.target===this.uiDialog[0])&&b.shiftKey){this._delay(function(){d.focus()});b.preventDefault()}}},mousedown:function(a){if(this._moveToTop(a)){this._focusTabbable()}}});if(!this.element.find("[aria-describedby]").length){this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})}},_createTitlebar:function(){var a;this.uiDialogTitlebar=U("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(b){if(!U(b.target).closest(".ui-dialog-titlebar-close")){this.uiDialog.focus()}}});this.uiDialogTitlebarClose=U("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:false}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(b){b.preventDefault();this.close(b)}});a=U("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(a);this.uiDialog.attr({"aria-labelledby":a.attr("id")})},_title:function(a){if(!this.options.title){a.html("&#160;")}a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=U("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=U("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var a=this,b=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();if(U.isEmptyObject(b)||(U.isArray(b)&&!b.length)){this.uiDialog.removeClass("ui-dialog-buttons");return}U.each(b,function(d,e){var f,c;e=U.isFunction(e)?{click:e,text:d}:e;e=U.extend({type:"button"},e);f=e.click;e.click=function(){f.apply(a.element[0],arguments)};c={icons:e.icons,text:e.showText};U("<button></button>",e).button(c).appendTo(a.uiButtonSet)});this.uiDialog.addClass("ui-dialog-buttons");this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){var a=this,b=this.options;function c(d){return{position:d.position,offset:d.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(e,d){U(this).addClass("ui-dialog-dragging");a._blockFrames();a._trigger("dragStart",e,c(d))},drag:function(e,d){a._trigger("drag",e,c(d))},stop:function(g,d){var e=d.offset.left-a.document.scrollLeft(),f=d.offset.top-a.document.scrollTop();b.position={my:"left top",at:"left"+(e>=0?"+":"")+e+" top"+(f>=0?"+":"")+f,of:a.window};U(this).removeClass("ui-dialog-dragging");a._unblockFrames();a._trigger("dragStop",g,c(d))}})},_makeResizable:function(){var c=this,e=this.options,f=e.resizable,a=this.uiDialog.css("position"),b=typeof f==="string"?f:"n,e,s,w,se,sw,ne,nw";function d(g){return{originalPosition:g.originalPosition,originalSize:g.originalSize,position:g.position,size:g.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:this._minHeight(),handles:b,start:function(h,g){U(this).addClass("ui-dialog-resizing");c._blockFrames();c._trigger("resizeStart",h,d(g))},resize:function(h,g){c._trigger("resize",h,d(g))},stop:function(k,g){var h=c.uiDialog.offset(),i=h.left-c.document.scrollLeft(),j=h.top-c.document.scrollTop();e.height=c.uiDialog.height();e.width=c.uiDialog.width();e.position={my:"left top",at:"left"+(i>=0?"+":"")+i+" top"+(j>=0?"+":"")+j,of:c.window};U(this).removeClass("ui-dialog-resizing");c._unblockFrames();c._trigger("resizeStop",k,d(g))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(a){this._makeFocusTarget();this._focusedElement=U(a.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var a=this._trackingInstances(),b=U.inArray(this,a);if(b!==-1){a.splice(b,1)}},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");if(!a){a=[];this.document.data("ui-dialog-instances",a)}return a},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");if(!a){this.uiDialog.show()}this.uiDialog.position(this.options.position);if(!a){this.uiDialog.hide()}},_setOptions:function(c){var b=this,d=false,a={};U.each(c,function(e,f){b._setOption(e,f);if(e in b.sizeRelatedOptions){d=true}if(e in b.resizableRelatedOptions){a[e]=f}});if(d){this._size();this._position()}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option",a)}},_setOption:function(b,d){var c,e,a=this.uiDialog;if(b==="dialogClass"){a.removeClass(this.options.dialogClass).addClass(d)}if(b==="disabled"){return}this._super(b,d);if(b==="appendTo"){this.uiDialog.appendTo(this._appendTo())}if(b==="buttons"){this._createButtons()}if(b==="closeText"){this.uiDialogTitlebarClose.button({label:""+d})}if(b==="draggable"){c=a.is(":data(ui-draggable)");if(c&&!d){a.draggable("destroy")}if(!c&&d){this._makeDraggable()}}if(b==="position"){this._position()}if(b==="resizable"){e=a.is(":data(ui-resizable)");if(e&&!d){a.resizable("destroy")}if(e&&typeof d==="string"){a.resizable("option","handles",d)}if(!e&&d!==false){this._makeResizable()}}if(b==="title"){this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))}},_size:function(){var b,d,a,c=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});if(c.minWidth>c.width){c.width=c.minWidth}b=this.uiDialog.css({height:"auto",width:c.width}).outerHeight();d=Math.max(0,c.minHeight-b);a=typeof c.maxHeight==="number"?Math.max(0,c.maxHeight-b):"none";if(c.height==="auto"){this.element.css({minHeight:d,maxHeight:a,height:"auto"})}else{this.element.height(Math.max(0,c.height-b))}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var a=U(this);return U("<div>").css({position:"absolute",width:a.outerWidth(),height:a.outerHeight()}).appendTo(a.parent()).offset(a.offset())[0]})},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks}},_allowInteraction:function(a){if(U(a.target).closest(".ui-dialog").length){return true}return !!U(a.target).closest(".ui-datepicker").length},_createOverlay:function(){if(!this.options.modal){return}var a=true;this._delay(function(){a=false});if(!this.document.data("ui-dialog-overlays")){this._on(this.document,{focusin:function(b){if(a){return}if(!this._allowInteraction(b)){b.preventDefault();this._trackingInstances()[0]._focusTabbable()}}})}this.overlay=U("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo());this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)},_destroyOverlay:function(){if(!this.options.modal){return}if(this.overlay){var a=this.document.data("ui-dialog-overlays")-1;if(!a){this.document.unbind("focusin").removeData("ui-dialog-overlays")}else{this.document.data("ui-dialog-overlays",a)}this.overlay.remove();this.overlay=null}}});
/*
     * jQuery UI Slider 1.11.1
     * http://jqueryui.com
     *
     * Copyright 2014 jQuery Foundation and other contributors
     * Released under the MIT license.
     * http://jquery.org/license
     *
     * http://api.jqueryui.com/slider/
     */
var I=U.widget("ui.slider",U.ui.mouse,{version:"1.11.1",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=false},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var b,d,c=this.options,f=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",e=[];d=(c.values&&c.values.length)||1;if(f.length>d){f.slice(d).remove();f=f.slice(0,d)}for(b=f.length;b<d;b++){e.push(a)}this.handles=f.add(U(e.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.each(function(g){U(this).data("ui-slider-handle-index",g)})},_createRange:function(){var a=this.options,b="";if(a.range){if(a.range===true){if(!a.values){a.values=[this._valueMin(),this._valueMin()]}else{if(a.values.length&&a.values.length!==2){a.values=[a.values[0],a.values[0]]}else{if(U.isArray(a.values)){a.values=a.values.slice(0)}}}}if(!this.range||!this.range.length){this.range=U("<div></div>").appendTo(this.element);b="ui-slider-range ui-widget-header ui-corner-all"}else{this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({"left":"","bottom":""})}this.range.addClass(b+((a.range==="min"||a.range==="max")?" ui-slider-range-"+a.range:""))}else{if(this.range){this.range.remove()}this.range=null}},_setupEvents:function(){this._off(this.handles);this._on(this.handles,this._handleEvents);this._hoverable(this.handles);this._focusable(this.handles)},_destroy:function(){this.handles.remove();if(this.range){this.range.remove()}this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all");this._mouseDestroy()},_mouseCapture:function(e){var i,a,g,j,c,d,b,f,k=this,h=this.options;if(h.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();i={x:e.pageX,y:e.pageY};a=this._normValueFromMouse(i);g=this._valueMax()-this._valueMin()+1;this.handles.each(function(l){var m=Math.abs(a-k.values(l));if((g>m)||(g===m&&(l===k._lastChangedValue||k.values(l)===h.min))){g=m;j=U(this);c=l}});d=this._start(e,c);if(d===false){return false}this._mouseSliding=true;this._handleIndex=c;j.addClass("ui-state-active").focus();b=j.offset();f=!U(e.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=f?{left:0,top:0}:{left:e.pageX-b.left-(j.width()/2),top:e.pageY-b.top-(j.height()/2)-(parseInt(j.css("borderTopWidth"),10)||0)-(parseInt(j.css("borderBottomWidth"),10)||0)+(parseInt(j.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(e,c,a)}this._animateOff=true;return true},_mouseStart:function(){return true},_mouseDrag:function(b){var a={x:b.pageX,y:b.pageY},c=this._normValueFromMouse(a);this._slide(b,this._handleIndex,c);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(d){var f,b,e,c,a;if(this.orientation==="horizontal"){f=this.elementSize.width;b=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{f=this.elementSize.height;b=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}e=(b/f);if(e>1){e=1}if(e<0){e=0}if(this.orientation==="vertical"){e=1-e}c=this._valueMax()-this._valueMin();a=this._valueMin()+e*c;return this._trimAlignValue(a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}return this._trigger("start",a,c)},_slide:function(d,e,c){var a,f,b;if(this.options.values&&this.options.values.length){a=this.values(e?0:1);if((this.options.values.length===2&&this.options.range===true)&&((e===0&&c>a)||(e===1&&c<a))){c=a}if(c!==this.values(e)){f=this.values();f[e]=c;b=this._trigger("slide",d,{handle:this.handles[e],value:c,values:f});a=this.values(e?0:1);if(b!==false){this.values(e,c)}}}else{if(c!==this.value()){b=this._trigger("slide",d,{handle:this.handles[e],value:c});if(b!==false){this.value(c)}}}},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._lastChangedValue=b;this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=this._trimAlignValue(a);this._refreshValue();this._change(null,0);return}return this._value()},values:function(c,e){var d,a,b;if(arguments.length>1){this.options.values[c]=this._trimAlignValue(e);this._refreshValue();this._change(null,c);return}if(arguments.length){if(U.isArray(arguments[0])){d=this.options.values;a=arguments[0];for(b=0;b<d.length;b+=1){d[b]=this._trimAlignValue(a[b]);this._change(null,b)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(c)}else{return this.value()}}}else{return this._values()}},_setOption:function(a,d){var b,c=0;if(a==="range"&&this.options.range===true){if(d==="min"){this.options.value=this._values(0);this.options.values=null}else{if(d==="max"){this.options.value=this._values(this.options.values.length-1);this.options.values=null}}}if(U.isArray(this.options.values)){c=this.options.values.length}if(a==="disabled"){this.element.toggleClass("ui-state-disabled",!!d)}this._super(a,d);switch(a){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();this.handles.css(d==="horizontal"?"bottom":"left","");break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(b=0;b<c;b+=1){this._change(null,b)}this._animateOff=false;break;case"min":case"max":this._animateOff=true;this._refreshValue();this._animateOff=false;break;case"range":this._animateOff=true;this._refresh();this._animateOff=false;break}},_value:function(){var a=this.options.value;a=this._trimAlignValue(a);return a},_values:function(b){var c,d,a;if(arguments.length){c=this.options.values[b];c=this._trimAlignValue(c);return c}else{if(this.options.values&&this.options.values.length){d=this.options.values.slice();for(a=0;a<d.length;a+=1){d[a]=this._trimAlignValue(d[a])}return d}else{return[]}}},_trimAlignValue:function(d){if(d<=this._valueMin()){return this._valueMin()}if(d>=this._valueMax()){return this._valueMax()}var a=(this.options.step>0)?this.options.step:1,b=(d-this._valueMin())%a,c=d-b;if(Math.abs(b)*2>=a){c+=(b>0)?a:(-a)}return parseFloat(c.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a,c,g,f,d,e=this.options.range,i=this.options,h=this,j=(!this._animateOff)?i.animate:false,b={};if(this.options.values&&this.options.values.length){this.handles.each(function(k){c=(h.values(k)-h._valueMin())/(h._valueMax()-h._valueMin())*100;b[h.orientation==="horizontal"?"left":"bottom"]=c+"%";U(this).stop(1,1)[j?"animate":"css"](b,i.animate);if(h.options.range===true){if(h.orientation==="horizontal"){if(k===0){h.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},i.animate)}if(k===1){h.range[j?"animate":"css"]({width:(c-a)+"%"},{queue:false,duration:i.animate})}}else{if(k===0){h.range.stop(1,1)[j?"animate":"css"]({bottom:(c)+"%"},i.animate)}if(k===1){h.range[j?"animate":"css"]({height:(c-a)+"%"},{queue:false,duration:i.animate})}}}a=c})}else{g=this.value();f=this._valueMin();d=this._valueMax();c=(d!==f)?(g-f)/(d-f)*100:0;b[this.orientation==="horizontal"?"left":"bottom"]=c+"%";this.handle.stop(1,1)[j?"animate":"css"](b,i.animate);if(e==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},i.animate)}if(e==="max"&&this.orientation==="horizontal"){this.range[j?"animate":"css"]({width:(100-c)+"%"},{queue:false,duration:i.animate})}if(e==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},i.animate)}if(e==="max"&&this.orientation==="vertical"){this.range[j?"animate":"css"]({height:(100-c)+"%"},{queue:false,duration:i.animate})}}},_handleEvents:{keydown:function(e){var c,d,b,a,f=U(e.target).data("ui-slider-handle-index");switch(e.keyCode){case U.ui.keyCode.HOME:case U.ui.keyCode.END:case U.ui.keyCode.PAGE_UP:case U.ui.keyCode.PAGE_DOWN:case U.ui.keyCode.UP:case U.ui.keyCode.RIGHT:case U.ui.keyCode.DOWN:case U.ui.keyCode.LEFT:e.preventDefault();if(!this._keySliding){this._keySliding=true;U(e.target).addClass("ui-state-active");c=this._start(e,f);if(c===false){return}}break}a=this.options.step;if(this.options.values&&this.options.values.length){d=b=this.values(f)}else{d=b=this.value()}switch(e.keyCode){case U.ui.keyCode.HOME:b=this._valueMin();break;case U.ui.keyCode.END:b=this._valueMax();break;case U.ui.keyCode.PAGE_UP:b=this._trimAlignValue(d+((this._valueMax()-this._valueMin())/this.numPages));break;case U.ui.keyCode.PAGE_DOWN:b=this._trimAlignValue(d-((this._valueMax()-this._valueMin())/this.numPages));break;case U.ui.keyCode.UP:case U.ui.keyCode.RIGHT:if(d===this._valueMax()){return}b=this._trimAlignValue(d+a);break;case U.ui.keyCode.DOWN:case U.ui.keyCode.LEFT:if(d===this._valueMin()){return}b=this._trimAlignValue(d-a);break}this._slide(e,f,b)},keyup:function(a){var b=U(a.target).data("ui-slider-handle-index");if(this._keySliding){this._keySliding=false;this._stop(a,b);this._change(a,b);U(a.target).removeClass("ui-state-active")}}}})}));
/* jQuery Timepicker Addon - v1.4.3 - 2013-11-30
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2013 Trent Richardson; Licensed MIT */
(function($){$.ui.timepicker=$.ui.timepicker||{};if($.ui.timepicker.version){return}$.extend($.ui,{timepicker:{version:"1.4.3"}});var Timepicker=function(){this.regional=[];this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:false};this._defaults={showButtonPanel:true,timeOnly:false,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:true,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:true,separator:" ",altFieldTimeOnly:true,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:true,timezoneList:null,addSliderAccess:false,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"};$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_newInst:function($input,opts){var tp_inst=new Timepicker(),inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults){if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue){try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}}overrides={beforeShow:function(input,dp_inst){if($.isFunction(tp_inst._defaults.evnts.beforeShow)){return tp_inst._defaults.evnts.beforeShow.call($input[0],input,dp_inst,tp_inst)}},onChangeMonthYear:function(year,month,dp_inst){tp_inst._updateDateTime(dp_inst);if($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)){tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],year,month,dp_inst,tp_inst)}},onClose:function(dateText,dp_inst){if(tp_inst.timeDefined===true&&$input.val()!==""){tp_inst._updateDateTime(dp_inst)}if($.isFunction(tp_inst._defaults.evnts.onClose)){tp_inst._defaults.evnts.onClose.call($input[0],dateText,dp_inst,tp_inst)}}};for(i in overrides){if(overrides.hasOwnProperty(i)){fns[i]=opts[i]||null}}tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst});tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(val){return val.toUpperCase()});tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(val){return val.toUpperCase()});tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:""));if(typeof(tp_inst._defaults.controlType)==="string"){if(tp_inst._defaults.controlType==="slider"&&typeof($.ui.slider)==="undefined"){tp_inst._defaults.controlType="select"}tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]}else{tp_inst.control=tp_inst._defaults.controlType}var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];if(tp_inst._defaults.timezoneList!==null){timezoneList=tp_inst._defaults.timezoneList}var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&typeof timezoneList[0]!=="object"){for(;tzi<tzl;tzi++){tzv=timezoneList[tzi];timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)}}}tp_inst._defaults.timezoneList=timezoneList;tp_inst.timezone=tp_inst._defaults.timezone!==null?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):((new Date()).getTimezoneOffset()*-1);tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour;tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute;tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second;tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec;tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec;tp_inst.ampm="";tp_inst.$input=$input;if(tp_inst._defaults.altField){tp_inst.$altInput=$(tp_inst._defaults.altField).css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})}if(tp_inst._defaults.minDate===0||tp_inst._defaults.minDateTime===0){tp_inst._defaults.minDate=new Date()}if(tp_inst._defaults.maxDate===0||tp_inst._defaults.maxDateTime===0){tp_inst._defaults.maxDate=new Date()}if(tp_inst._defaults.minDate!==undefined&&tp_inst._defaults.minDate instanceof Date){tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())}if(tp_inst._defaults.minDateTime!==undefined&&tp_inst._defaults.minDateTime instanceof Date){tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())}if(tp_inst._defaults.maxDate!==undefined&&tp_inst._defaults.maxDate instanceof Date){tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())}if(tp_inst._defaults.maxDateTime!==undefined&&tp_inst._defaults.maxDateTime instanceof Date){tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())}tp_inst.$input.bind("focus",function(){tp_inst._onFocus()});return tp_inst},_addTimePicker:function(dp_inst){var currDT=(this.$altInput&&this._defaults.altFieldTimeOnly)?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(currDT);this._limitMinMaxDateTime(dp_inst,false);this._injectTimePicker()},_parseTime:function(timeString,withDate){if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}if(withDate||!this._defaults.timeOnly){var dp_dateFormat=$.datepicker._get(this.inst,"dateFormat");try{var parseRes=parseDateTimeInternal(dp_dateFormat,this._defaults.timeFormat,timeString,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!parseRes.timeObj){return false}$.extend(this,parseRes.timeObj)}catch(err){$.timepicker.log("Error parsing the date/time string: "+err+"\ndate/time string = "+timeString+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+dp_dateFormat);return false}return true}else{var timeObj=$.datepicker.parseTime(this._defaults.timeFormat,timeString,this._defaults);if(!timeObj){return false}$.extend(this,timeObj);return true}},_injectTimePicker:function(){var $dp=this.inst.dpDiv,o=this.inst.settings,tp_inst=this,litem="",uitem="",show=null,max={},gridSize={},size=null,i=0,l=0;if($dp.find("div.ui-timepicker-div").length===0&&o.showTimepicker){var noDisplay=' style="display:none;"',html='<div class="ui-timepicker-div'+(o.isRTL?" ui-timepicker-rtl":"")+'"><dl><dt class="ui_tpicker_time_label"'+((o.showTime)?"":noDisplay)+">"+o.timeText+'</dt><dd class="ui_tpicker_time"'+((o.showTime)?"":noDisplay)+"></dd>";for(i=0,l=this.units.length;i<l;i++){litem=this.units[i];uitem=litem.substr(0,1).toUpperCase()+litem.substr(1);show=o["show"+uitem]!==null?o["show"+uitem]:this.support[litem];max[litem]=parseInt((o[litem+"Max"]-((o[litem+"Max"]-o[litem+"Min"])%o["step"+uitem])),10);gridSize[litem]=0;html+='<dt class="ui_tpicker_'+litem+'_label"'+(show?"":noDisplay)+">"+o[litem+"Text"]+'</dt><dd class="ui_tpicker_'+litem+'"><div class="ui_tpicker_'+litem+'_slider"'+(show?"":noDisplay)+"></div>";if(show&&o[litem+"Grid"]>0){html+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';if(litem==="hour"){for(var h=o[litem+"Min"];h<=max[litem];h+=parseInt(o[litem+"Grid"],10)){gridSize[litem]++;var tmph=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},o);html+='<td data-for="'+litem+'">'+tmph+"</td>"}}else{for(var m=o[litem+"Min"];m<=max[litem];m+=parseInt(o[litem+"Grid"],10)){gridSize[litem]++;html+='<td data-for="'+litem+'">'+((m<10)?"0":"")+m+"</td>"}}html+="</tr></table></div>"}html+="</dd>"}var showTz=o.showTimezone!==null?o.showTimezone:this.support.timezone;html+='<dt class="ui_tpicker_timezone_label"'+(showTz?"":noDisplay)+">"+o.timezoneText+"</dt>";html+='<dd class="ui_tpicker_timezone" '+(showTz?"":noDisplay)+"></dd>";html+="</dl></div>";var $tp=$(html);if(o.timeOnly===true){$tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+o.timeOnlyTitle+"</div></div>");$dp.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()}for(i=0,l=tp_inst.units.length;i<l;i++){litem=tp_inst.units[i];uitem=litem.substr(0,1).toUpperCase()+litem.substr(1);show=o["show"+uitem]!==null?o["show"+uitem]:this.support[litem];tp_inst[litem+"_slider"]=tp_inst.control.create(tp_inst,$tp.find(".ui_tpicker_"+litem+"_slider"),litem,tp_inst[litem],o[litem+"Min"],max[litem],o["step"+uitem]);if(show&&o[litem+"Grid"]>0){size=100*gridSize[litem]*o[litem+"Grid"]/(max[litem]-o[litem+"Min"]);$tp.find(".ui_tpicker_"+litem+" table").css({width:size+"%",marginLeft:o.isRTL?"0":((size/(-2*gridSize[litem]))+"%"),marginRight:o.isRTL?((size/(-2*gridSize[litem]))+"%"):"0",borderCollapse:"collapse"}).find("td").click(function(e){var $t=$(this),h=$t.html(),n=parseInt(h.replace(/[^0-9]/g),10),ap=h.replace(/[^apm]/ig),f=$t.data("for");if(f==="hour"){if(ap.indexOf("p")!==-1&&n<12){n+=12}else{if(ap.indexOf("a")!==-1&&n===12){n=0}}}tp_inst.control.value(tp_inst,tp_inst[f+"_slider"],litem,n);tp_inst._onTimeChange();tp_inst._onSelectHandler()}).css({cursor:"pointer",width:(100/gridSize[litem])+"%",textAlign:"center",overflow:"hidden"})}}this.timezone_select=$tp.find(".ui_tpicker_timezone").append("<select></select>").find("select");$.fn.append.apply(this.timezone_select,$.map(o.timezoneList,function(val,idx){return $("<option />").val(typeof val==="object"?val.value:val).text(typeof val==="object"?val.label:val)}));if(typeof(this.timezone)!=="undefined"&&this.timezone!==null&&this.timezone!==""){var local_timezone=(new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12)).getTimezoneOffset()*-1;if(local_timezone===this.timezone){selectLocalTimezone(tp_inst)}else{this.timezone_select.val(this.timezone)}}else{if(typeof(this.hour)!=="undefined"&&this.hour!==null&&this.hour!==""){this.timezone_select.val(o.timezone)}else{selectLocalTimezone(tp_inst)}}this.timezone_select.change(function(){tp_inst._onTimeChange();tp_inst._onSelectHandler()});var $buttonPanel=$dp.find(".ui-datepicker-buttonpane");if($buttonPanel.length){$buttonPanel.before($tp)}else{$dp.append($tp)}this.$timeObj=$tp.find(".ui_tpicker_time");if(this.inst!==null){var timeDefined=this.timeDefined;this._onTimeChange();this.timeDefined=timeDefined}if(this._defaults.addSliderAccess){var sliderAccessArgs=this._defaults.sliderAccessArgs,rtl=this._defaults.isRTL;sliderAccessArgs.isRTL=rtl;setTimeout(function(){if($tp.find(".ui-slider-access").length===0){$tp.find(".ui-slider:visible").sliderAccess(sliderAccessArgs);var sliderAccessWidth=$tp.find(".ui-slider-access:eq(0)").outerWidth(true);if(sliderAccessWidth){$tp.find("table:visible").each(function(){var $g=$(this),oldWidth=$g.outerWidth(),oldMarginLeft=$g.css(rtl?"marginRight":"marginLeft").toString().replace("%",""),newWidth=oldWidth-sliderAccessWidth,newMarginLeft=((oldMarginLeft*newWidth)/oldWidth)+"%",css={width:newWidth,marginRight:0,marginLeft:0};css[rtl?"marginRight":"marginLeft"]=newMarginLeft;$g.css(css)})}}},10)}tp_inst._limitMinMaxDateTime(this.inst,true)}},_limitMinMaxDateTime:function(dp_inst,adjustSliders){var o=this._defaults,dp_date=new Date(dp_inst.selectedYear,dp_inst.selectedMonth,dp_inst.selectedDay);if(!this._defaults.showTimepicker){return}if($.datepicker._get(dp_inst,"minDateTime")!==null&&$.datepicker._get(dp_inst,"minDateTime")!==undefined&&dp_date){var minDateTime=$.datepicker._get(dp_inst,"minDateTime"),minDateTimeDate=new Date(minDateTime.getFullYear(),minDateTime.getMonth(),minDateTime.getDate(),0,0,0,0);if(this.hourMinOriginal===null||this.minuteMinOriginal===null||this.secondMinOriginal===null||this.millisecMinOriginal===null||this.microsecMinOriginal===null){this.hourMinOriginal=o.hourMin;this.minuteMinOriginal=o.minuteMin;this.secondMinOriginal=o.secondMin;this.millisecMinOriginal=o.millisecMin;this.microsecMinOriginal=o.microsecMin}if(dp_inst.settings.timeOnly||minDateTimeDate.getTime()===dp_date.getTime()){this._defaults.hourMin=minDateTime.getHours();if(this.hour<=this._defaults.hourMin){this.hour=this._defaults.hourMin;this._defaults.minuteMin=minDateTime.getMinutes();if(this.minute<=this._defaults.minuteMin){this.minute=this._defaults.minuteMin;this._defaults.secondMin=minDateTime.getSeconds();if(this.second<=this._defaults.secondMin){this.second=this._defaults.secondMin;this._defaults.millisecMin=minDateTime.getMilliseconds();if(this.millisec<=this._defaults.millisecMin){this.millisec=this._defaults.millisecMin;this._defaults.microsecMin=minDateTime.getMicroseconds()}else{if(this.microsec<this._defaults.microsecMin){this.microsec=this._defaults.microsecMin}this._defaults.microsecMin=this.microsecMinOriginal}}else{this._defaults.millisecMin=this.millisecMinOriginal;this._defaults.microsecMin=this.microsecMinOriginal}}else{this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal;this._defaults.microsecMin=this.microsecMinOriginal}}else{this._defaults.minuteMin=this.minuteMinOriginal;this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal;this._defaults.microsecMin=this.microsecMinOriginal}}else{this._defaults.hourMin=this.hourMinOriginal;this._defaults.minuteMin=this.minuteMinOriginal;this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal;this._defaults.microsecMin=this.microsecMinOriginal}}if($.datepicker._get(dp_inst,"maxDateTime")!==null&&$.datepicker._get(dp_inst,"maxDateTime")!==undefined&&dp_date){var maxDateTime=$.datepicker._get(dp_inst,"maxDateTime"),maxDateTimeDate=new Date(maxDateTime.getFullYear(),maxDateTime.getMonth(),maxDateTime.getDate(),0,0,0,0);if(this.hourMaxOriginal===null||this.minuteMaxOriginal===null||this.secondMaxOriginal===null||this.millisecMaxOriginal===null){this.hourMaxOriginal=o.hourMax;this.minuteMaxOriginal=o.minuteMax;this.secondMaxOriginal=o.secondMax;this.millisecMaxOriginal=o.millisecMax;this.microsecMaxOriginal=o.microsecMax}if(dp_inst.settings.timeOnly||maxDateTimeDate.getTime()===dp_date.getTime()){this._defaults.hourMax=maxDateTime.getHours();if(this.hour>=this._defaults.hourMax){this.hour=this._defaults.hourMax;this._defaults.minuteMax=maxDateTime.getMinutes();if(this.minute>=this._defaults.minuteMax){this.minute=this._defaults.minuteMax;this._defaults.secondMax=maxDateTime.getSeconds();if(this.second>=this._defaults.secondMax){this.second=this._defaults.secondMax;this._defaults.millisecMax=maxDateTime.getMilliseconds();if(this.millisec>=this._defaults.millisecMax){this.millisec=this._defaults.millisecMax;this._defaults.microsecMax=maxDateTime.getMicroseconds()}else{if(this.microsec>this._defaults.microsecMax){this.microsec=this._defaults.microsecMax}this._defaults.microsecMax=this.microsecMaxOriginal}}else{this._defaults.millisecMax=this.millisecMaxOriginal;this._defaults.microsecMax=this.microsecMaxOriginal}}else{this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal;this._defaults.microsecMax=this.microsecMaxOriginal}}else{this._defaults.minuteMax=this.minuteMaxOriginal;this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal;this._defaults.microsecMax=this.microsecMaxOriginal}}else{this._defaults.hourMax=this.hourMaxOriginal;this._defaults.minuteMax=this.minuteMaxOriginal;this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal;this._defaults.microsecMax=this.microsecMaxOriginal}}if(adjustSliders!==undefined&&adjustSliders===true){var hourMax=parseInt((this._defaults.hourMax-((this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour)),10),minMax=parseInt((this._defaults.minuteMax-((this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute)),10),secMax=parseInt((this._defaults.secondMax-((this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond)),10),millisecMax=parseInt((this._defaults.millisecMax-((this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec)),10),microsecMax=parseInt((this._defaults.microsecMax-((this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec)),10);if(this.hour_slider){this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:hourMax});this.control.value(this,this.hour_slider,"hour",this.hour-(this.hour%this._defaults.stepHour))}if(this.minute_slider){this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:minMax});this.control.value(this,this.minute_slider,"minute",this.minute-(this.minute%this._defaults.stepMinute))}if(this.second_slider){this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:secMax});this.control.value(this,this.second_slider,"second",this.second-(this.second%this._defaults.stepSecond))}if(this.millisec_slider){this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:millisecMax});this.control.value(this,this.millisec_slider,"millisec",this.millisec-(this.millisec%this._defaults.stepMillisec))}if(this.microsec_slider){this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:microsecMax});this.control.value(this,this.microsec_slider,"microsec",this.microsec-(this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(!this._defaults.showTimepicker){return}var hour=(this.hour_slider)?this.control.value(this,this.hour_slider,"hour"):false,minute=(this.minute_slider)?this.control.value(this,this.minute_slider,"minute"):false,second=(this.second_slider)?this.control.value(this,this.second_slider,"second"):false,millisec=(this.millisec_slider)?this.control.value(this,this.millisec_slider,"millisec"):false,microsec=(this.microsec_slider)?this.control.value(this,this.microsec_slider,"microsec"):false,timezone=(this.timezone_select)?this.timezone_select.val():false,o=this._defaults,pickerTimeFormat=o.pickerTimeFormat||o.timeFormat,pickerTimeSuffix=o.pickerTimeSuffix||o.timeSuffix;if(typeof(hour)==="object"){hour=false}if(typeof(minute)==="object"){minute=false}if(typeof(second)==="object"){second=false}if(typeof(millisec)==="object"){millisec=false}if(typeof(microsec)==="object"){microsec=false}if(typeof(timezone)==="object"){timezone=false}if(hour!==false){hour=parseInt(hour,10)}if(minute!==false){minute=parseInt(minute,10)}if(second!==false){second=parseInt(second,10)}if(millisec!==false){millisec=parseInt(millisec,10)}if(microsec!==false){microsec=parseInt(microsec,10)}if(timezone!==false){timezone=timezone.toString()}var ampm=o[hour<12?"amNames":"pmNames"][0];var hasChanged=(hour!==parseInt(this.hour,10)||minute!==parseInt(this.minute,10)||second!==parseInt(this.second,10)||millisec!==parseInt(this.millisec,10)||microsec!==parseInt(this.microsec,10)||(this.ampm.length>0&&(hour<12)!==($.inArray(this.ampm.toUpperCase(),this.amNames)!==-1))||(this.timezone!==null&&timezone!==this.timezone.toString()));if(hasChanged){if(hour!==false){this.hour=hour}if(minute!==false){this.minute=minute}if(second!==false){this.second=second}if(millisec!==false){this.millisec=millisec}if(microsec!==false){this.microsec=microsec}if(timezone!==false){this.timezone=timezone}if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}this._limitMinMaxDateTime(this.inst,true)}if(this.support.ampm){this.ampm=ampm}this.formattedTime=$.datepicker.formatTime(o.timeFormat,this,o);if(this.$timeObj){if(pickerTimeFormat===o.timeFormat){this.$timeObj.text(this.formattedTime+pickerTimeSuffix)}else{this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat,this,o)+pickerTimeSuffix)}}this.timeDefined=true;if(hasChanged){this._updateDateTime();this.$input.focus()}},_onSelectHandler:function(){var onSelect=this._defaults.onSelect||this.inst.settings.onSelect;var inputEl=this.$input?this.$input[0]:null;if(onSelect&&inputEl){onSelect.apply(inputEl,[this.formattedDateTime,this])}},_updateDateTime:function(dp_inst){dp_inst=this.inst||dp_inst;var dtTmp=(dp_inst.currentYear>0?new Date(dp_inst.currentYear,dp_inst.currentMonth,dp_inst.currentDay):new Date(dp_inst.selectedYear,dp_inst.selectedMonth,dp_inst.selectedDay)),dt=$.datepicker._daylightSavingAdjust(dtTmp),dateFmt=$.datepicker._get(dp_inst,"dateFormat"),formatCfg=$.datepicker._getFormatConfig(dp_inst),timeAvailable=dt!==null&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(dateFmt,(dt===null?new Date():dt),formatCfg);var formattedDateTime=this.formattedDate;if(dp_inst.lastVal===""){dp_inst.currentYear=dp_inst.selectedYear;dp_inst.currentMonth=dp_inst.selectedMonth;dp_inst.currentDay=dp_inst.selectedDay}if(this._defaults.timeOnly===true){formattedDateTime=this.formattedTime}else{if(this._defaults.timeOnly!==true&&(this._defaults.alwaysSetTime||timeAvailable)){formattedDateTime+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix}}this.formattedDateTime=formattedDateTime;if(!this._defaults.showTimepicker){this.$input.val(this.formattedDate)}else{if(this.$altInput&&this._defaults.timeOnly===false&&this._defaults.altFieldTimeOnly===true){this.$altInput.val(this.formattedTime);this.$input.val(this.formattedDate)}else{if(this.$altInput){this.$input.val(formattedDateTime);var altFormattedDateTime="",altSeparator=this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,altTimeSuffix=this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;if(!this._defaults.timeOnly){if(this._defaults.altFormat){altFormattedDateTime=$.datepicker.formatDate(this._defaults.altFormat,(dt===null?new Date():dt),formatCfg)}else{altFormattedDateTime=this.formattedDate}if(altFormattedDateTime){altFormattedDateTime+=altSeparator}}if(this._defaults.altTimeFormat){altFormattedDateTime+=$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+altTimeSuffix}else{altFormattedDateTime+=this.formattedTime+altTimeSuffix}this.$altInput.val(altFormattedDateTime)}else{this.$input.val(formattedDateTime)}}}this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var inst=$.datepicker._getInst(this.$input.get(0)),tp_inst=$.datepicker._get(inst,"timepicker");if(tp_inst){if(tp_inst._defaults.timeOnly&&(inst.input.val()!==inst.lastVal)){try{$.datepicker._updateDatepicker(inst)}catch(err){$.timepicker.log(err)}}}}},_controls:{slider:{create:function(tp_inst,obj,unit,val,min,max,step){var rtl=tp_inst._defaults.isRTL;return obj.prop("slide",null).slider({orientation:"horizontal",value:rtl?val*-1:val,min:rtl?max*-1:min,max:rtl?min*-1:max,step:step,slide:function(event,ui){tp_inst.control.value(tp_inst,$(this),unit,rtl?ui.value*-1:ui.value);tp_inst._onTimeChange()},stop:function(event,ui){tp_inst._onSelectHandler()}})},options:function(tp_inst,obj,unit,opts,val){if(tp_inst._defaults.isRTL){if(typeof(opts)==="string"){if(opts==="min"||opts==="max"){if(val!==undefined){return obj.slider(opts,val*-1)}return Math.abs(obj.slider(opts))}return obj.slider(opts)}var min=opts.min,max=opts.max;opts.min=opts.max=null;if(min!==undefined){opts.max=min*-1}if(max!==undefined){opts.min=max*-1}return obj.slider(opts)}if(typeof(opts)==="string"&&val!==undefined){return obj.slider(opts,val)}return obj.slider(opts)},value:function(tp_inst,obj,unit,val){if(tp_inst._defaults.isRTL){if(val!==undefined){return obj.slider("value",val*-1)}return Math.abs(obj.slider("value"))}if(val!==undefined){return obj.slider("value",val)}return obj.slider("value")}},select:{create:function(tp_inst,obj,unit,val,min,max,step){var sel='<select class="ui-timepicker-select" data-unit="'+unit+'" data-min="'+min+'" data-max="'+max+'" data-step="'+step+'">',format=tp_inst._defaults.pickerTimeFormat||tp_inst._defaults.timeFormat;for(var i=min;i<=max;i+=step){sel+='<option value="'+i+'"'+(i===val?" selected":"")+">";if(unit==="hour"){sel+=$.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig,"")),{hour:i},tp_inst._defaults)}else{if(unit==="millisec"||unit==="microsec"||i>=10){sel+=i}else{sel+="0"+i.toString()}}sel+="</option>"}sel+="</select>";obj.children("select").remove();$(sel).appendTo(obj).change(function(e){tp_inst._onTimeChange();tp_inst._onSelectHandler()});return obj},options:function(tp_inst,obj,unit,opts,val){var o={},$t=obj.children("select");if(typeof(opts)==="string"){if(val===undefined){return $t.data(opts)}o[opts]=val}else{o=opts}return tp_inst.control.create(tp_inst,obj,$t.data("unit"),$t.val(),o.min||$t.data("min"),o.max||$t.data("max"),o.step||$t.data("step"))},value:function(tp_inst,obj,unit,val){var $t=obj.children("select");if(val!==undefined){return $t.val(val)}return $t.val()}}}});$.fn.extend({timepicker:function(o){o=o||{};var tmp_args=Array.prototype.slice.call(arguments);if(typeof o==="object"){tmp_args[0]=$.extend(o,{timeOnly:true})}return $(this).each(function(){$.fn.datetimepicker.apply($(this),tmp_args)})},datetimepicker:function(o){o=o||{};var tmp_args=arguments;if(typeof(o)==="string"){if(o==="getDate"){return $.fn.datepicker.apply($(this[0]),tmp_args)}else{return this.each(function(){var $t=$(this);$t.datepicker.apply($t,tmp_args)})}}else{return this.each(function(){var $t=$(this);$t.datepicker($.timepicker._newInst($t,o)._defaults)})}}});$.datepicker.parseDateTime=function(dateFormat,timeFormat,dateTimeString,dateSettings,timeSettings){var parseRes=parseDateTimeInternal(dateFormat,timeFormat,dateTimeString,dateSettings,timeSettings);if(parseRes.timeObj){var t=parseRes.timeObj;parseRes.date.setHours(t.hour,t.minute,t.second,t.millisec);parseRes.date.setMicroseconds(t.microsec)}return parseRes.date};$.datepicker.parseTime=function(timeFormat,timeString,options){var o=extendRemove(extendRemove({},$.timepicker._defaults),options||{}),iso8601=(timeFormat.replace(/\'.*?\'/g,"").indexOf("Z")!==-1);var strictParse=function(f,s,o){var getPatternAmpm=function(amNames,pmNames){var markers=[];if(amNames){$.merge(markers,amNames)}if(pmNames){$.merge(markers,pmNames)}markers=$.map(markers,function(val){return val.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")});return"("+markers.join("|")+")?"};var getFormatPositions=function(timeFormat){var finds=timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),orders={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(finds){for(var i=0;i<finds.length;i++){if(orders[finds[i].toString().charAt(0)]===-1){orders[finds[i].toString().charAt(0)]=i+1}}}return orders};var regstr="^"+f.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(match){var ml=match.length;switch(match.charAt(0).toLowerCase()){case"h":return ml===1?"(\\d?\\d)":"(\\d{"+ml+"})";case"m":return ml===1?"(\\d?\\d)":"(\\d{"+ml+"})";case"s":return ml===1?"(\\d?\\d)":"(\\d{"+ml+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return getPatternAmpm(o.amNames,o.pmNames);default:return"("+match.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(m){return"\\"+m})+")?"}}).replace(/\s/g,"\\s?")+o.timeSuffix+"$",order=getFormatPositions(f),ampm="",treg;treg=s.match(new RegExp(regstr,"i"));var resTime={hour:0,minute:0,second:0,millisec:0,microsec:0};if(treg){if(order.t!==-1){if(treg[order.t]===undefined||treg[order.t].length===0){ampm="";resTime.ampm=""}else{ampm=$.inArray(treg[order.t].toUpperCase(),o.amNames)!==-1?"AM":"PM";resTime.ampm=o[ampm==="AM"?"amNames":"pmNames"][0]}}if(order.h!==-1){if(ampm==="AM"&&treg[order.h]==="12"){resTime.hour=0}else{if(ampm==="PM"&&treg[order.h]!=="12"){resTime.hour=parseInt(treg[order.h],10)+12}else{resTime.hour=Number(treg[order.h])}}}if(order.m!==-1){resTime.minute=Number(treg[order.m])}if(order.s!==-1){resTime.second=Number(treg[order.s])}if(order.l!==-1){resTime.millisec=Number(treg[order.l])}if(order.c!==-1){resTime.microsec=Number(treg[order.c])}if(order.z!==-1&&treg[order.z]!==undefined){resTime.timezone=$.timepicker.timezoneOffsetNumber(treg[order.z])}return resTime}return false};var looseParse=function(f,s,o){try{var d=new Date("2012-01-01 "+s);if(isNaN(d.getTime())){d=new Date("2012-01-01T"+s);if(isNaN(d.getTime())){d=new Date("01/01/2012 "+s);if(isNaN(d.getTime())){throw"Unable to parse time with native Date: "+s}}}return{hour:d.getHours(),minute:d.getMinutes(),second:d.getSeconds(),millisec:d.getMilliseconds(),microsec:d.getMicroseconds(),timezone:d.getTimezoneOffset()*-1}}catch(err){try{return strictParse(f,s,o)}catch(err2){$.timepicker.log("Unable to parse \ntimeString: "+s+"\ntimeFormat: "+f)}}return false};if(typeof o.parse==="function"){return o.parse(timeFormat,timeString,o)}if(o.parse==="loose"){return looseParse(timeFormat,timeString,o)}return strictParse(timeFormat,timeString,o)};$.datepicker.formatTime=function(format,time,options){options=options||{};options=$.extend({},$.timepicker._defaults,options);time=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},time);var tmptime=format,ampmName=options.amNames[0],hour=parseInt(time.hour,10);if(hour>11){ampmName=options.pmNames[0]}tmptime=tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(match){switch(match){case"HH":return("0"+hour).slice(-2);case"H":return hour;case"hh":return("0"+convert24to12(hour)).slice(-2);case"h":return convert24to12(hour);case"mm":return("0"+time.minute).slice(-2);case"m":return time.minute;case"ss":return("0"+time.second).slice(-2);case"s":return time.second;case"l":return("00"+time.millisec).slice(-3);case"c":return("00"+time.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(time.timezone===null?options.timezone:time.timezone,false);case"Z":return $.timepicker.timezoneOffsetString(time.timezone===null?options.timezone:time.timezone,true);case"T":return ampmName.charAt(0).toUpperCase();case"TT":return ampmName.toUpperCase();case"t":return ampmName.charAt(0).toLowerCase();case"tt":return ampmName.toLowerCase();default:return match.replace(/'/g,"")}});return tmptime};$.datepicker._base_selectDate=$.datepicker._selectDate;$.datepicker._selectDate=function(id,dateStr){var inst=this._getInst($(id)[0]),tp_inst=this._get(inst,"timepicker");if(tp_inst){tp_inst._limitMinMaxDateTime(inst,true);inst.inline=inst.stay_open=true;this._base_selectDate(id,dateStr);inst.inline=inst.stay_open=false;this._notifyChange(inst);this._updateDatepicker(inst)}else{this._base_selectDate(id,dateStr)}};$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker;$.datepicker._updateDatepicker=function(inst){var input=inst.input[0];if($.datepicker._curInst&&$.datepicker._curInst!==inst&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==input){return}if(typeof(inst.stay_open)!=="boolean"||inst.stay_open===false){this._base_updateDatepicker(inst);var tp_inst=this._get(inst,"timepicker");if(tp_inst){tp_inst._addTimePicker(inst)}}};$.datepicker._base_doKeyPress=$.datepicker._doKeyPress;$.datepicker._doKeyPress=function(event){var inst=$.datepicker._getInst(event.target),tp_inst=$.datepicker._get(inst,"timepicker");if(tp_inst){if($.datepicker._get(inst,"constrainInput")){var ampm=tp_inst.support.ampm,tz=tp_inst._defaults.showTimezone!==null?tp_inst._defaults.showTimezone:tp_inst.support.timezone,dateChars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat")),datetimeChars=tp_inst._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,ampm?"APM":"").replace(/Tt/g,ampm?"AaPpMm":"").replace(/tT/g,ampm?"AaPpMm":"").replace(/T/g,ampm?"AP":"").replace(/tt/g,ampm?"apm":"").replace(/t/g,ampm?"ap":"")+" "+tp_inst._defaults.separator+tp_inst._defaults.timeSuffix+(tz?tp_inst._defaults.timezoneList.join(""):"")+(tp_inst._defaults.amNames.join(""))+(tp_inst._defaults.pmNames.join(""))+dateChars,chr=String.fromCharCode(event.charCode===undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!dateChars||datetimeChars.indexOf(chr)>-1)}}return $.datepicker._base_doKeyPress(event)};$.datepicker._base_updateAlternate=$.datepicker._updateAlternate;$.datepicker._updateAlternate=function(inst){var tp_inst=this._get(inst,"timepicker");if(tp_inst){var altField=tp_inst._defaults.altField;if(altField){var altFormat=tp_inst._defaults.altFormat||tp_inst._defaults.dateFormat,date=this._getDate(inst),formatCfg=$.datepicker._getFormatConfig(inst),altFormattedDateTime="",altSeparator=tp_inst._defaults.altSeparator?tp_inst._defaults.altSeparator:tp_inst._defaults.separator,altTimeSuffix=tp_inst._defaults.altTimeSuffix?tp_inst._defaults.altTimeSuffix:tp_inst._defaults.timeSuffix,altTimeFormat=tp_inst._defaults.altTimeFormat!==null?tp_inst._defaults.altTimeFormat:tp_inst._defaults.timeFormat;altFormattedDateTime+=$.datepicker.formatTime(altTimeFormat,tp_inst,tp_inst._defaults)+altTimeSuffix;if(!tp_inst._defaults.timeOnly&&!tp_inst._defaults.altFieldTimeOnly&&date!==null){if(tp_inst._defaults.altFormat){altFormattedDateTime=$.datepicker.formatDate(tp_inst._defaults.altFormat,date,formatCfg)+altSeparator+altFormattedDateTime}else{altFormattedDateTime=tp_inst.formattedDate+altSeparator+altFormattedDateTime}}$(altField).val(altFormattedDateTime)}}else{$.datepicker._base_updateAlternate(inst)}};$.datepicker._base_doKeyUp=$.datepicker._doKeyUp;$.datepicker._doKeyUp=function(event){var inst=$.datepicker._getInst(event.target),tp_inst=$.datepicker._get(inst,"timepicker");if(tp_inst){if(tp_inst._defaults.timeOnly&&(inst.input.val()!==inst.lastVal)){try{$.datepicker._updateDatepicker(inst)}catch(err){$.timepicker.log(err)}}}return $.datepicker._base_doKeyUp(event)};$.datepicker._base_gotoToday=$.datepicker._gotoToday;$.datepicker._gotoToday=function(id){var inst=this._getInst($(id)[0]),$dp=inst.dpDiv;this._base_gotoToday(id);var tp_inst=this._get(inst,"timepicker");selectLocalTimezone(tp_inst);var now=new Date();this._setTime(inst,now);$(".ui-datepicker-today",$dp).click()};$.datepicker._disableTimepickerDatepicker=function(target){var inst=this._getInst(target);if(!inst){return}var tp_inst=this._get(inst,"timepicker");$(target).datepicker("getDate");if(tp_inst){inst.settings.showTimepicker=false;tp_inst._defaults.showTimepicker=false;tp_inst._updateDateTime(inst)}};$.datepicker._enableTimepickerDatepicker=function(target){var inst=this._getInst(target);if(!inst){return}var tp_inst=this._get(inst,"timepicker");$(target).datepicker("getDate");if(tp_inst){inst.settings.showTimepicker=true;tp_inst._defaults.showTimepicker=true;tp_inst._addTimePicker(inst);tp_inst._updateDateTime(inst)}};$.datepicker._setTime=function(inst,date){var tp_inst=this._get(inst,"timepicker");if(tp_inst){var defaults=tp_inst._defaults;tp_inst.hour=date?date.getHours():defaults.hour;tp_inst.minute=date?date.getMinutes():defaults.minute;tp_inst.second=date?date.getSeconds():defaults.second;tp_inst.millisec=date?date.getMilliseconds():defaults.millisec;tp_inst.microsec=date?date.getMicroseconds():defaults.microsec;tp_inst._limitMinMaxDateTime(inst,true);tp_inst._onTimeChange();tp_inst._updateDateTime(inst)}};$.datepicker._setTimeDatepicker=function(target,date,withDate){var inst=this._getInst(target);if(!inst){return}var tp_inst=this._get(inst,"timepicker");if(tp_inst){this._setDateFromField(inst);var tp_date;if(date){if(typeof date==="string"){tp_inst._parseTime(date,withDate);tp_date=new Date();tp_date.setHours(tp_inst.hour,tp_inst.minute,tp_inst.second,tp_inst.millisec);tp_date.setMicroseconds(tp_inst.microsec)}else{tp_date=new Date(date.getTime());tp_date.setMicroseconds(date.getMicroseconds())}if(tp_date.toString()==="Invalid Date"){tp_date=undefined}this._setTime(inst,tp_date)}}};$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker;$.datepicker._setDateDatepicker=function(target,date){var inst=this._getInst(target);if(!inst){return}if(typeof(date)==="string"){date=new Date(date);if(!date.getTime()){$.timepicker.log("Error creating Date object from string.")}}var tp_inst=this._get(inst,"timepicker");var tp_date;if(date instanceof Date){tp_date=new Date(date.getTime());tp_date.setMicroseconds(date.getMicroseconds())}else{tp_date=date}if(tp_inst&&tp_date){if(!tp_inst.support.timezone&&tp_inst._defaults.timezone===null){tp_inst.timezone=tp_date.getTimezoneOffset()*-1}date=$.timepicker.timezoneAdjust(date,tp_inst.timezone);tp_date=$.timepicker.timezoneAdjust(tp_date,tp_inst.timezone)}this._updateDatepicker(inst);this._base_setDateDatepicker.apply(this,arguments);this._setTimeDatepicker(target,tp_date,true)};$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker;$.datepicker._getDateDatepicker=function(target,noDefault){var inst=this._getInst(target);if(!inst){return}var tp_inst=this._get(inst,"timepicker");if(tp_inst){if(inst.lastVal===undefined){this._setDateFromField(inst,noDefault)}var date=this._getDate(inst);if(date&&tp_inst._parseTime($(target).val(),tp_inst.timeOnly)){date.setHours(tp_inst.hour,tp_inst.minute,tp_inst.second,tp_inst.millisec);date.setMicroseconds(tp_inst.microsec);if(tp_inst.timezone!=null){if(!tp_inst.support.timezone&&tp_inst._defaults.timezone===null){tp_inst.timezone=date.getTimezoneOffset()*-1}date=$.timepicker.timezoneAdjust(date,tp_inst.timezone)}}return date}return this._base_getDateDatepicker(target,noDefault)};$.datepicker._base_parseDate=$.datepicker.parseDate;$.datepicker.parseDate=function(format,value,settings){var date;try{date=this._base_parseDate(format,value,settings)}catch(err){if(err.indexOf(":")>=0){date=this._base_parseDate(format,value.substring(0,value.length-(err.length-err.indexOf(":")-2)),settings);$.timepicker.log("Error parsing the date string: "+err+"\ndate string = "+value+"\ndate format = "+format)}else{throw err}}return date};$.datepicker._base_formatDate=$.datepicker._formatDate;$.datepicker._formatDate=function(inst,day,month,year){var tp_inst=this._get(inst,"timepicker");if(tp_inst){tp_inst._updateDateTime(inst);return tp_inst.$input.val()}return this._base_formatDate(inst)};$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker;$.datepicker._optionDatepicker=function(target,name,value){var inst=this._getInst(target),name_clone;if(!inst){return null}var tp_inst=this._get(inst,"timepicker");if(tp_inst){var min=null,max=null,onselect=null,overrides=tp_inst._defaults.evnts,fns={},prop;if(typeof name==="string"){if(name==="minDate"||name==="minDateTime"){min=value}else{if(name==="maxDate"||name==="maxDateTime"){max=value}else{if(name==="onSelect"){onselect=value}else{if(overrides.hasOwnProperty(name)){if(typeof(value)==="undefined"){return overrides[name]}fns[name]=value;name_clone={}}}}}}else{if(typeof name==="object"){if(name.minDate){min=name.minDate}else{if(name.minDateTime){min=name.minDateTime}else{if(name.maxDate){max=name.maxDate}else{if(name.maxDateTime){max=name.maxDateTime}}}}for(prop in overrides){if(overrides.hasOwnProperty(prop)&&name[prop]){fns[prop]=name[prop]}}}}for(prop in fns){if(fns.hasOwnProperty(prop)){overrides[prop]=fns[prop];if(!name_clone){name_clone=$.extend({},name)}delete name_clone[prop]}}if(name_clone&&isEmptyObject(name_clone)){return}if(min){if(min===0){min=new Date()}else{min=new Date(min)}tp_inst._defaults.minDate=min;tp_inst._defaults.minDateTime=min}else{if(max){if(max===0){max=new Date()}else{max=new Date(max)}tp_inst._defaults.maxDate=max;tp_inst._defaults.maxDateTime=max}else{if(onselect){tp_inst._defaults.onSelect=onselect}}}}if(value===undefined){return this._base_optionDatepicker.call($.datepicker,target,name)}return this._base_optionDatepicker.call($.datepicker,target,name_clone||name,value)};var isEmptyObject=function(obj){var prop;for(prop in obj){if(obj.hasOwnProperty(prop)){return false}}return true};var extendRemove=function(target,props){$.extend(target,props);for(var name in props){if(props[name]===null||props[name]===undefined){target[name]=props[name]}}return target};var detectSupport=function(timeFormat){var tf=timeFormat.replace(/'.*?'/g,"").toLowerCase(),isIn=function(f,t){return f.indexOf(t)!==-1?true:false};return{hour:isIn(tf,"h"),minute:isIn(tf,"m"),second:isIn(tf,"s"),millisec:isIn(tf,"l"),microsec:isIn(tf,"c"),timezone:isIn(tf,"z"),ampm:isIn(tf,"t")&&isIn(timeFormat,"h"),iso8601:isIn(timeFormat,"Z")}};var convert24to12=function(hour){hour%=12;if(hour===0){hour=12}return String(hour)};var computeEffectiveSetting=function(settings,property){return settings&&settings[property]?settings[property]:$.timepicker._defaults[property]};var splitDateTime=function(dateTimeString,timeSettings){var separator=computeEffectiveSetting(timeSettings,"separator"),format=computeEffectiveSetting(timeSettings,"timeFormat"),timeParts=format.split(separator),timePartsLen=timeParts.length,allParts=dateTimeString.split(separator),allPartsLen=allParts.length;if(allPartsLen>1){return{dateString:allParts.splice(0,allPartsLen-timePartsLen).join(separator),timeString:allParts.splice(0,timePartsLen).join(separator)}}return{dateString:dateTimeString,timeString:""}};var parseDateTimeInternal=function(dateFormat,timeFormat,dateTimeString,dateSettings,timeSettings){var date,parts,parsedTime;parts=splitDateTime(dateTimeString,timeSettings);date=$.datepicker._base_parseDate(dateFormat,parts.dateString,dateSettings);if(parts.timeString===""){return{date:date}}parsedTime=$.datepicker.parseTime(timeFormat,parts.timeString,timeSettings);if(!parsedTime){throw"Wrong time format"}return{date:date,timeObj:parsedTime}};var selectLocalTimezone=function(tp_inst,date){if(tp_inst&&tp_inst.timezone_select){var now=date||new Date();tp_inst.timezone_select.val(-now.getTimezoneOffset())}};$.timepicker=new Timepicker();$.timepicker.timezoneOffsetString=function(tzMinutes,iso8601){if(isNaN(tzMinutes)||tzMinutes>840||tzMinutes<-720){return tzMinutes}var off=tzMinutes,minutes=off%60,hours=(off-minutes)/60,iso=iso8601?":":"",tz=(off>=0?"+":"-")+("0"+Math.abs(hours)).slice(-2)+iso+("0"+Math.abs(minutes)).slice(-2);if(tz==="+00:00"){return"Z"}return tz};$.timepicker.timezoneOffsetNumber=function(tzString){var normalized=tzString.toString().replace(":","");if(normalized.toUpperCase()==="Z"){return 0}if(!/^(\-|\+)\d{4}$/.test(normalized)){return tzString}return((normalized.substr(0,1)==="-"?-1:1)*((parseInt(normalized.substr(1,2),10)*60)+parseInt(normalized.substr(3,2),10)))};$.timepicker.timezoneAdjust=function(date,toTimezone){var toTz=$.timepicker.timezoneOffsetNumber(toTimezone);if(!isNaN(toTz)){date.setMinutes(date.getMinutes()+-date.getTimezoneOffset()-toTz)}return date};$.timepicker.timeRange=function(startTime,endTime,options){return $.timepicker.handleRange("timepicker",startTime,endTime,options)};$.timepicker.datetimeRange=function(startTime,endTime,options){$.timepicker.handleRange("datetimepicker",startTime,endTime,options)};$.timepicker.dateRange=function(startTime,endTime,options){$.timepicker.handleRange("datepicker",startTime,endTime,options)};$.timepicker.handleRange=function(method,startTime,endTime,options){options=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},options);function checkDates(changed,other){var startdt=startTime[method]("getDate"),enddt=endTime[method]("getDate"),changeddt=changed[method]("getDate");if(startdt!==null){var minDate=new Date(startdt.getTime()),maxDate=new Date(startdt.getTime());minDate.setMilliseconds(minDate.getMilliseconds()+options.minInterval);maxDate.setMilliseconds(maxDate.getMilliseconds()+options.maxInterval);if(options.minInterval>0&&minDate>enddt){endTime[method]("setDate",minDate)}else{if(options.maxInterval>0&&maxDate<enddt){endTime[method]("setDate",maxDate)}else{if(startdt>enddt){other[method]("setDate",changeddt)}}}}}function selected(changed,other,option){if(!changed.val()){return}var date=changed[method].call(changed,"getDate");if(date!==null&&options.minInterval>0){if(option==="minDate"){date.setMilliseconds(date.getMilliseconds()+options.minInterval)}if(option==="maxDate"){date.setMilliseconds(date.getMilliseconds()-options.minInterval)}}if(date.getTime){other[method].call(other,"option",option,date)}}$.fn[method].call(startTime,$.extend({onClose:function(dateText,inst){checkDates($(this),endTime)},onSelect:function(selectedDateTime){selected($(this),endTime,"minDate")}},options,options.start));$.fn[method].call(endTime,$.extend({onClose:function(dateText,inst){checkDates($(this),startTime)},onSelect:function(selectedDateTime){selected($(this),startTime,"maxDate")}},options,options.end));checkDates(startTime,endTime);selected(startTime,endTime,"minDate");selected(endTime,startTime,"maxDate");return $([startTime.get(0),endTime.get(0)])};$.timepicker.log=function(err){if(window.console){window.console.log(err)}};$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal};if(!Date.prototype.getMicroseconds){Date.prototype.microseconds=0;Date.prototype.getMicroseconds=function(){return this.microseconds};Date.prototype.setMicroseconds=function(m){this.setMilliseconds(this.getMilliseconds()+Math.floor(m/1000));this.microseconds=m%1000;return this}}$.timepicker.version="1.4.3"})(jQuery);jQuery(function(A){A.datepicker.regional["zh-CN"]={closeText:"关闭",prevText:"&#x3c;上月",nextText:"下月&#x3e;",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一","二","三","四","五","六","七","八","九","十","十一","十二"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"yy-mm-dd",firstDay:1,isRTL:false,showMonthAfterYear:true,yearSuffix:"年"};A.datepicker.setDefaults(A.datepicker.regional["zh-CN"])});(function(A){A.timepicker.regional["zh-CN"]={timeOnlyTitle:"选择时间",timeText:"时间",hourText:"小时",minuteText:"分钟",secondText:"秒钟",millisecText:"微秒",timezoneText:"时区",currentText:"现在时间",closeText:"关闭",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:false};A.timepicker.setDefaults(A.timepicker.regional["zh-CN"])})(jQuery);