(function(b){function a(d){this.id=d.id||"previewToolBarFrame";this.url=d.url||"http://localhost:8080/";this.IframeObj="";this.parentUrl=d.parentUrl||"";this.SELECTEDTAGS="selectedTags";this.okta=d.okta;this.RESET_TAG="reset";this.BACK_TO_MY_PROFILE_TAG="myprofile";this.webId=d.webId;this.locale=d.locale;this.version=d.version||"LIVE";this.originalDomain=d.originalDomain;this.userRecommendedModel=d.userRecommendedModel||{};this.disableLogo=d.disableLogo;this.setTranslations()}a.prototype.setTranslations=function(){switch(this.locale.toLowerCase()){case"fr_ca":this.poweredBy="Propuls\xe9 par";this.dealerLogin="Connexion du concessionnaire";break;default:this.poweredBy="Powered By";this.dealerLogin="Dealer Log In"}};a.prototype.init=function(){if(this.webId&&this.locale&&this.version&&this.originalDomain){var e=this.getURLParameter("selectedTags")||sessionStorage.getItem("selectedTags");if(e&&e!=="null"){sessionStorage.setItem("selectedTags",e)}this.createIframe(e);var d=localStorage.getItem("previewToolbarLoggedIn");if(this.version!=="LIVE"){this.addIframeToBody()}else{if(d==="true"){this.createValidateIframe("onLoad")}else{this.createLoginMarkup()}}b.addEventListener("message",this.listenToPostMessage.bind(this),false)}else{console.log("WebId, Locale, version and originalDomain are mandatory to load toolbar")}};a.prototype.createLoginMarkup=function(){if(!document.getElementById("previewToolBarFrame")){var h=this.url+"SincroLogoPrimaryLogin.png";var d=this.disableLogo===undefined||this.disableLogo?"":'
'+this.poweredBy+' ';var g='";var f=document.createElement("div");var i=document.createElement("div");i.setAttribute("id","previewToolBarFrame");i.setAttribute("class","PtDealerLoginLink");f.innerHTML=g;f=f.firstChild;i.appendChild(f);document.body.appendChild(i);var j=document.getElementById("login-link");var e=this;if(j){j.addEventListener("click",function(){localStorage.setItem("previewToolbarLoggedIn","true");e.createValidateIframe()})}}};a.prototype.createValidateIframe=function(f){var d=document.createElement("iframe");var e=this.url+"injector-1.0.1/validate.html";e+="?webId="+this.webId+"&locale="+this.locale+"&version="+this.version+"&originalDomain="+this.originalDomain;if(f){e+="&source="+f}d.id=this.id+"Validate";d.src=e;d.style.cssText=["visibility: hidden;","position: absolute;","left: 0; top: 0;","height:0; width:0;","border: none;"].join();d.setAttribute("data-parentUrl",this.parentUrl);this.validateIframeObj=d;document.body.appendChild(this.validateIframeObj)};a.prototype.createIframe=function(f){var d=document.createElement("iframe");var e=this.url;var g=window.location.protocol&&new RegExp("https").test(window.location.protocol);e+="?webId="+this.webId+"&locale="+this.locale+"&version="+this.version+"&originalDomain="+this.originalDomain+"&isHttps="+g+"&disableLogo="+this.disableLogo;if(f&&f!=="null"){e+="&selectedTags="+f}d.id=this.id;d.src=e;d.setAttribute("data-parentUrl",this.parentUrl);this.IframeObj=d};a.prototype.addIframeToBody=function(){if(!document.getElementById(this.id)){document.body.appendChild(this.IframeObj)}};a.prototype.listenToPostMessage=function(f){var e=f.data.type;var g=f.data.selectedParam;switch(e){case"LoggedOut":this.pullFrameDown();var d=window.location.href;if(g){d=this.resetSelectedTags(d)}window.location.href=d;break;case"authStatus":this.postAuth(g);break;case"LoggedIn":this.pullFrameToTop();break;case"ShowLoginForm":this.enlargeFrame("PtLoginContainer");break;case"dropDownOpen":this.enlargeFrame("PtDropDownOpen PtToolBar");break;case"dropDownClose":this.restoreIframe();break;case"getMyProfileData":this.makeIntentCall();break;case"clearProfileData":this.clearMyProfileCall();break;case"hidePreviewToolBar":this.hidePreviewToolBar(g);break;case"showPreviewToolBar":this.showPreviewToolBar();break;case"hideLoginLink":this.hideLoginLink();break;case"showLoginLink":this.showLoginLink();break;case"query":this.reloadPageWithTags(f.data);break;case"ShowLoginFormOutsideFrame":this.reloadTabWithPT();break}};a.prototype.postAuth=function(e){this.validateIframeObj.parentNode.removeChild(this.validateIframeObj);if(e.active){var d=document.getElementById("previewToolBarFrame");if(d){d.parentNode.removeChild(d)}this.addIframeToBody()}else{if(e.source==="onLoad"){localStorage.removeItem("previewToolbarLoggedIn");this.createLoginMarkup()}else{this.reloadTabWithPT()}}};a.prototype.pullFrameDown=function(){var d=this.IframeObj;localStorage.removeItem("previewToolbarLoggedIn");d.className="PtDealerLoginLink"};a.prototype.resetSelectedTags=function(d){sessionStorage.removeItem("selectedTags");return this.updateQueryStringParameter(d,this.SELECTEDTAGS,"myprofile")};a.prototype.restoreIframe=function(){var d=this.IframeObj;d.className="PtToolBar"};a.prototype.pullFrameToTop=function(){var d=this.IframeObj;d.className="PtToolBar hiddenPt PtZeroHeight";window.setTimeout(function(){d.className="PtToolBar"},800)};a.prototype.enlargeFrame=function(d){document.body.scrollTop=0;var e=this.IframeObj;e.className=d};a.prototype.hidePreviewToolBar=function(e){var d=this.IframeObj;if(e==="mobile"){d.className="PtToolBar hidePreviewToolBarInMobile"}else{d.className="PtToolBar hidePreviewToolBar"}};a.prototype.showPreviewToolBar=function(){var d=this.IframeObj;d.className="PtToolBar"};a.prototype.hideLoginLink=function(){var d=this.IframeObj;d.className="PtDealerLoginLink hideLoginLink"};a.prototype.showLoginLink=function(){var d=this.IframeObj;d.className="PtDealerLoginLink"};a.prototype.reloadPageWithTags=function(e){var d=e.selectedParam,f=this.updateQueryStringParameter(window.location.href,this.SELECTEDTAGS,d);sessionStorage.setItem("selectedTags",d);if(d==this.RESET_TAG||d==this.BACK_TO_MY_PROFILE_TAG){f=this.updateQueryStringParameter(f,"reload","true")}window.location.href=f};a.prototype.updateQueryStringParameter=function(f,d,g){var e=new RegExp("([?|&])"+d+"=.*?(&|$)","i");var h=f.indexOf("?")!==-1?"&":"?";if(f.match(e)){return f.replace(e,"$1"+d+"="+g+"$2")}else{return f+h+d+"="+g}};a.prototype.getURLParameter=function(d){return decodeURIComponent((new RegExp("[?|&]"+d+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null};a.prototype.makeIntentCall=function(){var d="getIntentModels.do?noIntentOverride=true";c.call(this,d)};a.prototype.clearMyProfileCall=function(){var d="clearUserProfile.do";c.call(this,d)};a.prototype.reloadTabWithPT=function(){var d=this.okta+"login";d=this.updateQueryStringParameter(d,"redirect_uri",this.originalDomain);window.location.href=d};function c(g){var e=this.originalDomain+g;var h=new XMLHttpRequest;var f;var d=this;h.onreadystatechange=function(){if(this.readyState==4&&this.status==200){f=JSON.parse(h.responseText);d.IframeObj.contentWindow.postMessage({responseData:f,userRecommendedModel:d.userRecommendedModel},d.url)}else{if(this.status==404){console.log("The getIntent/clearUserProfile call failed")}}};h.open("GET",e,true);h.send()}b.addEventListener("load",function(){var e=document.getElementsByClassName("preview-wrapper");if(!e.length){var d=new a({parentUrl:"window.location.href",url:ContextManager.isProd()?"https://api.sincrotools.com/previewtoolbar/":"https://api-dit.sincrotools.com/previewtoolbar/",okta:ContextManager.isProd()?"https://oidc.sincrotools.com/":"https://oidc-dit.sincrotools.com/",webId:ContextManager.webId,locale:ContextManager.locale,version:ContextManager.version,originalDomain:ContextManager.url,env:ContextManager.getEnvName(),userRecommendedModel:ContextManager.profile&&ContextManager.profile.intent&&ContextManager.profile.intent.recommendedModel,disableLogo:ContextManager.previewToolBarFeatureToggles&&ContextManager.previewToolBarFeatureToggles.disablePreviewToolBarLoginCDKLogo});if(!d.getURLParameter("editMode")&&!d.getURLParameter("clickMapEnabled")){d.init()}}})})(window);/*!
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
See the source code here:
http://code.google.com/p/CBLTEP/
*/
var CBLTEP=CBLTEP||{};CBLTEP.q=CBLTEP.q||[];CBLTEP.version="0.2";CBLTEP.targetOrigin=document.location.protocol+"//"+document.location.hostname;CBLTEP.init=function(){CBLTEP.bDone=false;CBLTEP.marks={};CBLTEP.measures={};CBLTEP.starts={};CBLTEP.findStartTime();CBLTEP.addEventListener("beforeunload",CBLTEP.beforeUnload,false);CBLTEP.addEventListener("load",CBLTEP.onload,false);CBLTEP.processQ()};CBLTEP.processQ=function(){var a=CBLTEP.q.length;for(var b=0;b120000){CBLTEP.dprint("CBLTEP.findStartCookie: startTime > 60s old - ignored ");return undefined}CBLTEP.dprint("CBLTEP.findStartCookie: startTime = "+e);return e}}}return undefined};CBLTEP.beforeUnload=function(a){document.cookie="CBLTEP=s="+Number(new Date())+"&r="+escape(document.location)+"; path=/"};CBLTEP.onload=function(a){CBLTEP.mark("onload")};CBLTEP.addEventListener=function(c,b,a){if("undefined"!=typeof(window.attachEvent)){return window.attachEvent("on"+c,b)}else{if(window.addEventListener){return window.addEventListener(c,b,a)}}};if("undefined"!=typeof(console)&&"undefined"!=typeof(console.log)){CBLTEP.dprint=function(a){}}else{CBLTEP.dprint=function(a){}}CBLTEP.init();(function(a){var b={getRenderTime:function(){return(typeof pst=="undefined")?-1:(new Date().getTime()-pst.getTime())},getServerTime:function(){return(typeof serverTime=="undefined")?-1:serverTime},getTTFB:function(){var d=-1;if(typeof CBLTEP!="undefined"&&typeof CBLTEP.measures!="undefined"){var c=CBLTEP.measures.backend;if(typeof c!="undefined"){d=c}}return d},getPageLoadTime:function(){var d=this.getRenderTime();var f=this.getTTFB();var e=this.getServerTime();var c=-1;if(d>-1){if(f>-1){c=d+f}else{if(e>-1){c=d+e}}}return c}};a.PageMetrics=b}(this));(function(b){var a={analyticsUrl:"//www.google-analytics.com/analytics.js",analyticsObj:"cblt_gaTracker",datatype:"script",prodUid:"UA-22748223-4",preProdUid:"UA-53884027-1",trackingObjName:"cbltGa",isFirstInit:true,init:function(){a.setupGA(window,document,a.datatype,a.analyticsUrl,a.analyticsObj);a.setUpAccount();a.setupCustomDimension()},setupGA:function(e,f,k,j,h,d,c){e.GoogleAnalyticsObject=h;e[h]=e[h]||function(){(e[h].q=e[h].q||[]).push(arguments)},e[h].l=1*new Date();d=f.createElement(k),c=f.getElementsByTagName(k)[0];d.async=1;d.src=j;c.parentNode.insertBefore(d,c)},createAccount:function(c){window[a.analyticsObj]("create",c,{name:a.trackingObjName})},setUpAccount:function(){var d=a.getContextManagerState(),c=a.getUid(d);a.createAccount(c)},setupCustomDimension:function(){window[a.analyticsObj](a.trackingObjName+".set","dimension1",ContextManager.getWebId());window[a.analyticsObj](a.trackingObjName+".set","dimension2",ContextManager.getPageName())},getUid:function(d){var c=d?a.prodUid:a.preProdUid;return c},getContextManagerState:function(){return typeof(ContextManager)!="undefined"&&ContextManager.isLive()&&ContextManager.isProd()},writeGooglePixelTag:function(i,h,d,g,c,f){var e=a.trackingObjName+"."+i;a.loadInitOnce();switch(h){case"pageView":window[a.analyticsObj](e,h);break;case"event":window[a.analyticsObj](e,h,d,g,c,f);break}},loadInitOnce:function(){if(a.isFirstInit===true){a.init();a.isFirstInit=false}}};window.enableAnalytics=a})(jQuery);(function(){var a=function(){var b={dealer:ContextManager.webId,language:ContextManager.locale,leadId:ContextManager.leadId,pageLayout:ContextManager.pageLayout,pageType:ContextManager.pageName,sessionId:ContextManager.sessionId,state:ContextManager.state,url:ContextManager.url,vin:ContextManager.vin,visitorId:ContextManager.visitorId,zipCode:ContextManager.zip,vehicle:{exterior:ContextManager.vehicle.exterior,interior:ContextManager.vehicle.interior,year:ContextManager.vehicle.year,trim:ContextManager.vehicle.trim,model:ContextManager.vehicle.model,price:ContextManager.vehicle.price,category:ContextManager.search||ContextManager.vehicle.category,make:ContextManager.vehicle.make},siteType:"dealersite",websiteTier:"Tier 3",lastTier3CampaignCode:"",multiTierMarketingChannelStack:"",tier3InternalCampaignCode:"",oem:"",pageName:"",region:"",rollupPageName:"",siteSection:"",events:"",formErrors:"",pageData:{AboutParts:{section:"parts",page:"aboutparts"},AboutServiceAndParts:{section:"service",page:"aboutserviceandparts"},AboutSpecials:{section:"specials",page:"aboutspecials"},AboutUs:{section:"about",page:"aboutus"},Accessories:{section:"accessories",page:"accessories"},AdWizardAd:{section:"other",page:"adwizardad"},AdWizardGroupMenu:{section:"other",page:"adwizardgroupmenu"},AdWizardMainMenu:{section:"other",page:"adwizardmainmenu"},Blog:{section:"about",page:"blog"},BlogDetail:{section:"about",page:"blogdetail"},CarefreeMaintenance:{section:"service",page:"carefreemaintenance"},CombinedVehicleSearch:{section:"vehicles",page:"combinedvehiclesearch"},CompareVehicles:{section:"vehicles",page:"comparevehicles"},CompetitivePricing:{section:"vehicles",page:"competitivepricing"},ContactUsForm:{section:"contactus",page:"contactus:form"},CPOStory:{section:"other",page:"cpostory"},CreditCardHold:{section:"finance",page:"creditcardhold"},CustomerReviews:{section:"about",page:"customerreviews"},CustomerReviewDetail:{section:"about",page:"customerreviewdetail"},CustomerReviewsFacebook:{section:"about",page:"customerreviewsfacebook"},CustomerReviewDetailFacebook:{section:"about",page:"customerreviewdetailfacebook"},CustomerSupport:{section:"other",page:"customersupport"},CustomerTestimonials:{section:"about",page:"customertestimonials"},CustomerTestimonialDetails:{section:"about",page:"customertestimonialdetails"},DealerLocator:{section:"dealerlocator",page:"map"},DriverGear:{section:"other",page:"drivergear"},DrivingDirections:{section:"hoursanddirections",page:"drivingdirections"},EmailAFriend:{section:"social",page:"emailafriend"},Employment:{section:"other",page:"employment"},Events:{section:"other",page:"events"},Features:{section:"vehicles",page:"features"},FinanceOffers:{section:"specials",page:"specialoffers"},FinancePreQualForm:{section:"finance",page:"prequal:form"},FindItForMeForm:{section:"vehicles",page:"finditforme:form"},HomePage:{section:"home",page:"homepage"},HoursAndDirections:{section:"aboutus",page:"hoursanddirections"},KelleyBlueBook:{section:"vehicles",page:"kbb"},LandingPage:{section:"other",page:"landingpage"},LeasevsFinance:{section:"financing",page:"leasevsfinance:form"},MaintenanceMenu:{section:"about",page:"maintenancemenu"},MeetOurDepartments:{section:"about",page:"meetourdepartments"},MiscPage:{section:"other",page:"miscpage"},ModelDetails:{section:"vehicles",page:"modeldetails"},ModelLaunches:{section:"vehicles",page:"modellaunches"},ModelShowroom:{section:"vehicles",page:"modelshowroom"},NADAGuides:{section:"other",page:"nadaguides"},NewModelColor:{section:"vehicles",page:"newmodelcolor"},NewModelImage:{section:"vehicles",page:"newmodelimage"},NewModelInfo:{section:"vehicles",page:"newmodelinfo"},NewModelsPage:{section:"vehicles",page:"newmodelspage"},NewVehicleInfoForm:{section:"vehicles",page:"newvehicleinfo:form"},NewVehicleSearch:{section:"vehicles",page:"newvehiclesearch"},Offers:{section:"specials",page:"specialoffers",},OnlineQuote:{section:"vehicles",page:"onlinequote"},PartsOrderForm:{section:"parts",page:"partsorder:form"},PaymentCalculator:{section:"financing",page:"paymentcalculator:form"},PreOwnedShowroom:{section:"vehicles",page:"usedshowroom"},PreOwnedVehicleInfoForm:{section:"vehicles",page:"usedvehicleinfo:form"},PreOwnedVehicleSearch:{section:"vehicles",page:"usedvehiclesearch"},PromoBuilder:{section:"specials",page:"promobuilder"},PromoLeadForm:{section:"specials",page:"promolead:form"},PrivacyPolicy:{section:"privacy",page:"privacypolicy",},QuickQuoteForm:{section:"vehicles",page:"quickquote:form"},Redirect1:{section:"other",page:"redirect"},Redirect2:{section:"other",page:"redirect"},Redirect3:{section:"other",page:"redirect"},Redirect4:{section:"other",page:"redirect"},ServiceApptForm:{section:"service",page:"serviceappt:form"},ServiceAndPartsOffers:{section:"specials",page:"serviceoffers"},ServiceEvent:{section:"service",page:"serviceevent"},ServiceSpecials:{section:"service",page:"servicespecials"},ServiceStatusForm:{section:"service",page:"servicestatus:form"},ServiceSurvey:{section:"service",page:"servicesurvey"},ServiceXpress:{section:"service",page:"servicexpress"},SocialMedia:{section:"social",page:"socialmedia"},Specials:{section:"specials",page:"specials"},Special:{section:"special",page:"special"},Splash:{section:"other",page:"splash"},TermsAndConditions:{section:"privacy",page:"termsofuse"},Testimonials:{section:"about",page:"testimonials"},TireFinder:{section:"parts",page:"tirefinder"},TradeInForm:{section:"vehicles",page:"tradein:form"},VehicleDetails:{section:"vehicles",page:"details:overview"},VehicleInfoForm:{section:"vehicles",page:"vehicleinfo:form"},VehicleMediaGallery:{section:"vehicles",page:"vehiclemediagallery"},VehiclePhoto:{section:"vehicles",page:"vehiclephoto"},VehiclePhotoGallery:{section:"vehicles",page:"vehiclephotogallery"},VehicleSearchResults:{section:"vehicles",page:"searchresults"},Warranty:{section:"vehicles",page:"warranty"},WebSiteSurvey:{section:"other",page:"websitesurvey"},Welcome:{section:"home",page:"welcome"},WhyVW:{section:"about",page:"whyvw"}},pageNamesMap:{AboutSpecials:"Special Offers",AboutSpecials_D:"Special Offers",CombinedVehicleSearch:"Inventory Search",CompareVehicles_D:"Compare",DrivingDirections:"Find a Dealer",HomePage:"Home",HoursAndDirections:"Find a Dealer",KelleyBlueBook:"Trade-in Estimator",LeasevsFinance:"Payment Estimator",ModelDetails_D:"Brochure",ModelShowroom_D:"Brochure",NewModelInfo:"Brochure",NewModelsPage:"Brochure",NewVehicleSearch:"Inventory Search",Offers_D:"Special Offers",PaymentCalculator:"Payment Estimator",PreOwnedVehicleSearch:"Inventory Search",PromoLeadForm_D:"Special Offers",QuickQuoteForm:"Get a Quote",Special:"Special Offers",Special_D:"Special Offers",Specials:"Special Offers",Specials_D:"Dealer Coupons",TradeInForm:"Trade-in Estimator",VehicleDetails:"Vehicle Details",VehicleSearchResults:"Inventory Search",CompetitivePricing_D:"Competitive Advantage",MaintenanceMenu_D:"Maintenance Menu",TireFinder_D:"Tire Store",DriverGear_D:"DriverGear",ServiceXpress:"Service Xpress",ServiceEvent_D:"Service Event",AboutParts_D:"Parts Home",CarefreeMaintenance_D:"VW Care Maintenance",MiscPage_6:"Service Home",MiscPage_7:"Dealer Coupons",ServiceApptForm:"Schedule Service"},contextNamesMap:{"2019Jetta":"LandingPage_MY19_Jetta","2019Arteon":"LandingPage_MY19_Arteon","2018-vw-tiguan":"LandingPage_MY18_All-New_Tiguan","2018-vw-atlas":"LandingPage_Atlas-Dare-to-Compare","2018-vw-warranty":"LandingPage_WarrantyDec17"},eventsData:{ContactUsForm:{load:["tier3LeadInitiation","LeadFormInitiation","contactDealerFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","contactDealerSubmission","tier3UsedOtherLeads"]},FinancePreQualForm:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","onlineCreditFormSubmission","tier3UsedOtherLeads"]},PartsOrderForm:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","tier3SPLeads"]},QuickQuoteForm:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","tier3NewVehicleLeads"]},ServiceApptForm:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","tier3SPLeads"]},VehicleDetails:{load:["vinView"]},VehicleSearchResults:{load:[((ContextManager.search!==null)?(ContextManager.search).toString():"")+"VehicleInventorySearch",((ContextManager.search!==null)?(ContextManager.search).toString():"")+"VehicleInventorySearchInitiated"]},ModelDetails:{load:["mlpView"]},HoursAndDirections:{load:["hoursAndDirections"]},FindItForMeForm:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","contactDealerSubmission","tier3SPLeads","getAQuoteFormSubmission"]},TradeInForm:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","contactDealerSubmission","tier3SPLeads","getAQuoteFormSubmission"]},WebSiteSurvey:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","contactDealerSubmission","tier3SPLeads","getAQuoteFormSubmission"]},ServiceSurvey:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","contactDealerSubmission","tier3SPLeads","getAQuoteFormSubmission"]},PromoBuilder:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","contactDealerSubmission","tier3SPLeads","getAQuoteFormSubmission"]},NewVehicleInfoForm:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","contactDealerSubmission","tier3SPLeads","getAQuoteFormSubmission"]},PreOwnedVehicleInfoForm:{load:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","LeadFormSubmission","contactDealerSubmission","tier3SPLeads","getAQuoteFormSubmission"]},Contact_Us:{error:["formError"],submit:["tier3LeadSubmission","contactDealerSubmission","tier3UsedOtherLeads","LeadFormSubmission"]},Directions:{click:["getDirections"]},Hours_of_Operation_Flex:{click:["getDirections"]},Map_Tile:{click:["getDirections"],ready:["mapWidget"]},Form:{initiate:["tier3LeadInitiation","LeadFormInitiation"],submit:["LeadFormSubmission"]},PriceAlert:{open:["tier3LeadInitiation","LeadFormInitiation"],alertnotify:["LeadFormSubmission"]},Custom_Form_Builder:{open:["LeadFormInitiation"],load:["LeadFormInitiation"],submit:["LeadFormSubmission"]},New_Model_Hero_Shot:{error:["formError"],initiate:["tier3LeadInitiation","LeadFormInitiation"],submit:["tier3LeadSubmission","tier3NewVehicleLeads","LeadFormSubmission"]},mobile_call_service:["mobileCallService","clickToCall"],mobile_call_sales:["mobileCallSales","clickToCall"],callsales:["mobileCallSales","clickToCall"],mobile_map:["mobileMapAndDirections"],map:["mobileMapAndDirections"],Inventory_Details_Get_Your_Quote:{formError:["formError"],click_submitLeadSuccess:["tier3LeadSubmission","contactDealerSubmission","tier3UsedOtherLeads","LeadFormSubmission"],initiate:["LeadFormInitiation"]},Flex_Image_Rotator:{click_slide:["heroshotRotatorWidget"],click_cta:["heroshotRotatorWidget"]},Image_Flex:{click:["imageFlexWidget"]},"Inventory Search Control":[this.InventorySearchTag(),this.InventoryResultTag()]}};for(var c in b){if(b.hasOwnProperty(c)){this[c]=b[c]}}this.init()};a.prototype.init=function(){this.oem=this.getOEM(this.dealer);this.region=this.getRegion(ContextManager.locale);this.siteSection=this.getSiteSection(this.normalizePageName(ContextManager.pageName));this.lastTier3CampaignCode=this.getLastTier3CampaignCode(window.location.href);this.multiTierMarketingChannelStack=this.getMultiTierMarketingChannelStack(window.location.href);this.tier3InternalCampaignCode=this.getTier3InternalCampaignCode(window.location.href);this.pageId=this.getPageId();this.mappedPageName=this.getMappedPageName(this.pageId);this.getPageName();this.getRollupPageName();this.getSiteSectionPageName()};a.prototype.update=function(c){var b;if(c){if(c.action=="submit"){b="submit"}if(c.action=="error"){this.formErrors=this.getFormErrorFields(c)}if(c.action=="callsales"){b="callsales"}if(c.action=="callservice"){b="callservice"}if(c.action=="map"){b="getdirection"}if(c.action=="click_slide"){b="click_slide"}if(c.action=="click_cta"){b="click_cta"}}this.getPageName(b);this.pageId=this.getPageId();this.mappedPageName=this.getMappedPageName(this.pageId);this.getRollupPageName(b);this.getSiteSectionPageName(b);this.actionName=this.getactionName(b);this.events=this.getEventsList(c);this.publishEvent("SiteCatalystModelUpdate")};a.prototype.getactionName=function(e){if(e){var b=ContextManager.getDesktopOrMobile();var d=this.formatTierForPageName(this.websiteTier);if(b=="mobile"){var c=d+":mobile:"+e}else{var c=d+":"+e}return c}};a.prototype.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"};a.prototype.getEventsList=function(c){var b=(c)?(c.name||c.label):undefined;var d=[];if(b&&this.eventsData[b]){d=(this.isArray(this.eventsData[b]))?this.eventsData[b]:this.eventsData[b][c.action]}return d};a.prototype.getFormErrorFields=function(b){var c="";c=(b.errors).toString();return c};a.prototype.getOEM=function(c){var b=(c.split("-")[0]).toLowerCase();return b};a.prototype.getRegion=function(b){return(b.split("_")[1]).toLowerCase()};a.getPageId=function(){return ContextManager.pageName};a.prototype.getPageData=function(b){var d=this.pageData[b];var e="";for(var c in d){if(d.hasOwnProperty(c)&&d[c]!==""&&d[c]!==null){e+=":"+d[c]}}return e};a.prototype.getSiteSection=function(d){var c="";var b=this.pageData[d];if(b){c=b.section}return c};a.prototype.getPageName=function(c){var b;if(c!==""){b=this.buildPageName(this.dealer,c)}else{b=this.buildPageName(this.dealer)}this.pageName=b};a.prototype.getPageId=function(){var b=ContextManager.pageName;return b};a.prototype.getMappedPageName=function(b){var d,c;if(ContextManager.currentContexts[0]){c=this.contextNamesMap[ContextManager.currentContexts[0].name];if(c){return c}}d=this.pageNamesMap[this.pageId];if(!d){d="Other"}return d};a.prototype.getRollupPageName=function(c){var b;if(c!==""){b=this.buildPageName(this.siteType,c)}else{b=this.buildPageName(this.siteType)}this.rollupPageName=b};a.prototype.getSiteSectionPageName=function(d){var c=[];var b;if(d!==""){b=this.buildPageName(this.dealer,d)}else{b=this.buildPageName(this.dealer)}c=b.split(":");c=c.slice(0,c.length-1).join(":");this.siteSectionPageName=c};a.prototype.getLastTier3CampaignCode=function(c){var b=this.parseQueryString("cs:pro",c);return b};a.prototype.getMultiTierMarketingChannelStack=function(c){var b=this.parseQueryString("cs:e",c);return b};a.prototype.getTier3InternalCampaignCode=function(e){var b="";var d=["cs:a","cs:a:e","cs:a:i"];var f,c,g;for(f=0,c=d.length;f1){return b.slice(0,b.indexOf("_"))}else{return b}};a.prototype.buildPageName=function(e,f){var g=this.getPageData(this.normalizePageName(ContextManager.pageName));var c=this.formatTierForPageName(this.websiteTier);var b=ContextManager.getDesktopOrMobile();if(b=="mobile"){var d=this.oem+":"+this.region+":"+c+":mobile:"+e+g}else{var d=this.oem+":"+this.region+":"+c+":"+e+g}if(f){d+=":"+f}return d};a.prototype.parseQueryString=function(g,c){var d;var b="";var h=c.substring(c.indexOf("?")+1);var f=h.split("&");for(d=0;d