var coxfw=coxfw||{};(function(a){a.extendObj=function(b,c){return a.core.dom().extend(true,b,c)};a.extend=function(b){if(typeof b=="string"){a[b]={}}else{a.extendObj(a,b)}};a.utils=(function(){return{typeEqual:function(c,b){return a.core.type(c)===b},newGUID:function(){var b=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return(b()+b()+"-"+b()+"-"+b()+"-"+b()+"-"+b()+b()+b())},parseURL:function(c){var b=a.core.dom("<a/>")[0];b.href=c;return b}}}())})(coxfw);(function(a){a.core=(function(){var b={};var c={};return{define:function(e,d){if(a.utils.typeEqual(e,"string")&&a.utils.typeEqual(d,"function")){temp=d(a.coxjs.define(this,e));if(this.validConstructor(temp)){temp=null;b[e]={define:d,instance:null}}else{a.core.throwError(1,"Module "+e+" registration failed. Instance cannot be initialized")}}else{a.core.throwError(1,"Module "+e+" registration failed. One or more args are of an incorrect type")}},initialize:function(f){b[f].instance=b[f].define(a.coxjs.define(this,f));try{b[f].instance.init()}catch(d){console.error("COXJS: Module named '"+f+"' had a problem while initializing and said '"+d+"'.")}},start:function(f){try{b[f].instance.execute()}catch(d){console.error("COXJS: Module named '"+f+"' had a problem while executing and said '"+d+"'.")}},startAll:function(){var d;console.groupCollapsed("INIT initialize all modules");for(d in b){if(b.hasOwnProperty(d)){this.initialize(d)}}console.groupEnd();console.groupCollapsed("EXEC start all modules");for(d in b){if(b.hasOwnProperty(d)){this.start(d)}}console.groupEnd()},stop:function(e){var d;if(d=b[e]&&d.instance){d.instance.destroy();d.instance=null}},stopAll:function(){var d;for(d in b){if(b.hasOwnProperty(d)){this.stop(d)}}},throwError:function(d,e){console.error(d,e)},validConstructor:function(d){return(d.init&&a.utils.typeEqual(d.init,"function")&&d.destroy&&a.utils.typeEqual(d.destroy,"function")&&d.execute&&a.utils.typeEqual(d.execute,"function"))},isPlainObject:function(d){return jQuery.isPlainObject(d)},trim:function(d){return jQuery.trim(d)},inArray:function(e,d){return jQuery.inArray(e,d)},each:function(d,e){return jQuery.each(d,e)},evalUrl:function(d){return jQuery._evalUrl(d)},getScript:function(d,e){return jQuery.getScript(d,e)},globalEval:function(d){return jQuery.globalEval(d)},contains:function(d,e){return jQuery.contains(d,e)},ajax:function(d){return jQuery.ajax(d)},ajaxSetup:function(d){return jQuery.ajaxSetup(d)},when:function(d){return jQuery.when.apply(this,[d])},type:function(d){return jQuery.type(d)},getDollarSign:function(){return jQuery},events:{register:function(e,d){if(a.core.isPlainObject(e)&&d){if(b[d]){b[d].events=e}else{a.core.throwError(1,"Module "+d+" registration failed. Instance cannot be found")}}},trigger:function(e){if(a.core.isPlainObject(e)){var d;for(d in b){if(b.hasOwnProperty(d)){d=b[d];if(d.events&&d.events[e.type]){var f=d.events[e.type](e.data);if(!a.utils.typeEqual(f,"undefined")){return f}}}}}},remove:function(e,d){if(a.core.isPlainObject(e)&&d&&(d=b[d])&&d.events){delete d.events}},contentLoaded:function(d){if(arguments.length==0){return jQuery._data(document.body).events["content-loaded"]}else{jQuery(jQuery._data(document.body).events["content-loaded"]).each(function(e,f){if(f.selector==d){a.core.dom(d).trigger("content-loaded")}})}}},browser:function(){if(window.matchMedia){if(window.matchMedia("(max-width: 767px)").matches){a.core.dom("body").attr("data-layout","mobile")}else{a.core.dom("body").attr("data-layout","desktop")}}else{var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;if(d<=767){a.core.dom("body").attr("data-layout","mobile")}else{a.core.dom("body").attr("data-layout","desktop")}}return a.core.dom("body").data()},dom:function(d,e){return new jQuery(d,e)},testing:{test:function(d,f,g,e){},ok:function(d,e){},equal:function(f,d,e){},timing:function(d,e){}},saveItem:function(e,d){if(c[e]){c[e]=JSON.stringify(jQuery.extend(true,JSON.parse(c[e]),JSON.parse(d)))}else{c[e]=d}},getItem:function(d){return c[d]},removeItem:function(d){delete c[d]},clearAllItems:function(){c={}},addValidationMethod:function(d,f,e){jQuery.validator.addMethod(d,f,e)}}}())})(coxfw);(function(a){a.coxjs={define:function(c,f){var b=a.utils;var c=a.core;var g=c.dom;var e=c.events;var d=c.testing;return{subscribe:function(h){e.register(h,f)},publish:function(h){return e.trigger(h)},ignore:function(h){e.remove(h,f)},select:function(h,j){return g(h,j)},trim:function(h){return c.trim(h)},inArray:function(j,h){return c.inArray(j,h)},typeEqual:function(j,h){return b.typeEqual(j,h)},each:function(h,j){return c.each(h,j)},evalUrl:function(h){return c.evalUrl(h)},getScript:function(h,j){return c.getScript(h,j)},globalEval:function(h){return c.globalEval(h)},contains:function(h,j){return c.contains(h,j)},ajax:function(h){return c.ajax(h)},ajaxSetup:function(h){return c.ajaxSetup(h)},when:function(h){return c.when(h)},preventDefault:function(h){return h.preventDefault()},stopPropagation:function(h){return h.stopPropagation()},test:function(h,l,m,j){if(arguments.length===2){m=l;l=null}return d.test(h,l,m,j)},ok:function(h,j){return d.ok(h,j)},equal:function(l,h,j){return d.equal(l,h,j)},timing:function(h,j){return d.timing(h,j)},setXHRSelectors:function(h){console.debug("___SMT___| setXHRSelectors DEPRECATED for ",h)},browser:c.browser(),createStore:function(h){return c.saveItem(this.getModuleId(),h)},getStore:function(){return c.getItem(this.getModuleId())},clearStore:function(){return c.removeItem(this.getModuleId())},getModuleId:function(){return f},addValidationMethod:function(h,l,j){return c.addValidationMethod(h,l,j)}}}}})(coxfw);(function(a){a.core.dom().ready(function(){var e=function e(){return};var c=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"];var d=c.length;var b=(window.console=window.console||{});if(!b.log){b.log=function(g){}}while(d--){var f=c[d];if(!b[f]){b[f]=e}}a.core.startAll();a.core.each(a.core.events.contentLoaded(),function(g,h){if(a.core.dom(h.selector).length>0){a.core.dom(h.selector).trigger("content-loaded")}})})})(coxfw);(function(a){a.core.define("tracking.global.GlobalLinkTracker",function(d){var c;var b=".cols-grid .col-content a:not(.accordion-trigger)";return{init:function(){},execute:function(){console.log("EXEC GlobalLinkTracker.js");c=this;if(typeof s!="undefined"&&s.linkDownloadFileTypes){d.select("body").on("click",b,function(e){c.trackComponentHeaderLinks(this)})}},trackComponentHeaderLinks:function(g){var e="";var n=$(g).closest(".col-content").find("h2,h3").text();var l=n?n+":":"";var f=g.innerHTML.replace(/<\/?[^>]+(>|$)/g,"");var h=$.trim(g.title||f);var m=(l+h).toLowerCase();var j=/:$/;m=m.replace(j,"");if(typeof(__coxOmnitureParams)!="undefined"){e=__coxOmnitureParams.pageName;m=__coxOmnitureParams.pageName+":"+m;d.publish({type:"OmnitureInterface",data:{mode:"track",type:"event",clearVariables:"true",caller:b,options:{pageName:e,customLink:m}}})}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("tracking.global.ManageOmnitureVariables",function(c){var b;return{init:function(){console.log("INIT ManageOmnitureVariables.js");b=this;c.subscribe({OmnitureInterface:b.OmintureInterface})},execute:function(){},OmintureInterface:function(d){console.log("     ManageOmnitureVariables.OmintureInterface");if(typeof s!="undefined"&&s&&!!s.getQueryParam&&typeof(__coxOmnitureParams)!="undefined"&&typeof(s_account)!="undefined"&&s_account!=""){if(!d.mode){return}if(this.storedVariables==undefined){this.storedVariables={}}switch(d.mode){case"track":b.track(d);break;case"set":b.set(d);break}}},onError:function(){console.log("There was an error in the Metrics command.")},track:function(l){var g=l.type||"pageview";var f=l.clearVariables||false;var d=l.options||{};if(f){b.clearOmnitureVariables()}try{if(!s){return}switch(g){case"pageview":b.storeVariables(d);b.mapOmnitureVariables(this.storedVariables);s.t();break;case"event":var j=b.mapOmnitureVariables(d);if(j.events.length){j.vars.push("events")}if($.inArray("pageName",j.vars)==-1){j.vars.push("pageName")}s.linkTrackVars=j.vars.length?j.vars.join(","):"None";s.linkTrackEvents=j.events.length?j.events.join(","):"None";console.log("Event Tracked: ",s);if(d.customLink){s.tl(l.caller,"o",d.customLink)}else{if(d.eventName=="download"){s.tl(l.caller,"o",d.download)}else{if(d.eventName){s.tl(l.caller,"o",d.eventName)}else{if(d.actionPerformed){s.tl(l.caller,"o",d.actionPerformed)}else{console.log("No event, custom link, or action set during Omniture Track command.");s.tl(l.caller,"o","anonymousTrigger")}}}}break;default:console.log("A call to metrics was attempted, but no Type (pageview/event) was specified.")}}catch(h){b.onError();console.log("Metrics call failed")}},storeVariables:function(d){if(d.eventName&&this.storedVariables.eventName){d.eventName+=","+this.storedVariables.eventName}this.storedVariables=a.extendObj(this.storedVariables,d)},overwriteVariables:function(d){this.storedVariables=a.extendObj(this.storedVariables,d)},clearOmnitureVariables:function(d){c.each(this.storedVariables,function(e,f){b.storedVariables[e]=null});b.mapOmnitureVariables(b.storedVariables)},set:function(d){b.storeVariables(d.options);if(d.mapImmediately){b.mapOmnitureVariables(this.storedVariables)}},mapOmnitureVariables:function(f){var j={vars:[],events:[]};var g=function(l){if(s.events){s.events=($.inArray(l,s.events.split(","))>-1)?s.events:s.events+","+l}else{s.events=l}j.events.push(l)};var d=false;for(var e in f){var h=f[e];switch(e){case"localePagename":if(h){s.pageName=h}break;case"pageName":if(h){s.prop30=h;j.vars.push("prop30");s.eVar46=h;j.vars.push("eVar46")}g("event52");break;case"simplePageName":s.prop25=h;break;case"cidm":s.eVar61=h;break;case"channel":if(h){s.channel=h}break;case"contentArea":s.channel=h;break;case"pageType":s.pageType=h;break;case"offerSource":s.eVar4=h;break;case"localeName":s.prop1=h;j.vars.push("prop1");s.eVar7=h;j.vars.push("eVar7");break;case"sectionName":s.prop2=h;j.vars.push("prop2");break;case"businessUnit":if(h=="businessstore"){d=true}s.prop3=h;j.vars.push("prop3");break;case"formName":s.prop4=h;j.vars.push("prop4");break;case"logStatus":if(!h){h="not logged in"}s.prop5=h;j.vars.push("prop5");s.eVar6=h;j.vars.push("eVar6");break;case"businessLocal":s.prop6=h;j.vars.push("prop6");s.eVar35=h;j.vars.push("eVar35");break;case"campaign":s.campaign=h;j.vars.push("campaign");break;case"searchResultsFlag":if(!h){h="false"}s.prop7=h;j.vars.push("prop7");break;case"pathingByCampaign":s.prop8=h;j.vars.push("prop8");break;case"productName":s.prop9=h;j.vars.push("prop9");break;case"customLink":s.prop10=h;j.vars.push("prop10");s.eVar16=h;j.vars.push("eVar16");g("event45");break;case"exitLink":s.prop30=h;j.vars.push("prop30");break;case"videoTitle":s.prop11=h;j.vars.push("prop11");s.eVar9=h;j.vars.push("eVar9");break;case"language":s.prop12=h;j.vars.push("prop12");break;case"kanaArticleId":s.prop18=h;j.vars.push("prop18");s.eVar21=h;j.vars.push("eVar21");break;case"confirmationMsg":s.prop31=h;j.vars.push("prop31");break;case"dvrFilter":s.prop32=h;j.vars.push("prop32");break;case"registrationType":if(!h){h="not set"}s.eVar1=h;j.vars.push("eVar1");break;case"products":s.products=h;break;case"download":s.eVar2=h;j.vars.push("eVar2");break;case"keyword":if(h){if(h.match(/^web -/)){h=h.replace(/^web - /,"");s.prop38=h.toLowerCase();j.vars.push("prop38")}else{if(h.match(/^cox -/)||h.match(/^support -/)){h=h.toLowerCase();s.eVar3=h;j.vars.push("eVar3");s.prop36=h;j.vars.push("pro36")}}g("event4")}break;case"toolName":s.eVar4=h;j.vars.push("eVar4");break;case"actionPerformed":s.eVar5=h;j.vars.push("eVar5");break;case"dvrSearch":s.eVar47=h;j.vars.push("eVar47");break;case"contextualFlag":s.eVar8=h;j.vars.push("eVar8");break;case"campcode":s.eVar10=h;j.vars.push("eVar10");break;case"promoCode":s.eVar22=h;j.vars.push("eVar22");s.prop26=h;j.vars.push("prop26");break;case"promoCodeEntered":s.eVar56=h;j.vars.push("eVar56");break;case"orderSavedCartStatus":s.eVar57=h;j.vars.push("eVar57");break;case"orderInstallChargePro":s.eVar32=h;break;case"orderInstallChargeProSavings":s.eVar33=h;break;case"orderInstallChargeSelfDropShip":s.eVar39=h;break;case"orderInstallChargeSelfDropShipSavings":break;case"orderInstallChargeSelfPickUp":s.eVar36=h;break;case"orderInstallChargeSelfPickUpSavings":s.eVar37=h;break;case"selectedServiceFilters":s.eVar34=h;j.vars.push("eVar34");break;case"offerSortType":s.eVar38=h;j.vars.push("eVar38");break;case"featureFilterValue":s.eVar55=h;j.vars.push("eVar55");break;case"offersCompared":s.eVar51=h;j.vars.push("eVar51");break;case"quoteContention":s.prop33=h;j.vars.push("prop33");break;case"ccCode":s.eVar23=h;j.vars.push("eVar23");s.prop27=h;j.vars.push("prop27");break;case"searchReferrer":s.eVar14=h;j.vars.push("eVar14");break;case"hier1":s.hier1=h;break;case"hier2":s.hier2=h;break;case"pageLayout":s.eVar40=h;j.vars.push("eVar40");break;case"siteId":s.prop21=h;s.eVar17=h;break;case"franchiseId":s.prop22=h;s.eVar18=h;break;case"zip":s.zip=h;break;case"state":s.state=h;break;case"storeEvent":s.events=h;break;case"customerType":s.prop15=h;break;case"signInType":s.prop16=h;break;case"purchaseId":s.prop20=h;s.purchaseID=h;break;case"errorlist":s.prop33=h;break;case"errorAttempts":s.prop34=h;break;case"rguSelected":s.eVar45=h;break;case"rguSubscribed":s.eVar44=h;break;case"moveTransferType":s.eVar60=h;break;case"offer":s.eVar15=h;break;case"ordersource":s.prop40=h;break;case"orderDeposit":s.eVar42=h;break;case"monthlyRecurringCharge":s.eVar25=h;break;case"oneTimeCharge":s.eVar28=h;break;case"totalOrderValue":break;case"totalInstallationCharges":break;case"totalMonthlySavings":g("event37");break;case"orderType":s.eVar27=h;break;case"leadId":s.prop28=h;break;case"leadType":s.prop17=h;break;case"totalOneTimeSavings":break;case"visitCount":s.eVar19=h;case"eventName":switch(h){case"productView":g("prodView");break;case"download":g("event3");break;case"searchResultClicked":g("event5");break;case"toolUsageInitiated":g("event6");break;case"toolUsageCompleted":g("event7");break;case"userLogStatus":if(!d){g("event8")}break;case"dvrRecord":g("event25");break;case"dvrSetRecord":g("event26");break;case"searchRecommendationClicked":g("event38");break;case"cancelAppointment":g("event46");break;case"rescheduleAppointment":g("event58");break;case"activateDevice":g("event53");break;case"easypay":g("event87");break;case"paperlessbilling":g("event86");break}break;default:break}}return j},destroy:function(){}}})})(coxfw);(function(a){a.core.define("tracking.global.OmnitureMetricsController",function(d){var b;var c={};return{init:function(){},execute:function(){console.log("EXEC OmnitureMetricsController.js");b=this;if(typeof s!="undefined"&&typeof __coxOmnitureParams!="undefined"&&s&&!!s.getQueryParam){a.extendObj(c,__coxOmnitureParams);b.setVars()}},setVars:function(){console.log("     OmnitureMetricsController.setVars");var l=c.campaign||s.getQueryParam("scid")||s.getQueryParam("sc_id")||s.getQueryParam("s_cid");if(l){c.pathingByCampaign=l+":"+c.pageName;c.campaign=l}var f=s.getQueryParam("campcode");if(f!==""&&f!==null){c.campcode=f}c.businessLocal=c.businessUnit+":"+c.localeName;c.localePagename=c.localeName+":"+c.pageName;var e=$("#support-article:first")[0];if(e&&window.location.search){var j=window.location.search.slice(1);var h={};j.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(n,m,p,o){h[m]=o});var g=h.articleId;if(g){c.kanaArticleId=g}}d.publish({type:"OmnitureInterface",data:{mode:"track",type:"pageview",options:c}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("tracking.global.TealiumTagManager",function(c){var b;return{init:function(){},execute:function(){b=this;var j=null;var d=[];if(typeof(__coxOmnitureParams)!="undefined"&&typeof(s_account)!="undefined"&&s_account!=""){j=__coxOmnitureParams;if(j){var f=new Object();d.push(j);for(var e=0;e<d.length;e++){var g=d[e];c.each(g,function(l,n){var m=n.toString();if(m){if(m.search(",")>0){m=h(m)}}else{m=""}f[l]=m})}utag_data=f;console.log("Creating Teallium UDO");console.log(utag_data);(function(m,l,o,n){m="//tags.tiqcdn.com/utag/cox/main/prod/utag.js";l=document;o="script";n=l.createElement(o);n.src=m;n.type="text/java"+o;n.async=true;m=l.getElementsByTagName(o)[0];m.parentNode.insertBefore(n,m)})()}}function h(l){if(l){return l.split(",")}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.aboutus.map.CoxCenters",function(r){var m;var c;var e=r.select(".map-container");var b;var l=14;var g=false;var h=[];var y=[];var d="/ui/4_12/tsw/img/interface/map/";var j;var f=false;var n;var w;var t;var z;var p="We're sorry, there was a problem with your request. Please try again.";var v="We could not find that location.";var u="<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.";var o=false;var q=false;return{init:function(){m=this;r.subscribe({"init-cox-centers":m.initCoxCentersMap,responseMarkers:m.responseMarkers})},execute:function(){},initCoxCentersMap:function(B){var A=B.address;var C=new google.maps.Geocoder();if(A=="United States"){l=4}C.geocode({address:A},function(E,D){if(D==google.maps.GeocoderStatus.OK){b=new google.maps.LatLng(E[0].geometry.location.lat(),E[0].geometry.location.lng());q=true;c=m.getCoxMap();m.addEventListeners(c)}});m.displayLocationResults(A)},getCoxMap:function(){return new google.maps.Map(e[0],{zoom:l,center:b,scaleControl:true,mapTypeId:google.maps.MapTypeId.ROADMAP})},setCurrentLocation:function(){var B=d+"current-location.png";if(q){var A=new google.maps.Marker({position:b,map:c,icon:B});y.push(A)}},displayLocationResults:function(A){var B=r.select(".map-search-results");r.select(B).html('Showing results for <strong>"'+A+'"</strong>')},addEventListeners:function(A){if(!j){j=new google.maps.InfoWindow()}google.maps.event.addListener(A,"dragstart",function(){q=false;if(!g){m.requestMarkers()}else{m.populateMapWithMarkers()}m.keepInfoWindowOpen()});google.maps.event.addListener(A,"tilesloaded",function(){if(!g){m.requestMarkers()}else{m.populateMapWithMarkers()}m.keepInfoWindowOpen()});google.maps.event.addListener(j,"closeclick",function(){f=false});r.select(".paging").find(".previous").click(function(B){B.preventDefault();m.paginationPrev(this)});r.select(".paging").find(".next").click(function(B){B.preventDefault();m.paginationNext(this)});r.select(".map-search-wrapper a.button").click(function(C){C.preventDefault();f=false;var B=r.select(".map-search-wrapper input").val();if(B){m.getLocationFromAddressInput();m.displayLocationResults(B)}});r.select(".map-search-wrapper input").focus(function(B){B.preventDefault();r.select(this).bind("keypress",function(D){if(D.which==13){D.preventDefault();f=false;m.getLocationFromAddressInput();var C=r.select(".map-search-wrapper input").val();m.displayLocationResults(C)}})});m.filterMarkersOnMap()},filterMarkersOnMap:function(){var B=r.select(".cox-centers-select-options input");r.select(B).on("click",function(D){C()});C();function C(){var D=[];r.select(B).each(function(E,F){if(r.select(F).is(":checked")){D.push(r.select(F).val())}});A(D)}function A(G){var D="";r.select(G).each(function(H,I){D+=","+I.replace('"',"")});var E=D.split(",");var F=[];r.select(E).each(function(H,I){if(I!=""){F.push(I)}});z=F;m.populateMapWithMarkers()}},getLocationFromAddressInput:function(){var B=new google.maps.Geocoder();var A=r.select(".map-search-wrapper input").val()+" United States";B.geocode({address:A},function(D,C){if(C==google.maps.GeocoderStatus.OK){b=new google.maps.LatLng(D[0].geometry.location.lat(),D[0].geometry.location.lng());c.fitBounds(D[0].geometry.viewport);q=true}else{var E=v;m.displayErrorMsg(E)}})},displayErrorMsg:function(B){var C=r.select(".centers-list-wrapper").find(".zoom-too-high")[0];var A=r.select(e).find(".zoom-too-high")[0];if(B==p||B==v){m.displayMapAPIError(B)}else{m.hideMapAPIError();if(!C){r.select(".centers-list-wrapper").html('<div class="zoom-too-high desktop-only"><p>'+B+"</p></div>")}if(!A){r.select(e).append('<div class="zoom-too-high mobile-only"><p>'+B+"</p></div>")}r.select(e).find(".zoom-too-high").removeClass("hide").addClass("mobile-only");r.select(".centers-list-wrapper").find(".zoom-too-high").removeClass("hide").addClass("desktop-only")}},displayMapAPIError:function(B){var A=r.select(".msg-error")[0];if(!A){r.select(".map-search-wrapper").before('<div class="msg-error"><p>'+B+"</p></div>")}else{r.select(".msg-error p").html(B);r.select(".msg-error").removeClass("hide")}},hideMapAPIError:function(){r.select(".msg-error").addClass("hide")},hideErrorMsg:function(){r.select(".zoom-too-high").addClass("hide").removeClass("mobile-only desktop-only");m.hideMapAPIError()},requestMarkers:function(){var A={map:c};r.publish({type:"requestCoxCentersMarkers",data:A})},responseMarkers:function(A){if(A){m.setTotalMarkerObjects(A.response.locations);g=true}else{m.displayErrorMsg(p)}},setTotalMarkerObjects:function(A){r.select(A).each(function(D,C){var B={};B.address=C.address;B.info=C.info;B.lat=C.lat;B.lng=C.lon;B.sets=C.sets;B.newIcon=d+"marker.png";h.push(B)});m.populateMapWithMarkers()},populateMapWithMarkers:function(){m.removeMarkers();b=c.getCenter();var B=[];var D=[];r.select(h).each(function(F,E){var H=E;var G=new google.maps.LatLng(E.lat,E.lng);G=m.getDistanceBetweenLocations(G);H.distance=m.getMiles(G);B.push(H)});B=B.sort(function(F,E){return F.distance-E.distance});r.select(B).each(function(F,E){if(E.distance<=1000&&F<=50){D.push(E)}});var A=[];r.select(D).each(function(F,E){r.select(E.sets).each(function(G,H){r.select(z).each(function(J,I){if((I==H)){A.push(E)}})})});if(z.length>0){var C=[];r.each(A,function(E,F){if(r.inArray(F,C)===-1){C.push(F)}});D=C}m.placeMarkersOnMap(D);m.displayCoxcentersList(D);if(D.length>0){m.hideErrorMsg()}m.setCurrentLocation()},injectMarkerWithLabelIntoHtmlPage:function(){m.load_script("/ui/4_12/tsw/js/extlib/markerLabel.js")},load_script:function(B){if(!o){var A=document.createElement("script");A.type="text/javascript";A.src=B;A.className="myMarkerLabel";document.getElementsByTagName("head")[0].appendChild(A);o=true}},escapeHtml:function(A){return A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},placeMarkersOnMap:function(B){m.injectMarkerWithLabelIntoHtmlPage();var A=0;r.select(B).each(function(E,F){A++;var C=new google.maps.LatLng(F.lat,F.lng);var D=new MarkerWithLabel({position:C,map:c,icon:F.newIcon,sets:F.sets,labelContent:A+"",labelAnchor:new google.maps.Point(13,31),labelClass:"marker-label",labelStyle:{opacity:1}});m.getInfoWindowContent(D,F.info,F.sets);y.push(D)})},getInfoWindowContent:function(A,C,B){google.maps.event.addListener(A,"click",function(){n=A;w=B;t=C;f=true;m.keepInfoWindowOpen()})},keepInfoWindowOpen:function(){var C=r.select(t)[1];var A=r.select(C).text();var B=A;B=B.replace(/<\/?[^>]+(>|$)/g," ");if(f){j.setContent('<div class="map-info-panel">'+t+"<a href='http://maps.google.com?saddr=Current Location&daddr= "+encodeURI(B)+"' target='_blank'>Get Directions</a></div>");j.open(c,n);m.hideErrorMsg()}},displayCoxcentersList:function(G){var C=[];var D=0;var F=r.select(".centers-list-wrapper");var B=[];var A=[];var E="";r.select(F).find(".centers-list-item").remove();r.select(G).each(function(K,H){var J=K%5;if(J==0){D++}var N=H.lat;var O=H.lng;var M=K;var I=r.select(H.info);var P=r.select(I[0]).text();var Q=r.select(I[1]).html();var L=r.select(I[3]).text();if(D==1){E+='<div class="centers-list-item page-'+D+' active-page"><a href="#" data-current-index="'+M+'"><div class="center-marker-number">'+(K+1)+'</div></a><a href="#" data-current-index="'+M+'"><h5>'+P+"</h5></a><p>"+Q+"</p><p>"+L+"</p></div>"}else{E+='<div class="centers-list-item page-'+D+'"><a href="#" data-current-index="'+M+'"><div class="center-marker-number">'+(K+1)+'</div></a><a href="#" data-current-index="'+M+'"><h5>'+P+"</h5></a><p>"+Q+"</p><p>"+L+"</p></div>"}B.push(D)});r.select(F).html(E);r.select(".centers-list-item a").click(function(I){I.preventDefault();var H=r.select(this).attr("data-current-index");m.gotoMarkerFromList(H,G)});m.createPagination(B,G)},createPagination:function(A,E){var D=[];var B=r.select(".paging ul");var C="";r.each(A,function(F,G){if(r.inArray(G,D)===-1){D.push(G)}});r.select(D).each(function(F,G){if(G==1){C+='<li><a href="#" class="active">'+G+"</a></li>"}else{if(G>5){C+='<li class="hide-page"><a href="#">'+G+"</a></li>"}else{C+='<li><a href="#">'+G+"</a></li>"}}});r.select(B).removeAttr("style").html(C);r.select(".paging").width((r.select(".centers-list-wrapper").width()-20));r.select(".paging ul").find("a").click(function(F){F.preventDefault();m.paginationChange(this)});if(A.length<=1){m.disablePrevAndNextBtns()}else{m.enablePrevAndNextBtns();m.setPrevBtnStatus();m.setNextBtnStatus()}if(E.length==0){m.displayErrorMsg(u)}},enablePrevAndNextBtns:function(){var C=r.select(".map-container-wrapper .paging .previous").removeClass("hide");var A=r.select(".map-container-wrapper .paging .next").removeClass("hide");var B=r.select(".map-container-wrapper .paging ul").removeClass("hide")},disablePrevAndNextBtns:function(){var C=r.select(".map-container-wrapper .paging .previous").addClass("hide");var A=r.select(".map-container-wrapper .paging .next").addClass("hide");var B=r.select(".map-container-wrapper .paging ul").addClass("hide")},paginationChange:function(B){var A=r.select(".paging li");r.select(A).each(function(C,E){var F=r.select(E).find("a");var D=r.select(E).find("a").text();if(r.select(F).hasClass("active")){r.select(F).removeClass("active")}if(F[0]==B){r.select(F).addClass("active");m.displayCurrentPage(D)}});if(A.length<=1){m.disablePrevAndNextBtns()}else{m.enablePrevAndNextBtns();m.setPrevBtnStatus();m.setNextBtnStatus()}},paginationNext:function(C){var A=r.select(".paging li");var D=r.select(".paging li").find("a.active")[0];r.select(A).each(function(E,F){r.select(F).find("a").removeClass("active")});var B=r.select(D).parent().next().find("a").addClass("active");if(B[0]){m.displayCurrentPage(r.select(B).text())}},paginationPrev:function(){var A=r.select(".paging li");var C=r.select(".paging li").find("a.active")[0];r.select(A).each(function(D,E){r.select(E).find("a").removeClass("active")});var B=r.select(C).parent().prev().find("a").addClass("active");if(B[0]){m.displayCurrentPage(r.select(B).text())}},displayCurrentPage:function(E){var D=r.select(".map-wrapper .centers-list-item");var B=(E/5);var A=r.select(".paging li");if((B%1)!=0){B=Math.floor(B+1)}var F=(B*5-5);var C=(B*5);r.select(A).each(function(H,I){var G=H+1;if(G<=F||G>C){r.select(I).addClass("hide-page")}else{r.select(I).removeClass("hide-page")}});r.select(D).each(function(G,I){var H=r.select(I);if(r.select(H).hasClass("page-"+E)){r.select(H).addClass("active-page")}else{r.select(H).removeClass("active-page")}});m.setPrevBtnStatus();m.setNextBtnStatus()},setNextBtnStatus:function(){var B=r.select(".paging li").find("a.active");var A=r.select(B).parent().next();if(!A[0]){r.select(".paging").find("a.next").addClass("disabled");if(r.select("body").hasClass("IE")){r.select(".paging").find("a.next").attr("disabled","disabled")}}else{r.select(".paging").find("a.next").removeClass("disabled");if(r.select("body").hasClass("IE")){r.select(".paging").find("a.next").removeAttr("disabled")}}},setPrevBtnStatus:function(){var B=r.select(".paging li").find("a.active");var A=r.select(B).parent().prev();if(!A[0]){r.select(".paging").find("a.previous").addClass("disabled");if(r.select("body").hasClass("IE")){r.select(".paging").find("a.previous").attr("disabled","disabled")}}else{r.select(".paging").find("a.previous").removeClass("disabled");if(r.select("body").hasClass("IE")){r.select(".paging").find("a.previous").removeAttr("disabled")}}},gotoMarkerFromList:function(A,B){r.select(B).each(function(D,E){if(A==D){var C=y[D];n=C;w=E.sets;t=E.info;f=true;m.keepInfoWindowOpen()}})},removeMarkers:function(){for(var A=0;A<y.length;A++){y[A].setMap(null)}y=[]},getMiles:function(A){return A*0.000621371192},getDistanceBetweenLocations:function(A){var B=b;var C=A;return m.getDistance(B,C)},getDistance:function(G,E){var D=6378137;var C=m.rad(E.lat()-G.lat());var A=m.rad(E.lng()-G.lng());var B=Math.sin(C/2)*Math.sin(C/2)+Math.cos(m.rad(G.lat()))*Math.cos(m.rad(E.lat()))*Math.sin(A/2)*Math.sin(A/2);var H=2*Math.atan2(Math.sqrt(B),Math.sqrt(1-B));var F=D*H;return F},rad:function(A){return A*Math.PI/180},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.aboutus.map.Map",function(f){var d;var e=f.select(".map-container");var b;var c;return{init:function(){},execute:function(){d=this;if(f.select(e).length>0){b=d.getLocationFromCookie();if(d.getPassedQueryStr()){b=d.getPassedQueryStr()}c=d.getMapType();var g={address:b,mapType:c};f.publish({type:"initializeMap",data:g})}else{return}},getLocationFromCookie:function(){var g=document.cookie.split(";");var h="United States";f.select(g).each(function(l,m){var j=m.split("=")[0];j=j.replace(" ","");if(j=="cox-current-zipcode"){h=m.split("=")[1]}});return h},getPassedQueryStr:function(){var l=window.location.search;var h="";if(l){var j={};l.slice(1).replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(n,m,p,o){j[m]=o});var g=j.submit;h=j["map-address-input"];if(g){return h=j["map-address-input"]}}else{return h}},getMapType:function(){return mapType},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.aboutus.map.MapAjax",function(h){var f;var c;var b;var g=[];var d=1;var e=false;return{init:function(){f=this;h.subscribe({initializeMap:f.initializeMap,requestCoxCentersMarkers:f.requestCoxCentersMarkers,responseCoxCentersMarkers:f.responseCoxCentersMarkers,requestWifiAjaxPages:f.requestWifiAjaxPages,responseWifiAjaxPages:f.responseWifiAjaxPages,requestWifiMarkers:f.requestWifiMarkers,responseWifiMarkers:f.responseWifiMarkers})},execute:function(){},initializeMap:function(n){var m=n.mapType;var j=n.address;var l={address:j};h.publish({type:"init-"+m,data:l})},requestCoxCentersMarkers:function(l){var m=l.map;var j={id:"responseCoxCentersMarkers",url:locationUrl,type:"GET",dataType:"json",timeout:"3000",cache:false};h.publish({type:"Ajax",data:j})},responseCoxCentersMarkers:function(m){if(m){var j=m.responseJSON;var l={response:j};h.publish({type:"responseMarkers",data:l})}},requestWifiAjaxPages:function(l){b=l.map;e=false;var j={id:"responseWifiAjaxPages",url:locationUrl+"?"+f.calculateRadiusOfMap(b),type:"GET",dataType:"json",timeout:"3000",cache:false};h.publish({type:"Ajax",data:j})},responseWifiAjaxPages:function(l){if(l){var j=l.responseJSON;c=j.pages.totalPages;(c>10)?f.showZoomInMsg():f.makeNumberOfAjaxRequests(c)}else{console.log("wifi ajax error for pages.")}},makeNumberOfAjaxRequests:function(l){if(l==0){h.publish({type:"noWifiMarkers"})}else{for(i=0;i<l;i++){var j={page:i,map:b};h.publish({type:"requestWifiMarkers",data:j})}}},requestWifiMarkers:function(m){var l=m.page;var n=m.map;var j={id:"responseWifiMarkers",url:locationUrl+"?"+f.calculateRadiusOfMap(n)+"&page="+l,type:"GET",dataType:"json",timeout:"3000",cache:false};h.publish({type:"Ajax",data:j})},responseWifiMarkers:function(m){if(m&&!e){var j=m.responseJSON;h.select(j.locations).each(function(o,p){var n={};n.id=p.id;n.lat=p.lat;n.lng=p.lon;n.type=p.type;g.push(n)});if(d==c){var l={response:g};h.publish({type:"totalResponseWifiMarkers",data:l});e=true;d=0;g=[]}d++}},showZoomInMsg:function(){h.publish({type:"showZoomMsgOverlay"})},calculateRadiusOfMap:function(n){var o=n.getZoom();var j=n.getBounds();var m=j.getCenter();var q=j.getNorthEast();var l=3963;var w=m.lat();var z=m.lng();var p=m.lat()/57.2958;var u=m.lng()/57.2958;var t=q.lat()/57.2958;var y=q.lng()/57.2958;var A=l*Math.acos(Math.sin(p)*Math.sin(t)+Math.cos(p)*Math.cos(t)*Math.cos(y-u));if(A<=2){A=2}if(o>=18){A=1}var v="lat="+w+"&lon="+z+"&radius="+Math.round(A)+"&zoom="+o;return v},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.aboutus.map.Wifi",function(j){var l;var b;var d;var g=11;var f;var m="/ui/4_12/tsw/img/interface/map/";var n=j.select(".map-container");var o=[];var h;var e="Please zoom in further to find additional locations.";var c=false;return{init:function(){l=this;j.subscribe({"init-wifi":l.initWifiMap,totalResponseWifiMarkers:l.totalResponseWifiMarkers,showZoomMsgOverlay:l.showZoomMsgOverlay,noWifiMarkers:l.hideThrobber,infowindow_response:l.responseInfoWindowCall})},execute:function(){},initWifiMap:function(q){var p=q.address;var r=new google.maps.Geocoder();if(p=="United States"){g=4}r.geocode({address:p},function(u,t){if(t==google.maps.GeocoderStatus.OK){c=true;d=new google.maps.LatLng(u[0].geometry.location.lat(),u[0].geometry.location.lng());b=l.getCoxMap();l.addEventListeners(b)}});l.displayLocationResults(p)},getCoxMap:function(){return new google.maps.Map(n[0],{zoom:g,center:d,scaleControl:true,mapTypeId:google.maps.MapTypeId.ROADMAP})},displayLocationResults:function(p){var q=j.select(".map-search-results");j.select(q).html('Showing results for <strong>"'+p+'"</strong>')},addEventListeners:function(p){if(!f){f=new google.maps.InfoWindow()}google.maps.event.addListener(p,"dragstart",function(){c=false;l.showThrobber();l.requestNumberOfAjaxCalls()});google.maps.event.addListener(p,"tilesloaded",function(){l.showThrobber();l.requestNumberOfAjaxCalls()});google.maps.event.addListener(p,"zoom_changed",function(){l.showThrobber()});j.select(".map-search-wrapper a.button").click(function(r){r.preventDefault();var q=j.select(".map-search-wrapper input").val();if(q){l.showThrobber();l.getLocationFromAddressInput();l.displayLocationResults(q)}});j.select(".map-search-wrapper input").focus(function(q){q.preventDefault();j.select(this).bind("keypress",function(t){if(t.which==13){t.preventDefault();var r=j.select(".map-search-wrapper input").val();if(r){l.showThrobber();l.getLocationFromAddressInput();l.displayLocationResults(r)}}})})},getLocationFromAddressInput:function(){var q=new google.maps.Geocoder();var p=j.select(".map-search-wrapper input").val();q.geocode({address:p},function(t,r){if(r==google.maps.GeocoderStatus.OK){c=true;d=new google.maps.LatLng(t[0].geometry.location.lat(),t[0].geometry.location.lng());b.fitBounds(t[0].geometry.viewport)}else{var u="We could not find that location.";l.insertZoomMsgContainer(u)}l.hideThrobber()})},requestNumberOfAjaxCalls:function(){l.showThrobber();l.removeAllMarkers();l.hideZoomMsgOverlay();var p={map:b};j.publish({type:"requestWifiAjaxPages",data:p})},totalResponseWifiMarkers:function(q){if(q){var p=q.response;l.placeAllMarkersOnMap(p)}},setCurrentLocation:function(){var q=m+"current-location.png";if(c){var p=new google.maps.Marker({position:d,map:b,icon:q});o.push(p)}},placeAllMarkersOnMap:function(q){o=[];j.select(q).each(function(t,u){var r=new google.maps.Marker({position:new google.maps.LatLng(u.lat,u.lng),map:b,icon:m+u.type+".png"});l.getInfoWindowContent(r,u.id);o.push(r)});var p=[{url:m+"cluster.png",height:56,width:50,anchor:[32,0],textColor:"#ffffff",textSize:11}];if(b.getZoom()<18){h=new MarkerClusterer(b,o,{styles:p})}l.hideThrobber();l.setCurrentLocation()},removeAllMarkers:function(){for(var p=0;p<o.length;p++){o[p].setMap(null)}if(h){h.clearMarkers()}},showThrobber:function(){j.select(n).addClass("loading")},hideThrobber:function(){j.select(n).removeClass("loading")},showZoomMsgOverlay:function(){l.hideThrobber();l.insertZoomMsgContainer(e);j.select(".zoom-too-high").removeClass("hide")},hideZoomMsgOverlay:function(){j.select(".zoom-too-high").addClass("hide")},insertZoomMsgContainer:function(q){console.log("insert error msg...");var p=j.select(n).find(".zoom-too-high")[0];if(!p){j.select(n).append('<div class="zoom-too-high"><p>'+q+"</p></div>")}else{j.select(n).find(".zoom-too-high p").html(q)}},getInfoWindowContent:function(p,q){google.maps.event.addListener(p,"click",function(){if(q){var t=markerInfoURL+"?id="+q;_curentMarker=p;var r={id:"infowindow_response",container:n,url:t,type:"GET",dataType:"json",timeout:"3000",cache:false};j.publish({type:"Ajax",data:r})}})},responseInfoWindowCall:function(t){var r=t.responseJSON;var z=r.info.hotspotName;if(z.length>0){z="<h2>"+z+"</h2>"}var u=r.info.businessName;if(u.length>0){u="<strong>"+u+"</strong><br/>"}var p=r.info.street;if(p.length>0){p+="<br/>"}var v=r.info.city+", "+r.info.state+" "+r.info.zip;var q=r.info.type;if(q.length>0){q="<p><strong>Network: </strong>"+q+"</p>"}var y=z+"<p>"+u+p+v+"</p>"+q;var w=p+" "+v;w=w.replace(/<\/?[^>]+(>|$)/g," ");f.setContent('<div class="map-info-panel">'+y+"<a href='http://maps.google.com?saddr=Current Location&daddr= "+encodeURI(w)+"' target='_blank'>Get Directions</a></div>");f.open(b,_curentMarker)},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.ActiveButtonWelcome",function(e){var d;var b;var c;return{init:function(){d=this},execute:function(){d=this;console.log("EXEC ActiveButtonWelcome.js");e.select("body").on("click",".customer-option a div",function(h){b=e.select(this);c=b.parents(".toggle-container");var g=e.select(".active",c);for(var f=0;f<g.length;f++){e.select(g[f]).removeClass("active")}b.addClass("active")});e.select("body").on("click",".welcome-error-viewupgrade",function(g){e.select(".welcome-view-upgrade a div").trigger("click");var f=e.select(".upgrade-service-header");e.publish({type:"openAccordion",data:{trigger:f}})})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.AutoScroll",function(e){var b;var d;var c=e.select(".autoscroll-placeholder");return{init:function(){console.log("INIT AutoScroll.js");d=this},execute:function(){console.log("EXEC AutoScroll.js");d=this;if(c.length>0){e.select("html, body").animate({scrollTop:e.select(".autoscroll-placeholder").offset().top},1000)}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.BYOBRadioButton",function(d){var b=".group-chooser-byob";var c;return{init:function(){console.log("INIT BYOBRadioButton.js")},execute:function(){console.log("EXEC BYOBRadioButton.js");c=this;d.select("body").on("content-loaded init-group-choose-block",b,function(e){var f=d.select(this).find('input[type="radio"]');d.select(f).each(function(g,h){if(d.select(h).attr("checked")=="checked"){c.handleRadioBtnSelection(d.select(h).parent()[0])}});d.select(f).focus(function(h){var g=d.select(this).parent();d.select(g).addClass("focused-choice")});d.select(f).blur(function(h){var g=d.select(this).parent();if(d.select(g).hasClass("focused-choice")){d.select(g).removeClass("focused-choice")}if(d.select(g).hasClass("active-choice")){d.select(g).removeClass("focused-choice")}});d.select(f).change(function(h){var g=d.select(this).parent();if(d.select(g).hasClass("active-choice")){d.select(g).removeClass("focused-choice")}})});if(d.select(b).length>0){d.select(b).trigger("init-group-choose-block")}d.select("body").on("click",".group-choice",function(e){c.handleRadioBtnSelection(this)})},handleRadioBtnSelection:function(e){var f=d.select(e).closest(".group-chooser-byob");var g=d.select(f).find(".group-choice");d.select(g).each(function(l,n){var o=d.select(n).hasClass("active-choice");if(o){d.select(n).removeClass("active-choice");var m=d.select(n).find("input").attr("checked");if(m="checked"){d.select(n).find("input").removeAttr("checked")}}else{if(n==e){d.select(n).addClass("active-choice");var j=d.select(n).find('input[type="radio"]')[0];d.select(j).prop("checked","checked");d.select(j).attr("checked","checked")}else{d.select(n).removeClass("active-choice");var h=d.select(n).find('input[type="radio"]')[0];d.select(h).removeAttr("checked")}}});c.addInputFieldValidation(f)},addInputFieldValidation:function(f){var e=d.select(f).find(".group-choice .choice-value");d.select(e).each(function(h,j){if(d.select(j).is("input")){var g=d.select(j).closest(".group-choice").find('input[type="radio"]');if(d.select(g).attr("checked")=="checked"){d.select(j).addClass("required").removeClass("ignore-validation")}else{d.select(j).removeClass("required").addClass("ignore-validation")}}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.ChannelLineupEcomm",function(g){var c=g.select(".channel-lineup-ecomm");var b;var f;var e={container:g.select(".response",c),url:c.attr("data-ajax-source"),type:"GET",dataType:"text",timeout:"30000",cache:false,throbber:{type:"showThrobber",data:{nodes:".loading-wrapper"}}};var d={};return{init:function(){},execute:function(){console.log("EXEC ChannelLineupEcomm.js");f=this;if(c.length==0){return}g.select("body").on("content-loaded",".channel-lineup-ecomm",function(h){if(c.length==0){return}});g.publish({type:"Ajax",data:e});g.select("body").on("submit",".channel-lineup-ecomm form",function(h){g.preventDefault(h);g.publish({type:"Ajax",data:a.extendObj(e,{url:this.action,data:g.select(this).serialize(),container:g.select(this).parents(".response")})})});g.select("body").on("change",".channel-lineup-ecomm .select-wrapper select",function(h){g.select("[type='submit']",g.select(this).parents("form")).click()})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.CheckOut",function(d){var c;var b=d.select(".checkout-page");return{init:function(){console.log("INIT CheckOut.js");c=this;d.subscribe({autoFillActionComplete:c.handleCreditCheckButton,HashChange:c.onHashChange,PseudoFormState:c.pseudoFormValidation})},execute:function(){console.log("EXEC CheckOut.js");c=this;if(b.length==0){return}d.select("body").on("click",".show-pin",function(j){var h=document.querySelectorAll(".cox-pin")[0];var l=d.select(".show-pin");if(h.value.length>0){if(h.type=="password"){h.type="text";l.text("Hide Pin")}else{h.type="password";l.text("Show Pin")}}});d.select("body").on("click",".show-answer",function(j){var h=document.querySelectorAll(".secret-answer")[0];var l=d.select(".show-answer");if(h.value.length>0){if(h.type=="password"){h.type="text";l.text("Hide Answer")}else{h.type="password";l.text("Show Answer")}}});d.select("body").on("click",".show-ssn-link",function(j){d.preventDefault(j);var h=document.querySelectorAll(".ssn-input")[0];var l=d.select(".show-ssn-link");if(h.value.length>0){if(h.type=="password"){h.type="text";l.text("Hide SSN")}else{h.type="password";l.text("Show SSN")}}});d.select("body").on("click",".scc-yes",function(j){d.select(".credit-check-address").hide();var h=d.select(".ssn-input").val().length;c.removErrorSSN();if(h==11){d.select(".credit-submit-button").removeClass("button-disabled-checkout")}});d.select("body").on("click",".scc-no",function(j){d.select(".credit-check-address").show();var l=d.select(".scc-street").val().length;var h=d.select(".ssn-input").val().length;c.removErrorSSN();if(l>0&&h==11){d.select(".credit-submit-button").removeClass("button-disabled-checkout")}else{d.select(".credit-submit-button").addClass("button-disabled-checkout")}});d.select("body").on("blur",".ssn-input",function(h){if(d.select(".ssn-input").val().length<11){d.select(".make-payment-form").validate().showErrors({"ssn-input":"Please enter 9 digits of your SSN"})}});d.select("body").on("focus",".ssn-input",function(h){c.removErrorSSN()});d.select(".day-ri-input, .month-ri-input, .year-ri-input").change(function(){c.secureCreditCheckSubmit()});d.select("body").on("keyup",".scc-street, .scc-city, .scc-zip, .scc-state, .ssn-input",function(){c.secureCreditCheckSubmit()});d.select("body").on("keyup",".cox-pin",function(){var j=new RegExp("^(0123|1234|2345|3456|4567|5678|6789|3210|4321|5432|6543|7654|8765|9876|0000|1111|2222|3333|4444|5555|6666|7777|8888|9999)$");var h=j.test(d.select(".cox-pin").val());if((d.select(".cox-pin").val().length==4)&&(h)){d.select(".make-payment-form").validate().showErrors({"cox-pin":"Sequential and same number not allowed"});d.select(".profile-continue-button").removeClass("accordion-next")}else{d.select("#cox-pin-error").remove();d.select("label[for='cox-pin']").removeClass("errorMsg");d.select(".profile-continue-button").addClass("accordion-next");d.select(".cox-pin").removeClass("error")}});d.select("body").on("click",".final-checkout-button, .term-continue-button, .scc-continue-button, .payment-continue-button, .credit-submit-button",function(h){if(this.className.indexOf("button-disabled-checkout")>0){h.preventDefault();h.stopImmediatePropagation();return false}});d.select("body").on("click",".final-checkout-button",function(j){var h=d.select(".final-checkout-button");h.not(this).addClass("button-disabled-checkout")});d.select("body").on("click",".directory-name-checkbox",function(h){if(d.select(this).is(":checked")){d.select(".directory-name").removeClass("required error");d.select("label[for='directory-name']").removeClass("errorMsg");d.select(".directory-name").parent().find(".error-wrapper").remove();d.select(".directory-name-parent").hide()}else{d.select(".directory-name-parent").show();d.select(".directory-name").addClass("required")}});d.select(".profile-continue-button").click(function(){d.select(".last-name-profile").val(d.select(".last-name").val());d.select(".first-name-profile").val(d.select(".first-name").val());d.select(".phone-number-profile").val(d.select(".phone-number").val());d.select(".email-from-profile").val(d.select(".email-profile").val())});if(!jQuery.support.leadingWhitespace){var e=d.select("select.secret-question-select");e.data("origWidth",e.outerWidth());e.mouseenter(function(){d.select(this).css("width","auto")}).bind("blur change",function(){e=d.select(this);e.css("width",e.data("origWidth"))})}if(window.location.hash){var g=window.location.hash.slice(1);var f=document.referrer;if(f.length>0){d.publish({type:"HashChange",data:{route:g}})}}},pseudoFormValidation:function(j){if(b.length==0){return}var f=document.querySelectorAll(".card-number-append").length;var g=document.querySelectorAll(".secure-credit-check").length;var e=d.select(".final-checkout-button");var h=true;d.select(".terms-and-condition .check-boxes").each(function(l,m){if(!d.select(m).hasClass("active-check")){h=false}});if((j.valid)&&(h)){if((f=="0")&&(g=="0")){e.removeClass("button-disabled-checkout")}else{d.select(".term-continue-button").removeClass("button-disabled-checkout")}}},handleCreditCheckButton:function(){c.secureCreditCheckSubmit();if(b.length==0){return}var h=d.select(".term-continue-button").hasClass("button-disabled-checkout");var e=d.select(".final-checkout-button");var g=document.querySelectorAll(".secure-credit-check").length;var f=d.select(".scc-continue-button").hasClass("button-disabled-checkout");if(g!="0"){var f=d.select(".scc-continue-button").hasClass("button-disabled-checkout");if(!f&&!h){e.removeClass("button-disabled-checkout")}else{e.addClass("button-disabled-checkout")}}else{if(!h){e.removeClass("button-disabled-checkout")}else{e.addClass("button-disabled-checkout")}}},secureCreditCheckSubmit:function(){var m=document.querySelectorAll(".credit-check-address").length;var l=document.querySelectorAll(".rhode-island-dob").length;if(m!="0"){var e=d.select(".scc-street").val().length;var t=d.select(".credit-check-address").css("display");var r=d.select(".scc-city").val().length;var j=d.select(".scc-state").val().length;var v=isNaN(parseInt(d.select(".scc-zip").val()));var o=d.select(".scc-zip").val().length;var u=isNaN(parseInt(d.select(".ssn-input").val()));var f=d.select(".ssn-input").val().length;if(l!="0"){var q=d.select(".day-ri-input").val();var n=d.select(".month-ri-input").val();var p=d.select(".year-ri-input").val();var h=new Date(p,n,q);h.setFullYear(h.getFullYear()+18);var g=new Date();if(h<g){if((t=="block"||t=="inline-block")&&((e==0)||(r==0)||(j==0)||(v)||(o==0)||(f<11)||(u))){d.select(".credit-submit-button").addClass("button-disabled-checkout")}else{if((t=="none")&&((f<11)||(u))){d.select(".credit-submit-button").addClass("button-disabled-checkout")}else{d.select(".credit-submit-button").removeClass("button-disabled-checkout")}}}else{d.select(".credit-submit-button").addClass("button-disabled-checkout")}}else{if((t=="block"||t=="inline-block")&&((e==0)||(r==0)||(j==0)||(v)||(o==0)||(f<11)||(u))){d.select(".credit-submit-button").addClass("button-disabled-checkout")}else{if((t=="none")&&((f<11)||(u))){d.select(".credit-submit-button").addClass("button-disabled-checkout")}else{d.select(".credit-submit-button").removeClass("button-disabled-checkout")}}}}},removErrorSSN:function(){d.select("#ssn-input-error").remove();d.select(".secure-credit-check-font").removeClass("errorMsg");d.select(".ssn-input").removeClass("error")},onHashChange:function(e){var f=e.route,g;if(f.indexOf("checkout")>-1){g=f.match(/\/(.*?)$/)[1];c.accordionOpen(g)}},accordionOpen:function(f){var e=d.select("#"+f).closest(".accordion");d.select(".accordion-trigger",e).removeClass("accordion-trigger-open");d.select(".accordion-panel",e).removeClass("accordion-panel-open");d.select("#"+f).addClass("accordion-panel-open");d.select("#"+f).prev().addClass("accordion-trigger-open")},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.CheckoutPayment",function(f){var b;var e;var d=f.select(".payment-mode");var c=".payment-mode";return{init:function(){e=this;f.subscribe({autoFillActionComplete:e.handleStatePaymentButton})},execute:function(){console.log("EXEC CheckoutPayment.js");e=this;f.select("body").on("click",".cp-yes",function(j){var h=document.querySelectorAll(".card-number-append").length;var l=f.select(".term-continue-button").hasClass("button-disabled-checkout");var g=f.select(".final-checkout-button");f.select(".payment-address").hide();f.select(".final-checkout-button").removeClass("button-disabled-checkout");if(h=="0"){if(l){g.addClass("button-disabled-checkout")}else{g.removeClass("button-disabled-checkout")}}else{e.handleStatePaymentButton()}});f.select("body").on("click",".cp-no",function(h){f.preventDefault(h);f.select(".payment-address").show();f.select(".payment-address input").val("");var g=f.select(".cp-street").val().length;if(g>0){f.select(".final-checkout-button").removeClass("button-disabled-checkout")}else{f.select(".final-checkout-button").addClass("button-disabled-checkout")}});f.select("body").on("keyup",".credit-card-name, .txtCCNum-payment, .cp-street, .cp-city, .cp-zip, .cp-state",function(){var j=document.querySelectorAll(".card-number-append").length;if(j!="0"){var g=f.select(".txtCCNum-payment");var m=isNaN(parseInt(g.val()));var h=g.val().charAt(0);var l=g.val()}e.handleStatePaymentButton()});f.select("body").on("focus",".txtCCNum-payment",function(g){f.select("#txtCCNum-payment-error").remove();f.select("#txtCCNum-payment_card-number-error").remove();f.select("label[for='card-number']").removeClass("errorMsg");f.select(".txtCCNum-payment").removeClass("error")});f.select("body").on("keypress",".credit-card-name",function(h){var g=h.which;if((g>47&&g<58)&&(g!=32)){h.preventDefault()}});f.select("body").on("keypress",".txtCCNum-payment",function(h){var g=h.which;return !(g!=8&&g!=0&&(g<48||g>57)&&g!=46)});f.select("body").on("change",".cp-month, .cp-year",function(){e.handleStatePaymentButton()})},handleStatePaymentButton:function(){if(d.length==0){return}var t=document.querySelectorAll(".secure-credit-check").length;var u=document.querySelectorAll(".card-number-append").length;if(u!="0"){var y=f.select(".payment-address").css("display");var m=f.select(".cp-street").val().length;var p=f.select(".cp-city").val().length;var o=isNaN(parseInt(f.select(".cp-zip").val()));var A=f.select(".cp-state").val().length;var h=f.select(".txtCCNum-payment").val();var l=h.charAt(0);var w=f.select(".final-checkout-button");var v=f.select(".credit-card-name").val().length;var z=isNaN(parseInt(h));var r=document.querySelectorAll(".cp-month")[0].selectedIndex;var n=document.querySelectorAll(".cp-year")[0].selectedIndex;var q=f.select(".term-continue-button").hasClass("button-disabled-checkout");f.select(f.select(".txtCCNum-payment")).attr("data-field-value",f.select(f.select(".txtCCNum-payment")).val().replace(/[^\/\d]/g,""));var g=f.publish({type:"validateCard",data:f.select(".txtCCNum-payment")});if(t=="0"){if((v>0)&&(!z)&&(r>0)&&(n>0)&&(!q)){w.removeClass("button-disabled-checkout");if((y=="block")&&((m==0)||(p==0)||(o)||(A==0))){w.addClass("button-disabled-checkout")}else{if(!g){w.addClass("button-disabled-checkout")}else{w.removeClass("button-disabled-checkout")}}}else{w.addClass("button-disabled-checkout")}}else{var j=f.select(".scc-continue-button").hasClass("button-disabled-checkout");if((v>0)&&(!z)&&(r>0)&&(n>0)&&(!q)&&(!j)){w.removeClass("button-disabled-checkout");if((y=="block")&&((m==0)||(p==0)||(o)||(A==0))){w.addClass("button-disabled-checkout")}else{if(!g){w.addClass("button-disabled-checkout")}else{w.removeClass("button-disabled-checkout")}}}else{w.addClass("button-disabled-checkout")}}}else{var w=f.select(".final-checkout-button");var q=f.select(".term-continue-button").hasClass("button-disabled-checkout");if(t=="0"){if(!q){w.removeClass("button-disabled-checkout")}else{w.addClass("button-disabled-checkout")}}else{var j=f.select(".scc-continue-button").hasClass("button-disabled-checkout");if(!q&&!j){w.removeClass("button-disabled-checkout")}else{w.addClass("button-disabled-checkout")}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.ChooseFeatures",function(g){var b;var e;var d=g.select(".choose-your-feature");var c=".choose-your-feature";var f="";return{init:function(){e=this;g.subscribe({PriceData:e.updatePriceValue,MultiAjaxComplete:e.multiAjaxComplete,HashChange:e.onHashChange})},execute:function(){console.log("EXEC ChooseFeatures.js");e=this;if(d.length===0){return}g.select(window).scroll(e.bannerHandler);g.select("body").on("click",".installation .feature-section .group-choice",function(l){b=g.select(this)[0];var m=g.select(".installation");if(g.select(b).hasClass("professional-install")){g.select(b).addClass("selected")}else{g.select(b).siblings().closest(".professional-install").removeClass("selected")}if(g.select(".professional-install.selected").length>0){g.select(".installation-date",m).css("display","block")}else{g.select(".installation-date",m).css("display","none");g.select(".installation-time",m).css("display","none")}});g.select("body").on("click",".feature-checkbox",function(l){g.preventDefault(l);b=g.select(this)[0];g.select(b).toggleClass("selected");if(g.select(b).children(".offer-badge")[0]!=undefined){g.select(".offer-badge",b).toggleClass("selected")}});g.select("body").on("change",".install-ship-address .street-ship-address",function(m){var l=g.select(this).val();if(l.length>0&&l!=undefined){g.select(".install-ship-button").removeClass("button-disabled-checkout");g.select(".install-ship-button").removeAttr("disabled")}else{g.select(".install-ship-button").addClass("button-disabled-checkout");g.select(".install-ship-button").attr("disabled","disabled")}});g.select("body").on("click",".ship-service-address",function(l){if(g.select(this).attr("data-show-div")){if(g.select(".street-ship-address").val()==""){g.select(".install-ship-button").addClass("button-disabled-checkout");g.select(".install-ship-button").attr("disabled","disabled")}else{g.select(".install-ship-button").removeClass("button-disabled-checkout");g.select(".install-ship-button").removeAttr("disabled")}}else{g.select(".install-ship-button").removeClass("button-disabled-checkout");g.select(".install-ship-button").removeAttr("disabled")}});g.select("body").on("click",".save-cart-trigger",function(l){f=g.select(".accordion-panel-open").attr("id")});g.select("body").on("click","#ecomm-save-cart",function(l){$(this).closest("form").submit(function(m){if(f.length>0){$(this).attr("action",$(this).attr("action")+"cyf/"+f);f=""}})});e.registerMutationObservers();if(window.location.hash){var j=window.location.hash.slice(1);var h=document.referrer;if(h.length>0){g.publish({type:"HashChange",data:{route:j}})}}},multiAjaxComplete:function(l){var h=l.trigger;var j=g.select(l.trigger).data("multiAjaxTarget");if(j.indexOf("tv-equipment-content-container")>-1){if(!g.select(".continue-btn a",".tv-equipment-panel").hasClass("accordion-next")){g.select(".continue-btn a",".tv-equipment-panel").addClass("accordion-next").removeClass("button-disabled")}}if(j.indexOf("installation-date")>-1){if(g.select(".professional-install.selected").length>0){g.select(".installation-date").css("display","block")}g.publish({type:"DatePickerEcomm",data:{trigger:g.select(".ecomm-date-picker",g.select(".installation"))}})}var m=g.select(".date-picker-dates ul li.selected");if(g.select(m).length>=1&&(j.indexOf("installation-time")>-1||j.indexOf("update-installation-option")>-1)){if(g.select(l.trigger).hasClass("self-ship-install")||g.select(l.trigger).hasClass("self-pickup-install")){g.select(".installation-time").css("display","none")}else{g.select(".installation-time").css("display","block")}}else{g.select(".installation-time").css("display","none")}},onHashChange:function(h){var j=h.route,l;if(j.indexOf("cyf")>-1){l=j.match(/\/(.*?)$/)[1];e.accordionOpen(l)}},accordionOpen:function(j){var h=g.select("#"+j).closest(".accordion");g.select(".accordion-trigger",h).siblings().each(function(){if(g.select(this).attr("id")==j){return false}else{g.select(this).removeClass("accordion-trigger-open").removeClass("accordion-trigger-disabled").removeClass("accordion-panel-open").removeClass("accordion-panel-disabled")}});g.select("#"+j).addClass("accordion-panel-open").removeClass("accordion-panel-disabled");g.select("#"+j).prev().addClass("accordion-trigger-open").removeClass("accordion-trigger-disabled")},registerMutationObservers:function(){if(window.MutationObserver){var l=document.querySelector(".installation");var j=new MutationObserver(function(m){if(g.select(".installation").is(":visible")){console.log("Installation section observer");g.publish({type:"DatePickerEcomm",data:{trigger:g.select(".ecomm-date-picker")}});j.disconnect()}});j.observe(l,{attributes:true})}else{var h=window.setInterval(function(){if(g.select(".installation").is(":visible")){g.publish({type:"DatePickerEcomm",data:{trigger:g.select(".ecomm-date-picker")}});clearInterval(h)}},50)}},bannerHandler:function(){if(g.select(".promo-banner").length>0){if(g.select(window).scrollTop()>g.select(".promo-banner").offset().top){g.select(".promo-banner").addClass("sticky")}else{if(g.select(window).scrollTop()<=g.select("#promo-banner-wrapper").offset().top){g.select(".promo-banner").removeClass("sticky")}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.ConfirmationScreenCapture",function(d){var c;var b=d.select(".confirmation-content");return{init:function(){c=this},execute:function(){if(b.length==0){return}d.select("body").on("content-loaded",".confirmation-content",function(f){var e=document.querySelector(".confirmation-content").innerHTML;d.publish({type:"Ajax",data:{url:d.select(".confirmation-content").attr("data-ajax-source"),type:"POST",dataType:"text",data:"screenContent="+encodeURIComponent(e),timeout:"30000",cache:false}})})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.DatePickerEcomm",function(g){var f;var c=".ecomm-date-picker";var h={highlightWeekends:false,visibleDaysDesktop:6,visibleDaysMobile:3,animationSpeed:1000,isAnimating:false,firstDate:{},lastDate:{},mobileLastDate:{}};var b;var d;var e=g.select(".psc-type").length===0?false:true;return{init:function(){f=this;g.subscribe({DatePickerEcomm:f.createDatePicker,Orientation:f.orientationChange})},execute:function(){console.log("EXEC DatePickerEcomm.js");f=this;g.select("body").on("ecomm-date-picker",c,function(j){b=g.select(this);g.publish({type:"DatePickerEcomm",data:{trigger:b,data:f}})});g.select("body").on("click",c+" ul li",function(l){if(!g.select(this).hasClass("disabled")){f.clearSelection();var j=g.select(this)[0];g.select(j).addClass("selected");g.publish({type:"ecommDatePickerDateSelected",data:{day:j}})}});if(g.select(c).length>0){g.select(c).trigger("ecomm-date-picker")}},createDatePicker:function(G){if(g.select(".installation").is(":visible")&&g.select(".date-picker-month-flash").length>0){var v;v=G.trigger;var n=0;var m=0;var l=g.select(".date-picker-dates ul",v);var E=g.select(c+" .date-picker-dates ul li");var t=parseInt(E.outerWidth());var r=parseInt(E.outerHeight());var A=parseInt(E.css("marginLeft"));var p=parseInt(E.css("marginRight"));var o=parseInt(E.css("marginTop"));var q=parseInt(E.css("marginBottom"));var D=t+A+p;var w=r+o+q;d=g.select(".date-picker-dates ul",v).children();h.firstDate=g.select(d[0]);h.lastDate=g.select(d[5]);h.mobileLastDate=g.select(d[2]);var C=g.select(".date-picker-month-flash p:nth-child(1)");var F=g.select(".date-picker-month-flash p:nth-child(2)");var y=g.select(".left").offset();var B=g.select(".right").offset();var u;g.select(".date-picker-month-flash p:nth-child(1)").html(g.select(d[0]).data("month"));var z=g.select(d[0]).data("month");var j=g.select(d[5]).data("month");C.html(z);u=z;if(z==j){F.html("")}else{F.html(j)}g.select(".date-picker-month-flash p:first-child").css("left",g.select(".left").position().left+g.select(".left").width()+10);if((window.innerWidth<768||window.innerHeight>window.innerWidth)&&!e){g.select(".date-picker-month-flash p:last-child").css("left",g.select(".right").position().left-10-h.mobileLastDate.width())}else{g.select(".date-picker-month-flash p:last-child").css("left",g.select(".right").position().left-10-h.lastDate.width())}g.select(".right",v).on("click",function(H){if(!h.isAnimating){h.isAnimating=true;if((window.innerWidth<768||window.innerHeight>window.innerWidth)&&!e){n=l.scrollLeft()+(h.visibleDaysMobile*D)}else{n=l.scrollLeft()+(h.visibleDaysDesktop*D)}l.animate({scrollLeft:n},h.animationSpeed,function(){h.isAnimating=false})}});g.select(".left",v).on("click",function(H){if(!h.isAnimating){h.isAnimating=true;if((window.innerWidth<768||window.innerHeight>window.innerWidth)&&!e){m=-(l.scrollLeft())+(h.visibleDaysMobile*D)}else{m=-(l.scrollLeft())+(h.visibleDaysDesktop*D)}l.animate({scrollLeft:-m},h.animationSpeed,function(){h.isAnimating=false})}});g.select(".date-picker-dates ul").scroll(f.debounce(function(){y=g.select(".left").offset();B=g.select(".right").offset();var I=f.getMonthLeft(y);var H=f.getMonthRight(B);if(u!=I){C.html(I);u=I}if(I==H){F.fadeOut(800,function(){F.html("")})}else{F.hide().html(H).fadeIn(800)}},250,false))}},clearSelection:function(){var j=g.select(c+" ul li");j.removeClass("selected")},getMonthLeft:function(l){var j=document.elementFromPoint((l.left+30),(l.top-g.select(window).scrollTop()));return g.select(j).data("month")},getMonthRight:function(l){var j=document.elementFromPoint((l.left-30),(l.top-g.select(window).scrollTop()));return g.select(j).data("month")},debounce:function(n,l,j){var o;return function m(){var r=this,q=arguments;function p(){if(!j){n.apply(r,q)}o=null}if(o){clearTimeout(o)}else{if(j){n.apply(r,q)}}o=setTimeout(p,l)}},orientationChange:function(){if(g.select(".date-picker-month-flash").length>0){setTimeout(function(){g.select(".date-picker-month-flash p:first-child").css("left",g.select(".left").position().left+g.select(".left").width()+10);if(window.innerWidth<768||window.innerHeight>window.innerWidth){g.select(".date-picker-month-flash p:last-child").css("left",g.select(".right").position().left-10-h.mobileLastDate.width())}else{g.select(".date-picker-month-flash p:last-child").css("left",g.select(".right").position().left-10-h.lastDate.width())}},250)}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.EcommFeatures",function(j){var b;var g;var c=j.select(".choose-your-feature").length+j.select(".byob-page").length+j.select(".checkout-page").length+j.select(".campaign-content").length+j.select(".offer-page-content").length+j.select(".shop-page-content").length+j.select(".shopping-cart-content").length+j.select(".order-status-signin-content").length+j.select(".order-status-register-content").length+j.select(".order-status-unregister-content").length+j.select(".affiliate-login-page").length+j.select(".affiliate-logout-form").length+j.select(".get-gig-content").length+j.select(".multi-address-modal").length+j.select(".order-list-box").length+j.select(".order-message-details").length+j.select(".upgrade-page").length+j.select(".gigabit-packages").length;var h=j.select(".session-logout").length;var d=8*1000*60;var e="Error";var f="<p>It looks like something is wrong.</p> <p>Please try again.</p> <p> If the error persists please contact customer support </p>";return{init:function(){g=this;j.subscribe({MultiAjaxError:g.multiAjaxError,Orientation:g.orientationChange,radioBoxActionComplete:g.radioBoxChange,Modal:g.modalHandler})},execute:function(){g=this;j.ajaxSetup({ajaxError:function(n,o,l,m){console.log("jqxhr",o);console.log("error pop up")}});if((/iPhone|iPod|iPad|Android|BlackBerry/).test(navigator.userAgent)){g.applyTag()}else{if(window.utag_data){utag_data.responsiveDisplayType="desktop"}}if(h>0){g.startReloadInterval()}j.select("#secret-question").append('<optgroup label=""></optgroup>');if(c==0){return}g.enableTimeout();j.select(".pf-tsw-titlebar-location").hide();j.select("#agree-policy",".affiliate-login-page").on("change",function(){if(j.select(this).is(":checked")){j.select(".affiliate-login-submit-button").removeClass("button-disabled")}else{j.select(".affiliate-login-submit-button").addClass("button-disabled")}})},enableTimeout:function(){j.publish({type:"SessionTimeoutStart"})},startReloadInterval:function(){},multiAjaxError:function(l){if(l.status=="500"){location.href="something-went-wrong.cox?URL="+l.url}else{location.href="session-timeout.cox?E=AJAX&URL="+l.url}},orientationChange:function(l){if(l.orientation==="landscape"){g.applyTag()}else{g.applyTag()}},applyTag:function(){var l=window.matchMedia("all and (max-width: 766px)");if(l.matches){if(window.utag_data){utag_data.responsiveDisplayType="mobile"}}else{if(window.utag_data){utag_data.responsiveDisplayType="desktop"}}},showErrorPopup:function(){var m='<div id="pf-underlay" style="display: block;"></div><div class="pf-dialog-component session-time-out-popup" style="top:'+(j.select("body").scrollTop()+(450/2))+'px;"><div class="pf-dialog-component-head"><span title="Close" class="pf-btn-close"></span></div><div class="pf-dialog-component-title">'+e+'</div><div class="pf-dialog-component-content" style="">'+f+'<div class="pf-dialog-component-buttons"><a class="button pf-btn-close">Continue</a></div></div></div>';var l=$("#pf-underlay");if(l.length){g.removeModalDisplay()}j.select("body").append(m);j.select("#pf-underlay, .pf-btn-close").click(function(){g.hideErrorPopup()})},hideErrorPopup:function(){j.select("#pf-underlay").remove();j.select(".pf-dialog-component").remove()},radioBoxChange:function(l){var m=j.select(l.el);if(m.hasClass("service-modal-choice")){j.select(".service-modal-continue",j.select(l.el).closest("form")).parent().removeClass("button-psc-disabled")}},modalHandler:function(l){var m=j.select(l.event.currentTarget);if(!l.enabled){j.select(".service-modal-continue").parent().addClass("button-psc-disabled")}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.PriceDetailsModalEcomm",function(d){var c;var b;return{init:function(){},execute:function(){c=this;d.select("body").on("click",".price-lock-shortcut",function(e){c.deselectAll();c.closeAll();c.selectTab(".price-lock")});d.select(document).ajaxComplete(function(g,f,e){c.closeAll();c.selectActiveClass();var h=d.select(".sticky-header-ecomm");d.select(".tabs a").click(function(){b=d.select(this).closest(".tabs");c.getSelectedTab(this)});if(h.length==0){return}h.stickyTableHeaders({scrollableArea:d.select(".scrollable-area")[0]})})},getSelectedTab:function(g){var e=g;var f=b;if(d.select(e).parents().eq(1).hasClass("tabs")){$active=d.select("li.active-header > a",f);$content=d.select(($active.attr("href"))+"-data",".dialog-component");$active.parent().removeClass("active-header");$content.hide();$active=d.select(e);$content=d.select((d.select(e).attr("href"))+"-data",".dialog-component");$active.parent().addClass("active-header");$content.show()}},closeAll:function(){var e=d.select(".pricing-offer-details-content > .tab-content > .tab-data");e.hide()},deselectAll:function(){var e=d.select(".tabs > li");e.removeClass("active-header")},selectTab:function(f){var e=d.select(f+"-header",".pricing-offer-details-content");e.addClass("active-header");var g=d.select(f+"-content",".pricing-offer-details-content");g.addClass("active-content");g.show()},selectActiveClass:function(){var e=d.select(".active-header",".pricing-offer-details-content");var f=d.select(".active-content",".pricing-offer-details-content");f.show()},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.Psc",function(d){var c;var b=d.select(".psc-credit-check-form");return{init:function(){console.log("INIT PSC.js")},execute:function(){console.log("EXEC PSC.js");c=this;if(b.length===0){return}d.select("body").on("keyup",".psc-credit-check-form input",function(){if(d.select(this).hasClass("required")){}});d.select("body").on("click",".yes-no-checkbox",function(){if(d.select("input",this).is(":radio")){console.log("coxjs.select(this).val()",d.select("span",this).text());if(!d.select("input",this).is(":checked")){if(d.select("span",this).text()=="Yes"){d.select(".psc-credit-check-address").addClass("hide");c.removeRequired()}else{d.select(".psc-credit-check-address").removeClass("hide");c.addRequired()}}}});d.select("body").on("click",".show-ssn-link",function(f){d.preventDefault(f);var e=document.querySelectorAll(".ssn-input")[0];var g=d.select(".show-ssn-link");if(e.value.length>0){if(e.type=="password"){e.type="text";g.text("Hide SSN")}else{e.type="password";g.text("Show SSN")}}});d.subscribe({autoFillActionComplete:c.autoFillComplete})},autoFillComplete:function(){},enablePaymentBtn:function(){d.select(".credit-check-btn").removeClass("button-disabled-checkout")},disablePaymentBtn:function(){d.select(".credit-check-btn").addClass("button-disabled-checkout")},validateCreditForm:function(){var g=d.select("input:visible");var e=0;var f=true;$.each(g,function(h,j){if(d.select(j).hasClass("required")){e+=1;if(!d.select(j).val().length>0){f=false}}})},addRequired:function(){d.select(".scc-street").addClass("required").removeClass("ignore-validation");d.select(".scc-city").addClass("required").removeClass("ignore-validation");d.select(".scc-state").addClass("required").removeClass("ignore-validation");d.select(".scc-zip").addClass("required").removeClass("ignore-validation")},removeRequired:function(){d.select(".scc-street").removeClass("required").addClass("ignore-validation");d.select(".scc-city").removeClass("required").addClass("ignore-validation");d.select(".scc-state").removeClass("required").addClass("ignore-validation");d.select(".scc-zip").removeClass("required").addClass("ignore-validation")},debounce:function(h,f,e){var j;return function g(){var n=this,m=arguments;function l(){if(!e){h.apply(n,m)}j=null}if(j){clearTimeout(j)}else{if(e){h.apply(n,m)}}j=setTimeout(l,f)}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.PscHeartbeat",function(g){var b;var e;var d=g.select(".psc-heartbeat");var c=null;var f=1000*60*20;return{init:function(){console.log("INIT PSC.js");e=this},execute:function(){console.log("EXEC PSC.js");e=this;if(d.length===0){return}g.select(".pf-tsw-titlebar-location").hide();g.ajaxSetup({beforeSend:function(){e.resetHeartbeat()}});e.startHeartbeat()},startHeartbeat:function(){c=setInterval(function(){e.ping()},f)},stopHeartbeat:function(){clearInterval(c)},resetHeartbeat:function(){e.stopHeartbeat();e.startHeartbeat()},ping:function(){$.ajax({url:location.url,complete:function(h){}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.PscHomeOptions",function(f){var b;var e;var c=f.select(".psc-home-life-options");var d=null;return{init:function(){console.log("INIT PscHomeOptions.js");e=this},execute:function(){console.log("EXEC PscHomeOptions.js");e=this;f.select("body").on("click",".delete-promo",function(g){g.preventDefault();f.select(".reset-entered-promocode",f.select(this).closest(".psc-promo-modal")).val("true");f.select(".psc-promo-input").removeClass("required");f.select(this).closest("form").submit()});f.select("body").on("click",".psc-copy-link",function(g){g.preventDefault()});if(f.select(".accordion-panel-design-options").length>0){f.select("#pf-location-panel").removeClass("pf-overlay-active")}if(c.length===0){return}f.subscribe({radioBoxActionComplete:e.radioBoxChange,Modal:e.modalHandler});f.select(".theme-home-area li a").on("css-change",function(){f.select(this).parent().siblings().removeClass("active");f.select(this).parent().addClass("active")});f.select(".tab li a").on("click",function(){var g=f.select(this);if(g.attr("href")&&g.attr("href")!=="#"){f.select(".active-tab-name",g.closest(".accordion-panel")).val(g.attr("href").substring(1,g.attr("href").length))}});f.select(".edit-area").on("click",function(h){f.preventDefault(h);f.select(".area-name-continue").addClass("edit-btn");var g=f.select(this).closest(".accordion-trigger").next();f.select(".add-new-area",g).trigger("click");f.select(".area-name",".new-area-modal").val(f.select(".area-name-hidden",g).val());return false});f.select(".new-option-btn-continue").on("click",function(h){var g=f.select(".accordion-panel-open");f.select("input[name='option-choice-trigger']",g).val("true");f.select("input[type='submit']",g).trigger("click")});f.select(".area-name").on("keyup",function(g){var h=f.select(this).parent().siblings(".button");if(f.select(this).val().length>0){h.removeClass("button-disabled")}else{h.addClass("button-disabled")}});f.select(".add-new-area").on("click",function(g){if(!f.select(".area-name-continue").hasClass("edit-btn")){f.select(".area-name",".new-area-modal").val(f.select(".new-area-name-hidden",f.select(this).closest(".accordion-panel")).val())}});f.select(".area-name-continue").on("click",function(h){var g=f.select(this).parent().parent();var l=f.select("a[data-content-element='"+g.attr("id")+"']");var j=f.select(l).closest(".accordion-panel");if(!f.select("#area-name",g).valid()){return false}if(j.attr("id")=="accordion-panel-base-pack"){f.select(".area-name-hidden",j).val(f.select("#area-name",g).val())}if(!f.select(this).hasClass("edit-btn")){f.select(".new-area-name-hidden",j).val(f.select("#area-name",g).val());f.select("input[name='area-name-popup']",j).val("true");f.select("input[type='submit']",j).trigger("click")}else{f.select(".area-name",j).val(f.select("#area-name",g).val());f.select(".area-header-name",j.prev()).text(f.select("#area-name",g).val());f.select(".area-name-hidden",j).val(f.select("#area-name",g).val())}});f.select(".clear-room-btn").on("click",function(h){f.preventDefault(h);var g=f.select(".tab-item:visible:not(.psc-tab-item)");f.select(".sb-input",g).text("0");f.select(".sb-value",g).val(0);f.select(".option-notes",g).val("")});f.select(".psc-home-life-options form.accordion-trigger").on("click",function(h){h.preventDefault();var g=f.select(".accordion-panel-open",".psc-home-life-options");if(f.select(this).next().hasClass("accordion-home-life-base")){if(g.hasClass("accordion-home-life-base")||g.hasClass("accordion-panel-design-options")){f.select(this).submit();return false}else{f.select(".toogle-section-type",g).val(f.select(".selectedSectionId",this).val());f.select("input[type='submit']",g).trigger("click");if(f.select(this).next().hasClass("accordion-panel-open")){return false}}}if(!f.select(this).hasClass("accordion-trigger-disabled")&&!f.select(this).next().hasClass("accordion-home-life-base")){if(g.hasClass("accordion-home-life-base")||g.hasClass("accordion-panel-design-options")){f.select(this).submit();return false}f.select(".toogle-section-type",g).val(f.select(".selectedSectionId",this).val());f.select("input[type='submit']",g).trigger("click");if(f.select(this).next().hasClass("accordion-panel-open")){return false}}});f.select(".psc-home-life-options .sb-button").on("click",function(g){if(!f.select(".accordion-panel-design-options").prev().hasClass("accordion-trigger-disabled")){f.select(".accordion-panel-design-options").prev().addClass("accordion-trigger-disabled")}});f.select(".option-notes").on("keyup",function(g){if(!f.select(".accordion-panel-design-options").prev().hasClass("accordion-trigger-disabled")){f.select(".accordion-panel-design-options").prev().addClass("accordion-trigger-disabled")}})},modalHandler:function(g){var h=f.select(g.event.currentTarget);if(!g.enabled){if(h.hasClass("edit-btn")){f.select(".area-name-continue").removeClass("edit-btn")}if(h.hasClass("btn-close")){f.select(".area-name-continue").removeClass("edit-btn")}f.select(".service-modal-continue").parent().addClass("button-psc-disabled");f.select(".clear-option-id").val("");f.select(".new-option-choice").val("");f.select(".new-option-btn-continue").addClass("button-disabled")}else{if(h.hasClass("area-name-continue")){f.select(".area-name").validate()}}},radioBoxChange:function(g){var h=f.select(g.el);if(!h.hasClass("design-details-summary")&&!h.hasClass("service-modal-choice")&&!h.hasClass("new-opt-choice")){h.closest("form").submit()}if(h.hasClass("new-opt-choice")){f.select(".new-option-btn-continue").removeClass("button-disabled");f.select(".new-option-choice").val(f.select(h).children().first().val())}if(h.hasClass("design-details-summary")){f.select(".continue-btn",f.select(".design-details-summary").closest(".accordion-panel")).removeClass("disabled")}if(h.hasClass("service-modal-choice")){f.select(".service-modal-continue",f.select(g.el).closest("form")).parent().removeClass("button-psc-disabled")}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.PscProfile",function(f){var b;var e;var c=f.select(".psc-type");var d=null;return{init:function(){console.log("INIT PSC Profile.js");e=this},execute:function(){console.log("EXEC PSC Profile.js");e=this;if(c.length===0){return}e.registerMutationObservers();f.select("body").on("click",".yes-no-checkbox",function(g){if(f.select(this).hasClass("electronic-choice")){f.select(".payment-info").addClass("electronic");f.select(".msg-psc-error").hide();e.ignoreValidations("electronic")}if(f.select(this).hasClass("credit-choice")){e.ignoreValidations()}if(f.select(this).hasClass("psc-no")){f.select(".payment-address").show();e.validateSection()}if(f.select(this).hasClass("psc-yes")){f.select(".payment-address").hide();e.validateSection()}});f.select("body").on("keyup",".credit-card-name, .txtCCNum-payment, .cp-street, .cp-city, .cp-zip, .cp-state",function(){e.validateSection()});f.select("body").on("change",".cp-month, .cp-year",function(){e.validateSection()});f.select("body").on("click",".show-pin",function(h){var g=document.querySelectorAll(".cox-pin")[0];var j=f.select(".show-pin");if(g.value.length>0){if(g.type=="password"){g.type="text";j.text("Hide Pin")}else{g.type="password";j.text("Show Pin")}}});f.select("body").on("click",".show-answer",function(h){var g=document.querySelectorAll(".secret-answer")[0];var j=f.select(".show-answer");if(g.value.length>0){if(g.type=="password"){g.type="text";j.text("Hide Answer")}else{g.type="password";j.text("Show Answer")}}});f.select("body").on("keydown",".cox-pin, .secret-answer",function(g){if(f.select(this).hasClass("cox-pin")&&!f.select(".cox-pin").hasClass("required")){f.select(".cox-pin").val("").addClass("number").addClass("required");f.select(".show-pin").removeClass("mask")}if(f.select(this).hasClass("secret-answer")&&!f.select(".secret-answer").hasClass("required")){f.select(".secret-answer").val("").addClass("lettersonly").addClass("required");f.select(".show-answer").removeClass("mask")}});f.select("body").on("change",".secret-question-select",function(g){e.enableSecretAnswer()});if(f.select(".pin-mask").length>0){e.hideSecurefields()}f.subscribe({autoFillActionComplete:e.handleCreditCheckButton,MultiAjaxComplete:e.multiAjaxComplete})},validateSection:function(){if(!f.select(".payment-info").hasClass("electronic")){var g=f.select(".credit-card-name").val().length>0;var m=!f.select(".txtCCNum-payment").hasClass("error")&&e.checkCreditCardLength();var n=f.select(".cp-month").val().length>0&&f.select(".cp-month").val()!=="Month";var j=f.select(".cp-year").val().length>0&&f.select(".cp-year").val()!=="Year";var l=g&&m&&n&&j;if(f.select(".payment-address").is(":visible")){var p=f.select(".cp-street").val().length>0;var o=f.select(".cp-city").val().length>0;var h=f.select(".cp-zip").val().length>0;l=l&&p&&o&&h;if(l){f.select(".final-checkout-button").parent().removeClass("button-psc-disabled")}else{f.select(".final-checkout-button").parent().addClass("button-psc-disabled")}return l}if(l){f.select(".final-checkout-button").parent().removeClass("button-psc-disabled")}else{f.select(".final-checkout-button").parent().addClass("button-psc-disabled")}return l}},ignoreValidations:function(g){if(g){f.select(".final-checkout-button").parent().removeClass("button-psc-disabled");f.select("#card-name").addClass("ignore-validation");f.select(".txtCCNum-payment").addClass("ignore-validation")}else{f.select(".payment-info").removeClass("electronic");f.select("#card-name").removeClass("ignore-validation");f.select(".txtCCNum-payment").removeClass("ignore-validation");e.validateSection()}},checkCreditCardLength:function(){var g=f.select(".txtCCNum-payment").val();var j=g.charAt(0);var h=true;if((j=="3")&&(g.length<17)){h=false}else{if((j=="4"||j=="5"||j=="6")&&(g.length<19)){h=false}else{if(!(j=="3"||j=="4"||j=="5"||j=="6")){h=false}}}return h},handleCreditCheckButton:function(){if(c.length==0){return}e.validateSection()},multiAjaxComplete:function(j){var g=j.trigger;var h=f.select(j.trigger).data("multiAjaxTarget");var l=f.select(".date-picker-dates ul li.selected");if(h.indexOf("homelife-checkout-profile")>-1){if(f.select("#homelife-checkout-profile > div").first().hasClass("pin-mask")){e.hideSecurefields()}return}if(f.select(l).length>=1){if(f.select(j.trigger).hasClass("self-ship-install")||f.select(j.trigger).hasClass("self-pickup-install")){f.select(".installation-time").css("display","none")}else{f.select(".installation-time").css("display","block")}}else{f.select(".installation-time").css("display","none")}if(h.indexOf("final-checkout-button")>-1){if(f.select("#psc-continue-payment").hasClass("button-disabled")){if(!f.select(".psc-payment").prev().hasClass("accordion-trigger-disabled")){f.select(".psc-payment").prev().addClass("accordion-trigger-disabled")}}}},registerMutationObservers:function(){if(window.MutationObserver){var j=document.querySelector(".installation");if(!j){return}var h=new MutationObserver(function(l){if(f.select(".installation").prev().hasClass("accordion-trigger-open")&&f.select(".installation").is(":visible")){f.publish({type:"DatePickerEcomm",data:{trigger:f.select(".ecomm-date-picker")}})}});h.observe(j,{attributes:true})}else{var g=window.setInterval(function(){if(f.select(".installation").is(":visible")){f.publish({type:"DatePickerEcomm",data:{trigger:f.select(".ecomm-date-picker")}});clearInterval(g)}},50)}},hideSecurefields:function(){f.select(".cox-pin").val("****").removeClass("number").removeClass("required");f.select(".secret-answer").val("**********").removeClass("lettersonly").removeClass("required");f.select(".show-pin").addClass("mask");f.select(".show-answer").addClass("mask")},enableSecretAnswer:function(){f.select(".secret-answer").val("").addClass("lettersonly").addClass("required");f.select(".show-answer").removeClass("mask")},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.RightRail",function(h){var b;var f;var d=".right-progress-rail";var g={offTop:0,offLeft:0,footerCutOff:0,mobileOffTop:0,mobileFooterCutOff:0,mobileRightRailHeight:0,chargesAndDisc:0};var c=h.select(".choose-your-feature").length+h.select(".checkout-page").length+h.select(".byob-page").length;var e=null;return{init:function(){console.log("INIT RightRail.js")},execute:function(){console.log("EXEC RightRail.js");f=this;if(c==0){return}if(navigator.userAgent.match(/iPad/i)){h.select(".right-progress-rail").addClass("sticky-ipad")}else{if(!h.select(".byob-page").length>0&&!h.select(".checkout-page").length>0&&h.select(".right-progress-rail").length>0&&h.select(".right-progress-rail").offset().top==0){setTimeout(function(){f.initRightRail()},2000)}else{f.initRightRail()}}h.select("body").on("click",".accordion-trigger",function(j){h.select("html, body").animate({scrollTop:h.select(window).scrollTop()-1},250,function(){h.select("html, body").animate({scrollTop:h.select(window).scrollTop()+1},250)})});h.select("body").on("click",".hamburger-slider",function(l){var j=h.select(".toggle-content-div").css("height");if(j=="0px"){h.select(".toggle-content-div").animate({height:f.calculateMobileScollableAreaHeight()},1000);h.select(".hamburger-slider").removeClass("rail-scroll-img-open").addClass("rail-scroll-img-close")}else{h.select(".toggle-content-div").animate({height:0},1000);h.select(".hamburger-slider").removeClass("rail-scroll-img-close").addClass("rail-scroll-img-open")}});h.select("body").on("click",".right-rail-accordion",function(n){var m=h.select(".right-progress-rail");if(h.select(this).children().first().hasClass("open")){h.select(this).children().first().removeClass("open");if(!h.select(".byob-page").length>0&&!h.select(".feature-customize-section").height()<=391&&!h.select(".complete-order-section").height()<=295&&!navigator.userAgent.match(/iPad/i)){if((m.offset().top+h.select(window).scrollTop())<=(143+g.adBannerHeight)){m.css("position","relative")}else{if(!f.isRightRailAccOpen()&&(m.offset().top+h.select(window).scrollTop())>=(154+g.adBannerHeight)){var j=m.offset().top-(153+g.adBannerHeight);h.select(window).off("scroll",f.rightRailContentScroll);m.css("position","relative");m.css("top",j);g.chargesAndDisc=0;g.isChargesVisible=false}}if(!f.isRightRailAccOpen()){h.select(window).scroll(f.rightRailScrollHandler);g.rightRailOffTop=0;if(navigator.userAgent.match(/iPad/i)&&e){window.cancelAnimationFrame(e);e=null}}}}else{h.select(this).children().first().addClass("open");if(!h.select(".byob-page").length>0&&!h.select(".feature-customize-section").height()<=391&&!h.select(".complete-order-section").height()<=295&&!navigator.userAgent.match(/iPad/i)){var l=m.offset().top-(153+g.adBannerHeight);m.css("position","relative").css("top",l).css("marginBottom",l);h.select(window).off("scroll",f.rightRailScrollHandler);g.chargesAndDisc=l;g.isChargesVisible=true;if(navigator.userAgent.match(/iPad/i)){if(!e){f.resetFix()}}else{h.select(window).scroll(f.rightRailContentScroll)}}}if(h.select(".feature-customize-section").height()<=391&&h.select(".complete-order-section").height()<=295){m.css("position","relative").css("top","")}h.select(".toggle-right-rail",this).slideToggle(function(){if(!h.select(this).parent().children().first().hasClass("open")){m.css("marginBottom","")}})});h.select(window).resize(function(){var j=h.select(".pf-constrain-width");if(h.select(".right-progress-rail").is(":visible")){j.css("marginTop","")}});h.subscribe({MultiAjaxComplete:f.multiAjaxComplete,Orientation:f.orientationChange})},initRightRail:function(){if(h.select(".right-progress-rail").length>0){g.offTop=h.select(".right-progress-rail").offset().top;g.offLeft=h.select(".right-progress-rail").offset().left;g.adBannerHeight=h.select("#promo-ad-banner").height();if(g.adBannerHeight&&g.adBannerHeight>0){g.initOffTop=153+parseInt(g.adBannerHeight)}else{g.initOffTop=153}if(h.select(".right-rail-mobile").length>0){g.mobileOffTop=h.select(".right-rail-mobile").offset().top}g.mobileRightRailHeight=parseInt(h.select(".checkout-feature-details").css("height"))+parseInt(h.select(".rail-divider").css("height"));if(!h.select(".checkout-page").length>0&&(navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))){h.select(window).on("touchmove",f.mobileScrollHandler)}else{h.select(window).on("scroll",f.rightRailScrollHandler)}h.select(".complete-order-section").css("min-height",h.select(".right-progress-rail").outerHeight());h.select(".feature-customize-section").css("min-height",h.select(".right-progress-rail").outerHeight())}},rightRailScrollHandler:function(){var l=h.select(".right-progress-rail");var m=h.select(".pf-constrain-width");var j=h.select(".right-rail-mobile");var n;if(h.select(".feature-customize-section").height()<=391&&h.select(".complete-order-section").height()<=391){h.select(".right-progress-rail").css("position","relative").css("top","")}else{if(h.select(".mobile-only").css("display")=="none"&&!h.select(".byob-page").length>0){if(h.select(".legal-text").length>0){n=h.select(".legal-text p").offset().top}else{n=0}var o=h.select(window).scrollTop()+10+parseInt(l.outerHeight());if(h.select(window).scrollTop()>=(parseInt(g.offTop)-10)){if(o>n-10){l.css("position","relative").css("top",parseInt(g.footerCutOff)-parseInt(l.outerHeight())-parseInt(g.offTop))}else{l.css("position","fixed").css("top","10px");g.footerCutOff=o}}else{if(h.select(window).scrollTop()<(parseInt(g.offTop))){l.css("position","relative").css("top","0")}}}else{}}},mobileScrollHandler:function(){},rightRailContentScroll:function(){var j=h.select(".right-progress-rail");if(j.is(":visible")&&!(g.rightRailOffTop==g.initOffTop)){if(j.offset().top<=(153+g.adBannerHeight)){j.css("position","relative").css("top","")}else{if(j.offset().top<(h.select(window).scrollTop()+(143+g.adBannerHeight))){j.css("position","relative");j.css("top",g.chargesAndDisc)}}if(h.select(window).scrollTop()<j.offset().top&&j.offset().top>(153+g.adBannerHeight)&&j.css("position")=="relative"){j.css("position","fixed").css("top",10)}g.rightRailOffTop=Math.ceil(j.offset().top);if(g.isChargesVisible){}}},calculateMobileScollableAreaHeight:function(){var j,l=h.select(".checkout-feature-details");return h.select(window).height()-(l.outerHeight()+l.offset().top-h.select(window).scrollTop())-48},isRightRailAccOpen:function(){var j=false;h.select(".right-rail-accordion").each(function(l){if(h.select(".right-rail-toggle",this).hasClass("open")){j=true}});return j},multiAjaxComplete:function(){if(h.select(".byob-page").length>0){if(h.select(".right-rail-mobile").length>0||h.select(".right-progress-rail").length>0){if(!navigator.userAgent.match(/iPad/i)){f.initRightRail()}window.scrollBy(0,1)}}},orientationChange:function(l){var j=h.select(".pf-constrain-width");if(l.orientation==="landscape"){if(h.select(".right-progress-rail").is(":visible")){j.css("marginTop","");g={offTop:0,offLeft:0,footerCutOff:0,mobileOffTop:0,mobileFooterCutOff:0,mobileRightRailHeight:0};h.select(".right-progress-rail").css("position","relative");h.select(".right-progress-rail").css("top",0);if(!navigator.userAgent.match(/iPad/i)){f.initRightRail()}}}else{g.mobileOffTop=45}},resetFix:function(){e=window.requestAnimationFrame(f.resetFix);var j=h.select(".right-progress-rail");if(j.is(":visible")){if(j.offset().top<=153){j.css("position","relative").css("top","")}else{if(j.offset().top<(document.body.scrollTop+143)){j.css("position","relative");j.css("top",g.chargesAndDisc)}}if(document.body.scrollTop<j.offset().top&&j.offset().top>153&&j.css("position")=="relative"){j.css("position","fixed").css("top",10)}if(g.isChargesVisible){}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.ScheduleInstallation",function(d){var b;var c;return{init:function(){console.log("INIT ScheduleInstallation.js");c=this;d.subscribe({ecommDatePickerDateSelected:c.showInstallTime})},execute:function(){console.log("EXEC ScheduleInstallation.js");c=this;d.select("body").on("click",".install-date",function(f){b=d.select(this)[0];var e=d.select(".installation");var g=d.select(".install-date.selected",e);if(d.select(g).length>=1){d.select(".installation-time").css("display","block")}else{d.select(".installation-time").css("display","none")}})},showInstallTime:function(e){d.select(".installation-time").css("display","block")},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.SelectEquipmentAjax",function(c){var b;return{init:function(){},execute:function(){console.log("EXEC SelectEquipmentAjax.js");c.select("body").on("click",".select-equip",function(f){c.preventDefault(f);b=c.select(this)[0];var d=c.select(b).closest(".equipment-comparison").parent();var g=c.select(d).attr("id");var e=c.select(b).attr("data-ajax-url")});c.select("body").on("click",".equip-feature-select > a",function(f){c.preventDefault(f);b=c.select(this)[0];var d=c.select(b).closest(".equipment-comparison").parent();var g=c.select(d).attr("id");var e=c.select(b).attr("data-ajax-url")})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.SessionManager",function(j){var c;var h;var f;var b="00:29:00";var g="00:30:15";var e="Timeout Warning";var d="<p>Your session will time out soon.</p><p>If there is no additional activity, your online session will be timed out for your protection. You will be redirected to the login screen.</p><p>If you are still working in your online session, simply click continue</p>";return{init:function(){console.log("INIT SessionManager.js");h=this;j.subscribe({SessionTimeoutStart:h.startHeartbeat})},execute:function(){console.log("EXEC SessionManager.js");h=this},checkForUserInteraction:function(){j.select("#pf-underlay, .pf-btn-close").click(function(){h.removeModalDisplay();h.resetHeartbeat();h.ping()})},checkForInactivity:function(m){var l=h.convertIntervalToTimeFormat(m);if(l==b){h.notifyUserWithWarning("first")}else{if(l==g){h.stopHeartbeat();h.notifyUserWithWarning("last")}}},notifyUserWithWarning:function(l){(l=="first")?h.createModalDisplay():h.signOutUser()},createModalDisplay:function(){var m='<div id="pf-underlay" style="display: block;"></div><div class="pf-dialog-component session-time-out-popup" style="top:'+(j.select("body").scrollTop()+(450/2))+'px;"><div class="pf-dialog-component-head"><span title="Close" class="pf-btn-close"></span></div><div class="pf-dialog-component-title">'+e+'</div><div class="pf-dialog-component-content" style="">'+d+'<div class="pf-dialog-component-buttons"><a class="button pf-btn-close">Continue</a></div></div></div>';var l=$("#pf-underlay");if(l.length){h.removeModalDisplay()}j.select("body").append(m);h.checkForUserInteraction()},removeModalDisplay:function(){j.select("#pf-underlay").remove();j.select(".pf-dialog-component").remove()},resetHeartbeat:function(){h.stopHeartbeat();h.startHeartbeat()},startHeartbeat:function(){j.ajaxSetup({beforeSend:function(){h.resetHeartbeat()}});var l=0;f=setInterval(function(){l=l+1;h.checkForInactivity(l)},1000)},stopHeartbeat:function(){clearInterval(f)},signOutUser:function(){h.removeModalDisplay();location.href="session-timeout.cox"},ping:function(){$.ajax({url:location.url})},convertIntervalToTimeFormat:function(p){function m(r){return(r<10?"0":"")+r}var l=Math.floor(p/3600);p=p%3600;var n=Math.floor(p/60);p=p%60;var q=Math.floor(p);l=m(l);n=m(n);q=m(q);var o=l+":"+n+":"+q;return o},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.ShopGig",function(e){var d;var b=e.select("#gigabit-offer-container");var c={offerRows:"",offerPositions:"",floatingPrice:""};return{init:function(){console.log("INIT ShopGig.js");d=this;e.subscribe({MultiAjaxComplete:d.multiAjaxComplete})},execute:function(){console.log("EXEC ShopGig.js");d=this;if(b.length==0){return}if(e.select(".gig-desktop-check").is(":visible")){e.select(window).scroll(d.floatingPriceHandler);if(e.select(".giga-pkg-price").length>0){c.floatingPrice=e.select(".giga-pkg-price",".floating-price").offset().top;e.select(".gig-info-msg").css("left",e.select(".gig-info-msg").position().left)}e.select("html,body").animate({scrollTop:150},1000)}var m=e.select("#gigabit-offer-container");var n=e.select(".shop-gig-header");n.on("click",".tab-gig a",function g(q){var r=e.select(this);var u=r.attr("href");var t=r.siblings(".active-header");t.removeClass("active-header");r.addClass("active-header");e.select(u+"-data").addClass("active-content");e.select(t.attr("href")+"-data").removeClass("active-content")});m.on("click",".gig-toggle-header",function f(q){e.preventDefault(q);d.togglePickYourGig(m)});m.on("click",".gig-temp-animate",function(q){d.togglePickYourGig(m)});m.on("click",".gig-temp-collapse",function(q){d.togglePickYourGig(m)});m.on("click",".toggle-single-click",function j(t){var r=e.select(this).closest(".gig-offer-row");if(!r.hasClass("current-sel-row")){var q=e.select(".toggle-single-click.expand-view").not(this).closest(".gig-offer-row");if(q.length>0){e.select(".cox-offers-info",q).slideToggle();e.select(".toggle-single-click",q).addClass("collapse-view").removeClass("expand-view")}e.select(".cox-offers-info",r).slideToggle();if(e.select(".toggle-single-click").hasClass("expand-view")){e.select(".gig-offer-row").not(e.select(this).closest(".gig-offer-row")).animate({opacity:1},500)}else{e.select(".gig-offer-row").css("opacity",1);e.select(".gig-offer-row").not(e.select(this).closest(".gig-offer-row")).animate({opacity:0.2},500)}}else{e.select(".gig-offer-row").css("opacity",1);d.learnMoreAltToggle(this,r)}});m.on("click",".gig-order-now",function p(t){e.preventDefault(t);e.select(".gig-offer-row").css("opacity",1);var r=e.select(this).closest(".gig-offer-row"),q=e.select(r).index();console.log("animate elements above row");r.addClass("current-sel-row")});m.on("click",".gig-mobile-order-now",function h(r){e.preventDefault(r);e.select(".gig-offer-row").css("opacity",1);var q=e.select(this).closest(".gig-offer-row")});e.select(".change-address.desktop-only").on("click",function o(q){e.preventDefault(q);e.select(".gig-hero .hero-tab").css("right",-(e.select(".gig-hero").width()));e.select(".gig-login-col").css({display:"inline-block",opacity:0});e.select(".gig-info-msg").animate({left:e.select(".gig-hero").width(),opacity:0.1},1500);e.select(".gig-login-col").animate({opacity:1},1500);e.select(".gig-hero .hero-tab").css({display:"inline-block"}).animate({right:0},1500)});e.select(".change-address.mobile-only").on("click",function l(q){e.preventDefault(q);e.select(".gig-info-msg").hide();e.select(".gig-login-col").show()})},togglePickYourGig:function(j){var h=e.select(".gig-toggle-header",j),g=e.select(".floating-price-mobile");e.select(".gig-offer-row").css("opacity",1);if(!h.hasClass("gig-header-open")){h.addClass("gig-header-open");if(g.is(":visible")){e.select(".accordion-header",".gig-toggle-header").html("Pick Your One Gig Package");e.select(".gig-cyp-header").addClass("accordion-trigger-disabled").removeClass("accordion-trigger-open");e.select(".gig-cyp-panel").removeClass("accordion-panel-open");e.select(".contact-info-section").prev().addClass("accordion-trigger-disabled").removeClass("accordion-trigger-open");e.select(".contact-info-section").removeClass("accordion-panel-open");e.select(".floating-price-mobile").slideToggle(500,function f(){e.select("html, body").animate({scrollTop:e.select(".gig-toggle-header").offset().top})})}}else{h.removeClass("gig-header-open")}if(!h.hasClass("prevent-close")){e.select(".gig-toggle-content").slideToggle(500)}else{e.select(".accordion-header",".gig-toggle-header").html("Pick Your One Gig Package");d.reverseAnimation()}},toggleIconChange:function(g){var f=e.select(".gig-toggle-header",g);if(!f.hasClass("gig-header-open")){f.addClass("gig-header-open")}else{f.removeClass("gig-header-open")}},hideGigOffersBelow:function(h){var l=e.select(".gig-offer-row");var g=0;for(var j=h,f=l.length;j<f;j++){e.select(".gig-offer-row:eq("+parseInt(j)+")").css("display","none")}},orderNowAnimation:function(n,j,m){var q,f=0,h,g=0,l=0,o=e.select(".gigabit-panel-anim");e.select(".cox-offers-info").not(e.select(".cox-offers-info",n)).css("display","none");e.select(".toggle-single-click").not(e.select(".toggle-single-click",n)).addClass("collapse-view").removeClass("expand-view");l=o.outerHeight();if(j>0){q=e.select(".gig-offer-row:eq("+parseInt(j-1)+")")}else{}if(q){f=q.position().top+q.outerHeight();o.animate({marginTop:-(f)},500,function(){})}h=e.select(".gig-toggle-header",m);h.addClass("prevent-close");d.toggleIconChange(m);console.log("animate elements below row");g=f+n.outerHeight(true);var p=e.select(".toggle-arrow",n).position().top-(e.select(".colspan-m6",n).position().top+60);g=g-p;o.animate({height:g},500,function(){e.select(".toggle-arrow",n).animate({marginTop:-p},500,function(){d.hideGigOffersBelow(j+1);o.css("height","auto");c.offerPositions='{"heightTillPrevElement":'+f+', "learnMoreMargin":'+p+', "targetHeight":'+g+',"initialHeight":'+l+"}";e.createStore('{"heightTillPrevElement":'+f+', "learnMoreMargin":'+p+', "targetHeight":'+g+',"initialHeight":'+l+"}");e.select(".gig-cyp-header").removeClass("accordion-trigger-disabled");e.publish({type:"openAccordion",data:{trigger:e.select(".gig-cyp-header")}})})})},reverseAnimation:function(){var g=e.select(".gigabit-panel-anim");g.css("height",JSON.parse(e.getStore()).targetHeight);e.select(".gig-offer-row").css("display","block");var f=e.select(".cox-offers-info",".current-sel-row");e.select(".floating-price").animate({right:"-50%"},1000);if(f.is(":visible")){f.slideToggle(1,function(){var h=e.select(".toggle-single-click",f.closest(".gig-offer-row"));h.removeClass("expand-view").addClass("collapse-view");d.reverseReset(g)})}else{d.reverseReset(g)}},reverseReset:function(f){f.animate({marginTop:0},500,function(){e.select(".toggle-single-click").css("marginTop",0);e.select(".toggle-arrow").css("marginTop",0);e.select(".gig-offer-row").removeClass("border-remove");e.select(".gig-offer-row").removeClass("current-sel-row")});f.animate({height:JSON.parse(e.getStore()).initialHeight},500,function(){f.css("height","auto")});e.select(".gig-toggle-header").removeClass("prevent-close");e.publish({type:"closeAccordion",data:{trigger:e.select(".gig-cyp-header")}});e.select(".gig-cyp-header").addClass("accordion-trigger-disabled");e.publish({type:"closeAccordion",data:{trigger:e.select(".contact-info-section").prev()}});e.select(".contact-info-section").prev().addClass("accordion-trigger-disabled");setTimeout(function(){e.select("html, body").animate({scrollTop:e.select(".gig-toggle-header").offset().top})},1000)},learnMoreClose:function(){var f=e.select(".cox-offers-info",".current-sel-row");if(f.is(":visible")){f.slideToggle(1,function(){var g=e.select(".toggle-single-click",currentRow);g.removeClass("expand-view").addClass("collapse-view")})}},learnMoreAltToggle:function(h,g){var f=JSON.parse(e.getStore()).learnMoreMargin;var j=e.select(h);if(j.hasClass("expand-view")){e.select(".cox-offers-info",g).slideToggle();j.animate({marginTop:-f},500,function(){})}else{j.animate({marginTop:f},500,function(){});e.select(".cox-offers-info",g).slideToggle()}},floatingPriceHandler:function(){var f=e.select(".giga-pkg-price");if(parseInt(e.select(".floating-price").css("right"))>=0){if(!f.hasClass("sticky")&&e.select(window).scrollTop()>=c.floatingPrice){f.addClass("sticky")}if(e.select(window).scrollTop()<c.floatingPrice){f.removeClass("sticky")}}},multiAjaxComplete:function(m){var h=m.trigger,j=e.select(m.trigger).data("multiAjaxTarget"),l=e.select("#gigabit-offer-container");if(e.select(h).hasClass("gig-order-now")){if(e.select(".floating-price").is(":visible")&&j.indexOf("floating-price")>-1){e.select(".accordion-header",".gig-toggle-header").html("Pick Your One Gig Package (Edit)");var g=e.select(".current-sel-row"),f=e.select(g).index();console.log("animate elements above row");var n=e.select(".cox-offers-info",".current-sel-row");e.select(".floating-price").animate({right:"0%"},1000);if(n.is(":visible")){n.slideToggle(1,function(){var o=e.select(".toggle-single-click",g);o.removeClass("expand-view").addClass("collapse-view");d.orderNowAnimation(g,f,l)})}else{d.orderNowAnimation(g,f,l)}e.select(".gig-offer-row").addClass("border-remove")}}if(e.select(h).hasClass("gig-mobile-order-now")){e.select(".accordion-header",".gig-toggle-header").html("Pick Your One Gig Package (Edit)");d.togglePickYourGig(l);e.select(".floating-price-mobile").slideToggle(500,function(){e.select("html, body").animate({scrollTop:e.select(".floating-price-mobile").offset().top});e.select(".gig-cyp-header").removeClass("accordion-trigger-disabled").addClass("accordion-trigger-open");e.select(".gig-cyp-header").next().removeClass("accordion-panel-disabled").addClass("accordion-panel-open")})}},destroy:function(){e.clearStore()}}})})(coxfw);(function(a){a.core.define("modules.ecomm.ShoppingCartAccordion",function(e){var b;var d;var c;var f="[class*='shopping-cart-toggle-']";return{init:function(){console.log("INIT ShoppingCartAccordion.js");d=this;c=e.select(f,".accordion");if(c.length>0){var g=e.select(".accordion-trigger-open:not('.accordion-panel .accordion-trigger-open')",c.closest(".accordion"));if(g.length>0){c.removeClass("shopping-cart-toggle-expand").addClass("shopping-cart-toggle-collapse")}else{c.removeClass("shopping-cart-toggle-collapse").addClass("shopping-cart-toggle-expand")}}},execute:function(){console.log("EXEC AutoScroll.js");e.select("body").on("click",f,function(j){e.preventDefault(j);c=e.select(this);if(c.hasClass("shopping-cart-toggle-expand")){var h=e.select(".accordion-trigger:not('.accordion-trigger-open')",c.closest(".accordion"));e.select(h).each(function(l,m){e.select(m).addClass("accordion-trigger-open");e.select(m).next().slideToggle({duration:"slow",progress:function(n){if(e.select("body.IE8").length>0){e.select(".accordion-panel").parentsUntil("#pf-container").css("zoom","").css("zoom","1")}},complete:function(n){var o=e.select(".accordion").offset().top;e.select("html, body").animate({scrollTop:o})}})})}else{if(c.hasClass("shopping-cart-toggle-collapse")){var g=e.select(".accordion-trigger-open:not('.accordion-panel .accordion-trigger-open')",c.closest(".accordion"));e.select(g).each(function(l,m){e.select(m).removeClass("accordion-trigger-open");e.select(m).next().slideToggle({duration:"slow",progress:function(n){if(e.select("body.IE8").length>0){e.select(".accordion-panel").parentsUntil("#pf-container").css("zoom","").css("zoom","1")}},complete:function(n){var o=e.select(".accordion").offset().top;e.select("html, body").animate({scrollTop:o})}})})}}if(c.hasClass("shopping-cart-toggle-expand")){c.removeClass("shopping-cart-toggle-expand").addClass("shopping-cart-toggle-collapse")}else{if(c.hasClass("shopping-cart-toggle-collapse")){c.removeClass("shopping-cart-toggle-collapse").addClass("shopping-cart-toggle-expand")}}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.TermCondition",function(f){var b;var e;var d=f.select(".terms-and-condition");var c=".terms-and-condition";return{init:function(){e=this;e.disableContinueButton();f.subscribe({checkBoxActionComplete:e.disableContinueButton})},execute:function(){console.log("EXEC TermCondition.js");e=this;f.select(".term-condition-textarea, input").keyup(function(h){var g=f.select(this).attr("maxlength");if(h.which<32){return}if(this.value.length==g){h.preventDefault()}else{if(this.value.length>g){this.value=this.value.substring(0,g)}}})},disableContinueButton:function(){if(d.length==0){return}var g=false;f.select(".terms-and-condition .check-boxes").each(function(h,j){if(!f.select(j).hasClass("active-check")){g=true;f.select(f.select(j).find("span")).text("Select to agree")}else{f.select(f.select(j).find("span")).text("Yes, I Agree")}});if(g){f.select(".term-continue-button").addClass("button-disabled-checkout")}else{f.select(".term-continue-button").removeClass("button-disabled-checkout")}e.termConditionValidation()},termConditionValidation:function(){var u=f.select(".final-checkout-button");var o=f.select(".term-continue-button").hasClass("button-disabled-checkout");var q=document.querySelectorAll(".secure-credit-check").length;var g=document.querySelectorAll(".card-number-append").length;if(g=="0"){if(q=="0"){if(!o){u.removeClass("button-disabled-checkout")}else{u.addClass("button-disabled-checkout")}}else{var r=document.querySelectorAll(".credit-submit-button").length;if(!o&&r=="0"){u.removeClass("button-disabled-checkout")}else{u.addClass("button-disabled-checkout")}}}else{var v=f.select(".payment-address").css("display");var j=f.select(".cp-street").val().length;var n=f.select(".cp-city").val().length;var m=isNaN(parseInt(f.select(".cp-zip").val()));var y=f.select(".cp-state").val().length;var t=f.select(".credit-card-name").val().length;var w=isNaN(parseInt(f.select(".txtCCNum-payment").val()));var p=document.querySelectorAll(".cp-month")[0].selectedIndex;var l=document.querySelectorAll(".cp-year")[0].selectedIndex;if(q=="0"){if((t>0)&&(!w)&&(p>0)&&(l>0)&&(!o)){u.removeClass("button-disabled-checkout");if((v=="block")&&((j==0)||(n==0)||(m)||(y==0))){u.addClass("button-disabled-checkout")}}else{u.addClass("button-disabled-checkout")}}else{var h=f.select(".scc-continue-button").hasClass("button-disabled-checkout");if((t>0)&&(!w)&&(p>0)&&(l>0)&&(!o)&&(!h)){u.removeClass("button-disabled-checkout");if((v=="block")&&((j==0)||(n==0)||(m)||(y==0))){u.addClass("button-disabled-checkout")}}else{u.addClass("button-disabled-checkout")}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.ecomm.UpdateTvEquipment",function(c){var b;return{init:function(){_module=this;c.subscribe({TVEquipSpinner:_module.updateSpinner})},execute:function(){console.log("EXEC UpdateTvEquipment.js")},updateSpinner:function(j){var l=j.sbInputVal;console.log(l);var g=j.spinContext;var h=c.select(".sb-content-copy");var e=c.select(".sb-content-"+(l+1),g).children();var f=c.select("span:first-of-type",e).text();if(c.select(e).hasClass("selected")||c.select(e).hasClass("unselected")){var d=c.select(h).clone();c.select(e).replaceWith(d);c.select(".modal-trigger",d).attr("data-content-element","equipment-content-"+(l+1)+"");c.select(".equipment-comparison-modal",d).attr("id","equipment-content-"+(l+1)+"");c.select(d).removeClass("sb-content-copy");c.select(d).css("display","inline-block");if((l+1)%3==0){c.select(d).addClass("position-last")}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.AEMEmulatorFixes",function(c){var b;return{init:function(){console.log("INIT AEMEmulatorFixes.js");if(!window.frameElement){return}b=this},execute:function(){console.log("EXEC AEMEmulatorFixes.js");if(!window.frameElement){return}b=this;var d=new MutationObserver(b.frameMaker);d.observe(c.select("body")[0],{attributes:true,subtree:false,childList:false,characterData:false})},frameMaker:function(e,f){if(window.frameElement){var d=c.select(window.frameElement);if(d.is("#cq-cf-frame")){d.css({width:c.select("body")[0].style.width});d.parent("#cq-cf-frame-ct").css({"text-align":"center"})}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.AEMExternalAppTemplate",function(d){var c;var b=".ajax-loader";return{init:function(){console.log("INIT AEMExternalAppTemplate.js");c=this;d.subscribe({AEMExternalAppCalls:c.AEMExternalAppCalls})},execute:function(){console.log("EXEC AEMExternalAppTemplate.js");c=this;d.select("body").on("ajax-loader-trigger",b,function(h){var j=d.select(b).first();var g;if(j.attr("data-ajax-source").match(/\.app\.html/)){j.attr("data-ajax-source",j.attr("data-ajax-source").replace(/\.app\.html/,".includejs.app.html"))}if(d.select(b+"[data-ajax-source*='.app.html']").length==d.select(b).length){h.useCustomAJAX=true;d.select("body").off("ajax-loader-trigger",b);g=d.select(b).not(j);var e=d.select(".response",j).closest(".loading-wrapper");var f=d.publish({type:"Ajax",data:{id:"AEMExternalAppCalls",container:d.select(".response",j),url:j.attr("data-ajax-source"),type:"GET",dataType:"text",timeout:"30000",cache:false,throbber:{type:"showThrobber",data:{nodes:e,display:e.attr("data-ajax-display"),message:e.attr("data-ajax-message")}}}});d.when(f).then(function(l,n,m){g.each(function(q,p){var p=d.select(p);var o=d.select(".response",p).closest(".loading-wrapper");d.publish({type:"Ajax",data:{id:"AEMExternalAppCalls",container:d.select(".response",p),url:p.attr("data-ajax-source"),type:"GET",dataType:"text",timeout:"30000",cache:false,throbber:{type:"showThrobber",data:{nodes:o,display:o.attr("data-ajax-display"),message:o.attr("data-ajax-message")}}}})})})}})},AEMExternalAppCalls:function(g){if(g.isError){d.select(g.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 f=d.select("<div>").append(g.responseText);var e=f.find("script").remove();d.select(g.container).html(f.children());if(e.length>0){e.each(function(j,h){setTimeout(function(){d.select(h).appendTo(document.head)},j*500)})}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.AEMmboxUpdate",function(d){var b=".rotatorblock, .heroblock";var c;return{init:function(){console.log("INIT AEMmboxUpdate.js");c=this},execute:function(){console.log("EXEC AEMmboxUpdate.js");c=this;d.select("body").on("content-loaded",b,function(e){if(e.currentTarget!==e.target){return}selector=d.select(b);d.publish({type:"showThrobber",data:{nodes:selector,display:selector.attr("data-ajax-display"),message:selector.attr("data-ajax-message")}});setTimeout(function(){d.publish({type:"hideThrobber",data:{nodes:selector,display:selector.attr("data-ajax-display"),message:selector.attr("data-ajax-message")}})},3000)})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Accordion",function(f){var e;var b;var c;var d=".accordion-trigger, .accordion-next";var g="[class*='accordion-toggle-']";return{init:function(){console.log("INIT Accordion.js");e=this;f.subscribe({openAccordion:e.openAccordion,closeAccordion:e.closeAccordion});if(typeof CQ!="undefined"&&typeof CQ.WCM!="undefined"){if(CQ.WCM.getMode()=="edit"||CQ.WCM.getMode()==null){CQ.WCM.on("editablesready",function(){console.log("CQ editablesready (accordion)");e.adobeAuthorFix()})}}},execute:function(){console.log("EXEC Accordion.js");e=this;f.select("body").on("click",d,function(j){f.preventDefault(j);b=f.select(this);if(!b.hasClass("accordion-trigger-disabled")){if(b.hasClass("accordion-trigger-open")||b.hasClass("accordion-next")){f.publish({type:"closeAccordion",data:{trigger:b}})}else{f.publish({type:"openAccordion",data:{trigger:b}});e.trackAccordionOpen(b)}}c=f.select(g,b.closest(".accordion"));if(c.length>0){var h=f.select(".accordion-trigger-open:not('.accordion-panel .accordion-trigger-open')",c.closest(".accordion"));if(h.length>0&&f.select(".accordion-panel:not(.accordion-panel .accordion-panel)",c.closest(".accordion")).length){c.removeClass("accordion-toggle-expand").addClass("accordion-toggle-collapse")}else{c.removeClass("accordion-toggle-collapse").addClass("accordion-toggle-expand")}}});f.select("body").on("click",g,function(j){f.preventDefault(j);c=f.select(this);if(c.hasClass("accordion-toggle-expand")){var h=c.closest(".accordion").data("coxAccordionStyle");c.closest(".accordion").data("coxAccordionStyle","");f.select(".accordion-trigger:not('.accordion-trigger-open')",c.closest(".accordion")).each(function(m,n){var l=f.select(n);f.publish({type:"openAccordion",data:{trigger:l}})});c.closest(".accordion").data("coxAccordionStyle",h)}else{if(c.hasClass("accordion-toggle-collapse")){f.select(".accordion-trigger-open",c.closest(".accordion")).each(function(m,n){var l=f.select(n);f.publish({type:"closeAccordion",data:{trigger:l}})})}}if(c.hasClass("accordion-toggle-expand")){c.removeClass("accordion-toggle-expand").addClass("accordion-toggle-collapse")}else{if(c.hasClass("accordion-toggle-collapse")){c.removeClass("accordion-toggle-collapse").addClass("accordion-toggle-expand")}}});f.select("body").on("content-loaded",g,function(j){c=f.select(this);var h=f.select(".accordion-trigger-open:not('.accordion-panel .accordion-trigger-open')",c.closest(".accordion"));if(h.length>0){c.removeClass("accordion-toggle-expand").addClass("accordion-toggle-collapse")}else{c.removeClass("accordion-toggle-collapse").addClass("accordion-toggle-expand")}})},openAccordion:function(j){console.log("     Accordion.openAccordion");if(typeof CQ!="undefined"&&typeof CQ.WCM!="undefined"){if(CQ.WCM.getMode()=="edit"||CQ.WCM.getMode()==null){f.select(".accordion-panel-open").each(function(){CQ.WCM.toggleEditables(true,f.select(this).data("path"))})}}var h=j.trigger;var l=h.nextAll(".accordion-panel").first();if(!h.hasClass("accordion-toggle-collapse")&&h.closest(".accordion").data("coxAccordionStyle")==="open-single-panel"){f.select(".accordion-trigger-open",h.closest(".accordion")).each(function(m,n){f.publish({type:"closeAccordion",data:{trigger:f.select(n)}})})}l.slideToggle({duration:"slow",progress:function(m){if(f.select("body.IE8").length>0){f.select(".accordion-panel").parentsUntil("#pf-container").css("zoom","").css("zoom","1")}},complete:function(m){if(j.accordionNext){var o=h.closest(".accordion").data("coxAccordionStickBelow");var n=h.offset().top;if(o!=undefined&&o.length>0){o=o.split(" ");f.each(o,function(p,q){if(f.select("#"+q).is(":visible")){n=n-parseInt($("#"+q).outerHeight())}})}f.select("html, body").animate({scrollTop:n})}l.addClass("accordion-panel-open");if(f.select("body.IE8").length===0){l.removeAttr("style")}e.adobeAuthorFix()}});l.attr("aria-hidden",false);h.attr("aria-selected",true);h.attr("aria-expanded",true);h.addClass("accordion-trigger-open")},closeAccordion:function(n){console.log("     Accordion.closeAccordion");if(typeof CQ!="undefined"&&typeof CQ.WCM!="undefined"){if(CQ.WCM.getMode()=="edit"||CQ.WCM.getMode()==null){f.select(".accordion-panel-open").each(function(){CQ.WCM.toggleEditables(true,f.select(this).data("path"))})}}var q=true;var l=n.trigger;var h=l.nextAll(".accordion-panel").first();var o;var r;var p=false;if(l.hasClass("accordion-next")){p=true;o=l.closest(".accordion-panel").next();r=o.next();l=l.closest(".accordion-panel").prev();h=l.next();o.focus()}if(h.closest("form.accordion").length>0){q=f.publish({type:"continueCloseAccordion",data:{trigger:l}})}if(q){h.slideToggle({duration:"slow",progress:function(t){if(f.select("body.IE8").length>0){f.select(".accordion-panel").parentsUntil("#pf-container").css("zoom","").css("zoom","1")}},complete:function(t){if(p){var v=l.closest(".accordion").data("coxAccordionStickBelow");var u=l.offset().top;if(v!=undefined&&v.length>0){v=v.split(" ");f.each(v,function(w,y){if(f.select("#"+y).is(":visible")){u=u-parseInt($("#"+y).outerHeight())}})}f.select("html, body").animate({scrollTop:u})}h.removeClass("accordion-panel-open");if(f.select("body.IE8").length===0){h.removeAttr("style")}e.adobeAuthorFix()}});h.attr("aria-hidden",true);l.attr("aria-selected",false);l.attr("aria-expanded",false);l.removeClass("accordion-trigger-open");if(!a.utils.typeEqual(o,"undefined")){o.removeClass("accordion-trigger-disabled");r.removeClass("accordion-panel-disabled");f.publish({type:"openAccordion",data:{trigger:o,accordionNext:p}})}}else{if(p){var m=l.closest(".accordion").data("coxAccordionStickBelow");var j=l.offset().top;if(m!=undefined&&m.length>0){m=m.split(" ");f.each(m,function(t,u){if(f.select("#"+u).is(":visible")){j=j-parseInt($("#"+u).outerHeight())}})}f.select("html, body").animate({scrollTop:j})}}},trackAccordionOpen:function(m){if(typeof(__coxOmnitureParams)!="undefined"&&typeof(s_account)!="undefined"&&s_account!=""){var h=__coxOmnitureParams?__coxOmnitureParams.pageName+":":"";var p=__coxOmnitureParams?__coxOmnitureParams.hier1+",":"";var o=__coxOmnitureParams?__coxOmnitureParams.hier2+",":"";var l=__coxOmnitureParams?__coxOmnitureParams.localeName+":":"";var j="";var m=f.select(m)[0];if(f.select(m).closest(".accordion-panel").length>0){var n=f.select(m).closest(".accordion-panel").prev()[0];j=n.title.toLowerCase();if(!j){j=f.select(n).children(":not('div')").text().toLowerCase()+":"}else{j=j+":"}}var q=m.title.toLowerCase();if(!q){q=f.select(m).children(":not('div')").text().toLowerCase()}f.publish({type:"OmnitureInterface",data:{mode:"track",type:"pageview",clearVariables:"true",options:{pageName:h+j+q,hier1:p+j+q,hier2:o+j+q,localePagename:l+h+j+q}}})}},adobeAuthorFix:function(){if(typeof CQ!="undefined"&&typeof CQ.WCM!="undefined"){if(CQ.WCM.getMode()=="edit"||CQ.WCM.getMode()==null){f.select(".accordion:not('.accordion-panel-open')").each(function(){CQ.WCM.toggleEditables(false,f.select(this).data("rootpath"))});f.select(".accordion-panel-open").each(function(){CQ.WCM.toggleEditables(true,f.select(this).data("path"))})}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.AccordionFormValidation",function(d){var b=d.select("form.accordion");var c;return{init:function(){console.log("INIT AccordionFormValidation.js");c=this;if(b.length==0){d.subscribe({continueCloseAccordion:function(){return true}})}else{d.subscribe({continueCloseAccordion:c.validateAccordion})}},execute:function(){},validateAccordion:function(j){console.log("     AccordionFormValidation.validateAccordion");var e=j.trigger;var m=e.next();var h=m.next();var l=h.next();var g=m.closest("form.accordion")[0];var f=d.select(".ignore-validation",g);d.select("input, select, textarea",g).addClass("ignore-validation");d.select("input, select, textarea",m).removeClass("ignore-validation");f.addClass("ignore-validation");d.select(g).valid();d.select("input, select, textarea",g).removeClass("ignore-validation");f.addClass("ignore-validation");if(d.select(g).validate().numberOfInvalids()>0){return false}else{return true}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Ajax",function(c){var b;return{init:function(){console.log("INIT Ajax.js");b=this;c.subscribe({Ajax:b.makeAjaxRequest})},execute:function(){console.log("EXEC Ajax.js");b=this;c.select("body").on("ajax-loader-trigger",".ajax-loader",function(e){if(e.useCustomAJAX){return}var f=c.select(this);var d=c.select(".response",f).closest(".loading-wrapper");c.publish({type:"Ajax",data:{container:c.select(".response",f),url:f.attr("data-ajax-source"),type:"GET",dataType:"text",timeout:"30000",cache:false,throbber:{type:"showThrobber",data:{nodes:d,display:d.attr("data-ajax-display"),message:d.attr("data-ajax-message")}}}})});c.select(document).ajaxComplete(function(f,e,d){if(!e.responseJSON&&!e.getResponseHeader("Content-Type").match(/javascript/)){var g=c.select(e.responseText);if(c.select(".ajax-loader",g).length>0){c.select(".ajax-loader").trigger("ajax-loader-trigger")}}});if(c.select(".ajax-loader").length>0){c.select(".ajax-loader").trigger("ajax-loader-trigger")}c.select(document).ajaxComplete(function(j,h,e){if(!h.responseJSON&&!h.getResponseHeader("Content-Type").match(/javascript/)){var g=c.select("<div>").append(h.responseText);c.each(a.core.events.contentLoaded(),function(l,m){if(g.find(m.selector).length>0){c.select(m.selector).trigger("content-loaded")}});if((c.select("<div>").append(h.responseText).find("div[data-media]").length>0)&&(window.picturefill)){window.picturefill()}var d=h.responseText;if(d.indexOf("<script>")>-1){var f=c.select(d).find("script").html();c.globalEval(f)}}});c.select("body").on("click",".ajax-trigger",function(f){var e=c.select(this);var d=e.closest(".ajax-loader").find(".loading-wrapper");c.publish({type:"Ajax",data:{container:e.closest(".ajax-loader").find(".loading-wrapper .response"),url:e.attr("data-ajax-source")?e.attr("data-ajax-source"):e.closest(".ajax-loader").attr("data-ajax-source"),type:"GET",dataType:"text",timeout:"30000",cache:false,throbber:{type:"showThrobber",data:{nodes:d,display:d.attr("data-ajax-display"),message:d.attr("data-ajax-message")}}}})});c.select("body").on("content-loaded",".ajax-select",function(f){var e=c.select(this);var d=e.closest(".ajax-loader").find(".loading-wrapper");e.on("change",function(g){c.publish({type:"Ajax",data:{container:e.closest(".ajax-loader").find(".loading-wrapper .response"),url:e.closest(".ajax-loader").attr("data-ajax-source")+e.val(),type:"GET",dataType:"text",timeout:"30000",cache:false,throbber:{type:"showThrobber",data:{nodes:d,display:d.attr("data-ajax-display"),message:d.attr("data-ajax-message")}}}})})});c.select("body").on("submit",".ajax-form-submit form",function(e){c.preventDefault(e);var d=c.select(this).parents(".response").closest(".loading-wrapper");c.publish({type:"Ajax",data:{container:c.select(this).parents(".response"),url:this.action,type:this.method.toUpperCase(),dataType:"text",timeout:"30000",cache:false,data:c.select(this).serialize(),throbber:{type:"showThrobber",data:{nodes:d,display:d.attr("data-ajax-display"),message:d.attr("data-ajax-message")}}}})})},makeAjaxRequest:function(d){if(a.utils.typeEqual(d.throbber,"object")){b.showThrobber(d.throbber)}return c.ajax({type:d.type,url:d.url,data:d.data,dataType:d.dataType,context:d.container,cache:false,success:function(f,g,e){e.isError=false;e.container=this;if(e.responseJSON){if(e.responseJSON.status){e.testMessage=e.responseJSON.status.successMessage}else{e.testMessage="AJAX call to '"+d.url+"' returned object '"+e.responseJSON+"'."}}else{e.testMessage="AJAX call to '"+d.url+"' returned status '"+e.statusText+"'."}b.sendAjaxResponseBack(d.id,e)},error:function(g,e,f){g.isError=true;g.container=this;g.testMessage=g.statusText;b.sendAjaxResponseBack(d.id,g)},complete:function(f,e){if(a.utils.typeEqual(d.throbber,"object")){if(d.throbber.data.display!=null){b.hideThrobber(d.throbber)}else{d.throbber.data.nodes=d.throbber.data.nodes.filter(".loading-wrapper-active");b.hideThrobber(d.throbber)}}if(c.select("body.IE8").length>0){f.container.closest("[class*='colspan-']").css("zoom","").css("zoom","1")}}})},getAjaxResponse:function(d){if(d.isError){c.select(d.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{c.select(d.container).html(d.responseText)}},sendAjaxResponseBack:function(e,d){if(a.utils.typeEqual(e,"string")){c.publish({type:e,data:d})}else{b.getAjaxResponse(d)}},showThrobber:function(d){d.type="showThrobber";c.publish(d)},hideThrobber:function(d){d.type="hideThrobber";c.publish(d)},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.AlignContainerItems",function(g){var f;var b=".offer-comparison-container, .feature-highlight, .best-offer, .promo-feature-content";var c;var e;var d=null;return{init:function(){console.log("INIT AlignContainerItems.js");f=this;g.subscribe({RealignContainerItems:f.alignContainerItems})},execute:function(){console.log("EXEC AlignContainerItems.js");f=this;if(typeof CQ!="undefined"&&typeof CQ.WCM!="undefined"){if(CQ.WCM.getMode()=="edit"||CQ.WCM.getMode()==null){return}}g.select("body").on("content-loaded",b,function(h){c=g.select(".section-container");e=setTimeout(function(){f.getContainers(c)},200)});g.select(window).on("resize",function(h){e=setTimeout(function(){f.getContainers(c)},200)})},getContainers:function(h){clearTimeout(e);g.select(h).each(function(j,l){f.alignContainerItems(l)})},alignContainerItems:function(o){var j=".button:visible, .button-payment:visible, .button-secondary:visible";var n=[];var m=g.select(o).find(b);if(m.length>0){for(var h=0;h<m.length;h++){var l=g.select(m[h]).find(j);if(l.length>0){$.merge(n,l);if(d==null){d=parseInt(g.select(l[0]).css("margin-top"))}}}f.alignHeightOfGroup(n)}},alignHeightOfGroup:function(l){var h=0;var j=0;g.select(l).each(function(m,o){if(g.select(window).width()<768){g.select(o).css("margin-top",Math.round(d)+"px")}else{g.select(o).removeAttr("style");var n=Math.round(g.select(o).offset().top);if(n>h){h=n}}});if(g.select(window).width()>767){g.select(l).each(function(n,p){var o=Math.round(g.select(p).offset().top);var m=parseInt(g.select(p).css("margin-top"));if(o<h){j=Math.round(h-o)+m;j=Math.round(j);if(j>600){j=0}g.select(p).css("margin-top",j+"px")}})}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.AnchorLinks",function(f){var d;var c=".anchor-sticky";var b;var e;return{init:function(){console.log("INIT AnchorLinks.js")},execute:function(){console.log("EXEC AnchorLinks.js");d=this;var g=f.select("body").data("os")=="ios"?"touchstart":"click";f.select("body").on("content-loaded",c,function(h){e=f.select(c)});f.select("body").on(g,".link-selection",function(h){b=f.select(".link-selection");d.showHideDropdown();h.stopPropagation()});f.select("html").on(g,function(h){if(f.select(".link-selection")){b=f.select(".link-selection")}if(f.select(window).width()<768&&b){if(b.find("span").hasClass("active")){b.find("span").removeClass("active");b.find(".anchor-link-content").removeClass("selected")}d.highlightActiveBlocks()}});f.select("body").on(g,".anchor-links-bar .anchor-link-content a",function(m){m.stopPropagation();if(f.select(window).width()<768){var l=f.select(this).text();d.changeDropdownText(l)}else{b=f.select(".link-selection");b.find(".anchor-link-content div").removeClass("active");f.select(this).closest("div").parent().addClass("active")}var j=f.select("body").is(".CH, .SF")?"body":"html";var h=e.height();if(f.select(".anchor-sticky.active").length==0){h=h+e.height()+parseInt(e.css("padding-top"))}var n=f.select(f.select(this).attr("href")).offset().top-h-30;f.select(j).scrollTop(n);m.preventDefault()});f.select(window).on("scroll touchmove",function(j){if(f.select(c).length<1){return}b=f.select(".link-selection");var h=d.getViewportOffset(e);if(this.scrollTop>h.top){e.addClass("active")}else{e.removeClass("active");f.select(".anchor-link-content > div").removeClass("active");b.find(".link-heading").text("Navigate to:");b.find(".link-heading").removeClass("selected")}d.highlightActiveBlocks()})},showHideDropdown:function(){if(f.select(window).width()>767){return}b.find(".link-heading").text("Navigate to:");b.find(".link-heading").removeClass("selected");if(b.find("span").hasClass("active")){b.find("span").removeClass("active");b.find(".anchor-link-content").removeClass("selected")}else{b.find(".anchor-link-content").addClass("selected");b.find("span").addClass("active")}},highlightActiveBlocks:function(){var g=f.select(window).scrollTop();f.select(".link-selection a").each(function(j,m){var h=f.select(this);var n=f.select(h.attr("href")).closest(".section-container");if((n.offset().top-e.height()-35<=g)&&(n.offset().top-e.height()-35+n.height()>g)){f.select(".anchor-link-content > div").removeClass("active");f.select(this).closest("div").parent().addClass("active");var l=this.innerHTML;d.changeDropdownText(l)}else{if(n.offset().top-e.height()-35+n.height()<g){b.find(".link-heading").text("Navigate to:");b.find(".link-heading").removeClass("selected")}f.select(this).closest("div").parent().removeClass("active")}})},changeDropdownText:function(g){f.select(".link-heading").html(g);f.select(".link-heading").addClass("selected");f.select(".anchor-link-content").removeClass("selected");f.select(".link-selection span").removeClass("active")},getViewportOffset:function(h){var g=f.select(window);scrollTop=g.scrollTop();offset=h.offset();return{top:offset.top-scrollTop}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Base64",function(d){var c;var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{init:function(){console.log("INIT Base64.js");c=this;d.subscribe({Base64:c.makeBase64Request})},execute:function(){console.log("EXEC Base64.js");c=this},makeBase64Request:function(f){console.log("     Base64.makeBase64Request");var e;switch(f.type){case"encode":e=c.encode(f.data);break;case"decode":e=c.decode(f.data);break;case"utf8_encode":e=c._utf8_encode(f.data);break;case"utf8_decode":e=c._utf8_decode(f.data);break}c.sendBase64Response(f.id,e,f.context)},encode:function(g){var e="";var p,n,l,o,m,j,h;var f=0;g=c._utf8_encode(g);while(f<g.length){p=g.charCodeAt(f++);n=g.charCodeAt(f++);l=g.charCodeAt(f++);o=p>>2;m=((p&3)<<4)|(n>>4);j=((n&15)<<2)|(l>>6);h=l&63;if(isNaN(n)){j=h=64}else{if(isNaN(l)){h=64}}e=e+b.charAt(o)+b.charAt(m)+b.charAt(j)+b.charAt(h)}return e},decode:function(g){var e="";var p,n,l;var o,m,j,h;var f=0;g=g.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<g.length){o=b.indexOf(g.charAt(f++));m=b.indexOf(g.charAt(f++));j=b.indexOf(g.charAt(f++));h=b.indexOf(g.charAt(f++));p=(o<<2)|(m>>4);n=((m&15)<<4)|(j>>2);l=((j&3)<<6)|h;e=e+String.fromCharCode(p);if(j!=64){e=e+String.fromCharCode(n)}if(h!=64){e=e+String.fromCharCode(l)}}e=c._utf8_decode(e);return e},_utf8_encode:function(f){f=f.replace(/\r\n/g,"\n");var e="";for(var h=0;h<f.length;h++){var g=f.charCodeAt(h);if(g<128){e+=String.fromCharCode(g)}else{if((g>127)&&(g<2048)){e+=String.fromCharCode((g>>6)|192);e+=String.fromCharCode((g&63)|128)}else{e+=String.fromCharCode((g>>12)|224);e+=String.fromCharCode(((g>>6)&63)|128);e+=String.fromCharCode((g&63)|128)}}}return e},_utf8_decode:function(e){var f="";var g=0;var h=c1=c2=0;while(g<e.length){h=e.charCodeAt(g);if(h<128){f+=String.fromCharCode(h);g++}else{if((h>191)&&(h<224)){c2=e.charCodeAt(g+1);f+=String.fromCharCode(((h&31)<<6)|(c2&63));g+=2}else{c2=e.charCodeAt(g+1);c3=e.charCodeAt(g+2);f+=String.fromCharCode(((h&15)<<12)|((c2&63)<<6)|(c3&63));g+=3}}}return f},sendBase64Response:function(g,e,f){d.publish({type:g,data:{value:e,context:f}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.CardEncryption",function(f){var d;var b=".card-number";var c=f.select(b).parents("form");var e="Visa MasterCard Discover Amex generic-atm-card visa mastercard discover amex all-cards randomcard";return{init:function(){d=this;console.log("INIT CardEncryption.js");f.subscribe({encryptNumber:d.encryptNumber});f.subscribe({validateCard:d.validateCard})},execute:function(){console.log("EXEC CardEncryption.js");d=this;if(f.select(b).length>0){d.bindCardValidation();d.initEncryptedData(b)}f.select("body").on("content-loaded",b,function(g){d.bindCardValidation();d.initEncryptedData(b)});f.select("body").on("keydown",b,function(g){d.clearField(this)});f.select("body").on("blur",b,function(h){d.updateInputFields(this);var g=d.detectCardType(this,false);if(!(typeof(g.cardDetails.cardType)==undefined||typeof(g.cardDetails.cardType)=="undefined")){f.select(this).removeClass(e);if(g){f.publish({type:"CardValidation",data:g})}f.select(this).addClass(g.cardDetails.cardClass);d.updateAssocInputFields(this,g.cardDetails.cardTypeUF,d.getLastDigits(this,4));d.encryptNumber(this)}else{f.select(this).removeClass(e);if(f.select(this).val().length>0){f.select(this).addClass("all-cards randomcard")}else{f.select(this).addClass("all-cards");f.select(this).removeClass("randomcard")}d.updateAssocInputFields(this,"",d.getLastDigits(this,4))}d.clearField(this)});f.select("body").on("keyup",b,function(h){d.updateInputFields(this);var g=d.detectCardType(this,true);if(!(typeof(g.cardDetails.cardType)==undefined||typeof(g.cardDetails.cardType)=="undefined")){f.select(this).removeClass(e);if(g){f.publish({type:"CardValidation",data:g})}f.select(this).addClass(g.cardDetails.cardClass)}else{f.select(this).removeClass(e);if(f.select(this).val().length>0){f.select(this).addClass("all-cards randomcard")}else{f.select(this).addClass("all-cards");f.select(this).removeClass("randomcard")}}d.clearField(this)});f.select("body").on("keyup","input[data-masked-pattern]",function(h){if(f.select(this).data("masked-pattern")==true){var g=d.detectCardType(this,true);d.updateInputFields(this);d.changeInputPattern(f.select(this),g.cardDetails.maskPattern)}})},updateInputFields:function(h){var g=f.select(h).val().replace(/[^\/\d]/g,"");f.select(h).attr("data-field-value",g);f.select(f.select(h).attr("data-field-selector")).val("");if(typeof(f.select(h).attr("data-field-selector"))!="undefined"){f.select(h).attr("name",f.select(h).attr("data-field-selector").replace(/[#.]/g,"")+"_card-number")}},clearField:function(g){if(f.select(g).attr("data-masked")=="true"){f.select(g).val("");f.select(f.select(g).attr("data-field-selector")).val("");f.select(g).removeAttr("data-field-value");f.select(g).removeAttr("data-masked")}},initEncryptedData:function(g){var h=f.select(g);f.each(h,function(){d.updateInputFields(this);if(d.checkDependentJsLoad(this)){d.encryptNumber(this);d.populateMaskedInput(this)}else{f.select(this).validate()}})},bindCardValidation:function(){var j=b.replace(".","");var g="The credit card number you entered isn't valid. Please try again.";var h=d.checkDependentJsLoad();if(!h){g="We are unable to validate your credit card at this time. Please try again later."}f.addValidationMethod(j,function(n,m){if(h){var l=d.detectCardType(m,false);if(!(typeof(l.cardDetails.cardType)==undefined||typeof(l.cardDetails.cardType)=="undefined")){d.updateAssocInputFields(m,l.cardDetails.cardTypeUF,d.getLastDigits(m,4));f.select(m).removeAttr("name");return d.encryptNumber(m)}else{return false}}else{return false}},g)},checkDependentJsLoad:function(g){var h=false;if((!d.isPieEncryptionDownloadError()&&!d.isPieKeyDownloadError())||!d.checkDependentJsCryptoError()||!d.checkDependentJsJsEncryption()){h=true}return h},checkDependentJsCryptoError:function(){if((typeof(CryptoJS)=="undefined")){return true}return false},checkDependentJsJsEncryption:function(){if((typeof(JSEncrypt)=="undefined")){return true}return false},encryptionType:function(){var h=false;var j=false;var g=false;if(!(d.isPieEncryptionDownloadError()||d.isPieKeyDownloadError())){h=true}if(!d.checkDependentJsCryptoError()){j=true}if(!d.checkDependentJsJsEncryption()){g=true}if((h&&g)||h){return"PIE"}else{if(g){return"JSENC"}}},encryptNumber:function(g){var h=d.encryptionType();if(h=="PIE"){return d.encryptCHS(g)}else{if(h=="CRYPTO"){return d.encryptPGP(g)}else{if(h=="JSENC"){return d.encryptRSA(g)}}}},encryptCrypto:function(h){var n=f.select(h).attr("data-field-value");var j=f.select(h).data("field-selector");j=f.select(h).parents("form").find(j);if(typeof(encKey)!="undefined"){var l=encKey;var m=CryptoJS.AES.encrypt(n,l);var g=d.detectCardType(h,false);if(m!=null&&(typeof(g.cardDetails.cardType)!="undefined"||g.cardDetails.cardType=="")){f.select(j).val(m);return true}else{return false}}else{return false}},encryptCHS:function(h){form=f.select(h).parents("form");var o=f.select(h).attr("data-field-value");var n="";var j=f.select(h).attr("data-field-selector");j=f.select(h).parents("form").find(j);var p=false;var m=f.select(h).attr("id");var l={};if(p){if(!ValidatePANChecksum(ccno)){console.log("PAN has invalid checksum.");return false}}var g=ProtectPANandCVV(o,n,!p);if(g!=null){f.select(j).val(g[0]);return true}else{return false}},encryptRSA:function(h){var o=f.select(h).attr("data-field-value");var j=f.select(h).data("field-selector");j=f.select(h).parents("form").find(j);if(typeof(encKey)!="undefined"){var l=encKey;var n=new JSEncrypt();n.setPublicKey(l);var m=n.encrypt(o);var g=d.detectCardType(h,false);if(m!=null&&(typeof(g.cardDetails.cardType)!="undefined"||g.cardDetails.cardType=="")){f.select(j).val(m);return true}else{return false}}else{return false}},isPieKeyDownloadError:function(){if((typeof(PIE)=="undefined")||(typeof(PIE.K)=="undefined")||(typeof(PIE.L)=="undefined")||(typeof(PIE.E)=="undefined")||(typeof(PIE.key_id)=="undefined")||(typeof(PIE.phase)=="undefined")){return true}return false},isPieEncryptionDownloadError:function(){if((typeof ValidatePANChecksum!="function")||(typeof ProtectPANandCVV!="function")){return true}return false},populateMaskedInput:function(g){if(f.select(g).val().length>0){f.select(g).val(d.maskNumber(f.select(g).val(),g));f.select(g).attr("data-masked",true)}},maskNumber:function(h,g){var m="*",l=/^([0-9-]+)([0-9]{4})$/,j=h.match(l);var n=h.replace(/([0-9])/g,m,j[1])+j[2];n=n.substr(n.length-f.select(g).attr("maxlength"),n.length);return n},detectCardType:function(m,n){var q=f.select(m).attr("data-field-value");var h={};h={ccCards:[{cardType:"Amex",regEx:"(^34\\d{13}$)|(^37\\d{13})$",regExKeyPress:"(^34\\d{0,13}$)|(^37\\d{0,13})$",cssClass:"Amex",isDebit:false,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:false,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}$)",regExKeyPress:"(^51\\d{0,14}$)|(^52\\d{0,14}$)|(^53\\d{0,14}$)|(^54\\d{0,14}$)|(^55\\d{0,14}$)",cssClass:"MasterCard",isDebit:false,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:false,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:true,cardTypeUF:"ATM",maskPattern:"0000-0000-0000-0000"}]};var l={};l.cardDetails={};l.cardNumber=q;l.cardField=m;var j=j=typeof(f.select(m).data("allow-debit"))=="undefined"?false:f.select(m).data("allow-debit");for(var o in h.ccCards){if(h.ccCards[o].hasOwnProperty("cardType")){var g=h.ccCards[o].cardType;var p=n==true?h.ccCards[o].regExKeyPress:h.ccCards[o].regEx;l.isDebit=h.ccCards[o].isDebit;if((j==true&&l.isDebit==true)||(j==true&&l.isDebit==false)||(j==false&&l.isDebit==false)){if(q.match(p)){l.cardDetails.cardType=g;l.cardDetails.cardClass=h.ccCards[o].cssClass;l.cardDetails.cardTypeUF=h.ccCards[o].cardTypeUF;l.cardDetails.maskPattern=h.ccCards[o].maskPattern;break}}}}return l},changeInputPattern:function(g,h){h=typeof(h)=="undefined"?"0000-0000-0000-0000":h;return f.select(g).mask(h)},updateAssocInputFields:function(h,g,j){var m=f.select(h).data("card-type");var l=f.select(h).data("last-digit");m=f.select(h).parents("form").find(m);l=f.select(h).parents("form").find(l);f.select(m).val(g);f.select(l).val(j)},getLastDigits:function(g,l){var j=f.select(g).attr("data-field-value").toString();var h=j.length>l?j.substring(j.length-l,j):j;return h},validateCard:function(g){g.valid()},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.CarouselRotator",function(d){var c;var b;return{init:function(){console.log("INIT CarouselRotator.js")},execute:function(){console.log("EXEC CarouselRotator.js");b=this;d.select("body").on("content-loaded",".carousel-container",function(e){c=d.select(".carousel-container");c.each(function(h,j){var j=d.select(j);var g=false;var f;if(j.data("slideshow")){g=(j.data("slideshow")==true)?true:false}if(j.data("manualControls")===true){if(d.select(".hero-tabs").length>0){f=".hero-tabs > ol li"}else{f=".flexslider-controls li"}}j.flexslider({animation:"fade",manualControls:f,slideshow:g,slideshowSpeed:parseInt(j.data("slideshowSpeed")),animationSpeed:700,pauseOnAction:false,pauseOnHover:true,useCSS:false,directionNav:false})})})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.CheckBox",function(d){var b=".checkbox-block";var c;return{init:function(){console.log("INIT CheckBox.js")},execute:function(){console.log("EXEC CheckBox.js");c=this;d.select("body").on("content-loaded",b,function(f){var e=d.select(this).find('input[type="checkbox"]');d.select(e).focus(function(h){var g=d.select(this).parent();d.select(g).addClass("focused-check")});d.select(e).blur(function(h){var g=d.select(this).parent();d.select(g).removeClass("focused-check")})});d.select("body").on("click",".check-boxes",function(e){c.handlecheckBtnSelection(this)})},handlecheckBtnSelection:function(f){var h=d.select(f);h.toggleClass("active-check");var e=h.find('input[type="checkbox"]')[0];var g=d.select(e);if(h.hasClass("active-check")){g.prop("checked","checked");g.attr("checked","checked")}else{g.removeAttr("checked")}d.publish({type:"checkBoxActionComplete",data:{}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.CustomValidation",function(d){var c;var b;return{init:function(){console.log("INIT CustomValidation.js");c=this;d.subscribe({CustomizeValidation:c.customizeOptions})},execute:function(){var e=$.validator.methods.required;$.validator.methods.required=function(){var f=$(arguments[1]);if(f.is("[placeholder]")&&arguments[0]==f.attr("placeholder")){arguments[0]=""}return e.apply(this,arguments)}},customizeOptions:function(e){currentForm=d.select(e.formObj);currentForm.validate({onfocusin:false,onfocusout:false,onkeyup:false,onclick:false,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(h,g){d.select(g.currentForm).css("zoom","1");var f=d.select(g.currentForm).find(".loading-wrapper-active");if(!(d.typeEqual(window.buttonThrobberTimer,"undefined"))){clearTimeout(window.buttonThrobberTimer)}d.publish({type:"hideThrobber",data:{nodes:f}})},showErrors:function(m,l){var n,f,p;for(n=0;this.errorList[n];n++){p=this.errorList[n];var g=p.element.tagName=="SELECT"?"A selection is":"This field is";switch(p.method){case"required":p.message=p.element.type!="checkbox"?g+" required.":"You must check at least one option to continue.";break;case"equalTo":p.message="Confirm value does not match actual value.";break;case"date":p.message="Please use the mm/dd/yyyy format.";break;case"max":p.message.replace("value","number");break;case"min":p.message.replace("value","number");break}var h=d.select(p.element).parent();d.select(h).prev().addClass(this.settings.errorHighlightClass);var o=document.createElement("input");if(!("placeholder" in o)){if(d.select(p.element).hasClass("create-placeholder")){d.select(p.element).prev().addClass("error")}}if(this.settings.highlight){this.settings.highlight.call(this,p.element,this.settings.errorClass,this.settings.validClass)}p.message="<p>"+p.message+"</p>";this.showLabel(p.element,p.message)}if(this.errorList.length&&d.select("form.accordion").length>0){this.toShow=this.toShow.add(this.containers);var j=d.select(".error-header",("form.accordion"));if(d.select(j).length>0){for(var n=0;n<j.length;n++){if(d.select(j[n]).parent(".accordion-panel").find(".error").length>0){d.select(j[n]).html("<p>Please correct the items marked below to continue.</p>");d.select(j)[n].style.display="block";d.select(j[n]).parent(".accordion-panel").addClass("accordion-panel-open").removeClass("accordion-panel-disabled");d.select(j[n]).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 j=d.select(".error-header",this.currentForm);if(d.select(j).length){d.select(j).html("<p>Please correct the items marked below to continue.</p>");d.select(j)[0].style.display="block"}}else{d.select(".error-header",this.currentForm).hide()}}if(this.settings.unhighlight){for(n=0,f=this.validElements();f[n];n++){var h=d.select(f[n]).parent();if(d.select(h).hasClass(this.settings.verticalGroupClass)){d.select(h).prev().find(".error-wrapper").css("display","none")}else{d.select(f[n]).siblings(".error-wrapper").css("display","none")}d.select(h).prev().removeClass(this.settings.errorHighlightClass);this.settings.unhighlight.call(this,f[n],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},errorPlacement:function(f,g){errorPlacementDiv=d.select(g).parents().eq(0);if(d.select(errorPlacementDiv).hasClass(this.verticalGroupClass)){d.select(errorPlacementDiv).prev().append(f)}else{if(d.select(errorPlacementDiv).hasClass("group-choice")){d.select(errorPlacementDiv).parent().append(f);d.select(f).css("display","inline-block")}else{d.select(errorPlacementDiv).append(f);d.select(f).css("display","inline-block")}}}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.DatePicker",function(e){var d;var b="input.date-picker";var c;return{init:function(){console.log("INIT DatePicker.js");d=this;e.subscribe({DatePicker:d.displayDatePicker});if(window.matchMedia){c=window.matchMedia("(orientation : portrait)").matches?e.select(window).width()<768&&e.select(window).height()>768:e.select(window).width()>768&&e.select(window).height()<600}},execute:function(){console.log("EXEC DatePicker.js");d=this;e.select("body").on("content-loaded",b,function(f){e.publish({type:"DatePicker",data:this})})},displayDatePicker:function(l){var j=["SUN","MON","TUE","WED","THU","FRI","SAT"];this.monthsAhead=60;var n=(this.monthsAhead+1)*31;l.today=new Date();var r=new Date(l.today.getFullYear(),l.today.getMonth(),l.today.getDate());todayPlusDays=(typeof dpTodayPlusDays!="undefined")?dpTodayPlusDays:0;daysToDueDate=(typeof dpDaysToDueDate!="undefined")?dpDaysToDueDate:n;plusDays=(typeof dpPlusDays!="undefined")?dpPlusDays:n;disableDays=(typeof dpdisableDays!="undefined")?dpdisableDays:null;dueDate=new Date(r.setDate(r.getDate()+daysToDueDate));endDate=new Date(r.setDate(r.getDate()+plusDays));var g=new Date();l.nowDay=(g.getDate()+todayPlusDays);var m=new Date(l.today.getFullYear(),l.today.getMonth(),l.nowDay);if(e.select(l).hasClass("ecomm-date")){$.noConflict(true)}function o(t){if(daysToDueDate==0){return[true,""]}if(t-dueDate==0){return[true,"ui-datepicker-due-date"]}return[true,""]}var f=["9-5-2015","14-5-2015","15-5-2015","5-5-2015","30-4-2015","11-5-2015"];function p(u){if(disableDays!=null&&disableDays.length>0){var t=u.getDay();if($.inArray(t,disableDays)!=-1){return[false,""]}else{return[true,""]}}if(!e.typeEqual(window.dpEnableDates,"undefined")){return q(u)}else{if(daysToDueDate!=n){return o(u)}}return h(u)}function q(t){var u=t.getDate()+"-"+(t.getMonth()+1)+"-"+t.getFullYear();if(e.inArray(u,window.dpEnableDates)>=0){return[true]}else{return[false]}}function h(t){if(f!=null&&f.length>0){var u=t.getDate()+"-"+(t.getMonth()+1)+"-"+t.getFullYear();if(e.inArray(u,f)<0){return[true,""]}else{return[false,""]}}}e.select(l).datepicker({numberOfMonths:1,dayNamesMin:j,maxDate:endDate,beforeShowDay:p,showOtherMonths:true,minDate:m,onClose:function(){if(e.select(".pro-date").length>0||e.select(".mpro-date").length>0){e.publish({type:"DatePickerModifier"})}if(e.select(".datepicker-modal-component").attr("style")!=undefined){e.select(this).data("datepicker").inline=false}if(e.select(window).width()<768){if(event.target.closest(".datepicker-modal-component")!=null){window.setTimeout(function(){e.select("#ui-datepicker-div").css({display:"block"})},400)}else{e.select(".datepicker-modal-component").css({display:"none"})}}},onSelect:function(D,B){var C=this.id;e.select(C).datepicker("option","dayNamesMin");var t=C.match(/(.*?)-start/);var F=C.match(/(.*?)-end/);if(F){var z=e.select("#"+F[1]+"-start");var w=z.val();var v=Date.parse(z[0].value);var y=$.datepicker.formatDate("mm/dd/yy",new Date(l.today));if(isNaN(v)==false){e.select("#"+F[1]+"-end").datepicker("option","minDate",w)}else{e.select("#"+F[1]+"-end").datepicker("option","minDate",y)}}if(t&&F){var A=e.select("#"+t[1]+"-end");var u=Date.parse(A[0].value);var z=e.select("#"+t[1]+"-start");var v=Date.parse(z[0].value);var E;if(isNaN(u)){E=D}else{if(new Date(D)>new Date(u)){E=D;if(!isNaN(v)){var E=new Date(E);E.setDate(E.getDate()+Math.abs((u-Date.parse(z[0].value))/(1000*60*60*24)))}}else{E=new Date(u)}}if(!isNaN(v)){A[0].value=$.datepicker.formatDate("mm/dd/yy",new Date(E))}}if(e.select(".datepicker-modal-component").attr("style")!=undefined){e.select(this).data("datepicker").inline=true;if(window.matchMedia){if(c&&window.matchMedia("(orientation : landscape)").matches){e.select(this).data("datepicker").inline=false}}}e.publish({type:"DatePickerSelect",data:this})},beforeShow:function(C,A){var B=this.id;var D=B.match(/(.*?)-end/);if(D){var y=e.select("#"+D[1]+"-start");var v=y.val();var u=Date.parse(y[0].value);var z=$.datepicker.formatDate("mm/dd/yy",new Date(l.today));if(isNaN(u)==false){e.select("#"+D[1]+"-end").datepicker("option","minDate",v)}else{e.select("#"+D[1]+"-end").datepicker("option","minDate",z)}}var w=e.select("#"+B).offset();var E=e.select("#"+B).height();var t=e.select("#"+B).width();window.setTimeout(function(){e.select(A.dpDiv).css({top:(w.top+E-185)+"px",left:(w.left+t+50)+"px"})},1);if(e.select(".pro-date").length>0||e.select(".mpro-date").length>0){e.publish({type:"DatePickerModifier"})}e.publish({type:"MobileDatePickerModal"})}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.FocusManager",function(d){var c;var b;return{init:function(){c=this;d.subscribe({FocusManager:c.manageFocusableItems})},execute:function(){console.log("EXEC FocusManager.js")},manageFocusableItems:function(g){var e="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";var h=d.select(g.container).find("*");b=h.filter(e).filter(":visible");var f=d.select(document.activeElement);var l=b.length;var j=b.index(f);if(g.event.keyCode==9){if(g.event.shiftKey){if(j==0){b.get(l-1).focus();g.event.preventDefault()}}else{if(j==l-1){b.get(0).focus();g.event.preventDefault()}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.FormValidation",function(f){var d;var b="form";var e=30000;var c;return{init:function(){console.log("INIT FormValidation.js")},execute:function(){console.log("EXEC FormValidation.js");d=this;f.select("body").on("content-loaded",b,function(h){h.stopPropagation();var g=f.select(this);f.publish({type:"CustomizeValidation",data:{formObj:g}})});f.select("body").on("click","input[type='submit']",function(h){if(f.select(this).parents(".pf-header-wrapper").length>0){return}if(enableButtonThrobber!=false){var g=f.select(this);d.loadThrobber(g,h)}});if(f.typeEqual(window.enableButtonThrobber,"undefined")){enableButtonThrobber=true}},loadThrobber:function(h,g){if(h.hasClass("loading-wrapper-active")){f.preventDefault(g);return}if(h.parents(".ajax-form-submit").length==0){if(h.prop("tagName").toLowerCase()=="input"){d.showThrobber(h);c=setTimeout(function(){d.hideThrobber(h)},e);window.buttonThrobberTimer=c}}},showThrobber:function(g){f.publish({type:"showThrobber",data:{nodes:g}})},hideThrobber:function(g){clearTimeout(c);f.publish({type:"hideThrobber",data:{nodes:g}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.GoogleMapAutoPopulateAddress",function(e){var d;var b=".autocomplete-address";var c;return{init:function(){console.log("INIT GoogleMapAutoPopulateAddress.js");d=this;e.subscribe({AutoCompleteAddress:d.getAutoCompleteAddressConfigs})},execute:function(){console.log("EXEC  GoogleMapAutoPopulateAddress.js");d=this;e.select("body").on("content-loaded autocomplete-address",b,function(f){e.publish({type:"AutoCompleteAddress",data:this})})},getAutoCompleteAddressConfigs:function(){var q=[];var f=[];var m=[];var o=e.select(".autocomplete");var p=e.select("input.postal-code");var r=e.select("input.city-name");var n=e.select("input.state-name");for(var h=0;h<o.length;h++){e.select(o[h]).addClass("google-target-"+h);e.select(p[h]).addClass("google-target-zip-"+h);e.select(r[h]).addClass("google-target-city-"+h);e.select(n[h]).addClass("google-target-state-"+h)}for(var l=0;l<o.length;l++){q[l]=e.select(".autocomplete")[l];m[l]=e.select(".autocomplete-dummy")[l];var g=e.select(".autocomplete-hidden");var t={types:["geocode"],componentRestrictions:{country:"us"}};f[l]=new google.maps.places.Autocomplete(q[l],t);google.maps.event.addListener(f[l],"place_changed",function(){var D=e.select(".autocomplete");for(k=0;k<D.length;k++){var y=$(c).hasClass("google-target-"+k);if(y==true){break}}var z=e.select(".autocomplete").slice(k,k+1);var u=e.select(".autocomplete-dummy").slice(k,k+1);var A=e.select(".autocomplete-hidden").slice(k,k+1);var w=e.select(c).attr("class");var J=new RegExp("\\bautocomplete\\b");var K=w.match(J)[0];var C;if(K=="autocomplete"){z.css({display:"inline-block"});z.removeClass("ignore-validation");u.css({display:"none"});u.addClass("ignore-validation");if((u.val()!="")&&!(u.hasClass("error"))){z.removeClass("error")}C=f[k].getPlace()}else{C=f[k].getPlace();u.css({display:"inline-block"});u.removeClass("ignore-validation");z.css({display:"none"});z.addClass("ignore-validation");if(z.hasClass("error")){u.addClass("error")}if((z.val()!="")&&!(z.hasClass("error"))){u.removeClass("error")}C=m[k].getPlace()}A.attr("value",e.select(c).val());if(C!=undefined){var G=C.address_components;var F=null;var j=null;var N=null;var M=null;var v=null;e.select(G).each(function(Q,P){if(P.types[0]=="route"){F=P.long_name}if(P.types[0]=="street_number"){j=P.long_name}if(P.types[0]=="postal_code"){N=P.long_name}if(P.types[0]=="locality"){M=P.long_name}if(P.types[0]=="administrative_area_level_1"){v=P.short_name}});if(j!=null&&F!=null){if(z.css("display")=="inline-block"){z.val(j+" "+F)}else{u.val(j+" "+F)}A.val(j+" "+F)}else{if(j==null&&F!=null){if(z.css("display")=="inline-block"){z.val(F)}else{u.val(F)}A.val(F)}else{if(j!=null&&F==null){if(z.css("display")=="inline-block"){z.val(j)}else{u.val(j)}A.val(F)}else{if(z.css("display")=="inline-block"){z.val("")}else{u.val("")}A.val("")}}}var B="google-target-zip-"+k;var I=e.select("."+B);I.val(N);var L="google-target-city-"+k;var E=e.select("."+L);E.val(M);var O="google-target-state-"+k;var H=e.select("."+O);H.val(v)}e.publish({type:"autoFillActionComplete",data:{}})})}e.select("body").on("keypress",".autocomplete",function(j){if(j.keyCode==13){e.preventDefault(j);c=this;e.select(c).blur()}});e.select("body").on("keypress",".autocomplete-dummy",function(j){if(j.keyCode==13){e.preventDefault(j);c=this;e.select(c).blur()}});e.select("body").on("blur",".autocomplete",function(j){g.val(e.select(".autocomplete").val());c=this});e.select("body").on("blur",".autocomplete-dummy",function(j){g.val(e.select(".autocomplete-dummy").val());c=this});e.publish({type:"autoFillActionComplete",data:{}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Hero",function(c){var b;return{init:function(){console.log("INIT Hero.js")},execute:function(){console.log("EXEC Hero.js");b=this;if(c.select(".hero-block").length>1){b.checkHeroTabs();c.select(".hero-block").closest(".flexslider").addClass("carousel-controls-offset");c.select(".hero-block").has(".mobile-only .button").addClass("hero-button-offset")}else{return}c.select(".hero-block").on("click",".position-content, a",function(d){b.handleHeroNavigation(this,d)})},checkHeroTabs:function(){if(window.matchMedia&&window.matchMedia("all").addListener){var d=window.matchMedia("(max-width: 767px)");b.toggleHeroTabs(d);d.addListener(b.toggleHeroTabs)}},toggleHeroTabs:function(d){if(d.matches){c.select(".hero-tabs ol.flexslider-controls").removeClass("flexslider-controls").addClass("flex-control-nav")}else{c.select(".hero-tabs ol.flex-control-nav").removeClass("flex-control-nav").addClass("flexslider-controls")}},handleHeroNavigation:function(g,j){var h=c.select(g).closest(".hero-block").find(".hero-image");var f=c.select(h).attr("href");var d=c.select(h).attr("target")||"_self";if(f){j.preventDefault();j.stopPropagation();if(c.select(g).is("a")){f=c.select(g).attr("href");if(!f){f=c.select(h).attr("href")}}window.open(f,d)}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.HideMaxListItems",function(d){var b=".hide-max-items";var c;return{init:function(){console.log("INIT HideMaxListItems.js");c=this;d.subscribe({Orientation:function(){d.select(b).trigger("content-loaded")}})},execute:function(){console.log("EXEC HideMaxListItems.js");c=this;d.select("body").on("content-loaded",b,function(f){var e;if(window.matchMedia&&window.matchMedia("all").addListener){e=window.matchMedia("(max-width: 767px)").matches}d.select(b).each(function(){var h=d.select(this);var g=h.data("maxItemsDisplay");if((g=="desktop"&&!e)||g=="all"){c.displayList(h)}else{if(g=="mobile"&&e){c.displayList(h)}else{c.removeList(h)}}})})},displayList:function(l){var n;var h=l.data("maxItems")||"3";var f=l.data("moreText")||"Read More";var e=l.data("lessText")||"Read Less";var m=600;var j="<div class='col-content maxlist-more'><a href='#'></a></div>";var g=l.children("li").length;if(g>0&&m>0){n=Math.round(m/g);if(n<1){n=1}}else{n=0}if((g>0)&&(g>h)&&(l.next(".maxlist-more").length<=0)){l.children("li").each(function(o){if((o+1)>h){d.select(this).hide(0)}});l.after(j);l.next(".maxlist-more").children("a").html(f);l.next(".maxlist-more").children("a").click(function(q){var p=d.select(this).parent().prev("ul, ol").children("li");p=p.slice(h);if(d.select(this).html()==f){d.select(this).html(e);var o=0;(function(){d.select(p[o++]||[]).slideToggle(n,arguments.callee)})()}else{d.select(this).html(f);var o=p.length-1;(function(){d.select(p[o--]||[]).slideToggle(n,arguments.callee)})()}q.preventDefault()})}},removeList:function(e){d.select("li",e).css("display","");e.next().remove()},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.InputMask",function(c){var b="*[data-mask]";return{init:function(){console.log("INIT InputMask.js")},execute:function(){console.log("EXEC InputMask.js");c.select("body").on("content-loaded",b,function(d){c.select(this).each(function(){var e=c.select(this),f={},g="data-mask-";if(e.attr(g+"reverse")==="true"){f.reverse=true}if(e.attr(g+"maxlength")==="false"){f.maxlength=false}if(e.attr(g+"clearifnotmatch")==="true"){f.clearIfNotMatch=true}e.mask(e.attr("data-mask"),f)})})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.LoadingThrobber",function(d){var b="loading-wrapper-active";var c;return{init:function(){console.log("INIT LoadingThrobber.js");c=this;d.subscribe({showThrobber:c.showThrobber,hideThrobber:c.hideThrobber})},execute:function(){console.log("EXEC LoadingThrobber.js");c=this},showThrobber:function(e){if(a.utils.typeEqual(e.nodes,"string")){e.nodes=d.select(e.nodes)}if(a.utils.typeEqual(e.className,"string")){b=e.className}if(e.display!=null){d.select("<div class='ajax-modal-underlay'></div>").appendTo("body");d.select('<div class="ajax-modal-wrapper-active"><div class="loader"></div></div>').appendTo("body");if(e.message!=null){d.select("<p>"+e.message+"</p>").appendTo(".ajax-modal-wrapper-active")}else{d.select(".ajax-modal-wrapper-active .loader").css("top","0")}}else{if(e.message!=null){d.select('<p class="col-reset">'+e.message+"</p>").appendTo(d.select(".loader",e.nodes))}e.nodes.addClass(b);if(d.select(window).height()<e.nodes.height()){d.select(".loader",e.nodes).css("backgroundPosition","center "+((d.select(window).height()-e.nodes.offset().top)/2)+"px")}else{d.select(".loader",e.nodes).css("backgroundPosition","center center")}}},hideThrobber:function(e){if(a.utils.typeEqual(e.nodes,"string")){e.nodes=d.select(e.nodes)}if(a.utils.typeEqual(e.className,"string")){b=e.className}if(e.display!=null){d.select(".ajax-modal-wrapper-active").remove();d.select(".ajax-modal-underlay").remove()}else{e.nodes.find(".loader > p").remove();e.nodes.removeClass(b)}d.select(".loader",e.nodes).css("backgroundPosition","center top")},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.LoginCookie",function(d){var b=d.select("form[name='sign-in']");var c;var e="loginCookie";return{init:function(){},execute:function(){console.log("EXEC LoginCookie.js");c=this;d.select("body").on("submit",function(g){if(d.select(g.target).attr("name")!="sign-in"){return}c.generateCodedName(g)});var f={};f[e]=c.setCookie;d.subscribe(f)},generateCodedName:function(f){var g;if(dummy=d.select("input[name='username']:first")[0]){g=d.select("input[name='username']:first",f.target)[0].value}if(dummy=d.select("input[name='USER']:first")[0]){g=d.select("input[name='USER']:first",f.target)[0].value}d.publish({type:"Base64",data:{id:"loginCookie",type:"encode",data:g,context:f.target}})},setCookie:function(l){if(l!=undefined){var j=new Date();j.setTime(j.getTime()+(365*24*60*60*1000));var h="; expires="+j.toGMTString();var g="; expires="+new Date(0).toGMTString();var f=d.select("input[name='rememberme']:first",l.context)[0];if(f.checked==true){if(navigator.cookieEnabled){document.cookie="cox-rememberme-user="+l.value+h+"; path=/"}}else{document.cookie="cox-rememberme-user="+l.value+g+"; path=/"}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.MobileDatePickerModal",function(d){var c;var b;return{init:function(){console.log("INIT MobileDatePickerModal.js");c=this;d.subscribe({MobileDatePickerModal:c.startExecution,Orientation:c.resetDatePicker});if(window.matchMedia){b=window.matchMedia("(orientation : portrait)").matches?d.select(window).width()<768&&d.select(window).height()>768:d.select(window).width()>768&&d.select(window).height()<600}},execute:function(){},startExecution:function(){d.select("body").on("click",".date-picker",function(e){if(d.select(window).width()<767){if(d.select(".datepicker-modal-component").attr("style")===undefined){d.select("#ui-datepicker-div").wrap("<div class='datepicker-modal-component' style='width: 100%; height: auto; left: 0px; display: block;'></div>");d.select("#ui-datepicker-div").wrap("<div class='datepicker-modal-component-content'></div>");d.select("<div class='datepicker-modal-component-title'>Pick Your Date</div>").insertBefore(".datepicker-modal-component-content");d.select("<div class='datepicker-modal-component-head'><span title='Close' class='date-modal-close'></span></div>").insertBefore(".datepicker-modal-component-title");d.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>")}if(d.select("#ui-datepicker-div").css("display")=="none"){d.select("#ui-datepicker-div").css("display","block")}if(b){var g=(d.select(window).height()<d.select(".datepicker-modal-component").height())?"auto":d.select(window).height()+"px";d.select(".datepicker-modal-component").css({height:g})}var f=d.select(window).scrollTop();d.select(".datepicker-modal-component").css({display:"block",top:f})}});d.select("body").on("click",".date-modal-button",function(e){e.preventDefault();d.select(".datepicker-modal-component").css({display:"none"})});d.select("body").on("click",".date-modal-close",function(e){d.select(".date-picker").val("");d.select(".datepicker-modal-component").css({display:"none"})});d.select("body").on("click",".date-picker",function(e){if(b){d.select(".datepicker-modal-component").css({display:"block"})}});d.select("html").on("click",function(f){if(d.select(window).width()<767){var e=d.select(f.target);if(d.select(".datepicker-modal-component").css("display")=="block"&&!(e.is(".date-picker, .ui-datepicker-next, .ui-datepicker-prev"))&&e.closest(".datepicker-modal-component").length==0){d.select(".datepicker-modal-component").hide()}}})},resetDatePicker:function(e){if(b){if(e.orientation=="landscape"){d.select(".date-modal-close").trigger("click")}else{if(d.select(".datepicker-modal-component").length>0){d.select(".datepicker-modal-component").css("display","none")}else{d.select("#ui-datepicker-div").css("display","none")}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Modal",function(f){var e;var d;var g;var b;var c;return{init:function(){console.log("INIT Modal.js");e=this;f.subscribe({Orientation:e.positionModal})},execute:function(){console.log("EXEC Modal.js");e=this;f.select("body").on("click",".cms-modal-trigger",function(p){g=12;p.preventDefault();if(d){f.select(".cms-dialog").remove();d=null}var q;var t=false;if(f.select(this).attr("data-content-element")!=null){q=" #"+f.select(this).attr("data-content-element");t=true}else{q=this.href}b=q;var o=f.select(this).data("modalWidth")||"1010";c=f.select(this).data("hideCloseBtn");var r=f.select(this).data("modalTheme");switch(o){case 850:g="10";break;case 690:g="8";break;default:break}var j=(t==false)?f.select("<div>"):((f.select(q).length==0)?f.select("<div>"):f.select(q));d=j.dialog({open:function(){if(t==false){f.select(this).load(q,function(w,v,y){if(v=="success"){e.positionModal(o)}if(v=="error"){f.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")}})}else{if(f.select(q).length==0){f.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")}f.select(".cms-dialog").css("position","absolute");var u=f.select(window).scrollTop();if((f.select("body").attr("data-layout")=="desktop")&&(f.select(".cms-dialog").height()<f.select(window).height())){u=u+((f.select(window).height()-f.select(".ui-dialog").height())/2)}f.select(".cms-dialog").css("top",u)}},buttons:[{text:"Close",click:function(){f.select(".ui-dialog-content").removeClass("colspan-"+g);f.select(".cms-dialog").remove()}}],dialogClass:"cms-dialog cols-grid",close:function(){f.select(".ui-dialog-content").removeClass("colspan-"+g);f.select(".cms-dialog").remove()},resizable:false,draggable:false,height:"auto",modal:true,width:o});if(r){f.select(".ui-dialog").addClass(r)}else{f.select(".ui-dialog").removeClass("dark")}if(c){e.hideCloseButton()}f.select(".ui-dialog-content").addClass("colspan-"+g);f.select(".ui-dialog-buttonset").find(".ui-button").addClass("button btn-close").removeClass("ui-widget ui-state-default ui-corner-all ui-button-text-only");if(t==true){e.positionModal(o);var m=f.select(".all-plans",l);var h=f.select(q).find(".offer-comparison-container")[0];if(f.select(".cms-dialog").find(".slick-carousel")[0]){var l=f.select(".cms-dialog").find(".slick-carousel");if(l.hasClass("slick-initialized")){l.slick("unslick")}f.publish({type:"ReinitializeSlick",data:l})}var n=f.select(".modal-inline-content").find(".section-container")[0];if(n){f.publish({type:"RealignContainerItems",data:n})}if(h){f.publish({type:"RecalculateTable",data:h});f.select(h).append(m)}}});f.select("body").on("click",".btn-close, .ui-widget-overlay",function(h){f.select(".ui-dialog-content").removeClass("colspan-"+g);f.select(".cms-dialog").remove();f.select(".ui-widget-overlay").remove();h.stopPropagation()});f.select("body").on("keyup",function(h){if(h.keyCode==27){if(c){f.select(".ui-dialog-content").removeClass("colspan-"+g);f.select(".cms-dialog").remove();f.select(".ui-widget-overlay").remove()}}});f.select(".cms-auto-launch.cms-modal-trigger").click()},hideCloseButton:function(){f.select(".ui-dialog-buttonpane").css("display","none")},positionModal:function(h){var m="";var j=f.select(".cms-dialog").css("border-top");var l=f.select(".cms-dialog .ui-dialog-content").css("margin-top");f.select(".cms-dialog").css("position","absolute");if(window.matchMedia){if(window.matchMedia("(max-width: 767px)").matches){m=" top"}if(window.matchMedia("(min-width: 768px) and (max-width: 959px)").matches&&(f.select(".cms-dialog").length>0)){if(f.select(".cms-dialog .ui-dialog-content").hasClass("colspan-12")||f.select(".cms-dialog .ui-dialog-content").hasClass("colspan-10")){f.select(".cms-dialog").css({width:"100%"})}}}f.publish({type:"ModalLoaded",data:b});setTimeout(function(){if(f.select(".cms-dialog").height()>f.select(window).height()){m=" top"}f.select(".cms-dialog").position({my:"center"+m,at:"center"+m,of:window})},100);f.select(window).resize(function(n){if(f.select(".cms-dialog").height()>f.select(window).height()){m=" top"}f.select(".cms-dialog").position({my:"center"+m,at:"center"+m,of:window});if(window.matchMedia){if(f.select(".cms-dialog").length>0){if(window.matchMedia("(max-width: 767px)").matches){f.select(".cms-dialog").css({top:0})}else{if(window.matchMedia("(min-width: 768px) and (max-width: 959px)").matches&&(f.contains(f.select(".cms-dialog")[0],f.select(".ui-dialog-content.colspan-12")[0])||f.contains(f.select(".cms-dialog")[0],f.select(".ui-dialog-content.colspan-10")[0]))){f.select(".cms-dialog").css({width:"100%","border-left":0,"border-right":0})}else{f.select(".cms-dialog").css({width:h,"border-left":j,"border-right":j})}}}}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.ModalOpenClose",function(h){var d;var b;var g;var e;var j;var f=".auto-launch";var l;var c={container:h.select(".dialog-component-content"),type:"GET",dataType:"text",timeout:"30000",cache:false,throbber:{type:"showThrobber",data:{nodes:h.select(".dialog-component-content").closest(".loading-wrapper")}}};return{init:function(){console.log("INIT ModalOpenClose.js");j=this;h.subscribe({Modal:j.modalHandler,Orientation:j.resetModalDimensions})},execute:function(){console.log("EXEC ModalOpenClose.js");j=this;j.modalOptions();h.select("body").on("content-loaded",f,function(m){var n=h.select(this);j.modalOptions(m,h.select(n),{enabled:true,initialX:window.scrollX,initialY:window.scrollY,initialWidth:n.attr("data-modal-width")});h.publish({type:"Modal",data:l});j.trackModalLaunch(n);h.select(".dialog-component-content").attr("tabindex",-1).focus()});h.select("body").on("click touchstart",".modal-trigger",function(m){b=h.select(this);m.stopPropagation();h.preventDefault(m);j.modalOptions(m,b,{enabled:true,initialX:window.scrollX,initialY:window.scrollY,initialWidth:b.attr("data-modal-width")});h.publish({type:"Modal",data:l});j.trackModalLaunch(b);h.select(".dialog-component-content").attr("tabindex",-1).focus()});h.select("body").on("click","#underlay, .btn-icon-close, .btn-close",function(n){var o=l.launcher;var m=false;b=h.select(this);n.stopPropagation();h.preventDefault(n);if(l.disableClose&&(b.parent(".dialog-component-buttons").length==0)){m=true}j.modalOptions(n,b,{enabled:m,disableClose:l.disableClose});h.publish({type:"Modal",data:l});if(m!=true){h.select(o).focus()}h.select(".dialog-component-content").removeAttr("tabindex")});h.select("body").on("keydown",".dialog-component",function(m){if(m.keyCode==27){if(l.disableClose==false){h.select(".btn-close").trigger("click")}}else{h.publish({type:"FocusManager",data:{container:this,event:m}})}})},modalHandler:function(o){console.log("     ModalOpenClose.modalHandler");l=o;if(h.select("#underlay").length==0){e=h.select("<div></div>",{id:"underlay",tabindex:"-1"}).appendTo("body")}else{e=h.select("#underlay")}if(o.containers.length==0){d=h.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")}else{d=o.containers}if(o.content.length==0){g=h.select(".dialog-component-content")}else{g=o.content}d.addClass(o.classes);l.containers=d;l.content=g;if(o.disableClose){h.select(".dialog-component-head").addClass("disable-close");h.select(".dialog-component-head a").removeAttr("href");h.select(".dialog-component-head a").removeClass("btn-close")}else{h.select(".dialog-component-head").removeClass("disable-close");h.select(".dialog-component-head a").attr("href","#");h.select(".dialog-component-head a").addClass("btn-close")}if(o.enabled){h.select("#pf-container").addClass("no-print");e.css("display","block");if(typeof o.source=="string"){if(o.launcher.filter("[id!='underlay']").length>0){h.publish({type:"Ajax",data:a.extendObj(c,{container:o.content,url:o.source,throbber:{data:{nodes:h.select(".dialog-component-content").closest(".loading-wrapper")}}})})}}else{if(o.launcher.filter("[id!='underlay']").length>0){h.publish({type:"showThrobber",data:{nodes:h.select(".dialog-component-content").closest(".loading-wrapper")}})}g.append(o.source);if(h.select(".dialog-component-content").closest(".loading-wrapper-active").length>0){h.publish({type:"hideThrobber",data:{nodes:h.select(".dialog-component-content").closest(".loading-wrapper-active")}})}}if(o.title!=""){h.select(".dialog-component-title",d).text(o.title)}if(h.select("body.IE").length==0){h.select("body").css("overflowX","hidden")}else{h.select("html").css("overflowX","hidden")}var u={};var n=0;u.w=h.select(window).width();u.h=h.select(window).height();n=h.select(window).scrollTop()+h.select(window).height();(h.select(window).width()<o.initialWidth)?d.css("width",o.width+"%"):d.css("width",o.initialWidth+"px");d.css("height",(o.height==-1)?"auto":o.height+"px");var q=Math.round((u.h/2)-(d.height()/2));var r=Math.round((u.w/2)-(d.width()/2));if(q<0||d.height()<u.h&&!(l.isMobile)){q=((d.height()>u.h)&&(n-u.h/2<d.height()/2))?0:n-u.h/2-d.height()/2}d.css("top",q+"px");d.css("left",r+"px");d.css("display","block");var p=(h.select(".dialog-component").height()>h.select(window).height())?h.select(".dialog-component").height()+"px":h.select(window).height()+"px";p=(parseInt(p)>h.select("body").height()+h.select(window).scrollTop()/2)?p:h.select("body").height()+h.select(window).scrollTop()/2+"px";e.css("height",p);h.select(document).ajaxComplete(function(A,z,w){var v=(h.select(window).height()/2)-(d.height()/2);if(v<0||d.height()<h.select(window).height()&&!(l.isMobile)){v=((d.height()>h.select(window).height())&&(n-u.h/2<d.height()/2))?0:n-u.h/2-d.height()/2}d.css("top",v+"px");var y=(h.select(".dialog-component").height()>h.select(window).height())?h.select(".dialog-component").height()+"px":h.select(window).height()+"px";y=(parseInt(y)>h.select("body").height()+h.select(window).scrollTop()/2)?y:h.select("body").height()+h.select(window).scrollTop()/2+"px";e.css("height",y)});if(o.isMobile==true){var m=h.select(".dialog-component").height();e.css("height",m);h.select("#pf-container").css("display","none");window.scrollTo(0,0)}if(h.select("iframe",e).length!=0){var t=h.select("iframe",e);t.css("top",d.offset().top+"px");t.css("left",d.offset().left+"px");t.css("width",d.outerWidth()+"px");t.css("height",d.outerHeight()+"px")}}else{h.publish({type:"hideThrobber",data:{nodes:h.select(".dialog-component-content").closest(".loading-wrapper-active")}});h.select("#pf-container").removeClass("no-print");g.html("");g.css("height","");h.select(".dialog-component-title",d).text("");l.title="";e.css("display","none");d.removeClass().addClass("dialog-component loading-wrapper");d.css("display","none");if(o.isMobile==true){h.select("#pf-container").css("display","block");e.css("height","auto");window.scrollTo(l.initialX,l.initialY)}if(h.select("body.IE").length==0){h.select("body").css("overflowX","auto")}else{h.select("html").css("overflowX","auto")}j.modalOptions()}h.select("[aria-hidden]").each(function(){if(h.select(this).attr("aria-hidden")=="true"){h.select(this).attr("aria-hidden","false")}else{if(h.select(this).attr("aria-hidden")=="false"){h.select(this).attr("aria-hidden","true")}}})},modalOptions:function(o,q,n){if(arguments.length==0){l={enabled:true,requestId:null,event:null,launcher:null,containers:null,content:null,source:null,title:"",width:564,height:-1,classes:"",disableClose:false,isMobile:false,initialX:0,initialY:0,initialWidth:0,hasDualLayout:false};return}else{l.event=o;l.launcher=q;l.containers=h.select(".dialog-component");l.content=h.select(".dialog-component-content");l.isMobile=(h.select(window).width()<768);var m=false;if(window.matchMedia){l.hasDualLayout=window.matchMedia("(orientation : portrait)").matches?h.select(window).width()<768&&h.select(window).height()>768:h.select(window).width()>768&&h.select(window).height()<600}if(l.launcher.attr("data-content-element")!=null){l.source=h.select("#"+l.launcher.attr("data-content-element")).clone(true);m=true}else{if(l.launcher.attr("href")!=null){var p=l.launcher[0].pathname;p=p.replace(/^\//g,"");p=p.replace(/\//g,"-");p=p.replace(".","\\.");p=p.replace(";","");p=p.replace("=","");if(h.select("#"+p).length==0){l.source=l.launcher.attr("href")}else{l.source=h.select("#"+p).clone(true);m=true}}}if(m==true){formElement=l.source.find("form")[0];if(formElement!=undefined){h.select(formElement).data("validator").currentForm=formElement}}l.title=l.launcher.attr("data-modal-title")!=null?l.launcher.attr("data-modal-title"):l.title;l.width=l.launcher.attr("data-modal-width")!=null?parseInt(l.launcher.attr("data-modal-width")):l.width;l.height=l.launcher.attr("data-modal-height")!=null?parseInt(l.launcher.attr("data-modal-height")):l.height;l.classes=l.launcher.attr("data-modal-class")!=null?l.launcher.attr("data-modal-class"):"";l.disableClose=l.launcher.attr("data-disable-close")=="true"?true:false;if(l.width>h.select(window).width()){l.width="100"}if(arguments.length==3){a.extendObj(l,n)}}},trackModalLaunch:function(o){if(typeof(__coxOmnitureParams)!="undefined"&&typeof(s_account)!="undefined"&&s_account!=""){var m=__coxOmnitureParams?__coxOmnitureParams.pageName+":":"";var q=__coxOmnitureParams?__coxOmnitureParams.hier1+",":"";var p=__coxOmnitureParams?__coxOmnitureParams.hier2+",":"";var n=__coxOmnitureParams?__coxOmnitureParams.localeName+":":"";var o=(o)[0];var r=l.title.toLowerCase()||o.innerHTML.toLowerCase();if(r){h.publish({type:"OmnitureInterface",data:{mode:"track",type:"pageview",clearVariables:"true",options:{pageName:m+r,hier1:q+r,hier2:p+r,localePagename:n+m+r}}})}}},resetModalDimensions:function(o){if(d!=undefined&&d.is(":visible")){if(h.select(window).width()>=768){if(d.width()>h.select(window).width()){d.css("width","100%")}else{d.css("width",l.initialWidth+"px");var p=h.select(window).width()/2-d.width()/2;d.css("left",p+"px")}var m=h.select(window).height();var n=m/2-d.height()/2;if(n<0||d.height()<m){n=((d.height()>m)&&(h.select(window).scrollTop()+m/2<d.height()/2))?0:h.select(window).scrollTop()+m/2-d.height()/2}d.css("top",n+"px")}if(l.hasDualLayout){h.select("#pf-container").css("display",(o.orientation=="portrait")?"none":"block");h.select("#underlay").css("height",((o.orientation=="portrait")?h.select(".dialog-component").height():h.select("body").height())+"px");if(o.orientation=="landscape"){n=l.launcher.offset().top+m/2-d.height()/2;d.css("top",n+"px");setTimeout(function(){window.scrollTo(0,l.launcher.offset().top)},1)}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.MultiPaneAjax",function(f){var g;var d=".multi-ajax";var c={add:"Add",remove:"Remove"};var h={};var l={};var j={type:"GET",dataType:"text",parameters:""};var b;var e=true;return{init:function(){console.log("INIT MultiPaneAjax.js");g=this;f.subscribe({MultiAjaxStatus:g.updateAjaxStatus})},execute:function(){console.log("EXEC MultiPaneAjax.js");g=this;f.select("body").on("click",d,function(n){b=f.select(this);if(b.hasClass("disabled")){return}var o=f.select(this).data("multiAjaxTarget");o=o.match(/\S+/g);var m=f.select(this).data("multiAjaxConfig");if(m){g.getAjaxConfig(f.select(this),j)}g.updateAjaxStatus({isError:false,remainingCalls:o.length});g.showThrobber();l.targetElements=o;g.makeAjaxCall(l.targetElements.shift())})},makeAjaxCall:function(o){var n=f.select("#"+o);var p;e=true;var m=n.data("multiAjaxConfig");var q=n.data("ajax-source");if(m){m=g.getAjaxConfig(n,m)}else{m=j}if(e){h[o]=function(t){var r=o;if(!t.isError){f.select("#"+o).html(t.responseText);if(l.targetElements&&l.targetElements.length>0){g.makeAjaxCall(l.targetElements.shift())}g.updateAjaxStatus({isError:false,url:q})}else{f.select("#"+o).html("<p class='col-reset'>"+t.statusText+"</p>");g.updateAjaxStatus({isError:true,status:t.status,url:q});l={};g.hideThrobber()}};f.subscribe(h);f.publish({type:"Ajax",data:{container:n,url:n.data("ajax-source"),type:m.type,dataType:m.dataType,timeout:"30000",cache:false,data:m.parameters,id:o}})}else{g.hideThrobber()}},updateAjaxStatus:function(m){if(!m.isError){if(m.remainingCalls){l.remainingCalls=m.remainingCalls}else{l.remainingCalls=parseInt(l.remainingCalls)-1;if(parseInt(l.remainingCalls)==0){l={};h={};f.publish({type:"MultiAjaxComplete",data:{trigger:b,url:m.url}});g.hideThrobber()}}}else{l={};e=true;h={};f.publish({type:"MultiAjaxError",data:{isError:true,status:m.status,url:m.url}})}},getAjaxConfig:function(o,m){var n=o.data("multiAjaxConfig"),q,p=o;if(n){m.type=n.type||"GET";m.dataType=n["data-type"]||"text";if(n.paramPassing=="data"){q=o.data("multiAjaxParam");q=g.simpleSanitize(q)}else{if(n.paramPassing=="form"){if(o.is("form")){q=o.serialize()}else{p=o.find("form");q=o.find("form").serialize()}}else{if(n.paramPassing=="fakeForm"){p=f.select(o).closest("form");q=f.select("input, select, textarea",o).serialize()}}}m.parameters=q}if(p.is("form")){f.select(p).validate();e=f.select("input, select, textarea",o).valid();f.publish({type:"PseudoFormState",data:{valid:e}})}return m},simpleSanitize:function(n){var m=new RegExp("javascript:|<s*script.*?s*>");if(m.test(n)){n=n.replace(m,"");return n}else{return n}},showThrobber:function(o){var n="<div class='multi-ajax-throbber-underlay'></div>";f.select("body").append(n);var m=((f.select(window).height()-30)/2)+$(window).scrollTop();f.select(".multi-ajax-throbber-underlay").css("backgroundPosition","center "+m+"px");f.select(".multi-ajax-throbber-underlay").css("height",f.select("body").height())},hideThrobber:function(m){f.select(".multi-ajax-throbber-underlay").remove()},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Orientation",function(c){var b;return{init:function(){console.log("INIT Orientation.js");b=this;c.subscribe({Orientation:b.orientationChange})},execute:function(){console.log("EXEC Orientation.js");var d;var e="landscape";b=this;if(window.matchMedia&&window.matchMedia("all").addListener){d=window.matchMedia("(orientation: portrait)");e=(d.matches)?"portrait":"landscape";d.addListener(function(f){var g=(f.matches)?"portrait":"landscape";c.publish({type:"Orientation",data:{orientation:g}})})}b.orientationChange({orientation:e})},orientationChange:function(d){c.browser.orientation=d.orientation},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.OverlayOpenClose",function(g){var e;var b;var d;var c="top";var f;return{init:function(){f=this;g.subscribe({Orientation:f.resetOverlayDimensions})},execute:function(){console.log("EXEC OverlayOpenClose.js");g.select("body").on("click touchstart",".overlay-trigger",function(q){b=g.select(this);c=b.attr("data-position");d=b.next();e=g.select(".overlay-container");e.css("top",0);e.css("left",0);e.removeClass("overlay-open");q.stopPropagation();g.preventDefault(q);var o=b.position().top+parseInt(b.css("padding-top"))+parseInt(b.css("padding-bottom"))+parseInt(b.css("margin-top"))+parseInt(b.css("margin-bottom"));var l=(c=="right")?(o-10):(o+b.height()+10);d.css("top",(l+"px"));d.css("left",(c=="right")?(d.position().left+b.position().left+b.width()+30):d.position().left+b.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)+((b.width()+parseInt(b.css("padding-left"))+parseInt(b.css("padding-right"))+parseInt(b.css("margin-left"))+parseInt(b.css("margin-right")))/2)+"px");d.addClass("overlay-open");var n;if(window.matchMedia){n=window.matchMedia("(orientation : portrait)").matches?g.select(window).width()<768&&g.select(window).height()>768:g.select(window).width()>768&&g.select(window).height()<600}if(window.matchMedia){if(g.select("body").attr("data-layout")=="mobile"||n==true||window.matchMedia("(orientation : portrait)").matches){var j;if(b.position().left+b.width()/2+d.width()/2>g.select(window).width()){var m=(b.position().left+b.width()/2+d.width()/2)-(g.select(window).width()-40);j=parseInt(d.css("left"))-m}if(parseInt(d.css("left"))<0){var m=d.width()/2-b.position().left+b.width()/2;j=parseInt(d.css("left"))+m}d.css("left",j+"px")}}var p=(b.position().left+parseInt(b.css("margin-left"))+b.width()/2-parseInt(d.css("left"))-15)+"px";var h=g.select("head").find("style");g.each(h,function(r,t){if(t.innerHTML.indexOf("overlay-open:after")!=-1){g.select(t).remove()}});g.select("head").append("<style>.overlay-open:after{left:"+p+"}</style>");g.select(".pf-overlay-active").each(function(t,r){g.select(r).removeClass("pf-overlay-active")});if(g.select(":focusable",".overlay-open").length>0){g.select(":focusable",".overlay-open")[0].focus()}});g.select("body").on("click touchstart",".overlay-open",function(h){if(h.target.type!="submit"){h.stopPropagation()}});g.select(".pf-toggle").on("click",function(h){g.select(".overlay-container").removeClass("overlay-open")});g.select(".pf-nav-flyout").on("mouseover",function(h){g.select(".overlay-container").removeClass("overlay-open")});g.select("html").on("click touchstart keydown",function(h){g.select(".overlay-container").removeClass("overlay-open")});g.select("body").on("keydown",".overlay-trigger, .overlay-open",function(h){if(h.keyCode==27){if(!(g.select(this).hasClass("overlay-trigger")&&g.select(".overlay-open:visible").length==0)){g.select(".overlay-container").removeClass("overlay-open");g.stopPropagation(h);b.focus()}}else{if(g.select(this).hasClass("overlay-open")){g.publish({type:"FocusManager",data:{container:this,event:h}})}}g.stopPropagation(h)})},resetOverlayDimensions:function(o){if(g.select(".overlay-open").length>0){d=g.select(".overlay-open");b=d.prev();var n;var m=b.position().top+parseInt(b.css("padding-top"))+parseInt(b.css("padding-bottom"))+parseInt(b.css("margin-top"))+parseInt(b.css("margin-bottom"));var j=(c=="right")?(m-10):(m+b.height()+10);d.css("top",(j+"px"));d.css("left",(b.position().left+parseInt(b.css("margin-left"))+b.width()/2-d.width()/2)+"px");if(window.matchMedia){n=window.matchMedia("(orientation : portrait)").matches?g.select(window).width()<768&&g.select(window).height()>768:g.select(window).width()>768&&g.select(window).height()<600}if(g.select("body").attr("data-layout")=="mobile"||n==true){if(b.position().left+b.width()/2+parseInt(b.css("margin-left"))+d.width()/2>g.select(window).width()-40){var l=(b.position().left+parseInt(b.css("margin-left"))+b.width()/2+d.width()/2)-(g.select(window).width()-40-10);newLeft=parseInt(d.css("left"))-l;d.css("left",newLeft+"px")}if(parseInt(d.css("left"))<0){var l=d.width()/2-(b.position().left+b.width()/2);newLeft=parseInt(d.css("left"))+l;d.css("left",newLeft+"px")}var h=g.select("head").find("style");g.each(h,function(p,q){if(q.innerHTML.indexOf("overlay-open:after")!=-1){g.select(q).remove()}});g.select("head").append("<style>.overlay-open:after{left:"+pointerPosition+"}</style>")}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Pagination",function(d){var c;var b;return{init:function(){console.log("INIT Pagination.js")},execute:function(){console.log("EXEC Pagination.js");c=this;b=d.select(".paging");c.showPageNumbers();d.select(window).resize(function(e){c.showPageNumbers()});d.select(".paging .disabled").on("click",function(e){e.preventDefault()})},showPageNumbers:function(){var r=[];var m=d.select(window).width()>960?960:d.select(window).width();var u=(d.select("div.paging[class^='colspan-']").length>0)?d.select("div.paging[class^='colspan-']").width():m;u=(d.select("body").attr("data-layout")=="mobile")?u-0.08*u:u-20;var o=u-120*2;var f=d.select(".paging .active").closest("li");var g=f.width()+6;var n=Math.floor(o/g);n=(n>0)?n:1;var j=d.select(".paging ul li").length>n?n:d.select(".paging ul li").length;var p=(j*g);d.select(".paging ul").css("width",p+"px");var l=f;r.push(f);var h=1;if(d.select(f).is("li:first-child")){while(h<j){l=d.select(l).next();r.push(l);h++}}else{if(d.select(f).is("li:last-child")){while(h<j){l=d.select(l).prev();r.push(l);h++}}else{var t=f;var e=f;var q;while(h<j/2){if(d.select(t).prev().length>0){t=d.select(t).prev();r.push(t);h++;q=h}else{break}}while(q<j){if(d.select(e).next().length>0){e=d.select(e).next();r.push(e);q++}else{t=d.select(t).prev();r.push(t);q++}}}}d.select(".paging ul li").css("display","none");d.each(r,function(v,w){d.select(w).css("display","inline-block")});if(d.select("body").hasClass("IE")){d.select(".paging .disabled").attr("disabled","disabled")}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Placeholder",function(e){var d;var b="input[placeholder]";var c;return{init:function(){console.log("INIT Placeholder.js")},execute:function(){console.log("EXEC Placeholder.js");d=this;e.select("body").on("content-loaded",b,function(f){f.stopPropagation();d.processPlaceholder(this)})},processPlaceholder:function(h){var g=h;c=e.select(g).attr("placeholder");var f=document.createElement("input");if(!("placeholder" in f)){e.select(g).focus(function(j){d.placeholderForPassword(this,j);c=e.select(this).attr("placeholder");d.onFocus(this)});e.select(g).blur(function(j){d.placeholderForPassword(this,j);c=e.select(this).attr("placeholder");d.onBlur(this)});if(g.value==""){e.select(g).toggleClass("placeholder");g.value=c}}},onFocus:function(f){if(f.value==c){e.select(f).toggleClass("placeholder");f.value=""}},onBlur:function(f){if(f.value==""){e.select(f).toggleClass("placeholder");f.value=c}},placeholderForPassword:function(g,f){if(g.type=="password"){var l=f.type;var h=e.select(g).prev();var j=e.select(g).attr("placeholder");if(h!==undefined){switch(l){case"focus":e.select(h).css("display","none");break;case"blur":if(g.value==""||g.value==j){e.select(h).css("display","block")}else{e.select(h).css("display","none")}break}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.ProductSpinner",function(e){var d;var c;var b;return{init:function(){console.log("INIT ProductSpinner.js");d=this;e.subscribe({ProductSpinner:d.startSpinner})},execute:function(){},startSpinner:function(f){sb=e.select(f.data.sb);sbInputVal=f.data.val;b=sb.parents(".spinner");c=e.select(".next-step",b);e.select(".sb-value",b).val(sbInputVal);switch(f.type){case"increase":d.incrementSpinBox(f.data);break;case"decrease":d.decrementSpinBox(f.data);break}},decrementSpinBox:function(f){if(sbInputVal==f.max){e.select(".minibox-max",b).hide();e.select(".sb-content-container",b).show()}if(sbInputVal==0){(f.trigger).addClass("disabled");if(e.select(c).is("input")){c.addClass("button-disabled").attr("disabled","disabled")}else{c.css("display","none")}e.select(".sb-content-1",b).hide()}else{if(sbInputVal>f.min&&sbInputVal<=f.max){e.select("[data-spin-type='increase']",b).removeClass("disabled");if(e.select(c).is("input")){c.removeClass("button-disabled").removeAttr("disabled")}else{c.css("display","inline-block")}if(e.select(".sb-content-container").hasClass("always-show")){if((sbInputVal==f.max)||(sbInputVal<f.max)){e.select(".sb-content-"+(sbInputVal+1),b).hide()}}else{if(sbInputVal<f.max){e.select(".sb-content-"+(sbInputVal+1),b).hide()}}}}},incrementSpinBox:function(f){if(e.select(".sb-content-container").hasClass("always-show")){if(sbInputVal<=f.max+1){if(sbInputVal>1){e.select(".sb-content-"+sbInputVal,b).show()}else{e.select("[data-spin-type='decrease']",b).removeClass("disabled");if(e.select(c).is("input")){c.removeClass("button-disabled").removeAttr("disabled")}else{c.css("display","inline-block")}e.select(".sb-content-"+sbInputVal,b).show()}}if(sbInputVal==f.max+1){e.select(".minibox-max",b).show();(f.trigger).addClass("disabled");if(e.select(c).is("input")){e.select(".spinup-tooltip").addClass("btn-help-spinup");e.select(".spinup-tooltip-mobile").addClass("btn-help-spinup-mobile");e.select("#spin-down").click(function(){e.select(".spinup-tooltip").removeClass("btn-help-spinup")});c.addClass("button-disabled").attr("disabled","disabled")}else{e.select(".sb-content-container",b).show();c.css("display","inline-block")}}}else{if(sbInputVal<=f.max){if(sbInputVal>1){e.select(".sb-content-"+sbInputVal,b).show()}else{e.select("[data-spin-type='decrease']",b).removeClass("disabled");if(e.select(c).is("input")){c.removeClass("button-disabled").removeAttr("disabled")}else{c.css("display","inline-block")}e.select(".sb-content-"+sbInputVal,b).show()}}else{if(sbInputVal>f.max){e.select(".minibox-max",b).show();(f.trigger).addClass("disabled");if(e.select(c).is("input")){e.select(".sb-content-container",b).hide();c.addClass("button-disabled").attr("disabled","disabled")}else{e.select(".sb-content-container",b).show();c.css("display","inline-block")}}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.ProgressiveScroll",function(e){var d;var b=".scroll-active";var c=true;return{init:function(){console.log("INIT ProgressiveScroll.js")},execute:function(){console.log("EXEC ProgressiveScroll.js");d=this;e.subscribe({makeAnotherCall:function(){c=true}});d=this;e.select("body").on("content-loaded",b,function(f){var g=30;e.select(window).on("scroll",function(){var j=Math.round(e.select(window).scrollTop()+e.select("#pf-footer").height())+g;var h=Math.round(e.select(document).height()-e.select(window).height());if(j>h){if(c){e.publish({type:"ProgressiveScroll"});c=false}}})})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.PromoFeature",function(e){var d;var b;var c=".promo-feature";return{init:function(){console.log("INIT PromoFeature.js");d=this;e.subscribe({Orientation:d.calculateHeight})},execute:function(){console.log("EXEC PromoFeature.js");d=this;if(window.matchMedia){b=window.matchMedia("(orientation : portrait)").matches?e.select(window).width()<768&&e.select(window).height()>768:e.select(window).width()>768&&e.select(window).height()<600;if(window.matchMedia("(max-width: 767px)").matches||(b&&window.matchMedia("(orientation : portrait)").matches)){d.calculateHeight()}}e.select("body").on("click touchstart",".promo-feature-link a",function(h){h.preventDefault();var f=e.select(this).closest(c);if(e.select("body").hasClass("IE8")||e.select("body").hasClass("IE9")){e.select(".promo-feature-details",f).animate({"max-height":"230px"},250)}e.select(".promo-feature-details",f).removeClass("inactive").addClass("active");if(e.select(window).width()<768){var g=e.select(".promo-feature-content",f).height();e.select(".promo-feature-details.active",f).css({height:g,"max-height":g})}e.select(".promo-feature-details",f).one("webkitTransitionEnd msTransitionEnd transitionend",function(j){e.select(".promo-feature-details-link",f).css("display","block")})});e.select("body").on("click touchstart",".promo-feature-details-link a",function(g){g.preventDefault();var f=e.select(this).closest(c);if(e.select("body").hasClass("IE8")||e.select("body").hasClass("IE9")){e.select(".promo-feature-details",f).animate({"max-height":0},250)}e.select(".promo-feature-details",f).removeClass("active").addClass("inactive");if(e.select(window).width()<768){e.select(".promo-feature-details.inactive",f).css("max-height","0")}e.select(".promo-feature-details",f).one("webkitTransitionEnd msTransitionEnd transitionend",function(h){e.select(".promo-feature-details-link",f).css("display","none")})})},calculateHeight:function(){var f=e.select(c);if(f.length>0){e.each(f,function(h,l){var g=e.select(l);if(window.matchMedia){if(window.matchMedia("(max-width: 767px)").matches||(b&&window.matchMedia("(orientation : portrait)").matches)){e.select(".promo-feature, .promo-feature-content, .promo-feature-details",g).removeAttr("style");e.select(".promo-feature-details",g).removeClass("inactive");var j=(e.select(".promo-feature-content",g).height()>e.select(".promo-feature-details",g).height())?e.select(".promo-feature-content",g).height():e.select(".promo-feature-details",g).height();j=j+28+"px";if(!e.select(".promo-feature-details",g).hasClass("active")){e.select(".promo-feature-details",g).addClass("inactive")}else{e.select(".promo-feature-details.active").css({height:j,"max-height":j})}e.select(".promo-feature, .promo-feature-content",g).css({"min-height":j,"max-height":j})}else{e.select(".promo-feature, .promo-feature-content, .promo-feature-details",g).removeAttr("style")}}})}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.RadioBox",function(c){var b;return{init:function(){console.log("INIT RadioBox.js")},execute:function(){console.log("EXEC RadioBox.js");c.select("body").on("click",".radio-boxes",function(f){c.preventDefault(f);b=c.select(this)[0];c.select(b).addClass("active-radio");c.select(b).siblings().removeClass("active-radio");var e=c.select(b).children().attr("id");var d=c.select(b).attr("class").split(" ")[0];c.select(":input."+d).val(e)})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.RealRadioBox",function(d){var b=".group-chooser";var c;return{init:function(){console.log("INIT RealRadioBox.js")},execute:function(){console.log("EXEC RealRadioBox.js");c=this;d.select("body").on("content-loaded init-group-choose-block",b,function(f){var g=d.select(this).find('input[type="radio"]');var e=d.select(this).find("input.choice-value");d.select(g).each(function(h,j){if(d.select(j).attr("checked")=="checked"){c.handleRadioBtnSelection(d.select(j).parent()[0])}else{c.clearOutInputField(d.select(j).parent())}});d.select(g).focus(function(j){var h=d.select(this).parent();d.select(h).addClass("focused-choice")});d.select(e).focus(function(j){var h=d.select(this).parent().parent();d.select(h).addClass("focused-choice")});d.select(g).blur(function(j){var h=d.select(this).parent();if(d.select(h).hasClass("focused-choice")){d.select(h).removeClass("focused-choice")}if(d.select(h).hasClass("active-choice")){d.select(h).removeClass("focused-choice")}});d.select(e).blur(function(j){var h=d.select(this).parent().parent();if(d.select(h).hasClass("focused-choice")){d.select(h).removeClass("focused-choice")}});d.select(g).change(function(j){var h=d.select(this).parent();if(d.select(h).hasClass("active-choice")){d.select(h).removeClass("focused-choice")}})});if(d.select(b).length>0){d.select(b).trigger("init-group-choose-block")}d.select("body").on("click",".group-choice",function(e){c.handleRadioBtnSelection(this)})},handleRadioBtnSelection:function(e){var f=d.select(e).closest(".group-chooser");c.makeInputfieldFocused(e);var g=d.select(f).find(".group-choice");d.select(g).each(function(l,m){if(m==e){d.select(m).addClass("active-choice");var j=d.select(m).find('input[type="radio"]')[0];d.select(j).prop("checked","checked");d.select(j).attr("checked","checked")}else{d.select(m).removeClass("active-choice");var h=d.select(m).find('input[type="radio"]')[0];d.select(h).removeAttr("checked");c.clearOutInputField(m)}});c.addInputFieldValidation(f);d.publish({type:"radioBoxActionComplete",data:{}})},addInputFieldValidation:function(f){var e=d.select(f).find(".group-choice .choice-value");d.select(e).each(function(h,j){if(d.select(j).is("input")){var g=d.select(j).closest(".group-choice").find('input[type="radio"]');if(d.select(g).attr("checked")=="checked"){d.select(j).addClass("required").removeClass("ignore-validation")}else{d.select(j).removeClass("required").addClass("ignore-validation")}}})},clearOutInputField:function(e){d.select(e).find("input.choice-value").val("")},makeInputfieldFocused:function(e){var f=d.select(e).find("input");if(f.length==1&&!navigator.userAgent.match(/iPad/i)){d.select(f).focus()}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.SVGSupport",function(c){var b;return{init:function(){console.log("INIT SVGSupport.js");b=this},execute:function(){console.log("EXEC SVGSupport.js");if(!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape","1.1")){var g=document.getElementsByTagName("img");var f=/.*\.svg$/;var d=g.length;for(var e=0;e<d;e++){if(g[e].src.match(f)){g[e].src=g[e].src.slice(0,-3)+"png"}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.SearchPromote",function(c){var b;return{init:function(){console.log("INIT SearchPromote.js");b=this},execute:function(){console.log("EXEC SearchPromote.js");if(c.select("#search-promote-form").length<1){return}b=this;if(c.select(".search-panel").length>0){c.select(".link-list:not(.search-recent)").addClass("search-link-list")}if(c.select(".search-panel li:first-child + li span").length>0){var e=c.select(".search-refine form input:checked").length;if(e>0){c.select(".search-panel li:first-child + li span").html(e);c.select(".search-panel li:first-child + li span").addClass("showme")}}var f=($.cookie("cox-search-recent-terms")==undefined)?[]:$.cookie("cox-search-recent-terms").split("|");while(f.length){var d=f.pop();c.select(".search-recent ul .search-clear-recent").before(c.select("<li/>",{"class":"col-content"}).append(c.select("<a/>",{href:"?q="+d,text:d})))}c.select("body[data-os='ios']").on("touchstart",function(g){if((c.select(g.target).parents(".yui-ac-container, .ui-autocomplete").length==0)&&c.select(document.activeElement).hasClass("search-promote-keyword")){document.activeElement.blur()}});c.select("body").on("click",".search-clear-recent",function(g){c.select(".search-recent").remove()});c.select("body").on("click",".panel-trigger",function(g){g.preventDefault();c.select(".panel-trigger").removeClass("active-panel");if(c.select(this).hasClass("button")){c.select(".search-panel li:first-child a").addClass("active-panel")}else{c.select(this).addClass("active-panel")}c.select(c.select(this).attr("data-hide-div")).removeClass("active-panel");c.select(c.select(this).attr("data-show-div")).addClass("active-panel")});c.select("body").on("click","#autocomplete li a",function(h){var g=c.select(this).data("term");if(g=="Clear History"){c.select(".search-recent").remove()}else{c.select(".search-recent ul li a:contains("+g+")").each(function(){c.select(this).parents("li").remove()})}});c.select("body").on("click",".search-refine input",function(h){var g=c.select(this).val();c.select(this).parents(".section-container").addClass("loading-wrapper").prepend(c.select("<div/>",{"class":"loader"}));c.publish({type:"showThrobber",data:{nodes:c.select(this).parents(".loading-wrapper")}});location.href=g})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.SingleToggle",function(d){var b;var c=".single-toggle";return{init:function(){console.log("INIT SingleToggle.js")},execute:function(){console.log("EXEC SingleToggle.js");d.select("body").on("content-loaded",c,function(e){d.select((".toggle-div")).slideToggle(1)});d.select("body").on("click",".toggle-single-click",function(f){d.preventDefault(f);b=d.select(this);if(b.hasClass("expand-view")){b.removeClass("expand-view").addClass("collapse-view")}else{if(b.hasClass("collapse-view")){b.removeClass("collapse-view").addClass("expand-view")}else{b.addClass("expand-view")}}if(d.select(b).parents(".toggle-container").length>0){var e=d.select(b).parents(".toggle-container");d.select(".toggle-div",e).slideToggle(500,function(){setTimeout(function(){if(d.select("body.IE8").length>0){d.select(e).parentsUntil("#pf-container").css("zoom","").css("zoom","1")}},0)})}else{d.select(".toggle-div").slideToggle(500)}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.SlickSlider",function(e){var b=".slick-carousel";var f;var d;var c;return{init:function(){console.log("INIT SlickSlider.js");d=this;e.subscribe({ReinitializeSlick:d.getSliderOptions})},execute:function(){console.log("EXEC SlickSlider.js");d=this;e.select("body").on("content-loaded",b,function(j){if(e.select(".cms-dialog").find(b)[0]){var h=e.select(".cms-dialog").find(b);if(h.hasClass("slick-initialized")){h.slick("unslick")}e.publish({type:"ReinitializeSlick",data:h})}});if(window.matchMedia){c=window.matchMedia("(orientation : portrait)").matches?e.select(window).width()<768&&e.select(window).height()>768:e.select(window).width()>768&&e.select(window).height()<600;if(e.select(".tab")){if(e.select(window).width()<768||((c)&&window.matchMedia("(orientation : portrait)").matches)){e.select(".tab").addClass("slick-carousel")}}}f=e.select(b);f.each(function(h,l){var j=e.select(l);d.getSliderOptions(j)});if(f.length>0){var g=window.matchMedia("(orientation: landscape)");g.addListener(function(h){if(e.select(".slick-slide").length>0){d.setMobileHeightForSlides()}});d.setMobileHeightForSlides()}},getSliderOptions:function(o){var j=o.attr("data-show-slides");var l=(o.hasClass("hide-or-show-dots"))?false:true;var p=false;var n="";var h=(o.hasClass("offer-comparison-container"))?"div.offer-comparison":"";var m=e.select(".all-plans",o);if(o.width()==0){var g=o.closest(".accordion-panel");if(g.length>0){g.css({display:"block",height:"0px"})}}o.slick({dots:l,infinite:false,slide:h,slidesToShow:parseInt(j),slidesToScroll:parseInt(j),centerMode:p,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>',responsive:(o.parents(".tab-component").length>0)?null:[{breakpoint:767,settings:{slidesToShow:o.hasClass("on-demand")||o.hasClass("external-search-navigation")?3:1,slidesToScroll:o.hasClass("on-demand")||o.hasClass("external-search-navigation")?3:1,infinite:o.hasClass("on-demand")?true:false,centerMode:o.hasClass("on-demand")?true:false}},{breakpoint:480,settings:{slidesToShow:o.hasClass("external-search-navigation")?3:1,slidesToScroll:o.hasClass("external-search-navigation")?3:1,infinite:o.hasClass("on-demand")?true:false,centerMode:o.hasClass("on-demand")?true:false,centerPadding:o.hasClass("on-demand")?"23%":""}}]});if(o.parents(".tab-component").length>0){o.on("afterChange",function(r,q,t){e.select("a",e.select(q.$slides[t])[0]).click()})}if(o.hasClass("offer-comparison-container")){if(e.select("body").attr("data-layout")=="mobile"){o.append(m)}o.on("afterChange",function(r,q,t){o.append(m)})}},setMobileHeightForSlides:function(){var g=e.select(".pf-mobile-header")[0];if(g){var h=e.select(b);e.select(h).each(function(m,o){var q=e.select(o).find(".slick-track");var l=e.select(o).find(".slick-dots");var n=e.select(q).find(".slick-slide");var r=e.select(o).hasClass("offer-comparison-container");var p=e.select(o).hasClass("best-offer-container");if(p){var j=0;e.select(n).each(function(u,t){var v=e.select(t).height();if(j<v){j=v}});e.select(l).css({top:"auto",position:"absolute"})}if(r){var j=0;e.select(n).each(function(u,t){var v=e.select(t).height();if(j<v){j=v}});e.select(l).css({top:j,position:"absolute"})}})}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Slider",function(d){var c;var b=".slider";return{init:function(){console.log("INIT Slider.js");c=this},execute:function(){console.log("EXEC Slider.js");c=this;d.select("body").on("content-loaded",b,function(f){var e=d.select(this);var g=0;var h=100;if(d.select(e).attr("data-min-value")){g=Number(d.select(e).attr("data-min-value"))}if(d.select(e).attr("data-max-value")){h=Number(d.select(e).attr("data-max-value"))}e.slider({min:g,max:h,slide:function(j,l){console.log("     Slider.js - value: ",l.value)}})})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.SocialShare",function(d){var b;var c;return{init:function(){},execute:function(){c=this;var e=d.select(".social-container");d.select(e).append('<div id="fb-root"></div>');if(e.length){var f=d.select("<ul/>",{"class":"social-links"});d.select(this).next(".social-container").html(f);d.select(f).append('<li><div class="fb-share-button" data-layout="button"></div></li>');c.loadFacebook();d.select(f).append('<li><a href="https://twitter.com/share" class="twitter-share-button" data-count="none"></a></li>');c.loadTwitter();d.select(f).append('<li><div class="g-plusone" data-annotation="none" data-size="medium"></div></li>');c.loadGooglePlus();d.select(e).append(f)}},loadTwitter:function(){window.twttr=(function(j,f,l){var h,g=j.getElementsByTagName(f)[0],e=window.twttr||{};if(j.getElementById(l)){return e}h=j.createElement(f);h.id=l;h.src="https://platform.twitter.com/widgets.js";g.parentNode.insertBefore(h,g);e._e=[];e.ready=function(m){e._e.push(m)};return e}(document,"script","twitter-wjs"))},loadFacebook:function(){(function(h,e,j){var g,f=h.getElementsByTagName(e)[0];if(h.getElementById(j)){return}g=h.createElement(e);g.id=j;g.src="//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=460929994057868";f.parentNode.insertBefore(g,f)}(document,"script","facebook-jssdk"))},loadGooglePlus:function(){if(typeof(gapi)!="undefined"){d.select(".g-plusone").each(function(){gapi.plusone.render(d.select(this).get(0))})}else{d.getScript("https://apis.google.com/js/platform.js")}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.SortTable",function(d){var c;var b=".tablesorter, .tablesorter table";return{init:function(){console.log("INIT SortTable.js");c=this},execute:function(){console.log("EXEC SortTable.js");c=this;d.select("body").on("content-loaded",b,function(f){var e=d.select(this);var g={};d.select("th.no-sorting",this).each(function(){g[this.cellIndex]={sorter:false}});d.select(e).tablesorter({cssAsc:"sort-asc",cssDesc:"sort-desc",textExtraction:function(l){if(d.select(l).text().indexOf("/")!=-1){var m=d.select(l).text();return m.replace("/"," ")}else{var j=d.select(l).text().replace(/[,$]/g,"");var h=j.replace("(","-");return h.replace(")","")}},headers:g})});d.select("body").on("sortEnd",b,function(e){d.select(".tablesorter thead tr th.header").each(function(f){var h=d.select(this);var j=h.is(".sort-asc");var l=h.is(".sort-desc");var g=d.select("a",this)[0];g.title=g.title.replace(/ - Sort .*/g,"");if(j){g.title+=" - Sort Ascending"}else{if(l){g.title+=" - Sort Descending"}}})})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Spinner",function(e){var d;var b;var c;return{init:function(){},execute:function(){console.log("EXEC Spinner.js");d=this;e.select("body").on("click",".sb-button",function(f){b=e.select(this);d.getSpinBoxConfigs()})},getSpinBoxConfigs:function(){var j=b.attr("data-spin-type");c=b.closest(".sb-wrapper");var m=e.select(".sb-input",c)[0];var g=(m.getAttribute("min"))?Number(m.getAttribute("min")):null;var f=(m.getAttribute("max"))?Number(m.getAttribute("max")):null;var h=(m.getAttribute("step"))?Number(m.getAttribute("step")):1;var l=Number(e.trim(m.innerHTML));switch(j){case"increase":if(l<=f){l=l+h;m.innerHTML=l}break;case"decrease":if(l>g){l=l-h;m.innerHTML=l}break}e.publish({type:"ProductSpinner",data:{type:j,data:{trigger:b,sb:m,min:g,max:f,step:h,val:l}}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.StickyHeader",function(d){var c=".sticky-header";var b;return{init:function(){console.log("INIT StickyHeader.js")},execute:function(){console.log("EXEC StickyHeader.js");d.select("body").on("content-loaded",c,function(e){b=d.select(this);b.stickyTableHeaders()})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Tabs",function(f){var e;var c;var d;var b=".tab";return{init:function(){e=this;f.select("body").on("content-loaded",b,function(g){e.startTabs()})},execute:function(){e=this},startTabs:function(){d=f.select("body").attr("data-layout");var g=f.select(".tab");e.defaultTabSelected(g);if(typeof CQ!="undefined"&&typeof CQ.WCM!="undefined"){if(CQ.WCM.getMode()=="edit"||CQ.WCM.getMode()==null){CQ.WCM.on("editablesready",function(){console.log("CQ editablesready (tabs)");e.adobeAuthorFix()})}}f.select(".tab a:not([class*=slick-])").click(function(h){h.preventDefault();e.getSelectedTab(this);e.adobeAuthorFix()});f.select("body").on("click","a[href^='#']",function(m){if(m.originalEvent!==undefined&&!(f.select(this).parents(".tab")[0])){var p=$(this).attr("href");var j=f.select(".tab");var l;c=j;$active=$('.tab a[href="'+p+'"]');if(d=="desktop"){$content=f.select(($active.attr("href")));var o=f.select(".active",$active.parents(".tab"));o.removeClass("active");$active.addClass("active");f.select(o.attr("href")).hide();$content=f.select(($active.attr("href")));$content.show()}else{var h=$active.parents("li").data("slick-index");var n=f.select($active.parents(".tab")).find(".slick-dots li:eq('"+h+"')");n.find("button").trigger("click")}}});f.select(document).ajaxComplete(function(m,l,h){var j=f.select(".tab");e.defaultTabSelected(j)});f.select(window).bind("resize",function(){if(!f.select(".tab")[0]){return}if(d!=f.select("body").attr("data-layout")){d=f.select("body").attr("data-layout");e.toggleSlick()}})},defaultTabSelected:function(h){var j=window.location.hash;var g;c=h;if(h.length>0){f.select(h).each(function(l,m){e.setDefaultTabSelected(m,j)})}},setDefaultTabSelected:function(g,h){f.select(g).each(function(l,m){var n;var j=f.select(m).find("li a");if(f.select(h).length<1){h=null}if(f.select(m).find(".slick-list").length>0){j=f.select(m).find(".slick-list").find("li a")}f.select(j).each(function(o,p){if(o==0){n=f.select(p)}if(f.select(p).attr("href")==h){n=f.select(p)}});f.select(n).addClass("active");e.getSelectedTab(n[0])});e.findMobileSelectedTab(active)},findMobileSelectedTab:function(l){var h=f.select(l).closest(".slick-track");var g=f.select(h).find("li");var j=f.select(".slick-dots").find("li");f.select(g).each(function(m,n){if(f.select(n).hasClass("slick-active")){var o=j[m];f.select(o).addClass("slick-active");f.select(o).attr("aria-hidden","false")}else{var p=j[m];f.select(p).removeClass("slick-active");f.select(p).attr("aria-hidden","true")}})},getSelectedTab:function(h){var g=c;var m=f.select(h).closest(".tab");var l=f.select(m).find(".slick-slide");if(m){var j=f.select(m).find(".active");if(j){f.select(j).removeClass("active");f.select(j).closest(".slick-track").find(".slick-active").removeClass("slick-active")}active=f.select(h).addClass("active");f.select(active).closest(".slick-slide").addClass("slick-active");e.showTabContent(active)}},showTabContent:function(h){var g=f.select(h).closest(".tab-component");f.select(g).each(function(m,l){var o=f.select(l).find(".tab");var j=f.select(h).attr("href");j=j.replace("#","");var n=f.select(l).find(".tab-content").find(".tab-item");f.select(n).each(function(p,q){var r=f.select(q).attr("id");if(r==j){f.select("#"+r).css("display","block")}else{f.select("#"+r).css("display","none")}})})},toggleSlick:function(g){if(d=="mobile"){f.select(".tab").addClass("slick-carousel");f.select(".tab.slick-carousel").slick({dots:true,infinite:false,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>'});f.select(".tab.slick-carousel .slick-active a").trigger("click");f.select(".tab.slick-carousel").on("afterChange",function(l,j,m){f.select("a",f.select(j.$slides[m])[0]).click()})}else{var h=f.select(".tab.slick-carousel");h.each(function(){if(f.select(this).hasClass("slick-initialized")){f.select(this).slick("unslick")}});f.select(".tab a").click(function(j){j.preventDefault();e.getSelectedTab(this)})}},adobeAuthorFix:function(){if(typeof CQ!="undefined"&&typeof CQ.WCM!="undefined"){if(CQ.WCM.getMode()=="edit"||CQ.WCM.getMode()==null){f.select(".tab-component").each(function(){CQ.WCM.toggleEditables(false,f.select(this).data("rootpath"))});f.select(".tab-component").find(".tab-item[style*='block']").each(function(){CQ.WCM.toggleEditables(true,f.select(this).data("path"))})}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.ToggleDiv",function(e){var d;var b;var c;return{init:function(){d=this;e.subscribe({ToggleDiv:d.toggleDiv})},execute:function(){d=this;e.select("body").on("click",".showhide-trigger",function(f){b=e.select(this);c=(b.parents(".dialog-component").length>0)?b.parents(".dialog-component"):b.parents(".toggle-container");if(e.select(b).prop("tagName")=="A"){e.preventDefault(f)}e.publish({type:"ToggleDiv",data:{element:b[0],context:c[0]}})})},toggleDiv:function(g){switch(g.element.tagName){case"SELECT":break;case"A":d.showHideMultipleDivs(g.element,g.context);break;case"INPUT":var f=e.select(g.element).attr("type");if(f=="radio"){d.showHideMultipleDivs(g.element,g.context)}else{if(f=="checkbox"){var h=e.select(g.element).attr("data-show-chkBox");var j=e.select("."+h,g.context);if(e.select(g.element).prop("checked")==true){d.showMultipleDivs(j)}else{d.hideMultipleDivs(j)}}}break;case"DIV":d.showHideMultipleDivs(g.element,g.context);break}},showHideMultipleDivs:function(j,h){e.select(h).css("zoom","1");var g=e.select(j).attr("data-hide-div");if(g!=null){var l=g.split(" ");if(l!=null){e.each(l,function(n,p){var o=e.select("."+p,h);d.hideMultipleDivs(o)})}}var f=e.select(j).attr("data-show-div");if(f!=null){var m=f.split(" ");if(m!=null){e.each(m,function(n,p){var o=e.select("."+p,h);d.showMultipleDivs(o)})}}},hideMultipleDivs:function(f){e.select(f).hide();var g=e.select(".required",f);if(g!=null&&g.length!=0){e.each(g,function(h,j){e.select(j).addClass("ignore-validation");if(e.select(j).hasClass("error")){e.select(j).removeClass("error");e.select(j).siblings(".error-wrapper").css("display","none");e.select(j).parent().prev().removeClass("errorMsg");if(e.select(".display-placeholder").hasClass("error")){e.select(".display-placeholder").removeClass("error")}e.select(".error-header").css("display","none")}})}},showMultipleDivs:function(f){e.select(f).show();var g=e.select(".required",f);if(g!=null&&g.length!=0){e.each(g,function(h,j){if(!e.select(j).hasClass("autocomplete-dummy")){if(e.select(j).hasClass("ignore-validation")){e.select(j).removeClass("ignore-validation")}}})}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.Tooltip",function(g){var f;var b;var d;var e;var c;return{init:function(){console.log("INIT Tooltip.js");f=this;g.subscribe({Orientation:f.resetTooltipPosition})},execute:function(){console.log("EXEC Tooltip.js");f=this;g.select("body").on("click touchstart",".tooltip-trigger",function(h){h.preventDefault();if(g.select(".tooltip-trigger.active").length>0){f.closeTooltip()}b=g.select(this);b.addClass("active");f.getDataPosition();f.setToolTipPosition();h.stopPropagation()});g.select("body").on("click touchstart",".tooltip-trigger.active",function(h){f.closeTooltip();h.stopPropagation()});g.select("body").on("click touchstart",".ui-tooltip-content",function(h){h.stopPropagation()});g.select("body").on("click touchstart",".ui-tooltip-close",function(h){h.preventDefault();f.closeTooltip();h.stopPropagation()});g.select(window).blur(function(h){if(g.select(".tooltip-trigger.active").length>0){f.closeTooltip()}});g.select("html").on("click touchstart keydown",function(h){if(g.select(".tooltip-trigger.active").length>0){f.closeTooltip()}})},getDataPosition:function(){var j=b.width();var l=b.offset().left;var h=g.select(window).width()-b.offset().left;if((g.select("body").attr("data-layout")=="desktop")){if(l<320+16){b.attr("data-position","left")}else{if(h>320+j+16){b.attr("data-position","bottom")}else{b.attr("data-position","right")}}}else{if(l>0.75*g.select(window).width()+16){b.attr("data-position","right")}else{if(h>0.75*g.select(window).width()+j+16){b.attr("data-position","left")}else{b.attr("data-position","bottom")}}}},setToolTipPosition:function(){var j="<div class='col-content'><a class='ui-tooltip-close'></a>"+g.select("#"+b.attr("data-content-element")).html()+"</div>";var m=b.attr("data-tooltip-theme");var l=b.attr("data-position");if(l===undefined){l="bottom"}var h;switch(l){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"};break}h.collision="flipfit flip";h.using=function(n,o){g.select(".ui-tooltip").css(n);g.select("<div>").addClass("arrow").addClass(o.vertical).addClass(o.horizontal).appendTo(".ui-tooltip")};d=b.tooltip({items:"a.tooltip-trigger",content:function(){return j},position:h,hide:false});d.tooltip("open").off("mouseenter mouseleave mousemove mouseout mouseover");if(m){g.select(".ui-tooltip-content").addClass(m);g.select(".arrow").addClass(m)}else{g.select(".ui-tooltip-content").removeClass("theme-b");g.select(".arrow").removeClass("theme-b")}f.setArrowPosition()},closeTooltip:function(){g.select(".tooltip-trigger.active ").removeAttr("data-position");g.select(".tooltip-trigger.active ").tooltip("destroy");g.select(".tooltip-trigger").removeClass("active")},resetTooltipPosition:function(){f.closeTooltip()},setArrowPosition:function(){var l=b.offset().left;var h=b.offset().top;var o=0;var n=g.select(".ui-tooltip").offset().top;var m=b.attr("data-position");o=g.select(".ui-tooltip").offset().left;var j=0;if(g.select("body").attr("data-layout")=="mobile"){if(m===undefined||m=="bottom"){if(b.hasClass("btn-help")){j=-3}else{j=b.width()/2-12}g.select(".arrow").css("left",l-o+j);if(h-n<0){g.select(".arrow").removeClass("bottom").addClass("top");g.select(".arrow").css("top",-15)}}else{if(m=="left"){g.select(".arrow").css("top",h-n-10)}else{if(m=="right"){g.select(".arrow").css("top",h-n+20);g.select(".arrow").css("left",l-o-3)}}}}else{if(m===undefined||m=="bottom"){if(b.hasClass("btn-help")){j=12}else{j=b.width()/2}g.select(".arrow").css("left",l-o+j);if(h-n<0){g.select(".arrow").removeClass("bottom").addClass("top");g.select(".arrow").css("top",-15)}}else{if(m=="right"){g.select(".arrow").css("top",h-n+5);if(g.select(".arrow").hasClass("right")){g.select(".arrow").css("left",l-o-3)}}else{g.select(".arrow").css("top",h-n);if(g.select(".arrow").hasClass("right")){g.select(".arrow").css("left",l-o-3)}}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.VideoPlayer",function(d){var b=".video-holder";var c;return{init:function(){console.log("INIT VideoPlayer.js");jwplayer.key="314F7f+2nN7Z5gbamNTcmVepZHry7iUE4sx8q9N/LPQ="},execute:function(){console.log("EXEC VideoPlayer.js");c=this;d.guid=0;d.select("body").on("content-loaded",b,function(e){d.select(this).each(function(){var j=d.select(this);var m=320;j.html("Loading player...");var f="video-"+d.guid++;j.attr("id",f);var t=j.data("videoFile");var u=j.data("videoImage");var q=j.data("videoCaptions");var v=j.data("videoRatio");var o=j.data("videoPlaylist");var r=j.data("videoPlaylist-position");var n=j.data("videoRelated");if(r=="bottom"){m=(!(window.matchMedia&&window.matchMedia("all").addListener))?4:0}var p={tracks:[{file:q}]};var l={related:{file:n,onclick:"play",oncomplete:true}};var g={playlist:o,listbar:{position:r,size:m}};var h={displaytitle:false,file:t,image:u,abouttext:"Cox Video Player",aboutlink:"javascript:void(0)",width:"100%",aspectratio:v,skin:"/ui/4_12/tsw/xml/jwplayer-skin.xml",base:"/ui/4_12/tsw/swf/",events:{onReady:function(){if(typeof o!=="undefined"){var w=jwplayer().getPlaylistItem();c.positionPlaylist();d.select(window).resize(function(y){c.positionPlaylist()});if(r=="bottom"){c.createCarouselPlaylist(f)}}},onPlay:function(){d.select(".jwplayer").each(function(){if(this.id!=f){jwplayer(this.id).pause(true)}})}}};if(typeof q!=="undefined"){a.extendObj(h,p)}if(typeof n!=="undefined"){a.extendObj(h,l)}if(typeof o!=="undefined"){a.extendObj(h,g)}jwplayer(f).setup(h)})})},positionPlaylist:function(){if(window.matchMedia){if(window.matchMedia("(max-width: 767px)").matches){d.select(".jwplayer.playlist-right").each(function(){d.select(this).removeClass("playlist-right").addClass("playlist-right-orig playlist-bottom")})}else{d.select(".jwplayer.playlist-right-orig").each(function(){d.select(this).removeClass("playlist-right-orig playlist-bottom").addClass("playlist-right")})}}},createCarouselPlaylist:function(h){var n=jwplayer().getPlaylist();var m=d.select("<div class='slick-carousel video-player-nav'>");for(var g=0;g<n.length;g++){var l=g+1;var e=n[g].title;if(e.length>20){e=e.substring(0,20)+"..."}var f=n[g].description;if(f.length>20){f=f.substring(0,20)+"..."}d.select(m).append("<div class='playlist-item'><a href='#' data-video-id='"+g+"'><img src='"+n[g].image+"' class='col-content' /><span class='title'>"+e+"</span><span class='description'>"+f+"</span></a></div>")}(!(window.matchMedia&&window.matchMedia("all").addListener))?d.select("#"+h).parent().after(m):d.select("#"+h).after(m);var j;if(window.matchMedia){j=(window.matchMedia("(max-width: 767px)").matches)?2:3}else{j=3}d.select(".slick-carousel").attr("data-show-slides",j);d.select(".slick-carousel").slick({dots:true,slidesToShow:j,slidesToScroll:j,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>'});d.select("body").on("click",".playlist-item a",function(o){d.preventDefault(o);jwplayer(h).playlistItem(d.select(this).data("videoId"))})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.global.demo",function(e){var d;var b=".select-navigation select";var c={type:"GET",dataType:"text",timeout:"30000",cache:false};return{init:function(){console.log("INIT demo.js");d=this;e.subscribe({demoChange:d.demoChange,Orientation:function(f){},demoJSON:d.demoJSON})},execute:function(){console.log("EXEC demo.js");d=this;e.select("body").on("content-loaded change",b,function(f){var g=this.options[this.selectedIndex].title||this.options[this.selectedIndex].text;e.select(this.form).prev(".demo-title").text(g);e.publish({type:"demoChange",data:this})});e.select("body").on("submit","#ajaxJSONResponse form",function(f){e.preventDefault(f);e.publish({type:"Ajax",data:a.extendObj(c,{id:"demoJSON",container:e.select(this).parents(".response"),url:this.action,dataType:"json",type:this.method.toUpperCase(),data:e.select(this).serialize(),throbber:{type:"showThrobber",data:{nodes:e.select(this).parents(".response").closest(".loading-wrapper")}}})})})},demoJSON:function(f){e.select(".loading-wrapper-active",f.container).removeClass("loading-wrapper-active");e.select("<pre>"+JSON.stringify(f.responseJSON)+"</pre>").fadeIn("slow").appendTo(f.container)},demoChange:function(f){return e.publish({type:"Ajax",data:a.extendObj(c,{url:f[f.selectedIndex].value,type:f.form.method,container:e.select("#"+f.id+"-content .response"),throbber:{type:"showThrobber",data:{nodes:e.select("#"+f.id+"-content .response").closest(".loading-wrapper")}}})})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.ChannelLineup",function(r){var o;var p=0;var n=0;var f="desktop";var h='<div class="loader"></div><div class="response"></div>';var q=0;var z=0;var w=0;var D=1;var g=1;var t=1;var d=[];var v=false;var y="Channel Lineup";var A="init";var j="append";var u="modal";var m="desktop";var l="mobile";var C=".channel-lineup";var B=".channel-lineup-table";var c=".cms-dialog";var e="";var b="";return{init:function(){},execute:function(){o=this;r.subscribe({init_desktop_table:o.initDesktopTable,init_mobile_table:o.initMobileTable,init_modal_table:o.initModalTable,append_desktop_table:o.appendDesktopTable,append_mobile_table:o.appendMobileTable,append_modal_table:o.appendModalTable,ProgressiveScroll:o.listenForScrollEvents,ModalLoaded:o.channelLineupModal,update_refine_tv_package:o.updateRefineTvPackages});r.select("body").on("content-loaded",C,function(E){_sectionHeaderSticky=r.select(".channel-lineup .section-header");if(!v){o.getDefaultBrowserType()}});r.select(window).on("resize",function(E){o.determineBrowserType()});r.select(window).on("scroll touchmove",function(F){if(r.select(".channel-lineup .section-header").length<1){return}var E=o.getViewportOffset(_sectionHeaderSticky);if(this.scrollTop>E.top){_sectionHeaderSticky.addClass("active");r.select(".channel-lineup .data-table").stickyTableHeaders()}else{_sectionHeaderSticky.removeClass("active")}});r.select("body").on("change",".channel-lineup .select-wrapper select",function(E){o.filterOptionChange(this)});r.select("body").on("submit",".find-channels-form",function(E){E.preventDefault()});r.select("body").on("click","#filter-search-submit",function(E){E.preventDefault();o.searchOptionChange()});r.select("body").on("click","#refine-btn",function(E){E.preventDefault();o.refineOptionChange()});r.select("body").on("click",".ui-widget-overlay",function(E){if(r.select(C)[0]){E.preventDefault();o.closeModalWindow()}})},getDefaultBrowserType:function(){f=r.select("body").attr("data-layout");var E=r.select(".channel-lineup").attr("data-ajax-source");var F=window.location.href.split("?")[1];if(F){e=E+"?"+window.location.href.split("?")[1]+"&layout="+f}else{e=E+"?layout="+f}o.makeAjaxRequest(f,A)},determineBrowserType:function(){if(f!=r.select("body").attr("data-layout")){f=r.select("body").attr("data-layout");o.closeModalWindow();if(e.indexOf("layout")!=-1){e=o.removeParam(e,"layout")}if(e.indexOf("?")==-1){e+="?"}else{e+="&"}e+="layout="+f;o.makeAjaxRequest(f,A)}},makeAjaxRequest:function(H,F,I){o.insertThrobber();if(F==A){o.updateCurrentRequestRange(H,"resetRange")}var E=false;if(H==u){_numberOfResultsPerRequest=Number(r.select(c).find(C).attr("data-number-per-request"))}else{_numberOfResultsPerRequest=Number(r.select(C).attr("data-number-per-request"))}url=o.getAllFilterOptions(H)+"&status="+F+o.updateCurrentRequestRange(H,"getCurrentRange");if(H==u){url=I+o.getAllFilterOptions(H)+"&status="+F+o.updateCurrentRequestRange(H,"getCurrentRange")}var G={id:F+"_"+H+"_table",container:r.select(C),url:url,type:"GET",dataType:"json",timeout:"3000",cache:false,throbber:{type:"showThrobber",data:{nodes:".loading-wrapper"}}};if(F==j&&o.updateCurrentRequestRange(H,"isZero")){E=true}if(!o.updateCurrentRequestRange(H,"isTotal")&&B&&!E&&r.select(C)[0]){r.publish({type:"Ajax",data:G});o.updateCurrentRequestRange(H,"addToRange")}},insertThrobber:function(){r.select(B).append(h)},removeParam:function(E,F){return E.replace(new RegExp("[?&]"+F+"=[^&#]*(#.*)?$"),"$1").replace(new RegExp("([?&])"+F+"=[^&]*&"),"$1")},getBaseUrlParams:function(E,I){var G=e.split("?")[1];var F=G&&G.substr(0).replace(/\+/gi," ").split("&");if(I){var H=I&&I.substr(0).replace(/\+/gi," ").split("&");r.select(F).each(function(J,K){var L=K.split("=")[0];r.select(H).each(function(N,O){var M=O.split("=")[0];if(L==M){e=o.removeParam(e,L)}})})}},getAllFilterOptions:function(E){var F="";if(E==m){o.getBaseUrlParams(E,o.getSearchModalParams());o.getBaseUrlParams(E,o.getSortParams(false));o.getBaseUrlParams(E,o.getFilterParams());F+=e;F+=o.getSearchModalParams();F+=o.getSortParams(false);F+=o.getFilterParams()}if(E==u){F+=o.getSortParams(true)}if(E==l){F+=e;F+=o.getSearchModalParams();F+=o.getRefineParams()}return F},getSearchModalParams:function(){var G="";var F=r.select(".filter-search-fields").find("input");var E=r.select(".filter-search-fields").find("select");r.select(F).each(function(H,I){if(r.select(I).attr("type")=="text"&&r.select(I).val()){G+="&filter-search-term="+r.select(I).val()}if(r.select(I).attr("type")=="checkbox"&&r.select(I).is(":checked")){G+="&"+r.select(I).attr("name")+"="+r.select(I).val()}});r.select(E).each(function(H,I){if(r.select(I).val()){G+="&"+r.select(I).attr("name")+"="+r.select(I).val()}});return G},getSortParams:function(F){var E=r.select(".sort-by-select").find(".select-wrapper select");var G="";var H="&sort-by-select=number";if(F){E=r.select(".cms-dialog").find(".sort-by-select").find(".select-wrapper select")[0]}if(E){r.select(E).each(function(I,J){var L=r.select(J).attr("id");var K=r.select(J).find("option:selected").val();G+="&"+L+"="+K})}if(!G){G=H}return G},getFilterParams:function(){var E=r.select(".filter-by-select").find(".select-wrapper select");var F="";var G="&filter-by-select=en";r.select(E).each(function(H,I){var K=r.select(I).attr("id");var J=r.select(I).find("option:selected").val();F+="&"+K+"="+J});if(!F){F=G}return F},getRefineParams:function(){var G="";var F=r.select(".channel-lineup-refine").find("input");var E=r.select(".channel-lineup-refine").find("select");var H="&filter-by-select=en";r.select(E).each(function(I,J){G+="&"+r.select(J).attr("id")+"="+r.select(J).val()});r.select(F).each(function(I,J){if(r.select(J).attr("type")=="radio"&&r.select(J).is(":checked")){G+="&"+r.select(J).attr("name")+"="+r.select(J).val()}});if(!G){G=H}return G},listenForScrollEvents:function(){if(v||r.select(c).length>0){var G=b.split("?")[1];var E=r.select(c).find(".channel-lineup").attr("data-ajax-source");var F=E+"?"+G+"&layout="+u;o.makeAjaxRequest(u,j,F)}else{o.makeAjaxRequest(f,j)}},channelLineupModal:function(G){if(G){b=G;var H=b.split("?")[1];var E=r.select(c).find(".channel-lineup").attr("data-ajax-source");var F=E+"?"+H+"&layout="+u;v=true;if(r.select(c).find(B)[0]){o.makeAjaxRequest(u,A,F)}}},closeModalWindow:function(){var E=r.select(".cms-dialog").find(".modal-inline-content")[0];r.select(c).remove();v=false;if(E){r.select(".modal-inline-content").css("display","none")}else{}o.updateCurrentRequestRange(u,"resetRange")},initDesktopTable:function(G){if(G.isError){o.noResultsFound(0,false,true)}else{var F=G.responseJSON;if(F){q=F.totalResults;if(q==0){o.noResultsFound(q,false,false)}else{o.setPageTitle(y);r.select(".pdf-link").attr("href",F.pdfUrl);var E=o.desktopTableHeader(F.tableHeader,false,F.sortSelect);o.desktopTableBody(F.tableBody,false);o.insertSubheader(E,m,false)}o.addFilterDropdowns(F.filterSelect,false);o.displayFilters(F.filter,false);o.addDropdownToSearchModal(F.searchGenre,F.searchTVPaks);o.ajaxFinishedLoading()}}},appendDesktopTable:function(F){if(F.isError){o.noResultsFound(0,false,true)}else{var E=F.responseJSON;if(E){o.appendDesktopTableBody(E.tableBody,false)}o.ajaxFinishedLoading()}},desktopTableHeader:function(I,N,E){var G='<table class="data-table">';var L=r.select(C).attr("data-view-details-url");var K="";r.select(I).each(function(O,P){P.colClass?K+='<col class="'+P.colClass+'" />':K+="<col />"});var M="<colgroup>"+K+"</colgroup><thead><tr>";G+=M;var H='<tr class="sub-header">';var J='<td class="sort-by-select"><div class="select-wrapper">'+o.addSortDropdowns(E)+"</div></td>";var F=r.select("body").attr("data-layout");H+=J;if(!N){p=I.length}else{n=2}r.select(I).each(function(P,Q){var O;Q.colClass?O='<th class="'+Q.colClass+'">'+Q.colTitle:O="<th>"+Q.colTitle;if(Q.colTitleSpan){O+="<span>"+Q.colTitleSpan+"</span>"}O+="</th>";G+=O;if(P!=0){H+='<td><a data-hide-close-btn="true" href="'+L+"?pkg="+Q.pkg+'" class="cms-modal-trigger" data-modal-width="690">View Details</a></td>'}});G+="</tr></thead></table>";H+="</tr>";if(!N){r.select(B).html(G)}else{r.select(c).find(B).html(G)}return H},desktopTableBody:function(F,E){var H="";var G=r.select(B).find("tbody")[0];if(E){G=r.select(c).find(B).find("tbody")[0]}if(E){n=3}if(!G){H="<tbody>"}H+=o.getDesktopTableRows(F,E);H+="</tr>";if(!G){H+="</tbody>"}if(!E){r.select(B).find("table thead").after(H)}else{r.select(c).find(B).find("table thead").after(H)}},insertSubheader:function(E,F,H){var G=r.select(B).find("tbody");if(!H){r.select(G).prepend(E)}else{var I=r.select(c).find("thead")[0];r.select(c).find(G).prepend(E);r.select(c).find(G).find("tr:first-child th:last-child").attr("colspan",2);r.select(c).find(G).find(".sub-header").find("td:last-child").attr("colspan",2);r.select(c).find(I).find("tr:first-child th:last-child").attr("colspan",2);r.select(c).find(G).find("a").css("display","none")}},appendDesktopTableBody:function(F,E){var G="";if(E){n=3}G+=o.getDesktopTableRows(F,E);G+="</tr>";if(!E){r.select(B).find("table tbody").append(G);r.select(".channel-lineup .data-table").stickyTableHeaders()}else{r.select(c).find(B).find("table tbody").append(G)}},getDesktopTableRows:function(G,F){var I="";var H=p;if(F){H=n}var E="";r.select(G).each(function(J,K){if((J%H)==0){E="<tr>"}else{E=""}if(F){E="<tr>"}if(!F){if(K.channelBox){E+='<td><div class="channel-data"><h3 class="channel-box">'+K.channelBox+'</h3><img class="channel-logo" alt="'+K.logoAlt+'" src="'+K.logoUrl+'"><div class="channel-name">'+K.channelName+"</div>";E+='<ul class="channel-features">';if(K.channelFeatures){r.select(K.channelFeatures).each(function(M,N){E+="<li>"+N.type+"</li>"});var L=K.channelFeatures instanceof Array;if(!L){E+="<li>"+K.channelFeatures+"</li>"}}E+="</ul></div></td>"}else{if(K.checked){E+='<td><div class="check-mark">&nbsp;</div></td>'}else{if(K.optional){E+="<td>";r.select("body").append('<div class="tooltip-message" id="optional-text-'+J+'">'+K.optionalText+"</div>");E+='<a class="tooltip-trigger disabled" data-content-element="optional-text-'+J+'">Optional</a>';E+="</td>"}else{if(!K.checked&&!K.optional){E+="<td><div>&nbsp;</div></td>"}}}}}else{if(K.disabled&&K.disabled=="true"){E+='<td class="disable-content">'}else{E+="<td>"}if(K.channelBox){E+='<h3 class="channel-box">'+K.channelBox+"</h3>"}if(K.logoUrl){E+='<img class="channel-logo" alt="'+K.logoAlt+'" src="'+K.logoUrl+'">'}E+="</td>";if(K.disabled&&K.disabled=="true"){E+='<td class="disable-content">'}else{E+="<td>"}if(K.logoAlt){E+='<div class="channel-name">'+K.logoAlt+"</div>"}E+="</td>";if(K.disabled&&K.disabled=="true"){E+='<td class="disable-content">'}else{E+="<td>"}E+='<ul class="channel-features">';if(K.channelFeatures){r.select(K.channelFeatures).each(function(M,N){E+="<li>"+N.type+"</li>"});var L=K.channelFeatures instanceof Array;if(!L){E+="<li>"+K.channelFeatures+"</li>"}}E+="</ul>";E+="</td>";E+="</tr>"}I+=E});return I},initMobileTable:function(F){if(F.isError){o.noResultsFound(0,false,true)}else{var E=F.responseJSON;if(E){z=E.totalResults;if(z==0){o.noResultsFound(z,false,false)}else{o.createMobileTable(E);r.select(".channel-lineup-refine").find("span").remove();o.addFilterDropdowns(E.filterSelect,true);o.getRefineModalBody(E.refineBody);r.select(".pdf-link").attr("href",E.pdfUrl)}o.displayFilters(E.filter,true);o.addDropdownToSearchModal(E.searchGenre,E.searchTVPaks);o.ajaxFinishedLoading()}}},appendMobileTable:function(F){if(F.isError){o.noResultsFound(0,false,true)}else{var E=F.responseJSON;if(E){o.appendMobileContentTable(E)}o.ajaxFinishedLoading()}},createMobileTable:function(G){p=5;var E=G.packageName;o.setPageTitle(E);var F="";F+='<table class="data-table">';F+=o.getMobileTableRows(G);F+="</table>";r.select(B).html(F)},appendMobileContentTable:function(F){p=5;var E="";E+=o.getMobileTableRows(F);r.select(B).find("table").append(E)},getMobileTableRows:function(F){var E="";r.select(F.tableBody).each(function(G,H){var I="";I+='<tr class="odd">';I+='<td><img src="'+H.logoUrl+'" alt="'+H.logoAlt+'" class="channel-logo" /></td>';I+='<td><h3 class="channel-box">'+H.channelBox+"</h3></td>";I+='<td><div class="channel-name">'+H.logoAlt+"</div></td>";I+="<td>";I+='<ul class="channel-features">';r.select(H.channelFeatures).each(function(J,K){I+="<li>"+K.type+"</li>"});I+="</ul>";I+="</td>";I+="</tr>";E+=I});return E},getRefineModalBody:function(F){var E="";r.select(F).each(function(G,H){E+='<span class="colspan-12">';if(H.selected){E+='<input type="radio" checked="'+H.selected+'" value="'+H.value+'" id="'+H.value+'" name="tv-package" />'}else{E+='<input type="radio" value="'+H.value+'" id="'+H.value+'" name="tv-package" />'}E+='<label for="'+H.value+'">'+H.name+"</label>";E+="</span>"});E+='<span class="colspan-12">';E+='<a id="refine-btn" class="button" href="#">Refine</a>';E+="</span>";r.select(".channel-lineup-refine").find(".tv-packages").html(E);r.select(".channel-lineup-refine input[name='language-package']").change(function(G){o.refineLanguagePackageChange(r.select(this).val())})},refineLanguagePackageChange:function(G){var F=r.select(C).attr("data-ajax-source")+"?refine=true&language-package="+G;var E={id:"update_refine_tv_package",container:r.select(".refine-your-search"),url:F,type:"GET",dataType:"json",timeout:"30000",cache:false,throbber:{type:"showThrobber",data:{nodes:".loading-wrapper"}}};r.publish({type:"Ajax",data:E})},updateRefineTvPackages:function(H){var E=H.responseJSON;var G=E.refineBody;var F="";r.select(G).each(function(I,J){F+='<span class="colspan-12">';if(J.selected){F+='<input type="radio" checked="'+J.selected+'" value="'+J.value+'" id="'+J.value+'" name="tv-package" />'}else{F+='<input type="radio" value="'+J.value+'" id="'+J.value+'" name="tv-package" />'}F+='<label for="'+J.value+'">'+J.name+"</label>";F+="</span>"});F+='<span class="colspan-12">';F+='<a id="refine-btn" class="button" href="#">Refine</a>';F+="</span>";r.select(".channel-lineup-refine").find(".tv-packages").html(F)},initModalTable:function(K){if(K.isError){o.noResultsFound(0,true,true)}else{var G=K.responseJSON;if(G){w=G.totalResults;if(w==0){o.noResultsFound(w,true,false)}else{var H=r.select(".cms-dialog .channel-lineup-modal-header");r.select(H).html("<h2>"+G.packageName+"</h2>");var F=r.select(".cms-dialog .channel-lineup-desc-text");r.select(F).html(G.packageDesc);var I;if(G.onlinePurchase==true){I="<a class='button' href='"+G.offerUrl+"'>"+G.offerText+"</a>"}else{if(G.onlinePurchase==false){I="<a href='#' data-content-element='package-details-help' class='button tooltip-trigger'>"+G.detailsText+"</a>";I+="<div id='package-details-help' class='tooltip-message'>"+G.detailsTooltip+"</div>"}else{I=""}}r.select(".cms-dialog .channel-lineup-desc-button").html(I);var E=o.desktopTableHeader(G.tableHeader,true,G.sortSelect);o.desktopTableBody(G.tableBody,true);o.insertSubheader(E,m,true)}o.ajaxFinishedLoading()}var J=r.select(".cms-dialog").find("button");r.select(J).click(function(L){L.preventDefault();o.closeModalWindow()})}},appendModalTable:function(F){if(F.isError){o.noResultsFound(0,true,true)}else{var E=F.responseJSON;if(E){o.appendDesktopTableBody(E.tableBody,true)}o.ajaxFinishedLoading()}},noResultsFound:function(G,F,E){if(E){if(!F){r.select(".channel-lineup-table").html("<p class='no-results'>Unable to load channel lineup.</p>")}else{r.select(".cms-dialog .channel-lineup-table").html("<p class='no-results'>Unable to load channel lineup.</p>")}}else{if(G==0){if(!F){r.select(".channel-lineup-table").html("<p class='no-results'>No channels matched your search criteria.</p>")}else{r.select(".cms-dialog .channel-lineup-table").html("<p class='no-results'>No channels matched your search criteria.</p>")}}}},displayFilters:function(G,E){r.select(".cl-showme").remove();if(G&&G.length>0&&!E){var F="";r.select(G).each(function(H,I){F+="<span>"+I.term+"</span>"});r.select(".channel-lineup .filter-list").html("filtered by:"+F)}else{r.select(".channel-lineup .filter-list").html("")}if(G&&G.length>0&&E){r.select(".channel-lineup-tabs li:first-child").append('<span class="cl-showme">'+G.length+"</span>")}},addFilterDropdowns:function(G,F){var I=r.select(".channel-lineup .filter-by-select .select-wrapper");var E=0;if(G&&!F){E=r.select(G).length;if(E>1){var J='<select id="filter-by-select" name="filter-by-select">';r.select(G).each(function(K,L){if(L.selected){J+='<option selected="'+L.selected+'" value="'+L.value+'">'+L.name+"</option>"}else{J+='<option value="'+L.value+'">'+L.name+"</option>"}});J+="</select>";r.select(I).html(J)}}else{if(G&&F){E=r.select(G).length;if(E>1){var H="";r.select(G).each(function(K,L){H+='<span class="colspan-12">';if(L.selected){H+='<input type="radio" value="'+L.value+'" checked="'+L.selected+'" id="'+L.value+'" name="language-package" />'}else{H+='<input type="radio" value="'+L.value+'" id="'+L.value+'" name="language-package" />'}H+='<label for="'+L.value+'">'+L.name+"</label>";H+="</span>"})}r.select(".channel-lineup-refine").find("h2").after(H)}}},addSortDropdowns:function(E){if(E){var F='<select id="sort-by-select" name="sort-by-select">';r.select(E).each(function(G,H){if(H.selected){F+='<option selected="'+H.selected+'" value="'+H.value+'">'+H.name+"</option>"}else{F+='<option value="'+H.value+'">'+H.name+"</option>"}});F+="</select>";return F}else{return""}},filterOptionChange:function(H){var G=false;var I=b.split("?")[1];var E=r.select(c).find(".channel-lineup").attr("data-ajax-source");var F=E+"?"+I+"&layout="+u;if(r.select(H).closest(c)[0]){G=true}if(!G){o.makeAjaxRequest(f,A)}else{o.makeAjaxRequest(u,A,F)}},searchOptionChange:function(){o.closeModalWindow();o.makeAjaxRequest(f,A)},addDropdownToSearchModal:function(H,G){var J=r.select(".filter-search-select-paks")[0];var I=r.select(J).find("select")[0];var K=r.select(".filter-search-select-genre")[0];var F=r.select(K).find("select")[0];if(J&&!I){r.select(J).css("display","");var E='<select id="filter-search-select-paks" name="filter-search-select-paks">';r.select(G).each(function(M,N){if(N.selected){E+='<option value="'+N.value+'" selected="'+N.selected+'">'+N.name+"</option>"}else{E+='<option value="'+N.value+'">'+N.name+"</option>"}});E+="</select>";r.select(J).append(E)}if(K&&!F){r.select(K).css("display","");var L='<select id="filter-search-select-genre" name="filter-search-select-genre">';r.select(H).each(function(M,N){if(N.selected){L+='<option value="'+N.value+'" selected="'+N.selected+'">'+N.name+"</option>"}else{L+='<option value="'+N.value+'">'+N.name+"</option>"}});L+="</select>";r.select(K).append(L)}if(H.length==0){r.select(K).css("display","none")}if(G.length==0){r.select(J).css("display","none")}},refineOptionChange:function(){o.closeModalWindow();o.makeAjaxRequest(f,A)},setPageTitle:function(E){r.select(".section-header h2").html(E)},getViewportOffset:function(F){var E=r.select(window);scrollTop=E.scrollTop();offset=F.offset();return{top:offset.top-scrollTop}},updateCurrentRequestRange:function(M,F){var H;var I;var K;switch(M){case u:K=w;H=t;break;case m:K=q;H=D;break;case l:K=z;H=g;break}switch(F){case"getCurrentRange":var E=(H*_numberOfResultsPerRequest)-_numberOfResultsPerRequest;if(H>1){E=((H*_numberOfResultsPerRequest)-_numberOfResultsPerRequest)+1}var J=(H*_numberOfResultsPerRequest);I="&start="+E+"&end="+J;return I;break;case"addToRange":H++;if(M==u){t=H}if(M==m){D=H}if(M==l){g=H}break;case"resetRange":if(M==u){t=1}if(M==m){D=1}if(M==l){g=1}break;case"isTotal":var L=false;var O=(H*_numberOfResultsPerRequest);var N=(K+_numberOfResultsPerRequest);if(K==0){L=false}else{if(O>N){L=true}}return L;break;case"isZero":var G=false;if(M==m){if(q==0){G=true}}if(M==u){if(w==0){G=true}}if(M==l){if(z==0){G=true}}return G;break}},ajaxFinishedLoading:function(){r.publish({type:"makeAnotherCall"})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.CompareTable",function(f){var e;var d;var b=[];var c;return{init:function(){console.log("INIT CompareTable.js");e=this;f.subscribe({RecalculateTable:e.alignComparisonTable,Orientation:e.resetTableHeaderWidth})},execute:function(){console.log("EXEC CompareTable.js");e=this;c=f.select("body").attr("data-layout");d=f.select(".offer-comparison-container");if(d.length<1){return}d.each(function(g,j){var h=f.select(j);if(c=="desktop"&&h.is(":visible")){e.alignComparisonTable(h);f.select(".slick-prev",h).on("click",function(l){e.toggleActiveItem(h)});f.select(".slick-next",h).on("click",function(l){e.toggleActiveItem(h)});f.select(".slick-dots",h).on("click",function(l){e.toggleActiveItem(h)});f.select(j).on("swipe",function(l){e.toggleActiveItem(this)})}});f.select(window).bind("resize",function(){if(c!=f.select("body").attr("data-layout")){setTimeout(function(){c=f.select("body").attr("data-layout");d.each(function(g,j){var h=f.select(j);e.alignColumnHeight(h)})},100)}})},alignComparisonTable:function(g){c=f.select("body").attr("data-layout");e.setTableHeaderWidth(g);e.countFirstItems(g);e.toggleActiveItem(g);e.alignColumnHeight(g)},setTableHeaderWidth:function(g){var h=f.select(g).width()-20;f.select(".offer-comparison .header",g).css("width",h)},countFirstItems:function(j){var l=f.select(".offer-comparison:not(.slick-cloned)",j).length;var h=f.select(".offer-comparison-container").attr("data-show-slides");var g=counter=firstItem=0;for(g=h*counter;g<l;counter++){if((h*(counter+1))>l){firstItem=(l%h)+(h*(counter-1));b.push(firstItem);break}else{firstItem=(h*counter);b.push(firstItem)}}},toggleActiveItem:function(h){f.select(".offer-comparison",h).removeClass("item-first");if(f.select(".offer-comparison",h).length>4){var g=f.select(".slick-dots .slick-active button",h).html()-1;f.select(".offer-comparison[data-slick-index*="+b[g]+"]",h).addClass("item-first")}else{f.select(".offer-comparison",h).eq(0).addClass("item-first")}},resetTableHeaderWidth:function(g){if(c=="desktop"){d=f.select(".offer-comparison-container");if(d<1){return}d.each(function(h,l){var j=f.select(l);e.setTableHeaderWidth(j);e.alignColumnHeight(j)})}},alignColumnHeight:function(h){if(!(f.select("body").find("#CQ").length>0)){if(c=="desktop"){var l=f.select(".offer-comparison > .colspan-3 > .col-content")[0].children.length;for(i=1;i<=l;i++){var g=".offer-comparison > .colspan-3 > .col-content > div:nth-child("+i+")";var j=0;f.select(g,h).each(function(m,n){j=(f.select(n).outerHeight()>j)?f.select(n).outerHeight():j});f.select(g,h).css("height",j+"px");if(i==1){f.select(".slick-dots",h).css("top",j-20+"px")}}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.ExternalSearch",function(b){return{init:function(){console.log("INIT ExternalSearch.js")},execute:function(){console.log("EXEC ExternalSearch.js");b.select("body").on("click touchstart",".nav-more-news",function(c){c.stopPropagation();b.preventDefault(c);b.select(".dropdown-menu").toggleClass("open")});b.select("html").on("click touchstart",function(){b.select(".dropdown-menu").removeClass("open")})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.InternalSearchResults",function(c){var b;return{init:function(){},execute:function(){console.log("EXEC InternalSearchResults.js");c.select("body").on("change","#filter-select",function(d){b=c.select(this)[0];window.location.href=b.options[b.selectedIndex].value})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.digital-switch.DatePickerModifier",function(d){var c;var b;return{init:function(){console.log("INIT DatePickerModifier.js");c=this;d.subscribe({DatePickerModifier:c.startModifier,Orientation:c.resetDatePicker});if(window.matchMedia){b=window.matchMedia("(orientation : portrait)").matches?d.select(window).width()<768&&d.select(window).height()>768:d.select(window).width()>768&&d.select(window).height()<600}},execute:function(){},startModifier:function(){var l=d.select(".pro-time");var e=d.select(".mpro-time");var g=d.select("input[type='submit'][disabled='disabled']");var h=d.select(".button-active");if(d.select("body.IE8").length>0){d.select(".pro-date").closest("div").focus()}var f=d.select(".pro-date").val();if(f!=undefined&&f!="Pick Date"&&f!=""){l.removeAttr("disabled");l.addClass("enabled overlay-trigger");l.val("");if(d.select("body.IE").length>0){l.val("Pick Time")}if(g.hasClass("hide-pro")){g.removeClass("hide-pro");h.addClass("hide-pro")}}var j=d.select(".mpro-date").val();if(j!=undefined&&j!="Pick Date"&&j!=""){e.removeAttr("disabled");e.addClass("menabled modal-trigger");e.val("");if(g.hasClass("hide-pro")){g.removeClass("hide-pro");h.addClass("hide-pro")}}d.select("body").on("click",".mpro-date",function(m){if(d.select(".datepicker-modal-component").attr("style")===undefined){d.select("#ui-datepicker-div").wrap("<div class='datepicker-modal-component' style='width: 100%; height: auto;top: 0px; left: 0px; display: block;'></div>");d.select("#ui-datepicker-div").wrap("<div class='datepicker-modal-component-content'></div>");d.select("<div class='datepicker-modal-component-title'>Pick Your Date</div>").insertBefore(".datepicker-modal-component-content");d.select("<div class='datepicker-modal-component-head'><span title='Close' class='mpick-date-close'></span></div>").insertBefore(".datepicker-modal-component-title");d.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 mpick-date-close date-modal-close'>Close</a></div>")}d.select("#pf-container").css("display","none");if(b){var n=(d.select(window).height()<d.select(".datepicker-modal-component").height())?"auto":d.select(window).height()+"px";d.select(".datepicker-modal-component").css({height:n})}d.select(".datepicker-modal-component").css({display:"block"})});d.select("body").on("click",".pro-date",function(m){if(b){d.select(".datepicker-modal-component").css({display:"block"})}});d.select("body").on("click",".date-modal-button",function(m){d.select(".datepicker-modal-component").css({display:"none"});d.select("#pf-container").css("display","block")});d.select("body").on("click",".mpick-date-close",function(m){d.select(".mpro-date").val("");e.attr("disabled");e.removeClass("menabled modal-trigger");g.removeClass("hide-pro");h.addClass("hide-pro");d.select(".datepicker-modal-component").css({display:"none"});d.select("#pf-container").css("display","block")})},resetDatePicker:function(e){if(b){if(e.orientation=="landscape"){d.select(".mpick-date-close").trigger("click")}else{if(d.select(".datepicker-modal-component").length>0){d.select(".datepicker-modal-component").css("display","none")}else{d.select("#ui-datepicker-div").css("display","none")}}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.digital-switch.DeliveryMethod",function(c){var b;return{init:function(){},execute:function(){console.log("EXEC DeliveryMethod.js");c.select("body").on("click touchstart",".install-options",function(e){c.preventDefault(e);b=c.select(this)[0];c.select(b).addClass("active-install");c.select(b).siblings().removeClass("active-install");var d=c.select(b).children().children().attr("id");c.select(".input-active-type").val(d)})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.digital-switch.OrderListNavigation",function(c){var b;return{init:function(){},execute:function(){console.log("EXEC OrderListNavigation.js");c.select("body").on("click",".order-list tr",function(e){b=c.select(this);var d=b.find("a:visible");d.trigger("click")})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.digital-switch.PickTime",function(e){var b;var d;var c;return{init:function(){d=this;e.subscribe({Orientation:d.resetTimePicker});if(window.matchMedia){c=window.matchMedia("(orientation : portrait)").matches?e.select(window).width()<768&&e.select(window).height()>768:e.select(window).width()>768&&e.select(window).height()<600}},execute:function(){console.log("EXEC PickTime.js");var o=e.select(".pro-time");var f=e.select(".mpro-time");var h=e.select("input[type='submit'][disabled='disabled']");var l=e.select(".button-active");var g=e.select(".pro-date").val();if(g!=undefined&&g!="Pick Date"&&g!=""){o.addClass("enabled overlay-trigger");o.removeAttr("disabled")}var n=e.select(".mpro-date").val();if(n!=undefined&&n!="Pick Date"&&n!=""){f.addClass("enabled modal-trigger");f.removeAttr("disabled")}var j=e.select(".pro-time").val();var m=e.select(".mpro-time").val();if((j!=undefined&&j!="Pick Time"&&j!="")||(m!=undefined&&m!="Pick Time"&&m!="")){h.addClass("hide-pro");l.removeClass("hide-pro")}e.select("body").on("click touchstart",".pick-time-option",function(p){var q=e.select(this).children().children().text();o.val(q);f.val(q);e.select(".overlay-container").removeClass("overlay-open");h.addClass("hide-pro");l.removeClass("hide-pro")});e.select("body").on("click touchstart",".show-time-picker",function(r){e.preventDefault(r);var q;if(e.select(window).width()<767){var p=".mobile-response";q=e.select(".mpro-date").val()}else{var p=".desktop-response";q=e.select(".pro-date").val();if(e.select("body.IE8").length>0){e.select(this).closest("div").focus()}}e.publish({type:"Ajax",data:{container:e.select(p),url:e.select(p).parent().parent().attr("data-ajax-source")+"?date="+q,type:"GET",dataType:"text",timeout:"30000",cache:false,data:e.select(this).serialize()}})});e.select("body").on("click touchstart",".mpro-time-close",function(p){f.val("");h.removeClass("hide-pro");l.addClass("hide-pro")})},resetTimePicker:function(f){if(c){if(e.select(".pro-install").length>0){if(f.orientation=="portrait"){e.select(".overlay-container").removeClass("overlay-open");e.select(".mpro-time").val("")}else{e.select(".btn-close",".dialog-component").trigger("click");e.select(".pro-time").val("")}e.select("input[type='submit'][disabled='disabled']").removeClass("hide-pro");e.select(".button-active").addClass("hide-pro")}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.myaccount.bill.PayBill",function(f){var e;var b=".group-chooser";var d=false;var c;return{init:function(){console.log("INIT Pay-Bill.js");e=this;f.subscribe({PaymentValidation:e.paymentValidationResponse,InvalidPaymentValidation:e.paymentInvalidResponse,SelectedCCTypePaymentValidation:e.checkForCCTypeResponse,DatePickerSelect:e.scheduledPaymentDate,ToggleDiv:e.modalToggleHappened})},execute:function(){console.log("EXEC Pay-Bill.js");e=this;f.select("body").on("content-loaded",b,function(j){var g=f.select(this).find(".active-choice")[0];var h=f.select(this).parent().find(".accordion-next")[0];if(!h){h=f.select(".make-payment-page").find(".accordion-next")[0]}if(f.select(".ibill-no-accordion")[0]){h=f.select(".payment-btn")[0]}if(!g){if(f.select(h).hasClass("payment-btn")){f.select(h).removeClass("button").addClass("button-disabled")}else{f.select(h).removeClass("button accordion-next").addClass("button-secondary-disabled")}}else{if(f.select(h).hasClass("payment-btn")){f.select(h).removeClass("button-disabled").addClass("button")}else{f.select(h).removeClass("button-secondary-disabled").addClass("button accordion-next")}}f.select(".button-secondary-disabled").click(function(m){m.preventDefault()});f.select(".button-disabled").click(function(m){m.preventDefault()});var l=f.select(this).parent();e.handleRadioBtnSelection(g,l)});f.select("body").on("keypress","input",function(h){if(h.currentTarget.type!="submit"){if(h.keyCode==13){c=this;var g=f.select(c).closest(".accordion-panel-open").find("input");if(g.length>0){if(f.select(g).valid()){if(f.select(c).closest(".accordion-panel-open").find(".accordion-next").length>0){f.preventDefault(h);f.select(c).closest(".accordion-panel-open").find(".accordion-next").click()}}}}}});f.select("body").on("click",".group-choice",function(j){var g=this;var l=f.select(this).parent().parent();var h=f.select(l).find(".button-secondary-disabled")[0];f.select(h).removeClass("button-secondary-disabled ").addClass("button accordion-next");if(f.select(".ibill-no-accordion")){h=f.select(".payment-btn")[0];f.select(h).removeClass("button-disabled").addClass("button")}e.handleRadioBtnSelection(g,l)});f.select("body").on("click",".accordion-next",function(j){var g=this;if((f.select(g).closest(".accordion-panel-open").find(".choose-payment-method-step").length>0||f.select(g).closest(".accordion-panel-open").find(".choose-payment-method-saved-step").length>0)&&(f.select("#optPayWithAcct").attr("checked")=="checked")){var m=f.select("#confirmAcctNum").val().length;var h=f.select("#confirmAcctNum").val();var l="";for(i=m-4;i<m;i++){l=l+f.select("#confirmAcctNum").val()[i]}var n=f.select("#txtBankName")[0].innerHTML+" (xx"+l+")";e.updateCurrentHeaderContent(n,1)}});f.select("body").on("click",".add-paymment-modal-button",function(l){var j=f.select(".dialog-component-content").find(".form-modal");var g=j.find(".txtAcctNumModal").val();var h=j.find(".confirmAcctNumModal").val();if(g!=h){f.select(j).validate().showErrors({confirmAcctNum:"Confirm value does not match actual value."});l.preventDefault()}});f.select("body").on("click",".track-make-payment",function(h){if(f.select(".submit-payment-form").valid()){var j=f.select("#easypay-check").val();var g=f.select("#paperlessbilling-check").val();if(j=="true"){f.publish({type:"OmnitureInterface",data:{mode:"track",type:"event",options:{eventName:"easypay"}}})}if(g=="true"){f.publish({type:"OmnitureInterface",data:{mode:"track",type:"event",options:{eventName:"paperlessbilling"}}})}}});f.select("body").on("click",".track-paperless-billing",function(h){var g=f.select("[name='radioboxgroup']:checked").val();if(g=="radio-1"){f.publish({type:"OmnitureInterface",data:{mode:"track",type:"event",options:{eventName:"paperlessbilling"}}})}})},handleRadioBtnSelection:function(g,m){var o=f.select(g).find(".choice-value");var n=f.select(g).hasClass("saved-boxes");var l=f.select(g).hasClass("multi-select");if(f.select(o).is("span")){var j;if(f.select(o).hasClass("Visa")){j="Visa"}else{if(f.select(o).hasClass("MasterCard")){j="MasterCard"}else{if(f.select(o).hasClass("Discover")){j="Discover"}else{if(f.select(o).hasClass("Amex")){j="Amex"}}}}if(o.length==1){o=f.select(o).text()}else{o=f.select(o[0]).text()+" ("+f.select(o[1]).text()+")"}}else{f.select(o).blur(function(p){o=f.select(this).val();e.processCurrentRadioBtnSelection(m,o,j,n,l)});o=f.select(o).val()}if(o==undefined){var h=f.select(g).find("label")[0];o=f.select(h).text()}e.processCurrentRadioBtnSelection(m,o,j,n,l);e.removeErrorValidationElements()},processCurrentRadioBtnSelection:function(h,l,j,g,m){var n=f.select(h).attr("class").toString().split(" ");$.each(n,function(o,p){switch(p){case"select-payment-amount-step":e.handleSelectPaymentAmountMethod(l);break;case"choose-payment-method-step":e.handleChoosePaymentMethod("");break;case"saved-payment-methods":e.handleSavedPaymentMethod(l,j,g,h);break;case"schedule-payment-step":e.handleSchedulePaymentMethod(l);break;case"multi-payment-options":e.handleMultiplePaymentMethods(l,m);break;case"more-payment-options":e.calculatePaymentAmountForDifferentPayments();break;case"choose-payment-method-saved-step":e.handleEasyPayPage();break}})},handleSelectPaymentAmountMethod:function(g){if(g==""){g="$0.00"}e.updateCurrentHeaderContent(e.formatInputForCurrency(g),0)},handleChoosePaymentMethod:function(g){e.updateCurrentHeaderContent(g,1);e.listenForCreditCardOrBankSelection();f.select("span").removeClass("Visa MasterCard Discover Amex");f.select("input").removeClass("Visa MasterCard Discover Amex")},handleSavedPaymentMethod:function(m,l,h,g){var n=f.select(".make-payment-page").find(".button")[0];if(!n){n=f.select(".make-payment-page").find(".button-secondary-disabled")[0]}if(h){f.select(n).removeClass("button-secondary-disabled").addClass("button accordion-next")}if(!d){e.removeInputFieldValidation(f.select(".credit-card-form").find("fieldset"));e.removeInputFieldValidation(f.select(".bank-account-form").find("fieldset"));e.hideElement(f.select(".choose-new-method"));e.hideElement(f.select(".credit-card-form"));e.hideElement(f.select(".bank-account-form"))}else{e.showElement(f.select(".choose-new-method"))}if(h&&d){e.hideElement(f.select(".credit-card-form"));e.hideElement(f.select(".bank-account-form"));e.showElement(f.select(n));e.removeInputFieldValidation(f.select(".credit-card-form").find("fieldset"));e.removeInputFieldValidation(f.select(".bank-account-form").find("fieldset"))}else{if(!h&&!d){e.showElement(f.select(n))}else{if(!h&&d){f.select(n).attr("style","display: none !important")}}}f.select(".add-payment").click(function(o){o.preventDefault();d=true;e.showElement(f.select(".choose-new-method"));f.select(this).replaceWith(f.select(this).text());var q=f.select(".make-payment-page").find(".group-choice");f.select(q).each(function(t,u){if(f.select(u).hasClass("active-choice")){f.select(u).removeClass("active-choice");var r=f.select(u).find("input")[0];f.select(r).removeAttr("checked")}});var p=f.select(".choose-new-method")[0];f.select(p).addClass("active-choice");f.select(p).find("input").prop("checked","checked");f.select(p).find("input").attr("checked","checked");if($("#optPayWithAcct").length>0){e.updateCurrentHeaderContent(f.select("#optPayWithAcct").next()[0].innerHTML,1)}else{e.updateCurrentHeaderContent(f.select("#optPayWithCard").next()[0].innerHTML,1)}e.listenForCreditCardOrBankSelection()});e.listenForCreditCardOrBankSelection();e.updateCurrentHeaderContent(m,1,l);var j=f.select(g).parent().hasClass("ibill-no-accordion");if(j){e.handleEasyPayPage()}},handleSchedulePaymentMethod:function(h){var g=$.datepicker.formatDate("mm/dd/yy",new Date());if(h==""){h=""}if(h=="Pay Now"){h=g}e.updateCurrentHeaderContent(h,2)},handleMultiplePaymentMethods:function(h,j){var g=f.select(".more-payment-options").find(".multi-select");if(j){e.calculatePaymentAmountForDifferentPayments();f.select(".more-payment-options").css("display","block");if(f.select("body.IE8").length>0){f.select(".more-payment-options").parentsUntil("#pf-container").css("zoom","").css("zoom","1")}f.select(g).each(function(n,o){var m=f.select(o).find("input.choice-value")[0];var l=f.select(o).find("input")[0];if(f.select(l).attr("checked")=="checked"){e.addInputFieldValidation(m)}else{e.removeInputFieldValidation(m)}})}else{f.select(".more-payment-options").css("display","none");f.select(g).each(function(m,n){var l=f.select(n).find("input.choice-value")[0];e.removeInputFieldValidation(l)})}e.updateCurrentHeaderContent(h,0)},handleEasyPayPage:function(){var h=f.select(".choose-payment-method-saved-step").find(".accordion-next");var g=f.select(".easypay-page").find(".button")[0];e.replaceCheckboxContent();e.listenForCreditCardOrBankSelection();f.select(h).text("Submit");f.select(h).click(function(j){j.preventDefault();f.select(this).removeClass("accordion-next");if(!f.select(this).hasClass("button-secondary-disabled")){f.select(".form").submit()}});f.select(g).click(function(j){f.select(".form").submit()})},calculatePaymentAmountForDifferentPayments:function(){var l=f.select(".more-payment-options").find(".group-choice");var h=f.select(".multi-select").find("span.choice-value");var g=false;var j=0;if(f.select(".multi-select").find("input").attr("checked")=="checked"){g=true}f.select(l).each(function(p,o){var m=f.select(o).find("input")[0];if(f.select(m).attr("checked")=="checked"){var n=f.select(o).find("input.choice-value")[0];n=f.select(n).val();if(n==""){n="0.00"}if(!n){n=f.select(o).find("span.choice-value")[0];n=f.select(n).text()}n=n.replace("$","");j+=Number(n)}});j=e.formatInputForCurrency(j.toFixed(2));f.select(h).text(j);if(g){e.updateCurrentHeaderContent(j,0)}},formatInputForCurrency:function(g){if(g){g=g.replace("$","");g=g.replace(",","");g=Number(g).toFixed(2);g=e.addCommas(g);if(isNaN(g)){g=0}return"$"+g}},addCommas:function(h){h+="";x=h.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var g=/(\d+)(\d{3})/;while(g.test(x1)){x1=x1.replace(g,"$1,$2")}return x1+x2},updateCurrentHeaderContent:function(l,g,h){var m=f.select(".accordion-trigger")[g];var j=f.select(m).find(".accordion-dynamic-text");f.select(j).removeClass("Visa MasterCard Discover Amex");f.select(j).html(l).addClass(h)},listenForCreditCardOrBankSelection:function(){if(f.select("#optPayWithAcct").attr("checked")=="checked"){e.showBankForm()}if(f.select("#optPayWithCard").attr("checked")=="checked"){e.showCreditCardForm()}},addInputFieldValidation:function(g){if(f.select(g).is("input")){f.select(g).addClass("required").removeClass("ignore-validation")}if(f.select(g).is("fieldset")){var j=f.select(g).find("input");var h=f.select(g).find("select");var l=f.select(g).find("#save-payment-bank")[0];if(!l){l=f.select(g).find("#save-payment-credit")[0]}f.select(j).each(function(m,n){f.select(n).addClass("required").removeClass("ignore-validation")});f.select(h).each(function(m,n){f.select(n).addClass("required").removeClass("ignore-validation")});if(l){f.select(l).addClass("ignore-validation").removeClass("required")}}},removeInputFieldValidation:function(g){if(f.select(g).hasClass("group-chooser")){f.select(g).find("input.choice-value").addClass("ignore-validation").removeClass("required")}if(f.select(g).is("input")){f.select(g).addClass("ignore-validation").removeClass("required")}if(f.select(g).is("fieldset")){var j=f.select(g).find("input");var h=f.select(g).find("select");var l=f.select(g).find("#save-payment-bank")[0];if(!l){l=f.select(g).find("#save-payment-credit")[0]}f.select(j).each(function(m,n){f.select(n).addClass("ignore-validation").removeClass("required")});f.select(h).each(function(m,n){f.select(n).addClass("ignore-validation").removeClass("required")});if(l){f.select(l).addClass("ignore-validation").removeClass("required")}}},clearOutFormFields:function(g){var j=f.select(g).find("input");var h=f.select(g).find("select");f.select(j).each(function(l,m){f.select(m).val("")});f.select(h).each(function(l,m){f.select(m).val("")})},hideElement:function(g){f.select(g).css("display","none");if(f.select("body.IE8").length>0){f.select(g).parentsUntil("#pf-container").css("zoom","").css("zoom","1")}},showElement:function(g){f.select(g).css("display","");if(f.select("body.IE8").length>0){f.select(g).parentsUntil("#pf-container").css("zoom","").css("zoom","1")}},showCreditCardForm:function(){var h=f.select(".credit-card-form");var g=f.select(".bank-account-form");f.select(".txtBankName").text("----");e.clearOutFormFields(g);f.select(".payByCardType").attr("style","display: none !important");f.select(".expiration-date").css("display","block");e.hideElement(g);e.showElement(h);e.addInputFieldValidation(f.select(h).find("fieldset"));e.removeInputFieldValidation(f.select(g).find("fieldset"))},showBankForm:function(){var h=f.select(".credit-card-form");var g=f.select(".bank-account-form");f.select("input").removeClass("Visa MasterCard Discover Amex");e.clearOutFormFields(h);e.hideElement(h);e.showElement(g);e.addInputFieldValidation(f.select(g).find("fieldset"));e.removeInputFieldValidation(f.select(h).find("fieldset"))},paymentValidationResponse:function(h){var m=f.select(h.inputField).closest(".form-modal")[0];if(f.select(".ibill-no-accordion")[0]){e.easypayValidResponse()}else{if(m){e.modalValidResponse(m)}else{e.removePaymentClasses();var g=false;if(f.select(".txtCCNum")[0]){var l=f.select(".txtCCNum").val();var j="(xx"+l.slice(12)+")"}var o=f.select(".accordion-trigger")[1];var n=f.select(".make-payment-page").find(".accordion-next")[0];if(h.response=="Visa"||h.response=="MasterCard"||h.response=="Discover"||h.response=="Amex"){g=true}f.select(f.select(o).find(".accordion-dynamic-text")[0]).addClass(h.response);if(g){f.select(o).find(".accordion-dynamic-text").text(j)}else{f.select(o).find(".accordion-dynamic-text").text(h.response)}if(!n){n=f.select(".make-payment-page").find(".button-secondary-disabled")[0]}f.select(n).removeClass("button-secondary-disabled").addClass("button accordion-next")}}},paymentInvalidResponse:function(g){var h=f.select(g.inputField).closest(".form-modal")[0];if(f.select(".ibill-no-accordion")[0]){e.easypayInvalidResponse()}else{if(h){e.modalInvalidResponse(h)}else{var j=f.select(".make-payment-page").find(".button")[0];f.select(j).removeClass("button accordion-next").addClass("button-secondary-disabled");f.select(j).click(function(l){l.preventDefault()})}}},easypayValidResponse:function(){var g=f.select(".payment-btn")[0];f.select(g).removeClass("button-disabled loading-wrapper-active").addClass("button");f.select(g).click(function(h){f.select(".form").submit()})},easypayInvalidResponse:function(){var g=f.select(".payment-btn")[0];f.select(g).removeClass("button").addClass("button-disabled");f.select(g).click(function(h){h.preventDefault()})},modalValidResponse:function(h){var g=f.select(h).find(".dialog-component-buttons input")[0];if(f.select(g).hasClass("button-disabled")){f.select(g).removeClass("button-disabled");f.select(g).click(function(j){f.select(g).unbind("click");f.select(h).submit()})}},modalInvalidResponse:function(h){var g=f.select(h).find(".dialog-component-buttons input")[0];f.select(g).addClass("button-disabled");f.select(g).click(function(j){j.preventDefault()})},modalToggleHappened:function(h){var j=f.select(h.element).closest(".form-modal")[0];if(j){e.clearOutFormFields($(j).find("fieldset"));var g=f.select(j).find(".dialog-component-buttons input")[0];if(f.select(g).hasClass("button-disabled")){f.select(g).removeClass("button-disabled");f.select(g).unbind("click")}}},removePaymentClasses:function(){var g=f.select(".accordion-trigger")[1];f.select(f.select(g).find(".accordion-dynamic-text")[0]).removeClass("Visa MasterCard Discover Amex")},replaceCheckboxContent:function(){if(typeof(termsContent)!="undefined"){f.select(".form").find("span.checkbox").html(termsContent)}},removeErrorValidationElements:function(g){f.select(".error-wrapper").remove();f.select("input").removeClass("error");f.select(".msg-error").css("display","none");f.select("label").removeClass("errorMsg");f.select(".bank-label,.bank-value,.txtCCType").removeClass("required")},checkForCCTypeResponse:function(g){if(g=="DEBIT"){e.selectedATMCardType()}else{e.selectedOtherCardType()}},selectedATMCardType:function(){f.select(".pay-on-date").attr("style","display: none !important");f.select(".pay-on-date").removeClass("required").addClass("ignore-validation");f.select(".setUpEasyPay").attr("style","display: none !important");f.select(".pay-on-now").attr("style","display: block")},selectedOtherCardType:function(){f.select(".pay-on-date").attr("style","display: block");f.select(".setUpEasyPay").attr("style","display: block");f.select(".pay-on-now").attr("style","display: none")},scheduledPaymentDate:function(g){var h=f.select(g).val();e.updateCurrentHeaderContent(h,2)},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.myaccount.bill.PaymentValidation",function(d){var c;var b=".txtRoutingNum, .txtCCNum, .txtAcctNum";return{init:function(){console.log("INIT PaymentValidation.js");c=this;d.subscribe({CardValidation:c.handleCreditCardValidation})},execute:function(){console.log("EXEC PaymentValidation.js");c=this;d.select("body").on("content-loaded",b,function(e){d.select(this).on("keydown",function(f){if(f.keyCode==46||(f.keyCode==67&&f.ctrlKey===true)||(f.keyCode==86&&f.ctrlKey===true)||f.keyCode==8||f.keyCode==9||f.keyCode==27||f.keyCode==13||(f.keyCode==65&&f.ctrlKey===true)||(f.keyCode>=35&&f.keyCode<=39)||f.keyCode==229){return true}else{if(f.shiftKey||(f.keyCode<48||f.keyCode>57)&&(f.keyCode<96||f.keyCode>105)){f.preventDefault();return false}}});d.select(this).on("blur",function(f){if(d.select(this).hasClass("txtRoutingNum")){c.handleRoutingNumberValidation(this.value,this)}else{if(d.select(this).hasClass("txtCCNum")){}}});c.hideCardTypeOnLoad()})},handleRoutingNumberValidation:function(j,f){var h=d.select(f).closest(".form");var e={};e.inputField=f;var g=d.select(f).parents().filter(function(){return d.select(this).data("bankValidation")}).eq(0).data("bankValidation");$.getJSON(g+"?bank="+j,function(l){if(l.match){c.removeErrorValidationElements(h);d.select(".txtBankName").html(l.response);e.response=l.response;c.publishValidResponse(e)}else{d.select(".txtBankName").html("----");d.select(h).validate().showErrors({txtRoutingNum:l.response});c.publishInvalidResponse(e)}}).fail(function(){console.log("ERROR: making ajax request for bank routing number!")})},handleCreditCardValidation:function(f){cardNumber=f.cardNumber;inputField=f.cardField;response=f.cardDetails;var g=d.select(inputField).closest(".form");var e={};e.inputField=inputField;if(response.cardType){d.select(".txtCCType").attr("value",response.cardType).removeClass("required");e.response=response.cardType;e.isDebit=f.isDebit;var h=d.select(".accordion-trigger")[1];d.select(h).find(".accordion-dynamic-text").removeClass("generic-atm-card");c.publishValidResponse(e);if(f.isDebit==true){c.showSelectCardType();d.select(".txtCCCategory").attr("value","DEBIT").removeClass("required")}else{c.hideSelectCardType();d.select(".txtCCCategory").attr("value","CREDIT").removeClass("required")}}else{var h=d.select(".accordion-trigger")[1];d.select(h).find(".accordion-dynamic-text").text("");c.publishInvalidResponse(e)}},removeErrorValidationElements:function(e){d.select(".error-wrapper").remove();d.select(".msg-error").css("display","none");d.select(e).find("label").removeClass("errorMsg")},publishValidResponse:function(e){d.publish({type:"PaymentValidation",data:e})},publishInvalidResponse:function(e){d.publish({type:"InvalidPaymentValidation",data:e})},publishSelectedCCTypeResponse:function(e){d.publish({type:"SelectedCCTypePaymentValidation",data:e})},checkForCCTypeResponse:function(e){if(e=="DEBIT"){c.selectedATMCardType()}else{c.selectedOtherCardType()}c.publishSelectedCCTypeResponse(e)},showSelectCardType:function(){d.select(".payByCardType").attr("style","display: block !important");d.select(".payByCardType").find("select").removeClass("ignore-validation").addClass("required");var e=d.select(".cardType")[0];d.select(e).on("change",function(f){c.checkForCCTypeResponse(d.select(this).val())})},hideCardTypeOnLoad:function(){d.select(".payByCardType").attr("style","display: none !important");d.select(".payByCardType").find("select").removeClass("required").addClass("ignore-validation")},hideSelectCardType:function(){d.select(".expiration-date").css("display","block");d.select(".expiration-date").find("select").removeClass("ignore-validation").addClass("required");d.select(".payByCardType").attr("style","display: none !important");d.select(".payByCardType").find("select").removeClass("required").addClass("ignore-validation")},selectedATMCardType:function(){d.select(".expiration-date").attr("style","display: none !important");d.select(".expiration-date").find("select").removeClass("required").addClass("ignore-validation");d.select(".save-checkbox").attr("style","display: none !important")},selectedOtherCardType:function(){d.select(".expiration-date").attr("style","display: block");d.select(".expiration-date").find("select").removeClass("ignore-validation").addClass("required");d.select(".save-checkbox").attr("style","display: block")},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.resaccount.AlertSlider",function(d){var c;var b=d.select(".multiple-alert");return{init:function(){console.log("INIT AlertSlider.js");c=this;d.subscribe({Orientation:c.orientationSlick})},execute:function(){console.log("EXEC AlertSlider.js");c=this;if(b.length==0){return}if(window.matchMedia){c.toggleSlick()}},toggleSlick:function(){var e=window.matchMedia("screen and (max-width: 767px)");if(e.matches){d.select(".multiple-alert").addClass("slick-carousel");d.select(".multiple-alert.slick-carousel").slick({dots:true,infinite:false,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>'})}else{var f=d.select(".multiple-alert.slick-carousel");f.each(function(){if(d.select(this).hasClass("slick-initialized")){d.select(this).slick("unslick")}});if(d.select(f).hasClass("slick-carousel")){d.select(f).removeClass("slick-carousel")}}},orientationSlick:function(){c.toggleSlick()},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.resaccount.AlignPriceValue",function(g){var f;var b=".ecomm-align-price";var c;var d;var e=null;return{init:function(){console.log("INIT AlignPriceValue.js");f=this;g.subscribe({RealignContainerItems:f.alignContainerItems})},execute:function(){console.log("EXEC AlignPriceValue.js");f=this;if(typeof CQ!="undefined"&&typeof CQ.WCM!="undefined"){if(CQ.WCM.getMode()=="edit"||CQ.WCM.getMode()==null){return}}g.select("body").on("content-loaded",b,function(h){c=g.select(b).parents(".section-container");g.select(window).bind("resize",function(){d=setTimeout(function(){f.getContainers(c)},200)});d=setTimeout(function(){f.getContainers(c)},200)})},getContainers:function(h){clearTimeout(d);g.select(h).each(function(j,l){f.alignContainerItems(l)})},alignContainerItems:function(p){var o=".ecomm-price-value";var h=".ecomm-align-price";var m=g.select(p).find(h);if(m[0]){var n=[];for(var j=0;j<m.length;j++){var l=g.select(m[j]).find(o);if(l[0]){$.merge(n,l);if(e==null){e=parseInt(g.select(l[0]).css("margin-top"))}f.alignHeightOfGroup(n)}}}},alignHeightOfGroup:function(l){var h=0;var j=0;g.select(l).each(function(n,o){if(g.select(window).width()<768){g.select(o).css("margin-top",Math.round(e)+"px")}else{g.select(o).removeAttr("style");var m=Math.round(g.select(o).offset().top);if(m>h){h=m}}});if(g.select(window).width()>767){g.select(l).each(function(o,p){var m=Math.round(g.select(p).offset().top);var n=parseInt(g.select(p).css("margin-top"));if(m<h){j=Math.round(h-m)+n;j=Math.round(j);if(j>600){j=0}g.select(p).css("margin-top",j+"px")}})}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.resaccount.DeviceAwarenessApp",function(d){var c;var b=d.select(".device-app");return{init:function(){console.log("INIT DeviceAwarenessApp.js");c=this},execute:function(){console.log("EXEC DeviceAwarenessApp.js");c=this;if(b.length==0){return}var f=navigator.userAgent||navigator.vendor;if(f.match(/Android/i)){var e=d.select(".android-app");e.show();e.siblings().hide()}else{var g=d.select(".apple-app");g.show();g.siblings().hide()}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.resaccount.EnableDisableElement",function(d){var c;var b;return{init:function(){console.log("INIT EnableDisableElement.js");c=this},execute:function(){console.log("EXEC EnableDisableElement.js");c=this;d.select("body").on("change",".showhide-checkbox",function(f){var e=d.select(this);b=e.parents(".toggle-checkbox");var g=d.select(e).attr("data-show-element");if(d.select(e).is(":checked")){d.select("."+g,b).removeClass("button-disabled").attr("disabled",false)}else{d.select("."+g,b).addClass("button-disabled").prop("disabled",true)}})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.resaccount.LifeCycle",function(e){var d;var b=e.select(".resaccount-bill");var c;return{init:function(){console.log("INIT LifeCycle.js");d=this},execute:function(){d=this;if(b.length==0){return}_browserType=e.select("body").attr("data-layout");if(_browserType=="desktop"){var g=e.select(".account-snapshot").attr("lifecycle-accountnum");if(sessionStorage.lifeCycleAccount==""){sessionStorage.lifeCycleAccount=g}else{if(sessionStorage.lifeCycleAccount!=g){sessionStorage.visit=false}else{if(sessionStorage.lifeCycleAccount==g){sessionStorage.visit=true}}}if((typeof(Storage)!=="undefined")&&(e.select(".alert-card").length==0)&&(sessionStorage.visit!="true")){var h=e.select(".myaccount-lifecycle-card a.accordion-trigger");var f=e.select(".myaccount-lifecycle-card a.accordion-trigger ~ div.accordion-panel");h.addClass("accordion-trigger-open");h.attr("aria-selected","true");h.attr("aria-expanded","true");f.addClass("accordion-panel-open");f.attr("aria-hidden","true");sessionStorage.visit=true;sessionStorage.lifeCycleAccount=g}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.resaccount.QuickLinksToggle",function(e){var d;var b=e.select(".quick-link-selector");var c=e.select(".billing-card");return{init:function(){console.log("INIT QuickLinksToggle.js");d=this;e.subscribe({Orientation:d.quickLinkToggle})},execute:function(){console.log("EXEC QuickLinksToggle.js");d=this;if(b.length==0){return}var g=e.select(".video-bill",c);if(g.length>0){}else{var f=e.select(".quick-link-desktop",c);e.select(f).children(":first-child").insertBefore(f)}e.select("body").on("click",".quick-link-toggle a",function(l){e.preventDefault(l);_trigger=e.select(this);if(_trigger.parent().hasClass("expand-view")){_trigger.parent().removeClass("expand-view").addClass("collapse-view")}else{if(_trigger.parent().hasClass("collapse-view")){_trigger.parent().removeClass("collapse-view").addClass("expand-view")}else{_trigger.parent().addClass("expand-view")}}if(e.select(_trigger).parents(".quick-link-selector")){var h=e.select(_trigger).parents(".quick-link-selector");if(window.matchMedia){var j=window.matchMedia("screen and (max-width: 767px)");if(j.matches){e.select(".quick-link-mobile",h).slideToggle(500);e.select(".quick-link-mobile",h).toggleClass("view-open")}else{e.select(".quick-link-desktop",h).slideToggle(500);e.select(".quick-link-mobile",h).toggleClass("view-open")}}else{e.select(".quick-link-desktop",h).slideToggle(500)}}})},quickLinkToggle:function(g){var f;if(window.matchMedia){f=window.matchMedia("(orientation : portrait)").matches?e.select(window).width()<768&&e.select(window).height()>768:e.select(window).width()>768&&e.select(window).height()<600}if(window.matchMedia("screen and (max-width: 767px)")&&f==true){if(g.orientation=="portrait"){e.select(".quick-link-mobile").each(function(h,j){if(e.select(j).css("display","inline")!=-1){e.select(j).css("display","none");e.select(".quick-link-desktop",j).css("display","inline")}});e.select(".view-open").each(function(h,l){if(e.select(l).hasClass("quick-link-mobile")){var j=e.select(l).attr("class").split(" ").join(".");e.select("."+j).css("display","block");e.select(".quick-link-desktop",l).css("display","inline")}})}else{e.select(".quick-link-mobile").each(function(h,j){if(e.select(j).css("display","none")!=-1){e.select(j).css("display","inline");e.select(".quick-link-desktop",j).css("display","none")}});e.select(".view-open").each(function(h,l){if(e.select(l).hasClass("quick-link-mobile")){var j=e.select(l).attr("class").split(" ").join(".");e.select("."+j).css("display","inline");e.select(".quick-link-desktop",l).css("display","block")}})}}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.resaccount.ResetCableConnectionAjax",function(d){var c;var b=d.select(".reset-cable-ajax-trigger");return{init:function(){console.log("INIT ResetCableConnectionAjax.js");c=this},execute:function(){console.log("EXEC ResetCableConnectionAjax.js");c=this;if(b.length==0){return}d.select("body").on("click",".reset-cable-ajax-trigger",function(h){var f=d.select(this);var g=f.closest(".ajax-loader-container");var e=g.find(".loading-wrapper");d.publish({type:"Ajax",data:{container:g.find(".loading-wrapper .response"),url:f.attr("data-ajax-source"),type:"GET",dataType:"text",timeout:"30000",cache:false,throbber:{type:"showThrobber",data:{nodes:e,display:e.attr("data-ajax-display"),message:e.attr("data-ajax-message")}}}})})},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.residential.resaccount.SupportCard",function(d){var c;var b=d.select(".resaccount-bill");return{init:function(){console.log("INIT SupportCard.js");c=this},execute:function(){console.log("EXEC SupportCard.js");c=this;if(b.length==0){return}_browserType=d.select("body").attr("data-layout");d.select(".support-search-form input:submit").on("click",function(e){if(d.select(".support-search-form input:text").val()==""){return false}});if(d.select(".support-list").length==0){d.select(".my-support-card .mybill-quick-links").css("margin-top","-9px")}if(_browserType=="desktop"){d.select(".my-support-card form").attr("action",d.select(".search-support-action-url").attr("desktop-url"))}else{d.select(".my-support-card form").attr("action",d.select(".search-support-action-url").attr("mobile-url"))}},destroy:function(){}}})})(coxfw);(function(a){a.core.define("modules.utils.print",function(c){var b;return{init:function(){},execute:function(){console.log("EXEC print.js");b=this;c.select("body").on("click",".btn-print, .print-trigger",function(d){b.print()})},print:function(d){window.print()},destroy:function(){}}})})(coxfw);(function(a){a.core.define("testing.global.LoadingThrobber",function(e){var c;var b="loading-wrapper-active";var d;return{init:function(){console.log("INIT LoadingThrobber.js TESTING");d=this;e.subscribe({showThrobber:d.showThrobber,hideThrobber:d.hideThrobber})},execute:function(){console.log("EXEC LoadingThrobber.js TESTING");d=this},showThrobber:function(f){c=e.timing("showThrobber",function(){});e.test("showThrobber",function(){e.ok(c.time<0.5,"Throbber took "+c.time+"sec.");e.ok(f.nodes.hasClass(b),"Throbber is currently "+e.select(".loader",f.nodes).height()+"px high.")})},hideThrobber:function(f){c=e.timing("hideThrobber",function(){});e.test("hideThrobber",function(){e.ok(c.time<0.5,"Throbber took "+c.time+"sec.");e.ok(!f.nodes.hasClass(b),"Throbber is currently "+e.select(".loader",f.nodes).height()+"px high.")})},destroy:function(){}}})})(coxfw);