/*! jQuery UI - v1.13.1 - 2022-06-22
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(V){"use strict";V.ui=V.ui||{};V.ui.version="1.13.1";var n,i=0,a=Array.prototype.hasOwnProperty,r=Array.prototype.slice;V.cleanData=(n=V.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=V._data(i,"events"))&&e.remove&&V(i).triggerHandler("remove");n(t)}),V.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],l=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=V.Widget),Array.isArray(e)&&(e=V.extend.apply(null,[{}].concat(e))),V.expr.pseudos[l.toLowerCase()]=function(t){return!!V.data(t,l)},V[r]=V[r]||{},s=V[r][t],n=V[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},V.extend(n,s,{version:e.version,_proto:V.extend({},e),_childConstructors:[]}),(o=new i).options=V.widget.extend({},o.options),V.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}a[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=V.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(V.each(s._childConstructors,function(t,e){var i=e.prototype;V.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),V.widget.bridge(t,n),n},V.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],a.call(s[n],e)&&void 0!==i&&(V.isPlainObject(i)?t[e]=V.isPlainObject(t[e])?V.widget.extend({},t[e],i):V.widget.extend({},i):t[e]=i);return t},V.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;V.fn[o]=function(i){var t="string"==typeof i,s=r.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V.data(this,a);t?(t.option(i||{}),t._init&&t._init()):V.data(this,a,new e(i,this))})),n}},V.Widget=function(){},V.Widget._childConstructors=[],V.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=V(e||this.defaultElement||this)[0],this.element=V(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=V(),this.hoverable=V(),this.focusable=V(),this.classesElementLookup={},e!==this&&(V.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=V(e.style?e.ownerDocument:e.document||e),this.window=V(this.document[0].defaultView||this.document[0].parentWindow)),this.options=V.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:V.noop,_create:V.noop,_init:V.noop,destroy:function(){var i=this;this._destroy(),V.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:V.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return V.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=V.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=V(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||V(),i=n.add?(function(){var i=[];n.element.each(function(t,e){V.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(V(i),{remove:"_untrackClassesElement"})}(),V(V.uniqueSort(i.get().concat(n.element.get())))):V(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=V.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;V.each(s.classesElementLookup,function(t,e){-1!==V.inArray(i.target,e)&&(s.classesElementLookup[t]=V(e.not(i.target).get()))}),this._off(V(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,i={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=V(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),V.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!V(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||V.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),t=s[1]+r.eventNamespace,s=s[2];s?a.on(t,s,i):o.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=V(this.bindings.not(t).get()),this.focusable=V(this.focusable.not(t).get()),this.hoverable=V(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(V(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(V(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=V.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},V.each({show:"fadeIn",hide:"fadeOut"},function(o,a){V.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!V.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&V.effects&&V.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){V(this)[o](),i&&i.call(e[0]),t()})}});var s,x,k,o,l,h,c,u,C;V.widget;function D(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function I(t,e){return parseInt(V.css(t,e),10)||0}function T(t){return null!=t&&t===t.window}x=Math.max,k=Math.abs,o=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,C=V.fn.position,V.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,e=V("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),i=e.children()[0];return V("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?V.position.scrollbarWidth():0,height:e?V.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=V(t||window),i=T(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?V(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},V.fn.position=function(u){if(!u||!u.of)return C.apply(this,arguments);var d,p,f,g,m,t,_="string"==typeof(u=V.extend({},u)).of?V(document).find(u.of):V(u.of),v=V.position.getWithinInfo(u.within),b=V.position.getScrollInfo(v),y=(u.collision||"flip").split(" "),w={},e=9===(t=(e=_)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:T(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()};return _[0].preventDefault&&(u.at="left top"),p=e.width,f=e.height,m=V.extend({},g=e.offset),V.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],u[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=D(w.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,a=V(this),r=a.outerWidth(),l=a.outerHeight(),e=I(this,"marginLeft"),s=I(this,"marginTop"),n=r+e+I(this,"marginRight")+b.width,o=l+s+I(this,"marginBottom")+b.height,h=V.extend({},m),c=D(w.my,a.outerWidth(),a.outerHeight());"right"===u.my[0]?h.left-=r:"center"===u.my[0]&&(h.left-=r/2),"bottom"===u.my[1]?h.top-=l:"center"===u.my[1]&&(h.top-=l/2),h.left+=c[0],h.top+=c[1],i={marginLeft:e,marginTop:s},V.each(["left","top"],function(t,e){V.ui.position[y[t]]&&V.ui.position[y[t]][e](h,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:v,elem:a})}),u.using&&(t=function(t){var e=g.left-h.left,i=e+p-r,s=g.top-h.top,n=s+f-l,o={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:a,left:h.left,top:h.top,width:r,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&k(e+i)<p&&(o.horizontal="center"),f<l&&k(s+n)<f&&(o.vertical="middle"),x(k(e),k(i))>x(k(s),k(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(V.extend(h,{using:t}))})},V.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,a=s-o,r=o+e.collisionWidth-n-s;e.collisionWidth>n?0<a&&r<=0?(i=t.left+a+e.collisionWidth-n-s,t.left+=a-i):t.left=!(0<r&&a<=0)&&r<a?s+n-e.collisionWidth:s:0<a?t.left+=a:0<r?t.left-=r:t.left=x(t.left-o,t.left)},top:function(t,e){var i=e.within,s=i.isWindow?i.scrollTop:i.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,a=s-o,r=o+e.collisionHeight-n-s;e.collisionHeight>n?0<a&&r<=0?(i=t.top+a+e.collisionHeight-n-s,t.top+=a-i):t.top=!(0<r&&a<=0)&&r<a?s+n-e.collisionHeight:s:0<a?t.top+=a:0<r?t.top-=r:t.top=x(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,o=i.isWindow?i.scrollLeft:i.offset.left,a=t.left-e.collisionPosition.marginLeft,r=a-o,l=a+e.collisionWidth-n-o,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,i="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,a=-2*e.offset[0];r<0?((s=t.left+h+i+a+e.collisionWidth-n-s)<0||s<k(r))&&(t.left+=h+i+a):0<l&&(0<(o=t.left-e.collisionPosition.marginLeft+h+i+a-o)||k(o)<l)&&(t.left+=h+i+a)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,o=i.isWindow?i.scrollTop:i.offset.top,a=t.top-e.collisionPosition.marginTop,r=a-o,l=a+e.collisionHeight-n-o,h="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,i="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,a=-2*e.offset[1];r<0?((s=t.top+h+i+a+e.collisionHeight-n-s)<0||s<k(r))&&(t.top+=h+i+a):0<l&&(0<(o=t.top-e.collisionPosition.marginTop+h+i+a-o)||k(o)<l)&&(t.top+=h+i+a)}},flipfit:{left:function(){V.ui.position.flip.left.apply(this,arguments),V.ui.position.fit.left.apply(this,arguments)},top:function(){V.ui.position.flip.top.apply(this,arguments),V.ui.position.fit.top.apply(this,arguments)}}};var t;V.ui.position,V.extend(V.expr.pseudos,{data:V.expr.createPseudo?V.expr.createPseudo(function(e){return function(t){return!!V.data(t,e)}}):function(t,e,i){return!!V.data(t,i[3])}}),V.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});V.ui.focusable=function(t,e){var i,s,n,o,a=t.nodeName.toLowerCase();return"area"===a?(s=(i=t.parentNode).name,!(!t.href||!s||"map"!==i.nodeName.toLowerCase())&&(0<(s=V("img[usemap='#"+s+"']")).length&&s.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(a)?(n=!t.disabled)&&(o=V(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===a&&t.href||e,n&&V(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(V(t)))},V.extend(V.expr.pseudos,{focusable:function(t){return V.ui.focusable(t,null!=V.attr(t,"tabindex"))}});var e,d;V.ui.focusable,V.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):V(this[0].form)},V.ui.formResetMixin={_formResetHandler:function(){var e=V(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");V.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(V.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}};V.expr.pseudos||(V.expr.pseudos=V.expr[":"]),V.uniqueSort||(V.uniqueSort=V.unique),V.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,d=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},V.escapeSelector=function(t){return(t+"").replace(e,d)}),V.fn.even&&V.fn.odd||V.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}});V.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},V.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+V.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},V.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=V(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:V(this[0].ownerDocument||document)},V.extend(V.expr.pseudos,{tabbable:function(t){var e=V.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&V.ui.focusable(t,i)}}),V.fn.extend({uniqueId:(p=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++p)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&V(this).removeAttr("id")})}}),V.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var p,f=!1;V(document).on("mouseup",function(){f=!1});V.widget("ui.mouse",{version:"1.13.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===V.data(t.target,e.widgetName+".preventClickEvent"))return V.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!f){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&V(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===V.data(t.target,this.widgetName+".preventClickEvent")&&V.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),f=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(V.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&V.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,f=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),V.ui.plugin={add:function(t,e,i){var s,n=V.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},V.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=!(i=i||e.body).nodeName?e.body:i},V.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&V(t).trigger("blur")};V.widget("ui.draggable",V.ui.mouse,{version:"1.13.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<V(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=V(this);return V("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=V.ui.safeActiveElement(this.document[0]);V(t.target).closest(e).length||V.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),V.ui.ddmanager&&(V.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===V(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),V.ui.ddmanager&&!e.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),V.ui.ddmanager&&V.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new V.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return V.ui.ddmanager&&!this.options.dropBehaviour&&(i=V.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?V(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),V.ui.ddmanager&&V.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),V.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new V.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!V(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i="function"==typeof e.helper,t=i?V(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,n=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=V(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,V(n).width()-this.helperProportions.width-this.margins.left,(V(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[V(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,V(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,V(window).scrollLeft()+V(window).width()-this.helperProportions.width-this.margins.left,V(window).scrollTop()+(V(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,t=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:t?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:t?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s=this.options,n=this._isRootNode(this.scrollParent[0]),o=t.pageX,a=t.pageY;return n&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(i=this.relativeContainer.offset(),[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(a=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(a=i[3]+this.offset.click.top)),s.grid&&(t=s.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,a=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-s.grid[1]:t+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis&&(a=this.originalPageY)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),V.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),V.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),V.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=V.extend({},t,{item:i.element});i.sortables=[],V(i.options.connectToSortable).each(function(){var t=V(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=V.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,V.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){V.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,V.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&V.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,V.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,V.each(n.sortables,function(){this.refreshPositions()}))})}}),V.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=V("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&V("body").css("cursor",i._cursor)}}),V.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&V(e.helper).css("opacity",i._opacity)}}),V.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY<s.scrollSensitivity?o.scrollTop=n=o.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(o.scrollTop=n=o.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+o.offsetWidth-t.pageX<s.scrollSensitivity?o.scrollLeft=n=o.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(o.scrollLeft=n=o.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-V(a).scrollTop()<s.scrollSensitivity?n=V(a).scrollTop(V(a).scrollTop()-s.scrollSpeed):V(window).height()-(t.pageY-V(a).scrollTop())<s.scrollSensitivity&&(n=V(a).scrollTop(V(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-V(a).scrollLeft()<s.scrollSensitivity?n=V(a).scrollLeft(V(a).scrollLeft()-s.scrollSpeed):V(window).width()-(t.pageX-V(a).scrollLeft())<s.scrollSensitivity&&(n=V(a).scrollLeft(V(a).scrollLeft()+s.scrollSpeed)))),!1!==n&&V.ui.ddmanager&&!s.dropBehaviour&&V.ui.ddmanager.prepareOffsets(i,t)}}),V.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],V(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=V(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,n,o,a,r,l,h,c,u,d=i.options,p=d.snapTolerance,f=e.offset.left,g=f+i.helperProportions.width,m=e.offset.top,_=m+i.helperProportions.height,v=i.snapElements.length-1;0<=v;v--)l=(r=i.snapElements[v].left-i.margins.left)+i.snapElements[v].width,c=(h=i.snapElements[v].top-i.margins.top)+i.snapElements[v].height,g<r-p||l+p<f||_<h-p||c+p<m||!V.contains(i.snapElements[v].item.ownerDocument,i.snapElements[v].item)?(i.snapElements[v].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=!1):("inner"!==d.snapMode&&(s=Math.abs(h-_)<=p,n=Math.abs(c-m)<=p,o=Math.abs(r-g)<=p,a=Math.abs(l-f)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r-i.helperProportions.width}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left)),u=s||n||o||a,"outer"!==d.snapMode&&(s=Math.abs(h-m)<=p,n=Math.abs(c-_)<=p,o=Math.abs(r-f)<=p,a=Math.abs(l-g)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left)),!i.snapElements[v].snapping&&(s||n||o||a||u)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=s||n||o||a||u)}}),V.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,i=i.options,i=V.makeArray(V(i.stack)).sort(function(t,e){return(parseInt(V(t).css("zIndex"),10)||0)-(parseInt(V(e).css("zIndex"),10)||0)});i.length&&(s=parseInt(V(i[0]).css("zIndex"),10)||0,V(i).each(function(t){V(this).css("zIndex",s+t)}),this.css("zIndex",s+i.length))}}),V.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("zIndex")&&(i._zIndex=e.css("zIndex")),e.css("zIndex",i.zIndex)},stop:function(t,e,i){i=i.options;i._zIndex&&V(e.helper).css("zIndex",i._zIndex)}});V.ui.draggable;function g(t,e,i){return e<=t&&t<e+i}V.widget("ui.droppable",{version:"1.13.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t=t||{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){V.ui.ddmanager.droppables[t]=V.ui.ddmanager.droppables[t]||[],V.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=V.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept="function"==typeof e?e:function(t){return t.is(e)}:"scope"===t&&(i=V.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=V.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=V.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||V.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=V(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&V.ui.intersect(i,V.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),V.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var n=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,a=n+t.helperProportions.width,r=o+t.helperProportions.height,l=e.offset.left,h=e.offset.top,c=l+e.proportions().width,u=h+e.proportions().height;switch(i){case"fit":return l<=n&&a<=c&&h<=o&&r<=u;case"intersect":return l<n+t.helperProportions.width/2&&a-t.helperProportions.width/2<c&&h<o+t.helperProportions.height/2&&r-t.helperProportions.height/2<u;case"pointer":return g(s.pageY,h,e.proportions().height)&&g(s.pageX,l,e.proportions().width);case"touch":return(h<=o&&o<=u||h<=r&&r<=u||o<h&&u<r)&&(l<=n&&n<=c||l<=a&&a<=c||n<l&&c<a);default:return!1}},!(V.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,n=V.ui.ddmanager.droppables[t.options.scope]||[],o=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<n.length;i++)if(!(n[i].options.disabled||t&&!n[i].accept.call(n[i].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===n[i].element[0]){n[i].proportions().height=0;continue t}n[i].visible="none"!==n[i].element.css("display"),n[i].visible&&("mousedown"===o&&n[i]._activate.call(n[i],e),n[i].offset=n[i].element.offset(),n[i].proportions({width:n[i].element[0].offsetWidth,height:n[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return V.each((V.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&V.ui.intersect(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,o){n.options.refreshPositions&&V.ui.ddmanager.prepareOffsets(n,o),V.each(V.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s;this.options.disabled||this.greedyChild||!this.visible||(s=!(i=V.ui.intersect(n,this,this.options.tolerance,o))&&this.isover?"isout":i&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return V(this).droppable("instance").options.scope===e})).length&&((t=V(i[0]).droppable("instance")).greedyChild="isover"===s)),t&&"isover"===s&&(t.isover=!1,t.isout=!0,t._out.call(t,o)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,o),t&&"isout"===s&&(t.isout=!1,t.isover=!0,t._over.call(t,o)))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)}})!==V.uiBackCompat&&V.widget("ui.droppable",V.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});V.ui.droppable;V.widget("ui.resizable",V.ui.mouse,{version:"1.13.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===V(t).css("overflow"))return!1;var i=e&&"left"===e?"scrollLeft":"scrollTop",e=!1;if(0<t[i])return!0;try{t[i]=1,e=0<t[i],t[i]=0}catch(t){}return e},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),V.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(V("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&V(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){V(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,a=this;if(this.handles=o.handles||(V(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=V(),this._addedHandles=V(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),n=V("<div>"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=V(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=V(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=V(this.handles[e])[0])!==t.target&&!V.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=V(s.containment).scrollLeft()||0,i+=V(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=V(".ui-resizable-"+this.axis).css("cursor"),V("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),V.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(V.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),V("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),s<n.maxWidth&&(n.maxWidth=s),t<n.maxHeight&&(n.maxHeight=t)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&i&&(t.top=l-e.minHeight),n&&i&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||V("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){V.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),V.ui.plugin.add("resizable","animate",{stop:function(e){var i=V(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,n={width:i.size.width-a,height:i.size.height-o},a=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(V.extend(n,o&&a?{top:o,left:a}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&V(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),V.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=V(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,a=o instanceof V?o.get(0):/parent/.test(o)?e.parent().get(0):o;a&&(n.containerElement=V(a),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:V(document),left:0,top:0,width:V(document).width(),height:V(document).height()||document.body.parentNode.scrollHeight}):(i=V(a),s=[],V(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(a,"left")?a.scrollWidth:o,e=n._hasScroll(a)?a.scrollHeight:e,n.parentData={element:a,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=V(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,a={top:0,left:0},r=e.containerElement,t=!0;r[0]!==document&&/static/.test(r.css("position"))&&(a=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-a.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-a.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-a.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=V(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=V(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o})}}),V.ui.plugin.add("resizable","alsoResize",{start:function(){var t=V(this).resizable("instance").options;V(t.alsoResize).each(function(){var t=V(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=V(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,a={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};V(s.alsoResize).each(function(){var t=V(this),s=V(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];V.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){V(this).removeData("ui-resizable-alsoresize")}}),V.ui.plugin.add("resizable","ghost",{start:function(){var t=V(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==V.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=V(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=V(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),V.ui.plugin.add("resizable","grid",{resize:function(){var t,e=V(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,c=Math.round((s.width-n.width)/l)*l,u=Math.round((s.height-n.height)/h)*h,d=n.width+c,p=n.height+u,f=i.maxWidth&&i.maxWidth<d,g=i.maxHeight&&i.maxHeight<p,m=i.minWidth&&i.minWidth>d,s=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=l),s&&(p+=h),f&&(d-=l),g&&(p-=h),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):((p-h<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<p-h?(e.size.height=p,e.position.top=o.top-u):(p=h-t.height,e.size.height=p,e.position.top=o.top+n.height-p),0<d-l?(e.size.width=d,e.position.left=o.left-c):(d=l-t.width,e.size.width=d,e.position.left=o.left+n.width-d))}});V.ui.resizable,V.widget("ui.selectable",V.ui.mouse,{version:"1.13.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var i=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){i.elementPos=V(i.element[0]).offset(),i.selectees=V(i.options.filter,i.element[0]),i._addClass(i.selectees,"ui-selectee"),i.selectees.each(function(){var t=V(this),e=t.offset(),e={left:e.left-i.elementPos.left,top:e.top-i.elementPos.top};V.data(this,"selectable-item",{element:this,$element:t,left:e.left,top:e.top,right:e.left+t.outerWidth(),bottom:e.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=V("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=V(this.element[0]).offset(),this.options.disabled||(this.selectees=V(t.filter,this.element[0]),this._trigger("start",i),V(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=V.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),V(i.target).parents().addBack().each(function(){var t,e=V.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,n=this,o=this.options,a=this.opos[0],r=this.opos[1],l=s.pageX,h=s.pageY;return l<a&&(t=l,l=a,a=t),h<r&&(t=h,h=r,r=t),this.helper.css({left:a,top:r,width:l-a,height:h-r}),this.selectees.each(function(){var t=V.data(this,"selectable-item"),e=!1,i={};t&&t.element!==n.element[0]&&(i.left=t.left+n.elementPos.left,i.right=t.right+n.elementPos.left,i.top=t.top+n.elementPos.top,i.bottom=t.bottom+n.elementPos.top,"touch"===o.tolerance?e=!(i.left>l||i.right<a||i.top>h||i.bottom<r):"fit"===o.tolerance&&(e=i.left>a&&i.right<l&&i.top>r&&i.bottom<h),e?(t.selected&&(n._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(n._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(n._addClass(t.$element,"ui-selecting"),t.selecting=!0,n._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,n._addClass(t.$element,"ui-selected"),t.selected=!0):(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),n._trigger("unselecting",s,{unselecting:t.element}))),t.selected&&(s.metaKey||s.ctrlKey||t.startselected||(n._removeClass(t.$element,"ui-selected"),t.selected=!1,n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,n._trigger("unselecting",s,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,V(".ui-unselecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),V(".ui-selecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),V.widget("ui.sortable",V.ui.mouse,{version:"1.13.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),V.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),V(t.target).parents().each(function(){if(V.data(this,n.widgetName+"-item")===n)return i=V(this),!1}),!!(i=V.data(t.target,n.widgetName+"-item")===n?V(t.target):i)&&(!(this.options.handle&&!e&&(V(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.appendTo=V("parent"!==o.appendTo?o.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},V.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),V.extend(this.offset,{parent:this._getParentOffset()}),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",o.cursor),this.storedStylesheet=V("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return V.ui.ddmanager&&(V.ui.ddmanager.current=this),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(t){var e,i,s,n,o=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),o.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||V.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&V.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,n,o;if(t)return V.ui.ddmanager&&!this.options.dropBehaviour&&V.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),o={},(n=this.options.axis)&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,V(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new V.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),V.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?V(this.domPosition.prev).after(this.currentItem):V(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},V(t).each(function(){var t=(V(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(V(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||r<s+h&&s+h<l,c="y"===this.options.axis||o<e+c&&e+c<a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h&&c:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this.dragDirection.vertical,t=this.dragDirection.horizontal,this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this.dragDirection.vertical,t=this.dragDirection.horizontal;return this.floating&&t?"right"===t&&i||"left"===t&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],a=[],r=this._connectWith();if(r&&t)for(e=r.length-1;0<=e;e--)for(i=(s=V(r[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&a.push(["function"==typeof n.options.items?n.options.items.call(n.element):V(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);function l(){o.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):V(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(l);return V(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=V.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,a,r,l,h=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):V(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=V(u[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push(["function"==typeof n.options.items?n.options.items.call(n.element[0],t,{item:this.currentItem}):V(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],l=(a=c[e][i=0]).length;i<l;i++)(r=V(a[i])).data(this.widgetName+"-item",o),h.push({item:r,instance:o,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){for(var e,i,s=this.items.length-1;0<=s;s--)e=this.items[s],this.currentContainer&&e.instance!==this.currentContainer&&e.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?V(this.options.toleranceElement,e.item):e.item,t||(e.width=i.outerWidth(),e.height=i.outerHeight()),i=i.offset(),e.left=i.left,e.top=i.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,n=i.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var t=V("<"+n+">",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),V("<tr>",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=V(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){V("<td>&#160;</td>",i.document[0]).attr("colspan",V(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)V.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&V.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)V.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[h]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[h]-a)<i&&(i=Math.abs(t[h]-a),s=this.items[e],this.direction=r?"up":"down"));(s||this.options.dropOnEmpty)&&(this.currentContainer!==this.containers[u]?(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[u].element,!0),this._trigger("change",t,this._uiHash()),this.containers[u]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1):this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1))}},_createHelper:function(t){var e=this.options,t="function"==typeof e.helper?V(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||this.appendTo[0].appendChild(t[0]),t[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&V.ui.ie?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=V(i.containment)[0],e=V(i.containment).offset(),i="hidden"!==V(t).css("overflow"),this.containment=[e.left+(parseInt(V(t).css("borderLeftWidth"),10)||0)+(parseInt(V(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(V(t).css("borderTopWidth"),10)||0)+(parseInt(V(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(V(t).css("borderLeftWidth"),10)||0)-(parseInt(V(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(V(t).css("borderTopWidth"),10)||0)-(parseInt(V(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,t=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():t?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():t?0:s.scrollLeft())*i}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===V.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||V([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}}),V.widget("ui.accordion",{version:"1.13.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(t){return t.find("> li > :first-child").add(t.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=V(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():V()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=V("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=V.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(V(t.target).attr("tabIndex",-1),V(n).attr("tabIndex",0),V(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===V.ui.keyCode.UP&&t.ctrlKey&&V(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=V()):!1===t.active?this._activate(0):this.active.length&&!V.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=V()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=V(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).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(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=V(this).outerHeight(!0)}),this.headers.next().each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=V(this).is(":visible");t||V(this).show(),i=Math.max(i,V(this).css("height","").height()),t||V(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):V()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():s.next(),r=i.next(),a={oldHeader:i,oldPanel:r,newHeader:o?V():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,a)||(e.active=!o&&this.headers.index(s),this.active=n?V():s,this._toggle(a),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(i=i.children(".ui-accordion-header-icon"),this._removeClass(i,null,e.icons.activeHeader)._addClass(i,null,e.icons.header)),n||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,e.icons.header)._addClass(n,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(V(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){var s,n,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!i.length||t.index()<i.index()),c=this.options.animate||{},u=h&&c.down||c,h=function(){a._toggleComplete(e)};return n=(n="string"==typeof u?u:n)||u.easing||c.easing,o=(o="number"==typeof u?u:o)||u.duration||c.duration,i.length?t.length?(s=t.show().outerHeight(),i.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:n,complete:h,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===l&&(r+=e.now):"content"!==a.options.heightStyle&&(e.now=Math.round(s-i.outerHeight()-r),r=0)}})):i.animate(this.hideProps,o,n,h):t.animate(this.showProps,o,n,h)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),V.widget("ui.menu",{version:"1.13.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",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.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=V(t.target),i=V(V.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.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":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){V.contains(this.element[0],V.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=V(t.target).closest(".ui-menu-item"),i=V(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=V(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case V.ui.keyCode.PAGE_UP:this.previousPage(t);break;case V.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case V.ui.keyCode.HOME:this._move("first","first",t);break;case V.ui.keyCode.END:this._move("last","last",t);break;case V.ui.keyCode.UP:this.previous(t);break;case V.ui.keyCode.DOWN:this.next(t);break;case V.ui.keyCode.LEFT:this.collapse(t);break;case V.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case V.ui.keyCode.ENTER:case V.ui.keyCode.SPACE:this._activate(t);break;case V.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=V(this),e=t.prev(),i=V("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=V(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!V.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(V.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(V.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s<e+t&&this.activeMenu.scrollTop(i+e-s+t))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=V.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:V(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},i?0:this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!V(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this._menuItems(this.active.children(".ui-menu")).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;(s=this.active?"first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(e=V(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=V(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||V(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var t=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return e.test(String.prototype.trim.call(V(this).children(".ui-menu-item-wrapper").text()))})}});V.widget("ui.autocomplete",{version:"1.13.1",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,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=V("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){V(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==V.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=V("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||V.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(V.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=V.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:V.map(t,function(t){return"string"==typeof t?{label:t,value:t}:V.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(V.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;V.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return V("<li>").append(V("<div>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),V.extend(V.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(V.ui.autocomplete.escapeRegex(e),"i");return V.grep(t,function(t){return i.test(t.label||t.value||t)})}}),V.widget("ui.autocomplete",V.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(e))},100))}});V.ui.autocomplete;var m=/ui-corner-([a-z]){2,6}/g;V.widget("ui.controlgroup",{version:"1.13.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var o=this,a=[];V.each(this.options.items,function(s,t){var e,n={};if(t)return"controlgroupLabel"===s?((e=o.element.find(t)).each(function(){var t=V(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),o._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(a=a.concat(e.get()))):void(V.fn[s]&&(n=o["_"+s+"Options"]?o["_"+s+"Options"]("middle"):{classes:{}},o.element.find(t).each(function(){var t=V(this),e=t[s]("instance"),i=V.widget.extend({},n);"button"===s&&t.parent(".ui-spinner").length||((e=e||t[s]()[s]("instance"))&&(i.classes=o._resolveClassesValues(i.classes,e)),t[s](i),i=t[s]("widget"),V.data(i[0],"ui-controlgroup-data",e||t[s]("instance")),a.push(i[0]))})))}),this.childWidgets=V(V.uniqueSort(a)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=V(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return V.each(i,function(t){var e=s.options.classes[t]||"",e=String.prototype.trim.call(e.replace(m,""));n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,(n=this.options.onlyVisible?n.filter(":visible"):n).length&&(V.each(["first","last"],function(t,e){var i,s=n[e]().data("ui-controlgroup-data");s&&o["_"+s.widgetName+"Options"]?((i=o["_"+s.widgetName+"Options"](1===n.length?"only":e)).classes=o._resolveClassesValues(i.classes,s),s.element[s.widgetName](i)):o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}});V.widget("ui.checkboxradio",[V.ui.formResetMixin,{version:"1.13.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e=this,i=this._super()||{};return this._readType(),t=this.element.labels(),this.label=V(t[t.length-1]),this.label.length||V.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){e.originalLabel+=3===this.nodeType?V(this).text():this.outerHTML}),this.originalLabel&&(i.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(i.disabled=t),i},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||V.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+V.escapeSelector(t)+"']";return t?(this.form.length?V(this.form[0].elements).filter(e):V(e).filter(function(){return 0===V(this)._form().length})).not(this.element):V([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=V(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=V("<span>"),this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),(t=this.iconSpace?t.not(this.iconSpace[0]):t).remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);var _;V.ui.checkboxradio;V.widget("ui.button",{version:"1.13.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===V.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var i="iconPosition"!==t,s=i?this.options.iconPosition:e,t="top"===s||"bottom"===s;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=V("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,e),this._attachIcon(s),t?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(s))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=(void 0===t.showLabel?this.options:t).showLabel,i=(void 0===t.icon?this.options:t).icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),(this.element[0].disabled=e)&&this.element.trigger("blur"))},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==V.uiBackCompat&&(V.widget("ui.button",V.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),V.fn.button=(_=V.fn.button,function(i){var t="string"==typeof i,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t=V(this).attr("type"),e=V.data(this,"ui-"+("checkbox"!==t&&"radio"!==t?"button":"checkboxradio"));return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for button widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on button prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V(this).attr("type"),e="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",t=V.data(this,"ui-"+e);t?(t.option(i||{}),t._init&&t._init()):"button"!=e?V(this).checkboxradio(V.extend({icon:!1},i)):_.call(V(this),i)})),n}),V.fn.buttonset=function(){return V.ui.controlgroup||V.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var v;V.ui.button;function b(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},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,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=y(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function y(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,w)}function w(){V.datepicker._isDisabledDatepicker((v.inline?v.dpDiv.parent():v.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function P(t,e){for(var i in V.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}V.extend(V.ui,{datepicker:{version:"1.13.1"}}),V.extend(b.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return P(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s=t.nodeName.toLowerCase(),n="div"===s||"span"===s;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(V(t),n)).settings=V.extend({},e||{}),"input"===s?this._connectDatepicker(t,i):n&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?y(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=V(t);e.append=V([]),e.trigger=V([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),V.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s=this._get(e,"appendText"),n=this._get(e,"isRTL");e.append&&e.append.remove(),s&&(e.append=V("<span>").addClass(this._appendClass).text(s),t[n?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(s=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),this._get(e,"buttonImageOnly")?e.trigger=V("<img>").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):(e.trigger=V("<button type='button'>").addClass(this._triggerClass),i?e.trigger.html(V("<img>").attr({src:i,alt:s,title:s})):e.trigger.text(s)),t[n?"before":"after"](e.trigger),e.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===t[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==t[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,i,s,n,o,a;this._get(t,"autoSize")&&!t.inline&&(o=new Date(2009,11,20),(a=this._get(t,"dateFormat")).match(/[DM]/)&&(e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length))},_inlineDatepicker:function(t,e){var i=V(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),V.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,s,n){var o,a=this._dialogInst;return a||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(a=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",a)),P(a.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(a,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+e,s/2-150+n]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",a),this},_destroyDatepicker:function(t){var e,i=V(t),s=V.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),V.removeData(t,"datepicker"),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),v===s&&(v=null,this._curInst=null))},_enableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return V.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?V.extend({},V.datepicker._defaults):o?"all"===e?V.extend({},o.settings):this._get(o,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),o&&(this._curInst===o&&this._hideDatepicker(),n=this._getDateDatepicker(t,!0),e=this._getMinMaxDate(o,"min"),i=this._getMinMaxDate(o,"max"),P(o.settings,s),null!==e&&void 0!==s.dateFormat&&void 0===s.minDate&&(o.settings.minDate=this._formatDate(o,e)),null!==i&&void 0!==s.dateFormat&&void 0===s.maxDate&&(o.settings.maxDate=this._formatDate(o,i)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(V(t),o),this._autoSize(o),this._setDate(o,n),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,i,s=V.datepicker._getInst(t.target),n=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,V.datepicker._datepickerShowing)switch(t.keyCode){case 9:V.datepicker._hideDatepicker(),n=!1;break;case 13:return(i=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",s.dpDiv))[0]&&V.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,i[0]),(e=V.datepicker._get(s,"onSelect"))?(i=V.datepicker._formatDate(s),e.apply(s.input?s.input[0]:null,[i,s])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&V.datepicker._clearDate(t.target),n=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&V.datepicker._gotoToday(t.target),n=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?1:-1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,-7,"D"),n=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?-1:1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,7,"D"),n=t.ctrlKey||t.metaKey;break;default:n=!1}else 36===t.keyCode&&t.ctrlKey?V.datepicker._showDatepicker(this):n=!1;n&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i=V.datepicker._getInst(t.target);if(V.datepicker._get(i,"constrainInput"))return e=V.datepicker._possibleChars(V.datepicker._get(i,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!e||-1<e.indexOf(i)},_doKeyUp:function(t){t=V.datepicker._getInst(t.target);if(t.input.val()!==t.lastVal)try{V.datepicker.parseDate(V.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,V.datepicker._getFormatConfig(t))&&(V.datepicker._setDateFromField(t),V.datepicker._updateAlternate(t),V.datepicker._updateDatepicker(t))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=V("input",t.parentNode)[0]),V.datepicker._isDisabledDatepicker(t)||V.datepicker._lastInput===t||(n=V.datepicker._getInst(t),V.datepicker._curInst&&V.datepicker._curInst!==n&&(V.datepicker._curInst.dpDiv.stop(!0,!0),n&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0])),!1!==(i=(s=V.datepicker._get(n,"beforeShow"))?s.apply(t,[t,n]):{})&&(P(n.settings,i),n.lastVal=null,V.datepicker._lastInput=t,V.datepicker._setDateFromField(n),V.datepicker._inDialog&&(t.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(t),V.datepicker._pos[1]+=t.offsetHeight),e=!1,V(t).parents().each(function(){return!(e|="fixed"===V(this).css("position"))}),s={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(n),s=V.datepicker._checkOffset(n,s,e),n.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":e?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),n.inline||(i=V.datepicker._get(n,"showAnim"),s=V.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(V(t))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[i]?n.dpDiv.show(i,V.datepicker._get(n,"showOptions"),s):n.dpDiv[i||"show"](i?s:null),V.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),V.datepicker._curInst=n)))},_updateDatepicker:function(t){this.maxRows=4,(v=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),s=i[1],n=t.dpDiv.find("."+this._dayOverClass+" a"),o=V.datepicker._get(t,"onUpdateDatepicker");0<n.length&&w.apply(n.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml),e=t.yearshtml=null},0)),o&&o.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:V(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:V(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?V(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?V(document).scrollTop():0,e.left-=Math.min(e.left,e.left+s>r&&s<r?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,e.top+n>l&&n<l?Math.abs(n+a):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||V.expr.pseudos.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=V(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s=this._curInst;!s||t&&s!==V.data(t,"datepicker")||this._datepickerShowing&&(e=this._get(s,"showAnim"),i=this._get(s,"duration"),t=function(){V.datepicker._tidyDialog(s)},V.effects&&(V.effects.effect[e]||V.effects[e])?s.dpDiv.hide(e,V.datepicker._get(s,"showOptions"),i,t):s.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,t),e||t(),this._datepickerShowing=!1,(t=this._get(s,"onClose"))&&t.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI&&(V.unblockUI(),V("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){var e;V.datepicker._curInst&&(e=V(t.target),t=V.datepicker._getInst(e[0]),(e[0].id===V.datepicker._mainDivId||0!==e.parents("#"+V.datepicker._mainDivId).length||e.hasClass(V.datepicker.markerClassName)||e.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)&&(!e.hasClass(V.datepicker.markerClassName)||V.datepicker._curInst===t)||V.datepicker._hideDatepicker())},_adjustDate:function(t,e,i){var s=V(t),t=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(t,e,i),this._updateDatepicker(t))},_gotoToday:function(t){var e=V(t),i=this._getInst(e[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(t=new Date,i.selectedDay=t.getDate(),i.drawMonth=i.selectedMonth=t.getMonth(),i.drawYear=i.selectedYear=t.getFullYear()),this._notifyChange(i),this._adjustDate(e)},_selectMonthYear:function(t,e,i){var s=V(t),t=this._getInst(s[0]);t["selected"+("M"===i?"Month":"Year")]=t["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(t),this._adjustDate(s)},_selectDay:function(t,e,i,s){var n=V(t);V(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(n[0])||((n=this._getInst(n[0])).selectedDay=n.currentDay=parseInt(V("a",s).attr("data-date")),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){t=V(t);this._selectDate(t,"")},_selectDate:function(t,e){var i=V(t),t=this._getInst(i[0]);e=null!=e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(i=this._get(t,"onSelect"))?i.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,s=this._get(t,"altField");s&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),t=this.formatDate(e,i,this._getFormatConfig(t)),V(document).find(s).val(t))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e=new Date(t.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(e,n,t){if(null==e||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;for(var i,s,o,a=0,r=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,r="string"!=typeof r?r:(new Date).getFullYear()%100+parseInt(r,10),l=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,h=(t?t.dayNames:null)||this._defaults.dayNames,c=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,u=(t?t.monthNames:null)||this._defaults.monthNames,d=-1,p=-1,f=-1,g=-1,m=!1,_=function(t){t=w+1<e.length&&e.charAt(w+1)===t;return t&&w++,t},v=function(t){var e=_(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,e=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}"),e=n.substring(a).match(e);if(!e)throw"Missing number at position "+a;return a+=e[0].length,parseInt(e[0],10)},b=function(t,e,i){var s=-1,e=V.map(_(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(V.each(e,function(t,e){var i=e[1];if(n.substr(a,i.length).toLowerCase()===i.toLowerCase())return s=e[0],a+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+a},y=function(){if(n.charAt(a)!==e.charAt(w))throw"Unexpected literal at position "+a;a++},w=0;w<e.length;w++)if(m)"'"!==e.charAt(w)||_("'")?y():m=!1;else switch(e.charAt(w)){case"d":f=v("d");break;case"D":b("D",l,h);break;case"o":g=v("o");break;case"m":p=v("m");break;case"M":p=b("M",c,u);break;case"y":d=v("y");break;case"@":d=(o=new Date(v("@"))).getFullYear(),p=o.getMonth()+1,f=o.getDate();break;case"!":d=(o=new Date((v("!")-this._ticksTo1970)/1e4)).getFullYear(),p=o.getMonth()+1,f=o.getDate();break;case"'":_("'")?y():m=!0;break;default:y()}if(a<n.length&&(s=n.substr(a),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===d?d=(new Date).getFullYear():d<100&&(d+=(new Date).getFullYear()-(new Date).getFullYear()%100+(d<=r?0:-100)),-1<g)for(p=1,f=g;;){if(f<=(i=this._getDaysInMonth(d,p-1)))break;p++,f-=i}if((o=this._daylightSavingAdjust(new Date(d,p-1,f))).getFullYear()!==d||o.getMonth()+1!==p||o.getDate()!==f)throw"Invalid date";return o},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:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";function s(t,e,i){var s=""+e;if(c(t))for(;s.length<i;)s="0"+s;return s}function n(t,e,i,s){return(c(t)?s:i)[e]}var o,a=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,c=function(t){t=o+1<e.length&&e.charAt(o+1)===t;return t&&o++,t},u="",d=!1;if(t)for(o=0;o<e.length;o++)if(d)"'"!==e.charAt(o)||c("'")?u+=e.charAt(o):d=!1;else switch(e.charAt(o)){case"d":u+=s("d",t.getDate(),2);break;case"D":u+=n("D",t.getDay(),a,r);break;case"o":u+=s("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=s("m",t.getMonth()+1,2);break;case"M":u+=n("M",t.getMonth(),l,h);break;case"y":u+=c("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":c("'")?u+="'":d=!0;break;default:u+=e.charAt(o)}return u},_possibleChars:function(e){for(var t="",i=!1,s=function(t){t=n+1<e.length&&e.charAt(n+1)===t;return t&&n++,t},n=0;n<e.length;n++)if(i)"'"!==e.charAt(n)||s("'")?t+=e.charAt(n):i=!1;else switch(e.charAt(n)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":s("'")?t+="'":i=!0;break;default:t+=e.charAt(n)}return t},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(r,t,e){var i,s,t=null==t||""===t?e:"string"==typeof t?function(t){try{return V.datepicker.parseDate(V.datepicker._get(r,"dateFormat"),t,V.datepicker._getFormatConfig(r))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?V.datepicker._getDate(r):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":n+=parseInt(a[1],10);break;case"w":case"W":n+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s))}a=o.exec(t)}return new Date(i,s,n)}(t):"number"==typeof t?isNaN(t)?e:(i=t,(s=new Date).setDate(s.getDate()+i),s):new Date(t.getTime());return(t=t&&"Invalid Date"===t.toString()?e:t)&&(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)),this._daylightSavingAdjust(t)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=e.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=e.getMonth(),t.drawYear=t.selectedYear=t.currentYear=e.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){V.datepicker._adjustDate(i,-e,"M")},next:function(){V.datepicker._adjustDate(i,+e,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(i)},selectDay:function(){return V.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(i,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,x,k,C,D,I,T,P,M,S,H,z,A=new Date,O=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth(),A.getDate())),N=this._get(t,"isRTL"),E=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),F=this._get(t,"navigationAsDateFormat"),L=this._getNumberOfMonths(t),R=this._get(t,"showCurrentAtPos"),A=this._get(t,"stepMonths"),Y=1!==L[0]||1!==L[1],B=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),j=this._getMinMaxDate(t,"min"),q=this._getMinMaxDate(t,"max"),K=t.drawMonth-R,U=t.drawYear;if(K<0&&(K+=12,U--),q)for(e=this._daylightSavingAdjust(new Date(q.getFullYear(),q.getMonth()-L[0]*L[1]+1,q.getDate())),e=j&&e<j?j:e;this._daylightSavingAdjust(new Date(U,K,1))>e;)--K<0&&(K=11,U--);for(t.drawMonth=K,t.drawYear=U,R=this._get(t,"prevText"),R=F?this.formatDate(R,this._daylightSavingAdjust(new Date(U,K-A,1)),this._getFormatConfig(t)):R,i=this._canAdjustMonth(t,-1,U,K)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"e":"w")).text(R))[0].outerHTML:W?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"e":"w")).text(R))[0].outerHTML,R=this._get(t,"nextText"),R=F?this.formatDate(R,this._daylightSavingAdjust(new Date(U,K+A,1)),this._getFormatConfig(t)):R,s=this._canAdjustMonth(t,1,U,K)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"w":"e")).text(R))[0].outerHTML:W?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:R}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(N?"w":"e")).text(R))[0].outerHTML,A=this._get(t,"currentText"),W=this._get(t,"gotoCurrent")&&t.currentDay?B:O,A=F?this.formatDate(A,W,this._getFormatConfig(t)):A,R="",t.inline||(R=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),F="",E&&(F=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(N?R:"").append(this._isInRange(t,W)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(A):"").append(N?"":R)[0].outerHTML),n=parseInt(this._get(t,"firstDay"),10),n=isNaN(n)?0:n,o=this._get(t,"showWeek"),a=this._get(t,"dayNames"),r=this._get(t,"dayNamesMin"),l=this._get(t,"monthNames"),h=this._get(t,"monthNamesShort"),c=this._get(t,"beforeShowDay"),u=this._get(t,"showOtherMonths"),d=this._get(t,"selectOtherMonths"),p=this._getDefaultDate(t),f="",m=0;m<L[0];m++){for(_="",this.maxRows=4,v=0;v<L[1];v++){if(b=this._daylightSavingAdjust(new Date(U,K,t.selectedDay)),y=" ui-corner-all",w="",Y){if(w+="<div class='ui-datepicker-group",1<L[1])switch(v){case 0:w+=" ui-datepicker-group-first",y=" ui-corner-"+(N?"right":"left");break;case L[1]-1:w+=" ui-datepicker-group-last",y=" ui-corner-"+(N?"left":"right");break;default:w+=" ui-datepicker-group-middle",y=""}w+="'>"}for(w+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+y+"'>"+(/all|left/.test(y)&&0===m?N?s:i:"")+(/all|right/.test(y)&&0===m?N?i:s:"")+this._generateMonthYearHeader(t,K,U,j,q,0<m||0<v,l,h)+"</div><table class='ui-datepicker-calendar'><thead><tr>",x=o?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",g=0;g<7;g++)x+="<th scope='col'"+(5<=(g+n+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+a[k=(g+n)%7]+"'>"+r[k]+"</span></th>";for(w+=x+"</tr></thead><tbody>",D=this._getDaysInMonth(U,K),U===t.selectedYear&&K===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,D)),C=(this._getFirstDayOfMonth(U,K)-n+7)%7,D=Math.ceil((C+D)/7),I=Y&&this.maxRows>D?this.maxRows:D,this.maxRows=I,T=this._daylightSavingAdjust(new Date(U,K,1-C)),P=0;P<I;P++){for(w+="<tr>",M=o?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(T)+"</td>":"",g=0;g<7;g++)S=c?c.apply(t.input?t.input[0]:null,[T]):[!0,""],z=(H=T.getMonth()!==K)&&!d||!S[0]||j&&T<j||q&&q<T,M+="<td class='"+(5<=(g+n+6)%7?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(T.getTime()===b.getTime()&&K===t.selectedMonth&&t._keyEvent||p.getTime()===T.getTime()&&p.getTime()===b.getTime()?" "+this._dayOverClass:"")+(z?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!u?"":" "+S[1]+(T.getTime()===B.getTime()?" "+this._currentClass:"")+(T.getTime()===O.getTime()?" ui-datepicker-today":""))+"'"+(H&&!u||!S[2]?"":" title='"+S[2].replace(/'/g,"&#39;")+"'")+(z?"":" data-handler='selectDay' data-event='click' data-month='"+T.getMonth()+"' data-year='"+T.getFullYear()+"'")+">"+(H&&!u?"&#xa0;":z?"<span class='ui-state-default'>"+T.getDate()+"</span>":"<a class='ui-state-default"+(T.getTime()===O.getTime()?" ui-state-highlight":"")+(T.getTime()===B.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#' aria-current='"+(T.getTime()===B.getTime()?"true":"false")+"' data-date='"+T.getDate()+"'>"+T.getDate()+"</a>")+"</td>",T.setDate(T.getDate()+1),T=this._daylightSavingAdjust(T);w+=M+"</tr>"}11<++K&&(K=0,U++),_+=w+="</tbody></table>"+(Y?"</div>"+(0<L[0]&&v===L[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}f+=_}return f+=F,t._keyEvent=!1,f},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f=this._get(t,"changeMonth"),g=this._get(t,"changeYear"),m=this._get(t,"showMonthAfterYear"),_=this._get(t,"selectMonthLabel"),v=this._get(t,"selectYearLabel"),b="<div class='ui-datepicker-title'>",y="";if(o||!f)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' aria-label='"+_+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(m||(b+=y+(!o&&f&&g?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!g)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(a=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),d=(_=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(a[0]),p=Math.max(d,_(a[1]||"")),d=s?Math.max(d,s.getFullYear()):d,p=n?Math.min(p,n.getFullYear()):p,t.yearshtml+="<select class='ui-datepicker-year' aria-label='"+v+"' data-handler='selectYear' data-event='change'>";d<=p;d++)t.yearshtml+="<option value='"+d+"'"+(d===i?" selected='selected'":"")+">"+d+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),m&&(b+=(!o&&f&&g?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),e=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,e)));t.selectedDay=e.getDate(),t.drawMonth=t.selectedMonth=e.getMonth(),t.drawYear=t.selectedYear=e.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),e=i&&e<i?i:e;return t&&t<e?t:e},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),n=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(t,n)},_isInRange:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=null,o=null,a=this._get(t,"yearRange");return a&&(t=a.split(":"),a=(new Date).getFullYear(),n=parseInt(t[0],10),o=parseInt(t[1],10),t[0].match(/[+\-].*/)&&(n+=a),t[1].match(/[+\-].*/)&&(o+=a)),(!i||e.getTime()>=i.getTime())&&(!s||e.getTime()<=s.getTime())&&(!n||e.getFullYear()>=n)&&(!o||e.getFullYear()<=o)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);e=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),e,this._getFormatConfig(t))}}),V.fn.datepicker=function(t){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this].concat(e)):V.datepicker._attachDatepicker(this,t)})},V.datepicker=new b,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.13.1";V.datepicker;V.widget("ui.dialog",{version:"1.13.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=V(this).css(t).offset().top;e<0&&V(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&V.fn.draggable&&this._makeDraggable(),this.options.resizable&&V.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?V(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:V.noop,enable:V.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||V.ui.safeBlur(V.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+V(this).css("z-index")}).get(),s=Math.max.apply(null,s);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=V(V.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;(t=!(t=!(t=!(t=!(t=t||this.element.find("[autofocus]")).length?this.element.find(":tabbable"):t).length?this.uiDialogButtonPane.find(":tabbable"):t).length?this.uiDialogTitlebarClose.filter(":tabbable"):t).length?this.uiDialog:t).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=V.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||V.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=V("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===V.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);var e,i,s;t.keyCode!==V.ui.keyCode.TAB||t.isDefaultPrevented()||(e=this.uiDialog.find(":tabbable"),i=e.first(),s=e.last(),t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault()))},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=V("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){V(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=V("<button type='button'></button>").button({label:V("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=V("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=V("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=V("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var s=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),V.isEmptyObject(t)||Array.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(V.each(t,function(t,e){var i;e=V.extend({type:"button"},e="function"==typeof e?{click:e,text:t}:e),i=e.click,t={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,V("<button></button>",e).button(t).appendTo(s.uiButtonSet).on("click",function(){i.apply(s.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var n=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){n._addClass(V(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",t,a(e))},drag:function(t,e){n._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-n.document.scrollLeft(),s=e.offset.top-n.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=s?"+":"")+s,of:n.window},n._removeClass(V(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var n=this,o=this.options,t=o.resizable,e=this.uiDialog.css("position"),t="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:t,start:function(t,e){n._addClass(V(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",t,a(e))},resize:function(t,e){n._trigger("resize",t,a(e))},stop:function(t,e){var i=n.uiDialog.offset(),s=i.left-n.document.scrollLeft(),i=i.top-n.document.scrollTop();o.height=n.uiDialog.height(),o.width=n.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=s?"+":"")+s+" top"+(0<=i?"+":"")+i,of:n.window},n._removeClass(V(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",t,a(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=V(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=V.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||this.document.data("ui-dialog-instances",t=[]),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};V.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:V("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((i=s.is(":data(ui-resizable)"))&&!e&&s.resizable("destroy"),i&&"string"==typeof e&&s.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=V(this);return V("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!V(t.target).closest(".ui-dialog").length||!!V(t.target).closest(".ui-datepicker").length},_createOverlay:function(){var i,s;this.options.modal&&(i=V.fn.jquery.substring(0,4),s=!0,this._delay(function(){s=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(t){var e;s||((e=this._trackingInstances()[0])._allowInteraction(t)||(t.preventDefault(),e._focusTabbable(),"3.4."!==i&&"3.5."!==i||e._delay(e._restoreTabbableFocus)))}.bind(this)),this.overlay=V("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var t;this.options.modal&&this.overlay&&((t=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!1!==V.uiBackCompat&&V.widget("ui.dialog",V.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});V.ui.dialog,V.widget("ui.progressbar",{version:"1.13.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=V("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=V("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),V.widget("ui.selectmenu",[V.ui.formResetMixin,{version:"1.13.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=V()},_drawButton:function(){var t,e=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.trigger("focus"),t.preventDefault()}}),this.element.hide(),this.button=V("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=V("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=V("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=V("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),i._setSelection(),i._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){e=e.item.data("ui-selectmenu-item");null!=i.focusIndex&&e.index!==i.focusIndex&&(i._trigger("focus",t,{item:e}),i.isOpen||i._select(e,t)),i.focusIndex=e.index,i.button.attr("aria-activedescendant",i.menuItems.eq(e.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(V.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=V("<span>");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(s,t){var n=this,o="";V.each(t,function(t,e){var i;e.optgroup!==o&&(i=V("<li>",{text:e.optgroup}),n._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(s),o=e.optgroup),n._renderItemData(s,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var i=V("<li>"),s=V("<div>",{title:e.element.attr("title")});return e.disabled&&this._addClass(i,null,"ui-state-disabled"),this._setText(s,e.label),i.append(s).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(V(t.target).closest(".ui-selectmenu-menu, #"+V.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case V.ui.keyCode.TAB:case V.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case V.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case V.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case V.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case V.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case V.ui.keyCode.LEFT:this._move("prev",t);break;case V.ui.keyCode.RIGHT:this._move("next",t);break;case V.ui.keyCode.HOME:case V.ui.keyCode.PAGE_UP:this._move("first",t);break;case V.ui.keyCode.END:case V.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){t=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(t,e){var i;"icons"===t&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var i=this,s=[];t.each(function(t,e){e.hidden||s.push(i._parseOption(V(e),t))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),V.widget("ui.slider",V.ui.mouse,{version:"1.13.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e=this.options,i=this.element.find(".ui-slider-handle"),s=[],n=e.values&&e.values.length||1;for(i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),t=i.length;t<n;t++)s.push("<span tabindex='0'></span>");this.handles=i.add(V(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){V(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=V("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,o,e,a,r=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),a={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(a),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-r.values(t));(e<s||s===e&&(t===r._lastChangedValue||r.values(t)===l.min))&&(s=e,n=V(this),o=t)}),!1!==this._start(t,o)&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(n,null,"ui-state-active"),n.trigger("focus"),e=n.offset(),a=!V(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:t.pageX-e.left-n.width()/2,top:t.pageY-e.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,i),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},e=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,e),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,t="horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=t/e;return(t=1<t?1:t)<0&&(t=0),"vertical"===this.orientation&&(t=1-t),e=this._valueMax()-this._valueMin(),e=this._valueMin()+t*e,this._trimAlignValue(e)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,e){var i,s,n;if(1<arguments.length)return this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!Array.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,s=t,n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i;if(arguments.length)return t=this.options.values[t],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(e=this.options.values.slice(),i=0;i<e.length;i+=1)e[i]=this._trimAlignValue(e[i]);return e}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=0<this.options.step?this.options.step:1,i=(t-this._valueMin())%e,t=t-i;return 2*Math.abs(i)>=e&&(t+=0<i?e:-e),parseFloat(t.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var e=t.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,l=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,h["horizontal"===r.orientation?"left":"bottom"]=i+"%",V(this).stop(1,1)[l?"animate":"css"](h,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,s,n=V(t.target).data("ui-slider-handle-index");switch(t.keyCode){case V.ui.keyCode.HOME:case V.ui.keyCode.END:case V.ui.keyCode.PAGE_UP:case V.ui.keyCode.PAGE_DOWN:case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(V(t.target),null,"ui-state-active"),!1===this._start(t,n)))return}switch(s=this.options.step,e=i=this._hasMultipleValues()?this.values(n):this.value(),t.keyCode){case V.ui.keyCode.HOME:i=this._valueMin();break;case V.ui.keyCode.END:i=this._valueMax();break;case V.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},keyup:function(t){var e=V(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(V(t.target),null,"ui-state-active"))}}});function M(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}V.widget("ui.spinner",{version:"1.13.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},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 s=this._super(),n=this.element;return V.each(["min","max","step"],function(t,e){var i=n.attr(e);null!=i&&i.length&&(s[e]=i)}),s},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){var i=V.ui.safeActiveElement(this.document[0]);if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;function i(){this.element[0]===V.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=e,this._delay(function(){this.previous=e}))}e=this.element[0]===V.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(t)&&this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(V(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,i=V.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?"function"==typeof e?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var e=t.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_adjustValue:function(t){var e=this.options,i=null!==e.min?e.min:0,s=t-i;return t=i+Math.round(s/e.step)*e.step,t=parseFloat(t.toFixed(this._precision())),null!==e.max&&t>e.max?e.max:null!==e.min&&t<e.min?e.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i;if("culture"===t||"numberFormat"===t)return i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,e.up),i=this.buttons.last().find(".ui-icon"),this._removeClass(i,null,this.options.icons.down),this._addClass(i,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:M(function(t){this._super(t)}),_parse:function(t){return""===(t="string"==typeof t&&""!==t?window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t:t)||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:M(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:M(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:M(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:M(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());M(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==V.uiBackCompat&&V.widget("ui.spinner",V.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var S;V.ui.spinner;V.widget("ui.tabs",{version:"1.13.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(S=/#.*$/,function(t){var e=t.href.replace(S,""),i=location.href.replace(S,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=V.uniqueSort(t.disabled.concat(V.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=V(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(t,e){if(V(e).attr("aria-controls")===s)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):V()}},_tabKeydown:function(t){var e=V(V.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:i++;break;case V.ui.keyCode.UP:case V.ui.keyCode.LEFT:s=!1,i--;break;case V.ui.keyCode.END:i=this.anchors.length-1;break;case V.ui.keyCode.HOME:i=0;break;case V.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case V.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===V.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===V.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===V.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==V.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=V.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!V.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=V()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=V()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){V(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){V(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return V("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=V(),this.anchors.each(function(t,e){var i,s,n,o=V(e).uniqueId().attr("id"),a=V(e).closest("li"),r=a.attr("aria-controls");l._isLocal(e)?(n=(i=e.hash).substring(1),s=l.element.find(l._sanitizeSelector(i))):(n=a.attr("aria-controls")||V({}).uniqueId()[0].id,(s=l.element.find(i="#"+n)).length||(s=l._createPanel(n)).insertAfter(l.panels[t-1]||l.tablist),s.attr("aria-live","polite")),s.length&&(l.panels=l.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":n,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return V("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=V(e),!0===t||-1!==V.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=V(this).outerHeight(!0)}),this.panels.each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,V(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):V(),i={oldTab:i,oldPanel:r,newTab:o?V():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?V():s,this.xhr&&this.xhr.abort(),r.length||a.length||V.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===V(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=!t.length?this.active:t).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return!1===t?V():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+V.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){V.data(this,"ui-tabs-destroy")?V(this).remove():V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=V(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?V.map(t,function(t){return t!==i?t:null}):V.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==V.inArray(t,e))return;e=Array.isArray(e)?V.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=V.ajax(this._ajaxSettings(t,s,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){a.html(t),o._trigger("load",s,r),n(i,e)},1)}).fail(function(t,e){setTimeout(function(){n(t,e)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return n._trigger("beforeLoad",i,V.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=V(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==V.uiBackCompat&&V.widget("ui.tabs",V.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});V.ui.tabs;V.widget("ui.tooltip",{version:"1.13.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=V(this).attr("title");return V("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),e=V.inArray(e,i);-1!==e&&i.splice(e,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=V("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=V([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&V.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=V(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=V(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=V([])},open:function(t){var i=this,e=V(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=V(this);e.data("ui-tooltip-open")&&((t=V.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t=this.options.content,s=this,n=i?i.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(i,e,t);(t=t.call(e[0],function(t){s._delay(function(){e.data("ui-tooltip-open")&&(i&&(i.type=n),this._open(i,e,t))})}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a=V.extend({},this.options.position);function r(t){a.of=t,n.is(":hidden")||n.position(a)}i&&((s=this._find(e))?s.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),s=this._tooltip(e),n=s.tooltip,this._addDescribedBy(e,n.attr("id")),n.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(i=V("<div>").html(n.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),i.removeAttr("id").find("[id]").removeAttr("id"),i.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):n.position(V.extend({of:e},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){n.is(":visible")&&(r(a.of),clearInterval(o))},13)),this._trigger("open",t,{tooltip:n})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){t.keyCode===V.ui.keyCode.ESCAPE&&((t=V.Event(t)).currentTarget=e[0],this.close(t,!0))}};e[0]!==this.element[0]&&(i.remove=function(){var t=this._find(e);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,s=V(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(V(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&V.each(this.parents,function(t,e){V(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding||(n.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=V("<div>").attr("role","tooltip"),i=V("<div>").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=!t.length?this.document[0].body:t},_destroy:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur"),e=e.element;i.target=i.currentTarget=e[0],s.close(i,!0),V("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title")||e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==V.uiBackCompat&&V.widget("ui.tooltip",V.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});V.ui.tooltip;var H=V,z={},A=z.toString,O=/^([\-+])=\s*(\d+\.?\d*)/,N=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),t[4]?(parseInt(t[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),t[4]?(parseInt(t[4]+t[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],E=H.Color=function(t,e,i,s){return new H.Color.fn.parse(t,e,i,s)},W={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},F={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},L=E.support={},R=H("<p>")[0],Y=H.each;function B(t){return null==t?t+"":"object"==typeof t?z[A.call(t)]||"object":typeof t}function j(t,e,i){var s=F[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:Math.min(s.max,Math.max(0,t)))}function q(s){var n=E(),o=n._rgba=[];return s=s.toLowerCase(),Y(N,function(t,e){var i=e.re.exec(s),i=i&&e.parse(i),e=e.space||"rgba";if(i)return i=n[e](i),n[W[e].cache]=i[W[e].cache],o=n._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&H.extend(o,st.transparent),n):st[s]}function K(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}R.style.cssText="background-color:rgba(1,1,1,.5)",L.rgba=-1<R.style.backgroundColor.indexOf("rgba"),Y(W,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),H.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){z["[object "+e+"]"]=e.toLowerCase()}),(E.fn=H.extend(E.prototype,{parse:function(n,t,e,i){if(void 0===n)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=H(n).css(t),t=void 0);var o=this,s=B(n),a=this._rgba=[];return void 0!==t&&(n=[n,t,e,i],s="array"),"string"===s?this.parse(q(n)||st._default):"array"===s?(Y(W.rgba.props,function(t,e){a[e.idx]=j(n[e.idx],e)}),this):"object"===s?(Y(W,n instanceof E?function(t,e){n[e.cache]&&(o[e.cache]=n[e.cache].slice())}:function(t,i){var s=i.cache;Y(i.props,function(t,e){if(!o[s]&&i.to){if("alpha"===t||null==n[t])return;o[s]=i.to(o._rgba)}o[s][e.idx]=j(n[t],e,!0)}),o[s]&&H.inArray(null,o[s].slice(0,3))<0&&(null==o[s][3]&&(o[s][3]=1),i.from&&(o._rgba=i.from(o[s])))}),this):void 0},is:function(t){var n=E(t),o=!0,a=this;return Y(W,function(t,e){var i,s=n[e.cache];return s&&(i=a[e.cache]||e.to&&e.to(a._rgba)||[],Y(e.props,function(t,e){if(null!=s[e.idx])return o=s[e.idx]===i[e.idx]})),o}),o},_space:function(){var i=[],s=this;return Y(W,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,a){var e=(h=E(t))._space(),i=W[e],t=0===this.alpha()?E("transparent"):this,r=t[i.cache]||i.to(t._rgba),l=r.slice(),h=h[i.cache];return Y(i.props,function(t,e){var i=e.idx,s=r[i],n=h[i],o=F[e.type]||{};null!==n&&(null===s?l[i]=n:(o.mod&&(n-s>o.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=j((n-s)*a+s,e)))}),this[e](l)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=E(t)._rgba;return E(H.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=H.map(this._rgba,function(t,e){return null!=t?t:2<e?1:0});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=H.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),t=e&&e<3?Math.round(100*t)+"%":t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+H.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}})).parse.prototype=E.fn,W.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,n=t[3],o=Math.max(e,i,s),a=Math.min(e,i,s),r=o-a,l=o+a,t=.5*l,i=a===o?0:e===o?60*(i-s)/r+360:i===o?60*(s-e)/r+120:60*(e-i)/r+240,l=0==r?0:t<=.5?r/l:r/(2-l);return[Math.round(i)%360,l,t,null==n?1:n]},W.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],t=t[3],i=s<=.5?s*(1+i):s+i-s*i,s=2*s-i;return[Math.round(255*K(s,i,e+1/3)),Math.round(255*K(s,i,e)),Math.round(255*K(s,i,e-1/3)),t]},Y(W,function(l,t){var e=t.props,o=t.cache,a=t.to,r=t.from;E.fn[l]=function(t){if(a&&!this[o]&&(this[o]=a(this._rgba)),void 0===t)return this[o].slice();var i=B(t),s="array"===i||"object"===i?t:arguments,n=this[o].slice();return Y(e,function(t,e){t=s["object"===i?t:e.idx];null==t&&(t=n[e.idx]),n[e.idx]=j(t,e)}),r?((t=E(r(n)))[o]=n,t):E(n)},Y(e,function(a,r){E.fn[a]||(E.fn[a]=function(t){var e,i=B(t),s="alpha"===a?this._hsla?"hsla":"rgba":l,n=this[s](),o=n[r.idx];return"undefined"===i?o:("function"===i&&(i=B(t=t.call(this,o))),null==t&&r.empty?this:("string"===i&&(e=O.exec(t))&&(t=o+parseFloat(e[2])*("+"===e[1]?1:-1)),n[r.idx]=t,this[s](n)))})})}),(E.hook=function(t){t=t.split(" ");Y(t,function(t,o){H.cssHooks[o]={set:function(t,e){var i,s,n="";if("transparent"!==e&&("string"!==B(e)||(i=q(e)))){if(e=E(i||e),!L.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===o?t.parentNode:t;(""===n||"transparent"===n)&&s&&s.style;)try{n=H.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(n&&"transparent"!==n?n:"_default")}e=e.toRgbaString()}try{t.style[o]=e}catch(t){}}},H.fx.step[o]=function(t){t.colorInit||(t.start=E(t.elem,o),t.end=E(t.end),t.colorInit=!0),H.cssHooks[o].set(t.elem,t.start.transition(t.end,t.pos))}})})("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),H.cssHooks.borderColor={expand:function(i){var s={};return Y(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}};var U,X,$,G,Q,J,Z,tt,et,it,st=H.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},nt="ui-effects-",ot="ui-effects-style",at="ui-effects-animated";function rt(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,n={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(n[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=s[e]);else for(e in s)"string"==typeof s[e]&&(n[e]=s[e]);return n}function lt(t,e,i,s){return t={effect:t=V.isPlainObject(t)?(e=t).effect:t},"function"==typeof(e=null==e?{}:e)&&(s=e,i=null,e={}),"number"!=typeof e&&!V.fx.speeds[e]||(s=i,i=e,e={}),"function"==typeof i&&(s=i,i=null),e&&V.extend(t,e),i=i||e.duration,t.duration=V.fx.off?0:"number"==typeof i?i:i in V.fx.speeds?V.fx.speeds[i]:V.fx.speeds._default,t.complete=s||e.complete,t}function ht(t){return!t||"number"==typeof t||V.fx.speeds[t]||("string"==typeof t&&!V.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function ct(t,e){var i=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?i:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}V.effects={effect:{}},G=["add","remove","toggle"],Q={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},V.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){V.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(H.style(t.elem,e,t.end),t.setAttr=!0)}}),V.fn.addBack||(V.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),V.effects.animateClass=function(n,t,e,i){var o=V.speed(t,e,i);return this.queue(function(){var i=V(this),t=i.attr("class")||"",e=(e=o.children?i.find("*").addBack():i).map(function(){return{el:V(this),start:rt(this)}}),s=function(){V.each(G,function(t,e){n[e]&&i[e+"Class"](n[e])})};s(),e=e.map(function(){return this.end=rt(this.el[0]),this.diff=function(t,e){var i,s,n={};for(i in e)s=e[i],t[i]!==s&&(Q[i]||!V.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s));return n}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=V.Deferred(),i=V.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),V.when.apply(V,e.get()).done(function(){s(),V.each(arguments,function(){var e=this.el;V.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},V.fn.extend({addClass:($=V.fn.addClass,function(t,e,i,s){return e?V.effects.animateClass.call(this,{add:t},e,i,s):$.apply(this,arguments)}),removeClass:(X=V.fn.removeClass,function(t,e,i,s){return 1<arguments.length?V.effects.animateClass.call(this,{remove:t},e,i,s):X.apply(this,arguments)}),toggleClass:(U=V.fn.toggleClass,function(t,e,i,s,n){return"boolean"==typeof e||void 0===e?i?V.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,n):U.apply(this,arguments):V.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,n){return V.effects.animateClass.call(this,{add:e,remove:t},i,s,n)}}),V.expr&&V.expr.pseudos&&V.expr.pseudos.animated&&(V.expr.pseudos.animated=(J=V.expr.pseudos.animated,function(t){return!!V(t).data(at)||J(t)})),!1!==V.uiBackCompat&&V.extend(V.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(nt+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;s<n;s++)null!==e[s]&&(i=t.data(nt+e[s]),t.css(e[s],i))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=V("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!V.contains(i[0],n)||V(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(V.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),V.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!V.contains(t[0],e)||V(e).trigger("focus")),t}}),V.extend(V.effects,{version:"1.13.1",define:function(t,e,i){return i||(i=e,e="effect"),V.effects.effect[t]=i,V.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,e="vertical"!==i?(e||100)/100:1;return{height:t.height()*e,width:t.width()*s,outerHeight:t.outerHeight()*e,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(ot,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(ot)||"",t.removeData(ot)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=V("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(nt+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=nt+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){V.effects.restoreStyle(t),V.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},V.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(o[e]=i[0]*n+i[1])}),o}}),V.fn.extend({effect:function(){function t(t){var e=V(this),i=V.effects.mode(e,r)||o;e.data(at,!0),l.push(i),o&&("show"===i||i===o&&"hide"===i)&&e.show(),o&&"none"===i||V.effects.saveStyle(e),"function"==typeof t&&t()}var s=lt.apply(this,arguments),n=V.effects.effect[s.effect],o=n.mode,e=s.queue,i=e||"fx",a=s.complete,r=s.mode,l=[];return V.fx.off||!n?r?this[r](s.duration,a):this.each(function(){a&&a.call(this)}):!1===e?this.each(t).each(h):this.queue(i,t).queue(i,h);function h(t){var e=V(this);function i(){"function"==typeof a&&a.call(e[0]),"function"==typeof t&&t()}s.mode=l.shift(),!1===V.uiBackCompat||o?"none"===s.mode?(e[r](),i()):n.call(e[0],s,function(){e.removeData(at),V.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===r:"show"===r)?(e[r](),i()):n.call(e[0],s,i)}},show:(et=V.fn.show,function(t){if(ht(t))return et.apply(this,arguments);t=lt.apply(this,arguments);return t.mode="show",this.effect.call(this,t)}),hide:(tt=V.fn.hide,function(t){if(ht(t))return tt.apply(this,arguments);t=lt.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)}),toggle:(Z=V.fn.toggle,function(t){if(ht(t)||"boolean"==typeof t)return Z.apply(this,arguments);t=lt.apply(this,arguments);return t.mode="toggle",this.effect.call(this,t)}),cssUnit:function(t){var i=this.css(t),s=[];return V.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):ct(this.css("clip"),this)},transfer:function(t,e){var i=V(this),s=V(t.to),n="fixed"===s.css("position"),o=V("body"),a=n?o.scrollTop():0,r=n?o.scrollLeft():0,o=s.offset(),o={top:o.top-a,left:o.left-r,height:s.innerHeight(),width:s.innerWidth()},s=i.offset(),l=V("<div class='ui-effects-transfer'></div>");l.appendTo("body").addClass(t.className).css({top:s.top-a,left:s.left-r,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(o,t.duration,t.easing,function(){l.remove(),"function"==typeof e&&e()})}}),V.fx.step.clip=function(t){t.clipInit||(t.start=V(t.elem).cssClip(),"string"==typeof t.end&&(t.end=ct(t.end,t.elem)),t.clipInit=!0),V(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},it={},V.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){it[t]=function(t){return Math.pow(t,e+2)}}),V.extend(it,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),V.each(it,function(t,e){V.easing["easeIn"+t]=e,V.easing["easeOut"+t]=function(t){return 1-e(1-t)},V.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});R=V.effects,V.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=V(this),n=t.direction||"up",o=s.cssClip(),a={clip:V.extend({},o)},r=V.effects.createPlaceholder(s);a.clip[i[n][0]]=a.clip[i[n][1]],"show"===t.mode&&(s.cssClip(a.clip),r&&r.css(V.effects.clipToBox(a)),a.clip=o),r&&r.animate(V.effects.clipToBox(a),t.duration,t.easing),s.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("bounce",function(t,e){var i,s,n=V(this),o=t.mode,a="hide"===o,r="show"===o,l=t.direction||"up",h=t.distance,c=t.times||5,o=2*c+(r||a?1:0),u=t.duration/o,d=t.easing,p="up"===l||"down"===l?"top":"left",f="up"===l||"left"===l,g=0,t=n.queue().length;for(V.effects.createPlaceholder(n),l=n.css(p),h=h||n["top"==p?"outerHeight":"outerWidth"]()/3,r&&((s={opacity:1})[p]=l,n.css("opacity",0).css(p,f?2*-h:2*h).animate(s,u,d)),a&&(h/=Math.pow(2,c-1)),(s={})[p]=l;g<c;g++)(i={})[p]=(f?"-=":"+=")+h,n.animate(i,u,d).animate(s,u,d),h=a?2*h:h/2;a&&((i={opacity:0})[p]=(f?"-=":"+=")+h,n.animate(i,u,d)),n.queue(e),V.effects.unshift(n,t,1+o)}),V.effects.define("clip","hide",function(t,e){var i={},s=V(this),n=t.direction||"vertical",o="both"===n,a=o||"horizontal"===n,o=o||"vertical"===n,n=s.cssClip();i.clip={top:o?(n.bottom-n.top)/2:n.top,right:a?(n.right-n.left)/2:n.right,bottom:o?(n.bottom-n.top)/2:n.bottom,left:a?(n.right-n.left)/2:n.left},V.effects.createPlaceholder(s),"show"===t.mode&&(s.cssClip(i.clip),i.clip=n),s.animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("drop","hide",function(t,e){var i=V(this),s="show"===t.mode,n=t.direction||"left",o="up"===n||"down"===n?"top":"left",a="up"===n||"left"===n?"-=":"+=",r="+="==a?"-=":"+=",l={opacity:0};V.effects.createPlaceholder(i),n=t.distance||i["top"==o?"outerHeight":"outerWidth"](!0)/2,l[o]=a+n,s&&(i.css(l),l[o]=r+n,l.opacity=1),i.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("explode","hide",function(t,e){var i,s,n,o,a,r,l=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=l,c=V(this),u="show"===t.mode,d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/h),f=Math.ceil(c.outerHeight()/l),g=[];function m(){g.push(this),g.length===l*h&&(c.css({visibility:"visible"}),V(g).remove(),e())}for(i=0;i<l;i++)for(o=d.top+i*f,r=i-(l-1)/2,s=0;s<h;s++)n=d.left+s*p,a=s-(h-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),V.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;V(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("fold","hide",function(e,t){var i=V(this),s=e.mode,n="show"===s,o="hide"===s,a=e.size||15,r=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],h=e.duration/2,c=V.effects.createPlaceholder(i),u=i.cssClip(),d={clip:V.extend({},u)},p={clip:V.extend({},u)},f=[u[l[0]],u[l[1]]],s=i.queue().length;r&&(a=parseInt(r[1],10)/100*f[o?0:1]),d.clip[l[0]]=a,p.clip[l[0]]=a,p.clip[l[1]]=0,n&&(i.cssClip(p.clip),c&&c.css(V.effects.clipToBox(p)),p.clip=u),i.queue(function(t){c&&c.animate(V.effects.clipToBox(d),h,e.easing).animate(V.effects.clipToBox(p),h,e.easing),t()}).animate(d,h,e.easing).animate(p,h,e.easing).queue(t),V.effects.unshift(i,s,4)}),V.effects.define("highlight","show",function(t,e){var i=V(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),V.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("size",function(s,e){var n,i=V(this),t=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=s.mode,l="effect"!==r,h=s.scale||"both",c=s.origin||["middle","center"],u=i.css("position"),d=i.position(),p=V.effects.scaledDimensions(i),f=s.from||p,g=s.to||V.effects.scaledDimensions(i,0);V.effects.createPlaceholder(i),"show"===r&&(r=f,f=g,g=r),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(n.from.y!==n.to.y&&(f=V.effects.setTransition(i,o,n.from.y,f),g=V.effects.setTransition(i,o,n.to.y,g)),n.from.x!==n.to.x&&(f=V.effects.setTransition(i,a,n.from.x,f),g=V.effects.setTransition(i,a,n.to.x,g))),"content"!==h&&"both"!==h||n.from.y!==n.to.y&&(f=V.effects.setTransition(i,t,n.from.y,f),g=V.effects.setTransition(i,t,n.to.y,g)),c&&(c=V.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*c.y+d.top,f.left=(p.outerWidth-f.outerWidth)*c.x+d.left,g.top=(p.outerHeight-g.outerHeight)*c.y+d.top,g.left=(p.outerWidth-g.outerWidth)*c.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(t),a=a.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=V(this),e=V.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},e={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=V.effects.setTransition(t,o,n.from.y,i),e=V.effects.setTransition(t,o,n.to.y,e)),n.from.x!==n.to.x&&(i=V.effects.setTransition(t,a,n.from.x,i),e=V.effects.setTransition(t,a,n.to.x,e)),l&&V.effects.saveStyle(t),t.css(i),t.animate(e,s.duration,s.easing,function(){l&&V.effects.restoreStyle(t)})})),i.animate(g,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=i.offset();0===g.opacity&&i.css("opacity",f.opacity),l||(i.css("position","static"===u?"relative":u).offset(t),V.effects.saveStyle(i)),e()}})}),V.effects.define("scale",function(t,e){var i=V(this),s=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),s=V.extend(!0,{from:V.effects.scaledDimensions(i),to:V.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(s.from.opacity=1,s.to.opacity=0),V.effects.effect.size.call(this,s,e)}),V.effects.define("puff","hide",function(t,e){t=V.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});V.effects.effect.scale.call(this,t,e)}),V.effects.define("pulsate","show",function(t,e){var i=V(this),s=t.mode,n="show"===s,o=2*(t.times||5)+(n||"hide"===s?1:0),a=t.duration/o,r=0,l=1,s=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),r=1);l<o;l++)i.animate({opacity:r},a,t.easing),r=1-r;i.animate({opacity:r},a,t.easing),i.queue(e),V.effects.unshift(i,s,1+o)}),V.effects.define("shake",function(t,e){var i=1,s=V(this),n=t.direction||"left",o=t.distance||20,a=t.times||3,r=2*a+1,l=Math.round(t.duration/r),h="up"===n||"down"===n?"top":"left",c="up"===n||"left"===n,u={},d={},p={},n=s.queue().length;for(V.effects.createPlaceholder(s),u[h]=(c?"-=":"+=")+o,d[h]=(c?"+=":"-=")+2*o,p[h]=(c?"-=":"+=")+2*o,s.animate(u,l,t.easing);i<a;i++)s.animate(d,l,t.easing).animate(p,l,t.easing);s.animate(d,l,t.easing).animate(u,l/2,t.easing).queue(e),V.effects.unshift(s,n,1+r)}),V.effects.define("slide","show",function(t,e){var i,s,n=V(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,r=t.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r,c=t.distance||n["top"==l?"outerHeight":"outerWidth"](!0),u={};V.effects.createPlaceholder(n),i=n.cssClip(),s=n.position()[l],u[l]=(h?-1:1)*c+s,u.clip=n.cssClip(),u.clip[o[r][1]]=u.clip[o[r][0]],"show"===a&&(n.cssClip(u.clip),n.css(l,u[l]),u.clip=i,u[l]=s),n.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),!1!==V.uiBackCompat&&V.effects.define("transfer",function(t,e){V(this).transfer(t,e)})});
/*! jQuery Timepicker Addon - v1.5.3 - 2015-04-19
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2015 Trent Richardson; Licensed MIT */
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		define(['jquery', 'jquery.ui'], factory);
	} else {
		factory(jQuery);
	}
}(function ($) {

	/*
	* Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded"
	*/
	$.ui.timepicker = $.ui.timepicker || {};
	if ($.ui.timepicker.version) {
		return;
	}

	/*
	* Extend jQueryUI, get it started with our version number
	*/
	$.extend($.ui, {
		timepicker: {
			version: "1.5.3"
		}
	});

	/* 
	* Timepicker manager.
	* Use the singleton instance of this class, $.timepicker, to interact with the time picker.
	* Settings for (groups of) time pickers are maintained in an instance object,
	* allowing multiple different settings on the same page.
	*/
	var Timepicker = function () {
		this.regional = []; // Available regional settings, indexed by language code
		this.regional[''] = { // Default regional settings
			currentText: 'Now',
			closeText: 'Done',
			amNames: ['AM', 'A'],
			pmNames: ['PM', 'P'],
			timeFormat: 'HH:mm',
			timeSuffix: '',
			timeOnlyTitle: 'Choose Time',
			timeText: 'Time',
			hourText: 'Hour',
			minuteText: 'Minute',
			secondText: 'Second',
			millisecText: 'Millisecond',
			microsecText: 'Microsecond',
			timezoneText: 'Time Zone',
			isRTL: false
		};
		this._defaults = { // Global defaults for all the datetime picker instances
			showButtonPanel: true,
			timeOnly: false,
			timeOnlyShowDate: false,
			showHour: null,
			showMinute: null,
			showSecond: null,
			showMillisec: null,
			showMicrosec: null,
			showTimezone: null,
			showTime: true,
			stepHour: 1,
			stepMinute: 1,
			stepSecond: 1,
			stepMillisec: 1,
			stepMicrosec: 1,
			hour: 0,
			minute: 0,
			second: 0,
			millisec: 0,
			microsec: 0,
			timezone: null,
			hourMin: 0,
			minuteMin: 0,
			secondMin: 0,
			millisecMin: 0,
			microsecMin: 0,
			hourMax: 23,
			minuteMax: 59,
			secondMax: 59,
			millisecMax: 999,
			microsecMax: 999,
			minDateTime: null,
			maxDateTime: null,
			maxTime: null,
			minTime: null,
			onSelect: null,
			hourGrid: 0,
			minuteGrid: 0,
			secondGrid: 0,
			millisecGrid: 0,
			microsecGrid: 0,
			alwaysSetTime: true,
			separator: ' ',
			altFieldTimeOnly: true,
			altTimeFormat: null,
			altSeparator: null,
			altTimeSuffix: null,
			altRedirectFocus: true,
			pickerTimeFormat: null,
			pickerTimeSuffix: null,
			showTimepicker: true,
			timezoneList: null,
			addSliderAccess: false,
			sliderAccessArgs: null,
			controlType: 'slider',
			oneLine: false,
			defaultValue: null,
			parse: 'strict',
			afterInject: null
		};
		$.extend(this._defaults, this.regional['']);
	};

	$.extend(Timepicker.prototype, {
		$input: null,
		$altInput: null,
		$timeObj: null,
		inst: null,
		hour_slider: null,
		minute_slider: null,
		second_slider: null,
		millisec_slider: null,
		microsec_slider: null,
		timezone_select: null,
		maxTime: null,
		minTime: null,
		hour: 0,
		minute: 0,
		second: 0,
		millisec: 0,
		microsec: 0,
		timezone: null,
		hourMinOriginal: null,
		minuteMinOriginal: null,
		secondMinOriginal: null,
		millisecMinOriginal: null,
		microsecMinOriginal: null,
		hourMaxOriginal: null,
		minuteMaxOriginal: null,
		secondMaxOriginal: null,
		millisecMaxOriginal: null,
		microsecMaxOriginal: null,
		ampm: '',
		formattedDate: '',
		formattedTime: '',
		formattedDateTime: '',
		timezoneList: null,
		units: ['hour', 'minute', 'second', 'millisec', 'microsec'],
		support: {},
		control: null,

		/* 
		* Override the default settings for all instances of the time picker.
		* @param  {Object} settings  object - the new settings to use as defaults (anonymous object)
		* @return {Object} the manager object
		*/
		setDefaults: function (settings) {
			extendRemove(this._defaults, settings || {});
			return this;
		},

		/*
		* Create a new Timepicker instance
		*/
		_newInst: function ($input, opts) {
			var tp_inst = new Timepicker(),
				inlineSettings = {},
				fns = {},
				overrides, i;

			for (var attrName in this._defaults) {
				if (this._defaults.hasOwnProperty(attrName)) {
					var attrValue = $input.attr('time:' + attrName);
					if (attrValue) {
						try {
							inlineSettings[attrName] = eval(attrValue);
						} catch (err) {
							inlineSettings[attrName] = attrValue;
						}
					}
				}
			}

			overrides = {
				beforeShow: function (input, dp_inst) {
					if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) {
						return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst);
					}
				},
				onChangeMonthYear: function (year, month, dp_inst) {
					// Update the time as well : this prevents the time from disappearing from the $input field.
					// tp_inst._updateDateTime(dp_inst);
					if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) {
						tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);
					}
				},
				onClose: function (dateText, dp_inst) {
					if (tp_inst.timeDefined === true && $input.val() !== '') {
						tp_inst._updateDateTime(dp_inst);
					}
					if ($.isFunction(tp_inst._defaults.evnts.onClose)) {
						tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst);
					}
				}
			};
			for (i in overrides) {
				if (overrides.hasOwnProperty(i)) {
					fns[i] = opts[i] || null;
				}
			}

			tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, {
				evnts: fns,
				timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
			});
			tp_inst.amNames = $.map(tp_inst._defaults.amNames, function (val) {
				return val.toUpperCase();
			});
			tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function (val) {
				return val.toUpperCase();
			});

			// detect which units are supported
			tp_inst.support = detectSupport(
					tp_inst._defaults.timeFormat + 
					(tp_inst._defaults.pickerTimeFormat ? tp_inst._defaults.pickerTimeFormat : '') +
					(tp_inst._defaults.altTimeFormat ? tp_inst._defaults.altTimeFormat : ''));

			// controlType is string - key to our this._controls
			if (typeof(tp_inst._defaults.controlType) === 'string') {
				if (tp_inst._defaults.controlType === 'slider' && typeof($.ui.slider) === 'undefined') {
					tp_inst._defaults.controlType = 'select';
				}
				tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType];
			}
			// controlType is an object and must implement create, options, value methods
			else {
				tp_inst.control = tp_inst._defaults.controlType;
			}

			// prep the timezone options
			var timezoneList = [-720, -660, -600, -570, -540, -480, -420, -360, -300, -270, -240, -210, -180, -120, -60,
					0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480, 525, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840];
			if (tp_inst._defaults.timezoneList !== null) {
				timezoneList = tp_inst._defaults.timezoneList;
			}
			var tzl = timezoneList.length, tzi = 0, tzv = null;
			if (tzl > 0 && typeof timezoneList[0] !== 'object') {
				for (; tzi < tzl; tzi++) {
					tzv = timezoneList[tzi];
					timezoneList[tzi] = { value: tzv, label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) };
				}
			}
			tp_inst._defaults.timezoneList = timezoneList;

			// set the default units
			tp_inst.timezone = tp_inst._defaults.timezone !== null ? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) :
							((new Date()).getTimezoneOffset() * -1);
			tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin ? tp_inst._defaults.hourMin :
							tp_inst._defaults.hour > tp_inst._defaults.hourMax ? tp_inst._defaults.hourMax : tp_inst._defaults.hour;
			tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin ? tp_inst._defaults.minuteMin :
							tp_inst._defaults.minute > tp_inst._defaults.minuteMax ? tp_inst._defaults.minuteMax : tp_inst._defaults.minute;
			tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin ? tp_inst._defaults.secondMin :
							tp_inst._defaults.second > tp_inst._defaults.secondMax ? tp_inst._defaults.secondMax : tp_inst._defaults.second;
			tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin ? tp_inst._defaults.millisecMin :
							tp_inst._defaults.millisec > tp_inst._defaults.millisecMax ? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;
			tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin ? tp_inst._defaults.microsecMin :
							tp_inst._defaults.microsec > tp_inst._defaults.microsecMax ? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec;
			tp_inst.ampm = '';
			tp_inst.$input = $input;

			if (tp_inst._defaults.altField) {
				tp_inst.$altInput = $(tp_inst._defaults.altField);
				if (tp_inst._defaults.altRedirectFocus === true) {
					tp_inst.$altInput.css({
						cursor: 'pointer'
					}).focus(function () {
						$input.trigger("focus");
					});
				}
			}

			if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) {
				tp_inst._defaults.minDate = new Date();
			}
			if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) {
				tp_inst._defaults.maxDate = new Date();
			}

			// datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..
			if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) {
				tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());
			}
			if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) {
				tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());
			}
			if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) {
				tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());
			}
			if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) {
				tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
			}
			tp_inst.$input.bind('focus', function () {
				tp_inst._onFocus();
			});

			return tp_inst;
		},

		/*
		* add our sliders to the calendar
		*/
		_addTimePicker: function (dp_inst) {
			var currDT = $.trim((this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val());

			this.timeDefined = this._parseTime(currDT);
			this._limitMinMaxDateTime(dp_inst, false);
			this._injectTimePicker();
			this._afterInject();
		},

		/*
		* parse the time string from input value or _setTime
		*/
		_parseTime: function (timeString, withDate) {
			if (!this.inst) {
				this.inst = $.datepicker._getInst(this.$input[0]);
			}

			if (withDate || !this._defaults.timeOnly) {
				var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
				try {
					var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults);
					if (!parseRes.timeObj) {
						return false;
					}
					$.extend(this, parseRes.timeObj);
				} catch (err) {
					$.timepicker.log("Error parsing the date/time string: " + err +
									"\ndate/time string = " + timeString +
									"\ntimeFormat = " + this._defaults.timeFormat +
									"\ndateFormat = " + dp_dateFormat);
					return false;
				}
				return true;
			} else {
				var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults);
				if (!timeObj) {
					return false;
				}
				$.extend(this, timeObj);
				return true;
			}
		},

		/*
		* Handle callback option after injecting timepicker
		*/
		_afterInject: function() {
			var o = this.inst.settings;
			if ($.isFunction(o.afterInject)) {
				o.afterInject.call(this);
			}
		},

		/*
		* generate and inject html for timepicker into ui datepicker
		*/
		_injectTimePicker: function () {
			var $dp = this.inst.dpDiv,
				o = this.inst.settings,
				tp_inst = this,
				litem = '',
				uitem = '',
				show = null,
				max = {},
				gridSize = {},
				size = null,
				i = 0,
				l = 0;

			// Prevent displaying twice
			if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) {
				var noDisplay = ' ui_tpicker_unit_hide',
					html = '<div class="ui-timepicker-div' + (o.isRTL ? ' ui-timepicker-rtl' : '') + (o.oneLine && o.controlType === 'select' ? ' ui-timepicker-oneLine' : '') + '"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
								'<dd class="ui_tpicker_time '+ ((o.showTime) ? '' : noDisplay) + '"></dd>';

				// Create the markup
				for (i = 0, l = this.units.length; i < l; i++) {
					litem = this.units[i];
					uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1);
					show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem];

					// Added by Peter Medeiros:
					// - Figure out what the hour/minute/second max should be based on the step values.
					// - Example: if stepMinute is 15, then minMax is 45.
					max[litem] = parseInt((o[litem + 'Max'] - ((o[litem + 'Max'] - o[litem + 'Min']) % o['step' + uitem])), 10);
					gridSize[litem] = 0;

					html += '<dt class="ui_tpicker_' + litem + '_label' + (show ? '' : noDisplay) + '">' + o[litem + 'Text'] + '</dt>' +
								'<dd class="ui_tpicker_' + litem + (show ? '' : noDisplay) + '"><div class="ui_tpicker_' + litem + '_slider' + (show ? '' : noDisplay) + '"></div>';

					if (show && o[litem + 'Grid'] > 0) {
						html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';

						if (litem === 'hour') {
							for (var h = o[litem + 'Min']; h <= max[litem]; h += parseInt(o[litem + 'Grid'], 10)) {
								gridSize[litem]++;
								var tmph = $.datepicker.formatTime(this.support.ampm ? 'hht' : 'HH', {hour: h}, o);
								html += '<td data-for="' + litem + '">' + tmph + '</td>';
							}
						}
						else {
							for (var m = o[litem + 'Min']; m <= max[litem]; m += parseInt(o[litem + 'Grid'], 10)) {
								gridSize[litem]++;
								html += '<td data-for="' + litem + '">' + ((m < 10) ? '0' : '') + m + '</td>';
							}
						}

						html += '</tr></table></div>';
					}
					html += '</dd>';
				}
				
				// Timezone
				var showTz = o.showTimezone !== null ? o.showTimezone : this.support.timezone;
				html += '<dt class="ui_tpicker_timezone_label' + (showTz ? '' : noDisplay) + '">' + o.timezoneText + '</dt>';
				html += '<dd class="ui_tpicker_timezone' + (showTz ? '' : noDisplay) + '"></dd>';

				// Create the elements from string
				html += '</dl></div>';
				var $tp = $(html);

				// if we only want time picker...
				if (o.timeOnly === true) {
					$tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>');
					$dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();
				}
				
				// add sliders, adjust grids, add events
				for (i = 0, l = tp_inst.units.length; i < l; i++) {
					litem = tp_inst.units[i];
					uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1);
					show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem];

					// add the slider
					tp_inst[litem + '_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_' + litem + '_slider'), litem, tp_inst[litem], o[litem + 'Min'], max[litem], o['step' + uitem]);

					// adjust the grid and add click event
					if (show && o[litem + 'Grid'] > 0) {
						size = 100 * gridSize[litem] * o[litem + 'Grid'] / (max[litem] - o[litem + 'Min']);
						$tp.find('.ui_tpicker_' + litem + ' table').css({
							width: size + "%",
							marginLeft: o.isRTL ? '0' : ((size / (-2 * gridSize[litem])) + "%"),
							marginRight: o.isRTL ? ((size / (-2 * gridSize[litem])) + "%") : '0',
							borderCollapse: 'collapse'
						}).find("td").click(function (e) {
								var $t = $(this),
									h = $t.html(),
									n = parseInt(h.replace(/[^0-9]/g), 10),
									ap = h.replace(/[^apm]/ig),
									f = $t.data('for'); // loses scope, so we use data-for

								if (f === 'hour') {
									if (ap.indexOf('p') !== -1 && n < 12) {
										n += 12;
									}
									else {
										if (ap.indexOf('a') !== -1 && n === 12) {
											n = 0;
										}
									}
								}
								
								tp_inst.control.value(tp_inst, tp_inst[f + '_slider'], litem, n);

								tp_inst._onTimeChange();
								tp_inst._onSelectHandler();
							}).css({
								cursor: 'pointer',
								width: (100 / gridSize[litem]) + '%',
								textAlign: 'center',
								overflow: 'hidden'
							});
					} // end if grid > 0
				} // end for loop

				// Add timezone options
				this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find("select");
				$.fn.append.apply(this.timezone_select,
				$.map(o.timezoneList, function (val, idx) {
					return $("<option />").val(typeof val === "object" ? val.value : val).text(typeof val === "object" ? val.label : val);
				}));
				if (typeof(this.timezone) !== "undefined" && this.timezone !== null && this.timezone !== "") {
					var local_timezone = (new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12)).getTimezoneOffset() * -1;
					if (local_timezone === this.timezone) {
						selectLocalTimezone(tp_inst);
					} else {
						this.timezone_select.val(this.timezone);
					}
				} else {
					if (typeof(this.hour) !== "undefined" && this.hour !== null && this.hour !== "") {
						this.timezone_select.val(o.timezone);
					} else {
						selectLocalTimezone(tp_inst);
					}
				}
				this.timezone_select.change(function () {
					tp_inst._onTimeChange();
					tp_inst._onSelectHandler();
					tp_inst._afterInject();
				});
				// End timezone options
				
				// inject timepicker into datepicker
				var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');
				if ($buttonPanel.length) {
					$buttonPanel.before($tp);
				} else {
					$dp.append($tp);
				}

				this.$timeObj = $tp.find('.ui_tpicker_time');

				if (this.inst !== null) {
					var timeDefined = this.timeDefined;
					this._onTimeChange();
					this.timeDefined = timeDefined;
				}

				// slideAccess integration: http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/
				if (this._defaults.addSliderAccess) {
					var sliderAccessArgs = this._defaults.sliderAccessArgs,
						rtl = this._defaults.isRTL;
					sliderAccessArgs.isRTL = rtl;
						
					setTimeout(function () { // fix for inline mode
						if ($tp.find('.ui-slider-access').length === 0) {
							$tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);

							// fix any grids since sliders are shorter
							var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);
							if (sliderAccessWidth) {
								$tp.find('table:visible').each(function () {
									var $g = $(this),
										oldWidth = $g.outerWidth(),
										oldMarginLeft = $g.css(rtl ? 'marginRight' : 'marginLeft').toString().replace('%', ''),
										newWidth = oldWidth - sliderAccessWidth,
										newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%',
										css = { width: newWidth, marginRight: 0, marginLeft: 0 };
									css[rtl ? 'marginRight' : 'marginLeft'] = newMarginLeft;
									$g.css(css);
								});
							}
						}
					}, 10);
				}
				// end slideAccess integration

				tp_inst._limitMinMaxDateTime(this.inst, true);
			}
		},

		/*
		* This function tries to limit the ability to go outside the
		* min/max date range
		*/
		_limitMinMaxDateTime: function (dp_inst, adjustSliders) {
			var o = this._defaults,
				dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);

			if (!this._defaults.showTimepicker) {
				return;
			} // No time so nothing to check here

			if ($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date) {
				var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),
					minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);

				if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null || this.microsecMinOriginal === null) {
					this.hourMinOriginal = o.hourMin;
					this.minuteMinOriginal = o.minuteMin;
					this.secondMinOriginal = o.secondMin;
					this.millisecMinOriginal = o.millisecMin;
					this.microsecMinOriginal = o.microsecMin;
				}

				if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() === dp_date.getTime()) {
					this._defaults.hourMin = minDateTime.getHours();
					if (this.hour <= this._defaults.hourMin) {
						this.hour = this._defaults.hourMin;
						this._defaults.minuteMin = minDateTime.getMinutes();
						if (this.minute <= this._defaults.minuteMin) {
							this.minute = this._defaults.minuteMin;
							this._defaults.secondMin = minDateTime.getSeconds();
							if (this.second <= this._defaults.secondMin) {
								this.second = this._defaults.secondMin;
								this._defaults.millisecMin = minDateTime.getMilliseconds();
								if (this.millisec <= this._defaults.millisecMin) {
									this.millisec = this._defaults.millisecMin;
									this._defaults.microsecMin = minDateTime.getMicroseconds();
								} else {
									if (this.microsec < this._defaults.microsecMin) {
										this.microsec = this._defaults.microsecMin;
									}
									this._defaults.microsecMin = this.microsecMinOriginal;
								}
							} else {
								this._defaults.millisecMin = this.millisecMinOriginal;
								this._defaults.microsecMin = this.microsecMinOriginal;
							}
						} else {
							this._defaults.secondMin = this.secondMinOriginal;
							this._defaults.millisecMin = this.millisecMinOriginal;
							this._defaults.microsecMin = this.microsecMinOriginal;
						}
					} else {
						this._defaults.minuteMin = this.minuteMinOriginal;
						this._defaults.secondMin = this.secondMinOriginal;
						this._defaults.millisecMin = this.millisecMinOriginal;
						this._defaults.microsecMin = this.microsecMinOriginal;
					}
				} else {
					this._defaults.hourMin = this.hourMinOriginal;
					this._defaults.minuteMin = this.minuteMinOriginal;
					this._defaults.secondMin = this.secondMinOriginal;
					this._defaults.millisecMin = this.millisecMinOriginal;
					this._defaults.microsecMin = this.microsecMinOriginal;
				}
			}

			if ($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date) {
				var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
					maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);

				if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null || this.millisecMaxOriginal === null) {
					this.hourMaxOriginal = o.hourMax;
					this.minuteMaxOriginal = o.minuteMax;
					this.secondMaxOriginal = o.secondMax;
					this.millisecMaxOriginal = o.millisecMax;
					this.microsecMaxOriginal = o.microsecMax;
				}

				if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() === dp_date.getTime()) {
					this._defaults.hourMax = maxDateTime.getHours();
					if (this.hour >= this._defaults.hourMax) {
						this.hour = this._defaults.hourMax;
						this._defaults.minuteMax = maxDateTime.getMinutes();
						if (this.minute >= this._defaults.minuteMax) {
							this.minute = this._defaults.minuteMax;
							this._defaults.secondMax = maxDateTime.getSeconds();
							if (this.second >= this._defaults.secondMax) {
								this.second = this._defaults.secondMax;
								this._defaults.millisecMax = maxDateTime.getMilliseconds();
								if (this.millisec >= this._defaults.millisecMax) {
									this.millisec = this._defaults.millisecMax;
									this._defaults.microsecMax = maxDateTime.getMicroseconds();
								} else {
									if (this.microsec > this._defaults.microsecMax) {
										this.microsec = this._defaults.microsecMax;
									}
									this._defaults.microsecMax = this.microsecMaxOriginal;
								}
							} else {
								this._defaults.millisecMax = this.millisecMaxOriginal;
								this._defaults.microsecMax = this.microsecMaxOriginal;
							}
						} else {
							this._defaults.secondMax = this.secondMaxOriginal;
							this._defaults.millisecMax = this.millisecMaxOriginal;
							this._defaults.microsecMax = this.microsecMaxOriginal;
						}
					} else {
						this._defaults.minuteMax = this.minuteMaxOriginal;
						this._defaults.secondMax = this.secondMaxOriginal;
						this._defaults.millisecMax = this.millisecMaxOriginal;
						this._defaults.microsecMax = this.microsecMaxOriginal;
					}
				} else {
					this._defaults.hourMax = this.hourMaxOriginal;
					this._defaults.minuteMax = this.minuteMaxOriginal;
					this._defaults.secondMax = this.secondMaxOriginal;
					this._defaults.millisecMax = this.millisecMaxOriginal;
					this._defaults.microsecMax = this.microsecMaxOriginal;
				}
			}

			if (dp_inst.settings.minTime!==null) {				
				var tempMinTime=new Date("01/01/1970 " + dp_inst.settings.minTime);				
				if (this.hour<tempMinTime.getHours()) {
					this.hour=this._defaults.hourMin=tempMinTime.getHours();
					this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();							
				} else if (this.hour===tempMinTime.getHours() && this.minute<tempMinTime.getMinutes()) {
					this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();
				} else {						
					if (this._defaults.hourMin<tempMinTime.getHours()) {
						this._defaults.hourMin=tempMinTime.getHours();
						this._defaults.minuteMin=tempMinTime.getMinutes();					
					} else if (this._defaults.hourMin===tempMinTime.getHours()===this.hour && this._defaults.minuteMin<tempMinTime.getMinutes()) {
						this._defaults.minuteMin=tempMinTime.getMinutes();						
					} else {
						this._defaults.minuteMin=0;
					}
				}				
			}
			
			if (dp_inst.settings.maxTime!==null) {				
				var tempMaxTime=new Date("01/01/1970 " + dp_inst.settings.maxTime);
				if (this.hour>tempMaxTime.getHours()) {
					this.hour=this._defaults.hourMax=tempMaxTime.getHours();						
					this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();
				} else if (this.hour===tempMaxTime.getHours() && this.minute>tempMaxTime.getMinutes()) {							
					this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();						
				} else {
					if (this._defaults.hourMax>tempMaxTime.getHours()) {
						this._defaults.hourMax=tempMaxTime.getHours();
						this._defaults.minuteMax=tempMaxTime.getMinutes();					
					} else if (this._defaults.hourMax===tempMaxTime.getHours()===this.hour && this._defaults.minuteMax>tempMaxTime.getMinutes()) {
						this._defaults.minuteMax=tempMaxTime.getMinutes();						
					} else {
						this._defaults.minuteMax=59;
					}
				}						
			}
			
			if (adjustSliders !== undefined && adjustSliders === true) {
				var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),
					minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),
					secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10),
					millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10),
					microsecMax = parseInt((this._defaults.microsecMax - ((this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec)), 10);

				if (this.hour_slider) {
					this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax, step: this._defaults.stepHour });
					this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour));
				}
				if (this.minute_slider) {
					this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax, step: this._defaults.stepMinute });
					this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute));
				}
				if (this.second_slider) {
					this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax, step: this._defaults.stepSecond });
					this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond));
				}
				if (this.millisec_slider) {
					this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax, step: this._defaults.stepMillisec });
					this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec));
				}
				if (this.microsec_slider) {
					this.control.options(this, this.microsec_slider, 'microsec', { min: this._defaults.microsecMin, max: microsecMax, step: this._defaults.stepMicrosec });
					this.control.value(this, this.microsec_slider, 'microsec', this.microsec - (this.microsec % this._defaults.stepMicrosec));
				}
			}

		},

		/*
		* when a slider moves, set the internal time...
		* on time change is also called when the time is updated in the text field
		*/
		_onTimeChange: function () {
			if (!this._defaults.showTimepicker) {
                                return;
			}
			var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,
				minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false,
				second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false,
				millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false,
				microsec = (this.microsec_slider) ? this.control.value(this, this.microsec_slider, 'microsec') : false,
				timezone = (this.timezone_select) ? this.timezone_select.val() : false,
				o = this._defaults,
				pickerTimeFormat = o.pickerTimeFormat || o.timeFormat,
				pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix;

			if (typeof(hour) === 'object') {
				hour = false;
			}
			if (typeof(minute) === 'object') {
				minute = false;
			}
			if (typeof(second) === 'object') {
				second = false;
			}
			if (typeof(millisec) === 'object') {
				millisec = false;
			}
			if (typeof(microsec) === 'object') {
				microsec = false;
			}
			if (typeof(timezone) === 'object') {
				timezone = false;
			}

			if (hour !== false) {
				hour = parseInt(hour, 10);
			}
			if (minute !== false) {
				minute = parseInt(minute, 10);
			}
			if (second !== false) {
				second = parseInt(second, 10);
			}
			if (millisec !== false) {
				millisec = parseInt(millisec, 10);
			}
			if (microsec !== false) {
				microsec = parseInt(microsec, 10);
			}
			if (timezone !== false) {
				timezone = timezone.toString();
			}

			var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];

			// If the update was done in the input field, the input field should not be updated.
			// If the update was done using the sliders, update the input field.
			var hasChanged = (
						hour !== parseInt(this.hour,10) || // sliders should all be numeric
						minute !== parseInt(this.minute,10) || 
						second !== parseInt(this.second,10) || 
						millisec !== parseInt(this.millisec,10) || 
						microsec !== parseInt(this.microsec,10) || 
						(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || 
						(this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or "EST" format, so use toString()
					);

			if (hasChanged) {

				if (hour !== false) {
					this.hour = hour;
				}
				if (minute !== false) {
					this.minute = minute;
				}
				if (second !== false) {
					this.second = second;
				}
				if (millisec !== false) {
					this.millisec = millisec;
				}
				if (microsec !== false) {
					this.microsec = microsec;
				}
				if (timezone !== false) {
					this.timezone = timezone;
				}

				if (!this.inst) {
					this.inst = $.datepicker._getInst(this.$input[0]);
				}

				this._limitMinMaxDateTime(this.inst, true);
			}
			if (this.support.ampm) {
				this.ampm = ampm;
			}

			// Updates the time within the timepicker
			this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);
			if (this.$timeObj) {
				if (pickerTimeFormat === o.timeFormat) {
					this.$timeObj.text(this.formattedTime + pickerTimeSuffix);
				}
				else {
					this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix);
				}
			}

			this.timeDefined = true;
			if (hasChanged) {
				this._updateDateTime();
				//this.$input.focus(); // may automatically open the picker on setDate
			}
		},

		/*
		* call custom onSelect.
		* bind to sliders slidestop, and grid click.
		*/
		_onSelectHandler: function () {
			var onSelect = this._defaults.onSelect || this.inst.settings.onSelect;
			var inputEl = this.$input ? this.$input[0] : null;
			if (onSelect && inputEl) {
				onSelect.apply(inputEl, [this.formattedDateTime, this]);
			}
		},

		/*
		* update our input with the new date time..
		*/
		_updateDateTime: function (dp_inst) {
			dp_inst = this.inst || dp_inst;
			var dtTmp = (dp_inst.currentYear > 0? 
							new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay) : 
							new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
				dt = $.datepicker._daylightSavingAdjust(dtTmp),
				//dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
				//dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay)),
				dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
				formatCfg = $.datepicker._getFormatConfig(dp_inst),
				timeAvailable = dt !== null && this.timeDefined;
			this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);
			var formattedDateTime = this.formattedDate;
			
			// if a slider was changed but datepicker doesn't have a value yet, set it
			if (dp_inst.lastVal === "") {
                dp_inst.currentYear = dp_inst.selectedYear;
                dp_inst.currentMonth = dp_inst.selectedMonth;
                dp_inst.currentDay = dp_inst.selectedDay;
            }

			/*
			* remove following lines to force every changes in date picker to change the input value
			* Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker. 
			* If the user manually empty the value in the input field, the date picker will never change selected value.
			*/
			//if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) {
			//	return;
			//}

			if (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === false) {
				formattedDateTime = this.formattedTime;
			} else if ((this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) || (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === true)) {
				formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix;
			}

			this.formattedDateTime = formattedDateTime;

			if (!this._defaults.showTimepicker) {
				this.$input.val(this.formattedDate);
			} else if (this.$altInput && this._defaults.timeOnly === false && this._defaults.altFieldTimeOnly === true) {
				this.$altInput.val(this.formattedTime);
				this.$input.val(this.formattedDate);
			} else if (this.$altInput) {
				this.$input.val(formattedDateTime);
				var altFormattedDateTime = '',
					altSeparator = this._defaults.altSeparator !== null ? this._defaults.altSeparator : this._defaults.separator,
					altTimeSuffix = this._defaults.altTimeSuffix !== null ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;
				
				if (!this._defaults.timeOnly) {
					if (this._defaults.altFormat) {
						altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg);
					}
					else {
						altFormattedDateTime = this.formattedDate;
					}

					if (altFormattedDateTime) {
						altFormattedDateTime += altSeparator;
					}
				}

				if (this._defaults.altTimeFormat !== null) {
					altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix;
				}
				else {
					altFormattedDateTime += this.formattedTime + altTimeSuffix;
				}
				this.$altInput.val(altFormattedDateTime);
			} else {
				this.$input.val(formattedDateTime);
			}

			this.$input.trigger("change");
		},

		_onFocus: function () {
			if (!this.$input.val() && this._defaults.defaultValue) {
				this.$input.val(this._defaults.defaultValue);
				var inst = $.datepicker._getInst(this.$input.get(0)),
					tp_inst = $.datepicker._get(inst, 'timepicker');
				if (tp_inst) {
					if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) {
						try {
							$.datepicker._updateDatepicker(inst);
						} catch (err) {
							$.timepicker.log(err);
						}
					}
				}
			}
		},

		/*
		* Small abstraction to control types
		* We can add more, just be sure to follow the pattern: create, options, value
		*/
		_controls: {
			// slider methods
			slider: {
				create: function (tp_inst, obj, unit, val, min, max, step) {
					var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of 0->60
					return obj.prop('slide', null).slider({
						orientation: "horizontal",
						value: rtl ? val * -1 : val,
						min: rtl ? max * -1 : min,
						max: rtl ? min * -1 : max,
						step: step,
						slide: function (event, ui) {
							tp_inst.control.value(tp_inst, $(this), unit, rtl ? ui.value * -1 : ui.value);
							tp_inst._onTimeChange();
						},
						stop: function (event, ui) {
							tp_inst._onSelectHandler();
						}
					});	
				},
				options: function (tp_inst, obj, unit, opts, val) {
					if (tp_inst._defaults.isRTL) {
						if (typeof(opts) === 'string') {
							if (opts === 'min' || opts === 'max') {
								if (val !== undefined) {
									return obj.slider(opts, val * -1);
								}
								return Math.abs(obj.slider(opts));
							}
							return obj.slider(opts);
						}
						var min = opts.min, 
							max = opts.max;
						opts.min = opts.max = null;
						if (min !== undefined) {
							opts.max = min * -1;
						}
						if (max !== undefined) {
							opts.min = max * -1;
						}
						return obj.slider(opts);
					}
					if (typeof(opts) === 'string' && val !== undefined) {
						return obj.slider(opts, val);
					}
					return obj.slider(opts);
				},
				value: function (tp_inst, obj, unit, val) {
					if (tp_inst._defaults.isRTL) {
						if (val !== undefined) {
							return obj.slider('value', val * -1);
						}
						return Math.abs(obj.slider('value'));
					}
					if (val !== undefined) {
						return obj.slider('value', val);
					}
					return obj.slider('value');
				}
			},
			// select methods
			select: {
				create: function (tp_inst, obj, unit, val, min, max, step) {
					var sel = '<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="' + unit + '" data-min="' + min + '" data-max="' + max + '" data-step="' + step + '">',
						format = tp_inst._defaults.pickerTimeFormat || tp_inst._defaults.timeFormat;

					for (var i = min; i <= max; i += step) {
						sel += '<option value="' + i + '"' + (i === val ? ' selected' : '') + '>';
						if (unit === 'hour') {
							sel += $.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig, '')), {hour: i}, tp_inst._defaults);
						}
						else if (unit === 'millisec' || unit === 'microsec' || i >= 10) { sel += i; }
						else {sel += '0' + i.toString(); }
						sel += '</option>';
					}
					sel += '</select>';

					obj.children('select').remove();

					$(sel).appendTo(obj).change(function (e) {
						tp_inst._onTimeChange();
						tp_inst._onSelectHandler();
						tp_inst._afterInject();
					});

					return obj;
				},
				options: function (tp_inst, obj, unit, opts, val) {
					var o = {},
						$t = obj.children('select');
					if (typeof(opts) === 'string') {
						if (val === undefined) {
							return $t.data(opts);
						}
						o[opts] = val;	
					}
					else { o = opts; }
					return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min>=0 ? o.min : $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));
				},
				value: function (tp_inst, obj, unit, val) {
					var $t = obj.children('select');
					if (val !== undefined) {
						return $t.val(val);
					}
					return $t.val();
				}
			}
		} // end _controls

	});

	$.fn.extend({
		/*
		* shorthand just to use timepicker.
		*/
		timepicker: function (o) {
			o = o || {};
			var tmp_args = Array.prototype.slice.call(arguments);

			if (typeof o === 'object') {
				tmp_args[0] = $.extend(o, {
					timeOnly: true
				});
			}

			return $(this).each(function () {
				$.fn.datetimepicker.apply($(this), tmp_args);
			});
		},

		/*
		* extend timepicker to datepicker
		*/
		datetimepicker: function (o) {
			o = o || {};
			var tmp_args = arguments;

			if (typeof(o) === 'string') {
				if (o === 'getDate'  || (o === 'option' && tmp_args.length === 2 && typeof (tmp_args[1]) === 'string')) {
					return $.fn.datepicker.apply($(this[0]), tmp_args);
				} else {
					return this.each(function () {
						var $t = $(this);
						$t.datepicker.apply($t, tmp_args);
					});
				}
			} else {
				return this.each(function () {
					var $t = $(this);
					$t.datepicker($.timepicker._newInst($t, o)._defaults);
				});
			}
		}
	});

	/*
	* Public Utility to parse date and time
	*/
	$.datepicker.parseDateTime = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
		var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings);
		if (parseRes.timeObj) {
			var t = parseRes.timeObj;
			parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec);
			parseRes.date.setMicroseconds(t.microsec);
		}

		return parseRes.date;
	};

	/*
	* Public utility to parse time
	*/
	$.datepicker.parseTime = function (timeFormat, timeString, options) {
		var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {}),
			iso8601 = (timeFormat.replace(/\'.*?\'/g, '').indexOf('Z') !== -1);

		// Strict parse requires the timeString to match the timeFormat exactly
		var strictParse = function (f, s, o) {

			// pattern for standard and localized AM/PM markers
			var getPatternAmpm = function (amNames, pmNames) {
				var markers = [];
				if (amNames) {
					$.merge(markers, amNames);
				}
				if (pmNames) {
					$.merge(markers, pmNames);
				}
				markers = $.map(markers, function (val) {
					return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&');
				});
				return '(' + markers.join('|') + ')?';
			};

			// figure out position of time elements.. cause js cant do named captures
			var getFormatPositions = function (timeFormat) {
				var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),
					orders = {
						h: -1,
						m: -1,
						s: -1,
						l: -1,
						c: -1,
						t: -1,
						z: -1
					};

				if (finds) {
					for (var i = 0; i < finds.length; i++) {
						if (orders[finds[i].toString().charAt(0)] === -1) {
							orders[finds[i].toString().charAt(0)] = i + 1;
						}
					}
				}
				return orders;
			};

			var regstr = '^' + f.toString()
					.replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) {
							var ml = match.length;
							switch (match.charAt(0).toLowerCase()) {
							case 'h':
								return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml + '})';
							case 'm':
								return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml + '})';
							case 's':
								return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml + '})';
							case 'l':
								return '(\\d?\\d?\\d)';
							case 'c':
								return '(\\d?\\d?\\d)';
							case 'z':
								return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?';
							case 't':
								return getPatternAmpm(o.amNames, o.pmNames);
							default:    // literal escaped in quotes
								return '(' + match.replace(/\'/g, "").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g, function (m) { return "\\" + m; }) + ')?';
							}
						})
					.replace(/\s/g, '\\s?') +
					o.timeSuffix + '$',
				order = getFormatPositions(f),
				ampm = '',
				treg;

			treg = s.match(new RegExp(regstr, 'i'));

			var resTime = {
				hour: 0,
				minute: 0,
				second: 0,
				millisec: 0,
				microsec: 0
			};

			if (treg) {
				if (order.t !== -1) {
					if (treg[order.t] === undefined || treg[order.t].length === 0) {
						ampm = '';
						resTime.ampm = '';
					} else {
						ampm = $.inArray(treg[order.t].toUpperCase(), $.map(o.amNames, function (x,i) { return x.toUpperCase(); })) !== -1 ? 'AM' : 'PM';
						resTime.ampm = o[ampm === 'AM' ? 'amNames' : 'pmNames'][0];
					}
				}

				if (order.h !== -1) {
					if (ampm === 'AM' && treg[order.h] === '12') {
						resTime.hour = 0; // 12am = 0 hour
					} else {
						if (ampm === 'PM' && treg[order.h] !== '12') {
							resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12
						} else {
							resTime.hour = Number(treg[order.h]);
						}
					}
				}

				if (order.m !== -1) {
					resTime.minute = Number(treg[order.m]);
				}
				if (order.s !== -1) {
					resTime.second = Number(treg[order.s]);
				}
				if (order.l !== -1) {
					resTime.millisec = Number(treg[order.l]);
				}
				if (order.c !== -1) {
					resTime.microsec = Number(treg[order.c]);
				}
				if (order.z !== -1 && treg[order.z] !== undefined) {
					resTime.timezone = $.timepicker.timezoneOffsetNumber(treg[order.z]);
				}


				return resTime;
			}
			return false;
		};// end strictParse

		// First try JS Date, if that fails, use strictParse
		var looseParse = function (f, s, o) {
			try {
				var d = new Date('2012-01-01 ' + s);
				if (isNaN(d.getTime())) {
					d = new Date('2012-01-01T' + s);
					if (isNaN(d.getTime())) {
						d = new Date('01/01/2012 ' + s);
						if (isNaN(d.getTime())) {
							throw "Unable to parse time with native Date: " + s;
						}
					}
				}

				return {
					hour: d.getHours(),
					minute: d.getMinutes(),
					second: d.getSeconds(),
					millisec: d.getMilliseconds(),
					microsec: d.getMicroseconds(),
					timezone: d.getTimezoneOffset() * -1
				};
			}
			catch (err) {
				try {
					return strictParse(f, s, o);
				}
				catch (err2) {
					$.timepicker.log("Unable to parse \ntimeString: " + s + "\ntimeFormat: " + f);
				}				
			}
			return false;
		}; // end looseParse
		
		if (typeof o.parse === "function") {
			return o.parse(timeFormat, timeString, o);
		}
		if (o.parse === 'loose') {
			return looseParse(timeFormat, timeString, o);
		}
		return strictParse(timeFormat, timeString, o);
	};

	/**
	 * Public utility to format the time
	 * @param {string} format format of the time
	 * @param {Object} time Object not a Date for timezones
	 * @param {Object} [options] essentially the regional[].. amNames, pmNames, ampm
	 * @returns {string} the formatted time
	 */
	$.datepicker.formatTime = function (format, time, options) {
		options = options || {};
		options = $.extend({}, $.timepicker._defaults, options);
		time = $.extend({
			hour: 0,
			minute: 0,
			second: 0,
			millisec: 0,
			microsec: 0,
			timezone: null
		}, time);

		var tmptime = format,
			ampmName = options.amNames[0],
			hour = parseInt(time.hour, 10);

		if (hour > 11) {
			ampmName = options.pmNames[0];
		}

		tmptime = tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) {
			switch (match) {
			case 'HH':
				return ('0' + hour).slice(-2);
			case 'H':
				return hour;
			case 'hh':
				return ('0' + convert24to12(hour)).slice(-2);
			case 'h':
				return convert24to12(hour);
			case 'mm':
				return ('0' + time.minute).slice(-2);
			case 'm':
				return time.minute;
			case 'ss':
				return ('0' + time.second).slice(-2);
			case 's':
				return time.second;
			case 'l':
				return ('00' + time.millisec).slice(-3);
			case 'c':
				return ('00' + time.microsec).slice(-3);
			case 'z':
				return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, false);
			case 'Z':
				return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, true);
			case 'T':
				return ampmName.charAt(0).toUpperCase();
			case 'TT':
				return ampmName.toUpperCase();
			case 't':
				return ampmName.charAt(0).toLowerCase();
			case 'tt':
				return ampmName.toLowerCase();
			default:
				return match.replace(/'/g, "");
			}
		});

		return tmptime;
	};

	/*
	* the bad hack :/ override datepicker so it doesn't close on select
	// inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378
	*/
	$.datepicker._base_selectDate = $.datepicker._selectDate;
	$.datepicker._selectDate = function (id, dateStr) {
		var inst = this._getInst($(id)[0]),
			tp_inst = this._get(inst, 'timepicker'),
			was_inline;

		if (tp_inst && inst.settings.showTimepicker) {
			tp_inst._limitMinMaxDateTime(inst, true);
			was_inline = inst.inline;
			inst.inline = inst.stay_open = true;
			//This way the onSelect handler called from calendarpicker get the full dateTime
			this._base_selectDate(id, dateStr);
			inst.inline = was_inline;
			inst.stay_open = false;
			this._notifyChange(inst);
			this._updateDatepicker(inst);
		} else {
			this._base_selectDate(id, dateStr);
		}
	};

	/*
	* second bad hack :/ override datepicker so it triggers an event when changing the input field
	* and does not redraw the datepicker on every selectDate event
	*/
	$.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker;
	$.datepicker._updateDatepicker = function (inst) {

		// don't popup the datepicker if there is another instance already opened
		var input = inst.input[0];
		if ($.datepicker._curInst && $.datepicker._curInst !== inst && $.datepicker._datepickerShowing && $.datepicker._lastInput !== input) {
			return;
		}

		if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) {

			this._base_updateDatepicker(inst);

			// Reload the time control when changing something in the input text field.
			var tp_inst = this._get(inst, 'timepicker');
			if (tp_inst) {
				tp_inst._addTimePicker(inst);
			}
		}
	};

	/*
	* third bad hack :/ override datepicker so it allows spaces and colon in the input field
	*/
	$.datepicker._base_doKeyPress = $.datepicker._doKeyPress;
	$.datepicker._doKeyPress = function (event) {
		var inst = $.datepicker._getInst(event.target),
			tp_inst = $.datepicker._get(inst, 'timepicker');

		if (tp_inst) {
			if ($.datepicker._get(inst, 'constrainInput')) {
				var ampm = tp_inst.support.ampm,
					tz = tp_inst._defaults.showTimezone !== null ? tp_inst._defaults.showTimezone : tp_inst.support.timezone,
					dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),
					datetimeChars = tp_inst._defaults.timeFormat.toString()
											.replace(/[hms]/g, '')
											.replace(/TT/g, ampm ? 'APM' : '')
											.replace(/Tt/g, ampm ? 'AaPpMm' : '')
											.replace(/tT/g, ampm ? 'AaPpMm' : '')
											.replace(/T/g, ampm ? 'AP' : '')
											.replace(/tt/g, ampm ? 'apm' : '')
											.replace(/t/g, ampm ? 'ap' : '') + 
											" " + tp_inst._defaults.separator + 
											tp_inst._defaults.timeSuffix + 
											(tz ? tp_inst._defaults.timezoneList.join('') : '') + 
											(tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) + 
											dateChars,
					chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
				return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);
			}
		}

		return $.datepicker._base_doKeyPress(event);
	};

	/*
	* Fourth bad hack :/ override _updateAlternate function used in inline mode to init altField
	* Update any alternate field to synchronise with the main field.
	*/
	$.datepicker._base_updateAlternate = $.datepicker._updateAlternate;
	$.datepicker._updateAlternate = function (inst) {
		var tp_inst = this._get(inst, 'timepicker');
		if (tp_inst) {
			var altField = tp_inst._defaults.altField;
			if (altField) { // update alternate field too
				var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat,
					date = this._getDate(inst),
					formatCfg = $.datepicker._getFormatConfig(inst),
					altFormattedDateTime = '', 
					altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator, 
					altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix,
					altTimeFormat = tp_inst._defaults.altTimeFormat !== null ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat;
				
				altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix;
				if (!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly && date !== null) {
					if (tp_inst._defaults.altFormat) {
						altFormattedDateTime = $.datepicker.formatDate(tp_inst._defaults.altFormat, date, formatCfg) + altSeparator + altFormattedDateTime;
					}
					else {
						altFormattedDateTime = tp_inst.formattedDate + altSeparator + altFormattedDateTime;
					}
				}
				$(altField).val( inst.input.val() ? altFormattedDateTime : "");
			}
		}
		else {
			$.datepicker._base_updateAlternate(inst);	
		}
	};

	/*
	* Override key up event to sync manual input changes.
	*/
	$.datepicker._base_doKeyUp = $.datepicker._doKeyUp;
	$.datepicker._doKeyUp = function (event) {
		var inst = $.datepicker._getInst(event.target),
			tp_inst = $.datepicker._get(inst, 'timepicker');

		if (tp_inst) {
			if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) {
				try {
					$.datepicker._updateDatepicker(inst);
				} catch (err) {
					$.timepicker.log(err);
				}
			}
		}

		return $.datepicker._base_doKeyUp(event);
	};

	/*
	* override "Today" button to also grab the time.
	*/
	$.datepicker._base_gotoToday = $.datepicker._gotoToday;
	$.datepicker._gotoToday = function (id) {
		var inst = this._getInst($(id)[0]),
			$dp = inst.dpDiv;
		var tp_inst = this._get(inst, 'timepicker');
		selectLocalTimezone(tp_inst);
		var now = new Date();
		this._setTime(inst, now);
		this._setDate(inst, now);
		this._base_gotoToday(id);
	};

	/*
	* Disable & enable the Time in the datetimepicker
	*/
	$.datepicker._disableTimepickerDatepicker = function (target) {
		var inst = this._getInst(target);
		if (!inst) {
			return;
		}

		var tp_inst = this._get(inst, 'timepicker');
		$(target).datepicker('getDate'); // Init selected[Year|Month|Day]
		if (tp_inst) {
			inst.settings.showTimepicker = false;
			tp_inst._defaults.showTimepicker = false;
			tp_inst._updateDateTime(inst);
		}
	};

	$.datepicker._enableTimepickerDatepicker = function (target) {
		var inst = this._getInst(target);
		if (!inst) {
			return;
		}

		var tp_inst = this._get(inst, 'timepicker');
		$(target).datepicker('getDate'); // Init selected[Year|Month|Day]
		if (tp_inst) {
			inst.settings.showTimepicker = true;
			tp_inst._defaults.showTimepicker = true;
			tp_inst._addTimePicker(inst); // Could be disabled on page load
			tp_inst._updateDateTime(inst);
		}
	};

	/*
	* Create our own set time function
	*/
	$.datepicker._setTime = function (inst, date) {
		var tp_inst = this._get(inst, 'timepicker');
		if (tp_inst) {
			var defaults = tp_inst._defaults;

			// calling _setTime with no date sets time to defaults
			tp_inst.hour = date ? date.getHours() : defaults.hour;
			tp_inst.minute = date ? date.getMinutes() : defaults.minute;
			tp_inst.second = date ? date.getSeconds() : defaults.second;
			tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;
			tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec;

			//check if within min/max times.. 
			tp_inst._limitMinMaxDateTime(inst, true);

			tp_inst._onTimeChange();
			tp_inst._updateDateTime(inst);
		}
	};

	/*
	* Create new public method to set only time, callable as $().datepicker('setTime', date)
	*/
	$.datepicker._setTimeDatepicker = function (target, date, withDate) {
		var inst = this._getInst(target);
		if (!inst) {
			return;
		}

		var tp_inst = this._get(inst, 'timepicker');

		if (tp_inst) {
			this._setDateFromField(inst);
			var tp_date;
			if (date) {
				if (typeof date === "string") {
					tp_inst._parseTime(date, withDate);
					tp_date = new Date();
					tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
					tp_date.setMicroseconds(tp_inst.microsec);
				} else {
					tp_date = new Date(date.getTime());
					tp_date.setMicroseconds(date.getMicroseconds());
				}
				if (tp_date.toString() === 'Invalid Date') {
					tp_date = undefined;
				}
				this._setTime(inst, tp_date);
			}
		}

	};

	/*
	* override setDate() to allow setting time too within Date object
	*/
	$.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker;
	$.datepicker._setDateDatepicker = function (target, _date) {
		var inst = this._getInst(target);
		var date = _date;
		if (!inst) {
			return;
		}

		if (typeof(_date) === 'string') {
			date = new Date(_date);
			if (!date.getTime()) {
				this._base_setDateDatepicker.apply(this, arguments);
				date = $(target).datepicker('getDate');
			}
		}

		var tp_inst = this._get(inst, 'timepicker');
		var tp_date;
		if (date instanceof Date) {
			tp_date = new Date(date.getTime());
			tp_date.setMicroseconds(date.getMicroseconds());
		} else {
			tp_date = date;
		}
		
		// This is important if you are using the timezone option, javascript's Date 
		// object will only return the timezone offset for the current locale, so we 
		// adjust it accordingly.  If not using timezone option this won't matter..
		// If a timezone is different in tp, keep the timezone as is
		if (tp_inst && tp_date) {
			// look out for DST if tz wasn't specified
			if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
				tp_inst.timezone = tp_date.getTimezoneOffset() * -1;
			}
			date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
			tp_date = $.timepicker.timezoneAdjust(tp_date, tp_inst.timezone);
		}

		this._updateDatepicker(inst);
		this._base_setDateDatepicker.apply(this, arguments);
		this._setTimeDatepicker(target, tp_date, true);
	};

	/*
	* override getDate() to allow getting time too within Date object
	*/
	$.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;
	$.datepicker._getDateDatepicker = function (target, noDefault) {
		var inst = this._getInst(target);
		if (!inst) {
			return;
		}

		var tp_inst = this._get(inst, 'timepicker');

		if (tp_inst) {
			// if it hasn't yet been defined, grab from field
			if (inst.lastVal === undefined) {
				this._setDateFromField(inst, noDefault);
			}

			var date = this._getDate(inst);
			var currDT = $.trim((tp_inst.$altInput && tp_inst._defaults.altFieldTimeOnly) ? tp_inst.$input.val() + ' ' + tp_inst.$altInput.val() : tp_inst.$input.val());
			if (date && tp_inst._parseTime(currDT, !inst.settings.timeOnly)) {
				date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
				date.setMicroseconds(tp_inst.microsec);

				// This is important if you are using the timezone option, javascript's Date 
				// object will only return the timezone offset for the current locale, so we 
				// adjust it accordingly.  If not using timezone option this won't matter..
				if (tp_inst.timezone != null) {
					// look out for DST if tz wasn't specified
					if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
						tp_inst.timezone = date.getTimezoneOffset() * -1;
					}
					date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
				}
			}
			return date;
		}
		return this._base_getDateDatepicker(target, noDefault);
	};

	/*
	* override parseDate() because UI 1.8.14 throws an error about "Extra characters"
	* An option in datapicker to ignore extra format characters would be nicer.
	*/
	$.datepicker._base_parseDate = $.datepicker.parseDate;
	$.datepicker.parseDate = function (format, value, settings) {
		var date;
		try {
			date = this._base_parseDate(format, value, settings);
		} catch (err) {
			// Hack!  The error message ends with a colon, a space, and
			// the "extra" characters.  We rely on that instead of
			// attempting to perfectly reproduce the parsing algorithm.
			if (err.indexOf(":") >= 0) {
				date = this._base_parseDate(format, value.substring(0, value.length - (err.length - err.indexOf(':') - 2)), settings);
				$.timepicker.log("Error parsing the date string: " + err + "\ndate string = " + value + "\ndate format = " + format);
			} else {
				throw err;
			}
		}
		return date;
	};

	/*
	* override formatDate to set date with time to the input
	*/
	$.datepicker._base_formatDate = $.datepicker._formatDate;
	$.datepicker._formatDate = function (inst, day, month, year) {
		var tp_inst = this._get(inst, 'timepicker');
		if (tp_inst) {
			tp_inst._updateDateTime(inst);
			return tp_inst.$input.val();
		}
		return this._base_formatDate(inst);
	};

	/*
	* override options setter to add time to maxDate(Time) and minDate(Time). MaxDate
	*/
	$.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker;
	$.datepicker._optionDatepicker = function (target, name, value) {
		var inst = this._getInst(target),
			name_clone;
		if (!inst) {
			return null;
		}

		var tp_inst = this._get(inst, 'timepicker');
		if (tp_inst) {
			var min = null,
				max = null,
				onselect = null,
				overrides = tp_inst._defaults.evnts,
				fns = {},
				prop,
				ret,
				oldVal,
				$target;
			if (typeof name === 'string') { // if min/max was set with the string
				if (name === 'minDate' || name === 'minDateTime') {
					min = value;
				} else if (name === 'maxDate' || name === 'maxDateTime') {
					max = value;
				} else if (name === 'onSelect') {
					onselect = value;
				} else if (overrides.hasOwnProperty(name)) {
					if (typeof (value) === 'undefined') {
						return overrides[name];
					}
					fns[name] = value;
					name_clone = {}; //empty results in exiting function after overrides updated
				}
			} else if (typeof name === 'object') { //if min/max was set with the JSON
				if (name.minDate) {
					min = name.minDate;
				} else if (name.minDateTime) {
					min = name.minDateTime;
				} else if (name.maxDate) {
					max = name.maxDate;
				} else if (name.maxDateTime) {
					max = name.maxDateTime;
				}
				for (prop in overrides) {
					if (overrides.hasOwnProperty(prop) && name[prop]) {
						fns[prop] = name[prop];
					}
				}
			}
			for (prop in fns) {
				if (fns.hasOwnProperty(prop)) {
					overrides[prop] = fns[prop];
					if (!name_clone) { name_clone = $.extend({}, name); }
					delete name_clone[prop];
				}
			}
			if (name_clone && isEmptyObject(name_clone)) { return; }
			if (min) { //if min was set
				if (min === 0) {
					min = new Date();
				} else {
					min = new Date(min);
				}
				tp_inst._defaults.minDate = min;
				tp_inst._defaults.minDateTime = min;
			} else if (max) { //if max was set
				if (max === 0) {
					max = new Date();
				} else {
					max = new Date(max);
				}
				tp_inst._defaults.maxDate = max;
				tp_inst._defaults.maxDateTime = max;
			} else if (onselect) {
				tp_inst._defaults.onSelect = onselect;
			}

			// Datepicker will override our date when we call _base_optionDatepicker when 
			// calling minDate/maxDate, so we will first grab the value, call 
			// _base_optionDatepicker, then set our value back.
			if(min || max){
				$target = $(target);
				oldVal = $target.datetimepicker('getDate');
				ret = this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);
				$target.datetimepicker('setDate', oldVal);
				return ret;
			}
		}
		if (value === undefined) {
			return this._base_optionDatepicker.call($.datepicker, target, name);
		}
		return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);
	};
	
	/*
	* jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype,
	* it will return false for all objects
	*/
	var isEmptyObject = function (obj) {
		var prop;
		for (prop in obj) {
			if (obj.hasOwnProperty(prop)) {
				return false;
			}
		}
		return true;
	};

	/*
	* jQuery extend now ignores nulls!
	*/
	var extendRemove = function (target, props) {
		$.extend(target, props);
		for (var name in props) {
			if (props[name] === null || props[name] === undefined) {
				target[name] = props[name];
			}
		}
		return target;
	};

	/*
	* Determine by the time format which units are supported
	* Returns an object of booleans for each unit
	*/
	var detectSupport = function (timeFormat) {
		var tf = timeFormat.replace(/'.*?'/g, '').toLowerCase(), // removes literals
			isIn = function (f, t) { // does the format contain the token?
					return f.indexOf(t) !== -1 ? true : false;
				};
		return {
				hour: isIn(tf, 'h'),
				minute: isIn(tf, 'm'),
				second: isIn(tf, 's'),
				millisec: isIn(tf, 'l'),
				microsec: isIn(tf, 'c'),
				timezone: isIn(tf, 'z'),
				ampm: isIn(tf, 't') && isIn(timeFormat, 'h'),
				iso8601: isIn(timeFormat, 'Z')
			};
	};

	/*
	* Converts 24 hour format into 12 hour
	* Returns 12 hour without leading 0
	*/
	var convert24to12 = function (hour) {
		hour %= 12;

		if (hour === 0) {
			hour = 12;
		}

		return String(hour);
	};

	var computeEffectiveSetting = function (settings, property) {
		return settings && settings[property] ? settings[property] : $.timepicker._defaults[property];
	};

	/*
	* Splits datetime string into date and time substrings.
	* Throws exception when date can't be parsed
	* Returns {dateString: dateString, timeString: timeString}
	*/
	var splitDateTime = function (dateTimeString, timeSettings) {
		// The idea is to get the number separator occurrences in datetime and the time format requested (since time has
		// fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split.
		var separator = computeEffectiveSetting(timeSettings, 'separator'),
			format = computeEffectiveSetting(timeSettings, 'timeFormat'),
			timeParts = format.split(separator), // how many occurrences of separator may be in our format?
			timePartsLen = timeParts.length,
			allParts = dateTimeString.split(separator),
			allPartsLen = allParts.length;

		if (allPartsLen > 1) {
			return {
				dateString: allParts.splice(0, allPartsLen - timePartsLen).join(separator),
				timeString: allParts.splice(0, timePartsLen).join(separator)
			};
		}

		return {
			dateString: dateTimeString,
			timeString: ''
		};
	};

	/*
	* Internal function to parse datetime interval
	* Returns: {date: Date, timeObj: Object}, where
	*   date - parsed date without time (type Date)
	*   timeObj = {hour: , minute: , second: , millisec: , microsec: } - parsed time. Optional
	*/
	var parseDateTimeInternal = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
		var date,
			parts,
			parsedTime;

		parts = splitDateTime(dateTimeString, timeSettings);
		date = $.datepicker._base_parseDate(dateFormat, parts.dateString, dateSettings);

		if (parts.timeString === '') {
			return {
				date: date
			};
		}

		parsedTime = $.datepicker.parseTime(timeFormat, parts.timeString, timeSettings);

		if (!parsedTime) {
			throw 'Wrong time format';
		}

		return {
			date: date,
			timeObj: parsedTime
		};
	};

	/*
	* Internal function to set timezone_select to the local timezone
	*/
	var selectLocalTimezone = function (tp_inst, date) {
		if (tp_inst && tp_inst.timezone_select) {
			var now = date || new Date();
			tp_inst.timezone_select.val(-now.getTimezoneOffset());
		}
	};

	/*
	* Create a Singleton Instance
	*/
	$.timepicker = new Timepicker();

	/**
	 * Get the timezone offset as string from a date object (eg '+0530' for UTC+5.5)
	 * @param {number} tzMinutes if not a number, less than -720 (-1200), or greater than 840 (+1400) this value is returned
	 * @param {boolean} iso8601 if true formats in accordance to iso8601 "+12:45"
	 * @return {string}
	 */
	$.timepicker.timezoneOffsetString = function (tzMinutes, iso8601) {
		if (isNaN(tzMinutes) || tzMinutes > 840 || tzMinutes < -720) {
			return tzMinutes;
		}

		var off = tzMinutes,
			minutes = off % 60,
			hours = (off - minutes) / 60,
			iso = iso8601 ? ':' : '',
			tz = (off >= 0 ? '+' : '-') + ('0' + Math.abs(hours)).slice(-2) + iso + ('0' + Math.abs(minutes)).slice(-2);
		
		if (tz === '+00:00') {
			return 'Z';
		}
		return tz;
	};

	/**
	 * Get the number in minutes that represents a timezone string
	 * @param  {string} tzString formatted like "+0500", "-1245", "Z"
	 * @return {number} the offset minutes or the original string if it doesn't match expectations
	 */
	$.timepicker.timezoneOffsetNumber = function (tzString) {
		var normalized = tzString.toString().replace(':', ''); // excuse any iso8601, end up with "+1245"

		if (normalized.toUpperCase() === 'Z') { // if iso8601 with Z, its 0 minute offset
			return 0;
		}

		if (!/^(\-|\+)\d{4}$/.test(normalized)) { // possibly a user defined tz, so just give it back
			return tzString;
		}

		return ((normalized.substr(0, 1) === '-' ? -1 : 1) * // plus or minus
					((parseInt(normalized.substr(1, 2), 10) * 60) + // hours (converted to minutes)
					parseInt(normalized.substr(3, 2), 10))); // minutes
	};

	/**
	 * No way to set timezone in js Date, so we must adjust the minutes to compensate. (think setDate, getDate)
	 * @param  {Date} date
	 * @param  {string} toTimezone formatted like "+0500", "-1245"
	 * @return {Date}
	 */
	$.timepicker.timezoneAdjust = function (date, toTimezone) {
		var toTz = $.timepicker.timezoneOffsetNumber(toTimezone);
		if (!isNaN(toTz)) {
			date.setMinutes(date.getMinutes() + -date.getTimezoneOffset() - toTz);
		}
		return date;
	};

	/**
	 * Calls `timepicker()` on the `startTime` and `endTime` elements, and configures them to
	 * enforce date range limits.
	 * n.b. The input value must be correctly formatted (reformatting is not supported)
	 * @param  {Element} startTime
	 * @param  {Element} endTime
	 * @param  {Object} options Options for the timepicker() call
	 * @return {jQuery}
	 */
	$.timepicker.timeRange = function (startTime, endTime, options) {
		return $.timepicker.handleRange('timepicker', startTime, endTime, options);
	};

	/**
	 * Calls `datetimepicker` on the `startTime` and `endTime` elements, and configures them to
	 * enforce date range limits.
	 * @param  {Element} startTime
	 * @param  {Element} endTime
	 * @param  {Object} options Options for the `timepicker()` call. Also supports `reformat`,
	 *   a boolean value that can be used to reformat the input values to the `dateFormat`.
	 * @param  {string} method Can be used to specify the type of picker to be added
	 * @return {jQuery}
	 */
	$.timepicker.datetimeRange = function (startTime, endTime, options) {
		$.timepicker.handleRange('datetimepicker', startTime, endTime, options);
	};

	/**
	 * Calls `datepicker` on the `startTime` and `endTime` elements, and configures them to
	 * enforce date range limits.
	 * @param  {Element} startTime
	 * @param  {Element} endTime
	 * @param  {Object} options Options for the `timepicker()` call. Also supports `reformat`,
	 *   a boolean value that can be used to reformat the input values to the `dateFormat`.
	 * @return {jQuery}
	 */
	$.timepicker.dateRange = function (startTime, endTime, options) {
		$.timepicker.handleRange('datepicker', startTime, endTime, options);
	};

	/**
	 * Calls `method` on the `startTime` and `endTime` elements, and configures them to
	 * enforce date range limits.
	 * @param  {string} method Can be used to specify the type of picker to be added
	 * @param  {Element} startTime
	 * @param  {Element} endTime
	 * @param  {Object} options Options for the `timepicker()` call. Also supports `reformat`,
	 *   a boolean value that can be used to reformat the input values to the `dateFormat`.
	 * @return {jQuery}
	 */
	$.timepicker.handleRange = function (method, startTime, endTime, options) {
		options = $.extend({}, {
			minInterval: 0, // min allowed interval in milliseconds
			maxInterval: 0, // max allowed interval in milliseconds
			start: {},      // options for start picker
			end: {}         // options for end picker
		}, options);

		// for the mean time this fixes an issue with calling getDate with timepicker()
		var timeOnly = false;
		if(method === 'timepicker'){
			timeOnly = true;
			method = 'datetimepicker';
		}

		function checkDates(changed, other) {
			var startdt = startTime[method]('getDate'),
				enddt = endTime[method]('getDate'),
				changeddt = changed[method]('getDate');

			if (startdt !== null) {
				var minDate = new Date(startdt.getTime()),
					maxDate = new Date(startdt.getTime());

				minDate.setMilliseconds(minDate.getMilliseconds() + options.minInterval);
				maxDate.setMilliseconds(maxDate.getMilliseconds() + options.maxInterval);

				if (options.minInterval > 0 && minDate > enddt) { // minInterval check
					endTime[method]('setDate', minDate);
				}
				else if (options.maxInterval > 0 && maxDate < enddt) { // max interval check
					endTime[method]('setDate', maxDate);
				}
				else if (startdt > enddt) {
					other[method]('setDate', changeddt);
				}
			}
		}

		function selected(changed, other, option) {
			if (!changed.val()) {
				return;
			}
			var date = changed[method].call(changed, 'getDate');
			if (date !== null && options.minInterval > 0) {
				if (option === 'minDate') {
					date.setMilliseconds(date.getMilliseconds() + options.minInterval);
				}
				if (option === 'maxDate') {
					date.setMilliseconds(date.getMilliseconds() - options.minInterval);
				}
			}
			
			if (date.getTime) {
				other[method].call(other, 'option', option, date);
			}
		}

		$.fn[method].call(startTime, $.extend({
			timeOnly: timeOnly,
			onClose: function (dateText, inst) {
				checkDates($(this), endTime);
			},
			onSelect: function (selectedDateTime) {
				selected($(this), endTime, 'minDate');
			}
		}, options, options.start));
		$.fn[method].call(endTime, $.extend({
			timeOnly: timeOnly,
			onClose: function (dateText, inst) {
				checkDates($(this), startTime);
			},
			onSelect: function (selectedDateTime) {
				selected($(this), startTime, 'maxDate');
			}
		}, options, options.end));

		checkDates(startTime, endTime);
		
		selected(startTime, endTime, 'minDate');
		selected(endTime, startTime, 'maxDate');

		return $([startTime.get(0), endTime.get(0)]);
	};

	/**
	 * Log error or data to the console during error or debugging
	 * @param  {Object} err pass any type object to log to the console during error or debugging
	 * @return {void}
	 */
	$.timepicker.log = function () {
		if (window.console) {
			window.console.log.apply(window.console, Array.prototype.slice.call(arguments));
		}
	};

	/*
	 * Add util object to allow access to private methods for testability.
	 */
	$.timepicker._util = {
		_extendRemove: extendRemove,
		_isEmptyObject: isEmptyObject,
		_convert24to12: convert24to12,
		_detectSupport: detectSupport,
		_selectLocalTimezone: selectLocalTimezone,
		_computeEffectiveSetting: computeEffectiveSetting,
		_splitDateTime: splitDateTime,
		_parseDateTimeInternal: parseDateTimeInternal
	};

	/*
	* Microsecond support
	*/
	if (!Date.prototype.getMicroseconds) {
		Date.prototype.microseconds = 0;
		Date.prototype.getMicroseconds = function () { return this.microseconds; };
		Date.prototype.setMicroseconds = function (m) {
			this.setMilliseconds(this.getMilliseconds() + Math.floor(m / 1000));
			this.microseconds = m % 1000;
			return this;
		};
	}

	/*
	* Keep up with the version
	*/
	$.timepicker.version = "1.5.3";

}));

function popitup(n,t){return newwindow=window.open(n,"name",t+", location=no, menubar=no, scrollbars=1"),window.focus&&newwindow.focus(),!1}function fermeouvreDiffSpec(n){alert(n)}function confirmationCommandeRapide(){if(bcgvChecked=document.getElementById("MainPanel_CheckBoxValidation").checked,password1=document.getElementById("MainPanel_TextBoxPassword").value,password2=document.getElementById("MainPanel_TextBoxPassword2").value,!bcgvChecked)return $.msgBox({content:txt_erreur.vccrmsg1,type:"error",buttons:[{value:"OK"}]}),!1;if(password1==="")return $.msgBox({content:txt_erreur.vccrmsg2,type:"error",buttons:[{value:"OK"}]}),document.getElementById("MainPanel_TextBoxPassword").focus(),!1;if(document.getElementById("MainPanel_TextBoxPassword").value!==document.getElementById("MainPanel_TextBoxPassword2").value)return $.msgBox({content:txt_erreur.mdpDiff,type:"error",buttons:[{value:"OK"}]}),!1;bcgvChecked&&password1===password2&&password1.length!=0&&__doPostBack("<%= btPost.UniqueID %>","nextStepOrder")}function ouvregoboTime(n){$.masterGobo({src:uRLgobo+"?lang="+n,width:largeur,height:hauteur}).Ouvre();$("#overlay").css("z-index","11");$(".green").css("z-index","9");$("#PanelUp_scSearchControl_pnlMaster").css("z-index","9")}function ouvregoboTimeFixe(n){$.masterGobo({src:uRLgobo+"?lang="+n,width:largeur,height:hauteur}).Ouvre();$("#masterGobo").addClass("masterGobo-fixe");$("#masterGobo > a.Ferme-window").addClass("Ferme-windowGOB");$(".masterGobo-overlay").hide();$(".green").css("z-index","9");$("#PanelUp_scSearchControl_pnlMaster").css("z-index","9")}function validationChorus(n){$.msgBox({type:"confirm",content:n,title:"Confirmer le paiement",onClose:function(){this.val()&&__doPostBack("<%= ImageButtonValiderMacommande.UniqueID %>","")}})}function validationCommandeRapide(n){return n=document.getElementById(n).checked,n?__doPostBack("<%= btPost.UniqueID %>","quickCommandValidee"):$.msgBox({content:txt_erreur.vccrmsg1,type:"error",buttons:[{value:"OK"}]}),!1}function validationDevis(n,t,i){return n=document.getElementById(n).checked,t=document.getElementById(t).value,i=document.getElementById(i).value,n&&t==i&&t.length!=0?__doPostBack("<%= btPost.UniqueID %>","nextStepDevis"):n?(document.getElementById("spanCGV").visible=!1,$.msgBox({content:txt_erreur.vccrmsg2,type:"error",buttons:[{value:"OK"}]})):$.msgBox({content:txt_erreur.vccrmsg1,type:"error",buttons:[{value:"OK"}]}),!1}function confirmationEmptyBasket(){var t=txt_erreur.supbasket,n=!1;return $.msgBox({content:t,type:"confirm",buttons:[{value:txt_erreur.etat_oui},{value:txt_erreur.etat_non}],success:function(t){t==txt_erreur.etat_oui&&(__doPostBack("<%= btPostItem.UniqueID %>","emptyBasket"),n=!0)}}),n}function showErrorMessage(n){return $.msgBox({content:n,type:"error"}),bToReturn}function floatingMessage(n){$.msgBox({content:"<span style='text-align:center;width:400px;vertical-align:center;height:50px;font-weight:bold;'>"+n+"<\/span>",type:"info",autoClose:!0,timeOut:1900,buttons:null,opacity:.1})}function testCookiesActivated(){var n=navigator.cookieEnabled?!0:!1;typeof navigator.cookieEnabled!="undefined"||n||(document.cookie="testcookie",n=document.cookie.indexOf("testcookie")!=-1?!0:!1);n||$.msgBox({content:txt_erreur.msgCookie,type:"error",buttons:[{value:"OK"}]})}function ouvremenu(n){n.find("#contener-FamilleM").css("display","block");$("#overlay").css("display","block");$("#Entetemenu").css("z-index","8");$("#PanelUp_scSearchControl_pnlMaster").css("z-index","9");$("#overlay").css("z-index","10")}function ouvreBasket(){$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(300);$("#overlay").css("z-index","11");$("#header").css("z-index","13");$(".green").css("z-index","9");$("#PanelUp_scSearchControl_pnlMaster").css("z-index","9");$("#overlay").stop(!0,!0).fadeIn(300)}function ShowPopup(n){$.msgBox({content:n,type:"error",buttons:[{value:"OK"}]})}function fermeouvre(n,t,i){$.modal({src:n,width:t,height:i}).Ouvre()}function fermeouvreResponsive(n,t,i){$.modal({src:n,width:t,height:i}).Ouvre()}function FermeAndOpen(n,t,i){$.modal().Ferme();setTimeout(fermeouvreClone(""+n+"",""+t,""+i),2e3)}function loocaction(n){location.href=n}function fermeouvreClone(n,t,i){$.CloneWin({src:n,width:t,height:i}).Ouvre()}function fermeouvreCPT(n,t,i){$.CompleMentCart({src:n,width:t,height:i}).Ouvre()}function fermeouvreDiff(n,t,i){$.fenetre({src:n,width:t,height:i}).Ouvre()}function fermeouvreMybasquet(n,t,i,r){r=r||!1;$.EspaceClient({src:n,width:t,height:i,isArticlelie:r}).Ouvre()}function FenetreSaisie(n,t,i){$.ajoutrapide({src:n,width:t,height:i}).Ouvre()}function Fermeclose(){jQuery.modal().Ferme()}function removeExtraSpace(n){var t=document.getElementById(n).value;t=t.replace(/[\s]{2,}/g," ");t=t.replace(/^[\s]/,"");t=t.replace(/[\s]$/,"");t!=""&&(document.getElementById(n).value=t)}function Recherche(n){if(n>=1){var t=encodeURIComponent($("#PanelUp_scSearchControl_txtSearch").val()),i="";i=$("#Elastic").val()=="X"?encodeURI("/AutoRechercheNewES.aspx?texte="+t):encodeURI("/AutoRechercheNew.aspx?texte="+t);$("#MaRecherche").load(""+i+"",function(n,t){t=="success"&&($("#PanelUp_scSearchControl_btSearch").attr("src","/Images/r/WhiteBTN.gif"),$("#MoteurRecherche #PanelUp_scSearchControl_txtSearch").attr("class","searchnormal"),$("#MaRecherche > p").hasClass("endofline")&&(OKsubmit=$("#MaRecherche").is(":visible")))})}OKsubmit=!1}function debounce(n,t){var i=null;return function(){var r=this,u=arguments;clearTimeout(i);i=setTimeout(function(){n.apply(r,u)},t)}}function GetValueOf(n){var t={texte:n};$.ajax({type:"POST",url:"/Search.asmx/Masaisie",data:JSON.stringify(t),contentType:"application/json; charset=utf-8",dataType:"json",success:function(){TimeLight=300},error:function(){}})}function evalPwd(n){var t=0,i=new RegExp(/^(?=.*\d)(?=.*[a-z]).{6,60}$/g),r=new RegExp(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{7,60}$/g),u=new RegExp(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,60}$/g);i.test(n)&&(t=2,document.getElementById("Messagevalidation").innerHTML="Vous devez ajouter majuscule et minuscule chiffre + un caractère spécial exemple :  1Aa @ ~;]");r.test(n)&&(t=3,document.getElementById("Messagevalidation").innerHTML="",document.getElementById("Messagevalidation").innerHTML="Vous devez ajouter un caractère spécial exemple : 1Aa @ ~;]");u.test(n)&&(t=5,document.getElementById("Messagevalidation").innerHTML="",document.getElementById("Messagevalidation").innerHTML="");t==0?(document.getElementById("Messagevalidation").innerHTML="Vous devez ajouter majuscule et minuscule + un chiffre et un caractère spécial exemple :  @ ~;]",document.getElementById("Faible").className="nrm",document.getElementById("Moyen").className="nrm",document.getElementById("Bon").className="nrm",document.getElementById("Parfait").className="nrm"):t==1?(document.getElementById("Faible").className="red",document.getElementById("Moyen").className="nrm",document.getElementById("Bon").className="nrm",document.getElementById("Parfait").className="nrm"):t==2?(document.getElementById("Faible").className="nrm",document.getElementById("Moyen").className="yellow",document.getElementById("Bon").className="nrm",document.getElementById("Parfait").className="nrm"):t==3?(document.getElementById("Faible").className="nrm",document.getElementById("Moyen").className="nrm",document.getElementById("Bon").className="vert",document.getElementById("Parfait").className="nrm"):(document.getElementById("Faible").className="nrm",document.getElementById("Moyen").className="nrm",document.getElementById("Bon").className="nrm",document.getElementById("Parfait").className="vertlig")}function chargementFile(){var n=document.getElementById("MainPanel_FormatTelechargement").value,t=document.getElementById("MainPanel_FormatTelechargement").selectedIndex,i=document.getElementById("MainPanel_FormatTelechargement").options;document.getElementById("MainPanel_FichierDownload").value=n;document.getElementById("MainPanel_extenFile").value=i[t].text}function CreationcookieMessage(n){var t=new Date,i,r;t.setTime(t.getTime()+n*864e5);i="expires="+t.toGMTString()+";";r="path=/";document.cookie="messageconnete=non; "+i+r}function getCookieMessage(n){for(var t,r=n+"=",u=document.cookie.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}function detectMobile(){return[/Android/i,/iPhone/i,/BlackBerry/i,/Windows Phone/i].some(n=>navigator.userAgent.match(n))}function getWidth(){return self.innerWidth?self.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:document.body?document.body.clientWidth:void 0}function LoaderCompare(){var t,n;window.sharedVariable="";t="";window.location.href.indexOf("/fa/")>-1||window.location.href.indexOf("/sfa/")>-1||window.location.href.indexOf("/col/")>-1?t=document.getElementById("MainPanel_listquerystring").value:(n="",GetURLParameter("fam1")!=""&&(n+="&fam1="+GetURLParameter("fam1").toLowerCase()),GetURLParameter("fam2")!=""&&(n+="&fam2="+GetURLParameter("fam2")),GetURLParameter("fam3")!=""&&(n+="&fam3="+GetURLParameter("fam3")),GetURLParameter("col")!=""&&(n+="&col="+GetURLParameter("col")),t=n);$("#Compare").load("/CompareXhr.aspx?"+t.toLowerCase()+"&Maj="+Math.random(),function(){})}function LoaderCompareFiche(n){window.sharedVariable=n!=""?""+n:"";var t="";document.getElementById("MainPanel_FormViewArticle_fam1")&&(document.getElementById("MainPanel_FormViewArticle_fam1").value!=""&&(t+="&fam1="+document.getElementById("MainPanel_FormViewArticle_fam1").value),document.getElementById("MainPanel_notFam1").value=="X"&&(t=""),$("#Compare").load("/CompareXhr.aspx?"+t.toLowerCase()+"&Maj="+Math.random(),function(){}))}function RecallAjaxQUE(n){var i=getWidth(),t;$(window).on("resize",function(){i=getWidth()});document.getElementById("MainPanel_FormViewArticle_fam1")&&LoaderCompareFiche("");t=0;$("div.filetgris").each(function(){var r;t++;DivDisponibilite=i<=1e3?"DisponibiliteMob":"Disponibilite";$(this).click(function(n){var t=!1,i;$(n.target).hasClass("quantityctrl")||$(n.target).hasClass("increment-quantity")||$(n.target).hasClass("decrement-quantity")||$(n.target).hasClass("cartList")||$(n.target).hasClass(DivDisponibilite+"")||$(n.target).hasClass("tooltip")||$(n.target).hasClass("ContacttList")||$(n.target).hasClass("cartListCompare")||$(n.target).hasClass("CompareAdded")||$(n.target).hasClass("addon")||$(n.target).hasClass("Brand")||$(n.target).hasClass("linkto")||$(n.target).hasClass("preventme")||$(n.target).hasClass("Inkstip")||$(n.target).hasClass("picto")||$(n.target).hasClass("listooltip")||$(n.target).attr("BtnAddtocart")||$(n.target).attr("MainPanel_FormViewArticle_ImageButtonAdd")?t=!1:($(n.target).hasClass("Brand")&&$(n.target).hasClass("linkto")||n.preventDefault(),t=!0);t&&window.location.href.indexOf("Comparateur.aspx")==-1&&(i=$(this).find("a.linkto").attr("href"),location.href=i)});var u=$(this).find("input.CodeSku").val(),f=$(this).find("input.quantityctrl").val(),e="";if(t<=n&&(r=$(this).find("div."+DivDisponibilite).find("#ChoixDelivreryListArticle").length,r==0)){let n="";$(this).find("#DESTOCKAGE_FLAG").length&&(n+="&destock=1");$(this).find("#VENTE_FLASH").length&&(n+="&offremoment=1");$(this).find("div."+DivDisponibilite).load("/DisponibiliteList.aspx?qte="+f+"&Article="+u+n+"&galibre="+e+"&Maj="+Math.random(),function(n,t){t=="success"&&$(".tooltip").tooltipster({animation:"grow",interactive:!0,debug:!1,contentAsHTML:!0,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{scroll:!0,tap:!0,mouseleave:!0}})})}});document.getElementById("MainPanel_listquerystring")&&LoaderCompare()}function LoadImage(){var n=$("#MainPanel_FormViewArticle_LabelCodeArticle").text();$(".ImagesSlide").load("/SlideFicheArticleNew.aspx?code="+n+"&Maj="+Math.random(),function(n,t){t=="success"})}function RecallAjax(){let i=$(window).height(),r=$("#GA_LIBREART9").val(),u=$("#MainPanel_FormViewArticle_qcQuantityControl_txtQuantityListFiche").val(),n=$("#MainPanel_FormViewArticle_LabelCodeArticle").text();n.indexOf("+")!==-1&&(n=n.replace("+","%2B"));let t="";$("#DESTOCKAGE_FLAG").length&&(t+="&destock=1");$("#VENTE_FLASH").length&&(t+="&offremoment=1");$("#disponibilitedet").load("/disponibilite.aspx?qte="+u+"&Article="+n+t+"&galibre="+r+"&Maj="+Math.random(),function(n,t){var i,r,u;t=="success"&&($(".tooltip").tooltipster({animation:"grow",interactive:!0,debug:!1,contentAsHTML:!0,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{scroll:!0,tap:!0,mouseleave:!0}}),getWidth()>768&&(i="",i=$("#DepotRetrait_labForimage2_0 > p").html()!==undefined?$("#DepotRetrait_labForimage2_0 > p").html():"",$("#DepotRetrait_labForimage2_0 > p").html(i.replace("LA BOUTIQUE DU SPECTACLE - 17 rue Vergniaud (Paris 13ème)","LA BOUTIQUE DU SPECTACLE <br>- 17 rue Vergniaud (Paris 13ème)"))),r="",sessionStorage.getItem("url")&&(r=sessionStorage.getItem("url")),u="",sessionStorage.getItem("options")&&(u=JSON.parse(sessionStorage.options)),$(".socialShare").shareButtons(r,JSON.parse(sessionStorage.options)))});$(".tooltip").tooltipster({animation:"grow",interactive:!0,contentAsHTML:!0,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{scroll:!0,tap:!0,mouseleave:!0}});document.getElementById("MainPanel_FormViewArticle_DepotRetrait_ctl01_labForimage");$("#MainPanel_FormViewArticle_DepotRetrait_labForimage2").has("p:contains('17')").length&&$("#MainPanel_FormViewArticle_DepotRetrait_labForimage2 > p").html($("#MainPanel_FormViewArticle_DepotRetrait_labForimage2 > p").html().replace("17","<br>17"));$("#BtnAddtocart").on("click",function(){$("#MainPanel_FormViewArticle_ImageButtonAdd").click()});PosInScrollTop=$(window).scrollTop();PosInScrollTop>positionElementInPage?($(".CadreRight").css({"background-color":"#ffffff"}),i>=768?getWidth()>768?$(".CaddyFixed").css({top:"-20px",position:"absolute"}):(detectMobile()?$(".CaddyFixed").css({top:"0px",position:"initial"}):$(".CaddyFixed").css({top:"-20px",position:"absolute"}),console.log("passage à PosInScrollTop > positionElementInPage")):detectMobile()?$(".CaddyFixed").css({top:"0px",position:"initial"}):$(".CaddyFixed").css({top:"-20px",position:"absolute"}),menuTOP=!1):(i>768&&detectMobile()?getWidth()>768&&getWidth()<=768?getWidth()>768?$(".CaddyFixed").css({top:"-20px",position:"absolute"}):$(".CaddyFixed").css({top:"-20px",position:"absolute"}):getWidth()>768?$(".CaddyFixed").css({top:"-20px",position:"absolute"}):detectMobile()?$(".CaddyFixed").css({top:"0px",position:"initial"}):$(".CaddyFixed").css({top:"-20px",position:"absolute"}):detectMobile()?$(".CaddyFixed").css({top:"0px",position:"initial"}):$(".CaddyFixed").css({position:"absolute"}),menuTOP=!0);$(".CodeAvantage").delay(1e3).addClass("load");$("#PanelUp_BasketControl1_ImageButtonBasket").bind("click",function(){$("#isnotconnected").length?__doPostBack("ctl00$PanelUp$BasketControl1$btFinish",""):location.href="/OS1.aspx?lang=FR"})}function loadFacette(n,t){var r=0,u=$("#facette");r=document.body.clientWidth;window.addEventListener("resize",function(){r=document.body.clientWidth},!1);r<987?(u=$("#FacetteMobile"),$("#facette").load("/rien.htm",function(){}),$("#facette").hide()):($("#FacetteMobile").hide(),$("#FacetteMobile").load("/rien.htm",function(){}),$("#facette").show(),sessionStorage.setItem("FacetteMobile","false"));let i=document.getElementById("MainPanel_Contexte")?"&contextsession="+document.getElementById("MainPanel_Contexte").value+"":"";u.load(encodeURI("/facette.aspx?"+t+"&rand="+Math.random()+i),function(n,r){if(r=="success"){Multifacette(t+i);GetMarques(t+i,GetURLParameter("Brand"));GetOffres(t+i,"");GetCollection(t+i);GetFacetteMultiple(t+i);GetDisponibility(t+i);$("#MainPanel_Affiche").on("click",function(n){n.preventDefault();$("#overlay").css({top:"0px",display:"block"});sessionStorage.setItem("FacetteMobile","true");$("#FacetteMobile").css({right:"-300px",left:""}).animate({right:"0px",display:"block"})});$("#Masque").on("click",function(n){n.preventDefault();sessionStorage.setItem("FacetteMobile","false");$("#FacetteMobile").hide();$("#overlay").css({top:"80px",display:"none"})});$("#Voirresultat").on("click",function(n){n.preventDefault();$("#Masque").click()});GetURLParameter("fam3")!=""?($("#CategorieRoot").hide(),$(".barrecate").hide()):($("#CategorieRoot").show(),$(".barrecate").show());GetURLParameter("fam3")==""&&(window.location.href.indexOf("/sfa/")>-1?($("#CategorieRoot").hide(),$(".barrecate").hide()):($("#CategorieRoot").show(),$(".barrecate").show()));Number($("#min").val())==eval($("#max").val())-1?$("#PrixSlideBlock").hide():Number($("#min").val())==eval($("#max").val())?$("#PrixSlideBlock").hide():$("#PrixSlideBlock").show();sessionStorage.getItem("PriceProductFilter")&&($("#PriceProductFilter").css("display",""+sessionStorage.getItem("PriceProductFilter")),sessionStorage.getItem("PriceProductFilter")=="none"?$("#TriAnglePrice").addClass("testArrow"):$("#TriAnglePrice").removeClass("testArrow"));sessionStorage.getItem("UniversDiv")&&$("#UniversDiv").css("display",""+sessionStorage.getItem("UniversDiv"));sessionStorage.getItem("CollectionDiv")&&$("#CollectionDiv").css("display",""+sessionStorage.getItem("CollectionDiv"))}})}function GetURLParameter(n){for(var i,u=window.location.search.substring(1),r=u.split("&"),t=0;t<r.length;t++)if(i=r[t].split("="),i[0].toLowerCase()==n.toLowerCase())return i[1].replace("#","%23");return""}function GetParametreFromStr(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function Multifacette(n){var t="",i="",r;window.location.href.indexOf("/sfa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/fa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/col/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/ma/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/cpcoeur_")>-1||window.location.href.indexOf("/incont_")>-1||window.location.href.indexOf("/discount_")>-1||window.location.href.indexOf("/rebates_")>-1?n=document.getElementById("MainPanel_listquerystring").value:(r="",GetURLParameter("fam1")!=""&&(r+="&fam1="+GetURLParameter("fam1")),GetURLParameter("fam2")!=""&&(r+="&fam2="+GetURLParameter("fam2")),GetURLParameter("fam3")!=""&&(r+="&fam3="+GetURLParameter("fam3")),GetURLParameter("col")!=""&&(r+="&col="+GetURLParameter("col")),n=r);$("#Categoriescroll").find("span").each(function(){$(this).html()==" (0) "&&$(this).hide()});$('#MarqueProductFilter > tbody  > tr  > td > input[type="checkbox"]').on("change",function(){clearTimeout(TimeChecquedobj);TimeChecquedobj=setTimeout(function(){var r,e,s,h,u,f,c,a,o,i;EtUniv="";marquepres="";EtUniv=retourneEachUnivers();r="";EtCollection="";EtCollection=retournEachCollection();selectMarqueedo="";selectMarqueedo=retournEachMarque();s=$("#min").val();h=$("#max").val();EtUniv!="";e="";GetURLParameter("PriceMin")!=""&&GetURLParameter("PriceMin")!=""&&(s=$("#min").val(),h=$("#max").val(),e="&PriceMin="+s+"&PriceMax="+h);GetURLParameter("Depot")!=""&&(r=retournEachDepot(),r!=""&&(r=r!=","?"&Depot="+r.substring(0,r.length-1):"&Depot="+r));selectMarqueedo!=""&&(marquepres+="&Brand="+selectMarqueedo.substring(0,selectMarqueedo.length-1));EtCollection!=""&&(t+="&Col="+EtCollection.substring(0,EtCollection.length-1));u="";window.location.href.indexOf("/sfa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/fa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/col/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/cpcoeur_")>-1||window.location.href.indexOf("/incont_")>-1||window.location.href.indexOf("/discount_")>-1||window.location.href.indexOf("/rebates_")>-1?n=document.getElementById("MainPanel_listquerystring").value:(GetURLParameter("Search")!=""&&(u+="&Search="+GetURLParameter("Search").replace("+"," ")),GetURLParameter("Des")!=""&&(u+="&Des="+GetURLParameter("Des")),GetURLParameter("Sort")!=""&&(u+="&Sort="+GetURLParameter("Sort")),f="",GetURLParameter("fam1")!=""&&(f+="&fam1="+GetURLParameter("fam1")),GetURLParameter("fam2")!=""&&(f+="&fam2="+GetURLParameter("fam2")),GetURLParameter("fam3")!=""&&(f+="&fam3="+GetURLParameter("fam3")),n=f+u);c=!0;GetURLParameter("Fam1")==""||GetURLParameter("Fam2")!=""||window.location.href.toLowerCase().indexOf("search")>-1||(c=!1);a="";o=decodeURIComponent(window.location.search.substring(1)).replace("#","%23");o==""&&(o=n);var y=o.split("&"),l=null,v=[];y.forEach(function(n){n!=""&&(l=n.split("="),v.push({key:l[0],value:l[1]}))});i="";v.forEach(function(n){i+=n.key+"="+n.value+"&"});i=i.substring(0,i.length-1);i=removeParamURL("Brand","?"+i).substring(1);i=removeParamURL("facette","?"+i).substring(1);i=removeParamURL("Col","?"+i).substring(1);i=removeParamURL("col","?"+i).substring(1);i=removeParamURL("news","?"+i).substring(1);i=removeParamURL("News","?"+i).substring(1);i=removeParamURL("CpCoeur","?"+i).substring(1);i=removeParamURL("rebates","?"+i).substring(1);i=removeParamURL("Incont","?"+i).substring(1);i=removeParamURL("discount","?"+i).substring(1);i=removeParamURL("Discount","?"+i).substring(1);i=removeParamURL("Offres_du_moment","?"+i).substring(1);i=removeParamURL("offres_du_moment","?"+i).substring(1);i=removeParamURL("PriceMin","?"+i).substring(1);i=removeParamURL("PriceMax","?"+i).substring(1);i=removeParamURL("texte","?"+i).substring(1);i=removeParamURL("Depot","?"+i).substring(1);n=i;GetFam(n+marquepres+EtUniv+t+e+a+r,n,marquepres,EtUniv,t,e,c)},1e3)});$('#UniversProductFilter > tbody  > tr  > td > input[type="checkbox"]').on("change",function(){clearTimeout(TimeChecquedobj);TimeChecquedobj=setTimeout(function(){var u,l,a,f,e,h,o,r;EtUniv="";marquepres="";EtUniv=retourneEachUnivers();u="";u=retournEachDepot();u!=""&&(u=u!=","?"&Depot="+u.substring(0,u.length-1):"&Depot="+u);EtCollection="";t="";EtCollection=retournEachCollection();selectMarqueedo="";selectMarqueedo=retournEachMarque();l=$("#min").val();a=$("#max").val();EtUniv!="";selectMarqueedo!=""&&(marquepres+="&Brand="+selectMarqueedo.substring(0,selectMarqueedo.length-1));EtCollection!=""&&(t+="&Col="+EtCollection.substring(0,EtCollection.length-1));f="";GetURLParameter("Search")!=""&&(f+="&Search="+GetURLParameter("Search").replace("+"," "));GetURLParameter("Des")!=""&&(f+="&Des="+GetURLParameter("Des"));GetURLParameter("discount")==""&&GetURLParameter("Search")==""&&(f="");GetURLParameter("Sort")!=""&&(f+="&Sort="+GetURLParameter("Sort"));window.location.href.indexOf("/sfa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/fa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/col/")>-1?n=document.getElementById("MainPanel_listquerystring").value:(e="",GetURLParameter("fam1")!=""&&(e+="&fam1="+GetURLParameter("fam1")),GetURLParameter("fam2")!=""&&(e+="&fam2="+GetURLParameter("fam2")),GetURLParameter("fam3")!=""&&(e+="&fam3="+GetURLParameter("fam3")),n=e+f);h="";o=decodeURIComponent(window.location.search.substring(1)).replace("#","%23");o==""&&(o=n);var v=o.split("&"),s=null,c=[];v.forEach(function(n){n!=""&&(s=n.split("="),c.push({key:s[0],value:s[1]}))});r="";c.forEach(function(n){r+=n.key+"="+n.value+"&"});r=r.substring(0,r.length-1);r=removeParamURL("Brand","?"+r).substring(1);r=removeParamURL("facette","?"+r).substring(1);r=removeParamURL("Col","?"+r).substring(1);r=removeParamURL("col","?"+r).substring(1);r=removeParamURL("news","?"+r).substring(1);r=removeParamURL("News","?"+r).substring(1);r=removeParamURL("CpCoeur","?"+r).substring(1);r=removeParamURL("rebates","?"+r).substring(1);r=removeParamURL("Incont","?"+r).substring(1);r=removeParamURL("discount","?"+r).substring(1);r=removeParamURL("Discount","?"+r).substring(1);r=removeParamURL("Offres_du_moment","?"+r).substring(1);r=removeParamURL("offres_du_moment","?"+r).substring(1);r=removeParamURL("PriceMin","?"+r).substring(1);r=removeParamURL("PriceMax","?"+r).substring(1);r=removeParamURL("texte","?"+r).substring(1);r=removeParamURL("Depot","?"+r).substring(1);n=r;GetFam(n+marquepres+EtUniv+t+i+h+u,n,marquepres,EtUniv,t,i,!1)},1e3)});$('#CollectionProductFilter > tbody  > tr  > td > input[type="checkbox"]').on("change",function(){clearTimeout(TimeChecquedobj);TimeChecquedobj=setTimeout(function(){var r,o,s,u,f,e;EtUniv="";marquepres="";t="";EtCollection="";EtCollection=retournEachCollection();EtUniv=retourneEachUnivers();r="";GetURLParameter("Depot")!=""&&(r=retournEachDepot(),r!=""&&(r=r!=","?"&Depot="+r.substring(0,r.length-1):"&Depot="+r));selectMarqueedo="";selectMarqueedo=retournEachMarque();o=$("#min").val();s=$("#max").val();EtUniv!="";selectMarqueedo!=""&&(marquepres+="&Brand="+selectMarqueedo.substring(0,selectMarqueedo.length-1));EtCollection!=""&&(t+="&Col="+EtCollection.substring(0,EtCollection.length-1));u="";GetURLParameter("Search")!=""&&(u+="&Search="+GetURLParameter("Search").replace("+"," "));GetURLParameter("Des")!==""&&(u+="&Des="+GetURLParameter("Des"));GetURLParameter("Sort")!==""&&(u+="&Sort="+GetURLParameter("Sort"));window.location.href.indexOf("/sfa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/fa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/col/")>-1?(n=document.getElementById("MainPanel_listquerystring").value,n=retourneArginputhidden(n,"COL")):window.location.href.indexOf("/cpcoeur_")>-1||window.location.href.indexOf("/incont_")>-1||window.location.href.indexOf("/discount_")>-1||window.location.href.indexOf("/rebates_")>-1?n=document.getElementById("MainPanel_listquerystring").value:(f="",GetURLParameter("fam1")!==""&&(f+="&fam1="+GetURLParameter("fam1")),GetURLParameter("fam2")!==""&&(f+="&fam2="+GetURLParameter("fam2")),GetURLParameter("fam3")!==""&&(f+="&fam3="+GetURLParameter("fam3")),n=f+u);e=GetZFfacette(n);GetFam(n+marquepres+EtUniv+t+i+e+r,n,marquepres,EtUniv,t,i,!0)},1e3)});$("#slider-range").slider({change:function(){var r,o,s,u,f,e,h;EtUniv="";marquepres="";EtCollection="";t="";EtCollection=retournEachCollection();EtUniv=retourneEachUnivers();r="";GetURLParameter("Depot")!=""&&(r=retournEachDepot(),r!=""&&(r=r!=","?"&Depot="+r.substring(0,r.length-1):"&Depot="+r));selectMarqueedo="";selectMarqueedo=retournEachMarque();selectMarqueedo!==""&&(marquepres+="&Brand="+selectMarqueedo.substring(0,selectMarqueedo.length-1));EtCollection!=""&&(t+="&Col="+EtCollection.substring(0,EtCollection.length-1));o=$("#min").val();s=$("#max").val();i="&PriceMin="+o+"&PriceMax="+s;sessionStorage.getItem("FacetteSelected")!==null&&(objSelect=JSON.parse(sessionStorage.getItem("FacetteSelected")));u={};u.key=$(".TitrePriceFacette").text();u.Type="JaugePrice";u.value="PriceMin";u.IdFacett=o;addItem(u);sessionStorage.setItem("FacetteSelected",JSON.stringify(objSelect));f="";GetURLParameter("Search")!==""&&(f+="&Search="+GetURLParameter("Search").replace("+"," "));GetURLParameter("Des")!==""&&(f+="&Des="+GetURLParameter("Des"));GetURLParameter("Des")!==""&&(f+="&Des="+GetURLParameter("Des"));GetURLParameter("Sort")!==""&&(f+="&Sort="+GetURLParameter("Sort"));window.location.href.indexOf("/sfa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/fa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/col/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/ma/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/cpcoeur_")>-1||window.location.href.indexOf("/incont_")>-1||window.location.href.indexOf("/discount_")>-1||window.location.href.indexOf("/rebates_")>-1?n=document.getElementById("MainPanel_listquerystring").value:(e="",GetURLParameter("fam1")!=""&&(e+="&fam1="+GetURLParameter("fam1")),GetURLParameter("fam2")!=""&&(e+="&fam2="+GetURLParameter("fam2")),GetURLParameter("fam3")!=""&&(e+="&fam3="+GetURLParameter("fam3")),n=e+f);h=GetZFfacette(n+window.location.search.substring(1));clearTimeout(TimeChecquedobj);TimeChecquedobj=setTimeout(function(){GetFam(n+marquepres+EtUniv+t+i+h+r,n,marquepres,EtUniv,t,i,!0);$("#CollectionProductFilter").find("input[type=checkbox]").not(":checked").each(function(){document.getElementById("span"+$(this).val()).innerHTML==="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden")})},1e3)}});$('#CatProductFilter  input[type="checkbox"]').on("change",function(){var e="",s="",h="",v=!1,u=!1,k=$(this).hasClass("Cat1"),d,y,l,p,w,o,f,c,r,i,a,b;k&&$(this).is(":checked")===!1&&(v=!0);window.location.href.indexOf("/ra/")>-1&&(u=!0);window.location.href.indexOf("/fa/")>-1&&(u=!0);window.location.href.indexOf("/sfa/")>-1&&(u=!0);window.location.href.indexOf("/col/")>-1&&(u=!0);GetURLParameter("fam1")!==""&&(u=!0);GetURLParameter("search")!=""&&(u=!0);d="";y=[];$('#CatProductFilter input[type="checkbox"]:checked').each(function(){u&&(e=$(this).val().split("|")[0]);v==!1&&(s=$(this).val().split("|")[1],$(this).val().split("|")[2]&&(h=$(this).val().split("|")[2]));e!="";s!="";h!=""});sessionStorage.setItem("FacetteSelected",JSON.stringify(y));EtUniv="";marquepres="";EtUniv=retourneEachUnivers();EtUniv===""&&(GetURLParameter("news")!==""&&(EtUniv="&news=X"),GetURLParameter("Offres_du_moment")!==""&&(EtUniv+="&Offres_du_moment=X"),GetURLParameter("offres_du_moment")!==""&&(EtUniv+="&Offres_du_moment=X"));EtCollection="";selectMarqueedo="";selectMarqueedo=retournEachMarque();l="";GetURLParameter("PriceMin")!=""&&GetURLParameter("PriceMin")!=""&&(p=$("#min").val(),w=$("#max").val(),l="&PriceMin="+p+"&PriceMax="+w);EtUniv!=""&&(EtUniv=removeDuplicate(EtUniv));selectMarqueedo!=""&&(marquepres+="&Brand="+selectMarqueedo.substring(0,selectMarqueedo.length-1));EtCollection!=""&&(t+="&Col="+EtCollection.substring(0,EtCollection.length-1));o="";f=!0;window.location.href.indexOf("/sfa/")>-1?(n=document.getElementById("MainPanel_listquerystring").value,u=!0,f=!1):window.location.href.indexOf("/fa/")>-1?(n=document.getElementById("MainPanel_listquerystring").value,u=!0,f=!1):window.location.href.indexOf("/ma/")>-1?(n=document.getElementById("MainPanel_listquerystring").value,f=!1):window.location.href.indexOf("/cpcoeur_")>-1||window.location.href.indexOf("/incont_")>-1||window.location.href.indexOf("/discount_")>-1||window.location.href.indexOf("/rebates_")>-1?(n=document.getElementById("MainPanel_listquerystring").value,f=!1):window.location.href.indexOf("/col/")>-1?(n=document.getElementById("MainPanel_listquerystring").value,f=!1):(GetURLParameter("Search")!=""&&(o+="&Search="+GetURLParameter("Search").replace("+"," ")),GetURLParameter("Des")!=""&&(o+="&Des="+GetURLParameter("Des")),GetURLParameter("Sort")!=""&&(o+="&Sort="+GetURLParameter("Sort")),c="",GetURLParameter("fam1")!=""&&e!=""&&(u=!0,u&&(c+="&fam1="+GetURLParameter("fam1"))),GetURLParameter("fam2")!=""&&s!=""&&(c+="&fam2="+GetURLParameter("fam2")),GetURLParameter("fam3")!=""&&h!=""&&(c+="&fam3="+GetURLParameter("fam3")),n=c+o);r="";GetURLParameter("fam1")!=""&&e!=""?r+="&fam1="+GetURLParameter("fam1"):GetURLParameter("Search")==""&&GetURLParameter("fam1")==""&&GetURLParameter("fam2")==""&&GetURLParameter("fam3")==""&&GetURLParameter("FR")==""&&(i=document.getElementById("MainPanel_listquerystring").value,i=removeParamURL("Fam2","?"+i).substring(1),i=removeParamURL("fam2","?"+i).substring(1),i=removeParamURL("Fam3","?"+i).substring(1),i=removeParamURL("fam3","?"+i).substring(1),GetURLParameter("Brand")==""&&GetURLParameter("rebates")==""?GetParametreFromStr("Fam1","/articles.aspx?"+i)!==null&&GetParametreFromStr("lang","/articles.aspx?"+i)!==null&&(r+="&fam1="+GetParametreFromStr("Fam1","/articles.aspx?"+i),r+="&lang="+GetParametreFromStr("lang","/articles.aspx?"+i)):r+=marquepres);e!=""&&(r+="&fam1="+e);s!=""&&(r+="&fam2="+s);h!=""&&(r+="&fam3="+h);a="";r!=""&&(a=StriptStr(r.substring(1)));n=a+o;window.location.href.toLowerCase().indexOf("search")>-1&&r==""?f=!1:GetURLParameter("Fam1")==""||GetURLParameter("Fam2")==""||window.location.href.toLowerCase().indexOf("search")>-1||(f=!1);r==""&&(f=!1);b=GetZFfacette(n+EtUniv);GetFam(n+marquepres+EtUniv+t+l+b,n,marquepres,EtUniv,t,l,f)});$("#ddlArticleResultsXhr").on("change",function(){clearTimeout(TimeChecquedobj);location.href=$(this).val()})}function StriptStr(n){var u=n,t,r;for(pars=u.split("&"),t={},i=pars.length-1;i>=0;i--)spl=pars[i].split("="),t[spl[0]]=spl[1];pars=[];for(r in t)pars.push(r+"="+t[r]);return"&"+pars.join("&")}function GetZFfacette(n){var i="",t=window.location.search.substring(1);if(t){var e=t,h=e.split("&"),u=[],r=null,o=n.split("&");o.forEach(function(n){n!=""&&(t=t.startsWith("&")?t.substring(1):t,t=removeParamURL("Brand","?"+t).substring(1),t=removeParamURL("facette","?"+t).substring(1),t=removeParamURL("Col","?"+t).substring(1),t=removeParamURL("col","?"+t).substring(1),t=removeParamURL("news","?"+t).substring(1),t=removeParamURL("News","?"+t).substring(1),t=removeParamURL("CpCoeur","?"+t).substring(1),t=removeParamURL("rebates","?"+t).substring(1),t=removeParamURL("Incont","?"+t).substring(1),t=removeParamURL("discount","?"+t).substring(1),t=removeParamURL("Discount","?"+t).substring(1),t=removeParamURL("Offres_du_moment","?"+t).substring(1),t=removeParamURL("offres_du_moment","?"+t).substring(1),t=removeParamURL("PriceMin","?"+t).substring(1),t=removeParamURL("PriceMax","?"+t).substring(1),t=removeParamURL("Fam1","?"+t).substring(1),t=removeParamURL("fam1","?"+t).substring(1),t=removeParamURL("fam3","?"+t).substring(1),t=removeParamURL("search","?"+t).substring(1),t=removeParamURL("Search","?"+t).substring(1),t=removeParamURL("Fam3","?"+t).substring(1),t=removeParamURL("Fam2","?"+t).substring(1),t=removeParamURL("fam2","?"+t).substring(1),t=removeParamURL("texte","?"+t).substring(1),t=removeParamURL("Depot","?"+t).substring(1),t=removeParamURL("lang","?"+t).substring(1),t=removeParamURL("Lang","?"+t).substring(1),t=removeParamURL("Sort","?"+t).substring(1),t=removeParamURL("sort","?"+t).substring(1))});var f=RegExp("[?&]"+name+"=([^&]*)").exec(t),c=f&&decodeURIComponent(f[1].replace(/\+/g," ")),s=t.split("&");s.forEach(function(n){n!=""&&(r=n.split("="),u.push({key:r[0],value:r[1]}))});u.forEach(function(n){i+=n.key+"="+n.value+"&"});i!=""&&(i="&"+i.substring(0,i.length-1))}return i}function removeParamURL(n,t){var u=t.split("?")[0],f,i=[],e=t.indexOf("?")!==-1?t.split("?")[1]:"",r;if(e!==""){for(i=e.split("&"),r=i.length-1;r>=0;r-=1)f=i[r].split("=")[0],f===n&&i.splice(r,1);u=u+"?"+i.join("&")}return u}function retourneArginputhidden(n,t){var i="",r,u,f,e,o;return n.indexOf("Fam1")>=0&&(r="",r=GetParametreFromStr("Fam1","/ArticleFacette.aspx?"+n),i+="Fam1="+r),n.indexOf("Fam2")>=0&&(u="",u=GetParametreFromStr("Fam2","/ArticleFacette.aspx?"+n),i+="&Fam2="+u),n.indexOf("Fam3")>=0&&(f="",f=GetParametreFromStr("Fam3","/ArticleFacette.aspx?"+n),i+="&Fam3="+f),t!="COL"&&n.indexOf("Col")>=0&&(e="",e=GetParametreFromStr("Col","/ArticleFacette.aspx?"+n),i+="&Col="+e),n.indexOf("Brand")>=0&&(o="",o=GetParametreFromStr("Brand","/ArticleFacette.aspx?"+n),i+="&Brand="+o),i}function retourneEachUnivers(){var t="",n="",i;return $('#UniversProductFilter > tbody  > tr  > td > input[type="checkbox"]:checked').each(function(){t+=$(this).val()+",";sessionStorage.getItem("FacetteSelected")!==null&&(objSelect=JSON.parse(sessionStorage.getItem("FacetteSelected")));var n={};n.key=$("label[for="+$(this).attr("id")+"]").html();n.Type=$(this).val();n.value=$(this).val();n.IdFacett="X";addItem(n);sessionStorage.setItem("FacetteSelected",JSON.stringify(objSelect))}),i=t.split(","),i.forEach(function(t){t=="discount"&&(n+="&discount=X");t=="Incont"&&(n+="&Incont=X");t=="CpCoeur"&&(n+="&CpCoeur=X");t=="news"&&(n+="&news=X");t=="rebates"&&(n+="&rebates=X");t=="Offres_du_moment"&&(n+="&Offres_du_moment=X");t=="offres_du_moment"&&(n+="&Offres_du_moment=X")}),n}function retournEachMarque(){var t="",n;return $('#MarqueProductFilter > tbody  > tr  > td > input[type="checkbox"]:checked').each(function(){t+=$(this).val()+",";document.getElementById("span"+$(this).val()).style.visibility="visible";sessionStorage.getItem("FacetteSelected")!==null&&(objSelect=JSON.parse(sessionStorage.getItem("FacetteSelected")));var n={};n.key=$("label[for="+$(this).attr("id")+"]").html();n.Type="Brand";n.value="Brand";n.IdFacett=$(this).val();addItem(n);sessionStorage.setItem("FacetteSelected",JSON.stringify(objSelect))}),n=[],$("#MarqueProductFilter").find("input[type=checkbox]").not(":checked").each(function(){var t,i;document.getElementById("span"+$(this).val()).innerHTML=="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden");sessionStorage.getItem("FacetteSelected")!==null&&(t=[],t=JSON.parse(sessionStorage.getItem("FacetteSelected")),i=$(this).val(),t.forEach(function(r){r.IdFacett==i&&(n=arrayRemove(t,r.IdFacett))}))}),$("#CollectionProductFilter").find("input[type=checkbox]").not(":checked").each(function(){document.getElementById("span"+$(this).val()).innerHTML=="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden")}),n.length!=0&&sessionStorage.setItem("FacetteSelected",JSON.stringify(n)),t}function retournEachDepot(){var n="";return $("#DisponibilFilter >   tbody  > tr  > td >  input[type='checkbox']:checked").each(function(){n+=$(this).val()+","}),n.replace("'',",",")}function addItem(n){var t=objSelect.findIndex(t=>t.IdFacett==n.IdFacett&&n.Type==t.Type);t===-1?objSelect.push({key:n.key,Type:n.Type,value:n.value,IdFacett:n.IdFacett}):console.log("object already exists")}function arrayRemove(n,t){return n.filter(function(n){return n.IdFacett!=t})}function retournEachCollection(){var t="",n;return $('#CollectionProductFilter > tbody  > tr  > td > input[type="checkbox"]:checked').each(function(){t+=$(this).val()+",";document.getElementById("span"+$(this).val()).style.visibility="visible";sessionStorage.getItem("FacetteSelected")!==null&&(objSelect=JSON.parse(sessionStorage.getItem("FacetteSelected")));var n={};n.key=$("label[for="+$(this).attr("id")+"]").html();n.Type="Col";n.value="Col";n.IdFacett=$(this).val();addItem(n);sessionStorage.setItem("FacetteSelected",JSON.stringify(objSelect))}),n=[],$("#CollectionProductFilter").find("input[type=checkbox]").not(":checked").each(function(){var t,i;document.getElementById("span"+$(this).val()).innerHTML=="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden");sessionStorage.getItem("FacetteSelected")!==null&&(t=[],t=JSON.parse(sessionStorage.getItem("FacetteSelected")),i=$(this).val(),t.forEach(function(r){r.IdFacett==i&&(n=arrayRemove(t,r.IdFacett))}))}),n.length!=0&&sessionStorage.setItem("FacetteSelected",JSON.stringify(n)),t}function GetFamNiv3(n){GetFam(n,family,marquepres,EtUniv,CollectionFiltre,IschangePrice,!0);$("#MainPanel_listquerystring").val(n);GetCollection(n);$("#wait").show();$CenterFilter=$("#XhrMarque");$CenterFilter.load(encodeURI("/marquesXhr.aspx?rand="+Math.random()),function(n,t){t=="success"&&($("#wait").fadeOut("slow"),Multifacette(family),selectMarqueedo==""&&GetMarques(family,""),EtUniv==""&&GetOffres(family,""));t=="error"})}function GetFam(n,t,i,r,u,f,e){var o,s,h;$("#wait").show();$("#waitXhrMarque").show();$("#waitXhrOffre").show();$("#XhrOffre").hide();UrlRedirectOption==!1?($CenterFilter=$("#CenterFilter"),$CenterFilter.load(encodeURI("/ArticleFacette.aspx?"+n+"&facette=1&rand="+Math.random()),function(u,f){var e,o;f=="success"&&($("#MainPanel_UpdatePanel1").hide(),$("#MainPanel_UpdatePanel1").hide(),$("#MainPanel_UpdatePanel2").hide(),$("#wait").fadeOut("slow"),n.indexOf("Col")>=0&&(e="",e=GetParametreFromStr("Col","/ArticleFacette.aspx?"+n)),o=function(n,t,i){var r=document.createElement("a");r.href="/AjoutPanier.aspx?Code="+n+"&lang="+i+"&qute="+t;r.target="_blank"},GetMarques(t,i),GetOffres(t,r),Affiche=function(n,t){if(document.getElementById(n)){var r=document.getElementById(t),i=document.getElementById(n);i.style.display=="block"?(i.style.display="none",sessionStorage.setItem(n+"",$("#"+n).css("display")),document.getElementById(t)&&(sessionStorage.setItem(t+"","false"),r.classList.remove("testArrow"))):(i.style.display="block",sessionStorage.setItem(n+"",$("#"+n).css("display")),document.getElementById(t)&&(sessionStorage.setItem(t+"","false"),r.classList.add("testArrow")))}});f=="error"}),$("#waitXhrMarque").hide(),$("#waitXhrOffre").hide(),$("#XhrOffre").show()):(o="",e==!1?(s="/Article.aspx?"+n+o+"",location.href=s.replace("?&","?")):(h="/Article.aspx?"+n+o+"&facette=1",location.href=h.replace("?&","?")))}function GetMarques(n,t){$("#waitXhrMarque").show();$("#XhrMarque").hide();$CenterFilter=$("#XhrMarque");var i="";UrlRedirectOption==!1?i=t:(GetURLParameter("Brand")!=""&&(i="&Brand="+GetURLParameter("Brand")),GetURLParameter("facette")!=""&&(i+="&facette="+GetURLParameter("facette")));i=i.toLowerCase().includes("brand")===!1?n:n;$CenterFilter.load(encodeURI("/marquesXhr.aspx?"+i.replace(/%2c|_/g,",").replace(/%252c|_/g,",")+"&rand="+Math.random()),function(t,i){i=="success"&&($("#waitXhrMarque").fadeOut("slow"),$("#XhrMarque").show(),Multifacette(n),$("#MarqueProductFilter").find("input[type=checkbox]").not(":checked").each(function(){document.getElementById("span"+$(this).val()).innerHTML=="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden")}),Affiche=function(n,t){if(document.getElementById(n)){var r=document.getElementById(t),i=document.getElementById(n);i.style.display=="block"?(i.style.display="none",sessionStorage.setItem(n+"",$("#"+n).css("display")),document.getElementById(t)&&(sessionStorage.setItem(t+"","false"),r.classList.remove("testArrow"))):(i.style.display="block",sessionStorage.setItem(n+"",$("#"+n).css("display")),document.getElementById(t)&&(sessionStorage.setItem(t+"","false"),r.classList.add("testArrow")))}},sessionStorage.getItem("MarqueProductFilter")&&($("#MarqueProductFilter").css("display",""+sessionStorage.getItem("MarqueProductFilter")),sessionStorage.getItem("MarqueProductFilter")=="none"?$("#TriAngleMarque").addClass("testArrow"):$("#TriAngleMarque").removeClass("testArrow")));i=="error"})}function GetDisponibility(n){$("#waitXhrDisponibil").show();$("#XhrDisponibil").hide();$CenterFilter=$("#FilterDispo");$CenterFilter.load(encodeURI("/FilterDispos.aspx?"+n.replace(/%2c/g,",").replace(/%252c/g,",")+"&rand="+Math.random()),function(n,t){t=="success"&&($("#waitXhrDisponibil").fadeOut("slow"),$("#XhrDisponibil").show(),Affiche=function(n,t){if(document.getElementById(n)){var r=document.getElementById(t),i=document.getElementById(n);i.style.display=="block"?(i.style.display="none",sessionStorage.setItem(n+"",$("#"+n).css("display")),document.getElementById(t)&&(sessionStorage.setItem(t+"","false"),r.classList.remove("testArrow"))):(i.style.display="block",sessionStorage.setItem(n+"",$("#"+n).css("display")),document.getElementById(t)&&(sessionStorage.setItem(t+"","false"),r.classList.add("testArrow")))}},sessionStorage.getItem("DisponibilFilter")&&($("#DisponibilFilter").css("display",""+sessionStorage.getItem("DisponibilFilter")),sessionStorage.getItem("DisponibilFilter")=="none"?$("#TriAngleDisponibil").addClass("testArrow"):$("#TriAngleDisponibil").removeClass("testArrow")));t=="error"})}function GetOffres(n){var t="",i="";$('#UniversProductFilter > tbody  > tr  > td > input[type="checkbox"]:checked').each(function(){t+=$(this).val()+","});UrlRedirectOption===!1?i=t.substring(0,t.length-1):(GetURLParameter("discount")==="X"&&(t+="discount,"),GetURLParameter("Incont")==="X"&&(t+="Incont,"),GetURLParameter("news")==="X"&&(t+="news,"),GetURLParameter("rebates")==="X"&&(t+="rebates,"),GetURLParameter("Offres_du_moment")==="X"&&(t+="Offres_du_moment,"),GetURLParameter("offres_du_moment")==="X"&&(t+="Offres_du_moment,"),GetURLParameter("CpCoeur")==="X"&&(t+="CpCoeur,"),i=t.substring(0,t.length-1));$("#waitXhrOffre").show();$("#XhrOffre").hide();$CenterFilter=$("#XhrOffre");let r=document.getElementById("MainPanel_Contexte")?"&contextsession="+document.getElementById("MainPanel_Contexte").value+"":"";$CenterFilter.load(encodeURI("/XhrOffre.aspx?Offre="+i+r+"&rand="+Math.random()),function(t,i){i=="success"&&($("#waitXhrOffre").fadeOut("slow"),$("#XhrOffre").show(),Multifacette(n),$("#MarqueProductFilter").find("input[type=checkbox]").each(function(){document.getElementById("span"+$(this).val()).innerHTML=="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden")}),$("#CollectionProductFilter").find("input[type=checkbox]").each(function(){document.getElementById("span"+$(this).val()).innerHTML=="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden")}),Affiche=function(n,t){var i,r;document.getElementById(n)&&(i=document.getElementById(n),i.style.display=="block"?(i.style.display="none",sessionStorage.setItem(n+"",$("#"+n).css("display"))):(i.style.display="block",sessionStorage.setItem(n+"",$("#"+n).css("display"))),r=document.getElementById(t),i=document.getElementById(n),i.style.display=="block"?document.getElementById(t)&&(r.classList.remove("testArrow"),sessionStorage.setItem(t+"","false")):document.getElementById(t)&&(r.classList.add("testArrow"),sessionStorage.setItem(t+"","true")))},sessionStorage.getItem("UniversDiv")&&($("#UniversDiv").css("display",""+sessionStorage.getItem("UniversDiv")),sessionStorage.getItem("UniversDiv")=="none"?$("#TriAngleUniver").addClass("testArrow"):$("#TriAngleUniver").removeClass("testArrow")))})}function GetCollection(n){var i="",r="",t="",u="";if(n.toLowerCase().indexOf("fam1")>=0&&(i=GetParametreFromStr("fam1","/ArticleFacette.aspx?"+n.toLowerCase())),n.toLowerCase().indexOf("fam2")>=0&&(r=GetParametreFromStr("fam2","/ArticleFacette.aspx?"+n.toLowerCase())),n.toLowerCase().indexOf("fam3")>=0&&(t=GetParametreFromStr("fam3","/ArticleFacette.aspx?"+n.toLowerCase())),n.toLowerCase().indexOf("col")>=0&&(u=GetParametreFromStr("col","/ArticleFacette.aspx?"+n.toLowerCase())),t!=""){let f=document.getElementById("MainPanel_Contexte")?"&contextsession="+document.getElementById("MainPanel_Contexte").value+"":"";$collectionXhr=$("#collectionXhr");$collectionXhr.load(encodeURI("/collectionXhr.aspx?Fam1="+i+"&Fam2="+r+"&Fam3="+t+"&Col="+u+"&rand="+Math.random()+f),function(t,i){i=="success"&&(Multifacette(n),$("#MarqueProductFilter").find("input[type=checkbox]").each(function(){document.getElementById("span"+$(this).val()).innerHTML=="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden")}),$("#CollectionProductFilter").find("input[type=checkbox]").each(function(){document.getElementById("span"+$(this).val()).innerHTML=="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden")}),Affiche=function(n,t){var i,r;document.getElementById(n)&&(i=document.getElementById(n),i.style.display=="block"?(i.style.display="none",sessionStorage.setItem(n+"",$("#"+n).css("display"))):(i.style.display="block",sessionStorage.setItem(n+"",$("#"+n).css("display"))),r=document.getElementById(t),i.style.display=="block"?document.getElementById(t)&&(r.classList.remove("testArrow"),sessionStorage.setItem(t+"","false")):document.getElementById(t)&&(r.classList.add("testArrow"),sessionStorage.setItem(t+"","true")))},sessionStorage.getItem("CollectionDiv")&&($("#CollectionDiv").css("display",""+sessionStorage.getItem("CollectionDiv")),sessionStorage.getItem("CollectionDiv")=="none"?$("#TriAngleCollection").addClass("testArrow"):$("#TriAngleCollection").removeClass("testArrow")))})}}function SupprimerFiltre(){var t,n,i,u,r;confirm("Supprimer tous les filtres ?")==!0&&(sessionStorage.getItem("FacetteSelected")&&sessionStorage.removeItem("FacetteSelected"),document.getElementById("MainPanel_FirstURL").value!=""?(t=new URL(""+document.getElementById("MainPanel_FirstURL").value),n=new URLSearchParams(t.search.slice(1)),n.delete("Col"),n.delete("col"),n.delete("Discount"),n.delete("Col"),n.delete("col"),n.delete("news"),n.delete("News"),n.delete("CpCoeur"),n.delete("rebates"),n.delete("Incont"),n.delete("discount"),n.delete("Discount"),n.delete("Offres_du_moment"),n.delete("offres_du_moment"),n.delete("PriceMin"),n.delete("PriceMax"),n.delete("texte"),i="",n.forEach(function(n,t){t.includes("Z_")==!1&&t.includes("ZFB_")==!1&&t.includes("ZFV_")==!1&&t.includes("Col")==!1&&t.includes("col")==!1&&t.includes("Discount")==!1&&t.includes("Search")==!1&&t.includes("Col")==!1&&t.includes("col")==!1&&t.includes("news")==!1&&t.includes("News")==!1&&t.includes("CpCoeur")==!1&&t.includes("rebates")==!1&&t.includes("Incont")==!1&&t.includes("discount")==!1&&t.includes("Discount")==!1&&t.includes("Offres_du_moment")==!1&&t.includes("offres_du_moment")==!1&&t.includes("PriceMin")==!1&&t.includes("PriceMax")==!1&&t.includes("texte")==!1&&(i+=t+"="+n+"&")}),u=i.substring(0,i.length-1),location.href=t.origin+""+t.pathname+"?"+u.replace("#","%23")):($("#MarqueProductFilter").find("input[type=checkbox]").each(function(){$(this).attr("unchecked",!0)}),$("#CollectionProductFilter").find("input[type=checkbox]").each(function(){$(this).attr("unchecked",!0)}),$("#UniversDiv").find("input[type=checkbox]").each(function(){$(this).attr("unchecked",!0)}),r="",GetURLParameter("Search")!=""&&(r+="&Search="+GetURLParameter("Search").replace("+"," ")),GetURLParameter("Des")!=""&&(r+="&Des="+GetURLParameter("Des")),family="&fam1="+GetURLParameter("fam1")+"&Fam2="+GetURLParameter("fam2")+"&Fam3="+GetURLParameter("fam3")+r.replace("#","%23"),GetFam(family+marquepres+EtUniv+CollectionFiltre+IschangePrice,family,marquepres,EtUniv,CollectionFiltre,IschangePrice,!0)))}function GetFacetteMultiple(n){var t;if($("#waitFacetteArticle").show(),$("#FacetteArticle").hide(),$CentreArticleFacette=$("#FacetteArticle"),t="",GetURLParameter("Search")!=""&&GetURLParameter("fam1")==""&&GetURLParameter("fam2")==""&&GetURLParameter("fam3")==""&&GetURLParameter("Col")==""){var i=new URL(""+document.getElementById("MainPanel_FirstURL").value),r=GetParametreFromStr("fam1",i),u=GetParametreFromStr("fam2",i),f=GetParametreFromStr("fam3",i),e=GetParametreFromStr("Col",i);r!==""&&(t+="&fam1="+r);u!==""&&(t+="&fam2="+u);f!==""&&(t+="&fam3="+f);e!==""&&(t+="&Col="+e);console.log(t)}t=n+t;$CentreArticleFacette.load(encodeURI("/FacetteArticleXhr.aspx?"+t+"&rand="+Math.random()),function(t,i){i=="success"&&($("#waitFacetteArticle").fadeOut("slow"),$("#FacetteArticle").show(),Multifacette(n),$("#ArticleProductFilter").find("input[type=checkbox]").not(":checked").each(function(){document.getElementById("span"+$(this).val()).innerHTML=="(0)"&&(document.getElementById("span"+$(this).val()).style.visibility="hidden")}),Affiche=function(n,t){if(document.getElementById(n)){var r=document.getElementById(t),i=document.getElementById(n);i.style.display=="block"?(i.style.display="none",sessionStorage.setItem(n+"",$("#"+n).css("display")),document.getElementById(t)&&(sessionStorage.setItem(t+"","false"),r.classList.remove("testArrow"))):(i.style.display="block",sessionStorage.setItem(n+"",$("#"+n).css("display")),document.getElementById(t)&&(sessionStorage.setItem(t+"","false"),r.classList.add("testArrow")))}},RecallAjax());i=="error"})}function chargeImgMArq(){$("#EspaceMarque").find("a").each(function(){$(this).mouseover(function(){var n,t;$("[id^=Marquover]").hide();n=$(this).attr("href");n!==undefined&&(t=n.replace("/page-marque.aspx?Brand=",""),n.indexOf("javascript:chargeMarque")==-1==!0&&(TempoMarque=300,$("#Marquover"+t).show()))});$(this).mouseleave(function(){$("[id^=Marquover]").hide();TempoMarque=0;clearTimeout(menutimeMarq)})})}function chargeMarque(n){$("[id^=RepeaterMArqueAll]").hide();$("#RepeaterMArqueAll"+n).show()}function chargeMarqueStart(n){var t;clearTimeout(t);t=setTimeout(function(){var t=$(".marquetrescolumnchange");t.load(encodeURI("/MArqueAZ.aspx?MArq="+n),function(n,t){t==="success"&&chargeImgMArq()})},1e3)}function chargeMarquePageOver(n){$("[id^=Pagemarquediv]").hide();$("#Pagemarquediv"+n).show()}function chargeMarquePage(n){var t=$(".marquetrescolumnchangePage");t.load(encodeURI("/MarqueHRpage.aspx?MArq="+n+"&page=1"),function(n,t){t=="success"&&chargeImgMArqPage()})}function chargeImgMArqPage(){$("#EspaceMarquePage").find("a").each(function(){$(this).mouseover(function(){var n,t;$("[id^=PageMarquover]").hide();n=$(this).attr("href");n!==undefined&&(t=n.replace("/page-marque.aspx?Brand=",""),n.indexOf("javascript:chargeMarquePage")==-1==!0&&$("#PageMarquover"+t).show())});$(this).mouseleave(function(){$("[id^=PageMarquover]").hide()})})}function getCookies(n){let t=n+"=",r=decodeURIComponent(document.cookie),i=r.split(";");for(let n=0;n<i.length;n++){let r=i[n];while(r.charAt(0)==" ")r=r.substring(1);if(r.indexOf(t)==0)return r.substring(t.length,r.length)}return""}function PrintPreview(){var n=$('span[id*="lblCont"]').html();printWindow=window.open("","","location=1,status=1,scrollbars=1,width=650,height=600");printWindow.document.write("<html><head>");printWindow.document.write('<style type="text/css">@media print{.no-print, .no-print *{display: none !important;}<\/style>');printWindow.document.write("<\/head><body>");printWindow.document.write('<div style="width:100%;text-align:right">');printWindow.document.write('<input type="button" id="btnPrint" value="Print" class="no-print" style="width:100px" onclick="window.print()" />');printWindow.document.write('<input type="button" id="btnCancel" value="Cancel" class="no-print"  style="width:100px" onclick="window.close()" />');printWindow.document.write("<\/div>");printWindow.document.write("<table><tr><td>Contractor name:"+n+"<\/td><\/tr>you can include any info here<\/table");printWindow.document.write(document.getElementById("forPrintPreview").innerHTML);printWindow.document.write("<\/body><\/html>");printWindow.document.close();printWindow.focus()}function removeDuplicate(n){var i,f,u,t;n=decodeURIComponent("?"+n);var o=n.split("?")[1],e=o.split("&"),r={};for(t=0;t<e.length;t++)(i=e[t].split("="),i[0])&&(f=i[1]||!0,r[i[0]]&&r[i[0]].indexOf(f)?r[i[0]].push(f):r[i[0]]=[f]);for(n=n.split("?")[0]+"?",u=Object.keys(r),t=0;t<u.length;t++)n+=u[t]+"="+r[u[0]].join("+"),t!==u.length-1&&(n+="&");return n!="?"?n.replace("?","&").split("+")[0]:""}function openNav(){if(getWidth()>450)if(document.getElementById("IdListDrap").style.width!="390px"){document.getElementById("drapeaux").width="390";document.getElementById("IdListDrap").style.width="390px";let n="fr";n=document.getElementById("lang").value;window.open("/Drapeaux.aspx?lang="+n+"","drapeaux")}else closeNav();else if(getWidth()>=390){document.getElementById("drapeaux").width="390";let n=document.querySelector(".closebtn");portrait.onchange=t=>{n.style.marginTop=t.matches?"15px":"26px"};let t="fr";document.getElementById("IdListDrap").style.width="390px";t=document.getElementById("lang").value;window.open("/Drapeaux.aspx?lang="+t+"","drapeaux")}else{let n=document.querySelector(".closebtn");portrait.onchange=t=>{n.style.marginTop=t.matches?"15px":"26px"};document.getElementById("drapeaux").width="320";let t="fr";document.getElementById("IdListDrap").style.width="320px";t=document.getElementById("lang").value;window.open("/Drapeaux.aspx?lang="+t+"","drapeaux")}}function closeNav(){document.getElementById("IdListDrap").style.width="0"}function detectMob(){return[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(n=>navigator.userAgent.match(n))}var test="",menuTOP,sQuickCommandeResponse,menutime,timetempo,Basketime,Large,TimeISearch,TimeLight,control,positionElementInPage,PosInScrollTop,family,famille1,Intnumber,DivDisponibilite,objSelect,Affiche,TempoMarque,menutimeMarq,TempoMarquePage,menutimeMarqPage,elementsInput,recognition;(function(n,t){typeof define=="function"&&define.amd?define(["jquery"],function(n){return t(n)}):typeof exports=="object"?module.exports=t(require("jquery")):t(jQuery)})(this,function(n){function s(n){this.$container;this.constraints=null;this.__$tooltip;this.__init(n)}function e(t,i){var r=!0;return n.each(t,function(n){if(i[n]===undefined||t[n]!==i[n])return r=!1,!1}),r}function r(i){var r=i.attr("id"),u=r?t.window.document.getElementById(r):null;return u?u===i[0]:n.contains(t.window.document.body,i[0])}function c(){var t;if(!i)return!1;var f=i.document.body||i.document.documentElement,r=f.style,n="transition",u=["Moz","Webkit","Khtml","O","ms"];if(typeof r[n]=="string")return!0;for(n=n.charAt(0).toUpperCase()+n.substr(1),t=0;t<u.length;t++)if(typeof r[u[t]+n]=="string")return!0;return!1}var u={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!1,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},i=typeof window!="undefined"?window:null,t={hasTouchCapability:!!(i&&("ontouchstart"in i||i.DocumentTouch&&i.document instanceof i.DocumentTouch||i.navigator.maxTouchPoints)),hasTransitions:c(),IE:!1,semVer:"4.2.5",window:i},h=function(){this.__$emitterPrivate=n({});this.__$emitterPublic=n({});this.__instancesLatestArr=[];this.__plugins={};this._env=t},f,o;return h.prototype={__bridge:function(t,i,r){var e,f;return i[r]||(e=function(){},e.prototype=t,f=new e,f.__init&&f.__init(i),n.each(t,function(n){n.indexOf("__")!=0&&(i[n]?u.debug&&console.log("The "+n+" method of the "+r+" plugin conflicts with another plugin or native methods"):(i[n]=function(){return f[n].apply(f,Array.prototype.slice.apply(arguments))},i[n].bridged=f))}),i[r]=f),this},__setWindow:function(n){return t.window=n,this},_getRuler:function(n){return new s(n)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(t){var i=this,r,u;if(typeof t=="string")return r=t,u=null,r.indexOf(".")>0?u=i.__plugins[r]:n.each(i.__plugins,function(n,t){if(t.name.substring(t.name.length-r.length-1)=="."+r)return u=t,!1}),u;if(t.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return i.__plugins[t.name]=t,t.core&&i.__bridge(t.core,i,t.name),this},_trigger:function(){var n=Array.prototype.slice.apply(arguments);return typeof n[0]=="string"&&(n[0]={type:n[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,n),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,n),this},instances:function(t){var i=[],r=t||".tooltipstered";return n(r).each(function(){var t=n(this),r=t.data("tooltipster-ns");r&&n.each(r,function(n,r){i.push(t.data(r))})}),i},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(t){var i=t?t+" ":"";return n(i+".tooltipstered").toArray()},setDefaults:function(t){return n.extend(u,t),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},n.tooltipster=new h,n.Tooltipster=function(t,i){this.__callbacks={close:[],open:[]};this.__closingTime;this.__Content;this.__contentBcr;this.__destroyed=!1;this.__$emitterPrivate=n({});this.__$emitterPublic=n({});this.__enabled=!0;this.__garbageCollector;this.__Geometry;this.__lastPosition;this.__namespace="tooltipster-"+Math.round(Math.random()*1e6);this.__options;this.__$originParents;this.__pointerIsOverOrigin=!1;this.__previousThemes=[];this.__state="closed";this.__timeouts={close:[],open:null};this.__touchEvents=[];this.__tracker=null;this._$origin;this._$tooltip;this.__init(t,i)},n.Tooltipster.prototype={__init:function(i,r){var f=this,e,s,o;if(f._$origin=n(i),f.__options=n.extend(!0,{},u,r),f.__optionsFormat(),!t.IE||t.IE>=f.__options.IEmin){if(e=null,f._$origin.data("tooltipster-initialTitle")===undefined&&(e=f._$origin.attr("title"),e===undefined&&(e=null),f._$origin.data("tooltipster-initialTitle",e)),f.__options.content!==null?f.__contentSet(f.__options.content):(s=f._$origin.attr("data-tooltip-content"),s&&(o=n(s)),o&&o[0]?f.__contentSet(o.first()):f.__contentSet(e)),f._$origin.removeAttr("title").addClass("tooltipstered"),f.__prepareOrigin(),f.__prepareGC(),n.each(f.__options.plugins,function(n,t){f._plug(t)}),t.hasTouchCapability)n(t.window.document.body).on("touchmove."+f.__namespace+"-triggerOpen",function(n){f._touchRecordEvent(n)});f._on("created",function(){f.__prepareTooltip()})._on("repositioned",function(n){f.__lastPosition=n.position})}else f.__options.disabled=!0},__contentInsert:function(){var n=this,i=n._$tooltip.find(".tooltipster-content"),t=n.__Content,r=function(n){t=n};return n._trigger({type:"format",content:n.__Content,format:r}),n.__options.functionFormat&&(t=n.__options.functionFormat.call(n,n,{origin:n._$origin[0]},n.__Content)),typeof t!="string"||n.__options.contentAsHTML?i.empty().append(t):i.text(t),n},__contentSet:function(t){return t instanceof n&&this.__options.contentCloning&&(t=t.clone(!0)),this.__Content=t,this._trigger({type:"updated",content:t}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.");},__geometry:function(){var e=this,c=e._$origin,y=e._$origin.is("area"),k,p,r,o,u,d;y&&(k=e._$origin.parent().attr("name"),c=n('img[usemap="#'+k+'"]'));var f=c[0].getBoundingClientRect(),g=n(t.window.document),nt=n(t.window),l=c,i={available:{document:null,window:null},document:{size:{height:g.height(),width:g.width()}},window:{scroll:{left:t.window.scrollX||t.window.document.documentElement.scrollLeft,top:t.window.scrollY||t.window.document.documentElement.scrollTop},size:{height:nt.height(),width:nt.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:y?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(y&&(p=e._$origin.attr("shape"),r=e._$origin.attr("coords"),r&&(r=r.split(","),n.map(r,function(n,t){r[t]=parseInt(n)})),p!="default"))switch(p){case"circle":var rt=r[0],ut=r[1],w=r[2],ft=ut-w,et=rt-w;i.origin.size.height=w*2;i.origin.size.width=i.origin.size.height;i.origin.windowOffset.left+=et;i.origin.windowOffset.top+=ft;break;case"rect":var tt=r[0],it=r[1],ot=r[2],st=r[3];i.origin.size.height=st-it;i.origin.size.width=ot-tt;i.origin.windowOffset.left+=tt;i.origin.windowOffset.top+=it;break;case"poly":var s=0,h=0,a=0,v=0,b="even";for(o=0;o<r.length;o++)u=r[o],b=="even"?(u>a&&(a=u,o===0&&(s=a)),u<s&&(s=u),b="odd"):(u>v&&(v=u,o==1&&(h=v)),u<h&&(h=u),b="even");i.origin.size.height=v-h;i.origin.size.width=a-s;i.origin.windowOffset.left+=s;i.origin.windowOffset.top+=h}for(d=function(n){i.origin.size.height=n.height;i.origin.windowOffset.left=n.left;i.origin.windowOffset.top=n.top;i.origin.size.width=n.width},e._trigger({type:"geometry",edit:d,geometry:{height:i.origin.size.height,left:i.origin.windowOffset.left,top:i.origin.windowOffset.top,width:i.origin.size.width}}),i.origin.windowOffset.right=i.origin.windowOffset.left+i.origin.size.width,i.origin.windowOffset.bottom=i.origin.windowOffset.top+i.origin.size.height,i.origin.offset.left=i.origin.windowOffset.left+i.window.scroll.left,i.origin.offset.top=i.origin.windowOffset.top+i.window.scroll.top,i.origin.offset.bottom=i.origin.offset.top+i.origin.size.height,i.origin.offset.right=i.origin.offset.left+i.origin.size.width,i.available.document={bottom:{height:i.document.size.height-i.origin.offset.bottom,width:i.document.size.width},left:{height:i.document.size.height,width:i.origin.offset.left},right:{height:i.document.size.height,width:i.document.size.width-i.origin.offset.right},top:{height:i.origin.offset.top,width:i.document.size.width}},i.available.window={bottom:{height:Math.max(i.window.size.height-Math.max(i.origin.windowOffset.bottom,0),0),width:i.window.size.width},left:{height:i.window.size.height,width:Math.max(i.origin.windowOffset.left,0)},right:{height:i.window.size.height,width:Math.max(i.window.size.width-Math.max(i.origin.windowOffset.right,0),0)},top:{height:Math.max(i.origin.windowOffset.top,0),width:i.window.size.width}};l[0].tagName.toLowerCase()!="html";){if(l.css("position")=="fixed"){i.origin.fixedLineage=!0;break}l=l.parent()}return i},__optionsFormat:function(){return typeof this.__options.animationDuration=="number"&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),typeof this.__options.delay=="number"&&(this.__options.delay=[this.__options.delay,this.__options.delay]),typeof this.__options.delayTouch=="number"&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),typeof this.__options.theme=="string"&&(this.__options.theme=[this.__options.theme]),this.__options.parent===null?this.__options.parent=n(t.window.document.body):typeof this.__options.parent=="string"&&(this.__options.parent=n(this.__options.parent)),this.__options.trigger=="hover"?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):this.__options.trigger=="click"&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var t=this;return t.__options.selfDestruction?t.__garbageCollector=setInterval(function(){var i=(new Date).getTime();t.__touchEvents=n.grep(t.__touchEvents,function(n){return i-n.time>6e4});r(t._$origin)||t.close(function(){t.destroy()})},2e4):clearInterval(t.__garbageCollector),t},__prepareOrigin:function(){var n=this,i;if(n._$origin.off("."+n.__namespace+"-triggerOpen"),t.hasTouchCapability)n._$origin.on("touchstart."+n.__namespace+"-triggerOpen touchend."+n.__namespace+"-triggerOpen touchcancel."+n.__namespace+"-triggerOpen",function(t){n._touchRecordEvent(t)});if(n.__options.triggerOpen.click||n.__options.triggerOpen.tap&&t.hasTouchCapability){i="";n.__options.triggerOpen.click&&(i+="click."+n.__namespace+"-triggerOpen ");n.__options.triggerOpen.tap&&t.hasTouchCapability&&(i+="touchend."+n.__namespace+"-triggerOpen");n._$origin.on(i,function(t){n._touchIsMeaningfulEvent(t)&&n._open(t)})}if(n.__options.triggerOpen.mouseenter||n.__options.triggerOpen.touchstart&&t.hasTouchCapability){i="";n.__options.triggerOpen.mouseenter&&(i+="mouseenter."+n.__namespace+"-triggerOpen ");n.__options.triggerOpen.touchstart&&t.hasTouchCapability&&(i+="touchstart."+n.__namespace+"-triggerOpen");n._$origin.on(i,function(t){(n._touchIsTouchEvent(t)||!n._touchIsEmulatedEvent(t))&&(n.__pointerIsOverOrigin=!0,n._openShortly(t))})}if(n.__options.triggerClose.mouseleave||n.__options.triggerClose.touchleave&&t.hasTouchCapability){i="";n.__options.triggerClose.mouseleave&&(i+="mouseleave."+n.__namespace+"-triggerOpen ");n.__options.triggerClose.touchleave&&t.hasTouchCapability&&(i+="touchend."+n.__namespace+"-triggerOpen touchcancel."+n.__namespace+"-triggerOpen");n._$origin.on(i,function(t){n._touchIsMeaningfulEvent(t)&&(n.__pointerIsOverOrigin=!1)})}return n},__prepareTooltip:function(){var t=this,i=t.__options.interactive?"auto":"";return t._$tooltip.attr("id",t.__namespace).css({"pointer-events":i,zIndex:t.__options.zIndex}),n.each(t.__previousThemes,function(n,i){t._$tooltip.removeClass(i)}),n.each(t.__options.theme,function(n,i){t._$tooltip.addClass(i)}),t.__previousThemes=n.merge([],t.__options.theme),t},__scrollHandler:function(i){var u=this,f,e,o,s;return u.__options.triggerClose.scroll?u._close(i):r(u._$origin)&&r(u._$tooltip)&&(f=null,i.target===t.window.document?u.__Geometry.origin.fixedLineage||u.__options.repositionOnScroll&&u.reposition(i):(f=u.__geometry(),e=!1,u._$origin.css("position")!="fixed"&&u.__$originParents.each(function(t,i){var u=n(i),o=u.css("overflow-x"),s=u.css("overflow-y"),r;return(o!="visible"||s!="visible")&&((r=i.getBoundingClientRect(),o!="visible"&&(f.origin.windowOffset.left<r.left||f.origin.windowOffset.right>r.right))||s!="visible"&&(f.origin.windowOffset.top<r.top||f.origin.windowOffset.bottom>r.bottom))?(e=!0,!1):u.css("position")=="fixed"?!1:void 0}),e?u._$tooltip.css("visibility","hidden"):(u._$tooltip.css("visibility","visible"),u.__options.repositionOnScroll?u.reposition(i):(o=f.origin.offset.left-u.__Geometry.origin.offset.left,s=f.origin.offset.top-u.__Geometry.origin.offset.top,u._$tooltip.css({left:u.__lastPosition.coord.left+o,top:u.__lastPosition.coord.top+s})))),u._trigger({type:"scroll",event:i,geo:f})),u},__stateSet:function(n){return this.__state=n,this._trigger({type:"state",state:n}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,n.each(this.__timeouts.close,function(n,t){clearTimeout(t)}),this.__timeouts.close=[],this},__trackerStart:function(){var n=this,t=n._$tooltip.find(".tooltipster-content");return n.__options.trackTooltip&&(n.__contentBcr=t[0].getBoundingClientRect()),n.__tracker=setInterval(function(){var i,u,f;r(n._$origin)&&r(n._$tooltip)?(n.__options.trackOrigin&&(i=n.__geometry(),u=!1,e(i.origin.size,n.__Geometry.origin.size)&&(n.__Geometry.origin.fixedLineage?e(i.origin.windowOffset,n.__Geometry.origin.windowOffset)&&(u=!0):e(i.origin.offset,n.__Geometry.origin.offset)&&(u=!0)),u||(n.__options.triggerClose.mouseleave?n._close():n.reposition())),n.__options.trackTooltip&&(f=t[0].getBoundingClientRect(),(f.height!==n.__contentBcr.height||f.width!==n.__contentBcr.width)&&(n.reposition(),n.__contentBcr=f))):n._close()},n.__options.trackerInterval),n},_close:function(i,r,u){var f=this,s=!0,e,o;if(f._trigger({type:"close",event:i,stop:function(){s=!1}}),s||u)if(r&&f.__callbacks.close.push(r),f.__callbacks.open=[],f.__timeoutsClear(),e=function(){n.each(f.__callbacks.close,function(n,t){t.call(f,f,{event:i,origin:f._$origin[0]})});f.__callbacks.close=[]},f.__state!="closed"){var h=!0,l=new Date,a=l.getTime(),c=a+f.__options.animationDuration[1];f.__state=="disappearing"&&c>f.__closingTime&&f.__options.animationDuration[1]>0&&(h=!1);h&&(f.__closingTime=c,f.__state!="disappearing"&&f.__stateSet("disappearing"),o=function(){clearInterval(f.__tracker);f._trigger({type:"closing",event:i});f._$tooltip.off("."+f.__namespace+"-triggerClose").removeClass("tooltipster-dying");n(t.window).off("."+f.__namespace+"-triggerClose");f.__$originParents.each(function(t,i){n(i).off("scroll."+f.__namespace+"-triggerClose")});f.__$originParents=null;n(t.window.document.body).off("."+f.__namespace+"-triggerClose");f._$origin.off("."+f.__namespace+"-triggerClose");f._off("dismissable");f.__stateSet("closed");f._trigger({type:"after",event:i});f.__options.functionAfter&&f.__options.functionAfter.call(f,f,{event:i,origin:f._$origin[0]});e()},t.hasTransitions?(f._$tooltip.css({"-moz-animation-duration":f.__options.animationDuration[1]+"ms","-ms-animation-duration":f.__options.animationDuration[1]+"ms","-o-animation-duration":f.__options.animationDuration[1]+"ms","-webkit-animation-duration":f.__options.animationDuration[1]+"ms","animation-duration":f.__options.animationDuration[1]+"ms","transition-duration":f.__options.animationDuration[1]+"ms"}),f._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),f.__options.animationDuration[1]>0&&f._$tooltip.delay(f.__options.animationDuration[1]),f._$tooltip.queue(o)):f._$tooltip.stop().fadeOut(f.__options.animationDuration[1],o))}else e();return f},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(i,u){var f=this,o,h,e,s;if(!f.__destroying&&r(f._$origin)&&f.__enabled&&(o=!0,f.__state=="closed"&&(f._trigger({type:"before",event:i,stop:function(){o=!1}}),o&&f.__options.functionBefore&&(o=f.__options.functionBefore.call(f,f,{event:i,origin:f._$origin[0]}))),o!==!1&&f.__Content!==null)){if(u&&f.__callbacks.open.push(u),f.__callbacks.close=[],f.__timeoutsClear(),e=function(){f.__state!="stable"&&f.__stateSet("stable");n.each(f.__callbacks.open,function(n,t){t.call(f,f,{origin:f._$origin[0],tooltip:f._$tooltip[0]})});f.__callbacks.open=[]},f.__state!=="closed")h=0,f.__state==="disappearing"?(f.__stateSet("appearing"),t.hasTransitions?(f._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),f.__options.animationDuration[0]>0&&f._$tooltip.delay(f.__options.animationDuration[0]),f._$tooltip.queue(e)):f._$tooltip.stop().fadeIn(e)):f.__state=="stable"&&e();else{f.__stateSet("appearing");h=f.__options.animationDuration[0];f.__contentInsert();f.reposition(i,!0);t.hasTransitions?(f._$tooltip.addClass("tooltipster-"+f.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":f.__options.animationDuration[0]+"ms","-ms-animation-duration":f.__options.animationDuration[0]+"ms","-o-animation-duration":f.__options.animationDuration[0]+"ms","-webkit-animation-duration":f.__options.animationDuration[0]+"ms","animation-duration":f.__options.animationDuration[0]+"ms","transition-duration":f.__options.animationDuration[0]+"ms"}),setTimeout(function(){f.__state!="closed"&&(f._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),f.__options.animationDuration[0]>0&&f._$tooltip.delay(f.__options.animationDuration[0]),f._$tooltip.queue(e))},0)):f._$tooltip.css("display","none").fadeIn(f.__options.animationDuration[0],e);f.__trackerStart();n(t.window).on("resize."+f.__namespace+"-triggerClose",function(t){var i=n(document.activeElement);(i.is("input")||i.is("textarea"))&&n.contains(f._$tooltip[0],i[0])||f.reposition(t)}).on("scroll."+f.__namespace+"-triggerClose",function(n){f.__scrollHandler(n)});if(f.__$originParents=f._$origin.parents(),f.__$originParents.each(function(t,i){n(i).on("scroll."+f.__namespace+"-triggerClose",function(n){f.__scrollHandler(n)})}),f.__options.triggerClose.mouseleave||f.__options.triggerClose.touchleave&&t.hasTouchCapability){f._on("dismissable",function(n){n.dismissable?n.delay?(s=setTimeout(function(){f._close(n.event)},n.delay),f.__timeouts.close.push(s)):f._close(n):clearTimeout(s)});var c=f._$origin,l="",a="",s=null;f.__options.interactive&&(c=c.add(f._$tooltip));f.__options.triggerClose.mouseleave&&(l+="mouseenter."+f.__namespace+"-triggerClose ",a+="mouseleave."+f.__namespace+"-triggerClose ");f.__options.triggerClose.touchleave&&t.hasTouchCapability&&(l+="touchstart."+f.__namespace+"-triggerClose",a+="touchend."+f.__namespace+"-triggerClose touchcancel."+f.__namespace+"-triggerClose");c.on(a,function(n){if(f._touchIsTouchEvent(n)||!f._touchIsEmulatedEvent(n)){var t=n.type=="mouseleave"?f.__options.delay:f.__options.delayTouch;f._trigger({delay:t[1],dismissable:!0,event:n,type:"dismissable"})}}).on(l,function(n){(f._touchIsTouchEvent(n)||!f._touchIsEmulatedEvent(n))&&f._trigger({dismissable:!1,event:n,type:"dismissable"})})}if(f.__options.triggerClose.originClick)f._$origin.on("click."+f.__namespace+"-triggerClose",function(n){f._touchIsTouchEvent(n)||f._touchIsEmulatedEvent(n)||f._close(n)});(f.__options.triggerClose.click||f.__options.triggerClose.tap&&t.hasTouchCapability)&&setTimeout(function(){if(f.__state!="closed"){var i="",r=n(t.window.document.body);f.__options.triggerClose.click&&(i+="click."+f.__namespace+"-triggerClose ");f.__options.triggerClose.tap&&t.hasTouchCapability&&(i+="touchend."+f.__namespace+"-triggerClose");r.on(i,function(t){f._touchIsMeaningfulEvent(t)&&(f._touchRecordEvent(t),f.__options.interactive&&n.contains(f._$tooltip[0],t.target)||f._close(t))});if(f.__options.triggerClose.tap&&t.hasTouchCapability)r.on("touchstart."+f.__namespace+"-triggerClose",function(n){f._touchRecordEvent(n)})}},0);f._trigger("ready");f.__options.functionReady&&f.__options.functionReady.call(f,f,{origin:f._$origin[0],tooltip:f._$tooltip[0]})}f.__options.timer>0&&(s=setTimeout(function(){f._close()},f.__options.timer+h),f.__timeouts.close.push(s))}return f},_openShortly:function(n){var t=this,r=!0,i;return t.__state!="stable"&&t.__state!="appearing"&&(t.__timeouts.open||(t._trigger({type:"start",event:n,stop:function(){r=!1}}),r&&(i=n.type.indexOf("touch")==0?t.__options.delayTouch:t.__options.delay,i[0]?t.__timeouts.open=setTimeout(function(){t.__timeouts.open=null;t.__pointerIsOverOrigin&&t._touchIsMeaningfulEvent(n)?(t._trigger("startend"),t._open(n)):t._trigger("startcancel")},i[0]):(t._trigger("startend"),t._open(n))))),t},_optionsExtract:function(t,i){var f=this,u=n.extend(!0,{},i),r=f.__options[t];return r||(r={},n.each(i,function(n){var t=f.__options[n];t!==undefined&&(r[n]=t)})),n.each(u,function(t,i){r[t]!==undefined&&(typeof i!="object"||i instanceof Array||i==null||typeof r[t]!="object"||r[t]instanceof Array||r[t]==null?u[t]=r[t]:n.extend(u[t],r[t]))}),u},_plug:function(t){var i=n.tooltipster._plugin(t);if(i)i.instance&&n.tooltipster.__bridge(i.instance,this,i.name);else throw new Error('The "'+t+'" plugin is not defined');return this},_touchIsEmulatedEvent:function(n){for(var t,r=!1,u=(new Date).getTime(),i=this.__touchEvents.length-1;i>=0;i--)if(t=this.__touchEvents[i],u-t.time<500)t.target===n.target&&(r=!0);else break;return r},_touchIsMeaningfulEvent:function(n){return this._touchIsTouchEvent(n)&&!this._touchSwiped(n.target)||!this._touchIsTouchEvent(n)&&!this._touchIsEmulatedEvent(n)},_touchIsTouchEvent:function(n){return n.type.indexOf("touch")==0},_touchRecordEvent:function(n){return this._touchIsTouchEvent(n)&&(n.time=(new Date).getTime(),this.__touchEvents.push(n)),this},_touchSwiped:function(n){for(var t,r=!1,i=this.__touchEvents.length-1;i>=0;i--)if(t=this.__touchEvents[i],t.type=="touchmove"){r=!0;break}else if(t.type=="touchstart"&&n===t.target)break;return r},_trigger:function(){var t=Array.prototype.slice.apply(arguments);return typeof t[0]=="string"&&(t[0]={type:t[0]}),t[0].instance=this,t[0].origin=this._$origin?this._$origin[0]:null,t[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,t),n.tooltipster._trigger.apply(n.tooltipster,t),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,t),this},_unplug:function(t){var i=this,r;return i[t]&&(r=n.tooltipster._plugin(t),r.instance&&n.each(r.instance,function(n){i[n]&&i[n].bridged===i[t]&&delete i[n]}),i[t].__destroy&&i[t].__destroy(),delete i[t]),i},close:function(n){return this.__destroyed?this.__destroyError():this._close(null,n),this},content:function(n){var i=this,r;return n===undefined?i.__Content:(i.__destroyed?i.__destroyError():(i.__contentSet(n),i.__Content!==null?i.__state!=="closed"&&(i.__contentInsert(),i.reposition(),i.__options.updateAnimation&&(t.hasTransitions?(r=i.__options.updateAnimation,i._$tooltip.addClass("tooltipster-update-"+r),setTimeout(function(){i.__state!="closed"&&i._$tooltip.removeClass("tooltipster-update-"+r)},1e3)):i._$tooltip.fadeTo(200,.5,function(){i.__state!="closed"&&i._$tooltip.fadeTo(200,1)}))):i._close()),i)},destroy:function(){var i=this,r,u;return i.__destroyed?i.__destroyError():(i.__state!="closed"?i.option("animationDuration",0)._close(null,null,!0):i.__timeoutsClear(),i._trigger("destroy"),i.__destroyed=!0,i._$origin.removeData(i.__namespace).off("."+i.__namespace+"-triggerOpen"),n(t.window.document.body).off("."+i.__namespace+"-triggerOpen"),r=i._$origin.data("tooltipster-ns"),r&&(r.length===1?(u=null,i.__options.restoration=="previous"?u=i._$origin.data("tooltipster-initialTitle"):i.__options.restoration=="current"&&(u=typeof i.__Content=="string"?i.__Content:n("<div><\/div>").append(i.__Content).html()),u&&i._$origin.attr("title",u),i._$origin.removeClass("tooltipstered"),i._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")):(r=n.grep(r,function(n){return n!==i.__namespace}),i._$origin.data("tooltipster-ns",r))),i._trigger("destroyed"),i._off(),i.off(),i.__Content=null,i.__$emitterPrivate=null,i.__$emitterPublic=null,i.__options.parent=null,i._$origin=null,i._$tooltip=null,n.tooltipster.__instancesLatestArr=n.grep(n.tooltipster.__instancesLatestArr,function(n){return i!==n}),clearInterval(i.__garbageCollector)),i},disable:function(){if(this.__destroyed)this.__destroyError();else return this._close(),this.__enabled=!1,this;return this},elementOrigin:function(){if(this.__destroyed)this.__destroyError();else return this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(n){return this.close(n)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(n){return this.__destroyed?this.__destroyError():this._open(null,n),this},option:function(t,i){return i===undefined?this.__options[t]:(this.__destroyed?this.__destroyError():(this.__options[t]=i,this.__optionsFormat(),n.inArray(t,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),t==="selfDestruction"&&this.__prepareGC()),this)},reposition:function(n,t){var i=this;return i.__destroyed?i.__destroyError():i.__state!="closed"&&r(i._$origin)&&(t||r(i._$tooltip))&&(t||i._$tooltip.detach(),i.__Geometry=i.__geometry(),i._trigger({type:"reposition",event:n,helper:{geo:i.__Geometry}})),i},show:function(n){return this.open(n)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:this.__state!=="closed",state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},n.fn.tooltipster=function(){var t=Array.prototype.slice.apply(arguments),f="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.",i;if(this.length===0)return this;if(typeof t[0]=="string")return i="#*$~&",this.each(function(){var e=n(this).data("tooltipster-ns"),r=e?n(this).data(e[0]):null,u;if(r){if(typeof r[t[0]]=="function")this.length>1&&t[0]=="content"&&(t[1]instanceof n||typeof t[1]=="object"&&t[1]!=null&&t[1].tagName)&&!r.__options.contentCloning&&r.__options.debug&&console.log(f),u=r[t[0]](t[1],t[2]);else throw new Error('Unknown method "'+t[0]+'"');if(u!==r||t[0]==="instance")return i=u,!1}else throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element');}),i!=="#*$~&"?i:this;n.tooltipster.__instancesLatestArr=[];var e=t[0]&&t[0].multiple!==undefined,l=e&&t[0].multiple||!e&&u.multiple,o=t[0]&&t[0].content!==undefined,r=o&&t[0].content||!o&&u.content,s=t[0]&&t[0].contentCloning!==undefined,a=s&&t[0].contentCloning||!s&&u.contentCloning,h=t[0]&&t[0].debug!==undefined,c=h&&t[0].debug||!h&&u.debug;return this.length>1&&(r instanceof n||typeof r=="object"&&r!=null&&r.tagName)&&!a&&c&&console.log(f),this.each(function(){var u=!1,f=n(this),r=f.data("tooltipster-ns"),i=null;r?l?u=!0:c&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):u=!0;u&&(i=new n.Tooltipster(this,t[0]),r||(r=[]),r.push(i.__namespace),f.data("tooltipster-ns",r),f.data(i.__namespace,i),i.__options.functionInit&&i.__options.functionInit.call(i,i,{origin:this}),i._trigger("init"));n.tooltipster.__instancesLatestArr.push(i)}),this},s.prototype={__init:function(i){this.__$tooltip=i;this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto");this.$container=n('<div class="tooltipster-ruler"><\/div>').append(this.__$tooltip).appendTo(t.window.document.body)},__forceRedraw:function(){var n=this.__$tooltip.parent();this.__$tooltip.detach();this.__$tooltip.appendTo(n)},constrain:function(n,t){return this.constraints={width:n,height:t},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:n}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""});this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){var n,i;if(this.__forceRedraw(),n=this.__$tooltip[0].getBoundingClientRect(),i={size:{height:n.height||n.bottom-n.top,width:n.width||n.right-n.left}},this.constraints){var r=this.__$tooltip.find(".tooltipster-content"),f=this.__$tooltip.outerHeight(),e=r[0].getBoundingClientRect(),u={height:f<=this.constraints.height,width:n.width<=this.constraints.width&&e.width>=r[0].scrollWidth-1};i.fits=u.height&&u.width}return t.IE&&t.IE<=11&&i.size.width!==t.window.document.documentElement.clientWidth&&(i.size.width=Math.ceil(i.size.width)+1),i}},f=navigator.userAgent.toLowerCase(),f.indexOf("msie")!=-1?t.IE=parseInt(f.split("msie")[1]):f.toLowerCase().indexOf("trident")!==-1&&f.indexOf(" rv:11")!==-1?t.IE=11:f.toLowerCase().indexOf("edge/")!=-1&&(t.IE=parseInt(f.toLowerCase().split("edge/")[1])),o="tooltipster.sideTip",n.tooltipster._plugin({name:o,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(n){var t=this;t.__instance=n;t.__namespace="tooltipster-sideTip-"+Math.round(Math.random()*1e6);t.__previousState="closed";t.__options;t.__optionsFormat();t.__instance._on("state."+t.__namespace,function(n){n.state=="closed"?t.__close():n.state=="appearing"&&t.__previousState=="closed"&&t.__create();t.__previousState=n.state});t.__instance._on("options."+t.__namespace,function(){t.__optionsFormat()});t.__instance._on("reposition."+t.__namespace,function(n){t.__reposition(n.event,n.helper)})},__close:function(){this.__instance.content()instanceof n&&this.__instance.content().detach();this.__instance._$tooltip.remove();this.__instance._$tooltip=null},__create:function(){var t=n('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"><\/div><\/div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"><\/div><div class="tooltipster-arrow-background"><\/div><\/div><\/div><\/div>');this.__options.arrow||t.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide();this.__options.minWidth&&t.css("min-width",this.__options.minWidth+"px");this.__options.maxWidth&&t.css("max-width",this.__options.maxWidth+"px");this.__instance._$tooltip=t;this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var t=this,i;t.__options=t.__instance._optionsExtract(o,t.__defaults());t.__options.position&&(t.__options.side=t.__options.position);typeof t.__options.distance!="object"&&(t.__options.distance=[t.__options.distance]);t.__options.distance.length<4&&(t.__options.distance[1]===undefined&&(t.__options.distance[1]=t.__options.distance[0]),t.__options.distance[2]===undefined&&(t.__options.distance[2]=t.__options.distance[0]),t.__options.distance[3]===undefined&&(t.__options.distance[3]=t.__options.distance[1]),t.__options.distance={top:t.__options.distance[0],right:t.__options.distance[1],bottom:t.__options.distance[2],left:t.__options.distance[3]});typeof t.__options.side=="string"&&(i={top:"bottom",right:"left",bottom:"top",left:"right"},t.__options.side=[t.__options.side,i[t.__options.side]],t.__options.side[0]=="left"||t.__options.side[0]=="right"?t.__options.side.push("top","bottom"):t.__options.side.push("right","left"));n.tooltipster._env.IE===6&&t.__options.arrow!==!0&&(t.__options.arrow=!1)},__reposition:function(t,i){var u=this,r,p=u.__targetFind(i),e=[],c,l,f,h,a;u.__instance._$tooltip.detach();var o=u.__instance._$tooltip.clone(),v=n.tooltipster._getRuler(o),s=!1,y=u.__instance.option("animation");y&&o.removeClass("tooltipster-"+y);n.each(["window","document"],function(r,f){var l=null,r,c,h;if(u.__instance._trigger({container:f,helper:i,satisfied:s,takeTest:function(n){l=n},results:e,type:"positionTest"}),l==!0||l!=!1&&s==!1&&(f!="window"||u.__options.viewportAware))for(r=0;r<u.__options.side.length;r++)c={horizontal:0,vertical:0},h=u.__options.side[r],h=="top"||h=="bottom"?c.vertical=u.__options.distance[h]:c.horizontal=u.__options.distance[h],u.__sideChange(o,h),n.each(["natural","constrained"],function(n,r){if(l=null,u.__instance._trigger({container:f,event:t,helper:i,mode:r,results:e,satisfied:s,side:h,takeTest:function(n){l=n},type:"positionTest"}),l==!0||l!=!1&&s==!1){var o={container:f,distance:c,fits:null,mode:r,outerSize:null,side:h,size:null,target:p[h],whole:null},y=r=="natural"?v.free():v.constrain(i.geo.available[f][h].width-c.horizontal,i.geo.available[f][h].height-c.vertical),a=y.measure();if(o.size=a.size,o.outerSize={height:a.size.height+c.vertical,width:a.size.width+c.horizontal},o.fits=r=="natural"?i.geo.available[f][h].width>=o.outerSize.width&&i.geo.available[f][h].height>=o.outerSize.height?!0:!1:a.fits,f=="window"&&(o.whole=o.fits?h=="top"||h=="bottom"?i.geo.origin.windowOffset.right>=u.__options.minIntersection&&i.geo.window.size.width-i.geo.origin.windowOffset.left>=u.__options.minIntersection:i.geo.origin.windowOffset.bottom>=u.__options.minIntersection&&i.geo.window.size.height-i.geo.origin.windowOffset.top>=u.__options.minIntersection:!1),e.push(o),o.whole)s=!0;else if(o.mode=="natural"&&(o.fits||o.size.width<=i.geo.available[f][h].width))return!1}})});u.__instance._trigger({edit:function(n){e=n},event:t,helper:i,results:e,type:"positionTested"});e.sort(function(n,t){var i,r;return n.whole&&!t.whole?-1:!n.whole&&t.whole?1:n.whole&&t.whole?(i=u.__options.side.indexOf(n.side),r=u.__options.side.indexOf(t.side),i<r?-1:i>r?1:n.mode=="natural"?-1:1):n.fits&&!t.fits?-1:!n.fits&&t.fits?1:n.fits&&t.fits?(i=u.__options.side.indexOf(n.side),r=u.__options.side.indexOf(t.side),i<r?-1:i>r?1:n.mode=="natural"?-1:1):n.container=="document"&&n.side=="bottom"&&n.mode=="natural"?-1:1});r=e[0];r.coord={};switch(r.side){case"left":case"right":r.coord.top=Math.floor(r.target-r.size.height/2);break;case"bottom":case"top":r.coord.left=Math.floor(r.target-r.size.width/2)}switch(r.side){case"left":r.coord.left=i.geo.origin.windowOffset.left-r.outerSize.width;break;case"right":r.coord.left=i.geo.origin.windowOffset.right+r.distance.horizontal;break;case"top":r.coord.top=i.geo.origin.windowOffset.top-r.outerSize.height;break;case"bottom":r.coord.top=i.geo.origin.windowOffset.bottom+r.distance.vertical}r.container=="window"?r.side=="top"||r.side=="bottom"?r.coord.left<0?r.coord.left=i.geo.origin.windowOffset.right-this.__options.minIntersection>=0?0:i.geo.origin.windowOffset.right-this.__options.minIntersection-1:r.coord.left>i.geo.window.size.width-r.size.width&&(r.coord.left=i.geo.origin.windowOffset.left+this.__options.minIntersection<=i.geo.window.size.width?i.geo.window.size.width-r.size.width:i.geo.origin.windowOffset.left+this.__options.minIntersection+1-r.size.width):r.coord.top<0?r.coord.top=i.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?0:i.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:r.coord.top>i.geo.window.size.height-r.size.height&&(r.coord.top=i.geo.origin.windowOffset.top+this.__options.minIntersection<=i.geo.window.size.height?i.geo.window.size.height-r.size.height:i.geo.origin.windowOffset.top+this.__options.minIntersection+1-r.size.height):(r.coord.left>i.geo.window.size.width-r.size.width&&(r.coord.left=i.geo.window.size.width-r.size.width),r.coord.left<0&&(r.coord.left=0));u.__sideChange(o,r.side);i.tooltipClone=o[0];i.tooltipParent=u.__instance.option("parent").parent[0];i.mode=r.mode;i.whole=r.whole;i.origin=u.__instance._$origin[0];i.tooltip=u.__instance._$tooltip[0];delete r.container;delete r.fits;delete r.mode;delete r.outerSize;delete r.whole;r.distance=r.distance.horizontal||r.distance.vertical;c=n.extend(!0,{},r);u.__instance._trigger({edit:function(n){r=n},event:t,helper:i,position:c,type:"position"});u.__options.functionPosition&&(l=u.__options.functionPosition.call(u,u.__instance,i,c),l&&(r=l));v.destroy();r.side=="top"||r.side=="bottom"?(f={prop:"left",val:r.target-r.coord.left},h=r.size.width-this.__options.minIntersection):(f={prop:"top",val:r.target-r.coord.top},h=r.size.height-this.__options.minIntersection);f.val<this.__options.minIntersection?f.val=this.__options.minIntersection:f.val>h&&(f.val=h);a=i.geo.origin.fixedLineage?i.geo.origin.windowOffset:{left:i.geo.origin.windowOffset.left+i.geo.window.scroll.left,top:i.geo.origin.windowOffset.top+i.geo.window.scroll.top};r.coord={left:a.left+(r.coord.left-i.geo.origin.windowOffset.left),top:a.top+(r.coord.top-i.geo.origin.windowOffset.top)};u.__sideChange(u.__instance._$tooltip,r.side);i.geo.origin.fixedLineage?u.__instance._$tooltip.css("position","fixed"):u.__instance._$tooltip.css("position","");u.__instance._$tooltip.css({left:r.coord.left,top:r.coord.top,height:r.size.height,width:r.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(f.prop,f.val);u.__instance._$tooltip.appendTo(u.__instance.option("parent"));u.__instance._trigger({type:"repositioned",event:t,position:r})},__sideChange:function(n,t){n.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+t)},__targetFind:function(n){var r={},i=this.__instance._$origin[0].getClientRects(),u,t;return i.length>1&&(u=this.__instance._$origin.css("opacity"),u==1&&(this.__instance._$origin.css("opacity",.99),i=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1))),i.length<2?(r.top=Math.floor(n.geo.origin.windowOffset.left+n.geo.origin.size.width/2),r.bottom=r.top,r.left=Math.floor(n.geo.origin.windowOffset.top+n.geo.origin.size.height/2),r.right=r.left):(t=i[0],r.top=Math.floor(t.left+(t.right-t.left)/2),t=i.length>2?i[Math.ceil(i.length/2)-1]:i[0],r.right=Math.floor(t.top+(t.bottom-t.top)/2),t=i[i.length-1],r.bottom=Math.floor(t.left+(t.right-t.left)/2),t=i.length>2?i[Math.ceil((i.length+1)/2)-1]:i[i.length-1],r.left=Math.floor(t.top+(t.bottom-t.top)/2)),r}}}),n});menuTOP=!0;sQuickCommandeResponse=null;var goboTime,uRLgobo="/GoboPop.aspx",largeur=579,hauteur=190;$(function(){$("#Entetemenu").mouseenter(function(){$("#Entetemenu").css("z-index","12")});$("#PanelUp_scSearchControl_pnlMaster").on("touchstart mouseenter",function(){$("#PanelUp_scSearchControl_pnlMaster").css("z-index","14");$("#header").css("z-index","9999");$("#centertyp").css("z-index","99999");$("#logo").css("z-index","13")});$("#PanelUp_scSearchControl_pnlMaster").mouseleave(function(){$("#PanelUp_scSearchControl_pnlMaster").css("z-index","14");$("#header").css("z-index","9999");$("#centertyp").css("z-index","13");$("#logo").css("z-index","9999")})});jQuery(function(n){n("#basic-modal .basic").click(function(){return n("#basic-modal-content").modal(),!1});var t="demande.aspx";n("#basic-modal .basic2").click(function(){n.modal('<iframe src="'+t+'" height="450" width="500" style="border:0">',{closeHTML:"<a href='#' class='modalCloseImg' alt='Close' title='Close'><a>",closeClass:"modalCloseImg",containerCss:{backgroundColor:"#fff",borderColor:"#fff",height:500,padding:10,width:530},overlayClose:!0})})});Large=0;$(function(){Large=getWidth();$(window).on("load resize scroll orientationchange",function(){Large=getWidth()});$(".divBasket").mouseenter(function(){clearTimeout(Basketime);$Bask=$(this);Basketime=setTimeout(function(){Large>415&&ouvreBasket($Bask)},300)});$(".divBasket").mouseleave(function(){clearTimeout(Basketime);$(".divBasketHidden").stop(!0,!0).fadeOut(300);$(".green").css("z-index","11");$("#overlay").stop(!0,!0).fadeOut(300);$("#overlay").css("z-index","9");$("#PanelUp_scSearchControl_pnlMaster").css("z-index","13");$("#overlay").css("display","none")});$("#GoboOutils").on("click",function(){location.href="/gobosearch.aspx"});$("#OUTILSBOX").on("click",function(){clearTimeout(goboTime);$Gobo=$(this);var n=txt_erreur.Culture;goboTime=setTimeout(function(){ouvregoboTimeFixe(n)},400)});$("#GoboOutils").mouseleave(function(){clearTimeout(goboTime)});$(" #monlogin").mouseenter(function(){$("#header").css("z-index","13");$("#login").css("z-index","999999");$("#centertyp").css("z-index","12")});$(".divLogin").mouseenter(function(){$("#PanelUp_scSearchControl_pnlMaster").css("z-index","9");$("#centertyp").css("z-index","12");$("#overlay").css("z-index","11");$("#overlay").stop(!0,!0).fadeIn(300);$("#login").css("z-index","999999");$("#centertyp").css("z-index","12");$("#header").css("z-index","13")});$(".divLogin").mouseleave(function(){$("#overlay").stop(!0,!0).fadeOut(300);$("#PanelUp_scSearchControl_pnlMaster").css("z-index","13");$("#overlay").css("z-index","9");$("#overlay").css("display","none")})});$(function(){$("#accordion").accordion({collapsible:!0,active:0,animate:300});$("#accordion h3").bind("click",function(){theOffset=$(this).offset();$("body,html").animate({scrollTop:theOffset.top-100})})});var CriteresSearch="",strText="",OKsubmit=!1,TempsReponsebis;$(document).ajaxComplete(function(){});let TimeIS;TimeISearch=null;TimeLight=1e3;$(document).ready(function(){var n=0;$("#PanelUp_scSearchControl_txtSearch").on("keydown paste ",debounce(function(t){var i=t.keyCode||t.which;i!=37&&i!=38&&i!=39&&i!=40&&i!=13&&i!=39&&(i!=46||$(this).val().length==0)&&($("#header").css("z-index","9999"),n=$(this).val().length,$("#MoteurRecherche #PanelUp_scSearchControl_txtSearch").attr("class","searchonload"),clearTimeout(TimeIS),n>=1&&(TimeIS=setTimeout(()=>{Recherche(n,t)},1e3)),$(this).val().length>=1&&($("#MaRecherche").show("fast"),$("#fermerecherche").show("fast"),$("#PanelUp_Supvolet").hide("fast"),$(".navhead .nav-link  .tarifs").removeClass("actiongletheader"),$(".navhead .nav-link  .mydownload").removeClass("actiongletheader")),($(this).val().length<1||$(this).val()=="")&&($("#MaRecherche").load(encodeURI("/rien.htm")),$("#PanelUp_scSearchControl_btSearch").attr("src","/Images/r/WhiteBTN.gif"),$("#MoteurRecherche #PanelUp_scSearchControl_txtSearch").attr("class","searchnormal"),$("#MaRecherche").hide(1e3),$("#fermerecherche").hide(1e3),OKsubmit=!1))},1e3));$("#PanelUp_scSearchControl_txtSearch").on("keydown",function(){});$("#MaRecherche").mouseenter(function(){});$("#fermerecherche").click(function(){$("#MaRecherche").hide(1e3);$("#fermerecherche").hide(1e3);$("#PanelUp_scSearchControl_txtSearch").val("");$("#PanelUp_scSearchControl_btSearch").attr("src","/Images/r/WhiteBTN.gif");$("#MoteurRecherche #PanelUp_scSearchControl_txtSearch").attr("class","searchnormal")});$("#PanelUp_scSearchControl_ddlFamily").change(function(){$("#PanelUp_scSearchControl_btSearch").attr("src","/Images/r/WhiteBTN.gif");$("#MoteurRecherche #PanelUp_scSearchControl_txtSearch").attr("class","searchnormal")})}),function(n){"use strict";n.fn.animateCSS=function(t,i,r){return this.each(function(){function h(){u.addClass(e+" "+t);u.css(o)===s&&u.css(o,c);u.is(":"+s)&&u.show();u.bind(f,function(){u.removeClass(e+" "+t);typeof r=="function"&&(r.call(this),u.unbind(f))})}var u=n(this),f="webkitAnimationEnd oanimationend msAnimationEnd animationend",e="animated",o="visibility",c="visible",s="hidden";i&&typeof i!="function"?setTimeout(h,i):(r=i,h())})}}(jQuery,window,document);$(function(){var t=getCookieMessage("cookiesDirective"),n=getCookieMessage("messageconnete");n==""&&$("#PanelUp_LabelLogin").length==0?$(".popin").fadeIn("1000"):$(".popin").fadeOut("1000");$(".closePopin").bind("click",function(){CreationcookieMessage(1);$(".popin").hide("1000")})});$(function(){$(".tiptext").mouseenter(function(){$(this).children(".descriptionPop").stop(!0,!0).fadeIn(300)}).mouseleave(function(){$(this).children(".descriptionPop").stop(!0,!0).fadeOut(300)})});$(function(){$(".tiptext2").mouseenter(function(){$(this).children(".descriptionPop2").stop(!0,!0).fadeIn(300)}).mouseleave(function(){$(this).children(".descriptionPop2").stop(!0,!0).fadeOut(300)})});$(function(){$(".PointInterog").mouseenter(function(){$(this).children(".PointInterogPop").stop(!0,!0).fadeIn(300)}).mouseleave(function(){$(this).children(".PointInterogPop").stop(!0,!0).fadeOut(300)})});$(document).ajaxComplete(function(){$(".button").on("click",function(){var n=$(this),t=n.parent().find("input").val(),i;i=n.text()=="+"?parseFloat(t)+1:t>0?parseFloat(t)-1:0;n.parent().find("input").val(i);__doPostBack("MainPanel_UpdatePanel2","")})});control=!1;$(document).on("keyup keydown",function(n){control=n.ctrlKey});$(function(){var n=!1;$(".RounderCornersAll4").mousedown(function(t){if(t.which===3&&(n=!0),control&&n){var i=$(this).attr("onclick").replace("document.location='","");window.open(i.replace("'",""))}})});positionElementInPage=0;PosInScrollTop=0;$(function(){positionElementInPage=$("#logo").position().top;$(window).resize(function(){positionElementInPage=$("#logo").position().top});var n=$(window).height(),t=getWidth(),i;$(window).on("load resize orientationchange",function(){clearTimeout(i);i=setTimeout(function(){t=getWidth();$(this).height()!=n&&(n=$(this).height());t<400&&$(".CaddyFixed").css({top:"0px",position:"initial"});t<999?(LoadImage(),$(".tab-content").each(function(){var n=$(this).find("div.Tabulatio");n.replaceClass("in","tab-pane fade in");$("#MainPanel_FormViewArticle_Desc").length===0&&$(".Documentations").hide();$("#MainPanel_FormViewArticle_PanelFirmWare").length===0&&$(".Firmwares").hide()})):$(".tab-content").each(function(){var n=$(this).find("div.Tabulatio");n.replaceClass("tab-pane fade","");n.replaceClass("fade","");n.replaceClass("tab-pane","");n.replaceClass("tab-pane fade","")})},300)});$(window).on("load",function(){t<999?($(".ContentServiceEnLigne").addClass("HiddenContent"),$(".ServiceFooter").addClass("ServiceFooterOff"),$(".ContentBesoindaide").addClass("HiddenContent"),$(".ContentPaiementSec").addClass("HiddenContent"),$(".contenuTiroirLABSVOUS").addClass("HiddenContent"),$(".ContentDownload").addClass("HiddenContent"),$(".ContentTobeInformed").addClass("HiddenContent"),$(".ContentCategories").addClass("HiddenContent"),$(".TiroirCategories").addClass("TiroirCategoriesOff"),$(".TiroirDownload").addClass("TiroirDownloadOff"),$(".TiroirTobeInformed").addClass("TiroirTobeInformedOff"),$(".TiroirPaiementSec").addClass("TiroirPaiementSecOff"),$(".TiroirBesoindaide").addClass("TiroirBesoindaideOff"),$(".TiroirLABSVOUS").addClass("TiroirLABSVOUSOff"),$(".TiroirServiceEnLigne").addClass("TiroirServiceEnLigneOff")):($(".ContentServiceEnLigne").removeClass("HiddenContent"),$(".ContentBesoindaide").removeClass("HiddenContent"),$(".ContentPaiementSec").removeClass("HiddenContent"),$(".contenuTiroirLABSVOUS").removeClass("HiddenContent"),$(".ContentDownload").removeClass("HiddenContent"),$(".ContentTobeInformed").removeClass("HiddenContent"),$(".ContentCategories").removeClass("HiddenContent"),$(".TiroirCategories").removeClass("TiroirCategoriesOff"),$(".ServiceFooter").removeClass("ServiceFooterOff"),$(".TiroirPaiementSec").removeClass("TiroirPaiementSecOff"),$(".TiroirBesoindaide").removeClass("TiroirBesoindaideOff"),$(".TiroirLABSVOUS").removeClass("TiroirLABSVOUSOff"),$(".TiroirDownload").removeClass("TiroirDownloadOff"),$(".TiroirTobeInformed").removeClass("TiroirTobeInformedOff"),$(".TiroirServiceEnLigne").removeClass("TiroirServiceEnLigneOff"))});getWidth()>768;$(window).on("load resize scroll orientationchange",function(){var t=0,u=$("#facette"),r,i;t=document.body.clientWidth;window.addEventListener("resize",function(){t=document.body.clientWidth},!1);r=0;i=0;$(window).scrollTop()<100&&(i++,i=$(window).scrollTop()+10);PosInScrollTop=$(window).scrollTop();getWidth()<999?($("#BSlogo").hide(),$("#BSlogoSmall").show(),$("#callmenufloat").show(),$("#toggleM").show(),$("#overlay").css({top:"88px"})):($("#toggleM").hide(),$("#BSlogo").show(),$("#BSlogoSmall").hide(),$("#callmenufloat").hide(),$("#overlay").css({top:"178px"}));$(window).scrollTop()>Number(positionElementInPage)?($("#PanelUp_NBarticle_advSearch").css("width","160px"),$("#header").addClass("ZINDEX"),$("#header").addClass("fixedTopZ"),$(".bgheader").addClass("Hidebgheader"),$("#logo").addClass("ZLOGO"),$("#SaisieRapide").hide(),$("#Entetemenu").addClass("fixedEnteteZmenu"),$("#ListeArtCentre").addClass("ZINDEXLIST"),$(".green").addClass("fixedTopZmenu"),$("#Slogan").addClass("displayNone"),$("#BSlogo").hide(),$("#BSlogoSmall").show(),$("#PanelUp_BasketControl1_divBasket").addClass("positionbasketfixed"),$("#MoteurRecherche").addClass("rechercheAutopredictiveZ"),$("#PanelUp_scSearchControl_ddlFamily").hide(),$("#toggleM").show(),$("#callmenufloat").show(),$(".calag").addClass("calageFixe"),$("#masterGobo").addClass("masterGobo-fixe"),$("#masterGobo > a.Ferme-window").addClass("Ferme-windowGOB"),$(".masterGobo-overlay").hide(),$("#Ventre").css({"padding-top":"150px"}),$(".CadreRight").css({"background-color":"#ffffff"}),$(".cd-dropdown-wrapper").addClass("cddropFixedtop"),$("#overlay").css({top:"88px"}),n>=768?Number(t)>768&&$(".CaddyFixed").css({top:"-20px",position:"absolute"}):Number(t)<768&&(detectMobile()?$(".CaddyFixed").css({top:"0px",position:"initial"}):$(".CaddyFixed").css({top:"-20px",position:"absolute"})),menuTOP=!1):($("#PanelUp_NBarticle_advSearch").css("width","160px"),$("#PanelUp_NBarticle_advSearch").css("margin","0 auto"),$("#header").removeClass("ZINDEX"),$("#header").removeClass("fixedTopZ"),$("#logo").removeClass("ZLOGO"),$("#SaisieRapide").hide(),$(".supVolet").hide(),$(".navhead .nav-link  .tarifs").removeClass("actiongletheader"),$(".navhead .nav-link  .mydownload").removeClass("actiongletheader"),$(".bgheader").removeClass("Hidebgheader"),$("#Entetemenu").removeClass("fixedEnteteZmenu"),$(".cd-dropdown-wrapper").removeClass("cddropFixedtop"),$("#ListeArtCentre").removeClass("ZINDEXLIST"),$(".green").removeClass("fixedTopZmenu"),$("#Slogan").removeClass("displayNone"),$("#toggleM").hide(),getWidth()<999?($("#BSlogo").hide(),$("#BSlogoSmall").show(),$("#callmenufloat").show(),$("#toggleM").show()):($("#toggleM").hide(),$("#BSlogo").show(),$("#BSlogoSmall").hide(),$("#callmenufloat").hide(),$("#overlay").css({top:"178px"})),$("#PanelUp_BasketControl1_divBasket").removeClass("positionbasketfixed"),$("#MoteurRecherche").removeClass("rechercheAutopredictiveZ"),$("#PanelUp_scSearchControl_ddlFamily").show(),$(".calag").removeClass("calageFixe"),$("#masterGobo").removeClass("masterGobo-fixe"),$("#masterGobo > a.Ferme-window").removeClass("Ferme-windowGOB"),$(".masterGobo-overlay").show(),$("#Ventre").css({"padding-top":"0"}),$(".CadreRight").css({}),n>=768?getWidth()>769&&getWidth()<=768==!1?getWidth()>768&&$(".CaddyFixed").css({top:"-20px",position:"absolute"}):detectMobile()?$(".CaddyFixed").css({top:"0px",position:"initial"}):$(".CaddyFixed").css({top:"-20px",position:"absolute"}):getWidth()>769&&(detectMobile()?$(".CaddyFixed").css({top:"0px",position:"initial"}):$(".CaddyFixed").css({top:"-20px",position:"absolute"})),menuTOP=!0)})});$(function(){$(".navhead .nav-link  .tarifs").on("click",function(){$(".navhead .nav-link  .tarif").removeClass("actiongletheader");$(".navhead .nav-link  .mydownload").removeClass("actiongletheader");$("#PanelUp_tarif > a").removeClass("actiongletheader");$("#PanelUp_telecharger > a").removeClass("actiongletheader");$(".supVolet").is(":hidden")?($(".Mytarif").show(),$(".MyDownload").hide(),$(".navhead .nav-link  .tarifs").addClass("actiongletheader"),$(".navhead .nav-link  .mydownload").removeClass("actiongletheader"),$(".supVolet").slideToggle("slow"),$("#cmsmenucorpo #menu_corpo_company").show(),$("#cmsmenucorpo #menu_corpo_downloading").hide(),getWidth()>1024?$(".CaddyFixed").css({top:"-18px",position:"relative"}):$(".CaddyFixed").css({top:"-20px",position:"absolute"})):$(".supVolet").is(":visible")&&$(".Mytarif").is(":hidden")&&($(".navhead .nav-link  .tarifs").removeClass("actiongletheader"),$(".navhead .nav-link  .tarifs").removeClass("active"),$(".navhead .nav-link  .mydownload").removeClass("active"),$(".navhead .nav-link  .tarifs").addClass("actiongletheader"),$(".navhead .nav-link  .mydownload").removeClass("actiongletheader"),$(".Mytarif").show(),$(".MyDownload").hide())});var n,t;$(".navhead .nav-link  .mydownload").on("click",function(){clearTimeout(t);$(".navhead .nav-link  .tarif").removeClass("actiongletheader");$("#PanelUp_tarif > a").removeClass("actiongletheader");$("#PanelUp_telecharger > a").removeClass("actiongletheader");$(".navhead .nav-link  .mydownload").removeClass("actiongletheader");$(".supVolet").is(":hidden")?(n=200,t=setTimeout(function(){$(".Mytarif").hide();$(".MyDownload").show();$(".navhead .nav-link  .tarifs").removeClass("actiongletheader");$(".navhead .nav-link  .mydownload").addClass("actiongletheader");$(".supVolet").slideToggle("slow")},n)):$(".supVolet").is(":visible")&&$(".MyDownload").is(":hidden")&&($(".Mytarif").hide(),$(".MyDownload").show(),$(".navhead .nav-link  .tarifs").removeClass("actiongletheader"),$(".navhead .nav-link  .mydownload").addClass("actiongletheader"));n=0});$("#header").on("touchstart mouseenter",function(){$(".supVolet").is(":visible")&&($(".MyDownload").is(":visible")||$(".Mytarif").is(":visible"))&&($(".supVolet").slideToggle("slow"),$(".MyDownload").hide(),$(".MyDownload").hide(),$(".navhead .nav-link  .tarifs").removeClass("actiongletheader"),$(".navhead .nav-link  .mydownload").removeClass("actiongletheader"))})});family="";famille1="";$(function(){function i(){}var n=decodeURIComponent($("#MainPanel_listquerystring").val()),t;window.location.href.indexOf("/sfa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/fa/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/col/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/ma/")>-1?n=document.getElementById("MainPanel_listquerystring").value:window.location.href.indexOf("/cpcoeur_")>-1||window.location.href.indexOf("/incont_")>-1||window.location.href.indexOf("/discount_")>-1||window.location.href.indexOf("/rebates_")>-1?n=document.getElementById("MainPanel_listquerystring").value:famille1="&fam1="+GetURLParameter("fam1")+"&Fam2="+GetURLParameter("fam2")+"&Lang="+GetURLParameter("Lang");$(window).on("load",function(){$("#MainPanel_Affiche").length==!1&&($("#FacetteMobile").hide(),sessionStorage.setItem("FacetteMobile","false"),$("#overlay").css({display:"none"}))});t=!0;$(window).on("resize load",function(){RecallAjaxQUE(4);loadFacette(famille1,n.replace("#","%23"));t=!0;i()});$(window).on("scroll",function(){$(window).scrollTop()+$(window).height()>=$(window).height()&&t&&(RecallAjaxQUE(100),t=!1)})});Intnumber=0;DivDisponibilite="Disponibilite";$(function(){$("div.filetgris").each(function(){var n=getWidth();n<=812&&(DivDisponibilite="DisponibiliteMob");$(this).click(function(n){var t=!1,i;$(n.target).hasClass("quantityctrl")||$(n.target).hasClass("increment-quantity")||$(n.target).hasClass("decrement-quantity")||$(n.target).hasClass("cartList")||$(n.target).hasClass(DivDisponibilite+"")||$(n.target).hasClass("tooltip")||$(n.target).hasClass("ContacttList")||$(n.target).hasClass("cartListCompare")||$(n.target).hasClass("CompareAdded")||$(n.target).hasClass("addon")||$(n.target).hasClass("preventme")||$(n.target).hasClass("Inkstip")||$(n.target).hasClass("picto")||$(n.target).hasClass("listooltip")||$(n.target).attr("BtnAddtocart")?t=!1:(n.preventDefault(),t=!0);t&&window.location.href.indexOf("Comparateur.aspx")==-1&&(i=$(this).find("a.linkto").attr("href"),location.href=i)});var t=$(this).find("input.CodeSku").val(),i=$(this).find("input.quantityctrl").val()})});$(function(){sessionStorage.getItem("FacetteMobile")!=="true"?($("#FacetteMobile").hide(),$("#overlay").css({display:"none"}),$("#overlay").removeProp("top")):($("#FacetteMobile").show(),$("#overlay").css({top:"0px",display:"block"}));$("#overlay").on("click",function(){sessionStorage.setItem("FacetteMobile","false");$("#FacetteMobile").hide();$("#overlay").css({display:"none"});$("#overlay").removeProp("top")});$("#MainPanel_Affiche").on("click",function(n){n.preventDefault();$("#overlay").css({top:"0px",display:"block"});sessionStorage.setItem("FacetteMobile","true");$("#FacetteMobile").css({right:"-300px",left:""}).animate({right:"0px",display:"block"})});$("#Masque").on("click",function(n){n.preventDefault();sessionStorage.setItem("FacetteMobile","false");$("#FacetteMobile").hide();$("#overlay").css({display:"none"});$("#overlay").removeProp("top")});$("#Voirresultat").on("click",function(n){n.preventDefault();$("#Masque").click()})});var selectMarqueedo="",selectUnivers="",marquepres="",EtUniv="",CollectionFiltre="",IschangePrice="",TimeChecquedobj,UrlRedirectOption=!0,IsMutifacette="";objSelect=[];$(function(){$("#EspaceColor > table > tbody > tr > td  > ul > li  > a").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$("#EspaceColor > table > tbody > tr > td  > ul > li  > p > a").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$("#PanelUp_scSearchControl_btSearch").click(function(){$("#Textsearch").show();$("#waitANDsee").fadeIn("slow");$("#PanelUp_scSearchControl_txtSearch").addClass("searchonload")});$(".RounderCornersAll4").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$(this).find(".ImageFamilleStyle").attr("src","/Images/Wait.svg")});$("#MainPanel_Classicdelivrery").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$("#MainPanel_ButtonLivraison").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$("#MainPanel_Button3").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$("#MainPanel_SocietyDelivrery").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$("#MainPanel_VoirTousLesArticle").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$("#MainPanel_LABSPager1_lbNext").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$("#MainPanel_LABSPager1_lbPrevious").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$(".Scrolldiv > div.scrollWrapper > div > div > a").click(function(){$("#Windorange").css({"border-style":"none","border-color":"#FFF"});$("#Textsearch").css({visibility:"hidden"});$("#waitANDsee").fadeIn("slow")});$("#PanelUp_scSearchControl_txtSearch").on("keydown",function(n){if(n.keyCode==13)return n.preventDefault(),$(this).text!=""&&$("#PanelUp_scSearchControl_btSearch").click(),!1})});$(function(){var n=$("#mega-menu-7 > #TypeOnglet1 > div");n.load(encodeURI("/MenuMarque.aspx"),function(n,t){t=="success"&&(chargeImgMArq(),chargeMarqueStart("A-B"))})});$(document).ready(function(){var t=$("#PanelUp_scSearchControl_txtSearch"),n;t.on("focusin",function(){$(this).removeClass("placeholder");$(this).addClass("placeholderred")});t.on("focusout",function(){$(this).removeClass("placeholderred");$(this).addClass("placeholder")});n=$("#footerControl_Newsletter");n.on("focusin",function(){$(this).removeClass("placeholder");$(this).addClass("placeholderred")});n.on("focusout",function(){$(this).removeClass("placeholderred");$(this).addClass("placeholder")});$("#MainPanel_FormViewUsersInfo_TextBox1, #MdpConnexion2").on("keyup",function(){var n=new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$","g"),t=new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$","g"),i=new RegExp("(?=.{8,}).*","g");return i.test($(this).val())===!1?(document.getElementById("Faible").className="red",document.getElementById("Moyen").className="nrm",document.getElementById("Bon").className="nrm",document.getElementById("Parfait").className="nrm",$("#Messagevalidation").removeClass().addClass("alert alert-error").html(""+TexteErrorLogin1)):n.test($(this).val())?(document.getElementById("Faible").className="nrm",document.getElementById("Moyen").className="nrm",document.getElementById("Bon").className="nrm",document.getElementById("Parfait").className="vertlig",$("#Messagevalidation").removeClass().addClass("alert alert-success").html(""+TexteErrorLogin4)):t.test($(this).val())?(document.getElementById("Faible").className="nrm",document.getElementById("Moyen").className="nrm",document.getElementById("Bon").className="vert",document.getElementById("Parfait").className="nrm",$("#Messagevalidation").removeClass().addClass("alert alert-info").html(""+TexteErrorLogin2)):(document.getElementById("Faible").className="nrm",document.getElementById("Moyen").className="yellow",document.getElementById("Bon").className="nrm",document.getElementById("Parfait").className="nrm",$("#Messagevalidation").removeClass().addClass("alert alert-error").html(""+TexteErrorLogin3)),!0})});$("selectUnivers").each(function(){var n=$(this),f=$(this).children("option").length,t,i,r,u;for(n.addClass("selectUnivers-hidden"),n.wrap('<div class="selectUnivers"><\/div>'),n.after('<div class="selectUnivers-styled"><\/div>'),t=n.next("div.selectUnivers-styled"),t.text(n.children("option").eq(0).text()),i=$("<ul />",{"class":"selectUnivers-options"}).insertAfter(t),r=0;r<f;r++)$("<li />",{text:n.children("option").eq(r).text(),rel:n.children("option").eq(r).val()}).appendTo(i);u=i.children("li");t.click(function(n){n.stopPropagation();$("div.selectUnivers-styled.active").not(this).each(function(){$(this).removeClass("active").next("ul.selectUnivers-options").hide()});$(this).toggleClass("active").next("ul.selectUnivers-options").toggle()});u.click(function(r){r.stopPropagation();t.text($(this).text()).removeClass("active");n.val($(this).attr("rel"));i.hide()});$(document).click(function(){t.removeClass("active");i.hide()})});$(function(){$("#MainPanel_DropShiping > span").click(function(){$("#MainPanel_Postf").click()});$("#floter > h2 > span").click(function(){$("#MainPanel_Postf").click()})});$(function(){var n=0,t=function(){n=document.body.clientWidth;height=document.body.clientHeight;n<992?($(".TiroirDownload").click(function(){$(".TiroirDownload").hasClass("TiroirDownloadOff")?($(".TiroirDownload").removeClass("TiroirDownloadOff"),$(".ContentDownload").removeClass("HiddenContent")):($(".TiroirDownload").addClass("TiroirDownloadOff"),$(".ContentDownload").addClass("HiddenContent"))}),$(".TiroirTobeInformed").click(function(){$(".TiroirTobeInformed").hasClass("TiroirTobeInformedOff")?($(".TiroirTobeInformed").removeClass("TiroirTobeInformedOff"),$(".ContentTobeInformed").removeClass("HiddenContent")):($(".TiroirTobeInformed").addClass("TiroirTobeInformedOff"),$(".ContentTobeInformed").addClass("HiddenContent"))}),$(".TiroirCategories").click(function(){$(".ContentCategories").hasClass("HiddenContent")?($(".TiroirCategories").removeClass("TiroirCategoriesOff"),$(".ContentCategories").removeClass("HiddenContent")):($(".TiroirCategories").addClass("TiroirCategoriesOff"),$(".ContentCategories").addClass("HiddenContent"))}),$(".TiroirServiceEnLigne").click(function(){$(".TiroirServiceEnLigne").hasClass("TiroirServiceEnLigneOff")?($(".TiroirServiceEnLigne").removeClass("TiroirServiceEnLigneOff"),$(".ContentServiceEnLigne").removeClass("HiddenContent")):($(".TiroirServiceEnLigne").addClass("TiroirServiceEnLigneOff"),$(".ContentServiceEnLigne").addClass("HiddenContent"))}),$(".TiroirBesoindaide").click(function(){$(".TiroirBesoindaide").hasClass("TiroirBesoindaideOff")?($(".TiroirBesoindaide").removeClass("TiroirBesoindaideOff"),$(".ContentBesoindaide").removeClass("HiddenContent")):($(".TiroirBesoindaide").addClass("TiroirBesoindaideOff"),$(".ContentBesoindaide").addClass("HiddenContent"))}),$(".TiroirPaiementSec").click(function(){$(".ContentPaiementSec").toggleClass("HiddenContent");$(".TiroirPaiementSec").toggleClass("TiroirPaiementSecOff")}),$(".TiroirLABSVOUS").click(function(){$(".contenuTiroirLABSVOUS").toggleClass("HiddenContent");$(".TiroirLABSVOUS").toggleClass("TiroirLABSVOUSOff")}),sessionStorage.getItem("MarqueProductFilter")===null&&(sessionStorage.setItem("MarqueProductFilter","none"),sessionStorage.setItem("TriAngleMarque","true")),sessionStorage.getItem("PriceProductFilter")===null&&(sessionStorage.setItem("PriceProductFilter","none"),sessionStorage.setItem("TriAnglePrice","true")),sessionStorage.getItem("UniversDiv")===null&&(sessionStorage.setItem("UniversDiv","none"),sessionStorage.setItem("TriAngleUniver","true")),sessionStorage.getItem("CollectionDiv")===null&&(sessionStorage.setItem("CollectionDiv","none"),sessionStorage.setItem("TriAngleCollection","true")),sessionStorage.getItem("DisponibilFilter")===null&&(sessionStorage.setItem("DisponibilFilter","none"),sessionStorage.setItem("TriAngleDisponibil","true"))):(sessionStorage.getItem("MarqueProductFilter")===null&&(sessionStorage.setItem("MarqueProductFilter","block"),sessionStorage.setItem("TriAngleMarque","false")),sessionStorage.getItem("PriceProductFilter")===null&&(sessionStorage.setItem("PriceProductFilter","block"),sessionStorage.setItem("TriAnglePrice","false")),sessionStorage.getItem("UniversDiv")===null&&(sessionStorage.setItem("UniversDiv","block"),sessionStorage.setItem("TriAngleUniver","false")),sessionStorage.getItem("CollectionDiv")===null&&(sessionStorage.setItem("CollectionDiv","block"),sessionStorage.setItem("TriAngleCollection","false")),sessionStorage.getItem("DisponibilFilter")===null&&(sessionStorage.setItem("DisponibilFilter","block"),sessionStorage.setItem("TriAngleDisponibil","false")),$(".TiroirDownload").prop("onclick",null).off("click"),$(".TiroirTobeInformed").prop("onclick",null).off("click"),$(".TiroirCategories").prop("onclick",null).off("click"),$(".TiroirServiceEnLigne").prop("onclick",null).off("click"),$(".TiroirBesoindaide").prop("onclick",null).off("click"),$(".TiroirPaiementSec").prop("onclick",null).off("click"),$(".TiroirLABSVOUS").prop("onclick",null).off("click"))};window.addEventListener("load",t)});elementsInput=document.querySelectorAll("input[type='text'][onchange]");elementsInput.forEach(function(n){var t=n.getAttribute("onchange");n.removeAttribute("onchange");n.setAttribute("oninput",t)});$(function(){$(".EcatalogueHeaderLink").click(function(){_gaq.push(["_trackEvent","E-catalogue","clic"])});$("#PanelUp_TTCHT").click(function(){_gaq.push(["_trackEvent","TTC ou HT","clic"])});$(".WebTVHeaderlink").click(function(){_gaq.push(["_trackEvent","Web-tv","clic"])});$(".HowWehare").click(function(){_gaq.push(["_trackEvent","Qui sommes - nous ? ","clic"])});$("a.icon.icon-youtube-alt").click(function(){_gaq.push(["_trackEvent","Bouton Youtude","clic"])});$("a.fa.fa-facebook").click(function(){_gaq.push(["_trackEvent","Bouton facebook","clic"])});$("a.contactheader").click(function(){_gaq.push(["_trackEvent","Contactez-nous","clic"])});$("a.headlinkLink.MarquesheaderLink").click(function(){_gaq.push(["_trackEvent","Marques","clic"])});$("a.headlinkLink.NouveautesheaderLink").click(function(){_gaq.push(["_trackEvent","Nouveautés ","clic"])});$("a.headlinkLink.OffresdumomentheaderLink").click(function(){_gaq.push(["_trackEvent","Offres du moment ","clic"])});$("a.headlinkLink.DestockagesheaderLink").click(function(){_gaq.push(["_trackEvent","Déstockages ","clic"])});$("#PanelUp_NombreArticleControlMesTarifsControl_MontarifEsavoirPlus").click(function(){_gaq.push(["_trackEvent"," Comment bénéficier d'un meilleur tarif","clic"])});$("#PanelUp_MesFormulairesAdministratif").click(function(){_gaq.push(["_trackEvent"," Formulaires administratifs","clic"])});$("#PanelUp_MesFormulairesSurmesure").click(function(){_gaq.push(["_trackEvent","Formulaires sur mesure","clic"])});$("#PanelUp_MonMetiermesgout").click(function(){_gaq.push(["_trackEvent","Informations produits","clic"])});$("#owl-slidelaBS > div.owl-stage-outer > div > div.owl-item.cloned.active > div > a").click(function(){_gaq.push(["_trackEvent","1er slider","clic"])});$("#catNum1 > a").click(function(){_gaq.push(["_trackEvent","Photo Audio pro","clic"])});$("#catNum4 > a").click(function(){_gaq.push(["_trackEvent","Photo Scene et sécurité","clic"])});$("#catNum5 > a").click(function(){_gaq.push(["_trackEvent","Photo Electricité","clic"])});$("#catNum7 > a").click(function(){_gaq.push(["_trackEvent","Photo Photo vidéo","clic"])});$("#catNum2 > a").click(function(){_gaq.push(["_trackEvent","Photo consommable","clic"])});$("#catNum3 > a").click(function(){_gaq.push(["_trackEvent","Photo Maquillage","clic"])});$("#catNum6 > a").click(function(){_gaq.push(["_trackEvent","Photo Eclairage","clic"])});$("#catNum8 > a").click(function(){_gaq.push(["_trackEvent","Photo Rangements","clic"])});$("#catNum9 > a").click(function(){_gaq.push(["_trackEvent","Photo Outillage","clic"])});$("#MainPanel_Aproposde > div > div > p > a").click(function(){_gaq.push(["_trackEvent","Bouton en savoir plus","clic"])});$("#MainPanel_triptyqueisvisible > div > div.slider-Hotnews.owl-theme.owl-carousel.owl-loaded > div.owl-stage-outer > div > div.owl-item.active > div > a").click(function(){_gaq.push(["_trackEvent","1er slider Tiptyque","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_2 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","Eclairage Bloc 1 ","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_2 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","Eclairage Bloc 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_3 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","Audio Pro 1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_3 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","Audio Pro 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_4 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","Photo video 1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_4 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","Photo video 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_5 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","SCENE ET SECURITE 1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_5 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","SCENE ET SECURITE 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_6 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","ELECTRICITE 1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_6 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","ELECTRICITE 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_7 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","Rangement 1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_7 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","Rangement 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_8 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","Outillage 1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_8 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","Outillage 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_9 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","Consommable 1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_9 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","Consommable 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_10 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","Maquillage 1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_10 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","Maquillage 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_11 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","Nouveautés  1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_11 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","Nouveautés 2","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_1 > li.imgUrllink > ul > a:nth-child(2)").click(function(){_gaq.push(["_trackEvent","Déstockages   1","clic"])});$("#PanelUp_Navigation_RePparent_Dropdownsec_1 > li.imgUrllink > ul > a:nth-child(3)").click(function(){_gaq.push(["_trackEvent","Déstockages  2","clic"])});$("#form1 > div.calagnav.container > div > nav > ul > li.OffreMoment > a").click(function(){_gaq.push(["_trackEvent","Les Offres du moment menu ","clic"])});$("a.IconTarif").click(function(){_gaq.push(["_trackEvent","Bouton Info Remise fiche article","clic"])});$("a.TriptiqueItem").click(function(){_gaq.push(["_trackEvent","Slider Lien : "+$(this).attr("href")+"","clic"])});$("a.more").click(function(){_gaq.push(["_trackEvent","Slider Habillage : "+$(this).attr("href")+"","clic"])});$("#slideActuBlock > div.container > div > div.col-md-4.desktop > div > a:first").click(function(){_gaq.push(["_trackEvent","Voir toutes les Actualités ","clic"])});$("#OffreMoment > div:nth-child(1) > div.col-md-4.desktop > div > a:first").click(function(){_gaq.push(["_trackEvent","Voir toutes les offres du moment ","clic"])});$("a.inscriptionewsletter").click(function(){_gaq.push(["_trackEvent","Inscrivez Vous Maintenant","clic"])});$("a.createaccount").click(function(){_gaq.push(["_trackEvent","Créer un compte (Volet Footer)","clic"])});$("a.connect_u").click(function(){_gaq.push(["_trackEvent","Se connecter  (Volet Footer)","clic"])});$("#PanelUp_scSearchControl_txtSearch").on("keydown",function(n){if(n.keyCode===13){n.preventDefault();$("#toggleM").on("keydown",function(n){n.keyCode===13&&n.preventDefault()})}});$(".product-quantityLie").each(function(){var t=$(this),i=$(this).find("input.quantityctrlFicheArticle").val(),n=1;t.find(".decrement-quantity").on("click",function(){var t=$(this).parent().parent().parent().find("input.quantityctrlFicheArticle").val(),i=$(this).parent().parent().parent().find("input.quantityctrlMulti").val();Number(t)>1&&(n=Number(t)-Number(i),$(this).parent().parent().parent().find("input.quantityctrlFicheArticle").val(n))});t.find(".increment-quantity").on("click",function(){var t=$(this).parent().parent().parent().find("input.quantityctrlFicheArticle").val(),i=$(this).parent().parent().parent().find("input.quantityctrlMulti").val();n=Number(t)+Number(i);$(this).parent().parent().parent().find("input.quantityctrlFicheArticle").val(n)})});$(".Inside").each(function(){var n=$(this);n.find(".AddtoCartOfferFiche").on("click",function(t){t.preventDefault();var i=n.find("input.quantityctrlFicheArticle").val(),r=n.find(".AddtoCartOfferFiche").attr("href").replace("&qute=1","&qute="+i);self.frames.panier.location.href=r})})}),function(n){n.fn.popupLightbox=function(t){var i=n.extend({width:560,height:340,inAnimation:"ZoomIn"},t);return this.each(function(){function g(){return document.createElement("div")}function y(){return document.createElement("button")}function nt(){return document.createElement("section")}function tt(){return document.createElement("figure")}function it(){return document.createElement("figcaption")}var w=n(this),u=nt(),b=y(),f=y(),e=y(),a=g(),r=tt(),v=it(),o=n(w).find("img.imgart"),k=n("img").attr("src"),p=k.split("/"),d=p[p.length-1],rt=d.split(".")[0],s=o.length,t=0,c,l,h;for(n(f).addClass("btn-next").appendTo(u),n(e).addClass("btn-prev").appendTo(u),n(b).addClass("btn-close").appendTo(u).html("&times;"),n(a).addClass("lightbox-status").appendTo(u),n(r).addClass("img-show").appendTo(u),n(u).addClass("lightbox animated faster "+i.inAnimation).appendTo("body"),h=0;h<o.length;h++)n(o).eq(h).attr({"data-num":h,id:"#img"+h});n(window).width()>620?n(u).css({width:i.width,height:i.height,position:"fixed",top:"50%",marginTop:-(i.height/2),left:"50%",marginLeft:-(i.width/2),zIndex:"999",overflow:"hidden"}):n(u).css({width:"100%",height:"100%",top:0,left:0});n(v).addClass("img-caption animated fadeInUp");n(o).click(function(){var o=n(this).clone(),i=n(this).attr("data-num")*1,u=n(this).attr("alt");n(this).prop("alt")==!1&&(u="");t=i;i+1==s?(n(f).hide(),n(e).show()):i==0?(n(e).hide(),n(f).show()):(n(f).show(),n(e).show());n(a).html(i+1+" / "+s);n(r).html(o).parent().fadeIn();n(v).html(u).appendTo(r)});n(f).click(function(){var i=s-1;t<i&&(t+=1);t+1===s&&n(f).hide();n(e).fadeIn();n(r).find("img").animate({left:"-100%",opacity:0},200,function(){n(r).html(n(o).eq(t).clone());c=n(r).find("img");l=n(c).attr("alt");n(c).prop("alt")===!1&&(l="");n(v).html(l).appendTo(r);n(a).html(t+1+" / "+s)})});n(e).click(function(){t>0&&(t-=1);n(f).fadeIn();n(r).find("img").animate({right:"-100%",opacity:0},200,function(){n(r).html(n(o).eq(t).clone());c=n(r).find("img");l=n(c).attr("alt");n(v).html(l).appendTo(r);n(a).html(t+1+" / "+s)});t===0&&n(e).hide()});n(".btn-close").click(function(){n(this).parent().fadeOut();t=0})})}}(jQuery);jQuery.event.special.touchstart={setup:function(n,t,i){try{t.includes("noPreventDefault")?this.addEventListener("touchstart",i,{passive:!1}):this.addEventListener("touchstart",i,{passive:!0})}catch(r){}}};jQuery.event.special.touchmove={setup:function(n,t,i){try{t.includes("noPreventDefault")?this.addEventListener("touchmove",i,{passive:!1}):this.addEventListener("touchmove",i,{passive:!0})}catch(r){}}},function(n){n.fn.replaceClass=function(n,t){return this.removeClass(n).addClass(t)}}(jQuery);
/*!mobile-detect v1.4.4 2019-09-21*/
/*!@license Copyright 2013, Heinrich Goebl, License: MIT, see https://github.com/hgoebl/mobile-detect.js*/
let portrait=window.matchMedia("(orientation: portrait)");if(portrait.onchange=n=>{n.matches?closeNav():closeNav()},detectMob()===!0){if("SpeechRecognition"in window||"webkitSpeechRecognition"in window){console.log("speech recognition API supported");recognition=new webkitSpeechRecognition||new SpeechRecognition;let i=document.querySelector("#MoteurRecherche"),n=document.createElement("i"),t=document.createElement("button");t.id="MyBtn";t.innerHTML=" ";n.classList.add("fa","fa-microphone");t.appendChild(n);i.appendChild(t);recognition.onresult=function(t){var r,i;for(console.log("result"),r="",i=t.resultIndex;i<t.results.length;i++)t.results[i].isFinal?r=t.results[i][0].transcript:r+=t.results[i][0].transcript;n.classList.remove("fa","fa-microphone","fared");n.classList.add("fa","fa-microphone","fablack");document.getElementById("PanelUp_scSearchControl_txtSearch").value=r;document.getElementById("PanelUp_scSearchControl_txtSearch").value!==""};recognition.onaudioend=()=>{n.classList.remove("fa","fa-microphone","fared"),n.classList.add("fa","fa-microphone","fablack"),document.getElementById("PanelUp_scSearchControl_txtSearch").value!==""&&$("#PanelUp_scSearchControl_btSearch").click()};function r(){recognition.start()}document.getElementById("MyBtn").addEventListener("click",function(t){t.preventDefault();document.getElementById("PanelUp_scSearchControl_txtSearch").value="";r();n.classList.remove("fa","fa-microphone","fablack");n.classList.add("fa","fa-microphone","fared")})}else console.log("speech recognition API not supported");"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(()=>{console.log("Service Worker Registered")})}
//function performCheck() {
//    if (checkValidationGroup("Inscript")) {
//        alert('it is valid');
//        return true;
//    }
//    else {
//        alert('No valid');
//        return false;
//    }
//}
//function checkValidationGroup(valGrp) {
//    var rtnVal = true;
//    for (i = 0; i < Page_Validators.length; i++) {
//        if (Page_Validators[i].validationGroup == valGrp) {
//            ValidatorValidate(Page_Validators[i]);
//            if (!Page_Validators[i].isvalid) { //at least one is not valid.
//                rtnVal = false;
//                break; //exit for-loop, we are done.
//            }
//        }
//    }
//    return rtnVal;
//}
var maval = false;

function ChangePhone() {
    if (document.getElementById("MainPanel_TextBoxPhoneSignup")) {
        if ((document.getElementById("MainPanel_TextBoxPhoneSignup").value != "") || (document.getElementById("MainPanel_TextBoxPhoneSignup").value != "")) {
            document.getElementById("MainPanel_telValid").value = "ok";
        }
        else {
            document.getElementById("MainPanel_telValid").value = "";
        }
    }
}

// variable utile pour la page Inscription.
var Thisok = "";
function telephone() {
 
    if (document.getElementById("MainPanel_TextBoxPhoneSignup")) {

        if ((document.getElementById("MainPanel_TextBoxPhoneSignup").value != "")
            || (document.getElementById("MainPanel_TextBoxCellPhoneSignup").value != "")
            && (document.getElementById("MainPanel_DropDownListJuridique")))
        {
             document.getElementById("Error2").innerHTML = "";
          
             if ((document.getElementById("Error2").innerHTML != "") || (document.getElementById("Error2Mob").innerHTML != "")) {

                 document.getElementById("MainPanel_telValid").value = "";
                 return false;
             } else {
                 document.getElementById("MainPanel_telValid").value = "oko";
                 return true;
             }

        
        }
        else {

            if (document.getElementById("MainPanel_DropDownListJuridique")) {
               // document.getElementById("Error2").innerHTML = txt_erreur.txtTelephone;
            } else {
               // document.getElementById("Error2Mob").innerHTML = " Le téléphone mobile n'est pas renseigné  ";
            }


            //if ((document.getElementById("MainPanel_TextBoxPhoneSignup").value != "") && (document.getElementById("MainPanel_TextBoxCellPhoneSignup").value == "")) {
            //    document.getElementById('ColorImageTextBoxPhone').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxPhone').style.display = 'inline-block';
            //    document.getElementById('ColorImageCellPhone').style.display = 'none';
            //} else {
            //    document.getElementById('ColorImageCellPhone').style.display = 'none';
            //    document.getElementById('ColorImageTextBoxPhone').style.display = 'none';

            //}
            //if ((document.getElementById("MainPanel_TextBoxPhoneSignup").value == "") && (document.getElementById("MainPanel_TextBoxCellPhoneSignup").value != "")) {
            //    document.getElementById('ColorImageCellPhone').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageCellPhone').style.display = 'inline-block';
            //    document.getElementById('ColorImageTextBoxPhone').style.display = 'none';
            //} else {
            //    document.getElementById('ColorImageCellPhone').style.display = 'none';
            //    document.getElementById('ColorImageTextBoxPhone').style.display = 'none';
            //}
            
            document.getElementById("star").innerHTML = "*";
            if (document.getElementById("star2")) { document.getElementById("star2").innerHTML = ""; }
            
            if ((document.getElementById("Error2").innerHTML != "") || (document.getElementById("Error2Mob").innerHTML != "")) {
               
                document.getElementById("MainPanel_telValid").value = "";
                return false;
            } else {
                document.getElementById("MainPanel_telValid").value = "oko";
                return true;
            }
        }
    }
}
function validate() {
    //debugger;
    var i;
    if (Page_ClientValidate("Inscript")) {
        return true;
    }
    else {
     
        if (document.getElementById('MainPanel_TextBoxSiretSignup') ) { EstSirenValide(); }
        if (document.getElementById('MainPanel_TextBoxPhoneSignup')) { telephone(); }
        

        for (i = 0; i < Page_Validators.length; i++) {

            var validatorGroupName = Page_Validators[i].validationGroup;

            var validatorControl = document.getElementById(Page_Validators[i].getAttribute("ID").toString());

            if (!Page_Validators[i].isvalid && validatorGroupName == 'Inscript') {

               


                if (document.getElementById('MainPanel_TextBoxZipCodeSignup')) {

                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxZipCodeSignup') {

                        document.getElementById('ColorImageTextBoxZipCode').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxZipCode').style.display = 'inline-block';
                    }
                }

                if (document.getElementById('MainPanel_TextBoxAddress1Signup')) {

                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxAddress1Signup') {

                        document.getElementById('ColorImageTextBoxAddress1').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxAddress1').style.display = 'inline-block';
                    }
                }
                if (document.getElementById('MainPanel_TextBoxCitySignup')) {

                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxCitySignup') {

                        document.getElementById('ColorImageTextBoxCitySignup').src = '/Images/b/errorForm.jpg';
                        if (document.getElementById('ColorImageTextBoxCColorImageTextBoxCitySignupitySignup')) {
                            document.getElementById('ColorImageTextBoxCColorImageTextBoxCitySignupitySignup').style.display = 'inline-block';
                        }
                    }
                }

                if (document.getElementById('MainPanel_TextBoxRaison')) {

                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxRaison') {
                      
                        document.getElementById('ColorImageTextBoxRaison').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxRaison').style.display = 'inline-block';
                    }
                }
                if (document.getElementById('MainPanel_DropDownListCivility')) {

                    if (validatorControl.controltovalidate == 'MainPanel_DropDownListCivility') {
                        
                        document.getElementById('ColorImageDropDownListCivility').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageDropDownListCivility').style.display = 'inline-block';
                    }
                }

                if (document.getElementById('MainPanel_TextBoxLastNameSignup')) {

                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxLastNameSignup') {
                        // alert('MainPanel_TextBoxLastNameSignup');
                        document.getElementById('ColorImageBoxLastName').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageBoxLastName').style.display = 'inline-block';
                    }
                }
                if (document.getElementById('MainPanel_TextBoxFirstNameSignup')) {

                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxFirstNameSignup') {
                        document.getElementById('ColorImageTextBoxFirstNameSignup').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxFirstNameSignup').style.display = 'inline-block';
                    }
                }
                if (document.getElementById('MainPanel_TextBoxSiretSignup')) {

                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxSiretSignup') {
                        var siren = document.getElementById('MainPanel_TextBoxSiretSignup').value;
                        if (EstSirenValide() == false && document.getElementById('MainPanel_DropDownListJuridique').value !== "ASS") {
                            document.getElementById("Error").innerHTML = txt_erreur.SirenInvalide;
                            document.getElementById("MainPanel_TextBoxSiretSignup").select();
                            document.getElementById("MainPanel_TextBoxSiretSignup").focus();
                            return false;
                        } else {
                            if (siren !== "" && document.getElementById('MainPanel_DropDownListJuridique').value === "ASS") {
                                if (EstSirenValide() == false) {
                                    document.getElementById("Error").innerHTML = txt_erreur.SirenInvalide;
                                    document.getElementById("MainPanel_TextBoxSiretSignup").select();
                                    document.getElementById("MainPanel_TextBoxSiretSignup").focus();
                                }
                            }
                        }

                        document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block';
                    }
                }
                if (document.getElementById('MainPanel_TextBoxPhoneSignup')) {

                    if (telephone() == false) {
                        return false;
                    }
                }
                if (document.getElementById('MainPanel_TextBoxRaisonSignup')) {

                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxRaisonSignup') {

                        document.getElementById('ColorImageTextBoxRaison').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxRaison').style.display = 'inline-block';
                    }
                }
                if (document.getElementById('MainPanel_TextBoxSiretSignup')) {
                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxSiretSignup') {
                        document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block';
                    }
                }
                if (document.getElementById('MainPanel_TextBoxAddress1Signup')) {
                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxAddress1Signup') {
                        document.getElementById('ColorImageTextBoxAddress1').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxAddress1').style.display = 'inline-block';
                    }
                }
                if (validatorControl.controltovalidate == 'MainPanel_TextBoxZipCodeSignup') {
                    document.getElementById('ColorImageTextBoxZipCode').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxZipCode').style.display = 'inline-block';
                }
                if (validatorControl.controltovalidate == 'MainPanel_TextBoxCity') {
                    document.getElementById('ColorImageTextBoxCity').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxCity').style.display = 'inline-block';
                }
                if (validatorControl.controltovalidate == 'MainPanel_TextBoxCitySignup') {
                    document.getElementById('ColorImageTextBoxCitySignup').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxCitySignup').style.display = 'inline-block';
                }
            }
            else {

                if (validatorControl.id == 'ImageValidator') { document.getElementById('ColorImage').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImage').style.display = 'block'; }
            }
        }
    }

    return false;
}
function resetValidation(event) {

    if (event.id == 'ImageTextBox') { document.getElementById('ColorImage').style.display = 'none'; }
   // if (!el || typeof el.id === "undefined") return;

    // Exemple : Masquer l'image associée si elle existe
    //const image = document.getElementById("ColorImage" + el.id.replace("MainPanel_", ""));
    //if (image) {
    //    image.style.display = 'none';
    //}
}



function singleValidation(event) {

    for (i = 0; i < Page_Validators.length; i++) {

        var validatorControl = document.getElementById(Page_Validators[i].getAttribute("ID").toString());

        if (event.id == 'MainPanel_TextBoxRaison' && validatorControl.controltovalidate == 'MainPanel_TextBoxRaison') {

            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImage').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImage').style.display = 'inline-block';
            }
            else { document.getElementById('ColorImage').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImage').style.display = 'inline-block'; }
            break;
        }
        if (event.id == 'MainPanel_DropDownListCivility' && validatorControl.controltovalidate == 'MainPanel_DropDownListCivility') {

            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageDropDownListCivility').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageDropDownListCivility').style.display = 'inline-block';
            }
            else { document.getElementById('ColorImageDropDownListCivility').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageDropDownListCivility').style.display = 'inline-block'; }
            break;
        }


        if (event.id == 'MainPanel_TextBoxLastNameSignup' && validatorControl.controltovalidate == 'MainPanel_TextBoxLastNameSignup') {

            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageBoxLastName').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageBoxLastName').style.display = 'inline-block';
            }
            else { document.getElementById('ColorImageBoxLastName').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageBoxLastName').style.display = 'inline-block'; }
            break;
        }
        if (event.id == 'MainPanel_TextBoxFirstNameSignup' && validatorControl.controltovalidate == 'MainPanel_TextBoxFirstNameSignup') {

            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextBoxFirstNameSignup').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxFirstNameSignup').style.display = 'inline-block';
            }
            else { document.getElementById('ColorImageTextBoxFirstNameSignup').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxFirstNameSignup').style.display = 'inline-block'; }
            break;
        }
        if (event.id == 'MainPanel_TextBoxAddress1Signup' && validatorControl.controltovalidate == 'MainPanel_TextBoxAddress1Signup') {
            //alert(event.id);
            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {

                document.getElementById('ColorImageTextBoxAddress1').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxAddress1').style.display = 'inline-block';
                //  return false;
            }
            else { document.getElementById('ColorImageTextBoxAddress1').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxAddress1').style.display = 'inline-block'; }
            break;
        }
        if (event.id == 'MainPanel_TextBoxSiretSignup' && validatorControl.controltovalidate == 'MainPanel_TextBoxSiretSignup'  ) {

            ValidatorValidate(validatorControl);

            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block';

                return false;
            } else
                if (EstSirenValide() == false && document.getElementById('MainPanel_DropDownListJuridique').value !== "ASS") {
                    var siren = "";
                    if (document.getElementById("MainPanel_TextBoxSiretSignup")) {
                        siren = document.getElementById("MainPanel_TextBoxSiretSignup").value;
                    }
                    if (((siren.substring(0, 1) == "1") || (siren.substring(0, 1) == "2")) && (siren.length >= 9)) {
                        document.getElementById("Error").innerHTML = txt_erreur.SirenInvalide14;
                    }
                    else if (siren.length > 9) {
                        document.getElementById("Error").innerHTML = txt_erreur.SirenInvalide14;
                    }
                    else {
                        document.getElementById("Error").innerHTML = txt_erreur.SirenInvalide + "   ";
                    }
                    document.getElementById("MainPanel_TextBoxSiretSignup").select();
                    document.getElementById("MainPanel_TextBoxSiretSignup").focus();
                }
                else { document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block'; }
            break;
        }
        if (event.id == 'MainPanel_isSirenVAL' && validatorControl.controltovalidate == 'MainPanel_isSirenVAL') {
            //alert(event.id);
            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {

                document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block';
                // return false;
            }
            else { document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block'; }
            break;
        }
        if (event.id == 'MainPanel_TextBoxZipCodeSignup' && validatorControl.controltovalidate == 'MainPanel_TextBoxZipCodeSignup') {

            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextBoxZipCode').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxZipCode').style.display = 'inline-block';
                //return false;
            }
            else {
                document.getElementById('ColorImageTextBoxZipCode').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxZipCode').style.display = 'inline-block';
            }
            break;
        }
        if (event.id == 'MainPanel_TextBoxCitySignup' && validatorControl.controltovalidate == 'MainPanel_TextBoxCitySignup') {
            //alert(event.id);
            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextBoxCitySignup').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxCitySignup').style.display = 'inline-block';
                //return false;
            }
            else { document.getElementById('ColorImageTextBoxCitySignup').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxCitySignup').style.display = 'inline-block'; }
            break;
        }

        if (event.id == 'MainPanel_telValid' && validatorControl.controltovalidate == 'MainPanel_telValid') {
            //alert(event.id);
            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageCellPhone').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageCellPhone').style.display = 'inline-block';
                //return false;
            }
            else { document.getElementById('ColorImageCellPhone').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageCellPhone').style.display = 'inline-block'; }
            break;
        }

        if (event.id == 'MainPanel_TextBoxZipCode' && validatorControl.controltovalidate == 'MainPanel_TextBoxZipCode') {
            //alert(event.id);
            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextBoxZipCode').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxZipCode').style.display = 'inline-block';
                //return false;
            }
            else {
                //document.getElementById('ColorImageTextBoxZipCode').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxZipCode').style.display = 'inline-block';
            }
            break;
        }
     
        if (event.id == 'MainPanel_TextBoxMail' && validatorControl.controltovalidate == 'MainPanel_TextBoxMail') {
            //alert(event.id);
            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageEmail').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageEmail').style.display = 'inline-block';
                //return false;
            }
            else {
                //document.getElementById('ColorImageEmail').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageEmail').style.display = 'inline-block';
            }
            break;
        }
        if (event.id == 'MainPanel_TextBoxPhone' && validatorControl.controltovalidate == 'MainPanel_TextBoxPhone') {
            //alert(event.id);
            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageCellPhone').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageCellPhone').style.display = 'inline-block';
                //return false;
            }
            else { document.getElementById('ColorImageCellPhone').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageCellPhone').style.display = 'inline-block'; }
            break;
        }
        if (event.id == 'MainPanel_TextBoxFirstName' && validatorControl.controltovalidate == 'MainPanel_TextBoxFirstName') {
            //alert(event.id); 
       
            ValidatorEnable(validatorControl);
            if (!validatorControl.isvalid) {
                debugger;
                document.getElementById('ColorImageTextBoxFirstName').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxFirstName').style.display = 'inline-block';
                //return false;
            }
            else {
                //document.getElementById('ColorImageTextBoxFirstName').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxFirstName').style.display = 'inline-block';
            }
            break;
        }
        if (event.id == 'MainPanel_TextBoxCity' && validatorControl.controltovalidate == 'MainPanel_TextBoxCity') {
            //alert(event.id);
            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextBoxCity').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxCity').style.display = 'inline-block';
                //return false;
            }
            else {
                //document.getElementById('ColorImageTextBoxCity').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxCity').style.display = 'inline-block';
            }
            break;
        }
    }
}

function EstSirenValide() {

    debugger;
    if (document.getElementById("MainPanel_TextBoxSiretSignup") || document.getElementById("MainPanel_TextBoxSiret")) {
        var siren = "";
        if (document.getElementById("MainPanel_TextBoxSiretSignup")) {
            siren = document.getElementById("MainPanel_TextBoxSiretSignup").value;
        }
        if (document.getElementById("MainPanel_TextBoxSiret")) {
            siren = document.getElementById("MainPanel_TextBoxSiret").value;
        }
        var Strnl = 9;
        var Paire = 1;

        if (siren.length > 9) {
            Strnl = 14;
            Paire = 0;
        }

        if (((siren.substring(0, 1) == "1") || (siren.substring(0, 1) == "2")) && (siren.length >= 9)) {
            Strnl = 14;
            Paire = 0;
        }

        if ((siren.length != parseInt(Strnl)) || (isNaN(siren))) {
            estValide = false;
        }
        else if (siren == "000000000") {
            estValide = false;
        }
        else {
            // Donc le SIREN est un numérique à 9 chiffres ou 14
            var somme = 0;
            var tmp;
            for (var cpt = 0; cpt < siren.length; cpt++) {
                if ((cpt % 2) == parseInt(Paire)) {
                    tmp = siren.charAt(cpt) * 2;
                    if (tmp > 9)
                        tmp -= 9;
                }
                else
                    tmp = siren.charAt(cpt);
                somme += parseInt(tmp);
            }

            if ((somme % 10) == 0) {
                estValide = true;
                document.getElementById("Error").innerHTML = "";
                document.getElementById("MainPanel_isSirenVAL").value = "1";
            }
            else {
                estValide = false;
                if (parseInt(Strnl) == 9) {
                    document.getElementById("Error").innerHTML = txt_erreur.SirenInvalide;
                }
                if (parseInt(Strnl) == 14) {
                    document.getElementById("Error").innerHTML = txt_erreur.SirenInvalide14;
                }

                document.getElementById("MainPanel_isSirenVAL").value = "";
                if (document.getElementById("MainPanel_TextBoxSiretSignup")) {
                    document.getElementById("MainPanel_TextBoxSiretSignup").select();
                    document.getElementById("MainPanel_TextBoxSiretSignup").focus();
                }
                if (document.getElementById("MainPanel_TextBoxSiret")) {
                    document.getElementById("MainPanel_RegularExpressionValidator2").style.display = "none";
                    document.getElementById("MainPanel_TextBoxSiret").select();
                    document.getElementById("MainPanel_TextBoxSiret").focus();
                }
                return false;
            }
        }
    } else { estValide = true;}
    return estValide;
}

function validateAddress() {
    debugger;
    var i;
    var isValid = false;
    isValid = Page_ClientValidate("Address");
    if (isValid) {
       isValid = Page_ClientValidate('AddressRev');
    }
    //if (Page_ClientValidate("Address")) {
    if (isValid) {
        return isValid;
    }
    else {
        debugger;
        if (document.getElementById('waitANDsee')) {
            document.getElementById("waitANDsee").style.display = "none";
        }
          
        for (i = 0; i < Page_Validators.length; i++) {
           
            var validatorGroupName = Page_Validators[i].validationGroup;
            var validatorControl = document.getElementById(Page_Validators[i].getAttribute("ID").toString());

            if (!Page_Validators[i].isvalid && validatorGroupName == 'Address') {

                if (document.getElementById('MainPanel_TextBoxRaisonAdre')) {
                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxRaisonAdre') {
                        if (document.getElementById('ColorImageTextBoxRaisonAdre')) {
                            document.getElementById('ColorImageTextBoxRaisonAdre').src = '/Images/b/errorForm.jpg';
                            document.getElementById('ColorImageTextBoxRaisonAdre').style.display = 'inline-block';
                        }
                    }
                }
                if (validatorControl.controltovalidate == 'MainPanel_DropDownListContactList') {
                    document.getElementById('ColorImageTextDropDownListContactList').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextDropDownListContactList').style.display = 'inline-block';
                }
                if (validatorControl.controltovalidate == 'MainPanel_TextBoxAddress1SignupAdre') {
                    document.getElementById('ColorImageTextBoxAddress1Adre').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxAddress1Adre').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxAddress1Adre') {
                    document.getElementById('ColorImageTextBoxAddress1Adre').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxAddress1Adre').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxAddress1Adre') {
                    document.getElementById('ColorImageTextBoxZipCodeAdre').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxZipCodeAdre').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxZipCodeAdre') {
                    if (document.getElementById('ColorImageTextBoxZipCodeAdre')) {
                        document.getElementById('ColorImageTextBoxZipCodeAdre').src = '/Images/b/errorForm.jpg';
                        document.getElementById('ColorImageTextBoxZipCodeAdre').style.display = 'inline-block';
                    }
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxCityAdre') {
                    document.getElementById('ColorImageTextBoxCityAdre').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxCityAdre').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxPhoneSignupAdre') {
                    document.getElementById('ColorImageTextBoxPhoneAdre').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxPhoneAdre').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxPreNomAdre') {
                    document.getElementById('ColorImageTextBoxPreNomAdre').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxPreNomAdre').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxNomAdre') {
                    document.getElementById('ColorImageTextBoxNomAdre').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxNomAdre').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxMailAdre') {
                    document.getElementById('ColorImageTextBoxMailAdre').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxMailAdre').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxMailAdre') {
                    document.getElementById('ColorImageTextBoxMailAdre').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxMailAdre').style.display = 'inline-block';
                }
            }
        }
         
    }
    if (document.getElementById('waitANDsee')) {
        document.getElementById("waitANDsee").style.display = "none";
    }
    return false;
}

function validateAddressRev() {
    var i;
    var isValidRev = false;
    isValidRev = Page_ClientValidate("AddressRev");
    if (isValidRev) {
        isValidRev = Page_ClientValidate('AddressRev');
    }

    if (isValidRev) {
        sessionStorage.setItem('DropShipping', 'yes');
        return isValidRev;
    }
    else {
        debugger;
        sessionStorage.setItem('DropShipping', 'not');
        if (document.getElementById('waitANDsee')) {
            document.getElementById("waitANDsee").style.display = "none";
        }

        for (i = 0; i < Page_Validators.length; i++) {

            var validatorGroupName = Page_Validators[i].validationGroup;
            var validatorControl = document.getElementById(Page_Validators[i].getAttribute("ID").toString());

            if (!Page_Validators[i].isvalid && validatorGroupName == 'AddressRev') {

                if (document.getElementById('MainPanel_TextBoxRaisonRev')) {
                    if (validatorControl.controltovalidate == 'MainPanel_TextBoxRaisonRev') {
                        if (document.getElementById('ColorImageTextBoxRaisonRev')) {
                            document.getElementById('ColorImageTextBoxRaisonRev').src = '/Images/b/errorForm.jpg';
                            document.getElementById('ColorImageTextBoxRaisonRev').style.display = 'inline-block';
                        }
                    }
                }
                if (validatorControl.controltovalidate == 'MainPanel_TextBoxMailRev') {
                    document.getElementById('ColorImageTextBoxMailRev').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxMailRev').style.display = 'inline-block';
                }
                if (validatorControl.controltovalidate == 'MainPanel_TextBoxLastNameRev') {
                    document.getElementById('ColorImageTextBoxLastNameRev').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxLastNameRev').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextAliasRev') {
                    document.getElementById('ColorImageTextAliasRev').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextAliasRev').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxPreNomRev') {
                    document.getElementById('ColorImageTextBoxPreNomRev').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxPreNomRev').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxAddress1Rev') {
                    if (document.getElementById('ColorImageTextBoxAddress1Rev')) {
                        document.getElementById('ColorImageTextBoxAddress1Rev').src = '/Images/b/errorForm.jpg';
                        document.getElementById('ColorImageTextBoxAddress1Rev').style.display = 'inline-block';
                    }
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxZipCodeRev') {
                    document.getElementById('ColorImageTextBoxZipCodeRev').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxZipCodeRev').style.display = 'inline-block';
                }

                if (validatorControl.controltovalidate == 'MainPanel_TextBoxCityRev') {
                    document.getElementById('ColorImageTextBoxCityRev').src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxCityRev').style.display = 'inline-block';
                }

            }  
        } 

    }
    if (document.getElementById('waitANDsee')) {
        document.getElementById("waitANDsee").style.display = "none";
    }
    return false;
}

function oneValidation(evenem) {

    for (i = 0; i < Page_Validators.length; i++) {

        var validatorControl = document.getElementById(Page_Validators[i].getAttribute("ID").toString());

        if (evenem.id == 'MainPanel_TextBoxRaisonAdre' && validatorControl.controltovalidate == 'MainPanel_TextBoxRaisonAdre') {

            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextBoxRaisonAdre').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxRaisonAdre').style.display = 'inline-block';
            }
            else { document.getElementById('ColorImageTextBoxRaisonAdre').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxRaisonAdre').style.display = 'inline-block'; }
            break;
        }
        if (evenem.id == 'MainPanel_DropDownListContactList' && validatorControl.controltovalidate == 'MainPanel_DropDownListContactList') {

            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextDropDownListContactList').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextDropDownListContactList').style.display = 'inline-block';
            }
            else { document.getElementById('ColorImageTextDropDownListContactList').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextDropDownListContactList').style.display = 'inline-block'; }
            break;
        }
        if (evenem.id == 'MainPanel_TextBoxAddress1SignupAdre' && validatorControl.controltovalidate == 'MainPanel_TextBoxAddress1SignupAdre') {

            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextBoxAddress1Adre').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxAddress1Adre').style.display = 'inline-block';
            }
            else { document.getElementById('ColorImageTextBoxAddress1Adre').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxAddress1Adre').style.display = 'inline-block'; }
            break;
        }
        if (evenem.id == 'MainPanel_TextBoxZipCodeAdre' && validatorControl.controltovalidate == 'MainPanel_TextBoxZipCodeAdre') {
            //alert(evenem.id);
            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {

                document.getElementById('ColorImageTextBoxZipCodeAdre').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxZipCodeAdre').style.display = 'inline-block';
                return false;
            }
            else { document.getElementById('ColorImageTextBoxZipCodeAdre').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxZipCodeAdre').style.display = 'inline-block'; }
            break;
        }

        if (evenem.id == 'MainPanel_TextBoxCityAdre' && validatorControl.controltovalidate == 'MainPanel_TextBoxCityAdre') {

            ValidatorValidate(validatorControl);
            if (!validatorControl.isvalid) {
                document.getElementById('ColorImageTextBoxCityAdre').src = '/Images/b/errorForm.jpg'; document.getElementById('ColorImageTextBoxCityAdre').style.display = 'inline-block';
                return false;
            }
            else { document.getElementById('ColorImageTextBoxCityAdre').src = '/Images/b/ValideForm.jpg'; document.getElementById('ColorImageTextBoxCityAdre').style.display = 'inline-block'; }
            break;
        }


    }
}

$(document).ready(function () {
    if ($('#MainPanel_LivreExistant').attr('checked')) {
        IfContratChecked("TextContactMAIL");
        IfContratChecked("TextContact");
        //$("")
    } else {
        remouveAttrib("TextContactMAIL");
        remouveAttrib("TextContact");
    }

    if ($('#MainPanel_AdresseExistante').attr('checked') || $('#MainPanel_CheckBoxSameAdress').attr('checked')) {
        IfContratChecked("StyleTexteAdresse");
        if (ModeregleComptant == "X") {
            remouveAttrib("StyleTexteAdresseNew");
        } else { IfContratChecked("StyleTexteAdresseNew"); }

    } else {
        remouveAttrib("StyleTexteAdresse");
    }
    if ($("#MainPanel_CheckBoxClientExist").attr('checked')) {
        IfContratChecked("StyleTextREv");
    } else {
        remouveAttrib("StyleTextREv");
    }

    if ($("#MainPanel_TextBoxMailAdre").val() == "") {

        $("#MainPanel_TextBoxMailAdre").addClass("TextContactMAIL");
        $("#MainPanel_TextBoxMailAdre").prop('readonly', false);
    }
});

function IfContratChecked(Texttochange) {
    $('input.' + Texttochange).each(function () {
        $(this).prop('readonly', true);

        if (Texttochange == "TextContact") {
            $('#CiviliteContact').show();
        }
        if (Texttochange == "StyleTexteAdresse") {
            $('#MainPanel_DropDownListClosingDay').prop('readonly', true);
        }
  
        if (Texttochange == "StyleTextREv") {
            $('#CiviliteContactDropship').show();
        }

    });
    $('select.' + Texttochange).each(function () {
        if (Texttochange == "TextContact") {

            $('#CiviliteContact').show();
        }
    });
}

function remouveAttrib(Texttochange) {

    $('input.' + Texttochange).each(function () {
        $(this).removeAttr('readonly');
        $('#MainPanel_DropDownListCivilitAdr').removeAttr('readonly');
        if (Texttochange == "TextContact") {
            $('#CiviliteContact').hide();
        }
        if (Texttochange == "StyleTexteAdresse") {
            //$('#MainPanel_DropDownListClosingDay').removeAttr('disabled');
        }
        if (Texttochange == "StyleTextREv") {
            $('#CiviliteContactDropship').hide();
        }

    });
    $('select.' + Texttochange).each(function () {
        if (Texttochange == "TextContact") {

            $('#CiviliteContact').hide();
        }
    });
}

function ifStyleTexteAdresse() {


    $('input.TextContact').each(function () {

        $(this).prop('readonly', true);

    });
}




 
 
function GetURLParameterSort(sParam) {
    var sPageURL = window.location.search.substring(1);
    var sURLVariables = sPageURL.split("&");
    for (var i = 0; i < sURLVariables.length; i++) {
        var sParameterName = sURLVariables[i].split("=");
        if (sParameterName[0].toLowerCase() == sParam.toLowerCase()) {
            return sParameterName[1];
        }
    }
    return "";
}

// fait défiler la page jusqu'à l'endroit où elle était avant le postback
// inspiré de : http://aspsnippets.com/Articles/ASPNet-MaintainScrollPositionOnPostback-not-working-in-Firefox-and-Chrome.aspx
// adapté par Christiane Lagacé : http://christianelagace.com
function atteindreDernierePositionDefilement(position) {
    var scrollY = parseInt(position);
    if (!isNaN(scrollY)) {
        window.scrollTo(0, scrollY);
    }
}
// retient la position de défilement de la page
// inspiré de : http://aspsnippets.com/Articles/ASPNet-MaintainScrollPositionOnPostback-not-working-in-Firefox-and-Chrome.aspx
function retenirPositionDefilement() {
    var scrollY = document.body.scrollTop;
    if (scrollY == 0) {
        if (window.pageYOffset) {
            scrollY = window.pageYOffset;
        }
        else {
            scrollY = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
        }
    }
    if (scrollY > 0) {
        var input = document.getElementById("scrollY");
        if (input == null) {
            input = document.createElement("input");
            input.setAttribute("type", "hidden");
            input.setAttribute("id", "scrollY");
            input.setAttribute("name", "scrollY");
            document.forms[0].appendChild(input);
        }
        input.value = scrollY;
    }
}

$(function () {
    var tempsTouch;
    var IntervalEffectue = 5000;
    var $input = $('#MainPanel_TextBoxSiretSignup');


    $input.on('keyup', function () {
        clearTimeout(tempsTouch);
        tempsTouch = setTimeout(VerifieSiret, IntervalEffectue);
    });

    //on keydown, clear the countdown 
    $input.on('keydown', function () {
        clearTimeout(tempsTouch);
    });


    function VerifieSiret() {
        if (document.getElementById('MainPanel_DropDownListJuridique')) {
            if (document.getElementById('MainPanel_TextBoxSiretSignup').value !== "" && document.getElementById('MainPanel_DropDownListJuridique').value === "ASS") {
                if ((document.getElementById('MainPanel_TextBoxSiretSignup').value.length == 9)) {
                    if (EstSirenValide_Asso() == false) {
                        document.getElementById("Error").innerHTML = "Votre SIREN ou SIRET n’est pas valide. Merci de vérifier votre saisie.";
                        document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg';
                        //document.getElementById('MainPanel_TextBoxSiretSignup').value = "";
                    }
                }
                if ((document.getElementById('MainPanel_TextBoxSiretSignup').value.length == 14)) {
                    if (EstSirenValide_Asso() == false) {
                        document.getElementById("Error").innerHTML = "Votre SIREN ou SIRET n’est pas valide. Merci de vérifier votre saisie.";
                        document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg';

                    }
                }
                if (document.getElementById('MainPanel_TextBoxSiretSignup').value == "") { $("#Error").hide(); }
            }
        }
    }
    $("#MainPanel_TextBoxSiretSignup").on("keyup focusout oninput", function () {
        if (document.getElementById('MainPanel_DropDownListJuridique')) {
            if (document.getElementById('MainPanel_TextBoxSiretSignup').value !== "" && document.getElementById('MainPanel_DropDownListJuridique').value === "ASS") {
                if ($("#Error").css('display') == "inline-block") { document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg'; }
            }
            if (document.getElementById('MainPanel_TextBoxSiretSignup')) {
                if ((document.getElementById('MainPanel_TextBoxSiretSignup').value.length < 9)) {

                    document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block';
                    document.getElementById("Error").innerHTML = "Votre SIREN ou SIRET n’est pas valide. Il doit contenir 9 ou 14 chiffres ";

                }
            }
            if (document.getElementById('MainPanel_TextBoxSiretSignup')) {
                if ((document.getElementById('MainPanel_TextBoxSiretSignup').value.length > 9)
                    && (document.getElementById('MainPanel_TextBoxSiretSignup').value.length < 14)) {

                    document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg';
                    document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block';
                    document.getElementById("Error").innerHTML = "Votre SIREN ou SIRET n’est pas valide. Il doit contenir 9 ou 14 chiffres ";

                    if (document.getElementById('MainPanel_TextBoxSiretSignup').value == "") { $("#Error").hide(); document.getElementById('ColorImageTextBoxSiret').style.display = 'none'; }
                }
                if (document.getElementById('MainPanel_TextBoxSiretSignup').value.length === 9) {

                    if (EstSirenValide_Asso()) { document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/ValideForm.jpg'; }
                }
                if (document.getElementById('MainPanel_TextBoxSiretSignup').value.length == 14) {
                    if (EstSirenValide_Asso()) { document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/ValideForm.jpg'; }
                }

            }
        }

        if (document.getElementById('MainPanel_TextBoxSiretSignup')) {
            if ((document.getElementById('MainPanel_TextBoxSiretSignup').value.length == 0)) {

                document.getElementById("ColorImageTextBoxSiret").src = '/Images/spacer.gif';
                document.getElementById('ColorImageTextBoxSiret').style.display = 'none';
                document.getElementById("Error").innerHTML = "";

            }
        }
    });

    $("#MainPanel_ImageButtonNextSignup").on("mouseover click  ", function () {
        if (document.getElementById('MainPanel_DropDownListJuridique')) {
            if (document.getElementById('MainPanel_TextBoxSiretSignup').value !== "" && document.getElementById('MainPanel_DropDownListJuridique').value === "ASS") {
                if ($("#Error").css('display') == "inline-block") { document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg'; }
            }
            if (document.getElementById('MainPanel_TextBoxSiretSignup')) {
                if ((document.getElementById('MainPanel_TextBoxSiretSignup').value.length < 9)) {

                    //document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg';
                    //document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block';
                    //document.getElementById("Error").innerHTML = "Votre SIREN ou SIRET n’est pas valide. Il doit contenir 9 ou 14 chiffres ";

                }
            }
            if (document.getElementById('MainPanel_TextBoxSiretSignup')) {
                if ((document.getElementById('MainPanel_TextBoxSiretSignup').value.length > 9)
                    && (document.getElementById('MainPanel_TextBoxSiretSignup').value.length < 14)) {

                    //document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg';
                    //document.getElementById('ColorImageTextBoxSiret').style.display = 'inline-block';
                    //document.getElementById("Error").innerHTML = "Votre SIREN ou SIRET n’est pas valide. Il doit contenir 9 ou 14 chiffres ";

                    if (document.getElementById('MainPanel_TextBoxSiretSignup').value == "") {
                        $("#Error").hide();
                        document.getElementById('ColorImageTextBoxSiret').style.display = 'none';
                    }
                }
                if (document.getElementById('MainPanel_TextBoxSiretSignup').value.length == 9) {

                    if (EstSirenValide_Asso()) { document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/ValideForm.jpg'; }
                }
                if (document.getElementById('MainPanel_TextBoxSiretSignup').value.length == 14) {
                    if (EstSirenValide_Asso()) { document.getElementById('ColorImageTextBoxSiret').src = '/Images/b/ValideForm.jpg'; }
                }

            }
        }
    });



    function EstSirenValide_Asso() {


        if (document.getElementById("MainPanel_TextBoxSiretSignup") || document.getElementById("MainPanel_TextBoxSiret")) {
            var siren = "";
            if (document.getElementById("MainPanel_TextBoxSiretSignup")) {
                siren = document.getElementById("MainPanel_TextBoxSiretSignup").value;
            }
            if (document.getElementById("MainPanel_TextBoxSiret")) {
                siren = document.getElementById("MainPanel_TextBoxSiret").value;
            }
            var Strnl = 9;
            var Paire = 1;

            if (siren.length > 9) {
                Strnl = 14;
                Paire = 0;
            }

            if (((siren.substring(0, 1) == "1") || (siren.substring(0, 1) == "2")) && (siren.length >= 9)) {
                Strnl = 14;
                Paire = 0;
            }

            if ((siren.length != parseInt(Strnl)) || (isNaN(siren))) {
                estValide = false;
            }
            else if (siren == "000000000") {
                estValide = false;
            }
            else {
                // Donc le SIREN est un numérique à 9 chiffres ou 14 Attention accolade???
                var somme = 0;
                var tmp;
                for (var cpt = 0; cpt < siren.length; cpt++) {
                    if ((cpt % 2) == parseInt(Paire)) {
                        tmp = siren.charAt(cpt) * 2;
                        if (tmp > 9)
                            tmp -= 9;
                    }
                    else
                        tmp = siren.charAt(cpt);
                    somme += parseInt(tmp);
                }

                if ((somme % 10) == 0) {
                    estValide = true;
                    document.getElementById("Error").innerHTML = "";
                    document.getElementById("MainPanel_isSirenVAL").value = "1";
                }
                else {
                    estValide = false;
                    if (parseInt(Strnl) == 9) {
                        document.getElementById("Error").innerHTML = "Votre SIREN ou SIRET n’est pas valide. Merci de vérifier votre saisie.";
                        document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg';
                    }
                    if (parseInt(Strnl) == 14) {
                        document.getElementById("Error").innerHTML = "Votre SIREN ou SIRET n’est pas valide. Merci de vérifier votre saisie.";
                        document.getElementById("ColorImageTextBoxSiret").src = '/Images/b/errorForm.jpg';
                    }

                    document.getElementById("MainPanel_isSirenVAL").value = "";
                    if (document.getElementById("MainPanel_TextBoxSiretSignup")) {

                        document.getElementById("MainPanel_TextBoxSiretSignup").focus();
                    }
                    if (document.getElementById("MainPanel_TextBoxSiret")) {
                        document.getElementById("MainPanel_RegularExpressionValidator2").style.display = "none";
                        document.getElementById("MainPanel_TextBoxSiret").select();
                        document.getElementById("MainPanel_TextBoxSiret").focus();
                    }
                    return false;
                }
            }
        } else { estValide = true; }
        return estValide;
    }




    $('.tooltipHoraire').tooltipster({
        animation: 'fall',
        interactive: true,
        debug: false,
        contentAsHTML: true,
        theme: 'tooltipster-noir',
        trigger: 'custom',
        triggerOpen: {
             click: true,
            //mouseenter: true,
            touchstart: true
        },
        triggerClose: {
            click: true,
            scroll: true,
            tap: true,
            //mouseleave: true
        }
    });

     

});

function isInt2(n){var t=parseFloat(n);return!isNaN(n)&&(t|0)===t}function ChangeVal(){isInt2(document.aspnetForm.ctl00$PanelUp$ajoutrapideControl$Qte.value)||(document.aspnetForm.ctl00$PanelUp$ajoutrapideControl$Qte.value=document.aspnetForm.ctl00$PanelUp$ajoutrapideControl$Valutemp.value)}function Fire(n){var t=n.keyCode?n.keyCode:n.which;t!=null&&(t=parseInt(t,10),t==13&&(__doPostBack("ctl00$PanelUp$ajoutrapideControl$AddArticle",""),document.body.focus(),window.event.srcElement.focus()))}function InitializeRequestHandler(n,t){t.get_postBackElement().name!==undefined?(ListeIdfullnameOrId=t.get_postBackElement().name,postBackElementID=t.get_postBackElement().name.replace(/\$/g,"_").substring(t.get_postBackElement().name.replace(/\$/g,"_").lastIndexOf("_")+1)):(postBackElementID=t.get_postBackElement().id.substring(t.get_postBackElement().id.lastIndexOf("_")+1),ListeIdfullnameOrId=t.get_postBackElement().id);t.get_postBackElement().id!==undefined&&(ListeIdfullnameOrId=t.get_postBackElement().id);document.getElementById("paniereffet").style.display=ListeIdfullnameOrId.indexOf("AddCompare")!==-1||ListeIdfullnameOrId.indexOf("FicheCompare")!==-1?"none":"block"}function EndRequestHandler(){document.getElementById("affichageanim").style.display="none";postBackElementID=="UpdatePanelBasket"&&(document.getElementById("affichageanim").style.display="block",$("#Entetemenu").css("z-index","14"),$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(10),$(".overlay").stop(!0,!0).fadeIn(10),setTimeout(function(){$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeOut(10)},5e3),masqueCommentaireVide());postBackElementID=="imgDelete"&&(menuTOP==!1?($(".divBasket").find(".divBasketHidden").addClass("positionbasketfixed"),$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(10)):$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(10));postBackElementID=="btAdd"&&(menuTOP==!1?($(".divBasket").find(".divBasketHidden").addClass("positionbasketfixed"),$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(10)):$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(10));postBackElementID=="btSubtract"&&(menuTOP==!1?($(".divBasket").find(".divBasketHidden").addClass("positionbasketfixed"),$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(10)):$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(10));postBackElementID=="txtQuantity"&&(menuTOP==!1?($(".divBasket").find(".divBasketHidden").addClass("positionbasketfixed"),$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(10)):$(".divBasket").find(".divBasketHidden").stop(!0,!0).fadeIn(10));postBackElementID=="UpdatePanelBasket"&&menuTOP==!1&&$(".divBasket").find(".divBasketHidden").addClass("positionbasketfixed");postBackElementID=="AddToBasket"?(menuTOP==!1&&$(".divBasket").find(".divBasketHidden").addClass("positionbasketfixed"),rebindmethod(),findtoloadDisponibilite(ListeIdfullnameOrId,"NOTALL")):ListeIdfullnameOrId.indexOf("AddToBasket")!==-1&&(rebindmethod(),findtoloadDisponibilite(ListeIdfullnameOrId,"NOTALL"));postBackElementID=="CodeProduit"&&(ChangeVal(),masqueCommentaireVide(),window.setTimeout(function(){document.getElementById("ctl00_PanelUp_ajoutrapideControl_Qte").focus()},5),document.getElementById("ctl00_PanelUp_ajoutrapideControl_Qte").select());postBackElementID=="ImageButtonDeletee";postBackElementID=="AddArticle"&&(document.getElementById("affichageanim").style.display="block",document.getElementById("PanelUp_ajoutrapideControl_CodeProduit").value=txt_erreur.CodeProduit,document.getElementById("ctl00_PanelUp_ajoutrapideControl_Qte").value=txt_erreur.Qte,document.getElementById("ctl00_MainPanel_UpdatePanel2")&&__doPostBack("ctl00_MainPanel_UpdatePanel2",""),masqueCommentaireVide());postBackElementID=="AddToBasket"&&(document.getElementById("affichageanim").style.display="block",masqueCommentaireVide());postBackElementID=="ImageButtonAdd"&&(document.getElementById("affichageanim").style.display="block",document.getElementById("ctl00_MainPanel_UpdatePanel2")&&(__doPostBack("ctl00_MainPanel_UpdatePanel2",""),Alphathis(),masqueCommentaireVide()));postBackElementID=="AjouterFav"&&(fermeouvreDiff("/MerciFAvoris.aspx",358,128),masqueCommentaireVide());postBackElementID=="FormViewFooter"&&(Alphathis(),masqueCommentaireVide());postBackElementID=="ImageButtonDelete"&&(Alphathis(),masqueCommentaireVide());postBackElementID=="ImageButtonBasket"&&$("#PanelUp_BasketControl1_ImageButtonBasket").bind("click",function(){location.href="/fr/os1.aspx"});postBackElementID=="CheckBoxTransporteur"&&(masqueCommentaireVide(),Alphathis());postBackElementID=="CheckBoxRelaisColis"&&(masqueCommentaireVide(),Alphathis());postBackElementID=="CheckBoxdepot"&&(masqueCommentaireVide(),Alphathis());postBackElementID=="Qte"&&masqueCommentaireVide();postBackElementID=="BtnMore"&&(findtoloadDisponibilite(ListeIdfullnameOrId,"NOTALL"),masqueCommentaireVide());ListeIdfullnameOrId.indexOf("AddCompare")!==-1&&(rebindmethod(),findtoloadDisponibilite(ListeIdfullnameOrId,"NOTALL"),LoadCompare());ListeIdfullnameOrId.indexOf("FicheCompare")!==-1&&LoaderCompareF("addcomp");postBackElementID=="txtQuantityListFiche"&&(findtoloadDisponibilite(ListeIdfullnameOrId,"NOTALL"),masqueCommentaireVide());postBackElementID=="BtnLess"&&(findtoloadDisponibilite(ListeIdfullnameOrId,"NOTALL"),masqueCommentaireVide());postBackElementID=="btAdds"&&(document.getElementById("ctl00_MainPanel_UpdatePanel2")&&__doPostBack("ctl00_MainPanel_UpdatePanel2",""),masqueCommentaireVide());postBackElementID=="btSubtract"&&(document.getElementById("ctl00_MainPanel_UpdatePanel2")&&__doPostBack("ctl00_MainPanel_UpdatePanel2",""),masqueCommentaireVide());postBackElementID=="ImageButtonDelete"&&masqueCommentaireVide();postBackElementID=="ButtonVAlidate"&&masqueCommentaireVide();postBackElementID=="ddlQuantity"&&findtoloadDisponibilite(ListeIdfullnameOrId,"NOTALL");postBackElementID=="TextBoxQuantity"&&masqueCommentaireVide();setTimeout(function(){document.getElementById("affichageanim").style.display="none"},5e3);postBackElementID=="TTCHT"&&_gaq.push(["_trackEvent","TTC ou HT","clic"])}function masqueCommentaireVide(){$(".product-name").length>1?$("#MainPanel_boutondel").show():$("#MainPanel_boutondel").hide();$("div.Commentaire").each(function(){str=$(this).text();$.trim(str)===""&&$(this).remove()})}function Alphathis(){var t=0,n=1;$('#MainPanel_FormViewFooter_ChoixDelivrery > table > tbody > tr  > td > input[type="checkbox"]').each(function(){t++;$(this).attr("checked")&&(t++,n=t,$("#MainPanel_UpdatePanel5 > div  > div.col-xs-12.col-md-11.boder-cell > div  > div.col-xs-3.col-sm-3.text-sm-center.col-md-6.text-md-right > div > div.col-md-12.col-3.col-sm-2.col-md-2.text-right.cadreDispo > table > tbody > tr > td  > a > img").css("opacity",.2),$("#MainPanel_UpdatePanel5 > div  > div.col-xs-12.col-md-11.boder-cell > div  > div.col-xs-3.col-sm-3.text-sm-center.col-md-6.text-md-right > div > div.col-xs-12.col-12.col-sm-12.col-md-3.padMobile > div.MobileDispo > table > tbody > tr > td  > a > img").css("opacity",.2),$("#MainPanel_GridViewItems > tbody > tr > td > table > tbody > tr > td > a > img").css("opacity",.2),$("#MainPanel_GridViewItems > tbody > tr > td > table > tbody > tr > td > img").css("opacity",.2),$("#MainPanel_GridViewItems > tbody > tr:nth-child(1) > th:nth-child(7) > table > tbody > tr > td > img").css("opacity",.2));n!=0&&(n>3&&(n=1),$("#MainPanel_UpdatePanel5 > div  > div.col-xs-12.col-md-11.boder-cell > div  > div.col-xs-3.col-sm-3.text-sm-center.col-md-6.text-md-right > div > div.col-md-12.col-3.col-sm-2.col-md-2.text-right.cadreDispo > table > tbody > tr > td:nth-child("+n+")  > a > img").css("opacity",""),$("#MainPanel_UpdatePanel5 > div  > div.col-xs-12.col-md-11.boder-cell > div  > div.col-xs-3.col-sm-3.text-sm-center.col-md-6.text-md-right > div > div.col-xs-12.col-12.col-sm-12.col-md-3.padMobile > div.MobileDispo > table > tbody > tr > td:nth-child("+n+")  > a > img").css("opacity",""),$("#MainPanel_GridViewItems > tbody > tr > td:nth-child(7) > table > tbody > tr > td:nth-child("+n+") > a > img").css("opacity",""),$("#MainPanel_GridViewItems > tbody > tr > td:nth-child(7) > table > tbody > tr > td:nth-child("+n+") > img").css("opacity",""),$("#MainPanel_GridViewItems > tbody > tr:nth-child(1) > th:nth-child(7) > table > tbody > tr > td:nth-child("+n+") > img").css("opacity",""));$(this).val()!="0"});$("#MainPanel_FormViewFooter_CheckBoxRelaisColis").each(function(){$(this).attr("checked")&&(n=1,$("#MainPanel_UpdatePanel5 > div  > div.col-xs-12.col-md-11.boder-cell > div  > div.col-xs-3.col-sm-3.text-sm-center.col-md-6.text-md-right > div > div.col-md-12.col-3.col-sm-2.col-md-2.text-right.cadreDispo > table > tbody > tr > td  > a > img").css("opacity",.2),$("#MainPanel_UpdatePanel5 > div  > div.col-xs-12.col-md-11.boder-cell > div  > div.col-xs-3.col-sm-3.text-sm-center.col-md-6.text-md-right > div > div.col-md-12.col-3.col-sm-2.col-md-2.text-right.cadreDispo > table > tbody > tr > td:nth-child("+n+")  > a > img").css("opacity",""))})}function showcharge(){document.getElementById("affichageanimAdress").style.display="block"}function LoadCompare(){var t,n;window.sharedVariable="addcomp";t="";window.location.href.indexOf("/fa/")>-1||window.location.href.indexOf("/sfa/")>-1||window.location.href.indexOf("/col/")>-1?t=document.getElementById("MainPanel_listquerystring").value:(n="",GetURLParameter("fam1")!=""&&(n+="&fam1="+GetURLParameter("fam1")),GetURLParameter("fam2")!=""&&(n+="&fam2="+GetURLParameter("fam2")),GetURLParameter("fam3")!=""&&(n+="&fam3="+GetURLParameter("fam3")),GetURLParameter("col")!=""&&(n+="&col="+GetURLParameter("col")),t=n);$("#Compare").load("/CompareXhr.aspx?"+t.toLowerCase()+"&addcomp=1&Maj="+Math.random(),function(){})}function LoaderCompareF(n){window.sharedVariable=n!=""?""+n:"";var t="";document.getElementById("MainPanel_FormViewArticle_fam1")&&(document.getElementById("MainPanel_FormViewArticle_fam1").value!=""&&(t+="&fam1="+document.getElementById("MainPanel_FormViewArticle_fam1").value),document.getElementById("MainPanel_notFam1").value=="X"&&(t=""),document.getElementById("MainPanel_FormViewArticle_fam2").value!=""&&(t+="&fam2="+document.getElementById("MainPanel_FormViewArticle_fam2").value),document.getElementById("MainPanel_FormViewArticle_fam3").value!=""&&(t+="&fam3="+document.getElementById("MainPanel_FormViewArticle_fam3").value),document.getElementById("MainPanel_FormViewArticle_Col").value!=""&&(t+="&col="+document.getElementById("MainPanel_FormViewArticle_Col").value),$("#Compare").load("/CompareXhr.aspx?"+t.toLowerCase()+"&addcomp=1&Maj="+Math.random(),function(){}))}function findtoloadDisponibilite(n,t){var o=t,r,i,e;if(o=="NOTALL"){r=getWidth();$(window).on("resize",function(){r=getWidth()});if($("#"+n).parent().is("div.filetgris"),"#"+n==$("#"+n).selector){r=getWidth();DivDisponibilite=r<=812?"DisponibiliteMob":"Disponibilite";i=$("#"+n).parents("div.filetgris");$(i).click(function(n){var t,r;console.log(n.target.class);t=!1;$(n.target).hasClass("quantityctrl")||$(n.target).hasClass("increment-quantity")||$(n.target).hasClass("decrement-quantity")||$(n.target).hasClass("cartList")||$(n.target).hasClass("Disponibilite")||$(n.target).hasClass("tooltip")||$(n.target).hasClass("cartListCompare")||$(n.target).hasClass("CompareAdded")||$(n.target).hasClass("addon")||$(n.target).hasClass("Brand")||$(n.target).hasClass("linkto")||$(n.target).hasClass("preventme")||$(n.target).hasClass("Inkstip")||$(n.target).hasClass("picto")||$(n.target).hasClass("listooltip")||$(n.target).attr("BtnAddtocart")||$(n.target).attr("MainPanel_FormViewArticle_ImageButtonAdd")?t=!1:(n.preventDefault(),t=!0);t&&window.location.href.indexOf("Comparateur.aspx")==-1&&(r=$(i).find("a.linkto").attr("href"),location.href=r)});var u=$(i).find("input.CodeSku").val(),f=$(i).find("input.quantityctrl").val(),s="";if(console.log("Console text  : "+u),console.log("Console text  : "+f),e=document.querySelectorAll("input[type='text'][onchange]"),console.log("Ok j'ai rechargé"),e.forEach(function(n){var t=n.getAttribute("onchange");n.removeAttribute("onchange");n.setAttribute("oninput",t)}),u!==undefined){let n="";$(i).find("#DESTOCKAGE_FLAG").length&&(n+="&destock=1");$(i).find("#VENTE_FLASH").length&&(n+="&offremoment=1");$(i).find("div."+DivDisponibilite).load("/DisponibiliteList.aspx?qte="+f+"&Article="+u+n+"&galibre="+s+"&Maj="+Math.random(),function(n,t){t=="success"&&$(".tooltip").tooltipster({animation:"grow",interactive:!0,debug:!1,contentAsHTML:!0,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{scroll:!0,tap:!0,mouseleave:!0}})})}}}}function rebindmethod(){$("#PanelUp_BasketControl1_ImageButtonBasket").bind("click",function(){location.href="/fr/os1.aspx"});$("#topCart").bind("click",function(){$("#PanelUp_BasketControl1_btFinish").length==0&&$("#topCart").length&&(location.href="/Login.aspx?ToCart=1&lang=FR")});$("#imagPanier").bind("click",function(){$("#PanelUp_BasketControl1_btFinish").length&&($("#isnotconnected").length?__doPostBack("ctl00$PanelUp$BasketControl1$btFinish",""):localtion.href="/fr/os1.aspx");$("#PanelUp_BasketControl1_btFinish").length==0&&$("#topCart").length&&(location.href="/Login.aspx?ToCart=1&lang=FR")})}var postBackElementID,ListeIdfullname,prm;(function(n){var t={width:300,height:300,overlayOpacity:.85,id:"modal",src:function(n){return jQuery(n).attr("href")},fadeInSpeed:200,fadeOutSpeed:200};n.modal=function(n){return _modal(this,n)};n.modal.Ouvre=function(){_modal.Ouvre()};n.modal.Ferme=function(){_modal.Ferme()};n.fn.modal=function(n){return _modal(this,n)};_modal=function(i,r){return this.options={parent:null,overlayOpacity:null,id:null,content:null,width:window.innerWidth<940?window.innerWidth:null,height:null,modalClassName:null,imageClassName:null,FermeClassName:null,overlayClassName:null,src:null},this.options=n.extend({},options,_defaults),this.options=n.extend({},options,t),this.options=n.extend({},options,r),this.Ferme=function(){jQuery("."+options.modalClassName+", ."+options.overlayClassName).fadeOut(t.fadeOutSpeed,function(){jQuery(this).unbind().remove()})},this.Ouvre=function(){var r,n,u;try{options.src=typeof options.src=="function"?options.src(i):options.src||_defaults.src(i)}catch(f){console.log(f)}r=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(jpg))$/i;n="";n=r.test(options.src)?'<div class="'+options.imageClassName+'"><img src="'+options.src+'"/><\/div>':'<iframe width="'+options.width+'" height="'+options.height+'" frameborder="0" scrolling="no" allowtransparency="true" src="'+options.src+'"  allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" oallowfullscreen="true" msallowfullscreen="true" id="isload"  ><\/iframe>';options.content=options.content||n;jQuery("."+options.modalClassName).length&&jQuery("."+options.overlayClassName).length?jQuery("."+options.modalClassName).html(options.content):($overlay=jQuery(_isIE6()?'<iframe src="BLOCKED SCRIPT\'&lt;html&gt;&lt;/html&gt;\';" scrolling="no" frameborder="0" class="'+options.overlayClassName+'"><\/iframe><div class="'+options.overlayClassName+'"><\/div>':'<div class="'+options.overlayClassName+'"><\/div>'),$overlay.hide().appendTo(options.parent),$modal=jQuery('<div id="'+options.id+'" class="'+options.modalClassName+'" style="padding:0px;width:'+options.width+"px; height:"+options.height+"px; margin-top:-"+options.height/2+"px; margin-left:-"+options.width/2+'px;">'+options.content+"<\/div>"),$modal.hide().appendTo(options.parent),$Ferme=jQuery('<a class="'+options.FermeClassName+'"><\/a>'),$Ferme.appendTo($modal),u=_getOpacity($overlay.not("iframe"))||options.overlayOpacity,$overlay.fadeTo(0,0).show().not("iframe").fadeTo(t.fadeInSpeed,u),$modal.fadeIn(t.fadeInSpeed),$Ferme.click(function(){jQuery.modal().Ferme()}),$overlay.click(function(){jQuery.modal().Ferme()}))},this};_isIE6=function(){return document.all&&document.getElementById&&document.compatMode&&!window.XMLHttpRequest?!0:!1};_getOpacity=function(n){return($sender=jQuery(n),opacity=$sender.css("opacity"),filter=$sender.css("filter"),filter.indexOf("opacity=")>=0)?parseFloat(filter.match(/opacity=([^)]*)/)[1])/100:opacity!=""?opacity:""};_defaults={parent:"body",overlayOpacity:85,id:"modal",content:null,width:window.innerWidth<940?window.innerWidth:800,height:window.innerHeight<550?window.innerHeight:600,modalClassName:"modal-window",imageClassName:"modal-image",FermeClassName:"Ferme-window",overlayClassName:"modal-overlay",src:function(n){return jQuery(n).attr("href")}}})(jQuery),function(n){var t={width:300,height:300,overlayOpacity:.85,id:"fenetre",src:function(n){return jQuery(n).attr("href")},fadeInSpeed:0,fadeOutSpeed:0};n.fenetre=function(n){return _fenetrehaute(this,n)};n.fenetre.Ouvre=function(){_fenetrehaute.Ouvre()};n.fenetre.Ferme=function(){_fenetrehaute.Ferme()};n.fn.fenetre=function(n){return _fenetrehaute(this,n)};_fenetrehaute=function(i,r){return this.options={parent:null,overlayOpacity:null,id:null,content:null,width:null,height:null,fenetreClassName:null,imageClassName:null,FermeClassName:null,overlayClassName:null,src:null},this.options=n.extend({},options,_defaultsTEST),this.options=n.extend({},options,t),this.options=n.extend({},options,r),this.Ferme=function(){jQuery("."+options.fenetreClassName+", ."+options.overlayClassName).fadeOut(t.fadeOutSpeed,function(){jQuery(this).unbind().remove()})},this.Ouvre=function(){var i,n,r;options.src=typeof options.src=="function"?options.src(envoie):options.src||_defaultsTEST.src(envoie);i=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(jpg))$/i;n="";n=i.test(options.src)?'<div class="'+options.imageClassName+'"><img src="'+options.src+'"/><\/div>':'<iframe width="'+options.width+'" height="'+options.height+'" frameborder="0" scrolling="no" allowtransparency="true" src="'+options.src+'"><\/iframe>';options.content=options.content||n;jQuery("."+options.fenetreClassName).length&&jQuery("."+options.overlayClassName).length?jQuery("."+options.fenetreClassName).html(options.content):($overlay=jQuery(_isIE6()?'<iframe src="BLOCKED SCRIPT\'&lt;html&gt;&lt;/html&gt;\';" scrolling="no" frameborder="0" class="'+options.overlayClassName+'"><\/iframe><div class="'+options.overlayClassName+'"><\/div>':'<div class="'+options.overlayClassName+'"><\/div>'),$overlay.hide().appendTo(options.parent),$fenetre=jQuery('<div id="'+options.id+'" class="'+options.fenetreClassName+'" style="padding:0px;width:'+options.width+"px; height:"+options.height+"px; margin-top:-"+options.height/2+"px; margin-left:-"+options.width/2+'px;">'+options.content+"<\/div>"),$fenetre.hide().appendTo(options.parent),$Ferme=jQuery('<a class="'+options.FermeClassName+'"><\/a>'),$Ferme.appendTo($fenetre),r=_getOpacity($overlay.not("iframe"))||options.overlayOpacity,$overlay.fadeTo(0,0).show().not("iframe").fadeTo(t.fadeInSpeed,r),$fenetre.fadeIn(t.fadeInSpeed),$Ferme.click(function(){jQuery.fenetre().Ferme()}),$overlay.click(function(){jQuery.fenetre().Ferme()}))},this};_isIE6=function(){return document.all&&document.getElementById&&document.compatMode&&!window.XMLHttpRequest?!0:!1};_getOpacity=function(n){return($sender=jQuery(n),opacity=$sender.css("opacity"),filter=$sender.css("filter"),filter.indexOf("opacity=")>=0)?parseFloat(filter.match(/opacity=([^)]*)/)[1])/100:opacity!=""?opacity:""};_defaultsTEST={parent:"body",overlayOpacity:85,id:"fenetre",content:null,width:800,height:600,fenetreClassName:"fenetre-window",imageClassName:"fenetre-image",FermeClassName:"Ferme-window",overlayClassName:"fenetre-overlay",src:function(n){return jQuery(n).attr("href")}}}(jQuery),function(n){var t={width:300,height:300,overlayOpacity:.85,id:"ajoutrapide",src:function(n){return jQuery(n).attr("href")},fadeInSpeed:0,fadeOutSpeed:0};n.ajoutrapide=function(n){return _ajoutrapide(this,n)};n.ajoutrapide.Ouvre=function(){_ajoutrapide.Ouvre()};n.ajoutrapide.Ferme=function(){_ajoutrapide.Ferme()};n.fn.ajoutrapide=function(n){return _ajoutrapide(this,n)};_ajoutrapide=function(i,r){return this.options={parent:null,overlayOpacity:null,id:null,content:null,width:null,height:null,ajoutrapideClassName:null,imageClassName:null,FermeClassName:null,overlayClassName:null,src:null},this.options=n.extend({},options,_defajoutrapide),this.options=n.extend({},options,t),this.options=n.extend({},options,r),this.Ferme=function(){jQuery("."+options.ajoutrapideClassName+", ."+options.overlayClassName).fadeOut(t.fadeOutSpeed,function(){jQuery(this).unbind().remove()})},this.Ouvre=function(){var r,n,u;options.src=typeof options.src=="function"?options.src(i):options.src||_defajoutrapide.src(i);r=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(jpg))$/i;n="";n=r.test(options.src)?'<div class="'+options.imageClassName+'"><img src="'+options.src+'"/><\/div>':'<iframe width="'+options.width+'" height="'+options.height+'" frameborder="0" scrolling="no" allowtransparency="true" src="'+options.src+'"><\/iframe>';options.content=options.content||n;jQuery("."+options.ajoutrapideClassName).length&&jQuery("."+options.overlayClassName).length?jQuery("."+options.ajoutrapideClassName).html(options.content):($overlay=jQuery(_isIE6()?'<iframe src="BLOCKED SCRIPT\'&lt;html&gt;&lt;/html&gt;\';" scrolling="no" frameborder="0" class="'+options.overlayClassName+'"><\/iframe><div class="'+options.overlayClassName+'"><\/div>':'<div class="'+options.overlayClassName+'"><\/div>'),$overlay.hide().appendTo(options.parent),$ajoutrapide=jQuery('<div id="'+options.id+'" class="'+options.ajoutrapideClassName+'" style="padding:0px;width:'+options.width+"px; height:"+options.height+"px; margin-top:-"+options.height/2+"px; margin-left:-"+options.width/2+'px;">'+options.content+"<\/div>"),$ajoutrapide.hide().appendTo(options.parent),$Ferme=jQuery('<a class="'+options.FermeClassName+'"><\/a>'),$Ferme.appendTo($ajoutrapide),u=_getOpacity($overlay.not("iframe"))||options.overlayOpacity,$overlay.fadeTo(0,0).show().not("iframe").fadeTo(t.fadeInSpeed,u),$ajoutrapide.fadeIn(t.fadeInSpeed),$Ferme.click(function(){jQuery.ajoutrapide().Ferme()}),$overlay.click(function(){jQuery.ajoutrapide().Ferme()}))},this};_isIE6=function(){return document.all&&document.getElementById&&document.compatMode&&!window.XMLHttpRequest?!0:!1};_getOpacity=function(n){return($sender=jQuery(n),opacity=$sender.css("opacity"),filter=$sender.css("filter"),filter.indexOf("opacity=")>=0)?parseFloat(filter.match(/opacity=([^)]*)/)[1])/100:opacity!=""?opacity:""};_defajoutrapide={parent:"body",overlayOpacity:85,id:"ajoutrapide",content:null,width:800,height:600,ajoutrapideClassName:"ajoutrapide-window",imageClassName:"ajoutrapide-image",FermeClassName:"Ferme-window",overlayClassName:"ajoutrapide-overlay",src:function(n){return jQuery(n).attr("href")}}}(jQuery),function(n){var t={width:300,height:300,overlayOpacity:.85,id:"gobo",src:function(n){return jQuery(n).attr("href")},fadeInSpeed:0,fadeOutSpeed:0};n.gobo=function(n){return _gobo(this,n)};n.gobo.Ouvre=function(){_gobo.Ouvre()};n.gobo.Ferme=function(){_gobo.Ferme()};n.fn.gobo=function(n){return _gobo(this,n)};_gobo=function(i,r){return this.options={parent:null,overlayOpacity:null,id:null,content:null,width:null,height:null,goboClassName:null,imageClassName:null,FermeClassName:null,overlayClassName:null,src:null},this.options=n.extend({},options,_defgobo),this.options=n.extend({},options,t),this.options=n.extend({},options,r),this.Ferme=function(){jQuery("."+options.goboClassName+", ."+options.overlayClassName).fadeOut(t.fadeOutSpeed,function(){jQuery(this).unbind().remove()})},this.Ouvre=function(){var r,n,u;options.src=typeof options.src=="function"?options.src(i):options.src||_defgobo.src(i);r=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(jpg))$/i;n="";n=r.test(options.src)?'<div class="'+options.imageClassName+'"><img src="'+options.src+'"/><\/div>':'<iframe width="'+options.width+'" height="'+options.height+'" frameborder="0" scrolling="no" allowtransparency="true" src="'+options.src+'"><\/iframe>';options.content=options.content||n;jQuery("."+options.goboClassName).length&&jQuery("."+options.overlayClassName).length?jQuery("."+options.goboClassName).html(options.content):($overlay=jQuery(_isIE6()?'<iframe src="BLOCKED SCRIPT\'&lt;html&gt;&lt;/html&gt;\';" scrolling="no" frameborder="0" class="'+options.overlayClassName+'"><\/iframe><div class="'+options.overlayClassName+'"><\/div>':'<div class="'+options.overlayClassName+'"><\/div>'),$overlay.hide().appendTo(options.parent),$gobo=jQuery('<div id="'+options.id+'" class="'+options.goboClassName+'" style="padding:0px;width:'+options.width+"px; height:"+options.height+"px; margin-top:-"+options.height/2+"px; margin-left:-"+options.width/2+'px;">'+options.content+"<\/div>"),$gobo.hide().appendTo(options.parent),$Ferme=jQuery('<a class="'+options.FermeClassName+'"><\/a>'),$Ferme.appendTo($gobo),u=_getOpacity($overlay.not("iframe"))||options.overlayOpacity,$overlay.fadeTo(0,0).show().not("iframe").fadeTo(t.fadeInSpeed,u),$gobo.fadeIn(t.fadeInSpeed),$Ferme.click(function(){jQuery.gobo().Ferme()}),$overlay.click(function(){jQuery.gobo().Ferme()}))},this};_isIE6=function(){return document.all&&document.getElementById&&document.compatMode&&!window.XMLHttpRequest?!0:!1};_getOpacity=function(n){return($sender=jQuery(n),opacity=$sender.css("opacity"),filter=$sender.css("filter"),filter.indexOf("opacity=")>=0)?parseFloat(filter.match(/opacity=([^)]*)/)[1])/100:opacity!=""?opacity:""};_defgobo={parent:"body",overlayOpacity:85,id:"gobo",content:null,width:800,height:600,goboClassName:"gobo-window",imageClassName:"gobo-image",FermeClassName:"Ferme-window",overlayClassName:"gobo-overlay",src:function(n){return jQuery(n).attr("href")}}}(jQuery),function(n){var t={width:300,height:300,overlayOpacity:.85,id:"masterGobo",src:function(n){return jQuery(n).attr("href")},fadeInSpeed:200,fadeOutSpeed:200};n.masterGobo=function(n){return _masterGobo(this,n)};n.masterGobo.Ouvre=function(){_masterGobo.Ouvre()};n.masterGobo.Ferme=function(){_masterGobo.Ferme()};n.fn.masterGobo=function(n){return _masterGobo(this,n)};_masterGobo=function(i,r){return this.options={parent:null,overlayOpacity:null,id:null,content:null,width:null,height:null,masterGoboClassName:null,imageClassName:null,FermeClassName:null,overlayClassName:null,src:null},this.options=n.extend({},options,_defmasterGobo),this.options=n.extend({},options,t),this.options=n.extend({},options,r),this.Ferme=function(){jQuery("."+options.masterGoboClassName+", ."+options.overlayClassName).fadeOut(t.fadeOutSpeed,function(){jQuery(this).unbind().remove()})},this.Ouvre=function(){var u,r,f;options.src=typeof options.src=="function"?options.src(i):options.src||_defmasterGobo.src(i);u=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(jpg))$/i;r="";r=u.test(options.src)?'<div class="'+options.imageClassName+'"><img src="'+options.src+'"/><\/div>':'<iframe width="'+options.width+'" height="'+options.height+'" frameborder="0" scrolling="no" allowtransparency="true" src="'+options.src+'"><\/iframe>';options.content=options.content||r;jQuery("."+options.masterGoboClassName).length&&jQuery("."+options.overlayClassName).length?jQuery("."+options.masterGoboClassName).html(options.content):($overlay=jQuery(_isIE6()?'<iframe src="BLOCKED SCRIPT\'&lt;html&gt;&lt;/html&gt;\';" scrolling="no" frameborder="0" class="'+options.overlayClassName+'"><\/iframe><div class="'+options.overlayClassName+'"><\/div>':'<div class="'+options.overlayClassName+'"><\/div>'),$overlay.hide().appendTo(options.parent),$masterGobo=jQuery('<div id="'+options.id+'" class="'+options.masterGoboClassName+'" style="padding:0px;width:'+options.width+"px; height:"+options.height+"px; margin-top:-"+options.height/2+"px; margin-left:-"+options.width/2+'px;">'+options.content+"<\/div>"),$masterGobo.hide().appendTo(options.parent),$Ferme=jQuery('<a class="'+options.FermeClassName+'"><\/a>'),$Ferme.appendTo($masterGobo),f=_getOpacity($overlay.not("iframe"))||options.overlayOpacity,$overlay.fadeTo(0,0).show().not("iframe").fadeTo(t.fadeInSpeed,f),$masterGobo.fadeIn(t.fadeInSpeed),$Ferme.click(function(){jQuery.masterGobo().Ferme()}),$overlay.mouseenter(function(){clearTimeout(goboTime);n(".green").css("z-index","11");n("#overlay").stop(!0,!0).fadeOut(300);n("#overlay").css("z-index","9");n("#PanelUp_scSearchControl_pnlMaster").css("z-index","13");n("#overlay").css("display","none");jQuery.masterGobo().Ferme()}))},this};_isIE6=function(){return document.all&&document.getElementById&&document.compatMode&&!window.XMLHttpRequest?!0:!1};_getOpacity=function(n){return($sender=jQuery(n),opacity=$sender.css("opacity"),filter=$sender.css("filter"),filter.indexOf("opacity=")>=0)?parseFloat(filter.match(/opacity=([^)]*)/)[1])/100:opacity!=""?opacity:""};_defmasterGobo={parent:"body",overlayOpacity:85,id:"masterGobo",content:null,width:800,height:600,masterGoboClassName:"masterGobo-window",imageClassName:"masterGobo-image",FermeClassName:"Ferme-window",overlayClassName:"masterGobo-overlay",src:function(n){return jQuery(n).attr("href")}}}(jQuery),function(n){var t={width:300,height:300,overlayOpacity:.85,id:"EspaceClient",src:function(n){return jQuery(n).attr("href")},fadeInSpeed:300,fadeOutSpeed:0};n.EspaceClient=function(n){return _EspaceClient(this,n)};n.EspaceClient.Ouvre=function(){_EspaceClient.Ouvre()};n.EspaceClient.Ferme=function(){_EspaceClient.Ferme()};n.fn.EspaceClient=function(n){return _EspaceClient(this,n)};_EspaceClient=function(i,r){return this.options={parent:null,overlayOpacity:null,id:null,content:null,width:null,height:null,EspaceClientClassName:null,imageClassName:null,FermeClassName:null,overlayClassName:null,src:null,isArticlelie:null},this.options=n.extend({},options,_defEspaceClient),this.options=n.extend({},options,t),this.options=n.extend({},options,r),this.Ferme=function(){jQuery("."+options.EspaceClientClassName+", ."+options.overlayClassName).fadeOut(t.fadeOutSpeed,function(){jQuery(this).unbind().remove()})},this.Ouvre=function(){var r,n,u;options.src=typeof options.src=="function"?options.src(i):options.src||_defEspaceClient.src(i);r=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(jpg))$/i;n="";n=r.test(options.src)?'<div class="'+options.imageClassName+'"><img src="'+options.src+'"/><\/div>':'<iframe  id="EspaceClientiframe"  width="'+options.width+'" height="'+options.height+'" frameborder="0" scrolling="no" allowtransparency="true" src="'+options.src+'"><\/iframe>';options.content=options.content||n;jQuery("."+options.EspaceClientClassName).length&&jQuery("."+options.overlayClassName).length?jQuery("."+options.EspaceClientClassName).html(options.content):($overlay=jQuery(_isIE6()?'<iframe  id="EspaceClientiframe" src="BLOCKED SCRIPT\'&lt;html&gt;&lt;/html&gt;\';" scrolling="no" frameborder="0" class="'+options.overlayClassName+'"><\/iframe><div class="'+options.overlayClassName+'"><\/div>':'<div class="'+options.overlayClassName+'"><\/div>'),$overlay.hide().appendTo(options.parent),$EspaceClient=jQuery('<div id="'+options.id+'" class="'+options.EspaceClientClassName+'" style="padding:0px;width:'+options.width+"px; height:"+options.height+"px; margin-top:-"+options.height/2+"px; margin-left:-"+options.width/2+'px;">'+options.content+"<\/div>"),$EspaceClient.hide().appendTo(options.parent),options.isArticlelie||($Ferme=jQuery('<a class="'+options.FermeClassName+'"><\/a>'),$Ferme.appendTo($EspaceClient)),u=_getOpacity($overlay.not("iframe"))||options.overlayOpacity,$overlay.fadeTo(0,0).show().not("iframe").fadeTo(t.fadeInSpeed,u),$EspaceClient.fadeIn(t.fadeInSpeed),options.isArticlelie||($Ferme.click(function(){jQuery.EspaceClient().Ferme()}),$overlay.click(function(){jQuery.EspaceClient().Ferme()})))},this};_isIE6=function(){return document.all&&document.getElementById&&document.compatMode&&!window.XMLHttpRequest?!0:!1};_getOpacity=function(n){return($sender=jQuery(n),opacity=$sender.css("opacity"),filter=$sender.css("filter"),filter.indexOf("opacity=")>=0)?parseFloat(filter.match(/opacity=([^)]*)/)[1])/100:opacity!=""?opacity:""};_defEspaceClient={parent:"body",overlayOpacity:85,id:"EspaceClient",content:null,width:800,height:600,EspaceClientClassName:"EspaceClient-window",imageClassName:"EspaceClient-image",FermeClassName:"Ferme-EspaceClient",overlayClassName:"EspaceClient-overlay",src:function(n){return jQuery(n).attr("href")}}}(jQuery),function(n){var t={width:300,height:300,overlayOpacity:.85,id:"CompleMentCart",src:function(n){return jQuery(n).attr("href")},fadeInSpeed:0,fadeOutSpeed:0};n.CompleMentCart=function(n){return _CompleMentCart(this,n)};n.CompleMentCart.Ouvre=function(){_CompleMentCart.Ouvre()};n.CompleMentCart.Ferme=function(){_CompleMentCart.Ferme()};n.fn.CompleMentCart=function(n){return _CompleMentCart(this,n)};_CompleMentCart=function(i,r){return this.options={parent:null,overlayOpacity:null,id:null,content:null,width:null,height:null,CompleMentCartClassName:null,imageClassName:null,FermeClassName:null,overlayClassName:null,src:null},this.options=n.extend({},options,_defCompleMentCart),this.options=n.extend({},options,t),this.options=n.extend({},options,r),this.Ferme=function(){jQuery("."+options.CompleMentCartClassName+", ."+options.overlayClassName).fadeOut(t.fadeOutSpeed,function(){jQuery(this).unbind().remove()})},this.Ouvre=function(){var r,n,u;options.src=typeof options.src=="function"?options.src(i):options.src||_defCompleMentCart.src(i);r=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(jpg))$/i;n="";n=r.test(options.src)?'<div class="'+options.imageClassName+'"><img src="'+options.src+'"/><\/div>':'<iframe id="CompleMentCartiframe" width="'+options.width+'" height="'+options.height+'" frameborder="0" scrolling="no"  allowtransparency="true" src="'+options.src+'"><\/iframe>';options.content=options.content||n;jQuery("."+options.CompleMentCartClassName).length&&jQuery("."+options.overlayClassName).length?jQuery("."+options.CompleMentCartClassName).html(options.content):($overlay=jQuery(_isIE6()?'<iframe src="BLOCKED SCRIPT\'&lt;html&gt;&lt;/html&gt;\';" scrolling="no" frameborder="0" id="CompleMentCartiframe" class="'+options.overlayClassName+'"><\/iframe><div class="'+options.overlayClassName+'"><\/div>':'<div class="'+options.overlayClassName+'"><\/div>'),$overlay.hide().appendTo(options.parent),$CompleMentCart=jQuery('<div id="'+options.id+'" class="'+options.CompleMentCartClassName+'" style="padding:0px;width:'+options.width+"px; height:"+options.height+"px; margin-top:-"+options.height/2+"px; margin-left:-"+options.width/2+'px;">'+options.content+"<\/div>"),$CompleMentCart.hide().appendTo(options.parent),$Ferme=jQuery('<a class="'+options.FermeClassName+'"><\/a>'),$Ferme.appendTo($CompleMentCart),u=_getOpacity($overlay.not("iframe"))||options.overlayOpacity,$overlay.fadeTo(0,0).show().not("iframe").fadeTo(t.fadeInSpeed,u),$CompleMentCart.fadeIn(t.fadeInSpeed),$Ferme.click(function(){jQuery.CompleMentCart().Ferme()}),$overlay.click(function(){jQuery.CompleMentCart().Ferme()}))},this};_isIE6=function(){return document.all&&document.getElementById&&document.compatMode&&!window.XMLHttpRequest?!0:!1};_getOpacity=function(n){return($sender=jQuery(n),opacity=$sender.css("opacity"),filter=$sender.css("filter"),filter.indexOf("opacity=")>=0)?parseFloat(filter.match(/opacity=([^)]*)/)[1])/100:opacity!=""?opacity:""};_defCompleMentCart={parent:"body",overlayOpacity:85,id:"CompleMentCart",content:null,width:800,height:600,CompleMentCartClassName:"CompleMentCart-window",imageClassName:"CompleMentCart-image",FermeClassName:"Ferme-CompleMentCart",overlayClassName:"CompleMentCart-overlay",src:function(n){return jQuery(n).attr("href")}}}(jQuery),function(n){var t={width:300,height:300,overlayOpacity:.85,id:"CloneWin",src:function(n){return jQuery(n).attr("href")},fadeInSpeed:0,fadeOutSpeed:0};n.CloneWin=function(n){return _CloneWin(this,n)};n.CloneWin.Ouvre=function(){_CloneWin.Ouvre()};n.CloneWin.Ferme=function(){_CloneWin.Ferme()};n.fn.CloneWin=function(n){return _CloneWin(this,n)};_CloneWin=function(i,r){return this.options={parent:null,overlayOpacity:null,id:null,content:null,width:null,height:null,CloneWinClassName:null,imageClassName:null,FermeClassName:null,overlayClassName:null,src:null},this.options=n.extend({},options,_defCloneWin),this.options=n.extend({},options,t),this.options=n.extend({},options,r),this.Ferme=function(){jQuery("."+options.CloneWinClassName+", ."+options.overlayClassName).fadeOut(t.fadeOutSpeed,function(){jQuery(this).unbind().remove()})},this.Ouvre=function(){var r,n,u;options.src=typeof options.src=="function"?options.src(i):options.src||_defCloneWin.src(i);r=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(jpg))$/i;n="";n=r.test(options.src)?'<div class="'+options.imageClassName+'"><img src="'+options.src+'"/><\/div>':'<iframe id="CloneWiniframe" width="'+options.width+'" height="'+options.height+'" frameborder="0" scrolling="no"  allowtransparency="true" src="'+options.src+'"><\/iframe>';options.content=options.content||n;jQuery("."+options.CloneWinClassName).length&&jQuery("."+options.overlayClassName).length?jQuery("."+options.CloneWinClassName).html(options.content):($overlay=jQuery(_isIE6()?'<iframe src="BLOCKED SCRIPT\'&lt;html&gt;&lt;/html&gt;\';" scrolling="no" frameborder="0" id="CloneWiniframe" class="'+options.overlayClassName+'"><\/iframe><div class="'+options.overlayClassName+'"><\/div>':'<div class="'+options.overlayClassName+'"><\/div>'),$overlay.hide().appendTo(options.parent),$CloneWin=jQuery('<div id="'+options.id+'" class="'+options.CloneWinClassName+'" style="padding:0px;width:'+options.width+"px; height:"+options.height+"px; margin-top:-"+options.height/2+"px; margin-left:-"+options.width/2+'px;">'+options.content+"<\/div>"),$CloneWin.hide().appendTo(options.parent),$Ferme=jQuery('<a class="'+options.FermeClassName+'"><\/a>'),$Ferme.appendTo($CloneWin),u=_getOpacity($overlay.not("iframe"))||options.overlayOpacity,$overlay.fadeTo(0,0).show().not("iframe").fadeTo(t.fadeInSpeed,u),$CloneWin.fadeIn(t.fadeInSpeed),$Ferme.click(function(){jQuery.CloneWin().Ferme()}),$overlay.click(function(){jQuery.CloneWin().Ferme()}))},this};_isIE6=function(){return document.all&&document.getElementById&&document.compatMode&&!window.XMLHttpRequest?!0:!1};_getOpacity=function(n){return($sender=jQuery(n),opacity=$sender.css("opacity"),filter=$sender.css("filter"),filter.indexOf("opacity=")>=0)?parseFloat(filter.match(/opacity=([^)]*)/)[1])/100:opacity!=""?opacity:""};_defCloneWin={parent:"body",overlayOpacity:85,id:"CloneWin",content:null,width:800,height:600,CloneWinClassName:"CloneWin-window",imageClassName:"modal-image",FermeClassName:"Ferme-window",overlayClassName:"CloneWin-overlay",src:function(n){return jQuery(n).attr("href")}}}(jQuery),function(n){var t={width:300,height:300,overlayOpacity:.85,id:"PopTunnel",src:function(n){return jQuery(n).attr("href")},fadeInSpeed:300,fadeOutSpeed:0};n.PopTunnel=function(n){return _PopTunnel(this,n)};n.PopTunnel.Ouvre=function(){_PopTunnel.Ouvre()};n.PopTunnel.Ferme=function(){_PopTunnel.Ferme()};n.fn.PopTunnel=function(n){return _PopTunnel(this,n)};_PopTunnel=function(i,r){return this.options={parent:null,overlayOpacity:null,id:null,content:null,width:null,height:null,PopTunnelClassName:null,imageClassName:null,FermeClassName:null,overlayClassName:null,src:null,isArticlelie:null},this.options=n.extend({},options,_defPopTunnel),this.options=n.extend({},options,t),this.options=n.extend({},options,r),this.Ferme=function(){jQuery("."+options.PopTunnelClassName+", ."+options.overlayClassName).fadeOut(t.fadeOutSpeed,function(){jQuery(this).unbind().remove()})},this.Ouvre=function(){var r,n,u;options.src=typeof options.src=="function"?options.src(i):options.src||_defPopTunnel.src(i);r=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(jpg))$/i;n="";n=r.test(options.src)?'<div class="'+options.imageClassName+'"><img src="'+options.src+'"/><\/div>':'<iframe  id="PopTunneliframe"  width="'+options.width+'" height="'+options.height+'" frameborder="0" scrolling="no" allowtransparency="true" src="'+options.src+'"><\/iframe>';options.content=options.content||n;jQuery("."+options.PopTunnelClassName).length&&jQuery("."+options.overlayClassName).length?jQuery("."+options.PopTunnelClassName).html(options.content):($overlay=jQuery(_isIE6()?'<iframe  id="PopTunneliframe" src="BLOCKED SCRIPT\'&lt;html&gt;&lt;/html&gt;\';" scrolling="no" frameborder="0" class="'+options.overlayClassName+'"><\/iframe><div class="'+options.overlayClassName+'"><\/div>':'<div class="'+options.overlayClassName+'"><\/div>'),$overlay.hide().appendTo(options.parent),$PopTunnel=jQuery('<div id="'+options.id+'" class="'+options.PopTunnelClassName+'" style="padding:0px;width:'+options.width+"px; height:"+options.height+"px; margin-top:-"+options.height/2+"px; margin-left:-"+options.width/2+'px;">'+options.content+"<\/div>"),$PopTunnel.hide().appendTo(options.parent),options.isArticlelie||($Ferme=jQuery('<a class="'+options.FermeClassName+'"><\/a>'),$Ferme.appendTo($PopTunnel)),u=_getOpacity($overlay.not("iframe"))||options.overlayOpacity,$overlay.fadeTo(0,0).show().not("iframe").fadeTo(t.fadeInSpeed,u),$PopTunnel.fadeIn(t.fadeInSpeed),options.isArticlelie||($Ferme.click(function(){jQuery.PopTunnel().Ferme()}),$overlay.click(function(){jQuery.PopTunnel().Ferme()})))},this};_isIE6=function(){return document.all&&document.getElementById&&document.compatMode&&!window.XMLHttpRequest?!0:!1};_getOpacity=function(n){return($sender=jQuery(n),opacity=$sender.css("opacity"),filter=$sender.css("filter"),filter.indexOf("opacity=")>=0)?parseFloat(filter.match(/opacity=([^)]*)/)[1])/100:opacity!=""?opacity:""};_defPopTunnel={parent:"body",overlayOpacity:85,id:"PopTunnel",content:null,width:800,height:600,PopTunnelClassName:"PopTunnel-window",imageClassName:"PopTunnel-image",FermeClassName:"Ferme-PopTunnel",overlayClassName:"PopTunnel-overlay",src:function(n){return jQuery(n).attr("href")}}}(jQuery);Sys.WebForms.PageRequestManager&&(prm=Sys.WebForms.PageRequestManager.getInstance(),prm._uniqueIDToClientID=function(n){var t=n.replace(/\$/g,"_"),i,r;return document.getElementById(t)?t:(i=n.lastIndexOf("$"),i===-1)?t:i+1>n.length?t:(r=n.slice(i+1),document.getElementById(r)?r:t)});prm.add_beginRequest(InitializeRequestHandler);prm.add_endRequest(EndRequestHandler);
/*!
 * jQuery UI Touch Punch 1.0.8 as modified by RWAP Software
 * based on original touchpunch v0.2.3 which has not been updated since 2014
 *
 * Updates by RWAP Software to take account of various suggested changes on the original code issues
 *
 * Original: https://github.com/furf/jquery-ui-touch-punch
 * Copyright 2011–2014, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Fork: https://github.com/RWAP/jquery-ui-touch-punch
 *
 * Depends:
 * jquery.ui.widget.js
 * jquery.ui.mouse.js
 */
(function(n){typeof define=="function"&&define.amd?define(["jquery","jquery.ui"],n):n(jQuery)})(function(n){function u(n){return{x:n.originalEvent.changedTouches[0].pageX,y:n.originalEvent.changedTouches[0].pageY}}function t(n,t){if(!(n.originalEvent.touches.length>1)){n.cancelable&&n.preventDefault();var i=n.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null);n.target.dispatchEvent(r)}}if(n.support.mspointer=window.navigator.msPointerEnabled,n.support.touch="ontouchstart"in document||"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,(n.support.touch||n.support.mspointer)&&n.ui.mouse){var i=n.ui.mouse.prototype,f=i._mouseInit,e=i._mouseDestroy,r;i._touchStart=function(n){var i=this;(this._startedMove=n.timeStamp,i._startPos=u(n),!r&&i._mouseCapture(n.originalEvent.changedTouches[0]))&&(r=!0,i._touchMoved=!1,t(n,"mouseover"),t(n,"mousemove"),t(n,"mousedown"))};i._touchMove=function(n){r&&(this._touchMoved=!0,t(n,"mousemove"))};i._touchEnd=function(n){var f,i;r&&(t(n,"mouseup"),t(n,"mouseout"),f=n.timeStamp-this._startedMove,!this._touchMoved||f<500?t(n,"click"):(i=u(n),Math.abs(i.x-this._startPos.x)<10&&Math.abs(i.y-this._startPos.y)<10&&(this._touchMoved&&n.originalEvent.changedTouches[0].touchType!=="stylus"||t(n,"click"))),this._touchMoved=!1,r=!1)};i._mouseInit=function(){var t=this;n.support.mspointer&&(t.element[0].style.msTouchAction="none");t.element.on({touchstart:n.proxy(t,"_touchStart"),touchmove:n.proxy(t,"_touchMove"),touchend:n.proxy(t,"_touchEnd")});f.call(t)};i._mouseDestroy=function(){var t=this;t.element.off({touchstart:n.proxy(t,"_touchStart"),touchmove:n.proxy(t,"_touchMove"),touchend:n.proxy(t,"_touchEnd")});e.call(t)}}});
/*!
 * jQuery UI Touch Punch 0.2.3
 *
 * Copyright 2011–2014, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Depends:
 *  jquery.ui.widget.js
 *  jquery.ui.mouse.js
!function (a) { function f(a, b) { if (!(a.originalEvent.touches.length > 1)) { a.preventDefault(); var c = a.originalEvent.changedTouches[0], d = document.createEvent("MouseEvents"); d.initMouseEvent(b, !0, !0, window, 1, c.screenX, c.screenY, c.clientX, c.clientY, !1, !1, !1, !1, 0, null), a.target.dispatchEvent(d) } } if (a.support.touch = "ontouchend" in document, a.support.touch) { var e, b = a.ui.mouse.prototype, c = b._mouseInit, d = b._mouseDestroy; b._touchStart = function (a) { var b = this; !e && b._mouseCapture(a.originalEvent.changedTouches[0]) && (e = !0, b._touchMoved = !1, f(a, "mouseover"), f(a, "mousemove"), f(a, "mousedown")) }, b._touchMove = function (a) { e && (this._touchMoved = !0, f(a, "mousemove")) }, b._touchEnd = function (a) { e && (f(a, "mouseup"), f(a, "mouseout"), this._touchMoved || f(a, "click"), e = !1) }, b._mouseInit = function () { var b = this; b.element.bind({ touchstart: a.proxy(b, "_touchStart"), touchmove: a.proxy(b, "_touchMove"), touchend: a.proxy(b, "_touchEnd") }), c.call(b) }, b._mouseDestroy = function () { var b = this; b.element.unbind({ touchstart: a.proxy(b, "_touchStart"), touchmove: a.proxy(b, "_touchMove"), touchend: a.proxy(b, "_touchEnd") }), d.call(b) } } }(jQuery);
 */
!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this.drag=a.extend({},m),this.state=a.extend({},n),this.e=a.extend({},o),this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._invalidated={},this._pipe=[],a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a[0].toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Pipe,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}function f(a){if(a.touches!==d)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(a.touches===d){if(a.pageX!==d)return{x:a.pageX,y:a.pageY};if(a.pageX===d)return{x:a.clientX,y:a.clientY}}}function g(a){var b,d,e=c.createElement("div"),f=a;for(b in f)if(d=f[b],"undefined"!=typeof e.style[d])return e=null,[d,b];return[!1]}function h(){return g(["transition","WebkitTransition","MozTransition","OTransition"])[1]}function i(){return g(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0]}function j(){return g(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0]}function k(){return"ontouchstart"in b||!!navigator.msMaxTouchPoints}function l(){return b.navigator.msPointerEnabled}var m,n,o;m={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null},n={isTouch:!1,isScrolling:!1,isSwiping:!1,direction:!1,inMotion:!1},o={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null},e.Defaults={items:3,loop:!1,center:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,responsiveClass:!1,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",themeClass:"owl-theme",baseClass:"owl-carousel",itemClass:"owl-item",centerClass:"center",activeClass:"active"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Plugins={},e.Pipe=[{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){var a=this._clones,b=this.$stage.children(".cloned");(b.length!==a.length||!this.settings.loop&&a.length>0)&&(this.$stage.children(".cloned").remove(),this._clones=[])}},{filter:["items","settings"],run:function(){var a,b,c=this._clones,d=this._items,e=this.settings.loop?c.length-Math.max(2*this.settings.items,4):0;for(a=0,b=Math.abs(e/2);b>a;a++)e>0?(this.$stage.children().eq(d.length+c.length-1).remove(),c.pop(),this.$stage.children().eq(0).remove(),c.pop()):(c.push(c.length/2),this.$stage.append(d[c[c.length-1]].clone().addClass("cloned")),c.push(d.length-1-(c.length-1)/2),this.$stage.prepend(d[c[c.length-1]].clone().addClass("cloned")))}},{filter:["width","items","settings"],run:function(){var a,b,c,d=this.settings.rtl?1:-1,e=(this.width()/this.settings.items).toFixed(3),f=0;for(this._coordinates=[],b=0,c=this._clones.length+this._items.length;c>b;b++)a=this._mergers[this.relative(b)],a=this.settings.mergeFit&&Math.min(a,this.settings.items)||a,f+=(this.settings.autoWidth?this._items[this.relative(b)].width()+this.settings.margin:e*a)*d,this._coordinates.push(f)}},{filter:["width","items","settings"],run:function(){var b,c,d=(this.width()/this.settings.items).toFixed(3),e={width:Math.abs(this._coordinates[this._coordinates.length-1])+2*this.settings.stagePadding,"padding-left":this.settings.stagePadding||"","padding-right":this.settings.stagePadding||""};if(this.$stage.css(e),e={width:this.settings.autoWidth?"auto":d-this.settings.margin},e[this.settings.rtl?"margin-left":"margin-right"]=this.settings.margin,!this.settings.autoWidth&&a.grep(this._mergers,function(a){return a>1}).length>0)for(b=0,c=this._coordinates.length;c>b;b++)e.width=Math.abs(this._coordinates[b])-Math.abs(this._coordinates[b-1]||0)-this.settings.margin,this.$stage.children().eq(b).css(e);else this.$stage.children().css(e)}},{filter:["width","items","settings"],run:function(a){a.current&&this.reset(this.$stage.children().index(a.current))}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children("."+this.settings.activeClass).removeClass(this.settings.activeClass),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass(this.settings.activeClass),this.settings.center&&(this.$stage.children("."+this.settings.centerClass).removeClass(this.settings.centerClass),this.$stage.children().eq(this.current()).addClass(this.settings.centerClass))}}],e.prototype.initialize=function(){if(this.trigger("initialize"),this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl",this.settings.rtl),this.browserSupport(),this.settings.autoWidth&&this.state.imagesLoaded!==!0){var b,c,e;if(b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e)return this.preloadAutoWidthImages(b),!1}this.$element.addClass("owl-loading"),this.$stage=a("<"+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this._width=this.$element.width(),this.refresh(),this.$element.removeClass("owl-loading").addClass("owl-loaded"),this.eventsCall(),this.internalEvents(),this.addTriggerableEvents(),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",function(a,b){return b.replace(/\b owl-responsive-\S+/g,"")}).addClass("owl-responsive-"+d)):e=a.extend({},this.options),(null===this.settings||this._breakpoint!==d)&&(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.$element.toggleClass("owl-center",this.settings.center),this.settings.loop&&this._items.length<this.settings.items&&(this.settings.loop=!1),this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.settings.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={}},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){if(0===this._items.length)return!1;(new Date).getTime();this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$stage.addClass("owl-refresh"),this.update(),this.$stage.removeClass("owl-refresh"),this.state.orientation=b.orientation,this.watchVisibility(),this.trigger("refreshed")},e.prototype.eventsCall=function(){this.e._onDragStart=a.proxy(function(a){this.onDragStart(a)},this),this.e._onDragMove=a.proxy(function(a){this.onDragMove(a)},this),this.e._onDragEnd=a.proxy(function(a){this.onDragEnd(a)},this),this.e._onResize=a.proxy(function(a){this.onResize(a)},this),this.e._transitionEnd=a.proxy(function(a){this.transitionEnd(a)},this),this.e._preventClick=a.proxy(function(a){this.preventClick(a)},this)},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.trigger("resize").isDefaultPrevented()?!1:(this._width=this.$element.width(),this.invalidate("width"),this.refresh(),void this.trigger("resized")):!1},e.prototype.eventsRouter=function(a){var b=a.type;"mousedown"===b||"touchstart"===b?this.onDragStart(a):"mousemove"===b||"touchmove"===b?this.onDragMove(a):"mouseup"===b||"touchend"===b?this.onDragEnd(a):"touchcancel"===b&&this.onDragEnd(a)},e.prototype.internalEvents=function(){var c=(k(),l());this.settings.mouseDrag?(this.$stage.on("mousedown",a.proxy(function(a){this.eventsRouter(a)},this)),this.$stage.on("dragstart",function(){return!1}),this.$stage.get(0).onselectstart=function(){return!1}):this.$element.addClass("owl-text-select-on"),this.settings.touchDrag&&!c&&this.$stage.on("touchstart touchcancel",a.proxy(function(a){this.eventsRouter(a)},this)),this.transitionEndVendor&&this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,!1),this.settings.responsive!==!1&&this.on(b,"resize",a.proxy(this.onThrottledResize,this))},e.prototype.onDragStart=function(d){var e,g,h,i;if(e=d.originalEvent||d||b.event,3===e.which||this.state.isTouch)return!1;if("mousedown"===e.type&&this.$stage.addClass("owl-grab"),this.trigger("drag"),this.drag.startTime=(new Date).getTime(),this.speed(0),this.state.isTouch=!0,this.state.isScrolling=!1,this.state.isSwiping=!1,this.drag.distance=0,g=f(e).x,h=f(e).y,this.drag.offsetX=this.$stage.position().left,this.drag.offsetY=this.$stage.position().top,this.settings.rtl&&(this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()+this.settings.margin),this.state.inMotion&&this.support3d)i=this.getTransformProperty(),this.drag.offsetX=i,this.animate(i),this.state.inMotion=!0;else if(this.state.inMotion&&!this.support3d)return this.state.inMotion=!1,!1;this.drag.startX=g-this.drag.offsetX,this.drag.startY=h-this.drag.offsetY,this.drag.start=g-this.drag.startX,this.drag.targetEl=e.target||e.srcElement,this.drag.updatedX=this.drag.start,("IMG"===this.drag.targetEl.tagName||"A"===this.drag.targetEl.tagName)&&(this.drag.targetEl.draggable=!1),a(c).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents",a.proxy(function(a){this.eventsRouter(a)},this))},e.prototype.onDragMove=function(a){var c,e,g,h,i,j;this.state.isTouch&&(this.state.isScrolling||(c=a.originalEvent||a||b.event,e=f(c).x,g=f(c).y,this.drag.currentX=e-this.drag.startX,this.drag.currentY=g-this.drag.startY,this.drag.distance=this.drag.currentX-this.drag.offsetX,this.drag.distance<0?this.state.direction=this.settings.rtl?"right":"left":this.drag.distance>0&&(this.state.direction=this.settings.rtl?"left":"right"),this.settings.loop?this.op(this.drag.currentX,">",this.coordinates(this.minimum()))&&"right"===this.state.direction?this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length):this.op(this.drag.currentX,"<",this.coordinates(this.maximum()))&&"left"===this.state.direction&&(this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length)):(h=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),i=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),j=this.settings.pullDrag?this.drag.distance/5:0,this.drag.currentX=Math.max(Math.min(this.drag.currentX,h+j),i+j)),(this.drag.distance>8||this.drag.distance<-8)&&(c.preventDefault!==d?c.preventDefault():c.returnValue=!1,this.state.isSwiping=!0),this.drag.updatedX=this.drag.currentX,(this.drag.currentY>16||this.drag.currentY<-16)&&this.state.isSwiping===!1&&(this.state.isScrolling=!0,this.drag.updatedX=this.drag.start),this.animate(this.drag.updatedX)))},e.prototype.onDragEnd=function(b){var d,e,f;if(this.state.isTouch){if("mouseup"===b.type&&this.$stage.removeClass("owl-grab"),this.trigger("dragged"),this.drag.targetEl.removeAttribute("draggable"),this.state.isTouch=!1,this.state.isScrolling=!1,this.state.isSwiping=!1,0===this.drag.distance&&this.state.inMotion!==!0)return this.state.inMotion=!1,!1;this.drag.endTime=(new Date).getTime(),d=this.drag.endTime-this.drag.startTime,e=Math.abs(this.drag.distance),(e>3||d>300)&&this.removeClick(this.drag.targetEl),f=this.closest(this.drag.updatedX),this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(f),this.invalidate("position"),this.update(),this.settings.pullDrag||this.drag.updatedX!==this.coordinates(f)||this.transitionEnd(),this.drag.distance=0,a(c).off(".owl.dragEvents")}},e.prototype.removeClick=function(c){this.drag.targetEl=c,a(c).on("click.preventClick",this.e._preventClick),b.setTimeout(function(){a(c).off("click.preventClick")},300)},e.prototype.preventClick=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation&&b.stopPropagation(),a(b.target).off("click.preventClick")},e.prototype.getTransformProperty=function(){var a,c;return a=b.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+"transform"),a=a.replace(/matrix(3d)?\(|\)/g,"").split(","),c=16===a.length,c!==!0?a[4]:a[12]},e.prototype.closest=function(b){var c=-1,d=30,e=this.width(),f=this.coordinates();return this.settings.freeDrag||a.each(f,a.proxy(function(a,g){return b>g-d&&g+d>b?c=a:this.op(b,"<",g)&&this.op(b,">",f[a+1]||g-e)&&(c="left"===this.state.direction?a+1:a),-1===c},this)),this.settings.loop||(this.op(b,">",f[this.minimum()])?c=b=this.minimum():this.op(b,"<",f[this.maximum()])&&(c=b=this.maximum())),c},e.prototype.animate=function(b){this.trigger("translate"),this.state.inMotion=this.speed()>0,this.support3d?this.$stage.css({transform:"translate3d("+b+"px,0px, 0px)",transition:this.speed()/1e3+"s"}):this.state.isTouch?this.$stage.css({left:b+"px"}):this.$stage.animate({left:b},this.speed()/1e3,this.settings.fallbackEasing,a.proxy(function(){this.state.inMotion&&this.transitionEnd()},this))},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(a){this._invalidated[a]=!0},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(b,c){var e=c?this._items.length:this._items.length+this._clones.length;return!a.isNumeric(b)||1>e?d:b=this._clones.length?(b%e+e)%e:Math.max(this.minimum(c),Math.min(this.maximum(c),b))},e.prototype.relative=function(a){return a=this.normalize(a),a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=0,f=this.settings;if(a)return this._items.length-1;if(!f.loop&&f.center)b=this._items.length-1;else if(f.loop||f.center)if(f.loop||f.center)b=this._items.length+f.items;else{if(!f.autoWidth&&!f.merge)throw"Can not detect maximum absolute position.";for(revert=f.rtl?1:-1,c=this.$stage.width()-this.$element.width();(d=this.coordinates(e))&&!(d*revert>=c);)b=++e}else b=this._items.length-f.items;return b},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c=null;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[b-1]||0))/2*(this.settings.rtl?-1:1)):c=this._coordinates[b-1]||0,c)},e.prototype.duration=function(a,b,c){return Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(c,d){if(this.settings.loop){var e=c-this.relative(this.current()),f=this.current(),g=this.current(),h=this.current()+e,i=0>g-h?!0:!1,j=this._clones.length+this._items.length;h<this.settings.items&&i===!1?(f=g+this._items.length,this.reset(f)):h>=j-this.settings.items&&i===!0&&(f=g-this._items.length,this.reset(f)),b.clearTimeout(this.e._goToLoop),this.e._goToLoop=b.setTimeout(a.proxy(function(){this.speed(this.duration(this.current(),f+e,d)),this.current(f+e),this.update()},this),30)}else this.speed(this.duration(this.current(),c,d)),this.current(c),this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.transitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.state.inMotion=!1,void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(a.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(a,b){b=b===d?this._items.length:this.normalize(b,!0),this.trigger("add",{content:a,position:b}),0===this._items.length||b===this._items.length?(this.$stage.append(a),this._items.push(a),this._mergers.push(1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[b].before(a),this._items.splice(b,0,a),this._mergers.splice(b,0,1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this.invalidate("items"),this.trigger("added",{content:a,position:b})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.addTriggerableEvents=function(){var b=a.proxy(function(b,c){return a.proxy(function(a){a.relatedTarget!==this&&(this.suppress([c]),b.apply(this,[].slice.call(arguments,1)),this.release([c]))},this)},this);a.each({next:this.next,prev:this.prev,to:this.to,destroy:this.destroy,refresh:this.refresh,replace:this.replace,add:this.add,remove:this.remove},a.proxy(function(a,c){this.$element.on(a+".owl.carousel",b(c,a+".owl.carousel"))},this))},e.prototype.watchVisibility=function(){function c(a){return a.offsetWidth>0&&a.offsetHeight>0}function d(){c(this.$element.get(0))&&(this.$element.removeClass("owl-hidden"),this.refresh(),b.clearInterval(this.e._checkVisibile))}c(this.$element.get(0))||(this.$element.addClass("owl-hidden"),b.clearInterval(this.e._checkVisibile),this.e._checkVisibile=b.setInterval(a.proxy(d,this),500))},e.prototype.preloadAutoWidthImages=function(b){var c,d,e,f;c=0,d=this,b.each(function(g,h){e=a(h),f=new Image,f.onload=function(){c++,e.attr("src",f.src),e.css("opacity",1),c>=b.length&&(d.state.imagesLoaded=!0,d.initialize())},f.src=e.attr("src")||e.attr("data-src")||e.attr("data-src-retina")})},e.prototype.destroy=function(){this.$element.hasClass(this.settings.themeClass)&&this.$element.removeClass(this.settings.themeClass),this.settings.responsive!==!1&&a(b).off("resize.owl.carousel"),this.transitionEndVendor&&this.off(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd);for(var d in this._plugins)this._plugins[d].destroy();(this.settings.mouseDrag||this.settings.touchDrag)&&(this.$stage.off("mousedown touchstart touchcancel"),a(c).off(".owl.dragEvents"),this.$stage.get(0).onselectstart=function(){},this.$stage.off("dragstart",function(){return!1})),this.$element.off(".owl"),this.$stage.children(".cloned").remove(),this.e=null,this.$element.removeData("owlCarousel"),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.unwrap()},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d){var e={item:{count:this._items.length,index:this.current()}},f=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),g=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},e,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(g)}),this.$element.trigger(g),this.settings&&"function"==typeof this.settings[f]&&this.settings[f].apply(this,g)),g},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.browserSupport=function(){if(this.support3d=j(),this.support3d){this.transformVendor=i();var a=["transitionend","webkitTransitionEnd","transitionend","oTransitionEnd"];this.transitionEndVendor=a[h()],this.vendorName=this.transformVendor.replace(/Transform/i,""),this.vendorName=""!==this.vendorName?"-"+this.vendorName.toLowerCase()+"-":""}this.state.orientation=b.orientation},a.fn.owlCarousel=function(b){return this.each(function(){a(this).data("owlCarousel")||a(this).data("owlCarousel",new e(this,b))})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b){var c=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,d=c.center&&Math.ceil(c.items/2)||c.items,e=c.center&&-1*d||0,f=(b.property&&b.property.value||this._core.current())+e,g=this._core.clones().length,h=a.proxy(function(a,b){this.load(b)},this);e++<d;)this.load(g/2+this._core.relative(f)),g&&a.each(this._core.clones(this._core.relative(f++)),h)},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this._core.$element.on(this._handlers)};c.Defaults={lazyLoad:!1},c.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},c.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=c}(window.Zepto||window.jQuery,window,document),function(a){var b=function(c){this._core=c,this._handlers={"initialized.owl.carousel":a.proxy(function(){this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass)===this._core.$stage.children().eq(this._core.current())&&this.update()},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this._core.$element.on(this._handlers)};b.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},b.prototype.update=function(){this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass)},b.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=b}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this._core=b,this._videos={},this._playing=null,this._fullscreen=!1,this._handlers={"resize.owl.carousel":a.proxy(function(a){this._core.settings.video&&!this.isInFullScreen()&&a.preventDefault()},this),"refresh.owl.carousel changed.owl.carousel":a.proxy(function(){this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))},this)},this._core.options=a.extend({},d.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};d.Defaults={video:!1,videoHeight:!1,videoWidth:!1},d.prototype.fetch=function(a,b){var c=a.attr("data-vimeo-id")?"vimeo":"youtube",d=a.attr("data-vimeo-id")||a.attr("data-youtube-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else{if(!(d[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");c="vimeo"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},d.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}))},d.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null},d.prototype.play=function(b){this._core.trigger("play",null,"video"),this._playing&&this.stop();var c,d,e=a(b.target||b.srcElement),f=e.closest("."+this._core.settings.itemClass),g=this._videos[f.attr("data-video")],h=g.width||"100%",i=g.height||this._core.$stage.height();"youtube"===g.type?c='<iframe width="'+h+'" height="'+i+'" src="http://www.youtube.com/embed/'+g.id+"?autoplay=1&v="+g.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===g.type&&(c='<iframe src="http://player.vimeo.com/video/'+g.id+'?autoplay=1" width="'+h+'" height="'+i+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),f.addClass("owl-video-playing"),this._playing=f,d=a('<div style="height:'+i+"px; width:"+h+'px" class="owl-video-frame">'+c+"</div>"),e.after(d)},d.prototype.isInFullScreen=function(){var d=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return d&&a(d).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),d&&this._fullscreen&&this._playing?!1:this._fullscreen?(this._fullscreen=!1,!1):this._playing&&this._core.state.orientation!==b.orientation?(this._core.state.orientation=b.orientation,!1):!0},d.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=d}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){this.swapping="translated"==a.type},this),"translate.owl.carousel":a.proxy(function(){this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&this.core.support3d){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c)),f&&e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.transitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this.core=b,this.core.options=a.extend({},d.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":a.proxy(function(){this.autoplay()
},this),"play.owl.autoplay":a.proxy(function(a,b,c){this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};d.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},d.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(b.clearInterval(this.interval),this.interval=b.setInterval(a.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):b.clearInterval(this.interval)},d.prototype.play=function(){return c.hidden===!0||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:this.core.settings.autoplay===!1?void b.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},d.prototype.stop=function(){b.clearInterval(this.interval)},d.prototype.pause=function(){b.clearInterval(this.interval)},d.prototype.destroy=function(){var a,c;b.clearInterval(this.interval);for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=d}(window.Zepto||window.jQuery,window,document),function(a){"use strict";var b=function(c){this._core=c,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.splice(b.position,0,a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":a.proxy(function(a){this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"change.owl.carousel":a.proxy(function(a){if("position"==a.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var b=this._core.current(),c=this._core.maximum(),d=this._core.minimum();a.data=a.property.value>c?b>=c?d:c:a.property.value<d?c:a.property.value}},this),"changed.owl.carousel":a.proxy(function(a){"position"==a.property.name&&this.draw()},this),"refreshed.owl.carousel":a.proxy(function(){this._initialized||(this.initialize(),this._initialized=!0),this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation")},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this.$element.on(this._handlers)};b.Defaults={nav:!1,navRewind:!0,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotData:!1,dotsSpeed:!1,dotsContainer:!1,controlsClass:"owl-controls"},b.prototype.initialize=function(){var b,c,d=this._core.settings;d.dotsData||(this._templates=[a("<div>").addClass(d.dotClass).append(a("<span>")).prop("outerHTML")]),d.navContainer&&d.dotsContainer||(this._controls.$container=a("<div>").addClass(d.controlsClass).appendTo(this.$element)),this._controls.$indicators=d.dotsContainer?a(d.dotsContainer):a("<div>").hide().addClass(d.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",a.proxy(function(b){var c=a(b.target).parent().is(this._controls.$indicators)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(c,d.dotsSpeed)},this)),b=d.navContainer?a(d.navContainer):a("<div>").addClass(d.navContainerClass).prependTo(this._controls.$container),this._controls.$next=a("<"+d.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click",a.proxy(function(){this.prev(d.navSpeed)},this)),this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click",a.proxy(function(){this.next(d.navSpeed)},this));for(c in this._overrides)this._core[c]=a.proxy(this[c],this)},b.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},b.prototype.update=function(){var a,b,c,d=this._core.settings,e=this._core.clones().length/2,f=e+this._core.items().length,g=d.center||d.autoWidth||d.dotData?1:d.dotsEach||d.items;if("page"!==d.slideBy&&(d.slideBy=Math.min(d.slideBy,d.items)),d.dots||"page"==d.slideBy)for(this._pages=[],a=e,b=0,c=0;f>a;a++)(b>=g||0===b)&&(this._pages.push({start:a-e,end:a-e+g-1}),b=0,++c),b+=this._core.mergers(this._core.relative(a))},b.prototype.draw=function(){var b,c,d="",e=this._core.settings,f=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!e.nav||e.loop||e.navRewind||(this._controls.$previous.toggleClass("disabled",0>=f),this._controls.$next.toggleClass("disabled",f>=this._core.maximum())),this._controls.$previous.toggle(e.nav),this._controls.$next.toggle(e.nav),e.dots){if(b=this._pages.length-this._controls.$indicators.children().length,e.dotData&&0!==b){for(c=0;c<this._controls.$indicators.children().length;c++)d+=this._templates[this._core.relative(c)];this._controls.$indicators.html(d)}else b>0?(d=new Array(b+1).join(this._templates[0]),this._controls.$indicators.append(d)):0>b&&this._controls.$indicators.children().slice(b).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(a.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(e.dots)},b.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotData?1:c.dotsEach||c.items)}},b.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,function(a){return a.start<=b&&a.end>=b}).pop()},b.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},b.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},b.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},b.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=b}(window.Zepto||window.jQuery,window,document),function(a,b){"use strict";var c=function(d){this._core=d,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(){"URLHash"==this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[c]=b.content},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(){var a=b.location.hash.substring(1),c=this._core.$stage.children(),d=this._hashes[a]&&c.index(this._hashes[a])||0;return a?void this._core.to(d,!1,!0):!1},this))};c.Defaults={URLhashListener:!1},c.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=c}(window.Zepto||window.jQuery,window,document);
// MSDropDown - uncompressed.jquery.dd
// author: Marghoob Suleman - Search me on google
// Date: 12th Aug, 2009, {18 Dec, 2010 (2.36)}, {date: 02 July, 2011}
// Version: 2.38
// Revision: 35
// web: www.giftlelo.com | www.marghoobsuleman.com
/*
// msDropDown is free jQuery Plugin: you can redistribute it and/or modify
// it under the terms of the either the MIT License or the Gnu General Public License (GPL) Version 2
*/
; (function ($) {

    var msOldDiv = "";
    var dd = function (element, options) {
        var sElement = element;
        var $this = this; //parent this
        var options = $.extend({
            height: 120,
            visibleRows: 7,
            rowHeight: 23,
            showIcon: true,
            zIndex: 9999,
            mainCSS: 'dd',
            useSprite: false,
            animStyle: 'slideDown',
            onInit: '',
            jsonTitle: true,
            style: ''
        }, options);
        this.ddProp = new Object(); //storing propeties;
        var oldSelectedValue = "";
        var actionSettings = {};
        actionSettings.insideWindow = true;
        actionSettings.keyboardAction = false;
        actionSettings.currentKey = null;
        var ddList = false;
        var config = { postElementHolder: '_msddHolder', postID: '_msdd', postTitleID: '_title', postTitleTextID: '_titletext', postChildID: '_child', postAID: '_msa', postOPTAID: '_msopta', postInputID: '_msinput', postArrowID: '_arrow', postInputhidden: '_inp' };
        var styles = { dd: options.mainCSS, ddTitle: 'ddTitle', arrow: 'arrow', ddChild: 'ddChild', ddTitleText: 'ddTitleText', disabled: .30, ddOutOfVision: 'ddOutOfVision', borderTop: 'borderTop', noBorderTop: 'noBorderTop', selected: 'selected' };
        var attributes = { actions: "focus,blur,change,click,dblclick,mousedown,mouseup,mouseover,mousemove,mouseout,keypress,keydown,keyup", prop: "size,multiple,disabled,tabindex" };
        this.onActions = new Object();
        var elementid = $(sElement).prop("id");
        if (typeof (elementid) == "undefined" || elementid.length <= 0) {
            //assign and id;
            elementid = "msdrpdd" + $.msDropDown.counter++; //I guess it makes unique for the page.
            $(sElement).attr("id", elementid);
        };
        var inlineCSS = undefined;// $(sElement).prop("style");
        options.style += (inlineCSS == undefined) ? "" : inlineCSS;
        var allOptions = $(sElement).children();
        ddList = ($(sElement).prop("size") > 1 || $(sElement).prop("multiple") == true) ? true : false;
        if (ddList) { options.visibleRows = $(sElement).prop("size"); };
        var a_array = {}; //stores id, html & value etc
        var currentP = 0;
        var isFilter = false;
        var oldHeight;
        var cacheElement = {};
        var inputText = "";

        var getElement = function (ele) {
            if (typeof (cacheElement[ele]) == "undefined") {
                cacheElement[ele] = document.getElementById(ele);
            }
            return cacheElement[ele];
        };
        var getPostID = function (id) {
            return elementid + config[id];
        };
        var getOptionsProperties = function (option) {
            var currentOption = option;
            var styles = $(currentOption).prop("style");
            return (typeof styles == "undefined") ? "" : styles.cssText;
        };
        var matchIndex = function (index) {
            var selectedIndex = $("#" + elementid + " option:selected");
            if (selectedIndex.length > 1) {
                for (var i = 0; i < selectedIndex.length; i++) {
                    if (index == selectedIndex[i].index) {
                        return true;
                    };
                };
            } else if (selectedIndex.length == 1) {
                if (selectedIndex[0].index == index) {
                    return true;
                };
            };
            return false;
        };
        var createA = function (currentOptOption, current, currentopt, tp) {
            var aTag = "";
            //var aidfix = getPostID("postAID");
            var aidoptfix = (tp == "opt") ? getPostID("postOPTAID") : getPostID("postAID");
            var aid = (tp == "opt") ? aidoptfix + "_" + (current) + "_" + (currentopt) : aidoptfix + "_" + (current);
            var arrow = "";
            var t = "";
            var clsName = "";
            var pH = ""; //addition html
            if (options.useSprite != false) {
                clsName = ' ' + options.useSprite + ' ' + currentOptOption.className;
            } else {
                arrow = $(currentOptOption).prop("title");
                var reg = new RegExp(/^\{.*\}$/);
                var isJson = reg.test(arrow);
                if (options.jsonTitle == true && isJson == true) {
                    if (arrow.length != 0) {
                        var obj = eval("[" + arrow + "]");
                        img = (typeof obj[0].image == "undefined") ? "" : obj[0].image;
                        t = (typeof obj[0].title == "undefined") ? "" : obj[0].title;
                        pH = (typeof obj[0].postHTML == "undefined") ? "" : obj[0].postHTML;
                        arrow = (img.length == 0) ? "" : '<img src="' + img + '" align="absmiddle" /> ';
                    };
                } else {
                    arrow = (arrow.length == 0) ? "" : '<img src="' + arrow + '" align="absmiddle" /> ';
                };
            };
            var sText = $(currentOptOption).text();
            var sValue = $(currentOptOption).val();
            var sEnabledClass = ($(currentOptOption).prop("disabled") == true) ? "disabled" : "enabled";
            a_array[aid] = { html: arrow + sText, value: sValue, text: sText, index: currentOptOption.index, id: aid, title: t };
            var innerStyle = getOptionsProperties(currentOptOption);
            if (matchIndex(currentOptOption.index) == true) {
                aTag += '<a href="javascript:void(0);" class="' + styles.selected + ' ' + sEnabledClass + clsName + '"';
            } else {
                aTag += '<a  href="javascript:void(0);" class="' + sEnabledClass + clsName + '"';
            };
            if (innerStyle !== false && innerStyle !== undefined && innerStyle.length != 0) {
                aTag += " style='" + innerStyle + "'";
            };
            if (t !== "") {
                aTag += " title='" + t + "'";
            };
            aTag += ' id="' + aid + '">';
            var str = sText;
            var textFG = str.split("|")[1]; 
          
            aTag += arrow + '<span class="' + styles.ddTitleText + '">' + textFG + '</span>';
            if (pH !== "") {
                aTag += pH;
            };
            aTag += '</a>';
            return aTag;
        };
        var in_array = function (t) {
            var sText = t.toLowerCase();
            if (sText.length == 0) return -1;
            var a = "";
            for (var i in a_array) {
                var a_text = a_array[i].text.toLowerCase();
                if (a_text.substr(0, sText.length) == sText) {
                    a += "#" + a_array[i].id + ", ";
                };
            };
            return (a == "") ? -1 : a;
        };
        var createATags = function () {
            var childnodes = allOptions;
            if (childnodes.length == 0) return "";
            var aTag = "";
            var aidfix = getPostID("postAID");
            var aidoptfix = getPostID("postOPTAID");
            childnodes.each(function (current) {
                var currentOption = childnodes[current];
                //OPTGROUP
                if (currentOption.nodeName.toString().toLowerCase() == "optgroup") {
                    aTag += "<div class='opta'>";
                    aTag += "<span style='font-weight:bold;font-style:italic;clear:both;'>" + $(currentOption).prop("label") + "</span>";
                    var optChild = $(currentOption).children();
                    optChild.each(function (currentopt) {
                        var currentOptOption = optChild[currentopt];
                        aTag += createA(currentOptOption, current, currentopt, "opt");
                    });
                    aTag += "</div>";

                } else {
                    aTag += createA(currentOption, current, "", "");
                };
            });
            return aTag;
        };
        var createChildDiv = function () {
            var id = getPostID("postID");
            var childid = getPostID("postChildID");
            var sStyle = options.style;  
            sDiv = "";
            sDiv += '<div id="' + childid + '" class="' + styles.ddChild + '"';
            if (!ddList) {
                sDiv += (sStyle != "") ? ' style="' + sStyle + '"margin-left: 4px; height: 19px;top:0px' : '';
            } else {
                sDiv += (sStyle != "") ? ' style="width: 88px; z-index: 9999; display: block; margin-left: 4px; height: 19px;' + sStyle + '"' : '';
            };
            sDiv += '>';
            return sDiv;
        };

        var createTitleDiv = function () {
            var titleid = getPostID("postTitleID");
            var arrowid = getPostID("postArrowID");
            var titletextid = getPostID("postTitleTextID");
            var inputhidden = getPostID("postInputhidden");
            var sText = "";
            var arrow = "";
            if (getElement(elementid).options.length > 0) {
                sText = $("#" + elementid + " option:selected").text();
                arrow = $("#" + elementid + " option:selected").prop("title");
            };
            var img = "";
            var t = "";
            var reg = new RegExp(/^\{.*\}$/);
            var isJson = reg.test(arrow);
            if (options.jsonTitle == true && isJson == true) {
                if (arrow.length != 0) {
                    var obj = eval("[" + arrow + "]");
                    img = (typeof obj[0].image == "undefined") ? "" : obj[0].image;
                    t = (typeof obj[0].title == "undefined") ? "" : obj[0].title;
                    arrow = (img.length == 0 || options.showIcon == false || options.useSprite != false) ? "" : '<img src="' + img + '" align="absmiddle" /> ';
                };
            } else {
                arrow = (arrow.length == 0 || arrow == undefined || options.showIcon == false || options.useSprite != false) ? "" : '<img src="' + arrow + '" align="absmiddle" /> ';
            };
            var sDiv = '<div id="' + titleid + '" class="' + styles.ddTitle + '"';
            sDiv += '>';
            sDiv += '<span id="' + arrowid + '" class="' + styles.arrow + '"></span><span class="' + styles.ddTitleText + '" id="' + titletextid + '">' + arrow + '<span class="' + styles.ddTitleText + '"><b>' + sText.split("|")[2].toUpperCase() + '</b></span></span></div>';
            return sDiv;
        };
        var applyEventsOnA = function () {
            var childid = getPostID("postChildID");
            $("#" + childid + " a.enabled").unbind("click"); //remove old one
            $("#" + childid + " a.enabled").bind("click", function (event) {
                event.preventDefault();
                manageSelection(this);
                setValue();
                if (!ddList) {
                    $("#" + childid).unbind("mouseover");
                    setInsideWindow(false);
                    var sText = (options.showIcon == false) ? $(this).text() : $(this).html();
                    setTitleText(sText);
                    //$this.data("dd").close();
                    $this.close();
                };
                //actionSettings.oldIndex = a_array[$($this).prop("id")].index;
            });
        };
        var createDropDown = function () {
            var changeInsertionPoint = false;
            var id = getPostID("postID");
            var titleid = getPostID("postTitleID");
            var titletextid = getPostID("postTitleTextID");
            var childid = getPostID("postChildID");
            var arrowid = getPostID("postArrowID");
            var iWidth = $("#" + elementid).outerWidth();
            var sStyle = options.style;
            if ($("#" + id).length > 0) {
                $("#" + id).remove();
                changeInsertionPoint = true;
            };
            var sDiv = '<div id="' + id + '" class="' + styles.dd + '"';
            sDiv += (sStyle != "") ? ' style="' + sStyle + '"' : '';
            sDiv += '>';
            //create title bar
            sDiv += createTitleDiv();
            //create child
            sDiv += createChildDiv();
            sDiv += createATags();
            sDiv += "</div>";
            sDiv += "</div>";
            if (changeInsertionPoint == true) {
                var sid = getPostID("postElementHolder");
                $("#" + sid).after(sDiv);
            } else {
                $("#" + elementid).after(sDiv);
            };
            if (ddList) {
                var titleid = getPostID("postTitleID");
                $("#" + titleid).hide();
            };

            $("#" + id).css("width", iWidth + "px");
            $("#" + childid).css("width", (iWidth - 2) + "px");
            if (allOptions.length > options.visibleRows) {
                var margin = parseInt($("#" + childid + " a:first").css("padding-bottom")) + parseInt($("#" + childid + " a:first").css("padding-top"));
                var iHeight = ((options.rowHeight) * options.visibleRows) - margin;
               
                $("#" + childid).css("height", iHeight + "px");
            } else if (ddList) {
                var iHeight = $("#" + elementid).height();
                
                $("#" + childid).css("height", iHeight + "px");
                 
            };
            //set out of vision
            if (changeInsertionPoint == false) {
                setOutOfVision();
                addRefreshMethods(elementid);
            };
            if ($("#" + elementid).prop("disabled") == true) {
                $("#" + id).css("opacity", styles.disabled);
            };
            applyEvents();
            //add events
            //arrow hightlight
            $("#" + titleid).bind("mouseover", function (event) {
                hightlightArrow(1);
            });
            $("#" + titleid).bind("mouseout", function (event) {
                hightlightArrow(0);
            });
            //open close events
            applyEventsOnA();
            $("#" + childid + " a.disabled").css("opacity", styles.disabled);
            //alert("ddList "+ddList)
            if (ddList) {
                $("#" + childid).bind("mouseover", function (event) {
                    if (!actionSettings.keyboardAction) {
                        actionSettings.keyboardAction = true;
                        $(document).bind("keydown", function (event) {
                            var keyCode = event.keyCode;
                            actionSettings.currentKey = keyCode;
                            if (keyCode == 39 || keyCode == 40) {
                                //move to next
                                event.preventDefault(); event.stopPropagation();
                                next();
                                setValue();
                            };
                            if (keyCode == 37 || keyCode == 38) {
                                event.preventDefault(); event.stopPropagation();
                                //move to previous
                                previous();
                                setValue();
                            };
                        });

                    } 
                });
            };
            $("#" + childid).bind("mouseout", function (event) { setInsideWindow(false); $(document).unbind("keydown", d_onkeydown); actionSettings.keyboardAction = false; actionSettings.currentKey = null; });
            $("#" + titleid).bind("click", function (event) {
                setInsideWindow(false);
                if ($("#" + childid + ":visible").length == 1) {
                    $("#" + childid).unbind("mouseover");
                } else {
                    $("#" + childid).bind("mouseover", function (event) { setInsideWindow(true); });
                    //alert("open "+elementid + $this);
                    //$this.data("dd").openMe();
                    $this.open();
                };
            });
            $("#" + titleid).bind("mouseout", function (evt) {
                setInsideWindow(false);
            });
            if (options.showIcon && options.useSprite != false) {
                setTitleImageSprite();
            };
        };
        var getByIndex = function (index) {
            for (var i in a_array) {
                if (a_array[i].index == index) {
                    return a_array[i];
                };
            };
            return -1;
        };
        var manageSelection = function (obj) {
            var childid = getPostID("postChildID");
            if ($("#" + childid + " a." + styles.selected).length == 1) { //check if there is any selected
                oldSelectedValue = $("#" + childid + " a." + styles.selected).text(); //i should have value here. but sometime value is missing
                //alert("oldSelectedValue "+oldSelectedValue);
            };
            if (!ddList) {
                $("#" + childid + " a." + styles.selected).removeClass(styles.selected);
            };
            var selectedA = $("#" + childid + " a." + styles.selected).prop("id");
            if (selectedA != undefined) {
                var oldIndex = (actionSettings.oldIndex == undefined || actionSettings.oldIndex == null) ? a_array[selectedA].index : actionSettings.oldIndex;
            };
            if (obj && !ddList) {
                $(obj).addClass(styles.selected);
            };
            if (ddList) {
                var keyCode = actionSettings.currentKey;
                if ($("#" + elementid).prop("multiple") == true) {
                    if (keyCode == 17) {
                        //control
                        actionSettings.oldIndex = a_array[$(obj).prop("id")].index;
                        $(obj).toggleClass(styles.selected);
                        //multiple
                    } else if (keyCode == 16) {
                        $("#" + childid + " a." + styles.selected).removeClass(styles.selected);
                        $(obj).addClass(styles.selected);
                        //shift
                        var currentSelected = $(obj).prop("id");
                        var currentIndex = a_array[currentSelected].index;
                        for (var i = Math.min(oldIndex, currentIndex); i <= Math.max(oldIndex, currentIndex); i++) {
                            $("#" + getByIndex(i).id).addClass(styles.selected);
                        };
                    } else {
                        $("#" + childid + " a." + styles.selected).removeClass(styles.selected);
                        $(obj).addClass(styles.selected);
                        actionSettings.oldIndex = a_array[$(obj).prop("id")].index;
                    };
                } else {
                    $("#" + childid + " a." + styles.selected).removeClass(styles.selected);
                    $(obj).addClass(styles.selected);
                    actionSettings.oldIndex = a_array[$(obj).prop("id")].index;
                };
                //isSingle
            };
        };
        var addRefreshMethods = function (id) {
            //deprecated
            var objid = id;
            getElement(objid).refresh = function (e) {
                $("#" + objid).msDropDown(options);
            };
        };
        var setInsideWindow = function (val) {
            actionSettings.insideWindow = val;
        };
        var getInsideWindow = function () {
            return actionSettings.insideWindow;
            //will work on this
            /*
            var childid = getPostID("postChildID");
            return ($("#"+childid + ":visible").length == 0) ? false : true;
            */
        };
        var applyEvents = function () {
            var mainid = getPostID("postID");
            var actions_array = attributes.actions.split(",");
            for (var iCount = 0; iCount < actions_array.length; iCount++) {
                var action = actions_array[iCount];
                //var actionFound = $("#"+elementid).prop(action);
                var actionFound = has_handler(action);
                if (actionFound == true) {
                    switch (action) {
                        case "focus":
                            $("#" + mainid).bind("mouseenter", function (event) {
                                getElement(elementid).focus();
                                //$("#"+elementid).focus();
                            });
                            break;
                        case "click":
                            $("#" + mainid).bind("click", function (event) {
                                //getElement(elementid).onclick();
                                $("#" + elementid).trigger("click");
                            });
                            break;
                        case "dblclick":
                            $("#" + mainid).bind("dblclick", function (event) {
                                //getElement(elementid).ondblclick();
                                $("#" + elementid).trigger("dblclick");
                            });
                            break;
                        case "mousedown":
                            $("#" + mainid).bind("mousedown", function (event) {
                                //getElement(elementid).onmousedown();
                                $("#" + elementid).trigger("mousedown");
                            });
                            break;
                        case "mouseup":
                            //has in close mthod
                            $("#" + mainid).bind("mouseup", function (event) {
                                //getElement(elementid).onmouseup();
                                $("#" + elementid).trigger("mouseup");
                                //setValue();
                            });
                            break;
                        case "mouseover":
                            $("#" + mainid).bind("mouseover", function (event) {
                                //getElement(elementid).onmouseover();													   
                                $("#" + elementid).trigger("mouseover");
                            });
                            break;
                        case "mousemove":
                            $("#" + mainid).bind("mousemove", function (event) {
                                //getElement(elementid).onmousemove();
                                $("#" + elementid).trigger("mousemove");
                            });
                            break;
                        case "mouseout":
                            $("#" + mainid).bind("mouseout", function (event) {
                                //getElement(elementid).onmouseout();
                                $("#" + elementid).trigger("mouseout");
                            });
                            break;
                    };
                };
            };

        };
        var setOutOfVision = function () {
            var sId = getPostID("postElementHolder");
            $("#" + elementid).after("<div class='" + styles.ddOutOfVision + "' style='height:0px;overflow:hidden;position:absolute;' id='" + sId + "'></div>");
            $("#" + elementid).appendTo($("#" + sId));
        };
        var setTitleText = function (sText) {
            var titletextid = getPostID("postTitleTextID");
            $("#" + titletextid).html(sText);
        };
        var navigateA = function (w) {
            var where = w;
            var childid = getPostID("postChildID");
            var visibleA = $("#" + childid + " a:visible");
            var totalA = visibleA.length;
            var currentP = $("#" + childid + " a:visible").index($("#" + childid + " a.selected:visible"));
            var nextA;
            switch (where) {
                case "next":
                    if (currentP < totalA - 1) {
                        currentP++;
                        nextA = visibleA[currentP];
                    };
                    break;
                case "previous":
                    if (currentP < totalA && currentP > 0) {
                        currentP--;
                        nextA = visibleA[currentP];
                    };
                    break;
            };
            if (typeof (nextA) == "undefined") {
                return false;
            };
            $("#" + childid + " a." + styles.selected).removeClass(styles.selected);
            $(nextA).addClass(styles.selected);
            var selectedA = nextA.id;
            if (!ddList) {
                var sText = (options.showIcon == false) ? a_array[selectedA].text : $("#" + selectedA).html();
                setTitleText(sText);
                setTitleImageSprite(a_array[selectedA].index);
            };
            if (where == "next") {
                if (parseInt(($("#" + selectedA).position().top + $("#" + selectedA).height())) >= parseInt($("#" + childid).height())) {
                    $("#" + childid).scrollTop(($("#" + childid).scrollTop()) + $("#" + selectedA).height() + $("#" + selectedA).height());
                };
            } else {
                if (parseInt(($("#" + selectedA).position().top + $("#" + selectedA).height())) <= 0) {
                    $("#" + childid).scrollTop(($("#" + childid).scrollTop() - $("#" + childid).height()) - $("#" + selectedA).height());
                };
            };
        };
        var next = function () {
            navigateA("next");
        };
        var previous = function () {
            navigateA("previous");
        };
        var setTitleImageSprite = function (i) {
            if (options.useSprite != false) {
                var titletextid = getPostID("postTitleTextID");
                var index = (typeof (i) == "undefined") ? getElement(elementid).selectedIndex : i;
                var sClassName = getElement(elementid).options[index].className;
                if (sClassName.length > 0) {
                    var childid = getPostID("postChildID");
                    var id = $("#" + childid + " a." + sClassName).prop("id");
                    var backgroundImg = $("#" + id).css("background-image");
                    var backgroundPosition = $("#" + id).css("background-position");
                    if (backgroundPosition == undefined) {
                        backgroundPosition = $("#" + id).css("background-position-x") + " " + $("#" + id).css("background-position-y");
                    };
                    var paddingLeft = $("#" + id).css("padding-left");
                    if (backgroundImg != undefined) {
                        $("#" + titletextid).find("." + styles.ddTitleText).attr('style', "background:" + backgroundImg);
                    };
                    if (backgroundPosition != undefined) {
                        $("#" + titletextid).find("." + styles.ddTitleText).css('background-position', backgroundPosition);
                    };
                    if (paddingLeft != undefined) {
                        $("#" + titletextid).find("." + styles.ddTitleText).css('padding-left', paddingLeft);
                    };
                    $("#" + titletextid).find("." + styles.ddTitleText).css('background-repeat', 'no-repeat');
                    $("#" + titletextid).find("." + styles.ddTitleText).css('padding-bottom', '2px');
                };
            };
        };
        var setValue = function () {
            //alert("setValue "+elementid);
            var childid = getPostID("postChildID");
            var allSelected = $("#" + childid + " a." + styles.selected);
            if (allSelected.length == 1) {
                var sText = $("#" + childid + " a." + styles.selected).text();
                var selectedA = $("#" + childid + " a." + styles.selected).prop("id");
                if (selectedA != undefined) {
                    var sValue = a_array[selectedA].value;
                    getElement(elementid).selectedIndex = a_array[selectedA].index;
                };
                //set image on title if using sprite

                if (options.showIcon && options.useSprite != false)
                    setTitleImageSprite();
            } else if (allSelected.length > 1) {
                //var alls = $("#"+elementid +" > option:selected").removeprop("selected");
                for (var i = 0; i < allSelected.length; i++) {
                    var selectedA = $(allSelected[i]).prop("id");
                    var index = a_array[selectedA].index;
                    getElement(elementid).options[index].selected = "selected";
                };
            };
            //alert(getElement(elementid).selectedIndex);
            var sIndex = getElement(elementid).selectedIndex;
            $this.ddProp["selectedIndex"] = sIndex;
            //alert("selectedIndex "+ $this.ddProp["selectedIndex"] + " sIndex "+sIndex);
        };
        var has_handler = function (name) {
            // True if a handler has been added in the html.
            if ($("#" + elementid).prop("on" + name) != undefined) {
                return true;
            };
            // True if a handler has been added using jQuery.
            var evs = $("#" + elementid).data("events");
            if (evs && evs[name]) {
                return true;
            };
            return false;
        };
        var blur_m = function (evt) {
            $("#" + elementid).focus();
            $("#" + elementid)[0].blur();
            setValue();
            $(document).unbind("mouseup", d_onmouseup);
            $(document).unbind("mouseup", blur_m);
        };
        var checkMethodAndApply = function () {
            //console.log("calling checkMethodAndApply");
            var childid = getPostID("postChildID");
            if (has_handler('change') == true) {
                //alert(1);
                var currentSelectedValue = a_array[$("#" + childid + " a.selected").prop("id")].text;
                if ($.trim(oldSelectedValue) !== $.trim(currentSelectedValue) && oldSelectedValue !== "") {
                    $("#" + elementid).trigger("change");
                };
            };
            if (has_handler('mouseup') == true) {
                $("#" + elementid).trigger("mouseup");
            };
            if (has_handler('blur') == true) {
                $(document).bind("mouseup", blur_m);
            };
            return false;
        };
        var hightlightArrow = function (ison) {
            var arrowid = getPostID("postArrowID");
            if (ison == 1)
                $("#" + arrowid).css({ backgroundPosition: '0 100%' });
            else
                $("#" + arrowid).css({ backgroundPosition: '0 0' });
        };
        var setOriginalProperties = function () {
            //properties = {};
            //alert($this.data("dd"));
            for (var i in getElement(elementid)) {
                if (typeof (getElement(elementid)[i]) != 'function' && getElement(elementid)[i] !== undefined && getElement(elementid)[i] !== null) {
                    $this.set(i, getElement(elementid)[i], true); //true = setting local properties
                };
            };
        };
        var setValueByIndex = function (prop, val) {
            if (getByIndex(val) != -1) {
                getElement(elementid)[prop] = val;
                var childid = getPostID("postChildID");
                $("#" + childid + " a." + styles.selected).removeClass(styles.selected);
                $("#" + getByIndex(val).id).addClass(styles.selected);
                var sText = getByIndex(getElement(elementid).selectedIndex).html;
                setTitleText(sText);
            };
        };
        var addRemoveFromIndex = function (i, action) {
            if (action == 'd') {
                for (var key in a_array) {
                    if (a_array[key].index == i) {
                        delete a_array[key];
                        break;
                    };
                };
            };
            //update index
            var count = 0;
            for (var key in a_array) {
                a_array[key].index = count;
                count++;
            };
        };
        var shouldOpenOpposite = function () {
            var childid = getPostID("postChildID");
            var main = getPostID("postID");
            var pos = $("#" + main).offset();
            var mH = $("#" + main).height();
            var wH = $(window).height();
            var st = $(window).scrollTop();
            var cH = $("#" + childid).height();
            var css = { zIndex: options.zIndex, top: "13px", display: "none", width : "105px" }; //(pos.top + mH) +
            var ani = options.animStyle;
            var opp = false;
            var borderTop = styles.noBorderTop;
            $("#" + childid).removeClass(styles.noBorderTop);
            $("#" + childid).removeClass(styles.borderTop);
            if ((wH + st) < Math.floor(cH + mH + pos.top)) {
                var tp = pos.top - cH;
                if ((pos.top - cH) < 0) {
                    tp = 10;
                };
                css = { zIndex: options.zIndex, top: "13px", display: "none", width: "105px"  }; //+tp
                ani = "show";
                opp = true;
                borderTop = styles.borderTop;
            };
            return { opp: opp, ani: ani, css: css, border: borderTop };
        };
        var fireOpenEvent = function () {
            if ($this.onActions["onOpen"] != null) {
                eval($this.onActions["onOpen"])($this);
            };
        };
        var fireCloseEvent = function () {
            checkMethodAndApply();
            if ($this.onActions["onClose"] != null) {
                eval($this.onActions["onClose"])($this);
            };
        };
        var d_onkeydown = function (event) {
            var childid = getPostID("postChildID");
            var keyCode = event.keyCode;
            //alert("keyCode "+keyCode);
            if (keyCode == 8) {
                event.preventDefault(); event.stopPropagation();
                //remove char
                inputText = (inputText.length == 0) ? "" : inputText.substr(0, inputText.length - 1);
            };
            switch (keyCode) {
                case 39:
                case 40:
                    //move to next
                    event.preventDefault(); event.stopPropagation();
                    next();
                    break;
                case 37:
                case 38:
                    //move to previous
                    event.preventDefault(); event.stopPropagation();
                    previous();
                    break;
                case 27:
                case 13:
                    $this.close();
                    setValue();
                    break;
                default:
                    if (keyCode > 46) {
                        inputText += String.fromCharCode(keyCode);
                    };
                    var ind = in_array(inputText);
                    if (ind != -1) {
                        $("#" + childid).css({ height: 'auto' });
                        $("#" + childid + " a").hide();
                        $(ind).show();
                        var wf = shouldOpenOpposite();
                        $("#" + childid).css(wf.css);
                        $("#" + childid).css({ display: 'block' });
                    } else {
                        $("#" + childid + " a").show();
                        $("#" + childid).css({ height: oldHeight+10 + 'px' });
                       
                    };
                    break;
            };
            if (has_handler("keydown") == true) {
                getElement(elementid).onkeydown();
            };
            return false;
        };
        var d_onmouseup = function (event) {
            if (getInsideWindow() == false) {
                //alert("evt.target: "+event.target);
                //$this.data("dd").close();
                $this.close();
            };
            return false;
        };
        var d_onkeyup = function (event) {
            if ($("#" + elementid).prop("onkeyup") != undefined) {
                //$("#"+elementid).keyup();
                getElement(elementid).onkeyup();
            };
            return false;
        };
        /************* public methods *********************/
        this.open = function () {
            if (($this.get("disabled", true) == true) || ($this.get("options", true).length == 0)) return;
            var childid = getPostID("postChildID");
            if (msOldDiv != "" && childid != msOldDiv) {
                $("#" + msOldDiv).slideUp("fast");
                $("#" + msOldDiv).css({ zIndex: '0' });
            };
            if ($("#" + childid).css("display") == "none") {
                oldSelectedValue = a_array[$("#" + childid + " a.selected").prop("id")].text;
                //keyboard action
                inputText = "";
                oldHeight = $("#" + childid).height();
                $("#" + childid + " a").show();
                $(document).bind("keydown", d_onkeydown);
                $(document).bind("keyup", d_onkeyup);
                //end keyboard action

                //close onmouseup
                $(document).bind("mouseup", d_onmouseup);

                //check open
                var wf = shouldOpenOpposite();
                $("#" + childid).css(wf.css);
                if (wf.opp == true) {
                    $("#" + childid).css({ display: 'block' });
                    $("#" + childid).addClass(wf.border);
                    fireOpenEvent();
                } else {
                    $("#" + childid)[wf.ani]("fast", function () {
                        $("#" + childid).addClass(wf.border);
                        fireOpenEvent();
                    });
                };
                if (childid != msOldDiv) {
                    msOldDiv = childid;
                };
            };
        };
        this.close = function () {
            var childid = getPostID("postChildID");
            //console.log("calling close " + $("#"+childid).css("display"));
            if ($("#" + childid).css("display") == "none") { return false; };
            var top = $("#" + getPostID("postTitleID")).position().top;
            var wf = shouldOpenOpposite();
            //var oldHeight = $("#"+childid).height();
            isFilter = false;
            if (wf.opp == true) {
                $("#" + childid).animate({
                    height: 0,
                    top: top
                }, function () {
                    $("#" + childid).css({ height: oldHeight + 'px', display: 'none' });
                    fireCloseEvent();
                });
            }
            else {
                $("#" + childid).slideUp("fast", function (event) {
                    fireCloseEvent();
                    $("#" + childid).css({ zIndex: '0' });
                    $("#" + childid).css({ height: oldHeight + 'px' });
                });
            };
            setTitleImageSprite();
            $(document).unbind("keydown", d_onkeydown);
            $(document).unbind("keyup", d_onmouseup);
            $(document).unbind("mouseup", d_onkeyup);
        };
        this.selectedIndex = function (i) {
            if (typeof (i) == "undefined") {
                return $this.get("selectedIndex");
            } else {
                $this.set("selectedIndex", i);
            };
        };
        this.debug = function (is) {
            if (typeof (is) == "undefined" || is == true) {
                $("." + styles.ddOutOfVision).removeAttr("style");
            } else {
                $("." + styles.ddOutOfVision).attr("style", "height:0px;overflow:hidden;position:absolute");
            };
        };
        //update properties
        this.set = function (prop, val, isLocal) {
            //alert("- set " + prop + " : "+val);
            if (prop == undefined || val == undefined) throw { message: "set to what?" };
            $this.ddProp[prop] = val;
            if (isLocal != true) {
                switch (prop) {
                    case "selectedIndex":
                        setValueByIndex(prop, val);
                        break;
                    case "disabled":
                        $this.disabled(val, true);
                        break;
                    case "multiple":
                        getElement(elementid)[prop] = val;
                        ddList = ($(sElement).prop("size") > 0 || $(sElement).prop("multiple") == true) ? true : false;
                        if (ddList) {
                            //do something
                            var iHeight = $("#" + elementid).height();
                            var childid = getPostID("postChildID");
                            $("#" + childid).css("height", iHeight + "px");
                            //hide titlebar
                            var titleid = getPostID("postTitleID");
                            $("#" + titleid).hide();
                            var childid = getPostID("postChildID");
                            $("#" + childid).css({ display: 'block', position: 'relative' });
                            applyEventsOnA();
                        };
                        break;
                    case "size":
                        getElement(elementid)[prop] = val;
                        if (val == 0) {
                            getElement(elementid).multiple = false;
                        };
                        ddList = ($(sElement).prop("size") > 0 || $(sElement).prop("multiple") == true) ? true : false;
                        if (val == 0) {
                            //show titlebar
                            var titleid = getPostID("postTitleID");
                            $("#" + titleid).show();
                            var childid = getPostID("postChildID");
                            $("#" + childid).css({ display: 'none', position: 'absolute' });
                            var sText = "";
                            if (getElement(elementid).selectedIndex >= 0) {
                                var aObj = getByIndex(getElement(elementid).selectedIndex);
                                sText = aObj.html;
                                manageSelection($("#" + aObj.id));
                            };
                            setTitleText(sText);
                        } else {
                            //hide titlebar
                            var titleid = getPostID("postTitleID");
                            $("#" + titleid).hide();
                            var childid = getPostID("postChildID");
                            $("#" + childid).css({ display: 'block', position: 'relative' });
                        };
                        break;
                    default:
                        try {
                            //check if this is not a readonly properties
                            getElement(elementid)[prop] = val;
                        } catch (e) {
                            //silent
                        };
                        break;
                };
            };
            //alert("get " + prop + " : "+$this.ddProp[prop]);
            //$this.set("selectedIndex", 0);
        };
        this.get = function (prop, forceRefresh) {
            if (prop == undefined && forceRefresh == undefined) {
                //alert("c1 : " +$this.ddProp);
                return $this.ddProp;
            };
            if (prop != undefined && forceRefresh == undefined) {
                //alert("c2 : " +$this.ddProp[prop]);
                return ($this.ddProp[prop] != undefined) ? $this.ddProp[prop] : null;
            };
            if (prop != undefined && forceRefresh != undefined) {
                //alert("c3 : " +getElement(elementid)[prop]);
                return getElement(elementid)[prop];
            };
        };
        this.visible = function (val) {
            var id = getPostID("postID");
            if (val == true) {
                $("#" + id).show();
            } else if (val == false) {
                $("#" + id).hide();
            } else {
                return $("#" + id).css("display");
            };
        };
        this.add = function (opt, index) {
            var objOpt = opt;
            var sText = objOpt.text;
            var sValue = (objOpt.value == undefined || objOpt.value == null) ? sText : objOpt.value;
            var img = (objOpt["title"] == undefined || objOpt["title"] == null) ? '' : objOpt["title"];
            var i = (index == undefined || index == null) ? getElement(elementid).options.length : index;
            getElement(elementid).options[i] = new Option(sText, sValue);
            if (img != '') getElement(elementid).options[i]["title"] = img;
            //check if exist
            var ifA = getByIndex(i);
            if (ifA != -1) {
                //replace
                var aTag = createA(getElement(elementid).options[i], i, "", "");
                $("#" + ifA.id).html(aTag);
                //a_array[key]
            } else {
                var aTag = createA(getElement(elementid).options[i], i, "", "");
                //add
                var childid = getPostID("postChildID");
                $("#" + childid).append(aTag);
                applyEventsOnA();
            };
        };
        this.remove = function (i) {
            getElement(elementid).remove(i);
            if ((getByIndex(i)) != -1) { $("#" + getByIndex(i).id).remove(); addRemoveFromIndex(i, 'd'); };
            //alert("a" +a);
            if (getElement(elementid).length == 0) {
                setTitleText("");
            } else {
                var sText = getByIndex(getElement(elementid).selectedIndex).html;
                setTitleText(sText);
            };
            $this.set("selectedIndex", getElement(elementid).selectedIndex);
        };
        this.disabled = function (dis, isLocal) {
            getElement(elementid).disabled = dis;
            //alert(getElement(elementid).disabled);
            var id = getPostID("postID");
            if (dis == true) {
                $("#" + id).css("opacity", styles.disabled);
                $this.close();
            } else if (dis == false) {
                $("#" + id).css("opacity", 1);
            };
            if (isLocal != true) {
                $this.set("disabled", dis);
            };
        };
        //return form element
        this.form = function () {
            return (getElement(elementid).form == undefined) ? null : getElement(elementid).form;
        };
        this.item = function () {
            //index, subindex - use arguments.length
            if (arguments.length == 1) {
                return getElement(elementid).item(arguments[0]);
            } else if (arguments.length == 2) {
                return getElement(elementid).item(arguments[0], arguments[1]);
            } else {
                throw { message: "An index is required!" };
            };
        };
        this.namedItem = function (nm) {
            return getElement(elementid).namedItem(nm);
        };
        this.multiple = function (is) {
            if (typeof (is) == "undefined") {
                return $this.get("multiple");
            } else {
                $this.set("multiple", is);
            };

        };
        this.size = function (sz) {
            if (typeof (sz) == "undefined") {
                return $this.get("size");
            } else {
                $this.set("size", sz);
            };
        };
        this.addMyEvent = function (nm, fn) {
            $this.onActions[nm] = fn;
        };
        this.fireEvent = function (nm) {
            eval($this.onActions[nm])($this);
        };
        this.showRows = function (r) {
            if (typeof r == "undefined" || r == 0) { return false };
            var childid = getPostID("postChildID");
            var fc = $("#" + childid + " a:first").height();
            var dh = (fc == 0) ? options.rowHeight : fc;
            var iHeight = r * dh;
            $("#" + childid).css("height", iHeight + "px");
        };
        //end 
        var updateCommonVars = function () {
            $this.set("version", $.msDropDown.version);
            $this.set("author", $.msDropDown.author);
        };
        var init = function () {
            //create wrapper
            createDropDown();
            //update propties
            //alert("init");
            setOriginalProperties();
            updateCommonVars();
            if (options.onInit != '') {
                eval(options.onInit)($this);
            };
        };
        init();
    };
    //static
    $.msDropDown = {
        version: '2.38',
        author: "Marghoob Suleman",
        counter: 20,
        debug: function (v) {
            if (v == true) {
                $(".ddOutOfVision").css({ height: '20px', position: 'relative' });
            } else {
                $(".ddOutOfVision").css({ height: '0px', position: 'absolute' });
            };
        },
        create: function (id, opt) {
            return $(id).msDropDown(opt).data("dd");
        }
    };
    $.fn.extend({
        msDropDown: function (options) {
            return this.each(function () {
                //if ($(this).data('dd')) return; // need to comment when using refresh method - will remove in next version
                var mydropdown = new dd(this, options);
                $(this).data('dd', mydropdown);
            });
        }
    });
    //fixed for prop
    if (typeof ($.fn.prop) == 'undefined') {
        $.fn.prop = function (w, v) {
            if (typeof v == "undefined") {
                return $(this).attr(w);
            };
            try {
                $(this).attr(w, v);
            } catch (e) {
                //some properties are read only.
            };
        };
    };

})(jQuery);
  function getParameter(sParam) {
    var sPageURL = window.location.search.substring(1);
    var sURLVariables = sPageURL.split("&");
    for (var i = 0; i < sURLVariables.length; i++) {
        var sParameterName = sURLVariables[i].split("=");
        if (sParameterName[0].toLowerCase() == sParam.toLowerCase()) {
            return sParameterName[1].replace("#", "%23");
        }
    }
    return "";
}
  $(function () {

      $("#beginRequest").click(function () {
          PostGetUrl();
      });
      $("#main-submit").click(function () {
          PostGetUrl();
      });
      function PostGetUrl() {

          var url = "?", selectedMarque = "";

          if ($('#MainPanel_rayonDdList').val() != "") url += ("fam1=" + $('#MainPanel_rayonDdList').val());
          if ($('#MainPanel_familleDdList').val() != "" && $('#MainPanel_familleDdList').val() != null) url += ("&fam2=" + $('#MainPanel_familleDdList').val());
          if ($('#MainPanel_sousFamilleDdList').val() != "" && $('#MainPanel_sousFamilleDdList').val() != null) url += ("&fam3=" + $('#MainPanel_sousFamilleDdList').val());
          if ($('#MainPanel_collectionDdList').val() != "" && $('#MainPanel_collectionDdList').val() != null) url += ("&col=" + $('#MainPanel_collectionDdList').val());

          //$('#MainPanel_ListBox2').find("option").each(function (i, e) {
          //    selectedMarque += $(e).val() + ",";
          //});
          $("#Allmarques").find("input:checkbox").each(function (i, e) {

              if ($(e).is(':checked')) {
                  selectedMarque += $(e).val() + ",";
              }
          });



          if (selectedMarque.length != 0) {
              url += ("&Brand=" + selectedMarque.substring(0, selectedMarque.length - 1));
          }

          if ($("#prixMini").val()) url += "&PriceMin=" + $("#prixMini").val();
          if ($("#prixMax").val()) url += "&PriceMax=" + $("#prixMax").val();

          if ($("#MainPanel_Nouveaute").is(':checked') && $("#rowNouv").is(':visible')) url += "&news=X"; //input[type='checkbox'] id^='_Nouveaute'
          if ($("#MainPanel_Destockage").is(':checked') && $("#rowDes").is(':visible')) url += "&discount=X&Des=X";
          if ($("#MainPanel_Promotion").is(':checked') && $("#rowPromo").is(':visible')) url += "&rebates=X";
          if ($("#MainPanel_VenteFlash").is(':checked') && $("#rowVtf").is(':visible')) url += "&Offres_du_moment=X";
          //if ($("#MainPanel_CoupCoeur").is(':checked') && $("#rowCdc").is(':visible')) url += "&CpCoeur=X";
          //if ($("#MainPanel_Incont").is(':checked') && $("#rowInc").is(':visible')) url += "&Incont=X";
          var Dept = "";
          $("input[name='enlevement']").each(function (i, e) {
              if ($(e).is(':checked')) {

                  if ($(e).is(':checked')) {
                      Dept += ($(e).val() + ',');
                  }
              }
          });
          //  alert(url);
          if (Dept.length != 0) {

              Dept = Dept.replace("'',", ",");
              url += "&Depot=" + (Dept != "," ? Dept.substring(0, Dept.length - 1) : Dept);
          }

          debugger;
          var lang = "";

          if (getParameter("lang") != "") {
              lang = "&lang=" + getParameter("lang");
          } else {
              lang = "&lang=fr";
          }


          //if ($("#MainPanel_ddlSort").val() != "0") { url += ("&Sort=" + encodeURI($("#MainPanel_ddlSort").val())); }

          if ($("#MainPanel_search").val()) url += "&search=" + $("#MainPanel_search").val();
          let str = "/Article.aspx" + url.replace("?&", "?") + lang;
          window.location.href = "Article.aspx" + url.replace("?&", "?") + lang;
      };

  });
var rechercheAv = (function () {
    var module = {};

    module.onChangeDdList = function (caller) {
        $('#MainPanel_collectionDdList').empty();

       // $("#listCheckbox").css("opacity", "0.5");
        $("#waitDivCheckbox").show();

        $("#listMultiple").css("opacity", "0.3");
        $("#waitDivListMultiple").show();

        var data = {
            fn1: $('#MainPanel_rayonDdList').val(),
            fn2: (caller == 'MainPanel_rayonDdList') ? '' : $('#MainPanel_familleDdList').val(),
            fn3: ((caller == 'MainPanel_familleDdList') || (caller == 'MainPanel_rayonDdList')) ? '' : $('#MainPanel_sousFamilleDdList').val(),
            lang: window.location.href.split("lang=")[1]
        };

        fn1: $('#MainPanel_rayonDdList').val(),
        console.log(data);
        $.ajax({
            type: "POST",
            url: "AdvancedSearchWS.asmx/GetChildFamille",
            data: JSON.stringify(data),
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            success: function (result) {
                var ret = "<option value='' > ... </option>";
                for (var value in result.d) {
                    ret += "<option value='" + value + "' >" + result.d[value] + "</option>";
                }

                if (caller == "MainPanel_rayonDdList") {
                    $('#MainPanel_familleDdList').empty();
                    $('#MainPanel_sousFamilleDdList').empty();
                    $('#MainPanel_familleDdList').append(ret);

                    $('#circle3').css("display", "block");
                    $('#circle4').css("display", "block");
                    $('#MainPanel_sousFamilleDdList').css("display", "block");
                    $('#MainPanel_collectionDdList').css("display", "block");
                }

                if (caller == "MainPanel_familleDdList") {
                    $('#MainPanel_sousFamilleDdList').empty();
                    $('#MainPanel_sousFamilleDdList').append(ret);

                    $('#circle3').css("display", "block");
                    $('#circle4').css("display", "block");
                    $('#MainPanel_sousFamilleDdList').css("display", "block");
                    $('#MainPanel_collectionDdList').css("display", "block");
                    if ($.isEmptyObject(result.d)) {
                        $('#circle3').css("display", "none");
                        $('#circle4').css("display", "none");
                        $('#MainPanel_collectionDdList').css("display", "none");
                        $('#MainPanel_sousFamilleDdList').css("display", "none");
                    }
                }

                if (caller == "MainPanel_sousFamilleDdList") {
                    $('#MainPanel_collectionDdList').append(ret);

                    $('#circle4').css("display", "block");
                    $('#MainPanel_collectionDdList').css("display", "block");
                    if ($.isEmptyObject(result.d)) {
                        $('#circle4').css("display", "none");
                        $('#MainPanel_collectionDdList').css("display", "none");
                    }
                }

                module.loadMarque(true);
            }
        });
    };

    module.loadMarque = function (callbackUnivers) {
        var data = {
            fn1: $('#MainPanel_rayonDdList').val(),
            fn2: $('#MainPanel_familleDdList').val(),
            fn3: $('#MainPanel_sousFamilleDdList').val(),
            col: $('#MainPanel_collectionDdList').val(),
            univers: []
        };

        $("#listCheckbox").css("opacity", "0.5");
        $("#waitDivCheckbox").show();
        $("#listMultiple").css("opacity", "0.3");
        $("#waitDivListMultiple").show();

        $('#MainPanel_ListBox2').empty();
        $('#MainPanel_ListBox1').empty();
        $('#Allmarques').empty();
        $("#listCheckbox input:checked").each(function (i, e) {
            data.univers.push("'" + $(e).attr('value') + "'");
        });
        
        $.ajax({
            type: "POST",
            url: "AdvancedSearchWS.asmx/GetMarqueByFamille",
            data: JSON.stringify(data),
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            success: function (result) {
                var ret = "";
                for (var i = 0; i < result.d.length; i++) {
                    ret += "<label for='" + result.d[i][0] + "' class='Labellist'><input name='" + result.d[i][0] + "' type='checkbox'   value='" + result.d[i][0] + "' id='" + result.d[i][0] + "' class='Marque'><span  class='small-label-list'>" + result.d[i][1] + "</span></label>";//"<option value='" + result.d[i][0] + "' >" + result.d[i][1] + "</option>";
                }

                //$('#MainPanel_ListBox1').append(ret);

                $('#Allmarques').append(ret); // Allmarques
                $("#listMultiple").css("opacity", "1");
                $("#waitDivListMultiple").hide();

                if (callbackUnivers)
                    module.refreshUnivers();
                else {
                    $("#waitDivCheckbox").hide();
                    $("#listCheckbox").css("opacity", "1");
                }
            }
        });
    };

    module.addMarque = function () {
        var selectedOpts = $('#MainPanel_ListBox1 option:selected');

        $('#MainPanel_ListBox2').append($(selectedOpts).clone());
        $(selectedOpts).remove();

        module.refreshUnivers();
    };

    module.delMarque = function () {
        var selectedOpts = $('#MainPanel_ListBox2 option:selected');

        $('#MainPanel_ListBox1').append($(selectedOpts).clone());
        $(selectedOpts).remove();

        module.refreshUnivers();
    };

    module.refreshUnivers = function () {
        var selectedMarque = [];

        module.showCheckBox(null);

        $("#Allmarques").find("input:checkbox").each(function (i, e) {
            
            if ($(e).is(':checked')) {
                selectedMarque.push("'" + $(e).val() + "'");
            
            }
        });

        $("#Allmarques").find("input:checkbox").on("change", function () {
     
            module.refreshUnivers();
        });
        /*
        $('#MainPanel_ListBox2').find("option").each(function (i, e) {
            selectedMarque.push("'" + $(e).val() + "'");
        });

        //Si pas de marques sélectionnées on prend les marques dispo ça c'est 
        if (selectedMarque.length == 0) {
            $('#MainPanel_ListBox1').find("option").each(function (i, e) {
                selectedMarque.push("'" + $(e).val() + "'");
            });
        };*/

        var data = {
            listMarque: selectedMarque,
            fn1: $('#MainPanel_rayonDdList').val(),
            fn2: $('#MainPanel_familleDdList').val(),
            fn3: $('#MainPanel_sousFamilleDdList').val(),
            col: $('#MainPanel_collectionDdList').val()
        };

        $.ajax({
            type: "POST",
            url: "AdvancedSearchWS.asmx/GetArticleUniversByMarque",
            data: JSON.stringify(data),
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            success: function (result) {
                $("#countNouv").empty().append('(' + result.d.nouv + ')');
                $("#countPromo").empty().append('(' + result.d.promo + ')');
                $("#countDes").empty().append('(' + result.d.destock + ')');
                $("#countVf").empty().append('(' + result.d.venteF + ')');
                $("#countCc").empty().append('(' + result.d.cDC + ')');
                $("#countInc").empty().append('(' + result.d.inc + ')');

                module.showCheckBox(result.d);

                $("#waitDivCheckbox").hide();
                $("#listCheckbox").css("opacity", "1");
            }
        });
    };

    module.showCheckBox = function (value) {
        if (value && value.nouv == 0) {
            $(".rowNouv").css("display", "flex");
            $('#Nouveaute').attr('checked', false);
        }
        else {
			$(".rowNouv").css("display", "none");
        }

        if (value && value.promo == 0) {
            $(".rowPromo").css("display", "flex");
            $('#Promotion').attr('checked', false);
        }
        else {
			$(".rowPromo").css("display", "none");
        }

        if (value && value.venteF == 0) {
            $(".rowVtf").css("display", "flex");
            $('#VenteFlash').attr('checked', false);
        }
        else {
			$(".rowVtf").css("display", "none");
        }

        if (value && value.destock == 0) {
            $(".rowDes").css("display", "flex");
            $('#Destockage').attr('checked', false);
        }
        else {
			$(".rowDes").css("display", "none");
        }

        if (value && value.inc == 0) {
            $(".rowInc").css("display", "flex");
            $('#Incont').attr('checked', false);
        }
        else {
			$(".rowInc").css("display", "none");
        }

        if (value && value.cDC == 0) {
            $(".rowCdc").css("display", "flex");
            $('#CoupCoeur').attr('checked', false);
        } else {
			$(".rowCdc").css("display", "none");
        }
    };

    return module;
})();

/* Cookies Directive - The rewrite. Now a jQuery plugin
 * Version: 2.0.1
 * Author: Ollie Phillips
 * 24 October 2013
 */

;(function($) {
	$.cookiesDirective = function(options) {
			
		// Default Cookies Directive Settings
		var settings = $.extend({
			//Options
			explicitConsent: true,
			position: 'top',
			duration: 10,
			limit: 0,
			message: null,				
			cookieScripts: null,
			privacyPolicyUri: 'privacy.html',
			LanceCookieScript: function(){},	
			// Styling
			fontFamily: 'helvetica',
			fontColor: '#FFFFFF',
			fontSize: '13px',
			backgroundColor: '#000000',
			backgroundOpacity: '80',
			linkColor: '#83d0f5'
		}, options);
		
		// Perform consent checks
		if(!getCookie('cookiesDirective')) {
			if(settings.limit > 0) {
				// Display limit in force, record the view
				if(!getCookie('cookiesDisclosureCount')) {
					setCookie('cookiesDisclosureCount',1,1);		
				} else {
					var disclosureCount = getCookie('cookiesDisclosureCount');
					disclosureCount ++;
					setCookie('cookiesDisclosureCount',disclosureCount,1);
				}
				
				// Have we reached the display limit, if not make disclosure
				if(settings.limit >= getCookie('cookiesDisclosureCount')) {
					disclosure(settings);		
				}
			} else {
				// No display limit
				disclosure(settings);
			}		
			
			// If we don't require explicit consent, load up our script wrapping function
			if(!settings.explicitConsent) {
				settings.LanceCookieScript.call();
			}	
		} else {
			// Cookies accepted, load script wrapping function
			settings.LanceCookieScript.call();
		}		
	};
	
	// Used to load external javascript files into the DOM
	$.cookiesDirective.loadScript = function(options) {
		var settings = $.extend({
			uri: 		'', 
			appendTo: 	'body'
		}, options);	
		
		var elementId = String(settings.appendTo);
		var sA = document.createElement("script");
		sA.src = settings.uri;
		sA.type = "text/javascript";
		sA.onload = sA.onreadystatechange = function() {
			if ((!sA.readyState || sA.readyState == "loaded" || sA.readyState == "complete")) {
				return;
			} 	
		};
		switch(settings.appendTo) {
			case 'head':			
				$('head').append(sA);
			  	break;
			case 'body':
				$('body').append(sA);
			  	break;
			default: 
				$('#' + elementId).append(sA);
		}
	};
	
	// Helper scripts
	// Get cookie
	var getCookie = function(name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	};
	
	// Set cookie
	var setCookie = function(name,value,days) {
		var expires = "";
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			expires = "; expires="+date.toGMTString();
		}
		document.cookie = name+"="+value+expires+"; path=/";
	};
	
	// Detect IE < 9
	var checkIE = function(){
		var version;
		if (navigator.appName == 'Microsoft Internet Explorer') {
	        var ua = navigator.userAgent;
	        var re = new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})");
	        if (re.exec(ua) !== null) {
	            version = parseFloat(RegExp.$1);
			}	
			if (version <= 8.0) {
				return true;
			} else {
				if(version == 9.0) {
					if(document.compatMode == "BackCompat") {
						// IE9 in quirks mode won't run the script properly, set to emulate IE8	
						var mA = document.createElement("meta");
						mA.content = "IE=EmulateIE8";				
						document.getElementsByTagName('head')[0].appendChild(mA);
						return true;
					} else {
						return false;
					}
				}	
				return false;
			}		
	    } else {
			return false;
		}
	};

	// Disclosure routines
	var disclosure = function(options) {
		var settings = options;
		settings.css = 'fixed';
		
		// IE 9 and lower has issues with position:fixed, either out the box or in compatibility mode - fix that
		if(checkIE()) {
			settings.position = 'top';
			settings.css = 'absolute';
		}
		
		// Any cookie setting scripts to disclose
		var scriptsDisclosure = '';
		if (settings.cookieScripts) {
			var scripts = settings.cookieScripts.split(',');
			var scriptsCount = scripts.length;
			var scriptDisclosureTxt = '';
			if(scriptsCount>1) {
				for(var t=0; t < scriptsCount - 1; t++) {
					 scriptDisclosureTxt += scripts[t] + ', ';	
				}	
				//scriptsDisclosure = ' Nous utilisons ' +  scriptDisclosureTxt.substring(0,  scriptDisclosureTxt.length - 2) + ' et ' + scripts[scriptsCount - 1] + ' . ';
			} else {
				//scriptsDisclosure = ' Nous utilisons ' + scripts[0] + ' il installe des Cookies.';		
			}
		} 
		
		// Create overlay, vary the disclosure based on explicit/implied consent
		// Set our disclosure/message if one not supplied
		var html = ''; 
		html += '<div id="epd">';
		html += '<div id="cookiesdirective" style="position:'+ settings.css +';'+ settings.position + ':-300px;left:0px;width:100%;';
		html += 'height:auto;background:' + settings.backgroundColor + ';opacity:.' + settings.backgroundOpacity + ';';
		html += '-ms-filter: “alpha(opacity=' + settings.backgroundOpacity + ')”; filter: alpha(opacity=' + settings.backgroundOpacity + ');';
		html += '-khtml-opacity: .' + settings.backgroundOpacity + '; -moz-opacity: .' + settings.backgroundOpacity + ';';
		html += 'color:' + settings.fontColor + ';font-family:' + settings.fontFamily + ';font-size:' + settings.fontSize + ';';
		html += 'text-align:center;z-index:1000;">';
		html += '<div style="position:relative;height:auto;width:90%;padding:10px;margin-left:auto;margin-right:auto;">';
			
		if(!settings.message) {
			if(settings.explicitConsent) {
				// Explicit consent message
				settings.message = 'Les cookies assurent le bon fonctionnement de notre site Internet. En utilisant celui-ci, '+ texteCookiebann1;
				settings.message += 'vous acceptez l\'utilisation des cookies .';
			} else {
				// Implied consent message
				settings.message = ''+ texteCookiebann1;
			}		
		}	
		html += settings.message;
		
		// Build the rest of the disclosure for implied and explicit consent
		if(settings.explicitConsent) {
			// Explicit consent disclosure
			html += scriptsDisclosure + 'Les cookies assurent le bon fonctionnement de notre site Internet.'+ texteCookiebann1;
			html += 'Pour en savoir plus  <a style="color:'+ settings.linkColor + ';font-weight:bold;';
			html += 'font-family:' + settings.fontFamily + ';font-size:' + settings.fontSize + ';" href="'+ settings.privacyPolicyUri + '">privacy policy</a>.<br/>';
			html += '<div id="epdnotick" style="color:#ca0000;display:none;margin:2px;"><span style="background:#cecece;padding:2px;">Vous devez accepter les Cookies de ce site</span></div>';
			html += '<div style="margin-top:5px;">J\'accepte les cookies de ce site <input type="checkbox" name="epdagree" id="epdagree" />&nbsp;';
			html += '<input type="submit" name="explicitsubmit" id="explicitsubmit" value="Continuer"/><br/></div></div>';
		
		} else {
			// Implied consent disclosure
			html += scriptsDisclosure + ''+ texteCookiebann2 +' <a style="color:'+ settings.linkColor + ';';
			html += 'font-weight:bold;font-family:' + settings.fontFamily + ';font-size:' + settings.fontSize + ';" href="'+ settings.privacyPolicyUri + '">'+texteCookiebann3+'</a> <br> '+ texteCookiebann5 +'';
			html += ' <a style="color:'+ settings.linkColor + ';';
			html += 'font-weight:bold;font-family:' + settings.fontFamily + ';font-size:' + settings.fontSize + ';" href="javascript:;" name="impliedsubmit" id="impliedsubmit"> '+texteCookiebann4+' </a> ';	
		}		
		html += '</div></div>';
		$('body').append(html);
		
		//
		// Serve the disclosure, and be smarter about branching
		var dp = settings.position.toLowerCase();
		if(dp != 'top' && dp!= 'bottom') {
			dp = 'top';
		}	
		var opts = { in: null, out: null};
		if(dp == 'top') {
			opts.in = {'top':'0'};
			opts.out = {'top':'-300'};
		} else {
			opts.in = {'bottom':'0'};
			opts.out = {'bottom':'-300'};
		}		

		// Start animation
		$('#cookiesdirective').animate(opts.in, 1000, function() {
			// Set event handlers depending on type of disclosure
			if(settings.explicitConsent) {
				// Explicit, need to check a box and click a button
				$('#explicitsubmit').click(function() {
					if($('#epdagree').is(':checked')) {	
						// Set a cookie to prevent this being displayed again
					    setCookie('cookiesDirective', 1, 61);
					
						// Close the overlay
						$('#cookiesdirective').animate(opts.out,1000,function() { 
							// Remove the elements from the DOM and reload page
							$('#cookiesdirective').remove();
							location.reload(true);
						});
					} else {
						// We need the box checked we want "explicit consent", display message
						$('#epdnotick').css('display', 'block'); 
					}	
				});
			} else {
				// Implied consent, just a button to close it
				$('#impliedsubmit').click(function() {
					// Set a cookie to prevent this being displayed again
				    setCookie('cookiesDirective', 1, 61);

				    popupSwing();
				   
					// Close the overlay
					$('#cookiesdirective').animate(opts.out,1000,function() { 
						// Remove the elements from the DOM and reload page
						$('#cookiesdirective').remove();
					});
				});
			}	
			var messageconnete = getCookieMessage("messageconnete");
			function popupSwing() {

			    if ($("#PanelUp_LabelLogin").length != 0) {
			        $(".popin").fadeOut("slow");
			    } else  if(messageconnete=="")  {
			        $(".popin").fadeIn("slow");
			    }
			}
			if(settings.duration > 0)
			{
				// Set a timer to remove the warning after 'settings.duration' seconds
				setTimeout(function(){
					$('#cookiesdirective').animate({
						opacity:'0'
					},2000, function(){
					    $('#cookiesdirective').css(dp, '-300px');
					    popupSwing();
					});
				}, settings.duration * 1000);
			}
		});	
	};
})(jQuery);

/*(function ($) {

    $.fn.shareButtons = function (url, options) {

        if (typeof url === 'object') {
            options = url;
            url = window.location.href;
        }

        options = $.extend({
            facebook: false,
            twitter: false,
            //googlePlus : false,
            pinterest: false,
            tumblr: false,
            email: false
        }, options);

        var ACTION = '  onclick="$(this).modal({width:804, height:542}).Ouvre(); return false;" ';
        var url_encoded = window.encodeURIComponent(url);
        var TitreHead = "";
        
        var typeBrown = "";
        if (detectMob()) {
            typeBrown = "mob";
            options.email.TARGET = "NOPOPUP";
        }

        function detectMob() {
            const toMatch = [
                /Android/i,
                /webOS/i,
                /iPhone/i,
                /iPad/i,
                /iPod/i,
                /BlackBerry/i,
                /Windows Phone/i
            ];

            return toMatch.some((toMatchItem) => {
                return navigator.userAgent.match(toMatchItem);
            });
        }
        var shareURLs = {
            'facebook': 'https://facebook.com/sharer.php?u=' + url_encoded,
            'twitter': 'https://twitter.com/intent/tweet?url=' + url_encoded,
            //'googlePlus' : 'https://plus.google.com/share?url=' + url_encoded,
            'tumblr': 'http://www.tumblr.com/share/link?url=' + url_encoded,
            'pinterest': 'https://pinterest.com/pin/create/button?url=' + url_encoded,
            'instagram': 'https://www.instagram.com/explore/tags/laboutiqueduspectacle/',
            'email': '/partageemail' + typeBrown + '.aspx?url=' + url_encoded,
        };

        if (options.titre.text) {
            TitreHead = options.titre.text;
        }

        if (options.twitter) {

            if (options.twitter.text) {
                shareURLs['twitter'] += '&text=' + encodeURIComponent(options.twitter.text);
            }

            if (options.twitter.via) {
                shareURLs['twitter'] += '&via=' + encodeURIComponent(options.twitter.via);
            }

        }

        if (options.email) {
            if (options.email.GA_CODARTICLE) {
                shareURLs['email'] += '&GA_CODE=' + encodeURIComponent(options.email.GA_CODARTICLE);
            }

            if (options.email.LANG) {
                shareURLs['email'] += '&lang=' + encodeURIComponent(options.email.LANG);
            }
            if (options.email.TARGET == "POPUP") {

            }
        }

        if (options.tumblr) {

            if (options.tumblr.name) {
                shareURLs['tumblr'] += '&name=' + encodeURIComponent(options.tumblr.name);
            }

            if (options.tumblr.description) {
                shareURLs['tumblr'] += '&description=' + encodeURIComponent(options.tumblr.description);
            }
        }


        if (options.pinterest) {

            if (options.pinterest.media) {
                shareURLs['pinterest'] += '&media=' + encodeURIComponent(options.pinterest.media);
            }

            if (options.pinterest.description) {
                shareURLs['pinterest'] += '&description=' + encodeURIComponent(options.pinterest.description);
            }

        }

        this.each(function (i) {

            var elem = $(this);
            elem.addClass('socialPlugin');
            elem.append('<span class="showSocialButtons "></span>');
            elem.append('<span class="socials"></span>');


            var socialButtonsPopUp = elem.find('.socials');
            //ajoute le titre

            if (TitreHead != "") {
                socialButtonsPopUp.append($('<span class="Title">' + TitreHead + '</span>'));
            }

            if (options.twitter) {
                if (options.email.TARGET != "POPUP") {
                    socialButtonsPopUp.append($('<a class="fa fa-twitter" href="' + shareURLs.twitter + '" ></a>'));
                }
                else {
                    socialButtonsPopUp.append($('<a class="fa fa-twitter" href="' + shareURLs.twitter + '" onclick="window.open(this.href); return false;"></a>'));
                }
            }

            if (options.facebook) {

                if (options.email.TARGET != "POPUP") {
                    socialButtonsPopUp.append($('<a class="fa fa-facebook" href="' + shareURLs.facebook + '"  target="blank" ></a>'));
                }
                else {
                    socialButtonsPopUp.append($('<a class="fa fa-facebook" href="' + shareURLs.facebook + '" onclick="window.open(this.href); return false;"  ></a>'));
                }
            }
       
            if (options.pinterest) {
                if (options.email.TARGET != "POPUP") {
                    socialButtonsPopUp.append($('<a class="fa fa-pinterest" href="' + shareURLs.pinterest + '" ></a>'));
                } else {
                    socialButtonsPopUp.append($('<a class="fa fa-pinterest" href="' + shareURLs.pinterest + '" onclick="window.open(this.href); return false;"  ></a>')); // 
                }
            }

            if (options.tumblr) {
                if (options.email.TARGET != "POPUP") {
                    socialButtonsPopUp.append($('<a class="fa fa-tumblr" href="' + shareURLs.tumblr + '"   ></a>'));
                } else {
                    socialButtonsPopUp.append($('<a class="fa fa-tumblr" href="' + shareURLs.tumblr + '"  onclick="window.open(this.href); return false;" ></a>'));
                }
            }
    

            if (options.email) {
                if (options.email.TARGET == "NOPOPUP") {
                    socialButtonsPopUp.append($('<a class="fa fa-envelope-o" href="' + shareURLs.email + '" target="_self" ></a>'));
                } else {
                    if (options.email.TARGET != "POPUP") {
                        socialButtonsPopUp.append($('<a class="fa fa-envelope-o" href="' + shareURLs.email + '" ' + ACTION + '  ></a>'));
                    } else {
                        socialButtonsPopUp.append($('<a class="fa fa-envelope-o" href="javascript:;" onclick="parent.FermeAndOpen(\'' + shareURLs.email + '\',804,542)"></a>'));
                    }
                }
            }

        });

        var socials = $('.socialPlugin .socials'),
			socialLength = socials.find('a').length,
			marginLeft = '-35';


        socials.width(250);



        $('.showSocialButtons').click(function () {
            $(this).parent().find('.socials').toggleClass('opened');
        });
        $('.Partage').click(function () {

            $(this).parent().parent().find('.socials').toggleClass('opened');
        });

        // When a social icon is clicked, open a window with the share URL, centered on screen.
        var WindowObjectReference;

        $('.socialPlugin a').each(function () {

            if ((this.href.indexOf("partageemail.aspx") === -1) && (options.email.TARGET != "POPUP")) {

                try {
                    $(this).click(function (A) {
                        A.preventDefault();


                        _modal._settings = {
                            width: 300, // Use this value if not set in CSS or HTML
                            height: 300, // Use this value if not set in CSS or HTML
                            overlayOpacity: .85, // Use this value if not set in CSS or HTML
                            id: 'modal',
                            src: ""
                        };


                        async: false

                        var MIUrl = this.href,
                        w = 700,
                        h = 550,
                        left = (screen.width / 2) - (w / 2),
                        top = (screen.height / 2) - (h / 2);
                        WindowObjectReference = window.open(MIUrl, 'Social Share', 'toolbar=no, location=no, directories=no, status=no,' + ' menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);

                    })
                }
                catch (ex) {
                    console.error("externe", ex.message);

                }
            }
        });

        // Close the plugin if there is click/touch outside of it

        $(document).off('.social-plugin').on('click.social-plugin touchstart.social-plugin', function (e) {
            if (!$(e.target).hasClass('showSocialButtons') && !$(e.target).parent().hasClass('socials')) {
            }
        });

        $(document).off('.CadLeft').on('click', function (e) {
            if (!$(e.target).hasClass('showSocialButtons') && !$(e.target).hasClass('Partage') && !$(e.target).parent().hasClass('socials')) {
                socials.removeClass('opened');
            }

        });


        return this;
    };

})(jQuery);

function fbShare(url, title, descr, image, winWidth, winHeight) {
    var winTop = (screen.height / 2) - (winHeight / 2);
    var winLeft = (screen.width / 2) - (winWidth / 2);
    window.open('https://www.facebook.com/sharer.php?s=100&p[title]=' + title + '&p[summary]=' + descr + '&p[url]=' + url + '&p[images][0]=' + image, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight);
}

function detectMobile() {
    var toMatch = [
        /Android/i,
        /iPhone/i,
        /BlackBerry/i,
        /Windows Phone/i
    ];

    return toMatch.some((toMatchItem) => {
        return navigator.userAgent.match(toMatchItem);
    });
} */

(function ($) {
    $.fn.shareButtons = function (url, options) {
        if (typeof url === 'object') {
            options = url;
            url = window.location.href;
        }

        options = $.extend({
            facebook: false,
            twitter: false,
            pinterest: false,
            tumblr: false,
            email: false
        }, options);

        let typeBrown = detectMob() ? "mob" : "";
        if (typeBrown === "mob") {
            options.email.TARGET = "NOPOPUP";
        }

        let url_encoded = encodeURIComponent(url);

        let shareURLs = {
            facebook: 'https://facebook.com/sharer/sharer.php?u=' + url_encoded,
            twitter: 'https://x.com/intent/post?url=' + url_encoded,
            pinterest: 'https://pinterest.com/pin/create/button?url=' + url_encoded,
            tumblr: 'http://www.tumblr.com/share/link?url=' + url_encoded,
            email: '/partageemail' + typeBrown + '.aspx?url=' + url_encoded
        };

        // Extra params
        if (options.twitter) {
            if (options.twitter.text) shareURLs.twitter += '&text=' + encodeURIComponent(options.twitter.text);
            if (options.twitter.via) shareURLs.twitter += '&via=' + encodeURIComponent(options.twitter.via);
        }
        if (options.email) {
            if (options.email.GA_CODARTICLE) shareURLs.email += '&GA_CODE=' + encodeURIComponent(options.email.GA_CODARTICLE);
            if (options.email.LANG) shareURLs.email += '&lang=' + encodeURIComponent(options.email.LANG);
        }

        const icons = {
            facebook: `<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:serif="http://www.serif.com/" viewBox="0 0 24 24"  > <path class="cls-1" d="M14.4,5h3.2V1.2h-3.2c-3.2,0-4.4,1.9-4.4,5.1v2.5h-2.5v3.8h2.5v12.6h3.8v-12.6h3.2l.6-3.8h-3.8v-2.5c0-.8.3-1.3,1.3-1.3h-.6Z"/></svg>`,
            //facebook: `<svg   viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;color: white;"><g transform="matrix(1,0,0,1,0,5)"><path d="M13.5,3L16,3L16,0L13.5,0C11,0 10,1.5 10,4L10,6L8,6L8,9L10,9L10,19L13,19L13,9L15.5,9L16,6L13,6L13,4C13,3.4 13.2,3 14,3L13.5,3Z" style="fill-rule:nonzero;"/></g></svg>`,
            twitter: `<svg    viewBox="0 0 1200 1227" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill="white"/></svg>`,
            //twitter: `<svg viewBox="0 0 512 512"><path d="M370.6 64L256 203.3 141.4 64H64l144.3 192L64 448h77.4L256 308.7 370.6 448H448L303.7 256 448 64h-77.4z"/></svg>`,
           // email: `<svg viewBox="0 0 24 24"><path d="M4 4h16v16H4z" fill="none" stroke="white" stroke-width="2"></path><path d="M4 4l8 8 8-8" fill="none" stroke="white" stroke-width="2"></path></svg>`,
            email: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 29 29"> <path fill="white"  stroke="none"  d="M21.8,4.1H7.2c-2.9,0-5.2,2.1-5.2,4.8v11.4c0,2.6,2.3,4.8,5.2,4.8h14.6c2.9,0,5.2-2.1,5.2-4.8v-11.4c0-2.6-2.3-4.8-5.2-4.8ZM7.2,6h14.6c1.3,0,2.4.7,2.9,1.8l-8,7.3c-1.2,1.1-3.2,1.1-4.4,0l-8-7.3c.5-1.1,1.6-1.8,2.9-1.8ZM21.8,23.1H7.2c-1.7,0-3.1-1.3-3.1-2.9v-10l6.7,6.1c2,1.9,5.3,1.9,7.4,0l6.7-6.1v10c0,1.6-1.4,2.9-3.1,2.9Z"/></svg>`,
             pinterest: `<svg   viewBox="0 0 22 22"><path fill="white"  stroke="none" d="M10.9,4.1c-4.1,0-7,2.9-7,6.6s1,3.7,2.1,3.7.6,0,.8-.4c-.7-.7-1-1.8-1-2.9,0-2.8,2-4.8,5-4.8s4.6,1.8,4.6,4.7-1.4,4.6-3.3,4.6-1.9-.6-1.9-1.7,0-.5.1-.8l.5-1.6c.1-.4.2-.8.2-1.2,0-1.1-.6-1.7-1.4-1.7-1.2,0-1.9,1.1-1.9,2.6s.1,1.3.3,1.9l-1.1,4.7c-.3,1.2-.4,2.4-.2,3.6l.8.2c.7-1.1,1.2-2.1,1.4-3.3l.6-2.3c.7.9,1.7,1.3,2.8,1.3,2.8,0,5.5-2.8,5.5-6.5s-2.7-6.7-7-6.7Z"/></svg>`
           // pinterest: `<svg viewBox="0 0 24 24"> <path d="M12 2C6.5 2 2 6.2 2 11.5c0 3.9 2.6 7.3 6.2 8.5-.1-.7-.2-1.9 0-2.7.2-.9 1.2-5.1 1.2-5.1s-.3-.6-.3-1.5c0-1.4.8-2.5 1.9-2.5.9 0 1.3.6 1.3 1.3 0 .8-.5 2.1-.7 3.3-.2.9.4 1.6 1.3 1.6 1.6 0 2.7-2.1 2.7-4.6 0-1.9-1.3-3.2-3.2-3.2-2.3 0-3.6 1.7-3.6 3.5 0 .7.3 1.4.6 1.8.1.1.1.2.1.3-.1.4-.2 1.2-.3 1.3-.1.2-.2.2-.5.1-1.4-.7-2.3-2.9-2.3-4.7 0-3.7 2.7-7.1 7.8-7.1 4.1 0 7.3 2.9 7.3 6.7 0 4.1-2.6 7.4-6.2 7.4-1.2 0-2.3-.6-2.7-1.3l-.7 2.6c-.2.9-.8 2-1.1 2.7.8.2 1.7.3 2.6.3 5.5 0 10-4.2 10-9.5C22 6.2 17.5 2 12 2z"></path></svg>`
        };

        const
            buildIcon = (type, href, colorClass) => {
            return `
            <a class="socialnew-icon ${colorClass}" href="${href}" ${options.email.TARGET === "NOPOPUP" ? '' : 'target="_blank"'}>
              <div class="icon-wrapper">
                <div class="icon-top">${icons[type]}</div>
                <div class="icon-bottom">${icons[type].replace(/white/g, "currentColor")}</div>
              </div>
            </a>`;
        };

        return this.each(function () {
            const container = $('<div class="socialnews"></div>');

            if (options.facebook) {
                container.append(buildIcon('facebook', shareURLs.facebook, 'fb'));
            }

            if (options.twitter) {
                container.append(buildIcon('twitter', shareURLs.twitter, 'x'));
            }
            if (options.pinterest) {
               // container.append(buildIcon('pinterest', shareURLs.pinterest, 'pinterest'));
            }

 
            if (options.email) {
                shareURLs.email = '/partageemail' + typeBrown + '.aspx?url=' + encodeURIComponent(url);

                if (options.email.GA_CODARTICLE) {
                    shareURLs.email += '&GA_CODE=' + encodeURIComponent(options.email.GA_CODARTICLE);
                }

                if (options.email.LANG) {
                    shareURLs.email += '&lang=' + encodeURIComponent(options.email.LANG);
                }
           
                const emailBtn = $(buildIcon('email', shareURLs.email, 'mail'));

                if (options.email.TARGET === "POPUP") {
                    emailBtn.on('click', function (e) {
                        e.preventDefault();
                        window.parent.FermeAndOpen(shareURLs.email, 804, 542);
                    });
                } else if (options.email.TARGET !== "NOPOPUP") {
                    emailBtn.attr('onclick', '$(this).modal({width:804,height:542}).Ouvre(); return false;');
                }
                container.append(emailBtn);
            }

            $(this).append(container);
        });

        function detectMob() {
            return [/Android/i, /webOS/i, /iPhone/i, /iPad/i, /iPod/i, /BlackBerry/i, /Windows Phone/i]
                .some((r) => navigator.userAgent.match(r));
        }
    };
})(jQuery);

/**
 * menu-aim is a jQuery plugin for dropdown menus that can differentiate
 * between a user trying hover over a dropdown item vs trying to navigate into
 * a submenu's contents.
 *
 * menu-aim assumes that you have are using a menu with submenus that expand
 * to the menu's right. It will fire events when the user's mouse enters a new
 * dropdown item *and* when that item is being intentionally hovered over.
 *
 * __________________________
 * | Monkeys  >|   Gorilla  |
 * | Gorillas >|   Content  |
 * | Chimps   >|   Here     |
 * |___________|____________|
 *
 * In the above example, "Gorillas" is selected and its submenu content is
 * being shown on the right. Imagine that the user's cursor is hovering over
 * "Gorillas." When they move their mouse into the "Gorilla Content" area, they
 * may briefly hover over "Chimps." This shouldn't close the "Gorilla Content"
 * area.
 *
 * This problem is normally solved using timeouts and delays. menu-aim tries to
 * solve this by detecting the direction of the user's mouse movement. This can
 * make for quicker transitions when navigating up and down the menu. The
 * experience is hopefully similar to amazon.com/'s "Shop by Department"
 * dropdown.
 *
 * Use like so:
 *
 *      $("#menu").menuAim({
 *          activate: $.noop,  // fired on row activation
 *          deactivate: $.noop  // fired on row deactivation
 *      });
 *
 *  ...to receive events when a menu's row has been purposefully (de)activated.
 *
 * The following options can be passed to menuAim. All functions execute with
 * the relevant row's HTML element as the execution context ('this'):
 *
 *      .menuAim({
 *          // Function to call when a row is purposefully activated. Use this
 *          // to show a submenu's content for the activated row.
 *          activate: function() {},
 *
 *          // Function to call when a row is deactivated.
 *          deactivate: function() {},
 *
 *          // Function to call when mouse enters a menu row. Entering a row
 *          // does not mean the row has been activated, as the user may be
 *          // mousing over to a submenu.
 *          enter: function() {},
 *
 *          // Function to call when mouse exits a menu row.
 *          exit: function() {},
 *
 *          // Selector for identifying which elements in the menu are rows
 *          // that can trigger the above events. Defaults to "> li".
 *          rowSelector: "> li",
 *
 *          // You may have some menu rows that aren't submenus and therefore
 *          // shouldn't ever need to "activate." If so, filter submenu rows w/
 *          // this selector. Defaults to "*" (all elements).
 *          submenuSelector: "*",
 *
 *          // Direction the submenu opens relative to the main menu. Can be
 *          // left, right, above, or below. Defaults to "right".
 *          submenuDirection: "right"
 *      });
 *
 * https://github.com/kamens/jQuery-menu-aim
 * MIT License
*/
(function($) {

    $.fn.menuAim = function(opts) {
        // Initialize menu-aim for all elements in jQuery collection
        this.each(function() {
            init.call(this, opts);
        });

        return this;
    };

    function init(opts) {
        var $menu = $(this),
            activeRow = null,
            mouseLocs = [],
            lastDelayLoc = null,
            timeoutId = null,
            options = $.extend({
                rowSelector: "> li",
                submenuSelector: "*",
                submenuDirection: "right",
                tolerance: 75,  // bigger = more forgivey when entering submenu
                enter: $.noop,
                exit: $.noop,
                activate: $.noop,
                deactivate: $.noop,
                exitMenu: $.noop
            }, opts);

        var MOUSE_LOCS_TRACKED = 3,  // number of past mouse locations to track
            DELAY = 300;  // ms delay when user appears to be entering submenu

        /**
         * Keep track of the last few locations of the mouse.
         */
        var mousemoveDocument = function(e) {
                mouseLocs.push({x: e.pageX, y: e.pageY});

                if (mouseLocs.length > MOUSE_LOCS_TRACKED) {
                    mouseLocs.shift();
                }
            };

        /**
         * Cancel possible row activations when leaving the menu entirely
         */
        var mouseleaveMenu = function() {
                if (timeoutId) {
                    clearTimeout(timeoutId);
                }

                // If exitMenu is supplied and returns true, deactivate the
                // currently active row on menu exit.
                if (options.exitMenu(this)) {
                    if (activeRow) {
                        options.deactivate(activeRow);
                    }

                    activeRow = null;
                }
            };

        /**
         * Trigger a possible row activation whenever entering a new row.
         */
        var mouseenterRow = function() {
                if (timeoutId) {
                    // Cancel any previous activation delays
                    clearTimeout(timeoutId);
                }

                options.enter(this);
                possiblyActivate(this);
            },
            mouseleaveRow = function() {
                options.exit(this);
            };

        /*
         * Immediately activate a row if the user clicks on it.
         */
        var clickRow = function() {
                activate(this);
            };

        /**
         * Activate a menu row.
         */
        var activate = function(row) {
                if (row == activeRow) {
					 
                    return;
                }

                if (activeRow) {
                    options.deactivate(activeRow);
                }
                 
                options.activate(row);
                activeRow = row;
            };

        /**
         * Possibly activate a menu row. If mouse movement indicates that we
         * shouldn't activate yet because user may be trying to enter
         * a submenu's content, then delay and check again later.
         */
        var possiblyActivate = function(row) {
                var delay = activationDelay();

                if (delay) {
                    timeoutId = setTimeout(function() {
                        possiblyActivate(row);
                    }, delay);
                } else {
                    activate(row);
                }
            };

        /**
         * Return the amount of time that should be used as a delay before the
         * currently hovered row is activated.
         *
         * Returns 0 if the activation should happen immediately. Otherwise,
         * returns the number of milliseconds that should be delayed before
         * checking again to see if the row should be activated.
         */
        var activationDelay = function() {
                if (!activeRow || !$(activeRow).is(options.submenuSelector)) {
                    // If there is no other submenu row already active, then
                    // go ahead and activate immediately.
                    return 0;
                }

                var offset = $menu.offset(),
                    upperLeft = {
                        x: offset.left,
                        y: offset.top - options.tolerance
                    },
                    upperRight = {
                        x: offset.left + $menu.outerWidth(),
                        y: upperLeft.y
                    },
                    lowerLeft = {
                        x: offset.left,
                        y: offset.top + $menu.outerHeight() + options.tolerance
                    },
                    lowerRight = {
                        x: offset.left + $menu.outerWidth(),
                        y: lowerLeft.y
                    },
                    loc = mouseLocs[mouseLocs.length - 1],
                    prevLoc = mouseLocs[0];

                if (!loc) {
                    return 0;
                }

                if (!prevLoc) {
                    prevLoc = loc;
                }

                if (prevLoc.x < offset.left || prevLoc.x > lowerRight.x ||
                    prevLoc.y < offset.top || prevLoc.y > lowerRight.y) {
                    // If the previous mouse location was outside of the entire
                    // menu's bounds, immediately activate.
                    return 0;
                }

                if (lastDelayLoc &&
                        loc.x == lastDelayLoc.x && loc.y == lastDelayLoc.y) {
                    // If the mouse hasn't moved since the last time we checked
                    // for activation status, immediately activate.
                    return 0;
                }

                // Detect if the user is moving towards the currently activated
                // submenu.
                //
                // If the mouse is heading relatively clearly towards
                // the submenu's content, we should wait and give the user more
                // time before activating a new row. If the mouse is heading
                // elsewhere, we can immediately activate a new row.
                //
                // We detect this by calculating the slope formed between the
                // current mouse location and the upper/lower right points of
                // the menu. We do the same for the previous mouse location.
                // If the current mouse location's slopes are
                // increasing/decreasing appropriately compared to the
                // previous's, we know the user is moving toward the submenu.
                //
                // Note that since the y-axis increases as the cursor moves
                // down the screen, we are looking for the slope between the
                // cursor and the upper right corner to decrease over time, not
                // increase (somewhat counterintuitively).
                function slope(a, b) {
                    return (b.y - a.y) / (b.x - a.x);
                };

                var decreasingCorner = upperRight,
                    increasingCorner = lowerRight;

                // Our expectations for decreasing or increasing slope values
                // depends on which direction the submenu opens relative to the
                // main menu. By default, if the menu opens on the right, we
                // expect the slope between the cursor and the upper right
                // corner to decrease over time, as explained above. If the
                // submenu opens in a different direction, we change our slope
                // expectations.
                if (options.submenuDirection == "left") {
                    decreasingCorner = lowerLeft;
                    increasingCorner = upperLeft;
                } else if (options.submenuDirection == "below") {
                    decreasingCorner = lowerRight;
                    increasingCorner = lowerLeft;
                } else if (options.submenuDirection == "above") {
                    decreasingCorner = upperLeft;
                    increasingCorner = upperRight;
                }

                var decreasingSlope = slope(loc, decreasingCorner),
                    increasingSlope = slope(loc, increasingCorner),
                    prevDecreasingSlope = slope(prevLoc, decreasingCorner),
                    prevIncreasingSlope = slope(prevLoc, increasingCorner);

                if (decreasingSlope < prevDecreasingSlope &&
                        increasingSlope > prevIncreasingSlope) {
                    // Mouse is moving from previous location towards the
                    // currently activated submenu. Delay before activating a
                    // new menu row, because user may be moving into submenu.
                    lastDelayLoc = loc;
                    return DELAY;
                }

                lastDelayLoc = null;
                return 0;
            };

        /**
         * Hook up initial menu events
         */
        $menu
            .mouseleave(mouseleaveMenu)
            .find(options.rowSelector)
                .mouseenter(mouseenterRow)
                .mouseleave(mouseleaveRow)
                .click(clickRow);

        $(document).mousemove(mousemoveDocument);

    };
})(jQuery);



function detectmob() {
    if (navigator.userAgent.match(/Android/i)
    || navigator.userAgent.match(/webOS/i)
    || navigator.userAgent.match(/iPhone/i)
    || navigator.userAgent.match(/iPad/i)
    || navigator.userAgent.match(/iPod/i)
    || navigator.userAgent.match(/BlackBerry/i)
    || navigator.userAgent.match(/Windows Phone/i)
    ) {
        return true;
    }
    else {
        return false;
    }
}


function getWidth() {

    if (self.innerWidth) {
        return self.innerWidth;
    }

    if (document.documentElement && document.documentElement.clientWidth) {
        return document.documentElement.clientWidth;
    }

    if (document.body) {
        return document.body.clientWidth;
    }

     
    //return Math.max(
    // // document.body.scrollWidth,
    //  document.documentElement.scrollWidth,
    //  document.body.offsetWidth,
    //  document.documentElement.offsetWidth,
    //  document.documentElement.clientWidth
    //);
    
}

jQuery(document).ready(function ($) {


    // Start TEST
    var timeIS = 0;

    function hideElement(event) {

        if (detectmob() === false) {
            timeIS = setTimeout(function () {
                toggleNav();
                lockScroll();
                resetMonobjet();
      
                $("#toggleM").removeClass("on");
                $("#overlay").css("display", "none");
                $('.cd-dropdown').toggleClass('dropdown-is-active', false);
                $('.cd-dropdown-trigger').toggleClass('dropdown-is-active', false);
                //}
            }, 0); //2000
        } else {

            timeIS = setTimeout(function () {
                toggleNav();
                lockScroll();
                resetMonobjet();
        
                $("#toggleM").removeClass("on");
                $("#overlay").css("display", "none");
                $('.cd-dropdown').toggleClass('dropdown-is-active', false);
                $('.cd-dropdown-trigger').toggleClass('dropdown-is-active', false);
                //}
            }, 0); //2000
        }
    }
    $('.cd-dropdown').on('mouseenter', function (event) {
        event.preventDefault();
        $("#overlay").css("display", "block");
        clearTimeout(timeIS);
    });
    $('.cd-dropdown').on('mouseleave', function (event) {
        event.preventDefault();
        hideElement(event);
        $("#overlay").stop(true, true).fadeOut(10);
    });
 

    $(".ContactBigLink").click(function (event) {

        $(".contenuTiroirLABSVOUS").toggleClass("HiddenContent");
        $(".TiroirLABSVOUS").toggleClass("TiroirLABSVOUSOff");

        var anchor = $(this).attr('href').replace('/', '');
        $('html, body').animate({
            scrollTop: $(anchor).offset().top
        }, 2000);

        hideElement(event);
        $("#overlay").stop(true, true).fadeOut(10);
   
    });
    $("#DeConnecte > div > a").bind('click', function (event) {
        $(".contenuTiroirLABSVOUS").toggleClass("HiddenContent");
        $(".TiroirLABSVOUS").toggleClass("TiroirLABSVOUSOff");
        var anchor = $(this).attr('href').replace('/', '');
        $('html, body').animate({
            scrollTop: $(anchor).offset().top
        }, 2000);
        hideElement(event);
        $("#overlay").stop(true, true).fadeOut(10);
 
    });


    $("#overlay").bind('mouseenter touchstart click', function (event) {
        event.preventDefault();
        hideElement(event);
        $(this).stop(true, true).fadeOut(10);
        sessionStorage.setItem('FacetteMobile', 'false');
        $("#FacetteMobile").hide();
        $("#overlay").css({ 'display': 'none' });
    });

    $('.cd-dropdown-trigger').on('mouseenter touchstart', function (event) {
        //event.preventDefault();
        if ($(".cd-dropdown-trigger").hasClass("dropdown-is-active")==false) {
        toggleNav();
        lockScroll();
        resetMonobjet();
        }
 
        if ($(".cd-dropdown").hasClass("dropdown-is-active")) {
            
            $("#toggleM").addClass("on");
            $("#overlay").css("display", "block");
        }
        else {
             $("#toggleM").removeClass("on");
            $("#overlay").css("display", "none");
         }
    });

    $('#toggleM').on('click', function (event) {
        event.preventDefault();
        $("#overlay").css("display", "block");
        toggleNav();
    });

    $('.cd-dropdown .cd-close').on('click', function (event) {
        event.preventDefault();
        toggleNav();
        //$("#toggleM .on").click();
        if ($(".cd-dropdown-trigger").hasClass("dropdown-is-active")) {
            $("#toggleM").addClass("on");
        } else { $("#toggleM").removeClass("on"); }
    });

    var ThisLarge = getWidth();

    $(window).on("load resize scroll orientationchange", function (e) {

        ThisLarge = getWidth();
         
        if (ThisLarge < 992) {
             
            $(' div > nav > ul > li  > ul > li > ul').addClass('is-mobile').removeClass('is-hidden');
            //console.log(ThisLarge + "Larges");
        } else {
            $(' div > nav > ul > li  > ul > li > ul').addClass('is-hidden').removeClass('is-mobile');
        }
    });
    var resetMonobjet = function () {
        var lalargeur = getWidth();
        $(window).on("load resize scroll orientationchange", function (e) {
            lalargeur = getWidth();
        });
        if (lalargeur < 992) {
         
            $(' div > nav > ul > li  > ul > li > ul').addClass('is-mobile').removeClass('is-hidden');
           
        } else {
            $(' div > nav > ul > li  > ul > li > ul').addClass('is-hidden').removeClass('is-mobile');
        }
    };
    //(detectmob() === false) || || (ThisLarge > 992)
    var ISmobile = detectmob() === false && ThisLarge > 992 ? "mouseenter" : "click";
    
    $('.has-children').children('a').on( ISmobile+' ', function (event) {
         
        event.preventDefault();
        var selected = $(this);
        var ThisLarge = getWidth();
        $(window).bind("load resize scroll orientationchange", function (e) { ThisLarge = getWidth(); });
       
        if (ThisLarge < 992)
        {
            resetMonobjet();
            selected.next('ul').removeClass('is-hidden is-mobile').removeClass('is-mobile is-hidden').addClass('Suit').end().parent('.has-children').parent('ul').addClass('move-out').css({ 'position': 'absolute!important' });
        }
        else
        {

            $('.has-children ul').addClass('is-hidden');
            $('.move-out').removeClass('move-out');
            $('.has-children').children('a').removeClass("focus");
            selected.next('ul').removeClass('is-hidden').addClass('Suit').end().parent('.has-children').parent('ul').css({ 'position': 'absolute!important' }); //.addClass('move-out')
            $(this).addClass("focus");
        }

    });

    var ThisLarge = getWidth();
    $(window).bind("load resize scroll orientationchange", function (e) {
        ThisLarge = getWidth();

        if ((eval(ThisLarge) > 992)

             && (detectmob() === false)
            ) {
            $(" #form1 > div.calagnav.container > div > nav > ul > li").on('mouseenter', function () {
                if (($(this).hasClass("has-children") == true) && ($("#form1 > div.calagnav.container > div > nav > ul > li > ul").hasClass("is-active") == true)) {
                    if ($(" #form1 > div.calagnav.container > div > nav > ul > li  > ul > li.has-children > ul > li:nth-child(2) > ul"))
                    {
                    $(" #form1 > div.calagnav.container > div > nav > ul > li  > ul > li.has-children > ul > li:nth-child(2) > ul").each(function () {
                        $(this).removeClass('is-hidden').addClass('Suit').end().parent('.has-children');
                        $("#form1 > div.calagnav.container > div > nav > ul > li > ul > li.has-children > ul > li:nth-child(2) > a").addClass("focus");
                    });
                    }
                } else {
                    $('.has-children ul').addClass('is-hidden');
                    $('.move-out').removeClass('move-out');
                    $("a").removeClass("focus");
                }
            });
        }
    });

    var submenuDirection = (!$('.cd-dropdown-wrapper').hasClass('open-to-left')) ? 'right' : 'left';
    $('.cd-dropdown-content').menuAim({
        activate: function (row) {
            $(row).children().addClass('is-active').removeClass('fade-out');
            if ($('.cd-dropdown-content .fade-in').length == 0) $(row).children('ul').addClass('fade-in');
        },
        deactivate: function (row) {
            $(row).children().removeClass('is-active'); //
            if ($('li.has-children:hover').length == 0 || $('li.has-children:hover').is($(row))) {
                $('.cd-dropdown-content').find('.fade-in').removeClass('fade-in');
                $(row).children('ul').addClass('fade-out');
                $('.has-children ul').addClass('is-hidden');
                $('.move-out').removeClass('move-out');
            }
        },
        exitMenu: function () {
            $('.cd-dropdown-content').find('.is-active').removeClass('is-active');
            return true;
        },
        submenuDirection: submenuDirection,
    });

    //submenu items - go back link
    $('.go-back').on('click', function (event) {
        event.preventDefault();
        var selected = $(this),
		visibleNav = $(this).parent('ul').parent('.has-children').parent('ul');
        var ThisLarge = getWidth();

        if (eval(ThisLarge) < 992) {
            selected.parent('ul').addClass('is-hidden').removeClass('Suit').parent('.has-children').parent('ul').removeClass('move-out');
        }
        else {
            selected.parent('ul').addClass('is-hidden').parent('.has-children').parent('ul').removeClass('move-out');
        }

    });

    function toggleNav() {
       
        var navIsVisible = (!$('.cd-dropdown').hasClass('dropdown-is-active')) ? true : false;
        $('.cd-dropdown').toggleClass('dropdown-is-active', navIsVisible);
        $('.cd-dropdown-trigger').toggleClass('dropdown-is-active', navIsVisible);
        $('.is-active').removeClass('is-active');

        if (!navIsVisible) {
            $('.cd-dropdown').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () {
                $('.has-children ul').addClass('is-hidden');
                $('.move-out').removeClass('move-out');
                $('.is-active').removeClass('is-active');
                $("a").removeClass("focus");
                $(".cd-secondary-dropdown").removeClass('is-active');
                $("#overlay").css("display", "none");
            });
        } else {
            $(".cd-secondary-dropdown").removeClass('is-active');
            var ThisLarge = getWidth();
            $(window).bind("resize scroll orientationchange", function (e) {
                ThisLarge = getWidth();
                //console.log(ThisLarge + "Larges");



                if ((eval(ThisLarge) > 992)
                     && (detectmob() === false)
                    ) {
                    $(" #form1 > div.calagnav.container > div > nav > ul > li").on('mouseenter', function (event) {
                        //event.preventDefault();
                        if (($(this).hasClass("has-children") == true) && ($("#form1 > div.calagnav.container > div > nav > ul > li > ul").hasClass("is-active") == true) && (ThisLarge > 999)) {
                            $(" #form1 > div.calagnav.container > div > nav > ul > li  > ul > li.has-children > ul > li:nth-child(2) > ul").each(function () {
                                $(this).removeClass('is-hidden').addClass('Suit').end().parent('.has-children');
                                //$("#form1 > div.calagnav.container > div > nav > ul > li > ul > li.has-children > ul > li:nth-child(2) > a").addClass("focus");
                            });
                        } else {
                            $('.has-children ul').addClass('is-hidden');
                            $('.move-out').removeClass('move-out');
                        }
                    });
                }
            });
        }
    }




    document.getElementsByClassName('has-children').onclick = function () {
        var myDiv = document.getElementsByClassName('cd-dropdown-content');
        scrollTo(myDiv, 0, 100);
        var myDivs = document.getElementsByClassName('cd-secondary-dropdown');
        scrollTo(myDivs, 0, 100)
    }

    function scrollTo(element, to, duration) {

 
        if (duration < 0) return;
        var difference = to - element.scrollTop;
        var perTick = difference / duration * 2;

        setTimeout(function () {
            element.scrollTop = element.scrollTop + perTick;
            scrollTo(element, to, duration - 2);
        }, 10);
    }
     
     
});

function lockScroll() {
    if ($('body').hasClass('lock-scroll')) {
        $('body').removeClass('lock-scroll');
    }
    else {
        $('body').addClass('lock-scroll');
    }
}

document.addEventListener('click', function (event) {
    let myDiv = document.getElementById('IdListDrap');
    let LangueDiv = document.getElementById('Langue');
    if (
        event.target.classList.contains('searchnormal') ||
      event.target.classList.contains('rechercheAutopredictiveZ') ||
      event.target.classList.contains('placeholder') ||
      event.target.classList.contains('iti__selected-flag') ||
      event.target.classList.contains('iti__flag') ||
      event.target.classList.contains('iti__arrow') ||
      event.target.classList.contains('iti__country-list') ||
      event.target.classList.contains('iti__country') ||
      event.target.classList.contains('row') ||
      event.target.classList.contains('iti__standard')
        || event.target.classList.contains('iti--allow-dropdown')
        || event.target.classList.contains('iti__flag-container')
        || event.target.classList.contains('iti__country-list')
        || event.target.classList.contains('quantityctrl')
        || event.target.classList.contains('cartList')
        || event.target.id === 'BtnAddtocart' || event.target.id === 'MainPanel_FormViewArticle_ImageButtonAdd'
        || event.target.classList.contains('increment-quantity') || event.target.classList.contains('BgDelete') || event.target.classList.contains('decrement-quantity') || event.target.classList.contains('cartListCompare')) {
        return;
    }

    if (!myDiv.contains(event.target) && !LangueDiv.contains(event.target)) {

        closeNav();
    }

    let MaRecherche = document.getElementById('MaRecherche');
    let blocid = document.getElementById('MoteurRecherche');
    let pnlMaster = document.getElementById('PanelUp_scSearchControl_pnlMaster');

    if (!MaRecherche.contains(event.target) && !myDiv.contains(event.target) && !LangueDiv.contains(event.target) && !blocid.contains(event.target) && !pnlMaster.contains(event.target)) {
       
        $("#fermerecherche").click();
    }
});
function onEscapeKeyPress(event) {
    if (event.key === "Escape") {
        closeNav();
        if ($.modal()) {
            $.modal().Ferme();
        }
        if ($.PopTunnel()) { $.PopTunnel().Ferme(); }
        $("#fermerecherche").click();
        $(".modal-overlay").click();
    }
}
document.addEventListener("keydown", onEscapeKeyPress);
 
 
//if (global.navigator.pointerEnabled) {
//  crossvent[op](el, pointers[type], fn, { passive: false });
//} else if (global.navigator.msPointerEnabled) {
// crossvent[op](el, microsoft[type], fn, { passive: false });
//} else {
//crossvent[op](el, touch[type], fn, { passive: false });
//crossvent[op](el, type, fn, { passive: false });
//} 

document.addEventListener("DOMContentLoaded", function (event) {
    var lazyImages = [].slice.call(
     document.querySelectorAll(".lazy > source")
    )

    if ("IntersectionObserver" in window) {
        let lazyImageObserver =
         new IntersectionObserver(function (entries, observer) {
             entries.forEach(function (entry) {
                 if (entry.isIntersecting) {
                     let lazyImage = entry.target;
                     lazyImage.srcset = lazyImage.dataset.srcset;
                     lazyImage.nextElementSibling.srcset = lazyImage.dataset.srcset;
                     lazyImage.nextElementSibling.classList.add('fade-in');
                     lazyImage.parentElement.classList.remove("lazy");
                     lazyImageObserver.unobserve(lazyImage);
                 }
             });
         });

        lazyImages.forEach(function (lazyImage) {
            lazyImageObserver.observe(lazyImage);
        });
    } else {
        // Not supported, load all images immediately
        lazyImages.forEach(function (image) {
            image.nextElementSibling.src = image.nextElementSibling.dataset.srcset;
        });
    }
});
