(function(){window.JQUERY_UI_EXTRAS_LOADED=1}).call(this),function(n){function t(t,i){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(i);t.data("ui-tooltip-id",i).attr("aria-describedby",n.trim(r.join(" ")))}function i(t){var u=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),r=n.inArray(u,i);-1!==r&&i.splice(r,1);t.removeData("ui-tooltip-id");i=n.trim(i.join(" "));i?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")}var r=0;n.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var t=n(this).attr("title")||"";return n("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable()},_setOption:function(t,i){var r=this;return"disabled"===t?(this[i?"_disable":"_enable"](),void(this.options[t]=i)):(this._super(t,i),void("content"===t&&n.each(this.tooltips,function(n,t){r._updateContent(t)})))},_disable:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r[0];t.close(u,!0)});this.element.find(this.options.items).addBack().each(function(){var t=n(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=n(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var r=this,i=n(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var i,t=n(this);t.data("ui-tooltip-open")&&(i=n.Event("blur"),i.target=i.currentTarget=this,r.close(i,!0));t.attr("title")&&(t.uniqueId(),r.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._updateContent(i,t))},_updateContent:function(n,t){var i,r=this.options.content,u=this,f=t?t.type:null;return"string"==typeof r?this._open(t,n,r):(i=r.call(n[0],function(i){n.data("ui-tooltip-open")&&u._delay(function(){t&&(t.type=f);this._open(t,n,i)})}),void(i&&this._open(t,n,i)))},_open:function(i,r,u){function o(n){s.of=n;f.is(":hidden")||f.position(s)}var f,e,h,s=n.extend({},this.options.position);if(u){if(f=this._find(r),f.length)return void f.find(".ui-tooltip-content").html(u);r.is("[title]")&&(i&&"mouseover"===i.type?r.attr("title",""):r.removeAttr("title"));f=this._tooltip(r);t(r,f.attr("id"));f.find(".ui-tooltip-content").html(u);this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):f.position(n.extend({of:r},this.options.position));f.hide();this._show(f,this.options.show);this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){f.is(":visible")&&(o(s.of),clearInterval(h))},n.fx.interval));this._trigger("open",i,{tooltip:f});e={keyup:function(t){if(t.keyCode===n.ui.keyCode.ESCAPE){var i=n.Event(t);i.currentTarget=r[0];this.close(i,!0)}},remove:function(){this._removeTooltip(f)}};i&&"mouseover"!==i.type||(e.mouseleave="close");i&&"focusin"!==i.type||(e.focusout="close");this._on(!0,r,e)}},close:function(t){var f=this,r=n(t?t.currentTarget:this.element),u=this._find(r);this.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&r.attr("title",r.data("ui-tooltip-title")),i(r),u.stop(!0),this._hide(u,this.options.hide,function(){f._removeTooltip(n(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&n.each(this.parents,function(t,i){n(i.element).attr("title",i.title);delete f.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:u}),this.closing=!1)},_tooltip:function(t){var u="ui-tooltip-"+r++,i=n("<div>").attr({id:u,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return n("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[u]=t,i},_find:function(t){var i=t.data("ui-tooltip-id");return i?n("#"+i):n()},_removeTooltip:function(n){n.remove();delete this.tooltips[n.attr("id")]},_destroy:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r[0];t.close(u,!0);n("#"+i).remove();r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})}(jQuery),function(n,t){function f(){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:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};n.extend(this._defaults,this.regional[""]);this.dpDiv=e(n("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>"))}function e(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){n(this).removeClass("ui-state-hover");-1!==this.className.indexOf("ui-datepicker-prev")&&n(this).removeClass("ui-datepicker-prev-hover");-1!==this.className.indexOf("ui-datepicker-next")&&n(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){n.datepicker._isDisabledDatepicker(u.inline?t.parent()[0]:u.input[0])||(n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),n(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&n(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&n(this).addClass("ui-datepicker-next-hover"))})}function r(t,i){n.extend(t,i);for(var r in i)null==i[r]&&(t[r]=i[r]);return t}n.extend(n.ui,{datepicker:{version:"1.10.4"}});var u,i="datepicker";n.extend(f.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(n){return r(this._defaults,n||{}),this},_attachDatepicker:function(t,i){var r,f,u;r=t.nodeName.toLowerCase();f="div"===r||"span"===r;t.id||(this.uuid+=1,t.id="dp"+this.uuid);u=this._newInst(n(t),f);u.settings=n.extend({},i||{});"input"===r?this._connectDatepicker(t,u):f&&this._inlineDatepicker(t,u)},_newInst:function(t,i){var r=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?e(n("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")):this.dpDiv}},_connectDatepicker:function(t,r){var u=n(t);r.append=n([]);r.trigger=n([]);u.hasClass(this.markerClassName)||(this._attachments(u,r),u.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(r),n.data(t,i,r),r.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var u,r,f,e=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove();e&&(i.append=n("<span class='"+this._appendClass+"'>"+e+"<\/span>"),t[o?"before":"after"](i.append));t.unbind("focus",this._showDatepicker);i.trigger&&i.trigger.remove();u=this._get(i,"showOn");("focus"===u||"both"===u)&&t.focus(this._showDatepicker);("button"===u||"both"===u)&&(r=this._get(i,"buttonText"),f=this._get(i,"buttonImage"),i.trigger=n(this._get(i,"buttonImageOnly")?n("<img/>").addClass(this._triggerClass).attr({src:f,alt:r,title:r}):n("<button type='button'><\/button>").addClass(this._triggerClass).html(f?n("<img/>").attr({src:f,alt:r,title:r}):r)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return n.datepicker._datepickerShowing&&n.datepicker._lastInput===t[0]?n.datepicker._hideDatepicker():n.datepicker._datepickerShowing&&n.datepicker._lastInput!==t[0]?(n.datepicker._hideDatepicker(),n.datepicker._showDatepicker(t[0])):n.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(n){if(this._get(n,"autoSize")&&!n.inline){var r,u,f,t,i=new Date(2009,11,20),e=this._get(n,"dateFormat");e.match(/[DM]/)&&(r=function(n){for(u=0,f=0,t=0;t<n.length;t++)n[t].length>u&&(u=n[t].length,f=t);return f},i.setMonth(r(this._get(n,e.match(/MM/)?"monthNames":"monthNamesShort"))),i.setDate(r(this._get(n,e.match(/DD/)?"dayNames":"dayNamesShort"))+20-i.getDay()));n.input.attr("size",this._formatDate(n,i).length)}},_inlineDatepicker:function(t,r){var u=n(t);u.hasClass(this.markerClassName)||(u.addClass(this.markerClassName).append(r.dpDiv),n.data(t,i,r),this._setDate(r,this._getDefaultDate(r),!0),this._updateDatepicker(r),this._updateAlternate(r),r.settings.disabled&&this._disableDatepicker(t),r.dpDiv.css("display","block"))},_dialogDatepicker:function(t,u,f,e,o){var h,c,l,a,v,s=this._dialogInst;return s||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=n("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),n("body").append(this._dialogInput),s=this._dialogInst=this._newInst(this._dialogInput,!1),s.settings={},n.data(this._dialogInput[0],i,s)),r(s.settings,e||{}),u=u&&u.constructor===Date?this._formatDate(s,u):u,this._dialogInput.val(u),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,l=document.documentElement.clientHeight,a=document.documentElement.scrollLeft||document.body.scrollLeft,v=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+a,l/2-150+v]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),s.settings.onSelect=f,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),n.blockUI&&n.blockUI(this.dpDiv),n.data(this._dialogInput[0],i,s),this},_destroyDatepicker:function(t){var r,u=n(t),f=n.data(t,i);u.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),n.removeData(t,i),"input"===r?(f.append.remove(),f.trigger.remove(),u.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===r||"span"===r)&&u.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var r,u,f=n(t),e=n.data(t,i);f.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),"input"===r?(t.disabled=!1,e.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===r||"span"===r)&&(u=f.children("."+this._inlineClass),u.children().removeClass("ui-state-disabled"),u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}))},_disableDatepicker:function(t){var r,u,f=n(t),e=n.data(t,i);f.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),"input"===r?(t.disabled=!0,e.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===r||"span"===r)&&(u=f.children("."+this._inlineClass),u.children().addClass("ui-state-disabled"),u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(n){if(!n)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===n)return!0;return!1},_getInst:function(t){try{return n.data(t,i)}catch(r){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(i,u,f){var o,c,s,h,e=this._getInst(i);return 2===arguments.length&&"string"==typeof u?"defaults"===u?n.extend({},n.datepicker._defaults):e?"all"===u?n.extend({},e.settings):this._get(e,u):null:(o=u||{},"string"==typeof u&&(o={},o[u]=f),void(e&&(this._curInst===e&&this._hideDatepicker(),c=this._getDateDatepicker(i,!0),s=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),r(e.settings,o),null!==s&&o.dateFormat!==t&&o.minDate===t&&(e.settings.minDate=this._formatDate(e,s)),null!==h&&o.dateFormat!==t&&o.maxDate===t&&(e.settings.maxDate=this._formatDate(e,h)),"disabled"in o&&(o.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(n(i),e),this._autoSize(e),this._setDate(e,c),this._updateAlternate(e),this._updateDatepicker(e))))},_changeDatepicker:function(n,t,i){this._optionDatepicker(n,t,i)},_refreshDatepicker:function(n){var t=this._getInst(n);t&&this._updateDatepicker(t)},_setDateDatepicker:function(n,t){var i=this._getInst(n);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(n,t){var i=this._getInst(n);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var u,e,f,i=n.datepicker._getInst(t.target),r=!0,o=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,n.datepicker._datepickerShowing)switch(t.keyCode){case 9:n.datepicker._hideDatepicker();r=!1;break;case 13:return f=n("td."+n.datepicker._dayOverClass+":not(."+n.datepicker._currentClass+")",i.dpDiv),f[0]&&n.datepicker._selectDay(t.target,i.selectedMonth,i.selectedYear,f[0]),u=n.datepicker._get(i,"onSelect"),u?(e=n.datepicker._formatDate(i),u.apply(i.input?i.input[0]:null,[e,i])):n.datepicker._hideDatepicker(),!1;case 27:n.datepicker._hideDatepicker();break;case 33:n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 34:n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&n.datepicker._clearDate(t.target);r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&n.datepicker._gotoToday(t.target);r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?1:-1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,-7,"D");r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?-1:1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,7,"D");r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?n.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,r,u=n.datepicker._getInst(t.target);if(n.datepicker._get(u,"constrainInput"))return(i=n.datepicker._possibleChars(n.datepicker._get(u,"dateFormat")),r=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">r||!i||i.indexOf(r)>-1)},_doKeyUp:function(t){var r,i=n.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{r=n.datepicker.parseDate(n.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,n.datepicker._getFormatConfig(i));r&&(n.datepicker._setDateFromField(i),n.datepicker._updateAlternate(i),n.datepicker._updateDatepicker(i))}catch(u){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=n("input",t.parentNode)[0]),!n.datepicker._isDisabledDatepicker(t)&&n.datepicker._lastInput!==t){var i,o,s,u,f,e,h;i=n.datepicker._getInst(t);n.datepicker._curInst&&n.datepicker._curInst!==i&&(n.datepicker._curInst.dpDiv.stop(!0,!0),i&&n.datepicker._datepickerShowing&&n.datepicker._hideDatepicker(n.datepicker._curInst.input[0]));o=n.datepicker._get(i,"beforeShow");s=o?o.apply(t,[t,i]):{};s!==!1&&(r(i.settings,s),i.lastVal=null,n.datepicker._lastInput=t,n.datepicker._setDateFromField(i),n.datepicker._inDialog&&(t.value=""),n.datepicker._pos||(n.datepicker._pos=n.datepicker._findPos(t),n.datepicker._pos[1]+=t.offsetHeight),u=!1,n(t).parents().each(function(){return u|="fixed"===n(this).css("position"),!u}),f={left:n.datepicker._pos[0],top:n.datepicker._pos[1]},n.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),n.datepicker._updateDatepicker(i),f=n.datepicker._checkOffset(i,f,u),i.dpDiv.css({position:n.datepicker._inDialog&&n.blockUI?"static":u?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"}),i.inline||(e=n.datepicker._get(i,"showAnim"),h=n.datepicker._get(i,"duration"),i.dpDiv.zIndex(n(t).zIndex()+1),n.datepicker._datepickerShowing=!0,n.effects&&n.effects.effect[e]?i.dpDiv.show(e,n.datepicker._get(i,"showOptions"),h):i.dpDiv[e||"show"](e?h:null),n.datepicker._shouldFocusInput(i)&&i.input.focus(),n.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4;u=t;t.dpDiv.empty().append(this._generateHTML(t));this._attachHandlers(t);t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,r=this._getNumberOfMonths(t),f=r[1];t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");f>1&&t.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",17*f+"em");t.dpDiv[(1!==r[0]||1!==r[1]?"add":"remove")+"Class"]("ui-datepicker-multi");t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");t===n.datepicker._curInst&&n.datepicker._datepickerShowing&&n.datepicker._shouldFocusInput(t)&&t.input.focus();t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml);i=t.yearshtml=null},0))},_shouldFocusInput:function(n){return n.input&&n.input.is(":visible")&&!n.input.is(":disabled")&&!n.input.is(":focus")},_checkOffset:function(t,i,r){var u=t.dpDiv.outerWidth(),f=t.dpDiv.outerHeight(),h=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,e=document.documentElement.clientWidth+(r?0:n(document).scrollLeft()),s=document.documentElement.clientHeight+(r?0:n(document).scrollTop());return i.left-=this._get(t,"isRTL")?u-h:0,i.left-=r&&i.left===t.input.offset().left?n(document).scrollLeft():0,i.top-=r&&i.top===t.input.offset().top+o?n(document).scrollTop():0,i.left-=Math.min(i.left,i.left+u>e&&e>u?Math.abs(i.left+u-e):0),i.top-=Math.min(i.top,i.top+f>s&&s>f?Math.abs(f+o):0),i},_findPos:function(t){for(var i,r=this._getInst(t),u=this._get(r,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||n.expr.filters.hidden(t));)t=t[u?"previousSibling":"nextSibling"];return i=n(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var u,e,f,o,r=this._curInst;!r||t&&r!==n.data(t,i)||this._datepickerShowing&&(u=this._get(r,"showAnim"),e=this._get(r,"duration"),f=function(){n.datepicker._tidyDialog(r)},n.effects&&(n.effects.effect[u]||n.effects[u])?r.dpDiv.hide(u,n.datepicker._get(r,"showOptions"),e,f):r.dpDiv["slideDown"===u?"slideUp":"fadeIn"===u?"fadeOut":"hide"](u?e:null,f),u||f(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),n.blockUI&&(n.unblockUI(),n("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(n){n.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(n.datepicker._curInst){var i=n(t.target),r=n.datepicker._getInst(i[0]);(i[0].id===n.datepicker._mainDivId||0!==i.parents("#"+n.datepicker._mainDivId).length||i.hasClass(n.datepicker.markerClassName)||i.closest("."+n.datepicker._triggerClass).length||!n.datepicker._datepickerShowing||n.datepicker._inDialog&&n.blockUI)&&(!i.hasClass(n.datepicker.markerClassName)||n.datepicker._curInst===r)||n.datepicker._hideDatepicker()}},_adjustDate:function(t,i,r){var f=n(t),u=this._getInst(f[0]);this._isDisabledDatepicker(f[0])||(this._adjustInstDate(u,i+("M"===r?this._get(u,"showCurrentAtPos"):0),r),this._updateDatepicker(u))},_gotoToday:function(t){var r,u=n(t),i=this._getInst(u[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(r=new Date,i.selectedDay=r.getDate(),i.drawMonth=i.selectedMonth=r.getMonth(),i.drawYear=i.selectedYear=r.getFullYear());this._notifyChange(i);this._adjustDate(u)},_selectMonthYear:function(t,i,r){var f=n(t),u=this._getInst(f[0]);u["selected"+("M"===r?"Month":"Year")]=u["draw"+("M"===r?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10);this._notifyChange(u);this._adjustDate(f)},_selectDay:function(t,i,r,u){var f,e=n(t);n(u).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0])||(f=this._getInst(e[0]),f.selectedDay=f.currentDay=n("a",u).html(),f.selectedMonth=f.currentMonth=i,f.selectedYear=f.currentYear=r,this._selectDate(t,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(t){var i=n(t);this._selectDate(i,"")},_selectDate:function(t,i){var u,f=n(t),r=this._getInst(f[0]);i=null!=i?i:this._formatDate(r);r.input&&r.input.val(i);this._updateAlternate(r);u=this._get(r,"onSelect");u?u.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger("change");r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,r,u,f=this._get(t,"altField");f&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),r=this._getDate(t),u=this.formatDate(i,r,this._getFormatConfig(t)),n(f).each(function(){n(this).val(u)}))},noWeekends:function(n){var t=n.getDay();return[t>0&&6>t,""]},iso8601Week:function(n){var i,t=new Date(n.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),i=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((i-t)/864e5)/7)+1},parseDate:function(t,i,r){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;for(var a,v,u,f=0,y=(r?r.shortYearCutoff:null)||this._defaults.shortYearCutoff,d="string"!=typeof y?y:(new Date).getFullYear()%100+parseInt(y,10),g=(r?r.dayNamesShort:null)||this._defaults.dayNamesShort,nt=(r?r.dayNames:null)||this._defaults.dayNames,tt=(r?r.monthNamesShort:null)||this._defaults.monthNamesShort,it=(r?r.monthNames:null)||this._defaults.monthNames,e=-1,s=-1,h=-1,p=-1,w=!1,l=function(n){var i=o+1<t.length&&t.charAt(o+1)===n;return i&&o++,i},c=function(n){var r=l(n),u="@"===n?14:"!"===n?20:"y"===n&&r?4:"o"===n?3:2,e=new RegExp("^\\d{1,"+u+"}"),t=i.substring(f).match(e);if(!t)throw"Missing number at position "+f;return f+=t[0].length,parseInt(t[0],10)},k=function(t,r,u){var e=-1,o=n.map(l(t)?u:r,function(n,t){return[[t,n]]}).sort(function(n,t){return-(n[1].length-t[1].length)});if(n.each(o,function(n,t){var r=t[1];if(i.substr(f,r.length).toLowerCase()===r.toLowerCase())return(e=t[0],f+=r.length,!1)}),-1!==e)return e+1;throw"Unknown name at position "+f;},b=function(){if(i.charAt(f)!==t.charAt(o))throw"Unexpected literal at position "+f;f++},o=0;o<t.length;o++)if(w)"'"!==t.charAt(o)||l("'")?b():w=!1;else switch(t.charAt(o)){case"d":h=c("d");break;case"D":k("D",g,nt);break;case"o":p=c("o");break;case"m":s=c("m");break;case"M":s=k("M",tt,it);break;case"y":e=c("y");break;case"@":u=new Date(c("@"));e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"!":u=new Date((c("!")-this._ticksTo1970)/1e4);e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"'":l("'")?b():w=!0;break;default:b()}if(f<i.length&&(v=i.substr(f),!/^\s+/.test(v)))throw"Extra/unparsed characters found in date: "+v;if(-1===e?e=(new Date).getFullYear():100>e&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(d>=e?0:-100)),p>-1)for(s=1,h=p;;){if(a=this._getDaysInMonth(e,s-1),a>=h)break;s++;h-=a}if(u=this._daylightSavingAdjust(new Date(e,s-1,h)),u.getFullYear()!==e||u.getMonth()+1!==s||u.getDate()!==h)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(n,t,i){if(!t)return"";var u,h=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,c=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,f=function(t){var i=u+1<n.length&&n.charAt(u+1)===t;return i&&u++,i},e=function(n,t,i){var r=""+t;if(f(n))for(;r.length<i;)r="0"+r;return r},s=function(n,t,i,r){return f(n)?r[t]:i[t]},r="",o=!1;if(t)for(u=0;u<n.length;u++)if(o)"'"!==n.charAt(u)||f("'")?r+=n.charAt(u):o=!1;else switch(n.charAt(u)){case"d":r+=e("d",t.getDate(),2);break;case"D":r+=s("D",t.getDay(),h,c);break;case"o":r+=e("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":r+=e("m",t.getMonth()+1,2);break;case"M":r+=s("M",t.getMonth(),l,a);break;case"y":r+=f("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":r+=t.getTime();break;case"!":r+=1e4*t.getTime()+this._ticksTo1970;break;case"'":f("'")?r+="'":o=!0;break;default:r+=n.charAt(u)}return r},_possibleChars:function(n){for(var i="",r=!1,u=function(i){var r=t+1<n.length&&n.charAt(t+1)===i;return r&&t++,r},t=0;t<n.length;t++)if(r)"'"!==n.charAt(t)||u("'")?i+=n.charAt(t):r=!1;else switch(n.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":u("'")?i+="'":r=!0;break;default:i+=n.charAt(t)}return i},_get:function(n,i){return n.settings[i]!==t?n.settings[i]:this._defaults[i]},_setDateFromField:function(n,t){if(n.input.val()!==n.lastVal){var f=this._get(n,"dateFormat"),r=n.lastVal=n.input?n.input.val():null,u=this._getDefaultDate(n),i=u,e=this._getFormatConfig(n);try{i=this.parseDate(f,r,e)||u}catch(o){r=t?"":r}n.selectedDay=i.getDate();n.drawMonth=n.selectedMonth=i.getMonth();n.drawYear=n.selectedYear=i.getFullYear();n.currentDay=r?i.getDate():0;n.currentMonth=r?i.getMonth():0;n.currentYear=r?i.getFullYear():0;this._adjustInstDate(n)}},_getDefaultDate:function(n){return this._restrictMinMax(n,this._determineDate(n,this._get(n,"defaultDate"),new Date))},_determineDate:function(t,i,r){var f=function(n){var t=new Date;return t.setDate(t.getDate()+n),t},e=function(i){try{return n.datepicker.parseDate(n.datepicker._get(t,"dateFormat"),i,n.datepicker._getFormatConfig(t))}catch(h){}for(var o=(i.toLowerCase().match(/^c/)?n.datepicker._getDate(t):null)||new Date,f=o.getFullYear(),e=o.getMonth(),r=o.getDate(),s=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=s.exec(i);u;){switch(u[2]||"d"){case"d":case"D":r+=parseInt(u[1],10);break;case"w":case"W":r+=7*parseInt(u[1],10);break;case"m":case"M":e+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e));break;case"y":case"Y":f+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e))}u=s.exec(i)}return new Date(f,e,r)},u=null==i||""===i?r:"string"==typeof i?e(i):"number"==typeof i?isNaN(i)?r:f(i):new Date(i.getTime());return u=u&&"Invalid Date"===u.toString()?r:u,u&&(u.setHours(0),u.setMinutes(0),u.setSeconds(0),u.setMilliseconds(0)),this._daylightSavingAdjust(u)},_daylightSavingAdjust:function(n){return n?(n.setHours(n.getHours()>12?n.getHours()+2:0),n):null},_setDate:function(n,t,i){var u=!t,f=n.selectedMonth,e=n.selectedYear,r=this._restrictMinMax(n,this._determineDate(n,t,new Date));n.selectedDay=n.currentDay=r.getDate();n.drawMonth=n.selectedMonth=n.currentMonth=r.getMonth();n.drawYear=n.selectedYear=n.currentYear=r.getFullYear();f===n.selectedMonth&&e===n.selectedYear||i||this._notifyChange(n);this._adjustInstDate(n);n.input&&n.input.val(u?"":this._formatDate(n))},_getDate:function(n){return!n.currentYear||n.input&&""===n.input.val()?null:this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay))},_attachHandlers:function(t){var r=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){n.datepicker._adjustDate(i,-r,"M")},next:function(){n.datepicker._adjustDate(i,+r,"M")},hide:function(){n.datepicker._hideDatepicker()},today:function(){n.datepicker._gotoToday(i)},selectDay:function(){return n.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return n.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return n.datepicker._selectMonthYear(i,this,"Y"),!1}};n(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(n){var b,s,it,h,rt,k,ut,ft,ri,c,et,ui,fi,ei,oi,ot,g,si,st,nt,o,y,ht,p,ct,l,u,lt,at,vt,yt,pt,wt,i,bt,kt,d,a,tt,dt=new Date,gt=this._daylightSavingAdjust(new Date(dt.getFullYear(),dt.getMonth(),dt.getDate())),f=this._get(n,"isRTL"),li=this._get(n,"showButtonPanel"),hi=this._get(n,"hideIfNoPrevNext"),ni=this._get(n,"navigationAsDateFormat"),e=this._getNumberOfMonths(n),ai=this._get(n,"showCurrentAtPos"),ci=this._get(n,"stepMonths"),ti=1!==e[0]||1!==e[1],ii=this._daylightSavingAdjust(n.currentDay?new Date(n.currentYear,n.currentMonth,n.currentDay):new Date(9999,9,9)),w=this._getMinMaxDate(n,"min"),v=this._getMinMaxDate(n,"max"),t=n.drawMonth-ai,r=n.drawYear;if(0>t&&(t+=12,r--),v)for(b=this._daylightSavingAdjust(new Date(v.getFullYear(),v.getMonth()-e[0]*e[1]+1,v.getDate())),b=w&&w>b?w:b;this._daylightSavingAdjust(new Date(r,t,1))>b;)t--,0>t&&(t=11,r--);for(n.drawMonth=t,n.drawYear=r,s=this._get(n,"prevText"),s=ni?this.formatDate(s,this._daylightSavingAdjust(new Date(r,t-ci,1)),this._getFormatConfig(n)):s,it=this._canAdjustMonth(n,-1,r,t)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"e":"w")+"'>"+s+"<\/span><\/a>":hi?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"e":"w")+"'>"+s+"<\/span><\/a>",h=this._get(n,"nextText"),h=ni?this.formatDate(h,this._daylightSavingAdjust(new Date(r,t+ci,1)),this._getFormatConfig(n)):h,rt=this._canAdjustMonth(n,1,r,t)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+h+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"w":"e")+"'>"+h+"<\/span><\/a>":hi?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+h+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"w":"e")+"'>"+h+"<\/span><\/a>",k=this._get(n,"currentText"),ut=this._get(n,"gotoCurrent")&&n.currentDay?ii:gt,k=ni?this.formatDate(k,ut,this._getFormatConfig(n)):k,ft=n.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(n,"closeText")+"<\/button>",ri=li?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(f?ft:"")+(this._isInRange(n,ut)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+k+"<\/button>":"")+(f?"":ft)+"<\/div>":"",c=parseInt(this._get(n,"firstDay"),10),c=isNaN(c)?0:c,et=this._get(n,"showWeek"),ui=this._get(n,"dayNames"),fi=this._get(n,"dayNamesMin"),ei=this._get(n,"monthNames"),oi=this._get(n,"monthNamesShort"),ot=this._get(n,"beforeShowDay"),g=this._get(n,"showOtherMonths"),si=this._get(n,"selectOtherMonths"),st=this._getDefaultDate(n),nt="",y=0;y<e[0];y++){for(ht="",this.maxRows=4,p=0;p<e[1];p++){if(ct=this._daylightSavingAdjust(new Date(r,t,n.selectedDay)),l=" ui-corner-all",u="",ti){if(u+="<div class='ui-datepicker-group",e[1]>1)switch(p){case 0:u+=" ui-datepicker-group-first";l=" ui-corner-"+(f?"right":"left");break;case e[1]-1:u+=" ui-datepicker-group-last";l=" ui-corner-"+(f?"left":"right");break;default:u+=" ui-datepicker-group-middle";l=""}u+="'>"}for(u+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+l+"'>"+(/all|left/.test(l)&&0===y?f?rt:it:"")+(/all|right/.test(l)&&0===y?f?it:rt:"")+this._generateMonthYearHeader(n,t,r,w,v,y>0||p>0,ei,oi)+"<\/div><table class='ui-datepicker-calendar'><thead><tr>",lt=et?"<th class='ui-datepicker-week-col'>"+this._get(n,"weekHeader")+"<\/th>":"",o=0;7>o;o++)at=(o+c)%7,lt+="<th"+((o+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+ui[at]+"'>"+fi[at]+"<\/span><\/th>";for(u+=lt+"<\/tr><\/thead><tbody>",vt=this._getDaysInMonth(r,t),r===n.selectedYear&&t===n.selectedMonth&&(n.selectedDay=Math.min(n.selectedDay,vt)),yt=(this._getFirstDayOfMonth(r,t)-c+7)%7,pt=Math.ceil((yt+vt)/7),wt=ti&&this.maxRows>pt?this.maxRows:pt,this.maxRows=wt,i=this._daylightSavingAdjust(new Date(r,t,1-yt)),bt=0;wt>bt;bt++){for(u+="<tr>",kt=et?"<td class='ui-datepicker-week-col'>"+this._get(n,"calculateWeek")(i)+"<\/td>":"",o=0;7>o;o++)d=ot?ot.apply(n.input?n.input[0]:null,[i]):[!0,""],a=i.getMonth()!==t,tt=a&&!si||!d[0]||w&&w>i||v&&i>v,kt+="<td class='"+((o+c+6)%7>=5?" ui-datepicker-week-end":"")+(a?" ui-datepicker-other-month":"")+(i.getTime()===ct.getTime()&&t===n.selectedMonth&&n._keyEvent||st.getTime()===i.getTime()&&st.getTime()===ct.getTime()?" "+this._dayOverClass:"")+(tt?" "+this._unselectableClass+" ui-state-disabled":"")+(a&&!g?"":" "+d[1]+(i.getTime()===ii.getTime()?" "+this._currentClass:"")+(i.getTime()===gt.getTime()?" ui-datepicker-today":""))+"'"+(a&&!g||!d[2]?"":" title='"+d[2].replace(/'/g,"&#39;")+"'")+(tt?"":" data-handler='selectDay' data-event='click' data-month='"+i.getMonth()+"' data-year='"+i.getFullYear()+"'")+">"+(a&&!g?"&#xa0;":tt?"<span class='ui-state-default'>"+i.getDate()+"<\/span>":"<a class='ui-state-default"+(i.getTime()===gt.getTime()?" ui-state-highlight":"")+(i.getTime()===ii.getTime()?" ui-state-active":"")+(a?" ui-priority-secondary":"")+"' href='#'>"+i.getDate()+"<\/a>")+"<\/td>",i.setDate(i.getDate()+1),i=this._daylightSavingAdjust(i);u+=kt+"<\/tr>"}t++;t>11&&(t=0,r++);u+="<\/tbody><\/table>"+(ti?"<\/div>"+(e[0]>0&&p===e[1]-1?"<div class='ui-datepicker-row-break'><\/div>":""):"");ht+=u}nt+=ht}return nt+=ri,n._keyEvent=!1,nt},_generateMonthYearHeader:function(n,t,i,r,u,f,e,o){var k,d,h,v,y,p,s,a,w=this._get(n,"changeMonth"),b=this._get(n,"changeYear"),g=this._get(n,"showMonthAfterYear"),c="<div class='ui-datepicker-title'>",l="";if(f||!w)l+="<span class='ui-datepicker-month'>"+e[t]+"<\/span>";else{for(k=r&&r.getFullYear()===i,d=u&&u.getFullYear()===i,l+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!k||h>=r.getMonth())&&(!d||h<=u.getMonth())&&(l+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"<\/option>");l+="<\/select>"}if(g||(c+=l+(!f&&w&&b?"":"&#xa0;")),!n.yearshtml)if(n.yearshtml="",f||!b)c+="<span class='ui-datepicker-year'>"+i+"<\/span>";else{for(v=this._get(n,"yearRange").split(":"),y=(new Date).getFullYear(),p=function(n){var t=n.match(/c[+\-].*/)?i+parseInt(n.substring(1),10):n.match(/[+\-].*/)?y+parseInt(n,10):parseInt(n,10);return isNaN(t)?y:t},s=p(v[0]),a=Math.max(s,p(v[1]||"")),s=r?Math.max(s,r.getFullYear()):s,a=u?Math.min(a,u.getFullYear()):a,n.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";a>=s;s++)n.yearshtml+="<option value='"+s+"'"+(s===i?" selected='selected'":"")+">"+s+"<\/option>";n.yearshtml+="<\/select>";c+=n.yearshtml;n.yearshtml=null}return c+=this._get(n,"yearSuffix"),g&&(c+=(!f&&w&&b?"":"&#xa0;")+l),c+"<\/div>"},_adjustInstDate:function(n,t,i){var u=n.drawYear+("Y"===i?t:0),f=n.drawMonth+("M"===i?t:0),e=Math.min(n.selectedDay,this._getDaysInMonth(u,f))+("D"===i?t:0),r=this._restrictMinMax(n,this._daylightSavingAdjust(new Date(u,f,e)));n.selectedDay=r.getDate();n.drawMonth=n.selectedMonth=r.getMonth();n.drawYear=n.selectedYear=r.getFullYear();("M"===i||"Y"===i)&&this._notifyChange(n)},_restrictMinMax:function(n,t){var i=this._getMinMaxDate(n,"min"),r=this._getMinMaxDate(n,"max"),u=i&&i>t?i:t;return r&&u>r?r:u},_notifyChange:function(n){var t=this._get(n,"onChangeMonthYear");t&&t.apply(n.input?n.input[0]:null,[n.selectedYear,n.selectedMonth+1,n])},_getNumberOfMonths:function(n){var t=this._get(n,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(n,t){return this._determineDate(n,this._get(n,t+"Date"),null)},_getDaysInMonth:function(n,t){return 32-this._daylightSavingAdjust(new Date(n,t,32)).getDate()},_getFirstDayOfMonth:function(n,t){return new Date(n,t,1).getDay()},_canAdjustMonth:function(n,t,i,r){var f=this._getNumberOfMonths(n),u=this._daylightSavingAdjust(new Date(i,r+(0>t?t:f[0]*f[1]),1));return 0>t&&u.setDate(this._getDaysInMonth(u.getFullYear(),u.getMonth())),this._isInRange(n,u)},_isInRange:function(n,t){var i,f,e=this._getMinMaxDate(n,"min"),o=this._getMinMaxDate(n,"max"),r=null,u=null,s=this._get(n,"yearRange");return s&&(i=s.split(":"),f=(new Date).getFullYear(),r=parseInt(i[0],10),u=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=f),i[1].match(/[+\-].*/)&&(u+=f)),(!e||t.getTime()>=e.getTime())&&(!o||t.getTime()<=o.getTime())&&(!r||t.getFullYear()>=r)&&(!u||t.getFullYear()<=u)},_getFormatConfig:function(n){var t=this._get(n,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(n,"dayNamesShort"),dayNames:this._get(n,"dayNames"),monthNamesShort:this._get(n,"monthNamesShort"),monthNames:this._get(n,"monthNames")}},_formatDate:function(n,t,i,r){t||(n.currentDay=n.selectedDay,n.currentMonth=n.selectedMonth,n.currentYear=n.selectedYear);var u=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(r,i,t)):this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay));return this.formatDate(this._get(n,"dateFormat"),u,this._getFormatConfig(n))}});n.fn.datepicker=function(t){if(!this.length)return this;n.datepicker.initialized||(n(document).mousedown(n.datepicker._checkExternalClick),n.datepicker.initialized=!0);0===n("#"+n.datepicker._mainDivId).length&&n("body").append(n.datepicker.dpDiv);var i=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]?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this].concat(i)):n.datepicker._attachDatepicker(this,t)}):n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i))};n.datepicker=new f;n.datepicker.initialized=!1;n.datepicker.uuid=(new Date).getTime();n.datepicker.version="1.10.4"}(jQuery),function(){var n;if(!window.JQUERY_UI_EXTRAS_LOADED||!$.fn.datepicker)throw new Error("jquery.ui.datepicker.js required");n=$.fn.datepicker;$.fn.datepicker=function(t){return n.call(this,$.extend({isRTL:$("body").hasClass("right-to-left")},t||{}))}}.call(this);$(function(){$.fn.editable.defaults.url="/post";$("#enable").click(function(){$("#user .editable").editable("toggleDisabled")});$("#username").editable({url:"/post",type:"text",pk:1,name:"username",title:"Enter username"});$("#firstname").editable({validate:function(n){if(""==$.trim(n))return"This field is required"}});$("#sex").editable({prepend:"not selected",source:[{value:1,text:"Male"},{value:2,text:"Female"}],display:function(n,t){var i=$.grep(t,function(t){return t.value==n});i.length?$(this).text(i[0].text).css("color",{"":"gray","1":"green","2":"blue"}[n]):$(this).empty()}});$("#status").editable();$("#group").editable({showbuttons:!1});$("#vacation").editable({datepicker:{todayBtn:"linked"}});$("#dob").editable();$("#event").editable({placement:"right",combodate:{firstItem:"name"}});$("#meeting_start").editable({format:"yyyy-mm-dd hh:ii",viewformat:"dd/mm/yyyy hh:ii",validate:function(n){if(n&&10==n.getDate())return"Day cant be 10!"},datetimepicker:{todayBtn:"linked",weekStart:1}});$("#comments").editable({showbuttons:"bottom"});$("#note").editable();$("#pencil").click(function(n){n.stopPropagation();n.preventDefault();$("#note").editable("toggle")});$("#state").editable({source:["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]});$("#state2").editable({value:"California",typeahead:{name:"state",local:["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]}});$("#fruits").editable({pk:1,limit:3,source:[{value:1,text:"banana"},{value:2,text:"peach"},{value:3,text:"apple"},{value:4,text:"watermelon"},{value:5,text:"orange"}]});$("#tags").editable({inputclass:"input-large",select2:{tags:["html","javascript","css","ajax"],tokenSeparators:[","," "]}});var n=[];$.each({BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BA:"Bosnia and Herzegovina",BB:"Barbados",WF:"Wallis and Futuna",BL:"Saint Bartelemey",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BT:"Bhutan",JM:"Jamaica",BV:"Bouvet Island",BW:"Botswana",WS:"Samoa",BR:"Brazil",BS:"Bahamas",JE:"Jersey",BY:"Belarus",O1:"Other Country",LV:"Latvia",RW:"Rwanda",RS:"Serbia",TL:"Timor-Leste",RE:"Reunion",LU:"Luxembourg",TJ:"Tajikistan",RO:"Romania",PG:"Papua New Guinea",GW:"Guinea-Bissau",GU:"Guam",GT:"Guatemala",GS:"South Georgia and the South Sandwich Islands",GR:"Greece",GQ:"Equatorial Guinea",GP:"Guadeloupe",JP:"Japan",GY:"Guyana",GG:"Guernsey",GF:"French Guiana",GE:"Georgia",GD:"Grenada",GB:"United Kingdom",GA:"Gabon",SV:"El Salvador",GN:"Guinea",GM:"Gambia",GL:"Greenland",GI:"Gibraltar",GH:"Ghana",OM:"Oman",TN:"Tunisia",JO:"Jordan",HR:"Croatia",HT:"Haiti",HU:"Hungary",HK:"Hong Kong",HN:"Honduras",HM:"Heard Island and McDonald Islands",VE:"Venezuela",PR:"Puerto Rico",PS:"Palestinian Territory",PW:"Palau",PT:"Portugal",SJ:"Svalbard and Jan Mayen",PY:"Paraguay",IQ:"Iraq",PA:"Panama",PF:"French Polynesia",BZ:"Belize",PE:"Peru",PK:"Pakistan",PH:"Philippines",PN:"Pitcairn",TM:"Turkmenistan",PL:"Poland",PM:"Saint Pierre and Miquelon",ZM:"Zambia",EH:"Western Sahara",RU:"Russian Federation",EE:"Estonia",EG:"Egypt",TK:"Tokelau",ZA:"South Africa",EC:"Ecuador",IT:"Italy",VN:"Vietnam",SB:"Solomon Islands",EU:"Europe",ET:"Ethiopia",SO:"Somalia",ZW:"Zimbabwe",SA:"Saudi Arabia",ES:"Spain",ER:"Eritrea",ME:"Montenegro",MD:"Moldova, Republic of",MG:"Madagascar",MF:"Saint Martin",MA:"Morocco",MC:"Monaco",UZ:"Uzbekistan",MM:"Myanmar",ML:"Mali",MO:"Macao",MN:"Mongolia",MH:"Marshall Islands",MK:"Macedonia",MU:"Mauritius",MT:"Malta",MW:"Malawi",MV:"Maldives",MQ:"Martinique",MP:"Northern Mariana Islands",MS:"Montserrat",MR:"Mauritania",IM:"Isle of Man",UG:"Uganda",TZ:"Tanzania, United Republic of",MY:"Malaysia",MX:"Mexico",IL:"Israel",FR:"France",IO:"British Indian Ocean Territory",FX:"France, Metropolitan",SH:"Saint Helena",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands (Malvinas)",FM:"Micronesia, Federated States of",FO:"Faroe Islands",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NA:"Namibia",VU:"Vanuatu",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NZ:"New Zealand",NP:"Nepal",NR:"Nauru",NU:"Niue",CK:"Cook Islands",CI:"Cote d'Ivoire",CH:"Switzerland",CO:"Colombia",CN:"China",CM:"Cameroon",CL:"Chile",CC:"Cocos (Keeling) Islands",CA:"Canada",CG:"Congo",CF:"Central African Republic",CD:"Congo, The Democratic Republic of the",CZ:"Czech Republic",CY:"Cyprus",CX:"Christmas Island",CR:"Costa Rica",CV:"Cape Verde",CU:"Cuba",SZ:"Swaziland",SY:"Syrian Arab Republic",KG:"Kyrgyzstan",KE:"Kenya",SR:"Suriname",KI:"Kiribati",KH:"Cambodia",KN:"Saint Kitts and Nevis",KM:"Comoros",ST:"Sao Tome and Principe",SK:"Slovakia",KR:"Korea, Republic of",SI:"Slovenia",KP:"Korea, Democratic People's Republic of",KW:"Kuwait",SN:"Senegal",SM:"San Marino",SL:"Sierra Leone",SC:"Seychelles",KZ:"Kazakhstan",KY:"Cayman Islands",SG:"Singapore",SE:"Sweden",SD:"Sudan",DO:"Dominican Republic",DM:"Dominica",DJ:"Djibouti",DK:"Denmark",VG:"Virgin Islands, British",DE:"Germany",YE:"Yemen",DZ:"Algeria",US:"United States",UY:"Uruguay",YT:"Mayotte",UM:"United States Minor Outlying Islands",LB:"Lebanon",LC:"Saint Lucia",LA:"Lao People's Democratic Republic",TV:"Tuvalu",TW:"Taiwan",TT:"Trinidad and Tobago",TR:"Turkey",LK:"Sri Lanka",LI:"Liechtenstein",A1:"Anonymous Proxy",TO:"Tonga",LT:"Lithuania",A2:"Satellite Provider",LR:"Liberia",LS:"Lesotho",TH:"Thailand",TF:"French Southern Territories",TG:"Togo",TD:"Chad",TC:"Turks and Caicos Islands",LY:"Libyan Arab Jamahiriya",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",AE:"United Arab Emirates",AD:"Andorra",AG:"Antigua and Barbuda",AF:"Afghanistan",AI:"Anguilla",VI:"Virgin Islands, U.S.",IS:"Iceland",IR:"Iran, Islamic Republic of",AM:"Armenia",AL:"Albania",AO:"Angola",AN:"Netherlands Antilles",AQ:"Antarctica",AP:"Asia/Pacific Region",AS:"American Samoa",AR:"Argentina",AU:"Australia",AT:"Austria",AW:"Aruba",IN:"India",AX:"Aland Islands",AZ:"Azerbaijan",IE:"Ireland",ID:"Indonesia",UA:"Ukraine",QA:"Qatar",MZ:"Mozambique"},function(t,i){n.push({id:t,text:i})});$("#country").editable({source:n,select2:{width:200,placeholder:"Select country",allowClear:!0}});$("#address").editable({url:"/post",value:{city:"Moscow",street:"Lenina",building:"12"},validate:function(n){if(""==n.city)return"city is required!"},display:function(n){if(!n)return void $(this).empty();var t="<b>"+$("<div>").text(n.city).html()+"<\/b>, "+$("<div>").text(n.street).html()+" st., bld. "+$("<div>").text(n.building).html();$(this).html(t)}});$("#user .editable").on("hidden",function(n,t){if("save"===t||"nochange"===t){var i=$(this).closest("tr").next().find(".editable");$("#autoopen").is(":checked")?setTimeout(function(){i.editable("show")},300):i.focus()}})});!function(n){"use strict";n.matchMedia=n.matchMedia||function(n){var u,i=n.documentElement,f=i.firstElementChild||i.firstChild,r=n.createElement("body"),t=n.createElement("div");return t.id="mq-test-1",t.style.cssText="position:absolute;top:-100em",r.style.background="none",r.appendChild(t),function(n){return t.innerHTML='&shy;<style media="'+n+'"> #mq-test-1 { width: 42px; }<\/style>',i.insertBefore(r,f),u=42===t.offsetWidth,i.removeChild(r),{matches:u,media:n}}}(n.document)}(this),function(n){"use strict";function p(){y(!0)}var t={};n.respond=t;t.update=function(){};var f=[],it=function(){var t=!1;try{t=new n.XMLHttpRequest}catch(i){t=new n.ActiveXObject("Microsoft.XMLHTTP")}return function(){return t}}(),w=function(n,t){var i=it();i&&(i.open("GET",n,!0),i.onreadystatechange=function(){4!==i.readyState||200!==i.status&&304!==i.status||t(i.responseText)},4!==i.readyState&&i.send(null))},b=function(n){return n.replace(t.regex.minmaxwh,"").match(t.regex.other)};if(t.ajax=w,t.queue=f,t.unsupportedmq=b,t.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},t.mediaQueriesSupported=n.matchMedia&&null!==n.matchMedia("only all")&&n.matchMedia("only all").matches,!t.mediaQueriesSupported){var c,k,l,i=n.document,r=i.documentElement,e=[],o=[],u=[],a={},d=30,s=i.getElementsByTagName("head")[0]||r,rt=i.getElementsByTagName("base")[0],h=s.getElementsByTagName("link"),v=function(){var u,t=i.createElement("div"),n=i.body,o=r.style.fontSize,e=n&&n.style.fontSize,f=!1;return t.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=f=i.createElement("body"),n.style.background="none"),r.style.fontSize="100%",n.style.fontSize="100%",n.appendChild(t),f&&r.insertBefore(n,r.firstChild),u=t.offsetWidth,f?r.removeChild(n):n.removeChild(t),r.style.fontSize=o,e&&(n.style.fontSize=e),u=l=parseFloat(u)},y=function(t){var rt="clientWidth",ut=r[rt],ft="CSS1Compat"===i.compatMode&&ut||i.body[rt]||ut,p={},ct=h[h.length-1],et=(new Date).getTime(),tt,g,nt,f,it;if(t&&c&&d>et-c)return n.clearTimeout(k),void(k=n.setTimeout(y,d));c=et;for(tt in e)if(e.hasOwnProperty(tt)){var a=e[tt],w=a.minw,b=a.maxw,ot=null===w,st=null===b,ht="em";w&&(w=parseFloat(w)*(w.indexOf(ht)>-1?l||v():1));b&&(b=parseFloat(b)*(b.indexOf(ht)>-1?l||v():1));a.hasquery&&(ot&&st||!(ot||ft>=w)||!(st||b>=ft))||(p[a.media]||(p[a.media]=[]),p[a.media].push(o[a.rules]))}for(g in u)u.hasOwnProperty(g)&&u[g]&&u[g].parentNode===s&&s.removeChild(u[g]);u.length=0;for(nt in p)p.hasOwnProperty(nt)&&(f=i.createElement("style"),it=p[nt].join("\n"),f.type="text/css",f.media=nt,s.insertBefore(f,ct.nextSibling),f.styleSheet?f.styleSheet.cssText=it:f.appendChild(i.createTextNode(it)),u.push(f))},g=function(n,i,r){var h=n.replace(t.regex.comments,"").replace(t.regex.keyframes,"").match(t.regex.media),c=h&&h.length||0,l,a,f,v,u,p,w,s;for(i=i.substring(0,i.lastIndexOf("/")),l=function(n){return n.replace(t.regex.urls,"$1"+i+"$2$3")},a=!c&&r,i.length&&(i+="/"),a&&(c=1),f=0;c>f;f++)for(a?(v=r,o.push(l(n))):(v=h[f].match(t.regex.findStyles)&&RegExp.$1,o.push(RegExp.$2&&l(RegExp.$2))),p=v.split(","),w=p.length,s=0;w>s;s++)u=p[s],b(u)||e.push({media:u.split("(")[0].match(t.regex.only)&&RegExp.$2||"all",rules:o.length-1,hasquery:u.indexOf("(")>-1,minw:u.match(t.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:u.match(t.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")});y()},nt=function(){if(f.length){var t=f.shift();w(t.href,function(i){g(i,t.href,t.media);a[t.href]=!0;n.setTimeout(function(){nt()},0)})}},tt=function(){for(var r=0;r<h.length;r++){var i=h[r],t=i.href,u=i.media,e=i.rel&&"stylesheet"===i.rel.toLowerCase();t&&e&&!a[t]&&(i.styleSheet&&i.styleSheet.rawCssText?(g(i.styleSheet.rawCssText,t,u),a[t]=!0):(!/^([a-zA-Z:]*\/\/)/.test(t)&&!rt||t.replace(RegExp.$1,"").split("/")[0]===n.location.host)&&("//"===t.substring(0,2)&&(t=n.location.protocol+t),f.push({href:t,media:u})))}nt()};tt();t.update=tt;t.getEmValue=v;n.addEventListener?n.addEventListener("resize",p,!1):n.attachEvent&&n.attachEvent("onresize",p)}}(this);document.createElement("canvas").getContext||!function(){function wt(){return this.context_||(this.context_=new d(this))}function bt(n,t){var i=pt.call(arguments,2);return function(){return n.apply(t,i.concat(pt.call(arguments)))}}function ot(n){return String(n).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function st(n,t,i){n.namespaces[t]||n.namespaces.add(t,i,"#default#VML")}function ht(n){if(st(n,"g_vml_","urn:schemas-microsoft-com:vml"),st(n,"g_o_","urn:schemas-microsoft-com:office:office"),!n.styleSheets.ex_canvas_){var t=n.createStyleSheet();t.owningElement.id="ex_canvas_";t.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}function kt(n){var t=n.srcElement;switch(n.propertyName){case"width":t.getContext().clearRect();t.style.width=t.attributes.width.nodeValue+"px";t.firstChild.style.width=t.clientWidth+"px";break;case"height":t.getContext().clearRect();t.style.height=t.attributes.height.nodeValue+"px";t.firstChild.style.height=t.clientHeight+"px"}}function dt(n){var t=n.srcElement;t.firstChild&&(t.firstChild.style.width=t.clientWidth+"px",t.firstChild.style.height=t.clientHeight+"px")}function y(){return[[1,0,0],[0,1,0],[0,0,1]]}function s(n,t){for(var r,e,u,f=y(),i=0;3>i;i++)for(r=0;3>r;r++){for(e=0,u=0;3>u;u++)e+=n[i][u]*t[u][r];f[i][r]=e}return f}function ct(n,t){t.fillStyle=n.fillStyle;t.lineCap=n.lineCap;t.lineJoin=n.lineJoin;t.lineWidth=n.lineWidth;t.miterLimit=n.miterLimit;t.shadowBlur=n.shadowBlur;t.shadowColor=n.shadowColor;t.shadowOffsetX=n.shadowOffsetX;t.shadowOffsetY=n.shadowOffsetY;t.strokeStyle=n.strokeStyle;t.globalAlpha=n.globalAlpha;t.font=n.font;t.textAlign=n.textAlign;t.textBaseline=n.textBaseline;t.arcScaleX_=n.arcScaleX_;t.arcScaleY_=n.arcScaleY_;t.lineScale_=n.lineScale_}function lt(n){var i=n.indexOf("(",3),r=n.indexOf(")",i+1),t=n.substring(i+1,r).split(",");return(4!=t.length||"a"!=n.charAt(3))&&(t[3]=1),t}function p(n){return parseFloat(n)/100}function w(n,t,i){return Math.min(i,Math.max(t,n))}function gt(n){var e,s,h,i,r,t,u,f;return(i=parseFloat(n[0])/360%360,0>i&&i++,r=w(p(n[1]),0,1),t=w(p(n[2]),0,1),0==r)?e=s=h=t:(u=.5>t?t*(1+r):t+r-t*r,f=2*t-u,e=b(f,u,i+1/3),s=b(f,u,i),h=b(f,u,i-1/3)),"#"+o[Math.floor(255*e)]+o[Math.floor(255*s)]+o[Math.floor(255*h)]}function b(n,t,i){return 0>i&&i++,i>1&&i--,1>6*i?n+6*(t-n)*i:1>2*i?t:2>3*i?n+(t-n)*(2/3-i)*6:n}function k(n){var i,u,t;if(n in ft)return ft[n];if(u=1,n=String(n),"#"==n.charAt(0))i=n;else if(/^rgb/.test(n)){for(var f,t=lt(n),i="#",r=0;3>r;r++)f=-1!=t[r].indexOf("%")?Math.floor(255*p(t[r])):+t[r],i+=o[w(f,0,255)];u=+t[3]}else/^hsl/.test(n)?(t=lt(n),i=gt(t),u=t[3]):i=si[n]||n;return ft[n]={color:i,alpha:u}}function ni(n){if(et[n])return et[n];var i=document.createElement("div"),t=i.style;try{t.font=n}catch(r){}return et[n]={style:t.fontStyle||v.style,variant:t.fontVariant||v.variant,weight:t.fontWeight||v.weight,size:t.fontSize||v.size,family:t.fontFamily||v.family}}function ti(n,t){var r={},f,u,i;for(f in n)r[f]=n[f];return u=parseFloat(t.currentStyle.fontSize),i=parseFloat(n.size),r.size="number"==typeof n.size?n.size:-1!=n.size.indexOf("px")?i:-1!=n.size.indexOf("em")?u*i:-1!=n.size.indexOf("%")?u/100*i:-1!=n.size.indexOf("pt")?i/.75:u,r.size*=.981,r}function ii(n){return n.style+" "+n.variant+" "+n.weight+" "+n.size+"px "+n.family}function ri(n){return hi[n]||"square"}function d(n){var u,t,r;this.m_=y();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=1*i;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=n;u="width:"+n.clientWidth+"px;height:"+n.clientHeight+"px;overflow:hidden;position:absolute";t=n.ownerDocument.createElement("div");t.style.cssText=u;n.appendChild(t);r=t.cloneNode(!1);r.style.backgroundColor="red";r.style.filter="alpha(opacity=0)";n.appendChild(r);this.element_=t;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}function at(n,t,i,r){n.currentPath_.push({type:"bezierCurveTo",cp1x:t.x,cp1y:t.y,cp2x:i.x,cp2y:i.y,x:r.x,y:r.y});n.currentX_=r.x;n.currentY_=r.y}function vt(n,t){var r=k(n.strokeStyle),f=r.color,u=r.alpha*n.globalAlpha,i=n.lineScale_*n.lineWidth;1>i&&(u*=i);t.push("<g_vml_:stroke",' opacity="',u,'"',' joinstyle="',n.lineJoin,'"',' miterlimit="',n.miterLimit,'"',' endcap="',ri(n.lineCap),'"',' weight="',i,'px"',' color="',f,'" />')}function yt(n,t,u,e){var o=n.fillStyle,a=n.arcScaleX_,v=n.arcScaleY_,y=e.x-u.x,p=e.y-u.y,l,d,s,it,et,ot;if(o instanceof c){var h=0,w={x:0,y:0},b=0,rt=1;if("gradient"==o.type_){var ht=o.x0_/a,ct=o.y0_/v,lt=o.x1_/a,at=o.y1_/v,l=r(n,ht,ct),ut=r(n,lt,at),vt=ut.x-l.x,yt=ut.y-l.y;h=180*Math.atan2(vt,yt)/Math.PI;0>h&&(h+=360);1e-6>h&&(h=0)}else l=r(n,o.x0_,o.y0_),w={x:(l.x-u.x)/y,y:(l.y-u.y)/p},y/=a*i,p/=v*i,d=f.max(y,p),b=2*o.r0_/d,rt=2*o.r1_/d-b;s=o.colors_;s.sort(function(n,t){return n.offset-t.offset});for(var nt=s.length,pt=s[0].color,wt=s[nt-1].color,bt=s[0].alpha*n.globalAlpha,kt=s[nt-1].alpha*n.globalAlpha,ft=[],tt=0;nt>tt;tt++)it=s[tt],ft.push(it.offset*rt+b+" "+it.color);t.push('<g_vml_:fill type="',o.type_,'"',' method="none" focus="100%"',' color="',pt,'"',' color2="',wt,'"',' colors="',ft.join(","),'"',' opacity="',kt,'"',' g_o_:opacity2="',bt,'"',' angle="',h,'"',' focusposition="',w.x,",",w.y,'" />')}else if(o instanceof g)y&&p&&(et=-u.x,ot=-u.y,t.push("<g_vml_:fill",' position="',et/y*a*a,",",ot/p*v*v,'"',' type="tile"',' src="',o.src_,'" />'));else{var st=k(n.fillStyle),dt=st.color,gt=st.alpha*n.globalAlpha;t.push('<g_vml_:fill color="',dt,'" opacity="',gt,'" />')}}function r(n,t,r){var u=n.m_;return{x:i*(t*u[0][0]+r*u[1][0]+u[2][0])-e,y:i*(t*u[0][1]+r*u[1][1]+u[2][1])-e}}function ui(n){return isFinite(n[0][0])&&isFinite(n[0][1])&&isFinite(n[1][0])&&isFinite(n[1][1])&&isFinite(n[2][0])&&isFinite(n[2][1])}function h(n,t,i){if(ui(t)&&(n.m_=t,i)){var r=t[0][0]*t[1][1]-t[0][1]*t[1][0];n.lineScale_=oi(ei(r))}}function c(n){this.type_=n;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}function g(n,t){switch(fi(n),t){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=t;break;default:nt("SYNTAX_ERR")}this.src_=n.src;this.width_=n.width;this.height_=n.height}function nt(n){throw new tt(n);}function fi(n){n&&1==n.nodeType&&"IMG"==n.tagName||nt("TYPE_MISMATCH_ERR");"complete"!=n.readyState&&nt("INVALID_STATE_ERR")}function tt(n){this.code=this[n];this.message=n+": DOM Exception "+this.code}var f=Math,t=f.round,it=f.sin,rt=f.cos,ei=f.abs,oi=f.sqrt,i=10,e=i/2,pt=(+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1],Array.prototype.slice),ut,o,l,a,u;for(ht(document),ut={init:function(n){var t=n||document;t.createElement("canvas");t.attachEvent("onreadystatechange",bt(this.init_,this,t))},init_:function(n){for(var i=n.getElementsByTagName("canvas"),t=0;t<i.length;t++)this.initElement(i[t])},initElement:function(n){if(!n.getContext){n.getContext=wt;ht(n.ownerDocument);n.innerHTML="";n.attachEvent("onpropertychange",kt);n.attachEvent("onresize",dt);var t=n.attributes;t.width&&t.width.specified?n.style.width=t.width.nodeValue+"px":n.width=n.clientWidth;t.height&&t.height.specified?n.style.height=t.height.nodeValue+"px":n.height=n.clientHeight}return n}},ut.init(),o=[],l=0;16>l;l++)for(a=0;16>a;a++)o[16*l+a]=l.toString(16)+a.toString(16);var si={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},ft={},v={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"},et={},hi={butt:"flat",round:"round"},n=d.prototype;n.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null);this.element_.innerHTML=""};n.beginPath=function(){this.currentPath_=[]};n.moveTo=function(n,t){var i=r(this,n,t);this.currentPath_.push({type:"moveTo",x:i.x,y:i.y});this.currentX_=i.x;this.currentY_=i.y};n.lineTo=function(n,t){var i=r(this,n,t);this.currentPath_.push({type:"lineTo",x:i.x,y:i.y});this.currentX_=i.x;this.currentY_=i.y};n.bezierCurveTo=function(n,t,i,u,f,e){var o=r(this,f,e),s=r(this,n,t),h=r(this,i,u);at(this,s,h,o)};n.quadraticCurveTo=function(n,t,i,u){var o=r(this,n,t),f=r(this,i,u),e={x:this.currentX_+2/3*(o.x-this.currentX_),y:this.currentY_+2/3*(o.y-this.currentY_)},s={x:e.x+(f.x-this.currentX_)/3,y:e.y+(f.y-this.currentY_)/3};at(this,e,s,f)};n.arc=function(n,t,u,f,o,s){u*=i;var y=s?"at":"wa",h=n+rt(f)*u-e,p=t+it(f)*u-e,c=n+rt(o)*u-e,w=t+it(o)*u-e;h!=c||s||(h+=.125);var l=r(this,n,t),a=r(this,h,p),v=r(this,c,w);this.currentPath_.push({type:y,x:l.x,y:l.y,radius:u,xStart:a.x,yStart:a.y,xEnd:v.x,yEnd:v.y})};n.rect=function(n,t,i,r){this.moveTo(n,t);this.lineTo(n+i,t);this.lineTo(n+i,t+r);this.lineTo(n,t+r);this.closePath()};n.strokeRect=function(n,t,i,r){var u=this.currentPath_;this.beginPath();this.moveTo(n,t);this.lineTo(n+i,t);this.lineTo(n+i,t+r);this.lineTo(n,t+r);this.closePath();this.stroke();this.currentPath_=u};n.fillRect=function(n,t,i,r){var u=this.currentPath_;this.beginPath();this.moveTo(n,t);this.lineTo(n+i,t);this.lineTo(n+i,t+r);this.lineTo(n,t+r);this.closePath();this.fill();this.currentPath_=u};n.createLinearGradient=function(n,t,i,r){var u=new c("gradient");return u.x0_=n,u.y0_=t,u.x1_=i,u.y1_=r,u};n.createRadialGradient=function(n,t,i,r,u,f){var e=new c("gradientradial");return e.x0_=n,e.y0_=t,e.r0_=i,e.x1_=r,e.y1_=u,e.r1_=f,e};n.drawImage=function(n){var u,e,o,s,a,v,w,b,rt=n.runtimeStyle.width,ut=n.runtimeStyle.height,h,c,k;if(n.runtimeStyle.width="auto",n.runtimeStyle.height="auto",h=n.width,c=n.height,n.runtimeStyle.width=rt,n.runtimeStyle.height=ut,3==arguments.length)u=arguments[1],e=arguments[2],a=v=0,w=o=h,b=s=c;else if(5==arguments.length)u=arguments[1],e=arguments[2],o=arguments[3],s=arguments[4],a=v=0,w=h,b=c;else{if(9!=arguments.length)throw Error("Invalid number of arguments");a=arguments[1];v=arguments[2];w=arguments[3];b=arguments[4];u=arguments[5];e=arguments[6];o=arguments[7];s=arguments[8]}var y=r(this,u,e),p=[],d=10,g=10;if(p.push(" <g_vml_:group",' coordsize="',i*d,",",i*g,'"',' coordorigin="0,0"',' style="width:',d,"px;height:",g,"px;position:absolute;"),1!=this.m_[0][0]||this.m_[0][1]||1!=this.m_[1][1]||this.m_[1][0]){k=[];k.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",t(y.x/i),",","Dy=",t(y.y/i),"");var l=y,nt=r(this,u+o,e),tt=r(this,u,e+s),it=r(this,u+o,e+s);l.x=f.max(l.x,nt.x,tt.x,it.x);l.y=f.max(l.y,nt.y,tt.y,it.y);p.push("padding:0 ",t(l.x/i),"px ",t(l.y/i),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",k.join(""),", sizingmethod='clip');")}else p.push("top:",t(y.y/i),"px;left:",t(y.x/i),"px;");p.push(' ">','<g_vml_:image src="',n.src,'"',' style="width:',i*o,"px;"," height:",i*s,'px"',' cropleft="',a/h,'"',' croptop="',v/c,'"',' cropright="',(h-a-w)/h,'"',' cropbottom="',(c-v-b)/c,'"'," />","<\/g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))};n.stroke=function(n){for(var u,f,a,r,c=10,l=10,h=5e3,e={x:null,y:null},o={x:null,y:null},s=0;s<this.currentPath_.length;s+=h){for(u=[],u.push("<g_vml_:shape",' filled="',!!n,'"',' style="position:absolute;width:',c,"px;height:",l,'px;"',' coordorigin="0,0"',' coordsize="',i*c,",",i*l,'"',' stroked="',!n,'"',' path="'),f=s;f<Math.min(s+h,this.currentPath_.length);f++){f%h==0&&f>0&&u.push(" m ",t(this.currentPath_[f-1].x),",",t(this.currentPath_[f-1].y));r=this.currentPath_[f];switch(r.type){case"moveTo":a=r;u.push(" m ",t(r.x),",",t(r.y));break;case"lineTo":u.push(" l ",t(r.x),",",t(r.y));break;case"close":u.push(" x ");r=null;break;case"bezierCurveTo":u.push(" c ",t(r.cp1x),",",t(r.cp1y),",",t(r.cp2x),",",t(r.cp2y),",",t(r.x),",",t(r.y));break;case"at":case"wa":u.push(" ",r.type," ",t(r.x-this.arcScaleX_*r.radius),",",t(r.y-this.arcScaleY_*r.radius)," ",t(r.x+this.arcScaleX_*r.radius),",",t(r.y+this.arcScaleY_*r.radius)," ",t(r.xStart),",",t(r.yStart)," ",t(r.xEnd),",",t(r.yEnd))}r&&((null==e.x||r.x<e.x)&&(e.x=r.x),(null==o.x||r.x>o.x)&&(o.x=r.x),(null==e.y||r.y<e.y)&&(e.y=r.y),(null==o.y||r.y>o.y)&&(o.y=r.y))}u.push(' ">');n?yt(this,u,e,o):vt(this,u);u.push("<\/g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",u.join(""))}};n.fill=function(){this.stroke(!0)};n.closePath=function(){this.currentPath_.push({type:"close"})};n.save=function(){var n={};ct(this,n);this.aStack_.push(n);this.mStack_.push(this.m_);this.m_=s(y(),this.m_)};n.restore=function(){this.aStack_.length&&(ct(this.aStack_.pop(),this),this.m_=this.mStack_.pop())};n.translate=function(n,t){var i=[[1,0,0],[0,1,0],[n,t,1]];h(this,s(i,this.m_),!1)};n.rotate=function(n){var t=rt(n),i=it(n),r=[[t,i,0],[-i,t,0],[0,0,1]];h(this,s(r,this.m_),!1)};n.scale=function(n,t){this.arcScaleX_*=n;this.arcScaleY_*=t;var i=[[n,0,0],[0,t,0],[0,0,1]];h(this,s(i,this.m_),!0)};n.transform=function(n,t,i,r,u,f){var e=[[n,t,0],[i,r,0],[u,f,1]];h(this,s(e,this.m_),!0)};n.setTransform=function(n,t,i,r,u,f){var e=[[n,t,0],[i,r,0],[u,f,1]];h(this,e,!0)};n.drawText_=function(n,u,f,e,o){var l=this.m_,p=1e3,h=0,a=p,v={x:0,y:0},c=[],y=ti(ni(this.font),this.element_),g=ii(y),b=this.element_.currentStyle,s=this.textAlign.toLowerCase(),w,k,d;switch(s){case"left":case"center":case"right":break;case"end":s="ltr"==b.direction?"right":"left";break;case"start":s="rtl"==b.direction?"right":"left";break;default:s="left"}switch(this.textBaseline){case"hanging":case"top":v.y=y.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":v.y=-y.size/2.25}switch(s){case"right":h=p;a=.05;break;case"center":h=a=p/2}w=r(this,u+v.x,f+v.y);c.push('<g_vml_:line from="',-h,' 0" to="',a,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!o,'" stroked="',!!o,'" style="position:absolute;width:1px;height:1px;">');o?vt(this,c):yt(this,c,{x:-h,y:0},{x:a,y:y.size});k=l[0][0].toFixed(3)+","+l[1][0].toFixed(3)+","+l[0][1].toFixed(3)+","+l[1][1].toFixed(3)+",0,0";d=t(w.x/i)+","+t(w.y/i);c.push('<g_vml_:skew on="t" matrix="',k,'" ',' offset="',d,'" origin="',h,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',ot(n),'" style="v-text-align:',s,";font:",ot(g),'" /><\/g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",c.join(""))};n.fillText=function(n,t,i,r){this.drawText_(n,t,i,r,!1)};n.strokeText=function(n,t,i,r){this.drawText_(n,t,i,r,!0)};n.measureText=function(n){var t,i;return this.textMeasureEl_||(t='<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"><\/span>',this.element_.insertAdjacentHTML("beforeEnd",t),this.textMeasureEl_=this.element_.lastChild),i=this.element_.ownerDocument,this.textMeasureEl_.innerHTML="",this.textMeasureEl_.style.font=this.font,this.textMeasureEl_.appendChild(i.createTextNode(n)),{width:this.textMeasureEl_.offsetWidth}};n.clip=function(){};n.arcTo=function(){};n.createPattern=function(n,t){return new g(n,t)};c.prototype.addColorStop=function(n,t){t=k(t);this.colors_.push({offset:n,color:t.color,alpha:t.alpha})};u=tt.prototype=new Error;u.INDEX_SIZE_ERR=1;u.DOMSTRING_SIZE_ERR=2;u.HIERARCHY_REQUEST_ERR=3;u.WRONG_DOCUMENT_ERR=4;u.INVALID_CHARACTER_ERR=5;u.NO_DATA_ALLOWED_ERR=6;u.NO_MODIFICATION_ALLOWED_ERR=7;u.NOT_FOUND_ERR=8;u.NOT_SUPPORTED_ERR=9;u.INUSE_ATTRIBUTE_ERR=10;u.INVALID_STATE_ERR=11;u.SYNTAX_ERR=12;u.INVALID_MODIFICATION_ERR=13;u.NAMESPACE_ERR=14;u.INVALID_ACCESS_ERR=15;u.VALIDATION_ERR=16;u.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=ut;CanvasRenderingContext2D=d;CanvasGradient=c;CanvasPattern=g;DOMException=tt}();!function(n){function s(t){var i,u,f;void 0==window.DOMParser&&window.ActiveXObject&&(DOMParser=function(){},DOMParser.prototype.parseFromString=function(n){var t=new ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(n),t});try{if(i=(new DOMParser).parseFromString(t,"text/xml"),!n.isXMLDoc(i))throw"Unable to parse XML";if(u=n("parsererror",i),1==u.length)throw"Error: "+n(i).text();}catch(r){return f=void 0==r.name?r:r.name+": "+r.message,void n(document).trigger("xmlParseError",[f])}return i}function u(n,t,i){(n.context?jQuery(n.context):jQuery.event).trigger(t,i)}function f(t,i){var r=!1;return"string"==typeof i?n.isFunction(t.test)?t.test(i):t==i:(n.each(t,function(u){return void 0===i[u]?r=!1:(r=!0,"object"==typeof i[u]?f(t[u],i[u]):r=n.isFunction(t[u].test)?t[u].test(i[u]):t[u]==i[u])}),r)}function h(t,i){if(n.isFunction(t))return t(i);if(n.isFunction(t.url.test)){if(!t.url.test(i.url))return null}else{var r=t.url.indexOf("*");if(t.url!==i.url&&-1===r||!new RegExp(t.url.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace("*",".+")).test(i.url))return null}return t.data&&i.data&&!f(t.data,i.data)?null:t&&t.type&&t.type.toLowerCase()!=i.type.toLowerCase()?null:t}function c(t,i){var r=n.extend({},n.mockjaxSettings,t);r.log&&n.isFunction(r.log)&&r.log("MOCK "+i.type.toUpperCase()+": "+i.url,n.extend({},i))}function l(t,i,u){var f=function(r){return function(){return function(){this.status=t.status;this.statusText=t.statusText;this.readyState=4;n.isFunction(t.response)&&t.response(u);"json"==i.dataType&&"object"==typeof t.responseText?this.responseText=JSON.stringify(t.responseText):"xml"==i.dataType?this.responseXML="string"==typeof t.responseXML?s(t.responseXML):t.responseXML:this.responseText=t.responseText;("number"==typeof t.status||"string"==typeof t.status)&&(this.status=t.status);"string"==typeof t.statusText&&(this.statusText=t.statusText);n.isFunction(this.onreadystatechange)?(t.isTimeout&&(this.status=-1),this.onreadystatechange(t.isTimeout?"timeout":void 0)):t.isTimeout&&(this.status=-1)}.apply(r)}}(this);t.proxy?r({global:!1,url:t.proxy,type:t.proxyType,data:t.data,dataType:"script"===i.dataType?"text/plain":i.dataType,complete:function(n){t.responseXML=n.responseXML;t.responseText=n.responseText;t.status=n.status;t.statusText=n.statusText;this.responseTimer=setTimeout(f,t.responseTime||0)}}):i.async===!1?f():this.responseTimer=setTimeout(f,t.responseTime||50)}function a(t,i,r,u){return t=n.extend({},n.mockjaxSettings,t),"undefined"==typeof t.headers&&(t.headers={}),t.contentType&&(t.headers["content-type"]=t.contentType),{status:t.status,statusText:t.statusText,readyState:1,open:function(){},send:function(){u.fired=!0;l.call(this,t,i,r)},abort:function(){clearTimeout(this.responseTimer)},setRequestHeader:function(n,i){t.headers[n]=i},getResponseHeader:function(n){return t.headers&&t.headers[n]?t.headers[n]:"last-modified"==n.toLowerCase()?t.lastModified||(new Date).toString():"etag"==n.toLowerCase()?t.etag||"":"content-type"==n.toLowerCase()?t.contentType||"text/plain":void 0},getAllResponseHeaders:function(){var i="";return n.each(t.headers,function(n,t){i+=n+": "+t+"\n"}),i}}}function v(n,t,r){var f;if(y(n),n.dataType="json",n.data&&i.test(n.data)||i.test(n.url)){w(n,t);var u=/^(\w+:)?\/\/([^\/?#]+)/.exec(n.url),e=u&&(u[1]&&u[1]!==location.protocol||u[2]!==location.host);if(n.dataType="script","GET"===n.type.toUpperCase()&&e)return f=p(n,t,r),f?f:!0}return null}function y(n){"GET"===n.type.toUpperCase()?i.test(n.url)||(n.url+=(/\?/.test(n.url)?"&":"?")+(n.jsonp||"callback")+"=?"):n.data&&i.test(n.data)||(n.data=(n.data?n.data+"&":"")+(n.jsonp||"callback")+"=?")}function p(t,i,r){var u=(r&&r.context||t,null);return i.response&&n.isFunction(i.response)?i.response(r):n.globalEval("object"==typeof i.responseText?"("+JSON.stringify(i.responseText)+")":"("+i.responseText+")"),e(t,i),o(t,i),jQuery.Deferred&&(u=new jQuery.Deferred,u.resolve("object"==typeof i.responseText?i.responseText:jQuery.parseJSON(i.responseText))),u}function w(n,t){jsonp=n.jsonpCallback||"jsonp"+k++;n.data&&(n.data=(n.data+"").replace(i,"="+jsonp+"$1"));n.url=n.url.replace(i,"="+jsonp+"$1");window[jsonp]=window[jsonp]||function(i){data=i;e(n,t);o(n,t);window[jsonp]=void 0;try{delete window[jsonp]}catch(r){}head&&head.removeChild(script)}}function e(n,t){n.success&&n.success.call(callbackContext,t.response?t.response.toString():t.responseText||"",status,{});n.global&&u(n,"ajaxSuccess",[{},n])}function o(n){n.complete&&n.complete.call(callbackContext,{},status);n.global&&u("ajaxComplete",[{},n]);n.global&&!--jQuery.active&&jQuery.event.trigger("ajaxStop")}function b(i,u){var s,f,e,o;for("object"==typeof i?(u=i,i=void 0):u.url=i,f=jQuery.extend(!0,{},jQuery.ajaxSettings,u),o=0;o<t.length;o++)if(t[o]&&(e=h(t[o],f)))return c(e,f),"jsonp"===f.dataType&&(s=v(f,e,u))?s:(e.cache=f.cache,e.timeout=f.timeout,e.global=f.global,function(t,i,u,f){s=r.call(n,n.extend(!0,{},u,{xhr:function(){return a(t,i,u,f)}}))}(e,f,u,t[o]),s);return r.apply(n,[u])}var r=n.ajax,t=[],i=/=\?(&|$)/,k=(new Date).getTime();n.extend({ajax:b});n.mockjaxSettings={log:function(n){window.console&&window.console.log&&window.console.log(n)},status:200,statusText:"OK",responseTime:500,isTimeout:!1,contentType:"text/plain",response:"",responseText:"",responseXML:"",proxy:"",proxyType:"GET",lastModified:null,etag:"",headers:{etag:"IJF@H#@923uf8023hFO@I#H#","content-type":"text/plain"}};n.mockjax=function(n){var i=t.length;return t[i]=n,i};n.mockjaxClear=function(n){1==arguments.length?t[n]=null:t=[]};n.mockjax.handler=function(n){if(1==arguments.length)return t[n]}}(jQuery);$(function(){function n(n,t){var u,i=[],r,f;i.push(n.type.toUpperCase()+' url = "'+n.url+'"');for(r in n.data){if(n.data[r]&&"object"==typeof n.data[r]){u=[];for(f in n.data[r])u.push(f+': "'+n.data[r][f]+'"');u="{ "+u.join(", ")+" }"}else u='"'+n.data[r]+'"';i.push(r+" = "+u)}i.push("RESPONSE: status = "+t.status);t.responseText&&($.isArray(t.responseText)?(i.push("["),$.each(t.responseText,function(n,t){i.push("{value: "+t.value+', text: "'+t.text+'"}')}),i.push("]")):i.push($.trim(t.responseText)));i.push("--------------------------------------\n")}$.mockjaxSettings.responseTime=500;$.mockjax({url:"/post",response:function(t){try{n(t,this)}catch(i){}}});$.mockjax({url:"/error",status:400,statusText:"Bad Request",response:function(t){this.responseText="Please input correct value";try{n(t,this)}catch(i){}}});$.mockjax({url:"/status",status:500,response:function(t){this.responseText="Internal Server Error";try{n(t,this)}catch(i){}}});$.mockjax({url:"/groups",response:function(t){this.responseText=[{value:0,text:"Guest"},{value:1,text:"Service"},{value:2,text:"Customer"},{value:3,text:"Operator"},{value:4,text:"Support"},{value:5,text:"Admin"}];try{n(t,this)}catch(i){}}})}),function(n){n.fn.inputlimiter=function(t){var i=n.extend({},n.fn.inputlimiter.defaults,t),s=n(this);i.boxAttach&&!n("#"+i.boxId).length&&(n("<div/>").appendTo("body").attr({id:i.boxId,"class":i.boxClass}).css({position:"absolute"}).hide(),n.fn.bgiframe&&n("#"+i.boxId).bgiframe());var f=function(){var t=n(this),e=r(t.val()),s;!i.allowExceed&&e>i.limit&&t.val(u(t.val()));i.boxAttach&&n("#"+i.boxId).css({width:t.outerWidth()-(n("#"+i.boxId).outerWidth()-n("#"+i.boxId).width())+"px",left:t.offset().left+"px",top:t.offset().top+t.outerHeight()-1+"px","z-index":2e3});var h=i.limit-e>0?i.limit-e:0,f=i.remTextFilter(i,h),o=i.limitTextFilter(i);i.limitTextShow?(n("#"+i.boxId).html(f+" "+o),s=n("<span/>").appendTo("body").attr({id:"19cc9195583bfae1fad88e19d443be7a","class":i.boxClass}).html(f+" "+o).innerWidth(),n("#19cc9195583bfae1fad88e19d443be7a").remove(),s>n("#"+i.boxId).innerWidth()&&n("#"+i.boxId).html(f+"<br />"+o),n("#"+i.boxId).show()):n("#"+i.boxId).html(f).show()},e=function(t){var f=r(n(this).val()),u;if(!i.allowExceed&&f>i.limit&&(u=t.ctrlKey||t.altKey||t.metaKey,!u&&t.which>=32&&t.which<=122&&this.selectionStart===this.selectionEnd))return!1},o=function(){var f=n(this),t;count=r(f.val());!i.allowExceed&&count>i.limit&&f.val(u(f.val()));i.boxAttach?n("#"+i.boxId).fadeOut("fast"):i.remTextHideOnBlur&&(t=i.limitText,t=t.replace(/\%n/g,i.limit),t=t.replace(/\%s/g,i.limit===1?"":"s"),n("#"+i.boxId).html(t))},r=function(t){if(i.limitBy.toLowerCase()==="words")return t.length>0?n.trim(t).replace(/\ +(?= )/g,"").split(" ").length:0;var r=t.length,u=t.match(/\n/g);return u&&i.lineReturnCount>1&&(r+=u.length*(i.lineReturnCount-1)),r},u=function(t){return i.limitBy.toLowerCase()==="words"?n.trim(t).replace(/\ +(?= )/g,"").split(" ").splice(0,i.limit).join(" ")+" ":t.substring(0,i.limit)};n(this).each(function(){var r=n(this);(!t||!t.limit)&&i.useMaxlength&&parseInt(r.attr("maxlength"))>0&&parseInt(r.attr("maxlength"))!=i.limit?r.inputlimiter(n.extend({},i,{limit:parseInt(r.attr("maxlength"))})):(!i.allowExceed&&i.useMaxlength&&i.limitBy.toLowerCase()==="characters"&&r.attr("maxlength",i.limit),r.unbind(".inputlimiter"),r.bind("keyup.inputlimiter",f),r.bind("keypress.inputlimiter",e),r.bind("blur.inputlimiter",o))})};n.fn.inputlimiter.remtextfilter=function(n,t){var i=n.remText;return t===0&&n.remFullText!==null&&(i=n.remFullText),i=i.replace(/\%n/g,t),i.replace(/\%s/g,n.zeroPlural?t===1?"":"s":t<=1?"":"s")};n.fn.inputlimiter.limittextfilter=function(n){var t=n.limitText;return t=t.replace(/\%n/g,n.limit),t.replace(/\%s/g,n.limit<=1?"":"s")};n.fn.inputlimiter.defaults={limit:255,boxAttach:!0,boxId:"limiterBox",boxClass:"limiterBox",remText:"%n character%s remaining.",remTextFilter:n.fn.inputlimiter.remtextfilter,remTextHideOnBlur:!0,remFullText:null,limitTextShow:!0,limitText:"Field limited to %n character%s.",limitTextFilter:n.fn.inputlimiter.limittextfilter,zeroPlural:!0,allowExceed:!1,useMaxlength:!0,limitBy:"characters",lineReturnCount:1}}(jQuery);!function(){var n,i,r,t,u,f={}.hasOwnProperty,e=function(n,t){function r(){this.constructor=n}for(var i in t)f.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n};t=function(){function n(){this.options_index=0;this.parsed=[]}return n.prototype.add_node=function(n){return"OPTGROUP"===n.nodeName.toUpperCase()?this.add_group(n):this.add_option(n)},n.prototype.add_group=function(n){var i,f,t,e,r,u;for(i=this.parsed.length,this.parsed.push({array_index:i,group:!0,label:this.escapeExpression(n.label),children:0,disabled:n.disabled}),r=n.childNodes,u=[],t=0,e=r.length;e>t;t++)f=r[t],u.push(this.add_option(f,i,n.disabled));return u},n.prototype.add_option=function(n,t,i){if("OPTION"===n.nodeName.toUpperCase())return(""!==n.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:n.value,text:n.text,html:n.innerHTML,selected:n.selected,disabled:i===!0?i:n.disabled,group_array_index:t,classes:n.className,style:n.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1)},n.prototype.escapeExpression=function(n){var t,i;return null==n||n===!1?"":/[\&\<\>\"\'\`]/.test(n)?(t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=/&(?!\w+;)|[\<\>\"\'\`]/g,n.replace(i,function(n){return t[n]||"&amp;"})):n},n}();t.select_to_array=function(n){var f,r,i,e,u;for(r=new t,u=n.childNodes,i=0,e=u.length;e>i;i++)f=u[i],r.add_node(f);return r.parsed};i=function(){function n(t,i){this.form_field=t;this.options=null!=i?i:{};n.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return n.prototype.set_default_values=function(){var n=this;return this.click_test_action=function(t){return n.test_active_click(t)},this.activate_action=function(t){return n.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0},n.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||n.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||n.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||n.default_no_result_text},n.prototype.mouse_enter=function(){return this.mouse_on_container=!0},n.prototype.mouse_leave=function(){return this.mouse_on_container=!1},n.prototype.input_focus=function(){var n=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return n.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},n.prototype.input_blur=function(){var n=this;if(!this.mouse_on_container)return(this.active_field=!1,setTimeout(function(){return n.blur_test()},100))},n.prototype.results_option_build=function(n){var r,t,i,f,u;for(r="",u=this.results_data,i=0,f=u.length;f>i;i++)t=u[i],r+=t.group?this.result_add_group(t):this.result_add_option(t),(null!=n?n.first:void 0)&&(t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&this.single_set_selected_text(t.text));return r},n.prototype.result_add_option=function(n){var t,i;return n.search_match?this.include_option_in_results(n)?(t=[],n.disabled||n.selected&&this.is_multiple||t.push("active-result"),!n.disabled||n.selected&&this.is_multiple||t.push("disabled-result"),n.selected&&t.push("result-selected"),null!=n.group_array_index&&t.push("group-option"),""!==n.classes&&t.push(n.classes),i=document.createElement("li"),i.className=t.join(" "),i.style.cssText=n.style,i.setAttribute("data-option-array-index",n.array_index),i.innerHTML=n.search_text,this.outerHTML(i)):"":""},n.prototype.result_add_group=function(n){var t;return n.search_match||n.group_match?n.active_options>0?(t=document.createElement("li"),t.className="group-result",t.innerHTML=n.search_text,this.outerHTML(t)):"":""},n.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},n.prototype.reset_single_select_options=function(){var i,n,u,r,t;for(r=this.results_data,t=[],n=0,u=r.length;u>n;n++)i=r[n],i.selected?t.push(i.selected=!1):t.push(void 0);return t},n.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},n.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},n.prototype.winnow_results=function(){var e,n,h,c,u,t,i,r,o,l,f,a,s;for(this.no_results_clear(),u=0,i=this.get_search_text(),e=i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.search_contains?"":"^",h=new RegExp(c+e,"i"),l=new RegExp(e,"i"),s=this.results_data,f=0,a=s.length;a>f;f++)n=s[f],n.search_match=!1,t=null,this.include_option_in_results(n)&&(n.group&&(n.group_match=!1,n.active_options=0),null!=n.group_array_index&&this.results_data[n.group_array_index]&&(t=this.results_data[n.group_array_index],0===t.active_options&&t.search_match&&(u+=1),t.active_options+=1),(!n.group||this.group_search)&&(n.search_text=n.group?n.label:n.html,n.search_match=this.search_string_match(n.search_text,h),n.search_match&&!n.group&&(u+=1),n.search_match?(i.length&&(r=n.search_text.search(l),o=n.search_text.substr(0,r+i.length)+"<\/em>"+n.search_text.substr(r+i.length),n.search_text=o.substr(0,r)+"<em>"+o.substr(r)),null!=t&&(t.group_match=!0)):null!=n.group_array_index&&this.results_data[n.group_array_index].search_match&&(n.search_match=!0)));return this.result_clear_highlight(),1>u&&i.length?(this.update_results_content(""),this.no_results(i)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},n.prototype.search_string_match=function(n,t){var u,i,r,f;if(t.test(n))return!0;if(this.enable_split_word_search&&(n.indexOf(" ")>=0||0===n.indexOf("["))&&(i=n.replace(/\[|\]/g,"").split(" "),i.length))for(r=0,f=i.length;f>r;r++)if(u=i[r],t.test(u))return!0},n.prototype.choices_count=function(){var i,n,r,t;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=this.form_field.options,n=0,r=t.length;r>n;n++)i=t[n],i.selected&&(this.selected_option_count+=1);return this.selected_option_count},n.prototype.choices_click=function(n){return n.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},n.prototype.keyup_checker=function(n){var t,i;switch(t=null!=(i=n.which)?i:n.keyCode,this.search_field_scale(),t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(n.preventDefault(),this.results_showing)return this.result_select(n);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},n.prototype.clipboard_event_checker=function(){var n=this;return setTimeout(function(){return n.results_search()},50)},n.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},n.prototype.include_option_in_results=function(n){return this.is_multiple&&!this.display_selected_options&&n.selected?!1:!this.display_disabled_options&&n.disabled?!1:n.empty?!1:!0},n.prototype.search_results_touchstart=function(n){return this.touch_started=!0,this.search_results_mouseover(n)},n.prototype.search_results_touchmove=function(n){return this.touch_started=!1,this.search_results_mouseout(n)},n.prototype.search_results_touchend=function(n){if(this.touch_started)return this.search_results_mouseup(n)},n.prototype.outerHTML=function(n){var t;return n.outerHTML?n.outerHTML:(t=document.createElement("div"),t.appendChild(n),t.innerHTML)},n.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},n.default_multiple_text="Select Some Options",n.default_single_text="Select an Option",n.default_no_result_text="Sem resultados para",n}();n=jQuery;n.fn.extend({chosen:function(t){return i.browser_is_supported()?this.each(function(){var u,i;u=n(this);i=u.data("chosen");"destroy"===t&&i?i.destroy():i||u.data("chosen",new r(this,t))}):this}});r=function(i){function r(){return u=r.__super__.constructor.apply(this,arguments)}return e(r,i),r.prototype.setup=function(){return this.form_field_jq=n(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},r.prototype.set_up_html=function(){var t,i;return t=["chosen-container"],t.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chosen-rtl"),i={"class":t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=n("<div />",i),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /><\/li><\/ul><div class="chosen-drop"><ul class="chosen-results"><\/ul><\/div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'<\/span><div><b><\/b><\/div><\/a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /><\/div><ul class="chosen-results"><\/ul><\/div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},r.prototype.register_observers=function(){var n=this;return this.container.bind("mousedown.chosen",function(t){n.container_mousedown(t)}),this.container.bind("mouseup.chosen",function(t){n.container_mouseup(t)}),this.container.bind("mouseenter.chosen",function(t){n.mouse_enter(t)}),this.container.bind("mouseleave.chosen",function(t){n.mouse_leave(t)}),this.search_results.bind("mouseup.chosen",function(t){n.search_results_mouseup(t)}),this.search_results.bind("mouseover.chosen",function(t){n.search_results_mouseover(t)}),this.search_results.bind("mouseout.chosen",function(t){n.search_results_mouseout(t)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(t){n.search_results_mousewheel(t)}),this.search_results.bind("touchstart.chosen",function(t){n.search_results_touchstart(t)}),this.search_results.bind("touchmove.chosen",function(t){n.search_results_touchmove(t)}),this.search_results.bind("touchend.chosen",function(t){n.search_results_touchend(t)}),this.form_field_jq.bind("chosen:updated.chosen",function(t){n.results_update_field(t)}),this.form_field_jq.bind("chosen:activate.chosen",function(t){n.activate_field(t)}),this.form_field_jq.bind("chosen:open.chosen",function(t){n.container_mousedown(t)}),this.form_field_jq.bind("chosen:close.chosen",function(t){n.input_blur(t)}),this.search_field.bind("blur.chosen",function(t){n.input_blur(t)}),this.search_field.bind("keyup.chosen",function(t){n.keyup_checker(t)}),this.search_field.bind("keydown.chosen",function(t){n.keydown_checker(t)}),this.search_field.bind("focus.chosen",function(t){n.input_focus(t)}),this.search_field.bind("cut.chosen",function(t){n.clipboard_event_checker(t)}),this.search_field.bind("paste.chosen",function(t){n.clipboard_event_checker(t)}),this.is_multiple?this.search_choices.bind("click.chosen",function(t){n.choices_click(t)}):this.container.bind("click.chosen",function(n){n.preventDefault()})},r.prototype.destroy=function(){return n(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},r.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},r.prototype.container_mousedown=function(t){if(!this.is_disabled&&(t&&"mousedown"===t.type&&!this.results_showing&&t.preventDefault(),null==t||!n(t.target).hasClass("search-choice-close")))return(this.active_field?this.is_multiple||!t||n(t.target)[0]!==this.selected_item[0]&&!n(t.target).parents("a.chosen-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),n(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},r.prototype.container_mouseup=function(n){if("ABBR"===n.target.nodeName&&!this.is_disabled)return this.results_reset(n)},r.prototype.search_results_mousewheel=function(n){var t;return n.originalEvent&&(t=-n.originalEvent.wheelDelta||n.originalEvent.detail),null!=t?(n.preventDefault(),"DOMMouseScroll"===n.type&&(t=40*t),this.search_results.scrollTop(t+this.search_results.scrollTop())):void 0},r.prototype.blur_test=function(){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},r.prototype.close_field=function(){return n(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},r.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},r.prototype.test_active_click=function(t){var i;return i=n(t.target).closest(".chosen-container"),i.length&&this.container[0]===i[0]?this.active_field=!0:this.close_field()},r.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=t.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},r.prototype.result_do_highlight=function(n){var t,i,r,f,u;if(n.length){if(this.result_clear_highlight(),this.result_highlight=n,this.result_highlight.addClass("highlighted"),r=parseInt(this.search_results.css("maxHeight"),10),u=this.search_results.scrollTop(),f=r+u,i=this.result_highlight.position().top+this.search_results.scrollTop(),t=i+this.result_highlight.outerHeight(),t>=f)return this.search_results.scrollTop(t-r>0?t-r:0);if(u>i)return this.search_results.scrollTop(i)}},r.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},r.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},r.prototype.update_results_content=function(n){return this.search_results.html(n)},r.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},r.prototype.set_tab_index=function(){var n;if(this.form_field.tabIndex)return(n=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=n)},r.prototype.set_label_behavior=function(){var t=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=n("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(n){return t.is_multiple?t.container_mousedown(n):t.activate_field()}):void 0},r.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},r.prototype.search_results_mouseup=function(t){var i;return i=n(t.target).hasClass("active-result")?n(t.target):n(t.target).parents(".active-result").first(),i.length?(this.result_highlight=i,this.result_select(t),this.search_field.focus()):void 0},r.prototype.search_results_mouseover=function(t){var i;return i=n(t.target).hasClass("active-result")?n(t.target):n(t.target).parents(".active-result").first(),i?this.result_do_highlight(i):void 0},r.prototype.search_results_mouseout=function(t){if(n(t.target).hasClass("active-result"))return this.result_clear_highlight()},r.prototype.choice_build=function(t){var i,r,u=this;return i=n("<li />",{"class":"search-choice"}).html("<span>"+t.html+"<\/span>"),t.disabled?i.addClass("search-choice-disabled"):(r=n("<a />",{"class":"search-choice-close","data-option-array-index":t.array_index}),r.bind("click.chosen",function(n){return u.choice_destroy_link_click(n)}),i.append(r)),this.search_container.before(i)},r.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),t.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(n(t.target))},r.prototype.choice_destroy=function(n){if(this.result_deselect(n[0].getAttribute("data-option-array-index")))return(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),n.parents("li").first().remove(),this.search_field_scale())},r.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},r.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},r.prototype.result_select=function(n){var i,t;if(this.result_highlight)return(i=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?i.removeClass("active-result"):this.reset_single_select_options(),t=this.results_data[i[0].getAttribute("data-option-array-index")],t.selected=!0,this.form_field.options[t.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(t):this.single_set_selected_text(t.text),(n.metaKey||n.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[t.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale()))},r.prototype.single_set_selected_text=function(n){return null==n&&(n=this.default_text),n===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(n)},r.prototype.result_deselect=function(n){var t;return t=this.results_data[n],this.form_field.options[t.options_index].disabled?!1:(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},r.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"><\/abbr>'),this.selected_item.addClass("chosen-single-with-deselect"))},r.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":n("<div/>").text(n.trim(this.search_field.val())).html()},r.prototype.winnow_results_set_highlight=function(){var n,t;return t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),n=t.length?t.first():this.search_results.find(".active-result").first(),null!=n?this.result_do_highlight(n):void 0},r.prototype.no_results=function(t){var i;return i=n('<li class="no-results">'+this.results_none_found+' "<span><\/span>"<\/li>'),i.find("span").first().html(t),this.search_results.append(i),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},r.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},r.prototype.keydown_arrow=function(){var n;return this.results_showing&&this.result_highlight?(n=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(n):void 0:this.results_show()},r.prototype.keyup_arrow=function(){var n;return this.results_showing||this.is_multiple?this.result_highlight?(n=this.result_highlight.prevAll("li.active-result"),n.length?this.result_do_highlight(n.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},r.prototype.keydown_backstroke=function(){var n;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(n=this.search_container.siblings("li.search-choice").last(),n.length&&!n.hasClass("search-choice-disabled")?(this.pending_backstroke=n,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},r.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},r.prototype.keydown_checker=function(n){var t,i;switch(t=null!=(i=n.which)?i:n.keyCode,this.search_field_scale(),8!==t&&this.pending_backstroke&&this.clear_backstroke(),t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(n);this.mouse_on_container=!1;break;case 13:n.preventDefault();break;case 38:n.preventDefault();this.keyup_arrow();break;case 40:n.preventDefault();this.keydown_arrow()}},r.prototype.search_field_scale=function(){var t,u,h,f,e,o,i,r,s;if(this.is_multiple){for(h=0,i=0,e="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],r=0,s=o.length;s>r;r++)f=o[r],e+=f+":"+this.search_field.css(f)+";";return t=n("<div />",{style:e}),t.text(this.search_field.val()),n("body").append(t),i=t.width()+25,t.remove(),u=this.container.outerWidth(),i>u-10&&(i=u-10),this.search_field.css({width:i+"px"})}},r}(i)}.call(this);!function(n){n.fn.hoverscroll=function(t){return t||(t={}),t=n.extend({},n.fn.hoverscroll.params,t),this.each(function(){function w(n,u){n-=r.offset().left;u-=r.offset().top;var f=t.vertical?u:n;for(i in o)f>=o[i].from&&f<o[i].to&&("move"==o[i].action?y(o[i].direction,o[i].speed):a())}function v(){var e,s,u,i,o;t.arrows&&!t.fixedArrows&&(t.vertical?(e=f[0].scrollHeight-f.height(),s=f[0].scrollTop):(e=f[0].scrollWidth-f.width(),s=f[0].scrollLeft),u=t.arrowsOpacity,i=s/e*u,i>u&&(i=u),isNaN(i)&&(i=0),o=!1,0>=i&&(n("div.arrow.left, div.arrow.top",r).hide(),e>0&&n("div.arrow.right, div.arrow.bottom",r).show().css("opacity",u),o=!0),(i>=u||0>=e)&&(n("div.arrow.right, div.arrow.bottom",r).hide(),o=!0),o||(n("div.arrow.left, div.arrow.top",r).show().css("opacity",i),n("div.arrow.right, div.arrow.bottom",r).show().css("opacity",u-i)))}function y(i,u){r[0].direction!=i&&(t.debug&&n.log("[HoverScroll] Starting to move. direction: "+i+", speed: "+u),a(),r[0].direction=i,r[0].isChanging=!0,p());r[0].speed!=u&&(t.debug&&n.log("[HoverScroll] Changed speed: "+u),r[0].speed=u)}function a(){r[0].isChanging&&(t.debug&&n.log("[HoverScroll] Stoped moving"),r[0].isChanging=!1,r[0].direction=0,r[0].speed=1,clearTimeout(r[0].timer))}function p(){if(0!=r[0].isChanging){v();var n;n=t.vertical?"scrollTop":"scrollLeft";f[0][n]+=r[0].direction*r[0].speed;r[0].timer=setTimeout(function(){p()},50)}}var e=n(this),f,s,h,c,l,r,u,o;t.debug&&n.log("[HoverScroll] Trying to create hoverscroll on element "+this.tagName+"#"+this.id);t.fixedArrows?e.wrap('<div class="fixed-listcontainer"><\/div>'):e.wrap('<div class="listcontainer"><\/div>');e.addClass("list");f=e.parent();f.wrap('<div class="ui-widget-content hoverscroll'+(t.rtl&&!t.vertical?" rtl":"")+'"><\/div>');r=f.parent();t.arrows&&(t.vertical?t.fixedArrows?(c='<div class="fixed-arrow top"><\/div>',l='<div class="fixed-arrow bottom"><\/div>',f.before(c).after(l)):(c='<div class="arrow top"><\/div>',l='<div class="arrow bottom"><\/div>',f.append(c).append(l)):t.fixedArrows?(s='<div class="fixed-arrow left"><\/div>',h='<div class="fixed-arrow right"><\/div>',f.before(s).after(h)):(s='<div class="arrow left"><\/div>',h='<div class="arrow right"><\/div>',f.append(s).append(h)));r.width(t.width).height(t.height);t.arrows&&t.fixedArrows?t.vertical?(c=f.prev(),l=f.next(),f.width(t.width).height(t.height-(c.height()+l.height()))):(s=f.prev(),h=f.next(),f.height(t.height).width(t.width-(s.width()+h.width()))):f.width(t.width).height(t.height);u=0;t.vertical?(r.addClass("vertical"),e.children().each(function(){n(this).addClass("item");u+=n(this).outerHeight?n(this).outerHeight(!0):n(this).height()+parseInt(n(this).css("padding-top"))+parseInt(n(this).css("padding-bottom"))+parseInt(n(this).css("margin-bottom"))+parseInt(n(this).css("margin-bottom"))}),e.height(u),t.debug&&n.log("[HoverScroll] Computed content height : "+u+"px"),u=r.outerHeight?r.outerHeight():r.height()+parseInt(r.css("padding-top"))+parseInt(r.css("padding-bottom"))+parseInt(r.css("margin-top"))+parseInt(r.css("margin-bottom")),t.debug&&n.log("[HoverScroll] Computed container height : "+u+"px")):(r.addClass("horizontal"),e.children().each(function(){n(this).addClass("item");u+=n(this).outerWidth?n(this).outerWidth(!0):n(this).width()+parseInt(n(this).css("padding-left"))+parseInt(n(this).css("padding-right"))+parseInt(n(this).css("margin-left"))+parseInt(n(this).css("margin-right"))}),e.width(u),t.debug&&n.log("[HoverScroll] Computed content width : "+u+"px"),u=r.outerWidth?r.outerWidth():r.width()+parseInt(r.css("padding-left"))+parseInt(r.css("padding-right"))+parseInt(r.css("margin-left"))+parseInt(r.css("margin-right")),t.debug&&n.log("[HoverScroll] Computed container width : "+u+"px"));o={1:{action:"move",from:0,to:.06*u,direction:-1,speed:16},2:{action:"move",from:.06*u,to:.15*u,direction:-1,speed:8},3:{action:"move",from:.15*u,to:.25*u,direction:-1,speed:6},4:{action:"move",from:.25*u,to:.4*u,direction:-1,speed:4},5:{action:"stop",from:.4*u,to:.6*u},6:{action:"move",from:.6*u,to:.75*u,direction:1,speed:4},7:{action:"move",from:.75*u,to:.85*u,direction:1,speed:6},8:{action:"move",from:.85*u,to:.94*u,direction:1,speed:8},9:{action:"move",from:.94*u,to:u,direction:1,speed:16}};r[0].isChanging=!1;r[0].direction=0;r[0].speed=4;t.rtl&&!t.vertical&&(f[0].scrollLeft=f[0].scrollWidth-f.width());r.mousemove(function(n){w(n.pageX,n.pageY)}).bind("mouseleave",function(){a()});this.startMoving=y;this.stopMoving=a;t.arrows&&!t.fixedArrows?v():n(".arrowleft, .arrowright, .arrowtop, .arrowbottom",r).hide()}),this};n.fn.offset||(n.fn.offset=function(){if(this.left=this.top=0,this[0]&&this[0].offsetParent){var n=this[0];do this.left+=n.offsetLeft,this.top+=n.offsetTop;while(n=n.offsetParent)}return this});n.fn.hoverscroll.params={vertical:!1,width:400,height:50,arrows:!0,arrowsOpacity:.7,fixedArrows:!1,rtl:!1,debug:!1};n.log=function(){try{console.log.apply(console,arguments)}catch(n){try{opera.postError.apply(opera,arguments)}catch(n){}}}}(jQuery),function(n){var t=function(t,i){this.options=i;this.$elementFilestyle=[];this.$element=n(t)},i;t.prototype={clear:function(){this.$element.val("");this.$elementFilestyle.find(":text").val("");this.$elementFilestyle.find(".badge").remove()},destroy:function(){this.$element.removeAttr("style").removeData("filestyle").val("");this.$elementFilestyle.remove()},disabled:function(n){if(n===!0)this.options.disabled||(this.$element.attr("disabled","true"),this.$elementFilestyle.find("label").attr("disabled","true"),this.options.disabled=!0);else if(n===!1)this.options.disabled&&(this.$element.removeAttr("disabled"),this.$elementFilestyle.find("label").removeAttr("disabled"),this.options.disabled=!1);else return this.options.disabled},buttonBefore:function(n){if(n===!0)this.options.buttonBefore||(this.options.buttonBefore=!0,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()));else if(n===!1)this.options.buttonBefore&&(this.options.buttonBefore=!1,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()));else return this.options.buttonBefore},icon:function(n){if(n===!0)this.options.icon||(this.options.icon=!0,this.$elementFilestyle.find("label").prepend(this.htmlIcon()));else if(n===!1)this.options.icon&&(this.options.icon=!1,this.$elementFilestyle.find(".glyphicon").remove());else return this.options.icon},input:function(n){if(n===!0)this.options.input||(this.options.input=!0,this.options.buttonBefore?this.$elementFilestyle.append(this.htmlInput()):this.$elementFilestyle.prepend(this.htmlInput()),this.$elementFilestyle.find(".badge").remove(),this.pushNameFiles(),this.$elementFilestyle.find(".group-span-filestyle").addClass("input-group-btn"));else if(n===!1){if(this.options.input){this.options.input=!1;this.$elementFilestyle.find(":text").remove();var t=this.pushNameFiles();t.length>0&&this.options.badge&&this.$elementFilestyle.find("label").append(' <span class="badge">'+t.length+"<\/span>");this.$elementFilestyle.find(".group-span-filestyle").removeClass("input-group-btn")}}else return this.options.input},size:function(n){if(n!==undefined){var t=this.$elementFilestyle.find("label"),i=this.$elementFilestyle.find("input");t.removeClass("btn-lg btn-sm");i.removeClass("input-lg input-sm");n!="nr"&&(t.addClass("btn-"+n),i.addClass("input-"+n))}else return this.options.size},buttonText:function(n){if(n!==undefined)this.options.buttonText=n,this.$elementFilestyle.find("label span").html(this.options.buttonText);else return this.options.buttonText},buttonName:function(n){if(n!==undefined)this.options.buttonName=n,this.$elementFilestyle.find("label").attr({"class":"btn "+this.options.buttonName});else return this.options.buttonName},iconName:function(n){if(n!==undefined)this.$elementFilestyle.find(".glyphicon").attr({"class":".glyphicon "+this.options.iconName});else return this.options.iconName},htmlIcon:function(){return this.options.icon?'<span class="glyphicon '+this.options.iconName+'"><\/span> ':""},htmlInput:function(){return this.options.input?'<input type="text" class="form-control '+(this.options.size=="nr"?"":"input-"+this.options.size)+'" disabled> ':""},pushNameFiles:function(){var i="",n=[],t;for(this.$element[0].files===undefined?n[0]={name:this.$element[0]&&this.$element[0].value}:n=this.$element[0].files,t=0;t<n.length;t++)i+=n[t].name.split("\\").pop()+", ";return i!==""?this.$elementFilestyle.find(":text").val(i.replace(/\, $/g,"")):this.$elementFilestyle.find(":text").val(""),n},constructor:function(){var t=this,u="",i=t.$element.attr("id"),r="";i!==""&&i||(i="filestyle-"+n(".bootstrap-filestyle").length,t.$element.attr({id:i}));r='<span class="group-span-filestyle '+(t.options.input?"input-group-btn":"")+'"><label for="'+i+'" class="btn '+t.options.buttonName+" "+(t.options.size=="nr"?"":"btn-"+t.options.size)+'" '+(t.options.disabled?'disabled="true"':"")+">"+t.htmlIcon()+t.options.buttonText+"<\/label><\/span>";u=t.options.buttonBefore?r+t.htmlInput():t.htmlInput()+r;t.$elementFilestyle=n('<div class="bootstrap-filestyle input-group">'+u+"<\/div>");t.$elementFilestyle.find(".group-span-filestyle").attr("tabindex","0").keypress(function(n){if(n.keyCode===13||n.charCode===32)return t.$elementFilestyle.find("label").click(),!1});t.$element.css({position:"absolute",clip:"rect(0px 0px 0px 0px)"}).attr("tabindex","-1").after(t.$elementFilestyle);t.options.disabled&&t.$element.attr("disabled","true");t.$element.change(function(){var n=t.pushNameFiles();t.options.input==!1&&t.options.badge?t.$elementFilestyle.find(".badge").length==0?t.$elementFilestyle.find("label").append(' <span class="badge">'+n.length+"<\/span>"):n.length==0?t.$elementFilestyle.find(".badge").remove():t.$elementFilestyle.find(".badge").html(n.length):t.$elementFilestyle.find(".badge").remove()});window.navigator.userAgent.search(/firefox/i)>-1&&t.$elementFilestyle.find("label").click(function(){return t.$element.click(),!1})}};i=n.fn.filestyle;n.fn.filestyle=function(i,r){var u="",f=this.each(function(){if(n(this).attr("type")==="file"){var e=n(this),f=e.data("filestyle"),o=n.extend({},n.fn.filestyle.defaults,i,typeof i=="object"&&i);f||(e.data("filestyle",f=new t(this,o)),f.constructor());typeof i=="string"&&(u=f[i](r))}});return typeof u!==undefined?u:f};n.fn.filestyle.defaults={buttonText:"Choose file",iconName:"glyphicon-folder-open",buttonName:"btn-default",size:"nr",input:!0,badge:!0,icon:!0,buttonBefore:!1,disabled:!1};n.fn.filestyle.noConflict=function(){return n.fn.filestyle=i,this};n(function(){n(".filestyle").each(function(){var t=n(this),i={input:t.attr("data-input")==="false"?!1:!0,icon:t.attr("data-icon")==="false"?!1:!0,buttonBefore:t.attr("data-buttonBefore")==="true"?!0:!1,disabled:t.attr("data-disabled")==="true"?!0:!1,size:t.attr("data-size"),buttonText:t.attr("data-buttonText"),buttonName:t.attr("data-buttonName"),iconName:t.attr("data-iconName"),badge:t.attr("data-badge")==="false"?!1:!0};t.filestyle(i)})})}(window.jQuery)