var coxfw=coxfw||{};!function(a){a.extendObj=function(b,c){return a.core.dom().extend(!0,b,c)},a.extend=function(b){"string"==typeof b?a[b]={}:a.extendObj(a,b)},a.utils=function(){return{typeEqual:function(b,c){return a.core.type(b)===c},newGUID:function(){var a=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()},parseURL:function(b){var c=a.core.dom("<a/>")[0];return c.href=b,c}}}()}(coxfw),function(a){a.core=function(){var b={},c={};return{define:function(c,d){a.utils.typeEqual(c,"string")&&a.utils.typeEqual(d,"function")?(temp=d(a.coxjs.define(this,c)),this.validConstructor(temp)?(temp=null,b[c]={define:d,instance:null}):a.core.throwError(1,"Module "+c+" registration failed. Instance cannot be initialized")):a.core.throwError(1,"Module "+c+" registration failed. One or more args are of an incorrect type")},initialize:function(c){b[c].instance=b[c].define(a.coxjs.define(this,c));try{b[c].instance.init()}catch(a){console.error("COXJS: Module named '"+c+"' had a problem while initializing and said '"+a+"'.")}},start:function(a){try{b[a].instance.execute()}catch(b){console.error("COXJS: Module named '"+a+"' had a problem while executing and said '"+b+"'.")}},startAll:function(){var a;console.groupCollapsed("INIT initialize all modules");for(a in b)b.hasOwnProperty(a)&&this.initialize(a);console.groupEnd(),console.groupCollapsed("EXEC start all modules");for(a in b)b.hasOwnProperty(a)&&this.start(a);console.groupEnd()},stop:function(a){var c=b[a];c&&c.instance&&(c.instance.destroy(),c.instance=null)},stopAll:function(){var a;for(a in b)b.hasOwnProperty(a)&&this.stop(a)},throwError:function(a,b){console.error(a,b)},validConstructor:function(b){return b.init&&a.utils.typeEqual(b.init,"function")&&b.destroy&&a.utils.typeEqual(b.destroy,"function")&&b.execute&&a.utils.typeEqual(b.execute,"function")},isPlainObject:function(a){return jQuery.isPlainObject(a)},trim:function(a){return jQuery.trim(a)},inArray:function(a,b){return jQuery.inArray(a,b)},each:function(a,b){return jQuery.each(a,b)},map:function(a,b){return jQuery.map(a,b)},evalUrl:function(a){return jQuery._evalUrl(a)},getScript:function(a,b){return jQuery.getScript(a,b)},globalEval:function(a){return jQuery.globalEval(a)},contains:function(a,b){return jQuery.contains(a,b)},ajax:function(a){return jQuery.ajax(a)},ajaxSetup:function(a){return jQuery.ajaxSetup(a)},when:function(a){return jQuery.when.apply(this,[a])},type:function(a){return jQuery.type(a)},getDollarSign:function(){return jQuery},events:{register:function(c,d){a.core.isPlainObject(c)&&d&&(b[d]?b[d].events=c:a.core.throwError(1,"Module "+d+" registration failed. Instance cannot be found"))},trigger:function(c){if(a.core.isPlainObject(c)){var d;for(d in b)if(b.hasOwnProperty(d)&&(d=b[d],d.events&&d.events[c.type])){var e=d.events[c.type](c.data);if(!a.utils.typeEqual(e,"undefined"))return e}}},remove:function(c,d){a.core.isPlainObject(c)&&d&&(d=b[d])&&d.events&&delete d.events},contentLoaded:function(b){if("undefined"!=typeof jQuery._data(document.body,"events")&&"undefined"!=typeof jQuery._data(document.body).events["content-loaded"]){if(0===arguments.length)return jQuery._data(document.body).events["content-loaded"];jQuery(jQuery._data(document.body).events["content-loaded"]).each(function(c,d){d.selector===b&&a.core.dom(b).trigger("content-loaded")})}else if(0===arguments.length)return[]}},browser:function(){if(window.matchMedia)window.matchMedia("(max-width: 767px)").matches?a.core.dom("body").attr("data-layout","mobile"):a.core.dom("body").attr("data-layout","desktop");else{var b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;b<=767?a.core.dom("body").attr("data-layout","mobile"):a.core.dom("body").attr("data-layout","desktop")}return a.core.dom("body").data()},dom:function(a,b){return new jQuery(a,b)},saveItem:function(a,b){c[a]?c[a]=JSON.stringify(jQuery.extend(!0,JSON.parse(c[a]),JSON.parse(b))):c[a]=b},getItem:function(a){return c[a]},removeItem:function(a){delete c[a]},clearAllItems:function(){c={}},addValidationMethod:function(a,b,c){jQuery.validator.addMethod(a,b,c)},validationMethods:function(a){jQuery.validator.methods[a]},grep:function(a,b,c){return jQuery.grep(a,b,c)},parseHTML:function(a){return jQuery.parseHTML(a)},templates:{render:function(a,b){var a=Handlebars.compile(a);return a(b)}}}}()}(coxfw),function(a){a.coxjs={define:function(b,c){var d=a.utils,b=a.core,e=b.dom,f=b.events,g=b.templates;return{subscribe:function(a){f.register(a,c)},publish:function(a){return f.trigger(a)},ignore:function(a){f.remove(a,c)},select:function(a,b){return e(a,b)},trim:function(a){return b.trim(a)},inArray:function(a,c){return b.inArray(a,c)},typeEqual:function(a,b){return d.typeEqual(a,b)},each:function(a,c){return b.each(a,c)},map:function(a,c){return b.map(a,c)},evalUrl:function(a){return b.evalUrl(a)},getScript:function(a,c){return b.getScript(a,c)},globalEval:function(a){return b.globalEval(a)},contains:function(a,c){return b.contains(a,c)},ajax:function(a){return b.ajax(a)},ajaxSetup:function(a){return b.ajaxSetup(a)},when:function(a){return b.when(a)},preventDefault:function(a){return a.preventDefault()},stopPropagation:function(a){return a.stopPropagation()},setXHRSelectors:function(a){console.debug("___SMT___| setXHRSelectors DEPRECATED for ",a)},browser:b.browser(),createStore:function(a){return b.saveItem(this.getModuleId(),a)},getStore:function(){return b.getItem(this.getModuleId())},clearStore:function(){return b.removeItem(this.getModuleId())},getModuleId:function(){return c},addValidationMethod:function(a,c,d){return b.addValidationMethod(a,c,d)},validationMethods:function(a){return b.validationMethods[a]},grep:function(a,c,d){return b.grep(a,c,d)},parseHTML:function(a){return b.parseHTML(a)},render:function(a,b){return g.render(a,b)}}}}}(coxfw),function(a){a.core.define("modules.base.Ajax",function(b){var c;return{init:function(){console.log("INIT Ajax.js"),c=this,b.subscribe({Ajax:c.makeAjaxRequest})},execute:function(){console.log("EXEC Ajax.js"),c=this,b.select("body").on("ajax-loader-trigger",".ajax-loader",function(a){if(!a.useCustomAJAX){var c=b.select(this),d=b.select(".response",c).closest(".loading-wrapper");b.publish({type:"Ajax",data:{container:b.select(".response",c),url:c.attr("data-ajax-source"),type:"GET",dataType:"text",timeout:"30000",cache:!1,throbber:{type:"showThrobber",data:{nodes:d,display:d.attr("data-ajax-display"),message:d.attr("data-ajax-message")}}}})}}),b.select(document).ajaxComplete(function(a,c){if(!c.responseJSON&&null!=c.getResponseHeader("Content-Type")&&!c.getResponseHeader("Content-Type").match(/javascript/)&&b.select(".ajax-loader",c.container).length>0){var d=b.select(".ajax-loader",c.container),e=b.select(".response",d).closest(".loading-wrapper");b.publish({type:"Ajax",data:{container:b.select(".response",d),url:d.attr("data-ajax-source"),type:"GET",dataType:"text",timeout:"30000",cache:!1,throbber:{type:"showThrobber",data:{nodes:e,display:e.attr("data-ajax-display"),message:e.attr("data-ajax-message")}}}})}}),b.select(".ajax-loader").length>0&&b.select(".ajax-loader").trigger("ajax-loader-trigger"),b.select(document).ajaxComplete(function(c,d){if(!d.isError&&!d.responseJSON&&null!=d.getResponseHeader("Content-Type")&&!d.getResponseHeader("Content-Type").match(/javascript/)){var e=b.select("<div>").append(d.responseText);if(b.each(a.core.events.contentLoaded(),function(a,c){e.find(c.selector).length>0&&b.select(c.selector).trigger("content-loaded")}),b.select("<div>").append(d.responseText).find("div[data-media]").length>0&&window.picturefill&&window.picturefill(),d.responseText.indexOf("<script>")>-1&&"modal"==b.select(c.target).attr("data-link-type")){var f,g=b.select(c.target).attr("data-url"),h=b.select(c.target).attr("href");f="undefined"!=typeof g?g:h;var i=f.split("#")[1],j=b.select("#"+i+" .modal-body",e).find("script").not("[type='application/json']");b.each(j,function(a,c){var d=b.select(c).html();b.globalEval(d)})}}}),b.select("body").on("click",".ajax-trigger",function(){var a=b.select(this),c=a.closest(".ajax-loader").find(".loading-wrapper");b.publish({type:"Ajax",data:{container:a.closest(".ajax-loader").find(".loading-wrapper .response"),url:a.attr("data-ajax-source")?a.attr("data-ajax-source"):a.closest(".ajax-loader").attr("data-ajax-source"),type:"GET",dataType:"text",timeout:"30000",cache:!1,throbber:{type:"showThrobber",data:{nodes:c,display:c.attr("data-ajax-display"),message:c.attr("data-ajax-message")}}}})}),b.select("body").on("content-loaded",".ajax-select",function(){var a=b.select(this),c=a.closest(".ajax-loader").find(".loading-wrapper");a.on("change",function(){b.publish({type:"Ajax",data:{container:a.closest(".ajax-loader").find(".loading-wrapper .response"),url:a.closest(".ajax-loader").attr("data-ajax-source")+a.val(),type:"GET",dataType:"text",timeout:"30000",cache:!1,throbber:{type:"showThrobber",data:{nodes:c,display:c.attr("data-ajax-display"),message:c.attr("data-ajax-message")}}}})})}),b.select("body").on("submit",".ajax-form-submit form",function(a){b.preventDefault(a);var c=b.select(this).parents(".response").closest(".loading-wrapper");b.publish({type:"Ajax",data:{container:b.select(this).closest(".response"),url:this.action,type:this.method.toUpperCase(),dataType:"text",timeout:"30000",cache:!1,data:b.select(this).serialize(),throbber:{type:"showThrobber",data:{nodes:c,display:c.attr("data-ajax-display"),message:c.attr("data-ajax-message")}}}})})},makeAjaxRequest:function(d){return a.utils.typeEqual(d.throbber,"object")&&c.showThrobber(d.throbber),b.ajax({type:d.type,url:d.url,data:d.data,dataType:d.dataType,context:d.container,cache:!1,contentType:d.contentType,xhrFields:{withCredentials:d.withCredentials},crossDomain:d.crossDomain,success:function(a,b,e){e.isError=!1,e.container=this,e.responseJSON?e.responseJSON.status?e.testMessage=e.responseJSON.status.successMessage:e.testMessage="AJAX call to '"+d.url+"' returned object '"+e.responseJSON+"'.":e.testMessage="AJAX call to '"+d.url+"' returned status '"+e.statusText+"'.",d.returnOptions&&(e.returnOptions=d.returnOptions),c.sendAjaxResponseBack(d.id,e)},error:function(a){a.isError=!0,a.container=this,a.testMessage=a.statusText,d.returnOptions&&(a.returnOptions=d.returnOptions),c.sendAjaxResponseBack(d.id,a)},complete:function(e){a.utils.typeEqual(d.throbber,"object")&&(null!=d.throbber.data.display?c.hideThrobber(d.throbber):(d.throbber.data.nodes=d.throbber.data.nodes.filter(".loading-wrapper-active"),c.hideThrobber(d.throbber))),b.select("body.IE8").length>0&&e.container.closest("[class*='colspan-']").css("zoom","").css("zoom","1"),b.publish({type:"AjaxComplete",data:{container:e.container}})}})},getAjaxResponse:function(a){a.isError?b.select(a.container).html("<div class='col-content'><p class='msgAdvisory'>We're sorry, we can't find this part of the page right now.</p></div>"):b.select(a.container).html(a.responseText)},sendAjaxResponseBack:function(d,e){a.utils.typeEqual(d,"string")?b.publish({type:d,data:e}):c.getAjaxResponse(e)},showThrobber:function(a){a.type="showThrobber",b.publish(a)},hideThrobber:function(a){a.type="hideThrobber",b.publish(a)},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Base64",function(a){var b,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{init:function(){console.log("INIT Base64.js"),b=this,a.subscribe({Base64:b.makeBase64Request})},execute:function(){console.log("EXEC Base64.js"),b=this},makeBase64Request:function(a){console.log("     Base64.makeBase64Request");var c;switch(a.type){case"encode":c=b.encode(a.data);break;case"decode":c=b.decode(a.data);break;case"utf8_encode":c=b._utf8_encode(a.data);break;case"utf8_decode":c=b._utf8_decode(a.data)}b.sendBase64Response(a.id,c,a.context)},encode:function(a){var d,e,f,g,h,i,j,k="",l=0;for(a=b._utf8_encode(a);l<a.length;)d=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=d>>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+c.charAt(g)+c.charAt(h)+c.charAt(i)+c.charAt(j);return k},decode:function(a){var d,e,f,g,h,i,j,k="",l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<a.length;)g=c.indexOf(a.charAt(l++)),h=c.indexOf(a.charAt(l++)),i=c.indexOf(a.charAt(l++)),j=c.indexOf(a.charAt(l++)),d=g<<2|h>>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=b._utf8_decode(k)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):d>127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;)d=a.charCodeAt(c),d<128?(b+=String.fromCharCode(d),c++):d>191&&d<224?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&c2),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&c2)<<6|63&c3),c+=3);return b},sendBase64Response:function(b,c,d){a.publish({type:b,data:{value:c,context:d}})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.CardEncryption",function(a){var b,c=".card-number",d=(a.select(c).parents("form"),"Visa MasterCard Discover Amex generic-atm-card visa mastercard discover amex all-cards randomcard");return{init:function(){b=this,console.log("INIT CardEncryption.js"),a.subscribe({encryptNumber:b.encryptNumber,detectCardType:b.detectCardType})},execute:function(){console.log("EXEC CardEncryption.js"),b=this,a.select(c).length>0&&(b.bindCardValidation(),b.initEncryptedData(c)),a.select("body").on("content-loaded",c,function(a){b.bindCardValidation(),b.initEncryptedData(c)}),a.select("body").on("keydown",c,function(a){b.clearField(this)}),a.select("body").on("blur",c,function(c){b.updateInputFields(this);var e=b.detectCardType(this,!1);void 0!=typeof e.cardDetails.cardType&&"undefined"!=typeof e.cardDetails.cardType?(a.select(this).removeClass(d),e&&a.publish({type:"CardValidation",data:e}),a.select(this).addClass(e.cardDetails.cardClass),b.updateAssocInputFields(this,e.cardDetails.cardTypeUF,b.getLastDigits(this,4))):(a.select(this).removeClass(d),a.select(this).val().length>0?a.select(this).addClass("all-cards randomcard"):(a.select(this).addClass("all-cards"),a.select(this).removeClass("randomcard")),b.updateAssocInputFields(this,"",b.getLastDigits(this,4))),b.clearField(this)}),a.select("body").on("blur","#cvv-number",function(b){var c=new RegExp("^ *[0-9]+ *$");a.select("#cvv-number").val().length>=3&&null!=a.select("#cvv-number").val().match(c)?(a.select("#cvv-number").removeAttr("name"),a.select("#cvv-number").removeClass("error"),a.select("label[for='cvv-number']").removeClass("errorMsg")):a.select("#cvv-number").attr("name","cvvnumber")}),a.select("body").on("keypress",".cvv-number",function(a){a=a?a:window.event;var b=a.which?a.which:a.keyCode;return!(b>31&&(b<48||b>57))}),a.select("body").on("cut copy paste",".cvv-number",function(a){a.preventDefault()}),a.select("body").on("keyup","#cvv-number",function(b){var c=new RegExp("^ *[0-9]+ *$");a.select("#cvv-number").val().length>=3&&null!=a.select("#cvv-number").val().match(c)?(a.select("#cvv-number").removeAttr("name"),a.select("#cvv-number").removeClass("error"),a.select("label[for='cvv-number']").removeClass("errorMsg")):a.select("#cvv-number").attr("name","cvvnumber")}),a.select("body").on("keyup",c,function(c){b.updateInputFields(this);var e=b.detectCardType(this,!0);void 0!=typeof e.cardDetails.cardType&&"undefined"!=typeof e.cardDetails.cardType?(a.select(this).removeClass(d),e&&a.publish({type:"CardValidation",data:e}),a.select(this).addClass(e.cardDetails.cardClass)):(a.select(this).removeClass(d),a.select(this).val().length>0?a.select(this).addClass("all-cards randomcard"):(a.select(this).addClass("all-cards"),a.select(this).removeClass("randomcard"))),b.clearField(this)}),a.select("body").on("keyup","input[data-masked-pattern]",function(c){if(1==a.select(this).data("masked-pattern")){var d=b.detectCardType(this,!0);b.updateInputFields(this),b.changeInputPattern(a.select(this),d.cardDetails.maskPattern)}})},updateInputFields:function(b){var c=a.select(b).val().replace(/[^\/\d]/g,"");a.select(b).attr("data-field-value",c),a.select(a.select(b).attr("data-field-selector")).val(""),"undefined"!=typeof a.select(b).attr("data-field-selector")&&a.select(b).attr("name",a.select(b).attr("data-field-selector").replace(/[#.]/g,"")+"_card-number")},clearField:function(b){"true"==a.select(b).attr("data-masked")&&(a.select(b).val(""),a.select(a.select(b).attr("data-field-selector")).val(""),a.select(b).removeAttr("data-field-value"),a.select(b).removeAttr("data-masked"))},initEncryptedData:function(c){var d=a.select(c);a.each(d,function(){b.updateInputFields(this),b.checkDependentJsLoad(this)?b.populateMaskedInput(this):a.select(this).validate()})},bindCardValidation:function(){var d=c.replace(".",""),e="The credit card number you entered isn't valid. Please try again.",f=b.checkDependentJsLoad();f||(e="We are unable to validate your credit card at this time. Please try again later."),a.addValidationMethod(d,function(c,d){if(f){var e=b.detectCardType(d,!1),g=new RegExp("^ *[0-9]+ *$");return void 0!=typeof e.cardDetails.cardType&&"undefined"!=typeof e.cardDetails.cardType&&(b.updateAssocInputFields(d,e.cardDetails.cardTypeUF,b.getLastDigits(d,4)),a.select(d).removeAttr("name"),a.select("#cvv-number").val().length>=3&&null!=a.select("#cvv-number").val().match(g)?a.select("#cvv-number").removeAttr("name"):a.select("#cvv-number").attr("name","cvvnumber"),b.encryptNumber(d))}return!1},e)},checkDependentJsLoad:function(a){var c=!1;return(b.isPieEncryptionDownloadError()||b.isPieKeyDownloadError())&&b.checkDependentJsCryptoError()&&b.checkDependentJsJsEncryption()||(c=!0),c},checkDependentJsCryptoError:function(){return"undefined"==typeof CryptoJS},checkDependentJsJsEncryption:function(){return"undefined"==typeof JSEncrypt},encryptionType:function(){var a=!1,c=!1,d=!1;return b.isPieEncryptionDownloadError()||b.isPieKeyDownloadError()||(a=!0),b.checkDependentJsCryptoError()||(c=!0),b.checkDependentJsJsEncryption()||(d=!0),a&&d||a?"PIE":d?"JSENC":void 0},encryptNumber:function(a){var c=b.encryptionType();return"PIE"==c?b.encryptCHS(a):"CRYPTO"==c?b.encryptCrypto(a):"JSENC"==c?b.encryptRSA(a):void 0},encryptCrypto:function(c){var d=a.select(c).attr("data-field-value"),e=a.select(c).data("field-selector");if(e=a.select(c).parents("form").find(e),"undefined"!=typeof encKey){var f=encKey,g=CryptoJS.AES.encrypt(d,f),h=b.detectCardType(c,!1);return null!=g&&("undefined"!=typeof h.cardDetails.cardType||""==h.cardDetails.cardType)&&(a.select(e).val(g),!0)}return!1},encryptCHS:function(b){form=a.select(b).parents("form");var c=a.select(b).attr("data-field-value"),d=a.select(b).data("field-selector");d=a.select(b).parents("form").find(d);var e=a.select(".cvv-number").length>0?a.select(".cvv-number"):"",f=a.select(e).data("field-selector");f=a.select(e).parents("form").find(f),a.select(".cvv-number").length>0&&(e=a.select(".cvv-number").val());var g=a.select(b).attr("data-integrity-check");g=a.select(b).parents("form").find(g);var h=!0;if(h&&!ValidatePANChecksum(c))return!1;new RegExp("^ *[0-9]+ *$");"tel"==a.select("#cvv-number").attr("type")?e.length<3?(e="",h=!1):e.length>4&&(e="",h=!1):h=!0;var i=ProtectPANandCVV(c,e,!h);return null!=i&&(a.select(d).val(i[0]),a.select(f).val(i[1]),a.select(g).val(i[2]),!0)},encryptRSA:function(c){var d=a.select(c).attr("data-field-value"),e=a.select(c).data("field-selector");if(e=a.select(c).parents("form").find(e),"undefined"!=typeof encKey){var f=encKey,g=new JSEncrypt({default_key_size:2048});g.setPublicKey(f);var h=g.encrypt(d),i=b.detectCardType(c,!1);return null!=h&&("undefined"!=typeof i.cardDetails.cardType||""==i.cardDetails.cardType)&&(a.select(e).val(h),!0)}return!1},isPieKeyDownloadError:function(){return"undefined"==typeof PIE||"undefined"==typeof PIE.K||"undefined"==typeof PIE.L||"undefined"==typeof PIE.E||"undefined"==typeof PIE.key_id||"undefined"==typeof PIE.phase},isPieEncryptionDownloadError:function(){return"function"!=typeof ValidatePANChecksum||"function"!=typeof ProtectPANandCVV},populateMaskedInput:function(c){a.select(c).val().length>0&&(a.select(c).val(b.maskNumber(a.select(c).val(),c)),a.select(c).attr("data-masked",!0))},maskNumber:function(b,c){var d="*",e=/^([0-9-]+)([0-9]{4})$/,f=b.match(e),g=b.replace(/([0-9])/g,d,f[1])+f[2];return g=g.substr(g.length-a.select(c).attr("maxlength"),g.length)},detectCardType:function(b,c){var d=a.select(b).attr("data-field-value");"undefined"==typeof d&&(d=a.select(b.element).val(),b=a.select(".txtCCNum-payment"),c=!0);var e={};e={ccCards:[{cardType:"Amex",regEx:"(^34\\d{13}$)|(^37\\d{13})$",regExKeyPress:"(^34\\d{0,13}$)|(^37\\d{0,13})$",cssClass:"Amex",isDebit:!1,cardTypeUF:"American Express",maskPattern:"0000-000000-000000"},{cardType:"Discover",regEx:"(^60110\\d{11}$)|(^60112\\d{11}$)|(^60113\\d{11}$)|(^60114\\d{11}$)|(^60119\\d{11}$)|(^65\\d{14}$)|(^644\\d{13}$)|(^649\\d{13}$)|622(1(2[6-9]|[3-9]d)|[2-8]d{2}|9([01]d|2[0-5]))\\d{10}$",regExKeyPress:"(^60110\\d{0,11}$)|(^60112\\d{0,11}$)|(^60113\\dd{0,11}$)|(^60114\\d{0,11}$)|(^60119\\d{0,11}$)|(^65\\d{0,14}$)|(^644\\d{0,13}$)|(^649\\d{0,13}$)|622(1(2[6-9]|[3-9]d)|[2-8]d{2}|9([01]d|2[0-5]))\\d{0,10}$",cssClass:"Discover",isDebit:!1,cardTypeUF:"Discover",maskPattern:"0000-0000-0000-0000"},{cardType:"MasterCard",regEx:"(^51\\d{14}$)|(^52\\d{14}$)|(^53\\d{14}$)|(^54\\d{14}$)|(^55\\d{14}$)|^222[1-9]|^22[3-9][0-9]|^2[3-6][0-9]{2}|^27[01][0-9]|^2720[0-9]{12}$",regExKeyPress:"(^51\\d{0,14}$)|(^52\\d{0,14}$)|(^53\\d{0,14}$)|(^54\\d{0,14}$)|(^55\\d{0,14}$)|^222[1-9]|^22[3-9][0-9]|^2[3-6][0-9]{2}|^27[01][0-9]|^2720[0-9]{0,12}$",cssClass:"MasterCard",isDebit:!1,cardTypeUF:"Master Card",maskPattern:"0000-0000-0000-0000"},{cardType:"Visa",regEx:"(^4\\d{12}$)|(^4\\d{15}$)",regExKeyPress:"(^4\\d{0,12}$)|(^4\\d{0,15}$)",cssClass:"Visa",isDebit:!1,cardTypeUF:"Visa",maskPattern:"0000-0000-0000-0000"},{cardType:"generic-atm-card",regEx:"(^\\d{9,20}$)",regExKeyPress:"(^\\d{9,20}$)",cssClass:"generic-atm-card randomcard",isDebit:!0,cardTypeUF:"ATM",maskPattern:"0000-0000-0000-0000000"}]};var f={};f.cardDetails={},f.cardNumber=d,f.cardField=b;var g=g="undefined"!=typeof a.select(b).data("allow-debit")&&a.select(b).data("allow-debit");for(var h in e.ccCards)if(e.ccCards[h].hasOwnProperty("cardType")){var i=e.ccCards[h].cardType,j=1==c?e.ccCards[h].regExKeyPress:e.ccCards[h].regEx;if(f.isDebit=e.ccCards[h].isDebit,(1==g&&1==f.isDebit||1==g&&0==f.isDebit||0==g&&0==f.isDebit)&&d.match(j)){f.cardDetails.cardType=i,f.cardDetails.cardClass=e.ccCards[h].cssClass,f.cardDetails.cardTypeUF=e.ccCards[h].cardTypeUF,f.cardDetails.maskPattern=e.ccCards[h].maskPattern;break}}return f},changeInputPattern:function(b,c){return c="undefined"==typeof c?"0000-0000-0000-0000000":c,a.select(b).mask(c)},updateAssocInputFields:function(b,c,d){var e=a.select(b).data("card-type"),f=a.select(b).data("last-digit");e=a.select(b).parents("form").find(e),f=a.select(b).parents("form").find(f),a.select(e).val(c),a.select(f).val(d)},getLastDigits:function(b,c){var d=a.select(b).attr("data-field-value").toString(),e=d.length>c?d.substring(d.length-c,d):d;return e},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Carousel",function(a){var b,c=".coxcom-carousel";return{init:function(){console.log("INIT Carousel.js"),b=this,a.subscribe({MultiAjaxComplete:b.multiAjaxSliderReInitialize,initializeEcommCarouselMapSlider:b.initPageCarouselSlider})},execute:function(){console.log("EXEC Carousel.js"),b=this,a.select("body").on("content-loaded",c,function(b){a.select(".carousel").on("slid.bs.carousel",function(){var b=a.select(this).find("div.carousel-item").length,c=a.select(this).find(".carousel-item.active").index()+1;c==b?a.select(".carousel-control-next",a.select(this)).addClass("disabled"):a.select(".carousel-control-next",a.select(this)).removeClass("disabled"),1==c?a.select(".carousel-control-prev",a.select(this)).addClass("disabled"):a.select(".carousel-control-prev",a.select(this)).removeClass("disabled"),a.select(".carousel-numbers p",a.select(this)).text(c+"/"+b)})}),a.select("body").on("keypress",".carousel-indicators li",function(a){a=a?a:window.event;var b=a.which?a.which:a.keyCode;13==b&&(this.click(),a.preventDefault(),module.announceChangeInSlide())}),a.each(a.select(c),function(a,c){b.initializeCarousel(c)})},initializeCarousel:function(b){var c=a.select(".carousel-inner",b);if(c.length>0){var d=a.select(c).find("div.carousel-item").length,e=a.select(c).find(".carousel-item.active").index()+1,f=a.select(".carousel-numbers p",b);a.select(f).text(e+"/"+d),1==e&&a.select(".carousel-control-prev").addClass("disabled")}},announceChangeInSlide:function(b){var c=a.select(".carousel-inner",b);if(c.length>0){var d=a.select(c).find("div.carousel-item").length,e=a.select(c).find(".carousel-item.active").index()+1,f=document.createElement("p");f.setAttribute("class","sr-only slideAnnouncerTag"),a.select(".carousel-item.active").appendChild(f),a.select(".slideAnnouncerTag").textContent="Item"+e+"of"+d}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.CheckBox",function(a){var b,c=".checkbox-block";return{init:function(){console.log("INIT CheckBox.js")},execute:function(){console.log("EXEC CheckBox.js"),b=this,a.select("body").on("content-loaded",c,function(b){var c=a.select(this).find('input[type="checkbox"]');a.select(c).focus(function(b){var c=a.select(this).parent();a.select(c).addClass("focused-check")}),a.select(c).blur(function(b){var c=a.select(this).parent();a.select(c).removeClass("focused-check")})}),a.select("body").on("click",".check-boxes",function(a){b.handlecheckBtnSelection(this)})},handlecheckBtnSelection:function(b){var c=a.select(b);c.toggleClass("active-check");var d=c.find('input[type="checkbox"]')[0],e=a.select(d);c.hasClass("active-check")?(e.prop("checked","checked"),e.attr("checked","checked")):e.removeAttr("checked"),a.publish({type:"checkBoxActionComplete",data:{}})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Collapse",function(a){var b,c=".coxcom-collapse";return{init:function(){console.log("INIT Collapse.js"),b=this},execute:function(){console.log("EXEC Collapse.js"),b=this,a.select("body").on("content-loaded",c,function(c){a.select(".collapse").on("show.bs.collapse",function(){var c="#"+a.select(this).attr("id");a.select('[data-toggle="collapse"]').each(function(d,e){a.select(e).attr("href")==c&&a.select(e).hasClass("clicked")&&b.swapAnchorText(e)})}),a.select(".collapse").on("hidde.bs.collapse",function(){var c="#"+a.select(this).attr("id");a.select('[data-toggle="collapse"]').each(function(d,e){a.select(e).attr("href")==c&&a.select(e).hasClass("clicked")&&b.swapAnchorText(e)})})}),a.select("body").on("click",c,function(b){a.select(this).addClass("clicked"),a.select(this).data("destroy")&&a.select(this).remove()})},swapAnchorText:function(b){if("undefined"!=typeof a.select(b).data("toggleText")){var c=a.select(b).attr("data-toggle-text"),d=a.select(b).html();a.select(b).html(c),a.select(b).attr("data-toggle-text",d)}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.CustomValidation",function(a){var b,c=[];return{init:function(){console.log("INIT CustomValidation.js"),b=this,a.subscribe({CustomizeValidation:b.customizeOptions})},execute:function(){console.log("EXEC CustomValidation.js"),b=this;var c=a.validationMethods.required;a.validationMethods.required=function(){var b=a(arguments[1]);return b.is("[placeholder]")&&arguments[0]==b.attr("placeholder")&&(arguments[0]=""),c.apply(this,arguments)}},customizeOptions:function(d){currentForm=a.select(d.formObj);var e=!1,f=!1,g=!1;"undefined"!=typeof a.select(currentForm).attr("data-validate-onblur")&&a.select(currentForm).data("validateOnblur")&&(a.select(currentForm).find("a").on("mousedown",function(a){currentForm.validate().settings.ignore="*"}),a.select(currentForm).find("a").on("mouseout",function(b){var c=a.select("form");a.each(c,function(b,c){a.select(c).validate().settings.ignore=".ignore-validation"})}),e=function(a){this.element(a)},f=function(a,b){9===b.which&&""===this.elementValue(a)||(a.name in this.submitted||a===this.lastElement)&&this.element(a)},g=function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)}),currentForm.validate({onfocusin:!1,onfocusout:e,onkeyup:f,onclick:g,errorClass:"error",errorHighlightClass:"errorMsg",verticalGroupClass:"vertical-group-element",validClass:"valid",errorMessageContainerClass:"error-wrapper bubble-pointer mbubble-pointer",errorElement:"div",ignore:".ignore-validation",groups:{services:"services",checkservices:"check-services"},invalidHandler:function(b,c){a.select(c.currentForm).css("zoom","1");var d=a.select(c.currentForm).find(".loading-wrapper-active");a.typeEqual(window.buttonThrobberTimer,"undefined")||clearTimeout(window.buttonThrobberTimer),a.publish({type:"hideThrobber",data:{nodes:d}})},showErrors:function(d,e){var f,g,h,i=!1;for(f=0;this.errorList[f];f++){h=this.errorList[f];var j=a.select(h.element).parent(),k=a.select(j).prev(),l="";0!=k.length&&(l=a.select(k).text().trim());var m="SELECT"==h.element.tagName?"A selection is":"This field <span class='sr-only'>"+l+"</span> is";switch(h.method){case"required":h.message="checkbox"!=h.element.type?m+" required.":a.select("input[name='"+h.element.name+"']",h.element.form).length>1?"You must check at least one option to continue.":"Please check this option to continue.";break;case"equalTo":h.message="Confirm value does not match actual value.";break;case"date":h.message="Please use the mm/dd/yyyy format.";break;case"max":h.message.replace("value","number");break;case"min":h.message.replace("value","number")}j.hasClass("group-choice")?a.select(j).closest(".checkout-label-value").prev().addClass(this.settings.errorHighlightClass):"ibill-verify-page"===j.attr("data-content")?a.select(j).addClass(this.settings.errorHighlightClass):a.select(j).prev().addClass(this.settings.errorHighlightClass);var n=document.createElement("input");"placeholder"in n||a.select(h.element).hasClass("create-placeholder")&&a.select(h.element).prev().addClass("error"),this.settings.highlight&&this.settings.highlight.call(this,h.element,this.settings.errorClass,this.settings.validClass);var o="<p>"+h.message+"</p>";if(this.showLabel(h.element,o),void 0!=typeof h.element.form&&null!=h.element.form.id&&""!=a.trim(h.element.form.id)&&(i=!0,"undefined"==typeof h.element.labels)){var p=[];p=a.select("label[for='"+a.select(h.element).attr("id")+"']"),h.element.labels=p}}if(this.errorList.length&&a.select("form.accordion").length>0){this.toShow=this.toShow.add(this.containers);var q=a.select(".error-header","form.accordion");if(a.select(q).length>0)for(var f=0;f<q.length;f++)a.select(q[f]).parent(".accordion-panel").find(".error").length>0&&(a.select(q).html("<div><div></div>Please correct the items marked below to continue.</div>"),a.select(q)[0].style.display="block",a.select(".error-header").children("div").addClass("alert alert-danger pl-1 pr-2 ml-alert-err"),a.select(".error-header").children("div").children("div").addClass("alert-content error ml-1"),a.select(q[f]).parent(".accordion-panel").addClass("accordion-panel-open").removeClass("accordion-panel-disabled"),a.select(q[f]).parent(".accordion-panel").prev().addClass("accordion-trigger-open").removeClass("accordion-trigger-disabled"))}else if(this.errorList.length){this.toShow=this.toShow.add(this.containers);var q=a.select(".error-header",this.currentForm);a.select(q).length&&(a.select(q).html("<div><div></div>Please correct the items marked below to continue.</div>"),
a.select(q)[0].style.display="block",a.select(".error-header").children("div").addClass("alert alert-danger pl-1 pr-2 ml-alert-err"),a.select(".error-header").children("div").children("div").addClass("alert-content error ml-1"))}else a.select(".error-header",this.currentForm).hide();if(this.settings.unhighlight)for(f=0,g=this.validElements();g[f];f++){var j=a.select(g[f]).parent();a.select(j).hasClass(this.settings.verticalGroupClass)?a.select(j).prev().find(".error-wrapper").remove():a.select(g[f]).siblings(".error-wrapper").remove(),j.hasClass("group-choice")?a.select(j).closest(".checkout-label-value").prev().removeClass(this.settings.errorHighlightClass):"ibill-verify-page"===j.attr("data-content")?a.select(j).removeClass(this.settings.errorHighlightClass):a.select(j).prev().removeClass(this.settings.errorHighlightClass),this.settings.unhighlight.call(this,g[f],this.settings.errorClass,this.settings.validClass)}if(this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show(),void 0!=typeof udoFormErrors&&i){var r=[];a.select(e).each(function(a,d){var e=b.inArray(c,d);e||(c.push(d),r.push(d))}),0!==r.length&&(udoFormErrors=r,a.select("body").trigger("udoFormErrorEvent"),c=[])}},errorPlacement:function(b,c){errorPlacementDiv=a.select(c).parents().eq(0),a.select(errorPlacementDiv).hasClass(this.verticalGroupClass)?a.select(errorPlacementDiv).prev().append(b):a.select(errorPlacementDiv).hasClass("group-choice")?(a.select(errorPlacementDiv).parent().append(b),a.select(b).css("display","inline-block")):a.select(errorPlacementDiv).parents("form").hasClass("wrap-errors")?(a.select(errorPlacementDiv).append(b),a.select(b).css("display","block")):(a.select(errorPlacementDiv).append(b),a.select(b).css("display","inline-block"))}})},inArray:function(a,b){var c=!1;return a.map(function(a){a===b&&(c=!0)}),c},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.DatePicker",function(a){var b,c,d="input.date-picker";return{init:function(){console.log("INIT DatePicker.js"),b=this,a.subscribe({DatePicker:b.displayDatePicker}),window.matchMedia&&(c=window.matchMedia("(orientation : portrait)").matches?a.select(window).width()<768&&a.select(window).height()>768:a.select(window).width()>768&&a.select(window).height()<600),showOtherMonths=!0,"false"==a.select(d).attr("show-other-months")&&(showOtherMonths=!1)},execute:function(){console.log("EXEC DatePicker.js"),b=this,a.select("body").on("content-loaded",d,function(b){a.publish({type:"DatePicker",data:this})})},displayDatePicker:function(b){function d(a){return 0==daysToDueDate?[!0,""]:a-dueDate==0?[!0,"ui-datepicker-due-date"]:[!0,""]}function e(b){if(null!=disableDays&&disableDays.length>0){var c=b.getDay();return $.inArray(c,disableDays)!=-1?[!1,""]:[!0,""]}return a.typeEqual(window.dpEnableDates,"undefined")?daysToDueDate!=i?d(b):g(b):f(b)}function f(b){var c=b.getDate()+"-"+(b.getMonth()+1)+"-"+b.getFullYear();return a.inArray(c,window.dpEnableDates)>=0?[!0]:[!1]}function g(b){if(null!=m&&m.length>0){var c=b.getDate()+"-"+(b.getMonth()+1)+"-"+b.getFullYear();return a.inArray(c,m)<0?[!0,""]:[!1,""]}}var h=["SUN","MON","TUE","WED","THU","FRI","SAT"];this.monthsAhead=60;var i=31*(this.monthsAhead+1);b.today=new Date;var j=new Date(b.today.getFullYear(),b.today.getMonth(),b.today.getDate());todayPlusDays="undefined"!=typeof dpTodayPlusDays?dpTodayPlusDays:0,daysToDueDate="undefined"!=typeof dpDaysToDueDate?dpDaysToDueDate:i,plusDays="undefined"!=typeof dpPlusDays?dpPlusDays:i,disableDays="undefined"!=typeof dpdisableDays?dpdisableDays:null,dueDate=new Date(j.setDate(j.getDate()+daysToDueDate)),endDate=new Date(j.setDate(j.getDate()+plusDays));var k=new Date;b.nowDay=k.getDate()+todayPlusDays;var l=new Date(b.today.getFullYear(),b.today.getMonth(),b.nowDay);a.select(b).hasClass("ecomm-date")&&$.noConflict(!0);var m=["9-5-2015","14-5-2015","15-5-2015","5-5-2015","30-4-2015","11-5-2015"];a.select(b).datepicker({numberOfMonths:1,dayNamesMin:h,maxDate:endDate,beforeShowDay:e,showOtherMonths:showOtherMonths,minDate:l,onClose:function(b){(a.select(".pro-date").length>0||a.select(".mpro-date").length>0)&&a.publish({type:"DatePickerModifier"}),void 0!=a.select(".datepicker-modal-component").attr("style")&&(a.select(this).data("datepicker").inline=!1),a.select(window).width()<768&&(null!=event.target.closest(".datepicker-modal-component")?window.setTimeout(function(){a.select("#ui-datepicker-div").css({display:"block"})},400):a.select(".datepicker-modal-component").css({display:"none"})),a.select(this).closest("form").data("validateOnblur")===!0&&a.select(this).hasClass("disable-required")&&(a.select(this).removeClass("disable-required"),a.select(this).addClass("required"))},onSelect:function(d,e){a.select(this).closest("form").data("validateOnblur")===!0&&a.select(this).hasClass("disable-required")&&(a.select(this).removeClass("disable-required"),a.select(this).addClass("required"));var f=this.id;a.select(f).datepicker("option","dayNamesMin");var g=f.match(/(.*?)-start/),h=f.match(/(.*?)-end/);if(h){var i=a.select("#"+h[1]+"-start"),j=i.val(),k=Date.parse(i[0].value),l=$.datepicker.formatDate("mm/dd/yy",new Date(b.today));0==isNaN(k)?a.select("#"+h[1]+"-end").datepicker("option","minDate",j):a.select("#"+h[1]+"-end").datepicker("option","minDate",l)}if(g&&h){var m,n=a.select("#"+g[1]+"-end"),o=Date.parse(n[0].value),i=a.select("#"+g[1]+"-start"),k=Date.parse(i[0].value);if(isNaN(o))m=d;else if(new Date(d)>new Date(o)){if(m=d,!isNaN(k)){var m=new Date(m);m.setDate(m.getDate()+Math.abs((o-Date.parse(i[0].value))/864e5))}}else m=new Date(o);isNaN(k)||(n[0].value=$.datepicker.formatDate("mm/dd/yy",new Date(m)))}void 0!=a.select(".datepicker-modal-component").attr("style")&&(a.select(this).data("datepicker").inline=!0,window.matchMedia&&c&&window.matchMedia("(orientation : landscape)").matches&&(a.select(this).data("datepicker").inline=!1)),a.publish({type:"DatePickerSelect",data:this})},beforeShow:function(c,d){a.select(c).closest("form").data("validateOnblur")===!0&&a.select(c).hasClass("required")&&(a.select(c).addClass("disable-required"),a.select(c).removeClass("required"));var e=this.id,f=e.match(/(.*?)-end/),g=e.match(/(.*?)-start/);if(f){var h=a.select("#"+f[1]+"-start"),i=h.val(),j=Date.parse(h[0].value),k=$.datepicker.formatDate("mm/dd/yy",new Date(b.today));0==isNaN(j)?a.select("#"+f[1]+"-end").datepicker("option","minDate",i):a.select("#"+f[1]+"-end").datepicker("option","minDate",k)}else if(g){var l=a.select("#"+g[1]+"-end"),m=l.val(),n=Date.parse(l[0].value);0==isNaN(n)&&a.select("#"+g[1]+"-start").datepicker("option","maxDate",m)}var o=a.select("#"+e).offset(),p=a.select("#"+e).height(),q=a.select("#"+e).width();window.setTimeout(function(){a.select(d.dpDiv).css({top:o.top+p-185+"px",left:o.left+q+50+"px"})},1),(a.select(".pro-date").length>0||a.select(".mpro-date").length>0)&&a.publish({type:"DatePickerModifier"}),a.publish({type:"MobileDatePickerModal"})}})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.FocusManager",function(a){var b,c;return{init:function(){console.log("INIT FocusManager.js"),b=this,a.subscribe({FocusManager:b.manageFocusableItems})},execute:function(){console.log("EXEC FocusManager.js")},manageFocusableItems:function(b){var d="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",e=a.select(b.container).find("*");c=e.filter(d).filter(":visible");var f=a.select(document.activeElement),g=c.length,h=c.index(f);9==b.event.keyCode&&(b.event.shiftKey?0==h&&(c.get(g-1).focus(),b.event.preventDefault()):h==g-1&&(c.get(0).focus(),b.event.preventDefault()))},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.FormValidation",function(a){var b,c,d="form",e=3e4;return{init:function(){console.log("INIT FormValidation.js")},execute:function(){console.log("EXEC FormValidation.js"),b=this,a.select("body").on("content-loaded",d,function(b){b.stopPropagation();var c=a.select(this);a.publish({type:"CustomizeValidation",data:{formObj:c}})}),a.select("body").on("click","input[type='submit'], button[type=’submit’]",function(c){if(!(a.select(this).parents(".pf-header-wrapper").length>0)){if(0!=enableButtonThrobber){var d=a.select(this);b.loadThrobber(d,c)}b.removeInputFieldSpaces(a.select(this).form)}}),a.select("body").on("click",".password-eye",function(b){var c=a.select(this).closest(".password-field-wrapper"),d=a.select("input[type!='hidden']",c);"password"===a.select(d).attr("type")?(a.select(d).attr("type","text"),a.select(this).attr("aria-label","Password hide")):(a.select(d).attr("type","password"),a.select(this).attr("aria-label","Password show")),a.preventDefault(b),d.focus()}),a.select("body").on("blur",".email,.emaildot",function(b){if(void 0!=a.select(this).attr("data-mail-check")&&"undefined"!=typeof Mailcheck&&a.select(Mailcheck).length>0){var c=a.select(this);a.select(c).mailcheck({suggested:function(b,c){a.select(".alert-wrapper",a.select(b).parents().eq(0)).remove();var d='<div id="email-input-alert" class="alert-wrapper" style="display: block;"><p>Did you mean <a class="alert-error-anchor" data-suggested-email="'+c.full+'">'+c.full+"?</a></p></div>";a.select(b).parents().eq(0).append(d),a.select(b).siblings(".error-wrapper").remove(),a.select(b).parent().prev().removeClass("errorMsg"),a.select("body").on("click",".alert-error-anchor",function(b){var c=a.select(".email,.emaildot",a.select(this).parents().eq(2))[0];if(a.select(c).length>0){var d=a.select(this).attr("data-suggested-email");a.select(c).val(d),a.select(".alert-wrapper",a.select(c).parents().eq(0)).remove()}})},empty:function(b){a.select(".alert-wrapper",a.select(b).parents().eq(0)).remove()}})}}),a.typeEqual(window.enableButtonThrobber,"undefined")&&(enableButtonThrobber=!0)},loadThrobber:function(d,f){return d.hasClass("loading-wrapper-active")?void a.preventDefault(f):void(0==d.parents(".ajax-form-submit").length&&"input"==d.prop("tagName").toLowerCase()&&(b.showThrobber(d),c=setTimeout(function(){b.hideThrobber(d)},e),window.buttonThrobberTimer=c))},showThrobber:function(b){a.publish({type:"showThrobber",data:{nodes:b}})},hideThrobber:function(b){clearTimeout(c),a.publish({type:"hideThrobber",data:{nodes:b}})},customDateFieldErrorHandling:function(b){var c=a.select(b);c.length>0&&""!=c.val().trim()&&c.data("hideInlineError")&&(a.select("#"+c.attr("id")+"-error").remove(),a.select("."+c.attr("id")+"-label").removeClass("errorMsg"),c.removeClass("error"))},removeInputFieldSpaces:function(b){a.select("input,textarea,select",b).each(function(b,c){var d=a.select(c).val();a.select(c).val(a.trim(d))})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.GoogleMapAutoPopulateAddress",function(a){var b,c,d=".autocomplete-address",e=".autocomplete-city";return{init:function(){console.log("INIT GoogleMapAutoPopulateAddress.js"),b=this,c=0,a.subscribe({AutoCompleteAddress:b.getAutoCompleteAddressConfigs})},execute:function(){console.log("EXEC GoogleMapAutoPopulateAddress.js"),b=this,"undefined"!=typeof google&&(a.select("body").on("content-loaded",d,function(c){var d=b.correctContainer(this,"autocomplete-address");a.publish({type:"AutoCompleteAddress",data:{container:d,selector:"autocomplete-address"}})}),a.select("body").on("content-loaded",e,function(c){b.correctContainer(this,"autocomplete-city");a.publish({type:"AutoCompleteAddress",data:{container:this,selector:"autocomplete-city"}})}))},correctContainer:function(b,c){if(a.select(b).hasClass("autocomplete")){var d=a.select(b).closest("form").addClass(c);return a.select(b).removeClass(c),d}return b},addDynamicClasses:function(b){a.each(a.select(".autocomplete",b),function(b,c){a.select(c).addClass("google-target-"+b)}),a.each(a.select(".autocomplete-dummy",b),function(b,c){a.select(c).addClass("google-target-dummy-"+b)}),a.each(a.select(".autocomplete-hidden",b),function(b,c){a.select(c).addClass("google-target-hidden-"+b)}),a.each(a.select("input.postal-code",b),function(b,c){a.select(c).addClass("google-target-zip-"+b)}),a.each(a.select("input.city-name",b),function(b,c){a.select(c).addClass("google-target-city-"+b)}),a.each(a.select("input.state-name, select.state-name",b),function(b,c){a.select(c).addClass("google-target-state-"+b)})},fetchAddressDetails:function(b,c){if(void 0!=b&&"OK"===c){var d=b[0].address_components,e=null,f=null,g=null,h=null,i=null;a.select(d).each(function(a,b){"route"==b.types[0]&&(e=b.long_name),"street_number"==b.types[0]&&(f=b.long_name),"postal_code"==b.types[0]&&(g=b.long_name),"locality"==b.types[0]&&(h=b.long_name),"administrative_area_level_1"==b.types[0]&&(i=b.short_name)});var j=a.select(".google-target-active"),k=a.select(j).closest(".autocomplete-address, .autocomplete-city"),l=a.select(j).attr("class").match("google-target-[0-9*]");l=l[0].split("-");var m=a.select(l).last()[0],n=a.select(".google-target-dummy-"+m,k),o=a.select(".google-target-hidden-"+m,k);j.css({display:"inline-block"}),j.removeClass("ignore-validation"),n.css({display:"none"}),n.addClass("ignore-validation"),""==n.val()||n.hasClass("error")||j.removeClass("error"),null!=f&&null!=e?("inline-block"==j.css("display"),j.val(f+" "+e),o.val(f+" "+e)):null==f&&null!=e?("inline-block"==j.css("display"),j.val(e),o.val(e)):null!=f&&null==e?("inline-block"==j.css("display"),j.val(f),o.val(e)):("inline-block"==j.css("display"),j.val(""),o.val(""));var p=a.select(".google-target-zip-"+m,k);p.val(g);var q=a.select(".google-target-state-"+m,k);q.val(i);var r=a.select(".google-target-city-"+m,k);a.select(k).hasClass("autocomplete-city")?r.val(h+", "+i+", USA"):r.val(h),a.select(j).removeClass("google-target-active"),a.select(j).blur(),a.publish({type:"autoFillSelectComplete",data:{inputField:j}})}},bindAutoComplete:function(c){var d=a.select(c).attr("data-google-selector");a.select(c).autocomplete({minLength:3,source:function(b,c){var e={input:b.term,componentRestrictions:{country:"us"}};"autocomplete-city"==d&&(e={input:b.term,types:["(cities)"],componentRestrictions:{country:"us"}});var f=new google.maps.places.AutocompleteService;f.getPlacePredictions(e,function(b,d){d==google.maps.places.PlacesServiceStatus.OK&&c(a.map(b,function(a,b){return{label:a.description,value:a.description,id:a.place_id,activeElement:this.document.activeElement}}))})},select:function(a,c){return b.selectAndPopulateFields(this,c),!1},open:function(a,c){b.styleThePredictions(this,d)}})},selectAndPopulateFields:function(b,c){a.select(b).addClass("google-target-active");var d=new google.maps.Geocoder;d.geocode({placeId:c.item.id},this.fetchAddressDetails)},addEventListenersToFields:function(){a.select("body").on("keypress",".autocomplete",function(b){13==b.keyCode&&(a.preventDefault(b),a.select(this).blur())}),a.select("body").on("focus",".autocomplete",function(b){if(a.select(this).val().length>=3){var c=a.select(this).attr("id"),d=[];a.each(a.select(".ui-autocomplete"),function(b,e){a.select(e).hasClass("ui-input-"+c)&&d.push(e)});var e=a.select(this).offset(),f={left:e.left,top:e.top+a.select(this).outerHeight(),display:"block"};a.select(d[0]).css(f)}}),a.select("body").on("keypress",".autocomplete-dummy",function(b){13==b.keyCode&&(a.preventDefault(b),a.select(this).blur())})},styleThePredictions:function(c,d){var e=a.select(c).attr("id");a.select(".ui-input-"+e).addClass("google-addressList");var f=a.select(".ui-input-"+e).innerWidth()-a.select(".ui-input-"+e).width();a.select(".ui-input-"+e).width(a.select(c).outerWidth()-f),a.select(".ui-input-"+e).append('<li class="google-powered-icon"></li>'),a.select(".ui-menu-item-wrapper").addClass("google-addressList-item"),a.each(a.select(".ui-menu-item-wrapper"),function(b,c){var d=a.select(c).text().substring(0,a.select(c).text().indexOf(",")),e=a.select(c).text().substring(a.select(c).text().indexOf(",")+1);a.select(c).html("<span class='google-Marker'></span><span class='google-highlight'>"+d+"</span>"+e)}),a.select(window).resize(function(){b.positionThePredictions(c)}),a.select(window).scroll(function(){b.positionThePredictions(c)})},positionThePredictions:function(b){var c=a.select(b).attr("id"),d=[];a.each(a.select(".ui-autocomplete"),function(b,e){a.select(e).hasClass("ui-input-"+c)&&d.push(e)});var e=a.select(d[0]).innerWidth()-a.select(d[0]).width();a.select(d[0]).width(a.select(b).outerWidth()-e);var f=a.select(b).offset(),g={left:f.left,top:f.top+a.select(b).outerHeight()};a.select(d[0]).css(g)},getAutoCompleteAddressConfigs:function(d){null!=d&&(b.addDynamicClasses(d.container),a.each(a.select(".autocomplete",d.container),function(e,f){a.select(f).attr("data-google-selector",d.selector),b.bindAutoComplete(f);var g=a.select(f).attr("id");void 0==g&&(c++,a.select(f).attr("id","autocomplete-input-"+c),g=a.select(f).attr("id")),a.each(a.select(".ui-autocomplete"),function(b,c){a.select(c).hasClass("bindComplete")||(a.select(c).addClass("bindComplete"),a.select(c).addClass("ui-input-"+g))})}),b.addEventListenersToFields()),a.publish({type:"autoFillActionComplete",data:{}})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.InputMask",function(a){var b="*[data-mask]";return{init:function(){console.log("INIT InputMask.js")},execute:function(){console.log("EXEC InputMask.js"),a.select("body").on("content-loaded",b,function(b){a.select(this).each(function(){var b=a.select(this),c={},d="data-mask-";"true"===b.attr(d+"reverse")&&(c.reverse=!0),"false"===b.attr(d+"maxlength")&&(c.maxlength=!1),"true"===b.attr(d+"clearifnotmatch")&&(c.clearIfNotMatch=!0),b.mask(b.attr("data-mask"),c)})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.LoadingThrobber",function(b){var c,d="loading-wrapper-active";return{init:function(){console.log("INIT LoadingThrobber.js"),c=this,b.subscribe({showThrobber:c.showThrobber,hideThrobber:c.hideThrobber})},execute:function(){console.log("EXEC LoadingThrobber.js"),c=this},showThrobber:function(c){a.utils.typeEqual(c.nodes,"string")&&(c.nodes=b.select(c.nodes)),a.utils.typeEqual(c.className,"string")&&(d=c.className),"ajax-component"===c.display?(c.nodes.addClass("ajax-component-wrapper-active"),null!=c.message?b.select('<p class="ajax-component-throbber-message">'+c.message+"</p>").prependTo(c.nodes):b.select('<p class="ajax-component-throbber-message">Please Wait...</p>').prependTo(c.nodes)):null!=c.display?(b.select("<div class='ajax-modal-underlay'></div>").appendTo("body"),b.select('<div class="ajax-modal-wrapper-active"><div class="loader"></div></div>').appendTo("body"),null!=c.message?b.select("<p>"+c.message+"</p>").appendTo(".ajax-modal-wrapper-active"):b.select("<p>Please Wait...</p>").appendTo(".ajax-modal-wrapper-active")):(null!=c.message?b.select("<p>"+c.message+"</p>").appendTo(b.select(".loader",c.nodes)):b.select("<p>Please Wait...</p>").appendTo(b.select(".loader",c.nodes)),c.nodes.addClass(d),b.select(window).height()<c.nodes.height()&&c.nodes.offset().top<b.select(window).height()?b.select(".loader",c.nodes).css("backgroundPosition","center "+(b.select(window).height()-c.nodes.offset().top)/2+"px"):b.select(".loader",c.nodes).css("backgroundPosition","center center"))},hideThrobber:function(c){a.utils.typeEqual(c.nodes,"string")&&(c.nodes=b.select(c.nodes)),a.utils.typeEqual(c.className,"string")&&(d=c.className),"ajax-component"===c.display?(c.nodes.removeClass("ajax-component-wrapper-active"),c.nodes.find(".ajax-component-throbber-message").remove()):null!=c.display?(b.select(".ajax-modal-wrapper-active").remove(),b.select(".ajax-modal-underlay").remove()):(c.nodes.find(".loader > p").remove(),c.nodes.removeClass(d)),b.select(".loader",c.nodes).css("backgroundPosition","center top")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.LoginCookie",function(a){var b,c=(a.select("form[name='sign-in']"),"loginCookie");return{init:function(){},execute:function(){console.log("EXEC LoginCookie.js"),b=this,a.select("body").on("submit",function(c){"sign-in"==a.select(c.target).attr("name")&&b.generateCodedName(c)});var d={};d[c]=b.setCookie,a.subscribe(d)},generateCodedName:function(b){var c;(dummy=a.select("input[name='username']:first")[0])&&(c=a.select("input[name='username']:first",b.target)[0].value),(dummy=a.select("input[name='USER']:first")[0])&&(c=a.select("input[name='USER']:first",b.target)[0].value),a.publish({type:"Base64",data:{id:"loginCookie",type:"encode",data:c,context:b.target}})},setCookie:function(b){if(void 0!=b){var c=new Date;c.setTime(c.getTime()+31536e6);var d="; expires="+c.toGMTString(),e="; expires="+new Date(0).toGMTString(),f=a.select("input[name='rememberme']:first",b.context)[0],g=window.location.host;g=g.substring(g.indexOf(".")),1==f.checked?navigator.cookieEnabled&&(document.cookie="cox-rememberme-user="+b.value+d+"; path=/; domain="+g):document.cookie="cox-rememberme-user="+b.value+e+"; path=/; domain="+g}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.MobileDatePickerModal",function(a){var b,c;return{init:function(){console.log("INIT MobileDatePickerModal.js"),b=this,a.subscribe({MobileDatePickerModal:b.startExecution,Orientation:b.resetDatePicker}),window.matchMedia&&(c=window.matchMedia("(orientation : portrait)").matches?a.select(window).width()<768&&a.select(window).height()>768:a.select(window).width()>768&&a.select(window).height()<600)},execute:function(){},startExecution:function(){a.select("body").on("click",".date-picker",function(b){if(a.select(window).width()<767){if(void 0===a.select(".datepicker-modal-component").attr("style")&&(a.select("#ui-datepicker-div").wrap("<div class='datepicker-modal-component' style='width: 100%; height: auto; left: 0px; display: block;'></div>"),a.select("#ui-datepicker-div").wrap("<div class='datepicker-modal-component-content'></div>"),a.select("<div class='datepicker-modal-component-title'>Pick Your Date</div>").insertBefore(".datepicker-modal-component-content"),a.select("<div class='datepicker-modal-component-head'><span title='Close' class='date-modal-close'></span></div>").insertBefore(".datepicker-modal-component-title"),a.select(".datepicker-modal-component-content").append("<div class='datepicker-modal-component-buttons'><a href='#' class='btn-primary date-modal-button'>Done</a><div class='btn-secondary-wrapper'><a class='btn-secondary date-modal-close'>Close</a></div></div>")),"none"==a.select("#ui-datepicker-div").css("display")&&a.select("#ui-datepicker-div").css("display","block"),c){var d=a.select(window).height()<a.select(".datepicker-modal-component").height()?"auto":a.select(window).height()+"px";a.select(".datepicker-modal-component").css({height:d})}var e=a.select(window).scrollTop();a.select(".datepicker-modal-component").css({display:"block",top:e})}}),a.select("body").on("click",".date-modal-button",function(b){b.preventDefault(),a.select(".datepicker-modal-component").css({display:"none"})}),a.select("body").on("click",".date-modal-close",function(b){a.select(".date-picker").val(""),a.select(".datepicker-modal-component").css({display:"none"})}),a.select("body").on("click",".date-picker",function(b){c&&a.select(".datepicker-modal-component").css({display:"block"})}),a.select("html").on("click",function(b){if(a.select(window).width()<767){var c=a.select(b.target);"block"!=a.select(".datepicker-modal-component").css("display")||c.is(".date-picker, .ui-datepicker-next, .ui-datepicker-prev")||0!=c.closest(".datepicker-modal-component").length||a.select(".datepicker-modal-component").hide()}})},resetDatePicker:function(b){c&&("landscape"==b.orientation?a.select(".date-modal-close").trigger("click"):a.select(".datepicker-modal-component").length>0?a.select(".datepicker-modal-component").css("display","none"):a.select("#ui-datepicker-div").css("display","none"))},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Modal",function(a){var b,c="[data-link-type='modal']";return{init:function(){console.log("INIT Modal.js")},execute:function(){console.log("EXEC Modal.js"),b=this,a.select("body").on("content-loaded",".auto-launch",function(){a.select(".auto-launch").click()}),a.select("body").on("click",c,function(c){c.preventDefault();var d=a.select(this).hasClass("container-link");(!d||d&&"IMG"!==c.target.nodeName)&&b.triggerModal(this,c)}),a.select("body").on("show.bs.modal",".modal",function(){"true"==a.select(".modal:visible").attr("current-modal-close")?a.select("#"+a.select(".modal:visible").attr("id")).modal("hide"):a.select("#"+a.select(this).attr("id")).appendTo("body")}),a.select("body").on("click",".close-modal",function(b){a.select(".open-alternate-content").trigger("click");var c=a.select(".modal.show"),d=a.select(c).find("a[data-dismiss='modal']");a.select(d).trigger("click")}),a.select(".auto-launch").length>0&&a.select(".auto-launch").trigger("click")},bootstrapShowHideModal:function(b,c,d){if("inlineModal"===c&&a.select(d).closest(".carousel-item").length>0){var e=a.select(d).closest(".carousel-item").find(b);b=e.length>0?e:b}a.select(b).off("show.bs.modal"),a.select(b).on("show.bs.modal",function(){a.select("body").attr("data-active-modal","#"+a.select(this).attr("id")),a.publish({type:"showModal",data:{modalID:a.select(b),modalType:c,triggerEle:d}}),a.publish({type:"initializeVideoPlayer",data:{modalID:a.select(b)}}),a.select("#pf-container").addClass("no-print"),a.select("#container").addClass("no-print"),a.select(".ajax-modal-wrapper-active").remove()}),a.select(b).off("hidden.bs.modal"),a.select(b).on("hidden.bs.modal",function(){a.select("body").removeAttr("data-active-modal",b),a.publish({type:"hideModal",data:{modalID:a.select(b),modalType:c,triggerEle:d}}),"ajaxModal"===c&&a.select(b).remove(),a.select("#pf-container").removeClass("no-print"),a.select("#container").removeClass("no-print")});var f=a.select(b),g=a.select(f).find("a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled])"),h=g[0],i=g[g.length-1],j=9;f.on("keydown",function(a){var b="Tab"===a.key||a.keyCode===j;b&&(a.shiftKey?document.activeElement===h&&(i.focus(),a.preventDefault()):document.activeElement===i&&(h.focus(),a.preventDefault()))}),a.select(b).modal("show")},triggerModal:function(c,d){var e,f=a.select(c).attr("data-url"),g=a.select(c),h=a.select(c).attr("href");"undefined"!=typeof f?e=f:(d.preventDefault(),e=h);var i="#"+e.split("#")[1];e=e.split("#")[0],"undefined"!=typeof e&&""!==e?(d.stopPropagation(),a.select('<div class="ajax-modal-wrapper-active"><p>Please Wait...</p><div class="loader"></div></div><div class="ajax-modal-underlay"></div>').appendTo("body"),a.ajax({container:a.select(".modal"),url:e,type:"GET",dataType:"html",context:c,success:function(c,d,e){var f=a.select("<div />").append(a.parseHTML(c)).find(i)[0];a.select("body").append(f),b.bootstrapShowHideModal(i,"ajaxModal",g),e.container=a.select(i)},error:function(){a.select(g).next(".text-danger").remove(),a.select(g).after("<div class=\"text-danger\"><p>We're sorry, we can't find this part of the page.</p></div>")},complete:function(){a.select(".ajax-modal-wrapper-active").remove(),a.select(".ajax-modal-underlay").remove()}})):b.bootstrapShowHideModal(i,"inlineModal",g)},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Navbar",function(a){var b,c,d=".navbar-jump-links",e="[data-sticky='top']";a.select(d);return{init:function(){console.log("INIT Navbar.js"),b=this,a.select("body").on("content-loaded",d,function(c){c.stopPropagation(),b.processNavbarContents(),b.stickComponents(),a.subscribe({Orientation:b.showHideControls})})},stickComponents:function(){if(a.select(e).length>0){var b=a.select(e).offset().top,c=a.select(window).scrollTop();c>b?(a.select("[data-visibility='hidden']").length>0&&a.select(e).find("[data-visibility='hidden']").removeClass("d-none"),a.select(e).addClass("fixed-top")):a.select("[data-visibility='hidden']").length>0&&a.select(e).find("[data-visibility='hidden']").addClass("d-none"),a.select(window).on("scroll touchmove",function(){var c=a.select(window).scrollTop();c>b?(a.select(e).find("[data-visibility='hidden']").removeClass("d-none"),a.select(e).addClass("fixed-top")):(a.select("[data-visibility='hidden']").length>0&&a.select(e).find("[data-visibility='hidden']").addClass("d-none"),a.select(e).removeClass("fixed-top"))})}},execute:function(){console.log("EXEC Navbar.js"),b=this},processNavbarContents:function(){c=a.select(".navbar-scroll",d),c[0].scrollWidth>c[0].clientWidth+1&&a.select(".navbar-control-next",d).removeClass("d-none");var e=window.location.hash,f=a.select("[href='"+e+"']");""!==e&&f.length>0&&f.is(":visible")?(e=b.replaceNavLinksHref(e),b.highlightActiveNavLink(f,e)):(b.highlightActiveNavLinkOnScroll(),a.select(window).on("scroll touchmove",b.highlightActiveNavLinkOnScroll)),a.select(d).on("click","nav a[href^='#!']",function(c){c.stopPropagation(),c.preventDefault();var d=a.select(this),e=b.replaceNavLinksHref(this.hash);b.highlightActiveNavLink(d,e),window.location.hash=d.attr("href")}),a.select(d).on("click","div[class^='navbar-control']",function(e){e.preventDefault();var f=0;a.select(".navbar-control-next",d).is(":visible")&&(f+=40),a.select(".navbar-control-prev",d).is(":visible")&&(f+=40),a.select(this).hasClass("navbar-control-next")===!0?c.stop(!0,!1).animate({scrollLeft:c.scrollLeft()+c[0].clientWidth-f},500):c.stop(!0,!1).animate({scrollLeft:c.scrollLeft()-c[0].clientWidth+f},500),b.showHideControls("501")})},highlightActiveNavLink:function(c,e){var f=a.select(e).offset();if("undefined"!=typeof f){a.select(window).off("scroll touchmove",b.highlightActiveNavLinkOnScroll);var g=f.top,h=b.calculateContentDivPosition(g);a.select("html, body").stop(!0,!1).animate({scrollTop:h+"px"},500),setTimeout(function(){var c=a.select(window).scrollTop();a.select(e).attr("tabindex","-1"),a.select(e).focus(),a.select(e).removeAttr("tabindex");var d=a.select(e).offset().top,f=b.calculateContentDivPosition(d);c!=f&&(c=f),window.scrollTo(0,c),a.select(window).on("scroll touchmove",b.highlightActiveNavLinkOnScroll)},550),a.select("nav a",d).removeClass("active"),c.addClass("active");var i=a.select(".navbar-scroll",d);i[0].scrollWidth>i[0].clientWidth&&i.stop(!0,!1).animate({scrollLeft:c.parent().offset().left+i.scrollLeft()-40},100),b.showHideControls("101")}},calculateContentDivPosition:function(b){if(a.select("[data-sticky='top']").length>0){var c=a.select("[data-sticky='top']").hasClass("fixed-top");b-=c?a.select(d).height():2*a.select(d).height()}return b},highlightActiveNavLinkOnScroll:function(e){"undefined"!=typeof e&&a.select(e.target).parents(d).length>0?b.showHideControls("1"):a.select("nav a[href^='#!']",d).each(function(e,f){var g=a.select(window).scrollTop()+20,h=a.select(f).attr("href");h=b.replaceNavLinksHref(h);var i=a.select(h);if("undefined"!=typeof i.offset()){var j=0;a.select("[data-sticky='top']").length>0&&a.select("[data-sticky='top']").hasClass("fixed-top")&&(j=a.select(d).height()),i.offset().top<=g+j&&i.offset().top+i.height()>g+j?(a.select(this).addClass("active"),c[0].scrollWidth>c[0].clientWidth&&c.stop(!0,!1).animate({scrollLeft:a.select(this).parent().offset().left+c.scrollLeft()-40},100),b.showHideControls("101")):(a.select(this).removeClass("active"),a.select(this).blur())}})},showHideControls:function(b){setTimeout(function(){c[0].scrollWidth<=c.scrollLeft()+c[0].clientWidth+5?a.select(".navbar-control-next",d).addClass("d-none"):a.select(".navbar-control-next",d).removeClass("d-none"),c.scrollLeft()<=5?a.select(".navbar-control-prev",d).addClass("d-none"):a.select(".navbar-control-prev",d).removeClass("d-none")},b)},replaceNavLinksHref:function(a){if(/^#!*/.test(a)===!0)return a.replace("!","")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Orientation",function(a){var b;return{init:function(){console.log("INIT Orientation.js"),b=this,a.subscribe({Orientation:b.orientationChange})},
execute:function(){console.log("EXEC Orientation.js");var c,d="landscape";b=this,window.matchMedia&&window.matchMedia("all").addListener&&(c=window.matchMedia("(orientation: portrait)"),d=c.matches?"portrait":"landscape",c.addListener(function(b){var c=b.matches?"portrait":"landscape";a.publish({type:"Orientation",data:{orientation:c}})})),b.orientationChange({orientation:d})},orientationChange:function(b){a.browser.orientation=b.orientation},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.Pagination",function(a){var b,c;return{init:function(){console.log("INIT Pagination.js"),b=this,a.subscribe({initPagination:b.initPagination})},execute:function(){console.log("EXEC Pagination.js"),b=this,c=a.select(".paging"),b.showPageNumbers(),a.select(window).resize(function(a){b.showPageNumbers()}),a.select("body").on("content-loaded",".paging",function(){b.showPageNumbers(),a.select(".page-item.disable-custom").find("a").on("click",function(a){a.preventDefault()}),b.buttonEnableDisableMethod(),a.select(".page-item").not(".first,.previous,.next,.last").on("click",function(){a.select(".page-item.active").find("span").remove(),a.select(".page-item").removeClass("active"),a.select(this).addClass("active"),a.select(this).children("a").append("<span class=sr-only>(current)</span>"),b.buttonEnableDisableMethod()}),a.select(".page-item.first").on("click",function(){var c=a.select(".paging .pagination-count li.active");a.select(c).find("span").remove(),a.select(c).removeClass("active");var d=a.select(".pagination li:first-child").not(".first,.previous,.next,.last");d.addClass("active"),d.children("a").append("<span class=sr-only>(current)</span>"),b.buttonEnableDisableMethod(),b.showPageNumbers()}),a.select(".page-item.previous").on("click",function(){var c=a.select(".paging .pagination-count li.active").not(".first,.previous,.next,.last");if(c.prev().length>0){var d=c.prev();a.select(c).find("span").remove(),a.select(c).removeClass("active"),a.select(d).addClass("active"),a.select(d).children("a").append("<span class=sr-only>(current)</span>")}b.buttonEnableDisableMethod(),b.showPageNumbers()}),a.select(".page-item.next").on("click",function(){var c=a.select(".paging .pagination-count li.active").not(".first,.previous,.next,.last");if(c.next().length>0){var d=c.next();a.select(c).find("span").remove(),a.select(c).removeClass("active"),a.select(d).addClass("active"),a.select(d).children("a").append("<span class=sr-only>(current)</span>")}b.buttonEnableDisableMethod(),b.showPageNumbers()}),a.select(".page-item.last").on("click",function(){var c=a.select(".paging .pagination-count li.active");a.select(c).find("span").remove(),a.select(c).removeClass("active");var d=a.select("li:last-child").not(".first,.previous,.next,.last");a.select(d).addClass("active"),a.select(d).children("a").append("<span class=sr-only>(current)</span>"),b.buttonEnableDisableMethod(),b.showPageNumbers()})})},showPageNumbers:function(){b.buttonEnableDisableMethod();var c=[],d=a.select(window).width()>960?960:a.select(window).width(),e=a.select("div.paging[class^='col-md-']").length>0?a.select("div.paging[class^='col-md-']").width():d;e="mobile"==a.select("body").attr("data-layout")?e-.08*e:e-20;var f=e-240,g=a.select(".paging .pagination-count li.active"),h=g.width(),i=Math.floor(f/h);i=i>0?i:1;var j=a.select(".paging .pagination-count li").length>i?i:a.select(".paging .pagination-count li").length,k=j*h;a.select(".paging .pagination-count").css("width",k+"px");var l=g;c.push(g);var m=1;if(a.select(g).is("li:first-child"))for(;m<j;)l=a.select(l).next(),c.push(l),m++;else if(a.select(g).is("li:last-child"))for(;m<j;)l=a.select(l).prev(),c.push(l),m++;else{for(var n=g,o=g,p=1;m<j/2&&a.select(n).prev().length>0;)n=a.select(n).prev(),c.push(n),m++,p=m;for(;p<j;)a.select(o).next().length>0?(o=a.select(o).next(),c.push(o),p++):(n=a.select(n).prev(),c.push(n),p++)}a.select(".paging .pagination-count li").css("display","none"),a.each(c,function(b,c){a.select(c).css("display","inline-block")}),a.select("body").hasClass("IE")&&a.select(".paging .disable-custom").attr("disabled","disabled")},buttonEnableDisableMethod:function(){var b=a.select(".paging .pagination-count li.active");a.select(b).is("li:first-child")?(a.select(".page-item.first").addClass("disable-custom"),a.select(".page-item.previous").addClass("disable-custom"),a.select(".page-item.next").removeClass("disable-custom"),a.select(".page-item.last").removeClass("disable-custom"),a.select(".page-item.previous a.prev-active").addClass("d-none"),a.select(".page-item.previous a.prev-disabled").removeClass("d-none"),a.select(".page-item.first a.first-active").addClass("d-none"),a.select(".page-item.first a.first-disabled").removeClass("d-none"),a.select(".page-item.last a.last-disabled").addClass("d-none"),a.select(".page-item.last a.last-active").removeClass("d-none"),a.select(".page-item.next a.next-active").removeClass("d-none"),a.select(".page-item.next a.next-disabled").addClass("d-none")):a.select(b).is("li:last-child")?(a.select(".page-item.next").addClass("disable-custom"),a.select(".page-item.last").addClass("disable-custom"),a.select(".page-item.first").removeClass("disable-custom"),a.select(".page-item.previous").removeClass("disable-custom"),a.select(".page-item.next a.next-active").addClass("d-none"),a.select(".page-item.next a.next-disabled").removeClass("d-none"),a.select(".page-item.last a.last-active").addClass("d-none"),a.select(".page-item.last a.last-disabled").removeClass("d-none"),a.select(".page-item.first a.first-disabled").addClass("d-none"),a.select(".page-item.first a.first-active").removeClass("d-none"),a.select(".page-item.previous a.prev-active").removeClass("d-none"),a.select(".page-item.previous a.prev-disabled").addClass("d-none")):(a.select(".page-item.first").removeClass("disable-custom"),a.select(".page-item.previous").removeClass("disable-custom"),a.select(".page-item.next").removeClass("disable-custom"),a.select(".page-item.last").removeClass("disable-custom"),a.select(".page-item.previous a.prev-active").removeClass("d-none"),a.select(".page-item.previous a.prev-disabled").addClass("d-none"),a.select(".page-item.next a.next-active").removeClass("d-none"),a.select(".page-item.next a.next-disabled").addClass("d-none"),a.select(".page-item.first a.first-active").removeClass("d-none"),a.select(".page-item.first a.first-disabled").addClass("d-none"),a.select(".page-item.last a.last-active").removeClass("d-none"),a.select(".page-item.last a.last-disabled").addClass("d-none"))},initPagination:function(){b.execute()},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Print",function(a){var b;return{init:function(){console.log("INIT print.js")},execute:function(){console.log("EXEC print.js"),b=this,a.select("body").on("click",".btn-print, .print-trigger",function(c){a.select(window).scrollTop(0),b.print()})},print:function(a){window.print()},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.RadioBox",function(a){var b;return{init:function(){console.log("INIT RadioBox.js")},execute:function(){console.log("EXEC RadioBox.js"),a.select("body").on("click",".radio-boxes",function(c){a.preventDefault(c),b=a.select(this)[0],a.select(b).addClass("active-radio"),a.select(b).siblings().removeClass("active-radio");var d=a.select(b).children().attr("id"),e=a.select(b).attr("class").split(" ")[0];a.select(":input."+e).val(d)})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.RealRadioBox",function(a){var b,c=".group-chooser";return{init:function(){console.log("INIT RealRadioBox.js")},execute:function(){console.log("EXEC RealRadioBox.js"),b=this,a.select("body").on("content-loaded init-group-choose-block",c,function(c){var d=a.select(this).find('input[type="radio"]'),e=a.select(this).find("input.choice-value");a.select(d).each(function(c,d){"checked"==a.select(d).attr("checked")?b.handleRadioBtnSelection(a.select(d).parent()[0]):b.clearOutInputField(a.select(d).parent())}),a.select(d).focus(function(b){var c=a.select(this).parent();a.select(c).addClass("focused-choice")}),a.select(e).focus(function(b){var c=a.select(this).parent().parent();a.select(c).addClass("focused-choice")}),a.select(d).blur(function(b){var c=a.select(this).parent();a.select(c).hasClass("focused-choice")&&a.select(c).removeClass("focused-choice"),a.select(c).hasClass("active-choice")&&a.select(c).removeClass("focused-choice")}),a.select(e).blur(function(b){var c=a.select(this).parent().parent();a.select(c).hasClass("focused-choice")&&a.select(c).removeClass("focused-choice")}),a.select(d).change(function(b){var c=a.select(this).parent();a.select(c).hasClass("active-choice")&&a.select(c).removeClass("focused-choice")})}),a.select(c).length>0&&a.select(c).trigger("init-group-choose-block"),a.select("body").on("click",".group-choice",function(c){a.select(".triggered-choice").length>0&&a.select(".triggered-choice").removeClass("triggered-choice"),a.select(this).addClass("triggered-choice"),b.handleRadioBtnSelection(this)})},handleRadioBtnSelection:function(c){var d=a.select(c).closest(".group-chooser"),e=a.select(d).find(".group-choice");a.select(e).each(function(d,e){if(e==c){a.select(e).addClass("active-choice");var f=a.select(e).find('input[type="radio"]')[0];a.select(f).prop("checked","checked"),a.select(f).attr("checked","checked")}else{a.select(e).removeClass("active-choice");var g=a.select(e).find('input[type="radio"]')[0];a.select(g).removeAttr("checked"),b.clearOutInputField(e)}}),(a.select(c).hasClass("triggered-choice")||a.select(c).data("slideNavigate"))&&b.makeInputfieldFocused(c),b.addInputFieldValidation(d),a.publish({type:"radioBoxActionComplete",data:{el:c}})},addInputFieldValidation:function(b){var c=a.select(b).find(".group-choice .choice-value");a.select(c).each(function(b,c){if(a.select(c).is("input")){var d=a.select(c).closest(".group-choice").find('input[type="radio"]');"checked"==a.select(d).attr("checked")?a.select(c).addClass("required").removeClass("ignore-validation"):a.select(c).removeClass("required").addClass("ignore-validation")}})},clearOutInputField:function(b){a.select(b).find("input.choice-value").val("")},makeInputfieldFocused:function(b){var c=a.select(b).find("input");1!=c.length||navigator.userAgent.match(/iPad/i)||a.select(c).focus()},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.SingleToggle",function(a){var b,c=".single-toggle";return{init:function(){console.log("INIT SingleToggle.js")},execute:function(){console.log("EXEC SingleToggle.js"),a.select("body").on("content-loaded",c,function(b){a.select(".toggle-div").slideToggle(1)}),a.select("body").on("click",".toggle-single-click",function(c){if(a.preventDefault(c),b=a.select(this),b.hasClass("expand-view")?b.removeClass("expand-view").addClass("collapse-view"):b.hasClass("collapse-view")?b.removeClass("collapse-view").addClass("expand-view"):b.addClass("expand-view"),a.select(b).parents(".toggle-container").length>0){var d=a.select(b).parents(".toggle-container");a.select(".toggle-div",d).slideToggle(500,function(){setTimeout(function(){a.select("body.IE8").length>0&&a.select(d).parentsUntil("#pf-container").css("zoom","").css("zoom","1")},0),a.publish({type:"SlideToggleComplete",data:{trigger:b}})})}else a.select(".toggle-div").slideToggle(500,function(){a.publish({type:"SlideToggleComplete",data:{trigger:b}})})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.SortTable",function(a){var b,c=".tablesorter, .tablesorter table";return{init:function(){console.log("INIT SortTable.js"),b=this},execute:function(){console.log("EXEC SortTable.js"),b=this,a.select("body").on("content-loaded",c,function(b){var c=a.select(this),d={};a.select("th.no-sorting",this).each(function(){d[this.cellIndex]={sorter:!1}}),a.select(c).tablesorter({cssAsc:"sort-asc",cssDesc:"sort-desc",textExtraction:function(b){if(a.select(b).text().indexOf("/")!=-1){var c=a.select(b).text();return c.replace("/"," ")}var d=a.select(b).text().replace(/[,$]/g,""),e=d.replace("(","-");return e.replace(")","")},headers:d})}),a.select("body").on("sortEnd",c,function(b){a.select(".tablesorter thead tr th.header").each(function(b){var c=a.select(this),d=c.is(".sort-asc"),e=c.is(".sort-desc"),f=a.select("a",this)[0];f.title=f.title.replace(/ - Sort .*/g,""),d?f.title+=" - Sort Ascending":e&&(f.title+=" - Sort Descending")})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Spinner",function(a){var b,c,d;return{init:function(){},execute:function(){console.log("EXEC Spinner.js"),b=this,a.select("body").on("click",".sb-button",function(d){c=a.select(this),b.enableDisableButtons(),b.getSpinBoxConfigs(),a.select(".sb-input").valid()}),a.select("body").on("content-loaded",".sb-wrapper",function(a){b.enableDisableButtons()}),a.select("body").on("blur",".sb-input",function(a){b.enableDisableButtons()})},enableDisableButtons:function(){var b=a.select(".sb-input"),c=b.attr("min")?Number(b.attr("min")):null,d=b.attr("max")?Number(b.attr("max")):null,e=(b.attr("step")?Number(b.attr("step")):1,Number(a.trim(a.select(".sb-input").val())));c!=e&&c<e?(a.select('[data-spin-type="decrease"]').prop("disabled",!1),a.select('[data-spin-type="decrease"]').removeClass("disabled")):(c==e||c>e)&&(a.select('[data-spin-type="decrease"]').prop("disabled",!0),a.select('[data-spin-type="decrease"]').addClass("disabled")),d!=e&&e<d?(a.select('[data-spin-type="increase"]').prop("disabled",!1),a.select('[data-spin-type="increase"]').removeClass("disabled")):(d==e||e>d)&&(a.select('[data-spin-type="increase"]').prop("disabled",!0),a.select('[data-spin-type="increase"]').addClass("disabled"))},getSpinBoxConfigs:function(){var e=c.attr("data-spin-type");d=c.closest(".sb-wrapper");var f=a.select(".sb-input",d)[0],g=f.getAttribute("min")?Number(f.getAttribute("min")):null,h=f.getAttribute("max")?Number(f.getAttribute("max")):null,i=f.getAttribute("step")?Number(f.getAttribute("step")):1,j=Number(a.trim(a.select(".sb-input").val()));switch(e){case"increase":j<h&&(j+=i,a.select(".sb-input").val(j),b.enableDisableButtons());break;case"decrease":j>g&&(j-=i,a.select(".sb-input").val(j),b.enableDisableButtons())}a.publish({type:"ProductSpinner",data:{type:e,data:{trigger:c,sb:f,min:g,max:h,step:i,val:j}}})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Tab",function(a){var b,c,d,e,f,g=".tabs",h={end:35,home:36,left:37,up:38,right:39,down:40,delete:46,enter:13,space:32},i={37:-1,38:-1,39:1,40:1};return{init:function(){console.log("INIT tab.js")},execute:function(){console.log("EXEC tab.js"),b=this,a.select("body").on("content-loaded",g,function(c){if(c.currentTarget===c.target){b.generateArrays();for(var d=0;d<e.length;++d)a.select(e[d]).hasClass("disabled")||b.addListeners(e[d]),e[d].index=d;c.stopPropagation(),b.processNavbarContents()}})},processNavbarContents:function(){c=a.select(".tab-scroll",g),c[0].scrollWidth>c[0].clientWidth+1&&a.select(".tab-control-next",g).removeClass("d-none"),a.select(".tab-scroll").on("scroll touchmove",function(){var d=a.select(this).parents(".tabs").attr("id");c=a.select("#"+d+" .tab-scroll"),b.showHideControls("501",d,c)}),a.select(g).on("click","div[class^='tab-control']",function(e){e.preventDefault(),d=a.select(this).parents(".tabs").attr("id"),c=a.select("#"+d+" .tab-scroll");var f=0;a.select("#"+d+".tab-control-next",g).is(":visible")&&(f+=40),a.select("#"+d+" .tab-control-prev",g).is(":visible")&&(f+=40),a.select(this).hasClass("tab-control-next")===!0?c.stop(!0,!1).animate({scrollLeft:c.scrollLeft()+c[0].clientWidth-f},500):c.stop(!0,!1).animate({scrollLeft:c.scrollLeft()-c[0].clientWidth+f},500),b.showHideControls("501",d)})},showHideControls:function(b,c,d){setTimeout(function(){d[0].scrollWidth<=d.scrollLeft()+d[0].clientWidth+5?a.select("#"+c+" .tab-control-next").addClass("d-none"):a.select("#"+c+" .tab-control-next").removeClass("d-none"),d.scrollLeft()<=5?a.select("#"+c+" .tab-control-prev").addClass("d-none"):a.select("#"+c+" .tab-control-prev").removeClass("d-none")},b)},generateArrays:function(){e=a.select('[role="tab"]'),f=a.select('[role="tabpanel"]')},generateArraysInFocus:function(b){for(var c=b.target,d=a.select(c).closest("[role='tablist']").find("[role='tab']"),e=a.select(c).attr("aria-controls"),f=a.select("#"+e).closest(".tab-content").find("[role='tabpanel']"),g=[],h=0;h<d.length;++h)a.select(d[h]).hasClass("disabled")||g.push(d[h]);return{tabs:g,tabpanels:f}},addListeners:function(c){a.select(c).on("click",function(a){b.clickEventListener(a)}),a.select(c).on("keydown",function(a){b.keydownEventListener(a)}),a.select(c).on("keyup",function(a){b.keyupEventListener(a)})},clickEventListener:function(a){var c=a.target,d=b.generateArraysInFocus(a);e=d.tabs,f=d.tabpanels,b.activateTab(c,!1)},keydownEventListener:function(a){var c=a.keyCode,d=b.generateArraysInFocus(a);switch(e=d.tabs,f=d.tabpanels,c){case h.end:for(a.preventDefault(),x=0;x<e.length;x++)e[x].addEventListener("focus",b.focusEventHandler);b.focusLastTab();break;case h.home:for(a.preventDefault(),x=0;x<e.length;x++)e[x].addEventListener("focus",b.focusEventHandler);b.focusFirstTab();break;case h.up:case h.down:b.determineOrientation(a)}},keyupEventListener:function(a){var c=a.keyCode,d=b.generateArraysInFocus(a);switch(e=d.tabs,f=d.tabpanels,c){case h.left:case h.right:b.determineOrientation(a);break;case h.enter:case h.space:b.activateTab(a.target)}},determineOrientation:function(c){var d=c.keyCode,e=a.select(c.target).closest("[role='tablist']"),f="vertical"==a.select(e).attr("aria-orientation"),g=!1;f?d!==h.up&&d!==h.down||(c.preventDefault(),g=!0):d!==h.left&&d!==h.right||(g=!0),g&&b.switchTabOnArrowPress(c,e)},switchTabOnArrowPress:function(c,d){var f=c.keyCode;for(x=0;x<e.length;x++)e[x].addEventListener("focus",b.focusEventHandler);if(i[f]){var g=c.target,j=0;a.each(a.select(a.select(d).find("[role='tab']").not(".disabled")),function(a,b){b==g&&(j=a)}),void 0!==j&&(e[j+i[f]]?a.select(e[j+i[f]]).focus():f===h.left||f===h.up?b.focusLastTab():f!==h.right&&f!=h.down||b.focusFirstTab())}},activateTab:function(c,d){d=d||!0,b.deactivateTabs(),a.select(c).attr("aria-selected","true");var e=a.select(c).attr("aria-controls");a.select("#"+e).addClass("active show"),a.select(c).addClass("active show"),d&&a.select(c).focus()},deactivateTabs:function(){for(var c=0;c<e.length;c++)a.select(e[c]).attr("aria-selected","false"),a.select(e[c]).removeClass("active show"),e[c].removeEventListener("focus",b.focusEventHandler);for(p=0;p<f.length;p++)a.select(f[p]).removeClass("active show")},focusFirstTab:function(){a.select(e[0]).focus()},focusLastTab:function(){a.select(e[e.length-1]).focus()},determineDelay:function(b){var c=a.select(b).attr("data-delay"),d=0;return d=c?c:300},focusEventHandler:function(c){var d=c.target,e=a.select(d).closest("[role='tablist']"),f=b.determineDelay(e);setTimeout(b.checkTabFocus,f,d)},checkTabFocus:function(a){focused=document.activeElement,a===focused&&b.activateTab(a,!1)},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.TemplateRenderer",function(b){var c;return{init:function(){console.log("INIT TemplateRenderer.js"),c=this,b.subscribe({AjaxComplete:c.renderTemplates,shopOffersTemplate:c.processShopOfferJSON,showHTML:c.showHTML}),c.registerHandleBarHelpers()},execute:function(){console.log("EXEC TemplateRenderer.js"),b.select(".templateSection:not(.rendered)").each(function(a,b){var d={};d.container=this,c.renderTemplates(d)}),b.select("body").on("content-loaded",".templateSection",function(){var a=b.select(".templateSection:not(.rendered)");a.length>0&&b.select(a).each(function(a,b){var d={};d.container=this,c.renderTemplates(d)})})},renderTemplates:function(a){if("undefined"!=typeof a.container&&(b.select(".templateSection",a.container).length>0||b.select(a.container).hasClass("templateSection"))){var d=a.container,e=b.select(".templateData",d);if("undefined"!=typeof e){var f=JSON.parse(e.html());b.select(d).data("processJson")?c.processJSON(b.select(d).attr("id"),f):c.showHTML(a,f)}}},showHTML:function(c,d){if("undefined"!=typeof c.container){var e,f=c.container;e="undefined"!=typeof c.json?c.json:d;var g=b.select(".templateHtml",f).html();if("undefined"!=typeof g&&"undefined"!=typeof e){var h=b.render(g,e);"undefined"!=typeof h&&(b.select(".templateOutput",f).append(h),b.select(f).addClass("rendered"))}b.publish({type:"renderTemplateComplete",data:{container:c.container}}),b.each(a.core.events.contentLoaded(),function(a,d){b.select(c.container).find(d.selector).length>0&&b.select(d.selector).trigger("content-loaded")});var i,j=window.navigator.userAgent;j.indexOf("MSIE")>0||j.indexOf("Trident/")>0||j.indexOf("Edge/")>0?(i=document.createEvent("Event"),i.initEvent("ExecuteAdobeTarget",!0,!0)):i=new Event("ExecuteAdobeTarget"),window.dispatchEvent(i)}},processJSON:function(c,d){a.utils.typeEqual(c,"string")&&b.publish({type:c,data:{json:d,id:c}})},registerHandleBarHelpers:function(){Handlebars.registerHelper("ifOperator",function(a,b,c,d){switch(b){case"==":return a==c?d.fn(this):d.inverse(this);case"===":return a===c?d.fn(this):d.inverse(this);case"!=":return a!=c?d.fn(this):d.inverse(this);case"!==":return a!==c?d.fn(this):d.inverse(this);case"<":return a<c?d.fn(this):d.inverse(this);case"<=":return a<=c?d.fn(this):d.inverse(this);case">":return a>c?d.fn(this):d.inverse(this);case">=":return a>=c?d.fn(this):d.inverse(this);case"&&":return a&&c?d.fn(this):d.inverse(this);case"||":return a||c?d.fn(this):d.inverse(this);default:return d.inverse(this)}})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.ToggleDiv",function(a){var b,c,d;return{init:function(){console.log("INIT ToggleDiv.js"),b=this,a.subscribe({ToggleDiv:b.toggleDiv})},execute:function(){console.log("EXEC ToggleDiv.js"),b=this,a.select("body").on("click",".showhide-trigger",function(b){c=a.select(this),d=c.parents(".dialog-component").length>0?c.parents(".dialog-component"):c.closest(".toggle-container"),"A"==a.select(c).prop("tagName")&&a.preventDefault(b),a.publish({type:"ToggleDiv",data:{element:c[0],context:d[0]}})}),a.select("body").on("change",".showhide-select",function(b){c=a.select(this),d=c.parents(".dialog-component").length>0?c.parents(".dialog-component"):c.closest(".toggle-container"),"A"==a.select(c).prop("tagName")&&a.preventDefault(b),a.publish({type:"ToggleDiv",data:{element:c[0],context:d[0]}})})},toggleDiv:function(c){switch(c.element.tagName){case"SELECT":var d=a.select(c.element).find(":selected");b.showHideMultipleDivs(d,c.context);break;case"A":b.showHideMultipleDivs(c.element,c.context);break;case"INPUT":var e=a.select(c.element).attr("type");if("radio"==e)b.showHideMultipleDivs(c.element,c.context);else if("checkbox"==e){var f=a.select(c.element).attr("data-show-chkBox"),g=a.select("."+f,c.context);1==a.select(c.element).prop("checked")?b.showMultipleDivs(g):b.hideMultipleDivs(g)}break;case"DIV":b.showHideMultipleDivs(c.element,c.context)}a.publish({type:"ToggleDivComplete",data:{context:c.context,trigger:c.element}})},showHideMultipleDivs:function(c,d){a.select(d).css("zoom","1");var e=a.select(c).attr("data-hide-div");if(null!=e){var f=e.split(" ");null!=f&&a.each(f,function(c,e){var f=a.select("."+e,d);b.hideMultipleDivs(f)})}var g=a.select(c).attr("data-show-div");if(null!=g){var h=g.split(" ");null!=h&&a.each(h,function(c,e){var f=a.select("."+e,d);b.showMultipleDivs(f)})}},hideMultipleDivs:function(c){a.select(c).hide();var d=a.select(c).attr("data-clear-fields");"undefined"!=typeof d&&d&&b.clearOutFormFields(c);var e=a.select(".required",c);null!=e&&0!=e.length&&a.each(e,function(b,c){a.select(c).addClass("ignore-validation"),a.select(c).hasClass("error")&&(a.select(c).removeClass("error"),a.select(c).siblings(".error-wrapper").css("display","none"),a.select(c).parent().prev().removeClass("errorMsg"),a.select(".display-placeholder").hasClass("error")&&a.select(".display-placeholder").removeClass("error"),a.select(".error-header").css("display","none"))});var d=a.select(c).attr("data-clear-fields");"undefined"!=typeof d&&"true"==d&&b.clearFormFields(c)},showMultipleDivs:function(b){a.select(b).show();var c=a.select(".required",b);null!=c&&0!=c.length&&a.each(c,function(b,c){a.select(c).hasClass("autocomplete-dummy")||a.select(c).hasClass("ignore-validation")&&a.select(c).removeClass("ignore-validation")})},clearOutFormFields:function(b){a.select("input[type=text], input[type=tel], select",b).each(function(b,c){a.select(c).val("")}),a.select("input[type=checkbox], input[type=radio]",b).each(function(b,c){a.select(c).prop("checked",!1),a.select(c).attr("checked","")})},clearFormFields:function(b){a.select("input[type=text], input[type=tel], input[type=password], select",b).each(function(b,c){a.select(c).is(":visible")||a.select(c).val("")}),a.select("input[type=checkbox], input[type=radio]",b).each(function(b,c){a.select(c).is(":visible")||(a.select(c).prop("checked",!1),a.select(c).attr("checked",""))})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.ToggleSwitch",function(a){var b,c=".toggle-switch";return{init:function(){console.log("INIT ToggleSwitch.js"),b=this,a.subscribe({getRadioBtnChange:b.publishedToggleSwitchChange})},execute:function(){console.log("EXEC ToggleSwitch.js"),a.select("body").on("content-loaded",c,function(d){a.select(c).each(function(c,d){var e=a.select(d).find(".toggle-bar"),f=a.select(d).find("input[type='radio']"),g=a.select(d).find(".toggle-track"),h=a.select(d).find(".track-text");a.select(e).off("click"),a.select(g).off("click"),a.select(h).off("click"),b.getSelectedRadioBtn(d),a.select(e).on("click",function(c){var d=a.select(this).closest(".toggle-switch");a.select(d).hasClass("toggle-off")?b.toggleOn(d):b.toggleOff(d)}),a.select(g).on("click",function(c){var d=a.select(this).closest(".toggle-switch");a.select(d).hasClass("toggle-off")?b.toggleOn(d):b.toggleOff(d)}),a.select(h).on("click",function(c){var d=a.select(this).closest(".toggle-switch");a.select(d).hasClass("toggle-off")?b.toggleOn(d):b.toggleOff(d)}),a.select(f).on("change",function(c){var e,g=this;a.select(f).each(function(b,c){c==g?(e=a.select(c).attr("id"),a.select(c).prop("checked","checked"),a.select(c).attr("checked","checked")):a.select(c).removeAttr("checked")}),b.setToggleSwitch(e,d)})})})},getSelectedRadioBtn:function(c){var d,e=a.select(c).find("input[type='radio']"),f=a.select(e)[0];a.select(e).each(function(b,c){a.select(c).is(":checked")||"checked"==a.select(c).attr("checked")||"checked"==a.select(c).prop("checked")?(d=a.select(c).attr("id"),a.select(c).prop("checked","checked"),a.select(c).attr("checked","checked")):a.select(c).removeAttr("checked")}),d||(d=a.select(f).attr("id"),a.select(f).prop("checked","checked"),a.select(f).attr("checked","checked")),b.setToggleSwitch(d,c)},setSelectedRadioBtn:function(b,c){a.select(b).each(function(b,d){a.select(d).attr("value")==c?(a.select(d).prop("checked","checked"),a.select(d).attr("checked","checked")):a.select(d).removeAttr("checked")})},publishedToggleSwitchChange:function(a){b.setToggleSwitch(a.selectedBtn,a.context)},setToggleSwitch:function(c,d){"true"==a.select("#"+c).attr("value")?b.toggleOn(d):b.toggleOff(d)},toggleOn:function(c){var d=a.select(c).find("input[type='radio']");a.select(c).removeClass("toggle-off"),a.select(c).addClass("toggle-on"),b.setSelectedRadioBtn(d,"true")},toggleOff:function(c){var d=a.select(c).find("input[type='radio']");a.select(c).addClass("toggle-off"),a.select(c).removeClass("toggle-on"),b.setSelectedRadioBtn(d,"false")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.base.Tooltip",function(a){var b,c="[data-toggle='tooltip']";return{init:function(){console.log("INIT ToolTip.js"),b=this},execute:function(){console.log("EXEC ToolTip.js"),b=this,a.select("body").on("click",c,function(a){a.preventDefault()}),a.select("body").on("content-loaded",c,function(b){a.select(c).tooltip()}),a.select("body").on("click",".close-tooltip",function(b){a.select(c).tooltip("hide")})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.test.TestHandlebars",function(a){var b;return{init:function(){console.log("INIT TestHandlebars.js")},execute:function(){console.log("EXEC TestHandlebars.js"),b=this,a.select("body").on("click",".showTemplate",function(b){var c=JSON.parse(a.select(".jsonValue").val()),d=a.select("#address-template").html(),e=a.render(d,c),f=a.select(".content-placeholder");f.append(e)})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.install.common.Chat",function(a){var b,c,d,e=".content-body .chat-window",f=1e3,g=!1;return{init:function(){b=this,console.log("INIT Chat.js")},execute:function(){console.log("EXEC Chat.js"),a.select("body").on("content-loaded",e,function(h){c=setInterval(function(){a.select(e).is(":visible")&&(d=setInterval(function(){a.select(".bcFloat").length>0&&(g?b.stopInterval():(a.select(".bcFloat a").click(),b.publishNewRelic("success"),g=!0,b.stopInterval(),console.log("chat window clicked.")))},f),setTimeout(function(){g||b.publishNewRelic("failure"),b.stopInterval()},3e4))},f)})},stopInterval:function(){clearInterval(c),clearInterval(d)},publishNewRelic:function(b){var c=[{event:"install-contact-chat",value:b}];a.publish({type:"track_new_relic",data:c})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.install.common.EnableMacAddressBtn",function(a){var b,c=".mac-address";return{init:function(){b=this,console.log("INIT EnableMacAddressBtn.js")},execute:function(){console.log("EXEC EnableMacAddressBtn.js"),a.select("body").on("content-loaded",c,function(d){a.select(c).on("keyup",function(c){var d=a.select(this).hasClass("error");d?a.select(this).addClass("mac-address-error"):a.select(this).removeClass("mac-address-error"),b.additionalValidation(this)}),a.select(c).on("keydown",function(c){var d=a.select(this).hasClass("error");d?a.select(this).addClass("mac-address-error"):a.select(this).removeClass("mac-address-error"),b.additionalValidation(this)}),a.select(c).on("blur",function(c){var d=a.select(this).hasClass("error");d?a.select(this).addClass("mac-address-error"):a.select(this).removeClass("mac-address-error"),b.additionalValidation(this)}),a.select(c).on("focus",function(c){var d=a.select(this).hasClass("error");d?a.select(this).addClass("mac-address-error"):a.select(this).removeClass("mac-address-error"),b.additionalValidation(this)})})},additionalValidation:function(b){var c=a.select(b).hasClass("mac-address-error");c&&(a.select("#mac-address-error p").html("Please enter a valid MAC address.<span class='sr-only'>(Mac address)</span>"),setTimeout(function(){a.select("#mac-address-error p").html("Please enter a valid MAC address.<span class='sr-only'>(Mac address)</span>")},100))},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.install.common.FormSubmit",function(a){var b,c="form input";return{init:function(){b=this,console.log("INIT FormSubmit.js")},execute:function(){console.log("EXEC FormSubmit.js"),a.select("body").on("content-loaded",c,function(b){a.select(c).on("keydown",function(a){13===a.which&&a.preventDefault()})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.install.common.FormValidation",function(a){var b,c=".content-body form",d=!1,e=!1,f=!1,g=!1;return{init:function(){b=this,console.log("INIT FormValidation.js")},execute:function(){console.log("EXEC FormValidation.js"),a.select("body").on("content-loaded",c,function(d){e||(setTimeout(function(){b.renderRecaptcha()},2e3),a.select(c).on("keydown",function(d){13===d.which&&(a.select(c).find("a.btn-secondary").is(":focus")?this.click():(d.preventDefault(),a.select(c).find(".btn.btn-primary").click()),b.hideThrobber()),g||(b.hideServerErrors(),g=!0)}),a.select(c+" select").on("change",function(c){g||(b.hideServerErrors(),g=!0),a.select(this).validate()||b.hideThrobber()}),a.select(c+" select").on("blur",function(c){a.select(this).validate()||b.hideThrobber();
}),a.select(c+" input").on("blur",function(c){a.select(this).validate()||b.hideThrobber()}),a.select(c+" input").on("change",function(a){g||(b.hideServerErrors(),g=!0)}),a.select(".content-body form").on("submit",function(a){f=!1}),a.select(c+" .btn.btn-primary").on("click",function(d){d.preventDefault();var e=a.select(this).attr("data-cpv"),h=a.select(this).closest("form");g||(b.hideServerErrors(),g=!0),a.select(h).valid()?"true"===e?b.checkIfFormValid(c):a.select(c).valid()&&!a.select(this).hasClass("invalid")?f||(a.select(h).submit(),f=!0):b.hideThrobber():b.hideThrobber()}),b.handleTabIndex(),e=!0)})},checkIfFormValid:function(c){a.select(this).hasClass("loading-wrapper-active")||d||b.renderRecaptcha(),a.select(c).valid()?b.executeRecaptcha():b.hideThrobber()},executeRecaptcha:function(){"undefined"==typeof grecaptcha?b.renderRecaptcha()&&(grecaptcha.execute(),b.handleTabIndex()):(grecaptcha.execute(),b.handleTabIndex())},renderRecaptcha:function(){try{var c=!1;return"undefined"!=typeof grecaptcha&&d===!1?(grecaptcha.render("recaptcha",{sitekey:a.select("#recaptcha").data("sitekey"),size:a.select("#recaptcha").data("size"),callback:b.submitForm,"error-callback":b.renderCaptchaLoadError}),d=!0,c=!0,b.handleTabIndex()):b.renderCaptchaLoadError(),c}catch(a){b.renderCaptchaLoadError()}},renderCaptchaLoadError:function(){if(a.select("#recaptcha").length>0){var c=a.select(".form.wrap-errors"),d=a.select(c).find(".alert-danger.error-header")[0];a.select(d).css("display","block"),a.select(d).html('<div class="alert alert-danger pl-1 pr-2 ml-alert-err"><div class="alert-content error ml-1"></div>Oops! It looks like Captcha failed to load on the page. Please refresh your page and try again.</div>'),b.publishNewRelic("failure")}},submitForm:function(d){var e=a.select(c);if(d!==!1){var f=grecaptcha.getResponse();return 0!=f.length&&(e&&(b.publishNewRelic("success"),a.select(e).submit()),!0)}e&&(b.publishNewRelic("success"),a.select(e).submit())},captchaErrorHandler:function(){b.publishNewRelic("failure")},publishNewRelic:function(b){var d=[{event:a.select(c).attr("id")+"-captcha",value:b}];a.publish({type:"track_new_relic",data:d})},handleTabIndex:function(){a.select("#g-recaptcha-response").attr("tabindex","-1"),a.select("input[type='hidden']").attr("tabindex","-1"),a.select(".grecaptcha-logo iframe").attr("tabindex","-1")},hideThrobber:function(){setTimeout(function(){a.select(c+" .btn").removeClass("loading-wrapper-active")},300),a.select(".error-header.alert-danger").length>0?a.select("html, body").animate({scrollTop:a.select(".error-header.alert-danger").offset().top},500):a.select("html, body").animate({scrollTop:a.select(".msg-error.error-header").offset().top},500)},hideServerErrors:function(){a.select(c).find(".server-error").css("display","none"),a.select(c).find(".alert-success").addClass("hide")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.install.common.newRelicTracking",function(a){var b;return{init:function(){b=this,console.log("INIT newRelicTracking.js"),a.subscribe({track_new_relic:b.trackNewRelic})},execute:function(){console.log("EXEC newRelicTracking.js")},trackNewRelic:function(b){try{a.select(b).each(function(a,b){newrelic.addPageAction(b.event,{result:b.value})})}catch(a){console.log("newRelic is not present")}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.install.common.Throbber",function(a){var b,c,d,e=".activation-progress",f=!1,g=12e4,h="confirmation.html",i=1e4,j=0;return{init:function(){b=this,console.log("INIT Throbber.js"),a.subscribe({selfInstallAjaxResponse:b.ajaxResponse})},execute:function(){console.log("EXEC Throbber.js"),a.select("body").on("content-loaded",e,function(c){if(!f){var h={id:"selfInstallAjaxResponse",type:"POST",url:a.select(e).attr("data-ajax-source"),dataType:"json",cache:!1,contentType:"application/json; charset=utf-8",timeout:g,withCredentials:!0,crossDomain:!0,headers:{"X-Requested-With":"XMLHttpRequest"}};d=Number(a.select(e).attr("data-total-number-calls")),b.setAjaxOptions(h),b.makeAjaxRequest(),f=!0}})},getAjaxOptions:function(){return c},setAjaxOptions:function(a){c=a},makeAjaxRequest:function(){var c=b.getAjaxOptions(),d=a.select("meta[name='_csrf']").attr("content"),e=a.select("meta[name='_csrf_header']").attr("content");e&&d&&a.select(document).ajaxSend(function(a,b,c){b.setRequestHeader(e,d)}),a.publish({type:"Ajax",data:c})},ajaxResponse:function(c){console.log("ajax response",c);var e=i,f=c.responseJSON,k=g;f&&f.waitTimeInMs&&(e=f.waitTimeInMs),e<i&&(e=i),200===c.status||f&&!f.errorFlag?b.newRelicCall("success"):b.newRelicCall("failure"),setTimeout(function(){if(c&&c.responseJSON){j=0;var e=f.htmlContent;if(e&&b.updateContentOnScreen(e),f.errorFlag)b.redirectToUrl(h);else if(f.hasRedirect)null===f.redirectUrl?b.redirectToUrl(h):b.redirectToUrl(f.redirectUrl);else{var g={id:"selfInstallAjaxResponse",type:"POST",url:f.ajaxUrl,dataType:"json",cache:!1,contentType:"application/json; charset=utf-8",timeout:k,withCredentials:!0,crossDomain:!0,headers:{"X-Requested-With":"XMLHttpRequest"}};b.setAjaxOptions(g),b.makeAjaxRequest()}}else j++,j===d?(a.select(".container.throbber").addClass("hide"),a.select(".container.confirmation").removeClass("hide"),b.newRelicCall("timeout")):b.makeAjaxRequest()},e)},updateContentOnScreen:function(b){a.select(".ajax-response-content .live").html(b),a.select(".ajax-response-content .default-content").addClass("hide")},redirectToUrl:function(a){"/"===a.charAt(0)&&(a=a.substr(1)),window.location.href=a},newRelicCall:function(a){var c=b.getAjaxOptions().url,d="";c&&c.indexOf("/")>=0&&(d=c.split("/").pop()),d.indexOf(".ajax")>=0&&(d=d.replace(".ajax","")),"object"==typeof newrelic&&newrelic.addPageAction("install-"+d,{result:a})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.install.common.VerificationCode",function(a){var b,c="#verification-code",d="269898";return{init:function(){console.log("INIT VerificationCode.js"),b=this},execute:function(){console.log("INIT VerificationCode.js"),a.select("body").on("content-loaded",c,function(e){e.currentTarget===e.target&&(b.makeVerificationCodeInvalid(this),a.select("body").on("blur",c,function(b){var c=a.select(this).val();if(c&&c.length>5){c===d?a.select(this).addClass("verication-code-invalid"):a.select(this).removeClass("verication-code-invalid");var e=a.select(this).closest("form");a.select(e).valid()}else a.select(this).removeClass("verication-code-invalid")}),a.select("body").on("keyup",c,function(b){var c=a.select(this).val();if(c&&c.length>5){c===d?a.select(this).addClass("verication-code-invalid"):a.select(this).removeClass("verication-code-invalid");var e=a.select(this).closest("form");a.select(e).valid()}else a.select(this).removeClass("verication-code-invalid")}))})},makeVerificationCodeInvalid:function(){jQuery.validator.addMethod("verication-code-invalid",function(a,b){return!1},"Try again. Tip: make sure you enter the verification code and not 269898 (the phone number we sent the text from).")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.install.ssid",function(a){var b,c,d,e=".ssid",f=!1,g=12e4,h="confirmation.html",i=1e4,j=0,k=0;return{init:function(){b=this,console.log("INIT Ssid.js"),a.subscribe({installSsidAjaxResponse:b.ajaxResponseSsidPage,updateSsidAjaxResponse:b.updateSsidResponse})},execute:function(){console.log("EXEC Ssid.js"),a.select("body").on("content-loaded",e,function(c){if(!f){var h={id:"installSsidAjaxResponse",type:"POST",url:a.select(e).attr("data-ajax-source"),dataType:"json",cache:!1,contentType:"application/json; charset=utf-8",timeout:g,withCredentials:!0,crossDomain:!0,headers:{"X-Requested-With":"XMLHttpRequest"}};d=Number(a.select(e).attr("data-total-number-calls")),b.setAjaxOptions(h),b.makeAjaxRequest(),f=!0}b.validateSSID(),b.validateNetworkPassword()})},getAjaxOptions:function(){return c},setAjaxOptions:function(a){c=a},makeAjaxRequest:function(){var c=b.getAjaxOptions(),d=a.select("meta[name='_csrf']").attr("content"),e=a.select("meta[name='_csrf_header']").attr("content");e&&d&&a.select(document).ajaxSend(function(a,b,c){b.setRequestHeader(e,d)}),k+=1,a.publish({type:"Ajax",data:c})},ajaxResponseSsidPage:function(c){console.log("ajax response",c);var f=i,l=c.responseJSON,m=g;l&&l.waitTimeInMs&&(f=l.waitTimeInMs),"0"===f&&1!==k&&(f=i),200===c.status||l&&!l.errorFlag?b.newRelicCall("success"):b.newRelicCall("failure"),setTimeout(function(){if(c&&c.responseJSON){j=0;var f=l.htmlContent;if(f&&b.updateContentOnScreen(f),l.errorFlag)b.redirectToUrl(h);else if(l.hasRedirect)null===l.redirectUrl?b.redirectToUrl(h):b.redirectToUrl(l.redirectUrl);else if(l.ssid)a.select(".ssid-network-name").html(l.ssid),"OPEN"===l.secType?(a.select(".ssid-network-password").html(l.password),a.select("#ssid-password").attr("disabled","true"),a.select("#ssid-password").attr("aria-disabled","true"),a.select(e+" .password-field-wrapper .password-eye").addClass("hide")):null!==l.password&&"-- No Password for Open Network --"!==l.password&&a.select(".ssid-network-password").html(l.password),a.select(".ssid-throbber-header-container").addClass("hide"),a.select(".ssid-header-container").removeClass("hide"),a.select(e).find(".ssid-throbber-body-container").addClass("hide"),a.select(e).find(".ssid-body-container").removeClass("hide");else{var g={id:"installSsidAjaxResponse",type:"POST",url:l.ajaxUrl,dataType:"json",cache:!1,contentType:"application/json; charset=utf-8",timeout:m,withCredentials:!0,crossDomain:!0,headers:{"X-Requested-With":"XMLHttpRequest"}};b.setAjaxOptions(g),b.makeAjaxRequest()}}else j++,j===d?(a.select(".container.throbber").addClass("hide"),a.select(".container.confirmation").removeClass("hide"),b.newRelicCall("timeout")):b.makeAjaxRequest()},f)},updateSsidResponse:function(a){console.log("update ssid response",a)},updateContentOnScreen:function(b){a.select(".ajax-response-content .live").html(b),a.select(".ajax-response-content .default-content").addClass("hide")},redirectToUrl:function(a){"/"===a.charAt(0)&&(a=a.substr(1)),window.location.href=a},newRelicCall:function(a){var c=b.getAjaxOptions().url,d="";c&&c.indexOf("/")>=0&&(d=c.split("/").pop()),d.indexOf(".ajax")>=0&&(d=d.replace(".ajax","")),"object"==typeof newrelic&&newrelic.addPageAction("install-"+d,{result:a})},validateSSID:function(){jQuery.validator.addMethod("ssidValidation",function(a,b){return this.optional(b)||/^[A-Za-z0-9!@%^*(\/).\-_+,;$~[\]]+$/i.test(a)},"Please enter only letters, numbers or the following special characters !@%^*(/).-_+,;$~[].<span class='sr-only'>(New network name)</span>")},validateNetworkPassword:function(){jQuery.validator.addMethod("networkPasswordValidation",function(a,b){return this.optional(b)||/^[A-Za-z0-9!@%^*(\/).\-_+,;$~[\]]+$/i.test(a)},"Please enter only letters, numbers or the following special characters !@%^*(/).-_+,;$~[].<span class='sr-only'>(Network Password)</span>")},destroy:function(){}}})}(coxfw),function(a){a.core.dom().ready(function(){var b=function(){},c=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],d=c.length,e=window.console=window.console||{};for(e.log||(e.log=function(a){});d--;){var f=c[d];e[f]||(e[f]=b)}a.core.startAll(),a.core.each(a.core.events.contentLoaded(),function(b,c){a.core.dom(c.selector).length>0&&a.core.dom(c.selector).trigger("content-loaded")})})}(coxfw);