1<!DOCTYPE html> 2<html lang="en-US"> 3 4<head> 5 <meta charset="UTF-8"> 6 <meta name="referrer" content="no-referrer-when-downgrade"/> 7 <meta http-equiv="Content-Language" content="en">
8<script> 9window.daSessionId = function () { 10 try { 11 var match = document.cookie.match(/(?:^|; )da_sid=([0-9a-f]{32})(?:;|$)/); 12 if (match) { 13 return match[1]; 14 } 15 var bytes = new Uint8Array(16), id = '', i; 16 if (window.crypto && window.crypto.getRandomValues) { 17 window.crypto.getRandomValues(bytes); 18 } else { 19 for (i = 0; i < 16; i++) { bytes[i] = Math.floor(Math.random() * 256); } 20 } 21 for (i = 0; i < 16; i++) { id += (bytes[i] < 16 ? '0' : '') + bytes[i].toString(16); } 22 document.cookie = 'da_sid=' + id + '; path=/; SameSite=Lax' + (location.protocol === 'https:' ? '; Secure' : ''); 23 return id; 24 } catch (e) { 25 return ''; 26 } 27}; 28</script>
vendor: 1 bytes, line 28
28
29<script> 30(function () { 31 'use strict'; 32 33 var GOVERN = true; 34 var REAP = true; 35 36 // The partial can now be emitted for the listener reaper alone - in that 37 // case leave MutationObserver untouched. 38 if (!GOVERN && !REAP) { 39 return; 40 } 41 42 var Native = window.MutationObserver; 43 44 if (!Native) { 45 return; 46 } 47 48 /** 49 * Per-origin policy. Origins absent from this map are never touched. 50 * 51 * coalesce - collapse a burst of callbacks into one per animation frame, 52 * passing the accumulated records through. The vendor still 53 * sees real records, just batched. 54 * scopeTo - if the vendor tries to observe document/body/html, point it 55 * at this container instead. Falls back to the original 56 * target when the selector is not on the page. 57 * reap - disconnect this origin's previous observer when it creates 58 * a new one. For vendors that re-register per render and 59 * never clean up. 60 * sentinel - retarget to a shared sentinel node and rely on notify() to 61 * wake them once per render. Only safe for vendors that 62 * rescan the DOM themselves; see notify() below. 63 */ 64 var POLICY = { 65 'plugin.tradepending.com': { coalesce: true, reap: true }, 66 'ver.ev5.ai': { coalesce: true, scopeTo: '#srp-results' }, 67 'cdn.dg.toyota.com': { coalesce: true }, 68 'cdn.userway.org': { coalesce: true } 69 }; 70 71 var newest = {}; // origin -> most recent instance, for reap 72 var governed = []; // every governed instance, for notify() 73 var sentinel = null; 74 75 function sentinelNode() { 76 if (!sentinel) { 77 sentinel = document.createElement('div'); 78 sentinel.id = 'da-observer-sentinel'; 79 sentinel.setAttribute('aria-hidden', 'true'); 80 sentinel.style.display = 'none'; 81 (document.body || document.documentElement).appendChild(sentinel); 82 } 83 return sentinel; 84 } 85 86 function originOf(stack) { 87 var hosts = stack.match(/https?:\/\/([^\/:)\s]+)/g) || []; 88 89 for (var i = 0; i < hosts.length; i++) { 90 var host = hosts[i].replace(/^https?:\/\//, ''); 91 if (POLICY[host]) { 92 return host; 93 } 94 } 95 return null; 96 } 97 98 window.MutationObserver = function (callback) { 99 var origin; 100 101 try { 102 origin = originOf((new Error()).stack || ''); 103 } catch (e) { 104 origin = null; 105 } 106 107 // Not a governed vendor - hand back the real thing and stay out of it. 108 if (!origin) { 109 return new Native(callback); 110 } 111 112 var policy = POLICY[origin]; 113 var pending = []; 114 var queued = false; 115 var instance; 116 117 function flush() { 118 queued = false; 119 var batch = pending; 120 pending = []; 121 122 try { 123 callback.call(instance, batch, instance); 124 } catch (e) { 125 // A vendor throwing is their problem, not ours - never let it 126 // escape into the frame that triggered the mutation. 127 if (window.console && console.debug) { 128 console.debug('[observer-governor] ' + origin + ' callback threw', e); 129 } 130 } 131 } 132 133 function onRecords(records) {
134 // With GOVERN off the vendor gets its records straight through, 135 // unbatched, exactly as the native observer would deliver them. 136 if (!GOVERN || !policy.coalesce) { 137 return callback.call(instance, records, instance); 138 } 139 140 pending = pending.concat(records); 141 142 if (!queued) { 143 queued = true; 144 requestAnimationFrame(flush); 145 } 146 } 147 148 instance = new Native(onRecords); 149 150 var nativeObserve = instance.observe.bind(instance); 151 var nativeDisconnect = instance.disconnect.bind(instance); 152 153 instance.observe = function (target, options) { 154 var finalTarget = target; 155 var isWide = target === document || target === document.body 156 || target === document.documentElement; 157 158 // Retargeting is governing, not reaping. With GOVERN off the vendor 159 // observes exactly what it asked to observe. 160 if (GOVERN && policy.sentinel) { 161 finalTarget = sentinelNode(); 162 options = { attributes: true }; 163 } else if (GOVERN && policy.scopeTo && isWide) { 164 finalTarget = document.querySelector(policy.scopeTo) || target; 165 } 166 167 return nativeObserve(finalTarget, options); 168 }; 169 170 instance.disconnect = function () { 171 pending = []; 172 queued = false; 173 return nativeDisconnect(); 174 }; 175 176 // Reaping is independent of governing: this is the only behaviour that runs 177 // when REAP is on and GOVERN is off. 178 if (REAP && policy.reap && newest[origin]) { 179 try { newest[origin].disconnect(); } catch (e) {} 180 } 181 newest[origin] = instance; 182 183 governed.push({ origin: origin, instance: instance, invoke: onRecords }); 184 185 return instance; 186 }; 187 188 window.MutationObserver.prototype = Native.prototype; 189 190 /** 191 * Tell governed vendors that a render finished, instead of letting them 192 * discover it by watching thousands of nodes change. 193 * 194 * Two mechanisms, because vendors differ: 195 * 196 * 1. The sentinel. Bumping an attribute on a hidden node produces one 197 * genuine, browser-delivered record. Vendors that respond by rescanning 198 * the DOM - which is most of them - work unchanged. Preferred, because 199 * nothing is forged. 200 * 201 * 2. Synthesised records, for vendors that read addedNodes to find new 202 * content and would see nothing from the sentinel. MutationRecord is 203 * not constructible, so these are plain objects; addedNodes is a real 204 * static NodeList off the container so that vendors calling NodeList 205 * methods on it still work. This is a best-effort shim - prefer a 206 * vendor's own documented refresh API where one exists. 207 * 208 * @param {string} containerSelector element that was re-rendered 209 * @param {boolean} synthesize also hand-deliver a childList record 210 */ 211 window.DAObserverGovernor = { 212 notify: function (containerSelector, synthesize) { 213 // Inert when only reaping. Nothing is retargeted to the sentinel in 214 // that mode, and synthesising records would hand vendors notifications 215 // they would never have received natively - which is governing. 216 if (!GOVERN) { 217 return; 218 } 219 220 var node = sentinelNode(); 221 node.setAttribute('data-da-render', String(Date.now())); 222 223 if (!synthesize) { 224 return; 225 } 226 227 var container = document.querySelector(containerSelector); 228 229 if (!container) { 230 return; 231 } 232 233 var record = { 234 type: 'childList', 235 target: container, 236 addedNodes: container.querySelectorAll(':scope > *'), 237 removedNodes: container.querySelectorAll('#da-observer-sentinel'), 238 previousSibling: null, 239 nextSibling: null, 240 attributeName: null, 241 attributeNamespace: null, 242 oldValue: null 243 }; 244 245 governed.forEach(function (entry) { 246 try { entry.invoke([record]); } catch (e) {} 247 }); 248 }, 249 250 // Small surface for checking what is actually being governed at runtime. 251 inspect: function () { 252 return governed.map(function (e) { return e.origin; }); 253 } 254 }; 255})(); 256 257/** 258 * LISTENER REAP - see the header. Its own IIFE because it patches a different 259 * API for a different vendor pathology; it shares nothing with the observer 260 * work above except the stack-origin idea. 261 */ 262(function () { 263 'use strict'; 264 265 var ENABLED = true; 266 267 if (!ENABLED) { 268 return; 269 } 270 271 /** 272 * Matched as substrings of any URL in the constructor stack, so the hashed 273 * build names (dg-inline-save-heart.CFRS092E.min.js) match without pinning 274 * a hash. Add here only after measuring: the vendor must re-bind per render 275 * AND never remove - a vendor that manages its own listeners would fight 276 * this for no gain. 277 */ 278 var REAP_ORIGINS = ['dg-inline-save-heart']; 279 280 var nativeAdd = EventTarget.prototype.addEventListener; 281 var nativeRemove = EventTarget.prototype.removeEventListener; 282 283 var generation = 0; 284 var tracked = []; // { target, type, fn, opts, gen, origin } 285 var reapedTotal = 0; 286 287 // The document's own URL, for excluding inline-script stack frames below. 288 var pageUrl = location.origin + location.pathname; 289 290 function reapOrigin(stack) { 291 var urls = stack.match(/https?:\/\/[^\s)]+/g) || []; 292 293 for (var i = 0; i < urls.length; i++) { 294 // Strip query string and line:column before matching. Without this, 295 // the ?da-listener-reap-origin probe value matches ITSELF in every 296 // inline-script frame - the document URL, probe param included, is 297 // what the stack shows for inline code - and the probe then tracks 298 // every inline listener on the page. Caught by exactly that 299 // happening on the local stack: 230 of the theme's own listeners 300 // reaped in one test run. 301 var clean = urls[i].split('?')[0].replace(/:\d+:\d+\)?$/, ''); 302 303 // Inline frames report the page itself; only external script files 304 // can be a vendor. This also stops a REAP_ORIGINS entry from ever 305 // matching a path segment of the page's own URL. 306 if (clean === pageUrl) { 307 continue; 308 } 309 310 for (var j = 0; j < REAP_ORIGINS.length; j++) { 311 if (clean.indexOf(REAP_ORIGINS[j]) !== -1) { 312 return REAP_ORIGINS[j]; 313 } 314 } 315 } 316 return null; 317 } 318 319 /** 320 * Cheap attribution first: a listener bound synchronously from an external 321 * script names that script in document.currentScript, no stack parse 322 * needed - and script-evaluation time is when a page binds most of its 323 * document-level listeners, ahead of which this patch runs for ALL of 324 * them. Returns the matched origin, null for a definite "external script, 325 * not a tracked vendor" (no stack needed either), or undefined when it 326 * cannot tell - inline script or async callback, where currentScript is 327 * srcless or null - and only that case pays for new Error().stack. 328 */ 329 function currentScriptOrigin() { 330 var el = document.currentScript; 331 332 if (!el || !el.src) { 333 return undefined; 334 } 335 336 var clean = el.src.split('?')[0]; 337 338 for (var j = 0; j < REAP_ORIGINS.length; j++) { 339 if (clean.indexOf(REAP_ORIGINS[j]) !== -1) { 340 return REAP_ORIGINS[j]; 341 } 342 } 343 return null; 344 } 345 346 // Capture is part of a listener's identity to the browser, so it is part 347 // of it here too: {capture: true} and bubble registrations of the same 348 // function are different listeners. 349 function captureOf(opts) { 350 return opts === true || !!(opts && opts.capture); 351 } 352 353 EventTarget.prototype.addEventListener = function (type, fn, opts) { 354 // Document-level targets only: the pathology is the ever-growing 355 // dispatch chain on document/window, not listeners on the cards 356 // themselves - those are garbage-collected with the card. 357 if (this === document || this === window 358 || this === document.body || this === document.documentElement) { 359 var origin = currentScriptOrigin(); 360 361 if (origin === undefined) { 362 try { 363 origin = reapOrigin((new Error()).stack || ''); 364 } catch (e) { 365 origin = null; 366 } 367 } 368 369 if (origin && typeof fn === 'function') { 370 tracked.push({ target: this, type: type, fn: fn, opts: opts, gen: generation, origin: origin }); 371 } 372 } 373 return nativeAdd.call(this, type, fn, opts); 374 }; 375 376 // Vendors removing their own listeners must keep working exactly as before; 377 // drop our record so a later reap does not double-remove. The scan is 378 // gated to the four tracked targets with records present - Swiper's 379 // per-render detachEvents used to walk it for every element it touched - 380 // and matches capture, since splicing the capture record while a vendor 381 // removed its bubble twin would leave a live listener untracked forever. 382 EventTarget.prototype.removeEventListener = function (type, fn, opts) { 383 if (tracked.length !== 0 384 && (this === document || this === window 385 || this === document.body || this === document.documentElement)) { 386 for (var i = tracked.length - 1; i >= 0; i--) { 387 var t = tracked[i]; 388 if (t.target === this && t.type === type && t.fn === fn 389 && captureOf(t.opts) === captureOf(opts)) { 390 tracked.splice(i, 1); 391 break; 392 } 393 } 394 } 395 return nativeRemove.call(this, type, fn, opts); 396 }; 397 398 window.DAListenerReaper = { 399 /** 400 * Called by the theme when an SRP render settles. Keeps the newest TWO 401 * generations - the render on screen plus one back, which covers 402 * handlers a vendor adds asynchronously after its render hook fired - 403 * and removes everything older through the native removeEventListener, 404 * with the exact arguments the vendor used. 405 * 406 * Age alone is not staleness, and TWO conditions guard a removal. 407 * 408 * Generation 0 is never reaped, full stop. advance() runs at the top 409 * of the theme's settled-render handler, before the vendor is handed 410 * that render's cards, so generation 0 is what was bound before any 411 * search render completed - page-init listeners, including the 412 * delegated singleton a vendor binds once at script evaluation and 413 * never rebinds. The plain age rule removed that permanently on the 414 * shopper's second search, and the synthetic test leaker could not 415 * catch it because it has no init-time singleton. The cost of the 416 * blanket keep is that anything a vendor bound during the very first 417 * render is kept too: one render's worth of listeners held for the 418 * life of the page, against unbounded growth, which is the trade this 419 * whole mechanism exists to make. 420 * 421 * Beyond that, a record goes only when the SAME origin has bound the 422 * SAME event type in a LATER generation - the rebind that replaced 423 * it, which is the "re-binds per render" premise demanded as evidence 424 * rather than assumed. Origin+type is not listener identity and does 425 * not claim to be: a singleton bound mid-session, of the same type as 426 * a per-render batch from the same script, would still be matched by 427 * its neighbours' rebind. Generation 0 covers the case that has 428 * actually been observed in the wild; this covers the rest. 429 */ 430 advance: function () { 431 generation++; 432 433 var newestGen = {}; 434 var keep = []; 435 var i, key; 436 437 for (i = 0; i < tracked.length; i++) { 438 key = tracked[i].origin + '|' + tracked[i].type; 439 if (!(key in newestGen) || tracked[i].gen > newestGen[key]) { 440 newestGen[key] = tracked[i].gen; 441 } 442 } 443 444 for (i = 0; i < tracked.length; i++) { 445 var t = tracked[i]; 446 447 if (t.gen === 0) { 448 keep.push(t); 449 continue; 450 } 451 452 if (t.gen <= generation - 2 && newestGen[t.origin + '|' + t.type] > t.gen) { 453 try { nativeRemove.call(t.target, t.type, t.fn, t.opts); } catch (e) {} 454 reapedTotal++; 455 } else { 456 keep.push(t); 457 } 458 } 459 460 tracked = keep; 461 }, 462 463 stats: function () { 464 return { generation: generation, live: tracked.length, reaped: reapedTotal, origins: REAP_ORIGINS.slice() }; 465 } 466 }; 467})(); 468</script>
468 469<link rel="icon" href="https://bucket.dealeralchemist.com/max-motors/043c2aa98c9c4261870a596b12b61a88.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=32" sizes="32x32"><link rel="apple-touch-icon" href="https://bucket.dealeralchemist.com/max-motors/043c2aa98c9c4261870a596b12b61a88.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=180"> <meta name="viewport" content="width=device-width, initial-scale=1"> 470 <meta name="google-site-verification" content="zhDVEW7UzBZlv0pSWbzEHNqfyMdIiMMgVL7nAAMAQDY"/> 471 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/js/jquery.min.js?v=1.537.43" as="script"> 472 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/js/globalJs.js?v=1.789.534" as="script"> 473 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/js/dv-events.js?v=1.789.527" as="script"> 474 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/fontawesome/webfonts/fa-light-300.subset.woff2" as="font" type="font/woff2" crossorigin>
475 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/fontawesome/webfonts/fa-solid-900.subset.woff2" as="font" type="font/woff2" crossorigin> 476 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/fontawesome/webfonts/fa-brands-400.subset.woff2" as="font" type="font/woff2" crossorigin> 477 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/fontawesome/webfonts/fa-duotone-900.subset.woff2" as="font" type="font/woff2" crossorigin> 478
478<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/jquery.min.js?v=1.537.43"></script>
478 479
479<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/globalJs.js?v=1.789.534"></script>
479 480
480<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/dv-events.js?v=1.789.527"></script>
480 481 <!-- DV Google Tag Manager --> 482
482<script>
vendor: 555 bytes, lines 482-496
482 483 (function (w, d, s, l, i) { 484 w[l] = w[l] || []; 485 w[l].push({ 486 'gtm.start': new Date().getTime(), 487 event: 'gtm.js' 488 }); 489 var f = d.getElementsByTagName(s)[0], 490 j = d.createElement(s), 491 dl = l != 'dataLayer' ? '&l=' + l : ''; 492 j.async = true; 493 j.src = 494 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; 495 f.parentNode.insertBefore(j, f); 496 })(window, document, 'script', 'dataLayer', '
496GTM-MFJHSV5L
vendor: 8 bytes, lines 496-497
496'); 497
497</script>
497 498 <!-- DV End Google Tag Manager -->
vendor: 72 bytes, lines 498-499
498 499 <script async src="https://www.googletagmanager.com/gtag/js?id=
499G-FJJW9F3TE6
vendor: 16 bytes, lines 499-500
499"></script> 500
500<script> 501
vendor: 184 bytes, lines 501-508
501window.dataLayer = window.dataLayer || []; 502 503 function gtag() { 504 dataLayer.push(arguments); 505 } 506 507 gtag('js', new Date()); 508 gtag('config', '
508G-FJJW9F3TE6
vendor: 20 bytes, lines 508-509
508'); 509
509gtag('config', 'G-M3B4B59Q4Z'); 510 </script>
510 511 512 513 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/srpCSS/algolia.css?v=1.790.370" as="style"> 514 <link rel="stylesheet" type="text/css" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/srpCSS/algolia.css?v=1.790.370"> 515 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/avgrund/avgrund.css?v=1.598.642" as="style"> 516 <link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.css" as="style"> 517 <!--<link rel="preload" href="https://code.jquery.com/jquery-migrate-3.4.1.min.js" as="script">--> 518 <link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.js" as="script"> 519 <link rel="stylesheet" type="text/css" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/avgrund/avgrund.css?v=1.598.642"> 520 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.css"/> 521 <!--
521<script type="text/javascript" src="https://code.jquery.com/jquery-migrate-3.4.1.min.js"></script>
521--> 522
522<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.js"></script>
522 523 <link rel="stylesheet" type="text/css" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/srpCSS/algolia-grid.css?v=1.763.753"> 524 525 526 527 528 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/footer.css?v=1.741.129" as="style"> 529 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/slick/slick.css?v=1.536.957" as="style"> 530 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/slick/slick-theme.css?v=1.536.959" as="style"> 531 <link rel="stylesheet" type="text/css" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/footer.css?v=1.741.129"> 532 <link rel="stylesheet" type="text/css" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/slick/slick.css?v=1.536.957"> 533 <link rel="stylesheet" type="text/css" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/slick/slick-theme.css?v=1.536.959"> 534 <!-- Redux Styling Below --> 535 536 <style> 537 header { 538 height: 75px !important; 539 } 540 541 .srp_cta:hover { 542 background-color: #000000; 543 } 544 545 .ginput_container_textarea textarea:hover { 546 border-color: #756533 !important; 547 } 548 549 .primary_color, 550 .dv_button { 551 color: #756533; 552 } 553 554 .dv_button { 555 border-left: 10px solid#000000; 556 } 557 558 body .btn.dds-search { 559 background-color: #756533; 560 } 561 562 button, 563 .dv-button { 564 background: #756533; 565 color: #000000; 566 } 567 568 button:hover, 569 .dv-button:hover { 570 background: #000000; 571 } 572 573 .primary_background_color, 574 .gform_footer input.button, 575 .gform_page_footer input.button { 576 background-color: #756533; 577 } 578 579 .dv_button_reverse { 580 color: #756533; 581 } 582 583 .vdp-roadster-express { 584 background-color: #063497; 585 color: #ffffff !important; 586 border: 1px solid#ffcc00; 587 } 588 589 .vdp-roadster-express:hover { 590 background-color: #ffcc00; 591 color: #063497 !important; 592 border: 1px solid#063497; 593 } 594 595 .srp-roadster-express { 596 background-color: #063497; 597 color: #ffffff; 598 } 599 600 .srp-roadster-express:hover { 601 background-color: #ffcc00; 602 } 603 604 .vdp-content .award-honor, 605 .new-used, 606 .incentive-items h4, 607 .warranty-font-size-two, 608 .total-savings, 609 .map_title_bottom { 610 color: #756533; 611 } 612 613 .google-box-container-left-bottom, 614 .box-three-container, 615 .box-three-container-class { 616 background-color: #756533 !important; 617 } 618 619 .google-circle { 620 background-color: #000000; 621 } 622 623 .secondary_color, 624 .map_title_top { 625 color: #000000; 626 } 627 628 .secondary_background_color {
629 background-color: #000000; 630 } 631 632 .srp_main .block-nav li { 633 background-color: #756533; 634 } 635 636 .dropbtn { 637 background-color: #756533 !important; 638 color: #fff; 639 } 640 641 .gform_wrapper input:hover, 642 .ginput_container_select select:hover, 643 .address_state select:hover { 644 border-color: #756533 !important; 645 } 646 647 .gform_footer input.button { 648 border: 0 !important; 649 } 650 651 .gform_footer input.button:hover { 652 border: 0 !important; 653 } 654 655 .gform_wrapper input[type=checkbox]:checked + label:before, 656 .gform_wrapper input[type=radio]:checked + label:before { 657 background-color: #756533 !important; 658 } 659 660 #mobile-nav-subheader { 661 top: 75px; 662 background: #756533; 663 } 664 665 .brand-weight:hover { 666 color: #756533; 667 } 668 669 .sub-header, 670 .subheader, 671 .search-box { 672 top: 75px; 673 } 674 675 .customize-support .sub-header, 676 .customize-support .subheader { 677 top: calc(75px +32px); 678 } 679 680 .dv-sidenav { 681 background-color: #756533 !important; 682 top: 75px !important; 683 height: calc(100vh - 75px); 684 } 685 686 .wpb_column a { 687 color: #756533; 688 } 689 690 .not-found-button > a:hover { 691 color: #756533 !important; 692 } 693 694 695 .internal-btn button { 696 background-color: #756533 !important; 697 color: #ffffff !important; 698 } 699 700 .internal-btn button:hover { 701 background-color: #000000 !important; 702 color: #ffffff !important; 703 } 704 705 .internal-btn a { 706 background-color: #756533 !important; 707 color: #ffffff !important; 708 } 709 710 .internal-btn a:hover { 711 background-color: #000000 !important; 712 color: #ffffff !important; 713 } 714 715 .internal-header { 716 background: linear-gradient(rgba(51,51,51,0.72),rgba(51,51,51,0.72)); 717 } 718 719 @media screen and (max-width: 1280px) { 720 header { 721 height: 75px !important; 722 } 723 724 .sub-header, 725 .subheader { 726 top: 75px !important; 727 } 728 729 .customize-support .sub-header, 730 .customize-support .subheader { 731 top: calc(75px +86px) !important; 732 } 733 734 .customize-support .dv-sidenav { 735 top: calc(75px +86px) !important; 736 } 737 738 .customize-support #mobile-nav-subheader { 739 top: calc(75px +46px) !important; 740 } 741 742 #mobile-nav-subheader { 743 top: 75px !important; 744 } 745 746 .dv-sidenav { 747 top: 75px !important; 748 height: calc(100vh - 75px); 749 } 750 } 751 </style> 752
753 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/js/dv-hydrate.js?v=1.772.37" as="script"> 754
754<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/dv-hydrate.js?v=1.772.37"></script>
754 755 756 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/js/dv-modal-disclaimer.js?v=1.774.900" as="script"> 757
757<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/dv-modal-disclaimer.js?v=1.774.900"></script>
757 758 759 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/js/da-gform-loader.js?v=1.786.483" as="script"> 760
760<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/da-gform-loader.js?v=1.786.483"></script>
760 761 762 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/js/da-modal.js?v=1.790.314" as="script"> 763
763<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/da-modal.js?v=1.790.314"></script>
763 764 765 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/js/da-flyout.js?v=1.789.531" as="script"> 766
766<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/da-flyout.js?v=1.789.531"></script>
766 767 768 <link rel="preload" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" as="style"> 769 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"/> 770 771 <link rel="preload" as="script" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"> 772
772<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
772 773 774 <link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/js/slick.min.js?v=1.536.999" as="script"> 775
775<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/slick.min.js?v=1.536.999"></script>
775 776 777
777<script> 778 $(document).ready(function () { 779 $('body').addClass('dv-logged-out'); 780 }); 781 </script>
781 782 783 <style> 784 :root { 785 --primary-color: #756533; 786 --secondary-color: #000000; 787 --mobile-break-point: 1280px; 788 --header-height: 75px; 789 --mobile-header-height: 75px; 790 --header-design-background-color: #ffffff; 791 --header-design-text-color: #000000; 792 --header-design-border-color: #efefef; 793 --menu-design-background-color: #ffffff; 794 --menu-design-text-color: #000000; 795 --menu-design-text-hover-color: #ffffff; 796 --menu-design-background-hover-color: #756533; 797 --brand-button-color: #756533; 798 --brand-title-color: #ffffff; 799 --brand-button-hover-color: #000000; 800 --brand-title-hover-color: #ffffff; 801 --swiper-theme-color: var(--primary-color); 802 } 803 </style> 804
805<script> 806 const _COOKIENAME = "dv_alertbar"; 807 </script>
807<script> 808 sessionStorage.removeItem(_COOKIENAME); 809 window.sessionStorage; 810 </script>
810<script> 811 sessionStorage.removeItem("dv-global-modal"); 812 window.sessionStorage; 813 </script>
813<!-- This site is running CAOS: Complete Analytics Optimization Suite for Wordpress -->
813<script> 814 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 815 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 816 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 817 })(window,document,'script','https://www.maxmotors.com/app/plugins/dv-google-analytics-utm/cache/local-ga.js','ga');ga('create', '', 'auto');ga('send', 'pageview');</script>
817<title>Shop New Cars, Trucks and SUVS in Missouri | Max Motors</title> 818<meta name='robots' content='max-image-preview:large' /> 819 820<!-- Start Dealer Alchemist - Premium SEO by: Dealer Alchemist --> 821<meta name="robots" content="noydir" /> 822<meta name="description" content="Discover new vehicles at Max Motors with stylish models, advanced features, and competitive pricing. Browse inventory, compare options, and find a perfect ride today. Start your journey now." /> 823<meta property="og:image" content="" /> 824<meta property="og:locale" content="en_US" /> 825<meta property="og:type" content="website" /> 826<meta property="og:title" content="Shop New Cars, Trucks and SUVS in Missouri | Max Motors" /> 827<meta property="og:description" content="Discover new vehicles at Max Motors with stylish models, advanced features, and competitive pricing. Browse inventory, compare options, and find a perfect ride today. Start your journey now." /> 828<meta property="og:url" content="https://www.maxmotors.com/new-vehicles/" /> 829<meta property="og:site_name" content="Max Motors" /> 830<meta name="twitter:card" content="summary" /> 831<meta name="twitter:site" content="@MaxMotorsDealer" /> 832<meta name="twitter:title" content="Shop New Cars, Trucks and SUVS in Missouri | Max Motors" /> 833<meta name="twitter:description" content="Discover new vehicles at Max Motors with stylish models, advanced features, and competitive pricing. Browse inventory, compare options, and find a perfect ride today. Start your journey now." /> 834<!-- End Dealer Alchemist - Premium SEO by: Dealer Alchemist | 0.00362s --> 835 836<link rel='dns-prefetch' href='//s.w.org' /> 837<link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='dv-team-members' href='https://www.maxmotors.c
837om/app/plugins/dv-meet-the-team/assets/css/meet-the-team.css?ver=5.9.5' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='wp-block-library' href='https://www.maxmotors.com/wp/wp-includes/css/dist/block-library/style.min.css?ver=5.9.5' type='text/css' media='all' /><style id='global-styles-inline-css' type='text/css'> 838body{--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);
838--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--duotone--dark-grayscale: url('#wp-duotone-dark-grayscale');--wp--preset--duotone--grayscale: url('#wp-duotone-grayscale');--wp--preset--duotone--purple-yellow: url('#wp-duotone-purple-yellow');--wp--preset--duotone--blue-red: url('#wp-duotone-blue-red');--wp--preset--duotone--midnight: url('#wp-duotone-midnight');--wp--preset--duotone--magenta-yellow: url('#wp-duotone-magenta-yellow');--wp--preset--duotone--purple-green: url('#wp-duotone-purple-green');--wp--preset--duotone--blue-orange: url('#wp-duotone-blue-orange');--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}
838.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} 839</style> 840<link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='auth0-widget' href='https://www.maxmotors.c
840om/app/plugins/auth0/assets/css/main.css?ver=5.9.5' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='dv-leads' href='https://www.maxmotors.com/app/plugins/dv-leads/public/css/dv-leads-public.css?ver=1.0.1' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='menu-image' href='https://www.maxmotors.com/app/plugins/dv-menu-image/menu-image.css?ver=1.1' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='dv-offers-styles' href='https://www.maxmotors.com/app/themes/dv-framework/media/css/dv-offers/dv-offers.css?ver=1.758.197' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='globalStyle' href='https://www.maxmotors.com/app/themes/dv-framework/media/css/globalStyle.css?ver=1.785.865' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='dv-modal-styles' href='https://www.maxmotors.c
840om/app/themes/dv-framework/media/css/dv-modal/dv-modal.css?ver=1.790.321' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='ag-modal-form-styles' href='https://www.maxmotors.com/app/themes/dv-framework/media/css/ag-modal-form/ag-modal-form.css?ver=1.701.907' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='vehicle-models-menu' href='https://www.maxmotors.com/app/themes/dv-framework/media/css/vehicle-models-menu/vehicle-models-menu.css?ver=1.738.884' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='style' href='https://www.maxmotors.com/app/themes/dv-max-motors/style.css?ver=1.776.838' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='fontawesome' href='https://www.maxmotors.com/app/themes/dv-framework/media/css/fontawesome/css/all.min.css?ver=1.694.28' type='text/css' media='all' /><link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='fontawesome-subset' href='https://www.maxmotors.c
840om/app/themes/dv-framework/media/css/fontawesome/css/fa-subset.css?ver=1.785.828' type='text/css' media='all' /><style id='vcv-globalElementsCss-inline-css' type='text/css'> 841.dv-primary-text{color:var(--primary-color)}.dv-primary-bg{background-color:var(--primary-color)}.dv-secondary-text{color:var(--secondary-color)}.dv-secondary-bg{background-color:var(--secondary-color)} 842</style> 843<link rel="https://api.w.org/" href="https://www.maxmotors.com/wp-json/" /><link rel="alternate" type="application/json" href="https://www.maxmotors.com/wp-json/wp/v2/pages/16" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://www.maxmotors.com/wp/xmlrpc.php?rsd" /> 844<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://www.maxmotors.com/wp/wp-includes/wlwmanifest.xml" /> 845<link rel="alternate" type="application/json+oembed" href="https://www.maxmotors.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.maxmotors.com%2Fnew-vehicles%2F" /> 846<link rel="alternate" type="text/xml+oembed" href="https://www.maxmotors.c
846om/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.maxmotors.com%2Fnew-vehicles%2F&format=xml" /> 847 <!-- Stream WordPress user activity plugin v3.6.0 --> 848<noscript><style>.vce-row-container .vcv-lozad {display: none}</style></noscript><meta name="generator" content="Powered by Visual Composer Website Builder - fast and easy-to-use drag and drop visual editor for WordPress."/><!-- HFCM by 99 Robots - Snippet # 3: Google Analytics 4 Tag --> 849<!-- Google tag (gtag.js) -->
vendor: 65 bytes, lines 849-850
849 850<script async src="https://www.googletagmanager.com/gtag/js?id=
850G-TGSGB80168
vendor: 13 bytes, line 850
850"></script>
851<script> 852
vendor: 136 bytes, lines 852-855
852window.dataLayer = window.dataLayer || []; 853 function gtag(){dataLayer.push(arguments);} 854 gtag('js', new Date()); 855 gtag('config', '
855G-TGSGB80168
vendor: 5 bytes, line 855
855');
856</script>
856 857<!-- /end HFCM by 99 Robots --> 858<!-- HFCM by 99 Robots - Snippet # 2: FullPath --> 859<!-- Fullpath Starts -->
860<script type="text/javascript"> 861 _40nmcid = '40NM-23466-1'; 862 (function() { 863 var nm = document.createElement('script'); nm.type = 'text/javascript'; nm.async = true; 864 nm.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 865 'cdn.autoleadstar.com/track-'+_40nmcid+'.js'; 866 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(nm,s);apiDomain = 'https://autoleadstar.com'; 867 })(); 868</script>
868 869<!-- Fullpath Ends --> 870<!-- /end HFCM by 99 Robots --> 871<style type="text/css">#wpadminbar, #wpadminbar .menupop .ab-sub-wrapper, .ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu {background:#2a2e35}#wpadminbar a.ab-item, #wpadminbar>#wp-toolbar span.ab-label, #wpadminbar>#wp-toolbar span.noticon, #wpadminbar .ab-icon:before,#wpadminbar .ab-item:before {color:#b7bbcc}#wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop ul li a strong, #wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a {color:#b7bbcc; font-size:13px !important }#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{background:#2a2e35; color:#ffffff}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label, #wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before, #wpadminbar .quicklinks .menupop .ab-sub-secondary>li .ab-item:focus a,#wpadminbar .quicklinks .menupop .ab-sub-secondary>li>a:hover {color:#ffffff}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar{color:#ffffff}#wpadminbar .menupop .ab-sub-wrapper, #wpadminbar .shortlink-input {background:#2a2e35}#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul.ab-submenu li a,#wpadminbar .quicklinks .menupop ul.ab-submenu li a.ab-item {color:#ffffff}#wpadminbar .ab-submenu .ab-item:hover, #wpadminbar .quicklinks .menupop ul.ab-submenu li a:hover,#wpadminbar .quicklinks .menupop ul.ab-submenu li a.ab-item:hover {color:#b7bbcc}.quicklinks li.wpshapere_site_title a{ outline:none; border:none;}.quicklinks li.wpshapere_site_title {width:180px !important;margin-top:3px !important;}.quicklinks li.wpshapere_site_title a{outline:none; border:none;}.quicklinks li.wpshapere_site_title a, .quicklinks li.wpshapere_site_title a:hover, .quicklinks li.wpshapere_site_title a:focus {background:url(https://bucket.dealervenom.com/assets/autogo/logos/AutoGO-Logo-White-XL.png?auto=compress%2Cformat&ixlib=php-1.2.1&w=400) 15px 3px no-repeat !important; text-indent:-9999px !important; width:auto;background-size:50%!important;}</style>
872 <link rel="canonical" href="https://www.maxmotors.com/new-vehicles/?make=Chrysler" /> 873 874</head> 875 876<body class="srp_main"> 877 <style> 878 header { 879 background: #ffffff } 880 881 header, 882 header .dv-brand-logo, 883 header .dv-dealer-logo, 884 header .dv-dealer-info { 885 border-color: #efefef } 886 887 header .dv-dealer-logo a, 888 header .dv-dealer-logo h3, 889 header .dv-dealer-info a, 890 header .dv-dealer-nav #main_nav_menu #menu-main-nav-menu>li>a { 891 color: #000000 !important 892 } 893 894 header .dv-dealer-nav #main_nav_menu #menu-main-nav-menu>li>ul a { 895 color: #000000 !important 896 } 897 898 header .dv-dealer-nav #main_nav_menu #menu-main-nav-menu>li>ul>li.dv-submenu-model-selector .dv-submenu-dealer-models p a { 899 color: #fff !important 900 } 901 902 header .dv-dealer-nav #main_nav_menu #menu-main-nav-menu>li>ul a:hover { 903 color: #ffffff !important 904 } 905 906 header #menu-main-nav-menu li.has-sub ul { 907 background-color: #ffffff !important; 908 } 909 910 header #menu-main-nav-menu li.has-sub ul a:hover { 911 background-color: #756533 !important; 912 color: #ffffff !important 913 } 914 915 @media screen and (max-width: 1280px) { 916 header .dv-dealer-info { 917 border-right: 1px solid var(--header-design-border-color) 918 } 919 } 920</style> 921<header> 922 <div class="dv-brand-logo"> 923 <div class="dv-brand-logo-list"> 924 <div class="dv-brand-item"> 925 <a href="/new-vehicles/?make=Chrysler" title="Shop Chrysler"> 926 <img src="https://bucket.dealeralchemist.com/max-motors/logos/max-chrysler.png?auto=compress%2Cformat&ixlib=php-3.3.1&height=65" alt="Shop Chrysler"/> 927 </a> 928 </div> 929 <div class="dv-brand-item"> 930 <a href="/new-vehicles/?make=Dodge" title="Shop Dodge"> 931 <img src="https://bucket.dealeralchemist.com/max-motors/logos/max-dodge.png?auto=compress%2Cformat&ixlib=php-3.3.1&height=65" alt="Shop Dodge"/> 932 </a> 933 </div> 934 <div class="dv-brand-item"> 935 <a href="/new-vehicles/?make=Jeep" title="Shop Jeep"> 936 <img src="https://bucket.dealeralchemist.com/max-motors/logos/max-jeep.png?auto=compress%2Cformat&ixlib=php-3.3.1&height=65" alt="Shop Jeep"/> 937 </a> 938 </div> 939 <div class="dv-brand-item"> 940 <a href="/new-vehicles/?make=Ram" title="Shop Ram"> 941 <img src="https://bucket.dealeralchemist.com/max-motors/logos/max-ram.png?auto=compress%2Cformat&ixlib=php-3.3.1&height=65" alt="Shop Ram"/> 942 </a> 943 </div> 944 <div class="dv-brand-item"> 945 <a href="/new-vehicles/?make=Chevrolet" title="Shop Chevrolet"> 946 <img src="https://bucket.dealeralchemist.com/max-motors/logos/max-chevy.png?auto=compress%2Cformat&ixlib=php-3.3.1&height=65" alt="Shop Chevrolet"/> 947 </a> 948 </div> 949 <div class="dv-brand-item"> 950 <a href="/new-vehicles/?make=Ford" title="Shop Ford"> 951 <img src="https://bucket.dealeralchemist.com/max-motors/logos/max-ford.png?auto=compress%2Cformat&ixlib=php-3.3.1&height=65" alt="Shop Ford"/> 952 </a> 953 </div> 954 <div class="dv-brand-item"> 955 <a href="/new-vehicles/?make=GMC" title="Shop GMC"> 956 <img src="https://bucket.dealeralchemist.com/assets/widgets/carousel/all/gmc-logo.png?auto=compress%2Cformat&ixlib=php-3.3.1&height=65" alt="Shop GMC"/> 957 </a> 958 </div> 959 </div> 960 </div> 961 <div class="dv-dealer-logo"> 962 <a href="/" title="Max Motors" data-ag-event="media_interaction"> 963 <img class="dv-dealer-logo-dealer-logo" src="https://bucket.dealeralchemist.com/max-motors/max-logo.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=100" alt="Max Motors" /> 964 </a> 965 </div> 966 <div class="dv-dealer-nav"> 967 <nav class="dv-desktop-menu" aria-label="Desktop Menu"> 968 <div id="main_nav_menu" class="menu-main-nav-menu-container"><ul id="menu-main-nav-menu" class="menu"><li id="menu-item-663" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="/new-vehicles/" class="menu-image-title-after"><span class="menu-image-title">New</span></a> 969<ul> 970 <li id="menu-item-8585" class="menu-half menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new" href="/new-vehicles/" class="menu-image-title-after"><span class="menu-image-title">Shop All New</span></a></li> 971 <li id="menu-item-8587" class="menu-half menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="new" href="https://www.maxmotors.c
971om/max-transit/" class="menu-image-title-after"><span class="menu-image-title">Max Transit</span></a></li> 972 <li id="menu-item-8576" class="menu-half menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new" href="/new-vehicles/?make=Chrysler" class="menu-image-title-after"><span class="menu-image-title">New Chrysler</span></a></li> 973 <li id="menu-item-8580" class="menu-half menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new" href="/new-vehicles/?make=Ford" class="menu-image-title-after"><span class="menu-image-title">New Ford</span></a></li> 974 <li id="menu-item-8577" class="menu-half menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new" href="/new-vehicles/?make=Dodge" class="menu-image-title-after"><span class="menu-image-title">New Dodge</span></a></li> 975 <li id="menu-item-8574" class="menu-half menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new" href="/new-vehicles/?make=Chevrolet" class="menu-image-title-after"><span class="menu-image-title">New Chevrolet</span></a></li> 976 <li id="menu-item-8578" class="menu-half menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new" href="/new-vehicles/?make=Jeep" class="menu-image-title-after"><span class="menu-image-title">New Jeep</span></a></li> 977 <li id="menu-item-8575" class="menu-half menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new" href="/new-vehicles/?make=GMC" class="menu-image-title-after"><span class="menu-image-title">New GMC</span></a></li> 978 <li id="menu-item-8579" class="menu-half menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new" href="/new-vehicles/?make=Ram" class="menu-image-title-after"><span class="menu-image-title">New Ram</span></a></li> 979</ul> 980</li> 981<li id="menu-item-8568" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="/used-vehicles/" class="menu-image-title-after"><span class="menu-image-title">Used</span></a> 982<ul> 983 <li id="menu-item-8586" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="used" href="/used-vehicles/" class="menu-image-title-after"><span class="menu-image-title">Shop All Used</span></a></li> 984 <li id="menu-item-8588" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="used" href="/used-vehicles/?flags.type=Certified" class="menu-image-title-after"><span class="menu-image-title">Certified Used Vehicles</span></a></li> 985 <li id="menu-item-8607" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="used" href="/used-vehicles/?finalPriceRange=$10,000%20and%20Below&finalPriceRange=$10,000%20-%20$20,000" class="menu-image-title-after"><span class="menu-image-title">Vehicles Under $20K</span></a></li> 986 <li id="menu-item-8584" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="used" href="https://www.maxmotors.c
986om/max-transit/" class="menu-image-title-after"><span class="menu-image-title">Max Transit</span></a></li> 987</ul> 988</li> 989<li id="menu-item-10472" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="https://www.maxmotors.com/certified-used-vehicles/" class="menu-image-title-after"><span class="menu-image-title">Pre-Owned</span></a></li> 990<li id="menu-item-3140" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="https://www.maxmotors.com/service/" class="menu-image-title-after"><span class="menu-image-title">Service & Parts</span></a> 991<ul> 992 <li id="menu-item-3143" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="service-&-parts" href="https://www.maxmotors.com/service/" class="menu-image-title-after"><span class="menu-image-title">Service Center</span></a></li> 993 <li id="menu-item-7394" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="service-&
993-parts" href="https://www.maxmotors.com/parts/" class="menu-image-title-after"><span class="menu-image-title">Parts Center</span></a></li> 994</ul> 995</li> 996<li id="menu-item-8589" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-has-children active has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="/#" class="menu-image-title-after"><span class="menu-image-title">Finance</span></a> 997<ul> 998 <li id="menu-item-3054" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="finance" href="https://www.maxmotors.com/finance/" class="menu-image-title-after"><span class="menu-image-title">Finance Center</span></a></li> 999 <li id="menu-item-8581" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="finance" href="https://www.maxmotors.com/value-trade/" class="menu-image-title-after"><span class="menu-image-title">Sell/Trade</span></a></li> 1000</ul> 1001</li> 1002<li id="menu-item-8571" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-has-children active has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="/#" class="menu-image-title-after"><span class="menu-image-title">Specials</span></a> 1003<ul> 1004 <li id="menu-item-8599" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="specials" href="https://www.maxmotors.c
1004om/incentives/" class="menu-image-title-after"><span class="menu-image-title">OEM Incentives</span></a></li> 1005 <li id="menu-item-8601" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="specials" href="/new-vehicles/?flags.type=Special" class="menu-image-title-after"><span class="menu-image-title">New Vehicle Specials</span></a></li> 1006 <li id="menu-item-8600" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="specials" href="/used-vehicles/?flags.type=Special" class="menu-image-title-after"><span class="menu-image-title">Used Vehicle Specials</span></a></li> 1007 <li id="menu-item-9260" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="specials" href="https://www.maxmotors.com/specials/service/" class="menu-image-title-after"><span class="menu-image-title">Service & Parts Specials</span></a></li> 1008 <li id="menu-item-10502" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="specials" href="https://www.maxmotors.c
1008om/500-price-match/" class="menu-image-title-after"><span class="menu-image-title">$500 Price Match Guarantee</span></a></li> 1009</ul> 1010</li> 1011<li id="menu-item-8590" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="/hours-and-directions/" class="menu-image-title-after"><span class="menu-image-title">Locations</span></a> 1012<ul> 1013 <li id="menu-item-8592" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="/hours-and-directions/#richmond" class="menu-image-title-after"><span class="menu-image-title">Max Ford of Richmond</span></a></li> 1014 <li id="menu-item-9530" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="/hours-and-directions/#butler" class="menu-image-title-after"><span class="menu-image-title">Max Ford & CDJR of Butler</span></a></li> 1015 <li id="menu-item-8591" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="/hours-and-directions/#clinton" class="menu-image-title-after"><span class="menu-image-title">Max CDJR of Clinton</span></a></li> 1016 <li id="menu-item-8595" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="/hours-and-directions/#nevada" class="menu-image-title-after"><span class="menu-image-title">Max Ford & CDJR of Nevada</span></a></li> 1017 <li id="menu-item-9531" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="/hours-and-directions/#nevada" class="menu-image-title-after"><span class="menu-image-title">Max Chevrolet & GMC of Nevada</span></a></li> 1018</ul> 1019</li> 1020<li id="menu-item-2614" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="#/" class="menu-image-title-after"><span class="menu-image-title">About</span></a> 1021<ul> 1022 <li id="menu-item-3052" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="about" href="https://www.maxmotors.c
1022om/about/" class="menu-image-title-after"><span class="menu-image-title">About Us</span></a></li> 1023 <li id="menu-item-8570" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="about" href="https://www.maxmotors.com/history/" class="menu-image-title-after"><span class="menu-image-title">History</span></a></li> 1024 <li id="menu-item-8603" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="about" href="https://www.maxmotors.com/why-buy/" class="menu-image-title-after"><span class="menu-image-title">Why Buy?</span></a></li> 1025 <li id="menu-item-8602" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="about" href="https://www.maxmotors.com/careers/" class="menu-image-title-after"><span class="menu-image-title">Careers</span></a></li> 1026</ul> 1027</li> 1028</ul></div> </nav> 1029 </div> 1030 <div class="dv-dealer-info-2"> 1031 <a href="/hours-and-directions/" title="Max Motors Locations" data-ag-event="cta_interaction"> 1032 <div class="dv-dealer-info-item"> 1033 <i class="fal fa-phone"></i> 1034 </div> 1035 <div class="dv-dealer-info-item"> 1036 <i class="fal fa-map-marker-alt"></i> 1037 </div> 1038 <div class="dv-dealer-info-item"> 1039 <i class="fal fa-clock"></i> 1040 </div> 1041 <div class="dv-dealer-info-item"> 1042 <i class="fal fa-wrench"></i> 1043 </div> 1044 </a> 1045 </div> 1046 <div class="nav-below-btn-toggle"> 1047 <div id="nav-icon-wrapper"> 1048 <span style="background-color: #000000"></span> 1049 <span style="background-color: #000000"></span> 1050 <span style="background-color: #000000"></span> 1051 <span style="background-color: #000000"></span> 1052 </div> 1053 </div></header>
1054<link rel="preload" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/header/header-pulldown.css?v=1.761.775" as="style"> 1055<link rel="stylesheet" href="https://www.maxmotors.com/app/themes/dv-framework/media/css/header/header-pulldown.css?v=1.761.775" type="text/css"> 1056<style> 1057.dv-fw-search .dv-fw-mobile-menu-wrapper>ul.dv-fw-mobile-menu-selector, 1058.dv-fw-search .dv-fw-mobile-menu-wrapper>ul .dv-fw-mobile-menu-item { 1059 background-color: #756533; 1060} 1061 1062.dv-fw-search .dv-fw-mobile-menu-wrapper>ul .dv-fw-mobile-menu-item.active { 1063 background-color: #000000; 1064} 1065 1066.dv-fw-search .dv-fw-mobile-menu-wrapper>ul .dv-fw-mobile-menu-item>a { 1067 border-color: #ffffff; 1068 color: #fff; 1069} 1070 1071.dv-fw-search .dv-fw-mobile-menu-wrapper .dv-mobile-menu-btn { 1072 color: #fff !important; 1073 background: #756533 !important; 1074} 1075 1076.dv-fw-search .dv-fw-mobile-menu-wrapper .dv-mobile-menu-btn:hover { 1077 color: #fff !important; 1078 background: #000000 !important; 1079} 1080 1081@media screen and (max-width: 1280px) { 1082 .dv-fw-search { 1083 background: transparent; 1084 min-width: 400px; 1085 width: 33.333%; 1086 } 1087 1088 /* .dv-fw-search.dv-toggle-open { 1089 border-top: 1px solid transparent; 1090 } */ 1091 body.mobile-menu-open { 1092 position: relative; 1093 } 1094 1095 body.mobile-menu-open:before { 1096 content: ''; 1097 position: absolute; 1098 top: 0; 1099 left: 0; 1100 width: 100%; 1101 height: 100%; 1102 background: rgba(0, 0, 0, 0.5); 1103 z-index: 3; 1104 } 1105 1106 .dv-fw-search .dv-fw-search-wrapper { 1107 display: none; 1108 } 1109 1110 .dv-fw-search .dv-fw-mobile-menu-wrapper { 1111 display: flex; 1112 background: #fff; 1113 } 1114 1115 .dv-desktop-menu, 1116 #desktop-nav { 1117 display: none !important; 1118 } 1119} 1120 1121@media screen and (max-width: 768px) { 1122 .dv-fw-search { 1123 min-width: 100%; 1124 width: 100%; 1125 } 1126} 1127</style> 1128<style> 1129/* min width redux */ 1130@media screen and (min-width: calc(1280px + 1px)) { 1131 1132 .dv-fw-search, 1133 .nav-below-btn-toggle { 1134 display: none !important; 1135 } 1136} 1137 1138@media screen and (max-width: 1280px) { 1139 .dv-desktop-menu #desktop-nav { 1140 display: none !important; 1141 } 1142} 1143</style> 1144 1145<div class="dv-fw-search"> 1146 <div class="dv-fw-search-wrapper"> 1147 </div> 1148 <div class="dv-fw-mobile-menu-wrapper"> 1149 <ul class="dv-fw-mobile-menu-selector"> 1150 <li class="dv-fw-mobile-menu-item active"> 1151 <a href="#" title="Mobile Menu"> 1152 <span><i class="fal fa-bars"></i></span> 1153 <span>Menu</span> 1154 </a> 1155 </li> 1156 <li class="dv-fw-mobile-menu-item"> 1157 <a href="#" title="Mobile Menu"> 1158 <span><i class="fa-regular fa-car"></i></span> 1159 <span>Shop</span> 1160 </a> 1161 </li> 1162 <li class="dv-fw-mobile-menu-item"> 1163 <a href="#" title="Mobile Menu"> 1164 <span><i class="fal fa-phone"></i></span> 1165 <span>Call</span> 1166 </a> 1167 </li> 1168 <li class="dv-fw-mobile-menu-item"> 1169 <a href="#" title="Mobile Menu"> 1170 <span><i class="fal fa-map-marker-alt"></i></span> 1171 <span>Visit</span> 1172 </a> 1173 </li> 1174 </ul> 1175 <ul class="dv-fw-mobile-menu-content"> 1176 <li class="dv-fw-mobile-menu-item-content active"> 1177 <div class="dv-mobile-menu-inner"> 1178 <nav class="dv-mobile-menu" aria-label="Mobile Menu"> 1179 <div id="mobile_main_nav_menu" class="menu-mobile-menu-container"><ul id="menu-mobile-menu" class="menu"><li id="menu-item-767" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-1 current_page_item active"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="https://www.maxmotors.c
1179om/" class="menu-image-title-after"><span class="menu-image-title">Home</span></a></li> 1180<li id="menu-item-3629" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="#/" class="menu-image-title-after"><span class="menu-image-title">New Vehicles</span></a> 1181<ul> 1182 <li id="menu-item-772" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/new-vehicles/" class="menu-image-title-after"><span class="menu-image-title">Shop All New</span></a></li> 1183 <li id="menu-item-8608" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/max-transit/" class="menu-image-title-after"><span class="menu-image-title">Max Transit</span></a></li> 1184 <li id="menu-item-8626" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="/new-vehicles/?make=Chrysler" class="menu-image-title-after"><span class="menu-image-title">New Chrysler</span></a></li> 1185 <li id="menu-item-8627" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="/new-vehicles/?make=Dodge" class="menu-image-title-after"><span class="menu-image-title">New Dodge</span></a></li> 1186 <li id="menu-item-8628" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="/new-vehicles/?make=Jeep" class="menu-image-title-after"><span class="menu-image-title">New Jeep</span></a></li> 1187 <li id="menu-item-8629" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="/new-vehicles/?make=Ram" class="menu-image-title-after"><span class="menu-image-title">New Ram</span></a></li> 1188 <li id="menu-item-8630" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="/new-vehicles/?make=Ford" class="menu-image-title-after"><span class="menu-image-title">New Ford</span></a></li> 1189 <li id="menu-item-8631" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="/new-vehicles/?make=Chevrolet" class="menu-image-title-after"><span class="menu-image-title">New Chevrolet</span></a></li> 1190 <li id="menu-item-8632" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="/new-vehicles/?make=GMC" class="menu-image-title-after"><span class="menu-image-title">New GMC</span></a></li> 1191</ul> 1192</li> 1193<li id="menu-item-3630" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="#/" class="menu-image-title-after"><span class="menu-image-title">Used Vehicles</span></a> 1194<ul> 1195 <li id="menu-item-3620" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="used-vehicles" href="https://www.maxmotors.c
1195om/used-vehicles/" class="menu-image-title-after"><span class="menu-image-title">Shop All Used</span></a></li> 1196 <li id="menu-item-3637" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="used-vehicles" href="/used-vehicles/?flags.type=Certified" class="menu-image-title-after"><span class="menu-image-title">Certified Used Vehicles</span></a></li> 1197 <li id="menu-item-3636" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="used-vehicles" href="/used-vehicles/?finalPriceRange=$10,000%20and%20Below&finalPriceRange=$10,000%20-%20$20,000" class="menu-image-title-after"><span class="menu-image-title">Vehicles Under $20K</span></a></li> 1198 <li id="menu-item-8609" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="used-vehicles" href="https://www.maxmotors.com/max-transit/" class="menu-image-title-after"><span class="menu-image-title">Max Transit</span></a></li> 1199</ul> 1200</li> 1201<li id="menu-item-10473" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="https://www.maxmotors.c
1201om/certified-used-vehicles/" class="menu-image-title-after"><span class="menu-image-title">Pre-Owned</span></a></li> 1202<li id="menu-item-3626" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="#/" class="menu-image-title-after"><span class="menu-image-title">Service & Parts</span></a> 1203<ul> 1204 <li id="menu-item-3621" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="service-&-parts" href="https://www.maxmotors.com/service/" class="menu-image-title-after"><span class="menu-image-title">Service Center</span></a></li> 1205 <li id="menu-item-8610" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="service-&-parts" href="https://www.maxmotors.com/parts/" class="menu-image-title-after"><span class="menu-image-title">Parts Center</span></a></li> 1206</ul> 1207</li> 1208<li id="menu-item-3627" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="#/" class="menu-image-title-after"><span class="menu-image-title">Finance</span></a> 1209<ul> 1210 <li id="menu-item-3618" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="finance" href="https://www.maxmotors.c
1210om/finance/" class="menu-image-title-after"><span class="menu-image-title">Finance Center</span></a></li> 1211 <li id="menu-item-8611" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="finance" href="https://www.maxmotors.com/value-trade/" class="menu-image-title-after"><span class="menu-image-title">Sell/Trade</span></a></li> 1212</ul> 1213</li> 1214<li id="menu-item-3632" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="#/" class="menu-image-title-after"><span class="menu-image-title">Specials</span></a> 1215<ul> 1216 <li id="menu-item-8613" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="specials" href="https://www.maxmotors.com/incentives/" class="menu-image-title-after"><span class="menu-image-title">OEM Incentives</span></a></li> 1217 <li id="menu-item-3640" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="specials" href="/new-vehicles/?flags.type=Special" class="menu-image-title-after"><span class="menu-image-title">New Vehicle Specials</span></a></li> 1218 <li id="menu-item-3641" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="specials" href="/used-vehicles/?flags.type=Special" class="menu-image-title-after"><span class="menu-image-title">Used Vehicle Specials</span></a></li> 1219</ul> 1220</li> 1221<li id="menu-item-8614" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="#/" class="menu-image-title-after"><span class="menu-image-title">Locations</span></a> 1222<ul> 1223 <li id="menu-item-8619" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="/hours-and-directions/?location=richmond#richmond" class="menu-image-title-after"><span class="menu-image-title">Max Ford of Richmond</span></a></li> 1224 <li id="menu-item-8620" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="https://www.maxmotors.c
1224om/hours-and-directions/?location=butler#butler" class="menu-image-title-after"><span class="menu-image-title">Max Ford & CDJR of Butler</span></a></li> 1225 <li id="menu-item-8618" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="https://www.maxmotors.com/hours-and-directions/?location=clinton#clinton" class="menu-image-title-after"><span class="menu-image-title">Max CDJR of Clinton</span></a></li> 1226 <li id="menu-item-8622" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="https://www.maxmotors.com/hours-and-directions/?location=nevada#nevada" class="menu-image-title-after"><span class="menu-image-title">Max Ford & CDJR of Nevada</span></a></li> 1227 <li id="menu-item-8625" class="menu-item menu-item-type-custom menu-item-object-custom"><a data-ag-event="menu_interaction" style="" data-element_type="locations" href="https://www.maxmotors.c
1227om/hours-and-directions/?location=nevada#nevada" class="menu-image-title-after"><span class="menu-image-title">Max Chevrolet & GMC of Nevada</span></a></li> 1228</ul> 1229</li> 1230<li id="menu-item-3628" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has-sub"><a data-ag-event="menu_interaction" style="" data-element_type="home" href="#/" class="menu-image-title-after"><span class="menu-image-title">About</span></a> 1231<ul> 1232 <li id="menu-item-3616" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="about" href="https://www.maxmotors.com/about/" class="menu-image-title-after"><span class="menu-image-title">About Us</span></a></li> 1233 <li id="menu-item-8615" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="about" href="https://www.maxmotors.com/why-buy/" class="menu-image-title-after"><span class="menu-image-title">Why Buy?</span></a></li> 1234 <li id="menu-item-8616" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="about" href="https://www.maxmotors.c
1234om/history/" class="menu-image-title-after"><span class="menu-image-title">History</span></a></li> 1235 <li id="menu-item-8617" class="menu-item menu-item-type-post_type menu-item-object-page"><a data-ag-event="menu_interaction" style="" data-element_type="about" href="https://www.maxmotors.com/careers/" class="menu-image-title-after"><span class="menu-image-title">Careers</span></a></li> 1236</ul> 1237</li> 1238</ul></div> </nav> 1239 </div> 1240 </li> 1241 <li class="dv-fw-mobile-menu-item-content"> 1242 <div class="dv-mobile-menu-inner"> 1243 <div class="dv-mobile-menu-inner-header">Shop</div> 1244 <div class="dv-mobile-menu-inner-body dv-dealer-custom1"> 1245 <div class="da-mobile-submenu-container"> 1246 <h3>Max Motors Dealerships</h3><br> 1247 <h4>The Easiest Place To Buy A Car. 5 Convenient Locations.</h4> 1248 <hr> 1249 <ul class="da-mobile-submenu-list"> 1250 1251 <li class="da-mobile-submenu-item"> 1252 <span>Max Ford of Richmond</span><br> 1253 <a href="/new-vehicles/?dealerName=Max%20Ford%20Richmond" title="Max Ford of Richmond New Vehicles" class="dv-mobile-menu-btn">Shop New <i class="far fa-external-link-square-alt"></i></a> 1254 <a href="/used-vehicles/?dealerName=Max%20Ford%20Richmond" title="Max Ford of Richmond Used Vehicles" class="dv-mobile-menu-btn">Shop Used <i class="far fa-external-link-square-alt"></i></a> 1255 </li> 1256<hr> 1257 <li class="da-mobile-submenu-item"> 1258 <span>Max Ford CDJR of Butler</span><br> 1259 <a href="/new-vehicles/?dealerName=Max%20Ford%20CDJR%20Butler" title="Max Ford CDJR of Butler New Vehicles" class="dv-mobile-menu-btn">Shop New <i class="far fa-external-link-square-alt"></i></a> 1260 <a href="/used-vehicles/?dealerName=Max%20Ford%20CDJR%20Butler" title="Max Ford CDJR of Butler Used Vehicles" class="dv-mobile-menu-btn">Shop Used <i class="far fa-external-link-square-alt"></i></a> 1261 </li> 1262<hr> 1263 <li class="da-mobile-submenu-item"> 1264 <span>Max CDJR of Clinton</span><br> 1265 <a href="/new-vehicles/?dealerName=Max%20CDJR%20Clinton" title="Max CDJR of Clinton New Vehicles" class="dv-mobile-menu-btn">Shop New <i class="far fa-external-link-square-alt"></i></a> 1266 <a href="/used-vehicles/?dealerName=Max%20CDJR%20Clinton" title="MMax CDJR of Clinton Used Vehicles" class="dv-mobile-menu-btn">Shop Used <i class="far fa-external-link-square-alt"></i></a> 1267 </li> 1268<hr> 1269 <li class="da-mobile-submenu-item"> 1270 <span>Max Ford CDJR of Nevada</span><br> 1271 <a href="/new-vehicles/?dealerName=Max%20Ford%20CDJR%20Nevada" title="Max Ford CDJR of Nevada New Vehicles" class="dv-mobile-menu-btn">Shop New <i class="far fa-external-link-square-alt"></i></a> 1272 <a href="/used-vehicles/?dealerName=Max%20Ford%20CDJR%20Nevada" title="Max Ford CDJR of Nevada Used Vehicles" class="dv-mobile-menu-btn">Shop Used <i class="far fa-external-link-square-alt"></i></a> 1273 </li> 1274<hr> 1275 <li class="da-mobile-submenu-item"> 1276 <span>Max Chevrolet GMC of Nevada</span><br> 1277 <a href="/new-vehicles/?dealerName=Max%20Chevrolet%20GMC" title="Max Chevrolet GMC of Nevada New Vehicles" class="dv-mobile-menu-btn">Shop New <i class="far fa-external-link-square-alt"></i></a> 1278 <a href="/used-vehicles/?dealerName=Max%20Chevrolet%20GMC" title="Max Chevrolet GMC of Nevada Used Vehicles" class="dv-mobile-menu-btn">Shop Used <i class="far fa-external-link-square-alt"></i></a> 1279 </li> 1280 1281 </ul> 1282</div> </div> 1283 </div> 1284 </li> 1285 <li class="dv-fw-mobile-menu-item-content"> 1286 <div class="dv-mobile-menu-inner"> 1287 <div class="dv-mobile-menu-inner-header">Call</div> 1288 <div class="dv-mobile-menu-inner-body dv-dealer-call"> 1289 <div class="da-mobile-submenu-container"> 1290 <h3>Max Motors Dealerships</h3> 1291 1292 <ul class="da-mobile-submenu-list"> 1293 1294 <li class="da-mobile-submenu-item"> 1295 <span>Max Ford of Richmond</span><br> 1296 1297 <a href="tel:816.776.0009" title="Call Max Ford of Richmond 816.776.0009" data-ag-event="cta_interaction" data-aga-event-set-prop="clickToCallDepartment|Other"> 1298 <i class="fas fa-mobile" style="color:var(--primary-color);"></i> 816.776.0009 1299 </a> 1300 1301 </li> 1302 1303 <li class="da-mobile-submenu-item">
1304 <span>Max Ford of Butler</span><br> 1305 1306 <a href="tel:660.386.4376" title="Call Max Ford of Butler 660.386.4376" data-ag-event="cta_interaction" data-aga-event-set-prop="clickToCallDepartment|Other"> 1307 <i class="fas fa-mobile" style="color:var(--primary-color);"></i> 660.386.4376 1308 </a> 1309 1310 </li> 1311 1312 <li class="da-mobile-submenu-item"> 1313 <span>Max Chrysler Dodge Jeep Ram of Butler</span><br> 1314 1315 <a href="tel:660.386.4160" title="Call Max CDJR of Butler 660.386.4160" data-ag-event="cta_interaction" data-aga-event-set-prop="clickToCallDepartment|Other"> 1316 <i class="fas fa-mobile" style="color:var(--primary-color);"></i> 660.386.4160 1317 </a> 1318 1319 </li> 1320 1321 <li class="da-mobile-submenu-item"> 1322 <span>Max Chrysler Dodge Jeep Ram of Clinton</span><br> 1323 1324 <a href="tel:660.924.0225" title="Call Max CDJR of Clinton 660.924.0225" data-ag-event="cta_interaction" data-aga-event-set-prop="clickToCallDepartment|Other"> 1325 <i class="fas fa-mobile" style="color:var(--primary-color);"></i> 660.924.0225 1326 </a> 1327 1328 </li> 1329 1330 <li class="da-mobile-submenu-item"> 1331 <span>Max Ford of Nevada</span><br> 1332 1333 <a href="tel:417.283.8320" title="Call Max Ford of Nevada 417.283.8320" data-ag-event="cta_interaction" data-aga-event-set-prop="clickToCallDepartment|Other"> 1334 <i class="fas fa-mobile" style="color:var(--primary-color);"></i> 417.283.8320 1335 </a> 1336 1337 </li> 1338 1339 <li class="da-mobile-submenu-item"> 1340 <span>Max Chrysler Dodge Jeep Ram of Nevada</span><br> 1341 1342 <a href="tel:4172838339" title="Call Max Chrysler Dodge Jeep Ram of Nevada 417.283.8339" data-ag-event="cta_interaction" data-aga-event-set-prop="clickToCallDepartment|Other"> 1343 <i class="fas fa-mobile" style="color:var(--primary-color);"></i> 417.283.8339 1344 </a> 1345 </li> 1346 1347 <li class="da-mobile-submenu-item"> 1348 <span>Max Chevrolet of Nevada</span><br> 1349 1350 <a href="tel:4174480066" title="Call Max Chevrolet of Nevada 417.448.0066" data-ag-event="cta_interaction" data-aga-event-set-prop="clickToCallDepartment|Other"> 1351 <i class="fas fa-mobile" style="color:var(--primary-color);"></i> 417.448.0066 1352 </a> 1353 1354 </li> 1355 1356 <li class="da-mobile-submenu-item"> 1357 <span>Max GMC of Nevada</span><br> 1358 1359 <a href="tel:4174480066" title="Call Max GMC of Nevada 417.448.0066" data-ag-event="cta_interaction" data-aga-event-set-prop="clickToCallDepartment|Other"> 1360 <i class="fas fa-mobile" style="color:var(--primary-color);"></i> 417.448.0066 1361 </a> 1362 1363 </li> 1364 </ul> 1365</div> </div> 1366 </div> 1367 </li> 1368 <li class="dv-fw-mobile-menu-item-content"> 1369 <div class="dv-mobile-menu-inner"> 1370 <div class="dv-mobile-menu-inner-header">Visit</div> 1371 <div class="dv-mobile-menu-inner-body dv-dealer-location"> 1372 <div class="da-mobile-submenu-container"> 1373 <h3>Max Motors Dealerships</h3> 1374 1375 <ul class="da-mobile-submenu-list"> 1376 1377 <li class="da-mobile-submenu-item"> 1378 <span>Max Ford of Richmond</span><br> 1379 <a target="_blank" href="https://maps.app.goo.gl/rodXhopW3uP5geHB8" title="904 StonnerLoop, Richmond, MO 64085" data-ag-event="getDirections"> 1380 <i class="fas fa-map-marker-alt" style="color:var(--primary-color);"></i> 904 StonnerLoop<br> Richmond, MO 64085 1381 </a><br> 1382 <a target="_blank" href="https://www.maxfordrichmond.com/" title="Max Ford of Richmond Website" class="dv-mobile-menu-btn">Visit Website <i class="far fa-external-link-square-alt"></i></a> 1383 </li> 1384 1385 <li class="da-mobile-submenu-item"> 1386 <span>Max Ford of Butler</span><br> 1387 <a target="_blank" href="https://maps.app.goo.gl/BbhY5PGM6qDYaRoi7" title="1108 West Fort Scott Street, Butler, MO 64730" data-ag-event="getDirections"> 1388 <i class="fas fa-map-marker-alt" style="color:var(--primary-color);"></i> 1108 West Fort Scott Street<br> Butler, MO 64730 1389 </a><br> 1390 <a target="_blank" href="https://www.maxfordmo.com/" title="Max Ford of Butler Website" class="dv-mobile-menu-btn">Visit Website <i class="far fa-external-link-square-alt"></i></a> 1391 </li> 1392 1393 <li class="da-mobile-submenu-item">
1394 <span>Max Chrysler Dodge Jeep Ram of Butler</span><br> 1395 <a target="_blank" href="https://maps.app.goo.gl/wagvnHdKU7RsoYcA8" title="1108 West Fort Scott Street, Butler, MO 64730" data-ag-event="getDirections"> 1396 <i class="fas fa-map-marker-alt" style="color:var(--primary-color);"></i> 1108 West Fort Scott Street<br> Butler, MO 64730 1397 </a><br> 1398 <a target="_blank" href="https://www.maxcdjrbutler.com/" title="Max CDJR of Butler Website" class="dv-mobile-menu-btn">Visit Website <i class="far fa-external-link-square-alt"></i></a> 1399 1400 </li> 1401 1402 <li class="da-mobile-submenu-item"> 1403 <span>Max Chrysler Dodge Jeep Ram of Clinton</span><br> 1404 <a target="_blank" href="https://maps.app.goo.gl/93Ch67ML2cjDrhHv9" title="1500 E. Harrison Rd. Clinton, MO 64735" data-ag-event="getDirections"> 1405 <i class="fas fa-map-marker-alt" style="color:var(--primary-color);"></i> 1500 E. Harrison Rd.<br> Clinton, MO 64735 1406 </a><br> 1407 <a target="_blank" href="https://www.maxcdjrclinton.com/" title="Max CDJR of Clinton Website" class="dv-mobile-menu-btn">Visit Website <i class="far fa-external-link-square-alt"></i></a> 1408 </li> 1409 1410 <li class="da-mobile-submenu-item"> 1411 <span>Max Ford of Nevada</span><br> 1412 <a target="_blank" href="https://maps.app.goo.gl/zHJTMC8cvQsG6GPv8" title="2501 E. Austin Blvd. Nevada, MO 64772" data-ag-event="getDirections"> 1413 <i class="fas fa-map-marker-alt" style="color:var(--primary-color);"></i> 2501 E. Austin Blvd.<br>Nevada, MO 64772 1414 </a><br> 1415 <a target="_blank" href="https://www.maxfordnevada.com/" title="Max Ford of Nevada Website" class="dv-mobile-menu-btn">Visit Website <i class="far fa-external-link-square-alt"></i></a> 1416 </li> 1417 1418 <li class="da-mobile-submenu-item"> 1419 <span>Max Chrysler Dodge Jeep Ram of Nevada</span><br> 1420 <a target="_blank" href="https://maps.app.goo.gl/zHJTMC8cvQsG6GPv8" title="2501 E. Austin Blvd. Nevada, MO 64772" data-ag-event="getDirections"> 1421 <i class="fas fa-map-marker-alt" style="color:var(--primary-color);"></i> 2501 E. Austin Blvd.<br>Nevada, MO 64772 1422 </a><br> 1423 <a target="_blank" href="https://www.maxcdjrnevada.com/" title="Max CDJR of Nevada Website" class="dv-mobile-menu-btn">Visit Website <i class="far fa-external-link-square-alt"></i></a> 1424 1425 </li> 1426 1427 <li class="da-mobile-submenu-item"> 1428 <span>Max Chevrolet of Nevada</span><br> 1429 <a target="_blank" href="https://maps.app.goo.gl/CUetv3C27HNpKVtx6" title="1405 North Osage Boulevard, Nevada, MO 64772" data-ag-event="getDirections"> 1430 <i class="fas fa-map-marker-alt" style="color:var(--primary-color);"></i> 1405 North Osage Boulevard<br>Nevada, MO 64772 1431 </a><br> 1432 <a target="_blank" href="https://www.maxmotors71.com/" title="Max Chevrolet of Nevada Website" class="dv-mobile-menu-btn">Visit Website <i class="far fa-external-link-square-alt"></i></a> 1433 </li> 1434 1435 <li class="da-mobile-submenu-item"> 1436 <span>Max GMC of Nevada</span><br> 1437 <a target="_blank" href="https://maps.app.goo.gl/9F8vZQXysAKEQ1KCA" title="1405 North Osage Boulevard, Nevada, MO 64772" data-ag-event="getDirections"> 1438 <i class="fas fa-map-marker-alt" style="color:var(--primary-color);"></i> 1405 North Osage Boulevard<br>Nevada, MO 64772 1439 </a><br> 1440 <a target="_blank" href="https://www.maxmotorsgmc.com/" title="Max GMC of Nevada Website" class="dv-mobile-menu-btn">Visit Website <i class="far fa-external-link-square-alt"></i></a> 1441 </li> 1442 1443 </ul> 1444</div> </div> 1445 </div> 1446 </li> 1447 </ul> 1448 </div> 1449</div>
1450<script> 1451var CloseMenu = function(e) { 1452 $('.nav-below-btn-toggle').each(function() { 1453 if ($(this).hasClass('open')) { 1454 $(this).removeClass('open'); 1455 } else { 1456 1457 $(this).addClass('open'); 1458 } 1459 }); 1460 if ($('.dv-header-lower').length) { 1461 $('.dv-header-lower').toggleClass("dv-header-lower-closed"); 1462 } 1463 $(".dv-fw-search").toggleClass("dv-toggle-open"); 1464 $("body").toggleClass("mobile-menu-open"); 1465 $('#the-nav-below').remove(); 1466}; 1467$(function() { 1468 1469 // Icon Click FN 1470 $(".nav-below-btn-toggle").click(function(event) { 1471 event.preventDefault(); 1472 event.stopPropagation(); 1473 var lowerHeaderHeight = document.querySelector(".srp_main .dv-header-lower"); 1474 if(!!lowerHeaderHeight) { 1475 $(window).scroll(function() { 1476 var scroll = $(window).scrollTop(); 1477 var totalHeaderHeight = parseInt('75px', 10 ) - parseInt(lowerHeaderHeight.offsetHeight, 10 ) + 'px'; 1478 if (scroll > 0) { 1479 document.querySelector(".dv-fw-search").style.top = parseInt(totalHeaderHeight, 10) + parseInt(lowerHeaderHeight.offsetHeight, 10) + 'px'; 1480 } else { 1481 document.querySelector(".dv-fw-search").style.top = 'auto'; 1482 } 1483 }); 1484 } 1485 CloseMenu($(this)); 1486 }); 1487 1488 $(document).on('click', function(e) { 1489 var opened = $('body').hasClass('mobile-menu-open'); 1490 var bodyContent = $('body.mobile-menu-open'); 1491 var target = $(e.target); 1492 if (opened === true && target.is(bodyContent)) { 1493 CloseMenu($('.nav-below-btn-toggle')); 1494 } 1495 }); 1496 1497 // Open Dropdown Menu Mobile 1498 $(".dv-mobile-menu-inner #menu-mobile-menu > li.has-sub > a").click(function() { 1499 $(".dv-mobile-menu-inner #menu-mobile-menu > li.has-sub > a").parent().find("ul").slideUp("fast"); 1500 1501 var panel = this.nextElementSibling; 1502 panel.style.maxHeight = panel.style.maxHeight ? panel.scrollHeight : null; 1503 var curHeight = document.querySelector(".dv-mobile-menu-inner").style.height; 1504 curHeight = parseInt(curHeight, 10); 1505 1506 if ($(this).parent().hasClass("open-active")) { 1507 $(".dv-mobile-menu-inner #menu-mobile-menu > li.has-sub > a").parent().removeClass("open-active"); 1508 $(this).parent().find("ul").slideUp("fast"); 1509 1510 document.querySelector(".dv-mobile-menu-inner").style.height = curHeight - panel.scrollHeight + 'px'; 1511 } else { 1512 $(".dv-mobile-menu-inner #menu-mobile-menu > li.has-sub > a").parent().removeClass("open-active"); 1513 $(this).parent().toggleClass("open-active"); 1514 $(this).parent().find("ul").slideToggle("fast"); 1515 1516 document.querySelector(".dv-mobile-menu-inner").style.height = curHeight + panel.scrollHeight + 'px'; 1517 } 1518 1519 this.scrollIntoView(); 1520 }); 1521 1522 // Mobile Menu Selector 1523 $(".dv-fw-mobile-menu-selector li").on("click", function() { 1524 $(".dv-fw-mobile-menu-selector li").removeClass("active"); 1525 $(this).toggleClass("active"); 1526 var idx = $(this).index(); 1527 $(this).parents().find('.dv-fw-mobile-menu-item-content').removeClass('active'); 1528 $(this).parents().find('.dv-fw-mobile-menu-item-content').eq(idx).addClass('active') 1529 }); 1530 1531 // Mobile Menu Caret 1532 $(".dv-mobile-menu-inner #menu-mobile-menu li.has-sub > a").append('<span class="dv-mobile-menu-caret"><i class="fa fa-chevron-down"></i></span>'); 1533}); 1534 1535// Mobile fix for height of menu items 1536document.addEventListener("DOMContentLoaded", function() { 1537 var elmInnerHeight = document.querySelector(".dv-mobile-menu-inner").getBoundingClientRect().height; 1538 // var header = document.querySelector("header"); 1539 // var headerHeight = header.getBoundingClientRect().height; 1540 // var distanceToTop = header.getBoundingClientRect().top; 1541 var setHeight = Math.ceil((elmInnerHeight)).toString(); 1542 document.querySelector(".dv-mobile-menu-inner").style.height = setHeight + 'px'; 1543}); 1544</script>
1544 1545 1546<div class="bread-crumbs"> 1547 <div class="dv-bread-crumbs" style="display:none;" itemscope itemtype="https://schema.org/BreadcrumbList"><span itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a href="https://www.maxmotors.com" itemprop="item"><span itemprop="name">Max Motors</span></a><meta itemprop="position" content="1"></span><span class="separator"> / </span><span itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><span itemprop="name">New Vehicles</span><meta itemprop="position" content="1"></span></div></div> 1548
1549<script> 1550 $(document).ready(function() { 1551 $(".dv-brand-logo-list").slick({ 1552 dots: false, 1553 autoplay: true, 1554 infinite: true, 1555 autoplaySpeed: 2000, 1556 speed: 500, 1557 slidesToShow: 1, 1558 pauseOnHover: true, 1559 pauseOnFocus: false, 1560 pauseOnDotsHover: false, 1561 arrows: false, 1562 }); 1563 }); 1564</script>
1564 1565<!-- da-srp-studio: switch=OFF (enable Redux → Integrations → SRP Functions → SRP Studio Config, then save options) studio=off (legacy Redux template) | clear cache: append ?srp_config_flush=1 --> 1566 <div class="srpLoading"> 1567 <div class="lds-ring"><div></div><div></div><div></div><div></div></div> 1568 </div> 1569 1570<div class="srp-header"> 1571 <div id="resultsStats"></div> 1572 <div class="srp-header-results"> 1573 <div class="srp-search"> 1574 <div class="srp-searchbar"> 1575 <i class="fas fa-search"></i> 1576 <div id="searchbox"></div> 1577 </div> 1578 <div id="clearSearchResults"><button><i class="fal fa-backspace"></i> <span>Clear<br>Search</span></button></div> 1579 </div> 1580 <div class="srp-header-right"> 1581 <div class="sortFilters" id="sortByDesktop"><div class="dv-srp-search-options-wrapper"><span class="dv-srp-search-options-label"><i class="fas fa-sort-amount-up"></i> <span class="dv-srp-search-options-dynamic-label">Sort</span></span></div></div> 1582 <div id="pagination-top"></div> 1583 </div> 1584 </div> 1585 <div class="dv-srp-search-options"> 1586 <div class="sortFilters" id="sortByMobile"><div class="dv-srp-search-options-wrapper"><span class="dv-srp-search-options-label"><i class="fas fa-sort-amount-up"></i> <span class="dv-srp-search-options-dynamic-label">Sort</span></span></div></div> 1587 <div class="showFiltersNonLegacy" id="showFiltersNonLegacy"></div> 1588 <div class="saveFilters"><div class="dv-srp-search-options-wrapper"><span class="dv-srp-search-options-label"><i class="fal fa-heart"></i> Save</span></div></div> 1589 </div> 1590</div> 1591 1592 1593<main> 1594 <div class="side-panel-container"> 1595 <section id="srp-filters" class="srp-filters"> 1596 <div class="srp-filters-close-wrapper"> 1597 <div class="srp-filters-reset-btn-wrapper"> 1598 <div id="srp-filters-reset-btn"></div> 1599 </div> 1600 <div class="srp-filters-close-btn"> 1601 <i class="fal fa-times"></i> Close 1602 </div> 1603 </div> 1604 <div class="range-slider-container srp-panel-toggle"> <div> 1605 <span> 1606 <h4>Price</h4> 1607 </span> 1608 <div id="price-range-slider"></div> 1609 </div> 1610 <div> 1611 <span> 1612 <h4>Year</h4> 1613 </span> 1614 <div id="year-range-slider"></div> 1615 </div> 1616 <div> 1617 <span> 1618 <h4>Mileage</h4> 1619 </span> 1620 <div id="mileage-range-slider"></div> 1621 </div> 1622 </div> 1623 1624 <div class="type-container srp-panel-toggle"> 1625 <span> 1626 <h4>Type</h4> 1627 </span> 1628 <div id="type-list"></div> 1629 </div> 1630 1631 <div class="dealertag-container srp-panel-toggle hidden-filter"> 1632 <span> 1633 <h4>Dealer Special</h4> 1634 <a><i class="far fa-chevron-up"></i></a> 1635 </span> 1636 <div id="dealertag-list"></div> 1637 </div> 1638 1639 <div class="make-container srp-panel-toggle"> 1640 <span> 1641 <h4>Make</h4> 1642 <a><i class="far fa-chevron-up"></i></a> 1643 </span> 1644 <div id="make-list"></div> 1645 </div> 1646 1647 <div class="model-container srp-panel-toggle"> 1648 <span> 1649 <h4>Model</h4> 1650 <a><i class="far fa-chevron-up"></i></a> 1651 </span> 1652 <div id="model-list"></div> 1653 </div> 1654 1655 <div class="trim-container srp-panel-toggle"> 1656 <span> 1657 <h4>Trim</h4> 1658 <a><i class="far fa-chevron-up"></i></a> 1659 </span> 1660 <div id="trim-list"></div> 1661 </div> 1662 1663 <div class="pricerange-container srp-panel-toggle"> 1664 <span> 1665 <h4>Price Range</h4> 1666 <a><i class="far fa-chevron-up"></i></a> 1667 </span> 1668 <div id="pricerange-list"></div> 1669 </div> 1670 1671 <div class="body-container srp-panel-toggle"> 1672 <span> 1673 <h4>Body</h4> 1674 <a><i class="far fa-chevron-up"></i></a> 1675 </span> 1676 <div id="body-list"></div> 1677 </div> 1678 1679 <div class="cab-container srp-panel-toggle"> 1680 <span> 1681 <h4>Cab Style</h4> 1682 <a><i class="far fa-chevron-up"></i></a> 1683 </span> 1684 <div id="cab-list"></div> 1685 </div> 1686 1687 <div class="bed-container srp-panel-toggle"> 1688 <span> 1689 <h4>Bed Style</h4> 1690 <a><i class="far fa-chevron-up"></i></a> 1691 </span> 1692 <div id="bed-list"></div> 1693 </div> 1694 1695 <div class="fuel-container srp-panel-toggle"> 1696 <span> 1697 <h4>Fuel</h4> 1698 <a><i class="far fa-chevron-up"></i></a> 1699 </span> 1700 <div id="fuel-list"></div>
1701 </div> 1702 1703 <div class="transmission-container srp-panel-toggle"> 1704 <span> 1705 <h4>Transmission</h4> 1706 <a><i class="far fa-chevron-up"></i></a> 1707 </span> 1708 <div id="transmission-list"></div> 1709 </div> 1710 1711 <div class="color-container srp-panel-toggle"> 1712 <span> 1713 <h4>Color</h4> 1714 <a><i class="far fa-chevron-up"></i></a> 1715 </span> 1716 <div id="color-list"></div> 1717 </div> 1718 1719 <div class="drivetrain-container srp-panel-toggle"> 1720 <span> 1721 <h4>Drivetrain</h4> 1722 <a><i class="far fa-chevron-up"></i></a> 1723 </span> 1724 <div id="drivetrain-list"></div> 1725 </div> 1726 1727 <div class="location-container srp-panel-toggle"> 1728 <span> 1729 <h4>Location</h4> 1730 <a><i class="far fa-chevron-up"></i></a> 1731 </span> 1732 <div id="location-list"></div> 1733 </div> 1734 1735 <div class="mpg-hway-container srp-panel-toggle"> 1736 <span> 1737 <h4>MPG Highway</h4> 1738 <a><i class="far fa-chevron-up"></i></a> 1739 </span> 1740 <div id="mpg-hway-list"></div> 1741 </div> 1742 1743 <div class="mpg-city-container srp-panel-toggle"> 1744 <span> 1745 <h4>MPG City</h4> 1746 <a><i class="far fa-chevron-up"></i></a> 1747 </span> 1748 <div id="mpg-city-list"></div> 1749 </div> 1750 1751 <div class="features-container srp-panel-toggle"> 1752 <span> 1753 <h4>Features</h4> 1754 <a><i class="far fa-chevron-up"></i></a> 1755 </span> 1756 <div id="features-list"></div> 1757 </div> 1758 1759 <div class="range-container srp-panel-toggle"> 1760 <span> 1761 <h4>Range</h4> 1762 <a><i class="far fa-chevron-up"></i></a> 1763 </span> 1764 <div id="range-list"></div> 1765 </div> 1766 1767 </section> 1768</div> 1769 1770<div class="filterResultCount"><span id="srpFilterResultCount"></span></div> 1771 1772<div class="result-wrapper "> 1773 1774 <h1 style="visibility: hidden; position: absolute; z-index: 0;">New Vehicles</h1> 1775 1776 <div class='dv-offers-top-banner-new-srp-wrapper'><div class='dv-offers-top-banner-new-srp'><a data-ag-event='cta_interaction' href='' target='_self' title='Save a Few Thousand at Max Motors | Max Motors' class='dv-offers-top-banner-new-srp-desktop'><span class='dv-offers-offer-title-hidden'>Save a Few Thousand at Max Motors</span><img src='https://bucket.dealeralchemist.com/max-motors/savings-srp.png?auto=compress%2Cformat&ixlib=php-3.3.1' alt='Save a Few Thousand at Max Motors'/></a><a data-ag-event='cta_interaction' href='' target='_self' title='Save a Few Thousand at Max Motors | Max Motors' class='dv-offers-top-banner-new-srp-mobile'><span class='dv-offers-offer-title-hidden'>Save a Few Thousand at Max Motors</span><img src='https://bucket.dealeralchemist.com/max-motors/1000x100-savings-mobile.png?auto=compress%2Cformat&ixlib=php-3.3.1' alt='Save a Few Thousand at Max Motors | Max Motors'/></a></div></div>
1776<script> 1777 $(document).ready(function() { 1778 $(".dv-offers-top-banner-new-srp-wrapper").slick({ 1779 dots: false, 1780 autoplay: true, 1781 infinite: true, 1782 autoplaySpeed: 4500, 1783 speed: 500, 1784 slidesToShow: 1, 1785 pauseOnHover: true, 1786 pauseOnFocus: true, 1787 pauseOnDotsHover: true, 1788 arrows: true, 1789 dotsClass: "dv-offers-srp-dots", 1790 }) 1791 .on("beforeChange", function(event, slick, currentSlide, nextSlide) { 1792 if (currentSlide !== nextSlide) { 1793 var elements = document.querySelectorAll(".slick-center + .slick-cloned"); 1794 for (var i = 0; i < elements.length; i++) { 1795 setTimeout(function() { 1796 return elements[i].classList.add("slick-current", "slick-center"); 1797 }); 1798 } 1799 } 1800 }); 1801 1802 }); 1803 1804 </script>
1804 1805 <style> 1806 .dv-offers-top-banner-new-srp-wrapper .slick-arrow, .dv-offers-top-banner-used-srp-wrapper .slick-arrow { 1807 background: rgba(0,0,0,0.8); 1808 width: auto; 1809 height: auto 1810 } 1811 .dv-offers-top-banner-new-srp-wrapper .slick-arrow:before, .dv-offers-top-banner-used-srp-wrapper .slick-arrow:before { 1812 color: #fff; 1813 padding: 5px; 1814 line-height: 100%; 1815 display: block; 1816 width: auto; 1817 height: auto; 1818 } 1819 </style> 1820 1821 <div class="ag-tp-trade-srp-banner"></div> 1822 <div class="ag-tp-payments-srp-banner"></div> 1823 <div class="ag-tp-qualified-srp-banner"></div> 1824 1825 <div class="dv-srp-filter-tags"> 1826 <div class="dv-srp-filter-clear-btn" id="dv-srp-clear-filters"></div> 1827 <div id="filterTags"></div> 1828 </div> 1829 1830 <div id="srp-results" class="srp-results"> 1831 <div id="hit-template"> 1832 <div> 1833 <div class="listing" data-vehicle-id="{{databaseID}}" data-vehicle-vin="{{vin}}" data-vehicle-condition="{{condition}}" data-vehicle-year="{{yr}}" data-vehicle-stock-number="{{stockNumber}}" data-vehicle-make-model="{{make}} {{model}}" data-vehicle-price="{{final_price}}" data-vehicle-discount="{{discount_matrix}}" data-dealer-name="{{dealer.name}}" data-ag-ext-color="{{exteriorColor}}" data-ag-price="{{finalPriceInt}}" data-ag-make="{{make}}" data-ag-model="{{model}}" data-ag-type="{{body}}" data-ag-trim="{{trim}}" data-ag-vdp-url="{{vdpUrl}}"> 1834 <div class="listing-container" data-url='{{vdpUrl}}'> 1835 <div class="left-side"> 1836 {{#flags.hasSoldVehicles}} 1837 <div class="srp-mc-sold-banner"> 1838 <p>SOLD</p> 1839 </div> 1840 {{/flags.hasSoldVehicles}} 1841 <div class="vehicle-image"> 1842 1843 <div class="img-container image-ratio-perc image-aspect-ratio-4x3"> 1844 {{#flags.hasSpecial}} 1845 <div class="vehicle-special srp-banner-overlay">{{flags.specialText}}</div> 1846 {{/flags.hasSpecial}} 1847 {{#flags.isReserved}} 1848 <div class="vehicle-special reserved-vehicle"> 1849 This vehicle has a pending sale. <div class="dv-tooltip"> 1850 <p class="dv-tooltip-content">Pending Sale indicates a customer has either reserved or has begun the process to purchase this vehicle. Please contact us directly to learn about similar vehicles.</p> 1851 <i class="fal fa-question-circle"></i> 1852 </div> 1853 </div> 1854 {{/flags.isReserved}} 1855 <div class="vehicle-views"> 1856 <!-- Current image carousel --> 1857 <div id="swiper-726701" class="swiper srp-swiper-vehicles img" data-id="726701"> 1858 <div class="swiper-wrapper"> 1859 {{#imageUrls}} 1860 <div class="swiper-slide"> 1861 <img class="lazy srp-click-image" alt="{{condition}} {{yr}} {{make}} {{model}} {{body}}" data-src="{{.}}" /> 1862 <div class="swiper-lazy-preloader"></div> 1863 </div> 1864 {{/imageUrls}} 1865 </div> 1866 <!-- Add Navigation --> 1867 <!-- Changed <div> to <button> to prevent rapid clicks from triggering native text-selection/highlight on SRP cards --> 1868 <button type="button" class="swiper-button-next swiper-button-next-726701" aria-label="Next slide"></button> 1869 <button type="button" class="swiper-button-prev swiper-button-prev-726701" aria-label="Previous slide"></button> 1870</div> </div> 1871 </div> 1872 1873 <div class="vehicle-colors"> 1874 <div class="exterior-color"> 1875 {{#exteriorColor}} 1876 {{#exteriorHex}} 1877 <div style="background-color:{{exteriorHex}};"></div> 1878 {{/exteriorHex}} 1879 {{^exteriorHex}} 1880 {{#genericColor}} 1881 <div style="background-color:{{genericColor}};"></div> 1882 {{/genericColor}} 1883 {{^genericColor}} 1884 <div style="background: url('//bucket.dealeralchemist.com/assets/images/slash-square.png');background-size: 100%;"></div> 1885 {{/genericColor}} 1886 {{/exteriorHex}} 1887 <div class="color-info"> 1888 <p class="color-label">EXTERIOR</p> 1889 <p class="color">
1889{{exteriorColor}} {{#exteriorColorDisclaimer}}<i class="fad fa-info-circle" onclick="DVPopUp(this);return false;" data-disclaimer="{{exteriorColorDisclaimer}}"></i>{{/exteriorColorDisclaimer}}</p> 1890 </div> 1891 {{/exteriorColor}} 1892 </div> 1893 <div class="interior-color"> 1894 {{#interiorColor}} 1895 {{#interiorHex}} 1896 <div style="background-color:{{interiorHex}};"></div> 1897 {{/interiorHex}} 1898 {{^interiorHex}} 1899 {{#genericInteriorColor}} 1900 <div style="background-color:{{genericInteriorColor}};"></div> 1901 {{/genericInteriorColor}} 1902 {{^genericInteriorColor}} 1903 <div style="background: url('//bucket.dealeralchemist.com/assets/images/slash-square.png');background-size: 100%;"></div> 1904 {{/genericInteriorColor}} 1905 {{/interiorHex}} 1906 <div class="color-info"> 1907 <p class="color-label">INTERIOR</p> 1908 <p class="color">{{interiorColor}} {{#interiorColorDisclaimer}}<i class="fad fa-info-circle" onclick="DVPopUp(this);return false;" data-disclaimer="{{interiorColorDisclaimer}}"></i>{{/interiorColorDisclaimer}}</p> 1909 </div> 1910 {{/interiorColor}} 1911 </div> 1912 </div> 1913 <div class="below-vehicle-colors"> 1914 <div class="srp-dp-1"> 1915 <span> 1916 <a href="https://s3.amazonaws.com/cdn.dealervenom.com/max-motors/honest_pricing.mp4" target="_blank"> 1917 <strong>MAX TRANSPARENCY</strong><br> 1918 Don't get fooled by other dealers. <i class="fas fa-play-circle"></i> 1919 </a> 1920 </span> 1921</div> </div> 1922 1923 </div> 1924 </div> 1925 <div class="right-side"> 1926 <div class="right-top" style="padding-left:0px"> 1927 <div class="vehicle-info"> 1928 <div class="vehicle-title-wrap"> 1929 <a href="{{vdpUrl}}"> 1930 <h2 class="car-title"><p class="new-used secondary_color">{{condition}} {{yr}}</p> 1931<span> {{make}} {{model}} {{trim}} {{cab}} {{bed}}</span></h2> 1932 <div class="vin-stock"> 1933 <p class="vin"><span class="new-used primary_color">{{body}} {{drivetrain}} {{engine}} {{transmission}}</span></p> 1934 </div> 1935 </a> 1936 <div class="title-actions"> 1937 </div> 1938 </div> 1939 <div class="specs"> 1940 <!--<p>Body Style:<span style='font-weight:300;'> {{body}}</span></p> 1941<p>Engine:<span style='font-weight:300;'> {{engine}}</span></p> 1942<p>Transmission:<span style='font-weight:300;'> {{transmission}}</span></p> 1943<p>Drivetrain:<span style='font-weight:300;'> {{drivetrain}}</span></p> 1944<p>{{#mpg_hway_db}}<span class="mpg">HWY: <span class="mpg">{{mpg_hway_db}}</span></span>{{/mpg_hway_db}} {{#mpg_city_db}} | <span>CITY: <span> {{mpg_city_db}} </span></span>{{/mpg_city_db}}</p>--> </div> 1945 </div> 1946 <div class="vehicle-price-container"> 1947 <div class="vehicle-price flex_box"> 1948 <!-- MSRP is = to Final Price (No Discounts) --> 1949{{^flags.internetPriceHigher}} 1950{{#flags.msrpFinal}} 1951 {{#flags.noFinalPrice}} 1952 <div class="no-price"> 1953 <a href='tel:{{dealer.phone}}'><p>CALL FOR PRICE</p></a> 1954 </div> 1955 {{/flags.noFinalPrice}} 1956 {{^flags.noFinalPrice}} 1957 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 1958 <p class="dv-pricing-stack-strong"> MSRP <i class="fad fa-info-circle" onclick="DVPopUp(this);return false;" data-disclaimer="This is the MSRP for this vehicle."></i> 1959 <span class="dv-pricing-stack-strong">{{msrp}}</span> 1960 </p> 1961</div> 1962<!--Dealer Doc Fees-->
1962 1963 {{#flags.hasDealerFees}} 1964 {{#dealerFees}} 1965 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 1966 <p class="dv-pricing-stack-strong">{{name}} <i class="fad fa-info-circle" onclick="DVPopUp(this);return false;" data-modal-title="{{name}}" data-disclaimer="{{disclaimer}}"></i> 1967 <span class="dv-pricing-stack-strong">+{{displayAmount}}</span> 1968 </p> 1969 </div> 1970 {{/dealerFees}} 1971 {{/flags.hasDealerFees}} 1972<!--Dealer Doc Fees--> 1973<div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 1974 <p class="dv-pricing-stack-strong">Our Price 1975 <span class="dv-pricing-stack-value-default">{{msrp}}</span> 1976 </p> 1977</div> 1978 {{/flags.noFinalPrice}} 1979{{/flags.msrpFinal}} 1980<!-- MSRP is = to Final Price (No Discounts OR No price) --> 1981 1982<!-- MSRP is NOTEqual to Final Price (Has Discounts)--> 1983{{^flags.msrpFinal}} 1984 <div class="dv-pricing-stack-container"> 1985 {{#flags.noFinalPrice}} 1986 <div class="no-price"> 1987 <a href='tel:{{dealer.phone}}'><p>CALL FOR PRICE</p></a> 1988 </div> 1989 {{/flags.noFinalPrice}} 1990 {{^flags.noFinalPrice}} 1991 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 1992 <p class="dv-pricing-stack-strong"> MSRP <i class="fad fa-info-circle" onclick="DVPopUp(this);return false;" 1993 data-disclaimer="This is the MSRP for this vehicle."></i> 1994 <img src="/app/themes/dv-framework/media/img/slash-1.png" alt="Price Slash" class="dv-price-slash"/><span class="dv-pricing-stack-strong">{{msrp}}</span> 1995 </p> 1996</div> 1997<!--Custom Pricing Rule Application--> 1998 {{#flags.hasDiscountMatrix}} 1999 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 2000 <p class="dv-pricing-stack-strong">Dealer Adjustment <i class="fad fa-info-circle" onclick="DVPopUp(this);return false;" 2001 data-disclaimer="Dealer Adjustment is additional items installed on this vehicle. See Dealer for details."></i> 2002 <span class="dv-pricing-stack-strong">{{discountMatrix}}</span> 2003 </p> 2004</div> 2005 {{/flags.hasDiscountMatrix}} 2006<!--Custom Pricing Rule Application--> 2007<!--DealerInstalled Accessories--> 2008 {{#options}} 2009 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 2010 <p class="dv-pricing-stack-strong">{{name}} 2011 <span class="dv-pricing-stack-strong">+{{price}}</span> 2012 </p> 2013</div> 2014 {{/options}} 2015<!--DealerInstalled Accessories--> 2016<!--NonConditional Incentives Discount--> 2017 {{#flags.hasIncentives}} 2018 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 2019 <p class="dv-pricing-stack-strong">{{make}} Incentives 2020 <span class="dv-pricing-stack-strong">{{incentivesDiscount}}</span> 2021 </p> 2022</div> 2023 {{/flags.hasIncentives}} 2024<!--NonConditional Incentives Discount--> 2025<!--Dealer/Feed Discount--> 2026 {{#flags.hasDealerDiscount}} 2027 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 2028 <p class="dv-pricing-stack-strong"> Dealer Discount 2029 <span class="dv-pricing-stack-strong">{{dealerDiscount}}</span> 2030 </p> 2031 </div> 2032 {{/flags.hasDealerDiscount}} 2033<!--Dealer/Feed Discount--> 2034<!--Dealer Doc Fees--> 2035 {{#flags.hasDealerFees}} 2036 {{#dealerFees}} 2037 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 2038 <p class="dv-pricing-stack-strong">{{name}} <i class="fad fa-info-circle" onclick="DVPopUp(this);return false;" data-modal-title="{{name}}" data-disclaimer="{{disclaimer}}"></i> 2039 <span class="dv-pricing-stack-strong">+{{displayAmount}}</span> 2040 </p> 2041 </div> 2042 {{/dealerFees}} 2043 {{/flags.hasDealerFees}} 2044<!--Dealer Doc Fees--> 2045 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 2046 <p class="dv-pricing-stack-strong"> Our Price 2047 <span class="dv-pricing-stack-value-default">{{finalPrice}}</span> 2048 </p> 2049</div> 2050{{/flags.noFinalPrice}} 2051 </div> 2052{{/flags.msrpFinal}} 2053{{/flags.internetPriceHigher}} 2054<!-- MSRP is NOT Equal to Final Price --> 2055 2056<!-- INTERNET PRice Value HIGHER Than MSRP - This is a safety condition so $0 is not shown on vehicles missing prices.--> 2057 2058{{#flags.internetPriceHigher}} 2059 {{^flags.noFinalPrice}} 2060<!--Dealer Doc Fees-->
2060 2061 {{#flags.hasDealerFees}} 2062 {{#dealerFees}} 2063 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 2064 <p class="dv-pricing-stack-strong">{{name}} <i class="fad fa-info-circle" onclick="DVPopUp(this);return false;" data-modal-title="{{name}}" data-disclaimer="{{disclaimer}}"></i> 2065 <span class="dv-pricing-stack-strong">+{{displayAmount}}</span> 2066 </p> 2067 </div> 2068 {{/dealerFees}} 2069 {{/flags.hasDealerFees}} 2070<!--Dealer Doc Fees--> 2071 2072 <div class="dv-dealer-subtotal dv-price-stack dv-pricing-main"> 2073 <p class="dv-pricing-stack-value-default"> Our Price <i class="fad fa-info-circle" onclick="DVPopUp(this);return false;" 2074 data-disclaimer="This Price may include Dealer Installed Options. Please contact us for details."></i> 2075 <span class="dv-pricing-stack-value-default">{{internetPrice}}</span> 2076 </p> 2077</div> 2078{{/flags.noFinalPrice}} 2079{{/flags.internetPriceHigher}} 2080<style> 2081 /*Price Stack Styles*/ 2082.dv-price-stack p { 2083 height: 23px; 2084 font-size: 14px; 2085 font-weight: bold; 2086 position: relative; 2087} 2088.dv-price-stack p b { 2089 font-size: 14px; 2090 font-weight: bold; 2091} 2092.dv-price-stack span { 2093 font-size: 14px; 2094 font-weight: bold; 2095} 2096.dv-price-stack .dv-price-slash { 2097 max-width: 63px; 2098 z-index: 98; 2099 position: absolute; 2100 right: 0; 2101} 2102.dv-pricing-stack-strong .dv-pricing-stack-value-default { 2103 color: #00bb00; 2104} 2105/*Price Stack Styles*/ 2106</style> 2107 2108 </div> 2109 2110 2111 2112 2113 2114 2115 </div> 2116 2117 <!-- Conditional Incentives SRP card displays --> 2118 <!--END Conditional Incentives SRP card displays --> 2119 2120 2121 </div> 2122 2123 2124 2125 2126 <div class="right-bottom"> 2127 <div class="srp-custom srp-custom-seven" style='height:160px'> 2128 <style> 2129 .da-quick-form-button:hover { 2130 background-color: #cc0000 !important; 2131 color: #FFFFFF !important; 2132 } 2133 .da-quick-form-button:hover svg path { 2134 stroke: #FFFFFF; 2135 } 2136 .da-quick-form-button { 2137 text-align: center; 2138 leading-trim: both; 2139 font-size: 12px; 2140 font-weight: 600; 2141 line-height: normal; 2142 font-family: inherit !important; 2143 text-transform: none; 2144 } 2145 .da-quick-form-button[disabled] { 2146 opacity: 0.7; 2147 cursor: not-allowed; 2148 } 2149 @keyframes spin { 2150 from { transform: rotate(0deg); } 2151 to { transform: rotate(360deg); } 2152 } 2153 .animate-spin { 2154 animation: spin 1s linear infinite; 2155 } 2156 .icon-container { 2157 display: inline-flex; 2158 align-items: center; 2159 } 2160 .icon-container > * { 2161 display: none; 2162 } 2163 .icon-container > *.active { 2164 display: inline-flex; 2165 } 2166 .da-quick-form input:user-invalid { 2167 background-color: #ff00001f !important; 2168 } 2169 </style><div class="da-quick-form" data-locked-pricing="false" style="margin-bottom:25px; margin-top:25px;" id="da_quick_form_6ab7c324643c8"><div class="da-quick-form-title-container" style="background-color: #007cc2; color: #fff; padding: 15px; text-align:center; border-radius: 5px 5px 0px 0px; font-weight: 600;"><h5 class="gform_title quick_form_title">Quick Contact</h5></div><form method="post" class="gform_form gform_quick_form" data-form-id="40"><input type="hidden" id="da_quick_form_nonce" name="da_quick_form_nonce" value="d6a327ac2e" /><input type="hidden" name="_wp_http_referer" value="/new-vehicles/?make=Chrysler" /><input type="hidden" name="da_vehicle_id" class="vehicle-id-field" value="{{vin}}"><input type="hidden" name="da_vin" class="vin-field" value="{{vin}}"><input type="hidden" name="da_stock_number" class="stock-number-field" value="{{stockNumber}}"><input type="hidden" name="da_year" class="year-field" value="{{year}}"><input type="hidden" name="da_make" class="make-field" value="{{make}}"><input type="hidden" name="da_model" class="model-field" value="{{model}}"><input type="hidden" name="da_trim" class="trim-field" value="{{trim}}"><input type="hidden" name="da_msrp" class="msrp-field" value="{{msrp}}">
2169<input type="hidden" name="da_final_price" class="final-price-field" value="{{finalPrice}}"><input type="hidden" name="da_dealer_name" class="dealer-name-field" value="{{dealer.name}}"><input type="hidden" name="da_discount_matrix" class="discount-matrix-field" value="{{discountMatrix}}"><input type="hidden" name="da_discount_matrix_value" class="discount-matrix-value-field" value="{{discountmatrix_value}}"><input type="hidden" name="da_internet_price" class="internet-price-field" value="{{internet_price}}"><input type="hidden" name="da_condition" class="condition-field" value="{{condition}}"><input type="hidden" name="da_vehicle_url" class="vehicle-url-field" value="{{vdpUrl}}"><div class="gform_body"><div class="gform_fields" style="display: flex;"><div class="gfield" style="flex:1;"><input type="text" name="da_quick_form_name" placeholder="Full Name" required class="medium" style="height: 45px; background-color:#F8F8F8; border: none; border-left: 1px solid #E0E0E0;"></div><div class="gfield ginput_container ginput_container_phone" style="flex:1;"><input type="tel" name="da_quick_form_phone" placeholder="Phone" required pattern="\(\d{3}\) \d{3}-\d{4}" title="10-digit phone number. Formatting is applied automatically." class="medium da-quick-form-phone-input" style="height: 45px; background-color:#F8F8F8; border: none; border-left: 1px solid #E0E0E0; border-right: 1px solid #E0E0E0;"></div></div><div class="gform_fields da_quick_form_bottom_row" style="display: flex; align-items: stretch;"><div class="gfield da_quick_form_bottom_row" style="flex: 3;"><input type="email" name="da_quick_form_email" placeholder="Email" required class="medium" style="width: 100%; height: 45px; background-color:#F8F8F8; border:1px solid #E0E0E0; border-radius: 0 0 0 5px !important;"></div><div class="gfield gform_fields" style="flex: 1.5;"><button type="submit" name="da_quick_form_submitted" class="gform_button button da-quick-form-button" style="width: 100%; height: 45px; margin: 0; background-color: #007cc2; border: none; color: #FFFFFF; cursor: pointer; border-radius: 0px 0px 5px 0; display: flex; align-items: center; justify-content: center; gap: 4px;"><span class="icon-container"><span class="default-icon active"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none"> 2170 <g clip-path="url(#clip0_4_59)"> 2171 <path d="M2.25 9.75C2.25 9.35218 2.40804 8.97064 2.68934 8.68934C2.97064 8.40804 3.35218 8.25 3.75 8.25H11.25C11.6478 8.25 12.0294 8.40804 12.3107 8.68934C12.592 8.97064 12.75 9.35218 12.75 9.75V14.25C12.75 14.6478 12.592 15.0294 12.3107 15.3107C12.0294 15.592 11.6478 15.75 11.25 15.75H3.75C3.35218 15.75 2.97064 15.592 2.68934 15.3107C2.40804 15.0294 2.25 14.6478 2.25 14.25V9.75Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2172 <path d="M6.75 12C6.75 12.1989 6.82902 12.3897 6.96967 12.5303C7.11032 12.671 7.30109 12.75 7.5 12.75C7.69891 12.75 7.88968 12.671 8.03033 12.5303C8.17098 12.3897 8.25 12.1989 8.25 12C8.25 11.8011 8.17098 11.6103 8.03033 11.4697C7.88968 11.329 7.69891 11.25 7.5 11.25C7.30109 11.25 7.11032 11.329 6.96967 11.4697C6.82902 11.6103 6.75 11.8011 6.75 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2173 <path d="M9.75 8.25V5.25C9.75 4.45435 10.0661 3.69129 10.6287 3.12868C11.1913 2.56607 11.9544 2.25 12.75 2.25C13.5456 2.25 14.3087 2.56607 14.8713 3.12868C15.4339 3.69129 15.75 4.45435 15.75 5.25V8.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2174 </g> 2175 <defs> 2176 <clipPath id="clip0_4_59"> 2177 <rect width="18" height="18" fill="white"/> 2178 </clipPath> 2179 </defs> 2180 </svg></span><span class="loading-icon"><svg class="animate-spin" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none"> 2181 <path d="M12 4.75V6.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2182 <path d="M17.1266 6.87347L16.0659 7.93413" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2183 <path d="M19.25 12H17.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2184 <path d="M17.1266 17.1265L16.0659 16.0659" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2185 <path d="M12 17.75V19.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2186 <path d="M7.9342 16.0659L6.87354 17.1265" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2187 <path d="M6.25 12H4.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2188 <path d="M7.9342 7.93413L6.87354 6.87347" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 2189 </svg></span></span><span class="button-text">Submit</span></button></div></div></div></form></div><div class="da-quick-form-unlocked" style="display:none;"></div> </div> 2190 2191 <div class="srp-cta"> 2192 2193 2194 2195 <div class="srp-extra-div"><p class="trans" style="color:#838383;font-size:.65rem;">VIN: <span class="bold-value-2" style="color:#838383; font-size:.65rem; font-weight: 600;"> {{vin}}</span></p> 2196{{#stockNumber}}<p class="trim" style="color:#838383;font-size:.65rem;">Stock:<span class="bold-value-2" style="color:#838383; font-size:.65rem; font-weight: 600;"> {{stockNumber}}</span></p>{{/stockNumber}}</div> 2197 </div> 2198 <!--End .srp-cta--> 2199 </div> 2200 </div> 2201 2202 </div> 2203 2204 2205 <div class="listing-bottom-row srp-lower-bar"> 2206 <div class="dealer-phone"> 2207 <p><a data-aga-event="getDirections" href="{{dealer.googleShareUrl}}" target="_blank">{{dealer.name}}</a></p> 2208 <p><a class="dv-lowerbar-new-srp-veh-phone" data-aga-event="clickToCall" data-aga-event-set-prop="clickToCallDepartment|Sales" href="tel:{{dealer.phone}}"><i class="fal fa-phone-alt"></i>{{dealer.phone}}</a></p> 2209</div> </div> 2210 </div> 2211 </div> 2212 </div> 2213 </div> 2214 2215 <div class='dv-offers-bottom-banner-new-srp-wrapper'><div class='dv-offers-bottom-banner-new-srp'><a data-ag-event='cta_interaction' href='/value-trade/' target='_self' title='Trade or Sell Your Vehicle | Max Motors' class='dv-offers-bottom-banner-new-srp-desktop'><span class='dv-offers-offer-title-hidden'>Trade or Sell Your Vehicle</span><img src='https://bucket.dealeralchemist.com/max-motors/trade-or-sell-srp.png?auto=compress%2Cformat&ixlib=php-3.3.1' alt='Trade or Sell Your Vehicle | Max Motors'/></a><a data-ag-event='cta_interaction' href='/value-trade/' target='_self' title='Trade or Sell Your Vehicle | Max Motors' class='dv-offers-bottom-banner-new-srp-mobile'><span class='dv-offers-offer-title-hidden'>Trade or Sell Your Vehicle</span><img src='https://bucket.dealeralchemist.com/max-motors/1000x100-trade-or-sell-mobile.png?auto=compress%2Cformat&ixlib=php-3.3.1' alt='Trade or Sell Your Vehicle | Max Motors'/></a></div></div>
2215<script> 2216 $(document).ready(function() { 2217 $(".dv-offers-bottom-banner-new-srp-wrapper").slick({ 2218 dots: false, 2219 autoplay: true, 2220 infinite: true, 2221 autoplaySpeed: 4500, 2222 speed: 500, 2223 slidesToShow: 1, 2224 pauseOnHover: true, 2225 pauseOnFocus: true, 2226 pauseOnDotsHover: true, 2227 arrows: true, 2228 dotsClass: "dv-offers-srp-dots", 2229 }) 2230 .on("beforeChange", function(event, slick, currentSlide, nextSlide) { 2231 if (currentSlide !== nextSlide) { 2232 var elements = document.querySelectorAll(".slick-center + .slick-cloned"); 2233 for (var i = 0; i < elements.length; i++) { 2234 setTimeout(function() { 2235 return elements[i].classList.add("slick-current", "slick-center"); 2236 }); 2237 } 2238 } 2239 }); 2240 2241 }); 2242 2243 </script>
2243 2244 <style> 2245 .dv-offers-top-banner-new-srp-wrapper .slick-arrow, .dv-offers-top-banner-used-srp-wrapper .slick-arrow { 2246 background: rgba(0,0,0,0.8); 2247 width: auto; 2248 height: auto 2249 } 2250 .dv-offers-top-banner-new-srp-wrapper .slick-arrow, .dv-offers-top-banner-used-srp-wrapper .slick-arrow:before { 2251 color: #fff; 2252 padding: 5px; 2253 line-height: 100%; 2254 display: block; 2255 width: auto; 2256 height: auto; 2257 } 2258 </style> 2259 2260 <div class="srp-footer"> 2261 <div id="resultsStats-bottom"></div> 2262 <div id="pagination-bottom"></div> 2263 </div> 2264</div> 2265 2266<div id="empty-template" style='display:none;'> 2267 <div class='row srp-no-results'><h3>Don't see the vehicle you are looking for? We will find it for you!</h3></div><div class='srp-noResults-wrapper'> 2268 <div class='gf_browser_chrome gform_wrapper orderparts_wrapper' id='gform_wrapper_7' ><form data-id="7" data-type="consumer_contact" data-department="sales" data-name="Vehicle Finder Service" method='post' enctype='multipart/form-data' id='gform_7' class='orderparts' action='/new-vehicles/?make=Chrysler'> 2269 <div class='gform_body'><ul id='gform_fields_7' class='gform_fields left_label form_sublabel_below description_below'><li id='field_7_6' class='gfield gsection field_sublabel_below field_description_below gfield_visibility_visible' ><h2 class='gsection_title'>Vehicle Info</h2></li><li id='field_7_35' class='gfield gfield_html gfield_html_formatted gfield_no_follows_desc field_sublabel_below field_description_below gfield_visibility_visible' ></ul><ul class="formsection"></li><li id='field_7_49' class='gfield dv-form-textbox dv-form-name gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label gfield_label_before_complex' >Name<span class='gfield_required'>*</span></label><div class='ginput_complex ginput_container no_prefix has_first_name no_middle_name has_last_name no_suffix gf_name_has_2 ginput_container_name' id='input_7_49'> 2270 2271 <span id='input_7_49_3_container' class='name_first' > 2272 <input type='text' name='input_49.3' id='input_7_49_3' value='' aria-label='First name' tabindex='50' aria-required="true" aria-invalid="false" placeholder='First'/> 2273 <label for='input_7_49_3' >First</label> 2274 </span> 2275 2276 <span id='input_7_49_6_container' class='name_last' > 2277 <input type='text' name='input_49.6' id='input_7_49_6' value='' aria-label='Last name' tabindex='52' aria-required="true" aria-invalid="false" placeholder='Last'/> 2278 <label for='input_7_49_6' >Last</label> 2279 </span> 2280 2281 </div></li><li id='field_7_3' class='gfield dv-form-textbox field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_3' >Phone</label><div class='ginput_container ginput_container_phone'><input name='input_3' id='input_7_3' type='text' value='' class='medium' tabindex='54' aria-invalid="false" /></div></li><li id='field_7_4' class='gfield dv-form-textbox gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_4' >Email<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_email'> 2282 <input name='input_4' id='input_7_4' type='text' value='' class='medium' tabindex='55' aria-required="true" aria-invalid="false"/> 2283 </div></li><li id='field_7_5' class='gfield dv-form-textbox gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' >Contact Preference?<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_radio'><ul class='gfield_radio' id='input_7_5'><li class='gchoice_7_5_0'><input name='input_5' type='radio' value='Phone' id='choice_7_5_0' tabindex='56' /><label for='choice_7_5_0' id='label_7_5_0'>Phone</label></li><li class='gchoice_7_5_1'><input name='input_5' type='radio' value='Email' id='choice_7_5_1' tabindex='57' /><label for='choice_7_5_1' id='label_7_5_1'>Email</label></li></ul></div></li><li id='field_7_36' class='gfield gfield_html gfield_html_formatted gfield_no_follows_desc field_sublabel_below field_description_below gfield_visibility_visible' ></ul><ul></li><li id='field_7_7' class='gfield gsection field_sublabel_below field_description_below gfield_visibility_visible' ><h2 class='gsection_title'>What Are You Looking For?</h2></li><li id='field_7_37' class='gfield gfield_html gfield_html_formatted gfield_no_follows_desc field_sublabel_below field_description_below gfield_visibility_visible' ></ul><ul class="formsection"></li><li id='field_7_41' class='gfield dv-form-textbox gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' >Type<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_radio'><ul class='gfield_radio' id='input_7_41'><li class='gchoice_7_41_0'><input name='input_41' type='radio' value='New' id='choice_7_41_0' tabindex='58' /><label for='choice_7_41_0' id='label_7_41_0'>New</label></li><li class='gchoice_7_41_1'><input name='input_41' type='radio' value='Used' id='choice_7_41_1' tabindex='59' /><label for='choice_7_41_1' id='label_7_41_1'>Used</label></li><li class='gchoice_7_41_2'><input name='input_41' type='radio' value='Any' id='choice_7_41_2' tabindex='60' /><label for='choice_7_41_2' id='label_7_41_2'>Any</label></li></ul></div></li><li id='field_7_50' class='gfield dv-form-textbox gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_50' >Year<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_text'><input name='input_50' id='input_7_50' type='text' value='' class='medium' tabindex='61' placeholder='XXXX' aria-required="true" aria-invalid="false" /></div></li><li id='field_7_44' class='gfield dv-form-textbox gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_44' >Mileage (Max)<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_select'><select name='input_44' id='input_7_44' class='medium gfield_select' tabindex='62' aria-required="true" aria-invalid="false"><option value='5000' >5000</option><option value='10000' >10000</option><option value='15000' >15000</option><option value='20000' >20000</option><option value='25000' >25000</option><option value='30000' >30000</option><option value='40000' >40000</option><option value='50000' >50000</option><option value='60000' >60000</option><option value='70000' >70000</option><option value='80000' >80000</option><option value='90000' >90000</option><option value='100000' >100000</option><option value='150000' >150000</option><option value='Any' >Any</option></select></div></li><li id='field_7_45' class='gfield dv-form-textbox gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_45' >Price (Max)<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_select'><select name='input_45' id='input_7_45' class='medium gfield_select' tabindex='63' aria-required="true" aria-invalid="false"><option value='Any' >Any</option><option value='$200000' >$200000</option><option value='$150000' >$150000</option><option value='$120000' >$120000</option><option value='$100000' >$100000</option><option value='$90000' >$90000</option><option value='$80000' >$80000</option><option value='$70000' >$70000</option><option value='$60000' >$60000</option><option value='$50000' >$50000</option><option value='$40000' >$40000</option><option value='$30000' >$30000</option><option value='$25000' >$25000</option><option value='$20000' >$20000</option><option value='$15000' >$15000</option><option value='$10000' >$10000</option><option value='$5000' >$5000</option></select></div></li><li id='field_7_9' class='gfield dv-form-textbox gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_9' >Make<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_text'><input name='input_9' id='input_7_9' type='text' value='' class='medium' tabindex='64' aria-required="true" aria-invalid="false" /></div></li><li id='field_7_10' class='gfield dv-form-textbox gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_10' >
2283Model<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_text'><input name='input_10' id='input_7_10' type='text' value='' class='medium' tabindex='65' aria-required="true" aria-invalid="false" /></div></li><li id='field_7_11' class='gfield dv-form-textbox field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_11' >Trim</label><div class='ginput_container ginput_container_text'><input name='input_11' id='input_7_11' type='text' value='' class='medium' tabindex='66' aria-invalid="false" /></div></li><li id='field_7_46' class='gfield dv-form-textbox field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_46' >Color</label><div class='ginput_container ginput_container_text'><input name='input_46' id='input_7_46' type='text' value='' class='medium' tabindex='67' aria-invalid="false" /></div></li><li id='field_7_12' class='gfield dv-form-textbox gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' >Transmission<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_radio'><ul class='gfield_radio' id='input_7_12'><li class='gchoice_7_12_0'><input name='input_12' type='radio' value='Automatic' id='choice_7_12_0' tabindex='68' /><label for='choice_7_12_0' id='label_7_12_0'>Automatic</label></li><li class='gchoice_7_12_1'><input name='input_12' type='radio' value='Manual' id='choice_7_12_1' tabindex='69' /><label for='choice_7_12_1' id='label_7_12_1'>Manual</label></li></ul></div></li><li id='field_7_47' class='gfield dv-form-textbox field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_47' >Message</label><div class='ginput_container ginput_container_textarea'><textarea name='input_47' id='input_7_47' class='textarea small' tabindex='70' aria-invalid="false" rows='10' cols='50'></textarea></div></li><li id='field_7_38' class='gfield gfield_html gfield_html_formatted gfield_no_follows_desc field_sublabel_below field_description_below gfield_visibility_visible' ></ul><ul></li><li id='field_7_39' class='gfield gfield_html gfield_html_formatted gfield_no_follows_desc field_sublabel_below field_description_below gfield_visibility_visible' ><div class="bottomsection">By submitting this form, you agree to be contacted with information regarding the vehicle you are searching for.</div></ul></li><li id='field_7_40' class='gfield hidden field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_40' >Referral ID</label></li><li id='field_7_51' class='gfield gform_validation_container field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_7_51' >Phone</label><div class='ginput_container'><input name='input_51' id='input_7_51' type='text' value='' /></div><div class='gfield_description' id='gfield_description__51'>This field is for validation purposes and should be left unchanged.</div></li> 2284 </ul></div> 2285 <div class='gform_footer left_label'> <input type='submit' id='gform_submit_button_7' class='gform_button button' value='Let us find it!' tabindex='71' onclick='if(window["gf_submitting_7"]){return false;} window["gf_submitting_7"]=true; ' onkeypress='if( event.keyCode == 13 ){ if(window["gf_submitting_7"]){return false;} window["gf_submitting_7"]=true; jQuery("#gform_7").trigger("submit",[true]); }' /> 2286 <input type='hidden' class='gform_hidden' name='is_submit_7' value='1' /> 2287 <input type='hidden' class='gform_hidden' name='gform_submit' value='7' /> 2288 2289 <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' /> 2290 <input type='hidden' class='gform_hidden' name='state_7' value='WyJbXSIsIjExNzhmZjIwMGMwYzVkM2UzYjE0NGUyMzc1MWQyNTczIl0=' /> 2291 <input type='hidden' class='gform_hidden' name='gform_target_page_number_7' id='gform_target_page_number_7' value='0' /> 2292 <input type='hidden' class='gform_hidden' name='gform_source_page_number_7' id='gform_source_page_number_7' value='1' /> 2293 <input type='hidden' name='gform_field_values' value='' /> 2294 2295 </div> 2296 <p class="gf-consent-text" style="margin-top: 12px; font-size:11px; color:#999B9F; line-height:1.1rem;">By submitting your information, you consent to receive communications from Max Motors, including SMS, voice calls, and/or emails, regarding our products, services, and promotional offers. These communications may be sent using automated technology. Consent is not a condition of purchase. Standard messaging and data rates may apply.</p><div class="dealer-disclaimer-container-class"></div><p style="display: none !important;"><label>Δ<textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js_1" name="ak_js" value="27"/>
2296<script>document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() );</script>
2296</p></form> 2297 </div></div></div> 2298 2299 2300 <style> 2301 .listing .vehicle-views .srp-views { 2302 top: 10px; 2303 right: 10px; 2304 } 2305 </style>
2305<script> 2306 function toggleMobileButton() { 2307 2308 var isMobile = window.innerWidth <= 768; 2309 var button = document.querySelector('.srp-cta-6-btn'); 2310 2311 if (!isMobile && button) { 2312 button.parentNode.removeChild(button); 2313 } 2314} 2315toggleMobileButton(); 2316window.onload = toggleMobileButton; 2317window.onresize = toggleMobileButton; 2318</script>
2318 2319 2320
2321<script> 2322 /** 2323 * The loading overlay needs a deadline as well as a success condition. 2324 * 2325 * This poll had no upper bound: if results never arrived - slow connection, 2326 * Algolia error, an exception thrown earlier on the page - it retried every 2327 * 100ms indefinitely and the overlay stayed up forever. Measured on prod 2328 * throttled to Slow 3G, results had still not rendered 90 seconds in and this 2329 * was still looping. 2330 * 2331 * It went unnoticed for so long only because .srpLoading was silently unstyled: 2332 * a Stylus indentation bug folded its declarations into a selector list, so 2333 * browsers dropped the entire rule and the overlay covered nothing. See the 2334 * note in media/css/srpCSS/algolia.styl. Now that the rule compiles, this is a 2335 * genuinely opaque full-viewport layer at z-index 999, and an unbounded wait 2336 * means a shopper stuck on a grey screen with no way past it. 2337 * 2338 * Revealing a half-built page is the better failure. The above-the-fold 2339 * controls are styled from algolia.css at first paint, so what shows through is 2340 * presentable even mid-load. 2341 * 2342 * Measured from performance.now() - milliseconds since navigation start - and 2343 * NOT from a Date.now() captured when this script runs. This block sits around 2344 * line 3,260 of an 8,800-line document, so on a slow connection it executes 2345 * many seconds after the overlay first paints; anchoring the deadline to script 2346 * execution would silently stretch it by however long the HTML took to get 2347 * here. The budget is a fixed span of page life, not that span measured from 2348 * whenever-this-parsed. 2349 * 2350 * Configurable at Theme Options -> Performance -> "Maximum time to show the 2351 * loading overlay". There is deliberately no switch to turn the deadline off: 2352 * unbounded is the bug it replaced. 2353 */ 2354 var SRP_LOADING_MAX_MS = 12000; 2355 2356 function checkForResults() { 2357 if ($("#srp-results .ais-Hits-item")[0] || $("#srp-results .srp-no-results").is(":visible")) { 2358 $(".srpLoading").remove(); 2359 } else if (performance.now() > SRP_LOADING_MAX_MS) { 2360 $(".srpLoading").remove(); 2361 } else { 2362 setTimeout(checkForResults, 100); 2363 } 2364 } 2365 2366 2367 checkForResults(); 2368 //Moroney Label Click Event - SRP 2369 function callWindowSticker(vin,year,make,model,condition) { 2370 if (String(make).toLowerCase() === 'kia' && String(condition).toLowerCase() === 'new') { 2371 if (window.AutoGoKiaWindowSticker) { 2372 window.AutoGoKiaWindowSticker.open(`/wp-json/dealer/v1/kia-window-sticker/${encodeURIComponent(vin)}`); 2373 } 2374 return false; 2375 } 2376 2377 let windowSticker = `https://api.toyotainventory.com/vehicles/${vin}/monroney`; 2378 2379 //SDIS Auth Token for Window Stickers 2380 $.ajax({ 2381 url: windowSticker, 2382 type: 'GET', 2383 beforeSend: function (xhr) { 2384 xhr.setRequestHeader('Authorization', 'Bearer RABWAGUAbgBvAG0AVABvAHkAbwB0AGEAMgAwADIAMgA='); 2385 }, 2386 }); 2387 2388 sd('dataLayer', { 2389 linkType: 'Monroney Label', 2390 vehicleDetails: { 2391 status: 'new', 2392 year: year, 2393 make: make, 2394 model: model, 2395 vin: vin, 2396 }, 2397 events: 'linkClick' 2398 }); 2399 sd('send'); 2400 } 2401</script>
2401 2402 2403
2404<script> 2405 /** 2406 * Begin Quick Form Event Listener Logic 2407 */ 2408 var $isVDP = jQuery("#fixed-info-container"); 2409 2410 function populateHiddenFields(formInstance) { 2411 if (typeof DVHydrate !== 'undefined') { 2412 DVHydrate.populateFormFields("#" + formInstance); 2413 } 2414 } 2415 2416 function getQuickFormCookies() { 2417 var cookies = {}; 2418 document.cookie.split(";").forEach(cookie => { 2419 var parts = cookie.trim().split("="); 2420 var name = parts[0]; 2421 var value = parts[1]; 2422 if (name.startsWith("quickFormUnlocked_")) { 2423 cookies[name] = value; 2424 } 2425 }); 2426 return cookies; 2427 } 2428 2429 function checkAndHideForms() { 2430 var cookies = getQuickFormCookies(); 2431 2432 if (Object.keys(cookies).length === 0) return; 2433 2434 2435 var $vdpContainer = jQuery("#fixed-info-container"); 2436 var isVDP = $vdpContainer.length > 0; 2437 2438 // Get the condition from the container 2439 var condition = isVDP ? 2440 $vdpContainer.data("vehicle-condition").toLowerCase() : 2441 jQuery(".listing").first().data("vehicle-condition").toLowerCase(); 2442
2443 // Check for condition-specific "all" cookie 2444 if (`quickFormUnlocked_all_${condition}` in cookies) { 2445 jQuery(".da-quick-form").remove(); 2446 jQuery(".da-quick-form-unlocked").show(); 2447 jQuery("#da-quick-form-unlocked").show(); 2448 jQuery("#vdp-pricingheader-container").remove(); 2449 return; 2450 } 2451 2452 if ($vdpContainer.length > 0) { 2453 // VDP logic 2454 var vin = $vdpContainer.data("vehicle-vin"); 2455 if (vin && "quickFormUnlocked_" + vin in cookies) { 2456 jQuery(".da-quick-form").remove(); 2457 } 2458 } else { 2459 // SRP logic 2460 jQuery(".da-quick-form").each(function() { 2461 var $form = jQuery(this); 2462 var $parentCard = $form.closest(".listing"); 2463 var vin = $parentCard.data("vehicleVin"); 2464 2465 if (vin && "quickFormUnlocked_" + vin in cookies) { 2466 $form.remove(); 2467 } 2468 }); 2469 } 2470 } 2471 2472 if($isVDP.length > 0) { 2473 checkAndHideForms(); 2474 } 2475 2476 const handleInventoryLoad = (event) => { 2477 jQuery(".da-quick-form").each(function() { 2478 var formId = jQuery(this).attr("id"); 2479 populateHiddenFields(formId); 2480 }); 2481 }; 2482 2483 window.addEventListener("Inventory:loaded_srp", () => { 2484 handleInventoryLoad(); 2485 checkAndHideForms(); 2486 2487 jQuery("#srp-filters, #pagination-top, #pagination-bottom, #filterTags, #srp-filters-reset-btn, #dv-srp-clear-filters, #clearSearchResults, #showFiltersNonLegacy, .ais-Pagination-link, .ais-Pagination").click(function(){ 2488 checkAndHideForms(); 2489 }); 2490 }); 2491 2492 window.addEventListener("Inventory:loaded_vdp", handleInventoryLoad); 2493 2494 /** 2495 * e/o: Begin Quick Form Event Listener Logic 2496 */ 2497</script>
2497 2498 2499<!-- Pinned to the exact version @2 resolves to today. The stale-search 2500 canceller below assumes this version's axios/XHR transport; a CDN-resolved 2501 minor that swapped in the fetch adapter would silently disable it. The 2502 pin is also what makes integrity possible - a floating @2 changes bytes 2503 by design, so it could never carry one. Hash is sha384 of the 145,726-byte 2504 2.9.0 dist, same treatment as the instantsearch tag below. -->
2505<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/typesense-instantsearch-adapter.min.js" integrity="sha384-B47IWeyyh8xnZkeL6rPg51tYX2fWwgI6CbkJN8BYp3VKHngE3hM/2Bqn8JTE8c92" crossorigin="anonymous"></script>
vendor: 1 bytes, line 2505
2505
2506<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.production.min.js" integrity="sha256-r9HX5YzBrppuVpgfMA3USvgS2jEdIBPJ3ntsidyTNl8=" crossorigin="anonymous"></script>
vendor: 1 bytes, line 2506
2506
2507<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/jquery.formatCurrency-1.4.0.min.js?v=1.598.636"></script>
vendor: 1 bytes, line 2507
2507
2508<script defer src="https://www.youtube.com/iframe_api"></script>
vendor: 1 bytes, line 2508
2508
2509<script> 2510 var srpCondition = "New"; 2511 var indexName = "vehicles-GRP00034"; 2512 var cityState = ", Missouri"; 2513 var isNexusToyota = ""; 2514 var isNexusHonda = ""; 2515 var isNexusAcura = ""; 2516 var isNexusEnabled = "1"; 2517 var dealerRegion = ""; 2518 var distanceUnit = "Mile"; 2519 var haveSdAnalytics = false; 2520 var searchChangedTimer = null; 2521 var lastSdSearchStateSignature = null; 2522 var lastSdFacetStateSignature = null; 2523 var sdInitialFilterSearchSent = false; 2524 var sdFormShownPending = false; 2525 2526 /** 2527 * "formInitiation already sent for the currently shown form". 2528 * 2529 * Module scope on purpose. This was a `var formInitHandled = false` declared 2530 * inside the no-results branch, immediately before binding the click handler - 2531 * so every run of that branch bound another handler, and each one closed over 2532 * its own copy of the flag. After N no-result renders a single click ran N 2533 * handlers, every one of them believing it was the first, and sent N 2534 * formInitiation events. That was duplicated analytics, not just wasted work. 2535 * 2536 * Still reset where the original was, so the semantics are unchanged: one 2537 * initiation per form shown. 2538 */ 2539 var sdFormInitHandled = false; 2540 2541 /** 2542 * A query-only search owes Shift Digital a pageview and filterSearch on top 2543 * of typedSearch, and typedSearch has to land first. 2544 * 2545 * The render for a keystroke arrives long before the 800ms typedSearch 2546 * debounce, so the render only marks the send as pending and the debounce 2547 * flushes it. The timer is the fallback for query changes with no typing 2548 * behind them - the clear-search and reset buttons call setQuery('') - which 2549 * would otherwise leave the flag pending forever. 2550 */ 2551 var lastSdQuery = null; 2552 var sdQueryAnalyticsPending = false; 2553 var sdQueryAnalyticsTimer = null; 2554 var currentRefinements = {}; 2555 var vehiclesList = []; 2556 let userInteractedWithFacets = false; 2557 var srpDealerId = "GRP00034"; 2558 var dealerGroupSite = "GRP"; 2559 2560 const showConditionalIncentives = ""; 2561 2562 //Homepage/Menu Link Model Map for correct facetting 2563 const modelFormatMap = { 2564 'bz4x': 'bZ4X', 2565 'rav4': 'RAV4', 2566 '4runner': '4Runner', 2567 'i-force': 'Tundra i-FORCE MAX', 2568 'tundra i-force max': 'Tundra i-FORCE MAX', 2569 'hr-v': 'HR-V', 2570 'cr-v': 'CR-V', 2571 'hr-v hybrid': 'HR-V Hybrid', 2572 'cr-v hybrid': 'CR-V Hybrid', 2573 'gr86': 'GR86', 2574 'rav4 prime': 'RAV4 Prime', 2575 'rav4 hybrid': 'RAV4 Hybrid', 2576 'titan xd': 'Titan XD', 2577 'gt-r': 'GT-R', 2578 'leaf': 'LEAF', 2579 'es': 'ES', 2580 'is': 'IS', 2581 'is 500': 'IS 500', 2582 'ls': 'LS', 2583 'es hybrid': 'ES Hybrid', 2584 'lc hybrid': 'LC Hybrid', 2585 'ls hybrid': 'LS Hybrid', 2586 'nx hybrid': 'NX Hybrid', 2587 'nx phev': 'NX PHEV', 2588 'rx phev': 'RX PHEV', 2589 'rx hybrid': 'RX Hybrid', 2590 'ux hybrid': 'UX Hybrid', 2591 'gx': 'GX', 2592 'lx': 'LX', 2593 'nx': 'NX', 2594 'rx': 'RX', 2595 'ux': 'UX', 2596 'lc convertible': 'LC Convertible', 2597 'rc': 'RC', 2598 'rc f': 'RC F', 2599 'lc': 'LC', 2600 'rz': 'RZ', 2601 'tx': 'TX', 2602 'tx phev': 'TX PHEV', 2603 'tx 500h': 'TX 500h', 2604 'ux phev': 'UX PHEV', 2605 'i4': 'i4', 2606 'i5': 'i5', 2607 'i7': 'i7', 2608 'ix': 'iX', 2609 'adx': 'ADX', 2610 'mdx': 'MDX', 2611 'rdx': 'RDX', 2612 'tlx': 'TLX', 2613 'zdx': 'ZDX', 2614 'sierra ev': 'Sierra EV', 2615 'sierra hd': 'Sierra HD', 2616 'hummer ev pickup': 'Hummer EV Pickup', 2617 'hummer ev suv': 'Hummer EV SUV', 2618 'yukon xl': 'Yukon XL', 2619 'outlander phev': 'Outlander PHEV', 2620 'gla': 'GLA', 2621 'glb': 'GLB', 2622 'glc': 'GLC', 2623 'gle': 'GLE', 2624 'gls': 'GLS', 2625 'glc coupe': 'GLC Coupe', 2626 'gle coupe': 'GLE Coupe', 2627 'gls coupe': 'GLS Coupe', 2628 'g-class': 'G-Class', 2629 'c-class': 'C-Class', 2630 'c-class sedan': 'C-Class Sedan', 2631 'e-class': 'E-Class', 2632 'e-class sedan': 'E-Class Sedan', 2633 's-class': 'S-Class', 2634 's-class sedan': 'S-Class Sedan', 2635 'eqb': 'EQB', 2636 'eqc': 'EQC', 2637 'eqe': 'EQE', 2638 'eqs': 'EQS', 2639 'eqs suv': 'EQS SUV', 2640 'cla': 'CLA', 2641 'c-class cabriolet': 'C-Class Cabriolet', 2642 'amg®': 'AMG®', 2643 'amg® gt': 'AMG® GT', 2644 }; 2645 2646 function formatModelName(model) { 2647 const lowerCaseModel = model.toLowerCase(); 2648 if (modelFormatMap[lowerCaseModel]) { 2649 return modelFormatMap[lowerCaseModel]; 2650 } else { 2651 const words = model.split(' '); 2652 return words.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' '); 2653 } 2654 } 2655
2656 /** 2657 * Build the page title from the current selected refinements 2658 */ 2659 function buildTitle(refinementList) 2660 { 2661 let titleString = ""; 2662 let modelString = ""; 2663 let bodyString = ""; 2664 let condition = srpCondition; 2665 let vehicleHistoryString = ""; 2666 2667 currentRefinements = refinementList; 2668 2669 if(refinementList.body && condition == 'New'){ 2670 if(refinementList.body.length == 1){ 2671 titleString = "Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford" + " " + refinementList.body[0] + " Models"; 2672 } else{ 2673 for( var bod in refinementList.body) 2674 { 2675 bodyString += " " + refinementList.body[bod] + ","; 2676 titleString = "Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford" + " " + bodyString + " Models"; 2677 } 2678 } 2679 return titleString; 2680 } 2681 2682 if(refinementList.body && condition == 'Used'){ 2683 if(refinementList.body.length == 1){ 2684 titleString = refinementList.body[0] + " Models"; 2685 } else{ 2686 for( var bod in refinementList.body) 2687 { 2688 bodyString += " " + refinementList.body[bod] + ","; 2689 titleString = bodyString + " Models"; 2690 } 2691 } 2692 return titleString; 2693 } 2694 2695 if (refinementList.make && refinementList.make.length == 1) 2696 { 2697 2698 if(refinementList.body && condition == 'Used'){ 2699 if(refinementList.body.length == 1){ 2700 titleString = refinementList.make + " " + refinementList.body[0] + " Models"; 2701 } else{ 2702 for( var bod in refinementList.body) 2703 { 2704 bodyString += " " + refinementList.body[bod] + ","; 2705 } 2706 for( var make in refinementList.make) 2707 { 2708 makeString += " " + refinementList.make[make] + ","; 2709 2710 } 2711 titleString = makeString + " " + bodyString + " Models"; 2712 2713 } 2714 return titleString; 2715 } 2716 2717 if (refinementList.model && refinementList.model.length == 1) 2718 { 2719 titleString = refinementList.make[0] + " " + refinementList.model[0] + " Vehicles"; 2720 2721 return titleString; 2722 } 2723 else if (refinementList.model) 2724 { 2725 for (var model in refinementList.model) 2726 { 2727 titleString += " " + refinementList.model[model] + ","; 2728 } 2729 2730 return titleString; 2731 } 2732 else 2733 { 2734 titleString = refinementList.make[0] + " Models"; 2735 return titleString; 2736 } 2737 } 2738 else if (refinementList.make) 2739 { 2740 if (refinementList.model) 2741 { 2742 if (refinementList.model.length == 1) 2743 { 2744 titleString += " " + refinementList.model[0]; 2745 } 2746 else 2747 { 2748 for (var model in refinementList.model) 2749 { 2750 titleString += " " + refinementList.model[model] + ","; 2751 } 2752 } 2753 2754 titleString += " Models"; 2755 2756 return titleString; 2757 } 2758 for (var make in refinementList.make) 2759 { 2760 titleString += " " + refinementList.make[make] + ","; 2761 } 2762 2763 titleString += " Models"; 2764 2765 return titleString; 2766 } 2767 else{ 2768 if(refinementList.model){ 2769 2770 if (refinementList.model.length == 1) 2771 { 2772 modelString += " " + refinementList.model[0]; 2773 } 2774 else 2775 { 2776 for (var model in refinementList.model) 2777 { 2778 modelString += " " + refinementList.model[model] + ","; 2779 } 2780 } 2781 if(condition == 'Used'){ 2782 titleString += " " + modelString + " Models"; 2783 } else{ 2784 titleString += "Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford" + " " + modelString + " Models"; 2785 } 2786 return titleString; 2787 } 2788 } 2789 2790 //Build Title for Vehicle History 2791 if(refinementList.vehicleHistory && condition == "Used") 2792 { 2793 if(refinementList.vehicleHistory.length == 1) 2794 { 2795 titleString = refinementList.vehicleHistory[0] + " Models"; 2796 } 2797 else 2798 { 2799 for (var bod in refinementList.vehicleHistory) 2800 { 2801 vehicleHistoryString += " " + refinementList.vehicleHistory[bod] + ","; 2802 } 2803 titleString = vehicleHistoryString + " Models"; 2804 } 2805 return titleString; 2806 } 2807 2808 //Build title for flags.type 2809 if (refinementList["flags.type"] && refinementList["flags.type"].length > 0) { 2810 let flagsTypeString = ""; 2811 2812 if (refinementList["flags.type"].length === 1) { 2813 titleString = refinementList["flags.type"][0] + " Models"; 2814 } else { 2815 for (let i = 0; i < refinementList["flags.type"].length; i++) { 2816 flagsTypeString += refinementList["flags.type"][i] + ", "; 2817 } 2818 flagsTypeString = flagsTypeString.slice(0, -2); 2819 titleString = flagsTypeString + " Models"; 2820 } 2821 2822 return titleString; 2823 } 2824 2825 2826 return "Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford Vehicles"; 2827 } 2828
2829 //Build meta description for SRP filters 2830 function buildDescription(refinementList){ 2831 2832 modelString = ""; 2833 makeString = ""; 2834 featureString = ""; 2835 fuelString = ""; 2836 colorString = ""; 2837 bodyString = ""; 2838 trimString = ""; 2839 2840 currentRefinements = refinementList 2841 2842 if(refinementList.body && refinementList.features){ 2843 if(refinementList.body.length == 1 && refinementList.features.length == 1){ 2844 bodyString += "" + refinementList.body[0] + "s"; 2845 featureString +="" + refinementList.features[0] + " "; 2846 } else{ 2847 for( var bod in refinementList.body) 2848 { 2849 bodyString += " " + refinementList.body[bod] + "s,"; 2850 } 2851 2852 for( var feat in refinementList.features) 2853 { 2854 featureString += " " + refinementList.features[feat] + ", "; 2855 } 2856 } 2857 2858 let newDesc = `Shop ${srpCondition} ${bodyString} with ${featureString}in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 2859 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 2860 2861 } 2862 2863 if(refinementList.model){ 2864 2865 if(srpCondition == "New"){ 2866 2867 if( refinementList.model.length >= 1 ){ 2868 2869 if (refinementList.model.length == 1) 2870 { 2871 modelString += " " + refinementList.model[0]; 2872 } 2873 else 2874 { 2875 for (var model in refinementList.model) 2876 { 2877 modelString += " " + refinementList.model[model] + ","; 2878 } 2879 2880 } 2881 2882 if(refinementList.features){ 2883 if(refinementList.features.length == 1){ 2884 featureString += "" + refinementList.features[0]; 2885 } else{ 2886 for( var feat in refinementList.features) 2887 { 2888 featureString += " " + refinementList.features[feat] + ","; 2889 } 2890 } 2891 2892 let newDesc = `Shop ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford ${modelString} vehicles with ${featureString} in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 2893 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 2894 } 2895 2896 if(refinementList.fuel){ 2897 fuelString += " " + refinementList.fuel[0]; 2898 let newDesc = `Shop ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford ${modelString} ${fuelString} vehicles in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 2899 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 2900 } 2901 2902 if(refinementList.generic_color){ 2903 if(refinementList.generic_color.length == 1){ 2904 colorString += " " + refinementList.generic_color[0] + " "; 2905 }else{ 2906 for( var color in refinementList.generic_color) 2907 { 2908 colorString += " " + refinementList.generic_color[color] + ","; 2909 } 2910 } 2911 2912 let newDesc = `Shop ${srpCondition} ${colorString} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford ${modelString} vehicles in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 2913 2914 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc) 2915 } 2916 2917 if(refinementList.trim){ 2918 if(refinementList.trim.length == 1){ 2919 trimString += "" + refinementList.trim[0]; 2920 } else{ 2921 for( var feat in refinementList.trim) 2922 { 2923 trimString += " " + refinementList.trim[feat] + ","; 2924 } 2925 } 2926 2927 let newDesc = `Shop ${srpCondition}
2927 ${modelString} in ${trimString} trim levels in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 2928 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 2929 } 2930 2931 let newDesc = `Shop ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford ${modelString} vehicles in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}`; 2932 2933 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc) 2934 2935 } 2936 } 2937 } 2938 if (refinementList.make){ 2939 2940 2941 if(refinementList.make.length == 1){ 2942 makeString += " " + refinementList.make[0]; 2943 2944 } 2945 else 2946 { 2947 2948 for (var make in refinementList.make) 2949 { 2950 makeString += " " + refinementList.make[make] + ","; 2951 } 2952 } 2953 2954 if(refinementList.features){ 2955 if(refinementList.features.length == 1){ 2956 featureString += " " + refinementList.features[0]; 2957 } else{ 2958 for( var feat in refinementList.features) 2959 { 2960 featureString += " " + refinementList.features[feat] + ","; 2961 } 2962 } 2963 2964 let newDesc = `Shop ${srpCondition} ${makeString} vehicles with${featureString} in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 2965 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 2966 } 2967 2968 if(refinementList.fuel){ 2969 fuelString += " " + refinementList.fuel[0]; 2970 let newDesc = `Shop ${srpCondition} ${makeString} ${fuelString} vehicles in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 2971 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 2972 } 2973 2974 if(refinementList.generic_color){ 2975 if(refinementList.generic_color.length == 1){ 2976 colorString += " " + refinementList.generic_color[0] + " "; 2977 }else{ 2978 for( var color in refinementList.generic_color) 2979 { 2980 colorString += " " + refinementList.generic_color[color] + ","; 2981 } 2982 } 2983 2984 let newDesc = `Shop ${srpCondition} ${colorString} ${makeString} vehicles in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 2985 2986 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc) 2987 } 2988 2989 2990 if(refinementList.body){ 2991 if(refinementList.body.length == 1){ 2992 bodyString += "" + refinementList.body[0] + "s"; 2993 } else{ 2994 for( var feat in refinementList.body) 2995 { 2996 bodyString += " " + refinementList.body[feat] + "s,"; 2997 } 2998 } 2999 3000 let newDesc = `Shop ${srpCondition} ${makeString} ${bodyString} in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 3001 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 3002 } 3003 3004 3005 let newDesc = `Shop ${srpCondition} ${makeString} vehicles in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 3006 3007 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc) 3008 3009 3010 } 3011 3012 if(refinementList.genericColor){ 3013 if(refinementList.genericColor.length == 1){ 3014 colorString += " " + refinementList.genericColor[0] + " "; 3015 }else{ 3016 for( var color in refinementList.genericColor) 3017 { 3018 colorString += " " + refinementList.genericColor[color] + ","; 3019 } 3020 } 3021 3022 let newDesc = `Shop ${srpCondition} ${colorString} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford vehicles in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}`; 3023 3024 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc) 3025 } 3026 3027 if(refinementList.fuel){ 3028 fuelString += " " + refinementList.fuel[0]; 3029 let newDesc = `Shop ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford ${fuelString} vehicles in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 3030 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 3031 } 3032 3033 if(refinementList.features){ 3034 if(refinementList.features.length == 1){ 3035 featureString += "" + refinementList.features[0]; 3036 } else{ 3037 for( var feat in refinementList.features) 3038 { 3039 featureString += " " + refinementList.features[feat] + ","; 3040 } 3041 } 3042 3043 let newDesc = `Shop ${srpCondition}
3043 Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford ${modelString} vehicles with ${featureString} in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 3044 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 3045 } 3046 3047 if(refinementList.body){ 3048 if(refinementList.body.length == 1){ 3049 bodyString += "" + refinementList.body[0] + "s"; 3050 } else{ 3051 for( var feat in refinementList.body) 3052 { 3053 bodyString += " " + refinementList.body[feat] + "s,"; 3054 } 3055 } 3056 3057 let newDesc = `Shop ${srpCondition} ${bodyString} in Stock and Online today at Max Motors, ${srpCondition} Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford dealership in ${cityState}` 3058 return document.querySelector('meta[name="description"]').setAttribute("content", newDesc); 3059 } 3060 3061 return 3062 3063 } 3064 3065 /** 3066 * Trigger Inventory Loaded Event 3067 */ 3068 function _triggerInventoryLoaded() { 3069 const event = new Event('Inventory:loaded_srp'); 3070 window.dispatchEvent(event); 3071 } 3072 3073 /** 3074 * Search for Smart Path Disclaimer Function 3075 * @author layth abdelqader 3076 * @param {string} text - text to filter by 3077 * @param {string} cname - class name of element 3078 */ 3079 function SmartPathDisclaimer(text, cname) { 3080 // set up replacement fn 3081 var doReplacement = function(interval) { 3082 // clear interval 3083 clearInterval(interval); 3084 // lets start the loop and find all classnames/text that match 3085 const container = [...document.querySelectorAll(cname)]; 3086 for (let i = 0; i < container.length; i++) { 3087 var classListing = [...container[i].classList]; 3088 if (container[i].textContent.includes(text) && container[i].textContent.includes("transit")) 3089 { 3090 if(!container[i].textContent.includes(text + ':')){ 3091 container[i].innerHTML = container[i].innerHTML.replace(text, "<strong>
3091" + text + ':' + "</strong>"); 3092 } 3093 } else if (container[i].textContent.includes(text) && container[i].textContent.includes("build phase")) { 3094 if(!container[i].textContent.includes(text + ':')){ 3095 container[i].innerHTML = container[i].innerHTML.replace(text, "<strong>" + text + ':' + "</strong>"); 3096 } 3097 } else if (container[i].textContent.includes(text)) { 3098 container[i].innerHTML = container[i].innerHTML.replace(text, "<strong>" + text + "</strong>"); 3099 } else { 3100 container[i].classList.remove( 3101 "dv-sp-disclaimer-strong" 3102 ); 3103 } 3104 } 3105 }; 3106 // set up interval and wait for dgdatahub to load 3107 var interval = setInterval(function () { 3108 if (window.DGDataHub != undefined) { 3109 if (typeof window.DGDataHub.getWarningState !== "undefined" && window.DGDataHub.getWarningState().dgLoaded) { 3110 doReplacement(interval) 3111 } 3112 } 3113 }, 200); 3114 } 3115 3116 /** 3117 * Search highlighting is computed, transferred and parsed, then thrown away. 3118 * 3119 * The adapter defaults highlight_full_fields to the whole query_by list, so 3120 * every response carries per-hit highlight blocks for all sixteen fields. 3121 * Nothing reads them: no template in this file touches _highlightResult, 3122 * and never has. Both highlight knobs are set to "none" below: the adapter 3123 * injects highlight_full_fields on its own, which of the two wins is 3124 * decided server-side, and naming both removes the doubt for free. 3125 * 3126 * Sized honestly before assuming it mattered: on the live i95 collection 3127 * the highlight blocks are about 1% of a 428KB keystroke response, because 3128 * the weight is the documents themselves - imageUrls is 48% of a 25KB hit 3129 * and conditionalIncentives another 32%, and both are genuinely rendered, 3130 * so neither can be excluded. This trim is kept because it is free and 3131 * strictly correct - the server skips work nobody consumes - not because 3132 * it moves the needle. Anyone tempted to chase response size further: 3133 * measure the per-field split first, and note that the transfer was never 3134 * what blocked the main thread - the re-render is. 3135 * 3136 * Gated on Theme Options -> Performance -> "Skip unused search highlighting" 3137 * because a dealer's custom runtime JS (srp-js-function-render-runtime) 3138 * could in principle read _highlightResult even though the theme does not. 3139 * ?da-search-payload=full restores the old payload for one request, which 3140 * is the way to test that theory on a live dealer before flipping the switch. 3141 */ 3142 var daTrimSearchPayload = true && new URLSearchParams(window.location.search).get('da-search-payload') !== 'full'; 3143 3144 /** 3145 * Cancel a search the moment a newer one supersedes it. 3146 * 3147 * Michael's idea, confirmed by measurement on Slow 4G: typing "tundra" at 3148 * a normal cadence put EIGHT multi_search requests in flight at once. The 3149 * first two responses ate the whole link (444KB), "tun" through "tundra" 3150 * all hit the client's 5s timeout, were retried, and timed out again - so 3151 * the page settled with the box saying "tundra" and the results showing 3152 * "tu". On a slow connection the stale downloads do not just waste 3153 * transfer, they starve the one query the user actually wants and leave 3154 * wrong results on screen. 3155 * 3156 * The adapter's client sends via axios/XHR, which complicates the obvious 3157 * fix: a bare xhr.abort() fires the error path, axios rejects, and 3158 * typesense-js treats that as a node failure and RETRIES - recreating the 3159 * storm this exists to prevent. So a superseded request is silenced 3160 * before it is aborted: every handler axios attached is stripped, then 3161 * the native abort runs. Axios never learns; its promise simply never 3162 * settles; the retry logic never fires. InstantSearch orders responses by 3163 * query id, so the never-answered request was never going to render 3164 * anyway. 3165 * 3166 * Fast connections are unaffected in practice: responses return in 3167 * ~250ms and are done before the next keystroke, so there is rarely 3168 * anything in flight to cancel. 3169 */ 3170 var daCancelStaleSearch = true && new URLSearchParams(window.location.search).get('da-cancel-stale-search') !== 'off'; 3171 3172 /** 3173 * Arm content-visibility on the result cards (rule in algolia.css, gated 3174 * on this class so the flag lives here with the other Performance flags). 3175 * Off-screen cards then skip style recalculation and layout entirely on 3176 * each render - the two largest named costs in the keystroke trace after 3177 * the render itself. See the comment block in algolia.styl for numbers. 3178 */ 3179 if (true && new URLSearchParams(window.location.search).get('da-content-visibility') !== 'off') { 3180 document.documentElement.classList.add('da-cv'); 3181 } 3182 3183 // The header that marks a request as this SRP's own. Sent by the adapter's 3184 // client (below) and recognised by the canceller; nothing else uses it. 3185 var DA_SRP_SEARCH_HEADER = 'X-DA-SRP-Search'; 3186 3187 if (daCancelStaleSearch) { 3188 (function () { 3189 var inFlight = null; 3190 3191 /** 3192 * Ownership is carried by the request itself, not inferred. 3193 * 3194 * Keying on '/multi_search' alone claimed EVERY Typesense client on 3195 * the page - the inventory-widget shortcode builds its own adapter, 3196 * and one slot shared between it and the SRP meant each aborted the 3197 * other's requests. A silenced request never settles its promise, 3198 * so the loser hung forever: the widget spinning, or the SRP stuck 3199 * in stalled with stale results. 3200 * 3201 * A timing-based claim (a ticket raised beside each search call) 3202 * only narrowed that: our XHR opens several microtasks after the 3203 * call, so a request already mid-chain in another adapter could 3204 * drain the ticket first and invert ownership, and typesense-js 3205 * schedules its retries on a timer, which left every retry 3206 * unclaimable. Both go away if the request announces itself: the 3207 * SRP's client sends DA_SRP_SEARCH_HEADER (see the adapter's server 3208 * config), no other client on the page does, and a retry re-sends 3209 * the same headers. 3210 * 3211 * The header costs no round trips. These requests already carry 3212 * x-typesense-api-key and a JSON content type, so they are already 3213 * preflighted; the endpoint was measured to reflect an arbitrary 3214 * requested header back in access-control-allow-headers, with 3215 * access-control-max-age 3600. 3216 */ 3217 var nativeSend = XMLHttpRequest.prototype.send; 3218 var nativeAbort = XMLHttpRequest.prototype.abort; 3219 var nativeAdd = XMLHttpRequest.prototype.addEventListener; 3220 var nativeRem = XMLHttpRequest.prototype.removeEventListener; 3221 var nativeHeader = XMLHttpRequest.prototype.setRequestHeader; 3222 3223 XMLHttpRequest.prototype.setRequestHeader = function (name, value) { 3224 if (String(name).toLowerCase() === DA_SRP_SEARCH_HEADER.toLowerCase()) { 3225 this.__daSearch = true; 3226 this.__daHandlers = []; 3227 } 3228 return nativeHeader.apply(this, arguments); 3229 }; 3230
3231 // Record what axios attaches to a search request, so it can all be 3232 // detached at supersede time. Non-search requests skip the 3233 // bookkeeping entirely. 3234 XMLHttpRequest.prototype.addEventListener = function (type, fn, opts) { 3235 if (this.__daSearch && this.__daHandlers) { 3236 this.__daHandlers.push([type, fn, opts]); 3237 } 3238 return nativeAdd.apply(this, arguments); 3239 }; 3240 3241 function silence(xhr) { 3242 (xhr.__daHandlers || []).forEach(function (h) { 3243 try { nativeRem.call(xhr, h[0], h[1], h[2]); } catch (e) {} 3244 }); 3245 xhr.__daHandlers = null; 3246 // Older axios wires the on* properties instead of listeners. 3247 xhr.onreadystatechange = xhr.onload = xhr.onerror = null; 3248 xhr.onabort = xhr.ontimeout = xhr.onloadend = xhr.onprogress = null; 3249 try { nativeAbort.call(xhr); } catch (e) {} 3250 } 3251 3252 XMLHttpRequest.prototype.send = function () { 3253 if (this.__daSearch) { 3254 if (inFlight && inFlight !== this) { 3255 silence(inFlight); 3256 } 3257 inFlight = this; 3258 3259 var self = this; 3260 // Attached via the native path so silence() cannot strip it. 3261 nativeAdd.call(this, 'loadend', function () { 3262 if (inFlight === self) { inFlight = null; } 3263 }); 3264 } 3265 return nativeSend.apply(this, arguments); 3266 }; 3267 })(); 3268 } 3269 3270 const typesenseAdapter = new TypesenseInstantSearchAdapter({ 3271 server: { 3272 apiKey: "eQUa8iq30l8Tu908Drz9WKqar6tCJGd4", 3273 nodes: [{ 3274 host: 'hjnrb3s21408ezpfp.a1.typesense.net', 3275 port: 443, 3276 protocol: 'https' 3277 }], 3278 // Marks this client's requests for the stale-search canceller 3279 // above, retries included. Sent only when cancellation is on, so a 3280 // dealer with the switch off sends exactly the old request. 3281 additionalHeaders: daCancelStaleSearch 3282 ? (function () { var h = {}; h[DA_SRP_SEARCH_HEADER] = '1'; return h; })() 3283 : {}, 3284 cacheSearchResultsForSeconds: 2 * 60, 3285 }, 3286 additionalSearchParameters: Object.assign({ 3287 query_by: "vin,stockNumber,lastEight,year,make,model,trim,exteriorColor,body,features,engine,transmission,drivetrain,fuel,genericColor,dealertag" 3288 }, daTrimSearchPayload ? { highlight_fields: "none", highlight_full_fields: "none" } : {}) 3289 }); 3290 3291const searchClient = typesenseAdapter.searchClient; 3292 3293 3294 /** 3295 * Hold result RENDERING until typing pauses. The search itself is not 3296 * delayed - this is the other half of the story the render split started. 3297 * 3298 * The field reports that prompted it (2026-08-21, three iPhone users, 3299 * independently): results arrive fast, but LETTERS appear late. The trace 3300 * agrees: each keystroke's re-render occupies the main thread for roughly 3301 * two seconds on a phone (InstantSearch rebuild + style recalculation 3302 * across ~16,000 elements on live i95), so the NEXT keypress cannot paint 3303 * until the previous render finishes. One user narrated the mechanism 3304 * without knowing it: "once filter(0) is reached, the lag is gone so live 3305 * filtering seems to be lagging input." 3306 * 3307 * So: while keys arrive faster than the settle delay, the queryHook holds 3308 * the QUERY too (see the BURST ADDENDUM there: calling search() moves the 3309 * helper's state and re-renders every widget, main-thread work that the 3310 * gated render handler cannot avoid), and this wrapper holds any RESPONSE 3311 * still in flight when typing resumes. While the user types, nothing 3312 * renders and every keystroke echoes instantly; the moment they pause,
3313 * exactly one search fires and its response renders on arrival. On a slow 3314 * connection that is one round trip after the pause - the accepted price 3315 * of the burst hold, kept honest by cancel-stale above so nothing stale 3316 * competes with it. 3317 * 3318 * Two guards keep it to exactly ONE render per pause: 3319 * - cancel-stale above kills superseded requests at the network layer; 3320 * - the sequence check here refuses to deliver any response that is no 3321 * longer the newest, covering dealers with cancel-stale switched off. 3322 * A refused response returns a promise that never settles, which is also 3323 * how cancel-stale silences axios - InstantSearch's own query 3324 * ordering means it was never going to render anyway. 3325 * 3326 * Quiet threshold shares DA_SETTLE_MS (Theme Options -> Performance -> 3327 * settle delay) so there is one tuning knob for "typing has paused". 3328 */ 3329 var daRenderOnSettle = true && new URLSearchParams(window.location.search).get('da-render-on-settle') !== 'off'; 3330 3331 /** 3332 * -Infinity, not 0: performance.now() starts near zero at page load, so a 3333 * zero here read as "typed just now" for the first DA_SETTLE_MS of page 3334 * life and held the bootstrap render behind whenQuiet() on warm loads. 3335 */ 3336 var daLastTypeAt = -Infinity; 3337 3338 /** 3339 * True while the shopper is mid-burst in the search box. Shared by the 3340 * response hold below and onRenderHandler: while this is true, responses 3341 * are parked, so a render event can only be a loading-state churn against 3342 * results that cannot have changed - and both halves of the handler skip. 3343 */ 3344 function daTypingActive() { 3345 var quiet = (typeof DA_SETTLE_MS === 'number') ? DA_SETTLE_MS : 250; 3346 return (performance.now() - daLastTypeAt) < quiet; 3347 } 3348 3349 if (daRenderOnSettle) { 3350 document.addEventListener('input', function (e) { 3351 if (e.target && e.target.classList && e.target.classList.contains('ais-SearchBox-input')) { 3352 daLastTypeAt = performance.now(); 3353 } 3354 }, true); 3355 3356 (function () { 3357 var seq = 0; 3358 3359 function quietMs() { 3360 return (typeof DA_SETTLE_MS === 'number') ? DA_SETTLE_MS : 250; 3361 } 3362 3363 function whenQuiet(isStale) { 3364 return new Promise(function (resolve) { 3365 (function check() { 3366 // A superseded caller stops polling right away: its 3367 // .then below discards the result, and resolving now 3368 // releases the response object this promise chain was 3369 // pinning (~428KB per keystroke on live i95) instead 3370 // of reforging the closure until typing stops. 3371 if (isStale()) { 3372 resolve(); 3373 return; 3374 } 3375 var since = performance.now() - daLastTypeAt; 3376 if (since >= quietMs()) { 3377 resolve(); 3378 } else { 3379 setTimeout(check, Math.max(16, quietMs() - since)); 3380 } 3381 })(); 3382 }); 3383 } 3384 3385 var origSearch = searchClient.search.bind(searchClient); 3386 3387 searchClient.search = function (requests) { 3388 var mySeq = ++seq; 3389 3390 return origSearch(requests).then(function (res) { 3391 if (mySeq !== seq) { 3392 return new Promise(function () {}); 3393 } 3394 return whenQuiet(function () { return mySeq !== seq; }).then(function () { 3395 if (mySeq !== seq) { 3396 return new Promise(function () {}); 3397 } 3398 return res; 3399 }); 3400 }); 3401 }; 3402 })(); 3403 } 3404function getSrpWindowTitle(refinementList) { 3405 if (!refinementList) { 3406 return srpCondition + " Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford Vehicles in " + cityState; 3407 } 3408 3409 return srpCondition + " " + buildTitle(refinementList) + " in " + cityState; 3410} 3411 3412function syncSrpSeoState(refinementList) { 3413 $("h1").text(getSrpWindowTitle(refinementList)); 3414 3415 if (refinementList) { 3416 buildDescription(refinementList); 3417 } 3418} 3419 3420const daSrpRouter = instantsearch.routers.history({ 3421 /** 3422 * One history entry per settled search, not one per keystroke. 3423 * 3424 * The router calls history.pushState on every UI-state write, and the 3425 * default 400ms writeDelay is shorter than the gap between keystrokes 3426 * for most people - so typing a six-letter model name pushed six 3427 * entries. That is six Back presses to leave the page, and it walks 3428 * straight at WebKit's history-call rate limit (~100 per 30s, past 3429 * which Safari throws a SecurityError). 1000ms collapses a typed word
3430 * into one or two entries; refinement clicks are spaced well past a 3431 * second apart, so facet navigation keeps an entry per click exactly 3432 * as before. 3433 * 3434 * The debounce has a hole the pagehide flush below plugs: the router 3435 * never flushes a pending write when the page is left, so a shopper 3436 * who filtered and tapped a vehicle inside one writeDelay would come 3437 * Back to an SRP that had forgotten the filter. True at the default 3438 * 400ms too; a full second just made it easy to hit. 3439 */ 3440 writeDelay: 1000, 3441 windowTitle: function windowTitle(routeState) { 3442 syncSrpSeoState(routeState.refinementList); 3443 3444 return getSrpWindowTitle(routeState.refinementList); 3445 }, 3446 createURL: function createURL({ qsModule, location, routeState }) { 3447 const origin = location.origin; 3448 const pathname = location.pathname; 3449 const hash = location.hash; 3450 3451 const urlParams = new URLSearchParams(window.location.search); 3452 const priceBelow = urlParams.get('priceBelow'); 3453 3454 /** 3455 * Params carried onto every URL the router builds. 3456 * 3457 * The query string is rebuilt from route state, so anything the 3458 * router does not model is dropped on every write. utm_* was 3459 * already carried for that reason; the ad click IDs join it, 3460 * because Back from a VDP onto an SRP stripped of its gclid breaks 3461 * attribution for the traffic that costs the most to buy. 3462 * 3463 * Carrying them HERE rather than in the pagehide flush is what 3464 * makes the flush safe. Its first version appended click IDs to 3465 * the finished URL string and split on '#' and '?' to place them, 3466 * which mis-sliced any URL whose refinement values contain those 3467 * characters - and they can, because refinements are serialised 3468 * with encode:false (the exteriorHex strip below exists for the 3469 * same reason). A dealertag of "Certified #1 Dealer" truncated the 3470 * query at the '#' and pushed every later refinement into the 3471 * fragment. Building the URL in one place, from parts, has no 3472 * string surgery to get wrong. 3473 * 3474 * Values are encoded, unlike the raw interpolation below: these 3475 * arrive from ad platforms rather than from our own state, and an 3476 * unencoded one would reintroduce exactly the bug above. 3477 */ 3478 const carriedParams = [ 3479 'utm_campaign', 'utm_medium', 'utm_source', 'utm_term', 'utm_id', 'utm_content', 3480 'gclid', 'gbraid', 'wbraid', 'dclid', 'fbclid', 'msclkid', 'ttclid', 'gad_source', 'srsltid' 3481 ]; 3482 const utmQuery = carriedParams 3483 .map(param => { 3484 const value = urlParams.get(param); 3485 return value ? `${param}=${encodeURIComponent(value)}` : null; 3486 }) 3487 .filter(Boolean) 3488 .join('&'); 3489 3490 const queryParts = []; 3491 3492 if (routeState.refinementList) { 3493 var refinements = Object.assign({}, routeState.refinementList); 3494 // Remove # from exteriorHex values for correct URL formatting 3495 if (refinements.exteriorHex) { 3496 refinements.exteriorHex = refinements.exteriorHex.map(function(v) { return v.replace('#', ''); }); 3497 } 3498 queryParts.push(qsModule.stringify(refinements, { arrayFormat: 'repeat', delimiter: '&', encode: false })); 3499 } 3500 3501 if (routeState.hierarchicalMenu) { 3502 queryParts.push(qsModule.stringify({ modelCategory: routeState.hierarchicalMenu["modelCategory.lvl0"] }, { arrayFormat: 'repeat', delimiter: '&', encode: false })); 3503 } 3504 3505 if (routeState.query) { 3506 queryParts.push(`q=${routeState.query}`); 3507 } 3508 3509 if (routeState.page) { 3510 queryParts.push(`pg=${routeState.page}`); 3511 } 3512 3513 if (routeState.range?.rangeSliderPrice) { 3514 queryParts.push(`priceRange=${routeState.range.rangeSliderPrice}`); 3515 } 3516 if (routeState.range?.mileage) { 3517 queryParts.push(`mileageRange=${routeState.range.mileage}`); 3518 } 3519 if (routeState.range?.yr) { 3520 queryParts.push(`yearRange=${routeState.range.yr}`); 3521 } 3522 3523 if (priceBelow) { 3524 queryParts.push(`priceBelow=${priceBelow}`); 3525 } 3526 3527 let queryString = queryParts.filter(Boolean).join('&'); 3528 3529 if (queryString.includes('transmission_type')) { 3530 queryString = queryString.replace('_type', ''); 3531 } 3532 3533 if (utmQuery) { 3534 queryString = queryString ? `${queryString}&${utmQuery}` : utmQuery; 3535 } 3536 3537 const fullURL = `${origin}${pathname}${queryString ? `?${queryString}` : ''}${hash}`; 3538 3539 return fullURL; 3540 }, 3541 parseURL: function parseURL(_ref2) { 3542 var qsModule = _ref2.qsModule, location = _ref2.location; 3543 var urlSearch = new URLSearchParams(window.location.search); 3544 //Convert the current URL to JSON
3545 let refinements = qsModule.parse(location.search.slice(1), {arrayFormat: 'repeat', delimiter: '&'}); 3546 3547 // Add hashtag back to exteriorHex for correct filtering 3548 if (refinements.exteriorHex) { 3549 refinements.exteriorHex = [].concat(refinements.exteriorHex).map(function(v) { 3550 return v.charAt(0) === '#' ? v : '#' + v; 3551 }); 3552 } 3553 3554 var priceBelow = urlSearch.get('priceBelow'); 3555 if (priceBelow) { 3556 refinements.price = refinements.price || []; 3557 refinements.price.push('<' + priceBelow); 3558 } 3559 3560 //Carousel Model Manipulation 3561 if(refinements['model']) { 3562 3563 if(Array.isArray(refinements['model'])) { 3564 for(let i = 0; i < refinements['model'].length; i++) { 3565 refinements['model'][i] = formatModelName(refinements['model'][i]); 3566 } 3567 }else{ 3568 refinements['model'] = formatModelName(refinements['model']); 3569 } 3570 } 3571 //End Carousel Model Manipulation 3572 3573 if (isNexusToyota && refinements['flags.type'] == "Certified") 3574 { 3575 refinements['flags.type'] = [ 3576 "Gold Certified", 3577 "Silver Certified" 3578 ]; 3579 } else if (isNexusHonda && refinements['flags.type'] == "Certified") 3580 { 3581 refinements['flags.type'] = [ 3582 "True Certified", 3583 "True Used" 3584 ]; 3585 } else if (isNexusAcura && refinements['flags.type'] == "Certified") { 3586 refinements['flags.type'] = [ 3587 "Precision Certified", 3588 "Precision Used" 3589 ]; 3590 } 3591 3592 3593 3594 let refinementsList = refinements; 3595 3596 for (var refinement in refinements) 3597 { 3598 if (typeof refinements[refinement] == "string") 3599 { 3600 refinementsList[refinement] = [refinements[refinement]]; 3601 } 3602 } 3603 3604 const priceRange = urlSearch.get('priceRange'); 3605 const mileageRange = urlSearch.get('mileageRange'); 3606 const yearRange = urlSearch.get('yearRange'); 3607 let range = {}; 3608 3609 if (priceRange) { 3610 range.rangeSliderPrice = priceRange; 3611 } 3612 3613 if (mileageRange) { 3614 range.mileage = mileageRange; 3615 } 3616 3617 if (yearRange) { 3618 range.yr = yearRange; 3619 } 3620 3621 let hierarchicalMenu = {}; 3622 if (refinements['modelCategory']) 3623 { 3624 hierarchicalMenu["modelCategory.lvl0"] = refinements['modelCategory']; 3625 } 3626 3627 //Return the corrected refinement array and current query and page (if exists) 3628 return { 3629 refinementList: refinementsList, 3630 query: urlSearch.get('q'), 3631 page: urlSearch.get('pg'), 3632 range: range, 3633 hierarchicalMenu: hierarchicalMenu 3634 } 3635 } 3636 }); 3637 3638 /** 3639 * Commit the debounced URL write before the page goes away. 3640 * 3641 * The history router schedules its history write on a writeDelay timer and 3642 * never flushes it on unload (verified in the instantsearch.js bundle), so 3643 * any navigation inside the delay - filter, tap a vehicle, Back - landed on 3644 * an SRP without the filter. 3645 * 3646 * REPLACE, never push. The entry being fixed up is the SRP the shopper is 3647 * leaving, so the correction belongs ON it: pushing would leave the 3648 * filtered SRP in front of the unfiltered one and cost a second Back press 3649 * to escape, which is the exact tax the writeDelay change set out to 3650 * remove. It also sidesteps the browser-dependent question of where an 3651 * entry pushed during pagehide lands relative to the committing navigation. 3652 * 3653 * The URL is captured at write() time rather than rebuilt at pagehide, 3654 * because that is the moment the router computes its own - only the history 3655 * call is debounced - so what is written is byte-identical to what would 3656 * have been. It is also written UNTOUCHED: click IDs are carried by 3657 * createURL now, so there is no string surgery here to get wrong on a 3658 * refinement value containing '#' or '?'. 3659 * 3660 * pagehide rather than beforeunload: it fires only when the page is really 3661 * being left, so a cancelled navigation cannot rewrite the URL underneath a 3662 * shopper who stayed. 3663 * 3664 * ?da-url-flush=off disables it for one request. It is the only behaviour 3665 * in this PR that writes browser history during unload, so it gets the same 3666 * escape hatch as everything else here even though it is a bug fix. 3667 */ 3668 if (new URLSearchParams(window.location.search).get('da-url-flush') !== 'off') { 3669 (function () {
3670 var pendingUrl = null; 3671 var nativeWrite = daSrpRouter.write.bind(daSrpRouter); 3672 3673 daSrpRouter.write = function (routeState) { 3674 pendingUrl = daSrpRouter.createURL(routeState); 3675 return nativeWrite(routeState); 3676 }; 3677 3678 window.addEventListener('pagehide', function () { 3679 if (pendingUrl === null || pendingUrl === window.location.href) { 3680 return; // nothing pending, or the debounced write already ran 3681 } 3682 3683 try { 3684 history.replaceState(null, '', pendingUrl); 3685 } catch (e) { /* WebKit's history rate limit; nothing left to try */ } 3686 }); 3687 })(); 3688 } 3689 3690const search = instantsearch({indexName: indexName, stalledSearchDelay: 1000, searchClient: searchClient, searchParameters: { clickAnalytics: true }, routing: {router: daSrpRouter, stateMapping: { 3691 stateToRoute: function stateToRoute(uiState) { 3692 //Update routeState with current uiState 3693 return { 3694 query: uiState[indexName].query, 3695 page: uiState[indexName].page, 3696 refinementList: uiState[indexName].refinementList, 3697 range: uiState[indexName].range, 3698 hierarchicalMenu: uiState[indexName].hierarchicalMenu 3699 }; 3700 }, 3701 routeToState: function routeToState(routeState) { 3702 //Update uiState with current routeState 3703 return { 3704 "vehicles-GRP00034": { 3705 query: routeState.query, 3706 page: routeState.page, 3707 refinementList: routeState.refinementList, 3708 range: routeState.range, 3709 hierarchicalMenu: routeState.hierarchicalMenu 3710 } 3711 }; 3712 } 3713 }}}); 3714 3715 const urlParams = new URLSearchParams(window.location.search); 3716 const priceBelow = urlParams.get('priceBelow'); 3717 3718 let setFilters = ''; 3719 if (priceBelow) { 3720 setFilters = `condition:${srpCondition} && finalPriceInt:<${priceBelow}`; 3721 } else { 3722 setFilters = "condition:" + srpCondition; 3723 } 3724 3725 //Main Search Widget 3726 search.addWidgets([ 3727 instantsearch.widgets.configure({ 3728 filters: setFilters, 3729 hitsPerPage: 24 3730 }) 3731 ]); 3732 3733 3734 //Results Widget 3735 search.addWidgets([ 3736 instantsearch.widgets.hits({ 3737 container: '#srp-results', 3738 templates: { 3739 item: document.getElementById('hit-template').innerHTML, 3740 empty: document.getElementById('empty-template').innerHTML 3741 }, 3742 transformItems(items) { 3743 const transformedItems = items.map(item => transformIncentives(item)); 3744 vehiclesList = items; 3745 return items; 3746 } 3747 }) 3748 ]); 3749 3750 // Listen for the render event 3751 search.on('render', () => { 3752 _triggerInventoryLoaded(); 3753 // You can add any post-render logic here 3754 }); 3755 3756 //Banner Widget for TOP of srp 3757 3758 //Text Search Widget 3759 search.addWidget( 3760 instantsearch.widgets.searchBox({ 3761 container: "#searchbox", 3762 placeholder: "Search Inventory", 3763 autofocus: false, 3764 showLoadingIndicator: true, 3765 queryHook: function(query, search){ 3766 3767 query = query.replace(/(\b\d\b)\s+(?=\w)/g, '$1'); 3768 3769 if(query?.length == 0 || query == undefined){ 3770 document.querySelector('#clearSearchResults').style.display = "none"; 3771 } else { 3772 document.querySelector('#clearSearchResults').style.display = "block"; 3773 } 3774 3775 /** 3776 * Coalesce keystrokes into one search. 3777 * 3778 * Each search replaces the whole results list - about 3,400 nodes - 3779 * and every third-party observer watching body or document is handed 3780 * that entire record set. Firing per character multiplied that by the 3781 * length of the word. 3782 * 3783 * 100ms is deliberately short: it is below the ~150ms where typing 3784 * starts to feel laggy, so results still land while the user is 3785 * typing, but a burst within one word collapses into a single render. 3786 * Clearing the box is exempt so the reset stays instant. 3787 * 3788 * BURST ADDENDUM (2026-08-21, the iPhone keystroke-echo reports). 3789 * Even with the render-on-settle response hold, calling search() 3790 * per keystroke costs: every call moves the helper's state, and 3791 * InstantSearch re-renders every widget against it - measured at 3792 * ~4.7s of main-thread work across one fast-typed word on the 3793 * 4x-throttled bench, none of it produced by our render handler 3794 * (the A/B with the handler gated read the same). So while keys 3795 * are arriving faster than the settle delay, the timer re-arms 3796 * instead of firing: a fast burst reaches the helper as ONE 3797 * search when the fingers pause, and a deliberate typist whose 3798 * gaps exceed the settle delay gets the old per-keystroke flow 3799 * untouched. Gated on the same switch as the response hold - 3800 * they are two halves of "nothing renders mid-burst". 3801 */ 3802 if (window.__dvSearchDebounce) { 3803 clearTimeout(window.__dvSearchDebounce); 3804 } 3805 3806 if (!query) { 3807 // Clearing must reset instantly, as promised above - but 3808 // the backspace that emptied the box also bumped 3809 // daLastTypeAt, which would hold the reset render behind 3810 // the settle delay. Declare typing over instead. 3811 daLastTypeAt = -Infinity; 3812 search(query); 3813 return; 3814 } 3815 3816 var daFireSearch = function () {
3817 if (daRenderOnSettle && daTypingActive()) { 3818 window.__dvSearchDebounce = setTimeout(daFireSearch, 100); 3819 return; 3820 } 3821 search(query); 3822 }; 3823 3824 window.__dvSearchDebounce = setTimeout(daFireSearch, 100); 3825 } 3826 }) 3827 ); 3828 3829 //5-2-2023 customer default sorting work around while we build to admin panel 3830 let currentIndex = 'vehicles-GRP00034'; 3831 currentIndex = currentIndex.split('/')[0]; 3832 3833 //Sort By Widget Desktop 3834 const { connectSortBy } = instantsearch.connectors; 3835 const renderSortByDesktop = (renderOptions, isFirstRender) => { 3836 const { 3837 options, 3838 currentRefinement, 3839 refine, 3840 widgetParams, 3841 // `canRefine` is only available from v4.45.0 3842 // Use `hasNoResults` in earlier minor versions. 3843 canRefine, 3844 } = renderOptions; 3845 3846 if (isFirstRender) { 3847 const _div = document.createElement('div'); 3848 _div.classList.add("dv-srp-sort-desktop"); 3849 3850 _div.innerHTML = ` 3851 ${options.map(option => 3852 `<a data-sort-value="${option.value}" data-sort-label="${option.label}" class="${option.value === currentRefinement ? 'dv-srp-sort-selected' : ''}"> 3853 <i class="fas fa-${option.icon}"></i> ${option.label} 3854 </a>`).join('') 3855 } 3856 `; 3857 let filtered = options.filter(opt => opt.value === currentRefinement); 3858 if(filtered?.length > 0){ 3859 document.querySelector('.dv-srp-search-options-dynamic-label').innerHTML = filtered[0].label; 3860 } 3861 widgetParams.container.appendChild(_div); 3862 } 3863 3864 //widgetParams.container.querySelector('div'); 3865 const nodes = document.querySelectorAll('.dv-srp-sort-desktop > *'); 3866 nodes.forEach(function(node) { 3867 node.addEventListener('click', function(event) { 3868 event.preventDefault(); 3869 if (event?.target == undefined) { return }; 3870 let _ActiveClass = 'dv-srp-sort-selected'; 3871 let _value = event?.target?.dataset?.sortValue; 3872 let _label = event?.target?.dataset?.sortLabel; 3873 3874 if (_value && _value != currentRefinement) { 3875 refine(_value); 3876 if(currentRefinement){ 3877 nodes.forEach(el => el.classList.remove(_ActiveClass)); 3878 event?.target?.classList.add(_ActiveClass); 3879 document.querySelector('.dv-srp-search-options-dynamic-label').innerHTML = _label; 3880 } 3881 } 3882 }); 3883 }); 3884 3885 }; 3886 // Create the custom widget 3887 const customSortByDesktop = connectSortBy(renderSortByDesktop); 3888 search.addWidgets([ 3889 customSortByDesktop({ 3890 container: document.querySelector('#sortByDesktop'), 3891 items: [ 3892 { label: "Most Relevant", value: `${currentIndex}`, icon: 'sort'}, 3893 { label: "Price Low to High", value: `${currentIndex}/sort/sortPrice:desc,price:asc`, icon: 'sort-numeric-down'}, 3894 { label: "Price High to Low", value: `${currentIndex}/sort/sortPrice:desc,price:desc`, icon: 'sort-numeric-up'}, 3895 { label: distanceUnit + 's Low to High', value: `${currentIndex}/sort/mileage:asc`, icon: 'sort-numeric-down'}, 3896 { label: "Year: Newest", value: `${currentIndex}/sort/yr:desc`, icon: 'long-arrow-up'}, 3897 { label: "Year: Oldest", value: `${currentIndex}/sort/yr:asc`, icon: 'long-arrow-down'} 3898 ], 3899 }) 3900 ]); 3901 3902 // Toggle Desktop Sort Dropdown 3903 document.querySelector('#sortByDesktop').addEventListener('click', function(event) { 3904 event.stopPropagation(); 3905 var el = document.querySelector('.dv-srp-sort-desktop'); 3906 el.classList.toggle('dv-srp-sort-desktop-active'); 3907 }); 3908 3909 // Close dropdown when clicking outside 3910 document.addEventListener('click', function(event) { 3911 var el = document.querySelector('.dv-srp-sort-desktop'); 3912 var button = document.querySelector('#sortByDesktop'); 3913 3914 if (!el.contains(event.target) && !button.contains(event.target)) { 3915 el.classList.remove('dv-srp-sort-desktop-active'); 3916 } 3917 }); 3918 3919 //Sort By Widget Mobile 3920 const renderSortByMobile = (renderOptions, isFirstRender) => { 3921 const { 3922 options, 3923 currentRefinement, 3924 refine, 3925 widgetParams, 3926 // `canRefine` is only available from v4.45.0 3927 // Use `hasNoResults` in earlier minor versions. 3928 canRefine, 3929 } = renderOptions; 3930 3931 if (isFirstRender) { 3932 const _div = document.createElement('div'); 3933 _div.classList.add("dv-srp-sort-mobile"); 3934 3935 _div.innerHTML = ` 3936 ${options.map(option => 3937 `<a data-sort-value="${option.value}" data-sort-label="${option.label}" class="${option.value === currentRefinement ? 'dv-srp-sort-selected' : ''}"> 3938 <i class="fas fa-${option.icon}"></i> ${option.label} 3939 </a>`).join('') 3940 } 3941 `; 3942 3943 widgetParams.container.appendChild(_div); 3944 } 3945 3946 //widgetParams.container.querySelector('div'); 3947 const nodes = document.querySelectorAll('.dv-srp-sort-mobile > *');
3948 nodes.forEach(function(node) { 3949 node.addEventListener('click', function(event) { 3950 event.preventDefault(); 3951 if (event?.target == undefined) { return }; 3952 let _ActiveClass = 'dv-srp-sort-selected'; 3953 let _value = event?.target?.dataset?.sortValue; 3954 let _label = event?.target?.dataset?.sortLabel; 3955 3956 if (_value && _value != currentRefinement) { 3957 refine(_value); 3958 if(currentRefinement){ 3959 nodes.forEach(el => el.classList.remove(_ActiveClass)); 3960 event?.target?.classList.add(_ActiveClass); 3961 } 3962 } 3963 }); 3964 }); 3965 3966 }; 3967 // Create the custom widget 3968 const customSortByMobile = connectSortBy(renderSortByMobile); 3969 search.addWidgets([ 3970 customSortByMobile({ 3971 container: document.querySelector('#sortByMobile'), 3972 items: [ 3973 { label: "Most Relevant", value: `${currentIndex}`, icon: 'sort'}, 3974 { label: "Price Low to High", value: `${currentIndex}/sort/sortPrice:desc,price:asc`, icon: 'sort-numeric-down'}, 3975 { label: "Price High to Low", value: `${currentIndex}/sort/sortPrice:desc,price:desc`, icon: 'sort-numeric-up'}, 3976 { label: distanceUnit + 's Low to High', value: `${currentIndex}/sort/mileage:asc`, icon: 'sort-numeric-down'}, 3977 { label: "Year: Newest", value: `${currentIndex}/sort/yr:desc`, icon: 'long-arrow-up'}, 3978 { label: "Year: Oldest", value: `${currentIndex}/sort/yr:asc`, icon: 'long-arrow-down'} 3979 ], 3980 }) 3981 ]); 3982 3983 // Toggle Mobile Sort Dropdown 3984 document.querySelector('#sortByMobile').addEventListener('click', function(event) { 3985 event.stopPropagation(); // Prevent the event from bubbling up to the document 3986 var el = document.querySelector('.dv-srp-sort-mobile'); 3987 el.classList.toggle('dv-srp-sort-mobile-active'); 3988 }); 3989 3990 // Close dropdown when clicking outside 3991 document.addEventListener('click', function(event) { 3992 var el = document.querySelector('.dv-srp-sort-mobile'); 3993 var button = document.querySelector('#sortByMobile'); 3994 3995 if (!el.contains(event.target) && !button.contains(event.target)) { 3996 el.classList.remove('dv-srp-sort-mobile-active'); 3997 } 3998 }); 3999 search.addWidget( 4000 instantsearch.widgets.rangeSlider({ 4001 container: '#price-range-slider', 4002 attribute: 'rangeSliderPrice', 4003 step: 1000, 4004 pips: false, 4005 precision: 0, 4006 tooltips: { 4007 format(value) { 4008 4009 const newValue = Math.round(value/1000)*1000 4010 return "$" + Math.round(newValue).toLocaleString(); 4011 }, 4012 }, 4013 }) 4014 ); 4015 4016 //Pin price ammounts to top and let handler move them 4017 const priceSlider = document.querySelector('#price-range-slider'); 4018 4019 if (priceSlider) { 4020 /** 4021 * Rheostat positions its handles by writing style.left, so the tooltips 4022 * have to be repositioned in response. Watching for that write is fine; 4023 * doing it naively is not, and the naive version was measurably the most 4024 * expensive observer on this page. 4025 * 4026 * Two problems it had: 4027 * 4028 * 1. It observed style attributes across the slider's whole subtree and 4029 * then wrote styles to the tooltips *inside* that subtree, so every 4030 * run scheduled another run. It only ever settled because the values 4031 * converged. 4032 * 2. It read offsetWidth and then wrote, synchronously, on every single 4033 * mutation - a forced layout each time. Typing in the SRP search box 4034 * re-renders the results and fires this constantly. 4035 * 4036 * So: coalesce to one run per frame, and disconnect around our own writes 4037 * so they cannot feed back in. Skipping unchanged values keeps us from 4038 * dirtying style for no reason. 4039 */ 4040 const OBSERVE_OPTIONS = { 4041 childList: true, 4042 subtree: true, 4043 attributes: true, 4044 attributeFilter: ['style'] 4045 }; 4046 4047 const setStyle = (el, prop, value) => { 4048 if (el.style[prop] !== value) { 4049 el.style[prop] = value; 4050 } 4051 }; 4052 4053 const applyTooltipPositions = () => { 4054 const handles = priceSlider.querySelectorAll('.rheostat-handle'); 4055 4056 if (handles.length !== 2) { 4057 return; 4058 } 4059 4060 const tooltip1 = handles[0].querySelector('.rheostat-tooltip'); 4061 const tooltip2 = handles[1].querySelector('.rheostat-tooltip'); 4062 const background = priceSlider.querySelector('.rheostat-background'); 4063 4064 if (!tooltip1 || !tooltip2 || !background) { 4065 return; 4066 } 4067
4068 // every read first, then every write - one layout pass, not two 4069 const handle1Left = parseFloat(handles[0].style.left) || 0; 4070 const handle2Left = parseFloat(handles[1].style.left) || 100; 4071 const sliderWidth = background.offsetWidth; 4072 4073 const handle1Offset = (handle1Left / 100) * sliderWidth; 4074 const handle2Offset = (handle2Left / 100) * sliderWidth; 4075 4076 setStyle(tooltip1, 'left', `-${handle1Offset}px`); 4077 setStyle(tooltip1, 'transform', 'none'); 4078 4079 setStyle(tooltip2, 'right', `-${sliderWidth - handle2Offset}px`); 4080 setStyle(tooltip2, 'left', 'auto'); 4081 setStyle(tooltip2, 'transform', 'none'); 4082 }; 4083 4084 let repositionQueued = false; 4085 4086 const scheduleReposition = () => { 4087 if (repositionQueued) { 4088 return; 4089 } 4090 4091 repositionQueued = true; 4092 4093 requestAnimationFrame(() => { 4094 repositionQueued = false; 4095 // Detach first: the writes below land inside the observed subtree 4096 // and would otherwise queue another callback immediately. 4097 observer.disconnect(); 4098 4099 try { 4100 applyTooltipPositions(); 4101 } finally { 4102 observer.observe(priceSlider, OBSERVE_OPTIONS); 4103 } 4104 }); 4105 }; 4106 4107 const observer = new MutationObserver(scheduleReposition); 4108 observer.observe(priceSlider, OBSERVE_OPTIONS); 4109 4110 scheduleReposition(); 4111 4112 window.addEventListener('resize', scheduleReposition); 4113 } 4114 var daFacetLimit = 100000; 4115 var daFacetShowMore = false; 4116 var daFacetShowMoreLimit = 100000; 4117 var daFacetSortLead = []; 4118 search.addWidget( 4119 instantsearch.widgets.rangeSlider({ 4120 container: '#year-range-slider', 4121 attribute: 'yr', 4122 step: 1, 4123 pips: false, 4124 precision: 0 4125 }) 4126 ); 4127 search.addWidget( 4128 instantsearch.widgets.rangeSlider({ 4129 container: '#mileage-range-slider', 4130 attribute: 'mileage', 4131 step: 100, 4132 pips: false, 4133 percision: 0 4134 }) 4135 ); 4136 search.addWidget( 4137 instantsearch.widgets.refinementList({ 4138 container: '#make-list', 4139 attribute: 'make', 4140 operator: 'or', 4141 sortBy: daFacetSortLead.concat(['name:acs']), 4142 limit: daFacetLimit, 4143 showMore: daFacetShowMore, 4144 showMoreLimit: daFacetShowMoreLimit 4145 }) 4146 ); 4147 search.addWidget( 4148 instantsearch.widgets.refinementList({ 4149 container: '#model-list', 4150 attribute: "model", 4151 operator: 'or', 4152 sortBy(a,b) { 4153 // Comparator, so it cannot concat daFacetSortLead - same lead by hand. 4154 if (daFacetShowMore && a.isRefined !== b.isRefined) return a.isRefined ? -1 : 1; 4155 a = a.name.toLowerCase(); 4156 b = b.name.toLowerCase(); 4157 if( a == b) return 0; 4158 return a < b ? -1 : 1; 4159 }, 4160 limit: daFacetLimit, 4161 showMore: daFacetShowMore, 4162 showMoreLimit: daFacetShowMoreLimit, 4163 transformItems(items) { 4164 return items.filter(item => item.count > 0); 4165 }, 4166 }) 4167 ); 4168 search.addWidget( 4169 instantsearch.widgets.refinementList({ 4170 container: '#trim-list', 4171 attribute: 'trim', 4172 operator: 'or', 4173 sortBy: daFacetSortLead.concat(['count:desc']), 4174 limit: daFacetLimit, 4175 showMore: daFacetShowMore, 4176 showMoreLimit: daFacetShowMoreLimit 4177 }) 4178 ); 4179 search.addWidget( 4180 instantsearch.widgets.refinementList({ 4181 container: '#pricerange-list', 4182 attribute: 'finalPriceRange', 4183 operator: 'or', 4184 sortBy: function sortBy(a, b) { 4185 let priceOptions = { 4186 "$10,000 and Below": 0, 4187 "$10,000 - $20,000": 1, 4188 "$20,000 - $30,000": 2, 4189 "$30,000 - $40,000": 3, 4190 "$40,000 - $50,000": 4, 4191 "$50,000 - $60,000": 5, 4192 "$60,000 - $70,000": 6, 4193 "$70,000 - $80,000": 7, 4194 "$80,000 - $90,000": 8, 4195 "$90,000 - $100,000": 9, 4196 "$100,000 and Up": 10 4197 }; 4198 4199 if (priceOptions[a.name] < priceOptions[b.name]) 4200 { 4201 return -1; 4202 } 4203 4204 if (priceOptions[a.name] > priceOptions[b.name]) 4205 { 4206 return 1; 4207 } 4208 4209 return 0; 4210 }, 4211 limit: 100000 4212 }) 4213 ); 4214 search.addWidget( 4215 instantsearch.widgets.refinementList({ 4216 container: '#body-list', 4217 attribute: 'body', 4218 operator: 'or', 4219 sortBy: daFacetSortLead.concat(['']), 4220 limit: daFacetLimit, 4221 showMore: daFacetShowMore, 4222 showMoreLimit: daFacetShowMoreLimit, 4223 templates: { 4224 item: "<label class=\"ais-RefinementList-label\">\n\t\t\t\t\t\t\t<input type=\"checkbox\" class=\"ais-RefinementList-checkbox\" value=\"{{value}}\">\n\t\t\t\t\t\t\t<span class=\"ais-RefinementList-labelText srp-{{value}}\">{{value}} · {{count}}</span>\n\t\t\t\t\t\t</label>" 4225 } 4226 }) 4227 ); 4228 4229 // Cab List Widget 4230 search.addWidget( 4231 instantsearch.widgets.refinementList({ 4232 container: '#cab-list', 4233 attribute: 'cab', 4234 operator: 'or', 4235 sortBy: daFacetSortLead.concat(['name:asc']), 4236 limit: daFacetLimit, 4237 showMore: daFacetShowMore, 4238 showMoreLimit: daFacetShowMoreLimit 4239 }) 4240 ); 4241 4242 //Bed List Widget 4243 search.addWidget( 4244 instantsearch.widgets.refinementList({ 4245 container: '#bed-list', 4246 attribute: 'bed', 4247 operator: 'or', 4248 sortBy: daFacetSortLead.concat(['name:asc']), 4249 limit: daFacetLimit, 4250 showMore: daFacetShowMore, 4251 showMoreLimit: daFacetShowMoreLimit 4252 }) 4253 ); 4254 search.addWidget( 4255 instantsearch.widgets.refinementList({ 4256 container: '#fuel-list', 4257 attribute: 'fuel', 4258 operator: 'or', 4259 sortBy: daFacetSortLead.concat(['name:acs']), 4260 limit: daFacetLimit, 4261 showMore: daFacetShowMore, 4262 showMoreLimit: daFacetShowMoreLimit 4263 }) 4264 ); 4265 search.addWidget( 4266 instantsearch.widgets.refinementList({ 4267 container: '#transmission-list', 4268 attribute: 'transmissionType', 4269 operator: 'or', 4270 sortBy: daFacetSortLead.concat(['name:acs']), 4271 limit: daFacetLimit, 4272 showMore: daFacetShowMore, 4273 showMoreLimit: daFacetShowMoreLimit 4274 }) 4275 ); 4276 search.addWidget( 4277 instantsearch.widgets.refinementList({ 4278 container: '#drivetrain-list', 4279 attribute: 'drivetrain', 4280 operator: 'or', 4281 sortBy: daFacetSortLead.concat(['name:acs']), 4282 limit: daFacetLimit, 4283 showMore: daFacetShowMore, 4284 showMoreLimit: daFacetShowMoreLimit, 4285 transformItems(items) { 4286 return items.filter((i) => i.value !== ""); 4287 } 4288 }) 4289 ); 4290 search.addWidget( 4291 instantsearch.widgets.refinementList({ 4292 container: '#location-list', 4293 attribute: 'dealerName', 4294 operator: 'or', 4295 sortBy: ['name:acs'], 4296 limit: 500 4297 }) 4298 ); 4299 search.addWidget( 4300 instantsearch.widgets.refinementList({ 4301 container: '#mpg-hway-list', 4302 attribute: 'mpgHwayRange', 4303 operator: 'or', 4304 sortBy: ['name:acs'], 4305 }) 4306 ); 4307 search.addWidget( 4308 instantsearch.widgets.refinementList({ 4309 container: '#mpg-city-list', 4310 attribute: 'mpgCityRange', 4311 operator: 'or', 4312 sortBy: ['name:acs'], 4313 }) 4314 ); 4315 search.addWidget( 4316 instantsearch.widgets.refinementList({ 4317 container: '#features-list', 4318 attribute: 'features', 4319 operator: 'and', 4320 sortBy: daFacetSortLead.concat(['name:acs']), 4321 limit: daFacetLimit, 4322 showMore: daFacetShowMore, 4323 showMoreLimit: daFacetShowMoreLimit 4324 }) 4325 ); 4326 search.addWidget( 4327 instantsearch.widgets.refinementList({ 4328 container: '#range-list', 4329 attribute: 'range', 4330 operator: 'or', 4331 sortBy: ['name:acs'], 4332 limit: 100000 4333 }) 4334 ); 4335 4336 4337 //Type List Widget 4338 search.addWidget( 4339 instantsearch.widgets.refinementList({ 4340 container: '#type-list', 4341 attribute: 'flags.type', 4342 operator: 'or', 4343 sortBy: daFacetSortLead.concat(['name:acs']), 4344 limit: daFacetLimit, 4345 showMore: daFacetShowMore, 4346 showMoreLimit: daFacetShowMoreLimit 4347 }) 4348 ); 4349 4350 search.addWidget( 4351 instantsearch.widgets.refinementList({ 4352 container: '#dealertag-list', 4353 attribute: 'dealertag', 4354 operator: 'or', 4355 limit: daFacetLimit, 4356 showMore: daFacetShowMore, 4357 showMoreLimit: daFacetShowMoreLimit 4358 }) 4359 ); 4360 4361 4362 //Custom Pagination SRP 4363 const { connectPagination } = instantsearch.connectors; 4364 4365 const renderPagination = (renderOptions, isFirstRender) => { 4366 const { 4367 pages, 4368 currentRefinement, 4369 nbPages, 4370 isFirstPage, 4371 isLastPage, 4372 refine, 4373 createURL, 4374 } = renderOptions; 4375 4376 const container = document.querySelector('#pagination-top'); 4377 4378 if (nbPages <= 1) { 4379 container.style.display = 'none'; 4380 return; 4381 } else { 4382 container.style.display = ''; 4383 } 4384 4385 container.innerHTML = ` 4386 <ul class="ais-pagination-ul"> 4387 ${ 4388 currentRefinement >= 1 4389 ? ` 4390 <li> 4391 <a class="ais-Pagination-link" href="${createURL(currentRefinement - 1)}" data-value="${currentRefinement - 1}"> 4392 <i class="fa-solid fa-chevron-left"></i> 4393 </a> 4394 </li> 4395 ` 4396 : '' 4397 } 4398 <div class="ais-pagination-wrapper">
4399 Page <span class="ais-Pagination-link">${currentRefinement + 1}</span> of <span class="ais-Pagination-link">${nbPages}</span> 4400 </div> 4401 ${ 4402 currentRefinement < nbPages - 1 4403 ? ` 4404 <li> 4405 <a class="ais-Pagination-link" href="${createURL(currentRefinement + 1)}" data-value="${currentRefinement + 1}"> 4406 <i class="fa-solid fa-chevron-right"></i> 4407 </a> 4408 </li> 4409 ` 4410 : '' 4411 } 4412 </ul> 4413 `; 4414 4415 [...container.querySelectorAll('a')].forEach(element => { 4416 element.addEventListener('click', event => { 4417 event.preventDefault(); 4418 refine(event.currentTarget.dataset.value); 4419 4420 window.scrollTo({ 4421 top: 0, 4422 left: 0, 4423 behavior: 'smooth' 4424 }); 4425 }); 4426 }); 4427 }; 4428 4429 const customPagination = connectPagination( 4430 renderPagination 4431 ); 4432 4433 search.addWidgets([ 4434 customPagination({ 4435 container: document.querySelector('#pagination-top'), 4436 }) 4437 ]); 4438 4439 //Bottom Pagination 4440 4441 const renderPaginationBottom = (renderOptions, isFirstRender) => { 4442 const { 4443 pages, 4444 currentRefinement, 4445 nbPages, 4446 isFirstPage, 4447 isLastPage, 4448 refine, 4449 createURL, 4450 } = renderOptions; 4451 4452 const containerBottom= document.querySelector('#pagination-bottom'); 4453 4454 if (nbPages <= 1) { 4455 containerBottom.style.visibility = 'hidden'; 4456 return; 4457 } else { 4458 containerBottom.style.visibility = 'visible'; 4459 } 4460 4461 containerBottom.innerHTML = ` 4462 <ul class="ais-pagination-ul"> 4463 ${ 4464 currentRefinement >= 1 4465 ? ` 4466 <li> 4467 <a class="ais-Pagination-link" href="${createURL(currentRefinement - 1)}" data-value="${currentRefinement - 1}"> 4468 <i class="fa-solid fa-chevron-left"></i> 4469 </a> 4470 </li> 4471 ` 4472 : '' 4473 } 4474 <div class="ais-pagination-wrapper"> 4475 Page <span class="ais-Pagination-link">${currentRefinement + 1}</span> of <span class="ais-Pagination-link">${nbPages}</span> 4476 </div> 4477 ${ 4478 currentRefinement < nbPages - 1 4479 ? ` 4480 <li> 4481 <a class="ais-Pagination-link" href="${createURL(currentRefinement + 1)}" data-value="${currentRefinement + 1}"> 4482 <i class="fa-solid fa-chevron-right"></i> 4483 </a> 4484 </li> 4485 ` 4486 : '' 4487 } 4488 </ul> 4489 `; 4490 4491 [...containerBottom.querySelectorAll('a')].forEach(element => { 4492 element.addEventListener('click', event => { 4493 event.preventDefault(); 4494 refine(event.currentTarget.dataset.value); 4495 4496 window.scrollTo({ 4497 top: 0, 4498 left: 0, 4499 behavior: 'smooth' 4500 }); 4501 }); 4502 }); 4503 }; 4504 4505 const customPaginationBottom = connectPagination( 4506 renderPaginationBottom 4507 ); 4508 4509 search.addWidgets([ 4510 customPaginationBottom({ 4511 container: document.querySelector('#pagination-bottom'), 4512 }) 4513 ]); 4514 4515//End Customer Pagination SRP 4516 4517 // Clear Results Button Widget 4518 //search.addWidget( 4519 // instantsearch.widgets.clearRefinements({ 4520 // container: '#clearSearchResults', 4521 // templates: { 4522 // resetLabel: '<i class="fal fa-backspace"></i> <span>Clear<br>Search</span>' 4523 // } 4524 // }) 4525 //); 4526 4527 search.addWidget( 4528 instantsearch.widgets.clearRefinements({ 4529 container: '#dv-srp-clear-filters', 4530 templates: { 4531 resetLabel: 'Clear All' 4532 } 4533 }) 4534 ); 4535 4536 search.addWidget( 4537 instantsearch.widgets.clearRefinements({ 4538 container: '#srp-filters-reset-btn', 4539 templates: { 4540 resetLabel: 'Clear Filters' 4541 } 4542 }) 4543 ); 4544 4545 //Results Stats Widget (Top) 4546 // in {{processingTimeMS}}ms 4547 const { connectStats } = instantsearch.connectors; 4548 4549 let renderStats = (renderOptions, isFirstRender) => { 4550 let { 4551 page, 4552 nbPages, 4553 nbSortedHits, 4554 hitsPerPage, 4555 nbHits, 4556 isLastPage, 4557 } = renderOptions; 4558 4559 const containerStats = document.querySelector('#resultsStats'); 4560 4561 let pageNumber = page + 1; 4562 let lastPage = nbPages - 1; 4563 let nextPage = page + 1; 4564 4565 containerStats.innerHTML =` 4566 <div class="ais-Stats"> 4567 ${nbHits === 0 ?` 4568 \n\t\t\t\t\tNo results\n\t\t\t\t\t 4569 ` : '' } 4570 ${page === 0 && nbHits > hitsPerPage ? ` 4571 \n\t\t\t\t\tShowing <span id=\"numberHits\">${pageNumber}</span> - <span id=\"numberHits\">${hitsPerPage * pageNumber}</span> of <span id=\"numberHits\">${nbHits}</span>\n results found\n\t\t\t\t\t` 4572 : ''} 4573 ${page >= 1 && page !== lastPage && nbHits > hitsPerPage ? ` 4574 \n\t\t\t\t\tShowing <span id=\"numberHits\">${page * hitsPerPage}</span> - <span id=\"numberHits\">${hitsPerPage * nextPage}</span> of <span id=\"numberHits\">${nbHits}</span>\n results found\n\t\t\t\t\t 4575 ` : ''} 4576 ${page === lastPage && nbHits < hitsPerPage ? `
4577 \n\t\t\t\t\tShowing <span id=\"numberHits\">${pageNumber}</span> - <span id=\"numberHits\">${nbHits}</span> of <span id=\"numberHits\">${nbHits}</span>\n results found\n\t\t\t\t\t 4578 ` : ''} 4579 ${page === lastPage && nbPages != 1 ? ` 4580 \n\t\t\t\t\tShowing <span id=\"numberHits\">${lastPage * hitsPerPage}</span> - <span id=\"numberHits\">${nbHits}</span> of <span id=\"numberHits\">${nbHits}</span>\n results found\n\t\t\t\t\t 4581 ` : ''} 4582 `; 4583 4584 }; 4585 4586 const customStats = connectStats( 4587 renderStats 4588 ); 4589 4590 search.addWidgets([ 4591 customStats({ 4592 container: document.querySelector('#resultsStats'), 4593 }) 4594 ]); 4595 4596 //Result Stats Widget (Bottom) 4597 // in {{processingTimeMS}}ms 4598 search.addWidget( 4599 instantsearch.widgets.stats({ 4600 container: '#resultsStats-bottom', 4601 templates: { 4602 text: "\n\t\t\t\t\t{{#hasNoResults}}No results{{/hasNoResults}}\n\t\t\t\t\t{{#hasOneResult}}<span id=\"numberHits\">1</span> result{{/hasOneResult}}\n\t\t\t\t\t{{#hasManyResults}}<span id=\"numberHits\">{{#helpers.formatNumber}}{{nbHits}}{{/helpers.formatNumber}}</span> results{{/hasManyResults}} found" 4603 } 4604 }) 4605 ); 4606 4607 //Mobile Show Filters Buttom Stats Widget 4608 search.addWidget( 4609 instantsearch.widgets.stats({ 4610 container: '#showFiltersNonLegacy', 4611 templates: { 4612 text: "\n\t\t\t\t\t<div class='dv-srp-search-options-wrapper'><span class='showFilters-label'><i class='fas fa-sort-amount-up'></i> Filter</span> <span class='showFilters-value'>{{#hasNoResults}}(0){{/hasNoResults}}\n\t\t\t\t\t{{#hasOneResult}}(1){{/hasOneResult}}\n\t\t\t\t\t{{#hasManyResults}} ({{#helpers.formatNumber}} {{nbHits}} {{/helpers.formatNumber}}) {{/hasManyResults}}</span></div>" 4613 } 4614 }) 4615 ); 4616 search.addWidget( 4617 instantsearch.widgets.stats({ 4618 container: '#srpFilterResultCount', 4619 templates: { 4620 text: "\n\t\t\t\t\t{{#hasNoResults}}No Results{{/hasNoResults}}\n\t\t\t\t\t{{#hasOneResult}}Show 1 Result{{/hasOneResult}}\n\t\t\t\t\t{{#hasManyResults}}Show {{#helpers.formatNumber}}{{nbHits}}{{/helpers.formatNumber}} Results{{/hasManyResults}}" 4621 } 4622 }) 4623 ); 4624 4625 search.addWidget( 4626 instantsearch.widgets.currentRefinements({ 4627 container: '#filterTags', 4628 transformItems: function transformItems(items) { 4629 items.forEach(function (item) { 4630 if (item.label == "dealer.name") 4631 { 4632 item.label = "Dealer Name"; 4633 }; 4634 4635 if (item.label == "flags.type") 4636 { 4637 item.label = "Type"; 4638 }; 4639 4640 if (item.label == "yr") 4641 { 4642 item.label = "Year"; 4643 }; 4644 4645 if (item.label == "finalPriceRange" || item.label == "FinalPriceRange") 4646 { 4647 item.label = "Price Range"; 4648 }; 4649 4650 if (item.label == "monthlyPaymentRange") 4651 { 4652 item.label = "Monthly Payment"; 4653 } 4654 4655 if (item.label == "genericColor") 4656 { 4657 item.label = "Color"; 4658 }; 4659 4660 if (item.label == "mileageRange") 4661 { 4662 item.label = distanceUnit + " Range"; 4663 }; 4664 4665 if (item.label == "vehiclehistory") 4666 { 4667 item.label = "Vehicle History"; 4668 }; 4669 if (item.label == "finalPriceInt") 4670 { 4671 item.label = "Price Range"; 4672 }; 4673 if(item.label == "transmissionType") 4674 { 4675 item.label = "Transmission"; 4676 } 4677 if (item.label == "rangeSliderPrice") 4678 { 4679 item.label = "Price"; 4680 }; 4681 4682 if (item.label == "modelCategory.lvl1") 4683 { 4684 item.label = "Model"; 4685 item.refinements = item.refinements.map((ref) => ({ ...ref, label: ref.label.split(" > ")[1]})); 4686 } 4687 }); 4688 return items; 4689 } 4690 }) 4691 ); 4692 4693 /** 4694 * Remove previous and next arrows if there's only 1 image in the stack. 4695 * Swiper has this functionality supposedly with watchOverflow: true 4696 * but it was not working when set 4697 * 4698 * @param sliderElm 4699 * @private 4700 */ 4701 function _maybeRemoveSwiperNavigation(sliderElm) { 4702 let imageCount = 0; 4703 const slides = sliderElm.querySelectorAll('.swiper-slide') 4704 4705 if (slides.length <= 1) { 4706 let navElements = sliderElm.querySelectorAll('.swiper-button-next,.swiper-button-prev') 4707 if (navElements.length) { 4708 navElements.forEach( (el) => { 4709 el.remove() 4710 }) 4711 } 4712 } 4713 } 4714 4715 /** 4716 * Limit the amount of images per vehicle card by using the SRP max images option in AG Options 4717 * 4718 * Two fixes, 2026-08-21, hunting the DOM weight behind the keystroke-lag 4719 * reports: 4720 * 4721 * 1. This used to run only when a carousel first scrolled INTO VIEW, so 4722 * every off-screen card kept its full slide stack in the DOM through 4723 * every re-render - the trim only ever helped cards the shopper had 4724 * already reached. It now also runs as part of the render rebuild 4725 * (_buildSRPImageCarousel), so excess slides leave the DOM the moment 4726 * the cards do exist, on every card, every render. Style recalculation 4727 * and layout pay per node whether or not a card is on screen (unless 4728 * content-visibility hides it, which older Safari lacks). 4729 * 4730 * 2. The gate was hard-coded "length > 5", which silently ignored a 4731 * configured cap below five. It now gates on the cap itself. 4732 * 4733 * ?da-slide-cap=N overrides the cap for one request - the way to measure 4734 * "what would a tighter cap buy" on a live dealer without touching their 4735 * setting. 4736 * 4737 * @private 4738 */ 4739 // The ?da-slide-cap=N override, read once per page instead of once per 4740 // trim call - it cannot change while the page lives. 4741 var daSlideCapOverride = parseInt(new URLSearchParams(window.location.search).get('da-slide-cap'), 10); 4742 4743 function _limitSlidesPerVehicleCard(scope) {
4744 // With a scope, trim just that carousel; without one, sweep the page. 4745 let vehicleCardCarousels = scope ? [scope] : document.querySelectorAll('.srp-swiper-vehicles'); 4746 4747 let srpMaxImageLength = 5; 4748 if (daSlideCapOverride > 0) { 4749 srpMaxImageLength = daSlideCapOverride; 4750 } 4751 4752 vehicleCardCarousels.forEach(slider => { 4753 4754 let swiperWrapper = slider.querySelector('.swiper-wrapper'); 4755 let swiperSlides = swiperWrapper.querySelectorAll('.swiper-slide'); 4756 4757 if (swiperSlides.length > srpMaxImageLength && ! swiperWrapper.dataset.maximages) { 4758 4759 for (let i = srpMaxImageLength; i < swiperSlides.length; i++) { 4760 swiperWrapper.removeChild(swiperSlides[i]); 4761 } 4762 4763 swiperWrapper.setAttribute('data-maximages', srpMaxImageLength); 4764 } 4765 }); 4766 } 4767 4768 4769 /** 4770 * Transform the incentives data to be more easily accessible in the template 4771 * 4772 * @private 4773 */ 4774 function transformIncentives(item) { 4775 4776 if (!showConditionalIncentives || !item.conditionalIncentives) return item; 4777 4778 const formatDate = (dateString) => { 4779 if (!dateString) return null; 4780 const date = new Date(dateString);
4781 const month = (date.getMonth() + 1).toString().padStart(2, '0'); 4782 const day = date.getDate().toString().padStart(2, '0'); 4783 const year = date.getFullYear(); 4784 return `${month}-${day}-${year}`; 4785 }; 4786 4787 const mapNexusIncentive = inc => { 4788 if (!inc.value || inc.value === 0) return null; 4789 4790 const incentive = {}; 4791 if (inc.title) incentive.programDescription = inc.title; 4792 if (inc.title) incentive.programName = inc.title; 4793 if (inc.value) incentive.programValue = inc.value; 4794 if (inc.disclaimer) incentive.disclaimerText = inc.disclaimer; 4795 if (inc.effectiveDate) incentive.effectiveDate = formatDate(inc.effectiveDate); 4796 if (inc.expiryDate) incentive.expiryDate = formatDate(inc.expiryDate); 4797 if (inc.description) { 4798 incentive.programRuleList = [{ 4799 description: inc.description 4800 }]; 4801 } 4802 return incentive; 4803 }; 4804 4805 if (isNexusToyota || isNexusAcura || isNexusHonda || isNexusEnabled) { 4806 item.conditionalIncentives = Array.isArray(item.conditionalIncentives) 4807 ? item.conditionalIncentives 4808 .map(mapNexusIncentive) 4809 .filter(incentive => incentive !== null && Object.keys(incentive).length > 0) 4810 : []; 4811 4812 item.incentives = Array.isArray(item.incentives) 4813 ? item.incentives 4814 .map(mapNexusIncentive) 4815 .filter(incentive => incentive !== null && Object.keys(incentive).length > 0) 4816 : []; 4817 } 4818 4819 4820 let priorityIncentives = item.conditionalIncentives.filter(incentive => { 4821 const desc = (incentive.programDescription || '').toString().toLowerCase(); 4822 return desc.includes('military') || desc.includes('college') || 4823 desc.includes('graduate') || desc.includes('first responder'); 4824 }); 4825 4826 let otherIncentives = item.conditionalIncentives.filter(incentive => { 4827 const desc = (incentive.programDescription || '').toString().toLowerCase(); 4828 return !desc.includes('military') && !desc.includes('college') && 4829 !desc.includes('graduate') && !desc.includes('first responder'); 4830 }); 4831 4832 if (priorityIncentives.length === 0) 4833 { 4834 priorityIncentives = item.conditionalIncentives.slice(0, 3); 4835 otherIncentives = otherIncentives.slice(3, otherIncentives.length); 4836 } 4837 4838 const regularIncentives = item.incentives || []; 4839 4840 const remainingIncentivesCount = otherIncentives.length + regularIncentives.length; 4841 4842 item._transformed = { 4843 priorityIncentives, 4844 otherIncentives, 4845 incentives: item.incentives || [], 4846 hasAdditionalIncentives: otherIncentives.length > 0, 4847 remainingIncentivesCount 4848 }; 4849 4850 return item; 4851 } 4852 4853 /** 4854 * Live Swiper instances and the observer that lazily creates them, kept so 4855 * the NEXT render can tear them down. 4856 * 4857 * Swiper attaches its drag-tracking listeners (touchmove, pointermove, 4858 * touchend and friends) to document, per instance - it has to, to keep 4859 * tracking a drag that leaves the container. InstantSearch replaces the 4860 * whole results list on every render, so the containers those instances 4861 * were built on are discarded, but the instances themselves - and their 4862 * document-level listeners - were never destroyed. Measured on the live 4863 * i95 SRP: ~220 document/window listeners added per six-character search 4864 * by swiper-bundle alone, none ever removed, 1,873 net after six searches. 4865 * Every tap on the page then runs the whole accumulated chain, which is 4866 * the path WebKit dispatches slowest. 4867 * 4868 * Same shape for the IntersectionObserver: a fresh one per render, 4869 * observing the new cards, with the old one left alive holding the old 4870 * ones. destroy() + disconnect() at the top of the rebuild is the whole 4871 * fix. Not behind a Theme Options switch for the same reason the delegated 4872 * click handlers were not: removing a leak has no behaviour to opt out of. 4873 */ 4874 var daSwipers = []; 4875 var daSwiperObserver = null; 4876 4877 /** 4878 * Builds the SRP vehicle image carousel on the vehicle card 4879 * 4880 * @private 4881 */ 4882 function _buildSRPImageCarousel() { 4883 // Tear down the previous render's carousels before building this one. 4884 // cleanStyles stays false: the old containers are already detached, 4885 // so restyling them is wasted work.
4886 daSwipers.forEach(function (s) { 4887 try { s.destroy(true, false); } catch (e) { /* already dead is fine */ } 4888 }); 4889 daSwipers.length = 0; 4890 4891 if (daSwiperObserver) { 4892 daSwiperObserver.disconnect(); 4893 } 4894 4895 // Trim excess slides from EVERY card now, not on first intersection - 4896 // see the note on _limitSlidesPerVehicleCard. The in-intersect call 4897 // below stays as a belt for slides added late by anything else. 4898 _limitSlidesPerVehicleCard(); 4899 4900 /** 4901 * b/o: Allow the loading of Swipers when needed and scrolled into view 4902 * using the javascript intersection Observer API 4903 */ 4904 const observerOptions = { 4905 root: null, 4906 rootMargin: '0px', 4907 threshold: 0.2 // when 20% of the element is in view proceed with loading the swiper 4908 }; 4909 4910 function handleIntersect(entries, observer) { 4911 entries.forEach(entry => { 4912 if (entry.isIntersecting) { 4913 // Belt for slides added late by anything else, scoped to 4914 // the one carousel entering view - the unscoped call here 4915 // re-walked every wrapper on the page per intersecting 4916 // card, ~576 wrapper scans across one scrolled 24-card 4917 // page, all duplicating the render-time trim above. 4918 _limitSlidesPerVehicleCard(entry.target); 4919 _maybeRemoveSwiperNavigation(entry.target) 4920 // Initialize Swiper for this container 4921 daSwipers.push(new Swiper(entry.target, { 4922 loop: true, 4923 /** 4924 * Swiper's default touchAngle is 45 degrees, meaning it claims 4925 * any drag within 45 degrees of horizontal as a carousel swipe. 4926 * A thumb flick is rarely perfectly vertical, so on a phone - 4927 * where these cards fill most of the screen - a large share of 4928 * scroll attempts get swallowed by the carousel and the page 4929 * does not move. That reads exactly as "scrolling is stuck". 4930 * 4931 * 25 degrees keeps deliberate horizontal swipes working while 4932 * letting anything steeper scroll the page. 4933 */ 4934 touchAngle: 25, 4935 navigation: { 4936 nextEl: `.swiper-button-next`, 4937 prevEl: `.swiper-button-prev` 4938 } 4939 })); 4940 4941 observer.unobserve(entry.target); 4942 } 4943 }); 4944 } 4945 4946 daSwiperObserver = new IntersectionObserver(handleIntersect, observerOptions); 4947 // Get all of the swipers on the page 4948 let vehicleCardCarousels = document.querySelectorAll('.srp-swiper-vehicles'); 4949
4950 vehicleCardCarousels.forEach(slider => { 4951 daSwiperObserver.observe(slider); 4952 }); 4953 } 4954 4955 /* b/o: Image Aspect Ratio Fix */ 4956 4957 /** 4958 * Calculate a new height based on previous values as well as a new width 4959 * 4960 * @param newWidth the new width of the element to calulcate the height 4961 * @param originalWidth the original width of the item to find aspect ratio 4962 * @param originalHeight the original height of the item to find aspect ratio 4963 * @returns number 4964 */ 4965 function calculateHeight(newWidth, originalWidth, originalHeight) { 4966 const aspectRatio = originalWidth / originalHeight; 4967 const newHeight = newWidth / aspectRatio; 4968 return parseFloat(newHeight.toFixed(1)); 4969 } 4970 4971 /* 4972 * e/o: Image Aspect Ratio Fix 4973 * 4974 * _debounce/_onResize/_constrainImageAspectRatio were removed here. The 4975 * resize handler measured every card with jQuery .width() and then did 4976 * nothing with the result - the two lines that used it had been commented 4977 * out - so all it did was force a synchronous layout per vehicle card on 4978 * every render. It was also called from onRenderHandler, and each call 4979 * added another window resize listener that was never removed. 4980 * 4981 * It was the single largest remaining cost on this page: 2,863ms of forced 4982 * reflow attributed to jQuery's dimension getter while typing one search. 4983 * 4984 * Note: shortcodes/inventory-widget/sc.inventory-widget.php still carries a 4985 * copy of the same dead pattern. 4986 */ 4987 4988 /** 4989 * Render is deliberately split in two. 4990 * 4991 * instantsearch re-renders roughly 1.7 times per keystroke - measured at ten 4992 * renders for six typed characters on the used-vehicles SRP. The tail of this 4993 * handler re-initialises against the freshly built card DOM: Swiper carousels, 4994 * lazy-image observers, SmartPath, and the forms. None of that is incremental 4995 * state - every one rebuilds from the current result set - so running them on 4996 * an intermediate render produces work the next keystroke immediately throws 4997 * away. 4998 * 4999 * onRenderImmediate() is everything that keeps what is on screen truthful: 5000 * result counts, facet container visibility, filter tags. Delaying any of it 5001 * would leave stale numbers on screen while the user types. 5002 * 5003 * onRenderSettled() is everything that re-initialises, trailing-debounced so 5004 * it runs once when typing stops. 250ms rather than the 100ms used for the 5005 * search debounce above, because this work is an order of magnitude heavier 5006 * and none of it is visible state. 5007 * 5008 * Gated on Theme Options -> Performance -> "Defer post-render work on the SRP", 5009 * on by default, with the settle delay configurable there too. 5010 * ?da-render-split=off still runs both halves inline for this request only, so 5011 * support can rule it in or out on a live page without changing the setting. 5012 */ 5013 // Floor 100, matching the spinner: its old min of 0 made daTypingActive() 5014 // always false, which switched render-on-settle off while its switch still 5015 // read on. Below about 100ms neither feature does anything useful anyway. 5016 var DA_SETTLE_MS = 250; 5017 var daSettleTimer = null; 5018 var daRenderSplit = true && new URLSearchParams(window.location.search).get('da-render-split') !== 'off'; 5019 5020 function onRenderHandler() 5021 { 5022 /** 5023 * Cleared before the mid-burst return on purpose: a timer armed by 5024 * the last pre-burst render would otherwise fire DURING the typing 5025 * window the gate below exists to protect - full Swiper rebuild, 5026 * slide trims, a burned reaper generation, all for a render that 5027 * never happened. The settled render that follows the held response 5028 * re-arms it, so nothing is lost by clearing here. 5029 */ 5030 clearTimeout(daSettleTimer); 5031 5032 /** 5033 * Mid-burst, this render can only be loading-state churn: responses 5034 * are being held by the render-on-settle gate, so nothing on screen 5035 * has changed and both halves would run for nothing - measured at 5036 * ~4.7s of main-thread time across one fast-typed word on the 5037 * 4x-throttled bench, all of it between keystrokes the user was 5038 * still typing. The render that matters fires when the held response 5039 * delivers at settle, and typing is quiet by definition then, so 5040 * this guard is never true for it. 5041 */ 5042 if (daRenderOnSettle && daTypingActive()) 5043 { 5044 return; 5045 } 5046 5047 onRenderImmediate(); 5048 5049 if (!daRenderSplit) 5050 { 5051 onRenderSettled(); 5052 return; 5053 } 5054 5055 daSettleTimer = setTimeout(onRenderSettled, DA_SETTLE_MS); 5056 } 5057 5058 function onRenderImmediate() 5059 { 5060 // Update smartpath disclaimer 5061 SmartPathDisclaimer("Sale Pending", ".dv-sp-disclaimer"); 5062 5063 /** 5064 * If no card is in the view, and we are not on mobile, scroll to top. 5065 * 5066 * Delegated off document and namespaced, because onRenderHandler runs on 5067 * every render: the previous .click() bound a fresh handler to every 5068 * refinement label each time, so after N searches a single click ran N 5069 * copies - N viewport measurements and N scroll animations. Binding once 5070 * by delegation also survives the labels being replaced on re-render. 5071 */ 5072 var mobile = window.matchMedia("(max-width: 1024px)"); 5073 $(document) 5074 .off("click.daSrpScrollTop") 5075 .on("click.daSrpScrollTop", ".ais-RefinementList-label", function() { 5076 if (!$('.listing-container').isInViewport() && !mobile.matches) 5077 { 5078 $("html,body").animate({scrollTop:$(".result-wrapper").offset().top - 200},"1000"); 5079 } 5080 }); 5081 5082 // Lazy-image observers and the card carousels are built in 5083 // onRenderSettled() - see the note on the split above. 5084 5085 /** 5086 * Filter panel visibility, by class rather than jQuery show()/hide(). 5087 * 5088 * jQuery hide() is cheap - it just writes display:none - but show() has to 5089 * work out the element's default display, which means getComputedStyle 5090 * against a DOM the render has just dirtied. That is a forced synchronous 5091 * layout per call, and there are twenty calls here. Measured at 686ms for 5092 * 34 elements while typing a single search; hide() over the same run cost
5093 * 1ms. Toggling a class invalidates style without forcing a read. 5094 * 5095 * Equivalent because none of these containers is hidden by a stylesheet - 5096 * every one resolves to display:block from CSS alone, in the parent theme 5097 * and in every child theme - so removing the class lands them exactly 5098 * where show() would have. 5099 */ 5100 var daShow = function (sel) { $(sel).removeClass("da-srp-hidden"); }; 5101 var daHide = function (sel) { $(sel).addClass("da-srp-hidden"); }; 5102 5103 //If a filter list does not have no items in it, be sure it is shown 5104 $(".ais-RefinementList").not(".ais-RefinementList--noRefinement").each(function () { 5105 daShow($(this).parents().eq(1)); 5106 }); 5107 5108 //Hide any filter list that has no items in it 5109 $(".ais-RefinementList--noRefinement").each(function () { 5110 daHide($(this).parents().eq(1)); 5111 }); 5112 5113 if ($("#status-list > div > ul").children().length == 1) 5114 { 5115 daHide(".status-container"); 5116 } 5117 else 5118 { 5119 daShow(".status-container"); 5120 } 5121 5122 if ($("#engine-list > div > ul").children().length == 1) 5123 { 5124 daHide(".engine-container"); 5125 } 5126 else 5127 { 5128 daShow(".engine-container"); 5129 } 5130 5131 //If a make is selected, show the model filter list. 5132 if ($("#make-list ul li").hasClass("ais-RefinementList-item--selected")) 5133 { 5134 daShow(".model-container"); 5135 } 5136 else if ($("#make-list ul li").length > 1) 5137 { 5138 //If a make is not selected, and there is more than one make in the list, hide the model list 5139 daHide(".model-container"); 5140 } 5141 else 5142 { 5143 //Only one make is in the list, so keep model list showing, and hide the make list. 5144 daHide(".make-container"); 5145 } 5146 5147 //If a model is selected, show the trim filter list. 5148 if ($("#model-list ul li").hasClass("ais-RefinementList-item--selected") || $("#modelCategory-list ul li").hasClass("ais-RefinementList-item--selected")) 5149 { 5150 daShow(".trim-container"); 5151 } 5152 else 5153 { 5154 // 5155 daHide(".trim-container"); 5156 } 5157 5158 //If a truck is selected, show the cab/bed filter list. 5159 var child = $(".srp-Truck"); 5160 5161 if ($(child).parent().parent().parent().hasClass("ais-RefinementList-item--selected")) 5162 { 5163 daShow(".bed-container, .cab-container"); 5164 } 5165 else{ 5166 daHide(".bed-container, .cab-container"); 5167 } 5168 5169 //Show bed and cab info if Model name of truck is selected 5170 if($("#body-list div > ul").find("li").length === 1){ 5171 if ($(child).parent().parent().parent().hasClass("ais-RefinementList-item")) 5172 { 5173 daShow(".bed-container, .cab-container"); 5174 } 5175 else{ 5176 daHide(".bed-container, .cab-container"); 5177 } 5178 } 5179 5180 if ($(".fuel-container input[value='Electric']").is(":checked")) 5181 { 5182 $(".range.container").show(); 5183 } 5184 else 5185 { 5186 $(".range-container").hide(); 5187 } 5188 5189 /** 5190 * Change mobile filter bar color when a filter is selected. 5191 * 5192 * Delegated and namespaced for the same reason as the scroll-top handler 5193 * above: .click() bound a fresh handler on every render, so after N renders 5194 * one tap ran N copies. Typing six characters is ten renders. 5195 */ 5196 $(document) 5197 .off("click.daSrpFilterBar") 5198 .on("click.daSrpFilterBar", ".ais-RefinementList-item", function () { 5199 $('.showFiltersNonLegacy').css('background-color', '#000000'); 5200 $('.showFiltersNonLegacy').css('color', '#FFFFFF'); 5201 }); 5202 5203 //Results X of X Text 5204 if(parseInt($("#numberHits").text().replace(/,/g,''), 10) < 24) 5205 { 5206 $('#hitsPage').text($("#numberHits").text()); 5207 } 5208 else if (parseInt($('.ais-Pagination-item--selected > .ais-Pagination-link').attr('aria-label'), 10) > 1) 5209 { 5210 var page = parseInt($('.ais-Pagination-item--selected > .ais-Pagination-link').attr('aria-label'), 10); 5211 var hits = 24 * (page - 1); 5212 $('#hitsStart').text(hits); 5213 var hitsOnPage = parseInt($('#numberHits').text().replace(/,/g,''), 10); 5214 if ((hitsOnPage - (hits)) < 24) 5215 { 5216 $('#hitsPage').text(hitsOnPage); 5217 } 5218 else 5219 { 5220 $('#hitsPage').text((hits) + 24); 5221 } 5222 } 5223 else 5224 { 5225 $("#hitsStart").text(1); 5226 $("#hitsPage").text(24); 5227 } 5228 5229 5230 //Deselection of facets based on hierarchy - delegated, same reasoning as above. 5231 $(document) 5232 .off("click.daSrpFacetHierarchy")
5233 .on("click.daSrpFacetHierarchy", "#make-list ul li, #trim-list ul li, #model-list ul li", function () { 5234 if ($(this).hasClass("ais-RefinementList-item--selected")) { 5235 userInteractedWithFacets = true; 5236 checkAndRemoveFacets(); 5237 } 5238 }); 5239 5240 // $(".srp-integrations-video").click(function() { 5241 // showVideo(event, $(this).attr('data-video-url')); 5242 // }); 5243 5244 //Hide filter tags if there are no current selected filters 5245 if ($("#filterTags .ais-CurrentRefinements-list").has('li').length == 0) 5246 { 5247 $("#filterTags").hide(); 5248 $(".dv-srp-filter-clear-btn").hide(); 5249 $(".dv-srp-filter-tags").hide(); 5250 } 5251 else 5252 { 5253 $("#filterTags").show(); 5254 $(".dv-srp-filter-clear-btn").css('display', 'inline-flex'); 5255 $(".dv-srp-filter-tags").show(); 5256 } 5257 5258 } 5259 5260 /** 5261 * Watch an image for the moment it can first paint. 5262 * 5263 * <img> exposes only load and error, and both fire when the LAST byte arrives. 5264 * naturalWidth, by contrast, becomes non-zero as soon as the browser has parsed 5265 * the image header - well before the download finishes, and the point from which 5266 * it has both dimensions and pixels to draw. That is the closest thing the 5267 * platform gives us to a "started rendering" signal. 5268 * 5269 * It is also exactly when the CSS placeholder box stops being needed: until 5270 * naturalWidth is known the image cannot size itself, and after it can. So the 5271 * same signal clears the spinner and releases the reserved box. 5272 * 5273 * One shared rAF loop rather than a timer per image: a 24-card page has ~120 5274 * images in flight, and this is one callback per frame instead of 120. 5275 */ 5276 var daPainting = []; 5277 var daPaintRaf = null; 5278 5279 function daPaintTick() 5280 { 5281 for (var i = daPainting.length - 1; i >= 0; i--) 5282 { 5283 var watch = daPainting[i]; 5284 5285 if (!watch.img.isConnected || watch.img.naturalWidth > 0) 5286 { 5287 daPainting.splice(i, 1); 5288 watch.done(); 5289 } 5290 } 5291 5292 daPaintRaf = daPainting.length ? requestAnimationFrame(daPaintTick) : null; 5293 } 5294 5295 function daWatchFirstPaint(img, done) 5296 { 5297 daPainting.push({ img: img, done: done }); 5298 5299 if (daPaintRaf === null) 5300 { 5301 daPaintRaf = requestAnimationFrame(daPaintTick); 5302 } 5303 } 5304 5305 /** 5306 * Trailing-debounced half of the render. 5307 * 5308 * Everything here re-initialises against the freshly rendered cards and 5309 * rebuilds from the current result set, so running it once after typing stops 5310 * is equivalent to running it on every intermediate render - minus the work 5311 * that was being discarded. Anything added here must be idempotent. 5312 */ 5313 function onRenderSettled() 5314 { 5315 /** 5316 * A settled render is a listener generation boundary. 5317 * 5318 * The reaper (template/partials/observer-governor.php, on by default) 5319 * tracks document-level listeners bound by vendors that re-decorate the 5320 * cards on every render and never unbind - dg-inline-save-heart being 5321 * the measured one. Telling it a render settled lets it retire the 5322 * batches serving cards that no longer exist. No-op when the partial 5323 * did not emit the reaper. 5324 */ 5325 if (window.DAListenerReaper) 5326 { 5327 window.DAListenerReaper.advance(); 5328 } 5329 5330 //Image lazy loading 5331 var lazyImages = [].slice.call(document.querySelectorAll("img.lazy")); 5332 if ("IntersectionObserver" in window) 5333 { 5334 let lazyImageObserver = new IntersectionObserver(function (entires, observer) { 5335 entires.forEach(function (entry) { 5336 if (entry.isIntersecting) 5337 { 5338 let lazyImage = entry.target; 5339 5340 /** 5341 * Clear the Swiper preloader once the image resolves. 5342 * 5343 * Bound BEFORE src is assigned: a cached image can fire load 5344 * synchronously on assignment, and a listener attached after 5345 * that would never run - leaving the spinner going forever. 5346 * 5347 * Error is handled too. A dead image URL should show the 5348 * browser's own broken state rather than spin indefinitely, 5349 * which at least reads as 'failed' instead of 'still trying'. 5350 */ 5351 let clearPreloader = function () { 5352 let slide = lazyImage.parentElement; 5353 let preloader = slide && slide.querySelector(".swiper-lazy-preloader"); 5354 5355 if (preloader) 5356 { 5357 preloader.remove(); 5358 } 5359 5360 lazyImage.classList.remove("da-img-loading"); 5361 }; 5362 5363 lazyImage.addEventListener("load", clearPreloader, { once: true }); 5364 lazyImage.addEventListener("error", clearPreloader, { once: true }); 5365 5366 lazyImage.src = lazyImage.dataset.src; 5367 5368 /** 5369 * Hand the reserved box from .lazy to .da-img-loading rather 5370 * than dropping it here. 5371 * 5372 * Removing .lazy on its own released the placeholder box the 5373 * instant src was assigned - before a single byte had arrived, 5374 * so the image still had no intrinsic size and the slide 5375 * collapsed back to its 16px alt-text line box. The spinner 5376 * centres on the slide, so it visibly jumped to the top and 5377 * then returned once the photo landed. 5378 * 5379 * .da-img-loading keeps the box but not the visibility:hidden, 5380 * so a progressive image paints as it arrives instead of 5381 * appearing all at once at the end. 5382 */ 5383 lazyImage.classList.remove("lazy"); 5384 lazyImage.classList.add("da-img-loading"); 5385 5386 daWatchFirstPaint(lazyImage, clearPreloader); 5387 5388 lazyImageObserver.unobserve(lazyImage); 5389 } 5390 }); 5391 }); 5392
5393 lazyImages.forEach(function (lazyImage) { 5394 lazyImageObserver.observe(lazyImage); 5395 }); 5396 } 5397 5398 // Initialize vehicle images carousel 5399 _buildSRPImageCarousel(); 5400 5401 5402 //Disable then reenabled the forms. 5403 disableForms(); 5404 5405 initForms(); 5406 5407 5408 //SD Analytics 5409 if (haveSdAnalytics && typeof(sd) !== "undefined") 5410 { 5411 var numberHits = $("#numberHits").text(); 5412 5413 if (numberHits === '0' || numberHits === "") { 5414 5415 if (sdInitialFilterSearchSent) { 5416 sd('dataLayer', { 5417 formType: getSDFormType($(".gform_title", $(".popup_form#srp_form_container")).text(), $(".popup_form#srp_form_container form")[0]), 5418 displayType: 'modal', 5419 events: 'formShown' 5420 }); 5421 sd('send'); 5422 } else { 5423 sdFormShownPending = true; 5424 } 5425 5426 /** 5427 * Delegated and namespaced so re-running this branch replaces the 5428 * handler instead of stacking another one. See sdFormInitHandled 5429 * at the top of the file for what the stacking actually cost. 5430 * 5431 * Bound off document rather than the wrapper because the form markup 5432 * is replaced when the modal is rebuilt, which would strip a handler 5433 * bound directly to the inputs. 5434 */ 5435 sdFormInitHandled = false; 5436 5437 $(document) 5438 .off("click.daSrpSdFormInit") 5439 .on("click.daSrpSdFormInit", ".gform_wrapper input", function () { 5440 if (sdFormInitHandled) 5441 { 5442 return; 5443 } 5444 5445 sendShiftDigitalFormEvent({ 5446 formType: getSDFormType($(".gform_title", $(".popup_form#srp_form_container")).text(), $(".popup_form#srp_form_container form")[0]), 5447 displayType: 'modal', 5448 eventName: 'formInitiation' 5449 }); 5450 5451 sdFormInitHandled = true; 5452 }); 5453 5454 $(document) 5455 .off("input.daSrpSdField change.daSrpSdField") 5456 .on("input.daSrpSdField change.daSrpSdField", ".gform_wrapper input, .gform_wrapper textarea, .gform_wrapper select", function () { 5457 if (shouldTrackShiftDigitalFieldInteraction(this)) 5458 { 5459 sendShiftDigitalFormEvent({ 5460 formType: getSDFormType($(".gform_title", $(".popup_form#srp_form_container")).text(), $(".popup_form#srp_form_container form")[0]), 5461 displayType: 'modal', 5462 eventName: 'formFieldInteraction', 5463 fieldTarget: this 5464 }); 5465 } 5466 }); 5467 } 5468 5469 } 5470 } 5471 5472 5473search.on('render', onRenderHandler); 5474search.on('render', handleSdSrpRenderAnalytics); 5475 5476/** 5477 * Tell governed third parties a render happened, rather than leaving them to 5478 * infer it from thousands of mutation records. See 5479 * template/partials/observer-governor.php - a no-op if that is not loaded. 5480 * 5481 * Second argument stays false: the sentinel wakes anything that rescans the DOM 5482 * on its own, which covers the vendors currently governed. Only pass true for a 5483 * vendor that reads addedNodes to find new content, and verify it there first. 5484 */ 5485search.on('render', function () { 5486 if (window.DAObserverGovernor) { 5487 window.DAObserverGovernor.notify('#srp-results', false); 5488 } 5489}); 5490 5491search.on('render', (() => { 5492 let timer; 5493 return () => { 5494 clearTimeout(timer); 5495 timer = setTimeout(() => { 5496 document.dispatchEvent(new CustomEvent('srp:renderStart')); 5497 // give time for the instantsearch lib to render 5498 requestAnimationFrame(() => { 5499 document.dispatchEvent(new CustomEvent('srp:renderComplete')); 5500 }); 5501 }, 200); 5502 }; 5503})()); 5504 5505searchClient.search([{indexName: indexName, params: {query: '', hitsPerPage: 0, facets: ['exteriorHex']}}]) 5506 .then(function(res) { 5507 var colorAttr = (res.results[0].facets && res.results[0].facets['exteriorHex']) ? 'exteriorHex' : 'genericColor'; 5508 search.addWidget(instantsearch.widgets.refinementList({ 5509 container: '#color-list', 5510 attribute: colorAttr, 5511 operator: 'or', 5512 // Swatches opt out of daFacetLimit - a Show more button would land 5513 // inside the flex grid - but still need a limit over the default 10. 5514 limit: 100000, 5515 templates: { item: "<i style=\"background: {{value}};\" class=far fa-check\"></i>" } 5516 })); 5517 search.start(); 5518 }) 5519 .catch(function() { 5520 search.addWidget(instantsearch.widgets.refinementList({ 5521 container: '#color-list', 5522 attribute: 'genericColor', 5523 operator: 'or', 5524 limit: 100000, 5525 templates: { item: "<i style=\"background: {{value}};\" class=far fa-check\"></i>" } 5526 })); 5527 search.start(); 5528 }); 5529 5530/** 5531 * Mobile keyboard affordances for the search box. 5532 * 5533 * InstantSearch renders the field itself, so these are applied after start(). 5534 * Two problems on a phone: the Return key had no clear meaning, and once the 5535 * keyboard was up there was no obvious way down - the field sits near the top 5536 * of the page with no surrounding tappable dead space. 5537 * 5538 * - enterkeyhint labels the Return key "Search" on iOS and Android. 5539 * - Submitting blurs, so Return actually closes the keyboard. InstantSearch 5540 * already suppresses the form's default submit, so nothing navigates. 5541 * - Scrolling the results blurs too. This is the usual mobile search pattern: 5542 * once you scroll, you are reading results rather than typing. Gated on a 5543 * real scroll distance so a stray pixel of movement does not dismiss it, 5544 * and on touch input so desktop is unaffected. 5545 */ 5546function daSetupSearchBoxKeyboard() { 5547 var searchInput = document.querySelector('#searchbox .ais-SearchBox-input'); 5548 5549 // Depending on the branch above, start() happens inside a promise, so the 5550 // field may not exist yet. Bound off 'render' and guarded, rather than run 5551 // inline - an earlier inline version silently did nothing for exactly this 5552 // reason, and looked like it worked because InstantSearch blurs on submit 5553 // by itself. 5554 if (!searchInput || searchInput.dataset.daKeyboardReady) { 5555 return; 5556 } 5557 5558 searchInput.dataset.daKeyboardReady = '1'; 5559 searchInput.setAttribute('enterkeyhint', 'search'); 5560 5561 if (window.matchMedia('(hover: none)').matches) { 5562 // Anchor on focus, not on the first scroll event. Anchoring on the first 5563 // event measures the delta from wherever that event already landed, which 5564 // is zero for anything but a slow drag. 5565 var scrollAnchor = null; 5566 5567 /** 5568 * Only a scroll the user actually drove should dismiss the keyboard. 5569 * 5570 * The first version of this compared scroll distance alone, which broke 5571 * tapping the field on iOS whenever the page was scrolled even slightly. 5572 * Focusing an input on iOS makes the BROWSER scroll: the keyboard shrinks 5573 * the visual viewport, and a collapsed address bar expands. Both move 5574 * window.scrollY well past this threshold within a frame or two of focus, 5575 * so the handler blurred the field the moment it was tapped. It worked at 5576 * the very top of the page only because there was nothing to adjust. 5577 * 5578 * A drag produces touchmove. Browser-driven scroll does not, so requiring 5579 * a recent touchmove separates the two. Anything else re-anchors instead
5580 * of dismissing, which also covers the keyboard opening mid-session. 5581 */ 5582 var lastTouchMove = 0; 5583 5584 document.addEventListener('touchmove', function () { 5585 lastTouchMove = Date.now(); 5586 }, { passive: true }); 5587 5588 searchInput.addEventListener('focus', function () { 5589 scrollAnchor = window.scrollY; 5590 }); 5591 5592 searchInput.addEventListener('blur', function () { 5593 scrollAnchor = null; 5594 }); 5595 5596 // Keyboard show/hide relays out the page. Re-anchor rather than reading it 5597 // as the shopper scrolling away from the field. 5598 if (window.visualViewport) { 5599 window.visualViewport.addEventListener('resize', function () { 5600 if (scrollAnchor !== null) { 5601 scrollAnchor = window.scrollY; 5602 } 5603 }); 5604 } 5605 5606 window.addEventListener('scroll', function () { 5607 if (scrollAnchor === null || document.activeElement !== searchInput) { 5608 return; 5609 } 5610 5611 if (Date.now() - lastTouchMove > 500) { 5612 scrollAnchor = window.scrollY; 5613 return; 5614 } 5615 5616 if (Math.abs(window.scrollY - scrollAnchor) > 40) { 5617 searchInput.blur(); 5618 } 5619 }, { passive: true }); 5620 } 5621} 5622 5623search.on('render', daSetupSearchBoxKeyboard); 5624daSetupSearchBoxKeyboard(); 5625 5626$.fn.isInViewport = function() { 5627 var elementTop = $(this).offset().top; 5628 var elementBottom = elementTop + $(this).outerHeight(); 5629 5630 var viewportTop = $(window).scrollTop(); 5631 var viewportBottom = viewportTop + $(window).height(); 5632 5633 return elementBottom > viewportTop && elementTop < viewportBottom; 5634}; 5635 5636/** 5637 * Reads the current InstantSearch helper state for the supported Shift Digital 5638 * filterSearch fields and returns a pipe-delimited value string. 5639 * 5640 * We intentionally read from the live helper refinements instead of the URL 5641 * because the router can lag one render behind on select/deselect interactions. 5642 * 5643 * @param {object} state 5644 * @param {string[]} keys 5645 * @returns {string} 5646 */ 5647function getSdStateFilterValues(state, keys) { 5648 var refinementSources = [ 5649 state.disjunctiveFacetsRefinements || {}, 5650 state.facetsRefinements || {}, 5651 state.hierarchicalFacetsRefinements || {} 5652 ]; 5653 5654 for (var sourceIndex = 0; sourceIndex < refinementSources.length; sourceIndex++) { 5655 var source = refinementSources[sourceIndex]; 5656 5657 for (var keyIndex = 0; keyIndex < keys.length; keyIndex++) { 5658 var key = keys[keyIndex]; 5659 var values = source[key]; 5660 5661 if (!values) { 5662 continue; 5663 } 5664 5665 if (!Array.isArray(values)) { 5666 values = [values]; 5667 } 5668 5669 values = values.filter(Boolean); 5670 5671 if (values.length > 0) { 5672 return values.join("|"); 5673 } 5674 } 5675 } 5676 5677 return "All"; 5678} 5679 5680/** 5681 * Reads a numeric range slider value from the InstantSearch helper state, 5682 * falling back to the facet stats (full inventory bounds) when the user 5683 * has not moved the slider. 5684 * 5685 * @param {object} helperState search.helper.state 5686 * @param {string} attribute The Algolia attribute name (e.g. 'rangeSliderPrice', 'yr') 5687 * @param {function|null} formatter Optional formatter for min/max values 5688 * @returns {string} 5689 */ 5690function getSdNumericRangeValue(helperState, attribute, formatter) { 5691 var refinements = (helperState.numericRefinements || {})[attribute] || {}; 5692 var stats = {}; 5693 5694 if (search.helper && search.helper.lastResults && search.helper.lastResults.disjunctiveFacets) { 5695 var facet = search.helper.lastResults.disjunctiveFacets.find(function(f) { return f.name === attribute; }); 5696 if (facet && facet.stats) { 5697 stats = facet.stats; 5698 } 5699 } 5700 5701 var min = refinements[">="] ? refinements[">="][0] : (stats.min != null ? stats.min : null); 5702 var max = refinements["<="] ? refinements["<="][0] : (stats.max != null ? stats.max : null); 5703 5704 if (min === null && max === null) { 5705 return "All"; 5706 } 5707 5708 if (formatter) { 5709 return formatter(min) + " - " + formatter(max); 5710 } 5711 5712 return min + " - " + max; 5713} 5714 5715/** 5716 * Returns the year for the Shift Digital filterSearch payload. 5717 * 5718 * Shift Digital wants a single year only when the shopper has actually narrowed 5719 * to one. Every "more than one year is showing" case reports "All" - including a 5720 * year slider spanning a range, which previously reported a shared "2015 - 2026" 5721 * string that read as two values in one prop. 5722 * 5723 * @param {object} helperState search.helper.state 5724 * @returns {string} 5725 */ 5726function getSdYearValue(helperState) { 5727 var yearFacetSelection = getSdStateFilterValues(helperState, ["year", "yr"]); 5728 5729 if (yearFacetSelection !== "All") { 5730 return yearFacetSelection.indexOf("|") === -1 ? yearFacetSelection : "All"; 5731 } 5732 5733 // Only a slider collapsed onto one year counts as picking a year. 5734 var sliderRefinements = (helperState.numericRefinements || {})["yr"] || {}; 5735 var min = sliderRefinements[">="] ? sliderRefinements[">="][0] : null; 5736 var max = sliderRefinements["<="] ? sliderRefinements["<="][0] : null; 5737 5738 if (min !== null && max !== null && Number(min) === Number(max)) { 5739 return String(Math.round(min)); 5740 } 5741 5742 return "All"; 5743} 5744 5745/** 5746 * Returns the min and max price as plain integers for the Shift Digital 5747 * filterSearch payload. Checks finalPriceRange bucket selections first, 5748 * then falls back to the rangeSliderPrice numeric refinements, then to 5749 * the full facet stats (inventory bounds) when no filter is active. 5750 * 5751 * @returns {{min: number|null, max: number|null}} 5752 */ 5753function getSdPriceBounds(helperState) { 5754 var refinementSources = [ 5755 helperState.disjunctiveFacetsRefinements || {}, 5756 helperState.facetsRefinements || {} 5757 ]; 5758 5759 for (var i = 0; i < refinementSources.length; i++) { 5760 var buckets = refinementSources[i]["finalPriceRange"]; 5761 if (buckets && buckets.length > 0) { 5762 var vals = Array.isArray(buckets) ? buckets : [buckets]; 5763 var mins = []; 5764 var maxes = []; 5765
5766 vals.forEach(function(bucket) { 5767 var s = bucket.replace(/[$,]/g, ''); 5768 var below = s.match(/^(\d+)\s+and\s+Below$/i); 5769 var above = s.match(/^(\d+)\s+and\s+Up$/i); 5770 var range = s.match(/^(\d+)\s+-\s+(\d+)$/); 5771 5772 if (below) { mins.push(0); maxes.push(parseInt(below[1], 10)); } 5773 else if (above) { mins.push(parseInt(above[1], 10)); } 5774 else if (range) { mins.push(parseInt(range[1], 10)); maxes.push(parseInt(range[2], 10)); } 5775 }); 5776 5777 if (mins.length > 0 || maxes.length > 0) { 5778 return { 5779 min: mins.length > 0 ? Math.min.apply(null, mins) : null, 5780 max: maxes.length > 0 ? Math.max.apply(null, maxes) : null 5781 }; 5782 } 5783 } 5784 } 5785 5786 var sliderRefinements = (helperState.numericRefinements || {})["rangeSliderPrice"] || {}; 5787 var stats = {}; 5788 5789 if (search.helper && search.helper.lastResults && search.helper.lastResults.disjunctiveFacets) { 5790 var priceFacet = search.helper.lastResults.disjunctiveFacets.find(function(f) { 5791 return f.name === "rangeSliderPrice"; 5792 }); 5793 if (priceFacet && priceFacet.stats) { 5794 stats = priceFacet.stats; 5795 } 5796 } 5797 5798 var min = sliderRefinements[">="] ? sliderRefinements[">="][0] : (stats.min != null ? stats.min : null); 5799 var max = sliderRefinements["<="] ? sliderRefinements["<="][0] : (stats.max != null ? stats.max : null); 5800 5801 return { 5802 min: min !== null ? Math.round(min) : null, 5803 max: max !== null ? Math.round(max) : null 5804 }; 5805} 5806 5807/** 5808 * Builds the Shift Digital filterSearch payload from the current InstantSearch 5809 * helper state. 5810 * 5811 * This keeps supported facet values in sync with the interaction that triggered 5812 * the render instead of relying on URL parameters that may still reflect the 5813 * previous refinement state. 5814 * 5815 * @returns {{status: string, minPrice: number|null, maxPrice: number|null, year: string, mileage: string, make: string, model: string, color: string, trim: string, bodyStyle: string, features: string, drivetrain: string}} 5816 */ 5817function buildSdFilterSearchPayload() { 5818 var helperState = search.helper && search.helper.state ? search.helper.state : {}; 5819 var status = "All"; 5820 var certificationRefinements = getSdStateFilterValues(helperState, ["flags.type"]); 5821 5822 if (certificationRefinements !== "All") { 5823 var selectedCount = certificationRefinements.split("|").length; 5824 var totalCount = 0; 5825 5826 if (search.helper && search.helper.lastResults) { 5827 var facetValues = search.helper.lastResults.getFacetValues("flags.type"); 5828 if (Array.isArray(facetValues)) { 5829 totalCount = facetValues.length; 5830 } 5831 } 5832 5833 if (totalCount > 0 && selectedCount >= totalCount) { 5834 status = "Mixed"; 5835 } else { 5836 status = "CPO"; 5837 } 5838 } else if (srpCondition) { 5839 status = srpCondition; 5840 } 5841 5842 /** 5843 * Handle price, year, and mileage as special cases since they can be either a range facet refinement or a numeric slider refinement depending on how the user has interacted with the filters. 5844 */ 5845 var priceBounds = getSdPriceBounds(helperState); 5846 var year = getSdYearValue(helperState); 5847 5848 var mileageRangeSelection = getSdStateFilterValues(helperState, ["mileageRange"]); 5849 var mileage = mileageRangeSelection !== "All" ? mileageRangeSelection : getSdNumericRangeValue(helperState, "mileage", function(v) { return Number(v).toLocaleString(); }); 5850 5851 return { 5852 status: status, 5853 minPrice: priceBounds.min, 5854 maxPrice: priceBounds.max, 5855 year: year, 5856 mileage: mileage, 5857 make: getSdStateFilterValues(helperState, ["make"]), 5858 model: getSdStateFilterValues(helperState, ["model"]), 5859 color: getSdStateFilterValues(helperState, ["genericColor", "generic_color"]), 5860 trim: getSdStateFilterValues(helperState, ["trim"]), 5861 bodyStyle: getSdStateFilterValues(helperState, ["body"]), 5862 features: getSdStateFilterValues(helperState, ["features"]), 5863 drivetrain: getSdStateFilterValues(helperState, ["drivetrain"]) 5864 }; 5865} 5866 5867/** 5868 * Creates a stable signature for the current search helper state so we can 5869 * detect real SRP refinement changes across renders. 5870 * 5871 * This is used only as change detection. The actual Shift Digital payload is 5872 * still built separately from the supported helper refinements. 5873 * 5874 * @returns {string} 5875 */ 5876function buildSdSearchStateSignature() { 5877 if (!search.helper || !search.helper.state) { 5878 return JSON.stringify({ 5879 query: "", 5880 disjunctiveFacetsRefinements: {}, 5881 facetsRefinements: {}, 5882 hierarchicalFacetsRefinements: {}, 5883 numericRefinements: {} 5884 }); 5885 } 5886 5887 return JSON.stringify({ 5888 query: search.helper.state.query || "", 5889 disjunctiveFacetsRefinements: search.helper.state.disjunctiveFacetsRefinements || {}, 5890 facetsRefinements: search.helper.state.facetsRefinements || {}, 5891 hierarchicalFacetsRefinements: search.helper.state.hierarchicalFacetsRefinements || {}, 5892 numericRefinements: search.helper.state.numericRefinements || {} 5893 }); 5894} 5895 5896/**
5897 * Builds a signature of only the facet/numeric refinement state (excludes 5898 * the search query) so facet-only changes can be distinguished from 5899 * query-only changes. 5900 * 5901 * @returns {string} 5902 */ 5903function buildSdFacetStateSignature() { 5904 if (!search.helper || !search.helper.state) { 5905 return JSON.stringify({ 5906 disjunctiveFacetsRefinements: {}, 5907 facetsRefinements: {}, 5908 hierarchicalFacetsRefinements: {}, 5909 numericRefinements: {} 5910 }); 5911 } 5912 5913 return JSON.stringify({ 5914 disjunctiveFacetsRefinements: search.helper.state.disjunctiveFacetsRefinements || {}, 5915 facetsRefinements: search.helper.state.facetsRefinements || {}, 5916 hierarchicalFacetsRefinements: search.helper.state.hierarchicalFacetsRefinements || {}, 5917 numericRefinements: search.helper.state.numericRefinements || {} 5918 }); 5919} 5920 5921/** 5922 * Sends the SRP pageview and filterSearch payload to Shift Digital for the 5923 * current search state. 5924 * 5925 * @returns {void} 5926 */ 5927function sendSdSrpPageViewAndFilterSearch() { 5928 sd('dataLayer', { 5929 pageType: 'Vehicle Listing', 5930 websiteTier: 'Tier 3', 5931 pageBrand: 'Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford', 5932 sessionId: (window.daSessionId ? window.daSessionId() : ''), 5933 language: 'en', //note(ethan): need to change this to allow translations 5934 trafficType: 'Organic Search', 5935 dealerZipCode: '', 5936 dealerState: 'Missouri', 5937 dealerCity: '', 5938 dealerName: 'Max Motors', 5939 dealerTda: '', 5940 siteTechnologyVersion: '2.0031', 5941 userZipCode: '', //note(ethan): add user location 5942 userCity: '', 5943 userState: '' 5944 }); 5945 sd('send', 'pageview'); 5946 5947 sd('dataLayer', { 5948 countSearchResults: $("#numberHits").text(), 5949 filterSearch: buildSdFilterSearchPayload(), 5950 events: 'filterSearch' 5951 }); 5952 sd('send'); 5953} 5954 5955/** 5956 * Sends the pageview and filterSearch owed to a query-only search. 5957 * 5958 * Called straight after typedSearch so Shift Digital sees 5959 * typedSearch -> pageview -> filterSearch, and off a timer when the query 5960 * changed without anything being typed. 5961 * 5962 * @returns {void} 5963 */ 5964function flushSdQueryAnalytics() { 5965 clearTimeout(sdQueryAnalyticsTimer); 5966 sdQueryAnalyticsTimer = null; 5967 5968 if (!sdQueryAnalyticsPending) { 5969 return; 5970 } 5971 5972 sdQueryAnalyticsPending = false; 5973 sendSdSrpPageViewAndFilterSearch(); 5974} 5975 5976/** 5977 * Watches InstantSearch render cycles and dispatches Shift Digital analytics 5978 * only when the underlying helper state has actually changed. 5979 * 5980 * The helper state signature prevents duplicate sends on unrelated renders 5981 * while still allowing select and deselect facet actions to be tracked. 5982 * 5983 * Facet changes send immediately. Query changes defer to flushSdQueryAnalytics 5984 * so typedSearch keeps its place at the front of the sequence. 5985 * 5986 * @returns {void} 5987 */ 5988function handleSdSrpRenderAnalytics() { 5989 if (!(haveSdAnalytics && typeof(sd) !== "undefined")) { 5990 return; 5991 } 5992 5993 if (!search.helper || !search.helper.lastResults) { 5994 return; 5995 } 5996 5997 var nextSdSearchStateSignature = buildSdSearchStateSignature(); 5998 var nextSdFacetStateSignature = buildSdFacetStateSignature(); 5999 var nextSdQuery = search.helper.state.query || ""; 6000 6001 if (lastSdSearchStateSignature === null) { 6002 lastSdSearchStateSignature = nextSdSearchStateSignature; 6003 lastSdFacetStateSignature = nextSdFacetStateSignature; 6004 lastSdQuery = nextSdQuery; 6005 return; 6006 } 6007 6008 var facetsChanged = nextSdFacetStateSignature !== lastSdFacetStateSignature; 6009 var queryChanged = nextSdQuery !== lastSdQuery; 6010 lastSdSearchStateSignature = nextSdSearchStateSignature; 6011 lastSdFacetStateSignature = nextSdFacetStateSignature; 6012 lastSdQuery = nextSdQuery; 6013 6014 if (facetsChanged) { 6015 // The facet send carries the current query too, so one send covers both. 6016 sdQueryAnalyticsPending = false; 6017 clearTimeout(sdQueryAnalyticsTimer); 6018 sdQueryAnalyticsTimer = null; 6019 6020 var deferAnalyticsUpdate = window.requestIdleCallback || function(callback) { 6021 setTimeout(callback, 0); 6022 }; 6023 6024 deferAnalyticsUpdate(function () { 6025 sendSdSrpPageViewAndFilterSearch(); 6026 }); 6027 6028 return; 6029 } 6030 6031 if (queryChanged) { 6032 sdQueryAnalyticsPending = true; 6033 clearTimeout(sdQueryAnalyticsTimer); 6034 sdQueryAnalyticsTimer = setTimeout(flushSdQueryAnalytics, 1200); 6035 } 6036} 6037 6038$(document).ready(function () { 6039 6040 // srp filter toggle buttons 6041 $(".srp-panel-toggle > span").click(function () { 6042 $(this).siblings("div").slideToggle("slow"); 6043 $(this).find("a > i").toggleClass("chevron-flip"); 6044 }); 6045 6046 $(document).on("input", ".ais-SearchBox-input", function() { 6047 clearTimeout(searchChangedTimer); 6048 searchChangedTimer = setTimeout(function() { 6049 if (haveSdAnalytics && typeof(sd) !== "undefined") { 6050 sd('dataLayer', { 6051 typedSearchContent: $(".ais-SearchBox-input").val().replace(/ /g, "|"), 6052 events: 'typedSearch' 6053 }); 6054 sd('send'); 6055 6056 // typedSearch is out the door, so the query's pageview and 6057 // filterSearch can follow it. 6058 flushSdQueryAnalytics(); 6059 } 6060 }, 800); 6061 }); 6062 6063 $(".showFiltersNonLegacy").click(function() { 6064 toggleFilters(); 6065 }); 6066 6067 $(".srp-filters-close-btn, .filterResultCount, .srpFilterResultCount").click(function() { 6068 toggleFilters(); 6069 }); 6070 6071 //Close mobile filters when a search is entered 6072 $('input[type=search]').on('search', function () { 6073 if ($('.side-panel-container').hasClass('mobileFilters')) 6074 { 6075 toggleFilters(); 6076 } 6077 }); 6078 6079 // Clear filters and set the filters bar back to the normal color 6080 $("#dv-srp-clear-filters, #srp-filters-reset-btn").click(function() { 6081 search.helper.setQuery('').search(); 6082 }); 6083 6084 // Clear Search bar 6085 $("#clearSearchResults").click(function() { 6086 document.querySelector('#clearSearchResults').style.display = "none"; 6087 search.helper.setQuery('').search(); 6088 }); 6089 6090 var placeholderText = [ 6091 ]; 6092 6093 var placeholderTextVoice = [ 6094 "Listening, Say \"Show Me a Red " + new Date().getFullYear() + " Chrysler, Dodge, Jeep, RAM, Chevrolet, GMC, Ford with Navigation\"", 6095 ]; 6096 6097 //Change mobile filters bar when text is typed in the searchbar 6098 $('.ais-SearchBox-input').change(function () { 6099 $('.showFiltersNonLegacy').css('background-color', '#000000'); 6100 $('.showFiltersNonLegacy').css('color', '#FFFFFF'); 6101 }) 6102 6103 //Make vehicle cars click into the VDP 6104 $(document.body).on("click", ".car-title, .srp-slider-buttons, .srp-click-image", function (e) { 6105 var vehicle_url = $(this).parents(".listing-container").attr("data-url") 6106 if (vehicle_url) { 6107 window.location = vehicle_url; 6108 } else { 6109 console.warn("`vehicle_url` was not found on the .listing-container"); 6110 } 6111 }); 6112 6113 6114 $('.year-container > div').slideToggle("slow"); 6115 $(".year-container > span > a > i").toggleClass("chevron-flip"); 6116 6117 6118 $('.pricerange-container > div').slideToggle("slow"); 6119 $(".pricerange-container > span > a > i").toggleClass("chevron-flip"); 6120 6121 6122 $('.mileagerange-container > div').slideToggle("slow"); 6123 $(".mileagerange-container > span > a > i").toggleClass("chevron-flip"); 6124 6125 6126 $('.body-container > div').slideToggle("slow"); 6127 $(".body-container > span > a > i").toggleClass("chevron-flip"); 6128 6129 6130 $('.fuel-container > div').slideToggle("slow"); 6131 $(".fuel-container > span > a > i").toggleClass("chevron-flip"); 6132 6133 6134 $('.transmission-container > div').slideToggle("slow"); 6135 $(".transmission-container > span > a > i").toggleClass("chevron-flip"); 6136 6137 6138 $('.color-container > div').slideToggle("slow"); 6139 $(".color-container > span > a > i").toggleClass("chevron-flip"); 6140 6141 6142 $('.drivetrain-container > div').slideToggle("slow"); 6143 $(".drivetrain-container > span > a > i").toggleClass("chevron-flip"); 6144 6145 6146 $('.location-container > div').slideToggle("slow"); 6147 $(".location-container > span > a > i").toggleClass("chevron-flip"); 6148 6149 6150 $('.mpg-hway-container > div').slideToggle("slow"); 6151 $(".mpg-hway-container > span > a > i").toggleClass("chevron-flip"); 6152 6153 6154 $('.mpg-city-container > div').slideToggle("slow"); 6155 $(".mpg-city-container > span > a > i").toggleClass("chevron-flip"); 6156 6157 6158 $('.features-container > div').slideToggle("slow"); 6159 $(".features-container > span > a > i").toggleClass("chevron-flip"); 6160 6161 6162 $('.monthlypay-container > div').slideToggle("slow"); 6163 $(".monthlypay-container > span > a > i").toggleClass("chevron-flip"); 6164 6165 6166 $('.status-container > div').slideToggle("slow"); 6167 $(".status-container > span > a > i").toggleClass("chevron-flip"); 6168 6169 6170 $('.engine-container > div').slideToggle("slow"); 6171 $(".engine-container > span > a > i").toggleClass("chevron-flip"); 6172 6173 6174 $('.fa-microphone').toggleClass('fal fas fa-microphone fa-search'); 6175 //$('.ais-SearchBox-input').placeholderTypewriter({text: placeholderText}); 6176 6177 if (haveSdAnalytics && typeof(sd) !== "undefined") 6178 { 6179 // header.php has already sent the pageview for this load, so this 6180 // keeps the pageview -> filterSearch order Shift Digital asked for. 6181 sd('dataLayer', { 6182 countSearchResults: $("#numberHits").text(), 6183 filterSearch: buildSdFilterSearchPayload(), 6184 events: 'filterSearch' 6185 }); 6186 sd('send'); 6187 6188 sdInitialFilterSearchSent = true; 6189 6190 if (sdFormShownPending) { 6191 sd('dataLayer', { 6192 formType: getSDFormType($(".gform_title", $(".popup_form#srp_form_container")).text(), $(".popup_form#srp_form_container form")[0]), 6193 displayType: 'modal', 6194 events: 'formShown' 6195 }); 6196 sd('send'); 6197 sdFormShownPending = false;
6198 } 6199 } 6200 }); 6201 6202 function voiceSearch(term) 6203 { 6204 term = term.toLowerCase(); 6205 let searchBox = document.querySelector('.ais-SearchBox-input'); 6206 searchBox.value = term; 6207 searchBox.dispatchEvent(new Event('input')); 6208 } 6209</script>
vendor: 1 bytes, line 6209
6209
6210<script> 6211 6212var popupFormCalled = false; 6213var currentVehicleData = null; 6214var currentFormType = null; 6215 6216 //Open the form 6217 function popupForm(vin) { 6218 6219 if (popupFormCalled) { 6220 console.log('Prevented duplicate popupForm call'); 6221 return; 6222 } 6223 6224 popupFormCalled = true; 6225 setTimeout(function() { 6226 popupFormCalled = false; 6227 }, 500); 6228 6229 $(".cd-panel").addClass("cd-panel--is-visible"); 6230 $("body").delay(300).queue(function (next) { 6231 $(this).addClass("cd-panel-no-scroll"); 6232 next(); 6233 }); 6234 $(".right-half, #nav-icon1, #nav-icon2, #nav-icon3, #nav-icon4").delay(300).queue(function (next) { 6235 $(this).addClass("cd-panel-subheader-no-scroll"); 6236 next(); 6237 }); 6238 6239 if (vin === "payment_calculator_container") { 6240 $(".popup_form#srp_form_container").hide(); 6241 $("#payment_calculator_container").show(); 6242 calculate(); 6243 var selected_form_title = $(".gform_title", selected_form).text(); 6244 $("#popup_left_title").html(selected_form_title); 6245 } else { 6246 var selected_form = $(".popup_form#srp_form_container"); 6247 var selected_form_title = $(".gform_title", selected_form).text(); 6248 $("#popup_left_title").html(selected_form_title); 6249 } 6250 6251 if (haveSdAnalytics && typeof(sd) !== "undefined" && vin !== 'payment_calculator_container') 6252 { 6253 window.currentVin = vin; 6254 6255 $.post("/app/themes/dv-framework/ajax/sdformvehicle.php", {vin: vin}, function (data) { 6256 6257 setTimeout(function() { 6258 6259 sd('dataLayer', { 6260 formType: getSDFormType($(".gform_title", $(".popup_form#srp_form_container")).text()), 6261 displayType: 'modal', 6262 events: 'formShown' 6263 }); 6264 sd('send'); 6265 6266 currentVehicleData = JSON.parse(data); 6267 currentFormType = getSDFormType($(".gform_title", $(".popup_form#srp_form_container")).text(), $(".popup_form#srp_form_container form")[0]) 6268 6269 var formInitHandled = false; 6270 $('.gform_wrapper input').click(function() { 6271 if (!formInitHandled) 6272 { 6273 sendShiftDigitalFormEvent({ 6274 formType: getSDFormType($(".gform_title", $(".popup_form#srp_form_container")).text(), $(".popup_form#srp_form_container form")[0]), 6275 displayType: 'modal', 6276 eventName: 'formInitiation' 6277 }); 6278 6279 formInitHandled = true; 6280 } 6281 }); 6282 $('.gform_wrapper input, .gform_wrapper textarea, .gform_wrapper select').on('input change', function() { 6283 if (shouldTrackShiftDigitalFieldInteraction(this)) 6284 { 6285 sendShiftDigitalFormEvent({ 6286 formType: getSDFormType($(".gform_title", $(".popup_form#srp_form_container")).text(), $(".popup_form#srp_form_container form")[0]), 6287 displayType: 'modal', 6288 eventName: 'formFieldInteraction', 6289 fieldTarget: this 6290 }); 6291 } 6292 }); 6293 }, 1000); 6294 }); 6295 } 6296 } 6297 6298 //Non confirmation page form submission for SD Analytics 6299 jQuery(document).ready(function(){ 6300 jQuery(document).on("gform_confirmation_loaded.vehicleForm", function(event, formId){ 6301 6302 if (haveSdAnalytics && typeof(sd) !== "undefined" && currentVehicleData) { 6303 6304 sd('dataLayer', { 6305 formType: currentFormType, 6306 displayType: 'modal', 6307 events: 'formSubmission', 6308 formVehicle: currentVehicleData, 6309 leadType: 'lead' 6310 }); 6311 sd('send'); 6312 6313 currentVehicleData = null; 6314 currentFormType = null; 6315 } 6316 }); 6317 }); 6318 6319 //Incentives Slide out 6320 // Wait for element to become available 6321 function waitForElement(selector) { 6322 return new Promise(resolve => { 6323 if (document.querySelector(selector)) { 6324 return resolve(document.querySelector(selector)); 6325 } 6326 6327 console.log("waiting for element"); 6328 6329 const observer = new MutationObserver(mutations => { 6330 if (document.querySelector(selector)) { 6331 observer.disconnect(); 6332 resolve(document.querySelector(selector)); 6333 } 6334 }); 6335 6336 // If you get "parameter 1 is not of type 'Node'" error, see https://stackoverflow.com/a/77855838/492336 6337 observer.observe(document.body, { 6338 childList: true, 6339 subtree: true 6340 }); 6341 }); 6342 } 6343 6344 function initForms() 6345 { 6346 disableForms(); 6347 6348 $('.srp_cta_1').click(function () { 6349 var vin = $(this).attr("data-vehicle-vin"); 6350 $("#popup_left_dealer").html($(this).attr("data-dealer-name")); 6351 $("#popup_left_price").html($(this).attr("data-vehicle-price")); 6352 $("#popup_left_stock_number").html($(this).attr("data-vehicle-stock-number")); 6353 $("#popup_left_vin").html($(this).attr("data-vehicle-vin")); 6354 $("#popup_left_vehicle_title").html($(".vehicle_title_form", $(this)).text()); 6355 getCTAForm($(this).attr("data-vehicle-id"), $(this).attr("data-vehicle-vin"), $(this).attr("data-vehicle-discount"), 1); 6356 popupForm(vin); 6357 event.stopPropagation(); 6358 }); 6359 $('.srp_cta_2').click(function () { 6360 var vin = $(this).attr("data-vehicle-vin"); 6361 $("#popup_left_dealer").html($(this).attr("data-dealer-name")); 6362 $("#popup_left_price").html($(this).attr("data-vehicle-price")); 6363 $("#popup_left_stock_number").html($(this).attr("data-vehicle-stock-number")); 6364 $("#popup_left_vin").html($(this).attr("data-vehicle-vin")); 6365 $("#popup_left_vehicle_title").html($(".vehicle_title_form", $(this)).text()); 6366 getCTAForm($(this).attr("data-vehicle-id"), $(this).attr("data-vehicle-vin"), $(this).attr("data-vehicle-discount"), 28); 6367 popupForm(vin); 6368 event.stopPropagation(); 6369 }); 6370 6371 $(".autocheck_button").on("click", function () { 6372 var vin = $(this).attr("data-vehicle-vin"); 6373 $("#popup_left_dealer").html($(this).attr("data-dealer-name")); 6374 $("#popup_left_price").html($(this).attr("data-vehicle-price")); 6375 $("#popup_left_stock_number").html($(this).attr("data-vehicle-stock-number")); 6376 $("#popup_left_vin").html($(this).attr("data-vehicle-vin")); 6377 $("#popup_left_vehicle_title").html($(".vehicle_title_form", $(this)).text()); 6378 $(".cd-panel__content").css({"padding-top": "114px"}); 6379 $(".cd-panel__container").css({"width": "100%"}); 6380 $(".cd-panel__header").css({"width": "100%"}); 6381 getAutoCheckReport($(this).attr("data-vehicle-id")); 6382 popupForm(vin); 6383 event.stopPropagation(); 6384 }); 6385 6386 $('.srp-cta-calculate-payment-btn').click(function () { 6387 const parentListing = $(this).closest('.listing'); 6388 const priceVal = parentListing.data('ag-price'); 6389 $('#carPrice').val(priceVal || 0); 6390 $("#popup_left_vin").html($(this).attr("data-vehicle-vin")); 6391 $("#popup_left_vehicle_title").html($(".vehicle_title_form", $(this)).text()); 6392 popupForm("payment_calculator_container"); 6393 event.stopPropagation(); 6394 }); 6395 6396 6397 //Button click to close, click outside form to close 6398 $(".cd-panel__close, .cd-panel__otherside").click(function () { 6399 $(".cd-panel").removeClass("cd-panel--is-visible"); 6400 $("#payment_calculator_container").delay(400).hide(0); 6401 $(".popup_form").delay(400).hide(0); 6402 $(".popup_form").delay(400).queue(function (next) { 6403 $(this).empty(); 6404 next(); 6405 }); 6406 $("body").delay(400).queue(function (next) { 6407 $(this).removeClass("cd-panel-no-scroll"); 6408 next(); 6409 }); 6410 $(".right-half, #nav-icon1, #nav-icon2, #nav-icon3, #nav-icon4").delay(400).queue(function (next) { 6411 $(this).removeClass("cd-panel-subheader-no-scroll"); 6412 next(); 6413 }); 6414 $(".cd-panel__content").removeAttr('style'); 6415 $(".listing").removeAttr('style'); 6416 $(".cd-panel__subheader-right").show(); 6417 setTimeout(function () { 6418 $(".cd-panel__container").removeAttr('style'); 6419 }, 300); 6420 }); 6421 } 6422 6423 function disableForms() 6424 { 6425
6426 $('.srp_cta_1').off("click"); 6427 $('.srp_cta_2').off("click"); 6428 6429 $(".autocheck_button").off("click"); 6430 $(".cd-panel__close, .cd-panel__otherside").off("click"); 6431 } 6432 6433 function toggleFilters() 6434 { 6435 $(".side-panel-container").toggleClass("mobileFilters"); 6436 $(".showFiltersNonLegacy i").toggleClass("chevron-flip"); 6437 $(".result-wrapper").toggleClass("filtersOpen"); 6438 $("body").toggleClass("filtersOpen"); 6439 $(".filterResultCount").toggleClass("filter-result-count-active"); 6440 } 6441 6442 /** 6443 * Retry counter lives outside the function on purpose. 6444 * 6445 * It used to be `let tries = 0` as the first statement inside, which reset it 6446 * to zero on every call - so `tries < 10` could never fail and the "retry ten 6447 * times" guard was in fact an unbounded one-second loop for as long as the page 6448 * stayed open. It does not fire where DG loads normally, but it does on any 6449 * dealer where DG is slow, blocked, or absent. 6450 * 6451 * Logging is behind ?spdebug=1 for the same reason the rest of this moved to 6452 * onRenderSettled: console.log of a populated vehicle array on every render is 6453 * not free, and it is markedly worse in Safari with an inspector attached - 6454 * which is exactly the situation anyone debugging this on an iPhone is in. 6455 */ 6456 var smartPathTries = 0; 6457 var smartPathDebug = new URLSearchParams(window.location.search).get('spdebug') === '1'; 6458
6459 function renderSmartPath() 6460 { 6461 if (smartPathDebug) console.log("Trying to render smartpath objects..."); 6462 6463 if (typeof window.DGDataHub.getWarningState !== "undefined" && (window.DGDataHub.getWarningState().dgLoaded || smartPathDebug)) 6464 { 6465 var smartPathVehicles = vehiclesList.map(veh => ({ 6466 type: 'inv', 6467 brand: veh.make, 6468 modelCd: veh.modelCode, 6469 dealerCd: '', 6470 advertisedPrice: parseFloat(veh.internetPrice.replace("$", "").replace(",", "")), // Advertised Price 6471 imageHref: veh.imageUrls[0], 6472 imagePrice: 0, 6473 marketingSeries: veh.model, 6474 marketingName: veh.model, 6475 year: veh.yr, 6476 vin: veh.vin, 6477 price: parseFloat(veh.msrp.replace("$", "").replace(",", "")), // MSRP 6478 ePrice: parseFloat(veh.finalPrice.replace("$", "").replace(",", "")), // Selling Price 6479 vdpHref: veh.vdpUrl, 6480 vlpHref: `http://www.toyota.com/${veh.model.toLowerCase()}/`, 6481 salesClass: veh.certified == "yes" ? 'cpo' : veh.condition.toLowerCase(), // value options are 'new', 'used' and 'cpo' (certified pre-owned), 6482 vehicleType: veh.certified == "yes" ? 'cpo' : veh.condition.toLowerCase() // value options are 'new', 'used' and 'cpo' (certified pre-owned), 6483 })); 6484 6485 var saveItemsObj = {} 6486 6487 smartPathVehicles.map(veh => saveItemsObj[`dg-inline-save-inv-${veh.vin}`] = veh); 6488 6489 if (smartPathDebug) console.log(smartPathVehicles); 6490 6491 window.DGDataHub.renderInlineSaves(saveItemsObj); 6492 6493 6494 if (smartPathDebug) console.log(window.DGDataHub.getDgid()); 6495 6496 fetch("https://mobile-api.rti.toyota.com/leads/garage/eprice?dgid=" + window.DGDataHub.getDgid() + "&dealerCd=" + "").then(response => response.json()).then(data => { 6497 if (data.includes("") && srpCondition != "Used") 6498 { 6499 if (smartPathDebug) console.log("Unlocking smartprice..."); 6500 $(".dv-pricinggate").show(); 6501 $(".dv-pricing-main").hide(); 6502 $(".srp_cta_pricinggate").hide(); 6503 $(".srp-cta-smartpath1-btn").hide(); 6504 $(".srp-cta-smartpathunlocked-btn").attr('style', 'display: inline !important'); 6505 6506 $(".vehicle-price-container").css('height', ''); 6507 } 6508 6509 return data; 6510 }).then(data => { if (smartPathDebug) console.log(data); }); 6511 } 6512 else 6513 { 6514 if (smartPathTries < 10) 6515 { 6516 smartPathTries++; 6517 setTimeout(renderSmartPath, 1000); 6518 } 6519 } 6520 } 6521 6522 function checkAndRemoveFacets() { 6523 6524 if (!userInteractedWithFacets) return; 6525 6526 // Remove child facet if parent facet is unclicked 6527 if(srpCondition === "Used" || srpDealerId.includes(dealerGroupSite)){ 6528 if($("#model-list ul li input[type='checkbox']:checked").length > 0 && $("#make-list ul li input[type='checkbox']:checked").length === 0){ 6529 search.helper.removeDisjunctiveFacetRefinement('model'); 6530 search.helper.removeDisjunctiveFacetRefinement('trim'); 6531 search.helper.search(); 6532 userInteractedWithFacets = false; 6533 } 6534 } 6535 6536 if($("#trim-list ul li input[type='checkbox']:checked").length > 0 && $("#model-list ul li input[type='checkbox']:checked").length === 0){ 6537 search.helper.removeDisjunctiveFacetRefinement('trim'); 6538 search.helper.search(); 6539 userInteractedWithFacets = false; 6540 } 6541 } 6542 6543 function getUrlParams() { 6544 6545 const params = new URLSearchParams(window.location.search); 6546 const paramObj = {}; 6547 params.forEach((value, key) => { 6548 6549 if (!paramObj[key]) { 6550 6551 paramObj[key] = []; 6552 } 6553 paramObj[key].push(value); 6554 }); 6555 return paramObj; 6556 } 6557 6558 // Function to dynamically toggle filters based on URL params 6559 function toggleFiltersDynamically() { 6560 const params = getUrlParams(); 6561 6562 Object.keys(params).forEach(function(filterVar) { 6563 6564 filterVar = filterVar.toLowerCase(); 6565 6566 if(filterVar == "genericcolor"){ 6567 filterVar = "color"; 6568 } 6569 6570 if(filterVar == "finalpricerange"){ 6571 filterVar = "pricerange"; 6572 } 6573 6574 if(filterVar == "yr"){ 6575 filterVar = "year"; 6576 } 6577 6578 if(filterVar == "transmissiontype"){ 6579 filterVar = "transmission"; 6580 } 6581 6582 const containerSelector = $(`.${filterVar}-container > div`); 6583 6584 if (containerSelector.length > 0) { 6585 containerSelector.show(); 6586 } 6587 }); 6588 } 6589 6590 6591 //Nexus Fuse Payments Start 6592 6593 //Fuse Payments Button - Nexus 6594 function nexusPaymentButtons(){ 6595 6596 } 6597 6598 6599 function updateFuseButton(buttonContainer, data, offerTypeId) { 6600 6601 if (!data || !Array.isArray(data)) { 6602 console.error('Error in updateFuseButton: "data" is either undefined or not an array.', { data, buttonContainer, offerTypeId }); 6603 buttonContainer.style.display = 'none'; 6604 return; 6605 } 6606 6607 const matchedOffer = data.find(offer => offer.fuse.OfferTypeID == offerTypeId); 6608 6609 if (matchedOffer) { 6610 6611 //Used for Fuse SinglePaymentOption 6612 const fuseOfferOne = "5"; 6613 6614 //Used for Fuse APR 6615 const fuseOfferTwo = "7"; 6616 6617 //Used for Fuse PaymentNoTax 6618 const fuseOfferThree = "5"; 6619 6620 let ctaText = ""; 6621 let buttonHtml = ""; 6622 let ctaDisclaimer = ""; 6623 6624 if(matchedOffer.fuse.OfferTypeID == fuseOfferOne && fuseOfferOne !== "1") { 6625 const ctaFuseText = "Single Payment Option"; 6626 const singlePayment = matchedOffer.fuse.SinglePayment; 6627 6628 function formatAsCurrency(amount) {
6629 return amount.toLocaleString('en-US', { 6630 minimumFractionDigits: 0, 6631 maximumFractionDigits: 0 6632 }); 6633 } 6634 6635 const formattedPayment = formatAsCurrency(singlePayment); 6636 6637 ctaFuseAmount = formattedPayment 6638 ctaDisclaimer = matchedOffer.fuse.Disclaimer; 6639 6640 buttonHtml = ` 6641 <a href='javascript: void(0);' data-vehicle-id="${matchedOffer.vin}" data-vehicle-vin="${buttonContainer.getAttribute('data-vehicle-vin')}" data-vehicle-condition="${buttonContainer.getAttribute('data-vehicle-condition')}" data-vehicle-year="${buttonContainer.getAttribute('data-vehicle-year')}" data-vehicle-make="${buttonContainer.getAttribute('data-vehicle-make')}" data-vehicle-model="${buttonContainer.getAttribute('data-vehicle-model')}" data-vehicle-stock-number="${buttonContainer.getAttribute('data-vehicle-stock-number')}" data-vehicle-price="${buttonContainer.getAttribute('data-vehicle-price')}" data-vehicle-discount="${buttonContainer.getAttribute('data-vehicle-discount')}" data-dealer-name="${buttonContainer.getAttribute('data-dealer-name')}" data-dealer-id="${buttonContainer.getAttribute('data-dealer-id')}" data-form-id="${buttonContainer.getAttribute('data-form-id')}" data-offer-type-id="${offerTypeId}" data-customer-disclaimer="${ctaDisclaimer}" class="${buttonContainer.className}"> 6642 <span class="option-title">${ctaFuseText}</span> 6643 <span class="option-value">$${ctaFuseAmount}</span> 6644 <span style="display:none;" class="vehicle_title_form">${buttonContainer.getAttribute('data-vehicle-year')} ${buttonContainer.getAttribute('data-vehicle-make')} ${buttonContainer.getAttribute('data-vehicle-model')} </span> 6645 </a> 6646 `; 6647 } 6648 6649 if(matchedOffer.fuse.OfferTypeID == fuseOfferTwo){ 6650 const ctaFuseText = "APR"; 6651 const ctaFuseAmount = `${matchedOffer.fuse.APR}%`; 6652 ctaDisclaimer = matchedOffer.fuse.Disclaimer; 6653 6654 buttonHtml = ` 6655 <a href='javascript: void(0);' data-vehicle-id="${matchedOffer.vin}" data-vehicle-vin="${buttonContainer.getAttribute('data-vehicle-vin')}" data-vehicle-condition="${buttonContainer.getAttribute('data-vehicle-condition')}" data-vehicle-year="${buttonContainer.getAttribute('data-vehicle-year')}" data-vehicle-make="${buttonContainer.getAttribute('data-vehicle-make')}" data-vehicle-model="${buttonContainer.getAttribute('data-vehicle-model')}" data-vehicle-stock-number="${buttonContainer.getAttribute('data-vehicle-stock-number')}" data-vehicle-price="${buttonContainer.getAttribute('data-vehicle-price')}" data-vehicle-discount="${buttonContainer.getAttribute('data-vehicle-discount')}" data-dealer-name="${buttonContainer.getAttribute('data-dealer-name')}" data-dealer-id="${buttonContainer.getAttribute('data-dealer-id')}" data-form-id="${buttonContainer.getAttribute('data-form-id')}" data-offer-type-id="${offerTypeId}" data-customer-disclaimer="${ctaDisclaimer}" class="${buttonContainer.className}"> 6656 <span class="option-title">${ctaFuseText}</span> 6657 <span class="option-value">${ctaFuseAmount}</span> 6658 <span style="display:none;" class="vehicle_title_form">${buttonContainer.getAttribute('data-vehicle-year')} ${buttonContainer.getAttribute('data-vehicle-make')} ${buttonContainer.getAttribute('data-vehicle-model')} </span> 6659 </a> 6660 `; 6661 } 6662 6663 //Fuse option 3 used for offerTypeId 1 PaymentNoTax 6664 if(matchedOffer.fuse.OfferTypeID == fuseOfferThree && (matchedOffer.fuse.OfferTypeID == 1 && fuseOfferOne === "1")){ 6665 const ctaFuseText = "Single Payment Option"; 6666 const ctaFuseAmount = `${matchedOffer.fuse.PaymentNoTax}`; 6667 ctaDisclaimer = matchedOffer.fuse.Disclaimer; 6668 6669 const textResult = replaceAmountPlaceholder(ctaFuseText, ctaFuseAmount); 6670 6671 if (textResult.hasPlaceholder) { 6672 buttonHtml = ` 6673 <a href='javascript: void(0);' data-vehicle-id="${matchedOffer.vin}" data-vehicle-vin="${buttonContainer.getAttribute('data-vehicle-vin')}" data-vehicle-condition="${buttonContainer.getAttribute('data-vehicle-condition')}" data-vehicle-year="${buttonContainer.getAttribute('data-vehicle-year')}" data-vehicle-make="${buttonContainer.getAttribute('data-vehicle-make')}" data-vehicle-model="${buttonContainer.getAttribute('data-vehicle-model')}" data-vehicle-stock-number="${buttonContainer.getAttribute('data-vehicle-stock-number')}" data-vehicle-price="${buttonContainer.getAttribute('data-vehicle-price')}" data-vehicle-discount="${buttonContainer.getAttribute('data-vehicle-discount')}" data-dealer-name="${buttonContainer.getAttribute('data-dealer-name')}" data-dealer-id="${buttonContainer.getAttribute('data-dealer-id')}" data-form-id="${buttonContainer.getAttribute('data-form-id')}" data-offer-type-id="${offerTypeId}" data-customer-disclaimer="${ctaDisclaimer}" class="${buttonContainer.className}"> 6674 <span class="option-title">${textResult.displayText}</span> 6675 <span style="display:none;" class="vehicle_title_form">${buttonContainer.getAttribute('data-vehicle-year')} ${buttonContainer.getAttribute('data-vehicle-make')} ${buttonContainer.getAttribute('data-vehicle-model')} </span> 6676 </a> 6677 `; 6678 } else { 6679 buttonHtml = `
6680 <a href='javascript: void(0);' data-vehicle-id="${matchedOffer.vin}" data-vehicle-vin="${buttonContainer.getAttribute('data-vehicle-vin')}" data-vehicle-condition="${buttonContainer.getAttribute('data-vehicle-condition')}" data-vehicle-year="${buttonContainer.getAttribute('data-vehicle-year')}" data-vehicle-make="${buttonContainer.getAttribute('data-vehicle-make')}" data-vehicle-model="${buttonContainer.getAttribute('data-vehicle-model')}" data-vehicle-stock-number="${buttonContainer.getAttribute('data-vehicle-stock-number')}" data-vehicle-price="${buttonContainer.getAttribute('data-vehicle-price')}" data-vehicle-discount="${buttonContainer.getAttribute('data-vehicle-discount')}" data-dealer-name="${buttonContainer.getAttribute('data-dealer-name')}" data-dealer-id="${buttonContainer.getAttribute('data-dealer-id')}" data-form-id="${buttonContainer.getAttribute('data-form-id')}" data-offer-type-id="${offerTypeId}" data-customer-disclaimer="${ctaDisclaimer}" class="${buttonContainer.className}"> 6681 <span class="option-title">${textResult.displayText}</span> 6682 <span class="option-value">$${ctaFuseAmount}</span> 6683 <span style="display:none;" class="vehicle_title_form">${buttonContainer.getAttribute('data-vehicle-year')} ${buttonContainer.getAttribute('data-vehicle-make')} ${buttonContainer.getAttribute('data-vehicle-model')} </span> 6684 </a> 6685 `; 6686 } 6687 } 6688 6689 let newButtonElement = document.createRange().createContextualFragment(buttonHtml).firstElementChild; 6690 buttonContainer.replaceWith(newButtonElement); 6691 6692 fuseButtonBinding(); 6693 } else { 6694 console.log("No matching offer found for OfferTypeID:", offerTypeId); 6695 } 6696 } 6697 6698 6699 function replaceAmountPlaceholder(text, amount) { 6700 if (text.includes('{amount}')) { 6701 return { 6702 hasPlaceholder: true, 6703 displayText: text.replace('{amount}', `<span class="option-value">$${amount}</span>`) 6704 }; 6705 } 6706 return { 6707 hasPlaceholder: false, 6708 displayText: text 6709 }; 6710 } 6711 6712 function fuseButtonBinding(){ 6713 } 6714 //Nexus Fuse Payments End 6715 6716 6717 6718 $(document).ready(function () { 6719 // if (navigator.platform == "MacIntel") 6720 // { 6721 // $(".srp-results").css("width", "calc(100vw - 376px)"); 6722 // } 6723 6724 6725 setTimeout(function(){ 6726 6727 toggleFiltersDynamically(); 6728 nexusPaymentButtons(); 6729 initForms(); 6730 registerSmartpathCTAOverrides(jQuery("#srp-results")); 6731 }, 1000); 6732 }); 6733</script>
6733 6734 6735 6736 6737 6738</main> 6739<div class="srp-bottom-disclaimers"> 6740<h4>Disclaimers</h4> 6741While dealer strives to ensure the accuracy of pricing and other information, unintentional pricing, calculation, or typographical errors may occur and customer acknowledges that dealer is not responsible for any such errors. Tax, title, license, and dealer admin fee of $580 are not included in vehicle prices shown and must be paid by customer. *MSRP is the Manufacturer's Suggested Retail Price (MSRP) of the vehicle. The Manufacturer's Suggested Retail Price excludes tax, title, license, dealer fees, and optional equipment. Pricing and availability may vary based on a variety of factors, including options, dealer, specials, fees, and financing qualifications. Consult your dealer for the actual price and complete details. Dealer sets final price. You may not qualify for the offers, incentives, discounts, or financing. Offers, incentives, discounts, or financing are subject to expiration and other restrictions. See dealer for qualifications and complete details. Images, prices, and options shown, including vehicle color, trim, options, pricing and other specifications are subject to availability, incentive offerings, current pricing and creditworthiness. In transit means that vehicles have been built but have not yet arrived at your dealer. Images shown may not necessarily represent identical vehicles in transit to your dealership. See your dealer for actual price, payments and complete details. The amount shown as the selling price, our price may or may not include all available incentives. The dealer makes no guarantees or warranties, either expressly or implied, with respect to the accuracy of any data listed on this page which was obtained from third-party sources. All specifications, equipment and information are subject to change without notice. Any information contained on this page should be used for informational purposes only. MPG estimates on this website are EPA estimates; your actual mileage may vary. For used vehicles, MPG estimates are EPA estimates for the vehicle when it was new. The EPA periodically modifies its MPG calculation methodology; all MPG estimates are based on the methodology in effect when the vehicles were new (please see the "Fuel Economy" portion of the EPA's website for details, including a MPG recalculation tool) 6742</div>
6742<script src="https://www.maxmotors.com/app/themes/dv-framework/media/js/video.js?v=1.648.51"></script>
6742 6743<style> 6744 /*****************************************************************************************************************************/ 6745 /* CTA 1 Button */ 6746 /*****************************************************************************************************************************/ 6747 .srp-cta-1-btn { 6748 color: #ffffff !important; 6749 background-color: #262626 !important; 6750 } 6751 6752 .srp-cta-1-btn:hover { 6753 background-color: #e6ac39 !important; 6754 } 6755 6756 /*****************************************************************************************************************************/ 6757 /* CTA 2 Button */ 6758 /*****************************************************************************************************************************/ 6759 .srp-cta-2-btn { 6760 color: #ffffff !important; 6761 background-color: #d50000 !important; 6762 } 6763 6764 .srp-cta-2-btn:hover { 6765 background-color: #000000 !important; 6766 } 6767 6768 /*****************************************************************************************************************************/ 6769 /* CTA 3 Button */ 6770 /*****************************************************************************************************************************/ 6771 .srp-cta-3-btn { 6772 color: #ffffff !important; 6773 background-color: #000000 !important; 6774 } 6775 6776 .srp-cta-3-btn:hover { 6777 background-color: #eeeeee !important; 6778 } 6779 6780 6781 /*****************************************************************************************************************************/ 6782 /* CTA 4 Button */ 6783 /*****************************************************************************************************************************/ 6784 .srp-cta-4-btn { 6785 color: #ffffff !important; 6786 background-color: #000000 !important; 6787 } 6788 6789 .srp-cta-4-btn:hover { 6790 background-color: #eeeeee !important; 6791 } 6792 6793 /*****************************************************************************************************************************/ 6794 /* CTA 5 Button */ 6795 /*****************************************************************************************************************************/ 6796 .srp-cta-5-btn { 6797 color: #ffffff !important; 6798 background-color: #000000 !important; 6799 } 6800 6801 .srp-cta-5-btn:hover { 6802 background-color: #eeeeee !important; 6803 } 6804 6805 /*****************************************************************************************************************************/ 6806 /* CTA 6 Button */ 6807 /*****************************************************************************************************************************/ 6808 .srp-cta-6-btn { 6809 color: #ffffff !important; 6810 background-color: #262626 !important; 6811 } 6812 6813 .srp-cta-6-btn:hover { 6814 background-color: #e6ac39 !important; 6815 } 6816 6817 /*****************************************************************************************************************************/ 6818 /* Roadster CTA Button */ 6819 /*****************************************************************************************************************************/ 6820 .srp-cta-roadster-btn { 6821 color: #063497 !important; 6822 background-color: #ffcc00 !important; 6823 } 6824 6825 /*****************************************************************************************************************************/ 6826 /* Custom Modal CTA Button */ 6827 /*****************************************************************************************************************************/ 6828 .srp-cta-modal-btn { 6829 color: #ffffff; 6830 background-color: #000000; 6831 } 6832 6833 .srp-cta-modal-btn:hover { 6834 color: #000000; 6835 background-color: #000000; 6836 } 6837 6838 .srp-cta-modal-btn-two { 6839 color: #000000; 6840 background-color: #d50000; 6841 } 6842 6843 .srp-cta-modal-btn-two:hover { 6844 color: #000000; 6845 background-color: #d50000; 6846 } 6847 6848 /*****************************************************************************************************************************/ 6849 /* Pricing Gate Button */ 6850 /*****************************************************************************************************************************/ 6851 .srp-cta-pricinggate-btn { 6852 color: #ffffff !important; 6853 background-color: #000000 !important; 6854 } 6855 6856 .srp-cta-pricinggate-btn:hover { 6857 color: #eeeeee !important; 6858 background-color: #eeeeee !important; 6859 } 6860 6861 /*****************************************************************************************************************************/ 6862 /* CTA Calculate Payment Button */ 6863 /*****************************************************************************************************************************/ 6864 .srp-cta-calculate-payment-btn { 6865 color: white; 6866 background-color: var(--primary-color); 6867 border-color: var(--primary-color); 6868 } 6869 6870 .srp-cta-calculate-payment-btn:hover { 6871 color: white; 6872 background-color: var(--secondary-color); 6873 border-color: var(--secondary-color); 6874 } 6875 6876 6877 /*****************************************************************************************************************************/ 6878 /* Instant Search Styles */ 6879 /*****************************************************************************************************************************/ 6880 6881 .ais-Pagination-item--firstPage .ais-Pagination-link, .ais-Pagination-item--previousPage .ais-Pagination-link, .ais-Pagination-item--nextPage .ais-Pagination-link, .ais-Pagination-item--lastPage .ais-Pagination-link { 6882 color: #756533; 6883 } 6884 6885 .ais-RefinementList-count { 6886 color: #756533; 6887 font-weight: bold; 6888 } 6889 6890 .srp-SUV { 6891 background: url(https://bucket.dealervenom.com/assets/oem/honda/images/bodyfilters/suv.png?auto=compress&format&ixlib=php-1.2.1&width=120&height=100); 6892 } 6893 6894 .srp-Van { 6895 background: url(https://bucket.dealervenom.com/assets/oem/honda/images/bodyfilters/van.png?auto=compress&format&ixlib=php-1.2.1&width=120&height=100); 6896 } 6897 6898 .srp-Truck { 6899 background: url(https://bucket.dealervenom.com/assets/oem/honda/images/bodyfilters/truck.png?auto=compress&format&ixlib=php-1.2.1&width=120&height=100); 6900 } 6901 6902 .srp-Hatchback { 6903 background: url(https://bucket.dealervenom.com/assets/oem/honda/images/bodyfilters/hatch.png?auto=compress&format&ixlib=php-1.2.1&width=120&height=100); 6904 } 6905 6906 .srp-Wagon { 6907 background: url(https://bucket.dealervenom.com/assets/oem/toyota/filters/wagon.png?auto=compress&format&ixlib=php-1.2.1&width=120&height=100); 6908 } 6909 6910 .srp-Coupe { 6911 background: url(https://bucket.dealervenom.com/assets/oem/honda/images/bodyfilters/coupe.png?auto=compress&format&ixlib=php-1.2.1&width=120&height=100); 6912 } 6913 6914 .srp-Sedan { 6915 background: url(https://bucket.dealervenom.com/assets/oem/honda/images/bodyfilters/sedan.png?auto=compress&format&ixlib=php-1.2.1&width=120&height=100); 6916 } 6917 6918 .srp-Convertible { 6919 background: url(https://bucket.dealervenom.com/assets/oem/toyota/filters/convertible.png?auto=compress&format&ixlib=php-1.2.1&width=120&height=100); 6920 } 6921 6922 .srp-Crossover { 6923 background : url(https://bucket.dealervenom.com/assets/oem/toyota/filters/crossover.png?auto=compress&format&ixlib=php-1.2.1&width=140); 6924 } 6925 6926 .vehicle-special { 6927 background-color: #f00f00 !important; 6928 } 6929 6930 6931 .srp-header { 6932 top: 75px; 6933 } 6934 6935 .car-title > p { 6936 color: #756533; 6937 } 6938 6939 .listing-bottom-row { 6940 background-color: #000000; 6941 color: #ffffff; 6942 } 6943 6944 .specs { 6945 height: 0px; 6946 } 6947 6948 .img-container { 6949 padding-bottom: 75%; 6950 } 6951 6952 #clearSearchResults button { 6953 color: #756533; 6954 } 6955 6956 .srp-windowsticker.srp_cta:hover { 6957 background-color: #ffffff; 6958 color: #756533; 6959 border-color: #756533; 6960 } 6961 6962 .reserved-vehicle { 6963 background-color: #EB0A11; 6964 color: ; 6965 } 6966 6967 6968 .vehicle-price-container { 6969 height: 75px; 6970 } 6971 6972 @media screen and (max-width: 1024px) 6973 { 6974 .srp-header { 6975 top: 75px; 6976 height: auto; 6977 flex-flow: column nowrap; 6978 padding: 25px; 6979 box-sizing: border-box; 6980 } 6981 6982 .srp-search { 6983 position: relative; 6984 } 6985 #clearSearchResults { 6986 position: absolute; 6987 right: 10px; 6988 background: #fff; 6989 } 6990 #clearSearchResults button { 6991 padding-right: 0; 6992 } 6993 .mobileFilters { 6994 bottom: 0 6995 } 6996 6997 .dv-logged-in .srp-filters { 6998 padding-top: 75px 6999 } 7000 } 7001 7002 .filterResultCount { 7003 display: none 7004 } 7005 @media screen and (max-width: 1024px){ 7006 .filterResultCount { 7007 background-color: #EB0A1E; 7008 color: #FFFFFF; 7009 display: none; 7010 position: fixed; 7011 bottom: 0; 7012 z-index: 2147483647; 7013 width: 100%; 7014 text-align: center; 7015 padding: 12.5px 0; 7016 } 7017 .filterResultCount:hover { 7018 cursor: pointer; 7019 } 7020 .filterResultCount.filter-result-count-active { 7021 display: block 7022 } 7023 } 7024 .dv-srp-search-options { 7025 display: none; 7026 position: relative; 7027 box-sizing: border-box 7028 } 7029 7030 .dv-srp-search-options * { 7031 box-sizing: border-box 7032 } 7033 7034 .sortFilters .dv-srp-sort-mobile { 7035 position: absolute; 7036 width: 100%; 7037 min-width: 160px; 7038 left: 0; 7039 top: 100%; 7040 padding: 0; 7041 background: #fff; 7042 box-shadow: 0 8px 16px 0 rgba(0,0,0,.2); 7043 z-index: 1; 7044 text-align: left; 7045 overflow: hidden; 7046 visibility: hidden; 7047 opacity: 0; 7048 height: 0 7049 } 7050 7051 .sortFilters .dv-srp-sort-desktop { 7052 position: absolute; 7053 width: 100%; 7054 min-width: 160px; 7055 left: 0; 7056 top: 80%; 7057 padding: 0; 7058 background: #fff; 7059 box-shadow: 0 8px 16px 0 rgba(0,0,0,.2); 7060 z-index: 1; 7061 text-align: left; 7062 overflow: hidden; 7063 visibility: hidden; 7064 opacity: 0; 7065 height: 0 7066 } 7067 7068 .sortFilters .dv-srp-sort-mobile.dv-srp-sort-mobile-active, 7069 .sortFilters .dv-srp-sort-desktop.dv-srp-sort-desktop-active { 7070 overflow: auto; 7071 visibility: visible; 7072 opacity: 1; 7073 height: fit-content; 7074 padding: 12.5px 7075 } 7076 7077 .sortFilters .dv-srp-sort-mobile a,
7078 .sortFilters .dv-srp-sort-desktop a { 7079 font-size: 12px; 7080 display: block; 7081 margin: 12.5px 0; 7082 color: #000; 7083 display: flex; 7084 display: -webkit-flex; 7085 display: -ms-flexbox; 7086 justify-content: flex-start; 7087 align-items: center; 7088 gap: 6.25px; 7089 text-transform: capitalize 7090 } 7091 7092 .sortFilters .dv-srp-sort-mobile a:hover, 7093 .sortFilters .dv-srp-sort-desktop a:hover { 7094 cursor: pointer; 7095 } 7096 7097 .sortFilters .dv-srp-sort-mobile a.dv-srp-sort-selected, 7098 .sortFilters .dv-srp-sort-desktop a.dv-srp-sort-selected { 7099 color: var(--primary-color) 7100 } 7101 7102 .sortFilters .dv-srp-sort-mobile a i, 7103 .sortFilters .dv-srp-sort-desktop a i { 7104 display: block; 7105 color: var(--primary-color); 7106 width: 15px; 7107 text-align: center 7108 } 7109 7110 #sortByDesktop { 7111 position: relative; 7112 box-sizing: border-box; 7113 margin-right: 25px 7114 } 7115 7116 #sortByDesktop * { 7117 box-sizing: border-box; 7118 } 7119 7120 @media screen and (min-width: 1024px) { 7121 .dv-srp-search-options-wrapper { 7122 /* background: var(--primary-color); */ 7123 color: #505050; 7124 padding: 12.5px; 7125 min-width: 100%; 7126 white-space: nowrap; 7127 } 7128 7129 .dv-srp-search-options-wrapper:hover { 7130 cursor: pointer; 7131 } 7132 7133 .dv-srp-search-options-wrapper .dv-srp-search-options-label { 7134 display: inline-block; 7135 vertical-align: bottom; 7136 font-size: 14px; 7137 font-weight: 600 7138 } 7139 7140 .dv-srp-search-options-wrapper .dv-srp-search-options-label i { 7141 margin-right: 6.25px 7142 } 7143 } 7144 7145 @media screen and (max-width: 1024px) { 7146 .srp-header { 7147 background: #f8f8f8; 7148 } 7149 .srp-header .dv-srp-search-options { 7150 display: flex; 7151 display: -webkit-flex; 7152 display: -ms-flexbox; 7153 margin-top: 12.5px; 7154 gap: 25px; 7155 } 7156 .srp-header .dv-srp-search-options .sortFilters, 7157 .srp-header .dv-srp-search-options .showFiltersNonLegacy, 7158 .srp-header .dv-srp-search-options .saveFilters { 7159 width: 33.333%; 7160 flex: 1 1 33.333%; 7161 background: var(--primary-color); 7162 color: #fff; 7163 padding: 6.25px; 7164 display: flex; 7165 display: -webkit-flex; 7166 display: -ms-flexbox; 7167 text-align: center; 7168 justify-content: center; 7169 align-items: center; 7170 font-size: 12px; 7171 text-transform: uppercase; 7172 } 7173 .srp-header .dv-srp-search-options .sortFilters:hover, 7174 .srp-header .dv-srp-search-options .showFiltersNonLegacy:hover, 7175 .srp-header .dv-srp-search-options .saveFilters:hover { 7176 cursor: pointer; 7177 } 7178 .srp-header .dv-srp-search-options .saveFilters { 7179 display: none !important 7180 } 7181 .srp-searchbar { 7182 background: #fff; 7183 flex-basis: 100%; 7184 border: 1px solid #e9e9e9; 7185 } 7186 .srp-searchbar input { 7187 background-color: #fff !important; 7188 } 7189 .srp-searchbar > .fa-search { 7190 padding: 0 12.5px; 7191 } 7192 #searchbox { 7193 width: 100%; 7194 } 7195 } 7196 @media screen and (max-width: 480px) { 7197 .srp-header .dv-srp-search-options { 7198 gap: 12.5px; 7199 } 7200 .srp-header .dv-srp-search-options .sortFilters, 7201 .srp-header .dv-srp-search-options .showFiltersNonLegacy, 7202 .srp-header .dv-srp-search-options .saveFilters { 7203 font-size: 10px 7204 } 7205 } 7206 7207 .srp-bottom-disclaimers { 7208 font-size: 10px; 7209 color: #bcc4cc; 7210} 7211.srp-bottom-disclaimers h4 { 7212 text-transform: none; 7213 padding-bottom: 12.5px; 7214 color: #000; 7215} 7216 7217/*Vin-Stock Container styles*/ 7218 .srp-extra-div { 7219 display: flex; 7220 margin: auto; 7221 padding-bottom: 5px; 7222 padding-bottom: 12.5px !important; 7223 padding-top: 12.5px !important; 7224 } 7225 .srp-cta a:last-of-type { 7226 margin-bottom: 0px !important; 7227} 7228/*Vin-Stock Container styles*/ 7229 7230.srp-dp-1 { 7231 color: #000; 7232 background-color: #FFD43B; 7233 border-radius: 0; 7234 width: 100%; 7235 margin-bottom: 10px; 7236 text-align: center; 7237 display: block; 7238 padding: 3.125px; 7239 box-sizing: border-box; 7240 font-weight: 600; 7241}</style> 7242<!-- Modals --> 7243<!-- Twilio Modal --> 7244 7245<!-- Youtube Player Modal --> 7246<div class="modal fade" tabindex="-1" role="dialog" id="youtube_modal"> 7247 <div class="modal-dialog youtube-embed" role="document"> 7248 <div class="modal-content youtube-embed"> 7249 <div class="modal-body youtube-modal-body"> 7250 <div id="ytplayer"></div> 7251 </div> 7252 </div><!-- /.modal-content --> 7253 </div><!-- /.modal-dialog --> 7254</div><!-- /.modal --> 7255 7256<!-- compare Player Modal --> 7257<div class="modal fade" tabindex="-1" role="dialog" id="compare_modal"> 7258 <div class="modal-dialog compare-embed" role="document"> 7259 <div class="modal-content compare-embed"> 7260 <div class="modal-body compare-modal-body"> 7261 <div id="ytplayer"></div> 7262 </div> 7263 </div><!-- /.modal-content --> 7264 </div><!-- /.modal-dialog --> 7265</div><!-- /.modal --> 7266 7267<div class="modal fade" tabindex="-1" role="dialog" id="custom_modal" style="padding: 20px"> 7268 <div class="modal-dialog custom-embed" role="document"> 7269 <div class="modal-content custom-embed"> 7270 <div class="modal-body custom-modal-body"> 7271 <div id="custom_player"></div> 7272 </div> 7273 </div><!-- /.modal-content --> 7274 </div><!-- /.modal-dialog --> 7275</div><!-- /.modal --> 7276 7277<div class="cd-panel cd-panel--from-right js-cd-panel-main"> 7278 <section class="cd-panel__header"> 7279 <p id="popup_left_title"></p> 7280 <a href="javascript:void(0);" class="cd-panel__close js-cd-close">Close</a> 7281 </section> 7282 <div class="cd-panel__container"> 7283 <div class="cd-panel__subheader"> 7284 <div class="cd-panel__subheader-left"> 7285 <h4 id="popup_left_vehicle_title"></h4> 7286 <p>Stock: <span id="popup_left_stock_number"></span> <span>|</span> Vin: <span id="popup_left_vin"></span></p> 7287 </div> 7288 </div> 7289 <div class="cd-panel__content"> 7290 <div class="forms_container"> 7291 <div class="popup_form" id="srp_form_container" style="display: none;"> 7292 </div> 7293 7294 <div id="payment_calculator_container" style="display: none;"> 7295 <style> 7296 .dv-payment-calculator { 7297 max-width: 1428.75px; 7298 margin: 0 auto; 7299 font-family: inherit; 7300 background: #fff; 7301 } 7302 .dv-payment-calculator .dv-calculator-disclaimer { 7303 padding: 25px; 7304 font-size: 14px; 7305 color: #879099; 7306 } 7307 @media screen and (max-width: 768px) { 7308 .dv-payment-calculator { 7309 padding: 25px; 7310 } 7311 } 7312 .dv-payment-calculator h2 { 7313 font-size: 24px; 7314 font-weight: bold; 7315 padding: 25px 50px 7316 } 7317 .dv-payment-calculator * { 7318 box-sizing: border-box; 7319 } 7320 .dv-payment-calculator .dv-payment-calculator-container { 7321 display: block; 7322 } 7323 .dv-payment-calculator .dv-payment-calculator-container .dv-payment-calculator-calc { 7324 background: #fff; 7325 padding: 0 50px; 7326 } 7327 @media screen and (max-width: 768px) { 7328 .dv-payment-calculator .dv-payment-calculator-container .dv-payment-calculator-calc { 7329 margin-bottom: 50px; 7330 } 7331 } 7332 .dv-payment-calculator .dv-payment-calculator-container .dv-payment-calculator-col { 7333 width: 100%; 7334 } 7335 .dv-payment-calculator .dv-payment-calculator-wrapper { 7336 display: -webkit-box; 7337 display: flex; 7338 width: 100%; 7339 } 7340 .dv-payment-calculator .dv-payment-calculator-results .dv-payment-calculator-wrapper { 7341 padding: 0 50px; 7342 } 7343 .dv-payment-calculator .dv-payment-calculator-wrapper .dv-payment-calculator-col-12 { 7344 width: 100%; 7345 -webkit-box-flex: 1; 7346 flex: 1 1 100%; 7347 } 7348 .dv-payment-calculator .dv-payment-calculator-wrapper .dv-payment-calculator-col-8 { 7349 width: 66.66666667%; 7350 -webkit-box-flex: 1; 7351 flex: 1 1 66.66666667%; 7352 } 7353 .dv-payment-calculator .dv-payment-calculator-wrapper .dv-payment-calculator-col-6 { 7354 margin: 0px 25px 0 0; 7355 width: calc(1 / 2 * 100% - (1 - 1 / 2) * 25px); 7356 -webkit-box-flex: 1; 7357 flex: 1 1 calc(1 / 2 * 100% - (1 - 1 / 2) * 25px); 7358 } 7359 .dv-payment-calculator .dv-payment-calculator-wrapper .dv-payment-calculator-col-6:nth-child(2n) { 7360 margin-right: 0; 7361 } 7362 .dv-payment-calculator .dv-payment-calculator-wrapper .dv-payment-calculator-col-4 {
7363 width: 33.33333%; 7364 -webkit-box-flex: 1; 7365 flex: 1 1 33.33333%; 7366 } 7367 .dv-payment-calculator .dv-payment-calculator-wrapper .dv-payment-calculator-col-3 { 7368 width: 25%; 7369 -webkit-box-flex: 1; 7370 flex: 1 1 25%; 7371 margin: 0 25px; 7372 } 7373 .dv-payment-calculator .dv-payment-calculator-input-group { 7374 position: relative; 7375 margin: 25px 0; 7376 } 7377 .dv-payment-calculator .dv-payment-calculator-input-group label { 7378 display: block; 7379 padding: 0 0 10px 0; 7380 font-size: 16px; 7381 color: #879099; 7382 font-weight: 500; 7383 width: 100%; 7384 } 7385 .dv-payment-calculator .dv-payment-calculator-input-group label #dv-payment-calculator-range-value { 7386 display: block; 7387 float: right; 7388 margin: 0; 7389 } 7390 .dv-payment-calculator .dv-payment-calculator-input-group .dv-payment-calculator-range-list { 7391 display: -webkit-box; 7392 display: flex; 7393 width: 100%; 7394 -webkit-box-pack: justify; 7395 justify-content: space-between; 7396 margin-top: 0px; 7397 padding-top: 0px; 7398 } 7399 .dv-payment-calculator .dv-payment-calculator-input-group .dv-payment-calculator-range-list option { 7400 width: 3ex; 7401 display: -webkit-box; 7402 display: flex; 7403 -webkit-box-pack: center; 7404 justify-content: center; 7405 height: 42px; 7406 -webkit-box-align: end; 7407 align-items: end; 7408 height: 4ex; 7409 } 7410 .dv-payment-calculator .dv-payment-calculator-input-group .dv-payment-calculator-range-list option:before { 7411 content: attr(value); 7412 font-size: 12px; 7413 color: rgba(0,0,0,0.32); 7414 display: block; 7415 } 7416 .dv-payment-calculator .dv-payment-calculator-input-group input { 7417 border: none; 7418 border-bottom: 1px solid #e1e6eb; 7419 padding-left: 15px; 7420 color: #879099; 7421 padding: 5px 5px 5px 25px; 7422 font-size: 14px; 7423 font-family: inherit; 7424 outline: none; 7425 line-height: 1; 7426 width: 100%; 7427 } 7428 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range] { 7429 padding: 10px 0 0 0; 7430 border-bottom: 0; 7431 -webkit-appearance: none; 7432 -moz-appearance: none; 7433 margin: 10px 0 0 0; 7434 width: 100%; 7435 } 7436 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]:focus { 7437 outline: none; 7438 } 7439 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]:focus::-webkit-slider-runnable-track { 7440 background: #2fd566; 7441 } 7442 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]:focus::-ms-fill-lower { 7443 background: #2fd566; 7444 } 7445 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]:focus::-ms-fill-upper { 7446 background: #2fd566; 7447 } 7448 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]::-webkit-slider-runnable-track { 7449 width: 100%; 7450 height: 5px; 7451 cursor: pointer; 7452 animate: 0.2s; 7453 box-shadow: 0px 0px 0px #000; 7454 background: #2fd566; 7455 border-radius: 1px; 7456 border: 0px solid #000; 7457 } 7458 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]::-webkit-slider-thumb { 7459 box-shadow: 0px 0px 0px #000; 7460 border: 1px solid #171a1d; 7461 height: 18px; 7462 width: 18px; 7463 border-radius: 25px; 7464 background: #fff; 7465 cursor: pointer; 7466 -webkit-appearance: none; 7467 margin-top: -7px; 7468 } 7469 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]::-moz-range-track { 7470 width: 100%; 7471 height: 5px; 7472 cursor: pointer; 7473 animate: 0.2s; 7474 box-shadow: 0px 0px 0px #000; 7475 background: #2fd566; 7476 border-radius: 1px; 7477 border: 0px solid #000; 7478 } 7479 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]::-moz-range-thumb { 7480 box-shadow: 0px 0px 0px #000; 7481 border: 1px solid #171a1d; 7482 height: 18px; 7483 width: 18px; 7484 border-radius: 25px; 7485 background: #fff; 7486 cursor: pointer; 7487 } 7488 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]::-ms-track { 7489 width: 100%; 7490 height: 5px; 7491 cursor: pointer; 7492 animate: 0.2s; 7493 background: transparent; 7494 border-color: transparent; 7495 color: transparent; 7496 } 7497 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]::-ms-fill-lower { 7498 background: #2fd566; 7499 border: 0px solid #000; 7500 border-radius: 2px; 7501 box-shadow: 0px 0px 0px #000; 7502 } 7503 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]::-ms-fill-upper { 7504 background: #2fd566; 7505 border: 0px solid #000; 7506 border-radius: 2px; 7507 box-shadow: 0px 0px 0px #000; 7508 } 7509 .dv-payment-calculator .dv-payment-calculator-input-group input[type=range]::-ms-thumb {
7510 margin-top: 1px; 7511 box-shadow: 0px 0px 0px #000; 7512 border: 1px solid #171a1d; 7513 height: 18px; 7514 width: 18px; 7515 border-radius: 25px; 7516 background: #fff; 7517 cursor: pointer; 7518 } 7519 .dv-payment-calculator .dv-payment-calculator-input-group span { 7520 position: absolute; 7521 left: 0; 7522 bottom: 11px; 7523 color: #879099; 7524 font-size: 14px; 7525 line-height: 1; 7526 } 7527 .dv-payment-calculator .dv-payment-calculator-results { 7528 background: #141518; 7529 padding-bottom: 25px; 7530 } 7531 .dv-payment-calculator .dv-payment-calculator-results .dv-payment-calculator-results-header { 7532 padding: 25px 50px; 7533 } 7534 .dv-payment-calculator .dv-payment-calculator-results p { 7535 font-size: 18px; 7536 color: #fff; 7537 margin: 0; 7538 } 7539 .dv-payment-calculator .dv-payment-calculator-results .dv-payment-calculator-col-3 { 7540 margin: 0; 7541 } 7542 .dv-payment-calculator .dv-payment-calculator-results .dv-payment-calculator-input-group { 7543 margin-top: 0; 7544 margin-bottom: 0; 7545 } 7546 .dv-payment-calculator .dv-payment-calculator-results .dv-payment-calculator-input-group label { 7547 font-size: 10px; 7548 font-weight: bold; 7549 padding-bottom: 5px; 7550 } 7551 .dv-payment-calculator .dv-payment-calculator-results .dv-payment-calculator-input-group p { 7552 background: transparent; 7553 color: #fff; 7554 border-bottom: none; 7555 font-size: 20px; 7556 font-weight: 600; 7557 letter-spacing: 1px; 7558 font-family: inherit; 7559 margin: 0; 7560 } 7561 @media screen and (max-width: 768px) { 7562 .dv-payment-calculator .dv-payment-calculator-wrapper { 7563 display: block; 7564 } 7565 .dv-payment-calculator .dv-payment-calculator-wrapper [class*='dv-payment-calculator-col'] { 7566 width: 100%; 7567 -webkit-box-flex: 1; 7568 flex: 1 1 100%; 7569 } 7570 } 7571 @media screen and (max-width: 768px) { 7572 .dv-payment-calculator .dv-payment-calculator-wrapper { 7573 font-size: 0; 7574 } 7575 .dv-payment-calculator .dv-payment-calculator-wrapper .dv-payment-calculator-col-3 { 7576 font-size: 0; 7577 display: inline-block; 7578 width: 50%; 7579 } 7580 .dv-payment-calculator .dv-payment-calculator-wrapper [class*='dv-payment-calculator-col'] { 7581 margin-bottom: 25px; 7582 } 7583 .dv-payment-calculator .dv-payment-calculator-wrapper [class*='dv-payment-calculator-col']:last-child { 7584 margin-bottom: 0; 7585 } 7586 } 7587 7588 </style> 7589 7590 <div class="dv-payment-calculator"> 7591 <div class="dv-payment-calculator-container"> 7592 <div class="dv-payment-calculator-col"> 7593 <h2>Payment Calculator</h2> 7594 <div class="dv-payment-calculator-calc"> 7595 <div class="dv-payment-calculator-wrapper"> 7596 <div class="dv-payment-calculator-col-6"> 7597 <div class="dv-payment-calculator-input-group"> 7598 <label for="Purchase Price">Purchase Price</label>
7599 <span>$</span> 7600 <input type="text" value="0" id="carPrice" placeholder="0" onChange="calculate()" tabindex="2" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))"> 7601 </div> 7602 <div class="dv-payment-calculator-input-group"> 7603 <label for="Tax Rate">Tax Rate</label> 7604 <span>%</span> 7605 <input type="text" id="taxRate" value="8.9" placeholder="0" onChange="calculate()" tabindex="4" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))"> 7606 </div> 7607 <div class="dv-payment-calculator-input-group"> 7608 <label for="APR">APR</label> 7609 <span>%</span> 7610 <input type="text" value="5.99" id="intRate" placeholder="0" onChange="calculate()" tabindex="6" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))"> 7611 </div> 7612 </div> 7613 <div class="dv-payment-calculator-col-6"> 7614 <div class="dv-payment-calculator-input-group"> 7615 <label for="Trade-in Value">Trade-in Value</label> 7616 <span>$</span> 7617 <input type="text" value="0" id="tradeValue" placeholder="0" onChange="calculate()" tabindex="3" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))"> 7618 </div> 7619 <div class="dv-payment-calculator-input-group"> 7620 <label for="Trade-in Payoff Amount">Trade-in Payoff Amount</label> 7621 <span>$</span> 7622 <input type="text" value="0" id="tradePayoff" placeholder="0" onChange="calculate()" tabindex="4" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))"> 7623 </div> 7624 <div class="dv-payment-calculator-input-group"> 7625 <label for="Down Payment">Down Payment</label> 7626 <span>$</span> 7627 <input type="text" value="0" id="downPay" placeholder="0" onChange="calculate()" tabindex="5" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))"> 7628 </div> 7629 </div> 7630 </div> 7631 <div class="dv-payment-calculator-input-group"> 7632 <label for="Loan Term">Loan Term <p id="dv-payment-calculator-range-value"></p></label> 7633 <input type="range" value="72" step="12" min="12" max="84" list="dv-range-list-options" id="termRate" class="dv-payment-calculator-range-input" onChange="calculate()" tabindex="7"> 7634 7635 <datalist class="dv-payment-calculator-range-list" id="dv-range-list-options"> 7636 <option value="12"> </option> 7637 <option value="24"> </option> 7638 <option value="36"> </option> 7639 <option value="48"> </option> 7640 <option value="60"> </option> 7641 <option value="72"> </option> 7642 <option value="84"> </option> 7643 </datalist> 7644 </div> 7645 </div> 7646 </div> 7647 <div class="dv-payment-calculator-col"> 7648 <div class="dv-payment-calculator-results"> 7649 <div class="dv-payment-calculator-results-header"> 7650 <p>Payment Options</p> 7651 </div> 7652 <div class="dv-payment-calculator-wrapper"> 7653 <div class="dv-payment-calculator-col-3"> 7654 <div class="dv-payment-calculator-input-group"> 7655 <label for="Monthly Payment">Monthly Payment</label> 7656 <p id="result">$0.00</p> 7657 </div> 7658 </div> 7659 <div class="dv-payment-calculator-col-3"> 7660 <div class="dv-payment-calculator-input-group"> 7661 <label for="Bi-Weekly Payment">Bi-Weekly Payment</label> 7662 <p id="result0">$0.00</p> 7663 </div> 7664 </div> 7665 <div class="dv-payment-calculator-col-3"> 7666 <div class="dv-payment-calculator-input-group"> 7667 <label for="Weekly Payment">Weekly Payment</label> 7668 <p id="result2">$0.00</p> 7669 </div> 7670 </div> 7671 <div class="dv-payment-calculator-col-3"> 7672 <div class="dv-payment-calculator-input-group"> 7673 <label for="Total Amount Financed">Total Amount Financed</label> 7674 <p id="principal">$0.00</p> 7675 </div> 7676 </div> 7677 </div> 7678 <div class="dv-payment-calculator-wrapper"> 7679 <div class="dv-payment-calculator-col-3"> 7680 <div class="dv-payment-calculator-input-group"> 7681 <label for="Total Amount Down">Total Amount Down</label> 7682 <p id="totalAmountDown">$0.00</p> 7683 </div> 7684 </div> 7685 </div> 7686 </div> 7687 </div> 7688 </div> 7689 <div class="dv-calculator-disclaimer"> 7690 <p>*Calculated payments are estimated. Title and other fees and incentives may not be included in this calculation, which is an estimate only. Monthly payment estimates are for informational purpose and do not represent a financing offer from the seller of this vehicle. Other taxes may apply. Please complete a finance application for rates that you qual
7690ify for.</p> 7691 </div> 7692 </div> 7693
7693<script> 7694 $(function () { 7695 // Term Range Selector 7696 var PaymentCalcRange = function () { 7697 var SliderValueHTML = $("#dv-payment-calculator-range-value"); 7698 var Slider = $(".dv-payment-calculator-range-input"); 7699 SliderValueHTML.html(Slider.val() + " mo"); 7700 $(document).on("input", ".dv-payment-calculator-range-input", function () { 7701 SliderValueHTML.html($(this).val() + " mo"); 7702 }); 7703 }; 7704 PaymentCalcRange(); 7705 calculate(); 7706 }); 7707 7708 function calculate() { 7709 //Get the values of all of elements, convert the strings into ints, create decimals for values that are percentages. 7710 var carPrice = parseFloat( 7711 document.getElementById("carPrice").value.replace(/\$|,/g, "") 7712 ) || 0; 7713 var taxRate = (parseFloat(document.getElementById("taxRate").value) || 0) / 100; 7714 var tradeValue = parseFloat( 7715 document.getElementById("tradeValue").value.replace(/\$|,/g, "") 7716 ) || 0; 7717 var tradePayoff = parseFloat( 7718 document.getElementById("tradePayoff").value.replace(/\$|,/g, "") 7719 ) || 0; 7720 var downPay = parseFloat( 7721 document.getElementById("downPay").value.replace(/\$|,/g, "") 7722 ) || 0; 7723 var intRate = parseFloat(document.getElementById("intRate").value) || 0; 7724 var termRate = parseFloat(document.getElementById("termRate").value); 7725 7726 //Calculate the principal 7727 // Trade-in equity offsets the down payment; the combined amount is subtracted once. 7728 var taxAmount = carPrice * taxRate; 7729 var carWithTax = carPrice + taxAmount; 7730 var tradeEquity = parseFloat((tradeValue - tradePayoff).toFixed(2)); 7731 var totalAmountDown = parseFloat((downPay + tradeEquity).toFixed(2)); 7732 var carPrincipal = (carWithTax - totalAmountDown).toFixed(2); 7733 var intMonth = (intRate/100) / 12; 7734 7735 // Calculate Monthly/Bi-Weekly/Weekly Payments 7736 var monthly = 7737 intMonth === 0 7738 ? parseInt(carPrincipal / termRate).toFixed(2) 7739 : interest(carPrincipal, intMonth, termRate); 7740 var biWeekly = parseFloat(monthly / 2).toFixed(2); 7741 var weekly = parseFloat(monthly / 4).toFixed(2); 7742 7743 //Update the principal element with the new value. 7744 var carPrincipalFormatted = carPrincipal < 0 7745 ? "-$" + numberWithCommas(Math.abs(carPrincipal).toFixed(2).toString()) 7746 : "$" + numberWithCommas(carPrincipal.toString()); 7747 document.getElementById("principal").innerHTML = carPrincipalFormatted; 7748 7749 //Set the final calculated payment to the result element. 7750 document.getElementById("result").innerHTML = "$" + monthly; 7751 document.getElementById("result0").innerHTML = "$" + biWeekly; 7752 document.getElementById("result2").innerHTML = "$" + weekly; 7753 7754 var totalAmountDownFormatted = totalAmountDown < 0 7755 ? "-$" + numberWithCommas(Math.abs(totalAmountDown).toFixed(2).toString()) 7756 : "$" + numberWithCommas(totalAmountDown.toFixed(2).toString()); 7757 document.getElementById("totalAmountDown").innerHTML = totalAmountDownFormatted; 7758 } 7759 7760 function numberWithCommas(x) { 7761 return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 7762 } 7763 7764 function interest(principal, intRate, term) { 7765 var int1 = 1 + intRate; 7766 var intEx = int1 * int1; 7767 for (var i = 0; i < term - 2; i++) { 7768 intEx = intEx * int1; 7769 } 7770 var intEx1 = intEx - 1; 7771 var intEx2 = intRate / intEx1; 7772 var intEx3 = intEx2 + intRate; 7773 var pay = intEx3 * principal; 7774 return pay.toFixed(2); 7775 } 7776 7777 </script>
7777 7778 </div> 7779 </div> 7780 </div> <!-- cd-panel__content --> 7781 </div> <!-- cd-panel__container --> 7782 <div class="cd-panel__otherside"> 7783 </div> 7784</div> <!-- cd-panel --> 7785 <footer> 7786 <!-- sub-footer --> 7787<div class="row"> 7788 <div class="footer_top" 7789 style="background: linear-gradient(rgba(19,19,19,1), rgba(19,19,19,1)), url(); background-position:center center; background-size: cover;"> 7790 <div class="footer_container"> 7791 <div class="row footer-links"> 7792 7793 <div class="foot3 footer-soc-icons footer-bar1"> 7794 <div id="footer-sidebar1"> 7795 <!--<h5>Stay Connected</h5> 7796<a href="https://www.facebook.com/MaxMotorsDealerships/" target="_blank"><i class="fab fa-facebook-f fa-2x"></i></a> 7797<a href="https://x.com/MaxMotorsDealer" target="_blank"><i class="fa-brands fa-x-twitter fa-2x"></i></a> 7798<a href="https://www.instagram.com/maxmotorsdealerships/" target="_blank"><i class="fab fa-instagram fa-2x"></i></a> 7799<a href="https://www.youtube.com/channel/UC0DNWovN1rwsdORNDndKMSw/videos" target="_blank"><i class="fab fa-youtube fa-2x"></i></a>--> </div> 7800 </div> 7801 7802 <div class="foot3 footer-middle-sec"> 7803 <div id="footer-sidebar2"> 7804 <div><h5>Locations</h5> 7805 7806<a href="/hours-and-directions/#richmond"><i class="fa-solid fa-location-dot"></i>Max Ford of Richmond</a><br> 7807<a href="/hours-and-directions/#butler"><i class="fa-solid fa-location-dot"></i>Max Ford & CDJR of Butler</a><br> 7808<a href="/hours-and-directions/#clinton"><i class="fa-solid fa-location-dot"></i>Max CDJR of Clinton</a><br> 7809<a href="/hours-and-directions/#nevada"><i class="fa-solid fa-location-dot"></i>Max Ford & CDJR of Nevada</a><br> 7810<a href="/hours-and-directions/#nevada"><i class="fa-solid fa-location-dot"></i>Max Chevrolet & GMC of Nevada</a><br> 7811</div> </div> 7812 </div> 7813 7814 <div class="foot3 quicklinks"> 7815 <h5>Quick Links</h5> 7816 <div id="footer-sidebar3"> 7817 <aside id="nav_menu-2" class="widget widget_nav_menu"><div class="menu-quick-links-container"><ul id="menu-quick-links" class="menu"><li id="menu-item-641" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home menu-item-641"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.c
7817om/" class="menu-image-title-after"><span class="menu-image-title">Home</span></a></li> 7818<li id="menu-item-3654" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3654"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/finance/" class="menu-image-title-after"><span class="menu-image-title">Finance Center</span></a></li> 7819<li id="menu-item-3656" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3656"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/service/" class="menu-image-title-after"><span class="menu-image-title">Service Center</span></a></li> 7820<li id="menu-item-642" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-16 current_page_item menu-item-642"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/new-vehicles/" class="menu-image-title-after"><span class="menu-image-title">New Vehicles</span></a></li> 7821<li id="menu-item-8604" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8604"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.c
7821om/incentives/" class="menu-image-title-after"><span class="menu-image-title">Incentives</span></a></li> 7822<li id="menu-item-7395" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-7395"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/parts/" class="menu-image-title-after"><span class="menu-image-title">Parts Center</span></a></li> 7823<li id="menu-item-643" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-643"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/used-vehicles/" class="menu-image-title-after"><span class="menu-image-title">Used Vehicles</span></a></li> 7824<li id="menu-item-8606" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8606"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/value-trade/" class="menu-image-title-after"><span class="menu-image-title">Sell/Trade</span></a></li> 7825<li id="menu-item-3652" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3652"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.c
7825om/about/" class="menu-image-title-after"><span class="menu-image-title">About Us</span></a></li> 7826<li id="menu-item-3645" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3645"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="/used-vehicles?certified=yes" class="menu-image-title-after"><span class="menu-image-title">Certified Used Vehicles</span></a></li> 7827<li id="menu-item-3655" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-privacy-policy menu-item-3655"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/privacy-policy/" class="menu-image-title-after"><span class="menu-image-title">Privacy Policy</span></a></li> 7828<li id="menu-item-10822" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-10822"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.com/faq/" class="menu-image-title-after"><span class="menu-image-title">Frequently Asked Questions</span></a></li> 7829<li id="menu-item-3653" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3653"><a data-ag-event="menu_interaction" style="" data-element_type="new-vehicles" href="https://www.maxmotors.c
7829om/contact/" class="menu-image-title-after"><span class="menu-image-title">Contact Us</span></a></li> 7830</ul></div></aside> </div> 7831 </div> 7832 </div> 7833 7834 <div class="row"> 7835 <div class="footer_bottom-light" 7836 > 7837 <div class="footer-powered-container"> 7838 <div class="footer-copyright"> 7839 <h6><p>© 2026 Max Motors. </p> 7840 <a href="/sitemap.xml">Sitemap</a> <p>|</p> 7841 <a href="/privacy-policy/">Privacy Policy</a> 7842 </h6> 7843 </div> 7844 <div class="footer-powered"> 7845 <h6> 7846 <p>Advanced Automotive Websites By</p> 7847 <a href="https://dealeralchemist.com" target="_blank"> 7848 <h6>Dealer Alchemist</h6> 7849 </a> 7850 </h6> 7851 </div> 7852 </div> 7853 </div> 7854 </div> 7855 </div> 7856 </div> 7857</div> 7858 7859<style>table.mabel-bhi-businesshours tr.mbhi-is-current { 7860background: #E9E9E9; 7861} 7862.dv-hero { 7863 z-index: 3; 7864} 7865</style><!-- DV Google Tag Manager (noscript) -->
vendor: 68 bytes, lines 7865-7866
7865 7866<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=
7866GTM-MFJHSV5L
vendor: 91 bytes, lines 7866-7867
7866" height="0" width="0" 7867 style="display:none;visibility:hidden"></iframe></noscript>
7868<!-- DV End Google Tag Manager (noscript) --> 7869
7870<script type='text/javascript' src='https://www.maxmotors.com/wp/wp-includes/js/jquery/jquery.min.js?ver=3.6.0' id='jquery-core-js'></script>
vendor: 1 bytes, line 7870
7870
7871<script type='text/javascript' src='https://www.maxmotors.com/app/plugins/dv-leads/public/js/dv-leads-public.js?ver=1.0.1' id='dv-leads-js'></script>
vendor: 1 bytes, line 7871
7871
7872<script type='text/javascript' id='wp-api-request-js-extra'> 7873/* <![CDATA[ */ 7874var wpApiSettings = {"root":"https:\/\/www.maxmotors.com\/wp-json\/","nonce":"7b276b0779","versionString":"wp\/v2\/"}; 7875/* ]]> */ 7876</script>
vendor: 1 bytes, line 7876
7876
7877<script type='text/javascript' src='https://www.maxmotors.com/wp/wp-includes/js/api-request.min.js?ver=5.9.5' id='wp-api-request-js'></script>
vendor: 1 bytes, line 7877
7877
7878<script type='text/javascript' id='mabel-business-hours-indicator-pro-js-extra'> 7879/* <![CDATA[ */ 7880var mabel_script_vars = {"ajaxurl":"https:\/\/www.maxmotors.com\/wp\/wp-admin\/admin-ajax.php","locations":[{"Name":"Sales","Timezone":"America\/New_York","Type":"AutoDealer","Days":[{"Day":"Monday","Hours":[{"From":"9:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Tuesday","Hours":[{"From":"9:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Wednesday","Hours":[{"From":"9:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Thursday","Hours":[{"From":"9:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Friday","Hours":[{"From":"9:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Saturday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Sunday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]}],"Holidays":[],"Vacations":[]},{"Name":"Service","Timezone":"America\/New_York","Type":"AutoRepair","Days":[{"Day":"Monday","Hours":[{"From":"7:30","To":"8:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Tuesday","Hours":[{"From":"7:30","To":"8:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Wednesday","Hours":[{"From":"7:30","To":"8:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Thursday","Hours":[{"From":"7:30","To":"8:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Friday","Hours":[{"From":"7:30","To":"8:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Saturday","Hours":[{"From":"9:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Sunday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]}],"Holidays":[],"Vacations":[]},{"Name":"Parts","Timezone":"America\/New_York","Type":"AutoPartsStore","Days":[{"Day":"Monday","Hours":[{"From":"9:00","To":"3:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Tuesday","Hours":[{"From":"9:00","To":"3:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Wednesday","Hours":[{"From":"9:00","To":"3:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Thursday","Hours":[{"From":"9:00","To":"3:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Friday","Hours":[{"From":"9:00","To":"3:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Saturday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Sunday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]}],"Holidays":[],"Vacations":[]},{"Name":"Collision","Timezone":"America\/New_York","Type":"LocalBusiness","Days":[{"Day":"Monday","Hours":[{"From":"8:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Tuesday","Hours":[{"From":"8:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Wednesday","Hours":[{"From":"8:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Thursday","Hours":[{"From":"8:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Friday","Hours":[{"From":"8:00","To":"5:00","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Saturday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Sunday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]}],"Holidays":[],"Vacations":[],"Image":""},{"Name":"Rental","Timezone":"America\/New_York","Type":"AutoRental","Days":[{"Day":"Monday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Tuesday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Wednesday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Thursday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Friday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Saturday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]},{"Day":"Sunday","Hours":[{"From":"0","To":"0","ToIndication":"PM","FromIndication":"AM"}]}],"Holidays":[],"Vacations":[],"Image":""}],"settings":{"dayentryseparator":" ","time_format":"12","warning":"45","warningclosing":"45","removezeroes":true,"includetime":false,"includeday":false,"approximation":true,"loading":"Welcome!","timezone":"America\/Chicago"},"i18n":{"days":{"Monday":"Monday","Tuesday":"Tuesday","Wednesday":"Wednesday","Thursday":"Thursday","Frid
7880ay":"Friday","Saturday":"Saturday","Sunday":"Sunday"},"days_short":{"Monday":"Mon","Tuesday":"Tue","Wednesday":"Wed","Thursday":"Thu","Friday":"Fri","Saturday":"Sat","Sunday":"Sun"},"months":{"January":"January","February":"February","March":"March","April":"April","May":"May","June":"June","July":"July","August":"August","September":"September","October":"October","November":"November","December":"December"},"months_short":{"Jan":"Jan","Feb":"Feb","Mar":"Mar","Apr":"Apr","May":"May","Jun":"Jun","Jul":"Jul","Aug":"Aug","Sep":"Sept","Oct":"Oct","Nov":"Nov","Dec":"Dec"},"day":"day","days_text":"days","hour":"hour","hours":"hours","minute":"minute","minutes":"minutes","closed":"Closed"}}; 7881/* ]]> */ 7882</script>
vendor: 1 bytes, line 7882
7882
7883<script type='text/javascript' src='https://www.maxmotors.com/app/plugins/mabel-business-hours-indicator-pro/public/js/public.js?ver=3.3.9' id='mabel-business-hours-indicator-pro-js'></script>
vendor: 1 bytes, line 7883
7883
7884<script type='text/javascript' id='dds-scripts-js-extra'> 7885/* <![CDATA[ */ 7886var get_dds_data = {"ajax_url":"https:\/\/www.maxmotors.com\/wp\/wp-admin\/admin-ajax.php"}; 7887/* ]]> */ 7888</script>
vendor: 1 bytes, line 7888
7888
7889<script type='text/javascript' src='https://www.maxmotors.com/app/themes/dv-framework/shortcodes/dropdown-search/dropdown-search.js?ver=1.620.828' id='dds-scripts-js'></script>
vendor: 1 bytes, line 7889
7889
7890<script type='text/javascript' src='https://www.maxmotors.com/app/themes/dv-framework/shortcodes/searchbox/searchbox.js?ver=1.533.837' id='dv-searchbox-scripts-js'></script>
vendor: 1 bytes, line 7890
7890
7891<script type='text/javascript' id='platform-shadow-js-after'> 7892(function () { 7893 function hydrate() { 7894 // Only act on hosts we mark, and only when the shadow root isn't already present. 7895 var hosts = document.querySelectorAll('.platform-linked-content[data-platform-shadow="1"]'); 7896 for (var i = 0; i < hosts.length; i++) { 7897 var host = hosts[i]; 7898 if (host.shadowRoot || !host.attachShadow) continue; 7899 7900 var t = host.querySelector('template[shadowrootmode]'); 7901 if (!t) continue; 7902 7903 var mode = t.getAttribute('shadowrootmode') || 'open'; 7904 var root = host.attachShadow({ mode: mode }); 7905 7906 root.appendChild(t.content.cloneNode(true)); 7907 t.remove(); 7908 } 7909 } 7910 7911 if (document.readyState === 'loading') { 7912 document.addEventListener('DOMContentLoaded', hydrate); 7913 } else { 7914 hydrate(); 7915 } 7916})(); 7917</script>
vendor: 1 bytes, line 7917
7917
7918<script type='text/javascript' id='da-merge-tags-js-extra'> 7919/* <![CDATA[ */ 7920var daMergeTags = {"timezone":"America\/Chicago"}; 7921/* ]]> */ 7922</script>
vendor: 1 bytes, line 7922
7922
7923<script type='text/javascript' src='https://www.maxmotors.com/app/themes/dv-framework/components/Utils/merge-tags.min.js?ver=1.784.48' id='da-merge-tags-js'></script>
vendor: 1 bytes, line 7923
7923
7924<script type='text/javascript' id='get_srp_form-js-extra'> 7925/* <![CDATA[ */ 7926var get_srp_form = {"ajax_url":"https:\/\/www.maxmotors.com\/wp\/wp-admin\/admin-ajax.php"}; 7927/* ]]> */ 7928</script>
vendor: 1 bytes, line 7928
7928
7929<script type='text/javascript' src='https://www.maxmotors.com/app/themes/dv-framework/media/js/srp-ajax.js?ver=1.776.838' id='get_srp_form-js'></script>
vendor: 1 bytes, line 7929
7929
7930<script type='text/javascript' id='script-ga4-js-extra'> 7931/* <![CDATA[ */ 7932var AGEventManagerOptions = {"debug":"","trackingIDs":["G-FJJW9F3TE6","G-M3B4B59Q4Z"]}; 7933/* ]]> */ 7934</script>
vendor: 1 bytes, line 7934
7934
7935<script type="module" src="https://www.maxmotors.com/app/themes/dv-framework/components/EventsManager/public/latest.js?ver=1790226195"></script>
7935<script type='text/javascript' src='https://www.maxmotors.com/app/plugins/gravityforms/js/jquery.maskedinput.min.js?ver=2.4.6' id='gform_masked_input-js'></script>
vendor: 1 bytes, line 7935
7935
7936<script type='text/javascript' src='https://www.maxmotors.com/app/plugins/gravityforms/js/placeholders.jquery.min.js?ver=2.4.6' id='gform_placeholder-js'></script>
7936 7937 <div class="ag-kia-window-sticker-modal" data-kia-window-sticker-modal aria-hidden="true"> 7938 <div class="ag-kia-window-sticker-modal__backdrop" data-kia-window-sticker-close></div> 7939 <div class="ag-kia-window-sticker-modal__dialog" role="dialog" aria-modal="true" aria-label="Factory Window Sticker"> 7940 <button class="ag-kia-window-sticker-modal__close" type="button" data-kia-window-sticker-close aria-label="Close window sticker">×</button> 7941 <iframe class="ag-kia-window-sticker-modal__iframe" data-kia-window-sticker-frame title="Factory Window Sticker"></iframe> 7942 </div> 7943 </div> 7944 <style> 7945 .ag-kia-window-sticker-modal { 7946 position: fixed; 7947 z-index: 999999; 7948 top: 0; 7949 right: 0; 7950 bottom: 0; 7951 left: 0; 7952 display: none; 7953 } 7954 .ag-kia-window-sticker-modal.is-open { 7955 display: block; 7956 } 7957 .ag-kia-window-sticker-modal__backdrop { 7958 position: absolute; 7959 top: 0; 7960 right: 0; 7961 bottom: 0; 7962 left: 0; 7963 background: rgba(0, 0, 0, 0.72); 7964 } 7965 .ag-kia-window-sticker-modal__dialog { 7966 position: absolute; 7967 top: 50%; 7968 left: 50%; 7969 width: 82vw; 7970 max-width: 1560px; 7971 height: 88vh; 7972 max-height: 980px; 7973 transform: translate(-50%, -50%); 7974 background: #fff; 7975 box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35); 7976 } 7977 .ag-kia-window-sticker-modal__close { 7978 position: absolute; 7979 z-index: 1; 7980 top: 8px; 7981 right: 10px; 7982 width: 34px; 7983 height: 34px; 7984 border: 0; 7985 border-radius: 50%; 7986 background: #222; 7987 color: #fff; 7988 font-size: 26px; 7989 line-height: 30px; 7990 cursor: pointer; 7991 } 7992 .ag-kia-window-sticker-modal__iframe { 7993 width: 100%; 7994 height: 100%; 7995 border: 0; 7996 } 7997 body.ag-kia-window-sticker-modal-open { 7998 overflow: hidden; 7999 } 8000 @media (max-width: 767px) { 8001 .ag-kia-window-sticker-modal__dialog { 8002 width: calc(100vw - 20px); 8003 height: calc(100vh - 20px); 8004 max-height: none; 8005 } 8006 } 8007 </style> 8008
8008<script> 8009 (function () { 8010 var modal = document.querySelector('[data-kia-window-sticker-modal]'); 8011 var frame = document.querySelector('[data-kia-window-sticker-frame]'); 8012 var activeTrigger = null; 8013 8014 if (!modal || !frame) { 8015 return; 8016 } 8017 8018 function open(url, trigger) { 8019 activeTrigger = trigger || null; 8020 frame.setAttribute('src', url); 8021 modal.classList.add('is-open'); 8022 modal.setAttribute('aria-hidden', 'false'); 8023 document.body.classList.add('ag-kia-window-sticker-modal-open'); 8024 } 8025 8026 function close() { 8027 modal.classList.remove('is-open'); 8028 modal.setAttribute('aria-hidden', 'true'); 8029 frame.removeAttribute('src'); 8030 document.body.classList.remove('ag-kia-window-sticker-modal-open'); 8031 8032 if (activeTrigger && typeof activeTrigger.focus === 'function') { 8033 activeTrigger.focus(); 8034 } 8035 } 8036 8037 function closest(element, selector) { 8038 while (element && element !== document) { 8039 if (element.matches && element.matches(selector)) { 8040 return element; 8041 } 8042 8043 element = element.parentNode; 8044 } 8045 8046 return null; 8047 } 8048 8049 window.AutoGoKiaWindowSticker = { 8050 open: open, 8051 close: close 8052 }; 8053 8054 document.addEventListener('click', function (event) { 8055 var link = closest(event.target, '[data-kia-window-sticker-link]'); 8056 8057 if (!link) { 8058 link = closest(event.target, 'a[href*="/kia-window-sticker/"]'); 8059 } 8060 8061 if (link) { 8062 event.preventDefault(); 8063 event.stopImmediatePropagation(); 8064 open(link.href, link); 8065 } 8066 }, true); 8067 8068 document.addEventListener('click', function (event) { 8069 if (!closest(event.target, '[data-kia-window-sticker-close]')) { 8070 return; 8071 } 8072 8073 event.preventDefault(); 8074 close(); 8075 }); 8076 8077 document.addEventListener('keyup', function (event) { 8078 if ((event.key === 'Escape' || event.keyCode === 27) && modal.classList.contains('is-open')) { 8079 close(); 8080 } 8081 }); 8082 })(); 8083 </script>
8083 8084 <!-- HFCM by 99 Robots - Snippet # 1: USERway -->
8085<script src="https://cdn.userway.org/widget.js" data-account="SNSTzAU4BD"></script>
8085 8086<!-- /end HFCM by 99 Robots --> 8087<!-- Matomo -->
8088<script> 8089 var _paq = window._paq = window._paq || []; 8090 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ 8091 _paq.push(['trackPageView']); 8092 _paq.push(['enableLinkTracking']); 8093 (function() { 8094 var u="https://analytics.autogo.ai/"; 8095 _paq.push(['setTrackerUrl', u+'matomo.php']); 8096 _paq.push(['setSiteId', '428']); 8097 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; 8098 g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); 8099 })(); 8100</script>
8100 8101<!-- End Matomo Code --> 8102
8103<script type="application/ld+json" data-type="generalSchema"> 8104{ 8105 "@context": "https://www.schema.org", 8106 "@type": "AutoDealer", 8107 "@id": "https://www.maxmotors.com/#maxmotors", 8108 "priceRange": "$-$$$", 8109 "name": "Max Motors", 8110 "url": "https://www.maxmotors.com", 8111 "telephone": "816.776.2288", 8112 "image": "https://bucket.dealeralchemist.com/max-motors/max-logo.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=200", 8113 "logo": "https://bucket.dealeralchemist.com/max-motors/max-logo.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=200", 8114 "address": { 8115 "@type": "PostalAddress", 8116 "streetAddress": "", 8117 "addressLocality": "", 8118 "addressRegion": "Missouri", 8119 "postalCode": "", 8120 "addressCountry": "US" 8121}, 8122 "openingHoursSpecification": [ 8123 { 8124 "@type": "OpeningHoursSpecification", 8125 "dayOfWeek": [ 8126 "Monday", 8127 "Tuesday", 8128 "Wednesday", 8129 "Thursday", 8130 "Friday" 8131 ], 8132 "opens": "09:00", 8133 "closes": "17:00" 8134 }, 8135 { 8136 "@type": "OpeningHoursSpecification", 8137 "dayOfWeek": [ 8138 "Saturday", 8139 "Sunday" 8140 ], 8141 "opens": "00:00", 8142 "closes": "12:00" 8143 }, 8144 { 8145 "@type": "OpeningHoursSpecification", 8146 "dayOfWeek": [ 8147 "Monday", 8148 "Tuesday", 8149 "Wednesday", 8150 "Thursday", 8151 "Friday" 8152 ], 8153 "opens": "07:30", 8154 "closes": "20:00" 8155 }, 8156 { 8157 "@type": "OpeningHoursSpecification", 8158 "dayOfWeek": [ 8159 "Saturday" 8160 ], 8161 "opens": "09:00", 8162 "closes": "17:00" 8163 }, 8164 { 8165 "@type": "OpeningHoursSpecification", 8166 "dayOfWeek": [ 8167 "Sunday" 8168 ], 8169 "opens": "00:00", 8170 "closes": "12:00" 8171 }, 8172 { 8173 "@type": "OpeningHoursSpecification", 8174 "dayOfWeek": [ 8175 "Monday", 8176 "Tuesday", 8177 "Wednesday", 8178 "Thursday", 8179 "Friday" 8180 ], 8181 "opens": "09:00", 8182 "closes": "15:00" 8183 }, 8184 { 8185 "@type": "OpeningHoursSpecification", 8186 "dayOfWeek": [ 8187 "Saturday", 8188 "Sunday" 8189 ], 8190 "opens": "00:00", 8191 "closes": "12:00" 8192 }, 8193 { 8194 "@type": "OpeningHoursSpecification", 8195 "dayOfWeek": [ 8196 "Monday", 8197 "Tuesday", 8198 "Wednesday", 8199 "Thursday", 8200 "Friday" 8201 ], 8202 "opens": "08:00", 8203 "closes": "17:00" 8204 }, 8205 { 8206 "@type": "OpeningHoursSpecification", 8207 "dayOfWeek": [ 8208 "Saturday", 8209 "Sunday" 8210 ], 8211 "opens": "00:00", 8212 "closes": "12:00" 8213 }, 8214 { 8215 "@type": "OpeningHoursSpecification", 8216 "dayOfWeek": [ 8217 "Monday", 8218 "Tuesday", 8219 "Wednesday", 8220 "Thursday", 8221 "Friday", 8222 "Saturday", 8223 "Sunday" 8224 ], 8225 "opens": "00:00", 8226 "closes": "12:00" 8227 } 8228], 8229 "department": [ 8230 { 8231 "@type": "AutoDealer", 8232 "priceRange": "$-$$$", 8233 "name": "Sales", 8234 "address": { 8235 "@type": "PostalAddress", 8236 "streetAddress": "", 8237 "addressLocality": "", 8238 "addressRegion": "Missouri", 8239 "postalCode": "", 8240 "addressCountry": "US" 8241 }, 8242 "telephone": "816.776.2288", 8243 "openingHoursSpecification": [ 8244 { 8245 "@type": "OpeningHoursSpecification", 8246 "dayOfWeek": [ 8247 "Monday", 8248 "Tuesday", 8249 "Wednesday", 8250 "Thursday", 8251 "Friday" 8252 ], 8253 "opens": "09:00", 8254 "closes": "17:00" 8255 }, 8256 { 8257 "@type": "OpeningHoursSpecification", 8258 "dayOfWeek": [ 8259 "Saturday", 8260 "Sunday" 8261 ], 8262 "opens": "00:00", 8263 "closes": "12:00" 8264 } 8265 ], 8266 "image": "https:\/\/bucket.dealeralchemist.com\/max-motors\/max-logo.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=200" 8267 }, 8268 { 8269 "@type": "AutoRepair", 8270 "priceRange": "$-$$$", 8271 "name": "Service", 8272 "address": { 8273 "@type": "PostalAddress", 8274 "streetAddress": "", 8275 "addressLocality": "", 8276 "addressRegion": "Missouri", 8277 "postalCode": "", 8278 "addressCountry": "US" 8279 }, 8280 "telephone": "816.776.2288", 8281 "openingHoursSpecification": [ 8282 { 8283 "@type": "OpeningHoursSpecification", 8284 "dayOfWeek": [ 8285 "Monday", 8286 "Tuesday", 8287 "Wednesday", 8288 "Thursday", 8289 "Friday" 8290 ], 8291 "opens": "07:30", 8292 "closes": "20:00" 8293 }, 8294 { 8295 "@type": "OpeningHoursSpecification", 8296 "dayOfWeek": [ 8297 "Saturday" 8298 ], 8299 "opens": "09:00", 8300 "closes": "17:00" 8301 }, 8302 { 8303 "@type": "OpeningHoursSpecification", 8304 "dayOfWeek": [ 8305 "Sunday" 8306 ], 8307 "opens": "00:00", 8308 "closes": "12:00" 8309 } 8310 ], 8311 "image": "https:\/\/bucket.dealeralchemist.com\/max-motors\/max-logo.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=200" 8312 }, 8313 { 8314 "@type": "AutoPartsStore", 8315 "priceRange": "$-$$$", 8316 "name": "Parts", 8317 "address": { 8318 "@type": "PostalAddress", 8319 "streetAddress": "", 8320 "addressLocality": "", 8321 "addressRegion": "Missouri", 8322 "postalCode": "", 8323 "addressCountry": "US" 8324 }, 8325 "telephone": "816.776.2288", 8326 "openingHoursSpecification": [ 8327 { 8328 "@type": "OpeningHoursSpecification", 8329 "dayOfWeek": [ 8330 "Monday", 8331 "Tuesday", 8332 "Wednesday", 8333 "Thursday", 8334 "Friday" 8335 ], 8336 "opens": "09:00", 8337 "closes": "15:00" 8338 }, 8339 { 8340 "@type": "OpeningHoursSpecification", 8341 "dayOfWeek": [ 8342 "Saturday", 8343 "Sunday" 8344 ], 8345 "opens": "00:00", 8346 "closes": "12:00" 8347 } 8348 ], 8349 "image": "https:\/\/bucket.dealeralchemist.com\/max-motors\/max-logo.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=200" 8350 }, 8351 { 8352 "@type": "LocalBusiness", 8353 "priceRange": "$-$$$", 8354 "name": "Collision", 8355 "address": { 8356 "@type": "PostalAddress", 8357 "streetAddress": "", 8358 "addressLocality": "", 8359 "addressRegion": "Missouri", 8360 "postalCode": "", 8361 "addressCountry": "US" 8362 }, 8363 "telephone": "816.776.2288", 8364 "openingHoursSpecification": [ 8365 { 8366 "@type": "OpeningHoursSpecification", 8367 "dayOfWeek": [ 8368 "Monday", 8369 "Tuesday", 8370 "Wednesday", 8371 "Thursday", 8372 "Friday" 8373 ], 8374 "opens": "08:00", 8375 "closes": "17:00" 8376 }, 8377 { 8378 "@type": "OpeningHoursSpecification", 8379 "dayOfWeek": [ 8380 "Saturday", 8381 "Sunday" 8382 ], 8383 "opens": "00:00", 8384 "closes": "12:00" 8385 } 8386 ], 8387 "image": "https:\/\/bucket.dealeralchemist.com\/max-motors\/max-logo.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=200" 8388 }, 8389 { 8390 "@type": "AutoRental", 8391 "priceRange": "$-$$$", 8392 "name": "Rental", 8393 "address": { 8394 "@type": "PostalAddress", 8395 "streetAddress": "", 8396 "addressLocality": "", 8397 "addressRegion": "Missouri", 8398 "postalCode": "", 8399 "addressCountry": "US" 8400 }, 8401 "telephone": "816.776.2288", 8402 "openingHoursSpecification": [ 8403 { 8404 "@type": "OpeningHoursSpecification", 8405 "dayOfWeek": [ 8406 "Monday", 8407 "Tuesday", 8408 "Wednesday", 8409 "Thursday", 8410 "Friday", 8411 "Saturday", 8412 "Sunday" 8413 ], 8414 "opens": "00:00", 8415 "closes": "12:00" 8416 } 8417 ], 8418 "image": "https:\/\/bucket.dealeralchemist.com\/max-motors\/max-logo.png?auto=compress%2Cformat&ixlib=php-3.3.1&w=200" 8419 } 8420]} 8421</script>
vendor: 1 bytes, line 8421
8421
8422<script type="text/javascript"> 8423 8424 jQuery(document).ready(function($) { 8425 8426 let submittedVins = []; 8427 let vdpContainer = jQuery("#fixed-info-container"); 8428 let isVDP = vdpContainer.length > 0; 8429 8430 // Per Kyle / analytics team, quick form submissions should be considered 8431 // sales forms — set directly (rather than starting as 'Lead' and mutating 8432 // to 'sales' only after the first submission, which used to leak the 8433 // mutated state into engagement events and into any other quick form 8434 // sharing this same script instance on the page, e.g. one-per-listing-card 8435 // on an SRP). 8436 const ascFormDetails = { 8437 name: 'Quick Form', 8438 type: 'sales', 8439 department: 'sales' 8440 }; 8441 8442 // Check if SD Analytics is available 8443 let haveSdAnalytics = false; 8444 8445 // Capture form input clicks 8446 jQuery(document).on("input", ".gform_quick_form input", function(e) { 8447 const form = $(e.target).closest("form")[0]; 8448 QFFormInitiated(getFormData(e), form, e.target); 8449 }); 8450 8451 function getFormData(e) { 8452 let form; 8453 if ( e !== null ) { 8454 form = $(e.target).closest("form"); 8455 } else { 8456 form = $(this).closest("form"); 8457 } 8458 8459 return { 8460 name: form.find("[name=da_quick_form_name]").val(), 8461 phone: form.find("[name=da_quick_form_phone]").val(), 8462 email: form.find("[name=da_quick_form_email]").val(), 8463 vin: form.find(".vin-field").val(), 8464 stockNumber: form.find(".stock-number-field").val(), 8465 year: form.find(".year-field").val(), 8466 make: form.find(".make-field").val(), 8467 model: form.find(".model-field").val(), 8468 trim: form.find(".trim-field").val(), 8469 msrp: form.find(".msrp-field").val(), 8470 finalPrice: form.find(".final-price-field").val(), 8471 dealerName: form.find(".dealer-name-field").val(), 8472 discountMatrix: form.find(".discount-matrix-field").val(), 8473 internetPrice: form.find(".internet-price-field").val(), 8474 condition: form.find(".condition-field").val(), 8475 vehicleUrl: form.find(".vehicle-url-field").val(), 8476 }; 8477 } 8478 8479 function validatePhoneNumber(phone) { 8480 const cleaned = phone.replace(/[^0-9]/g, ""); 8481 8482 if (cleaned.length < 10 || cleaned.length > 11) { 8483 return false; 8484 } 8485 8486 if (cleaned.length === 11 && cleaned[0] !== "1") { 8487 return false; 8488 } 8489 8490 const suspiciousPatterns = [ 8491 /^(.)�{9,}$/, 8492 /^(12345678\d{2})$/, 8493 /^(98765432\d{2})$/, 8494 /^(0{10})$/ 8495 ]; 8496 8497 for (let pattern of suspiciousPatterns) { 8498 if (pattern.test(cleaned)) { 8499 return false; 8500 } 8501 } 8502 8503 return true; 8504 } 8505 8506 function validateEmail(email) { 8507 if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { 8508 return false; 8509 } 8510 8511 const disposableDomains = [ 8512 "tempmail.com", "throwaway.com", "mailinator.com", 8513 "temp-mail.org", "fakeinbox.com", "guerrillamail.com", 8514 "yopmail.com", "10minutemail.com", "trashmail.com", 8515 "test.com" 8516 ]; 8517 8518 const domain = email.split("@")[1].toLowerCase(); 8519 if (disposableDomains.includes(domain)) { 8520 return false; 8521 } 8522 8523 const suspiciousPatterns = [ 8524 /^test/, 8525 /^[0-9]+@/, 8526 /^admin@/, 8527 /^info@/, 8528 /^no-?reply@/ 8529 ]; 8530 8531 for (let pattern of suspiciousPatterns) { 8532 if (pattern.test(email.toLowerCase())) { 8533 return false; 8534 } 8535 } 8536 8537 return true; 8538 } 8539 8540 function formatPhoneNumber(input) { 8541 let numbers = input.replace(/\D/g, ""); 8542 numbers = numbers.substring(0, 10); 8543 8544 if (numbers.length === 0) return ""; 8545 if (numbers.length <= 3) return "(" + numbers; 8546 if (numbers.length <= 6) return "(" + numbers.substring(0,3) + ") " + numbers.substring(3); 8547 return "(" + numbers.substring(0,3) + ") " + numbers.substring(3,6) + "-" + numbers.substring(6); 8548 } 8549 8550 $(document).on("input", ".da-quick-form-phone-input", function(e) { 8551 let input = $(this); 8552 let formatted = formatPhoneNumber(input.val()); 8553 input.val(formatted); 8554 }); 8555 8556 $(document).on("paste", ".da-quick-form-phone-input", function(e) { 8557 e.preventDefault(); 8558 let input = $(this); 8559 let pastedText = (e.originalEvent.clipboardData || window.clipboardData).getData("text"); 8560 input.val(formatPhoneNumber(pastedText)); 8561 }); 8562 8563 function populateHiddenFields(formInstance) { 8564 if (typeof DVHydrate !== 'undefined') { 8565 DVHydrate.populateFormFields("#" + formInstance); 8566 } 8567 } 8568 8569 function QFFormShown(formData) 8570 { 8571 if (haveSdAnalytics && typeof(sd) !== "undefined") { 8572 sd("dataLayer", { 8573 formType: "General Contact", 8574 displayType: "in-page", 8575 events: "formShown", 8576 formVehicle: formData 8577 }); 8578 8579 sd("send"); 8580 } 8581 } 8582 8583 const isSRP = $("body").hasClass("srp_main"); 8584 8585 let quickFormTitle = $(".quick_form_title"); 8586 if (!isSRP && quickFormTitle && quickFormTitle.is(":visible")) { 8587 QFFormShown(getFormData(null)); 8588 } 8589 8590 function QFFormInitiated(formData, form, fieldTarget) 8591 {
8592 try { 8593 if (haveSdAnalytics && typeof(sd) !== "undefined") { 8594 if (form && form.dataset.sdFormInitiationTracked !== "true") { 8595 sendShiftDigitalFormEvent({ 8596 formType: "General Contact", 8597 displayType: "in-page", 8598 eventName: "formInitiation", 8599 formVehicle: formData 8600 }); 8601 8602 form.dataset.sdFormInitiationTracked = "true"; 8603 } 8604 8605 if (shouldTrackShiftDigitalFieldInteraction(fieldTarget)) { 8606 sendShiftDigitalFormEvent({ 8607 formType: "General Contact", 8608 displayType: "in-page", 8609 eventName: "formFieldInteraction", 8610 fieldTarget: fieldTarget, 8611 formVehicle: formData 8612 }); 8613 } 8614 } 8615 } catch (e) { 8616 console.error(e); 8617 } 8618 8619 if (window.DAForms) { 8620 window.DAForms.formEngagement('asc_form_engagement', ascFormDetails, 'start', getVehicleFromForm(form)); 8621 } 8622 } 8623 8624 function getVehicleFromForm(form) 8625 { 8626 let vehicle = {}; 8627 const formData = getFormData({target: form}); 8628 vehicle.vin = formData.vin; 8629 vehicle.make = formData.make; 8630 vehicle.model = formData.model; 8631 vehicle.displayedPrice = parseFloat(formData.finalPrice.replace(/[^\d.]/g, '')); 8632 vehicle.status = formData.condition; 8633 vehicle.year = formData.year; 8634 vehicle.trim = formData.trim; 8635 8636 return vehicle; 8637 } 8638 8639 function QFFormSubmitted(formData, form) 8640 { 8641 if ( submittedVins.includes(formData.vin)) { 8642 return; 8643 } else { 8644 submittedVins.push(formData.vin); 8645 } 8646 8647 try { 8648 if (haveSdAnalytics && typeof(sd) !== "undefined" && formData.vin ) { 8649 sd("dataLayer", { 8650 formType: "General Contact", 8651 displayType: "in-page", 8652 events: "formSubmission", 8653 formVehicle: formData, 8654 leadType: "lead" 8655 }); 8656 sd("send"); 8657 } 8658 } catch (e) { 8659 console.error(e); 8660 } 8661 8662 if (window.DAForms) { 8663 window.DAForms.formSubmission('asc_form_submission', ascFormDetails, formData.buttonText, 'unknown', getVehicleFromForm(form)); 8664 window.DAForms.addDepartmentSpecificSubmission(ascFormDetails, formData.buttonText); 8665 } 8666 } 8667 8668 function getQuickFormCookies() { 8669 let cookies = {}; 8670 document.cookie.split(";").forEach(cookie => { 8671 let parts = cookie.trim().split("="); 8672 let name = parts[0]; 8673 let value = parts[1]; 8674 if (name.startsWith("quickFormUnlocked_")) { 8675 cookies[name] = value; 8676 } 8677 }); 8678 return cookies; 8679 } 8680 8681 function checkAndHideForms() { 8682 let cookies = getQuickFormCookies(); 8683 8684 if (Object.keys(cookies).length === 0) return; 8685 8686 // Get the condition from the container 8687 let condition = isVDP ? 8688 vdpContainer.data("vehicle-condition").toLowerCase() : 8689 jQuery(".listing").first().data("vehicle-condition").toLowerCase(); 8690
8691 // Check for condition-specific "all" cookie 8692 if (`quickFormUnlocked_all_` + condition in cookies) { 8693 jQuery(".da-quick-form").remove(); 8694 jQuery(".da-quick-form-unlocked").show(); 8695 jQuery("#da-quick-form-unlocked").show(); 8696 jQuery("#vdp-pricingheader-container").remove(); 8697 return; 8698 } 8699 8700 if (vdpContainer.length > 0) { 8701 // VDP logic 8702 let vin = vdpContainer.data("vehicle-vin"); 8703 if (vin && "quickFormUnlocked_" + vin in cookies) { 8704 jQuery(".da-quick-form").remove(); 8705 } 8706 } else { 8707 // SRP logic 8708 jQuery(".da-quick-form").each(function() { 8709 let form = jQuery(this); 8710 let parentCard = form.closest(".listing"); 8711 let vin = parentCard.data("vehicleVin"); 8712 8713 if (vin && "quickFormUnlocked_" + vin in cookies) { 8714 form.remove(); 8715 } 8716 }); 8717 } 8718 } 8719 8720 if(isVDP) { 8721 checkAndHideForms(); 8722 setTimeout(function() { 8723 jQuery(".da-quick-form").each(function() { 8724 let formId = jQuery(this).attr("id"); 8725 populateHiddenFields(formId); 8726 }); 8727 }, 2000); 8728 } 8729 8730 // submitQuickForm will trigger this event after it has submitted to the WP backend 8731 document.addEventListener("form:quick-form-submit", function(e) { 8732 QFFormSubmitted(e.detail.data, e.detail.form); 8733 }); 8734 8735 $(document).on("submit", ".da-quick-form form", function(e) { 8736 e.preventDefault(); 8737 8738 const form = $(this); 8739 const button = form.find(".da-quick-form-button"); 8740 const defaultIcon = button.find(".default-icon"); 8741 const loadingIcon = button.find(".loading-icon"); 8742 const buttonText = button.find(".button-text"); 8743 8744 button.prop("disabled", true); 8745 defaultIcon.removeClass("active"); 8746 loadingIcon.addClass("active"); 8747 const originalButtonText = buttonText.text(); 8748 buttonText.text("SUBMITTING..."); 8749 8750 const email = form.find("[name=da_quick_form_email]").val(); 8751 const phone = form.find("[name=da_quick_form_phone]").val(); 8752 8753 const status = (validateEmail(email) && validatePhoneNumber(phone)) ? "active" : "spam"; 8754 let vehicleCard = form.closest(".listing"); 8755 8756 const qfData = { 8757 name: form.find("[name=da_quick_form_name]").val(), 8758 security: form.find("[name=da_quick_form_nonce]").val(), 8759 phone: phone, 8760 email: email, 8761 status: status, 8762 id: form.find(".vin-field").val(), 8763 vin: form.find(".vin-field").val(), 8764 stockNumber: form.find(".stock-number-field").val(), 8765 year: form.find(".year-field").val(), 8766 make: form.find(".make-field").val(), 8767 model: form.find(".model-field").val(), 8768 trim: form.find(".trim-field").val(), 8769 msrp: form.find(".msrp-field").val(), 8770 finalPrice: form.find(".final-price-field").val(), 8771 dealerName: form.find(".dealer-name-field").val(), 8772 discountMatrix: form.find(".discount-matrix-field").val(), 8773 discountMatrixValue: form.find(".discount-matrix-value-field").val(), 8774 internetPrice: form.find(".internet-price-field").val(), 8775 condition: isVDP ? form.find(".condition-field").val() : $(vehicleCard).attr("data-vehicle-condition"), 8776 vehicleUrl: form.find(".vehicle-url-field").val(), 8777 formId: parseInt(form.data("form-id")), 8778 formLocation: isVDP ? "VDP" : "SRP", 8779 buttonText: originalButtonText 8780 }; 8781 8782 form.find("input, button").prop("disabled", true); 8783 8784 submitQuickForm(qfData, form); 8785 }); 8786 }); 8787</script>
8787<link rel='preload' as='style' onload="this.onload=null;this.rel='stylesheet'" id='itsg_progresszero_css' href='https://www.maxmotors.com/app/plugins/gravity-forms-start-progress-bar-at-zero-percent/css/itsg_progresszero_css.min.css?ver=1.2.0' type='text/css' media='all' />
8787<script type='text/javascript' src='https://www.maxmotors.com/app/plugins/gravityforms/js/jquery.json.min.js?ver=2.4.6' id='gform_json-js'></script>
vendor: 1 bytes, line 8787
8787
8788<script type='text/javascript' id='gform_gravityforms-js-extra'> 8789/* <![CDATA[ */ 8790var gform_gravityforms = {"strings":{"invalid_file_extension":"This type of file is not allowed. Must be one of the following: ","delete_file":"Delete this file","in_progress":"in progress","file_exceeds_limit":"File exceeds size limit","illegal_extension":"This type of file is not allowed.","max_reached":"Maximum number of files reached","unknown_error":"There was a problem while saving the file on the server","currently_uploading":"Please wait for the uploading to complete","cancel":"Cancel","cancel_upload":"Cancel this upload","cancelled":"Cancelled"},"vars":{"images_url":"https:\/\/www.maxmotors.com\/app\/plugins\/gravityforms\/images"}}; 8791var gform_gravityforms = {"strings":{"invalid_file_extension":"This type of file is not allowed. Must be one of the following: ","delete_file":"Delete this file","in_progress":"in progress","file_exceeds_limit":"File exceeds size limit","illegal_extension":"This type of file is not allowed.","max_reached":"Maximum number of files reached","unknown_error":"There was a problem while saving the file on the server","currently_uploading":"Please wait for the uploading to complete","cancel":"Cancel","cancel_upload":"Cancel this upload","cancelled":"Cancelled"}
8791,"vars":{"images_url":"https:\/\/www.maxmotors.com\/app\/plugins\/gravityforms\/images"}}; 8792var gform_gravityforms = {"strings":{"invalid_file_extension":"This type of file is not allowed. Must be one of the following: ","delete_file":"Delete this file","in_progress":"in progress","file_exceeds_limit":"File exceeds size limit","illegal_extension":"This type of file is not allowed.","max_reached":"Maximum number of files reached","unknown_error":"There was a problem while saving the file on the server","currently_uploading":"Please wait for the uploading to complete","cancel":"Cancel","cancel_upload":"Cancel this upload","cancelled":"Cancelled"},"vars":{"images_url":"https:\/\/www.maxmotors.com\/app\/plugins\/gravityforms\/images"}}; 8793var gform_gravityforms = {"strings":{"invalid_file_extension":"This type of file is not allowed. Must be one of the following: ","delete_file":"Delete this file","in_progress":"in progress","file_exceeds_limit":"File exceeds size limit","illegal_extension":"This type of file is not allowed.","max_reached":"Maximum number of files reached","unknown_error":"There was a problem while saving the file on the server","currently_uploading":"Please wait for the uploading to complete","cancel":"Cancel","cancel_upload":"Cancel this upload","cancelled":"Cancelled"}
8793,"vars":{"images_url":"https:\/\/www.maxmotors.com\/app\/plugins\/gravityforms\/images"}}; 8794var gform_gravityforms = {"strings":{"invalid_file_extension":"This type of file is not allowed. Must be one of the following: ","delete_file":"Delete this file","in_progress":"in progress","file_exceeds_limit":"File exceeds size limit","illegal_extension":"This type of file is not allowed.","max_reached":"Maximum number of files reached","unknown_error":"There was a problem while saving the file on the server","currently_uploading":"Please wait for the uploading to complete","cancel":"Cancel","cancel_upload":"Cancel this upload","cancelled":"Cancelled"},"vars":{"images_url":"https:\/\/www.maxmotors.com\/app\/plugins\/gravityforms\/images"}}; 8795var gform_gravityforms = {"strings":{"invalid_file_extension":"This type of file is not allowed. Must be one of the following: ","delete_file":"Delete this file","in_progress":"in progress","file_exceeds_limit":"File exceeds size limit","illegal_extension":"This type of file is not allowed.","max_reached":"Maximum number of files reached","unknown_error":"There was a problem while saving the file on the server","currently_uploading":"Please wait for the uploading to complete","cancel":"Cancel","cancel_upload":"Cancel this upload","cancelled":"Cancelled"}
8795,"vars":{"images_url":"https:\/\/www.maxmotors.com\/app\/plugins\/gravityforms\/images"}}; 8796/* ]]> */ 8797</script>
vendor: 1 bytes, line 8797
8797
8798<script type='text/javascript' src='https://www.maxmotors.com/app/plugins/gravityforms/js/gravityforms.min.js?ver=2.4.6' id='gform_gravityforms-js'></script>
vendor: 1 bytes, line 8798
8798
8799<script type='text/javascript' src='https://www.maxmotors.com/app/plugins/gravityforms/js/conditional_logic.min.js?ver=2.4.6' id='gform_conditional_logic-js'></script>
vendor: 1 bytes, line 8799
8799
8800<script type='text/javascript' src='https://www.maxmotors.com/wp/wp-includes/js/jquery/ui/core.min.js?ver=1.13.1' id='jquery-ui-core-js'></script>
vendor: 1 bytes, line 8800
8800
8801<script type='text/javascript' src='https://www.maxmotors.com/wp/wp-includes/js/jquery/ui/datepicker.min.js?ver=1.13.1' id='jquery-ui-datepicker-js'></script>
vendor: 1 bytes, line 8801
8801
8802<script type='text/javascript' src='https://www.maxmotors.com/app/plugins/gravityforms/js/datepicker.min.js?ver=2.4.6' id='gform_datepicker_init-js'></script>
vendor: 1 bytes, line 8802
8802
8803<script type='text/javascript' src='https://www.maxmotors.com/wp/wp-includes/js/plupload/moxie.min.js?ver=1.3.5' id='moxiejs-js'></script>
vendor: 1 bytes, line 8803
8803
8804<script type='text/javascript' src='https://www.maxmotors.com/wp/wp-includes/js/plupload/plupload.min.js?ver=2.1.9' id='plupload-js'></script>
vendor: 1 bytes, line 8804
8804
8805<script type='text/javascript'> if(typeof gf_global == 'undefined') var gf_global = {"gf_currency_config":{"name":"U.S. Dollar","symbol_left":"$","symbol_right":"","symbol_padding":"","thousand_separator":",","decimal_separator":".","decimals":2},"base_url":"https:\/\/www.maxmotors.com\/app\/plugins\/gravityforms","number_formats":[],"spinnerUrl":"https:\/\/www.maxmotors.com\/app\/plugins\/gravityforms\/images\/spinner.gif"};jQuery(document).bind('gform_post_render', function(event, formId, currentPage){if(formId == 7) {if(typeof Placeholders != 'undefined'){ 8806 Placeholders.enable(); 8807 }jQuery('#input_7_3').mask('(999) 999-9999').bind('keypress', function(e){if(e.which == 13){jQuery(this).blur();} } );} } );jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} );</script>
8807<script type='text/javascript'> jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [7, 1]) } ); </script>
8807<style> 8808 #browser-warning { 8809 position: fixed; 8810 top: -160px; 8811 left: 0; 8812 right: 0; 8813 background-color: #ff9800; 8814 color: white; 8815 text-align: center; 8816 padding: 15px; 8817 font-size: 16px; 8818 z-index: 1000; 8819 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); 8820 transition: top 0.5s ease-in-out; 8821 } 8822 #browser-warning a { 8823 color: #fff; 8824 text-decoration: underline; 8825 font-weight: bold; 8826 } 8827 #browser-warning .dismiss-button { 8828 background: white; 8829 padding: 5px 10px; 8830 border-radius: 2px; 8831 border: none; 8832 color: #ff9800; 8833 font-size: 16px; 8834 cursor: pointer; 8835 margin-top: 8px; 8836 } 8837 </style> 8838 8839 8840<div id="browser-warning"> 8841 Your browser is out of date. Please <a href="https://browsehappy.com/" target="_blank">update your browser</a> for 8842 the best experience. 8843</div> 8844 8845
8845<script> 8846 const OUTDATED_IOS_VERSION = 17; // iOS version considered outdated 8847 8848 function isBrowserOutdated() { 8849 const ua = navigator.userAgent; 8850 const isOldBrowser = !( 8851 'fetch' in window && 8852 'Promise' in window && 8853 'assign' in Object 8854 ); // Simple feature detection for modern JS APIs 8855 const isOldIE = /MSIE|Trident/.test(ua); // Detect old IE versions 8856 return isOldBrowser || isOldIE; 8857 } 8858 8859 function isIOSOutdated() { 8860 const ua = navigator.userAgent; 8861 const isIOS = /iPad|iPhone|iPod/.test(ua) && !window.MSStream; 8862 if (isIOS) { 8863 const iosVersion = ua.match(/OS (\d+)_/); 8864 if (iosVersion && iosVersion[1]) { 8865 return parseInt(iosVersion[1], 10) < OUTDATED_IOS_VERSION; // Assume iOS < OUTDATED_IOS_VERSION is outdated 8866 } 8867 } 8868 return false; 8869 } 8870 8871 function isAndroidOutdated() { 8872 const ua = navigator.userAgent.toLowerCase(); 8873 const isAndroid = ua.includes("android"); 8874 if (isAndroid) { 8875 const isOldBrowser = !('fetch' in window && 'Promise' in window && 'assign' in Object); 8876 return isOldBrowser; 8877 } 8878 return false; 8879 } 8880 8881 function showBrowserWarning(message) { 8882 const dismissButton = document.createElement('button');
8883 dismissButton.classList = 'dismiss-button'; 8884 dismissButton.innerText = 'Dismiss'; 8885 dismissButton.style.marginLeft = '15px'; 8886 dismissButton.onclick = function() { 8887 const warning = document.getElementById('browser-warning'); 8888 warning.style.top = '-160px'; // Slide up 8889 localStorage.setItem('ag-browser-warning-dismissed', 'true'); 8890 }; 8891 const warning = document.getElementById('browser-warning'); 8892 warning.innerHTML = message; 8893 warning.appendChild(document.createElement('br')); 8894 warning.appendChild(dismissButton); 8895 warning.style.top = '0'; // Slide down 8896 } 8897 8898 function checkBrowser() { 8899 if (localStorage.getItem('ag-browser-warning-dismissed') === 'true') { 8900 return; 8901 } 8902 if (isBrowserOutdated()) { 8903 showBrowserWarning( 8904 'Your browser is out of date.<br/>Please <a href="https://browsehappy.com/" target="_blank">update your browser</a> for the best experience.' 8905 ); 8906 } else if (isIOSOutdated()) { 8907 showBrowserWarning( 8908 'Your iOS version is outdated.<br/>Please update your iOS version to get the latest browser updates.' 8909 ); 8910 } else if (isAndroidOutdated()) { 8911 showBrowserWarning( 8912 'Your Android browser is outdated.<br/>Please update your browser from the <a href="https://play.google.com/store/apps/details?id=com.android.chrome" target="_blank">Google Play Store</a>.' 8913 ); 8914 } 8915 } 8916 8917 window.onload = checkBrowser; 8918 </script>
8918 8919 8920<!-- <style> 8921body .buorg { 8922 border-color: #646464; 8923 color: #fff; 8924 background-color: #141518; 8925} 8926</style> 8927
8928<script> 8929var $buoop = {required:{e:-4,f:-4,o:-4,s:-2,c:-4},insecure:true,api:2021.10 }; 8930function $buo_f(){ 8931 var e = document.createElement("script"); 8932 e.src = "//browser-update.org/update.min.js"; 8933 document.body.appendChild(e); 8934}; 8935try {document.addEventListener("DOMContentLoaded", $buo_f,false)} 8936catch(e){window.attachEvent("onload", $buo_f)} 8937</script>
8937 --> 8938</script>
vendor: 1 bytes, line 8938
8938
8939<script type="text/javascript"> 8940// Toggle nav-below hamburger icon 8941jQuery(document).ready(function() { 8942 jQuery('.roll-out-btn').click(function() { 8943 jQuery('.roll-out-btn').toggleClass('roll-out-btn-open'); 8944 jQuery('.roll-out-menu').toggleClass('roll-out-open'); 8945 jQuery('.rollout-frame').toggleClass('rollout-frame-open'); 8946 jQuery('.save-btn').toggleClass('save-btn-saved'); 8947 8948 }); 8949 8950 // Toggle Side Menu 8951 $('#nav-icon3').click(function() { 8952 $("body").toggleClass('menu-open'); 8953 $("#dv-sidenav").toggleClass("dv-sidenav-open"); 8954 }); 8955 8956 }); 8957 8958jQuery(document).ready(function($) { 8959 $('#da-locations-heading').text(function(_, text) { 8960 return text.replace('Locations', 'Dealerships'); 8961 }); 8962}); 8963 8964jQuery(document).ready(function($) { 8965 $('.da-section-subtitle').text(function(_, text) { 8966 return text.replace('location', 'dealership'); 8967 }); 8968}); 8969 8970jQuery(function ($) { 8971 $(document).on('click', '#menu-item-8614 ul a[href*="/hours-and-directions/#"]', function () { 8972 setTimeout(function () { 8973 // Reset Locations dropdown 8974 $('#menu-item-8614').removeClass('open-active active open'); 8975 $('#menu-item-8614 > ul').slideUp(0); 8976 8977 // Reset the mobile menu tabs/panels 8978 $('.dv-fw-mobile-menu-selector .dv-fw-mobile-menu-item').removeClass('active'); 8979 $('.dv-fw-mobile-menu-content .dv-fw-mobile-menu-item-content').removeClass('active'); 8980 8981 // Re-activate the default Menu tab cleanly 8982 $('.dv-fw-mobile-menu-selector .dv-fw-mobile-menu-item:first-child').addClass('active'); 8983 $('.dv-fw-mobile-menu-content .dv-fw-mobile-menu-item-content:first-child').addClass('active'); 8984 8985 // Then close the full mobile drawer by clicking the active Menu button 8986 $('.dv-fw-mobile-menu-selector .dv-fw-mobile-menu-item:first-child > a').trigger('click'); 8987 }, 200); 8988 }); 8989});</script>
8989 8990
8991<script> 8992/** 8993 * Removing SDA events on all anchors 8994 * Due to an issue with android issue 8995 */ 8996var removeSDCTAEvent = function(){ 8997 var el = document.querySelectorAll('a'); 8998 for (i = 0; i < el.length; ++i) { 8999 if(el[i].hasAttribute("data-sda-event")) { 9000 if(el[i].getAttribute("data-sda-event") == 'clickToCall'){ 9001 var propVal = ''; 9002 if(el[i].getAttribute("data-sda-event-set-prop")){ 9003 propVal = el[i].getAttribute("data-sda-event-set-prop"); 9004 propVal = propVal.split("|"); 9005 propVal = propVal[1]; 9006 } 9007 el[i].removeAttribute("data-sda-event"); 9008 el[i].removeAttribute("data-sda-event-set-prop"); 9009 el[i].setAttribute("data-ag-event", 'clickToCall|'+propVal) 9010 } 9011 if(el[i].getAttribute("data-sda-event") == 'getDirections'){ 9012 el[i].removeAttribute("data-sda-event"); 9013 el[i].setAttribute("data-ag-event", 'getDirections'); 9014 } 9015 } 9016 } 9017}; 9018 9019// removeSDCTAEvent(); 9020//setInterval(removeSDCTAEvent, 10000); 9021</script>
9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 </footer> 9031 </body> 9032 9033</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.