window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-9HTBS82MV7');
(() => { const routeButton = document.querySelector( ".reb-web-hero-clickable .reb-scroll-routes" ); if (!routeButton) return; if (routeButton.dataset.rebScrollReady) { return; } routeButton.dataset.rebScrollReady = "true"; routeButton.addEventListener("click", (event) => { const target = document.getElementById("ridesweb"); if (!target) return; event.preventDefault(); const targetPosition = target.getBoundingClientRect().top + window.scrollY - 20; const reduceMotion = window.matchMedia( "(prefers-reduced-motion: reduce)" ).matches; window.scrollTo({ top: targetPosition, behavior: reduceMotion ? "auto" : "smooth" }); }); })(); 
(() => { const mobileQuery = window.matchMedia("(max-width: 767px)"); const gpsSection = document.querySelector(".reb-gps-mobile-only"); const gpsImage = document.querySelector(".reb-gps-mobile-image"); if (!mobileQuery.matches || !gpsSection || !gpsImage) return; let observationStarted = false; const markGpsReady = () => { gpsImage.dataset.ready = "true"; window.dispatchEvent(new CustomEvent("reb:gps-ready")); }; const loadGpsImage = () => { if (gpsImage.dataset.requested === "true") return; gpsImage.dataset.requested = "true"; gpsImage.addEventListener("load", markGpsReady, { once: true }); gpsImage.addEventListener("error", markGpsReady, { once: true }); gpsImage.src = gpsImage.dataset.src; }; const watchGpsSection = () => { if (observationStarted) return; observationStarted = true; if (!("IntersectionObserver" in window)) { loadGpsImage(); return; } const observer = new IntersectionObserver( entries => { if (!entries.some(entry => entry.isIntersecting)) return; observer.disconnect(); loadGpsImage(); }, { root: null, rootMargin: "0px 0px 50% 0px", threshold: 0.01 } ); observer.observe(gpsSection); }; const pricingImage = document.querySelector( ".reb-pricing-part-two-image" ); if (!pricingImage || pricingImage.dataset.ready === "true") { watchGpsSection(); } else { window.addEventListener( "reb:pricing-ready", watchGpsSection, { once: true } ); } })(); 
(() => { const mobileQuery = window.matchMedia("(max-width: 767px)"); const howSection = document.querySelector(".reb-how-mobile-only"); const howImage = document.querySelector(".reb-how-mobile-image"); if (!mobileQuery.matches || !howSection || !howImage) return; let observationStarted = false; const markHowReady = () => { howImage.dataset.ready = "true"; window.dispatchEvent(new CustomEvent("reb:how-ready")); }; const loadHowImage = () => { if (howImage.dataset.requested === "true") return; howImage.dataset.requested = "true"; howImage.addEventListener("load", markHowReady, { once: true }); howImage.addEventListener("error", markHowReady, { once: true }); howImage.src = howImage.dataset.src; }; const watchHowSection = () => { if (observationStarted) return; observationStarted = true; if (!("IntersectionObserver" in window)) { loadHowImage(); return; } const observer = new IntersectionObserver( entries => { if (!entries.some(entry => entry.isIntersecting)) return; observer.disconnect(); loadHowImage(); }, { root: null, rootMargin: "0px 0px 50% 0px", threshold: 0.01 } ); observer.observe(howSection); }; const gpsImage = document.querySelector(".reb-gps-mobile-image"); if (!gpsImage || gpsImage.dataset.ready === "true") { watchHowSection(); } else { window.addEventListener( "reb:gps-ready", watchHowSection, { once: true } ); } })();