

/*
 jQuery UI - v1.10.4 - 2018-12-20
 http://jqueryui.com
 Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
 Copyright jQuery Foundation and other contributors; Licensed MIT */
(function(b,C){function e(a,c){var f=a.nodeName.toLowerCase();if("area"===f){c=a.parentNode;f=c.name;if(!a.href||!f||"map"!==c.nodeName.toLowerCase())return!1;a=b("img[usemap=#"+f+"]")[0];return!!a&&h(a)}return(/input|select|textarea|button|object/.test(f)?!a.disabled:"a"===f?a.href||c:c)&&h(a)}function h(a){return b.expr.filters.visible(a)&&!b(a).parents().addBack().filter(function(){return"hidden"===b.css(this,"visibility")}).length}var k=0,d=/^ui-id-\d+$/;b.ui=b.ui||{};b.extend(b.ui,{version:"1.10.4",
keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});b.fn.extend({focus:function(a){return function(c,f){return"number"===typeof c?this.each(function(){var g=this;setTimeout(function(){b(g).focus();f&&f.call(g)},c)}):a.apply(this,arguments)}}(b.fn.focus),scrollParent:function(){var a=b.ui.ie&&
/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(b.css(this,"position"))&&/(auto|scroll)/.test(b.css(this,"overflow")+b.css(this,"overflow-y")+b.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(b.css(this,"overflow")+b.css(this,"overflow-y")+b.css(this,"overflow-x"))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?b(document):a},zIndex:function(a){if(a!==
C)return this.css("zIndex",a);if(this.length){a=b(this[0]);for(var c;a.length&&a[0]!==document;){c=a.css("position");if("absolute"===c||"relative"===c||"fixed"===c)if(c=parseInt(a.css("zIndex"),10),!isNaN(c)&&0!==c)return c;a=a.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++k)})},removeUniqueId:function(){return this.each(function(){d.test(this.id)&&b(this).removeAttr("id")})}});b.extend(b.expr[":"],{data:b.expr.createPseudo?b.expr.createPseudo(function(a){return function(c){return!!b.data(c,
a)}}):function(a,c,f){return!!b.data(a,f[3])},focusable:function(a){return e(a,!isNaN(b.attr(a,"tabindex")))},tabbable:function(a){var c=b.attr(a,"tabindex"),f=isNaN(c);return(f||0<=c)&&e(a,!f)}});b("<a>").outerWidth(1).jquery||b.each(["Width","Height"],function(a,c){function f(q,u,m,p){b.each(g,function(){u-=parseFloat(b.css(q,"padding"+this))||0;m&&(u-=parseFloat(b.css(q,"border"+this+"Width"))||0);p&&(u-=parseFloat(b.css(q,"margin"+this))||0)});return u}var g="Width"===c?["Left","Right"]:["Top",
"Bottom"],l=c.toLowerCase(),n={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};b.fn["inner"+c]=function(q){return q===C?n["inner"+c].call(this):this.each(function(){b(this).css(l,f(this,q)+"px")})};b.fn["outer"+c]=function(q,u){return"number"!==typeof q?n["outer"+c].call(this,q):this.each(function(){b(this).css(l,f(this,q,!0,u)+"px")})}});b.fn.addBack||(b.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))});
b("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(b.fn.removeData=function(a){return function(c){return arguments.length?a.call(this,b.camelCase(c)):a.call(this)}}(b.fn.removeData));b.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());b.support.selectstart="onselectstart"in document.createElement("div");b.fn.extend({disableSelection:function(){return this.bind((b.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});
b.extend(b.ui,{plugin:{add:function(a,c,f){var g;a=b.ui[a].prototype;for(g in f)a.plugins[g]=a.plugins[g]||[],a.plugins[g].push([c,f[g]])},call:function(a,c,f){var g=a.plugins[c];if(g&&a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType)for(c=0;c<g.length;c++)a.options[g[c][0]]&&g[c][1].apply(a.element,f)}},hasScroll:function(a,c){if("hidden"===b(a).css("overflow"))return!1;c=c&&"left"===c?"scrollLeft":"scrollTop";if(0<a[c])return!0;a[c]=1;var f=0<a[c];a[c]=0;return f}})})(jQuery);
(function(b,C){var e=0,h=Array.prototype.slice,k=b.cleanData;b.cleanData=function(d){for(var a=0,c;null!=(c=d[a]);a++)try{b(c).triggerHandler("remove")}catch(f){}k(d)};b.widget=function(d,a,c){var f={},g=d.split(".")[0];d=d.split(".")[1];var l=g+"-"+d;c||(c=a,a=b.Widget);b.expr[":"][l.toLowerCase()]=function(m){return!!b.data(m,l)};b[g]=b[g]||{};var n=b[g][d];var q=b[g][d]=function(m,p){if(!this._createWidget)return new q(m,p);arguments.length&&this._createWidget(m,p)};b.extend(q,n,{version:c.version,
_proto:b.extend({},c),_childConstructors:[]});var u=new a;u.options=b.widget.extend({},u.options);b.each(c,function(m,p){b.isFunction(p)?f[m]=function(){var r=function(){return a.prototype[m].apply(this,arguments)},t=function(v){return a.prototype[m].apply(this,v)};return function(){var v=this._super,x=this._superApply;this._super=r;this._superApply=t;var w=p.apply(this,arguments);this._super=v;this._superApply=x;return w}}():f[m]=p});q.prototype=b.widget.extend(u,{widgetEventPrefix:n?u.widgetEventPrefix||
d:d},f,{constructor:q,namespace:g,widgetName:d,widgetFullName:l});n?(b.each(n._childConstructors,function(m,p){m=p.prototype;b.widget(m.namespace+"."+m.widgetName,q,p._proto)}),delete n._childConstructors):a._childConstructors.push(q);b.widget.bridge(d,q)};b.widget.extend=function(d){for(var a=h.call(arguments,1),c=0,f=a.length,g,l;c<f;c++)for(g in a[c])l=a[c][g],a[c].hasOwnProperty(g)&&l!==C&&(b.isPlainObject(l)?d[g]=b.isPlainObject(d[g])?b.widget.extend({},d[g],l):b.widget.extend({},l):d[g]=l);
return d};b.widget.bridge=function(d,a){var c=a.prototype.widgetFullName||d;b.fn[d]=function(f){var g="string"===typeof f,l=h.call(arguments,1),n=this;f=!g&&l.length?b.widget.extend.apply(null,[f].concat(l)):f;g?this.each(function(){var q=b.data(this,c);if(!q)return b.error("cannot call methods on "+d+" prior to initialization; attempted to call method '"+f+"'");if(!b.isFunction(q[f])||"_"===f.charAt(0))return b.error("no such method '"+f+"' for "+d+" widget instance");var u=q[f].apply(q,l);if(u!==
q&&u!==C)return n=u&&u.jquery?n.pushStack(u.get()):u,!1}):this.each(function(){var q=b.data(this,c);q?q.option(f||{})._init():b.data(this,c,new a(f,this))});return n}};b.Widget=function(){};b.Widget._childConstructors=[];b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(d,a){a=b(a||this.defaultElement||this)[0];this.element=b(a);this.uuid=e++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=b.widget.extend({},
this.options,this._getCreateOptions(),d);this.bindings=b();this.hoverable=b();this.focusable=b();a!==this&&(b.data(a,this.widgetFullName,this),this._on(!0,this.element,{remove:function(c){c.target===a&&this.destroy()}}),this.document=b(a.style?a.ownerDocument:a.document||a),this.window=b(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:b.noop,_getCreateEventData:b.noop,_create:b.noop,
_init:b.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(b.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:b.noop,widget:function(){return this.element},
option:function(d,a){var c=d,f;if(0===arguments.length)return b.widget.extend({},this.options);if("string"===typeof d){c={};var g=d.split(".");d=g.shift();if(g.length){var l=c[d]=b.widget.extend({},this.options[d]);for(f=0;f<g.length-1;f++)l[g[f]]=l[g[f]]||{},l=l[g[f]];d=g.pop();if(1===arguments.length)return l[d]===C?null:l[d];l[d]=a}else{if(1===arguments.length)return this.options[d]===C?null:this.options[d];c[d]=a}}this._setOptions(c);return this},_setOptions:function(d){for(var a in d)this._setOption(a,
d[a]);return this},_setOption:function(d,a){this.options[d]=a;"disabled"===d&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!a).attr("aria-disabled",a),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"));return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(d,a,c){var f,g=this;"boolean"!==typeof d&&(c=a,a=d,d=!1);c?(a=f=b(a),this.bindings=this.bindings.add(a)):
(c=a,a=this.element,f=this.widget());b.each(c,function(l,n){function q(){if(d||!0!==g.options.disabled&&!b(this).hasClass("ui-state-disabled"))return("string"===typeof n?g[n]:n).apply(g,arguments)}"string"!==typeof n&&(q.guid=n.guid=n.guid||q.guid||b.guid++);var u=l.match(/^(\w+)\s*(.*)$/);l=u[1]+g.eventNamespace;(u=u[2])?f.delegate(u,l,q):a.bind(l,q)})},_off:function(d,a){a=(a||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;d.unbind(a).undelegate(a)},_delay:function(d,a){var c=
this;return setTimeout(function(){return("string"===typeof d?c[d]:d).apply(c,arguments)},a||0)},_hoverable:function(d){this.hoverable=this.hoverable.add(d);this._on(d,{mouseenter:function(a){b(a.currentTarget).addClass("ui-state-hover")},mouseleave:function(a){b(a.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(d){this.focusable=this.focusable.add(d);this._on(d,{focusin:function(a){b(a.currentTarget).addClass("ui-state-focus")},focusout:function(a){b(a.currentTarget).removeClass("ui-state-focus")}})},
_trigger:function(d,a,c){var f,g=this.options[d];c=c||{};a=b.Event(a);a.type=(d===this.widgetEventPrefix?d:this.widgetEventPrefix+d).toLowerCase();a.target=this.element[0];if(d=a.originalEvent)for(f in d)f in a||(a[f]=d[f]);this.element.trigger(a,c);return!(b.isFunction(g)&&!1===g.apply(this.element[0],[a].concat(c))||a.isDefaultPrevented())}};b.each({show:"fadeIn",hide:"fadeOut"},function(d,a){b.Widget.prototype["_"+d]=function(c,f,g){"string"===typeof f&&(f={effect:f});var l=f?!0===f||"number"===
typeof f?a:f.effect||a:d;f=f||{};"number"===typeof f&&(f={duration:f});var n=!b.isEmptyObject(f);f.complete=g;f.delay&&c.delay(f.delay);if(n&&b.effects&&b.effects.effect[l])c[d](f);else if(l!==d&&c[l])c[l](f.duration,f.easing,g);else c.queue(function(q){b(this)[d]();g&&g.call(c[0]);q()})}})})(jQuery);
(function(b,C){var e=!1;b(document).mouseup(function(){e=!1});b.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var h=this;this.element.bind("mousedown."+this.widgetName,function(k){return h._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(!0===b.data(k.target,h.widgetName+".preventClickEvent"))return b.removeData(k.target,h.widgetName+".preventClickEvent"),k.stopImmediatePropagation(),!1});this.started=
!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(h){if(!e){this._mouseStarted&&this._mouseUp(h);this._mouseDownEvent=h;var k=this,d=1===h.which,a="string"===typeof this.options.cancel&&h.target.nodeName?b(h.target).closest(this.options.cancel).length:!1;if(!d||a||!this._mouseCapture(h))return!0;this.mouseDelayMet=
!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(h)&&this._mouseDelayMet(h)&&(this._mouseStarted=!1!==this._mouseStart(h),!this._mouseStarted))return h.preventDefault(),!0;!0===b.data(h.target,this.widgetName+".preventClickEvent")&&b.removeData(h.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(c){return k._mouseMove(c)};this._mouseUpDelegate=function(c){return k._mouseUp(c)};
b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);h.preventDefault();return e=!0}},_mouseMove:function(h){if(b.ui.ie&&(!document.documentMode||9>document.documentMode)&&!h.button)return this._mouseUp(h);if(this._mouseStarted)return this._mouseDrag(h),h.preventDefault();this._mouseDistanceMet(h)&&this._mouseDelayMet(h)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,h))?this._mouseDrag(h):this._mouseUp(h));
return!this._mouseStarted},_mouseUp:function(h){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,h.target===this._mouseDownEvent.target&&b.data(h.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(h));return!1},_mouseDistanceMet:function(h){return Math.max(Math.abs(this._mouseDownEvent.pageX-h.pageX),Math.abs(this._mouseDownEvent.pageY-h.pageY))>=this.options.distance},
_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);
(function(b,C){function e(m,p,r){return[parseFloat(m[0])*(q.test(m[0])?p/100:1),parseFloat(m[1])*(q.test(m[1])?r/100:1)]}function h(m){var p=m[0];return 9===p.nodeType?{width:m.width(),height:m.height(),offset:{top:0,left:0}}:b.isWindow(p)?{width:m.width(),height:m.height(),offset:{top:m.scrollTop(),left:m.scrollLeft()}}:p.preventDefault?{width:0,height:0,offset:{top:p.pageY,left:p.pageX}}:{width:m.outerWidth(),height:m.outerHeight(),offset:m.offset()}}b.ui=b.ui||{};var k,d=Math.max,a=Math.abs,c=
Math.round,f=/left|center|right/,g=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,n=/^\w+/,q=/%$/,u=b.fn.position;b.position={scrollbarWidth:function(){if(k!==C)return k;var m=b("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>");var p=m.children()[0];b("body").append(m);var r=p.offsetWidth;m.css("overflow","scroll");p=p.offsetWidth;r===p&&(p=m[0].clientWidth);m.remove();return k=r-p},getScrollInfo:function(m){var p=
m.isWindow||m.isDocument?"":m.element.css("overflow-x"),r=m.isWindow||m.isDocument?"":m.element.css("overflow-y");p="scroll"===p||"auto"===p&&m.width<m.element[0].scrollWidth;return{width:"scroll"===r||"auto"===r&&m.height<m.element[0].scrollHeight?b.position.scrollbarWidth():0,height:p?b.position.scrollbarWidth():0}},getWithinInfo:function(m){m=b(m||window);var p=b.isWindow(m[0]);return{element:m,isWindow:p,isDocument:!!m[0]&&9===m[0].nodeType,offset:m.offset()||{left:0,top:0},scrollLeft:m.scrollLeft(),
scrollTop:m.scrollTop(),width:p?m.width():m.outerWidth(),height:p?m.height():m.outerHeight()}}};b.fn.position=function(m){if(!m||!m.of)return u.apply(this,arguments);m=b.extend({},m);var p=b(m.of),r=b.position.getWithinInfo(m.within),t=b.position.getScrollInfo(r),v=(m.collision||"flip").split(" "),x={};var w=h(p);p[0].preventDefault&&(m.at="left top");var D=w.width;var z=w.height;var A=w.offset;var y=b.extend({},A);b.each(["my","at"],function(){var F=(m[this]||"").split(" ");1===F.length&&(F=f.test(F[0])?
F.concat(["center"]):g.test(F[0])?["center"].concat(F):["center","center"]);F[0]=f.test(F[0])?F[0]:"center";F[1]=g.test(F[1])?F[1]:"center";var M=l.exec(F[0]);var K=l.exec(F[1]);x[this]=[M?M[0]:0,K?K[0]:0];m[this]=[n.exec(F[0])[0],n.exec(F[1])[0]]});1===v.length&&(v[1]=v[0]);"right"===m.at[0]?y.left+=D:"center"===m.at[0]&&(y.left+=D/2);"bottom"===m.at[1]?y.top+=z:"center"===m.at[1]&&(y.top+=z/2);var B=e(x.at,D,z);y.left+=B[0];y.top+=B[1];return this.each(function(){var F,M=b(this),K=M.outerWidth(),
I=M.outerHeight(),N=parseInt(b.css(this,"marginLeft"),10)||0,S=parseInt(b.css(this,"marginTop"),10)||0,T=K+N+(parseInt(b.css(this,"marginRight"),10)||0)+t.width,U=I+S+(parseInt(b.css(this,"marginBottom"),10)||0)+t.height,G=b.extend({},y),Q=e(x.my,M.outerWidth(),M.outerHeight());"right"===m.my[0]?G.left-=K:"center"===m.my[0]&&(G.left-=K/2);"bottom"===m.my[1]?G.top-=I:"center"===m.my[1]&&(G.top-=I/2);G.left+=Q[0];G.top+=Q[1];b.support.offsetFractions||(G.left=c(G.left),G.top=c(G.top));var H={marginLeft:N,
marginTop:S};b.each(["left","top"],function(L,J){if(b.ui.position[v[L]])b.ui.position[v[L]][J](G,{targetWidth:D,targetHeight:z,elemWidth:K,elemHeight:I,collisionPosition:H,collisionWidth:T,collisionHeight:U,offset:[B[0]+Q[0],B[1]+Q[1]],my:m.my,at:m.at,within:r,elem:M})});m.using&&(F=function(L){var J=A.left-G.left,E=J+D-K,R=A.top-G.top,P=R+z-I,O={target:{element:p,left:A.left,top:A.top,width:D,height:z},element:{element:M,left:G.left,top:G.top,width:K,height:I},horizontal:0>E?"left":0<J?"right":"center",
vertical:0>P?"top":0<R?"bottom":"middle"};D<K&&a(J+E)<D&&(O.horizontal="center");z<I&&a(R+P)<z&&(O.vertical="middle");d(a(J),a(E))>d(a(R),a(P))?O.important="horizontal":O.important="vertical";m.using.call(this,L,O)});M.offset(b.extend(G,{using:F}))})};b.ui.position={fit:{left:function(m,p){var r=p.within,t=r.isWindow?r.scrollLeft:r.offset.left,v=r.width,x=m.left-p.collisionPosition.marginLeft;r=t-x;var w=x+p.collisionWidth-v-t;p.collisionWidth>v?0<r&&0>=w?(p=m.left+r+p.collisionWidth-v-t,m.left+=
r-p):m.left=0<w&&0>=r?t:r>w?t+v-p.collisionWidth:t:m.left=0<r?m.left+r:0<w?m.left-w:d(m.left-x,m.left)},top:function(m,p){var r=p.within,t=r.isWindow?r.scrollTop:r.offset.top,v=p.within.height,x=m.top-p.collisionPosition.marginTop;r=t-x;var w=x+p.collisionHeight-v-t;p.collisionHeight>v?0<r&&0>=w?(p=m.top+r+p.collisionHeight-v-t,m.top+=r-p):m.top=0<w&&0>=r?t:r>w?t+v-p.collisionHeight:t:m.top=0<r?m.top+r:0<w?m.top-w:d(m.top-x,m.top)}},flip:{left:function(m,p){var r=p.within,t=r.offset.left+r.scrollLeft,
v=r.width,x=r.isWindow?r.scrollLeft:r.offset.left,w=m.left-p.collisionPosition.marginLeft;r=w-x;var D=w+p.collisionWidth-v-x;w="left"===p.my[0]?-p.elemWidth:"right"===p.my[0]?p.elemWidth:0;var z="left"===p.at[0]?p.targetWidth:"right"===p.at[0]?-p.targetWidth:0,A=-2*p.offset[0];if(0>r){if(p=m.left+w+z+A+p.collisionWidth-v-t,0>p||p<a(r))m.left+=w+z+A}else 0<D&&(p=m.left-p.collisionPosition.marginLeft+w+z+A-x,0<p||a(p)<D)&&(m.left+=w+z+A)},top:function(m,p){var r=p.within,t=r.offset.top+r.scrollTop,
v=r.height,x=r.isWindow?r.scrollTop:r.offset.top,w=m.top-p.collisionPosition.marginTop;r=w-x;var D=w+p.collisionHeight-v-x;w="top"===p.my[1]?-p.elemHeight:"bottom"===p.my[1]?p.elemHeight:0;var z="top"===p.at[1]?p.targetHeight:"bottom"===p.at[1]?-p.targetHeight:0,A=-2*p.offset[1];0>r?(p=m.top+w+z+A+p.collisionHeight-v-t,m.top+w+z+A>r&&(0>p||p<a(r))&&(m.top+=w+z+A)):0<D&&(p=m.top-p.collisionPosition.marginTop+w+z+A-x,m.top+w+z+A>D&&(0<p||a(p)<D)&&(m.top+=w+z+A))}},flipfit:{left:function(){b.ui.position.flip.left.apply(this,
arguments);b.ui.position.fit.left.apply(this,arguments)},top:function(){b.ui.position.flip.top.apply(this,arguments);b.ui.position.fit.top.apply(this,arguments)}}};(function(){var m,p=document.getElementsByTagName("body")[0];var r=document.createElement("div");var t=document.createElement(p?"div":"body");var v={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};p&&b.extend(v,{position:"absolute",left:"-1000px",top:"-1000px"});for(m in v)t.style[m]=v[m];t.appendChild(r);v=p||
document.documentElement;v.insertBefore(t,v.firstChild);r.style.cssText="position: absolute; left: 10.7432222px;";r=b(r).offset().left;b.support.offsetFractions=10<r&&11>r;t.innerHTML="";v.removeChild(t)})()})(jQuery);
(function(b,C){var e=0,h={},k={};h.height=h.paddingTop=h.paddingBottom=h.borderTopWidth=h.borderBottomWidth="hide";k.height=k.paddingTop=k.paddingBottom=k.borderTopWidth=k.borderBottomWidth="show";b.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var d=this.options;
this.prevShow=this.prevHide=b();this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist");d.collapsible||!1!==d.active&&null!=d.active||(d.active=0);this._processPanels();0>d.active&&(d.active+=this.headers.length);this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():b(),content:this.active.length?this.active.next():b()}},_createIcons:function(){var d=this.options.icons;d&&(b("<span>").addClass("ui-accordion-header-icon ui-icon "+
d.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(d.header).addClass(d.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&
this.removeAttribute("id")});this._destroyIcons();var d=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});"content"!==this.options.heightStyle&&d.css("height","")},_setOption:function(d,a){"active"===d?this._activate(a):("event"===
d&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(a)),this._super(d,a),"collapsible"!==d||a||!1!==this.options.active||this._activate(0),"icons"===d&&(this._destroyIcons(),a&&this._createIcons()),"disabled"===d&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!a))},_keydown:function(d){if(!d.altKey&&!d.ctrlKey){var a=b.ui.keyCode,c=this.headers.length,f=this.headers.index(d.target),g=!1;switch(d.keyCode){case a.RIGHT:case a.DOWN:g=this.headers[(f+
1)%c];break;case a.LEFT:case a.UP:g=this.headers[(f-1+c)%c];break;case a.SPACE:case a.ENTER:this._eventHandler(d);break;case a.HOME:g=this.headers[0];break;case a.END:g=this.headers[c-1]}g&&(b(d.target).attr("tabIndex",-1),b(g).attr("tabIndex",0),g.focus(),d.preventDefault())}},_panelKeyDown:function(d){d.keyCode===b.ui.keyCode.UP&&d.ctrlKey&&b(d.currentTarget).prev().focus()},refresh:function(){var d=this.options;this._processPanels();!1===d.active&&!0===d.collapsible||!this.headers.length?(d.active=
!1,this.active=b()):!1===d.active?this._activate(0):this.active.length&&!b.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(d.active=!1,this.active=b()):this._activate(Math.max(0,d.active-1)):d.active=this.headers.index(this.active);this._destroyIcons();this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},
_refresh:function(){var d=this.options,a=d.heightStyle,c=this.element.parent(),f=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(d.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all");this.active.next().addClass("ui-accordion-content-active").show();this.headers.attr("role","tab").each(function(l){var n=b(this),q=n.attr("id"),u=n.next(),m=u.attr("id");q||(q=f+"-header-"+l,n.attr("id",q));m||(m=f+"-panel-"+
l,u.attr("id",m));n.attr("aria-controls",m);u.attr("aria-labelledby",q)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide();this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._createIcons();this._setupEvents(d.event);if("fill"===a){var g=c.height();this.element.siblings(":visible").each(function(){var l=
b(this),n=l.css("position");"absolute"!==n&&"fixed"!==n&&(g-=l.outerHeight(!0))});this.headers.each(function(){g-=b(this).outerHeight(!0)});this.headers.next().each(function(){b(this).height(Math.max(0,g-b(this).innerHeight()+b(this).height()))}).css("overflow","auto")}else"auto"===a&&(g=0,this.headers.next().each(function(){g=Math.max(g,b(this).css("height","").height())}).height(g))},_activate:function(d){d=this._findActive(d)[0];d!==this.active[0]&&(d=d||this.active[0],this._eventHandler({target:d,
currentTarget:d,preventDefault:b.noop}))},_findActive:function(d){return"number"===typeof d?this.headers.eq(d):b()},_setupEvents:function(d){var a={keydown:"_keydown"};d&&b.each(d.split(" "),function(c,f){a[f]="_eventHandler"});this._off(this.headers.add(this.headers.next()));this._on(this.headers,a);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(d){var a=this.options,c=this.active,f=b(d.currentTarget),g=
f[0]===c[0],l=g&&a.collapsible,n=l?b():f.next(),q=c.next();n={oldHeader:c,oldPanel:q,newHeader:l?b():f,newPanel:n};d.preventDefault();g&&!a.collapsible||!1===this._trigger("beforeActivate",d,n)||(a.active=l?!1:this.headers.index(f),this.active=g?b():f,this._toggle(n),c.removeClass("ui-accordion-header-active ui-state-active"),a.icons&&c.children(".ui-accordion-header-icon").removeClass(a.icons.activeHeader).addClass(a.icons.header),g||(f.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),
a.icons&&f.children(".ui-accordion-header-icon").removeClass(a.icons.header).addClass(a.icons.activeHeader),f.next().addClass("ui-accordion-content-active")))},_toggle:function(d){var a=d.newPanel,c=this.prevShow.length?this.prevShow:d.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0);this.prevShow=a;this.prevHide=c;this.options.animate?this._animate(a,c,d):(c.hide(),a.show(),this._toggleComplete(d));c.attr({"aria-hidden":"true"});c.prev().attr("aria-selected","false");a.length&&c.length?c.prev().attr({tabIndex:-1,
"aria-expanded":"false"}):a.length&&this.headers.filter(function(){return 0===b(this).attr("tabIndex")}).attr("tabIndex",-1);a.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(d,a,c){var f,g,l=this,n=0,q=d.length&&(!a.length||d.index()<a.index()),u=this.options.animate||{};q=q&&u.down||u;var m=function(){l._toggleComplete(c)};"number"===typeof q&&(g=q);"string"===typeof q&&(f=q);f=f||q.easing||u.easing;g=g||q.duration||u.duration;
if(!a.length)return d.animate(k,g,f,m);if(!d.length)return a.animate(h,g,f,m);var p=d.show().outerHeight();a.animate(h,{duration:g,easing:f,step:function(r,t){t.now=Math.round(r)}});d.hide().animate(k,{duration:g,easing:f,complete:m,step:function(r,t){t.now=Math.round(r);"height"!==t.prop?n+=t.now:"content"!==l.options.heightStyle&&(t.now=Math.round(p-a.outerHeight()-n),n=0)}})},_toggleComplete:function(d){var a=d.oldPanel;a.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all");
a.length&&(a.parent()[0].className=a.parent()[0].className);this._trigger("activate",null,d)}})})(jQuery);
(function(b,C){b.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,h,k,d=this.element[0].nodeName.toLowerCase(),a="textarea"===d;d="input"===d;this.isMultiLine=a?!0:d?!1:this.element.prop("isContentEditable");this.valueMethod=
this.element[a||d?"val":"text"];this.isNewMenu=!0;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off");this._on(this.element,{keydown:function(c){if(this.element.prop("readOnly"))h=k=e=!0;else{h=k=e=!1;var f=b.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:e=!0;this._move("previousPage",c);break;case f.PAGE_DOWN:e=!0;this._move("nextPage",c);break;case f.UP:e=!0;this._keyEvent("previous",c);break;case f.DOWN:e=!0;this._keyEvent("next",c);break;case f.ENTER:case f.NUMPAD_ENTER:this.menu.active&&
(e=!0,c.preventDefault(),this.menu.select(c));break;case f.TAB:this.menu.active&&this.menu.select(c);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(c),c.preventDefault());break;default:h=!0,this._searchTimeout(c)}}},keypress:function(c){if(e)e=!1,this.isMultiLine&&!this.menu.element.is(":visible")||c.preventDefault();else if(!h){var f=b.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:this._move("previousPage",c);break;case f.PAGE_DOWN:this._move("nextPage",c);
break;case f.UP:this._keyEvent("previous",c);break;case f.DOWN:this._keyEvent("next",c)}}},input:function(c){k?(k=!1,c.preventDefault()):this._searchTimeout(c)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(c){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(c),this._change(c))}});this._initSource();this.menu=b("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu");this._on(this.menu.element,
{mousedown:function(c){c.preventDefault();this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur});var f=this.menu.element[0];b(c.target).closest(".ui-menu-item").length||this._delay(function(){var g=this;this.document.one("mousedown",function(l){l.target===g.element[0]||l.target===f||b.contains(f,l.target)||g.close()})})},menufocus:function(c,f){if(this.isNewMenu&&(this.isNewMenu=!1,c.originalEvent&&/^mouse/.test(c.originalEvent.type))){this.menu.blur();this.document.one("mousemove",function(){b(c.target).trigger(c.originalEvent)});
return}f=f.item.data("ui-autocomplete-item");!1!==this._trigger("focus",c,{item:f})?c.originalEvent&&/^key/.test(c.originalEvent.type)&&this._value(f.value):this.liveRegion.text(f.value)},menuselect:function(c,f){var g=f.item.data("ui-autocomplete-item"),l=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=l,this._delay(function(){this.previous=l;this.selectedItem=g}));!1!==this._trigger("select",c,{item:g})&&this._value(g.value);this.term=this._value();
this.close(c);this.selectedItem=g}});this.liveRegion=b("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element);this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(e,h){this._super(e,h);"source"===e&&this._initSource();
"appendTo"===e&&this.menu.element.appendTo(this._appendTo());"disabled"===e&&h&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;e&&(e=e.jquery||e.nodeType?b(e):this.document.find(e).eq(0));e||(e=this.element.closest(".ui-front"));e.length||(e=this.document[0].body);return e},_initSource:function(){var e=this;if(b.isArray(this.options.source)){var h=this.options.source;this.source=function(d,a){a(b.ui.autocomplete.filter(h,d.term))}}else if("string"===typeof this.options.source){var k=
this.options.source;this.source=function(d,a){e.xhr&&e.xhr.abort();e.xhr=b.ajax({url:k,data:d,dataType:"json",success:function(c){a(c)},error:function(){a([])}})}}else this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching);this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,h){e=null!=e?e:this._value();this.term=this._value();if(e.length<this.options.minLength)return this.close(h);
if(!1!==this._trigger("search",h))return this._search(e)},_search:function(e){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:e},this._response())},_response:function(){var e=++this.requestIndex;return b.proxy(function(h){e===this.requestIndex&&this.__response(h);this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e));this._trigger("response",null,{content:e});!this.options.disabled&&
e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0;this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:b.map(e,function(h){return"string"===typeof h?{label:h,
value:h}:b.extend({label:h.label||h.value,value:h.value||h.label},h)})},_suggest:function(e){var h=this.menu.element.empty();this._renderMenu(h,e);this.isNewMenu=!0;this.menu.refresh();h.show();this._resizeMenu();h.position(b.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,h){var k=this;b.each(h,function(d,a){k._renderItemData(e,
a)})},_renderItemData:function(e,h){return this._renderItem(e,h).data("ui-autocomplete-item",h)},_renderItem:function(e,h){return b("<li>").append(b("<a>").text(h.label)).appendTo(e)},_move:function(e,h){if(this.menu.element.is(":visible"))if(this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e))this._value(this.term),this.menu.blur();else this.menu[e](h);else this.search(null,h)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,
arguments)},_keyEvent:function(e,h){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(e,h),h.preventDefault()}});b.extend(b.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,h){var k=new RegExp(b.ui.autocomplete.escapeRegex(h),"i");return b.grep(e,function(d){return k.test(d.label||d.value||d)})}});b.widget("ui.autocomplete",b.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+
(1<e?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){this._superApply(arguments);if(!this.options.disabled&&!this.cancelSearch){var h=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults;this.liveRegion.text(h)}}})})(jQuery);
(function(b,C){var e,h=function(){var d=b(this);setTimeout(function(){d.find(":ui-button").button("refresh")},1)},k=function(d){var a=d.name,c=d.form,f=b([]);a&&(a=a.replace(/'/g,"\\'"),f=c?b(c).find("[name='"+a+"']"):b("[name='"+a+"']",d.ownerDocument).filter(function(){return!this.form}));return f};b.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+
this.eventNamespace).bind("reset"+this.eventNamespace,h);"boolean"!==typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var d=this,a=this.options,c="checkbox"===this.type||"radio"===this.type,f=c?"":"ui-state-active";null===a.label&&(a.label="input"===this.type?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);
this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter"+this.eventNamespace,function(){a.disabled||this===e&&b(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){a.disabled||b(this).removeClass(f)}).bind("click"+this.eventNamespace,function(g){a.disabled&&(g.preventDefault(),g.stopImmediatePropagation())});this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}});
c&&this.element.bind("change"+this.eventNamespace,function(){d.refresh()});"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(a.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(a.disabled)return!1;b(this).addClass("ui-state-active");d.buttonElement.attr("aria-pressed","true");var g=d.element[0];k(g).not(g).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",
"false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(a.disabled)return!1;b(this).addClass("ui-state-active");e=this;d.document.one("mouseup",function(){e=null})}).bind("mouseup"+this.eventNamespace,function(){if(a.disabled)return!1;b(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(g){if(a.disabled)return!1;g.keyCode!==b.ui.keyCode.SPACE&&g.keyCode!==b.ui.keyCode.ENTER||b(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+
" blur"+this.eventNamespace,function(){b(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(g){g.keyCode===b.ui.keyCode.SPACE&&b(this).click()}));this._setOption("disabled",a.disabled);this._resetButton()},_determineButtonType:function(){this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";if("checkbox"===this.type||"radio"===this.type){var d=
this.element.parents().last();var a="label[for='"+this.element.attr("id")+"']";this.buttonElement=d.find(a);this.buttonElement.length||(d=d.length?d.siblings():this.element.siblings(),this.buttonElement=d.filter(a),this.buttonElement.length||(this.buttonElement=d.find(a)));this.element.addClass("ui-helper-hidden-accessible");(d=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.prop("aria-pressed",d)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},
_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(d,a){this._super(d,
a);"disabled"===d?(this.element.prop("disabled",!!a),a&&this.buttonElement.removeClass("ui-state-focus")):this._resetButton()},refresh:function(){var d=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");d!==this.options.disabled&&this._setOption("disabled",d);"radio"===this.type?k(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",
"false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)this.options.label&&this.element.val(this.options.label);else{var d=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
a=b("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(d.empty()).text(),c=this.options.icons,f=c.primary&&c.secondary,g=[];c.primary||c.secondary?(this.options.text&&g.push("ui-button-text-icon"+(f?"s":c.primary?"-primary":"-secondary")),c.primary&&d.prepend("<span class='ui-button-icon-primary ui-icon "+c.primary+"'></span>"),c.secondary&&d.append("<span class='ui-button-icon-secondary ui-icon "+c.secondary+"'></span>"),this.options.text||(g.push(f?"ui-button-icons-only":
"ui-button-icon-only"),this.hasTitle||d.attr("title",b.trim(a)))):g.push("ui-button-text-only");d.addClass(g.join(" "))}}});b.widget("ui.buttonset",{version:"1.10.4",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(d,a){"disabled"===d&&this.buttons.button("option",d,a);this._super(d,a)},refresh:function(){var d=
"rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(d?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(d?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);
(function(b,C){function e(){this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._inDialog=this._datepickerShowing=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";
this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:"January February March April May June July August September October November December".split(" "),monthNamesShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),dayNames:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),dayNamesShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),dayNamesMin:"Su Mo Tu We Th Fr Sa".split(" "),weekHeader:"Wk",dateFormat:"mm/dd/yy",
firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,
onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};b.extend(this._defaults,this.regional[""]);this.dpDiv=h(b("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function h(a){return a.delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseout",function(){b(this).removeClass("ui-state-hover");
-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).removeClass("ui-datepicker-prev-hover");-1!==this.className.indexOf("ui-datepicker-next")&&b(this).removeClass("ui-datepicker-next-hover")}).delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseover",function(){b.datepicker._isDisabledDatepicker(d.inline?a.parent()[0]:d.input[0])||(b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),b(this).addClass("ui-state-hover"),
-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&b(this).addClass("ui-datepicker-next-hover"))})}function k(a,c){b.extend(a,c);for(var f in c)null==c[f]&&(a[f]=c[f]);return a}b.extend(b.ui,{datepicker:{version:"1.10.4"}});var d;b.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){k(this._defaults,a||{});return this},_attachDatepicker:function(a,
c){var f=a.nodeName.toLowerCase();var g="div"===f||"span"===f;a.id||(this.uuid+=1,a.id="dp"+this.uuid);var l=this._newInst(b(a),g);l.settings=b.extend({},c||{});"input"===f?this._connectDatepicker(a,l):g&&this._inlineDatepicker(a,l)},_newInst:function(a,c){return{id:a[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:c,dpDiv:c?h(b("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):
this.dpDiv}},_connectDatepicker:function(a,c){var f=b(a);c.append=b([]);c.trigger=b([]);f.hasClass(this.markerClassName)||(this._attachments(f,c),f.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(c),b.data(a,"datepicker",c),c.settings.disabled&&this._disableDatepicker(a))},_attachments:function(a,c){var f=this._get(c,"appendText");var g=this._get(c,"isRTL");c.append&&c.append.remove();f&&(c.append=b("<span class='"+this._appendClass+
"'>"+f+"</span>"),a[g?"before":"after"](c.append));a.unbind("focus",this._showDatepicker);c.trigger&&c.trigger.remove();f=this._get(c,"showOn");"focus"!==f&&"both"!==f||a.focus(this._showDatepicker);if("button"===f||"both"===f){f=this._get(c,"buttonText");var l=this._get(c,"buttonImage");c.trigger=b(this._get(c,"buttonImageOnly")?b("<img/>").addClass(this._triggerClass).attr({src:l,alt:f,title:f}):b("<button type='button'></button>").addClass(this._triggerClass).html(l?b("<img/>").attr({src:l,alt:f,
title:f}):f));a[g?"before":"after"](c.trigger);c.trigger.on("click",function(){b.datepicker._datepickerShowing&&b.datepicker._lastInput===a[0]?b.datepicker._hideDatepicker():(b.datepicker._datepickerShowing&&b.datepicker._lastInput!==a[0]&&b.datepicker._hideDatepicker(),b.datepicker._showDatepicker(a[0]));return!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var c,f,g,l=new Date(2009,11,20),n=this._get(a,"dateFormat");if(n.match(/[DM]/)){var q=function(u){for(g=f=c=0;g<u.length;g++)u[g].length>
c&&(c=u[g].length,f=g);return f};l.setMonth(q(this._get(a,n.match(/MM/)?"monthNames":"monthNamesShort")));l.setDate(q(this._get(a,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-l.getDay())}a.input.attr("size",this._formatDate(a,l).length)}},_inlineDatepicker:function(a,c){var f=b(a);f.hasClass(this.markerClassName)||(f.addClass(this.markerClassName).append(c.dpDiv),b.data(a,"datepicker",c),this._setDate(c,this._getDefaultDate(c),!0),this._updateDatepicker(c),this._updateAlternate(c),c.settings.disabled&&
this._disableDatepicker(a),c.dpDiv.css("display","block"))},_dialogDatepicker:function(a,c,f,g,l){a=this._dialogInst;a||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=b("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),b("body").append(this._dialogInput),a=this._dialogInst=this._newInst(this._dialogInput,!1),a.settings={},b.data(this._dialogInput[0],"datepicker",a));k(a.settings,g||{});c=c&&c.constructor===Date?this._formatDate(a,
c):c;this._dialogInput.val(c);this._pos=l?l.length?l:[l.pageX,l.pageY]:null;if(!this._pos){c=document.documentElement.clientWidth;g=document.documentElement.clientHeight;l=document.documentElement.scrollLeft||document.body.scrollLeft;var n=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[c/2-100+l,g/2-150+n]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=f;this._inDialog=!0;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);
b.blockUI&&b.blockUI(this.dpDiv);b.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var c=b(a),f=b.data(a,"datepicker");if(c.hasClass(this.markerClassName)){var g=a.nodeName.toLowerCase();b.removeData(a,"datepicker");"input"===g?(f.append.remove(),f.trigger.remove(),c.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==g&&"span"!==g||
c.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var c=b(a),f=b.data(a,"datepicker");if(c.hasClass(this.markerClassName)){var g=a.nodeName.toLowerCase();if("input"===g)a.disabled=!1,f.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"===g||"span"===g)g=c.children("."+this._inlineClass),g.children().removeClass("ui-state-disabled"),g.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",
!1);this._disabledInputs=b.map(this._disabledInputs,function(l){return l===a?null:l})}},_disableDatepicker:function(a){var c=b(a),f=b.data(a,"datepicker");if(c.hasClass(this.markerClassName)){var g=a.nodeName.toLowerCase();if("input"===g)a.disabled=!0,f.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"===g||"span"===g)g=c.children("."+this._inlineClass),g.children().addClass("ui-state-disabled"),g.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",
!0);this._disabledInputs=b.map(this._disabledInputs,function(l){return l===a?null:l});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var c=0;c<this._disabledInputs.length;c++)if(this._disabledInputs[c]===a)return!0;return!1},_getInst:function(a){try{return b.data(a,"datepicker")}catch(c){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,c,f){var g=this._getInst(a);if(2===arguments.length&&"string"===typeof c)return"defaults"===
c?b.extend({},b.datepicker._defaults):g?"all"===c?b.extend({},g.settings):this._get(g,c):null;var l=c||{};"string"===typeof c&&(l={},l[c]=f);if(g){this._curInst===g&&this._hideDatepicker();var n=this._getDateDatepicker(a,!0);var q=this._getMinMaxDate(g,"min");var u=this._getMinMaxDate(g,"max");k(g.settings,l);null!==q&&l.dateFormat!==C&&l.minDate===C&&(g.settings.minDate=this._formatDate(g,q));null!==u&&l.dateFormat!==C&&l.maxDate===C&&(g.settings.maxDate=this._formatDate(g,u));"disabled"in l&&(l.disabled?
this._disableDatepicker(a):this._enableDatepicker(a));this._attachments(b(a),g);this._autoSize(g);this._setDate(g,n);this._updateAlternate(g);this._updateDatepicker(g)}},_changeDatepicker:function(a,c,f){this._optionDatepicker(a,c,f)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,c){if(a=this._getInst(a))this._setDate(a,c),this._updateDatepicker(a),this._updateAlternate(a)},_getDateDatepicker:function(a,c){(a=this._getInst(a))&&!a.inline&&
this._setDateFromField(a,c);return a?this._getDate(a):null},_doKeyDown:function(a){var c=b.datepicker._getInst(a.target);var f=!0;var g=c.dpDiv.is(".ui-datepicker-rtl");c._keyEvent=!0;if(b.datepicker._datepickerShowing)switch(a.keyCode){case 9:b.datepicker._hideDatepicker();f=!1;break;case 13:return f=b("td."+b.datepicker._dayOverClass+":not(."+b.datepicker._currentClass+")",c.dpDiv),f[0]&&b.datepicker._selectDay(a.target,c.selectedMonth,c.selectedYear,f[0]),(a=b.datepicker._get(c,"onSelect"))?(f=
b.datepicker._formatDate(c),a.apply(c.input?c.input[0]:null,[f,c])):b.datepicker._hideDatepicker(),!1;case 27:b.datepicker._hideDatepicker();break;case 33:b.datepicker._adjustDate(a.target,a.ctrlKey?-b.datepicker._get(c,"stepBigMonths"):-b.datepicker._get(c,"stepMonths"),"M");break;case 34:b.datepicker._adjustDate(a.target,a.ctrlKey?+b.datepicker._get(c,"stepBigMonths"):+b.datepicker._get(c,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&b.datepicker._clearDate(a.target);f=a.ctrlKey||a.metaKey;
break;case 36:(a.ctrlKey||a.metaKey)&&b.datepicker._gotoToday(a.target);f=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&b.datepicker._adjustDate(a.target,g?1:-1,"D");f=a.ctrlKey||a.metaKey;a.originalEvent.altKey&&b.datepicker._adjustDate(a.target,a.ctrlKey?-b.datepicker._get(c,"stepBigMonths"):-b.datepicker._get(c,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&b.datepicker._adjustDate(a.target,-7,"D");f=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&b.datepicker._adjustDate(a.target,
g?-1:1,"D");f=a.ctrlKey||a.metaKey;a.originalEvent.altKey&&b.datepicker._adjustDate(a.target,a.ctrlKey?+b.datepicker._get(c,"stepBigMonths"):+b.datepicker._get(c,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&b.datepicker._adjustDate(a.target,7,"D");f=a.ctrlKey||a.metaKey;break;default:f=!1}else 36===a.keyCode&&a.ctrlKey?b.datepicker._showDatepicker(this):f=!1;f&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var c=b.datepicker._getInst(a.target);if(b.datepicker._get(c,
"constrainInput")){c=b.datepicker._possibleChars(b.datepicker._get(c,"dateFormat"));var f=String.fromCharCode(null==a.charCode?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||" ">f||!c||-1<c.indexOf(f)}},_doKeyUp:function(a){var c;a=b.datepicker._getInst(a.target);if(a.input.val()!==a.lastVal)try{if(c=b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,b.datepicker._getFormatConfig(a)))b.datepicker._setDateFromField(a),b.datepicker._updateAlternate(a),b.datepicker._updateDatepicker(a)}catch(f){}return!0},
_showDatepicker:function(a){a=a.target||a;"input"!==a.nodeName.toLowerCase()&&(a=b("input",a.parentNode)[0]);if(!b.datepicker._isDisabledDatepicker(a)&&b.datepicker._lastInput!==a){var c=b.datepicker._getInst(a);b.datepicker._curInst&&b.datepicker._curInst!==c&&(b.datepicker._curInst.dpDiv.stop(!0,!0),c&&b.datepicker._datepickerShowing&&b.datepicker._hideDatepicker(b.datepicker._curInst.input[0]));var f=(f=b.datepicker._get(c,"beforeShow"))?f.apply(a,[a,c]):{};if(!1!==f){k(c.settings,f);c.lastVal=
null;b.datepicker._lastInput=a;b.datepicker._setDateFromField(c);b.datepicker._inDialog&&(a.value="");b.datepicker._pos||(b.datepicker._pos=b.datepicker._findPos(a),b.datepicker._pos[1]+=a.offsetHeight);var g=!1;b(a).parents().each(function(){g|="fixed"===b(this).css("position");return!g});f={left:b.datepicker._pos[0],top:b.datepicker._pos[1]};b.datepicker._pos=null;c.dpDiv.empty();c.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});b.datepicker._updateDatepicker(c);f=b.datepicker._checkOffset(c,
f,g);c.dpDiv.css({position:b.datepicker._inDialog&&b.blockUI?"static":g?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!c.inline){f=b.datepicker._get(c,"showAnim");var l=b.datepicker._get(c,"duration");c.dpDiv.zIndex(b(a).zIndex()+1);b.datepicker._datepickerShowing=!0;if(b.effects&&b.effects.effect[f])c.dpDiv.show(f,b.datepicker._get(c,"showOptions"),l);else c.dpDiv[f||"show"](f?l:null);b.datepicker._shouldFocusInput(c)&&c.input.focus();b.datepicker._curInst=c}}}},_updateDatepicker:function(a){this.maxRows=
4;d=a;a.dpDiv.empty().append(this._generateHTML(a));this._attachHandlers(a);a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var c=this._getNumberOfMonths(a),f=c[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");1<f&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",17*f+"em");a.dpDiv[(1!==c[0]||1!==c[1]?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a===b.datepicker._curInst&&
b.datepicker._datepickerShowing&&b.datepicker._shouldFocusInput(a)&&a.input.focus();if(a.yearshtml){var g=a.yearshtml;setTimeout(function(){g===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);g=a.yearshtml=null},0)}},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(a,c,f){var g=a.dpDiv.outerWidth(),l=a.dpDiv.outerHeight(),n=a.input?a.input.outerWidth():0,q=
a.input?a.input.outerHeight():0,u=document.documentElement.clientWidth+(f?0:b(document).scrollLeft()),m=document.documentElement.clientHeight+(f?0:b(document).scrollTop());c.left-=this._get(a,"isRTL")?g-n:0;c.left-=f&&c.left===a.input.offset().left?b(document).scrollLeft():0;c.top-=f&&c.top===a.input.offset().top+q?b(document).scrollTop():0;c.left-=Math.min(c.left,c.left+g>u&&u>g?Math.abs(c.left+g-u):0);c.top-=Math.min(c.top,c.top+l>m&&m>l?Math.abs(l+q):0);return c},_findPos:function(a){var c=this._getInst(a);
for(c=this._get(c,"isRTL");a&&("hidden"===a.type||1!==a.nodeType||b.expr.filters.hidden(a));)a=a[c?"previousSibling":"nextSibling"];a=b(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var c=this._curInst;if(c&&(!a||c===b.data(a,"datepicker"))&&this._datepickerShowing){a=this._get(c,"showAnim");var f=this._get(c,"duration");var g=function(){b.datepicker._tidyDialog(c)};if(b.effects&&(b.effects.effect[a]||b.effects[a]))c.dpDiv.hide(a,b.datepicker._get(c,"showOptions"),f,g);else c.dpDiv["slideDown"===
a?"slideUp":"fadeIn"===a?"fadeOut":"hide"](a?f:null,g);a||g();this._datepickerShowing=!1;(a=this._get(c,"onClose"))&&a.apply(c.input?c.input[0]:null,[c.input?c.input.val():"",c]);this._lastInput=null;this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),b.blockUI&&(b.unblockUI(),b("body").append(this.dpDiv)));this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(b.datepicker._curInst){a=
b(a.target);var c=b.datepicker._getInst(a[0]);(!(a[0].id===b.datepicker._mainDivId||0!==a.parents("#"+b.datepicker._mainDivId).length||a.hasClass(b.datepicker.markerClassName)||a.closest("."+b.datepicker._triggerClass).length||!b.datepicker._datepickerShowing||b.datepicker._inDialog&&b.blockUI)||a.hasClass(b.datepicker.markerClassName)&&b.datepicker._curInst!==c)&&b.datepicker._hideDatepicker()}},_adjustDate:function(a,c,f){a=b(a);var g=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(g,
c+("M"===f?this._get(g,"showCurrentAtPos"):0),f),this._updateDatepicker(g))},_gotoToday:function(a){var c=b(a),f=this._getInst(c[0]);this._get(f,"gotoCurrent")&&f.currentDay?(f.selectedDay=f.currentDay,f.drawMonth=f.selectedMonth=f.currentMonth,f.drawYear=f.selectedYear=f.currentYear):(a=new Date,f.selectedDay=a.getDate(),f.drawMonth=f.selectedMonth=a.getMonth(),f.drawYear=f.selectedYear=a.getFullYear());this._notifyChange(f);this._adjustDate(c)},_selectMonthYear:function(a,c,f){a=b(a);var g=this._getInst(a[0]);
g["selected"+("M"===f?"Month":"Year")]=g["draw"+("M"===f?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10);this._notifyChange(g);this._adjustDate(a)},_selectDay:function(a,c,f,g){var l=b(a);b(g).hasClass(this._unselectableClass)||this._isDisabledDatepicker(l[0])||(l=this._getInst(l[0]),l.selectedDay=l.currentDay=b("a",g).html(),l.selectedMonth=l.currentMonth=c,l.selectedYear=l.currentYear=f,this._selectDate(a,this._formatDate(l,l.currentDay,l.currentMonth,l.currentYear)))},_clearDate:function(a){a=
b(a);this._selectDate(a,"")},_selectDate:function(a,c){a=b(a);var f=this._getInst(a[0]);c=null!=c?c:this._formatDate(f);f.input&&f.input.val(c);this._updateAlternate(f);(a=this._get(f,"onSelect"))?a.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change");f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!==typeof f.input[0]&&f.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var c=this._get(a,"altField");if(c){var f=this._get(a,
"altFormat")||this._get(a,"dateFormat");var g=this._getDate(a);var l=this.formatDate(f,g,this._getFormatConfig(a));b(c).each(function(){b(this).val(l)})}},noWeekends:function(a){a=a.getDay();return[0<a&&6>a,""]},iso8601Week:function(a){var c=new Date(a.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)/864E5)/7)+1},parseDate:function(a,c,f){if(null==a||null==c)throw"Invalid arguments";c="object"===typeof c?c.toString():c+
"";if(""===c)return null;var g,l=0;var n=(f?f.shortYearCutoff:null)||this._defaults.shortYearCutoff;n="string"!==typeof n?n:(new Date).getFullYear()%100+parseInt(n,10);var q=(f?f.dayNamesShort:null)||this._defaults.dayNamesShort;var u=(f?f.dayNames:null)||this._defaults.dayNames,m=(f?f.monthNamesShort:null)||this._defaults.monthNamesShort,p=(f?f.monthNames:null)||this._defaults.monthNames,r=f=-1,t=-1,v=-1,x=!1,w=function(B){(B=g+1<a.length&&a.charAt(g+1)===B)&&g++;return B},D=function(B){var F=w(B);
B=new RegExp("^\\d{1,"+("@"===B?14:"!"===B?20:"y"===B&&F?4:"o"===B?3:2)+"}");B=c.substring(l).match(B);if(!B)throw"Missing number at position "+l;l+=B[0].length;return parseInt(B[0],10)},z=function(B,F,M){var K=-1;B=b.map(w(B)?M:F,function(I,N){return[[N,I]]}).sort(function(I,N){return-(I[1].length-N[1].length)});b.each(B,function(I,N){I=N[1];if(c.substr(l,I.length).toLowerCase()===I.toLowerCase())return K=N[0],l+=I.length,!1});if(-1!==K)return K+1;throw"Unknown name at position "+l;},A=function(){if(c.charAt(l)!==
a.charAt(g))throw"Unexpected literal at position "+l;l++};for(g=0;g<a.length;g++)if(x)"'"!==a.charAt(g)||w("'")?A():x=!1;else switch(a.charAt(g)){case "d":t=D("d");break;case "D":z("D",q,u);break;case "o":v=D("o");break;case "m":r=D("m");break;case "M":r=z("M",m,p);break;case "y":f=D("y");break;case "@":var y=new Date(D("@"));f=y.getFullYear();r=y.getMonth()+1;t=y.getDate();break;case "!":y=new Date((D("!")-this._ticksTo1970)/1E4);f=y.getFullYear();r=y.getMonth()+1;t=y.getDate();break;case "'":w("'")?
A():x=!0;break;default:A()}if(l<c.length&&(q=c.substr(l),!/^\s+/.test(q)))throw"Extra/unparsed characters found in date: "+q;-1===f?f=(new Date).getFullYear():100>f&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=n?0:-100));if(-1<v){r=1;t=v;do{n=this._getDaysInMonth(f,r-1);if(t<=n)break;r++;t-=n}while(1)}y=this._daylightSavingAdjust(new Date(f,r-1,t));if(y.getFullYear()!==f||y.getMonth()+1!==r||y.getDate()!==t)throw"Invalid date";return y},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:62135596800*1E7,formatDate:function(a,c,f){if(!c)return"";var g,l=(f?f.dayNamesShort:null)||this._defaults.dayNamesShort,n=(f?f.dayNames:null)||this._defaults.dayNames,q=(f?f.monthNamesShort:null)||this._defaults.monthNamesShort;f=(f?f.monthNames:null)||this._defaults.monthNames;var u=function(v){(v=g+1<a.length&&a.charAt(g+1)===v)&&
g++;return v},m=function(v,x,w){x=""+x;if(u(v))for(;x.length<w;)x="0"+x;return x},p=function(v,x,w,D){return u(v)?D[x]:w[x]},r="",t=!1;if(c)for(g=0;g<a.length;g++)if(t)"'"!==a.charAt(g)||u("'")?r+=a.charAt(g):t=!1;else switch(a.charAt(g)){case "d":r+=m("d",c.getDate(),2);break;case "D":r+=p("D",c.getDay(),l,n);break;case "o":r+=m("o",Math.round(((new Date(c.getFullYear(),c.getMonth(),c.getDate())).getTime()-(new Date(c.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":r+=m("m",c.getMonth()+
1,2);break;case "M":r+=p("M",c.getMonth(),q,f);break;case "y":r+=u("y")?c.getFullYear():(10>c.getYear()%100?"0":"")+c.getYear()%100;break;case "@":r+=c.getTime();break;case "!":r+=1E4*c.getTime()+this._ticksTo1970;break;case "'":u("'")?r+="'":t=!0;break;default:r+=a.charAt(g)}return r},_possibleChars:function(a){var c,f="",g=!1,l=function(n){(n=c+1<a.length&&a.charAt(c+1)===n)&&c++;return n};for(c=0;c<a.length;c++)if(g)"'"!==a.charAt(c)||l("'")?f+=a.charAt(c):g=!1;else switch(a.charAt(c)){case "d":case "m":case "y":case "@":f+=
"0123456789";break;case "D":case "M":return null;case "'":l("'")?f+="'":g=!0;break;default:f+=a.charAt(c)}return f},_get:function(a,c){return a.settings[c]!==C?a.settings[c]:this._defaults[c]},_setDateFromField:function(a,c){if(a.input.val()!==a.lastVal){var f=this._get(a,"dateFormat"),g=a.lastVal=a.input?a.input.val():null,l=this._getDefaultDate(a),n=l,q=this._getFormatConfig(a);try{n=this.parseDate(f,g,q)||l}catch(u){g=c?"":g}a.selectedDay=n.getDate();a.drawMonth=a.selectedMonth=n.getMonth();a.drawYear=
a.selectedYear=n.getFullYear();a.currentDay=g?n.getDate():0;a.currentMonth=g?n.getMonth():0;a.currentYear=g?n.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,c,f){var g=function(n){var q=new Date;q.setDate(q.getDate()+n);return q},l=function(n){try{return b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),n,b.datepicker._getFormatConfig(a))}catch(t){}var q=
(n.toLowerCase().match(/^c/)?b.datepicker._getDate(a):null)||new Date,u=q.getFullYear(),m=q.getMonth();q=q.getDate();for(var p=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=p.exec(n);r;){switch(r[2]||"d"){case "d":case "D":q+=parseInt(r[1],10);break;case "w":case "W":q+=7*parseInt(r[1],10);break;case "m":case "M":m+=parseInt(r[1],10);q=Math.min(q,b.datepicker._getDaysInMonth(u,m));break;case "y":case "Y":u+=parseInt(r[1],10),q=Math.min(q,b.datepicker._getDaysInMonth(u,m))}r=p.exec(n)}return new Date(u,
m,q)};if(c=(c=null==c||""===c?f:"string"===typeof c?l(c):"number"===typeof c?isNaN(c)?f:g(c):new Date(c.getTime()))&&"Invalid Date"===c.toString()?f: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(12<a.getHours()?a.getHours()+2:0);return a},_setDate:function(a,c,f){var g=!c,l=a.selectedMonth,n=a.selectedYear;c=this._restrictMinMax(a,this._determineDate(a,c,new Date));a.selectedDay=
a.currentDay=c.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=c.getMonth();a.drawYear=a.selectedYear=a.currentYear=c.getFullYear();l===a.selectedMonth&&n===a.selectedYear||f||this._notifyChange(a);this._adjustInstDate(a);a.input&&a.input.val(g?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_attachHandlers:function(a){var c=this._get(a,"stepMonths"),f="#"+a.id.replace(/\\\\/g,
"\\");a.dpDiv.find("[data-handler]").map(function(){b(this).bind(this.getAttribute("data-event"),{prev:function(){b.datepicker._adjustDate(f,-c,"M")},next:function(){b.datepicker._adjustDate(f,+c,"M")},hide:function(){b.datepicker._hideDatepicker()},today:function(){b.datepicker._gotoToday(f)},selectDay:function(){b.datepicker._selectDay(f,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return!1},selectMonth:function(){b.datepicker._selectMonthYear(f,this,"M");return!1},selectYear:function(){b.datepicker._selectMonthYear(f,
this,"Y");return!1}}[this.getAttribute("data-handler")])})},_generateHTML:function(a){var c,f,g,l,n=new Date;n=this._daylightSavingAdjust(new Date(n.getFullYear(),n.getMonth(),n.getDate()));var q=this._get(a,"isRTL");var u=this._get(a,"showButtonPanel");var m=this._get(a,"hideIfNoPrevNext");var p=this._get(a,"navigationAsDateFormat");var r=this._getNumberOfMonths(a),t=this._get(a,"showCurrentAtPos");var v=this._get(a,"stepMonths");var x=1!==r[0]||1!==r[1],w=this._daylightSavingAdjust(a.currentDay?
new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),D=this._getMinMaxDate(a,"min"),z=this._getMinMaxDate(a,"max");t=a.drawMonth-t;var A=a.drawYear;0>t&&(t+=12,A--);if(z){var y=this._daylightSavingAdjust(new Date(z.getFullYear(),z.getMonth()-r[0]*r[1]+1,z.getDate()));for(y=D&&y<D?D:y;this._daylightSavingAdjust(new Date(A,t,1))>y;)t--,0>t&&(t=11,A--)}a.drawMonth=t;a.drawYear=A;y=this._get(a,"prevText");y=p?this.formatDate(y,this._daylightSavingAdjust(new Date(A,t-v,1)),this._getFormatConfig(a)):
y;y=this._canAdjustMonth(a,-1,A,t)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+y+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"e":"w")+"'>"+y+"</span></a>":m?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+y+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"e":"w")+"'>"+y+"</span></a>";var B=this._get(a,"nextText");B=p?this.formatDate(B,this._daylightSavingAdjust(new Date(A,t+v,1)),this._getFormatConfig(a)):B;
m=this._canAdjustMonth(a,1,A,t)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+B+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"w":"e")+"'>"+B+"</span></a>":m?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+B+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"w":"e")+"'>"+B+"</span></a>";v=this._get(a,"currentText");B=this._get(a,"gotoCurrent")&&a.currentDay?w:n;v=p?this.formatDate(v,B,this._getFormatConfig(a)):v;p=
a.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(a,"closeText")+"</button>";u=u?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(q?p:"")+(this._isInRange(a,B)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+v+"</button>":"")+(q?"":p)+"</div>":"";p=parseInt(this._get(a,"firstDay"),
10);p=isNaN(p)?0:p;v=this._get(a,"showWeek");B=this._get(a,"dayNames");var F=this._get(a,"dayNamesMin");var M=this._get(a,"monthNames");var K=this._get(a,"monthNamesShort");var I=this._get(a,"beforeShowDay");var N=this._get(a,"showOtherMonths");var S=this._get(a,"selectOtherMonths");var T=this._getDefaultDate(a);var U="";H;for(c=0;c<r[0];c++){var G="";this.maxRows=4;for(f=0;f<r[1];f++){var Q=this._daylightSavingAdjust(new Date(A,t,a.selectedDay));var H=" ui-corner-all";var L="";if(x){L+="<div class='ui-datepicker-group";
if(1<r[1])switch(f){case 0:L+=" ui-datepicker-group-first";H=" ui-corner-"+(q?"right":"left");break;case r[1]-1:L+=" ui-datepicker-group-last";H=" ui-corner-"+(q?"left":"right");break;default:L+=" ui-datepicker-group-middle",H=""}L+="'>"}L+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+H+"'>"+(/all|left/.test(H)&&0===c?q?m:y:"")+(/all|right/.test(H)&&0===c?q?y:m:"")+this._generateMonthYearHeader(a,t,A,D,z,0<c||0<f,M,K)+"</div><table class='ui-datepicker-calendar'><thead><tr>";
var J=v?"<th class='ui-datepicker-week-col'>"+this._get(a,"weekHeader")+"</th>":"";for(H=0;7>H;H++){var E=(H+p)%7;J+="<th"+(5<=(H+p+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+B[E]+"'>"+F[E]+"</span></th>"}L+=J+"</tr></thead><tbody>";J=this._getDaysInMonth(A,t);A===a.selectedYear&&t===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,J));H=(this._getFirstDayOfMonth(A,t)-p+7)%7;J=Math.ceil((H+J)/7);this.maxRows=J=x?this.maxRows>J?this.maxRows:J:J;E=this._daylightSavingAdjust(new Date(A,
t,1-H));for(g=0;g<J;g++){L+="<tr>";var R=v?"<td class='ui-datepicker-week-col'>"+this._get(a,"calculateWeek")(E)+"</td>":"";for(H=0;7>H;H++){var P=I?I.apply(a.input?a.input[0]:null,[E]):[!0,""];var O=(l=E.getMonth()!==t)&&!S||!P[0]||D&&E<D||z&&E>z;R+="<td class='"+(5<=(H+p+6)%7?" ui-datepicker-week-end":"")+(l?" ui-datepicker-other-month":"")+(E.getTime()===Q.getTime()&&t===a.selectedMonth&&a._keyEvent||T.getTime()===E.getTime()&&T.getTime()===Q.getTime()?" "+this._dayOverClass:"")+(O?" "+this._unselectableClass+
" ui-state-disabled":"")+(l&&!N?"":" "+P[1]+(E.getTime()===w.getTime()?" "+this._currentClass:"")+(E.getTime()===n.getTime()?" ui-datepicker-today":""))+"'"+(l&&!N||!P[2]?"":" title='"+P[2].replace(/'/g,"&#39;")+"'")+(O?"":" data-handler='selectDay' data-event='click' data-month='"+E.getMonth()+"' data-year='"+E.getFullYear()+"'")+">"+(l&&!N?"&#xa0;":O?"<span class='ui-state-default'>"+E.getDate()+"</span>":"<a class='ui-state-default"+(E.getTime()===n.getTime()?" ui-state-highlight":"")+(E.getTime()===
w.getTime()?" ui-state-active":"")+(l?" ui-priority-secondary":"")+"' href='#'>"+E.getDate()+"</a>")+"</td>";E.setDate(E.getDate()+1);E=this._daylightSavingAdjust(E)}L+=R+"</tr>"}t++;11<t&&(t=0,A++);L+="</tbody></table>"+(x?"</div>"+(0<r[0]&&f===r[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"");G+=L}U+=G}a._keyEvent=!1;return U+u},_generateMonthYearHeader:function(a,c,f,g,l,n,q,u){var m,p=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),t=this._get(a,"showMonthAfterYear"),v="<div class='ui-datepicker-title'>",
x="";if(n||!p)x+="<span class='ui-datepicker-month'>"+q[c]+"</span>";else{q=g&&g.getFullYear()===f;var w=l&&l.getFullYear()===f;x+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";for(m=0;12>m;m++)(!q||m>=g.getMonth())&&(!w||m<=l.getMonth())&&(x+="<option value='"+m+"'"+(m===c?" selected='selected'":"")+">"+u[m]+"</option>");x+="</select>"}t||(v+=x+(!n&&p&&r?"":"&#xa0;"));if(!a.yearshtml)if(a.yearshtml="",n||!r)v+="<span class='ui-datepicker-year'>"+f+"</span>";
else{u=this._get(a,"yearRange").split(":");var D=(new Date).getFullYear();q=function(z){z=z.match(/c[+\-].*/)?f+parseInt(z.substring(1),10):z.match(/[+\-].*/)?D+parseInt(z,10):parseInt(z,10);return isNaN(z)?D:z};c=q(u[0]);u=Math.max(c,q(u[1]||""));c=g?Math.max(c,g.getFullYear()):c;u=l?Math.min(u,l.getFullYear()):u;for(a.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";c<=u;c++)a.yearshtml+="<option value='"+c+"'"+(c===f?" selected='selected'":"")+">"+
c+"</option>";a.yearshtml+="</select>";v+=a.yearshtml;a.yearshtml=null}v+=this._get(a,"yearSuffix");t&&(v+=(!n&&p&&r?"":"&#xa0;")+x);return v+"</div>"},_adjustInstDate:function(a,c,f){var g=a.drawYear+("Y"===f?c:0),l=a.drawMonth+("M"===f?c:0);c=Math.min(a.selectedDay,this._getDaysInMonth(g,l))+("D"===f?c:0);g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(g,l,c)));a.selectedDay=g.getDate();a.drawMonth=a.selectedMonth=g.getMonth();a.drawYear=a.selectedYear=g.getFullYear();"M"!==f&&"Y"!==
f||this._notifyChange(a)},_restrictMinMax:function(a,c){var f=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");c=f&&c<f?f:c;return a&&c>a?a:c},_notifyChange:function(a){var c=this._get(a,"onChangeMonthYear");c&&c.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return null==a?[1,1]:"number"===typeof a?[1,a]:a},_getMinMaxDate:function(a,c){return this._determineDate(a,this._get(a,c+"Date"),null)},_getDaysInMonth:function(a,
c){return 32-this._daylightSavingAdjust(new Date(a,c,32)).getDate()},_getFirstDayOfMonth:function(a,c){return(new Date(a,c,1)).getDay()},_canAdjustMonth:function(a,c,f,g){var l=this._getNumberOfMonths(a);f=this._daylightSavingAdjust(new Date(f,g+(0>c?c:l[0]*l[1]),1));0>c&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth()));return this._isInRange(a,f)},_isInRange:function(a,c){var f=this._getMinMaxDate(a,"min"),g=this._getMinMaxDate(a,"max"),l=null,n=null;if(a=this._get(a,"yearRange")){a=
a.split(":");var q=(new Date).getFullYear();l=parseInt(a[0],10);n=parseInt(a[1],10);a[0].match(/[+\-].*/)&&(l+=q);a[1].match(/[+\-].*/)&&(n+=q)}return(!f||c.getTime()>=f.getTime())&&(!g||c.getTime()<=g.getTime())&&(!l||c.getFullYear()>=l)&&(!n||c.getFullYear()<=n)},_getFormatConfig:function(a){var c=this._get(a,"shortYearCutoff");c="string"!==typeof c?c:(new Date).getFullYear()%100+parseInt(c,10);return{shortYearCutoff:c,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),
monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,c,f,g){c||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);c=c?"object"===typeof c?c:this._daylightSavingAdjust(new Date(g,f,c)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),c,this._getFormatConfig(a))}});b.fn.datepicker=function(a){if(!this.length)return this;b.datepicker.initialized||
(b(document).mousedown(b.datepicker._checkExternalClick),b.datepicker.initialized=!0);0===b("#"+b.datepicker._mainDivId).length&&b("body").append(b.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"===typeof a&&("isDisabled"===a||"getDate"===a||"widget"===a)||"option"===a&&2===arguments.length&&"string"===typeof arguments[1]?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(c)):this.each(function(){"string"===typeof a?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,
[this].concat(c)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new e;b.datepicker.initialized=!1;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.10.4"})(jQuery);
(function(b,C){b.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=!1;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+
this.eventNamespace,b.proxy(function(e){this.options.disabled&&e.preventDefault()},this));this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(e){var h=b(e.target).closest(".ui-menu-item");!this.mouseHandled&&h.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||
(this.mouseHandled=!0),h.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&b(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var h=b(e.currentTarget);h.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(e,h)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,
h){var k=this.active||this.element.children(".ui-menu-item").eq(0);h||this.focus(e,k)},blur:function(e){this._delay(function(){b.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(e){b(e.target).closest(".ui-menu").length||this.collapseAll(e);this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();
this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=b(this);e.data("ui-menu-submenu-carat")&&e.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function h(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,
"\\$&")}var k=!0;switch(e.keyCode){case b.ui.keyCode.PAGE_UP:this.previousPage(e);break;case b.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case b.ui.keyCode.HOME:this._move("first","first",e);break;case b.ui.keyCode.END:this._move("last","last",e);break;case b.ui.keyCode.UP:this.previous(e);break;case b.ui.keyCode.DOWN:this.next(e);break;case b.ui.keyCode.LEFT:this.collapse(e);break;case b.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case b.ui.keyCode.ENTER:case b.ui.keyCode.SPACE:this._activate(e);
break;case b.ui.keyCode.ESCAPE:this.collapse(e);break;default:k=!1;var d=this.previousFilter||"";var a=String.fromCharCode(e.keyCode);var c=!1;clearTimeout(this.filterTimer);a===d?c=!0:a=d+a;var f=new RegExp("^"+h(a),"i");d=this.activeMenu.children(".ui-menu-item").filter(function(){return f.test(b(this).children("a").text())});d=c&&-1!==d.index(this.active.next())?this.active.nextAll(".ui-menu-item"):d;d.length||(a=String.fromCharCode(e.keyCode),f=new RegExp("^"+h(a),"i"),d=this.activeMenu.children(".ui-menu-item").filter(function(){return f.test(b(this).children("a").text())}));
d.length?(this.focus(e,d),1<d.length?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)):delete this.previousFilter):delete this.previousFilter}k&&e.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var e=this.options.icons.submenu;var h=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length);
h.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var k=b(this),d=k.prev("a"),a=b("<span>").addClass("ui-menu-icon ui-icon "+e).data("ui-menu-submenu-carat",!0);d.attr("aria-haspopup","true").prepend(a);k.attr("aria-labelledby",d.attr("id"))});h=h.add(this.element);h.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,
role:this._itemRole()});h.children(":not(.ui-menu-item)").each(function(){var k=b(this);/[^\-\u2014\u2013\s]/.test(k.text())||k.addClass("ui-widget-content ui-menu-divider")});h.children(".ui-state-disabled").attr("aria-disabled","true");this.active&&!b.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,h){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(h.submenu);
this._super(e,h)},focus:function(e,h){this.blur(e,e&&"focus"===e.type);this._scrollIntoView(h);this.active=h.first();var k=this.active.children("a").addClass("ui-state-focus");this.options.role&&this.element.attr("aria-activedescendant",k.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);k=h.children(".ui-menu");k.length&&e&&/^mouse/.test(e.type)&&
this._startOpening(k);this.activeMenu=h.parent();this._trigger("focus",e,{item:h})},_scrollIntoView:function(e){if(this._hasScroll()){var h=parseFloat(b.css(this.activeMenu[0],"borderTopWidth"))||0;var k=parseFloat(b.css(this.activeMenu[0],"paddingTop"))||0;h=e.offset().top-this.activeMenu.offset().top-h-k;k=this.activeMenu.scrollTop();var d=this.activeMenu.height();e=e.height();0>h?this.activeMenu.scrollTop(k+h):h+e>d&&this.activeMenu.scrollTop(k+h-d+e)}},blur:function(e,h){h||clearTimeout(this.timer);
this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer);"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close();this._open(e)},this.delay))},_open:function(e){var h=b.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true");e.show().removeAttr("aria-hidden").attr("aria-expanded",
"true").position(h)},collapseAll:function(e,h){clearTimeout(this.timer);this.timer=this._delay(function(){var k=h?this.element:b(e&&e.target).closest(this.element.find(".ui-menu"));k.length||(k=this.element);this._close(k);this.blur(e);this.activeMenu=k},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element);e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var h=
this.active&&this.active.parent().closest(".ui-menu-item",this.element);h&&h.length&&(this._close(),this.focus(e,h))},expand:function(e){var h=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();h&&h.length&&(this._open(h.parent()),this._delay(function(){this.focus(e,h)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&
!this.active.nextAll(".ui-menu-item").length},_move:function(e,h,k){var d;this.active&&(d="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0));d&&d.length&&this.active||(d=this.activeMenu.children(".ui-menu-item")[h]());this.focus(k,d)},nextPage:function(e){var h;if(!this.active)this.next(e);else if(!this.isLastItem())if(this._hasScroll()){var k=this.active.offset().top;var d=this.element.height();this.active.nextAll(".ui-menu-item").each(function(){h=
b(this);return 0>h.offset().top-k-d});this.focus(e,h)}else this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())},previousPage:function(e){var h;if(!this.active)this.next(e);else if(!this.isFirstItem())if(this._hasScroll()){var k=this.active.offset().top;var d=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){h=b(this);return 0<h.offset().top-k+d});this.focus(e,h)}else this.focus(e,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.outerHeight()<
this.element.prop("scrollHeight")},select:function(e){this.active=this.active||b(e.target).closest(".ui-menu-item");var h={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0);this._trigger("select",e,h)}})})(jQuery);
(function(b,C){b.widget("ui.progressbar",{version:"1.10.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove()},value:function(e){if(e===C)return this.options.value;this.options.value=this._constrainedValue(e);this._refreshValue()},_constrainedValue:function(e){e===C&&(e=this.options.value);this.indeterminate=!1===e;"number"!==typeof e&&(e=0);return this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var h=e.value;delete e.value;this._super(e);this.options.value=this._constrainedValue(h);this._refreshValue()},_setOption:function(e,h){"max"===
e&&(h=Math.max(this.min,h));this._super(e,h)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,h=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(h.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||
(this.overlayDiv=b("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==e&&(this.oldValue=e,this._trigger("change"));e===this.options.max&&this._trigger("complete")}})})(jQuery);
(function(b,C){b.widget("ui.slider",b.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this._refresh();
this._setOption("disabled",this.options.disabled);this._animateOff=!1},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var e=this.options;var h=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),k=[];var d=e.values&&e.values.length||1;h.length>d&&(h.slice(d).remove(),h=h.slice(0,d));for(e=h.length;e<d;e++)k.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
this.handles=h.add(b(k.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.each(function(a){b(this).data("ui-slider-handle-index",a)})},_createRange:function(){var e=this.options,h="";e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:b.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",
bottom:""}):(this.range=b("<div></div>").appendTo(this.element),h="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(h+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e);this._on(e,this._handleEvents);this._hoverable(e);this._focusable(e)},_destroy:function(){this.handles.remove();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 h,k,d=this,a=this.options;if(a.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var c=this._normValueFromMouse({x:e.pageX,y:e.pageY});var f=this._valueMax()-this._valueMin()+1;this.handles.each(function(l){var n=Math.abs(c-d.values(l));if(f>n||f===n&&(l===d._lastChangedValue||d.values(l)===a.min))f=n,h=b(this),k=l});if(!1===this._start(e,k))return!1;this._mouseSliding=
!0;this._handleIndex=k;h.addClass("ui-state-active").focus();var g=h.offset();this._clickOffset=b(e.target).parents().addBack().is(".ui-slider-handle")?{left:e.pageX-g.left-h.width()/2,top:e.pageY-g.top-h.height()/2-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)}:{left:0,top:0};this.handles.hasClass("ui-state-hover")||this._slide(e,k,c);return this._animateOff=!0},_mouseStart:function(){return!0},_mouseDrag:function(e){var h=
this._normValueFromMouse({x:e.pageX,y:e.pageY});this._slide(e,this._handleIndex,h);return!1},_mouseStop:function(e){this.handles.removeClass("ui-state-active");this._mouseSliding=!1;this._stop(e,this._handleIndex);this._change(e,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){if("horizontal"===this.orientation){var h=
this.elementSize.width;e=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else h=this.elementSize.height,e=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0);h=e/h;1<h&&(h=1);0>h&&(h=0);"vertical"===this.orientation&&(h=1-h);e=this._valueMax()-this._valueMin();h=this._valueMin()+h*e;return this._trimAlignValue(h)},_start:function(e,h){var k={handle:this.handles[h],value:this.value()};this.options.values&&this.options.values.length&&(k.value=this.values(h),
k.values=this.values());return this._trigger("start",e,k)},_slide:function(e,h,k){if(this.options.values&&this.options.values.length){var d=this.values(h?0:1);2===this.options.values.length&&!0===this.options.range&&(0===h&&k>d||1===h&&k<d)&&(k=d);k!==this.values(h)&&(d=this.values(),d[h]=k,e=this._trigger("slide",e,{handle:this.handles[h],value:k,values:d}),this.values(h?0:1),!1!==e&&this.values(h,k))}else k!==this.value()&&(e=this._trigger("slide",e,{handle:this.handles[h],value:k}),!1!==e&&this.value(k))},
_stop:function(e,h){var k={handle:this.handles[h],value:this.value()};this.options.values&&this.options.values.length&&(k.value=this.values(h),k.values=this.values());this._trigger("stop",e,k)},_change:function(e,h){if(!this._keySliding&&!this._mouseSliding){var k={handle:this.handles[h],value:this.value()};this.options.values&&this.options.values.length&&(k.value=this.values(h),k.values=this.values());this._lastChangedValue=h;this._trigger("change",e,k)}},value:function(e){if(arguments.length)this.options.value=
this._trimAlignValue(e),this._refreshValue(),this._change(null,0);else return this._value()},values:function(e,h){var k;if(1<arguments.length)this.options.values[e]=this._trimAlignValue(h),this._refreshValue(),this._change(null,e);else if(arguments.length)if(b.isArray(arguments[0])){var d=this.options.values;var a=arguments[0];for(k=0;k<d.length;k+=1)d[k]=this._trimAlignValue(a[k]),this._change(null,k);this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(e):
this.value();else return this._values()},_setOption:function(e,h){var k,d=0;"range"===e&&!0===this.options.range&&("min"===h?(this.options.value=this._values(0),this.options.values=null):"max"===h&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null));b.isArray(this.options.values)&&(d=this.options.values.length);b.Widget.prototype._setOption.apply(this,arguments);switch(e){case "orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+
this.orientation);this._refreshValue();break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(k=0;k<d;k+=1)this._change(null,k);this._animateOff=!1;break;case "min":case "max":this._animateOff=!0;this._refreshValue();this._animateOff=!1;break;case "range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},
_values:function(e){var h;if(arguments.length){var k=this.options.values[e];return k=this._trimAlignValue(k)}if(this.options.values&&this.options.values.length){k=this.options.values.slice();for(h=0;h<k.length;h+=1)k[h]=this._trimAlignValue(k[h]);return k}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var h=0<this.options.step?this.options.step:1,k=(e-this._valueMin())%h;e-=k;2*Math.abs(k)>=h&&(e+=0<k?h:-h);return parseFloat(e.toFixed(5))},
_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,h=this.options.range,k=this.options,d=this,a=this._animateOff?!1:k.animate,c={};if(this.options.values&&this.options.values.length)this.handles.each(function(q){n=(d.values(q)-d._valueMin())/(d._valueMax()-d._valueMin())*100;c["horizontal"===d.orientation?"left":"bottom"]=n+"%";b(this).stop(1,1)[a?"animate":"css"](c,k.animate);if(!0===d.options.range)if("horizontal"===d.orientation){if(0===
q)d.range.stop(1,1)[a?"animate":"css"]({left:n+"%"},k.animate);if(1===q)d.range[a?"animate":"css"]({width:n-e+"%"},{queue:!1,duration:k.animate})}else{if(0===q)d.range.stop(1,1)[a?"animate":"css"]({bottom:n+"%"},k.animate);if(1===q)d.range[a?"animate":"css"]({height:n-e+"%"},{queue:!1,duration:k.animate})}e=n});else{var f=this.value();var g=this._valueMin();var l=this._valueMax();var n=l!==g?(f-g)/(l-g)*100:0;c["horizontal"===this.orientation?"left":"bottom"]=n+"%";this.handle.stop(1,1)[a?"animate":
"css"](c,k.animate);if("min"===h&&"horizontal"===this.orientation)this.range.stop(1,1)[a?"animate":"css"]({width:n+"%"},k.animate);if("max"===h&&"horizontal"===this.orientation)this.range[a?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:k.animate});if("min"===h&&"vertical"===this.orientation)this.range.stop(1,1)[a?"animate":"css"]({height:n+"%"},k.animate);if("max"===h&&"vertical"===this.orientation)this.range[a?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:k.animate})}},_handleEvents:{keydown:function(e){var h,
k=b(e.target).data("ui-slider-handle-index");switch(e.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding){this._keySliding=!0;b(e.target).addClass("ui-state-active");var d=this._start(e,k);if(!1===d)return}}var a=this.options.step;d=this.options.values&&this.options.values.length?h=this.values(k):h=this.value();
switch(e.keyCode){case b.ui.keyCode.HOME:h=this._valueMin();break;case b.ui.keyCode.END:h=this._valueMax();break;case b.ui.keyCode.PAGE_UP:h=this._trimAlignValue(d+(this._valueMax()-this._valueMin())/5);break;case b.ui.keyCode.PAGE_DOWN:h=this._trimAlignValue(d-(this._valueMax()-this._valueMin())/5);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(d===this._valueMax())return;h=this._trimAlignValue(d+a);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(d===this._valueMin())return;h=this._trimAlignValue(d-
a)}this._slide(e,k,h)},click:function(e){e.preventDefault()},keyup:function(e){var h=b(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,h),this._change(e,h),b(e.target).removeClass("ui-state-active"))}}})})(jQuery);
(function(b){function C(e){return function(){var h=this.element.val();e.apply(this,arguments);this._refresh();h!==this.element.val()&&this._trigger("change")}}b.widget("ui.spinner",{version:"1.10.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);
this._setOption("min",this.options.min);this._setOption("step",this.options.step);""!==this.value()&&this._value(this.element.val(),!0);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},h=this.element;b.each(["min","max","step"],function(k,d){k=h.attr(d);void 0!==k&&k.length&&(e[d]=k)});return e},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},
keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e))},mousewheel:function(e,h){if(h){if(!this.spinning&&!this._start(e))return!1;this._spin((0<h?1:-1)*this.options.step,e);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100);e.preventDefault()}},"mousedown .ui-spinner-button":function(e){function h(){this.element[0]!==
this.document[0].activeElement&&(this.element.focus(),this.previous=k,this._delay(function(){this.previous=k}))}var k=this.element[0]===this.document[0].activeElement?this.previous:this.element.val();e.preventDefault();h.call(this);this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur;h.call(this)});!1!==this._start(e)&&this._repeat(null,b(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(b(e.currentTarget).hasClass("ui-state-active")){if(!1===
this._start(e))return!1;this._repeat(null,b(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)}},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");this.buttons.height()>Math.ceil(.5*e.height())&&0<e.height()&&
e.height(e.height());this.options.disabled&&this.disable()},_keydown:function(e){var h=this.options,k=b.ui.keyCode;switch(e.keyCode){case k.UP:return this._repeat(null,1,e),!0;case k.DOWN:return this._repeat(null,-1,e),!0;case k.PAGE_UP:return this._repeat(null,h.page,e),!0;case k.PAGE_DOWN:return this._repeat(null,-h.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+
this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(e){if(!this.spinning&&!1===this._trigger("start",e))return!1;this.counter||(this.counter=1);return this.spinning=!0},_repeat:function(e,h,k){e=e||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,h,k)},e);this._spin(h*this.options.step,k)},_spin:function(e,h){var k=this.value()||0;this.counter||
(this.counter=1);k=this._adjustValue(k+e*this._increment(this.counter));this.spinning&&!1===this._trigger("spin",h,{value:k})||(this._value(k),this.counter++)},_increment:function(e){var h=this.options.incremental;return h?b.isFunction(h)?h(e):Math.floor(e*e*e/5E4-e*e/500+17*e/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min)));return e},_precisionOf:function(e){e=e.toString();var h=e.indexOf(".");
return-1===h?0:e.length-h-1},_adjustValue:function(e){var h=this.options;var k=null!==h.min?h.min:0;e=k+Math.round((e-k)/h.step)*h.step;e=parseFloat(e.toFixed(this._precision()));return null!==h.max&&e>h.max?h.max:null!==h.min&&e<h.min?h.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,h){if("culture"===e||"numberFormat"===e){var k=this._parse(this.element.val());this.options[e]=
h;this.element.val(this._format(k))}else"max"!==e&&"min"!==e&&"step"!==e||"string"!==typeof h||(h=this._parse(h)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(h.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(h.down)),this._super(e,h),"disabled"===e&&(h?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:C(function(e){this._super(e);
this._value(this.element.val())}),_parse:function(e){"string"===typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e);return""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},
_value:function(e,h){if(""!==e){var k=this._parse(e);null!==k&&(h||(k=this._adjustValue(k)),e=this._format(k))}this.element.val(e);this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.uiSpinner.replaceWith(this.element)},stepUp:C(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),
this._stop())},stepDown:C(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:C(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:C(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());C(this._value).call(this,e)},widget:function(){return this.uiSpinner}})})(jQuery);
(function(b,C){function e(d){d=d.cloneNode(!1);return 1<d.hash.length&&decodeURIComponent(d.href.replace(k,""))===decodeURIComponent(location.href.replace(k,""))}var h=0,k=/#.*$/;b.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var d=this,a=this.options;this.running=!1;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",
a.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(c){b(this).is(".ui-state-disabled")&&c.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){b(this).closest("li").is(".ui-state-disabled")&&this.blur()});this._processTabs();a.active=this._initialActive();b.isArray(a.disabled)&&(a.disabled=b.unique(a.disabled.concat(b.map(this.tabs.filter(".ui-state-disabled"),function(c){return d.tabs.index(c)}))).sort());this.active=!1!==this.options.active&&
this.anchors.length?this._findActive(a.active):b();this._refresh();this.active.length&&this.load(a.active)},_initialActive:function(){var d=this.options.active,a=this.options.collapsible,c=location.hash.substring(1);null===d&&(c&&this.tabs.each(function(f,g){if(b(g).attr("aria-controls")===c)return d=f,!1}),null===d&&(d=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null===d||-1===d)&&(d=this.tabs.length?0:!1);!1!==d&&(d=this.tabs.index(this.tabs.eq(d)),-1===d&&(d=a?!1:0));!a&&!1===d&&this.anchors.length&&
(d=0);return d},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):b()}},_tabKeydown:function(d){var a=b(this.document[0].activeElement).closest("li"),c=this.tabs.index(a),f=!0;if(!this._handlePageNav(d)){switch(d.keyCode){case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:c++;break;case b.ui.keyCode.UP:case b.ui.keyCode.LEFT:f=!1;c--;break;case b.ui.keyCode.END:c=this.anchors.length-1;break;case b.ui.keyCode.HOME:c=0;break;case b.ui.keyCode.SPACE:d.preventDefault();
clearTimeout(this.activating);this._activate(c);return;case b.ui.keyCode.ENTER:d.preventDefault();clearTimeout(this.activating);this._activate(c===this.options.active?!1:c);return;default:return}d.preventDefault();clearTimeout(this.activating);c=this._focusNextTab(c,f);d.ctrlKey||(a.attr("aria-selected","false"),this.tabs.eq(c).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",c)},this.delay))}},_panelKeydown:function(d){!this._handlePageNav(d)&&d.ctrlKey&&d.keyCode===
b.ui.keyCode.UP&&(d.preventDefault(),this.active.focus())},_handlePageNav:function(d){if(d.altKey&&d.keyCode===b.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(d.altKey&&d.keyCode===b.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(d,a){function c(){d>f&&(d=0);0>d&&(d=f);return d}for(var f=this.tabs.length-1;-1!==b.inArray(c(),this.options.disabled);)d=a?d+1:d-1;return d},_focusNextTab:function(d,
a){d=this._findNextTab(d,a);this.tabs.eq(d).focus();return d},_setOption:function(d,a){"active"===d?this._activate(a):"disabled"===d?this._setupDisabled(a):(this._super(d,a),"collapsible"===d&&(this.element.toggleClass("ui-tabs-collapsible",a),a||!1!==this.options.active||this._activate(0)),"event"===d&&this._setupEvents(a),"heightStyle"===d&&this._setupHeightStyle(a))},_tabId:function(d){return d.attr("aria-controls")||"ui-tabs-"+ ++h},_sanitizeSelector:function(d){return d?d.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,
"\\$&"):""},refresh:function(){var d=this.options,a=this.tablist.children(":has(a[href])");d.disabled=b.map(a.filter(".ui-state-disabled"),function(c){return a.index(c)});this._processTabs();!1!==d.active&&this.anchors.length?this.active.length&&!b.contains(this.tablist[0],this.active[0])?this.tabs.length===d.disabled.length?(d.active=!1,this.active=b()):this._activate(this._findNextTab(Math.max(0,d.active-1),!1)):d.active=this.tabs.index(this.active):(d.active=!1,this.active=b());this._refresh()},
_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true",
"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var d=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return b("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=
b();this.anchors.each(function(a,c){var f=b(c).uniqueId().attr("id"),g=b(c).closest("li"),l=g.attr("aria-controls");if(e(c)){c=c.hash;var n=d.element.find(d._sanitizeSelector(c))}else{var q=d._tabId(g);c="#"+q;n=d.element.find(c);n.length||(n=d._createPanel(q),n.insertAfter(d.panels[a-1]||d.tablist));n.attr("aria-live","polite")}n.length&&(d.panels=d.panels.add(n));l&&g.data("ui-tabs-aria-controls",l);g.attr({"aria-controls":c.substring(1),"aria-labelledby":f});n.attr("aria-labelledby",f)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role",
"tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(d){return b("<div>").attr("id",d).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(d){b.isArray(d)&&(d.length?d.length===this.anchors.length&&(d=!0):d=!1);for(var a=0,c;c=this.tabs[a];a++)!0===d||-1!==b.inArray(a,d)?b(c).addClass("ui-state-disabled").attr("aria-disabled","true"):b(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");
this.options.disabled=d},_setupEvents:function(d){var a={click:function(c){c.preventDefault()}};d&&b.each(d.split(" "),function(c,f){a[f]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,a);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(d){var a=this.element.parent();if("fill"===d){var c=a.height();c-=this.element.outerHeight()-
this.element.height();this.element.siblings(":visible").each(function(){var f=b(this),g=f.css("position");"absolute"!==g&&"fixed"!==g&&(c-=f.outerHeight(!0))});this.element.children().not(this.panels).each(function(){c-=b(this).outerHeight(!0)});this.panels.each(function(){b(this).height(Math.max(0,c-b(this).innerHeight()+b(this).height()))}).css("overflow","auto")}else"auto"===d&&(c=0,this.panels.each(function(){c=Math.max(c,b(this).height("").height())}).height(c))},_eventHandler:function(d){var a=
this.options,c=this.active,f=b(d.currentTarget).closest("li"),g=f[0]===c[0],l=g&&a.collapsible,n=l?b():this._getPanelForTab(f),q=c.length?this._getPanelForTab(c):b();c={oldTab:c,oldPanel:q,newTab:l?b():f,newPanel:n};d.preventDefault();f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!a.collapsible||!1===this._trigger("beforeActivate",d,c)||(a.active=l?!1:this.tabs.index(f),this.active=g?b():f,this.xhr&&this.xhr.abort(),q.length||n.length||b.error("jQuery UI Tabs: Mismatching fragment identifier."),
n.length&&this.load(this.tabs.index(f),d),this._toggle(d,c))},_toggle:function(d,a){function c(){g.running=!1;g._trigger("activate",d,a)}function f(){a.newTab.closest("li").addClass("ui-tabs-active ui-state-active");l.length&&g.options.show?g._show(l,g.options.show,c):(l.show(),c())}var g=this,l=a.newPanel,n=a.oldPanel;this.running=!0;n.length&&this.options.hide?this._hide(n,this.options.hide,function(){a.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");f()}):(a.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),
n.hide(),f());n.attr({"aria-expanded":"false","aria-hidden":"true"});a.oldTab.attr("aria-selected","false");l.length&&n.length?a.oldTab.attr("tabIndex",-1):l.length&&this.tabs.filter(function(){return 0===b(this).attr("tabIndex")}).attr("tabIndex",-1);l.attr({"aria-expanded":"true","aria-hidden":"false"});a.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(d){d=this._findActive(d);d[0]!==this.active[0]&&(d.length||(d=this.active),d=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:d,
currentTarget:d,preventDefault:b.noop}))},_findActive:function(d){return!1===d?b():this.tabs.eq(d)},_getIndex:function(d){"string"===typeof d&&(d=this.anchors.index(this.anchors.filter("[href$='"+d+"']")));return d},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();
this.tabs.add(this.panels).each(function(){b.data(this,"ui-tabs-destroy")?b(this).remove():b(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")});this.tabs.each(function(){var d=b(this),a=d.data("ui-tabs-aria-controls");
a?d.attr("aria-controls",a).removeData("ui-tabs-aria-controls"):d.removeAttr("aria-controls")});this.panels.show();"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(d){var a=this.options.disabled;!1!==a&&(d===C?a=!1:(d=this._getIndex(d),a=b.isArray(a)?b.map(a,function(c){return c!==d?c:null}):b.map(this.tabs,function(c,f){return f!==d?f:null})),this._setupDisabled(a))},disable:function(d){var a=this.options.disabled;if(!0!==a){if(d===C)a=!0;else{d=this._getIndex(d);
if(-1!==b.inArray(d,a))return;a=b.isArray(a)?b.merge([d],a).sort():[d]}this._setupDisabled(a)}},load:function(d,a){d=this._getIndex(d);var c=this,f=this.tabs.eq(d);d=f.find(".ui-tabs-anchor");var g=this._getPanelForTab(f),l={tab:f,panel:g};e(d[0])||(this.xhr=b.ajax(this._ajaxSettings(d,a,l)))&&"canceled"!==this.xhr.statusText&&(f.addClass("ui-tabs-loading"),g.attr("aria-busy","true"),this.xhr.success(function(n){setTimeout(function(){g.html(n);c._trigger("load",a,l)},1)}).complete(function(n,q){setTimeout(function(){"abort"===
q&&c.panels.stop(!1,!0);f.removeClass("ui-tabs-loading");g.removeAttr("aria-busy");n===c.xhr&&delete c.xhr},1)}))},_ajaxSettings:function(d,a,c){var f=this;return{url:d.attr("href"),beforeSend:function(g,l){return f._trigger("beforeLoad",a,b.extend({jqXHR:g,ajaxSettings:l},c))}}},_getPanelForTab:function(d){d=b(d).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+d))}})})(jQuery);
(function(b){function C(k,d){var a=(k.attr("aria-describedby")||"").split(/\s+/);a.push(d);k.data("ui-tooltip-id",d).attr("aria-describedby",b.trim(a.join(" ")))}function e(k){var d=k.data("ui-tooltip-id"),a=(k.attr("aria-describedby")||"").split(/\s+/);d=b.inArray(d,a);-1!==d&&a.splice(d,1);k.removeData("ui-tooltip-id");(a=b.trim(a.join(" ")))?k.attr("aria-describedby",a):k.removeAttr("aria-describedby")}var h=0;b.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var k=b(this).attr("title")||
"";return b("<a>").text(k).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable()},_setOption:function(k,d){var a=this;"disabled"===k?(this[d?"_disable":"_enable"](),this.options[k]=d):(this._super(k,d),"content"===k&&b.each(this.tooltips,function(c,
f){a._updateContent(f)}))},_disable:function(){var k=this;b.each(this.tooltips,function(d,a){d=b.Event("blur");d.target=d.currentTarget=a[0];k.close(d,!0)});this.element.find(this.options.items).addBack().each(function(){var d=b(this);d.is("[title]")&&d.data("ui-tooltip-title",d.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var k=b(this);k.data("ui-tooltip-title")&&k.attr("title",k.data("ui-tooltip-title"))})},open:function(k){var d=
this,a=b(k?k.target:this.element).closest(this.options.items);a.length&&!a.data("ui-tooltip-id")&&(a.attr("title")&&a.data("ui-tooltip-title",a.attr("title")),a.data("ui-tooltip-open",!0),k&&"mouseover"===k.type&&a.parents().each(function(){var c=b(this);if(c.data("ui-tooltip-open")){var f=b.Event("blur");f.target=f.currentTarget=this;d.close(f,!0)}c.attr("title")&&(c.uniqueId(),d.parents[this.id]={element:this,title:c.attr("title")},c.attr("title",""))}),this._updateContent(a,k))},_updateContent:function(k,
d){var a=this.options.content;var c=this,f=d?d.type:null;if("string"===typeof a)return this._open(d,k,a);(a=a.call(k[0],function(g){k.data("ui-tooltip-open")&&c._delay(function(){d&&(d.type=f);this._open(d,k,g)})}))&&this._open(d,k,a)},_open:function(k,d,a){function c(n){f.of=n;g.is(":hidden")||g.position(f)}var f=b.extend({},this.options.position);if(a){var g=this._find(d);if(g.length)g.find(".ui-tooltip-content").html(a);else{d.is("[title]")&&(k&&"mouseover"===k.type?d.attr("title",""):d.removeAttr("title"));
g=this._tooltip(d);C(d,g.attr("id"));g.find(".ui-tooltip-content").html(a);this.options.track&&k&&/^mouse/.test(k.type)?(this._on(this.document,{mousemove:c}),c(k)):g.position(b.extend({of:d},this.options.position));g.hide();this._show(g,this.options.show);if(this.options.show&&this.options.show.delay)var l=this.delayedShow=setInterval(function(){g.is(":visible")&&(c(f.of),clearInterval(l))},b.fx.interval);this._trigger("open",k,{tooltip:g});a={keyup:function(n){n.keyCode===b.ui.keyCode.ESCAPE&&(n=
b.Event(n),n.currentTarget=d[0],this.close(n,!0))},remove:function(){this._removeTooltip(g)}};k&&"mouseover"!==k.type||(a.mouseleave="close");k&&"focusin"!==k.type||(a.focusout="close");this._on(!0,d,a)}}},close:function(k){var d=this,a=b(k?k.currentTarget:this.element),c=this._find(a);this.closing||(clearInterval(this.delayedShow),a.data("ui-tooltip-title")&&a.attr("title",a.data("ui-tooltip-title")),e(a),c.stop(!0),this._hide(c,this.options.hide,function(){d._removeTooltip(b(this))}),a.removeData("ui-tooltip-open"),
this._off(a,"mouseleave focusout keyup"),a[0]!==this.element[0]&&this._off(a,"remove"),this._off(this.document,"mousemove"),k&&"mouseleave"===k.type&&b.each(this.parents,function(f,g){b(g.element).attr("title",g.title);delete d.parents[f]}),this.closing=!0,this._trigger("close",k,{tooltip:c}),this.closing=!1)},_tooltip:function(k){var d="ui-tooltip-"+h++,a=b("<div>").attr({id:d,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));b("<div>").addClass("ui-tooltip-content").appendTo(a);
a.appendTo(this.document[0].body);this.tooltips[d]=k;return a},_find:function(k){return(k=k.data("ui-tooltip-id"))?b("#"+k):b()},_removeTooltip:function(k){k.remove();delete this.tooltips[k.attr("id")]},_destroy:function(){var k=this;b.each(this.tooltips,function(d,a){var c=b.Event("blur");c.target=c.currentTarget=a[0];k.close(c,!0);b("#"+d).remove();a.data("ui-tooltip-title")&&(a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))})}})})(jQuery);

