").addClass("notifications").append(e),$(".container .containerIn").prepend(t)}return t},_makeContainerScroll:function(){var t=Notify._container();1!=t.attr("_notify_scroll_ready")&&(t.is("body")||($(window).on("scroll",function(){var e=$(document).scrollTop(),i=($("#header").offset(),$("#header").height(),$("subheader").not(".fixedHeader").height());i>0?i-=Math.min(76,e):i=0,t.css({position:"fixed",boxSizing:"border-box",zIndex:99999e3,left:0,right:0,top:0,marginTop:0})}).scroll(),$(window).on("resize",function(){t.css({})}),t.attr("_notify_scroll_ready",!0)))},_init:function(){Notify._initialized||(Notify._makeContainerScroll(),Notify._initialized=!0)},_notify:function(e,i,n){Notify._init(),$("#wrapper").css("margin-top","31px"),$("#header").css("margin-top","31px");var s=new t(e,i,n);return Notify._queue.push(s),Notify._displayNext(),s},notify:function(t,e,i){Notify._notify(t,e,i)},error:function(t,e){Notify._notify(Notify.LEVEL_ERROR,t,e).options.logToConsole&&Log.error(t)},warn:function(t,e){Notify._notify(Notify.LEVEL_WARN,t,e).options.logToConsole&&Log.warn(t)},info:function(t,e){Notify._notify(Notify.LEVEL_INFO,t,e).options.logToConsole&&Log.info(t)},success:function(t,e){Notify._notify(Notify.LEVEL_SUCCESS,t,e).options.logToConsole&&Log.info(t)},verbose:function(t,e){Notify._notify(Notify.LEVEL_VERBOSE,t,e).options.logToConsole&&Log.verbose(t)}}}(),function(t){t.extend(t.fn,{validate:function(e){if(this.length){var i=t.data(this[0],"validator");return i||(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function n(){var n;return!i.settings.submitHandler||(i.submitButton&&(n=t("
").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&n.remove(),!1)}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,n()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):n():(i.focusInvalid(),!1)})),i)}e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},n=this;return t.each(e.split(/\s/),function(t,e){i[e]=n.attr(e),n.removeAttr(e)}),i},rules:function(e,i){var n=this[0];if(e){var s=t.data(n.form,"validator").settings,o=s.rules,r=t.validator.staticRules(n);switch(e){case"add":t.extend(r,t.validator.normalizeRule(i)),delete r.messages,o[n.name]=r,i.messages&&(s.messages[n.name]=t.extend(s.messages[n.name],i.messages));break;case"remove":if(!i)return delete o[n.name],r;var a={};return t.each(i.split(/\s/),function(t,e){a[e]=r[e],delete r[e]}),a}}var l=t.validator.normalizeRules(t.extend({},t.validator.classRules(n),t.validator.attributeRules(n),t.validator.dataRules(n),t.validator.staticRules(n)),n);if(l.required){var c=l.required;delete l.required,l=t.extend({required:c},l)}return l}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,n){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(n):t(e).addClass(i).removeClass(n)},unhighlight:function(e,i,n){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(n):t(e).removeClass(i).addClass(n)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),n="on"+e.type.replace(/^validate/,"");i.settings[n]&&i.settings[n].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,n){"string"==typeof n&&(n=n.split(/\s/)),t.each(n,function(t,n){i[n]=e})});var n=this.settings.rules;t.each(n,function(e,i){n[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='phone'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=!1!==this.check(e);return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){for(var i in t.extend(this.errorMap,e),this.errorList=[],e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),!(this.name in i||!e.objectLength(t(this).rules()))&&(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),n=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof n?n.replace(/\r/g,""):n},check:function(e){e=this.validationTargetFor(this.clean(e));var i,n=t(e).rules(),s=!1,o=this.elementValue(e);for(var r in n){var a={method:r,parameters:n[r]};try{if("dependency-mismatch"===(i=t.validator.methods[r].call(this,o,e,a.parameters))){s=!0;continue}if(s=!1,"pending"===i)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!i)return this.formatAndAdd(e,a),!1}catch(t){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+a.method+"' method.",t),t}}return s?void 0:(this.objectLength(n)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"
Warning: No message defined for "+e.name+"")},formatAndAdd:function(e,i){var n=this.defaultMessage(e,i.method),s=/\$?\{(\d+)\}/g;"function"==typeof n?n=n.call(this,i.parameters,e):s.test(n)&&(n=t.validator.format(n.replace(s,"{$1}"),i.parameters)),this.errorList.push({message:n,element:e}),this.errorMap[e.name]=n,this.submitted[e.name]=n},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var n=this.errorsFor(e);n.length?(n.removeClass(this.settings.validClass).addClass(this.settings.errorClass),n.html(i)):(n=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(n=n.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(n).length||(this.settings.errorPlacement?this.settings.errorPlacement(n,t(e)):n.insertAfter(e))),!i&&this.settings.success&&(n.text(""),"string"==typeof this.settings.success?n.addClass(this.settings.success):this.settings.success(n,e)),this.toShow=this.toShow.add(n)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(e,i){return!!t(e,i.form).length},function:function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},n=t(e).attr("class");return n&&t.each(n.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},n=t(e),s=n[0].getAttribute("type");for(var o in t.validator.methods){var r;"required"===o?(""===(r=n.get(0).getAttribute(o))&&(r=!0),r=!!r):r=n.attr(o),/min|max/.test(o)&&(null===s||/number|range|text/.test(s))&&(r=Number(r)),r?i[o]=r:s===o&&"range"!==s&&(i[o]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,n,s={},o=t(e);for(i in t.validator.methods)void 0!==(n=o.data("rule-"+i.toLowerCase()))&&(s[i]=n);return s},staticRules:function(e){var i={},n=t.data(e.form,"validator");return n.settings.rules&&(i=t.validator.normalizeRule(n.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(n,s){if(!1!==s){if(s.param||s.depends){var o=!0;switch(typeof s.depends){case"string":o=!!t(s.depends,i.form).length;break;case"function":o=s.depends.call(i,i)}o?e[n]=void 0===s.param||s.param:delete e[n]}}else delete e[n]}),t.each(e,function(n,s){e[n]=t.isFunction(s)?s(i):s}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,n){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==n?n:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,n){if(!this.depend(n,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var s=t(i).val();return s&&s.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;for(var i=0,n=0,s=!1,o=(t=t.replace(/\D/g,"")).length-1;o>=0;o--){var r=t.charAt(o);n=parseInt(r,10),s&&(n*=2)>9&&(n-=9),i+=n,s=!s}return 0==i%10},minlength:function(e,i,n){var s=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=n},maxlength:function(e,i,n){var s=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||n>=s},rangelength:function(e,i,n){var s=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=n[0]&&n[1]>=s},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,n){var s=t(n);return this.settings.onfocusout&&s.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===s.val()},remote:function(e,i,n){if(this.optional(i))return"dependency-mismatch";var s=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),s.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=s.message,n="string"==typeof n&&{url:n}||n,s.old===e)return s.valid;s.old=e;var o=this;this.startRequest(i);var r={};return r[i.name]=e,t.ajax(t.extend(!0,{url:n,mode:"abort",port:"validate"+i.name,dataType:"json",data:r,success:function(n){o.settings.messages[i.name].remote=s.originalMessage;var r=!0===n||"true"===n;if(r){var a=o.formSubmitted;o.prepareElement(i),o.formSubmitted=a,o.successList.push(i),delete o.invalid[i.name],o.showErrors()}else{var l={},c=n||o.defaultMessage(i,"remote");l[i.name]=s.message=t.isFunction(c)?c(e):c,o.invalid[i.name]=!0,o.showErrors(l)}s.valid=r,o.stopRequest(i,r)}},n)),"pending"}}}),t.format=t.validator.format}(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,n){var s=t.port;"abort"===t.mode&&(e[s]&&e[s].abort(),e[s]=n)});else{var i=t.ajax;t.ajax=function(n){var s=("mode"in n?n:t.ajaxSettings).mode,o=("port"in n?n:t.ajaxSettings).port;return"abort"===s?(e[o]&&e[o].abort(),e[o]=i.apply(this,arguments),e[o]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,n){return this.bind(i,function(i){var s=t(i.target);return s.is(e)?n.apply(s,arguments):void 0})}})}(jQuery),function(){"use strict";"function"!=typeof String.prototype.format&&(String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,function(e,i){return void 0!==t[i]?t[i]:e})}),window.isMobileBrowser=function(){var t,e=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0),e},window.util_fixedDecimal=function(t){return t*=1,Math.round(t),t.toFixed(2)},window.util_dollarDecimal=function(t,e){return e=e||"$",t<0?"-"+e+util_fixedDecimal(Math.abs(t)):e+util_fixedDecimal(t)},window.util_usdDecimal=function(t){return util_dollarDecimal(t,"$")},window.util_gbpDecimal=function(t){return util_dollarDecimal(t,"£")},window.util_eurDecimal=function(t){return util_dollarDecimal(t,"€")},$(function(){$.fn.makeLoading=function(t){var e=$(this).height(),i=$(this).width(),n=$(this).hasClass("orange")?"https://cdn.bisnow.net/assets/website/ajax-loader-square.gif":"https://cdn.bisnow.net/assets/website/ajax-loader-square-black.gif",s=$(this).hasClass("orange")?"#F58320":"#000000";t=$.extend({append:!1},t),$(this).css("height",e).css("width",i).css("background-color",s),$(this).attr("style",function(t,e){return e+"padding-left: 0 !important; padding-right: 0 !important;"});var o='
';$(this).attr("disabled","disabled"),$(this).children("input").attr("disabled","disabled"),t.append?($(" > *",this).css("visibility","hidden"),$(this).css("position","relative"),$(this).append($(o))):$(this).html(o)},$.fn.makeLoadingAdmin=function(){var t=$(this).outerHeight(),e=$(this).outerWidth();$(this).css("visibility","hidden"),$(this).css("position","relative");$(this).before('
');$(".makeLoadingAdmin").append('
').css({background:"#000000",text:"center",height:t,width:e})},$.fn.unmakeLoading=function(){var t=$(this);$(".spinner",t).remove(),$(" > *",t).css("visibility","visible"),$(t).css("visibility","visible"),$(t).siblings(".makeLoadingAdmin").remove(),t.css("width","").css("background-color","").css("height","").css("color","").css("paddingLeft","").css("paddingRight",""),$(this).removeAttr("disabled"),$(this).children("input").removeAttr("disabled")},$.fn.stopLoading=function(t){var e=$.extend({text:"Submit",styleString:"",buttonStyleString:""},t),i=$(this).attr("style");$(this).attr("style",i+";"+e.styleString).css("background-color","inherit"),$(this).html('
")},$.fn.highlight=function(t,e,i){var n=this,s=$(n).finish().css("backgroundColor");return $(n).animate({backgroundColor:"#ffffc9"},t||300,function(){$(n).animate({backgroundColor:s},e||100,function(){$(n).css("background-color",s),i&&i()})}),this},$.fn.doubleHighlight=function(){var t=this;$(t).highlight(500,300,function(){setTimeout(function(){$(t).highlight(300,100)},250)})},$.fn.serializeObject=function(){var t={},e=this.serializeArray();return $.each(e,function(){void 0!==t[this.name]?(t[this.name].push||(t[this.name]=[t[this.name]]),t[this.name].push(this.value||"")):t[this.name]=this.value||""}),t},$.deepExtend=function(t){for(var e=1;e
';$(this).attr("disabled","disabled"),$(this).children("input").attr("disabled","disabled"),t.append?($(" > *",this).css("visibility","hidden"),$(this).css("position","relative"),$(this).append($(o))):$(this).html(o)},$.fn.makeLoadingAdmin=function(){var t=$(this).outerHeight(),e=$(this).outerWidth();$(this).css("visibility","hidden"),$(this).css("position","relative");$(this).before('
');$(".makeLoadingAdmin").append('
').css({background:"#000000",text:"center",height:t,width:e})},$.fn.unmakeLoading=function(){var t=$(this);$(".spinner",t).remove(),$(" > *",t).css("visibility","visible"),$(t).css("visibility","visible"),$(t).siblings(".makeLoadingAdmin").remove(),t.css("width","").css("background-color","").css("height","").css("color","").css("paddingLeft","").css("paddingRight",""),$(this).removeAttr("disabled"),$(this).children("input").removeAttr("disabled")},$.fn.stopLoading=function(t){var e=$.extend({text:"Submit",styleString:"",buttonStyleString:""},t),i=$(this).attr("style");$(this).attr("style",i+";"+e.styleString).css("background-color","inherit"),$(this).html('
")},$.fn.highlight=function(t,e,i){var n=this,s=$(n).finish().css("backgroundColor");return $(n).animate({backgroundColor:"#ffffc9"},t||300,function(){$(n).animate({backgroundColor:s},e||100,function(){$(n).css("background-color",s),i&&i()})}),this},$.fn.doubleHighlight=function(){var t=this;$(t).highlight(500,300,function(){setTimeout(function(){$(t).highlight(300,100)},250)})},$.fn.serializeObject=function(){var t={},e=this.serializeArray();return $.each(e,function(){void 0!==t[this.name]?(t[this.name].push||(t[this.name]=[t[this.name]]),t[this.name].push(this.value||"")):t[this.name]=this.value||""}),t},$.deepExtend=function(t){for(var e=1;e
this.item.max_quantity&&(t=this.item.max_quantity),this.quantity=t,e&&void 0!==e?(this.updateUI(!0),$(".co-btn").unmakeLoading({append:!0})):(this.updateUI(!1),this._syncWithServer(function(t){CartCheckoutImpl.updateCartUIFromResponse(t),$(".co-btn").unmakeLoading({append:!0})}))},addProductToCart:function(t){this._postAddProduct(t)},removeProduct:function(){var t=this;this._parentEl().fadeOut(400,function(){$(".co-btn").makeLoading({append:!0}),$(".btn.pay-now").makeLoading({append:!0}),$(this).remove(),CartCheckoutImpl.removePurchase(t.productId),t._postRemove(function(t){$(".co-btn").unmakeLoading({append:!0}),$(".btn.pay-now").unmakeLoading({append:!0}),CartCheckoutImpl.removeCartItems(t),CartCheckoutImpl.updateCartUIFromResponse(t),CartCheckoutImpl.updateCartPage(t),CartCheckoutImpl.updateQuantity(t),CheckoutVAT.updateVATTax()})})},getSubtotal:function(){return CartCheckoutUI.exchangeRate*this.quantity*this.unitPrice},_parentEl:function(){return $(this.parentEl)},_syncWithServer:function(t){var e=this;this._syncServerTimer&&clearTimeout(this._syncServerTimer),this._syncServerTimer=setTimeout(function(){e._postQuantity(t)},330)},_post:function(t,e,i){$.ajax(t,{type:"post",headers:{"X-CSRF-TOKEN":getCsrfToken()},data:e,success:function(t){t.error?(Log.error(t.message),Log.error(t.trace)):i&&i(t)},error:function(t,e,i){Log.error(i)}})},_postQuantity:function(t){var e="/cart/update/"+this.productId;this._post(e,{quantity:this.quantity},function(e){t&&t(e)})},_postAddProduct:function(t){var e="/cart/addPurchaseAndRender/"+this.productId;this._post(e,{quantity:this.quantity},function(e){ga("require","ec"),ga("ec:addProduct",{id:e.id,name:e.name,category:e.type,brand:"Bisnow",price:e.price,quantity:e.quantity}),ga("ec:setAction","add"),ga("send","event","UX","click","add to cart"),t&&t(e)})},_postRemove:function(t){var e="/cart/remove/"+this.productId;this._post(e,{quantity:"all"},function(e){t&&t(e)})}},e.prototype=$.extend({},t.prototype,{_quantityIncreaseBtn:".arrow-up",_quantityDecreaseBtn:".arrow-down",_removeBtn:"a.remove",_subtotalText:".subtotal",_quantityText:".quantity-text",_quantityTd:".cart-quantity",bootstrap:function(){var t=this;$(this._quantityDecreaseBtn,this._parentEl()).unbind("click").click(function(e){e.preventDefault(),t.decreaseQuantity()}),$(this._quantityIncreaseBtn,this._parentEl()).unbind("click").click(function(e){e.preventDefault(),t.increaseQuantity()}),1==this.item.max_quantity&&($(this._quantityDecreaseBtn,this._parentEl()).css({visibility:"hidden"}),$(this._quantityIncreaseBtn,this._parentEl()).css({visibility:"hidden"})),$(this._removeBtn,this._parentEl()).unbind("click").click(function(e){e.preventDefault(),t.removeProduct()})},updateUI:function(t){if($(this._quantityText,this._parentEl()).text(this.quantity),$(this._quantityTd,this._parentEl()).closest("td").attr("data-quantity",this.quantity),!0===t){var e=this.quantity*this.unitPrice;$(this._subtotalText,this._parentEl()).text(window[CartCheckoutUI.currencyMethod](e))}}}),i.prototype=$.extend({},t.prototype,{_purchaseItemBtn:".add a",bootstrap:function(){var t=this;$(this._purchaseItemBtn,this._parentEl()).unbind("click").click(function(){CartCheckoutImpl.createPurchase(t.item)})}}),n.prototype=$.extend({},t.prototype,{_purchaseUpsellA:"a.remove.add",bootstrap:function(){var t=this;$(this._purchaseUpsellA,this._parentEl()).unbind("click").click(function(e){e.preventDefault(),CartCheckoutImpl.createPurchase(t.item),$(this).closest(".row").remove(),CartUpsellModalImpl.updateUpsellModal(t.item.id)})}}),CartUpsellProductInCart={setup:function(t,e){var i=this;t.unbind("click").bind("click",function(t){t.preventDefault(),i.remove(this),i.run(e)})},setupRemove:function(t){var e=this;t.unbind("click").click(function(t){t.preventDefault(),e.remove(this)})},run:function(t){CartCheckoutImpl.createPurchase(t),CartUpsellModalImpl.updateUpsellModal(t.id)},remove:function(t){(e=$(t).closest("tr")).next(".cart-attn-required").remove(),e.remove();var e,i=$(t).attr("data-purchase-id");$(".purchase-tr-"+i).remove(),(e=$(t).closest("div.purchase-addon")).next(".cart-attn-required").remove(),e.remove()}},CartCheckoutTemplatesImpl={grabCartPurchaseItemTemplate:function(){return Utils.Template.grabTemplate("#cart-purchase-item-template")},setupCartPurchaseItemTemplate:function(t){var e=this.grabCartPurchaseItemTemplate();return $(e).attr("id","purchase-tr-"+t.id),t.slug?($(".purchase-name a",e).attr("href",t.slug).text(t.name),$(".purchase-name span",e).remove()):($(".purchase-name span",e).text(t.name),$(".purchase-name a",e).remove()),$(".purchase-price",e).text("$"+t.price),$(".purchase-quantity .quantity-text",e).text(t.quantity),$(".purchase-subtotal",e).text("$"+t.price*t.quantity),!0===t.upsell&&$("td.purchase-action a.remove",e).addClass("add").text("+"),e}},CartCheckoutImpl={_purchases:[],_products:[],_upsells:[],_totalText:".totals td.total",_discountText:".cart-discount",_subtotalText:".cart-subtotal",_purchasesTable:"#purchases-table",_purchasesMobile:"#purchases-mobile",_currencyChangeCallbacks:[],setupPurchase:function(t,i){var n=new e(t,i);this._purchases.push(n)},setupProduct:function(t,e){var n=new i(t,e);this._products.push(n)},setupUpsell:function(t,e){var i=new n(t,e);this._upsells.push(i)},createPurchase:function(t){var i,n,s=this;if(!1===(i=this._findPurchase(t.id))){var o=!1;0==this._purchases.length&&(o=!0),(n=new e(t,".purchase-tr-"+t.id)).addProductToCart(function(t){var e=Utils.Template.grabTemplateFromJson(t.purchase_html),i=Utils.Template.grabTemplateFromJson(t.purchase_html_mobile);e.appendTo($(s._purchasesTable+" tbody")),i.appendTo($(s._purchasesMobile)),n.bootstrap(),s._purchases.push(n),s.updateCartUIFromResponse(t),s.currencyChangeCart(s),o&&window.location.reload()})}else(n=i.purchase).increaseQuantity()},_findPurchase:function(t){var e,i;for(i=0;i768?$("html, body").animate({scrollTop:$("#purchases-table .cart-attn-required").offset().top-$("#header").height()},"fast"):$("html, body").animate({scrollTop:$("#purchases-mobile .cart-attn-required").offset().top-$("#header").height()}),window.location.href=$(this).attr("data-url")):CartUpsellModalImpl.hasUpsells()?(CartUpsellModalImpl.show(),this.unmakeLoading()):window.location.href=$(this).attr("data-url")})},bootstrapCurrencyChange:function(){var t=this;$(".cart-currency select[name=currency]").change(function(){t.saveCurrency($(this).val(),"currencyChangeCart")})},bootstrapCheckoutCurrencyChange:function(){var t=this;$(".cart-currency select[name=currency]").change(function(){t.saveCurrency($(this).val(),"currencyChangeCheckout")})},saveCurrency:function(t,e){var i=this;e=e;$.ajax("/cart/currency",{type:"post",headers:{"X-CSRF-TOKEN":getCsrfToken()},data:{currency:t},success:function(t){i[e](t,i),i.saveExchangeRate(t.rate),i.callCurrencyChangeCallbacks()},error:function(t,e,i){Log.error(i)}})},currencyChangeCart:function(t,e){var i=$(".cart-currency select[name=currency]").val();CartCheckoutUI.updateCurrencyMethod(i),$.each(t.purchases,function(t,e){!0===e.upsell?$("#upsell-item-table .upsell-item-"+e.product_id+" .upsell-item-price").html(CartCheckoutUI.formatCurrency(e.price)):($(".purchase-tr-"+e.product_id).find(".cart-item-price").html(CartCheckoutUI.formatCurrency(e.price)),$(".purchase-tr-"+e.product_id).find(".subtotal").html(CartCheckoutUI.formatCurrency(e.subtotal))),void 0!==e.upsell&&!0===e.upsell||CartCheckout.setupPurchase(e,".purchase-tr-"+e.product_id)}),CartCheckoutUI.updateSubtotal(t.subtotal),CartCheckoutUI.updateDiscount(t.discount),CartCheckoutUI.updateTotal(t.total)},currencyChangeCheckout:function(t,e){var i=$(".cart-currency select[name=currency]").val();CartCheckoutUI.updateCurrencyMethod(i),$.each(t.purchases,function(t,e){$("#purchase-item-"+e.product_id).find(".item-price").attr("data-price",e.price).html(CartCheckoutUI.formatCurrency(e.price))}),$(".checkout-total-inner .order-summary .checkout-subtotal").html(CartCheckoutUI.formatCurrency(t.subtotal)),$(".checkout-total-inner .order-summary .checkout-discount").html(CartCheckoutUI.formatCurrency(t.discount)),$(".checkout-total-inner .order-summary .checkout-final").html(CartCheckoutUI.formatCurrency(t.total)).attr("data-total",t.total),$("#checkout-form input[name=_amount]").val(t.total)},saveExchangeRate:function(t){CartCheckoutUI._exchangeRate=t},addCurrencyChangeCallback:function(t){-1==this._currencyChangeCallbacks.indexOf(t)&&this._currencyChangeCallbacks.push(t)},callCurrencyChangeCallbacks:function(){var t;for(t=0;t0},hasCartUpsells:function(){var t=$("#purchases-table .cart-attn-required").length,e=$("#purchases-mobile .cart-attn-required").length;return $(window).width()>768?t>0:e>0},bootstrap:function(){var t;for(t=0;t]+)>)/gi,"");return $(".upsell-item-name",e).text(i),"Event"==t.type_name&&t.slug?($(".upsell-item-name",e).attr("href","/"+t.slug),$(".upsell-item-name",e).attr("target","_blank")):"Attendee List"==t.type_name?$(".upsell-item-disclaimer",e).text("Attendee lists are emailed the day before the event to the purchaser only, and include Name, Company, and Title"):"MembershipPlan"==t.type_name?($(".upsell-item-name",e).html(""),$(".upsell-item-type",e).text(t.name),$(".upsell-item-disclaimer",e).text(t.description)):"MembershipPlanAddon"==t.type_name?($(".upsell-item-name",e).html(""),$(".upsell-item-type",e).text(t.name),$(".upsell-item-disclaimer",e).text(t.description)):"Event Addon"==t.type_name?($(".upsell-item-name",e).html(""),$(".upsell-item-type",e).text(t.name),$(".upsell-item-disclaimer",e).text(t.description)):"Charity Donation"==t.type_name&&(console.log(t),$(".upsell-item-disclaimer",e).html(t.description)),e},_grabUpsellItemTemplate:function(){return Utils.Template.grabTemplate("#upsell-item-template")},_grabUpsellNoItemsTemplate:function(){return Utils.Template.grabTemplate("#upsell-no-items-template")}},window.CartCheckout=CartCheckoutImpl,window.CartUpsellModal=CartUpsellModalImpl}(),function(){var t={_billingCountry:"select#billing_country",_VATNumberIsExempt:!1,_VATNumberIsValid:!0,_VATNumberCountry:"",_VATRate:0,_VATPercent:0,_VATTotal:0,_VATExchangeRate:1,_TotalWithVAT:0,bootstrapUI:function(){var t=this;$("input#billing_vat_id").change(function(){t.hideVATInfo();var e=$(this).val();t.validateVATNumber(e,function(t,e,i){CheckoutVAT.updateVATTax(!1)})}),CartCheckout.addCurrencyChangeCallback(function(){t._VATExchangeRate=+(CartCheckoutUI._exchangeRate||1),CheckoutVAT.updateVATTax(!1)})},clearVAT:function(){this._VATRate=0,this._VATNumberIsExempt=!1,this._VATPercent=0,this._VATTotal=0},showVATErrorMessage:function(t){$(".info-vat").hide(),window.checkout_validator.showErrors({billing_vat_id:t||"Invalid VAT Number"})},clearVATErrorMessage:function(){var t=$("form#checkout-form").validate();$("#checkout-form [name]").each(function(){var e=$(this).attr("name");"billing_vat_id"==e&&(console.log("Removing error for element: "+e),t.successList.push(this),t.successList.push($(this)),t.successList.push($(this).closest("inputText")),t.showErrors())}),t.resetForm(),t.reset(),$("#clearButton").click(function(){$("label.error").hide(),$(".error").removeClass("error")})},showVATExemptMessage:function(){$(".info-vat").hide(),$(".info-vat-exempt").show(),this._VATNumberIsValid=!0,this._VATNumberIsExempt=!0},showVATNonExemptMessage:function(){$(".info-vat").hide(),$(".info-vat-non-exempt").show(),this._VATNumberIsValid=!0,this._VATNumberIsExempt=!1},hideVATInfo:function(){$(".info-vat").hide()},showVATField:function(){$("section.vat").show()},hideVATField:function(){$("section.vat").hide()},validateVATNumber:function(t,e){var i=this,n=this.getBillingCountry(),s=["uk","gb"];if(""==t)return i._VATNumberIsExempt=!1,i._VATNumberIsValid=!0,i.clearVATErrorMessage(),i.updateVATNumberInfo(),void e(!0);Utils.Ajax.getAjax("/vat/op/validate",{vat_number:t},function(t){var o="valid"in t?+t.valid:0;i._VATNumberIsExempt=o&&-1==s.indexOf(n),i._VATNumberIsValid=o,i._VATNumberErrorMessage=t.message||"Invalid VAT Number",i.updateVATNumberInfo(),e(o)},function(t,n){i._VATNumberIsExempt=!1,i._VATNumberIsValid=!1,i._VATNumberErrorMessage=t||"Error while validating VAT Number",i.updateVATNumberInfo(),e(!1)})},hasVATNumber:function(){var t=$("input#billing_vat_id").val();return!!t&&t.length>0},updateVATNumberInfo:function(){var t=["uk","gb"],e=this.getBillingCountry();this._VATNumberIsExempt=this._VATNumberIsValid&&this.hasVATNumber()&&-1==t.indexOf(e),this._VATRate&&-1==t.indexOf(e)?(this.showVATField(),this.hideVATInfo(),this._VATNumberIsValid?this.hasVATNumber()&&this._VATNumberIsExempt&&this.showVATExemptMessage():this.hasVATNumber()&&!this._VATNumberIsValid&&this.showVATErrorMessage(this._VATNumberErrorMessage)):this.hideVATField()},getTotalBeforeVATTax:function(){var t=$("table.totals .checkout-final").attr("data-total");return parseFloat(t)},getVATRate:function(t,e){Utils.Ajax.getAjax("/vat/op/rate",{country_code:t},function(t){var i=+t.rate;e(i,i/100)},function(t,i){e(0,0)})},getBillingCountry:function(){return CheckoutUI.getBillingCountry()},updateVATTax:function(t){var e=this.getTotalBeforeVATTax(),i=this.getBillingCountry(),n=this;t||!this._VATRate?this.getVATRate(i,function(t,i){n._VATRate=t,n._VATPercent=i,n._VATTotal=e*i,n._TotalWithVAT=e+n._VATTotal,n.updateVATNumberInfo(),t>0?n.showVATTax(n._VATRate,n._VATTotal,e+n._VATTotal):n.hideVATTax(e)}):(n.updateVATNumberInfo(),this._VATTotal=e*n._VATPercent,this._TotalWithVAT=n._VATTotal+e,this._VATRate?this.showVATTax(this._VATRate,this._VATTotal,this._TotalWithVAT):this.hideVATTax(e))},showVATTax:function(t,e,i){this._VATNumberIsExempt?($(".vat-rate").text("Rate: 0% (VAT exempt)"),$(".vat-total").text(CartCheckoutUI.formatCurrency(0)),$(".vat-tax-only").show(),$(".vat-tax-container.vat-tax-only").css("backgroundColor","#90EE90"),$(".vat-tax-container.vat-tax-only").animate({backgroundColor:"transparent"},3e3),$(".checkout-final").text(CartCheckoutUI.formatCurrency(this.getTotalBeforeVATTax())),$("#checkout-form input[name=_amount]").val(this.getTotalBeforeVATTax()),this._VATNumberIsValid&&this.showVATExemptMessage()):($(".vat-rate").text("Rate: "+t+"%"),$(".vat-total").text(CartCheckoutUI.formatCurrency(e)),$(".vat-tax-only").show(),$(".vat-tax-container.vat-tax-only").css("backgroundColor","#90EE90"),$(".vat-tax-container.vat-tax-only").animate({backgroundColor:"transparent"},3e3),$(".checkout-final").text(CartCheckoutUI.formatCurrency(i)),$("#checkout-form input[name=_amount]").val(i),this._VATNumberIsValid&&this.hasVATNumber()&&this.showVATNonExemptMessage())},hideVATTax:function(t){t||this.getTotalBeforeVATTax();$(".vat-rate").text("Rate: 0%"),$(".vat-total").text("0.00"),$(".vat-tax-only").hide(),$(".checkout-final").text(CartCheckoutUI.formatCurrency(this.getTotalBeforeVATTax())),$("#checkout-form input[name=_amount]").val(this.getTotalBeforeVATTax()),this.hideVATInfo()},getTotalsAsURIParams:function(){var t,e={vat_rate:this._VATRate,vat_total:this._VATNumberIsExempt?0:this._VATTotal,vat_exempt:this._VATNumberIsExempt?1:0,vat_region:this.getBillingCountry(),grand_subtotal:this.getTotalBeforeVATTax(),grand_total:this._VATTotal+this.getTotalBeforeVATTax()},i="";for(t in e)i.length&&(i+="&"),i+=t,i+="=",i+=e[t];return i}};window.CheckoutVAT=t}(),function(){var t={_itemPromo:".promo-item",_formPromo:"form#postpromo",_tablePromo:".promos_applied table",_removePromoA:"a.remove",_validator:null,_setupPromoValidation:function(){var t=this;return this._validator=$(this._formPromo).validate({rules:{promo:{promo_code:{required:!0,minlength:4,maxlength:20}}},errorClass:"validationError",highlight:function(t,e,i){$(t).parent("div").addClass(e),$(".error",$(t).parent("div")).show()},unhighlight:function(t,e,i){$(t).parent("div").removeClass(e),$(".error",$(t).parent("div")).hide()},errorPlacement:function(t,e){$(".formError",$(e).parent("div")).text($(t).text())},submitHandler:function(e){var i=$('input[name="promo_code"]',e).val();t.postPromo(i)}}),this._validator},_getPromoValidator:function(){return this._validator||this._setupPromoValidation()},_getPromoTable:function(){return $(this._tablePromo)},_getPromoForm:function(){return $(this._formPromo)},init:function(){this._setupPromoValidation()},resetPromoForm:function(){$("input[name]",this._getPromoForm()).val(""),$(".error",this._getPromoForm()).hide(),$(".validationError",this._getPromoForm()).removeClass("validationError"),this._getPromoValidator().resetForm()},_showPromo:function(t){var e=Utils.Template.grabTemplateFromJson(t.promo_template);this.bootstrapPromo(e,t.promo_code),this._getPromoTable().append(e),CartCheckoutUI.updateTotal(t.total),CartCheckoutUI.updateSubtotal(t.subtotal),CartCheckoutUI.showDiscounts(),CartCheckoutUI.showSubtotal()},postPromo:function(t){var e=this;$.ajax("/cart/promo",{type:"post",headers:{"X-CSRF-TOKEN":getCsrfToken()},data:{promo:t},success:function(t){e._showPromo(t),e.resetPromoForm()},error:function(t,i,n){e._getPromoValidator().showErrors({promo_code:t.responseText})}})},removePromo:function(t){var e=this;$.ajax("/cart/promo/delete",{type:"post",headers:{"X-CSRF-TOKEN":getCsrfToken()},success:function(t){$(e._tablePromo+" tr").remove(),CartCheckoutUI.updateTotal(t.total),CartCheckoutUI.updateSubtotal(t.subtotal),CartCheckoutUI.hideDiscounts(),CartCheckoutUI.hideSubtotal()}})},bootstrapPromo:function(t,e){var i=this;$(this._removePromoA,t).attr("data-promo-code",e),$(this._removePromoA,t).unbind("click").click(function(t){i.removePromo($(this).attr("data-promo-code"))})},bootstrapPreloadedPromoItems:function(){var t=this;$(this._itemPromo).each(function(e,i){var n=$(i),s=$(t._removePromoA,n).attr("data-promo-code");t.bootstrapPromo(n,s)})}};window.CartPromo=t}(),function(){var t=null,e=!0,i=function(){return $(".cart-items-list")},n=function(){return $(".cart-items-list").not(".cart-no-show")};window.cart_slideOpen=function(e){clearTimeout(t);var s=$("#header").height();i().css("top",s),$(window).width()>=480&&n().slideDown(100,function(){e&&(t=setTimeout(function(){i().slideUp(100)},e))})},window.cart_disableDropDown=function(){e=!1,i().hide(),t&&(clearTimeout(t),t=null)},window.cart_initDropDown=function(){isMobileBrowser()?$(".cart-new").click(function(){window.location.href="/cart"}):"ontouchstart"in window?($(".cart-new, .cart-items-list").on("touchstart",a),$(".cart-items-list, .cart-items-list *").on("touchstart",r),$(".cart-hide").on("touchstart",l)):($("#cart-icon-desktop").hover(s,o),$(".cart-new").hover(s,o),$(".cart-items-list").hover(r,o))};var s=function(){e&&(clearTimeout(t),n().show())},o=function(){clearTimeout(t),t=setTimeout(function(){i().hide()},100)},r=function(){e&&clearTimeout(t)},a=function(){if(e)if(i().is(":visible"))l();else{clearTimeout(t);var s=$("#header").height();i().css("top",s),n().show(),$(".cart-items-list.cart-auto-hide").delay(2e3).hide(0),$(".cart-hide").show()}},l=function(){e&&(clearTimeout(t),t=setTimeout(function(){i().hide(),$(".cart-hide").hide()},10))};$(function(){cart_initDropDown()})}(),function(){var t={_oneTimePayment:".one-time-payment",_passwordFields:"#password-fields",_passwordSecret:"input#password-secret",_passwordText:"input#password-text",_showPassword:"input#show-password",_createAccount:"#create-account",_checkoutGuest:"#checkout-guest",_showOneTimePayment:".show-one-time-payment",_hideOneTimePayment:".hide-one-time-payment",_ccList:"section.card-info",_firstName:"input#first_name",_lastName:"input#last_name",_email:"input#email",_billingCountry:"select#billing_country",_billingCity:"input#billing_city",_billingStateSelect:"select#billing_state",_billingStateInput:"input#billing_state_free_form",_ticketFirstName:"input.ticket-first-name",_ticketLastName:"input.ticket-last-name",_ticketEmail:"input.ticket-email",_firstTicketFirstName:".tickets .ticket:first input.ticket-first-name",_firstTicketLastName:".tickets .ticket:first input.ticket-last-name",_firstTicketEmail:".tickets .ticket:first input.ticket-email",fireCreateAccount:function(){$(this._createAccount).hide(),$(this._passwordFields).css("display","inline")},fireCheckoutGuest:function(){$(this._passwordFields).hide(),$(this._createAccount).css("display","inline")},showOneTimePayment:function(){CheckoutVAT.clearVAT(),$(this._oneTimePayment).show(),CheckoutVAT.updateVATTax(!0)},hideOneTimePayment:function(){CheckoutVAT.clearVAT(),$(this._oneTimePayment).hide(),CheckoutVAT.updateVATTax(!0)},hideCCList:function(){$(this._ccList).hide()},showPasswordSecret:function(){var t=this;$(this._passwordSecret).show(),$(this._passwordText).hide().unbind("change"),$(this._passwordSecret).unbind("change").change(function(){$(t._passwordText).val($(this).val()),t.passwordsChanged()})},showPasswordText:function(){var t=this;$(this._passwordText).show(),$(this._passwordSecret).hide().unbind("change"),$(this._passwordText).unbind("change").change(function(){$(t._passwordSecret).val($(this).val()),t.passwordsChanged()})},passwordsChanged:function(){var t=$(this._passwordText).val();""!=t&&t.length?$(".show-only-if-password-set").show():$(".show-only-if-password-set").hide()},autoPopulateTickets:function(){var t=this;$(this._firstName).unbind("change").change(function(){$(t._firstTicketFirstName+'[value=""]').val($(this).val())}),$(this._lastName).unbind("change").change(function(){$(t._firstTicketLastName+'[value=""]').val($(this).val())}),$(this._email).unbind("change").change(function(){$(t._firstTicketEmail+'[value=""]').val($(this).val())}),$(this._firstName).change(),$(this._lastName).change(),$(this._email).change()},bootstrapUI:function(){var t=this;$(this._createAccount).click(function(){t.fireCreateAccount()}),$(this._checkoutGuest).click(function(){t.fireCheckoutGuest()}),$(this._showOneTimePayment).unbind("click").click(function(e){t.showOneTimePayment()}),$(this._hideOneTimePayment).unbind("click").click(function(e){t.hideOneTimePayment()}),$(this._showPassword).unbind("change").change(function(){$(this).is(":checked")?t.showPasswordText():t.showPasswordSecret()}),this.autoPopulateTickets(),$(this._showPassword).change(),$(this._billingCountry).change(function(){var e=t.getBillingCountry();["us","ca","gb","ie"].indexOf(e)>=0?($(t._billingStateSelect).parent("div").parent("div").show(),$(t._billingCity).parent("div").parent("div").removeClass("col-lg-8").addClass("col-lg-4"),$(t._billingCity).parent("div").parent("div").removeClass("col-md-8").addClass("col-md-4")):($(t._billingStateSelect).parent("div").parent("div").hide(),$(t._billingCity).parent("div").parent("div").removeClass("col-lg-4").addClass("col-lg-8"),$(t._billingCity).parent("div").parent("div").removeClass("col-md-4").addClass("col-md-8")),CheckoutVAT.updateVATTax(!0)}),$(this._billingCountry).change()},getBillingCountry:function(){var t,e=$(this._hideOneTimePayment+":checked");return e.length?t=e.data("cc-country").toLowerCase():(t=$("#billing_country").val())?t.toLowerCase():"us"}};window.CheckoutUI=t}(),function(){var t={_cc:[],_editCCModal:"#edit-cc-modal",_deleteCCModal:"#delete-cc-modal",_editCCModalForm:"#edit-cc-modal-form",_editCCButton:".show-edit-cc-modal",_addCCButton:".show-add-cc-modal",_deleteCCButton:".show-delete-cc-modal",init:function(){},fetchCreditCardsFromServer:function(){var t=this;this._post("/cart/user/cc",{},function(e){t._loadCreditCards(e.cards),$(function(){t._displayCreditCards(e.cards_html)})},function(){$(function(){CheckoutUI.showOneTimePayment()})})},fetchCCInfo:function(t,e){var i="/cart/user/cc/"+t;this._post(i,null,function(t){return 1==t.error?Notify.error("Error Looking up Credit Card. Please try again."):e&&e(t),!1})},postEditCC:function(){var t=this,e=Utils.Form.serialize("#edit-cc-modal-form");this._post("/cart/cc/update",e,function(e){e.error||(t.hideEditCCModal(),Notify.success(e.message))})},postDeleteCC:function(t){var e=this,i=Utils.Form.serialize("#delete-cc-modal-form");this._post("/cart/cc/delete",i,function(i){i.error||(e.hideDeleteCCModal(),Notify.success(i.message),$("tr.cc-"+t).fadeOut(400,function(){$(this).remove(),0==$("tr.cc-item").length&&(CheckoutUI.hideCCList(),CheckoutUI.showOneTimePayment())}))})},showEditCCModal:function(t){var e=this;this.fetchCCInfo(t,function(t){$.each(t,function(t,e){$('#edit-cc-modal-form input[name="'+t+'"]').val(e),$('#edit-cc-modal-form select[name="'+t+'"]').val(e)}),$('#edit-cc-modal-form input[name="token"]').val(t.token),$(e._editCCModal).modal({show:!0})})},showDeleteCCModal:function(t){var e=this;$('#delete-cc-modal-form input[name="token"]').val(t),$("#delete-cc-modal-form").unbind("submit").submit(function(i){i.preventDefault(),e.postDeleteCC(t)}),$(this._deleteCCModal).modal({show:!0})},hideEditCCModal:function(){$(this._editCCModal).modal("hide")},hideDeleteCCModal:function(){$(this._deleteCCModal).modal("hide")},setupEditCCModalValidation:function(){var t=this;Utils.Validation.getOrSetupFormValidation(this._editCCModalForm,{},function(e){t.postEditCC()})},_loadCreditCards:function(t){var e;if(this._cc.length=0,void 0===t);else for(e=0;e0?CheckoutUI.hideOneTimePayment():($("#ccs-list input.show-one-time-payment").attr("checked","checked"),CheckoutUI.showOneTimePayment()),this._bootstrapCreditCards()}else CheckoutUI.showOneTimePayment()},_bootstrapCreditCards:function(){$(".cc-item").each(function(t,e){$(".show-edit-cc-modal",$(e)).unbind("click").click(function(t){t.preventDefault()}),$(".show-delete-cc-modal",$(e)).unbind("click").click(function(t){t.preventDefault()}),$(".hide-one-time-payment",$(e)).unbind("click").click(function(t){CheckoutUI.hideOneTimePayment()})}),$(this._editCCButton).unbind("click").click(function(t){t.preventDefault(),CheckoutCC.showEditCCModal($(this).attr("data-cc-token"))}),$(this._deleteCCButton).unbind("click").click(function(t){t.preventDefault(),CheckoutCC.showDeleteCCModal($(this).attr("data-cc-token"))}),this.setupEditCCModalValidation()},_post:function(t,e,i,n){$.ajax(t,{type:"post",headers:{"X-CSRF-TOKEN":$("body").attr("data-csrf")},data:e,success:function(t){t.error?(Log.error(t.message),Log.error(t.trace),n&&n()):i&&i(t)},error:function(t,e,i){Log.error(t.responseText),Log.error(i),n&&n()}})}};window.CheckoutCC=t}(),function(){var t={assignValidationMessages:function(t,e){this.showErrors(t,e)},showErrors:function(t,e){this.hideErrors();var i=0;if(!t.formError){if(t.redirect)return void(window.location.href=t.redirect);t.formError=[{id:"payment-info",message:t.message||"An unexpected error has occurred. Please try again, or contact Bisnow customer service for assistance."}]}$.each(t.formError,function(t,n){n.wrapper||(n.wrapper="div");var s=!1;n.field?s="#"+e+" input[name="+n.field+"]":n.input?(s="#"+e+' input[name="'+n.input+'"]',"checkout-form"==e&&(s="#"+e+" #"+n.input)):n.id&&(s="payment-info"==n.id?"."+n.id+".manualError":"#"+n.id),s&&s.length&&($(s).parent(".inputText").addClass("validationError"),$(s).parent(".inputSelect").addClass("validationError"),n.message&&($(s).after("<"+n.wrapper+' class="formError '+n.class+'">'+n.message+""+n.wrapper+">"),$(s).show()),$(s).each(function(t,e){var n=$(e).offset().top-100;(!i||n