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)},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)},grep:function(a,b,c){return jQuery.grep(a,b,c)},templates:{render:function(a,b){return Mustache.render(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)},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)},grep:function(a,c,d){return b.grep(a,c,d)},render:function(a,b){return g.render(a,b)}}}}}(coxfw),function(a){a.core.define("modules.global.Accordion",function(b){var c,d,e,f=".accordion-trigger, .accordion-next",g="[class*='accordion-toggle-']";return{init:function(){console.log("INIT Accordion.js"),c=this,b.subscribe({openAccordion:c.openAccordion,closeAccordion:c.closeAccordion})},execute:function(){console.log("EXEC Accordion.js"),c=this,b.select("body").on("click",f,function(a){if(b.preventDefault(a),d=b.select(this),d.hasClass("accordion-trigger-disabled")||(d.hasClass("accordion-trigger-open")||d.hasClass("accordion-next")?b.publish({type:"closeAccordion",data:{trigger:d}}):(b.publish({type:"openAccordion",data:{trigger:d}}),c.trackAccordionOpen(d))),e=b.select(g,d.closest(".accordion")),e.length>0){var f=b.select(".accordion-trigger-open:not('.accordion-panel .accordion-trigger-open')",e.closest(".accordion"));f.length>0&&b.select(".accordion-panel:not(.accordion-panel .accordion-panel)",e.closest(".accordion")).length?e.removeClass("accordion-toggle-expand").addClass("accordion-toggle-collapse"):e.removeClass("accordion-toggle-collapse").addClass("accordion-toggle-expand")}}),b.select("body").on("click",g,function(a){if(b.preventDefault(a),e=b.select(this),e.hasClass("accordion-toggle-expand")){var c=e.closest(".accordion").data("coxAccordionStyle");e.closest(".accordion").data("coxAccordionStyle",""),b.select(".accordion-trigger:not('.accordion-trigger-open')",e.closest(".accordion")).each(function(a,c){var d=b.select(c);b.publish({type:"openAccordion",data:{trigger:d}})}),e.closest(".accordion").data("coxAccordionStyle",c)}else e.hasClass("accordion-toggle-collapse")&&b.select(".accordion-trigger-open",e.closest(".accordion")).each(function(a,c){var d=b.select(c);b.publish({type:"closeAccordion",data:{trigger:d}})});e.hasClass("accordion-toggle-expand")?e.removeClass("accordion-toggle-expand").addClass("accordion-toggle-collapse"):e.hasClass("accordion-toggle-collapse")&&e.removeClass("accordion-toggle-collapse").addClass("accordion-toggle-expand")}),b.select("body").on("content-loaded",g,function(a){e=b.select(this);var c=b.select(".accordion-trigger-open:not('.accordion-panel .accordion-trigger-open')",e.closest(".accordion"));c.length>0?e.removeClass("accordion-toggle-expand").addClass("accordion-toggle-collapse"):e.removeClass("accordion-toggle-collapse").addClass("accordion-toggle-expand")})},openAccordion:function(a){console.log("     Accordion.openAccordion");var c=!0,d=a.trigger,e=d.nextAll(".accordion-panel").first();d.hasClass("accordion-toggle-collapse")||"open-single-panel"!==d.closest(".accordion").data("coxAccordionStyle")||b.select(".accordion-trigger-open",d.closest(".accordion")).each(function(a,d){c&&(c=b.publish({type:"closeAccordion",data:{trigger:b.select(d)}}))});var f=d.closest(".accordion").data("stopAccordion");void 0!=f&&f.length>0&&(f=!0),!c&&f||(e.slideToggle({duration:"slow",progress:function(a){b.select("body.IE8").length>0&&b.select(".accordion-panel").parentsUntil("#pf-container").css("zoom","").css("zoom","1")},complete:function(c){if(a.accordionNext){var f=d.closest(".accordion").data("coxAccordionStickBelow"),g=d.offset().top;void 0!=f&&f.length>0&&(f=f.split(" "),b.each(f,function(a,c){b.select("#"+c).is(":visible")&&(g-=parseInt($("#"+c).outerHeight()))})),b.select("html, body").animate({scrollTop:g})}e.addClass("accordion-panel-open"),b.publish({type:"openAccordionPanel",data:{trigger:e}}),0===b.select("body.IE8").length&&e.removeAttr("style")}}),e.attr("aria-hidden",!1),d.attr("aria-selected",!0),d.attr("aria-expanded",!0),d.addClass("accordion-trigger-open"))},closeAccordion:function(c){console.log("     Accordion.closeAccordion");var d,e,f=!0,g=c.trigger,h=g.nextAll(".accordion-panel").first(),i=!1;if(g.hasClass("accordion-next")&&(i=!0,d=g.closest(".accordion-panel").next(),e=d.next(),g=g.closest(".accordion-panel").prev(),h=g.next(),d.focus()),h.closest("form.accordion").length>0&&(f=b.publish({type:"continueCloseAccordion",data:{trigger:g}})),f)h.slideToggle({duration:"slow",progress:function(a){b.select("body.IE8").length>0&&b.select(".accordion-panel").parentsUntil("#pf-container").css("zoom","").css("zoom","1")},complete:function(a){if(i){var c=g.closest(".accordion").data("coxAccordionStickBelow"),d=g.offset().top;void 0!=c&&c.length>0&&(c=c.split(" "),b.each(c,function(a,c){b.select("#"+c).is(":visible")&&(d-=parseInt($("#"+c).outerHeight()))})),b.select("html, body").animate({scrollTop:d})}h.removeClass("accordion-panel-open"),b.publish({type:"closeAccordionPanel",data:{trigger:h}}),0===b.select("body.IE8").length&&h.removeAttr("style")}}),h.attr("aria-hidden",!0),g.attr("aria-selected",!1),g.attr("aria-expanded",!1),g.removeClass("accordion-trigger-open"),a.utils.typeEqual(d,"undefined")||(d.removeClass("accordion-trigger-disabled"),e.removeClass("accordion-panel-disabled"),b.publish({type:"openAccordion",data:{trigger:d,accordionNext:i}}));else if(i){var j=g.closest(".accordion").data("coxAccordionStickBelow"),k=g.offset().top;void 0!=j&&j.length>0&&(j=j.split(" "),b.each(j,function(a,c){b.select("#"+c).is(":visible")&&(k-=parseInt($("#"+c).outerHeight()))})),b.select("html, body").animate({scrollTop:k})}return f},trackAccordionOpen:function(a){if("undefined"!=typeof __coxOmnitureParams&&"undefined"!=typeof s_account&&""!=s_account){var c=__coxOmnitureParams?__coxOmnitureParams.pageName+":":"",d=__coxOmnitureParams?__coxOmnitureParams.hier1+",":"",e=__coxOmnitureParams?__coxOmnitureParams.hier2+",":"",f=__coxOmnitureParams?__coxOmnitureParams.localeName+":":"",g="",a=b.select(a)[0];if(b.select(a).closest(".accordion-panel").length>0){var h=b.select(a).closest(".accordion-panel").prev()[0];g=h.title.toLowerCase(),g?g+=":":g=b.select(h).children(":not('div')").text().toLowerCase()+":"}var i=a.title.toLowerCase();i||(i=b.select(a).children(":not('div')").text().toLowerCase()),b.publish({type:"OmnitureInterface",data:{mode:"track",type:"pageview",clearVariables:"true",options:{pageName:c+g+i,hier1:d+g+i,hier2:e+g+i,localePagename:f+c+g+i}}})}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.AccordionFormValidation",function(a){var b,c=a.select("form.accordion");return{init:function(){console.log("INIT AccordionFormValidation.js"),b=this,0==c.length?a.subscribe({continueCloseAccordion:function(){return!0}}):a.subscribe({continueCloseAccordion:b.validateAccordion})},execute:function(){},validateAccordion:function(b){console.log("     AccordionFormValidation.validateAccordion");var c=b.trigger,d=c.next(),e=d.next(),f=(e.next(),b.clickedElement),g=d.closest("form.accordion")[0];if(a.select(f).hasClass("validatedByMultiPane"))a.select(f).removeClass("validatedByMultiPane");else{var h=a.select(".ignore-validation",g);a.select("input, select, textarea",g).addClass("ignore-validation"),a.select("input, select, textarea",d).removeClass("ignore-validation"),h.addClass("ignore-validation"),a.select(g).valid(),a.select(f).addClass("validatedByAccordion"),a.select("input, select, textarea",g).removeClass("ignore-validation"),h.addClass("ignore-validation")}return!(a.select(g).validate().numberOfInvalids()>0)},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.AdaptiveImage",function(a){var b,c="img[data-src]",d=a.select("img[data-src]");return{init:function(){console.log("INIT AdaptiveImage.js")},execute:function(){console.log("EXEC AdaptiveImage.js"),b=this,a.select("body").on("content-loaded",c,function(a){b.updateSrcAttribute(a.currentTarget)}),a.subscribe({Orientation:b.updateSrcAttributeOnOrientationChange}),0===d.length},updateSrcAttribute:function(b){var c=a.select(b).data("src"),d=a.select(b).data("src-mobile");"undefined"!=typeof d&&0!==d.length||(d=c),window.matchMedia&&(window.matchMedia("(min-width: 1px) and (max-width: 320px)").matches?a.select(b).attr("src",d+".thumb.319.319.png"):window.matchMedia("(min-width: 321px) and (max-width: 480px)").matches?a.select(b).attr("src",d+".thumb.480.480.png"):window.matchMedia("(min-width: 481px) and (max-width: 768px)").matches?a.select(b).attr("src",d+".thumb.769.769.png"):window.matchMedia("(min-width: 769px) and (max-width: 959px)").matches?a.select(b).attr("src",c+".thumb.769.769.png"):a.select(b).attr("src",c))},updateSrcAttributeOnOrientationChange:function(){a.select(c).each(function(a,c){b.updateSrcAttribute(c)})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.AEMExternalAppTemplate",function(a){var b,c=".ajax-loader";return{init:function(){console.log("INIT AEMExternalAppTemplate.js"),b=this,a.subscribe({AEMExternalAppCalls:b.AEMExternalAppCalls})},execute:function(){console.log("EXEC AEMExternalAppTemplate.js"),b=this,a.select("body").on("ajax-loader-trigger",c,function(b){var d,e=a.select(c).first();if(e.attr("data-ajax-source").match(/\.app\.html/)&&e.attr("data-ajax-source",e.attr("data-ajax-source").replace(/\.app\.html/,".includejs.app.html")),a.select(c+"[data-ajax-source*='.app.html']").length==a.select(c).length){b.useCustomAJAX=!0,a.select("body").off("ajax-loader-trigger",c),d=a.select(c).not(e);var f=a.select(".response",e).closest(".loading-wrapper"),g=a.publish({type:"Ajax",data:{id:"AEMExternalAppCalls",container:a.select(".response",e),url:e.attr("data-ajax-source"),type:"GET",dataType:"html",timeout:"30000",cache:!1,throbber:{type:"showThrobber",data:{nodes:f,display:f.attr("data-ajax-display"),message:f.attr("data-ajax-message")}}}});a.when(g).then(function(b,c,e){d.each(function(b,c){var c=a.select(c),d=a.select(".response",c).closest(".loading-wrapper");a.publish({type:"Ajax",data:{id:"AEMExternalAppCalls",container:a.select(".response",c),url:c.attr("data-ajax-source"),type:"GET",dataType:"html",timeout:"30000",cache:!1,throbber:{type:"showThrobber",data:{nodes:d,display:d.attr("data-ajax-display"),message:d.attr("data-ajax-message")}}}})})})}})},AEMExternalAppCalls:function(b){if(b.isError)a.select(b.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>");else{var c=a.select("<div>").append(b.responseText),d=c.find("script").not("[type*=application], [type*=html], [src*=pega]").remove();a.select(b.container).html(c.children()),d.length>0&&d.each(function(b,c){setTimeout(function(){a.select(c).appendTo(document.head)},500*b)})}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.AEMOfferTermsAjax",function(b){var c,d=".offer-terms[data-invalid-promo-message]",e={lob:"",excludeEligibility:{}};return{init:function(){console.log("INIT AEMOfferTermsAjax.js"),c=this,b.subscribe({AEMOfferTermsHandleAjax:c.AEMOfferTermsHandleAjax})},execute:function(){console.log("EXEC AEMOfferTermsAjax.js"),c=this;var a,f;b.select(d).each(function(a,c){var c=b.select(c);f=JSON.parse(b.select("[type='application/json']",c).html());var d="{{#"+f.OfferID+"}}"+b.select("[type='text/html']",c).html()+"{{/"+f.OfferID+"}}";b.select("[type='text/html']",c).html(d),"undefined"!=typeof f&&"undefined"!=typeof d&&(c.attr("data-exclude-eligibility",f.excludeEligibility),"undefined"==typeof e.excludeEligibility[f.excludeEligibility]&&(e.excludeEligibility[f.excludeEligibility]={}),"undefined"==typeof e.excludeEligibility[f.excludeEligibility].offerIds&&(e.excludeEligibility[f.excludeEligibility].offerIds=[]),e.excludeEligibility[f.excludeEligibility].offerIds.indexOf(f.OfferID)===-1&&e.excludeEligibility[f.excludeEligibility].offerIds.push(f.OfferID),"undefined"==typeof e.excludeEligibility[f.excludeEligibility].promoCodes&&(e.excludeEligibility[f.excludeEligibility].promoCodes=[]),"undefined"!=typeof f.promoCode&&e.excludeEligibility[f.excludeEligibility].promoCodes.indexOf(f.promoCode)===-1&&e.excludeEligibility[f.excludeEligibility].promoCodes.push(f.promoCode),b.select(c).prepend("<div class='loader'></div>"),b.publish({type:"showThrobber",data:{nodes:c,display:"ajax-component"}}))}),b.select("#pf-header").hasClass("pf-header-residential")?e.lob="residential":b.select("#pf-header").hasClass("pf-header-business")&&(e.lob="business");for(var g in e.excludeEligibility)e.excludeEligibility[g].offerIds.length>0&&(e.excludeEligibility[g].offerIds=e.excludeEligibility[g].offerIds.join(",")),e.excludeEligibility[g].promoCodes.length>0?e.excludeEligibility[g].promoCodes=e.excludeEligibility[g].promoCodes.join(","):e.excludeEligibility[g].promoCodes="";a=b.select(d+".ajax-component-wrapper-active"),a.length>0&&b.publish({type:"Ajax",data:{id:"AEMOfferTermsHandleAjax",container:a,url:f.webApiUrl,type:"POST",dataType:"json",contentType:"application/json",timeout:"10000",cache:!1,data:JSON.stringify(e),withCredentials:!0}})},AEMOfferTermsHandleAjax:function(c){if(c.isError)c.container.each(function(a,c){b.publish({type:"hideThrobber",data:{nodes:b.select(c),display:"ajax-component"}})}),"undefined"==typeof c.responseJSON&&b.select(c.container).append("");else{for(var d in c.responseJSON)if("undefined"!=typeof c.responseJSON[d].offers)for(var e=0;e<c.responseJSON[d].offers.length;e++)c.responseJSON[d][c.responseJSON[d].offers[e].id]=c.responseJSON[d].offers[e];c.container.each(function(d,e){e=b.select(e),b.publish({type:"hideThrobber",data:{nodes:e,display:"ajax-component"}});var f=JSON.parse(b.select("[type='application/json']",e).html()),g=b.select(e).attr("data-exclude-eligibility");if("undefined"==typeof c.responseJSON[g][f.OfferID]&&(c.responseJSON[g][f.OfferID]={},"undefined"!=typeof f.error?(a.extendObj(f,f.error),f.id=f.OfferID):f={hideOtherConditions:!1,termsAndConditions:[{title:"Unavailable",textKey:"We're sorry, we can't find this part of the page right now."}]}),a.core.dom().extend(c.responseJSON[g][f.OfferID],f),"undefined"!=typeof c.responseJSON[g].messages&&c.responseJSON[g].messages[0].description.indexOf(f.promoCode)>0)e.append("<div class='col-content'><p>"+e.attr("data-invalid-promo-message")+"</p></div>");else{var h=b.select("[type='text/html']",e).html(),i=b.render(h,c.responseJSON[g]);e.append(i)}})}b.select(".offer-comparison-container").each(function(a,c){var d=b.select(c);b.publish({type:"RecalculateTable",data:d})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.AEMPricingAjax",function(b){var c,d=".price:not(.pega .price)",e={lob:"",excludeEligibility:{}};return{init:function(){console.log("INIT AEMPricingAjax.js"),c=this,b.subscribe({AEMPricingHandleAjax:c.AEMPricingHandleAjax}),window.templateHelpers={checkPriceFREE:function(){return function(a,c){var d=c(a),e=b.select("<div>").append(b.select(d));return 0===parseInt(this,10)?b.select(".price-value",e).remove():b.select(".free",e).remove(),e.html()}}}},execute:function(){console.log("EXEC AEMPricingAjax.js"),c=this;var a,f,g;b.select(d).each(function(a,c){var c=b.select(c);b.select("[type='application/json']",c).length>0&&(f=JSON.parse(b.select("[type='application/json']",c).html())),b.select("[type='text/html']:not(.pricing-reference)",c).length>0&&(g="{{#"+f.OfferID+"}}"+b.select("[type='text/html']:not(.pricing-reference)",c).html()+"{{/"+f.OfferID+"}}",b.select("[type='text/html']:not(.pricing-reference)",c).html(g)),"undefined"!=typeof f&&"undefined"!=typeof g&&(c.attr("data-exclude-eligibility",f.excludeEligibility),"undefined"==typeof e.excludeEligibility[f.excludeEligibility]&&(e.excludeEligibility[f.excludeEligibility]={}),"undefined"==typeof e.excludeEligibility[f.excludeEligibility].offerIds&&(e.excludeEligibility[f.excludeEligibility].offerIds=[]),e.excludeEligibility[f.excludeEligibility].offerIds.indexOf(f.OfferID)===-1&&e.excludeEligibility[f.excludeEligibility].offerIds.push(f.OfferID),"undefined"==typeof e.excludeEligibility[f.excludeEligibility].promoCodes&&(e.excludeEligibility[f.excludeEligibility].promoCodes=[]),"undefined"!=typeof f.promoCode&&e.excludeEligibility[f.excludeEligibility].promoCodes.indexOf(f.promoCode)===-1&&e.excludeEligibility[f.excludeEligibility].promoCodes.push(f.promoCode),b.select(c).prepend("<div class='loader'></div>"),b.publish({type:"showThrobber",data:{nodes:c,display:"ajax-component"}}))}),b.select("#pf-header").hasClass("pf-header-residential")?e.lob="residential":b.select("#pf-header").hasClass("pf-header-business")&&(e.lob="business");for(var h in e.excludeEligibility)e.excludeEligibility[h].offerIds.length>0&&(e.excludeEligibility[h].offerIds=e.excludeEligibility[h].offerIds.join(",")),e.excludeEligibility[h].promoCodes.length>0?e.excludeEligibility[h].promoCodes=e.excludeEligibility[h].promoCodes.join(","):e.excludeEligibility[h].promoCodes="";a=b.select(".price.ajax-component-wrapper-active"),a.length>0&&b.publish({type:"Ajax",data:{id:"AEMPricingHandleAjax",container:a,url:f.webApiUrl,type:"POST",dataType:"json",contentType:"application/json",timeout:"10000",cache:!1,data:JSON.stringify(e),withCredentials:!0}})},AEMPricingHandleAjax:function(c){var d=window.templateHelpers||{};if(c.isError)c.container.each(function(a,c){b.publish({type:"hideThrobber",data:{nodes:b.select(c),display:"ajax-component"}})}),"undefined"==typeof c.responseJSON&&b.select(c.container).append("");else{for(var e in c.responseJSON)if("undefined"!=typeof c.responseJSON[e].offers)for(var f=0;f<c.responseJSON[e].offers.length;f++){c.responseJSON[e][c.responseJSON[e].offers[f].id]=c.responseJSON[e].offers[f];for(var g in c.responseJSON[e][c.responseJSON[e].offers[f].id].services)if("Residential General"===c.responseJSON[e][c.responseJSON[e].offers[f].id].services[g].name||"Business Contract"===c.responseJSON[e][c.responseJSON[e].offers[f].id].services[g].name)for(var h in c.responseJSON[e][c.responseJSON[e].offers[f].id].services[g].optionGroups)"Contract Term Group"!==c.responseJSON[e][c.responseJSON[e].offers[f].id].services[g].optionGroups[h].systemName&&"Cox Business Contract Term Group"!==c.responseJSON[e][c.responseJSON[e].offers[f].id].services[g].optionGroups[h].systemName||(c.responseJSON[e][c.responseJSON[e].offers[f].id].serviceAgreementDescription=c.responseJSON[e][c.responseJSON[e].offers[f].id].services[g].optionGroups[h].options[0].descriptionKey,c.responseJSON[e][c.responseJSON[e].offers[f].id].serviceAgreementTitle=c.responseJSON[e][c.responseJSON[e].offers[f].id].services[g].optionGroups[h].options[0].name)}c.container.each(function(e,f){f=b.select(f),b.publish({type:"hideThrobber",data:{nodes:f,display:"ajax-component"}});var g=!1,h=JSON.parse(b.select("[type='application/json']",f).html());h.guid=(new Date).getTime();var i=b.select(f).attr("data-exclude-eligibility");if("undefined"==typeof c.responseJSON[i][h.OfferID]&&(c.responseJSON[i][h.OfferID]={},"undefined"!=typeof h.error?(a.extendObj(h,h.error),h.id=h.OfferID):b.select("script.pricing-reference",f).length>0?g=!0:h={hideOfferName:!1,name:"<p class='msgAdvisory'>We're sorry, we can't find this part of the page right now.</p>",OfferID:h.OfferID,id:h.OfferID,hideMarketingText:!0,hideStartingText:!0,hideOfferPrice:!0,hideTermsConditions:!0,hideServiceAgreement:!0,hideOfferTerm:!0,hideRegularPrice:!0,hideOfferHighlights:!0,hidePricingHighlights:!0,hideOtherConditions:!0,hideContractTerm:!0,hideCTA:!0}),a.extendObj(c.responseJSON[i][h.OfferID],h),b.each(d,function(a,b){"undefined"!=typeof c.responseJSON[i][h.OfferID]&&(c.responseJSON[i][h.OfferID][a]=b)}),"undefined"!=typeof c.responseJSON[i][h.OfferID]&&"undefined"!=typeof c.responseJSON[i][h.OfferID].totalPromotionalMonthlyCharges&&!isNaN(parseInt(c.responseJSON[i][h.OfferID].totalPromotionalMonthlyCharges,10))){var j=c.responseJSON[i][h.OfferID].totalPromotionalMonthlyCharges.toString().split(".");c.responseJSON[i][h.OfferID].totalPromotionalMonthlyCharges={pricingDollars:j[0],pricingCents:"."+j[1]}}if("undefined"!=typeof c.responseJSON[i][h.OfferID]&&"undefined"!=typeof c.responseJSON[i][h.OfferID].offerHighlights&&Array.isArray(c.responseJSON[i][h.OfferID].offerHighlights)&&(c.responseJSON[i][h.OfferID].ALLofferHighlights=c.responseJSON[i][h.OfferID].offerHighlights,c.responseJSON[i][h.OfferID].offerHighlights={},b.each(c.responseJSON[i][h.OfferID].ALLofferHighlights,function(a,b){"undefined"==typeof c.responseJSON[i][h.OfferID].offerHighlights[b.serviceCategory]&&(c.responseJSON[i][h.OfferID].offerHighlights[b.serviceCategory]=[]),c.responseJSON[i][h.OfferID].offerHighlights[b.serviceCategory].push(b)}),delete c.responseJSON[i][h.OfferID].ALLofferHighlights,b.each(c.responseJSON[i][h.OfferID].offerHighlights,function(a,b){c.responseJSON[i][h.OfferID].offerHighlights[a]=c.responseJSON[i][h.OfferID].offerHighlights[a].slice(0,c.responseJSON[i][h.OfferID]["offerHighlightsFor"+b[0].serviceCategory])})),g)f.append(b.select("script.pricing-reference",f).html());else if("undefined"!=typeof c.responseJSON[i].messages&&c.responseJSON[i].messages[0].description.indexOf(h.promoCode)>0)f.append("<div class='col-content'><p>"+f.attr("data-invalid-promo-message")+"</p></div>");else{var k=b.select("[type='text/html']:not(.pricing-reference)",f).html(),l=b.render(k,c.responseJSON[i]);f.append(l)}})}b.select(".offer-comparison-container").each(function(a,c){var d=b.select(c);b.publish({type:"RecalculateTable",data:d})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.AEMRTEAjax",function(a){var b,c=".aem-rte:contains('[['), .aem-ref-rte:contains('[[')",d={lob:"",excludeEligibility:{}};return{init:function(){console.log("INIT AEMRTEAjax.js"),b=this,a.subscribe({AEMRTEHandleAjax:b.AEMRTEHandleAjax})},execute:function(){if(console.log("EXEC AEMRTEAjax.js"),b=this,"undefined"!=typeof a.select(c).data("ajax-source")){var e;a.select(c).each(function(b,c){var e,c=a.select(c),f=c.attr("data-exclude-eligibility"),g=/\[\[(.*?)\]\]/g;for("undefined"==typeof d.excludeEligibility[f]&&(d.excludeEligibility[f]={});e=g.exec(c.text());){var h=e[1].split(".")[0].split("-");"undefined"==typeof d.excludeEligibility[f].offerIds&&(d.excludeEligibility[f].offerIds=[]),d.excludeEligibility[f].offerIds.indexOf(h[0])===-1&&d.excludeEligibility[f].offerIds.push(h[0]),"undefined"==typeof d.excludeEligibility[f].promoCodes&&(d.excludeEligibility[f].promoCodes=[]),"undefined"!=typeof h[1]&&d.excludeEligibility[f].promoCodes.indexOf(h[1])===-1&&d.excludeEligibility[f].promoCodes.push(h[1])}a.select(c).addClass("visibility-hide"),a.select(c).prepend("<div class='loader visibility-show'></div>"),a.publish({type:"showThrobber",data:{nodes:c,display:"ajax-component"}})}),a.select("#pf-header").hasClass("pf-header-residential")?d.lob="residential":a.select("#pf-header").hasClass("pf-header-business")&&(d.lob="business");for(var f in d.excludeEligibility)d.excludeEligibility[f].offerIds.length>0&&(d.excludeEligibility[f].offerIds=d.excludeEligibility[f].offerIds.join(",")),d.excludeEligibility[f].promoCodes.length>0?d.excludeEligibility[f].promoCodes=d.excludeEligibility[f].promoCodes.join(","):d.excludeEligibility[f].promoCodes="";e=a.select(".aem-rte.ajax-component-wrapper-active, .aem-ref-rte.ajax-component-wrapper-active"),e.length>0&&a.publish({type:"Ajax",data:{id:"AEMRTEHandleAjax",container:e,url:e.attr("data-ajax-source"),type:"POST",dataType:"json",contentType:"application/json",timeout:"10000",cache:!1,data:JSON.stringify(d),withCredentials:!0}})}},AEMRTEHandleAjax:function(b){if(b.isError||!b.responseJSON.success)b.container.each(function(b,c){var d=a.select(c).html();a.select(c).children().detach(),d=d.replace(/\[\[/g,"{{{"),d=d.replace(/\]\]/g,"}}}");var e=a.render(d,"");a.select(c).append(e),a.publish({type:"hideThrobber",data:{nodes:a.select(c),display:"ajax-component"}}),a.select(c).removeClass("visibility-hide")});else{var c=JSON.stringify(b.responseJSON);if(c=c.replace(/"([\w]+)":/g,function(a,b){return"unChecked"===b?'"'+b+'":':'"'+b.toLowerCase()+'":'}),b.responseJSON=JSON.parse(c),"undefined"!=typeof b.responseJSON.checked.offers)for(var d=0;d<b.responseJSON.checked.offers.length;d++)b.responseJSON.checked[b.responseJSON.checked.offers[d].id]=b.responseJSON.checked.offers[d],"undefined"!=typeof b.responseJSON.checked.offers[d].services&&null!==b.responseJSON.checked.offers[d].services&&(b.responseJSON.checked.offers[d].services[b.responseJSON.checked.offers[d].services.length-1].escapeDelimiter=!0),"undefined"!=typeof b.responseJSON.checked.offers[d].offercategories&&null!==b.responseJSON.checked.offers[d].offercategories&&(b.responseJSON.checked.offers[d].offercategories[b.responseJSON.checked.offers[d].offercategories.length-1].escapeDelimiter=!0);if("undefined"!=typeof b.responseJSON.unChecked.offers)for(var d=0;d<b.responseJSON.unChecked.offers.length;d++)b.responseJSON.unChecked[b.responseJSON.unChecked.offers[d].id]=b.responseJSON.unChecked.offers[d],"undefined"!=typeof b.responseJSON.unChecked.offers[d].services&&null!==b.responseJSON.unChecked.offers[d].services&&(b.responseJSON.unChecked.offers[d].services[b.responseJSON.unChecked.offers[d].services.length-1].escapeDelimiter=!0),"undefined"!=typeof b.responseJSON.unChecked.offers[d].offercategories&&null!==b.responseJSON.unChecked.offers[d].offercategories&&(b.responseJSON.unChecked.offers[d].offercategories[b.responseJSON.unChecked.offers[d].offercategories.length-1].escapeDelimiter=!0);b.container.each(function(c,d){var e=a.select(d).attr("data-exclude-eligibility"),f=a.select(d).attr("data-invalid-promo-message"),g=[];"undefined"!=typeof b.responseJSON[e].messages&&b.responseJSON[e].messages[0].description.indexOf("Invalid promocode")>0&&(g=b.responseJSON[e].messages[0].description.split(":")[1].replace(/\s+/,"").split(","));var h=a.select(d).html();a.select(d).children().detach(),h=h.replace(/\[\[/g,function(){return"{{{"}),h=h.replace(/\]\]/g,function(){return"}}}"}),h=h.replace(/offername\}\}\}/g,function(){return"name}}}"}),h=h.replace(/description\}\}\}/g,function(){return"descriptionkey}}}"}),h=h.replace(/campaigndescription\}\}\}/g,function(){return"campaigndescriptionkey}}}"}),h=h.replace(/offerhighlightstext(\/)?(\d)?/g,function(a,b,c){return"undefined"==typeof b&&(c=1),c-=1,"offerhighlights."+c+".textkey"}),h=h.replace(/offerhighlightsservicecategory(\/)?(\d)?/g,function(a,b,c){return"undefined"==typeof b&&(c=1),c-=1,"offerhighlights."+c+".servicecategory"}),h=h.replace(/featuresname(\/)?(\d)?/g,function(a,b,c){return"undefined"==typeof b&&(c=1),c-=1,"offerfeatures."+c+".name"}),h=h.replace(/featuresvalue(\/)?(\d)?/g,function(a,b,c){return"undefined"==typeof b&&(c=1),c-=1,"offerfeatures."+c+".value"});var i=[];h=h.replace(/\{\{\{(\d+)\-(\w+)\.promocode\}\}\}/g,function(b,c,d){return g.length>0&&a.inArray(d,g)!==-1?(i.push(c),
f):""}),h=h.replace(/\{\{\{(\d+)(\..*)\}\}\}/g,function(b,c,d){return a.inArray(c,i)!==-1?f:"{{{"+c+d+"}}}"}),h=h.replace(/\{\{\{(\d*)\.servicesname(\/)?(\d)?\}\}\}/g,function(a,b,c,d){return"undefined"==typeof c?"{{#"+b+".services}}{{{name}}}{{^escapeDelimiter}},{{/escapeDelimiter}}{{/"+b+".services}}":(d-=1,"{{{"+b+".services."+d+".name}}}")}),h=h.replace(/\{\{\{(\d*)\.categoriescategoryname(\/)?(\d)?\}\}\}/g,function(a,b,c,d){return"undefined"==typeof c?"{{#"+b+".offercategories}}{{{categoryname}}}{{^escapeDelimiter}},{{/escapeDelimiter}}{{/"+b+".offercategories}}":(d-=1,"{{{"+b+".offercategories."+d+".categoryname}}}")});var j=a.render(h,b.responseJSON[e]);a.select(d).append(j),a.publish({type:"hideThrobber",data:{nodes:a.select(d),display:"ajax-component"}}),a.select(d).removeClass("visibility-hide")})}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.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);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();var f=d.responseText;if(f.indexOf("<script>")>-1){var g=b.select(f).find("script").html();b.globalEval(g)}}}),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.global.AlignContainerItems",function(a){var b,c,d,e=".offer-comparison-container, .feature-highlight, .best-offer, .ecomm-offers",f=null;return{init:function(){console.log("INIT AlignContainerItems.js"),b=this,a.subscribe({RealignContainerItems:b.alignContainerItems})},execute:function(){console.log("EXEC AlignContainerItems.js"),b=this,a.select("body").on("content-loaded",e,function(e){c=a.select(".section-container"),d=setTimeout(function(){b.getContainers(c)},200)}),a.select(window).on("resize",function(a){d=setTimeout(function(){b.getContainers(c)},200)})},getContainers:function(c){clearTimeout(d),a.select(c).each(function(a,c){b.alignContainerItems(c)})},alignContainerItems:function(c){var d=".button:visible, .button-payment:visible, .button-secondary:visible",g=[],h=a.select(c).find(e);if(h.length>0){for(var i=0;i<h.length;i++){var j=a.select(h[i]).find(d);j.length>0&&($.merge(g,j),null==f&&(f=parseInt(a.select(j[0]).css("margin-top"))))}b.alignHeightOfGroup(g)}},alignHeightOfGroup:function(b){var c=0,d=0;a.select(b).each(function(b,d){if(a.select(window).width()<768)a.select(d).css("margin-top",Math.round(f)+"px");else{a.select(d).removeAttr("style");var e=Math.round(a.select(d).offset().top);e>c&&(c=e)}}),a.select(window).width()>767&&a.select(b).each(function(b,e){var f=Math.round(a.select(e).offset().top),g=parseInt(a.select(e).css("margin-top"));f<c&&(d=Math.round(c-f)+g,d=Math.round(d),d>600&&(d=0),a.select(e).css("margin-top",d+"px"))})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.AnchorLinks",function(a){var b,c,d,e=".anchor-sticky";return{init:function(){console.log("INIT AnchorLinks.js")},execute:function(){console.log("EXEC AnchorLinks.js"),b=this,a.select("body").on("content-loaded",e,function(b){d=a.select(e)}),a.select("body").on("content-loaded",".anchor-links-bar",function(b){a.select(".link-selection").find("div").hasClass("active-caret")&&a.select(this).find(".link-heading").html(a.select(".active-caret").text())}),a.select("body").on("click",".link-selection",function(d){c=a.select(this),b.showHideDropdown(),d.stopPropagation()}),a.select("html").on("click",function(d){a.select(".link-selection")&&(c=a.select(".link-selection")),a.select(window).width()<768&&c&&(c.find("span").hasClass("active")&&(c.find("span").removeClass("active"),c.find(".anchor-link-content").removeClass("selected")),b.highlightActiveBlocks())}),a.select("body").on("click",".anchor-links-bar .anchor-link-content a",function(e){if(e.stopPropagation(),a.select(window).width()<768){var f=a.select(this).text();b.changeDropdownText(f)}else c=a.select(".link-selection"),a.select(".link-selection").find("div").hasClass("active-caret")?(c.find(".anchor-link-content div").removeClass("active-caret"),a.select(this).closest("div").parent().addClass("active-caret")):(c.find(".anchor-link-content div").removeClass("active"),a.select(this).closest("div").parent().addClass("active"));if("undefined"!=typeof d){var g=d.height();0==a.select(".anchor-sticky.active").length&&(g=g+d.height()+parseInt(d.css("padding-top")))}var h=(a.select(this),this.hash);if(h){var i=a.select(a.select(this).attr("href")).offset();if("undefined"!=typeof i){var j=i.top-g-30;a.select("html, body").animate({scrollTop:j+"px"},500)}else console.log("Anchor Link Error: Unable to locate anchor with ID "+this.hash);e.preventDefault()}}),a.select(window).on("scroll touchmove",function(f){if(!(a.select(e).length<1)){c=a.select(".link-selection");var g=b.getViewportOffset(d);this.scrollTop>g.top?d.addClass("active"):(d.removeClass("active"),a.select(".anchor-link-content > div").removeClass("active"),c.find("div").hasClass("active-caret")?a.select(this).find(".link-heading").html(a.select(".active-caret").text()):c.find(".link-heading").text("Navigate to:"),c.find(".link-heading").removeClass("selected")),b.highlightActiveBlocks()}})},showHideDropdown:function(){a.select(window).width()>767||(c.find("div").hasClass("active-caret")?a.select(this).find(".link-heading").html(a.select(".active-caret").text()):c.find(".link-heading").text("Navigate to:"),c.find(".link-heading").removeClass("selected"),c.find("span").hasClass("active")?(c.find("span").removeClass("active"),c.find(".anchor-link-content").removeClass("selected")):(c.find(".anchor-link-content").addClass("selected"),c.find("span").addClass("active")))},highlightActiveBlocks:function(){var e=a.select(window).scrollTop();a.select(".link-selection a").each(function(f,g){var h=a.select(this);if(this.hash){var i=a.select(h.attr("href")).closest(".section-container");if("undefined"!=typeof i.offset())if(i.offset().top-d.height()-35<=e&&i.offset().top-d.height()-35+i.height()>e){a.select(".link-selection").find("div").hasClass("active-caret")?(a.select(".anchor-link-content > div").removeClass("active-caret"),a.select(this).closest("div").parent().addClass("active-caret")):(a.select(".anchor-link-content > div").removeClass("active"),a.select(this).closest("div").parent().addClass("active"));var j=this.innerHTML;b.changeDropdownText(j)}else i.offset().top-d.height()-35+i.height()<e&&(c.find(".link-heading").text("Navigate to:"),c.find(".link-heading").removeClass("selected")),a.select(this).closest("div").parent().removeClass("active")}})},changeDropdownText:function(b){a.select(".link-heading").html(b),a.select(".link-heading").addClass("selected"),a.select(".anchor-link-content").removeClass("selected"),a.select(".link-selection span").removeClass("active")},getViewportOffset:function(b){var c=a.select(window);return scrollTop=c.scrollTop(),offset=b.offset(),{top:offset.top-scrollTop}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.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.global.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.global.CarouselRotator",function(a){var b,c;return{init:function(){console.log("INIT CarouselRotator.js")},execute:function(){console.log("EXEC CarouselRotator.js"),c=this,a.select("body").on("content-loaded",".carousel-container",function(c){b=a.select(".carousel-container"),b.each(function(b,c){var d,c=a.select(c),e=!1;c.data("slideshow")&&(e=1==c.data("slideshow")),c.data("manualControls")===!0&&(d=a.select(".hero-tabs").length>0?".hero-tabs > ol li":".flexslider-controls li"),a.select("ul.slides > li:first-child").css("opacity","1 !important"),c.flexslider({animation:"fade",manualControls:d,slideshow:e,slideshowSpeed:parseInt(c.data("slideshowSpeed")),animationSpeed:700,pauseOnAction:!1,pauseOnHover:!0,useCSS:!1,directionNav:!1,fadeFirstSlide:!1})})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.CCPACookie",function(a){var b,c=".ccpa-notice";a.select(".ccpa-notice");return{init:function(){console.log("INIT CCPACookie.js")},execute:function(){console.log("EXEC CCPACookie.js"),b=this,a.select("body").on("content-loaded",c,function(d){d.currentTarget===d.target&&(b.ccpaNoticeNeeded()?(a.select(c).show(),a.select(c).removeClass("hide")):a.select(c).remove(),a.select("body").on("click",c+" .ccpa-dismiss",function(a){b.hideCCPANotice()}))})},ccpaNoticeNeeded:function(){for(var a=!0,b=document.cookie.split(";"),b=document.cookie.split("; "),c=0,d=b.length;c<d;c++){var e=b[c].split("=");"ccpa"===e[0]&&(a=!1)}return a},hideCCPANotice:function(){a.select(c).remove();var b=new Date;b.setTime(b.getTime()+7776e6),document.cookie="ccpa=true;expires="+b.toUTCString()+";path=/"},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.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.global.Conditional",function(a){var b,c=".flex-conditional-udo.ajax-component-wrapper-active",d=a.select(c);return{init:function(){console.log("INIT Conditionl.js"),b=this,a.subscribe({getConditions:b.getConditions,processConditionalUDO:b.processConditionalUDO})},execute:function(){console.log("EXEC Conditionl.js"),b=this,a.select("body").on("content-loaded",c,function(c){c.stopPropagation();var d={};d.udoTokensObj=a.select(this);var e=b.processConditionalUDO(d);a.select(this).parent().html(e)}),0===d.length},processConditionalUDO:function(c){var d=a.select(c.udoTokensObj),e=a.publish({type:"convertUDOTokensToValues",data:{udoTokensObj:d}});e=a.publish({type:"convertURLParametersToValues",data:{urlTokensObj:d}});var c={};c.renderedTokens=a.select(e)[0].outerHTML,c.conditionalComp=a.select(e).find(".flex-conditional-udo"),0==c.conditionalComp.length&&(c.conditionalComp=a.select(d));var f=b.getConditions(c).replace(/flex-conditional-udo ajax-component-wrapper-active/g,"flex-conditional-udo");return a.select(f)[0].outerHTML},getConditions:function(c){var d=c.renderedTokens,e=c.conditionalComp;return a.each(e,function(c,e){var f=JSON.parse(a.select("[type='application/json']",e).html()),g=f.conditions,h=!0,i="";a.each(g,function(c,d){h=b.validateConditions(d.variable,d.operator,d.value);var f=!0,g=d.andConditions;if("undefined"!=typeof g&&a.each(g,function(a,c){var d=b.validateConditions(c.variable,c.operator,c.value);d===!1&&(f=!1,h=!1)}),h===!0&&f===!0)return i=a.select("#"+d.contentId,e)[0].outerHTML,!1}),h===!1&&(i=a.select("#"+f.defaultContentId,e)[0].outerHTML);var j=a.select(e).html();d=d.replace(j,i)}),d},validateConditions:function(a,b,c){switch(b){case"==":return a==c;case">":return a>c;case"<":return a<c;case"!=":return a!=c;case"contains":return a.indexOf(c)!==-1;case"doesnotcontains":return a.indexOf(c)===-1;case"startswith":return a.startsWith(c);case">=":return a>=c;case"<=":return a<=c;default:return!1}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.CustomValidation",function(a){var b,c=[];return{init:function(){console.log("INIT CustomValidation.js"),b=this,a.subscribe({CustomizeValidation:b.customizeOptions})},execute:function(){var a=$.validator.methods.required;$.validator.methods.required=function(){var b=$(arguments[1]);return b.is("[placeholder]")&&arguments[0]==b.attr("placeholder")&&(arguments[0]=""),a.apply(this,arguments)}},customizeOptions:function(d){currentForm=a.select(d.formObj),currentForm.validate({onfocusin:!1,onfocusout:!1,onkeyup:!1,onclick:!1,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="SELECT"==h.element.tagName?"A selection is":"This field is";switch(h.method){case"required":h.message="checkbox"!=h.element.type?j+" 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")}var k=a.select(h.element).parent();k.hasClass("group-choice")?a.select(k).closest(".checkout-label-value").prev().addClass(this.settings.errorHighlightClass):"ibill-verify-page"===k.attr("data-content")?a.select(k).addClass(this.settings.errorHighlightClass):a.select(k).prev().addClass(this.settings.errorHighlightClass);var l=document.createElement("input");"placeholder"in l||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 m="<p>"+h.message+"</p>";if(this.showLabel(h.element,m),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 n=[];n=$("label[for='"+$(h.element).attr("id")+"']"),h.element.labels=n}}if(this.errorList.length&&a.select("form.accordion").length>0){this.toShow=this.toShow.add(this.containers);var o=a.select(".error-header","form.accordion");if(a.select(o).length>0)for(var f=0;f<o.length;f++)a.select(o[f]).parent(".accordion-panel").find(".error").length>0&&(a.select(o[f]).html("<p>Please correct the items marked below to continue.</p>"),a.select(o)[f].style.display="block",a.select(o[f]).parent(".accordion-panel").addClass("accordion-panel-open").removeClass("accordion-panel-disabled"),a.select(o[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 o=a.select(".error-header",this.currentForm);a.select(o).length&&(a.select(o).html("<p>Please correct the items marked below to continue.</p>"),
a.select(o)[0].style.display="block")}else a.select(".error-header",this.currentForm).hide();if(this.settings.unhighlight)for(f=0,g=this.validElements();g[f];f++){var k=a.select(g[f]).parent();a.select(k).hasClass(this.settings.verticalGroupClass)?a.select(k).prev().find(".error-wrapper").remove():a.select(g[f]).siblings(".error-wrapper").remove(),k.hasClass("group-choice")?a.select(k).closest(".checkout-label-value").prev().removeClass(this.settings.errorHighlightClass):"ibill-verify-page"===k.attr("data-content")?a.select(k).removeClass(this.settings.errorHighlightClass):a.select(k).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 p=[];a.select(e).each(function(a,d){var e=b.inArray(c,d);e||(c.push(d),p.push(d))}),0!==p.length&&(udoFormErrors=p,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.global.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(){(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"}))},onSelect:function(d,e){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){var e=this.id,f=e.match(/(.*?)-end/);if(f){var g=a.select("#"+f[1]+"-start"),h=g.val(),i=Date.parse(g[0].value),j=$.datepicker.formatDate("mm/dd/yy",new Date(b.today));0==isNaN(i)?a.select("#"+f[1]+"-end").datepicker("option","minDate",h):a.select("#"+f[1]+"-end").datepicker("option","minDate",j)}var k=a.select("#"+e).offset(),l=a.select("#"+e).height(),m=a.select("#"+e).width();window.setTimeout(function(){a.select(d.dpDiv).css({top:k.top+l-185+"px",left:k.left+m+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.global.demo",function(b){var c,d=".select-navigation select",e={type:"GET",dataType:"text",timeout:"30000",cache:!1};return{init:function(){console.log("INIT demo.js"),c=this,b.subscribe({demoChange:c.demoChange,Orientation:function(a){},demoJSON:c.demoJSON})},execute:function(){console.log("EXEC demo.js"),c=this,b.select("body").on("content-loaded change",d,function(a){var c=this.options[this.selectedIndex].title||this.options[this.selectedIndex].text;b.select(this.form).prev(".demo-title").text(c),b.publish({type:"demoChange",data:this})}),b.select("body").on("submit","#ajaxJSONResponse form",function(c){b.preventDefault(c),b.publish({type:"Ajax",data:a.extendObj(e,{id:"demoJSON",container:b.select(this).parents(".response"),url:this.action,dataType:"json",type:this.method.toUpperCase(),data:b.select(this).serialize(),throbber:{type:"showThrobber",data:{nodes:b.select(this).parents(".response").closest(".loading-wrapper")}}})})})},demoJSON:function(a){b.select(".loading-wrapper-active",a.container).removeClass("loading-wrapper-active"),b.select("<pre>"+JSON.stringify(a.responseJSON)+"</pre>").fadeIn("slow").appendTo(a.container)},demoChange:function(c){return b.publish({type:"Ajax",data:a.extendObj(e,{url:c[c.selectedIndex].value,type:c.form.method,container:b.select("#"+c.id+"-content .response"),throbber:{type:"showThrobber",data:{nodes:b.select("#"+c.id+"-content .response").closest(".loading-wrapper")}}})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.FeaturedLinks",function(a){var b,c=".aem-label-img-bottom-border";a.select(".aem-label-img-bottom-border");return{init:function(){console.log("INIT FeaturedLinks.js")},execute:function(){console.log("EXEC FeaturedLinks.js"),b=this,a.select("body").on("content-loaded",c,function(){}),a.select(".aem-label-img-bottom-border .col-content").mouseover(function(){var b=a.select(this).find("img").attr("data-hover-src");"undefined"!=typeof b&&b!==!1&&a.select(this).find("img").attr("src",b)}),a.select(".aem-label-img-bottom-border .col-content").mouseleave(function(){var b=a.select(this).find("img").attr("data-onload-src");"undefined"!=typeof b&&b!==!1&&a.select(this).find("img").attr("src",b)})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.FocusManager",function(a){var b,c;return{init:function(){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.global.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']",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("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.global.GoogleMapAutoPopulateAddress",function(a){var b,c,d=".autocomplete-address";return{init:function(){console.log("INIT GoogleMapAutoPopulateAddress.js"),b=this,a.subscribe({AutoCompleteAddress:b.getAutoCompleteAddressConfigs})},execute:function(){console.log("EXEC GoogleMapAutoPopulateAddress.js"),b=this,"undefined"!=typeof google&&a.select("body").on("content-loaded autocomplete-address",d,function(b){a.publish({type:"AutoCompleteAddress",data:this})})},getAutoCompleteAddressConfigs:function(){for(var b=[],d=[],e=[],f=a.select(".autocomplete"),g=a.select("input.postal-code"),h=a.select("input.city-name"),i=a.select("input.state-name, select.state-name"),j=0;j<f.length;j++)a.select(f[j]).addClass("google-target-"+j),a.select(g[j]).addClass("google-target-zip-"+j),a.select(h[j]).addClass("google-target-city-"+j),a.select(i[j]).addClass("google-target-state-"+j);for(var l=0;l<f.length;l++){b[l]=a.select(".autocomplete")[l],e[l]=a.select(".autocomplete-dummy")[l];var m=a.select(".autocomplete-hidden"),n={types:["geocode"],componentRestrictions:{country:"us"}};d[l]=new google.maps.places.Autocomplete(b[l],n),google.maps.event.addListener(d[l],"place_changed",function(){var b=a.select(".autocomplete");for(k=0;k<b.length;k++){var f=$(c).hasClass("google-target-"+k);if(1==f)break}var g,h=a.select(".autocomplete").slice(k,k+1),i=a.select(".autocomplete-dummy").slice(k,k+1),j=a.select(".autocomplete-hidden").slice(k,k+1),l=a.select(c).attr("class"),m=new RegExp("\\bautocomplete\\b"),n=l.match(m)[0];if("autocomplete"==n?(h.css({display:"inline-block"}),h.removeClass("ignore-validation"),i.css({display:"none"}),i.addClass("ignore-validation"),""==i.val()||i.hasClass("error")||h.removeClass("error"),g=d[k].getPlace()):(g=d[k].getPlace(),i.css({display:"inline-block"}),i.removeClass("ignore-validation"),h.css({display:"none"}),h.addClass("ignore-validation"),h.hasClass("error")&&i.addClass("error"),""==h.val()||h.hasClass("error")||i.removeClass("error"),g=e[k].getPlace()),j.attr("value",a.select(c).val()),void 0!=g){var o=g.address_components,p=null,q=null,r=null,s=null,t=null;a.select(o).each(function(a,b){"route"==b.types[0]&&(p=b.long_name),"street_number"==b.types[0]&&(q=b.long_name),"postal_code"==b.types[0]&&(r=b.long_name),"locality"==b.types[0]&&(s=b.long_name),"administrative_area_level_1"==b.types[0]&&(t=b.short_name)}),null!=q&&null!=p?("inline-block"==h.css("display")?h.val(q+" "+p):i.val(q+" "+p),j.val(q+" "+p)):null==q&&null!=p?("inline-block"==h.css("display")?h.val(p):i.val(p),j.val(p)):null!=q&&null==p?("inline-block"==h.css("display")?h.val(q):i.val(q),j.val(p)):("inline-block"==h.css("display")?h.val(""):i.val(""),j.val(""));var u="google-target-zip-"+k,v=a.select("."+u);v.val(r);var w="google-target-city-"+k,x=a.select("."+w);x.val(s);var y="google-target-state-"+k,z=a.select("."+y);z.val(t)}a.publish({type:"autoFillActionComplete",data:{}})})}a.select("body").on("keypress",".autocomplete",function(b){13==b.keyCode&&(a.preventDefault(b),c=this,a.select(c).blur())}),a.select("body").on("keypress",".autocomplete-dummy",function(b){13==b.keyCode&&(a.preventDefault(b),c=this,a.select(c).blur())}),a.select("body").on("blur",".autocomplete",function(b){m.val(a.select(".autocomplete").val()),c=this}),a.select("body").on("blur",".autocomplete-dummy",function(b){m.val(a.select(".autocomplete-dummy").val()),c=this}),a.publish({type:"autoFillActionComplete",data:{}})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.Hero",function(a){var b;return{init:function(){console.log("INIT Hero.js")},execute:function(){console.log("EXEC Hero.js"),b=this,a.select(".hero-block").length>0&&(b.checkHeroTabs(),a.select(".hero-block").closest(".flexslider").has(".mobile-only .button").addClass("carousel-controls-offset"),a.select(".hero-block").has(".mobile-only .button").addClass("hero-button-offset"),a.select(".hero-block").on("click",".position-content, a",function(a){b.handleHeroNavigation(this,a)}))},checkHeroTabs:function(){if(window.matchMedia&&window.matchMedia("all").addListener){var c=window.matchMedia("(max-width: 767px)");b.toggleHeroTabs(c),c.addListener(b.toggleHeroTabs)}var d=a.select(".hero-block").find(".hero-image"),e=a.select(d).attr("href");"undefined"!=typeof e&&""!==e&&(a.select(".hero-block").css("cursor","pointer"),a.select(d).css("cursor","pointer"))},toggleHeroTabs:function(b){b.matches?a.select(".hero-tabs ol.flexslider-controls").removeClass("flexslider-controls").addClass("flex-control-nav"):a.select(".hero-tabs ol.flex-control-nav").removeClass("flex-control-nav").addClass("flexslider-controls")},handleHeroNavigation:function(b,c){var d=a.select(c.target);if(d.is(':not("a")')){var e=a.select(b).closest(".hero-block").find(".hero-image"),f=a.select(e).attr("href"),g=a.select(e).attr("target")||"_self";f&&window.open(f,g)}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.HideMaxListItems",function(a){var b,c=".hide-max-items";return{init:function(){console.log("INIT HideMaxListItems.js"),b=this,a.subscribe({Orientation:function(){a.select(c).trigger("content-loaded")}})},execute:function(){console.log("EXEC HideMaxListItems.js"),b=this,a.select("body").on("content-loaded",c,function(d){var e;window.matchMedia&&window.matchMedia("all").addListener&&(e=window.matchMedia("(max-width: 767px)").matches),a.select(c).each(function(){var c=a.select(this),d=c.data("maxItemsDisplay");"desktop"==d&&!e||"all"==d?b.displayList(c):"mobile"==d&&e?b.displayList(c):b.removeList(c)})})},displayList:function(b){var c,d=b.data("maxItems")||"3",e=b.data("moreText")||"Read More",f=b.data("lessText")||"Read Less",g=600,h="<div class='col-content maxlist-more'><a href='#'></a></div>",i=b.children("li").length;i>0&&g>0?(c=Math.round(g/i),c<1&&(c=1)):c=0,i>0&&i>d&&b.next(".maxlist-more").length<=0&&(b.children("li").each(function(b){b+1>d&&a.select(this).hide(0)}),b.after(h),b.next(".maxlist-more").children("a").html(e),b.next(".maxlist-more").children("a").click(function(b){var g=a.select(this).parent().prev("ul, ol").children("li");if(g=g.slice(d),a.select(this).html()==e){a.select(this).html(f);var h=0;!function(){a.select(g[h++]||[]).slideToggle(c,arguments.callee)}()}else{a.select(this).html(e);var h=g.length-1;!function(){a.select(g[h--]||[]).slideToggle(c,arguments.callee)}()}b.preventDefault()}))},removeList:function(b){a.select("li",b).css("display",""),b.next().remove()},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.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.global.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 class="col-reset">'+c.message+"</p>").appendTo(b.select(".loader",c.nodes)):b.select('<p class="col-reset">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.global.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.global.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='button date-modal-button'>Done</a><a class='button-secondary date-modal-close'>Close</a></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.global.Modal",function(a){var b,c,d,e,f,g=!1;return{init:function(){console.log("INIT Modal.js"),b=this,a.subscribe({Orientation:b.positionModal})},execute:function(){console.log("EXEC Modal.js"),b=this,a.select("body").on("content-loaded",".cms-auto-launch",function(){a.select(".autoscroll-placeholder").length>0&&"none"!=a.select(".autoscroll-placeholder").css("display")?setTimeout(function(){a.select(".cms-auto-launch").click()},1005):a.select(".cms-auto-launch").click()}),a.select("body").on("click",".cms-modal-trigger, .cms-auto-launch",function(h){d=12,h.preventDefault(),h.stopPropagation(),c&&(a.select(".cms-dialog").remove(),c=null);var i,j=!1;null!=a.select(this).attr("data-content-element")?(i=" #"+a.select(this).attr("data-content-element"),j=!0):i=this.href,e=i;var k,l="true"==a.select(this).attr("data-clone-disable");if((!l&&a.select(".residential-store").length>0||a.select(".business-store").length>0)&&(g=!0),j){k=a.select(i);var m=a.select(".video-holder",k).length>0;m&&a.select(".video-holder",k).trigger("content-loaded",!0);var n=a.select(".form",k).length>0;n&&a.select(".form",k).trigger("content-loaded",!0)}var o;o=window.matchMedia("(min-width: 768px) and (max-width: 959px)").matches?"100%":a.select(this).data("modalWidth")||"1010",f=a.select(this).data("hideCloseBtn");var p=a.select(this).data("modalTheme");switch(o){case 850:d="10";break;case 690:d="8"}if(null!=a.select(this).attr("data-modal-title"))var q=a.select(this);var r=a.select(this).data("disableClose")===!0;j&&(k=g?a.select(i).clone(!0):a.select(i));var s=j===!1?a.select("<div>"):0===a.select(i).length?a.select("<div>"):k;if(c=s.dialog({open:function(){if(j===!1)a.select(this).parents(".cms-dialog").addClass("loading-wrapper").prepend("<div class='loader'></div>"),a.select(this).load(i,function(c,d){a.publish({type:"hideThrobber",data:{nodes:a.select(".loading-wrapper")}}),a.select(".cms-dialog").children(".loader").remove(),"success"===d&&(b.addCustomModalTitle(q),b.positionModal(o)),"error"===d&&a.select("<h2>Page Not Found</h2><div class=\"msg-error col-reset\"><p>We're sorry, we can't find this part of the page.</p></div>").appendTo(".ui-dialog-content")}),a.publish({type:"showThrobber",data:{nodes:a.select(".loading-wrapper")}});else{0===a.select(i).length?a.select("<h2>Page Not Found</h2><div class=\"msg-error col-reset\"><p>We're sorry, we can't find this part of the page.</p></div>").appendTo(".ui-dialog-content"):b.addCustomModalTitle(q),a.select(".cms-dialog").css("position","absolute");var c=a.select(window).scrollTop();"desktop"===a.select("body").attr("data-layout")&&a.select(".cms-dialog").height()<a.select(window).height()&&(c+=(a.select(window).height()-a.select(".ui-dialog").height())/2),a.select(".cms-dialog").css("top",c)}r&&(a.select(".ui-widget-overlay").addClass("prevent-close"),a.select(".cms-dialog .ui-dialog-titlebar-close").css("display","none"))},buttons:[{text:"Close",click:function(){a.select(".ui-dialog-content").removeClass("colspan-"+d),b.pauseVidoesOnModalClose(this),a.select(".cms-dialog").remove()}}],dialogClass:"cms-dialog cols-grid "+(null!=a.select(this).attr("data-modal-class")?a.select(this).attr("data-modal-class"):""),beforeClose:function(b,c){a.publish({type:"ModalBeforeClose",data:{event:b}})},close:function(c){a.select(".ui-dialog-content").removeClass("colspan-"+d),b.pauseVidoesOnModalClose(this),a.select(".cms-dialog").remove(),a.publish({type:"ModalStatus",data:{event:c,enabled:!1}}),a.select("#pf-container").removeClass("no-print")},resizable:!1,draggable:!1,height:"auto",modal:!0,width:o}),p?a.select(".ui-dialog").addClass(p):a.select(".ui-dialog").removeClass("dark"),f&&b.hideCloseButton(),a.select(".ui-dialog-content").addClass("colspan-"+d),a.select(".ui-dialog-buttonset").find(".ui-button").addClass("button btn-close").removeClass("ui-widget ui-state-default ui-corner-all ui-button-text-only"),j===!0){b.positionModal(o);var t=a.select(".all-plans",v),u=a.select(i).find(".offer-comparison-container")[0];if(a.select(".cms-dialog").find(".slick-carousel")[0]){var v=a.select(".cms-dialog").find(".slick-carousel");v.hasClass("slick-initialized")&&v.slick("unslick"),a.publish({type:"ReinitializeSlick",data:v})}var w=a.select(".modal-inline-content").find(".section-container")[0];w&&a.publish({type:"RealignContainerItems",data:w}),u&&(a.publish({type:"RecalculateTable",data:u}),a.select(u).append(t)),a.publish({type:"ModalStatus",data:{event:h,enabled:!0}})}a.select("#pf-container").addClass("no-print"),a.select(this).removeClass("cms-auto-launch")}),a.select("body").on("click",".btn-close, .ui-widget-overlay",function(c){a.select(this).hasClass("prevent-close")||(a.select(".ui-dialog-content").removeClass("colspan-"+d),b.pauseVidoesOnModalClose(a.select(".cms-dialog .ui-dialog-content")),a.select(".cms-dialog").remove(),a.select(".ui-widget-overlay").remove(),a.publish({type:"ModalStatus",data:{event:c,enabled:!1}}),a.select("#pf-container").removeClass("no-print"),c.stopPropagation())}),a.select("body").on("keyup",function(b){27===b.keyCode&&f&&(a.select(".ui-dialog-content").removeClass("colspan-"+d),a.select(".cms-dialog").remove(),a.select(".ui-widget-overlay").remove())})},hideCloseButton:function(){a.select(".ui-dialog-buttonpane").css("display","none")},positionModal:function(b){var c="",d=a.select(".cms-dialog").css("border-top");a.select(".cms-dialog").css("position","absolute"),window.matchMedia&&(window.matchMedia("(max-width: 767px)").matches&&(c=" top"),window.matchMedia("(min-device-width: 768px) and (max-device-width: 959px)").matches&&a.select(".cms-dialog").length>0&&(a.select(".cms-dialog .ui-dialog-content").hasClass("colspan-12")||a.select(".cms-dialog .ui-dialog-content").hasClass("colspan-10"))&&a.select(".cms-dialog").css({width:"99%"})),a.publish({type:"ModalLoaded",data:e}),setTimeout(function(){a.select(".cms-dialog").height()>a.select(window).height()&&(c=" top"),a.select(".cms-dialog").position({my:"center"+c,at:"center"+c,of:window})},100),a.select(window).resize(function(){"desktop"===a.select("body").attr("data-layout")&&(a.select(".cms-dialog").height()>a.select(window).height()&&(c=" top"),a.select(".cms-dialog").position({my:"center"+c,at:"center"+c,of:window}),window.matchMedia&&a.select(".cms-dialog").length>0&&(window.matchMedia("(min-device-width: 768px) and (max-device-width: 959px)").matches&&(a.contains(a.select(".cms-dialog")[0],a.select(".ui-dialog-content.colspan-12")[0])||a.contains(a.select(".cms-dialog")[0],a.select(".ui-dialog-content.colspan-10")[0]))?a.select(".cms-dialog").css({width:"99%"}):a.select(".cms-dialog").css({width:b,"border-left":d,"border-right":d})))})},addCustomModalTitle:function(b){"undefined"!=typeof b&&a.select("<h2>"+a.select(b).attr("data-modal-title")+"</h2>").prependTo(".ui-dialog-content")},pauseVidoesOnModalClose:function(b){if("support-video-modal"===a.select(b).attr("id")||"browse-all-videos-modal"===a.select(b).attr("id")){var c=a.select(b).children().attr("id");jwplayer(c).pause(!0)}},destroy:function(){}
}})}(coxfw),function(a){a.core.define("modules.global.ModalOpenClose",function(b){var c,d,e,f,g,h,i=".auto-launch",j={container:b.select(".dialog-component-content"),type:"GET",dataType:"text",timeout:"30000",cache:!1,throbber:{type:"showThrobber",data:{nodes:b.select(".dialog-component-content").closest(".loading-wrapper")}}};return{init:function(){console.log("INIT ModalOpenClose.js"),g=this,b.subscribe({Modal:g.modalHandler,Orientation:g.resetModalDimensions})},execute:function(){console.log("EXEC ModalOpenClose.js"),g=this,g.modalOptions(),b.select("body").on("content-loaded",i,function(a){var c=b.select(this);g.modalOptions(a,b.select(c),{enabled:!0,initialX:window.scrollX,initialY:window.scrollY,initialWidth:c.attr("data-modal-width"),id:c.attr("id")}),b.publish({type:"Modal",data:h}),g.trackModalLaunch(c),b.select(".dialog-component-content").attr("tabindex",-1).focus()}),b.select("body").on("click touchstart",".modal-trigger",function(a){d=b.select(this),a.stopPropagation(),b.preventDefault(a),g.modalOptions(a,d,{enabled:!0,initialX:window.scrollX,initialY:window.scrollY,initialWidth:d.attr("data-modal-width")}),b.publish({type:"Modal",data:h}),g.trackModalLaunch(d),b.select(".dialog-component-content").attr("tabindex",-1).focus()}),b.select("body").on("click","#underlay, .btn-icon-close, .btn-close",function(a){var c=h.launcher,e=!1;d=b.select(this),a.stopPropagation(),b.preventDefault(a),h.disableClose&&0==d.parent(".dialog-component-buttons").length&&(e=!0),g.modalOptions(a,d,{enabled:e,disableClose:h.disableClose}),b.publish({type:"Modal",data:h}),1!=e&&b.select(c).focus(),b.select(".dialog-component-content").removeAttr("tabindex")}),b.select("body").on("keydown",".dialog-component",function(a){27==a.keyCode?0==h.disableClose&&b.select(".btn-close").trigger("click"):b.publish({type:"FocusManager",data:{container:this,event:a}})})},modalHandler:function(d){if(h=d,f=0==b.select("#underlay").length?b.select("<div></div>",{id:"underlay",tabindex:"-1"}).appendTo("body"):b.select("#underlay"),c=0==d.containers.length?b.select("<div class='dialog-component loading-wrapper' role='dialog' aria-labelledby='dialog-title' aria-hidden='true'><div class='loader'></div><div class='dialog-component-head'><a class='btn-close' title='Close' href='#'></a></div><div class='dialog-component-title' id='dialog-title'></div><div class='dialog-component-content' role='document'></div></div>").appendTo("body"):d.containers,e=0==d.content.length?b.select(".dialog-component-content"):d.content,c.addClass(d.classes),h.containers=c,h.content=e,d.disableClose?(b.select(".dialog-component-head").addClass("disable-close"),b.select(".dialog-component-head a").removeAttr("href"),b.select(".dialog-component-head a").removeClass("btn-close")):(b.select(".dialog-component-head").removeClass("disable-close"),b.select(".dialog-component-head a").attr("href","#"),b.select(".dialog-component-head a").addClass("btn-close")),d.enabled){b.select("#pf-container").addClass("no-print"),f.css("display","block"),"string"==typeof d.source?d.launcher.filter("[id!='underlay']").length>0&&b.publish({type:"Ajax",data:a.extendObj(j,{container:d.content,url:d.source,id:d.id,throbber:{data:{nodes:b.select(".dialog-component-content").closest(".loading-wrapper")}}})}):(d.launcher.filter("[id!='underlay']").length>0&&b.publish({type:"showThrobber",data:{nodes:b.select(".dialog-component-content").closest(".loading-wrapper")}}),e.append(d.source),b.select(".dialog-component-content").closest(".loading-wrapper-active").length>0&&b.publish({type:"hideThrobber",data:{nodes:b.select(".dialog-component-content").closest(".loading-wrapper-active")}})),""!=d.title&&b.select(".dialog-component-title",c).text(d.title),0==b.select("body.IE").length?b.select("body").css("overflowX","hidden"):b.select("html").css("overflowX","hidden");var i={},k=0;i.w=b.select(window).width(),i.h=b.select(window).height(),k=b.select(window).scrollTop()+b.select(window).height(),!(b.select(".autoscroll-placeholder").length>0&&"none"!=b.select(".autoscroll-placeholder").css("display"))||b.select(".autoscroll-placeholder").hasClass("autoscroll-completed")||b.select(window).scrollTop()>0||(k=b.select(".autoscroll-placeholder").offset().top+b.select(window).height()),b.select(window).width()<d.initialWidth?c.css("width",d.width+"%"):c.css("width",d.initialWidth+"px"),c.css("height",d.height==-1?"auto":d.height+"px");var l=Math.round(i.h/2-c.height()/2),m=Math.round(i.w/2-c.width()/2);(l<0||c.height()<i.h&&!h.isMobile)&&(l=c.height()>i.h&&k-i.h/2<c.height()/2?0:k-i.h/2-c.height()/2),c.css("top",l+"px"),c.css("left",m+"px"),c.css("display","block");var n=b.select(".dialog-component").height()>b.select(window).height()?b.select(".dialog-component").height()+"px":b.select(window).height()+"px";if(n=parseInt(n)>b.select("body").height()+b.select(window).scrollTop()/2?n:b.select("body").height()+b.select(window).scrollTop()/2+"px",f.css("height",n),b.select(document).ajaxComplete(function(a,d,e){var g=b.select(window).height()/2-c.height()/2;(g<0||c.height()<b.select(window).height()&&!h.isMobile)&&(g=c.height()>b.select(window).height()&&k-i.h/2<c.height()/2?0:k-i.h/2-c.height()/2),c.css("top",g+"px");var j=b.select(".dialog-component").height()>b.select(window).height()?b.select(".dialog-component").height()+"px":b.select(window).height()+"px";j=parseInt(j)>b.select("body").height()+b.select(window).scrollTop()/2?j:b.select("body").height()+b.select(window).scrollTop()/2+"px",f.css("height",j)}),1==d.isMobile){var o=b.select(".dialog-component").height();f.css("height",o),b.select("#pf-container").css("display","none"),window.scrollTo(0,0)}if(0!=b.select("iframe",f).length){var p=b.select("iframe",f);p.css("top",c.offset().top+"px"),p.css("left",c.offset().left+"px"),p.css("width",c.outerWidth()+"px"),p.css("height",c.outerHeight()+"px")}}else b.publish({type:"hideThrobber",data:{nodes:b.select(".dialog-component-content").closest(".loading-wrapper-active")}}),b.select("#pf-container").removeClass("no-print"),e.html(""),e.css("height",""),b.select(".dialog-component-title",c).text(""),h.title="",f.css("display","none"),c.removeClass().addClass("dialog-component loading-wrapper"),c.css("display","none"),1==d.isMobile&&(b.select("#pf-container").css("display","block"),f.css("height","auto"),window.scrollTo(h.initialX,h.initialY)),0==b.select("body.IE").length?b.select("body").css("overflowX","auto"):b.select("html").css("overflowX","auto"),g.modalOptions();b.select("[aria-hidden]").each(function(){"true"==b.select(this).attr("aria-hidden")?b.select(this).attr("aria-hidden","false"):"false"==b.select(this).attr("aria-hidden")&&b.select(this).attr("aria-hidden","true")})},modalOptions:function(c,d,e){if(0==arguments.length)return void(h={enabled:!0,requestId:null,event:null,launcher:null,containers:null,content:null,source:null,title:"",width:564,height:-1,classes:"",disableClose:!1,isMobile:!1,initialX:0,initialY:0,initialWidth:0,hasDualLayout:!1});h.event=c,h.launcher=d,h.containers=b.select(".dialog-component"),h.content=b.select(".dialog-component-content"),h.isMobile=b.select(window).width()<768;var f=!1;if(window.matchMedia&&(h.hasDualLayout=window.matchMedia("(orientation : portrait)").matches?b.select(window).width()<768&&b.select(window).height()>768:b.select(window).width()>768&&b.select(window).height()<600),null!=h.launcher.attr("data-content-element"))h.source=b.select("#"+h.launcher.attr("data-content-element")).clone(!0),f=!0;else if(null!=h.launcher.attr("href")){var g=h.launcher[0].pathname;g=g.replace(/^\//g,""),g=g.replace(/\//g,"-"),g=g.replace(".","\\."),g=g.replace(";",""),g=g.replace("=",""),0==b.select("#"+g).length?h.source=h.launcher.attr("href"):(h.source=b.select("#"+g).clone(!0),f=!0)}1==f&&(formElement=h.source.find("form")[0],void 0!=formElement&&(b.select(formElement).data("validator").currentForm=formElement)),h.title=null!=h.launcher.attr("data-modal-title")?h.launcher.attr("data-modal-title"):h.title,h.width=null!=h.launcher.attr("data-modal-width")?parseInt(h.launcher.attr("data-modal-width")):h.width,h.height=null!=h.launcher.attr("data-modal-height")?parseInt(h.launcher.attr("data-modal-height")):h.height,h.classes=null!=h.launcher.attr("data-modal-class")?h.launcher.attr("data-modal-class"):"",h.disableClose="true"==h.launcher.attr("data-disable-close"),h.width>b.select(window).width()&&(h.width="100"),3==arguments.length&&a.extendObj(h,e)},trackModalLaunch:function(a){if("undefined"!=typeof __coxOmnitureParams&&"undefined"!=typeof s_account&&""!=s_account){var c=__coxOmnitureParams?__coxOmnitureParams.pageName+":":"",d=__coxOmnitureParams?__coxOmnitureParams.hier1+",":"",e=__coxOmnitureParams?__coxOmnitureParams.hier2+",":"",f=__coxOmnitureParams?__coxOmnitureParams.localeName+":":"",a=a[0],g=h.title.toLowerCase()||a.innerHTML.toLowerCase();g&&b.publish({type:"OmnitureInterface",data:{mode:"track",type:"pageview",clearVariables:"true",options:{pageName:c+g,hier1:d+g,hier2:e+g,localePagename:f+c+g}}})}},resetModalDimensions:function(a){if(void 0!=c&&c.is(":visible")){if(screen.width>=768){c.width()>b.select(window).width()?c.css("width","100%"):c.css("width",h.initialWidth+"px");var d=b.select(window).width()/2-c.width()/2;c.css("left",d+"px");var e=b.select(window).height(),f=e/2-c.height()/2;(f<0||c.height()<e)&&(f=c.height()>e&&b.select(window).scrollTop()+e/2<c.height()/2?0:b.select(window).scrollTop()+e/2-c.height()/2),c.css("top",f+"px")}h.hasDualLayout&&(b.select("#pf-container").css("display","portrait"==a.orientation?"none":"block"),b.select("#underlay").css("height",("portrait"==a.orientation?b.select(".dialog-component").height():b.select("body").height())+"px"),"landscape"==a.orientation&&(f=h.launcher.offset().top+e/2-c.height()/2,c.css("top",f+"px"),setTimeout(function(){window.scrollTo(0,h.launcher.offset().top)},1)))}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.OfferComparison",function(a){var b,c,d,e=[];return{init:function(){console.log("INIT OfferComparison.js"),b=this,a.subscribe({RecalculateTable:b.alignComparisonTable,Orientation:b.resetTableHeaderWidth})},execute:function(){console.log("EXEC OfferComparison.js"),b=this,d=a.select("body").attr("data-layout"),c=a.select(".offer-comparison-container"),c.length<1||(c.each(function(c,e){var f=a.select(e);"desktop"===d&&f.is(":visible")&&(b.alignComparisonTable(f),a.select(".slick-prev",f).on("click",function(){b.toggleActiveItem(f)}),a.select(".slick-next",f).on("click",function(){b.toggleActiveItem(f)}),a.select(".slick-dots",f).on("click",function(){b.toggleActiveItem(f)}),a.select(e).on("swipe",function(){b.toggleActiveItem(this)}))}),a.select(window).bind("resize",function(){d!==a.select("body").attr("data-layout")&&setTimeout(function(){d=a.select("body").attr("data-layout"),c.each(function(c,d){var e=a.select(d);b.alignColumnHeight(e)})},100)}))},alignComparisonTable:function(c){d=a.select("body").attr("data-layout"),b.setTableHeaderWidth(c),b.countFirstItems(c),b.toggleActiveItem(c),b.alignColumnHeight(c)},setTableHeaderWidth:function(b){var c=a.select(b).width()-20;a.select(".offer-comparison .header",b).css("width",c)},countFirstItems:function(b){var c=a.select(".offer-comparison:not(.slick-cloned)",b).length,d=a.select(".offer-comparison-container").attr("data-show-slides"),f=counter=firstItem=0;for(f=d*counter;f<c;counter++){if(d*(counter+1)>c){firstItem=c%d+d*(counter-1),e.push(firstItem);break}firstItem=d*counter,e.push(firstItem)}},toggleActiveItem:function(b){if(a.select(".offer-comparison",b).removeClass("item-first"),a.select(".offer-comparison",b).length>4){var c=a.select(".slick-dots .slick-active button",b).html()-1;a.select(".offer-comparison[data-slick-index*="+e[c]+"]",b).addClass("item-first")}else a.select(".offer-comparison",b).eq(0).addClass("item-first")},resetTableHeaderWidth:function(){if("desktop"===d){if(c=a.select(".offer-comparison-container"),c<1)return;c.each(function(c,d){var e=a.select(d);b.setTableHeaderWidth(e),b.alignColumnHeight(e)})}},alignColumnHeight:function(b){if(!(a.select("body").find("#CQ").length>0)&&"desktop"===d){var c=a.select(".offer-comparison > .colspan-3 > .col-content")[0].children.length;for(i=1;i<=c;i++){var e=".offer-comparison > .colspan-3 > .col-content > div:nth-child("+i+")",f=0;a.select(e,b).each(function(b,c){var d=0;a.select(c).children().each(function(a,b){d+=b.clientHeight}),f=d>f?d:f}),a.select(e,b).css("height",f+"px"),1===i&&a.select(".slick-dots",b).css("top",f-20+"px")}}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.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.OverlayOpenClose",function(a){var b,c,d,e,f="top";return{init:function(){e=this,a.subscribe({Orientation:e.resetOverlayDimensions})},execute:function(){console.log("EXEC OverlayOpenClose.js"),a.select("body").on("click touchstart",".overlay-trigger",function(e){c=a.select(this),f=c.attr("data-position"),d=c.next(),b=a.select(".overlay-container"),b.css("top",0),b.css("left",0),b.removeClass("overlay-open"),e.stopPropagation(),a.preventDefault(e);var g=c.position().top+parseInt(c.css("padding-top"))+parseInt(c.css("padding-bottom"))+parseInt(c.css("margin-top"))+parseInt(c.css("margin-bottom")),h="right"==f?g-10:g+c.height()+10;d.css("top",h+"px"),d.css("left","right"==f?d.position().left+c.position().left+c.width()+30:d.position().left+c.position().left-(d.width()+parseInt(d.css("padding-left"))+parseInt(d.css("padding-right"))+parseInt(d.css("margin-left"))+parseInt(d.css("margin-right")))/2+(c.width()+parseInt(c.css("padding-left"))+parseInt(c.css("padding-right"))+parseInt(c.css("margin-left"))+parseInt(c.css("margin-right")))/2+"px"),d.addClass("overlay-open");var i;if(window.matchMedia&&(i=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),window.matchMedia&&("mobile"==a.select("body").attr("data-layout")||1==i||window.matchMedia("(orientation : portrait)").matches)){var j;if(c.position().left+c.width()/2+d.width()/2>a.select(window).width()){var k=c.position().left+c.width()/2+d.width()/2-(a.select(window).width()-40);j=parseInt(d.css("left"))-k}if(parseInt(d.css("left"))<0){var k=d.width()/2-c.position().left+c.width()/2;j=parseInt(d.css("left"))+k}d.css("left",j+"px")}var l=c.position().left+parseInt(c.css("margin-left"))+c.width()/2-parseInt(d.css("left"))-15+"px",m=a.select("head").find("style");a.each(m,function(b,c){c.innerHTML.indexOf("overlay-open:after")!=-1&&a.select(c).remove()}),a.select("head").append("<style>.overlay-open:after{left:"+l+"}</style>"),a.select(".pf-overlay-active").each(function(b,c){a.select(c).removeClass("pf-overlay-active")}),a.select(":focusable",".overlay-open").length>0&&a.select(":focusable",".overlay-open")[0].focus()}),a.select("body").on("click touchstart",".overlay-open",function(a){"submit"!=a.target.type&&a.stopPropagation()}),a.select(".pf-toggle").on("click",function(b){a.select(".overlay-container").removeClass("overlay-open")}),a.select(".pf-nav-flyout").on("mouseover",function(b){a.select(".overlay-container").removeClass("overlay-open")}),a.select("html").on("click touchstart keydown",function(b){a.select(".overlay-container").removeClass("overlay-open")}),a.select("body").on("keydown",".overlay-trigger, .overlay-open",function(b){27==b.keyCode?a.select(this).hasClass("overlay-trigger")&&0==a.select(".overlay-open:visible").length||(a.select(".overlay-container").removeClass("overlay-open"),a.stopPropagation(b),c.focus()):a.select(this).hasClass("overlay-open")&&a.publish({type:"FocusManager",data:{container:this,event:b}}),a.stopPropagation(b)})},resetOverlayDimensions:function(b){if(a.select(".overlay-open").length>0){d=a.select(".overlay-open"),c=d.prev();var e,g=c.position().top+parseInt(c.css("padding-top"))+parseInt(c.css("padding-bottom"))+parseInt(c.css("margin-top"))+parseInt(c.css("margin-bottom")),h="right"==f?g-10:g+c.height()+10;if(d.css("top",h+"px"),d.css("left",c.position().left+parseInt(c.css("margin-left"))+c.width()/2-d.width()/2+"px"),window.matchMedia&&(e=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),"mobile"==a.select("body").attr("data-layout")||1==e){if(c.position().left+c.width()/2+parseInt(c.css("margin-left"))+d.width()/2>a.select(window).width()-40){var i=c.position().left+parseInt(c.css("margin-left"))+c.width()/2+d.width()/2-(a.select(window).width()-40-10);newLeft=parseInt(d.css("left"))-i,d.css("left",newLeft+"px")}if(parseInt(d.css("left"))<0){var i=d.width()/2-(c.position().left+c.width()/2);newLeft=parseInt(d.css("left"))+i,d.css("left",newLeft+"px")}var j=a.select("head").find("style");a.each(j,function(b,c){c.innerHTML.indexOf("overlay-open:after")!=-1&&a.select(c).remove()}),a.select("head").append("<style>.overlay-open:after{left:"+pointerPosition+"}</style>")}}},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(".paging .disabled").on("click",function(a){a.preventDefault()})},showPageNumbers:function(){var b=[],c=a.select(window).width()>960?960:a.select(window).width(),d=a.select("div.paging[class^='colspan-']").length>0?a.select("div.paging[class^='colspan-']").width():c;d="mobile"==a.select("body").attr("data-layout")?d-.08*d:d-20;var e=d-240,f=a.select(".paging .active").closest("li"),g=f.width()+6,h=Math.floor(e/g);h=h>0?h:1;var i=a.select(".paging ul li").length>h?h:a.select(".paging ul li").length,j=i*g;a.select(".paging ul").css("width",j+"px");var k=f;b.push(f);var l=1;if(a.select(f).is("li:first-child"))for(;l<i;)k=a.select(k).next(),b.push(k),l++;else if(a.select(f).is("li:last-child"))for(;l<i;)k=a.select(k).prev(),b.push(k),l++;else{for(var m,n=f,o=f;l<i/2&&a.select(n).prev().length>0;)n=a.select(n).prev(),b.push(n),l++,m=l;for(;m<i;)a.select(o).next().length>0?(o=a.select(o).next(),b.push(o),m++):(n=a.select(n).prev(),b.push(n),m++)}a.select(".paging ul li").css("display","none"),a.each(b,function(b,c){a.select(c).css("display","inline-block")}),a.select("body").hasClass("IE")&&a.select(".paging .disabled").attr("disabled","disabled")},initPagination:function(){b.execute()},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.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(a){b.print()})},print:function(a){window.print()},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.ProductSpinner",function(a){var b,c,d;return{init:function(){console.log("INIT ProductSpinner.js"),b=this,a.subscribe({ProductSpinner:b.startSpinner})},execute:function(){},startSpinner:function(e){switch(sb=a.select(e.data.sb),sbInputVal=e.data.val,d=sb.parents(".spinner"),c=a.select(".next-step",d),a.select(".sb-value",d).val(sbInputVal),e.type){case"increase":b.incrementSpinBox(e.data);break;case"decrease":b.decrementSpinBox(e.data)}},decrementSpinBox:function(b){sbInputVal==b.max&&(a.select(".minibox-max",d).hide(),a.select(".sb-content-container",d).show()),0==sbInputVal?(b.trigger.addClass("disabled"),a.select(c).is("input")?c.addClass("button-disabled").attr("disabled","disabled"):c.css("display","none"),a.select(".sb-content-1",d).hide()):sbInputVal>b.min&&sbInputVal<=b.max&&(a.select("[data-spin-type='increase']",d).removeClass("disabled"),a.select(c).is("input")?c.removeClass("button-disabled").removeAttr("disabled"):c.css("display","inline-block"),a.select(".sb-content-container").hasClass("always-show")?(sbInputVal==b.max||sbInputVal<b.max)&&a.select(".sb-content-"+(sbInputVal+1),d).hide():sbInputVal<b.max&&a.select(".sb-content-"+(sbInputVal+1),d).hide())},incrementSpinBox:function(b){a.select(".sb-content-container").hasClass("always-show")?(sbInputVal<=b.max+1&&(sbInputVal>1?a.select(".sb-content-"+sbInputVal,d).show():(a.select("[data-spin-type='decrease']",d).removeClass("disabled"),a.select(c).is("input")?c.removeClass("button-disabled").removeAttr("disabled"):c.css("display","inline-block"),a.select(".sb-content-"+sbInputVal,d).show())),sbInputVal==b.max+1&&(a.select(".minibox-max",d).show(),b.trigger.addClass("disabled"),a.select(c).is("input")?(a.select(".spinup-tooltip").addClass("btn-help-spinup"),a.select(".spinup-tooltip-mobile").addClass("btn-help-spinup-mobile"),a.select("#spin-down").click(function(){a.select(".spinup-tooltip").removeClass("btn-help-spinup")}),c.addClass("button-disabled").attr("disabled","disabled")):(a.select(".sb-content-container",d).show(),c.css("display","inline-block")))):sbInputVal<=b.max?sbInputVal>1?a.select(".sb-content-"+sbInputVal,d).show():(a.select("[data-spin-type='decrease']",d).removeClass("disabled"),a.select(c).is("input")?c.removeClass("button-disabled").removeAttr("disabled"):c.css("display","inline-block"),a.select(".sb-content-"+sbInputVal,d).show()):sbInputVal>b.max&&(a.select(".minibox-max",d).show(),b.trigger.addClass("disabled"),a.select(c).is("input")?(a.select(".sb-content-container",d).hide(),c.addClass("button-disabled").attr("disabled","disabled")):(a.select(".sb-content-container",d).show(),c.css("display","inline-block")))},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.ProgressiveScroll",function(a){var b,c=".scroll-active",d=!0;return{init:function(){console.log("INIT ProgressiveScroll.js")},execute:function(){console.log("EXEC ProgressiveScroll.js"),b=this,a.subscribe({makeAnotherCall:function(){d=!0}}),b=this,a.select("body").on("content-loaded",c,function(b){b.stopPropagation();var c=30;a.select(window).on("scroll",function(){var b=0,e=0;a.select(".disclaimer").each(function(c,d){a.select(d).parent("p").length>0?(e=10,b+=a.select(d).parent("p").outerHeight(!0)):b+=a.select(d).outerHeight(!0)}),b+=e;var f=Math.round(a.select(window).scrollTop()+b+a.select("#pf-footer").height())+c,g=Math.round(a.select(document).height()-a.select(window).height());f>g&&d&&(a.publish({type:"ProgressiveScroll"}),d=!1)})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.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.global.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.global.SearchPromote",function(a){var b;return{init:function(){console.log("INIT SearchPromote.js"),b=this},execute:function(){function c(b){if(b){var c="",d=[];""!==$.cookie("cox-search-recent-terms")&&void 0!==$.cookie("cox-search-recent-terms")&&(c=$.cookie("cox-search-recent-terms")),""!==c&&(d=decodeURIComponent(c).split("|"));var e=a.inArray(b,d);e==-1&&(5==d.length&&d.shift(),b&&b.trim().length>0&&d.push(b),$.cookie("cox-search-recent-terms",d.join("|"),{expires:31536e6,path:"/"}))}}if(console.log("EXEC SearchPromote.js"),!(a.select("#search-promote-form").length<1)){if(b=this,a.select(".search-panel").length>0&&a.select(".link-list:not(.search-recent)").addClass("search-link-list"),a.select(".search-panel li:first-child + li span").length>0){var d=a.select(".search-refine form input:checked").length;d>0&&(a.select(".search-panel li:first-child + li span").html(d),a.select(".search-panel li:first-child + li span").addClass("showme"))}var e=void 0==$.cookie("cox-search-recent-terms")?[]:$.cookie("cox-search-recent-terms").split("|");for(e.length&&a.select(".search-recent").addClass("search-recent-active");e.length;){var f=e.pop();a.select(".search-recent ul .search-clear-recent").before(a.select("<li/>",{class:"col-content"}).append(a.select("<a/>",{href:"?q="+f,text:f})))}a.select("body[data-os='ios']").on("touchstart",function(b){0==a.select(b.target).parents(".yui-ac-container, .ui-autocomplete").length&&a.select(document.activeElement).hasClass("search-promote-keyword")&&document.activeElement.blur()}),a.select("body").on("click",".search-clear-recent",function(b){a.select(".search-recent").remove()}),a.select("body").on("click",".panel-trigger",function(b){b.preventDefault(),a.select(".panel-trigger").removeClass("active-panel"),a.select(this).hasClass("button")?a.select(".search-panel li:first-child a").addClass("active-panel"):a.select(this).addClass("active-panel"),a.select(a.select(this).attr("data-hide-div")).removeClass("active-panel"),a.select(a.select(this).attr("data-show-div")).addClass("active-panel")}),a.select("body").on("click",".search-recent a",function(b){b.preventDefault();var c=a.select(this).text();"Clear Recent Searches"==c?(a.select(".search-recent").remove(),$.removeCookie("cox-search-recent-terms",{path:"/"})):(a.select(".search-promote-form").find("#q").val(c),setTimeout(function(){a.select(".search-promote-form").submit()},1e3))}),a.select("body").on("submit",".search-promote-form",function(d){b.cleanupSearchValue(a.select(".search-promote-form").find("#q").val()),c(e);var e=a.select(".search-promote-form").find("#q").val()}),a.select("body").on("click",".dropdown-toggle",function(b){b.stopPropagation();var c=a.select(this).next(".dropdown-menu");c.toggle()}),a.select("body").on("click",function(b){b.stopPropagation();var c=a.select(".dropdown-menu");0===c.has(b.target).length&&c.hide()}),a.select("body").on("click",".dropdown-menu li a",function(b){b.preventDefault(),b.stopPropagation();var c=a.select(this).attr("data-title"),d=a.select(this).text();a.select(".dropdown-toggle .selected-option").text(d),a.select("form.search-promote-form input[name='sp_k']").val(c),a.select(".dropdown-menu").hide()}),a.select("body").on("click",".search-promote-form #autocomplete li a",function(b){b.preventDefault(),b.stopPropagation();var c=a.select(this).data("term");"Clear History"==c?a.select(".search-recent").remove():a.select(".search-recent ul li a:contains("+c+")").each(function(){a.select(this).parents("li").remove()})}),a.select("body").on("click",".search-promote-form #autocomplete li:not(a)",function(b){var d=a.select(this).text().trim();"Clear History"==d?a.select(".search-recent").remove():(a.select(".search-promote-form").find("#q").val(d),c(d))}),a.select("body").on("click",".search-refine input",function(b){var c=a.select(this).val();a.select(this).parents(".section-container").addClass("loading-wrapper").prepend(a.select("<div/>",{class:"loader"})),a.publish({type:"showThrobber",data:{nodes:a.select(this).parents(".loading-wrapper")}}),location.href=c}),a.select("body").on("keypress",".search-support-form input",function(a){var b=a.which;return 92!==b&&47!==b&&39!==b&&61!==b&&60!==b&&62!==b})}},cleanupSearchValue:function(b){b=b.replace(new RegExp("[<>\\\\'/=]","g"),""),a.select(".search-promote-form").find("#q").val(b)},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.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.SlickSlider",function(a){var b,c,d,e=".slick-carousel";return{init:function(){console.log("INIT SlickSlider.js"),c=this,a.subscribe({ReinitializeSlick:c.getSliderOptions})},execute:function(){console.log("EXEC SlickSlider.js"),c=this,a.select("body").on("content-loaded",e,function(b){if(a.select(".cms-dialog").find(e)[0]){var d=a.select(".cms-dialog").find(e);d.hasClass("slick-initialized")&&d.slick("unslick"),a.publish({type:"ReinitializeSlick",data:d})}c.initializeSliders()}),window.matchMedia&&(d=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,a.select(".tab")&&(a.select(window).width()<768||d&&window.matchMedia("(orientation : portrait)").matches)&&a.select(".tab").addClass("slick-carousel")),jQuery("body").on("beforeChange",".promo-card .slick-carousel",function(a,b,c,d){var e=d+1==jQuery(b)[0].slideCount?0:d+1,f=jQuery(jQuery(b.$slides[e])[0]).find(".best-offer h3")[0].innerHTML,g=jQuery(jQuery(b.$slides[c])[0]).find(".best-offer h3")[0].innerHTML;"undefined"!=typeof f?jQuery(this).find("a.slick-next")[0].innerHTML="<div>"+f+"</div>":jQuery(this).find("a.slick-next")[0].innerHTML="<div></div>","undefined"!=typeof g?jQuery(this).find("a.slick-prev")[0].innerHTML="<div>"+g+"</div>":jQuery(this).find("a.slick-prev")[0].innerHTML="<div></div>"}),jQuery("body").on("init",".promo-card .slick-carousel",function(a,b){if(jQuery(b)[0].slideCount>1){var c=jQuery(b.$slides[1]).find(".best-offer h3")[0].innerHTML;"undefined"!=typeof c?jQuery(this).find("a.slick-next")[0].innerHTML="<div>"+c+"</div>":jQuery(this).find("a.slick-next")[0].innerHTML="<div></div>"}}),c.initializeSliders()},getSliderOptions:function(b){var c=b.data("showSlides"),d=!!b.data("slideshow"),e=b.data("slideshowSpeed"),f=!b.hasClass("hide-or-show-dots"),g=!1,h=b.hasClass("offer-comparison-container")?"div.offer-comparison":"",i=a.select(".all-plans",b);if(0==b.width()){var j=b.closest(".accordion-panel");j.length>0&&j.css({display:"block",height:"0px"})}b.slick({dots:f,infinite:!!b.data("slideshow"),slide:h,slidesToShow:parseInt(c),slidesToScroll:parseInt(c),autoplay:d,autoplaySpeed:e,centerMode:g,prevArrow:'<a data-role="none" class="slick-prev" aria-label="previous"></a>',nextArrow:'<a data-role="none" class="slick-next" aria-label="next"></a>',responsive:b.parents(".tab-component").length>0?null:[{breakpoint:767,settings:{slidesToShow:b.hasClass("on-demand")||b.hasClass("external-search-navigation")?3:1,slidesToScroll:b.hasClass("on-demand")||b.hasClass("external-search-navigation")?3:1,infinite:!!b.hasClass("on-demand"),centerMode:!!b.hasClass("on-demand")}},{breakpoint:480,settings:{slidesToShow:b.hasClass("external-search-navigation")?3:1,slidesToScroll:b.hasClass("external-search-navigation")?3:1,infinite:!!b.hasClass("on-demand"),centerMode:!!b.hasClass("on-demand"),centerPadding:b.hasClass("on-demand")?"23%":""}}]}),b.parents(".tab-component").length>0&&b.on("afterChange",function(b,c,d){a.select("a",a.select(c.$slides[d])[0]).click()}),b.hasClass("offer-comparison-container")&&("mobile"==a.select("body").attr("data-layout")&&b.append(i),b.on("afterChange",function(a,c,d){b.append(i)}))},setMobileHeightForSlides:function(){var b=a.select(".pf-mobile-header")[0];if(b){var c=a.select(e);a.select(c).each(function(b,c){var d=a.select(c).find(".slick-track"),e=a.select(c).find(".slick-dots"),f=a.select(d).find(".slick-slide"),g=a.select(c).hasClass("offer-comparison-container"),h=a.select(c).hasClass("best-offer-container");if(h){var i=0;a.select(f).each(function(b,c){var d=a.select(c).height();i<d&&(i=d)}),a.select(e).css({top:"auto",position:"absolute"})}if(g){var i=0;a.select(f).each(function(b,c){var d=a.select(c).height();i<d&&(i=d)}),a.select(e).css({top:i,position:"absolute"})}})}},initializeSliders:function(){if(b=a.select(e),b.each(function(b,d){var e=a.select(d);e.hasClass("slick-initialized")||c.getSliderOptions(e)}),b.length>0){if(window.matchMedia&&window.matchMedia("all").addListener){var d=window.matchMedia("(orientation: landscape)");d.addListener(function(b){a.select(".slick-slide").length>0&&c.setMobileHeightForSlides()})}c.setMobileHeightForSlides()}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.Slider",function(a){var b,c=".slider";return{init:function(){console.log("INIT Slider.js"),b=this},execute:function(){console.log("EXEC Slider.js"),b=this,a.select("body").on("content-loaded",c,function(b){var c=a.select(this),d=0,e=100;a.select(c).attr("data-min-value")&&(d=Number(a.select(c).attr("data-min-value"))),a.select(c).attr("data-max-value")&&(e=Number(a.select(c).attr("data-max-value"))),c.slider({min:d,max:e,slide:function(a,b){console.log("     Slider.js - value: ",b.value)}})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.SocialShare",function(a){var b;return{init:function(){},execute:function(){b=this;var c=a.select(".social-container");if(a.select(c).append('<div id="fb-root"></div>'),c.length){var d=a.select("<ul/>",{class:"social-links"});a.select(this).next(".social-container").html(d),a.select(d).append('<li><div class="fb-share-button" data-layout="button"></div></li>'),b.loadFacebook(),a.select(d).append('<li><a href="https://twitter.com/share" class="twitter-share-button" data-count="none"></a></li>'),b.loadTwitter(),a.select(d).append('<li><div class="g-plusone" data-annotation="none" data-size="medium"></div></li>'),b.loadGooglePlus(),a.select(c).append(d)}},loadTwitter:function(){window.twttr=function(a,b,c){var d,e=a.getElementsByTagName(b)[0],f=window.twttr||{};return a.getElementById(c)?f:(d=a.createElement(b),d.id=c,d.src="https://platform.twitter.com/widgets.js",e.parentNode.insertBefore(d,e),f._e=[],f.ready=function(a){f._e.push(a)},f)}(document,"script","twitter-wjs")},loadFacebook:function(){!function(a,b,c){var d,e=a.getElementsByTagName(b)[0];a.getElementById(c)||(d=a.createElement(b),d.id=c,d.src="//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3",e.parentNode.insertBefore(d,e))}(document,"script","facebook-jssdk")},loadGooglePlus:function(){"undefined"!=typeof gapi?a.select(".g-plusone").each(function(){gapi.plusone.render(a.select(this).get(0))}):a.getScript("https://apis.google.com/js/platform.js")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.SocialShareAdavance",function(a){var b,c=".social-share-advance",d=a.select(".social-share-advance");return{init:function(){console.log("INIT SocialShareAdvance.js")},execute:function(){console.log("EXEC SocialShareAdvance.js"),b=this,a.select("body").on("content-loaded",c,function(){var a=encodeURIComponent(document.getElementsByTagName("title")[0].innerHTML);b.setImageSource(this),b.setLink(this,a),b.mailTo(this,a)}),0!==d.length&&(a.select("body").on("mouseover",".social-share-advance a",function(){if($(window).width()>992&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)===!1){var b=a.select(this).find("img").attr("data-active-src");"undefined"==typeof b&&(b=a.select(this).attr("data-inactive-src")),a.select(this).find("img").attr("src",b)}}),a.select("body").on("mouseleave",".social-share-advance a",function(){if($(window).width()>992&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)===!1){var b=a.select(this).find("img").attr("data-inactive-src");"undefined"==typeof b&&(b=a.select(this).attr("data-active-src")),a.select(this).find("img").attr("src",b)}}),a.select("body").on("click",".social-share-advance .facebook-share",function(b){b.preventDefault();var c=600,d=350,e=window.innerHeight/2-d/2,f=window.innerWidth/2-c/2;window.open(a.select(this).attr("href"),"","width="+c+",height="+d+",left="+f+",top="+e)}),a.select("body").on("click",".social-share-advance .google-plus-share",function(b){b.preventDefault(),window.open(a.select(this).attr("href"),"","width=400,height=620")}))},setImageSource:function(c){var d;a.select("img",c).each(function(){$(window).width()>992&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)===!1?(d=a.select(this).attr("data-inactive-src"),"undefined"==typeof d&&(d=a.select(this).attr("data-active-src"))):(d=a.select(this).attr("data-active-src"),"undefined"==typeof d&&(d=a.select(this).attr("data-inactive-src"))),a.select(this).attr("src",d)}),b.hideSocialShareAdvanceThrobber(".social-share-advance")},setLink:function(b,c){var d,e=encodeURIComponent(window.location.href);a.select("a:not(.print-trigger, .email-share)",b).each(function(){d=a.select(this).attr("href"),a.select(this).hasClass("twitter-share")?a.select(this).attr("href",d+e+"&text="+c):a.select(this).attr("href",d+e)})},mailTo:function(b,c){var d=a.select("meta[name='description']").attr("content");if("undefined"!=typeof d)var e="%0D%0A"+encodeURIComponent(a.select("meta[name='description']").attr("content"));else var e="";var f=window.location.href,g="Take a look at this Cox Support page",h="mailto:?subject="+encodeURIComponent(g)+"&body="+c+"%0D%0A"+f+e+"%0D%0AYou can visit cox.com/support anytime, anywhere across all your devices to view more useful information and tutorials.";a.select(".email-share",b).attr("href",h)},hideSocialShareAdvanceThrobber:function(b){a.publish({type:"hideThrobber",data:{nodes:a.select(b),display:"ajax-component"}}),a.select(b).find(".col-content").css("display","block")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.SolutionList",function(a){var b,c,d=".solution-list",e=a.select(".solution-list");return{init:function(){console.log("INIT SolutionList.js")},execute:function(){console.log("EXEC SolutionList.js"),b=this,a.select("body").on("content-loaded",d,function(){a.select(d).on("click",".pagination a",function(c){a.preventDefault(c),c.stopImmediatePropagation();var e=a.select(".pagination a",d).length-2;b.updateSolutionListPagination(this,1,e)}),a.select(d).on("click",".read-more-txt",function(b){b.stopImmediatePropagation(),a.select(this).hide(),a.select(this).siblings(".partial-desc").hide(),a.select(this).siblings(".full-desc").removeAttr("style")}),c&&a.subscribe({Orientation:b.resetSolutionListPagination})}),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),0===e.length},updateSolutionListPagination:function(c,e,f){var g=c.innerText;if(null!==g.match(/\d+/))a.select(".page-details:not(.page-"+g+")").hide(),a.select(".page-details.page-"+g).show(),a.select(d+" .pagination a").removeClass("active"),a.select(c).addClass("active"),b.enableDisablePreviousNext(parseInt(g),e,f);else{var h,i=a.select(d+" .pagination a.active")[0].innerText.match(/\d+/)[0];a.select(c).hasClass("prev")?(h=parseInt(i)-1,b.enableDisablePreviousNext(h,e,f),b.enableDisablePageIndex(i,h)):(h=parseInt(i)+1,b.enableDisablePreviousNext(h,e,f),b.enableDisablePageIndex(i,h)),a.select(".page-details.page-"+i).hide(),a.select(".page-details.page-"+h).show()}var j=a.select(".page-details:visible").first().offset().top;a.select("html, body").animate({scrollTop:j})},enableDisablePreviousNext:function(b,c,d){b===c?a.select(".pagination a.prev").addClass("disabled"):a.select(".pagination a.prev").removeClass("disabled"),b===d?a.select(".pagination a.next").addClass("disabled"):a.select(".pagination a.next").removeClass("disabled")},enableDisablePageIndex:function(b,c){a.select(".pagination .page-"+c).addClass("active"),a.select(".pagination .page-"+b).removeClass("active"),"mobile"===a.select("body").attr("data-layout")&&(a.select(".pagination .page-"+c).parent().removeClass("hide"),a.select(".pagination .page-"+b).parent().addClass("hide"))},resetSolutionListPagination:function(){var b=1,c=a.select(".pagination a",d).length-2;if(c>=b){var e=parseInt(a.select(".pagination li a.active")[0].innerText.match(/\d+/)[0]),f="";a.select(".pagination li [class^='page-']").parent().remove();for(var g=b;g<=c;g++){var h="";g===e&&(h="active");var i=g,j="";"mobile"===a.select("body").attr("data-layout")&&(i="Page "+g,""===h&&(j="hide")),f+="<li class='"+j+"'><a href='#' class='page-"+g+" "+h+"'>"+i+"</a></li>"}a.select(f).insertAfter(a.select(d+" .pagination li:first-child"))}},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.global.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.getSpinBoxConfigs()})},getSpinBoxConfigs:function(){var b=c.attr("data-spin-type");d=c.closest(".sb-wrapper");var e=a.select(".sb-input",d)[0],f=e.getAttribute("min")?Number(e.getAttribute("min")):null,g=e.getAttribute("max")?Number(e.getAttribute("max")):null,h=e.getAttribute("step")?Number(e.getAttribute("step")):1,i=Number(a.trim(e.innerHTML));switch(b){case"increase":i<=g&&(i+=h,e.innerHTML=i);break;case"decrease":i>f&&(i-=h,e.innerHTML=i)}a.publish({type:"ProductSpinner",data:{type:b,data:{trigger:c,sb:e,min:f,max:g,step:h,val:i}}})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.StickyHeader",function(a){var b,c=".sticky-header";return{init:function(){console.log("INIT StickyHeader.js")},execute:function(){console.log("EXEC StickyHeader.js"),a.select("body").on("content-loaded",c,function(c){b=a.select(this),b.stickyTableHeaders()})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.StickyNav",function(a){var b,c=".sticky-nav",d=!0;return{init:function(){console.log("INIT StickyNav.js"),b=this},execute:function(){console.log("EXEC StickyNav.js"),b=this,a.select(window).on("scroll touchmove",function(b){a.select(c).length<1||!d||(a.select(".sticky-current").removeClass("sticky-current"),a.select(".full-viewport").each(function(b,d){a.select(d).offset().top<a.select(window).scrollTop()+a.select(window).height()/3&&(0===b?a.select(c).removeClass("sticky-thin"):(a.select(c).addClass("sticky-thin"),a.select(".sticky-current").removeClass("sticky-current"),a.select("a[href=#"+d.id+"]").addClass("sticky-current")))}))}),a.select("body").on("mouseenter",".sticky-thin",function(){a.select(this).removeClass("sticky-thin")}),a.select("body").on("mouseleave",c,function(){a.select(this).has(".sticky-current").length>0&&a.select(this).addClass("sticky-thin")}),a.select("body").on("click",c+" a",function(b){b.preventDefault(),a.select(".sticky-current").removeClass("sticky-current"),a.select(this).not(".sticky-top").addClass("sticky-current"),d=!1;var c=""===this.hash?0:a.select(this.hash).offset().top,e=""===this.hash?"#":this.hash,f=a.select(this).closest("nav").find("a:not(.sticky-top)").length,g=Math.abs((a.select(window).scrollTop()-c)/f)+300;a.select("html, body").stop().animate({scrollTop:c},g,"swing",function(){window.location.hash=e,d=!0})})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.SubNav",function(a){var b,c,d=".sub-nav";return{init:function(){console.log("INIT Sub-Nav.js")},execute:function(){console.log("EXEC Sub-Nav.js"),b=this,a.select("body").on("click",".sub-link-selection",function(d){c=a.select(this),b.showHideDropdown(),d.stopPropagation()}),a.select("html").on("click",function(b){a.select(".sub-link-selection")&&(c=a.select(".sub-link-selection")),a.select(window).width()<768&&c&&c.find("span").hasClass("active")&&(c.find("span").removeClass("active"),c.find(".sub-nav-content").removeClass("selected"))}),a.select("body").on("click",".sub-nav-bar .sub-nav-content a",function(d){if(d.stopPropagation(),a.select(window).width()<768){var e=a.select(this).text();b.changeDropdownText(e)}else c=a.select(".sub-link-selection"),c.find(".sub-nav-content div").removeClass("active"),a.select(this).closest("div").parent().addClass("active")}),a.select(window).on("scroll touchmove",function(b){a.select(d).length<1||(c=a.select(".sub-link-selection"))})},showHideDropdown:function(){a.select(window).width()>767||(c.find(".sub-link-heading").text("Navigate to:"),c.find(".sub-link-heading").removeClass("selected"),c.find("span").hasClass("active")?(c.find("span").removeClass("active"),c.find(".sub-nav-content").removeClass("selected")):(c.find(".sub-nav-content").addClass("selected"),c.find("span").addClass("active")))},changeDropdownText:function(a){c.find(".sub-link-heading").html(a),c.find(".sub-link-heading").addClass("selected"),c.find(".sub-nav-content").removeClass("selected"),c.find("span").removeClass("active")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.SupportAlerts",function(a){var b,c=".support-alerts",d=a.select(".support-alerts"),e="";return{init:function(){console.log("INIT SupportAlerts.js")},execute:function(){console.log("EXEC SupportAlerts.js"),b=this,a.subscribe({genrateAlerts:b.genrateAlerts}),a.select("[type='application/json']",d).length>0&&(e=JSON.parse(a.select("[type='application/json']",d).html())),a.select("body").on("content-loaded",c,function(){var b=e.pageLob,d=e.raUrl;d=d+"?coxLob="+b,a.select(this).each(function(){a.publish({type:"Ajax",headers:{lob:b},data:{id:"genrateAlerts",container:c,url:d,crossDomain:!0,type:"GET",dataType:"json",timeout:"10000",cache:!0,withCredentials:!0}})})})},genrateAlerts:function(f){if(f.isError)console.error("Support-Alert Ajax Failed");else{var g=e.alertType,h=b.getCookie("cox-current-site"),i="global";"undefined"!=typeof h&&""!==h&&null!=h&&(i=h);var j=f.responseJSON;if(j.supportAlertsList.length>0){for(var k in j.supportAlertsList)d.append("<div class='"+g+" col-reset'><div>"+j.supportAlertsList[k].title+j.supportAlertsList[k].content+"</div></div>");if(a.select(c).find("div."+g).length<=0){i="global";for(var k in j.supportAlertsList)j.supportAlertsList[k].location===i&&d.append("<div class='"+g+" col-reset'><div>"+j.supportAlertsList[k].title+j.supportAlertsList[k].content+"</div></div>")}}else d.hide()}b.hideSupportVideoThrobber(c)},getCookie:function(a){var b=new RegExp(a+"=([^;]+)"),c=b.exec(document.cookie);return null!=c?unescape(c[1]):null},hideSupportVideoThrobber:function(b){a.publish({type:"hideThrobber",data:{nodes:a.select(b),display:"ajax-component"}})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.SupportCategoryFilter",function(a){var b,c=".support-category-filter",d=a.select(".support-category-filter");return{init:function(){console.log("INIT SupportCategoryFilter.js")},execute:function(){console.log("EXEC SupportCategoryFilter.js"),b=this,0!==d.length&&(a.select(c).on("click",".support-category-filter-heading, .support-category-filter-toggle-btn",function(){a.select(this).siblings(".support-category-filter-content").toggleClass("active")}),a.select(c).on("click",".support-category-filter-content a",function(b){a.preventDefault(b),d.find(".support-category-filter-heading").html(a.select(this).text()),a.select(".support-category-filter-content").removeClass("active");var c=a.select(this).closest(".video-support"),e=a.select(this).data("supportCategory");a.publish({type:"updateCarouselSupportVideos",data:{supportCategory:e,supportVideoContext:c}})}))},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.SVGSupport",function(a){var b;return{init:function(){console.log("INIT SVGSupport.js"),b=this},execute:function(){if(console.log("EXEC SVGSupport.js"),!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape","1.1"))for(var a=document.getElementsByTagName("img"),b=/.*\.svg$/,c=a.length,d=0;d<c;d++)a[d].src.match(b)&&(a[d].src=a[d].src.slice(0,-3)+"png")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.Tabs",function(a){var b,c,d,e=".tab-component .tab";return{init:function(){b=this,a.select("body").on("content-loaded",e,function(a){b.startTabs()})},execute:function(){b=this},startTabs:function(){d=a.select("body").attr("data-layout");var e=a.select(".tab-component .tab");b.defaultTabSelected(e),a.select(".tab a:not([class*=slick-])").click(function(c){c.preventDefault(),a.select(this).hasClass("disabled")||b.getSelectedTab(this)}),a.select("body").on("click","a[href^='#']",function(b){if(void 0!==b.originalEvent&&!a.select(this).parents(".tab")[0]){var e=$(this).attr("href"),f=a.select(".tab-component .tab");if(c=f,$active=$('.tab a[href="'+e+'"]'),"desktop"==d){$content=a.select($active.attr("href"));var g=a.select(".active",$active.parents(".tab"));g.removeClass("active"),$active.addClass("active"),a.select(g.attr("href")).hide(),$content=a.select($active.attr("href")),$content.show()}else{var h=$active.parents("li").data("slick-index"),i=a.select($active.parents(".tab")).find(".slick-dots li:eq('"+h+"')");i.find("button").trigger("click")}}}),a.select(document).ajaxComplete(function(c,d,e){var f=a.select(".tab-component .tab");b.defaultTabSelected(f)}),a.select(window).bind("resize",function(){a.select(".tab-component .tab")[0]&&d!=a.select("body").attr("data-layout")&&(d=a.select("body").attr("data-layout"),b.toggleSlick())})},defaultTabSelected:function(d){var e=window.location.hash;c=d,d.length>0&&a.select(d).each(function(a,c){b.setDefaultTabSelected(c,e)})},setDefaultTabSelected:function(c,d){var e=!0;a.select(c).each(function(c,f){var g;0==a.select(f).data("default-selected")&&(e=!1);var h=a.select(f).find("li a");a.select(d).length<1&&(d=null),a.select(f).find(".slick-list").length>0&&(h=a.select(f).find(".slick-list").find("li a")),g=d?a.select(a.grep(h,function(b,c){return a.select(b).attr("href")==d})[0]||h[0]):a.select(a.grep(h,function(b,c){return a.select(b).hasClass("active")})[0]||h[0]),1==e&&(a.select(g).addClass("active"),b.getSelectedTab(g[0]))}),1==e&&b.findMobileSelectedTab(active)},findMobileSelectedTab:function(b){var c=a.select(b).closest(".slick-track"),d=a.select(c).find("li"),e=a.select(".slick-dots").find("li");a.select(d).each(function(b,c){if(a.select(c).hasClass("slick-active")){var d=e[b];a.select(d).addClass("slick-active"),a.select(d).attr("aria-hidden","false")}else{var f=e[b];a.select(f).removeClass("slick-active"),a.select(f).attr("aria-hidden","true")}})},getSelectedTab:function(c){var d=a.select(c).closest(".tab"),e=(a.select(d).find(".slick-slide"),a.select(d).data("tab-event-method"));if(d)if("undefined"!=typeof e&&""!=e){var f={};f.tabClicked=c,a.publish({type:e,data:f})}else if(a.select(c).attr("href")&&"#"!==a.select(c).attr("href")){var g=a.select(d).find(".active");g&&(a.select(g).removeClass("active"),a.select(g).closest(".slick-track").find(".slick-active").removeClass("slick-active")),active=a.select(c).addClass("active"),a.select(active).closest(".slick-slide").addClass("slick-active"),b.showTabContent(active)}},showTabContent:function(b){var c=a.select(b).closest(".tab-component");a.select(c).each(function(c,d){var e=(a.select(d).find(".tab"),a.select(b).attr("href"));e=e.replace("#","");var f=a.select(d).find(".tab-content").find(".tab-item");a.select(f).each(function(b,c){var d=a.select(c).attr("id"),f=a.select('a[href="#'+d+'"]').hasClass("active");d==e||f?a.select("#"+d).css("display","block"):a.select("#"+d).css("display","none")})})},toggleSlick:function(c){if("mobile"==d){var e,f=a.select(".tab-component .tab");f.each(function(b,c){e=!0,0==a.select(c).data("mobile-behavior")&&(e=!1),1==e&&(a.select(c).addClass("slick-carousel"),a.select(c).slick({dots:!0,infinite:!1,slidesToShow:1,slidesToScroll:1,prevArrow:'<a data-role="none" class="slick-prev" aria-label="previous">Previous</a>',nextArrow:'<a data-role="none" class="slick-next" aria-label="next">Next</a>'}),a.select(a.select(c).find(".slick-active a")).trigger("click"),a.select(c).on("afterChange",function(b,c,d){a.select("a",a.select(c.$slides[d])[0]).click()}))})}else{var g=a.select(".tab.slick-carousel");g.each(function(){a.select(this).hasClass("slick-initialized")&&a.select(this).slick("unslick")}),a.select(".tab a").click(function(a){a.preventDefault(),b.getSelectedTab(this)})}},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.ToggleDiv",function(a){var b,c,d;return{init:function(){b=this,a.subscribe({ToggleDiv:b.toggleDiv})},execute:function(){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]}})})},toggleDiv:function(c){switch(c.element.tagName){case"SELECT":break;case"A":b.showHideMultipleDivs(c.element,c.context);break;case"INPUT":var d=a.select(c.element).attr("type");if("radio"==d)b.showHideMultipleDivs(c.element,c.context);else if("checkbox"==d){var e=a.select(c.element).attr("data-show-chkBox"),f=a.select("."+e,c.context);1==a.select(c.element).prop("checked")?b.showMultipleDivs(f):b.hideMultipleDivs(f)}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(b){a.select(b).hide();var c=a.select(".required",b);null!=c&&0!=c.length&&a.each(c,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"))})},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")})},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.ToggleSwitch",function(a){var b,c=".toggle-switch";return{init:function(){b=this,a.subscribe({getRadioBtnChange:b.publishedToggleSwitchChange})},execute:function(){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.global.Tooltip",function(a){var b,c,d,e=".tooltip-trigger";return{init:function(){console.log("INIT Tooltip.js"),b=this,a.subscribe({Orientation:b.resetTooltipPosition,CloseTooltip:b.resetTooltipPosition,trigger_tooltip:b.triggerToolTip})},execute:function(){console.log("EXEC Tooltip.js"),b=this,b.listenToTrigger()},listenToTrigger:function(){var c,f=!1;a.select("body").on("mouseenter",e,function(a){c&&c!=this&&(f=!1,b.closeTooltip()),b.showTooltip(this,!1),clearInterval(d),c=this}),a.select("body").on("mouseleave",e,function(a){b.prepareToCloseTooltip()}),a.select("body").on("mouseenter",".ui-tooltip",function(a){b.showTooltip(this,!0),clearInterval(d)}),a.select("body").on("mouseleave",".ui-tooltip",function(a){b.prepareToCloseTooltip()});var g=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,h="ontouchstart"in window||g||window.DocumentTouch&&document instanceof DocumentTouch,i=h?"touchstart":"click";a.select("body").on("touchstart click",e,function(a){a.preventDefault(),a.type==i&&(f?(b.closeTooltip(),f=!1):(b.showTooltip(this,!1),clearInterval(d),f=!0,c=this))}),a.select("body").on("click touchstart",".ui-tooltip-close",function(a){a.preventDefault(),b.closeTooltip(),a.stopPropagation()}),a.select(window).blur(function(c){a.select(".tooltip-trigger.active").length>0&&b.closeTooltip()})},prepareToCloseTooltip:function(){d=setInterval(b.closeTooltip,100)},showTooltip:function(c,d){e=a.select(c),e.addClass("active"),d||(b.getDataPosition(),b.setToolTipPosition())},closeTooltip:function(){a.select(".tooltip-trigger.active ").removeAttr("data-position"),a.select(".tooltip-trigger.active ").tooltip("destroy"),a.select(".tooltip-trigger").removeClass("active"),clearInterval(d)},getDataPosition:function(){var b=e.width(),c=e.offset().left,d=a.select(window).width()-e.offset().left;"desktop"==a.select("body").attr("data-layout")?c<336?e.attr("data-position","left"):d>320+b+16?e.hasClass("rightPosition")?e.attr("data-position","right"):e.attr("data-position","bottom"):e.attr("data-position","right"):c>.75*a.select(window).width()+16?e.attr("data-position","right"):d>.75*a.select(window).width()+b+16?e.attr("data-position","left"):e.attr("data-position","bottom");
},setToolTipPosition:function(){var d="<div class='col-content'><a class='ui-tooltip-close'></a>"+a.select("#"+e.attr("data-content-element")).html()+"</div>",f=e.attr("data-tooltip-theme"),g=e.attr("data-position");void 0===g&&(g="bottom");var h;switch(g){case"top":h={my:"center bottom",at:"center top-10"};break;case"bottom":h={my:"center top",at:"center bottom+10"};break;case"left":h={my:"right center",at:"left-10 center"};break;case"right":h={my:"left center",at:"right+10 center"}}h.collision="flipfit flip",h.using=function(b,c){a.select(".ui-tooltip").css(b),a.select("<div>").addClass("arrow").addClass(c.vertical).addClass(c.horizontal).appendTo(".ui-tooltip")},c=e.tooltip({items:"a.tooltip-trigger",content:function(){return d},position:h,hide:{delay:100}}),c.tooltip("open").off("mouseenter mouseleave mousemove mouseout mouseover"),f?(a.select(".ui-tooltip-content").addClass(f),a.select(".arrow").addClass(f)):(a.select(".ui-tooltip-content").removeClass("theme-b"),a.select(".arrow").removeClass("theme-b")),b.setArrowPosition()},resetTooltipPosition:function(){b.closeTooltip()},setArrowPosition:function(){var b=e.offset().left,c=e.offset().top,d=0,f=a.select(".ui-tooltip").offset().top,g=e.attr("data-position");d=a.select(".ui-tooltip").offset().left;var h=0;"mobile"==a.select("body").attr("data-layout")?void 0===g||"bottom"==g?(h=e.hasClass("btn-help")?-3:e.width()/2-12,a.select(".arrow").css("left",b-d+h),c-f<0&&(a.select(".arrow").removeClass("bottom").addClass("top"),a.select(".arrow").css("top",-15))):"left"==g?a.select(".arrow").css("top",c-f-10):"right"==g&&(a.select(".arrow").css("top",c-f+20),a.select(".arrow").css("left",b-d-3)):void 0===g||"bottom"==g?(h=e.hasClass("btn-help")?12:e.width()/2,a.select(".arrow").css("left",b-d+h),c-f<0&&(a.select(".arrow").removeClass("bottom").addClass("top"),a.select(".arrow").css("top",-15))):"right"==g?(a.select(".arrow").css("top",c-f+5),a.select(".arrow").hasClass("right")&&a.select(".arrow").css("left",b-d-3)):(a.select(".arrow").css("top",c-f),a.select(".arrow").hasClass("right")&&a.select(".arrow").css("left",b-d-3))},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.UDO",function(a){var b,c=".flex-text-udo.ajax-component-wrapper-active",d=a.select(c);return{init:function(){console.log("INIT UDO.js"),b=this,a.subscribe({convertUDOTokensToValues:b.convertUDOTokensToValues})},execute:function(){console.log("EXEC UDO.js"),b=this,a.select("body").on("content-loaded",c,function(c){c.stopPropagation();var d={};d.udoTokensObj=a.select(this),b.convertUDOTokensToValues(d)}),0===d.length},convertUDOTokensToValues:function(c){var d=c.udoTokensObj,e=a.select(d).html(),f=e.replace(/\[\[udo\.(.*?)(?:\.(.*?)?)*\]\]/g,function(a,b,c){var d;if("undefined"!=typeof b&&"undefined"!=typeof utag_data){var e=Array.isArray(utag_data[b]);d="undefined"!=typeof c?e&&c.match(/\d/)?utag_data[b][c-1]:utag_data[b+"."+c]:utag_data[b]}return"undefined"==typeof d&&(d=""),d});a.select(d).html(f);var g=a.select(d).hasClass("flex-conditional-udo"),h=a.select(".flex-text-udo",d);return g===!0?a.each(h,function(a,c){b.hideThrobber(c)}):b.hideThrobber(d),a.select(d)},hideThrobber:function(b){a.publish({type:"hideThrobber",data:{nodes:a.select(b),display:"ajax-component"}}),a.select(b).removeClass("invisible"),a.select(b).children().removeClass("visible")},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.UrlCondition",function(a){var b;return{init:function(){console.log("INIT UrlCondition.js"),b=this,a.subscribe({convertURLParametersToValues:b.convertURLParametersToValues})},execute:function(){console.log("EXEC UrlCondition.js"),b=this},convertURLParametersToValues:function(c){var d=c.urlTokensObj,e=a.select(d).html(),f=b.getParameters();return convertedHTML=e.replace(/\[\[url\.(.*?)(?:\.(.*?)?)*\]\]/g,function(a,b,c){var d;if("undefined"!=typeof b&&"undefined"!=typeof f){var e=Array.isArray(f[b]);d="undefined"!=typeof c?e&&c.match(/\d/)?f[b][c-1]:f[b+"."+c]:f[b]}return"undefined"==typeof d&&(d=""),d}),a.select(d).html(convertedHTML),a.select(d)},getParameters:function(){var a=decodeURI(window.location.href),b={},c=a.split("?");if(void 0!==c[1])for(var d=c[1].split("&"),e=0;e<d.length;e++){var f=d[e].split("="),g=f[0],h=f[1];b[g]=h}return b},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.global.VideoPlayer",function(b){var c,d,e=".video-holder",f=[];return{init:function(){console.log("INIT VideoPlayer.js"),jwplayer.key="De5pDbphu4VGOUZVMidt5ucWiE2Vc5lG/lL3+u0kq+8="},execute:function(){console.log("EXEC VideoPlayer.js"),c=this,b.subscribe({updateCarouselSupportVideos:c.updateCarouselSupportVideos,getVideoSupportJSON:c.getVideoSupportJSON,Orientation:c.updateCarouselSupportVideosOnOrientationChange}),b.guid=0,b.select("body").on("content-loaded",e,function(a,d){b.select(this).parents(".modal-inline-content").length>0&&1!=d||b.select(this).each(function(){var a=b.select(this),d=a.data("videoPlaylist"),f=a.data("videoSupport");if(f===!0){b.select("div.browse-all-videos-support").length>0?b.select("#browse-all-videos-modal").addClass("modal-inline-content"):b.select("#support-video-modal").addClass("modal-inline-content");var g="<script type='text/html'>"+b.select(".video-player")[0].outerHTML+"</script>";b.select(".video-support").append(g),b.publish({type:"Ajax",data:{id:"getVideoSupportJSON",container:e,url:d,type:"GET",dataType:"json",timeout:"10000",cache:!0}})}else a.html("Loading player..."),c.initiateVideoPlayer(a,d,!1)})}),b.select("body").on("click touchstart",".jw-related-dock-btn",function(a){var d=b.select(a.currentTarget).closest(".jwplayer"),e=b.select(d).attr("id"),f=jwplayer(e).getPlugin("related");f.on("play",function(f){a.stopPropagation(),b.select(d).siblings(".custom-playlist-right").length>0?c.createRightPlaylist(e,f.item):b.select(d).siblings(".video-player-nav").length>0&&c.createCarouselPlaylist(e,f.item)})})},initiateVideoPlayer:function(d,e,f){var g;g="boolean"!=typeof f?f:"video-"+b.guid++,d.attr("id",g);var h=320,i=d.data("videoFile"),j=d.data("videoImage"),k=d.data("videoCaptions"),l=d.data("videoRatio"),m=d.data("videoPlaylist-position"),n=d.data("videoRelated");"bottom"==m&&(h=window.matchMedia&&window.matchMedia("all").addListener?0:4);var o={tracks:[{file:k}]},p={related:{file:n,onclick:"play",oncomplete:!0}},q={playlist:e,listbar:{position:m,size:h}},r={displaytitle:!1,file:i,image:j,abouttext:"Cox Video Player",aboutlink:"javascript:void(0)",width:"100%",aspectratio:l,skin:"six",flashplayer:"/ui/5_0/tsw/swf/",primary:"html5",hlshtml:!0};"undefined"!=typeof k&&a.extendObj(r,o),"undefined"!=typeof n&&a.extendObj(r,p),"undefined"!=typeof e&&a.extendObj(r,q);var s=jwplayer(g);s.setup(r),s.on("ready",function(){if("undefined"!=typeof e){jwplayer().getPlaylistItem();c.positionPlaylist(),b.select(window).resize(function(a){c.positionPlaylist()}),"right"==m&&c.createRightPlaylist(g,""),"bottom"==m&&(f===!0||"boolean"!=typeof f?b.select("div.browse-all-videos-support").length>0?c.createBrowseAllVideosList(g):c.createCarouselSupportVideos(g):c.createCarouselPlaylist(g,""))}}),s.on("play",function(){b.select(".jwplayer").each(function(){this.id!=g&&jwplayer(this.id).pause(!0)})}),s.on("playlistItem",function(a){if(this.id==g&&"right"==m){var c=b.select("#"+g).next();b.select(".playlist-right-item",c).removeClass("active"),b.select("[data-video-id="+a.index+"]",c).addClass("active")}});var t=d.data("videoPlaylist-autoplay");"undefined"!=typeof t&&t===!1&&s.on("complete",function(){s.stop()}),s.on("error",function(){var a=document.getElementsByTagName("video")[0];4===a.error.code&&window.location.reload()})},positionPlaylist:function(){window.matchMedia&&(window.matchMedia("(max-width: 767px)").matches?b.select(".jwplayer.playlist-right").each(function(){b.select(this).removeClass("playlist-right").addClass("playlist-right-orig playlist-bottom")}):(b.select(".jwplayer.playlist-right-orig").each(function(){b.select(this).removeClass("playlist-right-orig playlist-bottom").addClass("playlist-right")}),b.select(".jwplayer.playlist-right:visible").each(function(){var a=b.select(this).attr("id");b.select(this).next(".custom-playlist-right").css("height",b.select("#"+a).height())})))},createRightPlaylist:function(a,c){if(""!==c){b.select("#"+a).siblings(".custom-playlist-right").remove();var d=CoxPF.makeArray(c)}else var d=jwplayer().getPlaylist();for(var e=b.select("<div class='custom-playlist-right'>"),f=0;f<d.length;f++){var g=d[f].title,h=d[f].description,i="";0===f&&(i="active"),b.select(e).append("<div class='playlist-right-item "+i+"' data-video-id='"+f+"'><div class='playlist-right-thumbnail' style='background-image: url("+d[f].image+")'; /><div class='playlist-right-content'><span class='title'>"+g+"</span><span class='description'>"+h+"</span></div></div>")}""===c&&b.select("#"+a).addClass("playlist-right"),"desktop"===b.select("body").attr("data-layout")&&b.select(e).css("height",b.select("#"+a).height()),b.select("#"+a).after(e),b.select("body").on("click",".playlist-right-item",function(a){b.preventDefault(a);var c=b.select(this).parent().prev().attr("id");jwplayer(c).playlistItem(b.select(this).data("videoId"))})},createCarouselPlaylist:function(a,c){if(""!==c){b.select("#"+a).siblings(".video-player-nav").remove();var d=CoxPF.makeArray(c)}else var d=jwplayer().getPlaylist();for(var e=b.select("<div class='slick-carousel video-player-nav'>"),f=0;f<d.length;f++){var g=d[f].title;g.length>20&&(g=g.substring(0,20)+"...");var h=d[f].description;h.length>20&&(h=h.substring(0,20)+"..."),b.select(e).append("<div class='playlist-item'><a href='#' data-video-id='"+f+"'><img src='"+d[f].image+"' class='col-content' /><span class='title'>"+g+"</span><span class='description'>"+h+"</span></a></div>")}window.matchMedia&&window.matchMedia("all").addListener?b.select("#"+a).after(e):b.select("#"+a).parent().after(e);var i;i=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches?2:3,b.select(".slick-carousel").attr("data-show-slides",i),b.select(".slick-carousel").slick({dots:!0,slidesToShow:i,slidesToScroll:i,prevArrow:'<a data-role="none" class="slick-prev" aria-label="previous">Previous</a>',nextArrow:'<a data-role="none" class="slick-next" aria-label="next">Next</a>'}),b.select("body").on("click",".playlist-item a",function(c){b.preventDefault(c),jwplayer(a).playlistItem(b.select(this).data("videoId"))})},createCarouselSupportVideos:function(a){for(var d=b.select("<div class='slick-carousel video-player-support-nav'>"),e=jwplayer(a).getPlaylist(),f=0;f<e.length;f++){var g=e[f].title,h=e[f].description;b.select(d).append("<div class='playlist-item cms-modal-trigger' data-modal-width='690' data-hide-close-btn='false' data-content-element='support-video-modal'><a href='#' data-video-id='"+f+"'><img src='"+e[f].image+"'/><span class='title'>"+g+"</span><span class='description'>"+h+"</span></a></div>")}b.select("#support-video-modal").after(d),c.hideSupportVideoThrobber(".video-player"),"undefined"!=typeof e?(b.select(".browse-support-cta").css("display","block"),c.initializeSupportVideosSlick(e.length)):b.select(".no-videos-found").toggleClass("hide"),b.select(".video-player-support-nav").on("click",".cms-modal-trigger:not(.slick-active)",function(a){b.preventDefault(a),a.stopPropagation()}),b.select("body").on("click",".playlist-item.slick-active a",function(c){b.preventDefault(c),jwplayer(a).playlistItem(b.select(this).data("videoId"))})},initializeSupportVideosSlick:function(a){var c,d,e=!0,f=!0;"mobile"===b.select("body").attr("data-layout")?(d=0,c=1,1===a&&(e=!1,f=!1)):a<4?(c=a,d=0,e=!1,f=!1):(d=1,c=3),b.select(".slick-carousel").attr("data-show-slides",c),b.select("body").on("init",".video-player-support-nav.slick-carousel",function(a,c){"desktop"===b.select("body").attr("data-layout")&&b.select(c)[0].slideCount<4?(b.select(this).find(".playlist-item img").css({cursor:"pointer",opacity:"1"}),b.select(this).find(".playlist-item span").css("display","block"),b.select(this).find(".slick-track").addClass("center-align-slides"),b.select(this).find(".slick-slide").addClass("slick-slide-width")):"mobile"===b.select("body").attr("data-layout")&&1===b.select(c)[0].slideCount&&(b.select(this).find(".slick-track").addClass("center-align-slides"),b.select(this).find(".slick-slide").addClass("slick-slide-width"))}),b.select(".slick-carousel").slick({centerMode:e,centerPadding:"0px",variableWidth:f,slidesToShow:c,slidesToScroll:1,initialSlide:d,responsive:[{breakpoint:1280,settings:{prevArrow:'<a data-role="none" class="slick-prev" aria-label="previous">Previous</a>',nextArrow:'<a data-role="none" class="slick-next" aria-label="next">Next</a>'}},{breakpoint:768,settings:{arrows:!1}}]})},updateCarouselSupportVideos:function(a){var d=a.supportVideoContext,g=b.select(d).find(".modal-inline-content").children().attr("id");"undefined"==typeof g&&(g="video-"+(b.guid-1)),b.select(".video-player",d).remove();var h=b.select("[type='text/html']",d).html();b.select(d).append(h);var i=b.select(e,d),j=f[a.supportCategory];"undefined"==typeof j?(c.hideSupportVideoThrobber(".video-player"),b.select(".no-videos-found").toggleClass("hide"),b.select(".browse-support-cta").css("display","none")):c.initiateVideoPlayer(i,j,g)},updateCarouselSupportVideosOnOrientationChange:function(){var a=b.select(".video-support");if(window.matchMedia&&a.length>0&&(d=window.matchMedia("(orientation : portrait)").matches?b.select(window).width()<768&&b.select(window).height()>768:b.select(window).width()>768&&b.select(window).height()<=600)){var e=b.select(".slick-carousel",a),f=b.select(a).find(".modal-inline-content").children().attr("id");e.hasClass("slick-initialized")&&e.slick("unslick");var g=jwplayer(f).getPlaylist();c.initializeSupportVideosSlick(g.length)}},getVideoSupportJSON:function(a){if(a.isError)c.hideSupportVideoThrobber(".video-player");else{var d=b.select(e),g=a.responseJSON,h=[];f.All=[];var i=d.data("videoCount");videoCountForBrowseAllVideos=i,b.each(g,function(a,c){var d=c.category.split(",");f.All.push(c),b.each(d,function(a,b){"undefined"==typeof f[b]&&(f[b]=[]),i>f[b].length&&f[b].push(c)})});var j=d.data("videoCategory");if(b.select("div.browse-all-videos-support").length>0&&window.location.search.indexOf("product=")>-1){j=c.urlParameters("product");var k=b.select(".support-category-filter-content").find("a[data-support-category='"+j+"']");b.select(".support-category-filter-heading").html(k.text())}if("All"===j){var l=d.data("categoryList").split(",");i*=l.length,b.each(f.All,function(a,c){var d=c.category.split(",");return i>h.length&&void b.each(d,function(a,d){if(b.inArray(d,l)!==-1)return h.push(c),!1})}),f.All=h}else h=f[j];"undefined"==typeof h?(c.hideSupportVideoThrobber(".video-player"),b.select(".no-videos-found").toggleClass("hide")):c.initiateVideoPlayer(d,h,!0)}},hideSupportVideoThrobber:function(a){b.publish({type:"hideThrobber",data:{nodes:b.select(a),display:"ajax-component"}})},createBrowseAllVideosList:function(a){for(var d=b.select("<div class='browse-all-videos-support-nav'>"),e=jwplayer(a).getPlaylist(),f=videoCountForBrowseAllVideos,g=videoCountForBrowseAllVideos,h=e.length,i=f<h?f:h,j=0;j<i;j++){var k=e[j].title;b.select(d).append("<div class='colspan-3'><div class='playlist-item browse-all-videos cms-modal-trigger' data-modal-width='690' data-hide-close-btn='false' data-content-element='browse-all-videos-modal'><a href='#' data-video-id='"+j+"'><img src='"+e[j].image+"'/><span class='title'>"+k+"</span></a></div></div>")}i<4?b.select(d).addClass("text-align-center"):b.select(d).removeClass("text-align-center"),f<h?b.select(".showMore").show():b.select(".showMore").hide(),b.select(".showMore a.button").click(function(a){a.preventDefault(),i=f+g<h?f+g:h;for(var c=f;c<i;c++){var j=e[c].title;b.select(d).append("<div class='colspan-3'><div class='playlist-item browse-all-videos cms-modal-trigger' data-modal-width='690' data-hide-close-btn='false' data-content-element='browse-all-videos-modal'><a href='#' data-video-id='"+c+"'><img src='"+e[c].image+"'/><span class='title'>"+j+"</span></a></div></div>")}var k=f+1,l=b.select(".browse-all-videos-support-nav .colspan-3:nth-child("+k+")").offset().top;b.select("html, body").animate({scrollTop:l}),f+=g,f<h?b.select(".showMore").show():b.select(".showMore").hide()}),b.select("#browse-all-videos-modal").after(d),b.select(".support-category-filter").removeClass("hide"),c.hideSupportVideoThrobber(".video-player"),"undefined"!=typeof e?(b.select(".browse-support-cta").css("display","block"),c.initializeSupportVideosSlick(e.length)):b.select(".no-videos-found").toggleClass("hide"),b.select("body").on("click",".playlist-item a",function(c){b.preventDefault(c),jwplayer(a).playlistItem(b.select(this).data("videoId"))})},urlParameters:function(a){var b=new RegExp("[?&]"+a+"=([^&#]*)").exec(window.location.href);return decodeURIComponent(b[1])||0},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.map.CoxCenters",function(a){var b,c,d,e,f,g,h,i,j=a.select(".map-container"),k=14,l=!1,m=[],n=[],o="/ui/5_0/tsw/img/interface/map/",p=!1,q="We're sorry, there was a problem with your request. Please try again.",r="We could not find that location.",s="<p><strong>No Results Found</strong></p>There are no Cox Solutions Stores in this area. Please try another zip code, or use the zoom feature to see store locations near you.",t=!1,u=!1;return{init:function(){console.log("INIT CoxCenters.js"),b=this,a.subscribe({"init-cox-centers":b.initCoxCentersMap,responseMarkers:b.responseMarkers})},execute:function(){},initCoxCentersMap:function(a){var e=a.address,f=new google.maps.Geocoder;"United States"==e&&(k=4),f.geocode({address:e},function(a,e){e==google.maps.GeocoderStatus.OK&&(d=new google.maps.LatLng(a[0].geometry.location.lat(),a[0].geometry.location.lng()),u=!0,c=b.getCoxMap(),b.addEventListeners(c))}),b.displayLocationResults(e)},getCoxMap:function(){return new google.maps.Map(j[0],{zoom:k,center:d,scaleControl:!0,mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:!1})},setCurrentLocation:function(){var a=o+"current-location.png";if(u){var b=new google.maps.Marker({position:d,map:c,icon:a});n.push(b)}},displayLocationResults:function(b){var c=a.select(".map-search-results");a.select(c).html('Showing results for <strong>"'+b+'"</strong>')},addEventListeners:function(c){e||(e=new google.maps.InfoWindow),google.maps.event.addListener(c,"dragstart",function(){u=!1,l?b.populateMapWithMarkers():b.requestMarkers(),b.keepInfoWindowOpen()}),google.maps.event.addListener(c,"tilesloaded",function(){l?b.populateMapWithMarkers():b.requestMarkers(),b.keepInfoWindowOpen()}),google.maps.event.addListener(e,"closeclick",function(){p=!1}),a.select(".paging").find(".previous").click(function(a){a.preventDefault(),b.paginationPrev(this)}),a.select(".paging").find(".next").click(function(a){a.preventDefault(),b.paginationNext(this)}),a.select(".map-search-wrapper a.button").click(function(c){c.preventDefault(),p=!1;var d=a.select(".map-search-wrapper input").val();d&&(b.getLocationFromAddressInput(),b.displayLocationResults(d))}),a.select(".map-search-wrapper input").focus(function(c){c.preventDefault(),a.select(this).bind("keypress",function(c){if(13==c.which){c.preventDefault(),p=!1,b.getLocationFromAddressInput();var d=a.select(".map-search-wrapper input").val();b.displayLocationResults(d)}})}),b.filterMarkersOnMap()},filterMarkersOnMap:function(){function c(){var b=[];a.select(e).each(function(c,d){a.select(d).is(":checked")&&b.push(a.select(d).val())}),d(b)}function d(c){var d="";a.select(c).each(function(a,b){d+=","+b.replace('"',"")});var e=d.split(","),f=[];a.select(e).each(function(a,b){""!=b&&f.push(b)}),i=f,b.populateMapWithMarkers()}var e=a.select(".cox-centers-select-options input");a.select(e).on("click",function(a){c()}),c()},getLocationFromAddressInput:function(){var e=new google.maps.Geocoder,f=a.select(".map-search-wrapper input").val()+" United States";e.geocode({address:f},function(a,e){if(e==google.maps.GeocoderStatus.OK)d=new google.maps.LatLng(a[0].geometry.location.lat(),a[0].geometry.location.lng()),c.fitBounds(a[0].geometry.viewport),u=!0;else{var f=r;b.displayErrorMsg(f)}})},displayErrorMsg:function(c){var d=a.select(".centers-list-wrapper").find(".zoom-too-high")[0],e=a.select(j).find(".zoom-too-high")[0];c==q||c==r?b.displayMapAPIError(c):(b.hideMapAPIError(),d||a.select(".centers-list-wrapper").html('<div class="zoom-too-high desktop-only"><p>'+c+"</p></div>"),e||a.select(j).append('<div class="zoom-too-high mobile-only"><p>'+c+"</p></div>"),a.select(j).find(".zoom-too-high").removeClass("hide").addClass("mobile-only"),a.select(".centers-list-wrapper").find(".zoom-too-high").removeClass("hide").addClass("desktop-only"))},displayMapAPIError:function(b){var c=a.select(".msg-error")[0];c?(a.select(".msg-error p").html(b),a.select(".msg-error").removeClass("hide")):a.select(".map-search-wrapper").before('<div class="msg-error"><p>'+b+"</p></div>")},hideMapAPIError:function(){a.select(".msg-error").addClass("hide")},hideErrorMsg:function(){a.select(".zoom-too-high").addClass("hide").removeClass("mobile-only desktop-only"),b.hideMapAPIError()},requestMarkers:function(){var b={map:c};a.publish({type:"requestCoxCentersMarkers",data:b})},responseMarkers:function(a){a?(b.setTotalMarkerObjects(a.response.locations),l=!0):b.displayErrorMsg(q)},setTotalMarkerObjects:function(c){a.select(c).each(function(b,c){var d={};d.address=a.grep([c.address,c.address2,c.city,c.state],Boolean).join(", ")+" "+c.zip,d.addressFormatted=a.grep([c.address,c.address2],Boolean).join(", ")+"<br/>"+[c.city,c.state].join(", ")+" "+c.zip,d.title=c.locationName+" - "+c.city,d.lat=c.displayLat?c.displayLat:c.yextDisplayLat,d.lng=c.displayLng?c.displayLng:c.yextDisplayLng,d.sets=c.customFields[7731],d.newIcon=o+"marker.png",d.phone=void 0!=c.phone?c.phone.replace(/(\d{3})(\d{3})(\d{4})/,"$1-$2-$3"):"",d.paymentOptions="","undefined"!=typeof c.paymentOptions&&(d.paymentOptions=c.paymentOptions.toString().toLowerCase().replace("americanexpress","american express").replace(/\b[a-z]/g,function(a){return a.toUpperCase()}).replace(/,/g,", "),d.paymentOptions="<p>Payment Method:<br/>"+d.paymentOptions+"</p>"),d.hours=c.hours,d.holidayHrs=c.holidayHours,m.push(d)}),b.populateMapWithMarkers()},populateMapWithMarkers:function(){b.removeMarkers(),d=c.getCenter();var e=[],f=[];a.select(m).each(function(a,c){var d=c,f=new google.maps.LatLng(c.lat,c.lng);f=b.getDistanceBetweenLocations(f),d.distance=b.getMiles(f),e.push(d)}),e=e.sort(function(a,b){return a.distance-b.distance}),a.select(e).each(function(a,b){b.distance<=1e3&&a<=50&&f.push(b)});var g=[];if(a.select(f).each(function(b,c){a.select(c.sets).each(function(b,d){a.select(i).each(function(a,b){b==d&&g.push(c)})})}),i.length>0){var h=[];a.each(g,function(b,c){a.inArray(c,h)===-1&&h.push(c)}),f=h}b.placeMarkersOnMap(f),b.displayCoxcentersList(f),f.length>0&&b.hideErrorMsg(),b.setCurrentLocation()},injectMarkerWithLabelIntoHtmlPage:function(){b.load_script("/ui/5_0/tsw/js/extlib/markerLabel.js")},load_script:function(a){if(!t){var b=document.createElement("script");b.type="text/javascript",b.src=a,b.className="myMarkerLabel",document.getElementsByTagName("head")[0].appendChild(b),t=!0}},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},placeMarkersOnMap:function(d){b.injectMarkerWithLabelIntoHtmlPage();var e=0;a.select(d).each(function(a,d){e++;var f=new google.maps.LatLng(d.lat,d.lng),g=new MarkerWithLabel({position:f,map:c,icon:d.newIcon,sets:d.sets,labelContent:e+"",labelAnchor:new google.maps.Point(13,31),labelClass:"marker-label",labelStyle:{opacity:1}});b.getInfoWindowContent(g,d),n.push(g)})},getInfoWindowContent:function(a,c){google.maps.event.addListener(a,"click",function(){f=a,g=c.sets,h=b.getCurrentInfo(c),p=!0,b.keepInfoWindowOpen()})},getCurrentInfo:function(c){var d="";if("undefined"!=typeof c.hours&&c.hours.length>0){var e=[];"undefined"!=typeof c.holidayHrs&&a.select(c.holidayHrs).each(function(a,b){""===b.hours&&b.isRegularHours===!1&&e.push(b.date)}),d=b.getHoursOfOperation(c.hours,e)}return"<h2>"+c.title+"</h2><p>"+c.addressFormatted+"</p><table><tbody>"+d+"</tbody><table><br/><p><a href='tel:"+c.phone+"' name='cox-store-"+c.phone+"'>"+c.phone+"</a></p>"+c.paymentOptions},keepInfoWindowOpen:function(){var d=a.select(h)[1],g=a.select(d).text(),i=g;if(i=i.replace(/<\/?[^>]+(>|$)/g," "),p){var j="";"mobile"===a.select("body").attr("data-layout")&&(j=' style="max-width:'+(a.select(window).width()-80)+'px"'),e.setContent('<div class="map-info-panel"'+j+">"+h+"<a href='http://maps.google.com?saddr=Current Location&daddr= "+encodeURI(i)+"' target='_blank'>Get Directions</a></div>"),e.open(c,f),b.hideErrorMsg()}},displayCoxcentersList:function(c){var d=0,e=a.select(".centers-list-wrapper"),f=[],g="";a.select(e).find(".centers-list-item").remove(),a.select(c).each(function(a,b){var c=a%5;0==c&&d++;var e=(b.lat,b.lng,a),h=b.title,i=b.addressFormatted,j=b.phone;g+=1==d?'<div class="centers-list-item page-'+d+' active-page"><a href="#" data-current-index="'+e+'"><div class="center-marker-number">'+(a+1)+'</div></a><a href="#" data-current-index="'+e+'"><h5>'+h+"</h5></a><p>"+i+"</p><p>"+j+"</p></div>":'<div class="centers-list-item page-'+d+'"><a href="#" data-current-index="'+e+'"><div class="center-marker-number">'+(a+1)+'</div></a><a href="#" data-current-index="'+e+'"><h5>'+h+"</h5></a><p>"+i+"</p><p>"+j+"</p></div>",f.push(d)}),a.select(e).html(g),a.select(".centers-list-item a").click(function(d){d.preventDefault();var e=a.select(this).attr("data-current-index");b.gotoMarkerFromList(e,c)}),b.createPagination(f,c)},createPagination:function(c,d){var e=[],f=a.select(".paging ul"),g="";a.each(c,function(b,c){a.inArray(c,e)===-1&&e.push(c)}),a.select(e).each(function(a,b){g+=1==b?'<li><a href="#" class="active">'+b+"</a></li>":b>5?'<li class="hide-page"><a href="#">'+b+"</a></li>":'<li><a href="#">'+b+"</a></li>"}),a.select(f).removeAttr("style").html(g),a.select(".paging").width(a.select(".centers-list-wrapper").width()-20),a.select(".paging ul").find("a").click(function(a){a.preventDefault(),b.paginationChange(this)}),c.length<=1?b.disablePrevAndNextBtns():(b.enablePrevAndNextBtns(),b.setPrevBtnStatus(),b.setNextBtnStatus()),0==d.length&&b.displayErrorMsg(s)},enablePrevAndNextBtns:function(){a.select(".map-container-wrapper .paging .previous").removeClass("hide"),a.select(".map-container-wrapper .paging .next").removeClass("hide"),a.select(".map-container-wrapper .paging ul").removeClass("hide")},disablePrevAndNextBtns:function(){a.select(".map-container-wrapper .paging .previous").addClass("hide"),a.select(".map-container-wrapper .paging .next").addClass("hide"),a.select(".map-container-wrapper .paging ul").addClass("hide")},paginationChange:function(c){var d=a.select(".paging li");a.select(d).each(function(d,e){var f=a.select(e).find("a"),g=a.select(e).find("a").text();a.select(f).hasClass("active")&&a.select(f).removeClass("active"),f[0]==c&&(a.select(f).addClass("active"),b.displayCurrentPage(g))}),d.length<=1?b.disablePrevAndNextBtns():(b.enablePrevAndNextBtns(),b.setPrevBtnStatus(),b.setNextBtnStatus())},paginationNext:function(c){var d=a.select(".paging li"),e=a.select(".paging li").find("a.active")[0];a.select(d).each(function(b,c){a.select(c).find("a").removeClass("active")});var f=a.select(e).parent().next().find("a").addClass("active");f[0]&&b.displayCurrentPage(a.select(f).text())},paginationPrev:function(){var c=a.select(".paging li"),d=a.select(".paging li").find("a.active")[0];a.select(c).each(function(b,c){a.select(c).find("a").removeClass("active")});var e=a.select(d).parent().prev().find("a").addClass("active");e[0]&&b.displayCurrentPage(a.select(e).text())},displayCurrentPage:function(c){var d=a.select(".map-wrapper .centers-list-item"),e=c/5,f=a.select(".paging li");e%1!=0&&(e=Math.floor(e+1));var g=5*e-5,h=5*e;a.select(f).each(function(b,c){var d=b+1;d<=g||d>h?a.select(c).addClass("hide-page"):a.select(c).removeClass("hide-page")}),a.select(d).each(function(b,d){var e=a.select(d);a.select(e).hasClass("page-"+c)?a.select(e).addClass("active-page"):a.select(e).removeClass("active-page")}),b.setPrevBtnStatus(),b.setNextBtnStatus()},setNextBtnStatus:function(){var b=a.select(".paging li").find("a.active"),c=a.select(b).parent().next();c[0]?(a.select(".paging").find("a.next").removeClass("disabled"),a.select("body").hasClass("IE")&&a.select(".paging").find("a.next").removeAttr("disabled")):(a.select(".paging").find("a.next").addClass("disabled"),a.select("body").hasClass("IE")&&a.select(".paging").find("a.next").attr("disabled","disabled"))},setPrevBtnStatus:function(){var b=a.select(".paging li").find("a.active"),c=a.select(b).parent().prev();c[0]?(a.select(".paging").find("a.previous").removeClass("disabled"),a.select("body").hasClass("IE")&&a.select(".paging").find("a.previous").removeAttr("disabled")):(a.select(".paging").find("a.previous").addClass("disabled"),a.select("body").hasClass("IE")&&a.select(".paging").find("a.previous").attr("disabled","disabled"))},gotoMarkerFromList:function(c,d){a.select(d).each(function(a,d){if(c==a){var e=n[a];f=e,g=d.sets,h=b.getCurrentInfo(d),p=!0,b.keepInfoWindowOpen()}})},removeMarkers:function(){for(var a=0;a<n.length;a++)n[a].setMap(null);n=[]},dateToYMD:function(a){var b=a.getDate(),c=a.getMonth()+1,d=a.getFullYear();return d+"-"+(c<=9?"0"+c:c)+"-"+(b<=9?"0"+b:b)},getHoursOfOperation:function(c,d){for(var e,f=c.split(","),g=[],h=7,i=currentDate=new Date,j=i.getDay()+1,k=0,l={hour:"numeric",minute:"numeric",hour12:!0},m=[],n=1;n<=h;n++){if(d.length>0){var o=currentDate.getDate()-currentDate.getDay()+n,p=new Date(currentDate.setDate(o)),q=b.dateToYMD(p);m.push(q)}var r=b.getDayOfWeekAsString(n),s="Closed";n===j&&(r="<b>"+r+"</b>",s="<b>"+s+"</b>",e=i.getHours(),k=i.getMinutes());var t="<tr><td>"+r+"</td><td>"+s+"</td></tr>";1===n?g[6]=t:g[n-2]=t}return a.each(f,function(b,c){var e;c=c.replace(/(\d):(\d+):(\d+):(\d+):(\d+)/,function(a,b,c,d,f,g){e=parseInt(b),i.setHours(c,d);var h=i.toLocaleString("en-US",l);i.setHours(f,g);var j=i.toLocaleString("en-US",l),k=" - ";return h+k+j}),1===e?(0===d.length||d.length>0&&a.inArray(m[6],d)===-1)&&(g[6]=g[6].replace("Closed",c)):(0===d.length||d.length>0&&a.inArray(m[e-2],d)===-1)&&(g[e-2]=g[e-2].replace("Closed",c))}),g.toString().replace(/,/g,"")},getDayOfWeekAsString:function(a){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][a-1]},getMiles:function(a){return.000621371192*a},getDistanceBetweenLocations:function(a){var c=d,e=a;return b.getDistance(c,e)},getDistance:function(a,c){var d=6378137,e=b.rad(c.lat()-a.lat()),f=b.rad(c.lng()-a.lng()),g=Math.sin(e/2)*Math.sin(e/2)+Math.cos(b.rad(a.lat()))*Math.cos(b.rad(c.lat()))*Math.sin(f/2)*Math.sin(f/2),h=2*Math.atan2(Math.sqrt(g),Math.sqrt(1-g)),i=d*h;return i},rad:function(a){return a*Math.PI/180},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.map.Map",function(a){var b,c,d,e=a.select(".map-container");return{init:function(){console.log("INIT Map.js")},execute:function(){if(console.log("EXEC Map.js"),b=this,a.select(e).length>0){c=b.getLocationFromCookie(),b.getPassedQueryStr()&&(c=b.getPassedQueryStr()),d=b.getMapType();var f={address:c,mapType:d};a.publish({type:"initializeMap",data:f})}},getLocationFromCookie:function(){var b=document.cookie.split(";"),c="United States";return a.select(b).each(function(a,b){var d=b.split("=")[0];d=d.replace(" ",""),"cox-current-zipcode"==d&&(c=b.split("=")[1])}),c},getPassedQueryStr:function(){var a=window.location.search,b="";if(!a)return b;var c={};a.slice(1).replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(a,b,d,e){c[b]=e});var d=c.submit;return b=c["map-address-input"],d?b=decodeURI(c["map-address-input"]):void 0},getMapType:function(){return mapType},destroy:function(){}}})}(coxfw),
function(a){a.core.define("modules.map.MapAjax",function(a){var b,c,d,e=[],f=1,g=!1;return{init:function(){console.log("INIT MapAjax.js"),b=this,a.subscribe({initializeMap:b.initializeMap,requestCoxCentersMarkers:b.requestCoxCentersMarkers,responseCoxCentersMarkers:b.responseCoxCentersMarkers,requestWifiAjaxPages:b.requestWifiAjaxPages,responseWifiAjaxPages:b.responseWifiAjaxPages,requestWifiMarkers:b.requestWifiMarkers,responseWifiMarkers:b.responseWifiMarkers})},execute:function(){},initializeMap:function(b){var c=b.mapType,d=b.address,e={address:d};a.publish({type:"init-"+c,data:e})},requestCoxCentersMarkers:function(b){var c=(b.map,{id:"responseCoxCentersMarkers",url:locationUrl,type:"GET",dataType:"json",timeout:"3000",cache:!1});a.publish({type:"Ajax",data:c})},responseCoxCentersMarkers:function(b){if(b){var c=b.responseJSON,d={response:c};a.publish({type:"responseMarkers",data:d})}},requestWifiAjaxPages:function(c){d=c.map,g=!1;var e={id:"responseWifiAjaxPages",url:locationUrl+"?"+b.calculateRadiusOfMap(d),type:"GET",dataType:"json",timeout:"3000",cache:!1};a.publish({type:"Ajax",data:e})},responseWifiAjaxPages:function(a){if(a){var d=a.responseJSON;c=d.pages.totalPages,c>10?b.showZoomInMsg():b.makeNumberOfAjaxRequests(c)}else console.log("wifi ajax error for pages.")},makeNumberOfAjaxRequests:function(b){if(0==b)a.publish({type:"noWifiMarkers"});else for(i=0;i<b;i++){var c={page:i,map:d};a.publish({type:"requestWifiMarkers",data:c})}},requestWifiMarkers:function(c){var d=c.page,e=c.map,f={id:"responseWifiMarkers",url:locationUrl+"?"+b.calculateRadiusOfMap(e)+"&page="+d,type:"GET",dataType:"json",timeout:"3000",cache:!1};a.publish({type:"Ajax",data:f})},responseWifiMarkers:function(b){if(b&&!g){var d=b.responseJSON;if(a.select(d.locations).each(function(a,b){var c={};c.id=b.id,c.lat=b.lat,c.lng=b.lon,c.type=b.type,e.push(c)}),f==c){var h={response:e};a.publish({type:"totalResponseWifiMarkers",data:h}),g=!0,f=0,e=[]}f++}},showZoomInMsg:function(){a.publish({type:"showZoomMsgOverlay"})},calculateRadiusOfMap:function(a){var b=a.getZoom(),c=a.getBounds(),d=c.getCenter(),e=c.getNorthEast(),f=3963,g=d.lat(),h=d.lng(),i=d.lat()/57.2958,j=d.lng()/57.2958,k=e.lat()/57.2958,l=e.lng()/57.2958,m=f*Math.acos(Math.sin(i)*Math.sin(k)+Math.cos(i)*Math.cos(k)*Math.cos(l-j));m<=2&&(m=2),b>=18&&(m=1);var n="lat="+g+"&lon="+h+"&radius="+Math.round(m)+"&zoom="+b;return n},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.map.Wifi",function(a){var b,c,d,e,f,g=11,h="/ui/5_0/tsw/img/interface/map/",i=a.select(".map-container"),j=[],k="Please zoom in further to find additional locations.",l=!1;return{init:function(){console.log("INIT Wifi.js"),b=this,a.subscribe({"init-wifi":b.initWifiMap,totalResponseWifiMarkers:b.totalResponseWifiMarkers,showZoomMsgOverlay:b.showZoomMsgOverlay,noWifiMarkers:b.hideThrobber,infowindow_response:b.responseInfoWindowCall})},execute:function(){},initWifiMap:function(a){var e=a.address,f=new google.maps.Geocoder;"United States"==e&&(g=4),f.geocode({address:e},function(a,e){e==google.maps.GeocoderStatus.OK&&(l=!0,d=new google.maps.LatLng(a[0].geometry.location.lat(),a[0].geometry.location.lng()),c=b.getCoxMap(),b.addEventListeners(c))}),b.displayLocationResults(e)},getCoxMap:function(){return new google.maps.Map(i[0],{zoom:g,center:d,scaleControl:!0,mapTypeId:google.maps.MapTypeId.ROADMAP})},displayLocationResults:function(b){var c=a.select(".map-search-results");a.select(c).html('Showing results for <strong>"'+b+'"</strong>')},addEventListeners:function(c){e||(e=new google.maps.InfoWindow),google.maps.event.addListener(c,"dragstart",function(){l=!1,b.showThrobber(),b.requestNumberOfAjaxCalls()}),google.maps.event.addListener(c,"tilesloaded",function(){b.showThrobber(),b.requestNumberOfAjaxCalls()}),google.maps.event.addListener(c,"zoom_changed",function(){b.showThrobber()}),a.select(".map-search-wrapper a.button").click(function(c){c.preventDefault();var d=a.select(".map-search-wrapper input").val();d&&(b.showThrobber(),b.getLocationFromAddressInput(),b.displayLocationResults(d))}),a.select(".map-search-wrapper input").focus(function(c){c.preventDefault(),a.select(this).bind("keypress",function(c){if(13==c.which){c.preventDefault();var d=a.select(".map-search-wrapper input").val();d&&(b.showThrobber(),b.getLocationFromAddressInput(),b.displayLocationResults(d))}})})},getLocationFromAddressInput:function(){var e=new google.maps.Geocoder,f=a.select(".map-search-wrapper input").val();e.geocode({address:f},function(a,e){if(e==google.maps.GeocoderStatus.OK)l=!0,d=new google.maps.LatLng(a[0].geometry.location.lat(),a[0].geometry.location.lng()),c.fitBounds(a[0].geometry.viewport);else{var f="We could not find that location.";b.insertZoomMsgContainer(f)}b.hideThrobber()})},requestNumberOfAjaxCalls:function(){b.showThrobber(),b.removeAllMarkers(),b.hideZoomMsgOverlay();var d={map:c};a.publish({type:"requestWifiAjaxPages",data:d})},totalResponseWifiMarkers:function(a){if(a){var c=a.response;b.placeAllMarkersOnMap(c)}},setCurrentLocation:function(){var a=h+"current-location.png";if(l){var b=new google.maps.Marker({position:d,map:c,icon:a});j.push(b)}},placeAllMarkersOnMap:function(d){j=[],a.select(d).each(function(a,d){var e=new google.maps.Marker({position:new google.maps.LatLng(d.lat,d.lng),map:c,icon:h+d.type+".png"});b.getInfoWindowContent(e,d.id),j.push(e)});var e=[{url:h+"cluster.png",height:88,width:50,anchor:[32,0],textColor:"#ffffff",textSize:11}];c.getZoom()<18&&(f=new MarkerClusterer(c,j,{styles:e})),b.hideThrobber(),b.setCurrentLocation()},removeAllMarkers:function(){for(var a=0;a<j.length;a++)j[a].setMap(null);f&&f.clearMarkers()},showThrobber:function(){a.select(i).addClass("loading")},hideThrobber:function(){a.select(i).removeClass("loading")},showZoomMsgOverlay:function(){b.hideThrobber(),b.insertZoomMsgContainer(k),a.select(".zoom-too-high").removeClass("hide")},hideZoomMsgOverlay:function(){a.select(".zoom-too-high").addClass("hide")},insertZoomMsgContainer:function(b){console.log("insert error msg...");var c=a.select(i).find(".zoom-too-high")[0];c?a.select(i).find(".zoom-too-high p").html(b):a.select(i).append('<div class="zoom-too-high"><p>'+b+"</p></div>")},getInfoWindowContent:function(b,c){google.maps.event.addListener(b,"click",function(){if(c){var d=markerInfoURL+"?id="+c;_curentMarker=b;var e={id:"infowindow_response",container:i,url:d,type:"GET",dataType:"json",timeout:"3000",cache:!1};a.publish({type:"Ajax",data:e})}})},responseInfoWindowCall:function(a){var b=a.responseJSON,d=b.info.hotspotName;d.length>0&&(d="<h2>"+d+"</h2>");var f=b.info.businessName;f.length>0&&(f="<strong>"+f+"</strong><br/>");var g=b.info.street;g.length>0&&(g+="<br/>");var h=b.info.city+", "+b.info.state+" "+b.info.zip,i=b.info.type;i.length>0&&(i="<p><strong>Network: </strong>"+i+"</p>");var j=d+"<p>"+f+g+h+"</p>"+i,k=g+" "+h;k=k.replace(/<\/?[^>]+(>|$)/g," "),e.setContent('<div class="map-info-panel">'+j+"<a href='http://maps.google.com?saddr=Current Location&daddr= "+encodeURI(k)+"' target='_blank'>Get Directions</a></div>"),e.open(c,_curentMarker)},destroy:function(){}}})}(coxfw),function(a){a.core.define("modules.residential.ChannelLineup",function(a){var b,c=0,d=0,e="desktop",f='<div class="loader"></div><div class="response"></div>',g=0,h=0,i=0,j=1,k=1,l=1,m=!1,n="Channel Lineup",o="init",p="append",q="modal",r="desktop",s="mobile",t=".channel-lineup",u=".channel-lineup-table",v=".cms-dialog",w="",x="",y=a.select(".channel-lineup");return{init:function(){},execute:function(){b=this,0!=y.length&&(a.subscribe({init_desktop_table:b.initDesktopTable,init_mobile_table:b.initMobileTable,init_modal_table:b.initModalTable,append_desktop_table:b.appendDesktopTable,append_mobile_table:b.appendMobileTable,append_modal_table:b.appendModalTable,ProgressiveScroll:b.listenForScrollEvents,ModalLoaded:b.channelLineupModal,update_refine_tv_package:b.updateRefineTvPackages}),a.select("body").on("content-loaded",t,function(c){_sectionHeaderSticky=a.select(".channel-lineup .section-header"),m||b.getDefaultBrowserType()}),a.select(window).on("resize",function(a){b.determineBrowserType()}),a.select(window).on("scroll touchmove",function(c){if(!(a.select(".channel-lineup .section-header").length<1)){var d=b.getViewportOffset(_sectionHeaderSticky);this.scrollTop>d.top?(_sectionHeaderSticky.addClass("active"),a.select(".channel-lineup .data-table").stickyTableHeaders()):_sectionHeaderSticky.removeClass("active")}}),a.select("body").on("change",".channel-lineup .select-wrapper select",function(a){b.filterOptionChange(this)}),a.select("body").on("submit",".find-channels-form",function(a){a.preventDefault()}),a.select("body").on("click","#filter-search-submit",function(a){a.preventDefault(),b.searchOptionChange()}),a.select("body").on("click","#refine-btn",function(a){a.preventDefault(),b.refineOptionChange()}),a.select("body").on("click",".ui-widget-overlay",function(c){a.select(t)[0]&&(c.preventDefault(),b.closeModalWindow())}))},getDefaultBrowserType:function(){e=a.select("body").attr("data-layout");var c=a.select(".channel-lineup").attr("data-ajax-source"),d=window.location.href.split("?")[1];w=d?c+"?"+window.location.href.split("?")[1]+"&layout="+e:c+"?layout="+e,b.makeAjaxRequest(e,o)},determineBrowserType:function(){e!=a.select("body").attr("data-layout")&&(e=a.select("body").attr("data-layout"),b.closeModalWindow(),w.indexOf("layout")!=-1&&(w=b.removeParam(w,"layout")),w+=w.indexOf("?")==-1?"?":"&",w+="layout="+e,b.makeAjaxRequest(e,o))},makeAjaxRequest:function(c,d,e){b.insertThrobber(),d==o&&b.updateCurrentRequestRange(c,"resetRange");var f=!1;c==q?_numberOfResultsPerRequest=Number(a.select(v).find(t).attr("data-number-per-request")):_numberOfResultsPerRequest=Number(a.select(t).attr("data-number-per-request")),url=b.getAllFilterOptions(c)+"&status="+d+b.updateCurrentRequestRange(c,"getCurrentRange"),c==q&&(url=e+b.getAllFilterOptions(c)+"&status="+d+b.updateCurrentRequestRange(c,"getCurrentRange"));var g={id:d+"_"+c+"_table",container:a.select(t),url:url,type:"GET",dataType:"json",timeout:"3000",cache:!1,throbber:{type:"showThrobber",data:{nodes:".loading-wrapper"}}};d==p&&b.updateCurrentRequestRange(c,"isZero")&&(f=!0),!b.updateCurrentRequestRange(c,"isTotal")&&u&&!f&&a.select(t)[0]&&(a.publish({type:"Ajax",data:g}),b.updateCurrentRequestRange(c,"addToRange"))},insertThrobber:function(){a.select(u).append(f)},removeParam:function(a,b){return a.replace(new RegExp("[?&]"+b+"=[^&#]*(#.*)?$"),"$1").replace(new RegExp("([?&])"+b+"=[^&]*&"),"$1")},getBaseUrlParams:function(c,d){var e=w.split("?")[1],f=e&&e.substr(0).replace(/\+/gi," ").split("&");if(d){var g=d&&d.substr(0).replace(/\+/gi," ").split("&");a.select(f).each(function(c,d){var e=d.split("=")[0];a.select(g).each(function(a,c){var d=c.split("=")[0];e==d&&(w=b.removeParam(w,e))})})}},getAllFilterOptions:function(a){var c="";return a==r&&(b.getBaseUrlParams(a,b.getSearchModalParams()),b.getBaseUrlParams(a,b.getSortParams(!1)),b.getBaseUrlParams(a,b.getFilterParams()),c+=w,c+=b.getSearchModalParams(),c+=b.getSortParams(!1),c+=b.getFilterParams()),a==q&&(c+=b.getSortParams(!0)),a==s&&(c+=w,c+=b.getSearchModalParams(),c+=b.getRefineParams()),c},getSearchModalParams:function(){var b="",c=a.select(".filter-search-fields").find("input"),d=a.select(".filter-search-fields").find("select");return a.select(c).each(function(c,d){"text"==a.select(d).attr("type")&&a.select(d).val()&&(b+="&filter-search-term="+a.select(d).val()),"checkbox"==a.select(d).attr("type")&&a.select(d).is(":checked")&&(b+="&"+a.select(d).attr("name")+"="+a.select(d).val())}),a.select(d).each(function(c,d){a.select(d).val()&&(b+="&"+a.select(d).attr("name")+"="+a.select(d).val())}),b},getSortParams:function(b){var c=a.select(".sort-by-select").find(".select-wrapper select"),d="",e="&sort-by-select=number";return b&&(c=a.select(".cms-dialog").find(".sort-by-select").find(".select-wrapper select")[0]),c&&a.select(c).each(function(b,c){var e=a.select(c).attr("id"),f=a.select(c).find("option:selected").val();d+="&"+e+"="+f}),d||(d=e),d},getFilterParams:function(){var b=a.select(".filter-by-select").find(".select-wrapper select"),c="",d="&filter-by-select=en";return a.select(b).each(function(b,d){var e=a.select(d).attr("id"),f=a.select(d).find("option:selected").val();c+="&"+e+"="+f}),c||(c=d),c},getRefineParams:function(){var b="",c=a.select(".channel-lineup-refine").find("input"),d=a.select(".channel-lineup-refine").find("select"),e="&filter-by-select=en";return a.select(d).each(function(c,d){b+="&"+a.select(d).attr("id")+"="+a.select(d).val()}),a.select(c).each(function(c,d){"radio"==a.select(d).attr("type")&&a.select(d).is(":checked")&&(b+="&"+a.select(d).attr("name")+"="+a.select(d).val())}),b||(b=e),b},listenForScrollEvents:function(){if(m||a.select(v).length>0){var c=x.split("?")[1],d=a.select(v).find(".channel-lineup").attr("data-ajax-source"),f=d+"?"+c+"&layout="+q;b.makeAjaxRequest(q,p,f)}else b.makeAjaxRequest(e,p)},channelLineupModal:function(c){if(c){x=c;var d=x.split("?")[1],e=a.select(v).find(".channel-lineup").attr("data-ajax-source"),f=e+"?"+d+"&layout="+q;m=!0,a.select(v).find(u)[0]&&b.makeAjaxRequest(q,o,f)}},closeModalWindow:function(){var c=a.select(".cms-dialog").find(".modal-inline-content")[0];a.select(v).remove(),m=!1,c&&a.select(".modal-inline-content").css("display","none"),b.updateCurrentRequestRange(q,"resetRange")},initDesktopTable:function(c){if(c.isError)b.noResultsFound(0,!1,!0);else{var d=c.responseJSON;if(d){if(g=d.totalResults,0==g)b.noResultsFound(g,!1,!1);else{b.setPageTitle(n),a.select(".pdf-link").attr("href",d.pdfUrl);var e=b.desktopTableHeader(d.tableHeader,!1,d.sortSelect);b.desktopTableBody(d.tableBody,!1),b.insertSubheader(e,r,!1)}b.addFilterDropdowns(d.filterSelect,!1),b.displayFilters(d.filter,!1),b.addDropdownToSearchModal(d.searchGenre,d.searchTVPaks),b.ajaxFinishedLoading()}}},appendDesktopTable:function(a){if(a.isError)b.noResultsFound(0,!1,!0);else{var c=a.responseJSON;c&&b.appendDesktopTableBody(c.tableBody,!1),b.ajaxFinishedLoading()}},desktopTableHeader:function(e,f,g){var h='<table class="data-table">',i=a.select(t).attr("data-view-details-url"),j="";a.select(e).each(function(a,b){j+=b.colClass?'<col class="'+b.colClass+'" />':"<col />"});var k="<colgroup>"+j+"</colgroup><thead><tr>";h+=k;var l='<tr class="sub-header">',m='<td class="sort-by-select"><div class="select-wrapper">'+b.addSortDropdowns(g)+"</div></td>";a.select("body").attr("data-layout");return l+=m,f?d=2:c=e.length,a.select(e).each(function(a,b){var c;c=b.colClass?'<th class="'+b.colClass+'">'+b.colTitle:"<th>"+b.colTitle,b.colTitleSpan&&(c+="<span>"+b.colTitleSpan+"</span>"),c+="</th>",h+=c,0!=a&&(l+='<td><a data-hide-close-btn="true" href="'+i+"?pkg="+b.pkg+'" class="cms-modal-trigger" data-modal-width="690">View Details</a></td>')}),h+="</tr></thead></table>",l+="</tr>",f?a.select(v).find(u).html(h):a.select(u).html(h),l},desktopTableBody:function(c,e){var f="",g=a.select(u).find("tbody")[0];e&&(g=a.select(v).find(u).find("tbody")[0]),e&&(d=3),g||(f="<tbody>"),f+=b.getDesktopTableRows(c,e),f+="</tr>",g||(f+="</tbody>"),e?a.select(v).find(u).find("table thead").after(f):a.select(u).find("table thead").after(f)},insertSubheader:function(b,c,d){var e=a.select(u).find("tbody");if(d){var f=a.select(v).find("thead")[0];a.select(v).find(e).prepend(b),a.select(v).find(e).find("tr:first-child th:last-child").attr("colspan",2),a.select(v).find(e).find(".sub-header").find("td:last-child").attr("colspan",2),a.select(v).find(f).find("tr:first-child th:last-child").attr("colspan",2),a.select(v).find(e).find("a").css("display","none")}else a.select(e).prepend(b)},appendDesktopTableBody:function(c,e){var f="";e&&(d=3),f+=b.getDesktopTableRows(c,e),f+="</tr>",e?a.select(v).find(u).find("table tbody").append(f):(a.select(u).find("table tbody").append(f),a.select(".channel-lineup .data-table").stickyTableHeaders())},getDesktopTableRows:function(e,f){var g="",h=c;f&&(h=d);var i="";return a.select(e).each(function(c,d){if(i=c%h==0?"<tr>":"",f&&(i="<tr>"),f){if(i+=d.disabled&&"true"==d.disabled?'<td class="disable-content">':"<td>",d.channelBox&&(i+='<h3 class="channel-box">'+d.channelBox+"</h3>"),d.logoUrl&&(i+='<img class="channel-logo" alt="'+d.logoAlt+'" src="'+d.logoUrl+'">'),i+="</td>",i+=d.disabled&&"true"==d.disabled?'<td class="disable-content">':"<td>",d.logoAlt&&(i+='<div class="channel-name">'+d.logoAlt+"</div>"),i+="</td>",i+=d.disabled&&"true"==d.disabled?'<td class="disable-content">':"<td>",i+='<ul class="channel-features">',d.channelFeatures){a.select(d.channelFeatures).each(function(a,b){i+="<li>"+b.type+"</li>"});var e=d.channelFeatures instanceof Array;e||(i+="<li>"+d.channelFeatures+"</li>")}i+="</ul>",i+="</td>",i+="</tr>"}else if(d.channelBox){if(i+='<td><div class="channel-data"><h3 class="channel-box">'+d.channelBox+'</h3><img class="channel-logo" alt="'+d.logoAlt+'" src="'+d.logoUrl+'"><div class="channel-name">'+d.channelName+"</div>",i+='<ul class="channel-features">',d.channelFeatures){a.select(d.channelFeatures).each(function(a,b){i+="<li>"+b.type+"</li>"});var e=d.channelFeatures instanceof Array;e||(i+="<li>"+d.channelFeatures+"</li>")}i+="</ul></div></td>"}else if(d.checked)i+='<td><div class="check-mark">&nbsp;</div></td>';else if(d.optional){i+="<td>";var j=b.getUniqueId();a.select("body").append('<div class="tooltip-message" id="optional-text-'+j+'">'+d.optionalText+"</div>"),i+='<a class="tooltip-trigger disabled" data-content-element="optional-text-'+j+'">Optional</a>',i+="</td>"}else d.checked||d.optional||(i+="<td><div>&nbsp;</div></td>");g+=i}),g},getUniqueId:function(){function a(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var b="-";return a()+a()+b+a()+b+a()+b+a()+b+a()+a()+a()},initMobileTable:function(c){if(c.isError)b.noResultsFound(0,!1,!0);else{var d=c.responseJSON;d&&(h=d.totalResults,0==h?b.noResultsFound(h,!1,!1):(b.createMobileTable(d),a.select(".channel-lineup-refine").find("span").remove(),b.addFilterDropdowns(d.filterSelect,!0),b.getRefineModalBody(d.refineBody),a.select(".pdf-link").attr("href",d.pdfUrl)),b.displayFilters(d.filter,!0),b.addDropdownToSearchModal(d.searchGenre,d.searchTVPaks),b.ajaxFinishedLoading())}},appendMobileTable:function(a){if(a.isError)b.noResultsFound(0,!1,!0);else{var c=a.responseJSON;c&&b.appendMobileContentTable(c),b.ajaxFinishedLoading()}},createMobileTable:function(d){c=5;var e=d.packageName;b.setPageTitle(e);var f="";f+='<table class="data-table">',f+=b.getMobileTableRows(d),f+="</table>",a.select(u).html(f)},appendMobileContentTable:function(d){c=5;var e="";e+=b.getMobileTableRows(d),a.select(u).find("table").append(e)},getMobileTableRows:function(b){var c="";return a.select(b.tableBody).each(function(b,d){var e="";e+='<tr class="odd">',e+='<td><img src="'+d.logoUrl+'" alt="'+d.logoAlt+'" class="channel-logo" /></td>',e+='<td><h3 class="channel-box">'+d.channelBox+"</h3></td>",e+='<td><div class="channel-name">'+d.logoAlt+"</div></td>",e+="<td>",e+='<ul class="channel-features">',a.select(d.channelFeatures).each(function(a,b){e+="<li>"+b.type+"</li>"}),e+="</ul>",e+="</td>",e+="</tr>",c+=e}),c},getRefineModalBody:function(c){var d="";a.select(c).each(function(a,b){d+='<span class="colspan-12">',d+=b.selected?'<input type="radio" checked="'+b.selected+'" value="'+b.value+'" id="'+b.value+'" name="tv-package" />':'<input type="radio" value="'+b.value+'" id="'+b.value+'" name="tv-package" />',d+='<label for="'+b.value+'">'+b.name+"</label>",d+="</span>"}),d+='<span class="colspan-12">',d+='<a id="refine-btn" class="button" href="#">Refine</a>',d+="</span>",a.select(".channel-lineup-refine").find(".tv-packages").html(d),a.select(".channel-lineup-refine input[name='language-package']").change(function(c){b.refineLanguagePackageChange(a.select(this).val())})},refineLanguagePackageChange:function(b){var c=a.select(t).attr("data-ajax-source")+"?refine=true&language-package="+b,d={id:"update_refine_tv_package",container:a.select(".refine-your-search"),url:c,type:"GET",dataType:"json",timeout:"30000",cache:!1,throbber:{type:"showThrobber",data:{nodes:".loading-wrapper"}}};a.publish({type:"Ajax",data:d})},updateRefineTvPackages:function(b){var c=b.responseJSON,d=c.refineBody,e="";a.select(d).each(function(a,b){e+='<span class="colspan-12">',e+=b.selected?'<input type="radio" checked="'+b.selected+'" value="'+b.value+'" id="'+b.value+'" name="tv-package" />':'<input type="radio" value="'+b.value+'" id="'+b.value+'" name="tv-package" />',e+='<label for="'+b.value+'">'+b.name+"</label>",e+="</span>"}),e+='<span class="colspan-12">',e+='<a id="refine-btn" class="button" href="#">Refine</a>',e+="</span>",a.select(".channel-lineup-refine").find(".tv-packages").html(e)},initModalTable:function(c){if(c.isError)b.noResultsFound(0,!0,!0);else{var d=c.responseJSON;if(d){if(i=d.totalResults,0==i)b.noResultsFound(i,!0,!1);else{var e=a.select(".cms-dialog .channel-lineup-modal-header");a.select(e).html("<h2>"+d.packageName+"</h2>");var f=a.select(".cms-dialog .channel-lineup-desc-text");a.select(f).html(d.packageDesc);var g;1==d.onlinePurchase?g="<a class='button' href='"+d.offerUrl+"'>"+d.offerText+"</a>":0==d.onlinePurchase?(g="<a href='#' data-content-element='package-details-help' class='button tooltip-trigger'>"+d.detailsText+"</a>",g+="<div id='package-details-help' class='tooltip-message'>"+d.detailsTooltip+"</div>"):g="",a.select(".cms-dialog .channel-lineup-desc-button").html(g);var h=b.desktopTableHeader(d.tableHeader,!0,d.sortSelect);b.desktopTableBody(d.tableBody,!0),b.insertSubheader(h,r,!0)}b.ajaxFinishedLoading()}var j=a.select(".cms-dialog").find("button");a.select(j).click(function(a){a.preventDefault(),b.closeModalWindow()})}},appendModalTable:function(a){if(a.isError)b.noResultsFound(0,!0,!0);else{var c=a.responseJSON;c&&b.appendDesktopTableBody(c.tableBody,!0),b.ajaxFinishedLoading()}},noResultsFound:function(b,c,d){d?c?a.select(".cms-dialog .channel-lineup-table").html("<p class='no-results'>Unable to load channel lineup.</p>"):a.select(".channel-lineup-table").html("<p class='no-results'>Unable to load channel lineup.</p>"):0==b&&(c?a.select(".cms-dialog .channel-lineup-table").html("<p class='no-results'>No channels matched your search criteria.</p>"):a.select(".channel-lineup-table").html("<p class='no-results'>No channels matched your search criteria.</p>"))},displayFilters:function(b,c){if(a.select(".cl-showme").remove(),b&&b.length>0&&!c){var d="";a.select(b).each(function(a,b){d+="<span>"+b.term+"</span>"}),a.select(".channel-lineup .filter-list").html("filtered by:"+d)}else a.select(".channel-lineup .filter-list").html("");b&&b.length>0&&c&&a.select(".channel-lineup-tabs li:first-child").append('<span class="cl-showme">'+b.length+"</span>")},addFilterDropdowns:function(b,c){var d=a.select(".channel-lineup .filter-by-select .select-wrapper"),e=0;if(b&&!c){if(e=a.select(b).length,e>1){var f='<select id="filter-by-select" name="filter-by-select">';a.select(b).each(function(a,b){f+=b.selected?'<option selected="'+b.selected+'" value="'+b.value+'">'+b.name+"</option>":'<option value="'+b.value+'">'+b.name+"</option>"}),f+="</select>",a.select(d).html(f)}}else if(b&&c){if(e=a.select(b).length,e>1){var g="";a.select(b).each(function(a,b){g+='<span class="colspan-12">',g+=b.selected?'<input type="radio" value="'+b.value+'" checked="'+b.selected+'" id="'+b.value+'" name="language-package" />':'<input type="radio" value="'+b.value+'" id="'+b.value+'" name="language-package" />',g+='<label for="'+b.value+'">'+b.name+"</label>",g+="</span>"})}a.select(".channel-lineup-refine").find("h2").after(g)}},addSortDropdowns:function(b){if(b){var c='<select id="sort-by-select" name="sort-by-select">';return a.select(b).each(function(a,b){c+=b.selected?'<option selected="'+b.selected+'" value="'+b.value+'">'+b.name+"</option>":'<option value="'+b.value+'">'+b.name+"</option>"}),c+="</select>"}return""},filterOptionChange:function(c){var d=!1,f=x.split("?")[1],g=a.select(v).find(".channel-lineup").attr("data-ajax-source"),h=g+"?"+f+"&layout="+q;a.select(c).closest(v)[0]&&(d=!0),d?b.makeAjaxRequest(q,o,h):b.makeAjaxRequest(e,o)},searchOptionChange:function(){b.closeModalWindow(),b.makeAjaxRequest(e,o)},addDropdownToSearchModal:function(b,c){var d=a.select(".filter-search-select-paks")[0],e=a.select(d).find("select")[0],f=a.select(".filter-search-select-genre")[0],g=a.select(f).find("select")[0];if(d&&!e){a.select(d).css("display","");var h='<select id="filter-search-select-paks" name="filter-search-select-paks">';a.select(c).each(function(a,b){h+=b.selected?'<option value="'+b.value+'" selected="'+b.selected+'">'+b.name+"</option>":'<option value="'+b.value+'">'+b.name+"</option>"}),h+="</select>",a.select(d).append(h)}if(f&&!g){a.select(f).css("display","");var i='<select id="filter-search-select-genre" name="filter-search-select-genre">';a.select(b).each(function(a,b){i+=b.selected?'<option value="'+b.value+'" selected="'+b.selected+'">'+b.name+"</option>":'<option value="'+b.value+'">'+b.name+"</option>"}),i+="</select>",a.select(f).append(i)}0==b.length&&a.select(f).css("display","none"),0==c.length&&a.select(d).css("display","none")},refineOptionChange:function(){b.closeModalWindow(),b.makeAjaxRequest(e,o)},setPageTitle:function(b){a.select(".section-header h2").html(b)},getViewportOffset:function(b){var c=a.select(window);return scrollTop=c.scrollTop(),offset=b.offset(),{top:offset.top-scrollTop}},updateCurrentRequestRange:function(a,b){var c,d,e;switch(a){case q:e=i,c=l;break;case r:e=g,c=j;break;case s:e=h,c=k}switch(b){case"getCurrentRange":var f=c*_numberOfResultsPerRequest-_numberOfResultsPerRequest;c>1&&(f=c*_numberOfResultsPerRequest-_numberOfResultsPerRequest+1);var m=c*_numberOfResultsPerRequest;return d="&start="+f+"&end="+m;case"addToRange":c++,a==q&&(l=c),a==r&&(j=c),a==s&&(k=c);break;case"resetRange":a==q&&(l=1),a==r&&(j=1),a==s&&(k=1);break;case"isTotal":var n=!1,o=c*_numberOfResultsPerRequest,p=e+_numberOfResultsPerRequest;return 0==e?n=!1:o>p&&(n=!0),n;case"isZero":var t=!1;return a==r&&0==g&&(t=!0),a==q&&0==i&&(t=!0),a==s&&0==h&&(t=!0),t}},ajaxFinishedLoading:function(){a.publish({type:"makeAnotherCall"})},destroy:function(){}}})}(coxfw);