var LoginReload=0;function checkZWLoginStatus(){return null==Get_Cookie("user_type")?0:1}function reloadWindow(){try{var a=Get_Cookie("bookmark"),b=Get_Cookie("sell_car_login"),c=Get_Cookie("mobile");del_cookie("bookmark","/","");""==a||null==a?window.location.href=SITEPATH:null!=b&&null!=c?(window.location.href=b,del_cookie("sell_car_login","/","")):window.location.href=a.split("#")[0]}catch(e){window.location.href=SITEPATH}}
function redirectToDealerRegistration(a){window.location.href="2Wheeler"==a?SITEPATH+"/sell-bikes/dealer-packages":SITEPATH+"/dealer-packages"}function loginCookies(a){Set_Cookie("USERID",a[1],"","/","","");Set_Cookie("USER_ID",a[1],"","/","","");Set_Cookie("NAME",a[2],"","/","","");Set_Cookie("LOGINNAME",a[2],"","/","","");Set_Cookie("EMAIL",a[3],"","/","","");Set_Cookie("USERTYPE",a[4],"","/","","");Set_Cookie("MOBILE",a[5],"","/","","")}
function logoutCookies(){del_cookie("USERID","/","");del_cookie("USER_ID","/","");del_cookie("NAME","/","");del_cookie("LOGINNAME","/","");del_cookie("EMAIL","/","");del_cookie("USERTYPE","/","");del_cookie("MOBILE","/","");del_cookie("user_image","/","");del_cookie("user_type","/","");del_cookie("name","/","");del_cookie("bookmark","/","")}
function setCookies(a,b){1==LoginReload&&(jQuery(".loginProcessingImage").show(),jQuery("#loginsignupbtn").attr("disable","disable").css({opacity:.6}),jQuery("#loginsignupbtn").removeAttr("onclick"));jQuery.get(SITEPATH+"/login_success.php",{ticketId:a,autologin:b},function(c){1==LoginReload?(LoginReload=0,reloadWindow()):1==b&&showWelcome()})}
function setFacebookCookies(a,b,c,e){Set_Cookie("fb_user_id",a,"","/","","");Set_Cookie("name",b,"","/","","");Set_Cookie("fb_profile_image",c,"","/","","");Set_Cookie("access_token",e,"","/","","")}function deleteFacebookCookies(){del_cookie("fb_user_id","/","");del_cookie("name","/","");del_cookie("fb_profile_image","/","");del_cookie("access_token","/","")}
function doAutoLogin(a){if(0==a||"undefined"==jQuery.trim(a)){a=Get_Cookie("bookmark");var b=Get_Cookie("USERTYPE");null!=a&&"undefined"!=a&&""!=a||"Dealer"!=b||(del_cookie("bookmark","/",""),Set_Cookie("bookmark",SITEPATH+"/dealer-account","","/","",""))}else del_cookie("bookmark","/",""),Set_Cookie("bookmark",SITEPATH+"/thanks.php?clgn=1","","/","","");reloadWindow()}
function validateForm(){jQuery(".alert").hide();jQuery(".loginProcessingImage").hide();var a=jQuery("#userLogin_emailId").val(),b=jQuery("#userLogin_password").val();if(""==a)return a="Please enter email ",jQuery("#userLogin_errordiv").html(a).show(),jQuery("#userLogin_emailId").focus(),!1;if(!isValidEmail(a))return a="Please enter a valid Email Address.",jQuery("#userLogin_errordiv").html(a).show(),jQuery("#userLogin_emailId").focus(),!1;if(""==b)return a="Please enter your password .",jQuery("#userLogin_errordiv").html(a).show(),
jQuery("#userLogin_password").focus(),!1;jQuery(".alert").hide();jQuery("#userLogin_password").val("");validateUserLogin(a,b);return!0}
function validateUserLogin(a,b){jQuery(".loginProcessingImage").show();jQuery.post(TODBFILEPATH+"/validateuserReview.php",{login:a,passwd:b,submittype:"checkUser"},function(c){null!=c&&"undefined"!=c&&""!=c?(del_cookie("gLoginV","/",""),LoginReload=1,setCookies(c,1)):jQuery("#userLogin_errordiv").html("Invalid User Credentials. Please try again..").show()});jQuery(".loginProcessingImage").hide();jQuery("#loginsignupbtn").removeAttr("disabled").css("opacity","1")}
function doSocialMediaLogin(a,b,c,e,d,f){del_cookie("gLoginV","/","");LoginReload=1;setCookies(f,1)}function update_user_box(a){"undefined"===typeof a&&(a=0);FB.login(function(b){b.authResponse&&updateUserBoxTOI(a)},{scope:"public_profile, user_posts, user_likes, user_friends, email, publish_actions"});return!1}
function updateUserBoxTOI(a){jQuery.post(SITEPATH+"/tpl/tplGetFacbookUserData.php",{login:"1"},function(b){b=eval("("+b+")");1==b.userStatusOn?(doSocialMediaLogin(b.fb_user_id,b.fb_email,b.access_token,b.fb_profile_image,b.fb_name,b.user_id),jQuery(".fbloginemaildiv").hide(),jQuery(".socialbutton").hide(),jQuery(".socialbutton1").show()):jQuery("#userLogin_errordiv").html("Please try again.").show()})}
function signInOrSignUpByFacebookId(a,b,c,e,d,f){0<jQuery("#fb_template").length&&jQuery("#fb_template").html('<div align="center"><img src=\''+IMAGEPATH+"/fb-loader.gif'></div>");password=d;usertype="Individual";newsletters=term="Yes";var g=jQuery("#reviewid").val();jQuery("#ajaxloder").show();jQuery.post(TODBFILEPATH+"/validateuserReview.php",{fb_profile_image:c,fb_name:b,fb_email:d,usertype:usertype,password:password,term:term,newsletters:newsletters,submittype:"facebook",reviewid:g,fb_user_id:a},
function(h){dataarray=h.split("_@@@_");1==dataarray[0]?(jQuery("#userLogin_errordiv").html("User already exist with same email."),jQuery("#userLogin_errordiv").css("display","block"),jQuery("#temp").val("0")):(setFacebookCookies(a,b,c,e),null!=url&&"undefined"!=url&&""!=url?window.location.href=url:"Dealer"==dataarray[4]?window.location.href="dealer-account":1==f?window.location.href=document.referrer:window.location.reload())})}
function zwsignOut(){var a=Get_Cookie("bookmark");""!=a&&null!=a||Set_Cookie("bookmark",location.href,"","/","","");jQuery.post(SITEPATH+"/user_logout.php",{zwlogout:"1"},function(b){showWelcome()});del_cookie("fb_user_id","/","");del_cookie("access_token","/","");del_cookie("user_type","/","")}
function signOut(){Set_Cookie("bookmark",location.href,"","/","","");""!=Get_Cookie("fb_user_id")&&null!=Get_Cookie("fb_user_id")?(deleteFacebookCookies(),FB.getLoginStatus(function(a){FB.logout(function(){})}),setTimeout(function(){window.location.href=SITEPATH+"/user_logout.php"},1E3)):(deleteFacebookCookies(),window.location.href=SITEPATH+"/user_logout.php")}function signOutFromZW(){}function autoClickZWLogin(){popup("individual")}
function popup(a){Get_Cookie("user_type");null==Get_Cookie("user_type")&&($("#userLoginModal .alert").hide(),jQuery("#userRegisterSubmitBtn, #loginsignupbtn, #forgetsubmitbutton").removeAttr("disabled").css("opacity","1"),$("#userLoginModal .loaderImg").hide(),jQuery("#userForgotPasswordDiv").hide(),jQuery("#userLoginDiv").show(),jQuery("#userLogin_emailId").focus(),a=Get_Cookie("bookmark"),""!=a&&null!=a||Set_Cookie("bookmark",location.href,"","/","",""),$("#userLoginModal").modal("show"))}
function checkLogin(){1!=checkZWLoginStatus()&&(logoutCookies(),deleteFacebookCookies());showWelcome()}function googlelogin(){$.ajax({type:"GET",url:SITEPATH+"/googleApi/index.php",data:{googleplusurl:"google"},cache:!1,success:function(a){Set_Cookie("gLoginV","new","","/","","");a=window.open(a);null!=a&&"undefined"!=typeof a||alert("Please turn off your pop-up blocker!")},error:function(a){alert("error; "+eval(a))}})}
function refreshPage(a){null!=a&&"undefined"!=a&&""!=a?window.location.href=a:location.reload()}
function showWelcome(){var a=Get_Cookie("user_type");if(null==Get_Cookie("user_type"))$("#login_maindiv").removeClass("margin_L25").addClass("margin_L25"),a='<a href="javascript:void(0);" id="ssologinlink" onclick="autoClickZWLogin();">Login</a> / <a href="javascript:void(0);" id="ssoregister" onclick="popup(\'individual\')">Signup</a>',null!=document.getElementById("user_login_data_mobile_div")&&($("#user_login_data_mobile_div").remove("navbar-toggle visible-xs visible-sm"),$("#user_login_mobile_div").attr("onclick",
"autoClickZWLogin();"),$("#user_login_mobile_div").addClass("navbar-toggle visible-xs visible-sm"));else{$("#login_maindiv").removeClass("margin_L25");var b=Get_Cookie("name");b=b.replace(/\+/g," ");b=ucfirst(b);url="Dealer"==a?SITEPATH+"/dealer-account":SITEPATH+"/user-account";a='<div class="userbox"><ul class="util FL"><li class="tabuser username-cont" onmouseover="showaccnt();" onmouseout="hideaccnt();"><a href="javascript:void(0);" class="tab-name username">'+b+'<span id="arrow"></span></a><ul class="menuuser"><li class="username"><a href="javascript:void(0)" style="color:#303030">'+
b+'<span id="arrow"></span></a></li><li><a href="'+url+'">My Account</a></li><li><a href="javascript:void(0)" title="User Logout" onclick="signOut();">Logout</a></li></ul></li></ul></div>';if(null!=document.getElementById("user_login_data_mobile_div")){console.log("user logged in");$("#user_login_mobile_div").removeClass("navbar-toggle visible-xs visible-sm");var c='<div class="username_mob space_line"><strong>Hi,&nbsp;'+b+'</strong></div> <div class="fnt_13A space_line"><a href="'+url+'" title="My Account" >My Account</a></div> <div class="fnt_12A space_line"><a href="javascript:void(0)" title="User Logout" onclick="signOut();">Logout</a></div>';
$("#user_login_data_mobile_div").removeAttr("data-content");$("#user_login_data_mobile_div").attr("data-content",c);$(".userImage").html('<img src="'+SITEPATH+'/images/noImage.gif" width="20px" height="20px" alt="'+b+'"/>');$("#user_login_data_mobile_div").addClass("navbar-toggle visible-xs visible-sm")}}jQuery("#welcomeplaceholder").html(a)}function showaccnt(){$(".menuuser").show();return!1}function hideaccnt(){$(".menuuser").hide();return!1}
function linkedInshareSuccess(){checkZWLoginStatus()}function facebookShare(a,b,c,e){scroll=$(window).scrollTop();FB.ui({method:"feed",name:c,link:b,picture:a,caption:"",description:e},function(d){$(window).scrollTop(scroll)})}function gPlusShare(a){popupWindow=window.open(a,"parentWindow","width=640,height=480,left="+(screen.width/2-350)+",top="+(screen.height/2-225))}
function addslashes(a){var b=a.indexOf("'");-1<b&&(a=a.replace(/'/g,"\\'"),b=a.indexOf("'"));-1<b&&(a=a.replace(/'/g,"\\'"),b=a.indexOf("'"));-1<b&&(a=a.replace(/'/g,"\\'"),a.indexOf("'"));return a}
function fetchPassword(){jQuery(".alert").hide();var a=jQuery("#userForgotPassword_emailId").val();if(""==jQuery.trim(a))return message="Please enter your email.",jQuery("#userForgotPassword_errordiv").html(message).show(),jQuery("#userForgotPassword_emailId").focus(),!1;if(!isValidEmail(a))return message="Please enter a valid email.",jQuery("#userForgotPassword_errordiv").html(message).show(),jQuery("#userForgotPassword_emailId").focus(),!1;jQuery("#forgetsubmitbutton").prop("disable","disable").css({opacity:.6});
jQuery(".forgotPasswordProcessingImage").show();jQuery(".alert").hide();jQuery.post(TODBFILEPATH+"/validateuserReview.php",{femailid:a,submittype:"forgotpassword"},function(b){dataarray=b.split("_@@@_");2==dataarray[0]||""==dataarray[0]?($("#forgetsubmitbutton").removeAttr("disable").css({opacity:1}),jQuery(".forgotPasswordProcessingImage").hide(),jQuery("#userForgotPassword_errordiv").html("Wrong email id.").show()):($("#forgetsubmitbutton").removeAttr("disable").css({opacity:1}),jQuery("#userForgotPassword_emailId").val(""),
jQuery(".forgotPasswordProcessingImage").hide(),jQuery("#userForgotPassword_successdiv").html("An authentication mail, with the link to change password, has been sent to your email ID ("+a+").").show(),setTimeout(function(){jQuery(".alert").hide();jQuery(".forgotPasswordProcessingImage").hide();jQuery("#userLoginDiv").trigger("click")},1E4))});return!1}
function validateUserRegistrationForm(){jQuery(".alert").hide();var a=jQuery.trim(jQuery("#usernameIndv").val());jQuery("#usernameIndv").val(a);var b=jQuery("#useremailIndv").val(),c=jQuery("#confirm_useremailIndv").val(),e=jQuery("#userpasswordIndv").val(),d=jQuery("#confirm_userpasswordIndv").val();jQuery("#usertypeIndv").val();var f=jQuery.trim(jQuery("#usermobilenoIndv").val());jQuery("#mobilenoIndv").val(f);var g=jQuery.trim($("#usersecurityCode").val()),h="No";jQuery("#usertermsIndv").is(":checked")&&
(h="Yes");jQuery("#userpromotionaloffersIndv").is(":checked");newsletters="Yes";""==a?(message="Please enter your name.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#usernameIndv").focus()):/^([A-Za-z ]{1,})$/.test(a)?""==jQuery.trim(b)?(message="Please enter your email.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#useremailIndv").focus()):isValidEmail(b)?""==jQuery.trim(c)?(message="Please enter Confirm Email ID.",jQuery("#userRegister_errordiv").html(message).show(),
jQuery("#confirm_useremailIndv").focus()):isValidEmail(c)?c!=b?(message="Email id & Confirm Email ID are not matching.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#confirm_useremailIndv").focus()):6>e.length?(message="Password cannot be less than 6 characters.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#userpasswordIndv").focus()):""==d?(message="Please check your confirm password.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#confirm_userpasswordIndv").focus()):
e!=d?(message=" Password & Confirm Password does not match.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#confirm_userpasswordIndv").focus()):""==f?(message="Please enter a valid mobile number of 10 digits.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#usermobilenoIndv").focus()):/^\s*[9876][0-9]{9}\s*$/.test(f)?""==g||"Enter security code"==g?(message="Please Enter Security Code.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#usersecurityCode").focus()):
"No"==h?(message="You need to agree with our terms & conditions before registration.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#usertermsIndv").focus()):(jQuery(".alert").hide(),submitUserRegistrationForm(b,e)):(message="Please enter a valid mobile number of 10 digits.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#usermobilenoIndv").focus()):(message="Please enter valid confirm Email ID.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#confirm_useremailIndv").focus()):
(message="Please enter a valid email.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#useremailIndv").focus()):(message="Please enter a valid name.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#usernameIndv").focus());return!1}
function submitUserRegistrationForm(a,b){jQuery("#userRegisterSubmitBtn").prop("disabled","true").css("opacity","0.2");jQuery(".registrationProcessingImage").show();var c={usertype:"Individual",source:"site_registration",username:$("#usernameIndv").val(),email:$("#useremailIndv").val(),password:$("#userpasswordIndv").val(),mobileno:$("#usermobilenoIndv").val(),securityCode:$("#usersecurityCode").val(),termsIndv:$("#usertermsIndv").val(),promotionaloffers:$("#userpromotionaloffersIndv").val()};jQuery.post(TODBFILEPATH+
"/validateuserReview.php",c,function(e){e=jQuery.trim(e);dataarray=e.split("_@@@_");""!=e&&("INVALID_SECURITY_CODE"==e?(message="Invalid security code.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#usersecurityCode").focus(),jQuery("#userRegistrationformIndv").show()):"MOBILENO_UNAVAILABLE"==e?(message="Mobile number is already being used in "+MOBILENO_LIMIT+" account(s), please provide a different one.",jQuery("#userRegister_errordiv").html(message).show(),jQuery("#userRegistrationformIndv").show()):
"EMAILID_UNAVAILABLE"==e?jQuery("#userRegister_errordiv").html("You are already registered with us, please login.").show():"VerifyEmail"==dataarray[4]?(ga("send","pageview","/registration/thank-you"),jQuery("#userRegister_successdiv").html("Thank you for registering with ZigWheels.com, we have sent a verification mail to your email address ("+dataarray[3]+"). Please check your email account.").show(),$("#userRegistrationformIndv")[0].reset()):"Individual"==dataarray[4]&&(ga("send","pageview","/registration/thank-you"),
jQuery("#userRegister_successdiv").html("Thank you for registering with ZigWheels.com, we have mailed the account details to your email address ("+dataarray[3]+"). Please check your email account.").show(),$("#userRegistrationformIndv")[0].reset(),setTimeout(function(){jQuery(".alert").hide();autoLoginAfterValidate(a,b)},5E3)),jQuery(".registrationProcessingImage").hide(),jQuery("#userRegisterSubmitBtn").removeAttr("disabled").css("opacity","1"))})}
function autoLoginAfterValidate(a,b){jQuery("#login").val(a);jQuery("#passwd").val(b);validateUserLogin(a,b)}function ucfirst(a){a=a.split(" ");var b=a.length,c,e=[];for(c=0;c<b;c++){var d=a[c];if(null!=d[0])var f=d[0].toUpperCase();d=d.substring(1,d.length);e.push(f+d)}return e.join(" ")}
window.fbAsyncInit=function(){FB.Event.subscribe("edge.create",function(a,b){checkZWLoginStatus()});FB.Event.subscribe("edge.remove",function(a){ga("send","_trackSocial","facebook","unlike",a)});FB.Event.subscribe("message.send",function(a){ga("send","_trackSocial","facebook","send",targetUrl)})};
jQuery(document).ready(function(){jQuery("#userforgotpasswordLink").on("click",function(){jQuery("#userForgotPasswordDiv").show();jQuery("#userLoginDiv").hide();jQuery("#userForgotPassword_emailId").focus()});jQuery("#userloginscreenLink").on("click",function(){jQuery("#userForgotPasswordDiv").hide();jQuery("#userLoginDiv").show();jQuery("#userLogin_emailId").focus()});jQuery("#confirm_useremailIndv").bind("copy paste cut",function(b){b.preventDefault()});var a=Get_Cookie("slogin_error");del_cookie("slogin_error",
"/","");""!=a&&null!=a&&(a=a.replace(/\+/g," "),jQuery("#userLoginModal").modal("show"),jQuery("#userLogin_errordiv").html(a).show(),jQuery(".loaderImg").hide(),setTimeout(function(){jQuery(".loaderImg").hide()},5),setTimeout(function(){jQuery("#userLogin_errordiv").hide()},1E4))});
function getVariantsDetailsTable(a,b,c,e,d,f){""==jQuery("#variantDetails"+c+" tbody").html()&&(jQuery("#variantDetails tbody").html('<div style="margin:25% 40%;"><img src="'+IMAGEPATH+'/rvpm_splash-loader.gif" /></div>'),jQuery.post(SITEPATH+"/tpl/get_variant_details_tpl.php",{queryString:a,utm_source:e,vtype:b,source:e,divId:c,city:d,isPopup:f},function(g){""==g?jQuery("#variantDetails"+c+" tbody").html('<tr><td colspan="4">&nbsp;</td></tr><tr><td colspan="4" class="alert alert-warning" align="center">No Variants Available!</td></tr>'):
(jQuery("#compareButton"+c).remove(),jQuery("#variantDetails"+c+" tbody").html(""),jQuery("#variantDetails"+c+" tbody").append(g),1<jQuery("#variantCount"+c).val()&&jQuery("#variantDetails"+c).after('<div id="compareButton'+c+'" class="MT15 MB10"><span class="ro-compare-red-box PDL8 PDR8" ><a onclick="compareVariant(&quot;'+c+'&quot;);" href="javascript:void();">(4) Compare</a></span></div>'))}))}
function getModelVariantData(a,b,c,e,d){"model"==b?getModelList({makeId:a,isNew:c,placeholder:d}):jQuery.post(TODBFILEPATH+"/get_model_or_variant.php",{val:a,flag:b,isNew:c,vtype:e},function(f){jQuery("#"+d).html(f)})}var compare_count_data=0,compBoxHeight;
function addToCompare(a,b,c,e,d,f,g){$("#compare_box").show();1==$("#search_variant_"+a).is(":checked")?3>compare_count_data?(compare_count_data++,f=compare_count_data,$("#sp_comp_count").html(compare_count_data),a='<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12 PB10 PT10 MB8 compare_singleBox CTR MR10 hideComp" id="compareDiv'+a+'"> <em class="zig_innerSprite close_icon_filters" style="top:4px; right:4px; position:absolute;" onClick="removeThisVariantShowMsg('+(a+');" ></em><input type="hidden" name="varId')+
(f+'" value="'+d+'"  id="varId'+f+'" ><p class="linkMarB5"><a href="')+(e+'">'+c+"</a></p>"),a+='<input type="hidden" name="seo'+f+'" value="'+e+'"  id="seo'+f+'" >',a="To Be Announced"==b||0==b?a+('<p class="color_red notopBottMrgn fnt_16B">'+b+"</p>"):a+('<p class="color_red notopBottMrgn fnt_16B">Price <i class="zig-sprite rupee_18_red"></i> '+b+"</p>"),a+='<p class="hidden-xs"><span class="fnt_12">(Ex-showroom Price)</span></p>',a+="</div>",jQuery("#compareDiv").show(),jQuery("#compareDiv").append(a)):
($("#search_variant_"+a).prop("checked",!1),alert("You have already selected 3 items")):removeThisVariantShowMsg(a);compBoxHeight=$(".compare_singleBox").height();768>$(window).width()&&(compBoxHeight=$(".compare_singleBox").height(),b=$(".compare_singleBox").length,compBoxHeight=compBoxHeight*b+35+$(".comparebtn_search").height())}
function removeThisVariantShowMsg(a){0<compare_count_data&&(compare_count_data--,$("#sp_comp_count").html(compare_count_data),$("#search_variant_"+a).prop("checked",!1),$("#compareDiv"+a).remove(),0>=compare_count_data&&($("#compare_box").hide(),$("#compareDiv").hide()))}
function redirectToCompare(a,b){var c=0,e="",d="",f=jQuery("#varId1").val(),g=jQuery("#varId2").val(),h=jQuery("#varId3").val();"undefined"!=typeof f&&""!=f&&(d+=f,c++);"undefined"!=typeof g&&""!=g&&(d+="-vs-"+g,c++);"undefined"!=typeof h&&""!=h&&(d+="-vs-"+h,c++);2>c&&alert("You have to select at least 2 variants for comparison.");g=jQuery("#seo1").val();f=jQuery("#seo2").val();c=jQuery("#seo3").val();""!=g&&"undefined"!=typeof g&&(g=g.split("/"),h=g.length,make1=g[h-3],model1=g[h-2],e+=make1+"-"+
model1);if(""!=f&&"undefined"!=typeof f){var k=f.split("/");f=k.length;make2=k[f-3];model2=k[f-2];e+="-vs-"+make2+"-"+model2}""!=c&&"undefined"!=typeof c&&(c=c.split("/"),f=c.length,make3=c[f-3],model3=k[f-2],e+="-vs-"+make3+"-"+model3);e.toLowerCase();d=d.toLowerCase();Set_Cookie("mmvurl",d);d="2Wheeler"==a?CMSROOTPATH+"/bike-comparison/"+d:CMSROOTPATH+"/car-comparison/"+d;a=$("#city").val();""!=a&&a!=b&&(d=d+"/"+a);window.location.href=d}
function resetCompareBox(){compare_count_data=0;$("#sp_comp_count").html(compare_count_data);$("#compare_box").hide();$("#compareDiv").hide();$(".compare_singleBox").each(function(){var a=$(this).attr("id").replace("compareDiv","");$("#search_variant_"+a).prop("checked",!1)});$(".compare_singleBox").remove()}
$(function(){$(document).on("click",".slider-arrow.show",function(){$("#compare_box").animate({bottom:"+="+(compBoxHeight+30)+"px"},700,function(){});$(this).html('<span class="glyphicon glyphicon-chevron-down PDT8 PDL8 PB5 PR5"></span>').removeClass("show").addClass("closed")});$(document).on("click",".slider-arrow.closed",function(){$("#compare_box").animate({bottom:"-="+(compBoxHeight+30)+"px"},700,function(){});$(this).html('<span class="glyphicon glyphicon-chevron-up PDT8 PDL8 PB8 PR5"></span>').removeClass("closed").addClass("show")})});
function submitOnroadVariant(a,b,c,e,d,f){$('<form action="'+CMSROOTPATH+'/price-quote" target="blank" method="post"><input type="hidden" id="makeId" name="makeId" value="'+a+'" /><input type="hidden" id="variantId" name="variantId" value="'+c+'" /><input type="hidden" id="modelId" name="modelId" value="'+b+'" /><input type="hidden" id="vehicleType" name="vehicleType" value="'+d+'" /><input type="hidden" id="source" name="source" value="'+e+'" /><input type="hidden" id="cityName" name="cityName" value="'+
f+'" /></form>').appendTo("body").submit()}function getMMVUrl(a,b,c,e,d){var f="car";"2Wheeler"==d&&(f="bike");d="";""!=a&&""!=b?(d=d+("/new"+f+"s/")+a+("/"+b),""!=c&&(d+="/"+c),""!=e&&(d="/"+e.replace(" ","-")+d)):""!=a&&(d="/new"+f+"s/"+a);return d}function CurrencyFormatted(a){a.toString().replace(/\B(?=(\d{7})+(?!\d))/g,",");return a.toString().replace(/\B(?=(\d{5})+(?!\d))/g,",").toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}
function populateFromPriceSelectBox(a,b,c,e){var d=$("#"+b+" option:selected").text(),f=$("#"+b+" :selected").val();if("Min Price"==$("#"+a+" :selected").text())$("#"+b).html(e);else{e=$("#"+b+" option:last-child").html();var g=$("#"+b+" option:last-child").val(),h=$("#"+a).html();$("#"+a+" option:selected").val();var k=$("#"+b+" option:selected").val(),l=$("#"+a+" option").filter(function(){return parseFloat(this.value,10)>parseFloat(c,10)});$("#"+b).html(l);$("#"+b+" option:last-child").remove();
$("#"+b).append("<option value="+g+">"+e+"</option>");$("#"+a).html(h);$("#"+a).val(c);"Max Price"==d?$("#"+b+" option:eq(0)").before('<option value="'+f+'" selected="selected">Max Price</option>'):$("#"+b+' option[value="'+k+'"]').prop("selected","selected")}}
var genericShowMsg={_msgDiv:"errorContainer",_msgContent:"&nbsp;",_msgFormat:"<div id='errorContainer' class='alert alert-danger MB10' >&nbsp;</div>",_showB4Div:"",_defaultMsgInnerFormat:"",constructeee:function(){this._msgDiv="errorContainer";this._msgContent="&nbsp;";this._msgFormat="<div id='errorContainer' class='alert alert-danger MB10'>&nbsp;</div>";this._showB4Div=""},hideMsg:function(){this.isErrorDivExists()},showMsg:function(a,b){this._msgContent=b;this._showB4Div=a;this.isErrorDivExists();
$("#"+this._showB4Div).before(this._msgFormat);this.setMsgContent(this._msgContent)},isErrorDivExists:function(){0<$("#"+this._msgDiv).length&&$("#"+this._msgDiv).remove()},setMsgFormat:function(a){$("#"+this._msgFormat).html(a)},setMsgContent:function(a){$("#"+this._msgDiv).html(a)}};