function brochureRecaptchaValidateForm(n,t){var i=$("#"+t.formId);i.size()<1||(n.preventDefault(),SetOnlineMailOptionIfNeeded(),function(){for(var t=$(i).find(".viking-form-control--brochure"),r=0,n=0;n<t.length;n++)$(t[n]).find('input[type="checkbox"]').prop("checked")&&r++;r||$(i).find('.viking-form-control--brochure input[data-default="true"]').prop("checked",!0)}(),brochureVM.Mail().toString().toLowerCase()==="true"?(ClearOptionalFieldValidation(),brochureVM.ShowOtherFields()&&ClearStateDDLValidation()):(ClearAddressValidation(),ClearStateDDLValidation(),ClearCountryDDLValidation()),$("#MailInquiryMessage").val().indexOf("UK")<0?($(".phone .form-control-placeholder span").text("(Optional)"),$("#Phone").attr("aria-label",phoneAriaLabel),ClearPhoneValidation()):($(".phone .form-control-placeholder span").text(""),$("#Phone").attr("aria-label","Enter Phone Number - Required")),$("#MailInquiryMessage").val().indexOf("AU")>=0&&($(".linked_brochure").each(function(){$(this).rules("add",{checkbrochure:!0})}),$("#linked_brochures_error").removeClass("field-validation-error"),$("#linked_brochures_error").addClass("field-validation-valid")),i.valid()&&(typeof t.widgetid!="undefined"&&t.widgetid!=null?grecaptcha.execute(grecappublickey,{action:VRCCaptcha.codify(i.attr("id"))}).then(function(n){i.find(".g-recaptcha-response").val(n);brochureRecaptchaSubmitForm(t)}):brochureRecaptchaSubmitForm(t)))}function brochureRecaptchaSubmitForm(n){var t=$("#"+n.formId),u,e,o;if(!(t.size()<1)){$("#form_error_detail").hide();var i="/MagForm/SaveOrderBrochure",f=window.location.pathname.toLowerCase(),r="";f.startsWith("/oceans")&&(r="/oceans");f.startsWith("/expeditions")&&(r="/expeditions");i=r+i;$(t)[0].hasAttribute("data-formtype")&&(u=$(t)[0].getAttribute("data-formtype"),u==="cookbook-social"&&(i=r+"/Forms/SaveCookbookSocial"),u==="cookbook"&&(i=r+"/Forms/SaveCookbookForm"));e=$("#vcbrochuresubmit");$(t).valid()?(DisableElement(e),o=$(t),vrcPostSerializedDataAjax(i,FormSubmissionCallback,o)):$(t).validate().errorList[0].element.focus()}}function FormSubmissionCallback(n){var t=$("#vcbrochuresubmit");EnableElement(t);n.errors==null?(brochureVM.OnlineThankYou(n.OnlineThankYou),brochureVM.MailThankYou(n.MailThankYou),brochureVM.ResponseIds(n.ResponseIds),brochureVM.Postal(n.Postal),brochureVM.City(n.City),brochureVM.EmailAddress(n.EmailAddress),window.setTimeout(brochureVM.goToThankYou,10)):(console.log(n),$("#form_error_detail").html("There was an error processing this form. Please try again later."),$("#form_error_detail").show())}function GetFormData(){var t=$("#brochure-form").serializeArray(),n={};return $(t).each(function(t,i){i.value!=="true"&&i.value!=="false"&&(n[i.name]=i.value)}),n}function ClearAddressValidation(){$(".address-inputs .field-validation-error").addClass("field-validation-valid");$(".address-inputs .field-validation-error").html("");$(".address-inputs .field-validation-error").removeClass("field-validation-error")}function ClearOptionalFieldValidation(){$("#State").rules("add",{required:!0});$(".optFields .field-validation-error").addClass("field-validation-valid");$(".optFields .field-validation-error").html("");$(".optFields .field-validation-error").removeClass("field-validation-error")}function ClearStateDDLValidation(){$("#State").length<=0||($("#State").rules("remove"),$('span[data-valmsg-for="State"]').addClass("field-validation-valid"),$('span[data-valmsg-for="State"]').html(""),$('span[data-valmsg-for="State"]').removeClass("field-validation-error"))}function ClearCountryDDLValidation(){$("#Country").rules("remove");$('span[data-valmsg-for="Country"]').addClass("field-validation-valid");$('span[data-valmsg-for="Country"]').html("");$('span[data-valmsg-for="Country"]').removeClass("field-validation-error")}function ClearPhoneValidation(){isCoBrandedForLocalization()||$("#Phone").length<=0||($("#Phone").rules("remove"),$('span[data-valmsg-for="Phone"]').addClass("field-validation-valid"),$('span[data-valmsg-for="Phone"]').html(""),$('span[data-valmsg-for="Phone"]').removeClass("field-validation-error"))}function ResetPhoneValidation(){$("#Phone").removeClass("input-validation-error");$('span[data-valmsg-for="Phone"]').addClass("field-validation-valid");$('span[data-valmsg-for="Phone"]').html("");$('span[data-valmsg-for="Phone"]').removeClass("field-validation-error")}function ResetOptIn(){brochureVM.OptInMail!=undefined&&brochureVM.OptInMail(!1)}function SetOnlineMailOptionIfNeeded(){brochureVM.Online!=undefined&&brochureVM.Mail!=undefined&&(brochureVM.Online()||brochureVM.Mail()||brochureVM.Online(!0),!brochureVM.Mail()&&$(".checkbox-inline input[id=Mail]").prop("checked")&&brochureVM.Mail(!0))}function UpdateLinkedBrochures(){$("#MailInquiryMessage").val().indexOf("AU")>=0&&(brochureVM.Online()&&!brochureVM.Mail()?($(".linked-brochures-section").hide(),$(".linked_brochure").each(function(){$(this).prop("checked",!0)})):$(".linked-brochures-section").show())}function ShowBusyModal(){$("#bsModal .modal-dialog").addClass("modal-sm");$("#bsModal .modal-dialog").removeClass("modal-lg");$("#bsModal .modal-dialog").html('<div class="modal-content"><div class="modal-body"><div class="container-fluid"><div class="row"><div class="col-md-offset-4 col-md-4" style="text-align:center"><img alt="" style="margin-top:30px" src="/content/images/busy.gif"/><\/div><div class="col-md-12" style="text-align:center"><div class="modal-processing__text">Please wait...<\/div><\/div><\/div><\/div><\/div><\/div>');adjustHeader();$("#bsModal").modal("show")}function isCoBrandedForLocalization(){return $("#Phone").closest(".form-group").data("is-cobranded")==="True"}(function(n){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?n(require("knockout"),exports):"function"==typeof define&&define.amd?define(["knockout","exports"],n):n(ko,ko.mapping={})})(function(n,t){function v(n,i){var o;for(var r in i)if(i.hasOwnProperty(r)&&i[r])if(o=t.getType(n[r]),r&&n[r]&&"array"!==o&&"string"!==o)v(n[r],i[r]);else if("array"===t.getType(n[r])&&"array"===t.getType(i[r])){o=n;for(var h=r,f=n[r],e=i[r],s={},u=f.length-1;0<=u;--u)s[f[u]]=f[u];for(u=e.length-1;0<=u;--u)s[e[u]]=e[u];f=[];e=void 0;for(e in s)f.push(s[e]);o[h]=f}else n[r]=i[r]}function e(n,t){var i={};return v(i,n),v(i,t),i}function y(n,t){for(var f,i=e({},n),o=nt.length-1;0<=o;o--)f=nt[o],i[f]&&(i[""]instanceof Object||(i[""]={}),i[""][f]=i[f],delete i[f]);return t&&(i.ignore=u(t.ignore,i.ignore),i.include=u(t.include,i.include),i.copy=u(t.copy,i.copy),i.observe=u(t.observe,i.observe)),i.ignore=u(i.ignore,r.ignore),i.include=u(i.include,r.include),i.copy=u(i.copy,r.copy),i.observe=u(i.observe,r.observe),i.mappedProperties=i.mappedProperties||{},i.copiedProperties=i.copiedProperties||{},i}function u(i,r){return"array"!==t.getType(i)&&(i="undefined"===t.getType(i)?[]:[i]),"array"!==t.getType(r)&&(r="undefined"===t.getType(r)?[]:[r]),n.utils.arrayGetDistinctValues(i.concat(r))}function o(r,u,a,v,y,p,b){var at="array"===t.getType(n.utils.unwrapObservable(u)),nt,it,rt,et,ht;p=p||"";t.isMapped(r)&&(nt=n.utils.unwrapObservable(r)[i],a=e(nt,a));var vt=b||y,ct=function(){return a[v]&&a[v].create instanceof Function},yt=function(t){var i=c,r=n.dependentObservable;return n.dependentObservable=function(t,r,u){var o,f,e;return u=u||{},t&&"object"==typeof t&&(u=t),e=u.deferEvaluation,o=!1,u.deferEvaluation=!0,t=new h(t,r,u),e||(f=t,e=n.dependentObservable,n.dependentObservable=h,t=n.isWriteableObservable(f),n.dependentObservable=e,t=h({read:function(){return o||(n.utils.arrayRemoveItem(i,f),o=!0),f.apply(f,arguments)},write:t&&function(n){return f(n)},deferEvaluation:!0}),i.push(t)),t},n.dependentObservable.fn=h.fn,n.computed=n.dependentObservable,t=n.utils.unwrapObservable(y)instanceof Array?a[v].create({data:t||u,parent:vt,skip:tt}):a[v].create({data:t||u,parent:vt}),n.dependentObservable=r,n.computed=n.dependentObservable,t},ft=function(){return a[v]&&a[v].update instanceof Function},ot=function(t,i){var r={data:i||u,parent:vt,target:n.utils.unwrapObservable(t)};return n.isWriteableObservable(t)&&(r.observable=t),a[v].update(r)};if(b=l.get(u))return b;if(v=v||"",at){var at=[],ut=!1,g=function(n){return n};a[v]&&a[v].key&&(g=a[v].key,ut=!0);n.isObservable(r)||(r=n.observableArray([]),r.mappedRemove=function(n){var t="function"==typeof n?n:function(t){return t===g(n)};return r.remove(function(n){return t(g(n))})},r.mappedRemoveAll=function(t){var i=f(t,g);return r.remove(function(t){return-1!=n.utils.arrayIndexOf(i,g(t))})},r.mappedDestroy=function(n){var t="function"==typeof n?n:function(t){return t===g(n)};return r.destroy(function(n){return t(g(n))})},r.mappedDestroyAll=function(t){var i=f(t,g);return r.destroy(function(t){return-1!=n.utils.arrayIndexOf(i,g(t))})},r.mappedIndexOf=function(t){var i=f(r(),g);return t=g(t),n.utils.arrayIndexOf(i,t)},r.mappedCreate=function(t){if(-1!==r.mappedIndexOf(t))throw Error("There already is an object with the key that you specified.");var i=ct()?yt(t):t;return ft()&&(t=ot(i,t),n.isWriteableObservable(i)?i(t):i=t),r.push(i),i});b=f(n.utils.unwrapObservable(r),g).sort();nt=f(u,g);ut&&nt.sort();ut=n.utils.compareArrays(b,nt);b={};for(var st=n.utils.unwrapObservable(u),pt={},wt=!0,nt=0,lt=st.length;nt<lt;nt++){if(it=g(st[nt]),void 0===it||it instanceof Object){wt=!1;break}pt[it]=st[nt]}var st=[],bt=0,nt=0;for(lt=ut.length;nt<lt;nt++){it=ut[nt];et=p+"["+nt+"]";switch(it.status){case"added":ht=wt?pt[it.value]:s(n.utils.unwrapObservable(u),it.value,g);rt=o(void 0,ht,a,v,r,et,y);ct()||(rt=n.utils.unwrapObservable(rt));et=w(n.utils.unwrapObservable(u),ht,b);rt===tt?bt++:st[et-bt]=rt;b[et]=!0;break;case"retained":ht=wt?pt[it.value]:s(n.utils.unwrapObservable(u),it.value,g);rt=s(r,it.value,g);o(rt,ht,a,v,r,et,y);et=w(n.utils.unwrapObservable(u),ht,b);st[et]=rt;b[et]=!0;break;case"deleted":rt=s(r,it.value,g)}at.push({event:it.status,item:rt})}r(st);a[v]&&a[v].arrayChanged&&n.utils.arrayForEach(at,function(n){a[v].arrayChanged(n.event,n.item)})}else if(d(u)){if(r=n.utils.unwrapObservable(r),!r){if(ct())return ut=yt(),ft()&&(ut=ot(ut)),ut;if(ft())return ot(ut);r={}}if(ft()&&(r=ot(r)),l.save(u,r),ft())return r;k(u,function(t){var i=p.length?p+"."+t:t;if(-1==n.utils.arrayIndexOf(a.ignore,i))if(-1!=n.utils.arrayIndexOf(a.copy,i))r[t]=u[t];else if("object"!=typeof u[t]&&"array"!=typeof u[t]&&0<a.observe.length&&-1==n.utils.arrayIndexOf(a.observe,i))r[t]=u[t],a.copiedProperties[i]=!0;else{var f=l.get(u[t]),e=o(r[t],u[t],a,t,r,i,r),f=f||e;0<a.observe.length&&-1==n.utils.arrayIndexOf(a.observe,i)?(r[t]=f(),a.copiedProperties[i]=!0):(n.isWriteableObservable(r[t])?r[t](n.utils.unwrapObservable(f)):(f=void 0===r[t]?f:n.utils.unwrapObservable(f),r[t]=f),a.mappedProperties[i]=!0)}})}else switch(t.getType(u)){case"function":ft()?n.isWriteableObservable(u)?(u(ot(u)),r=u):r=ot(u):r=u;break;default:if(n.isWriteableObservable(r))return rt=ft()?ot(r):n.utils.unwrapObservable(u),r(rt),rt;ct()||ft();r=ct()?yt():n.observable(n.utils.unwrapObservable(u));ft()&&r(ot(r))}return r}function w(n,t,i){for(var r=0,u=n.length;r<u;r++)if(!0!==i[r]&&n[r]===t)return r;return null}function b(i,r){var u;return r&&(u=r(i)),"undefined"===t.getType(u)&&(u=i),n.utils.unwrapObservable(u)}function s(t,i,r){var u,e,f;for(t=n.utils.unwrapObservable(t),u=0,e=t.length;u<e;u++)if(f=t[u],b(f,r)===i)return f;throw Error("When calling ko.update*, the key '"+i+"' was not found!");}function f(t,i){return n.utils.arrayMap(n.utils.unwrapObservable(t),function(n){return i?b(n,i):n})}function k(n,i){if("array"===t.getType(n))for(var r=0;r<n.length;r++)i(r);else for(r in n)i(r)}function d(n){var i=t.getType(n);return("object"===i||"array"===i)&&null!==n}function it(){var t=[],i=[];this.save=function(r,u){var f=n.utils.arrayIndexOf(t,r);0<=f?i[f]=u:(t.push(r),i.push(u))};this.get=function(r){return r=n.utils.arrayIndexOf(t,r),0<=r?i[r]:void 0}}function g(){var n={},t=function(t){var i;try{i=t}catch(r){i="$$$"}return t=n[i],void 0===t&&(t=new it,n[i]=t),t};this.save=function(n,i){t(n).save(n,i)};this.get=function(n){return t(n).get(n)}}var i="__ko_mapping__",h=n.dependentObservable,p=0,c,l,nt=["create","update","key","arrayChanged"],tt={},a={include:["_destroy"],ignore:[],copy:[],observe:[]},r=a;t.isMapped=function(t){return(t=n.utils.unwrapObservable(t))&&t[i]};t.fromJS=function(n){var t,r,u,f;if(0==arguments.length)throw Error("When calling ko.fromJS, pass the object you want to convert.");try{if(p++||(c=[],l=new g),2==arguments.length&&(arguments[1][i]?r=arguments[1]:t=arguments[1]),3==arguments.length&&(t=arguments[1],r=arguments[2]),r&&(t=e(t,r[i])),t=y(t),u=o(r,n,t),r&&(u=r),!--p)for(;c.length;)f=c.pop(),f&&f();return u[i]=e(u[i],t),u}catch(s){throw p=0,s;}};t.fromJSON=function(i){var r=n.utils.parseJson(i);return arguments[0]=r,t.fromJS.apply(this,arguments)};t.updateFromJS=function(){throw Error("ko.mapping.updateFromJS, use ko.mapping.fromJS instead. Please note that the order of parameters is different!");};t.updateFromJSON=function(){throw Error("ko.mapping.updateFromJSON, use ko.mapping.fromJSON instead. Please note that the order of parameters is different!");};t.toJS=function(u,f){if(r||t.resetDefaultOptions(),0==arguments.length)throw Error("When calling ko.mapping.toJS, pass the object you want to convert.");if("array"!==t.getType(r.ignore))throw Error("ko.mapping.defaultOptions().ignore should be an array.");if("array"!==t.getType(r.include))throw Error("ko.mapping.defaultOptions().include should be an array.");if("array"!==t.getType(r.copy))throw Error("ko.mapping.defaultOptions().copy should be an array.");return f=y(f,u[i]),t.visitModel(u,function(t){return n.utils.unwrapObservable(t)},f)};t.toJSON=function(i,r){var u=t.toJS(i,r);return n.utils.stringifyJson(u)};t.defaultOptions=function(){if(0<arguments.length)r=arguments[0];else return r};t.resetDefaultOptions=function(){r={include:a.include.slice(0),ignore:a.ignore.slice(0),copy:a.copy.slice(0)}};t.getType=function(n){if(n&&"object"==typeof n){if(n.constructor===Date)return"date";if(n.constructor===Array)return"array"}return typeof n};t.visitModel=function(r,u,f){var o,e,s;if(f=f||{},f.visitedObjects=f.visitedObjects||new g,e=n.utils.unwrapObservable(r),d(e))f=y(f,e[i]),u(r,f.parentName),o="array"===t.getType(e)?[]:{};else return u(r,f.parentName);return f.visitedObjects.save(r,o),s=f.parentName,k(e,function(r){if(!(f.ignore&&-1!=n.utils.arrayIndexOf(f.ignore,r))){var h=e[r],c=f,l=s||"";if("array"===t.getType(e)?s&&(l+="["+r+"]"):(s&&(l+="."),l+=r),c.parentName=l,!(-1===n.utils.arrayIndexOf(f.copy,r)&&-1===n.utils.arrayIndexOf(f.include,r)&&e[i]&&e[i].mappedProperties&&!e[i].mappedProperties[r]&&e[i].copiedProperties&&!e[i].copiedProperties[r]&&"array"!==t.getType(e)))switch(t.getType(n.utils.unwrapObservable(h))){case"object":case"array":case"undefined":c=f.visitedObjects.get(h);o[r]="undefined"!==t.getType(c)?c:t.visitModel(h,u,f);break;default:o[r]=u(h,f.parentName)}}}),o}});$(function(){var n={},t;n.divId="vrcbrochurerecaptcha";n.formId="brochure-form";n.validationFormBindCallback=brochureRecaptchaValidateForm;n.submitCallback=brochureRecaptchaSubmitForm;VRCCaptcha.render(n);$(window).bind("pageshow",function(n){var t=$("#brochure-form");n.originalEvent.persisted&&($(t).trigger("reset"),brochureVM.Mail(!0));$.each($(".form-group input, .form-group textarea"),function(){$(this).val().length?$(this).next(".form-control-placeholder").addClass("form-label"):$(this).next(".form-control-placeholder").removeClass("form-label");$(this).next(".form-control-placeholder").show()});$(t).css("visibility","visible")});$(window).bind("pagehide",function(){var n=$("#brochure-form");$.each($(".form-group input, .form-group textarea"),function(){$(this).next(".form-control-placeholder").hide()});$(n).css("visibility","hidden");$(n).trigger("reset")});window.brochureVM=ko.mapping.fromJS(GetFormData());brochureVM.Online=ko.observable(!0);brochureVM.Mail=ko.observable(!0);brochureVM.subscriptions=[];brochureVM.isUndefinedNullOrEmpty=function(n){return typeof n=="undefined"||n===null};$("#MailInquiryMessage").val().indexOf("UK")<0?($(".phone .form-control-placeholder span").text("(Optional)"),$("#Phone").attr("aria-label",phoneAriaLabel),$(".phone").addClass("address-inputs"),ClearPhoneValidation()):($(".phone .form-control-placeholder span").text(""),$("#Phone").attr("aria-label","Enter Phone Number - Required"));brochureVM.ResponseIds=ko.observable();brochureVM.FormTypeReason=ko.computed(function(){var n="",t="";return brochureVM.Online()&&(n=n+brochureVM.DownloadInquiryType(),t=t+brochureVM.DownloadInquiryReason()),brochureVM.Mail()&&(n.length>0&&(n=n+",",t=t+","),n=n+brochureVM.MailInquiryType(),t=t+brochureVM.MailInquiryReason()),n+"~"+t});brochureVM.FormReason=ko.computed(function(){var n="";return brochureVM.Online()&&(n=n+brochureVM.DownloadInquiryReason()),brochureVM.Mail()&&(n.length>0&&(n=n+","),n=n+brochureVM.MailInquiryReason()),n});brochureVM.StateList=ko.observableArray([{Code:"",Desc:""}]);brochureVM.Mail(!0);brochureVM.Online(!0);brochureVM.UpdateStateArray=function(n){n!=null?vrcSendAjax("/MagForm/GetProvinceStatesByCountryCode",brochureVM.ParseStateData,"{ 'countryCode': '"+n+"' }"):vrcSendAjax("/MagForm/GetProvinceStatesByCountryCode",brochureVM.ParseStateData,"{ 'countryCode': '"+brochureVM.Country()+"' }")};brochureVM.ParseStateData=function(n){ko.mapping.fromJS(n,{},brochureVM.StateList)};brochureVM.Country()!="Other"?(brochureVM.ShowStateList=ko.observable(!0),brochureVM.ShowOtherFields=ko.observable(!1)):(brochureVM.ShowStateList=ko.observable(!1),brochureVM.ShowOtherFields=ko.observable(!0));brochureVM.Country.subscribe(function(n){n!=null&&(brochureVM.Country()!="Other"?(brochureVM.UpdateStateArray(n),brochureVM.ShowStateList(!0),brochureVM.ShowOtherFields(!1),ClearOptionalFieldValidation()):(brochureVM.ShowStateList(!1),brochureVM.ShowOtherFields(!0),ClearStateDDLValidation()))});brochureVM.Mail.subscribe(function(n){$(".order-brochure .address-inputs").toggle(n);n?ClearOptionalFieldValidation():(ClearAddressValidation(),ClearStateDDLValidation(),ClearCountryDDLValidation(),ResetOptIn());UpdateLinkedBrochures()});brochureVM.Online.subscribe(function(){UpdateLinkedBrochures()});brochureVM.TealiumBrochureVersion=ko.computed(function(){var n="";return brochureVM.Online()&&(n=n+"Digital"),brochureVM.Mail()&&(n.length>0&&(n=n+", "),n=n+"Mail"),n});brochureVM.goToThankYou=function(){var n=null,t;n=brochureVM.Online()?brochureVM.OnlineThankYou():brochureVM.MailThankYou();t=brochureVM.TealiumBrochureVersion();n=updateQueryStringParamForUrl(n,"brochure_version_opt_in",t);brochureVM.redirectTo(n)};brochureVM.redirectTo=function(n){window.location=n};ko.cleanNode(document.getElementById("brochure-form"));t=$("#brochure-form").removeData("validator").removeData("unobtrusiveValidation");$.validator.unobtrusive.parse(t);ko.applyBindings(brochureVM,document.getElementById("brochure-form"));ResetOptIn();brochureVM.OptInPhone!=undefined&&brochureVM.OptInPhone(!1);brochureVM.UpdateStateArray();$("#EmailAddress").keyup(function(){return!1});$(".form-group input, .form-group textarea").on("change",function(){$(this).val().length?$(this).next(".form-control-placeholder").addClass("form-label"):$(this).next(".form-control-placeholder").removeClass("form-label")});$(".form-group input, .form-group textarea").on("change",function(){$(this).val().length?$(this).next(".form-control-placeholder").addClass("form-label"):$(this).next(".form-control-placeholder").removeClass("form-label")});if(vrcIsMobile.any()){$("#Country").on("change",function(){$("#Country").next(".form-control-placeholder").addClass("form-label");$(this).removeClass("input-validation-error")});$("#State").on("change",function(){$(this).next(".form-control-placeholder").addClass("form-label");$(this).removeClass("input-validation-error")});$("#Title").on("change",function(){$(this).next(".form-control-placeholder").addClass("form-label");$(this).removeClass("input-validation-error")})}else{$("#Country").css("width","100%");$("#State").css("width","100%");$("#Title").css("width","100%");$("#Country").select2({placeholder:"",minimumResultsForSearch:-1});$("#State").select2({placeholder:"",minimumResultsForSearch:-1});$("#Title").select2({placeholder:"",minimumResultsForSearch:-1});$("#Country").on("select2:select select2:open",function(){$(this).siblings(".form-control-placeholder").addClass("form-label");$(this).removeClass("input-validation-error")});$("#State").on("select2:select select2:open",function(){$(this).siblings(".form-control-placeholder").addClass("form-label");$(this).removeClass("input-validation-error")});$("#Country").on("select2:opening",function(){setTimeout(function(){$("#Country").hasClass("valid")&&($("#Country").select2("close"),$("#Country").removeClass("valid"))},100)});$("#State").on("select2:opening",function(){setTimeout(function(){$("#State").hasClass("valid")&&($("#State").select2("close"),$("#State").removeClass("valid"))},100)});$("#Country").on("select2:close",function(){$(this).val()===""&&$(this).siblings(".form-control-placeholder").removeClass("form-label")});$("#State").on("select2:close",function(){$(this).val()===""&&$(this).siblings(".form-control-placeholder").removeClass("form-label")});$("#Title").on("select2:select",function(){$(this).siblings(".form-control-placeholder").addClass("form-label");$(this).removeClass("input-validation-error")});$(document).on("focus",".select2-container",function(n){var t=$(this).siblings("select:enabled"),i;t.length>0&&(t.data("runonce")!==undefined&&t.data("runonce")||(i=t[0].id,$(n.target).attr("aria-labelledby","placeholder-"+i),$("#select2-"+i+"-results").attr("aria-labelledby","placeholder-"+i),t.data("runonce",!0)))});$(document).on("focus",".select2-selection.select2-selection--single",function(){$(this).closest(".select2-container").siblings("select:enabled").select2("open")});$("select.select2").on("select2:closing",function(n){$(n.target).data("select2").$selection.one("focus focusin",function(n){n.stopPropagation()})})}$("#Country").on("change",function(){var n=$(this).val();$("#Country").next(".form-control-placeholder").addClass("form-label");n==="Other"||$("#placeholder-State").removeClass("form-label")});$("#EmailMeSpecialOffers").click(function(){$(this).is(":checked")?$(this).attr("aria-label","Email me about special offers - Selected"):$(this).attr("aria-label","Email me about special offers - Unselected")});$("#contact-me-email").click(function(){$(this).is(":checked")?$(this).attr("aria-label","Email me about special offers - Selected"):$(this).attr("aria-label","Email me about special offers - Unselected")});$("#contact-me-phone").click(function(){$(this).is(":checked")?$(this).attr("aria-label","Telephone me about special offers - Selected"):$(this).attr("aria-label","Telephone me about special offers - Unselected")});$("#contact-me-mail").click(function(){$(this).is(":checked")?$(this).attr("aria-label","Mail me about special offers - Selected"):$(this).attr("aria-label","Mail me about special offers - Unselected")})});var phoneAriaLabel=isCoBrandedForLocalization()?"Enter Phone Number - Required":"Enter Phone Number - Optional"