PageSourceSearch

https://mountainbouncers.com/rentals/slide-combos/

html mountainbouncers.com collected 2026-10-07 03:14:42 UTC 334,954 bytes, 5,986 lines download raw bytes

1<!doctype html><html lang="en-US" prefix="og: https://ogp.me/ns#"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="profile" href="https://gmpg.org/xfn/11"><link media="all" href="https://mountainbouncers.com/wp-content/cache/autoptimize/css/autoptimize_d066f715de96fff98679bca4a7328860.css" rel="stylesheet"><title>Slide Combos - Mountain Bouncers LLC</title><meta name="robots" content="follow, index, max-snippet:-1, max-video-preview:-1, max-image-preview:large"/><link rel="canonical" href="https://mountainbouncers.com/rentals/slide-combos/" /><meta property="og:locale" content="en_US" /><meta property="og:type" content="article" /><meta property="og:title" content="Slide Combos - Mountain Bouncers LLC" /><meta property="og:url" content="https://mountainbouncers.com/rentals/slide-combos/" /><meta property="og:site_name" content="Mountain Bouncers" /><meta property="og:updated_time" content="2026-06-01T22:28:58+00:00" /><meta property="og:image" content="https://mountainbouncers.com/wp-content/uploads/2026/02/file_00000000d89471fdacd403a109717a64_1771703468_big.png" /><meta property="og:image:secure_url" content="https://mountainbouncers.com/wp-content/uploads/2026/02/file_00000000d89471fdacd403a109717a64_1771703468_big.png" /><meta property="og:image:width" content="750" /><meta property="og:image:height" content="500" /><meta property="og:image:alt" content="Slide Combos" /><meta property="og:image:type" content="image/png" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="Slide Combos - Mountain Bouncers LLC" /><meta name="twitter:image" content="https://mountainbouncers.com/wp-content/uploads/2026/02/file_00000000d89471fdacd403a109717a64_1771703468_big.png" /><meta name="twitter:label1" content="Time to read" /><meta name="twitter:data1" content="12 minutes" /> 
1<script type="application/ld+json" class="rank-math-schema">{"@context":"https://schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https://mountainbouncers.com/rentals/slide-combos/#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://mountainbouncers.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://mountainbouncers.com/rentals/","name":"Inventory"}},{"@type":"ListItem","position":"3","item":{"@id":"https://mountainbouncers.com/rentals/slide-combos/","name":"Slide Combos"}}]}]}</script>
1 <link rel='dns-prefetch' href='//cdnjs.cloudflare.com' /><link rel="alternate" type="application/rss+xml" title="Mountain Bouncers LLC &raquo; Feed" href="https://mountainbouncers.com/feed/" /><link rel="alternate" type="application/rss+xml" title="Mountain Bouncers LLC &raquo; Comments Feed" href="https://mountainbouncers.com/comments/feed/" /><link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://mountainbouncers.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fmountainbouncers.com%2Frentals%2Fslide-combos%2F" /><link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://mountainbouncers.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fmountainbouncers.com%2Frentals%2Fslide-combos%2F&#038;format=xml" /><style id="wp-img-auto-sizes-contain-inline-css">img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px}
2/*# sourceURL=wp-img-auto-sizes-contain-inline-css */</style><style id="classic-theme-styles-inline-css">/*! This file is auto-generated */
3.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
4/*# sourceURL=/wp-includes/css/classic-themes.min.css */</style><style id="global-styles-inline-css">:root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--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,rgb(6,147,227) 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,rgb(252,185,0) 0%,rgb(255,105,0) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgb(255,105,0) 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%);
4--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--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0);--wp--preset--shadow--crisp: 6px 6px 0px rgb(0, 0, 0);}.wp-block-button{--wp--preset--dimension--25: 25%;--wp--preset--dimension--50: 50%;--wp--preset--dimension--75: 75%;--wp--preset--dimension--100: 100%;}:where(body) { margin: 0; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}body{padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;}:root :where(.wp-element-button, .wp-block-button__link){background-color: #32373c;border-width: 0;color: #fff;font-family: inherit;font-size: inherit;font-style: inherit;font-weight: inherit;letter-spacing: inherit;line-height: inherit;padding-top: calc(0.667em + 2px);padding-right: calc(1.333em + 2px);padding-bottom: calc(0.667em + 2px);padding-left: calc(1.333em + 2px);text-decoration: none;text-transform: inherit;}.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;}
4.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;}
5:root :where(.wp-block-icon svg){width: 24px;}
6:where(.wp-block-gallery.is-layout-flex){gap: var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) );}:where(.wp-block-gallery.is-layout-grid){gap: var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) );}
7:where(.wp-block-latest-posts.is-layout-flex){gap: 1.25em;}:where(.wp-block-latest-posts.is-layout-grid){gap: 1.25em;}
8:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}
9:where(.wp-block-term-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-term-template.is-layout-grid){gap: 1.25em;}
10:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}
11:root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;}
12/*# sourceURL=global-styles-inline-css */</style><link rel='stylesheet' id='slick-carousel-css-css' href='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css?ver=7.1.2' media='all' /><link rel='stylesheet' id='slick-carousel-theme-css-css' href='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css?ver=7.1.2' media='all' /> 
12<script id="jquery-core-js" src="https://mountainbouncers.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1"></script>
12 
12<script id="io-scripts-js-extra">var io_scripts_vars = {"io_username":"Mountainbouncers","io_locationid":"0","io_phonenumber":"(802) 353-2201","io_emailaddress":"[email protected]","io_businesshours":"","io_facebooklink":"https://www.facebook.com/","io_twitterlink":"https://twitter.com/","io_instagramlink":"https://www.instagram.com/","io_youtubelink":"","io_fpnumber":"","io_companyname":"Mountain Bouncers LLC"};
13//# sourceURL=io-scripts-js-extra</script>
13 <link rel="https://api.w.org/" href="https://mountainbouncers.com/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://mountainbouncers.com/wp-json/wp/v2/pages/4319" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://mountainbouncers.com/xmlrpc.php?rsd" /><link rel='shortlink' href='https://mountainbouncers.com/?p=4319' />  
13<script id='pixel-script-poptin' src='https://cdn.popt.in/pixel.js?id=4a9cd5def0446' async='true'></script>
vendor: 66 bytes, lines 13-14
13 
14 <script async src="https://www.googletagmanager.com/gtag/js?id=
14G-E4EZ30Y6RJ
vendor: 12 bytes, line 14
14"></script> 
14<script>
vendor: 134 bytes, lines 14-18
14window.dataLayer = window.dataLayer || [];
15  function gtag(){dataLayer.push(arguments);}
16  gtag('js', new Date());
17
18  gtag('config', '
18G-E4EZ30Y6RJ
vendor: 3 bytes, line 18
18');
18</script>
18 
18<script type="text/javascript">(function () {
19    var s = document.createElement("script"), 
20      h = document.head;
21    s.async = 1;
22    s.src = "https://monitor.fraudblocker.com/fbt.js?sid=ArdksP218ytzgjUF3ea03";
23    h.appendChild(s);
24  })();</script>
24 <noscript> <a href="https://fraudblocker.com" rel="nofollow"> <img src="https://monitor.fraudblocker.com/fbt.gif?sid=ArdksP218ytzgjUF3ea03" alt="Fraud Blocker" /> </a> </noscript><meta name="ti-site-data" content="eyJyIjoiMTowITc6MCEzMDowIiwibyI6Imh0dHBzOlwvXC9tb3VudGFpbmJvdW5jZXJzLmNvbT90aS1vbmxpbmUtdXNlcnMtZ29vZ2xlPTEmYW1wO3A9JTJGcmVudGFscyUyRnNsaWRlLWNvbWJvcyUyRiZhbXA7X3dwbm9uY2U9MjExZTY4M2E1MSJ9" /><meta name="generator" content="Elementor 4.3.4; features: additional_custom_breakpoints; settings: css_print_method-external, google_font-enabled, font_display-auto"><style>.e-con.e-parent:nth-of-type(n+4):not(.e-lazyloaded):not(.e-no-lazyload),
25				.e-con.e-parent:nth-of-type(n+4):not(.e-lazyloaded):not(.e-no-lazyload) * {
26					background-image: none !important;
27				}
28				@media screen and (max-height: 1024px) {
29					.e-con.e-parent:nth-of-type(n+3):not(.e-lazyloaded):not(.e-no-lazyload),
30					.e-con.e-parent:nth-of-type(n+3):not(.e-lazyloaded):not(.e-no-lazyload) * {
31						background-image: none !important;
32					}
33				}
34				@media screen and (max-height: 640px) {
35					.e-con.e-parent:nth-of-type(n+2):not(.e-lazyloaded):not(.e-no-lazyload),
36					.e-con.e-parent:nth-of-type(n+2):not(.e-lazyloaded):not(.e-no-lazyload) * {
37						background-image: none !important;
38					}
39				}</style><link rel="shortcut icon" type="image/x-icon" href="data:image/gif;base64,AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA4dLCAN3UxQDe1MUAmTgrANvTyADVy8YA1NPJAJY1LADd0cYA3dXDAIssJQB/IB4AAontALS1tADJcUAA3dLEANrRxwDe0sQA29HHANzLvwDX1McA39LEANjUxwC7u7wACcLiAAKJ7gChPzIA1tbCAMlyPgA6OTcA3dLFANnVxQAZc+EAljUuAMzSxgBJRkQAfSAgANnSxgDb0sYA19HJANDOuQAwMDEA19DEANjQxAAODg4AynM9ANbWxADb08QA19LHAIorIwAFo68A1M7CAAHAygDT0csACGhuANfPwADL0tEA3dLIAOHTxQDIcTwAnDYuAMlwPwDa0MYAiYJ7ANDRzAACydMAmJWQAAhjbQDh1MQAmDctAMhyOwC0r6oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA7FQoKMhsLBQIDOgcAAAAkQxhBIwsbCzY5DkAeAAAAACpENRkNGhpCMzctAAAAAAA9LgAGAAAAFwAuRgAAAAAABA8ANAAAACAALkYAAAAAAEYdADEAAAASAC5GAAAAAABGPjgTAAAAFhYuRgAAAAAlCDwrLAAAACYWLkYlAAAADCJHPyYoACgJFi5GJQAAAC9FKRwnJiYmJhEUHwEAAABIAkgASABIAEgASDBIAAAAAEgAAAAAAAAAAABIAAAAAAAhAAAAAAAAAAAAIQAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAAwAEAAMABAADgAwAA5dMAAOXTAADl0wAA4cMAAMHBAADAgQAAwAEAAMVRAADv+wAA7/sAAP//AAA=" /><style id="wp-custom-css">.grecaptcha-badge { visibility: hidden; }
40
41.search-submit{display:none;}
42
43.cartInfo{
44	display:none !important;
45}
46.io-footer-link a {
47color: var(--e-global-color-accent, orange);
48}
49
50.catDescriptionIO.catDescriptionIO_small.elementor-widget-text-editor {
51    padding: 10px;
52    font-size: small;
53    text-align: left;
54}</style></head><body class="wp-singular page-template-default page page-id-4319 page-parent page-child parent-pageid-1311 wp-custom-logo wp-theme-io-kenos mega-menu-max-mega-menu-4 mega-menu-max-mega-menu-5 mega-menu-max-mega-menu-6 mega-menu-max-mega-menu-7 mega-menu-max-mega-menu-8 elementor-default elementor-kit-812"><header data-elementor-type="header" data-elementor-id="216" class="elementor elementor-216 elementor-location-header" data-elementor-post-type="elementor_library"><section class="elementor-section elementor-top-section elementor-element elementor-element-4583e055 elementor-section-full_width io_header elementor-section-height-default elementor-section-height-default" data-id="4583e055" data-element_type="section" data-e-type="section" id="top" data-settings="{&quot;background_background&quot;:&quot;classic&quot;}"><div class="elementor-container elementor-column-gap-default"><div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3be5d860" data-id="3be5d860" data-element_type="column" data-e-type="column"><div class="elementor-widget-wrap elementor-element-populated"><section class="elementor-section elementor-inner-section elementor-element elementor-element-647eb66f elementor-section-height-min-height elementor-section-boxed elementor-section-height-default" data-id="647eb66f" data-element_type="section" data-e-type="section" data-settings="{&quot;background_background&quot;:&quot;classic&quot;,&quot;sticky&quot;:&quot;top&quot;,&quot;sticky_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;,&quot;mobile&quot;],&quot;sticky_offset&quot;:0,&quot;sticky_effects_offset&quot;:0,&quot;sticky_anchor_link_offset&quot;:0}"><div class="elementor-container elementor-column-gap-default"><div class="elementor-column elementor-col-33 elementor-inner-column elementor-element elementor-element-9b7ab34" data-id="9b7ab34" data-element_type="column" data-e-type="column"><div class="elementor-widget-wrap elementor-element-populated"><div class="elementor-element elementor-element-1271c4a7 elementor-widget elementor-widget-theme-site-logo elementor-widget-image" data-id="1271c4a7" data-element_type="widget" data-e-type="widget" data-widget_type="theme-site-logo.default"><div class="elementor-widget-container"> <a href="https://mountainbouncers.com"> <img width="283" height="300" src="https://mountainbouncers.com/wp-content/uploads/2020/02/Mountain-Bouncers-Transparent-Backgroun
54d-283x300.png" class="elementor-animation-grow attachment-medium size-medium wp-image-4154" alt="" srcset="https://mountainbouncers.com/wp-content/uploads/2020/02/Mountain-Bouncers-Transparent-Background-283x300.png 283w, https://mountainbouncers.com/wp-content/uploads/2020/02/Mountain-Bouncers-Transparent-Background-964x1024.png 964w, https://mountainbouncers.com/wp-content/uploads/2020/02/Mountain-Bouncers-Transparent-Background-768x816.png 768w, https://mountainbouncers.com/wp-content/uploads/2020/02/Mountain-Bouncers-Transparent-Background.png 1261w" sizes="(max-width: 283px) 100vw, 283px" /> </a></div></div></div></div><div class="elementor-column elementor-col-33 elementor-inner-column elementor-element elementor-element-107d6899" data-id="107d6899" data-element_type="column" data-e-type="column"><div class="elementor-widget-wrap elementor-element-populated"><div class="elementor-element elementor-element-61337d5b elementor-widget elementor-widget-wp-widget-maxmegamenu" data-id="61337d5b" data-element_type="widget" data-e-type="widget" data-widget_type="wp-widget-maxmegamenu.default"><div class="elementor-widget-container"><div id="mega-menu-wrap-max_mega_menu_4" class="mega-menu-wrap"><div class="mega-menu-toggle"><div class="mega-toggle-blocks-left"></div><div class="mega-toggle-blocks-center"><div class='mega-toggle-block mega-menu-toggle-block mega-toggle-block-1' id='mega-toggle-block-1'><span aria-expanded="false" aria-haspopup="true" role="button" class='mega-toggle-label'><span class='mega-toggle-label-closed'></span><span class='mega-toggle-label-open'></span></span></div></div><div class="mega-toggle-blocks-right"></div></div><ul id="mega-menu-max_mega_menu_4" class="mega-menu max-mega-menu mega-menu-horizontal mega-no-js" data-event="hover_intent" data-effect="fade_up" data-effect-speed="200" data-effect-mobile="disabled" data-effect-speed-mobile="0" data-mobile-force-width="body" data-second-click="go" data-document-click="collapse" data-vertical-behaviour="standard" data-breakpoint="600" data-unbind="true" data-mobile-state="collapse_all" data-mobile-direction="vertical"><li class="mega-menu-item mega-menu-item-type-custom mega-menu-item-object-custom mega-menu-megamenu mega-menu-item-has-children mega-align-bottom-left mega-menu-item-806" id="mega-menu-item-806"><a class="mega-menu-link" href="https://mountainbouncers.com/rentals/" aria-expanded="false" aria-controls="mega-sub-menu-806">Inventory<span class="mega-indicator" aria-hidden="true"></span></a><ul class="mega-sub-menu" id='mega-sub-menu-806'><li class="mega-menu-item mega-menu-item-type-widget widget_widget_featured mega-menu-column-standard mega-menu-columns-6-of-6 mega-menu-item-widget_featured-2" style="--columns:6; --span:6" id="mega-menu-item-widget_featured-2"><div class="widget-text wp_widget_plugin_box panel-grid panel-has-style" style="margin-top:0px;">
54<script>jQuery(document).ready(function(){
55                  jQuery('.io_mm_item .io_item2_list').css('box-shadow', 'none')
56                  jQuery('.io_mm_item .io_item2_list').addClass('nohover')
57
58                  jQuery('.io_mm_item .io_item2_listcat').css('box-shadow', 'none')
59                  jQuery('.io_mm_item .io_item2_listcat').addClass('nohover')
60              })</script>
60<div class="io_mm_outer io_widget_ " style="grid-template-columns:repeat(4, calc((100% - 45px)/4)); display:grid;"><style>.io_widget_ .io_item2_list_inner .rentNameIO_button {display:none !important;} .io_widget_ .io_item2_list_inner .rentNameIO_price {display:none !important;} .io_widget_ .io_item2_list .view-product-button {display:none !important;} .io_widget_ .io_item2_listcat .view-product-button {display:none !important;} .io_widget_ .io_item2_listcat .catDescriptionIO {display:none;}</style><div class="io_mm_item elementor-widget-heading simpleCart_ioShelfItem" name="maindiv_tainbounc" style="text-align:center"><div class="io_item2_listcat elementor-widget-heading"> <a href="https://mountainbouncers.com/rentals/slide-combos/"><div class="cat_div"><div class="btn btn-primary view-product-button">View Products</div> <img class="cat_img" src="https://mountainbouncers.com/wp-content/uploads/2026/02/file_00000000d89471fdacd403a109717a64_1771703468_big.png" alt="Slide Combos" title="Slide Combos" /></div> </a><div class="cat_div_inner"> <a href="https://mountainbouncers.com/rentals/slide-combos/"><p class="rentNameIO elementor-heading-title">Slide Combos</p><div class="catDescriptionIO catDescriptionIO_small elementor-widget-text-editor">Inflatable bounce house combos are great for getting energy out. A few of these combo bouncers come with things like a basketball hoop or water slide constructed right in with a bounce space! We specialize in bounce houses rentals and would be delighted to help you with your party needs.<p>Mountain Bouncers is Insured for all small and large events. We Service Rutland County and All Surrounding Counties in Vermont and New York.&nbsp;</p></div> </a></div></div></div><div class="io_mm_item elementor-widget-heading simpleCart_ioShelfItem" name="maindiv_tainbounc" style="text-align:center"><div class="io_item2_listcat elementor-widget-heading"> <a href="https://mountainbouncers.com/rentals/water/"><div class="cat_div"><div class="btn btn-primary view-product-button">View Products</div> <img class="cat_img" src="https://mountainbouncers.com/wp-content/uploads/2026/02/file_0000000001bc71fd966394299984a30c_1771703490_big.png" alt="Waterslides" title="Waterslides" /></div> </a><div class="cat_div_inner"> <a href="https://mountainbouncers.com/rentals/water/"><p class="rentNameIO elementor-heading-title">Waterslides</p><div class="catDescriptionIO catDescriptionIO_small elementor-widget-text-editor"><div style='display: block; width: 603.203px; margin: 50px auto auto; text-align: left; background: rgba(0, 0, 0, 0.03); border-radius: 6px; color: rgb(0, 0, 0); font-family: "Open Sans", sans-serif; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><div style="overflow-x: auto; min-height: 30px;"><div style="font-size: 1px; page-break-after: always; height: 1px; background-color: rgb(192, 192, 192);" contenteditable="false" title="Page Break"></div></div></div></div> </a></div></div></div><div class="io_mm_item elementor-widget-heading simpleCart_ioShelfItem" name="maindiv_tainbounc" style="text-align:center"><div class="io_item2_listcat elementor-widget-heading"> <a href="https://mountainbouncers.com/rentals/obstacle-course/"><div class="cat_div"><div class="btn btn-primary view-product-button">View Products</div> <img class="cat_img" src="https://mountainbouncers.com/wp-content/uploads/2026/02/file_00000000027c71fda291d9f17dce058e_1771704298_big.png" alt="Obstacle Course" title="Obstacle Course" /></div> </a><div class="cat_div_inner"> <a href="https://mountainbouncers.com/rentals/obstacle-course/"><p class="rentNameIO elementor-heading-title">Obstacle Course</p><div class="catDescriptionIO catDescriptionIO_small elementor-widget-text-editor">Large inflatable slides are available to be rented from us, as can inflatable play areas. Obstacle course inflatables offer greater interaction and are an enjoyable way for children to race each other and to get lots of energy.<p>Mountain Bouncers is Insured for all small and large events. We Service Rutland County and All Surrounding Counties in Vermont and New York.&nbsp;</p></div> </a></div></div></div><div class="io_mm_item elementor-widget-heading simpleCart_ioShelfItem" name="maindiv_tainbounc" style="text-align:center"><div class="io_item2_listcat elementor-widget-heading"> <a href="https://mountainbouncers.com/rentals/bouncy-houses/"><div class="cat_div"><div class="btn btn-primary view-product-button">View Products</div> <img class="cat_img" src="https://mountainbouncers.com/wp-content/uploads/2026/02/file_00000000cec871fd930c0cf670a7e652_1771708685_big.png" alt="Bouncy Houses" title="Bouncy Houses" /></div> </a><div class="cat_div_inner"> <a href="https://mountainbouncers.com/rentals/bouncy-houses/"><p class="rentNameIO elementor-heading-title">Bouncy Houses</p><div class="catDescriptionIO catDescriptionIO_small elementor-widget-text-editor">Inflatable bounce houses are great for getting some energy out. We also offer combination bouncers that have things like a basketball hoop or slide built right inside with a bounce space! We are specialists in renting bounce houses and are able to be adapted to any occasion.<p>Mountain Bouncers is Insured for all small and large events. We Service Rutland County and All Surrounding Counties in Vermont and New York.&nbsp;</p></div> </a></div></div></div><div class="io_mm_item elementor-widget-heading simpleCart_ioShelfItem" name="maindiv_tainbounc" style="text-align:center"><div class="io_item2_listcat elementor-widget-heading"> <a href="https://mountainbouncers.com/rentals/toddler-bouncers/"><div class="cat_div"><div class="btn btn-primary view-product-button">View Products</div> <img class="cat_img" src="https://mountainbouncers.com/wp-content/uploads/2026/02/file_00000000065871fd838c0a4c2e8cb526_1771708701_big.png" alt="Toddler Bouncers!!" title="Toddler Bouncers!!" /></div> </a><div class="cat_div_inner"> <a href="https://mountainbouncers.com/rentals/toddler-bouncers/"><p class="rentNameIO elementor-heading-title">Toddler Bouncers!!</p><div class="catDescriptionIO catDescriptionIO_small elementor-widget-text-editor">Rides for young kids that are safe and enjoyable. Kids will be thrilled by these small toddler bounce house rentals as well as the fun playland.&nbsp;<p>Mountain Bouncers is Insured for all small and large events. We Service Rutland County and All Surrounding Counties in Vermont and New York.&nbsp;</p></div> </a></div></div></div><div class="io_mm_item elementor-widget-heading simpleCart_ioShelfItem" name="maindiv_tainbounc" style="text-align:center"><div class="io_item2_listcat elementor-widget-heading"> <a href="https://mountainbouncers.com/rentals/equipment/"><div class="cat_div"><div class="btn btn-primary view-product-button">View Products</div> <img class="cat_img" src="https://mountainbouncers.com/wp-content/uploads/2026/02/file_0000000044d071fd8f3f1afd0df4fea0_1771709431_big.png" alt="Equipment" title="Equipment" /></div> </a><div class="cat_div_inner"> <a href="https://mountainbouncers.com/rentals/equipment/"><p class="rentNameIO elementor-heading-title">Equipment</p><div class="catDescriptionIO catDescriptionIO_small elementor-widget-text-editor">If you're planning to hold your party in the park or at another location without electricity then you will require a generator for powering the units. The generator we offer is powerful and sturdy.</div> </a></div></div></div></div></div><style>.io_mm_item .io_item2_list, .io_mm_item .io_item2_listcat, .io_mm_item .io_item2_listrent { margin-bottom: 0px !important; }</style></li></ul></li><li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-menu-item-has-children mega-align-bottom-left mega-menu-flyout mega-menu-item-494" id="mega-menu-item-494"><a class="mega-menu-link" href="https://mountainbouncers.com/about-us/" aria-expanded="false" aria-controls="mega-sub-menu-494">About Us<span class="mega-indicator" aria-hidden="true"></span></a><ul class="mega-sub-menu" id='mega-sub-menu-494'><li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-menu-item-493" id="mega-menu-item-493"><a class="mega-menu-link" href="https://mountainbouncers.com/faqs/">FAQs</a></li><li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-menu-item-3296" id="mega-menu-item-3296"><a class="mega-menu-link" href="https://mountainbouncers.com/contact-us/">Contact Us</a></li></ul></li></ul></div></div></div></div></div><div class="elementor-column elementor-col-33 elementor-inner-column elementor-element elementor-element-71a780ec" data-id="71a780ec" data-element_type="column" data-e-type="column" data-settings="{&quot;background_background&quot;:&quot;classic&quot;}"><div class="elementor-widget-wrap elementor-element-populated"><div class="elementor-element elementor-element-69e5dc1d ioCart elementor-view-default elementor-widget elementor-widget-icon" data-id="69e5dc1d" data-element_type="widget" data-e-type="widget" data-widget_type="icon.default"><div class="elementor-widget-container"><div class="elementor-icon-wrapper"><div class="elementor-icon"> <i aria-hidden="true" class="fas fa-shopping-cart"></i></div></div></div></div></div></div></div></section><section class="elementor-section elementor-inner-section elementor-element elementor-element-48094f7b elementor-section-content-mid
60dle elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="48094f7b" data-element_type="section" data-e-type="section" data-settings="{&quot;background_background&quot;:&quot;classic&quot;}"><div class="elementor-container elementor-column-gap-no"><div class="elementor-column elementor-col-33 elementor-inner-column elementor-element elementor-element-20ce0d9f" data-id="20ce0d9f" data-element_type="column" data-e-type="column"><div class="elementor-widget-wrap elementor-element-populated"><div class="elementor-element elementor-element-85cc792 elementor-icon-list--layout-inline elementor-mobile-align-start elementor-tablet-align-center elementor-hidden-mobile elementor-list-item-link-full_width elementor-widget elementor-widget-icon-list" data-id="85cc792" data-element_type="widget" data-e-type="widget" data-widget_type="icon-list.default"><div class="elementor-widget-container"><ul class="elementor-icon-list-items elementor-inline-items"><li class="elementor-icon-list-item elementor-inline-item"> <a href="tel:(802)%20353-2201"> <span class="elementor-icon-list-icon"> <i aria-hidden="true" class="fas fa-phone-alt"></i> </span> <span class="elementor-icon-list-text">(802) 353-2201</span> </a></li><li class="elementor-icon-list-item elementor-inline-item"> <a href="mailto:[email protected]"> <span class="elementor-icon-list-icon"> <i aria-hidden="true" class="fas fa-envelope"></i> </span> <span class="elementor-icon-list-text">[email protected]</span> </a></li></ul></div></div><div class="elementor-element elementor-element-c914423 elementor-icon-list--layout-inline elementor-mobile-align-center elementor-tablet-align-center elementor-hidden-desktop elementor-hidden-tablet elementor-list-item-link-full_width elementor-widget elementor-widget-icon-list" data-id="c914423" data-element_type="widget" data-e-type="widget" data-widget_type="icon-list.default"><div class="elementor-widget-container"><ul class="elementor-icon-list-items elementor-inline-items"><li class="elementor-icon-list-item elementor-inline-item"> <a href="tel:(802)%20353-2201"> <span class="elementor-icon-list-icon"> <i aria-hidden="true" class="fas fa-phone-alt"></i> </span> <span class="elementor-icon-list-text"></span> </a></li><li class="elementor-icon-list-item elementor-inline-item"> <a href="mailto:[email protected]"> <span class="elementor-icon-list-icon"> <i aria-hidden="true" class="fas fa-envelope"></i> </span> <span class="elementor-icon-list-text"></span> </a></li></ul></div></div></div></div><div class="elementor-column elementor-col-33 elementor-inner-column elementor-element elementor-element-f53ace8" data-id="f53ace8" data-element_type="column" data-e-type="column"><div class="elementor-widget-wrap elementor-element-populated"><div class="elementor-element elementor-element-104f03e0 elementor-align-left elementor-mobile-align-center elementor-tablet-align-center elementor-widget elementor-widget-button" data-id="104f03e0" data-element_type="widget" data-e-type="widget" data-widget_type="button.default"><div class="elementor-widget-container"><div class="elementor-button-wrapper"> <a class="elementor-button elementor-button-link elementor-size-xs elementor-animation-grow" href="https://mountainbouncers.com/io_quoteform/"> <span class="elementor-button-content-wrapper"> <span class="elementor-button-text">Check Availability! </span> </span> </a></div></div></div></div></div><div class="elementor-column elementor-col-33 elementor-inner-column elementor-element elementor-element-3e1fff3b elementor-hidden-mobile" data-id="3e1fff3b" data-element_type="column" data-e-type="column"><div class="elementor-widget-wrap elementor-element-populated"><div class="elementor-element elementor-element-1955476e elementor-widget elementor-widget-wp-widget-searchio_live_search" data-id="1955476e" data-element_type="widget" data-e-type="widget" data-widget_type="wp-widget-searchio_live_search.default"><div class="elementor-widget-container"><form role="search" method="get" class="searchio-live-search-widget-search-form" action="https://mountainbouncers.com"> <label> <span class="screen-reader-text">Search for:</span> <input type="search" class="search-field" style="width: 220px" placeholder="Search for..." value="" name="s" data-swplive="true" data-swpengine="default" data-swpconfig="default" autocomplete="off"> </label> <input type="submit" class="search-submit" style="display:none;" value="Search"></form></div></div></div></div></div></section></div></div></div></section></header><main id="main" class="site-main" role="main"><header class="page-header io_phshow"><div class ="elementor-widget-heading"><p id="breadcrumbs" class="io-entry-title elementor-heading-title"><a href="https://mountainbouncers.com">Home</a><span class="separator"> &raquo; </span><a href="https://mountainbouncers.com/rentals/">Inventory</a><span class="separator"> &raquo; </span><span class="last">
60Slide Combos</span></p></div></header><div class="page-content"><div class="cartInfo" style="display:none"> <i class="cartIcon fas fa-shopping-cart"></i> <span class="simpleCart_quantity"></span> items</div><div class="pageDateRangeWrapper elementor-widget-button"><div class="elementor-button elementor-animation-grow" onclick="checkAvailDateClick()" style="display:block"><div class="ioDateRangeHeader">Set Event Date</div><div id="pageDateRange" class="ioDateRange"></div></div></div><div class="io_category_wrapper elementor-widget-heading"><h1 class="catNameIO elementor-heading-title elementor-size-default">Slide Combos<span class="io_forrent io_forrent_226621"> for Rent</span></h1></div><div class="io_view_toggle_container" style="display:none;"><div class="io_view_toggle_buttons"> <button class="io_view_toggle_btn active" data-view="tile" title="Tile View"> <i class="fas fa-th-large"></i> </button> <button class="io_view_toggle_btn" data-view="list" title="List View"> <i class="fas fa-list"></i> </button></div></div><div class="category_id" style="display: none">226621</div><div class="cat_div_wrapper"><div class="io_cat_description io_cat_description_226621 elementor-widget-text-editor catDescriptionIO">Inflatable bounce house combos are great for getting energy out. A few of these combo bouncers come with things like a basketball hoop or water slide constructed right in with a bounce space! We specialize in bounce houses rentals and would be delighted to help you with your party needs.</p><p>Mountain Bouncers is Insured for all small and large events. We Service Rutland County and All Surrounding Counties in Vermont and New York.&nbsp;</p><p></div></div><div class="io_catdiv2"></div><div class="io_landingpages io_landingpages_226621 elementor-widget-text-editor">Professional delivery to <span class=\"io_city_list\"><a href=https://mountainbouncers.com/water-slide-rental-in-rutland-county-vt/>Rutland County, VT</a>, <a href=https://mountainbouncers.com/water-slide-rental-in-addison-county-vt-2/>Addison county, vt</a></span> and surrounding areas. Please submit a quote or contact us to be sure we service your area.</div><div class="io_cat_longdescription io_cat_longdescription_226621 elementor-widget-text-editor"></p><p style="font-family: Tahoma, Geneva, sans-serif;">Are you planning an outdoor event and looking for a way to add some excitement and entertainment? A dry slide rental could be your best choice! These inflatable slides can be set up anywhere outdoors without the need for water, and they are easy to use. A dry slide will be a big hit at any event: whether it&#39;s a family reunion, birthday party or community event. Adults and children alike will enjoy the fun of sliding down the inflatable slope.</p><p>Not only are dry slides fun and thrilling, but they are also safe and easy to use. Dry slides are available in many different sizes and themes to suit your event. Dry slides are a fun and affordable way to add some excitement to any occasion. Imagine the smiles on your guests&#39; faces while they have a blast sliding down the inflatable slope. Rent a dry slide now to add excitement to your outdoor event.</p><p></div> 
60<script>var isValid = function (u) {
61        if (!u) return false;
62        var s = String(u).trim();
63        if (!s) return false;
64        if (s.indexOf('%%') !== -1) return false;
65        if (s === '0' || s.toLowerCase() === 'null' || s.toLowerCase() === 'undefined') return false;
66        return true;
67    };
68
69    var isMp4 = function (u) {
70        if (!u) return false;
71        return /\.mp4(?:\?|#|$)/i.test(String(u).trim());
72    };
73
74    function CategoryGallery(rental_id, rental_name, images_arr){
75        var rid = rental_id;
76        var rentalName = rental_name;
77
78        try {
79            if (typeof images_arr === 'string' && images_arr.length) {
80                images_arr = JSON.parse(images_arr);
81            }
82        } catch (e) {
83            images_arr = {};
84        }
85        if (!images_arr) images_arr = {};
86
87        var $bigAfter = jQuery('#io_img_big2_' + rid);
88        var $thumbAfter = jQuery('#io_img_thumb1_' + rid);
89
90        if ($bigAfter.length && $thumbAfter.length) {
91            var relVal = $bigAfter.attr('rel') || 'img_group noopener';
92
93            var getBigUrl = function (imgObj) {
94                return imgObj["rentalimage_imagelocbig"] || imgObj["imagelocbig"] || imgObj["big"] || "";
95            };
96
97            var getThumbUrl = function (imgObj) {
98                return imgObj["rentalimage_imageloc"] || imgObj["imageloc"] || imgObj["thumb"] || "";
99            };
100
101            var addedThumbs = 0;
102            var $mainImg = jQuery('#io_img_big2_' + rid).closest('.io_item2_list').find('.io_image_big').first();
103
104            // Bind existing thumb1 to its existing big1 anchor using data-big-src
105            var $existingThumb1 = jQuery('#io_img_thumb1_' + rid);
106            var $existingBig1 = jQuery('#io_img_big1_' + rid);
107            if ($existingThumb1.length && $existingBig1.length) {
108                var existingBig1Href = $existingBig1.attr('href');
109                var existingThumb1Src = $existingThumb1.attr('src');
110
111                if (isMp4(existingBig1Href) && isValid(existingThumb1Src)) {
112                    existingBig1Href = existingThumb1Src;
113                    $existingBig1.attr('href', existingBig1Href);
114                }
115
116                if (isValid(existingBig1Href)) {
117                    $existingThumb1.attr('data-big-src', existingBig1Href);
118                    $existingThumb1.off('click.ioGallery').on('click.ioGallery', function () {
119                        if (typeof updateMainPic === 'function') {
120                            updateMainPic(this);
121                        }
122                    });
123                }
124            }
125
126            // Fix built-in big2 anchor if it points to mp4
127            if ($bigAfter.length) {
128                var builtInBig2Href = $bigAfter.attr('href');
129                var builtInThumb2Src = $thumbAfter.attr('src');
130
131                if (isMp4(builtInBig2Href) && isValid(builtInThumb2Src)) {
132                    $bigAfter.attr('href', builtInThumb2Src);
133                }
134            }
135
136            for (var key in images_arr) {
137                if (!images_arr.hasOwnProperty(key)) continue;
138
139                var imgObj = images_arr[key] || {};
140                var href = getBigUrl(imgObj);
141                var src  = getThumbUrl(imgObj);
142
143                if (isMp4(href) && isValid(src)) {
144                    href = src;
145                }
146
147                var n = parseInt(key, 10);
148                if (isNaN(n)) {
149                    n = addedThumbs + 1;
150                }
151
152                var bigIndex = n + 1;
153                var thumbIndex = n + 1;
154
155                if (isValid(href)) {
156                    var bigId = '#io_img_big' + bigIndex + '_' + rid;
157                    if (jQuery(bigId).length === 0) {
158                        var $a = jQuery('<a/>', {
159                            rel: relVal,
160                            href: href,
161                            id: 'io_img_big' + bigIndex + '_' + rid
162                        });
163                        $bigAfter.after($a);
164                        $bigAfter = $a;
165                    }
166                }
167
168                if (isValid(src)) {
169                    var thumbId = '#io_img_thumb' + thumbIndex + '_' + rid;
170                    if (jQuery(thumbId).length === 0) {
171                        var $img = jQuery('<img/>', {
172                            'class': 'io_image_thumb skip-lazy',
173                            title: rentalName,
174                            src: src,
175                            alt: rentalName,
176                            id: 'io_img_thumb' + thumbIndex + '_' + rid,
177                            'data-big-src': href
178                        }).on('click', function () {
179                            if (typeof updateMainPic === 'function') {
180                                updateMainPic(this);
181                            }
182                        });
183
184                        $thumbAfter.after($img);
185                        $thumbAfter = $img;
186                        addedThumbs++;
187                    }
188                }
189            }
190
191            if (addedThumbs > 0) {
192                jQuery('#io_img_thumb1_' + rid).closest('.io_image_thumbbox').show();
193            }
194        }
195    }
196
197    // Function to generate list view content on demand (global scope)
198    generateListViewContent = function() {
199        console.log('[IO List View] Generating list view content dynamically');
200
201        jQuery('.io_item2_list').each(function() {
202            var $item = jQuery(this);
203
204            if ($item.find('.io_list_view_content').length > 0) {
205                return;
206            }
207
208            var rentalId = $item.find('.item_rentalid').text().trim();
209            if (!rentalId) {
210                console.warn('[IO List View] No rental_id found for item, skipping');
211                return;
212            }
213
214            var indoorOutdoor = String(window.io_category_data[rentalId]["indoor_outdoor"] || "").replace(/[\r\n]+/g, "").trim();
215            var staff = String(window.io_category_data[rentalId]["staff"] || "").replace(/[\r\n]+/g, "").trim();
216            var electric = String(window.io_category_data[rentalId]["electric"] || "").replace(/[\r\n]+/g, "").trim();
217            var dimensions = String(window.io_category_data[rentalId]["dimensions"] || "").replace(/[\r\n]+/g, "").trim();
218
219            var stripHtml = function(html) {
220                var tmp = document.createElement("DIV");
221                tmp.innerHTML = html;
222                return (tmp.textContent || tmp.innerText || "").trim();
223            };
224
225            var escapeHtml = function(text) {
226                var map = {
227                    '&': '&amp;',
228                    '<': '&lt;',
229                    '>': '&gt;',
230                    '"': '&quot;',
231                    "'": '&#039;'
232                };
233                return text.replace(/[&<>"']/g, function(m) { return map[m]; });
234            };
235
236            var html = '<div class="io_list_view_content">';
237            html += '<div class="io_item_details_labeled">';
238
239            if (indoorOutdoor && indoorOutdoor !== '0' && indoorOutdoor.length > 0) {
240                html += '<div class="io_detail_item io_detail_setup">';
241                html += '<span class="io_detail_label">Setup:</span>';
242                html += '<span class="io_detail_value">' + escapeHtml(indoorOutdoor) + '</span>';
243                html += '</div>';
244            }
245
246            var operatorsText = staff ? staff + ' Adult Supervision Required' : "";
247            if (operatorsText &&
248                operatorsText !== '0 Adult Supervision Required' &&
249                operatorsText !== 'Adult Supervision Required' &&
250                operatorsText !== '0') {
251                html += '<div class="io_detail_item io_detail_operators">';
252                html += '<span class="io_detail_label">Operators:</span>';
253                html += '<span class="io_detail_value">' + escapeHtml(operatorsText) + '</span>';
254                html += '</div>';
255            }
256
257            var powerText = electric ? electric + ' Outlets' : "";
258            if (powerText &&
259                powerText !== '0 Outlets' &&
260                powerText !== '0.00 Outlets' &&
261                powerText !== 'Outlets' &&
262                powerText !== '0') {
263                html += '<div class="io_detail_item io_detail_power">';
264                html += '<span class="io_detail_label">Power:</span>';
265                html += '<span class="io_detail_value">' + escapeHtml(powerText) + '</span>';
266                html += '</div>';
267            }
268
269            if (dimensions && dimensions !== '0' && dimensions.length > 0) {
270                html += '<div class="io_detail_item io_detail_size">';
271                html += '<span class="io_detail_label">Size:</span>';
272                html += '<span class="io_detail_value">' + escapeHtml(dimensions) + '</span>';
273                html += '</div>';
274            }
275
276            html += '</div>';
277            html += '</div>';
278
279            $item.find('.io_buttons_container').before(html);
280        });
281    };
282
283    function bindExistingThumbTargets() {
284    jQuery('.io_item2_list').each(function() {
285        var $item = jQuery(this);
286        var rentalId = $item.find('.item_rentalid').text().trim();
287        if (!rentalId) return;
288
289        var arr = window.io_category_data?.[rentalId]?.images_arr;
290        try {
291            if (typeof arr === 'string' && arr.length) {
292                arr = JSON.parse(arr);
293            }
294        } catch (e) {
295            arr = {};
296        }
297        if (!arr) arr = {};
298
299        $item.find('.io_image_thumb[id]').each(function() {
300            var thumb = this;
301            var match = thumb.id.match(/io_img_thumb(\d+)_(\d+)/);
302            if (!match) return;
303
304            var index = parseInt(match[1], 10) - 1;
305            var imgObj = arr[index];
306            if (!imgObj) return;
307
308            var src = imgObj.rentalimage_imageloc || imgObj.imageloc || imgObj.thumb || "";
309            var href = imgObj.rentalimage_imagelocbig || imgObj.imagelocbig || imgObj.big || "";
310
311            if (isMp4(href) && isValid(src)) {
312                href = src;
313            }
314
315            if (isValid(href)) {
316                thumb.setAttribute('data-big-src', href);
317            }
318
319            jQuery(thumb).off('click.ioGallery').on('click.ioGallery', function () {
320                if (typeof updateMainPic === 'function') {
321                    updateMainPic(this);
322                }
323            });
324        });
325    });
326}
327
328
329    jQuery(document).ready(function($) {
330
331        jQuery(".io_item2_list").each(function(){
332            var rentalId = jQuery(this).find('.item_rentalid').text().trim();
333            if (io_categoryVariantImages == 'on'){
334                if (typeof window.io_category_data !== 'undefined' && window.io_category_data[rentalId]) {
335                    CategoryGallery(
336                        rentalId,
337                        window.io_category_data[rentalId]['rental_name'],
338                        window.io_category_data[rentalId]["images_arr"]
339                    );
340                }
341            }
342        });
343
344        bindExistingThumbTargets();
345
346        console.log('[IO View Toggle] Document ready, initializing view toggle functionality');
347
348        var categoryId = $('.category_id').text().trim();
349        var hasNumericCategoryId = categoryId && !isNaN(categoryId) && categoryId.length > 0;
350
351        if (!hasNumericCategoryId) {
352            console.log('[IO View Toggle] No valid numeric category ID found, this is not a category page - skipping initialization');
353            return;
354        }
355
356        console.log('[IO View Toggle] Category page detected with categoryId:', categoryId);
357        $('body').addClass('io-has-category-id');
358
359        $('.io_view_toggle_container').show();
360        console.log('[IO View Toggle] Toggle buttons displayed for category page');
361
362        var isInitialized = false;
363
364        function initViewToggle(force) {
365            if (isInitialized && !force) {
366                console.log('[IO View Toggle] Already initialized, skipping');
367                return;
368            }
369
370            console.log('[IO View Toggle] Initializing view toggle functionality');
371
372            if ($('.io_view_toggle_btn').length === 0) {
373                console.warn('[IO View Toggle] Toggle buttons not found in DOM');
374                return;
375            }
376            console.log('[IO View Toggle] Found', $('.io_view_toggle_btn').length, 'toggle buttons');
377
378            if ($('.io_catdiv2').length === 0) {
379                console.warn('[IO View Toggle] Category container (.io_catdiv2) not found');
380                return;
381            }
382            console.log('[IO View Toggle] Found', $('.io_catdiv2').length, 'category containers');
383
384            var savedView = localStorage.getItem('io_category_view') || 'tile';
385            console.log('[IO View Toggle] Retrieved saved view preference:', savedView);
386
387            $('.io_catdiv2').removeClass('tile-view list-view').addClass(savedView + '-view');
388            console.log('[IO View Toggle] Applied initial view class:', savedView + '-view');
389
390            $('.io_view_toggle_btn').removeClass('active');
391            $('.io_view_toggle_btn[data-view="' + savedView + '"]').addClass('active');
392            console.log('[IO View Toggle] Updated button states, active button:', savedView);
393
394            if (savedView === 'list') {
395                if (typeof generateListViewContent === 'function') {
396                    generateListViewContent();
397                } else {
398                    console.warn('[IO View Toggle] generateListViewContent function not available yet');
399                }
400            }
401
402            var itemCount = $('.io_item2_list').length;
403            console.log('[IO View Toggle] Found', itemCount, 'items in category');
404
405            $('.io_view_toggle_btn').off('click.viewToggle');
406
407            var buttons = document.querySelectorAll('.io_view_toggle_btn');
408            console.log('[IO View Toggle] Attaching event listeners to', buttons.length, 'buttons using native JS');
409
410            buttons.forEach(function(button) {
411                var newButton = button.cloneNode(true);
412                button.parentNode.replaceChild(newButton, button);
413
414                newButton.addEventListener('click', function(e) {
415                    e.preventDefault();
416                    e.stopPropagation();
417
418                    var view = this.getAttribute('data-view');
419                    console.log('[IO View Toggle] Button clicked (native listener), switching to view:', view);
420
421                    if (view === 'list') {
422                        if (typeof generateListViewContent === 'function') {
423                            generateListViewContent();
424                        } else {
425                            console.warn('[IO View Toggle] generateListViewContent function not available');
426                        }
427                    }
428
429                    document.querySelectorAll('.io_view_toggle_btn').forEach(function(btn
429) {
430                        btn.classList.remove('active');
431                    });
432                    this.classList.add('active');
433                    console.log('[IO View Toggle] Updated button active states');
434
435                    var catdiv = document.querySelector('.io_catdiv2');
436                    if (catdiv) {
437                        catdiv.classList.remove('tile-view', 'list-view');
438                        catdiv.classList.add(view + '-view');
439                        console.log('[IO View Toggle] Applied view class:', view + '-view');
440                    }
441
442                    localStorage.setItem('io_category_view', view);
443                    console.log('[IO View Toggle] Saved view preference to localStorage:', view);
444
445                    setTimeout(function() {
446                        if (catdiv) {
447                            var containerClasses = catdiv.className;
448                            var visibleItems = document.querySelectorAll('.io_item2_list:not([style*="display: none"])').length;
449                            console.log('[IO View Toggle] Layout updated - Container classes:', containerClasses);
450                            console.log('[IO View Toggle] Visible items after view change:', visibleItems);
451
452                            if (view === 'list') {
453                                var visibleListContent = document.querySelectorAll('.io_list_view_content:not([style*="display: none"])').length;
454                                console.log('[IO View Toggle] Visible list content elements:', visibleListContent);
455                            }
456                        }
457                    }, 100);
458                }, true);
459
460                console.log('[IO View Toggle] Event listener attached to button:', newButton.getAttribute('data-view'));
461            });
462
463            console.log('[IO View Toggle] Event handlers attached successfully');
464
465            isInitialized = true;
466        }
467
468        console.log('[IO View Toggle] Starting initial setup');
469        initViewToggle();
470
471        $(document).on('io_content_loaded', function() {
472            console.log('[IO View Toggle] Dynamic content loaded event detected, reinitializing');
473
474            jQuery(".io_item2_list").each(function(){
475                var rentalId = jQuery(this).find('.item_rentalid').text().trim();
476                if (io_categoryVariantImages == 'on'){
477                    if (typeof window.io_category_data !== 'undefined' && window.io_category_data[rentalId]) {
478                        CategoryGallery(
479                            rentalId,
480                            window.io_category_data[rentalId]['rental_name'],
481                            window.io_category_data[rentalId]["images_arr"]
482                        );
483                    }
484                }
485            });
486
487            bindExistingThumbTargets();
488            initViewToggle();
489        });
490
491        if (typeof MutationObserver !== 'undefined') {
492            var mutationTimeout;
493            var lastItemCount = $('.io_item2_list').length;
494
495            var observer = new MutationObserver(function(mutations) {
496                clearTimeout(mutationTimeout);
497
498                mutationTimeout = setTimeout(function() {
499                    var currentItemCount = $('.io_item2_list').length;
500
501                    if (currentItemCount > lastItemCount) {
502                        console.log('[IO View Toggle] New items detected in DOM (' + lastItemCount + ' -> ' + currentItemCount + ')');
503                        lastItemCount = currentItemCount;
504
505                        jQuery(".io_item2_list").each(function(){
506                            var rentalId = jQuery(this).find('.item_rentalid').text().trim();
507                            if (io_categoryVariantImages == 'on'){
508                                if (typeof window.io_category_data !== 'undefined' && window.io_category_data[rentalId]) {
509                                    CategoryGallery(
510                                        rentalId,
511                                        window.io_category_data[rentalId]['rental_name'],
512                                        window.io_category_data[rentalId]["images_arr"]
513                                    );
514                                }
515                            }
516                        });
517
518                        bindExistingThumbTargets();
519
520                        if (isInitialized) {
521                            var currentView = localStorage.getItem('io_category_view') || 'tile';
522                            if (currentView === 'list') {
523                                console.log('[IO View Toggle] Generating list view content for new items');
524                                if (typeof generateListViewContent === 'function') {
525                                    generateListViewContent();
526                                } else {
527                                    console.warn('[IO View Toggle] generateListViewContent function not available');
528                                }
529                            }
530                        } else {
531                            console.log('[IO View Toggle] Initializing due to new items');
532                            initViewToggle();
533                        }
534                    }
535                }, 250);
536            });
537
538            observer.observe(document.body, {
539                childList: true,
540                subtree: true
541            });
542            console.log('[IO View Toggle] DOM mutation observer started');
543        }
544
545        $(window).on('resize.viewToggle', function() {
546            var windowWidth = $(window).width();
547            var currentView = $('.io_catdiv2').hasClass('list-view') ? 'list' : 'tile';
548            console.log('[IO View Toggle] Window resized to:', windowWidth, 'px, current view:', currentView);
549        });
550
551        console.log('[IO View Toggle] Initialization complete');
552    });</script>
vendor: 1 bytes, line 552
552
553<script>window.io_category_data = window.io_category_data || {}; window.io_category_data['2888953'] = {"indoor_outdoor":"","staff":"","electric":"2.00","dimensions":"","rental_id":"2888953","rental_name":"Green Mountain Plunge dual lane 22\u0027","images_arr":"{\u00220\u0022:{\u0022rentalimage_id\u0022:\u00221994689\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00222888953\u0022,\u0022rentalimage_order\u0022:\u00220\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_0000000039b871f58284cabe80ae27cb_1771774930.png\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_0000000039b871f58284cabe80ae27cb_1771774930_big.png\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00221\u0022:{\u0022rentalimage_id\u0022:\u00221994691\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00222888953\u0022,\u0022rentalimage_order\u0022:\u00221\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/FB_IMG_1750616954620_1750631212.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/FB_IMG_1750616954620_1750631212_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022}}"};</script>
553<div class="io_item2_list elementor-widget-heading simpleCart_ioShelfItem cat_div_2888953" name="maindiv_Green Mountain Plunge dual lane 22'"><div class="cat_div"> <a href="https://mountainbouncers.com/rentals/water/green-mountain-plunge-22/"><div class="btn btn-primary view-product-button">View Product</div> <img decoding="async" class="category_big_img cat_img item_image io_image_big" title="Green Mountain Plunge dual lane 22'" src="https://rental.software/users/Mountainbouncers/images/file_0000000039b871f58284cabe80ae27cb_1771774930_big.png" alt="Green Mountain Plunge dual lane 22'" /> </a> <a rel="noopener" href="https://rental.software/users/Mountainbouncers/images/file_0000000039b871f58284cabe80ae27cb_1771774930_big.png" id="io_img_big1_2888953" target="_blank"></a> <a rel="img_group noopener" href="https://rental.software/users/Mountainbouncers/images/FB_IMG_1750616954620_1750631212_big.jpg" id="io_img_big2_2888953" target="_blank"></a> <br><div class="io_image_thumbbox io_category_thumbox" style="display:none;"> <img decoding="async" class="io_image_thumb skip-lazy" title="Green Mountain Plunge dual lane 22'" src="https://rental.software/users/Mountainbouncers/images/file_0000000039b871f58284cabe80ae27cb_1771774930.png" alt="Green Mountain Plunge dual lane 22'"
554 id="io_img_thumb1_2888953" onclick="updateMainPic(this)" /></div></div><div class="io_item2_list_inner"><p class="elementor-heading-title rentNameIO item_name"><a href="https://mountainbouncers.com/rentals/water/green-mountain-plunge-22/">Green Mountain Plunge dual lane 22'</a></p><p class="rentNameIO_price rentNameIO_price_2888953"><span class="cat_from" style="font-style:italic;font-size:smaller;">from</span> <span class="rentNameIO_pricespan">$679.00</span></p><p class="item_encoded" style="display:none;">Green+Mountain+Plunge+dual+lane+22%27</p> <span class="item_href" style="display:none;">https://mountainbouncers.com/rentals/water/green-mountain-plunge-22/</span><p class="item_rentalid" style="display:none;">2888953</p><p class="item_vendorid" style="display:none;"></p><p class="item_qtytype" style="display:none;">Limited</p><p class="item_inputtype" style="display:none;">Dropdown</p> <span class="item_qtyincrement" style="display:none;">1</span><div class="item_timeslots" style="display:none;"></div><p class="item_giftcardvalue" style="display:none;"></p><div class="item_hasRequiredAcc" style="display:none;"></div><div class="io_list_view_data"></div><div class="io_buttons_container"> <a href="https://mountainbouncers.com/rentals/water/green-mountain-plunge-22/" class="io_more_info_button">MORE INFO</a><div class="elementor-widget-button add_cart_2888953"> <a class="item_add elementor-button elementor-size-sm elementor-animation-grow io_button rentNameIO_button"
555 href="javascript:;"><i class="fas fa-shopping-cart"></i> Add to Cart</a></div></div><div class="unavailable_message unavailable_message_2888953"  onclick="checkAvailDateClick()">item unavailable (change date)</div></div></div> 
555<script>jQuery(document).ready(function () {
556        // Hide price when zero
557        jQuery(".rentNameIO_pricespan").each(function () {
558            if( !Number( this.textContent.replace(/[^0-9.-]+/g,"") ) ){
559                jQuery(this.parentElement).hide();
560            }
561        });
562    });</script>
vendor: 1 bytes, line 562
562
563<script>window.io_category_data = window.io_category_data || {}; window.io_category_data['1940331'] = {"indoor_outdoor":"","staff":"","electric":"1.00","dimensions":"","rental_id":"1940331","rental_name":"Green Mountain XL Castle Combo","images_arr":"{\u00220\u0022:{\u0022rentalimage_id\u0022:\u00222310499\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221940331\u0022,\u0022rentalimage_order\u0022:\u00220\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_000000009a98722fa97495328e3a5c9d_1771716270.png\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_000000009a98722fa97495328e3a5c9d_1771716270_big.png\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00221\u0022:{\u0022rentalimage_id\u0022:\u00221124863\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221940331\u0022,\u0022rentalimage_order\u0022:\u00221\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20230506_125041-removebg-preview_1689206249.png\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20230506_125041-removebg-preview_1689206249_big.png\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00222\u0022:{\u0022rentalimage_id\u0022:\u00221422875\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221940331\u0022,\u0022rentalimage_order\u0022:\u00222\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/C-387-Castle-Combo-Dimensio (1)_1711571624.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/C-387-Castle-Combo-Dimensio (1)_1711571624_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00223\u0022:{\u0022rentalimage_id\u0022:\u00221702029\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221940331\u0022,\u0022rentalimage_order\u0022:\u00223\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20241116_112915_1734388005.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20241116_112915_1734388005_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00224\u0022:{\u0022rentalimage_id\u0022:\u00221702031\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221940331\u0022,\u0022rentalimage_order\u0022:\u00224\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20240815_172834_1734388006.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20240815_172834_1734388006_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00225\u0022:{\u0022rentalimage_id\u0022:\u00221702033\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221940331\u0022,\u0022rentalimage_order\u0022:\u00225\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20231130_180305_1734388007.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20231130_180305_1734388007_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022}}"};</script>
563<div class="io_item2_list elementor-widget-heading simpleCart_ioShelfItem cat_div_1940331" name="maindiv_Green Mountain XL Castle Combo"><div class="cat_div"> <a href="https://mountainbouncers.com/rentals/slide-combos/castle-bounce-house-water-slide/"><div class="btn btn-primary view-product-button">View Product</div> <img decoding="async" class="category_big_img cat_img item_image io_image_big" title="Green Mountain XL Castle Combo" src="https://rental.software/users/Mountainbouncers/images/file_000000009a98722fa97495328e3a5c9d_1771716270_big.png" alt="Green Mountain XL Castle Combo" /> </a> <a rel="noopener" href="https://rental.software/users/Mountainbouncers/images/file_000000009a98722fa97495328e3a5c9d_1771716270_big.png" id="io_img_big1_1940331" target="_blank"></a> <a rel="img_group noopener" href="https://rental.software/users/Mountainbouncers/images/20230506_125041-removebg-preview_1689206249_big.png" id="io_img_big2_1940331" target="_blank"></a> <br><div class="io_image_thumbbox io_category_thumbox" style="display:none;"> <img decoding="async" class="io_image_thumb skip-lazy" title="Green Mountain XL Castle Combo" src="https://rental.software/users/Mountainbouncers/images/file_000000009a98722fa97495328e3a5c9d_1771716270.png" alt="Green Mountain XL Castle Combo"
564 id="io_img_thumb1_1940331" onclick="updateMainPic(this)" /></div></div><div class="io_item2_list_inner"><p class="elementor-heading-title rentNameIO item_name"><a href="https://mountainbouncers.com/rentals/slide-combos/castle-bounce-house-water-slide/">Green Mountain XL Castle Combo</a></p><p class="rentNameIO_price rentNameIO_price_1940331"><span class="cat_from" style="font-style:italic;font-size:smaller;">from</span> <span class="rentNameIO_pricespan">$349.00</span></p><p class="item_encoded" style="display:none;">Green+Mountain+XL+Castle+Combo</p> <span class="item_href" style="display:none;">https://mountainbouncers.com/rentals/slide-combos/castle-bounce-house-water-slide/</span><p class="item_rentalid" style="display:none;">1940331</p><p class="item_vendorid" style="display:none;"></p><p class="item_qtytype" style="display:none;">Limited</p><p class="item_inputtype" style="display:none;">Dropdown</p> <span class="item_qtyincrement" style="display:none;">1</span><div class="item_timeslots" style="display:none;"></div><p class="item_giftcardvalue" style="display:none;"></p><div class="item_hasRequiredAcc" style="display:none;"></div><div class="io_list_view_data"></div><div class="io_buttons_container"> <a href="https://mountainbouncers.com/rentals/slide-combos/castle-bounce-house-water-slide/" class="io_more_info_button">MORE INFO</a><div class="elementor-widget-button add_cart_1940331"> <a class="item_add elementor-button elementor-size-sm elementor-animation-grow io_button rentNameIO_button"
565 href="javascript:;"><i class="fas fa-shopping-cart"></i> Add to Cart</a></div></div><div class="unavailable_message unavailable_message_1940331"  onclick="checkAvailDateClick()">item unavailable (change date)</div></div></div> 
565<script>jQuery(document).ready(function () {
566        // Hide price when zero
567        jQuery(".rentNameIO_pricespan").each(function () {
568            if( !Number( this.textContent.replace(/[^0-9.-]+/g,"") ) ){
569                jQuery(this.parentElement).hide();
570            }
571        });
572    });</script>
vendor: 1 bytes, line 572
572
573<script>window.io_category_data = window.io_category_data || {}; window.io_category_data['2730283'] = {"indoor_outdoor":"","staff":"","electric":"1.00","dimensions":"35Lx13Wx14H","rental_id":"2730283","rental_name":"Sky Castle Splash","images_arr":"{\u00220\u0022:{\u0022rentalimage_id\u0022:\u00222311365\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00222730283\u0022,\u0022rentalimage_order\u0022:\u00220\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_0000000074c071f595d4e9f63ca5f557_1771774865.png\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_0000000074c071f595d4e9f63ca5f557_1771774865_big.png\u0022,\u0022media_type\u0022:\u0022image\u0022}}"};</script>
573<div class="io_item2_list elementor-widget-heading simpleCart_ioShelfItem cat_div_2730283" name="maindiv_Sky Castle Splash"><div class="cat_div"> <a href="https://mountainbouncers.com/rentals/water/sky-castle-splash/"><div class="btn btn-primary view-product-button">View Product</div> <img decoding="async" class="category_big_img cat_img item_image io_image_big" title="Sky Castle Splash" src="https://rental.software/users/Mountainbouncers/images/file_0000000074c071f595d4e9f63ca5f557_1771774865_big.png" alt="Sky Castle Splash" /> </a> <a rel="noopener" href="https://rental.software/users/Mountainbouncers/images/file_0000000074c071f595d4e9f63ca5f557_1771774865_big.png" id="io_img_big1_2730283" target="_blank"></a> <a rel="img_group noopener" href="" id="io_img_big2_2730283"></a> <br><div class="io_image_thumbbox io_category_thumbox" style="display:none;"> <img decoding="async" class="io_image_thumb skip-lazy" title="Sky Castle Splash" src="https://rental.software/users/Mountainbouncers/images/file_0000000074c071f595d4e9f63ca5f557_1771774865.png" alt="Sky Castle Splash"
574 id="io_img_thumb1_2730283" onclick="updateMainPic(this)" /></div></div><div class="io_item2_list_inner"><p class="elementor-heading-title rentNameIO item_name"><a href="https://mountainbouncers.com/rentals/water/sky-castle-splash/">Sky Castle Splash</a></p><p class="rentNameIO_price rentNameIO_price_2730283"><span class="cat_from" style="font-style:italic;font-size:smaller;">from</span> <span class="rentNameIO_pricespan">$349.00</span></p><p class="item_encoded" style="display:none;">Sky+Castle+Splash</p> <span class="item_href" style="display:none;">https://mountainbouncers.com/rentals/water/sky-castle-splash/</span><p class="item_rentalid" style="display:none;">2730283</p><p class="item_vendorid" style="display:none;"></p><p class="item_qtytype" style="display:none;">Limited</p><p class="item_inputtype" style="display:none;">Dropdown</p> <span class="item_qtyincrement" style="display:none;">1</span><div class="item_timeslots" style="display:none;"></div><p class="item_giftcardvalue" style="display:none;"></p><div class="item_hasRequiredAcc" style="display:none;">0</div><div class="io_list_view_data"></div><div class="io_buttons_container"> <a href="https://mountainbouncers.com/rentals/water/sky-castle-splash/" class="io_more_info_button">MORE INFO</a><div class="elementor-widget-button add_cart_2730283"> <a class="item_add elementor-button elementor-size-sm elementor-animation-grow io_button rentNameIO_button"
575 href="javascript:;"><i class="fas fa-shopping-cart"></i> Add to Cart</a></div></div><div class="unavailable_message unavailable_message_2730283"  onclick="checkAvailDateClick()">item unavailable (change date)</div></div></div> 
575<script>jQuery(document).ready(function () {
576        // Hide price when zero
577        jQuery(".rentNameIO_pricespan").each(function () {
578            if( !Number( this.textContent.replace(/[^0-9.-]+/g,"") ) ){
579                jQuery(this.parentElement).hide();
580            }
581        });
582    });</script>
vendor: 1 bytes, line 582
582
583<script>window.io_category_data = window.io_category_data || {}; window.io_category_data['1986401'] = {"indoor_outdoor":"","staff":"","electric":"1.00","dimensions":"11x29x11","rental_id":"1986401","rental_name":"The Marble Mansion XL (Dry Only)","images_arr":"{\u00220\u0022:{\u0022rentalimage_id\u0022:\u00221150479\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221986401\u0022,\u0022rentalimage_order\u0022:\u00220\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_00000000d458722fb20c82a86f09102a_1771716162.png\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_00000000d458722fb20c82a86f09102a_1771716162_big.png\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00221\u0022:{\u0022rentalimage_id\u0022:\u00221702015\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221986401\u0022,\u0022rentalimage_order\u0022:\u00221\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20241116_093114_1734387614.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20241116_093114_1734387614_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00222\u0022:{\u0022rentalimage_id\u0022:\u00221702017\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221986401\u0022,\u0022rentalimage_order\u0022:\u00222\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20240928_100459_1734387615.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20240928_100459_1734387615_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00223\u0022:{\u0022rentalimage_id\u0022:\u00221702019\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221986401\u0022,\u0022rentalimage_order\u0022:\u00223\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20240824_100825_1734387615.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20240824_100825_1734387615_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00224\u0022:{\u0022rentalimage_id\u0022:\u00221702021\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00221986401\u0022,\u0022rentalimage_order\u0022:\u00224\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20240613_081856_1734387616.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/20240613_081856_1734387616_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022}}"};</script>
583<div class="io_item2_list elementor-widget-heading simpleCart_ioShelfItem cat_div_1986401" name="maindiv_The Marble Mansion XL (Dry Only)"><div class="cat_div"> <a href="https://mountainbouncers.com/rentals/slide-combos/double-lane-slide-combo/"><div class="btn btn-primary view-product-button">View Product</div> <img decoding="async" class="category_big_img cat_img item_image io_image_big" title="The Marble Mansion XL (Dry Only)" src="https://rental.software/users/Mountainbouncers/images/file_00000000d458722fb20c82a86f09102a_1771716162_big.png" alt="The Marble Mansion XL (Dry Only)" /> </a> <a rel="noopener" href="https://rental.software/users/Mountainbouncers/images/file_00000000d458722fb20c82a86f09102a_1771716162_big.png" id="io_img_big1_1986401" target="_blank"></a> <a rel="img_group noopener" href="https://rental.software/users/Mountainbouncers/images/20241116_093114_1734387614_big.jpg" id="io_img_big2_1986401" target="_blank"></a> <br><div class="io_image_thumbbox io_category_thumbox" style="display:none;"> <img decoding="async" class="io_image_thumb skip-lazy" title="The Marble Mansion XL (Dry Only)" src="https://rental.software/users/Mountainbouncers/images/file_00000000d458722fb20c82a86f09102a_1771716162.png" alt="The Marble Mansion XL (Dry Only)"
584 id="io_img_thumb1_1986401" onclick="updateMainPic(this)" /></div></div><div class="io_item2_list_inner"><p class="elementor-heading-title rentNameIO item_name"><a href="https://mountainbouncers.com/rentals/slide-combos/double-lane-slide-combo/">The Marble Mansion XL (Dry Only)</a></p><p class="rentNameIO_price rentNameIO_price_1986401"><span class="cat_from" style="font-style:italic;font-size:smaller;">from</span> <span class="rentNameIO_pricespan">$349.00</span></p><p class="item_encoded" style="display:none;">The+Marble+Mansion+XL+%28Dry+Only%29</p> <span class="item_href" style="display:none;">https://mountainbouncers.com/rentals/slide-combos/double-lane-slide-combo/</span><p class="item_rentalid" style="display:none;">1986401</p><p class="item_vendorid" style="display:none;"></p><p class="item_qtytype" style="display:none;">Limited</p><p class="item_inputtype" style="display:none;">Dropdown</p> <span class="item_qtyincrement" style="display:none;">1</span><div class="item_timeslots" style="display:none;"></div><p class="item_giftcardvalue" style="display:none;"></p><div class="item_hasRequiredAcc" style="display:none;"></div><div class="io_list_view_data"></div><div class="io_buttons_container"> <a href="https://mountainbouncers.com/rentals/slide-combos/double-lane-slide-combo/" class="io_more_info_button">MORE INFO</a><div class="elementor-widget-button add_cart_1986401"> <a class="item_add elementor-button elementor-size-sm elementor-animation-grow io_button rentNameIO_button"
585 href="javascript:;"><i class="fas fa-shopping-cart"></i> Add to Cart</a></div></div><div class="unavailable_message unavailable_message_1986401"  onclick="checkAvailDateClick()">item unavailable (change date)</div></div></div> 
585<script>jQuery(document).ready(function () {
586        // Hide price when zero
587        jQuery(".rentNameIO_pricespan").each(function () {
588            if( !Number( this.textContent.replace(/[^0-9.-]+/g,"") ) ){
589                jQuery(this.parentElement).hide();
590            }
591        });
592    });</script>
vendor: 1 bytes, line 592
592
593<script>window.io_category_data = window.io_category_data || {}; window.io_category_data['3219447'] = {"indoor_outdoor":"","staff":"","electric":"1.00","dimensions":"","rental_id":"3219447","rental_name":"The Tropical Roadtrip","images_arr":"{\u00220\u0022:{\u0022rentalimage_id\u0022:\u00222331271\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00223219447\u0022,\u0022rentalimage_order\u0022:\u00220\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_00000000afe8722f87c34279e7b07f79_1771716219.png\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_00000000afe8722f87c34279e7b07f79_1771716219.png\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00221\u0022:{\u0022rentalimage_id\u0022:\u00222309477\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00223219447\u0022,\u0022rentalimage_order\u0022:\u00221\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/JCX-CFD32BC_WEB4_1771636192.jpg\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/JCX-CFD32BC_WEB4_1771636192_big.jpg\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00222\u0022:{\u0022rentalimage_id\u0022:\u00222309475\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00223219447\u0022,\u0022rentalimage_order\u0022:\u00222\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_00000000afe8722f87c34279e7b07f79_1771716219.png\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_00000000afe8722f87c34279e7b07f79_1771716219_big.png\u0022,\u0022media_type\u0022:\u0022image\u0022},\u00223\u0022:{\u0022rentalimage_id\u0022:\u00222310497\u0022,\u0022rentalimage_createtime\u0022:null,\u0022rentalimage_modifiedtime\u0022:null,\u0022rentalimage_itemid\u0022:\u00223219447\u0022,\u0022rentalimage_order\u0022:\u00222\u0022,\u0022rentalimage_imageloc\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_00000000afe8722f87c34279e7b07f79_1771716219.png\u0022,\u0022rentalimage_imagelocbig\u0022:\u0022https:\/\/rental.software\/users\/Mountainbouncers\/images\/file_00000000afe8722f87c34279e7b07f79_1771716219_big.png\u0022,\u0022media_type\u0022:\u0022image\u0022}}"};</script>
593<div class="io_item2_list elementor-widget-heading simpleCart_ioShelfItem cat_div_3219447" name="maindiv_The Tropical Roadtrip"><div class="cat_div"> <a href="https://mountainbouncers.com/rentals/slide-combos/the-tropical-roadtrip/"><div class="btn btn-primary view-product-button">View Product</div> <img decoding="async" class="category_big_img cat_img item_image io_image_big" title="The Tropical Roadtrip" src="https://rental.software/users/Mountainbouncers/images/file_00000000afe8722f87c34279e7b07f79_1771716219.png" alt="The Tropical Roadtrip" /> </a> <a rel="noopener" href="https://rental.software/users/Mountainbouncers/images/file_00000000afe8722f87c34279e7b07f79_1771716219.png" id="io_img_big1_3219447" target="_blank"></a> <a rel="img_group noopener" href="https://rental.software/users/Mountainbouncers/images/JCX-CFD32BC_WEB4_1771636192_big.jpg" id="io_img_big2_3219447" target="_blank"></a> <br><div class="io_image_thumbbox io_category_thumbox" style="display:none;"> <img decoding="async" class="io_image_thumb skip-lazy" title="The Tropical Roadtrip" src="https://rental.software/users/Mountainbouncers/images/file_00000000afe8722f87c34279e7b07f79_1771716219.png" alt="The Tropical Roadtrip"
594 id="io_img_thumb1_3219447" onclick="updateMainPic(this)" /></div></div><div class="io_item2_list_inner"><p class="elementor-heading-title rentNameIO item_name"><a href="https://mountainbouncers.com/rentals/slide-combos/the-tropical-roadtrip/">The Tropical Roadtrip</a></p><p class="rentNameIO_price rentNameIO_price_3219447"><span class="cat_from" style="font-style:italic;font-size:smaller;">from</span> <span class="rentNameIO_pricespan">$349.00</span></p><p class="item_encoded" style="display:none;">The+Tropical+Roadtrip</p> <span class="item_href" style="display:none;">https://mountainbouncers.com/rentals/slide-combos/the-tropical-roadtrip/</span><p class="item_rentalid" style="display:none;">3219447</p><p class="item_vendorid" style="display:none;"></p><p class="item_qtytype" style="display:none;">Limited</p><p class="item_inputtype" style="display:none;">Dropdown</p> <span class="item_qtyincrement" style="display:none;">1</span><div class="item_timeslots" style="display:none;"></div><p class="item_giftcardvalue" style="display:none;"></p><div class="item_hasRequiredAcc" style="display:none;"></div><div class="io_list_view_data"></div><div class="io_buttons_container"> <a href="https://mountainbouncers.com/rentals/slide-combos/the-tropical-roadtrip/" class="io_more_info_button">MORE INFO</a><div class="elementor-widget-button add_cart_3219447"> <a class="item_add elementor-button elementor-size-sm elementor-animation-grow io_button rentNameIO_button"
595 href="javascript:;"><i class="fas fa-shopping-cart"></i> Add to Cart</a></div></div><div class="unavailable_message unavailable_message_3219447"  onclick="checkAvailDateClick()">item unavailable (change date)</div></div></div> 
595<script>jQuery(document).ready(function () {
596        // Hide price when zero
597        jQuery(".rentNameIO_pricespan").each(function () {
598            if( !Number( this.textContent.replace(/[^0-9.-]+/g,"") ) ){
599                jQuery(this.parentElement).hide();
600            }
601        });
602    });</script>
602</div></main><footer data-elementor-type="footer" data-elementor-id="220" class="elementor elementor-220 elementor-location-footer" data-elementor-post-type="elementor_library"><section class="elementor-section elementor-top-section elementor-element elementor-element-16dfcfef elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="16dfcfef" data-element_type="section" data-e-type="section" id="io_contactform" data-settings="{&quot;background_background&quot;:&quot;classic&quot;,&quot;shape_divider_top&quot;:&quot;opacity-tilt&quot;}"><div class="elementor-shape elementor-shape-top" aria-hidden="true" data-negative="false"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2600 131.1" preserveAspectRatio="none"> <path class="elementor-shape-fill" d="M0 0L2600 0 2600 69.1 0 0z"/> <path class="elementor-shape-fill" style="opacity:0.5" d="M0 0L2600 0 2600 69.1 0 69.1z"/> <path class="elementor-shape-fill" style="opacity:0.25" d="M2600 0L0 0 0 130.1 2600 69.1z"/> </svg></div><div class="elementor-container elementor-column-gap-default"><div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-2ed81d20" data-id="2ed81d20" data-element_type="column" data-e-type="column"><div class="elementor-widget-wrap elementor-element-populated"><div class="elementor-element elementor-element-663b4594 elementor-widget elementor-widget-heading" data-id="663b4594" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default"><div class="elementor-widget-container"><h2 class="elementor-heading-title elementor-size-xl">Contact Us</h2></div></div><div class="elementor-element elementor-element-2d23fd02 elementor-widget elementor-widget-text-editor" data-id="2d23fd02" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default"><div class="elementor-widget-container"><p>Have questions? We have answers! Can&#8217;t find what you&#8217;re looking for or curious about one of our products? Don&#8217;t hesitate to give us a call or use our <a href="#io_contactform">contact form</a> to reach out to us anytime!</p></div></div><div class="elementor-element elementor-element-54b9ff53 elementor-icon-list--layout-inline elementor-mobile-align-start elementor-list-item-link-full_width elementor-widget elementor-widget-icon-list" data-id="54b9ff53" data-element_type="widget" data-e-type="widget" data-widget_type="icon-list.default"><div class="elementor-widget-container"><ul class="elementor-icon-list-items elementor-inline-items"><li class="elementor-icon-list-item elementor-inline-item"> <a href="tel:(802)%20353-2201"> <span class="elementor-icon-list-icon"> <i aria-hidden="true" class="fas fa-phone-alt"></i> </span> <span class="elementor-icon-list-text">(802) 353-2201</span> </a></li><li class="elementor-icon-list-item elementor-inline-item"> <a href="mailto:[email protected]"> <span class="elementor-icon-list-icon"> <i aria-hidden="true" class="fas fa-envelope"></i> </span> <span class="elementor-icon-list-text">[email protected]</span> </a></li></ul></div></div><div class="elementor-element elementor-element-555e5bbc elementor-icon-list--layout-inline elementor-mobile-align-start elementor-list-item-link-full_width elementor-widget elementor-widget-icon-list" data-id="555e5bbc" data-element_type="widget" data-e-type="widget" data-widget_type="icon-list.default"><div class="elementor-widget-container"><ul class="elementor-icon-list-items elementor-inline-items"><li class="elementor-icon-list-item elementor-inline-item"> <span class="elementor-icon-list-icon"> <i aria-hidden="true" class="fas fa-map-marked-alt"></i> </span> <span class="elementor-icon-list-text">West Rutland, VT</span></li></ul></div></div></div></div><div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-e76e585" data-id="e76e585" data-element_type="column" data-e-type="column"><div class="elementor-widget-wrap elementor-element-populated"><div class="elementor-element elementor-element-76af4c3c elementor-button-align-stretch elementor-widget elementor-widget-form" data-id="76af4c3c" data-element_type="widget" data-e-type="widget" data-settings="{&quot;step_next_label&quot;:&quot;Next&quot;,&quot;step_previous_label&quot;:&quot;Previous&quot;,&quot;button_width&quot;:&quot;100&quot;,&quot;step_type&quot;:&quot;number_text&quot;,&quot;step_icon_shape&quot;:&quot;circle&quot;}" data-widget_type="form.default"><div class="elementor-widget-container"><form class="elementor-form" method="post" id="io_contactusform" name="Request Call Back" aria-label="Request Call Back"> <input type="hidden" name="post_id" value="220"/> <input type="hidden" name="form_id" value="76af4c3c"/> <input type="hidden" name="referer_title" value="Mountain Bouncers LLC - Party Rental and Bounce House Rental" /> <input type="hidden" name="queried_id" value="109"/><div class="elementor-form-fields-wrapper elementor-labels-"><div class="elementor-field-type-text elementor-field-group elementor-column elementor-field-group-firstandlastname elementor-col-33"> <label for="form-field-firstandlastname" class="elementor-field-label elementor-screen-only"> Name </label> <input size="1" type="text" name="form_fields[firstandlastname]" id="form-field-firstandlastname" class="elementor-field elementor-size-sm  elementor-field-textual" placeholder="Name"></div><div class="elementor-field-type-email elementor-field-group elementor-column elementor-field-group-email elementor-col-33 elementor-field-required"> <label for="form-field-email" class="elementor-field-label elementor-screen-only"> Email </label> <input size="1" type="email" name="form_fields[email]" id="form-field-email" class="elementor-field elementor-size-sm  elementor-field-textual" placeholder="Email" required="required"></div><div class="elementor-field-type-tel elementor-field-group elementor-column elementor-field-group-cellphone elementor-col-33"> <label for="form-field-cellphone" class="elementor-field-label elementor-screen-only"> Phone </label> <input size="1" type="tel" name="form_fields[cellphone]" id="form-field-cellphone" class="elementor-field elementor-size-sm  elementor-field-textual" placeholder="Phone" pattern="[0-9()#&amp;+*-=.]+" title="Only numbers and phone characters (#, -, *, etc) are accepted."></div><div class="elementor-field-type-textarea elementor-field-group elementor-column elementor-field-group-notes elementor-col-100"> <label for="form-field-notes" class="elementor-field-label elementor-screen-only"> Message </label><textarea class="elementor-field-textual elementor-field  elementor-size-sm" name="form_fields[notes]" id="form-field-notes" rows="3" placeholder="&quot;I need help from a human sales rep.&quot;"></textarea></div><div class="elementor-field-type-recaptcha_v3 elementor-field-group elementor-column elementor-field-group-field_1a42aac elementor-col-100 recaptcha_v3-bottomright"><div class="elementor-field" id="form-field-field_1a42aac"><div class="elementor-g-recaptcha" data-sitekey="6LcSNw8eAAAAAN1cy4N20ZlzWX4YetiG7zmLXN_f" data-type="v3" data-action="Form" data-badge="bottomright" data-size="invisible"></div></div></div><div class="elementor-field-type-text"> <input size="1" type="text" name="form_fields[website_url]" id="form-field-website_url" class="elementor-field elementor-size-sm " style="display:none !important;"></div><div class="elementor-field-group elementor-column elementor-field-type-submit elementor-col-100 e-form__buttons"> <button class="elementor-button elementor-size-sm elementor-animation-grow" type="submit" id="io_cub"> <span class="elementor-button-content-wrapper"> <span class="elementor-button-icon"> <i aria-hidden="true" class="far fa-paper-plane"></i> </span> <span class="elementor-button-text">Send</span> </span> </button></div></div></form></div></div><div class="elementor-element elementor-element-f430e84 elementor-widget elementor-widget-text-editor" data-id="f430e84" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default"><div class="elementor-widget-container"> This site is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy">Privacy Policy</a> and <a href="https://policies.google.com/terms">Terms of Service</a> apply.</div></div></div></div></div></section><section class="elementor-section elementor-top-section elementor-element elementor-element-ea9489a elementor-section-height-min-height elementor-section-boxed elementor-section-height-default elementor-section-items-middle" data-id="ea9489a" data-element_type="section" data-e-type="section" data-settings="{&quot;background_background&quot;:&quot;classic&quot;}"><div class="elementor-container elementor-column-gap-no"><div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5784b69c" data-id="5784b69c" data-element_type="column" data-e-type="column"><div class="elementor-widget-wrap elementor-element-populated"><div class="elementor-element elementor-element-7996f660 elementor-widget elementor-widget-text-editor" data-id="7996f
602660" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default"><div class="elementor-widget-container"><p>Copyright © <span id="ioyeario">2022</span><span id="io_fbs"> Mountain Bouncers LLC</span> All Rights Reserved | Rental Software Powered By <a href="https://www.inflatableoffice.com/" target="_blank" rel="noopener">InflatableOffice</a></p></div></div></div></div></div></section></footer> 
602<script type="speculationrules">{"prefetch":[{"source":"document","where":{"and":[{"href_matches":"/*"},{"not":{"href_matches":["/wp-*.php","/wp-admin/*","/wp-content/uploads/*","/wp-content/*","/wp-content/plugins/*","/wp-content/themes/io-kenos/*","/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]}</script>
602 <img src="https://rental.software/include/iotracking.php" style="display:none;" importance="low" alt="dynamic io trk code" /><style>.io_product_price_4h,.io_product_price_8h,.io_product_price_24h,.io_product_price_additionalday{display:none}.io_product_price_24h{display: grid !important}.io_product_price_24h_1861737,.io_product_price_24h_1905817,.io_product_price_24h_1861743{display: grid !important}.io_product_price_68141_1861737,.io_product_price_68141_1905817,.io_product_price_68141_1861743,.io_product_price_68141_1861737,.io_product_price_68141_1905817,.io_product_price_68141_1861743{display: none !important}
603    /* ALWAYS hide toggle buttons and list view on inventory/all-items pages (no category ID) */
604    body.io-no-category-id .io_view_toggle_container,
605    body.io-no-category-id .io_list_view_content
606    {
607        display: none !important;
608    }
609    
610    /* Force grid/tile layout on pages without category IDs */
611    body.io-no-category-id .io_catdiv2.list-view {
612        display: grid !important;
613        grid-template-columns: repeat(auto-fit, minmax(250px, 350px)) !important;
614        grid-gap: 10px !important;
615        margin: 50px !important;
616        max-width: none !important;
617        justify-content: space-evenly !important;
618    }
619    body.io-no-category-id .io_catdiv2.list-view .io_item2_list {
620        display: block !important;
621        flex-direction: column !important;
622        margin-bottom: 0 !important;
623        padding: 0 !important;
624        align-items: initial !important;
625        text-align: center !important;
626    }
627    body.io-no-category-id .io_catdiv2.list-view .cat_div {
628        flex: initial !important;
629        margin-right: 0 !important;
630        position: relative !important;
631    }
632    body.io-no-category-id .io_catdiv2.list-view .cat_img {
633        width: 100% !important;
634        height: auto !important;
635        object-fit: cover !important;
636    }
637    body.io-no-category-id .io_catdiv2.list-view .io_item2_list_inner {
638        flex: initial !important;
639        margin-top: initial !important;
640        display: block !important;
641        flex-direction: initial !important;
642        justify-content: initial !important;
643        min-height: auto !important;
644        height: auto !important;
645    }
646    
647    .io_all_item_cat{
648        display:none;
649        float:none;
650        width:100%;
651        margin-top:20px;
652    }</style> 
652<script>var io_wp_local_path = "";
653    var io_checkavail = "warn";
654    var io_hidetimes = "off";
655    var io_user_country = "US";
656    var io_user_currency = "USD";
657    var io_default_start_time = "12:00 pm";
658    var io_default_end_time = "4:00 pm";
659    var io_default_duration = 4.00;
660    var io_force_blank_timepickers = "";
661    var io_hide_end_time = "";
662    var io_cart_date_format = "m/d/yy";
663    var io_cart_message = "";
664    var io_cart_time_format = "g:i a";
665    var io_multidayquote = "on";
666    var io_cartdayselect = "single_day";
667    var io_cartAllowSameDay = "off";
668    var io_overnightPickupTime = "10:00 am";
669    var io_incartupsell = "on";
670    var io_distancecharge = "on";
671    var io_deliverymethod = "off";
672    var io_brand = "IO";
673    var io_restrict_times = "on";
674    var io_restrict_time_start = "8:00 am";
675    var io_restrict_time_end = "9:00 pm";
676    var io_default_state = "VT";
677    var io_hide_zero = "0";
678    var io_weekEndPrice = "off";
679    var io_weekDayText = "Weekday price.";
680    var io_weekEndText = "Weekend price.";
681    var io_weekendDefine = "friday-sunday";
682    var io_accessory_price = "off";
683    var io_accessory_select = "";
684    var io_upsell_price = "off";
685    var io_cart_party_planner_email = "";
686    var io_cart_party_planner_destination = "";
687    var io_hideQuantityAvail = "on";
688    var io_company_timeslots = [];
689    var io_info_required = "off";
690    var io_always_display_live_price = "on";
691    var io_default_delivery_method = "";
692    var io_hide_live_prices = 1;
693    var io_info_required_data = [];
694    var io_prices = {"0":"isset","override_groups":{"793429":{"1861737":1,"1905817":1,"1861743":1}},"1":"io_product_price_24h","2":"io_delivery_price_68141","3":"io_product_price_24h_1861737","4":"io_product_price_24h_1905817","5":"io_product_price_24h_1861743","6":"io_delivery_price_68141_1861737","7":"io_delivery_price_68141_1905817","8":"io_delivery_price_68141_1861743"};
695    var io_delivery_prices = {"default":["68141"],"override":{"1861737":["68141"],"1905817":["68141"],"1861743":["68141"]}};
696    var io_custom_prices = {"default":[], "override":[]};
697    var io_delivery_methods = {"Delivery and Set-up":{"restricted":"[]","id":"68141"},"Staffed event":{"restricted":"[]","id":"123611"},"Contactless Delivery and Set up":{"restricted":"[]","id":"123615"},"Drop Off":{"restricted":"[]","id":"127713"}};
698    var io_customer_geolocation = "";
699    var io_customer_ip = "31.76.60.166";
700    var io_delivery_methods_restrict = null;
701    var io_pagename = "Mountain Bouncers LLC";
702    var io_categoryVariantImages = "";
703    //var io_seocitylinktext = "Professional delivery to <span class=\"io_city_list\">%%landing_pages%%</span> and surrounding areas. Please submit a quote or contact us to be sure we service your area.";
704    jQuery( document ).ready(function() {
705
706        //force all quote form links to use cart data
707        //removing back to cart shortcode as this needs to only be done if cart is not empty IO-22561
708        /*
709        let headerBookButton = jQuery("a[href$='io_quoteform/']");
710        headerBookButton.addClass("ioCart_link");
711        headerBookButton.attr("href", "javascript:;");
712        */
713
714
715        let last_cat_name = "";
716        let ioTrigger = false;
717        jQuery(".io_all_item_cat").each(function() {
718            current_cat_name = jQuery(this).html();
719            if(last_cat_name !== current_cat_name) {
720                jQuery(this).show();
721                ioTrigger = true;
722            }
723            last_cat_name = current_cat_name;
724        });
725
726        // Setup gen page blocks
727		let io_divs = document.querySelectorAll(".io_item2_list, .io_item2_listcat, .io_item2_listrent, .io_all_item_cat");
728		let io_divscat = document.querySelectorAll(".io_item2_listcat");
729		let io_divsrent = document.querySelectorAll(".io_item2_listrent");
730		let io_divcat = document.querySelector(".io_catdiv2");
731		let io_pcc = document.querySelector(".page-content");
732		let io_html;
733
734		if (io_divs.length > 0) {
735	      for (let i of io_divs) {
736	        if(i.parentNode.className.indexOf("io_mm_") === -1){
737	          io_divcat.appendChild(i);
738	        }
739		  }
740		  if(io_divcat!==null) io_divcat.style.display = "grid";
741		}
742
743		if (ioTrigger) {
744            let pageBlock = document.querySelector(".io_catdiv2");
745            pageBlock.classList.add("elementor-widget-heading");
746            let scanRes = pageBlock.querySelectorAll(".io_item2_listrent");
747            pageBlock.style.display = "block";
748            pageBlock.style.margin = "auto";
749            pageBlock.style.textAlign = "center";
750            pageBlock.style.marginLeft = "5px";
751            pageBlock.style.marginRight = "5px";
752            for (let i of scanRes) {
753                i.style.display = "inline-block";
754                i.style.marginLeft = "5px";
755                i.style.marginRight = "5px";
756            }
757        }
758
759		/* fix font color on older sites */
760		if(jQuery("#cartData").css("background-color")=="rgb(35, 36, 37)"){
761		    jQuery("#cartData").css("color","white");
762		}
763    });</script>
763<style>.ui-datepicker-trigger{display:none}</style><div id="cartPopover"><div id="ioCartLoadingOverlay" aria-hidden="true"><div class="io-spinner" role="status" aria-live="polite" aria-label="Loading"></div></div><div id="triangle"></div><div id="cartCalendarTimePickerContainer"><div id="cartCalendar"></div><div id="cartTimePicker"><div id="div-overnight"> Days <select style="color:black;" name="whatday" id="whatday" onchange="endDisplay();"><option value="Same Day" selected="selected">Single Day</option><option value="Overnight">Overnight</option><option value="Multi-Day">Multi-Day</option> </select></div> <br><div id="ioCartTimeSelectContainer"><div> <span class="calTimeLabel calTimeLabelStart">Start</span> <i class="fas fa-calendar-check"></i> <input type="text" name="dateStart" class="ioCartDateInput" readonly="readonly" /> <i class="fas fa-clock"></i> <input type="text" name="timeStart" class="timepicker" style="width:75px;" /></div><div> <span class="calTimeLabel calTimeLabelEnd">End</span> <i class="fas fa-calendar-check"></i> <input type="text" name="dateEnd" class="ioCartDateInput" readonly="readonly" /> <i class="fas fa-clock"></i> <input type="text" name="timeEnd" class="timepicker" style="width:75px;" /></div></div> <br><div id="ioDeliveryMethodContainer" style="display:none; text-align: center;"></div> <br><div id="ioAdditonalInformationContainer" style="display:none; text-align: center;"><div class="io_info_modal_data_container" id="io_info_modal_address"> <label for="address" id="io_iml_address_label" style="width:105px"> Street Address </label> <input class="io_modal_input_address" style="margin-left:5px" id="io_im_address"  name="address" type="text"></input> <br></div><div class="io_info_modal_data_container" id="io_info_modal_city"> <label for="city" id="io_iml_city_label" style="width:105px"> City </label> <input class="io_modal_input_city" style="margin-left:5px" id="io_im_city" name="city" type="text"></input> <br></div><div class="io_info_modal_data_container" id="io_info_modal_zip"> <label for="zip" id="io_iml_zip_label" style="width:105px"> Zip Code </label> <input class="io_modal_input_zip" id="io_im_zip" style="margin-left:5px" name="zip" type="text"></input></div></div> <br><div class="elementor-widget-button" style="padding:10px;display:inline-block;"> <a onclick="calApply()" href="javascript:;"
764 class="elementor-button-link elementor-button elementor-size-sm elementor-animation-grow"
765 style="text-decoration: none;">Apply</a></div><div class="elementor-widget-button" style="padding:10px;display:inline-block;"> <a onclick="calCancel()" href="javascript:;"
766 class="elementor-button-link elementor-button elementor-size-sm elementor-animation-grow simpleCart_cancel"
767 style="text-decoration: none;">Cancel</a></div></div><div id="cartDateRange" class="ioDateRange" onclick="calSetDateRange(1)" style="display:none;"></div><div class="changeDateLinkWrapper elementor-widget-button"><div id="changeDateLink" onclick="calSetDateRange(1)" class="elementor-button elementor-animation-grow">Change Date</div></div></div><div id="cartPartyBuilderEmailContainer" style="display:none;text-align:center"><p>Provide an email address here to recieve our free party planner!</p> <input type="text" id="cartPartyBuilderEmailInput"><div class="elementor-widget-button" style="display:inline-block;"> <a onclick="io_party_planner_email_submit()" href="javascript:;" class="elementor-button-link elementor-button elementor-size-sm" style="padding: 6px 15px;text-decoration: none;">Go</a></div><div id="cartPartyBuilderEmailWarning" style="display:none">Pleave provide a valid email address.</div> <br><br></div><div id="cartCustomMessage" style="display:none;text-align:center"></div><div id="cartWarning" class="clearfix"></div><div id="deliveryMethodWarning" class="clearfix">Some items are not available for the selected delivery method.</div> <span class="io_locationRedirectLink">You may not be on the correct site. Click here to change location.</span><div id="cartData" class="clearfix"><div class="simpleCart_items"></div></div><div class="cartSubtotalBox"> Subtotal (estimate):<div id="cartSubtotal"></div></div><div class="checkDeliveryCartContainer"><div id="checkDeliveryMessage" class="cartDeliverytotalBox"><a class="cartLink" href="javascript:;" onClick="showAddressEntry(true)">Check Delivery</a></div><div id="deliverSubtotalContainer" class="cartDeliverytotalBox"> Delivery Fee (<span><a class="cartLink" href="javascript:;" onClick="showAddressEntry(true)">Change Address</a></span>):<div id="deliverySubtotal"></div></div></div><div id="cartCheckoutButton" class="clearfix"><div class="elementor-widget-button"> <a href="javascript:cartHide();
767" class="simpleCart_continue elementor-button elementor-size-sm elementor-animation-grow io_button">Continue Shopping</a> <a href="javascript:;" class="simpleCart_checkout elementor-button elementor-size-sm elementor-animation-grow io_button">Checkout</a></div><div id="cart-carousel-container" style="display:none"> <label> Some items you may be interested in: </label> <br><div class="cart-carousel"></div></div><div class="ioLink"><a href="https://www.inflatableoffice.com" target="_blank">powered by io</a></div></div></div>  
767<script>/* configurable globals */
768  var start_default = "11:00 am";
769  if(io_default_start_time != "") start_default = io_default_start_time;
770  var end_default = "3:00 pm";
771  if(io_default_end_time != "") end_default = io_default_end_time;
772
773  if(io_user_currency){
774    var currency = io_user_currency;
775  } else{
776    var currency = "USD";
777  }
778
779  if(io_user_country){
780    var country = io_user_country;
781  } else{
782    var country = "US";
783  }
784
785
786  var timeFormat = "g:i a";
787  if(io_cart_time_format != "") timeFormat = io_cart_time_format;
788  var dateFormat = "m/d/yy";
789  if(io_cart_date_format != "") dateFormat = io_cart_date_format;
790
791  var restrictTimes = false;
792  if(io_restrict_times === "on") restrictTimes = true;
793  var restrictTimeStart = start_default;
794  if(io_restrict_time_start != "") restrictTimeStart = io_restrict_time_start;
795  var restrictTimeEnd = end_default;
796  if(io_restrict_time_end != "") restrictTimeEnd = io_restrict_time_end;
797
798
799  var multi_day = true;
800  if(io_multidayquote === "off" || io_cartdayselect == "Single Day") multi_day = false;
801  var in_cart_upsell = false;
802  if(io_incartupsell === "on") in_cart_upsell = true;
803  var io_distance_charge = false;
804  if(io_distancecharge === "on") io_distance_charge = true;
805
806  /* other globals */
807  var pallet_color1 = ""; /* set in onready */
808  /* track the date start/end of calendar clicking */
809  var click_count = 0;
810
811  /* for configuring upsell carosel in cart */
812  var cart_carousel_set = false;
813
814  /* for checking when we remove an item from the cart */
815  var last_remove = 0;
816  var last_upsell_call = 0;
817
818  /* for buffering cart qty changes checkAvail calls for qty change only */
819  var last_checkAvail_call = 0;
820
821  /* for cart loading animation */
822  var io_cart_loading_active = false;
823  var io_cart_loading_count = 0;
824  var io_cart_loading_fallback_timer = null;
825
826  /*var start_default = "11:00";
827    var end_default = "15:00";
828    var currency = "EUR";
829    var timeFormat = "G:i";
830    var dateFormat = "d/m/yy";*/
831
832
833  /* For weekday weekend pricing */
834  var use_weekday_weekend = false;
835  if(io_weekEndPrice == "on") use_weekday_weekend = true;
836
837  /* Accessory and Upsell Prices */
838  var show_accessory_price = false;
839  if(io_accessory_price == "on") show_accessory_price = true;
840  var show_upsell_price = false;
841  if(io_upsell_price == "on") show_upsell_price = true;
842
843  /* For customer geolocation shortcode */
844  var storage_key = 'io_customer_location';
845
846  /*<editor-fold defaultstate="collapsed" desc="On Ready">*/
847  jQuery(document).ready(function () {
848    pallet_color1 = "var( --e-global-color-accent,green )";
849    if(pallet_color1=="rgba(0, 0, 0, 0)" || pallet_color1=="rgb(255, 255, 255)") pallet_color1="rgb(25, 147, 35)";
850
851    /*<editor-fold defaultstate="collapsed" desc="SimpleCart Init">*/
852    simpleCart({
853      currency: currency,
854      cartColumns: [{
855        view: "image",
856        attr: "image",
857        label: "Image"
858      },
859        {
860          attr: "name",
861          label: "Name"
862        },
863        {
864          attr: "encoded",
865          label: false
866        },
867        {
868          attr: "rentalid",
869          label: false
870        },
871        {
872          attr: "availability",
873          label: false
874        },
875        {
876          view: "decrement",
877          label: false,
878          text: "<i class='fas far fa-minus-square' style='color:" + pallet_color1 + "'></i>"
879        },
880        {
881          view: "calculate_area",
882          label: false
883        },
884        {
885          view:"input",
886          attr:"quantity"
887
888        },
889        {
890          attr: "qtyincrement",
891          label: false
892        },
893        {
894          attr: "inputtype",
895          label: false
896        },
897        {
898          attr: "qtytype",
899          label: false
900        },
901        {
902          attr: "vendorid",
903          label: false
904        },
905        {
906          view: "increment",
907          label: false,
908          text: "<i class='fas far fa-plus-square' style='color:" + pallet_color1 + "'></i>"
909        },
910        {
911          attr: "price",
912          label: "Price",
913          view: 'currency'
914        },
915        {
916          view: "remove",
917          label: false,
918          text: "<i class='fas fa-trash' style='color:" + pallet_color1 + "'></i>"
919        },
920        {
921          attr: "total",
922          label: "SubTotal",
923          view: 'currency'
924        },
925        {
926          attr: "timeslots",
927          label: false
928        },
929        {
930          attr: "timeslots-orig",
931          label: false
932        },
933        {
934          attr: "href",
935          label: false
936        },
937        {
938          attr: "linkqty",
939          label: false
940        },
941        {
942          attr: "acc_dd_parent_limit",
943          label: false
944        }
945      ],
946      checkout: {
947        type: "SendForm",
948        method: "GET",
949        url: io_wp_local_path+"/io_quoteform/",
950        extra_data: {
951          /* name: decodeURIComponent("Mountain Bouncers LLC".replace(/[+]/gi, " ")), */
952          clear_rentals: "1",
953          selected_only: "1",
954          wp_checkout: "1",
955          startdate: "",
956          enddate: "",
957          starttime: "",
958          endtime: "",
959          io_custguid: ""
960        }
961      }
962    });
963
964    simpleCart.bind('update', cart_onUpdate);
965    simpleCart.bind('beforeSave', cart_hideTimepickerWrapper);
966    simpleCart.bind('beforeRemove', cart_beforeRemove);
967    simpleCart.bind('afterRemove', cart_afterRemove);
968    simpleCart.bind('afterQtyChange', cart_afterQtyChange);
969    simpleCart.bind('beforeCheckout', cart_beforeCheckout);
970    simpleCart.bind('afterAdd', cart_afterAdd);
971    simpleCart.bind('beforeAdd', cart_beforeAdd);
972    simpleCart.bind('load', cart_afterLoad)
973    /*</editor-fold>*/
974
975    /* showAvail(""); */
976    let io_star_pic = document.querySelector("#io_star_pic");
977    if (io_star_pic != null) {
978      let io_star_src = io_star_pic.src;
979      if (io_star_src.indexOf("0star") > -1 || io_star_src.indexOf("1star") > -1 || io_star_src.indexOf("2star") > -1 ||
980              io_star_src.indexOf("3star") > -1) {
981        io_star_pic.style.display = "none";
982      }
983    }
984
985    /*<editor-fold desc="Build Thumb Images">*/
986    /* build multiple thumb images */
987
988    /*</editor-fold>*/
989
990    /*<editor-fold desc="Set up Accessories">*/
991    /* Add Add To Cart Buttons */
992    let button_add = document.querySelector("#bookNowBtn");
993    var main_id = 0;
994    if(jQuery(".io_product_container .item_rentalid")){
995      main_id = jQuery(".io_product_container .item_rentalid").first().text();
996    }
997    /* if main item is dd but not pkg (linen code) */
998    if(jQuery(".io_acc_accessorydd").text()==1 && jQuery(".io_acc_ispackage").text()!=1){
999      /* if order is defined, then reorder here. */
1000      var acc_cls = jQuery('.io_product_accessories')
1001      acc_cls.hide();
1002      let pkg = document.querySelector(".io_product_acc_pkg");
1003      if(pkg==undefined){
1004        pkg = document.createElement("div");
1005        pkg.classList.add("io_product_acc_pkg");
1006        pkg.style.textAlign = "center";
1007        acc_cls.after(pkg);
1008      }
1009      for (let [key, value] of acc_obj_relate) {
1010        elem = getAccElem(key,main_id);
1011        if(elem){
1012          btn = makeAccBtn(elem,main_id);
1013          pkg.append(btn);
1014        }
1015
1016      }
1017      let line = document.createElement("div");
1018      line.innerHTML = "<br>";
1019      pkg.append(line.cloneNode(true));
1020      for (let [key, value] of acc_obj_relate) {
1021        for (key2 in acc_obj_relate.get(key)) {
1022          if(Object.keys(value[key2]).length > 0){
1023            /* 3rd level */
1024            pkg.append(line.cloneNode(true));
1025            for (key3 in acc_obj_relate.get(key)[key2]) {
1026              elem = getAccElem(key3,key2);
1027              if(elem){
1028                btn = makeAccBtn(elem,key2);
1029                btn.style.display = "none";
1030                pkg.append(btn);
1031              }
1032            }
1033          }else{
1034            elem = getAccElem(key2,key);
1035            if(elem){
1036              btn = makeAccBtn(elem,key);
1037              btn.style.display = "none";
1038              pkg.append(btn);
1039            }
1040
1041          }
1042        }
1043      }
1044    }else {
1045      let access_array = document.querySelectorAll(".io_acc_li");
1046      let count = 0;
1047      for (let i of access_array) {
1048        let path = i.id.replace("io_acc_","");
1049        count++;
1050        let newButton = button_add.cloneNode(true);
1051        newButton.id = button_add.id + count;
1052        newButton.classList.remove("elementor-animation-grow");
1053        newButton.classList.add("elementor-animation-shrink");
1054
1055        let path_arr = path.split("_");
1056        let pid = parseInt(path_arr[0]);
1057        let this_id = parseInt(path_arr[1]);
1058        if(path_arr.length==1) pid=0;
1059
1060        if(jQuery("#io_acc_accessorydd_"+path).first().text()==1){
1061          /* display different to provide choices in dd */
1062          //main_id = pid;
1063        }else{
1064          /* hide accessories inside a pkg when under an accessory choice item until clicked */
1065          if(jQuery("#io_acc_accessorydd_"+main_id+"_"+pid).first().text()==1){
1066          }else{
1067            /* jpa - not finished/tested yet */
1068            /*jQuery("#io_acc_"+path).hide();*/
1069          }
1070          /* Fix broken images for accessories. */
1071          let img_box = document.querySelectorAll(".io_acc_li_img_thumb");
1072          let firstImg = true;
1073          let lastAcc = "";
1074          for (let i of img_box) {
1075            if(lastAcc=="") lastAcc = i.id;
1076            if(lastAcc!=i.id){
1077              lastAcc = i.id;
1078              firstImg = true;
1079            }
1080            let io_img_src = i.src;
1081            if(io_img_src!==null) io_img_src = io_img_src.toLowerCase();
1082            let io_img_datasrc = i.getAttribute("data-src");
1083            if(io_img_datasrc===null){
1084              io_img_datasrc = "";
1085            }else{
1086              io_img_datasrc = io_img_datasrc.toLowerCase();
1087            }
1088            if ((io_img_src.indexOf("io_noimage.png") >= 0 || io_img_datasrc.indexOf("io_noimage.png") >= 0) || (io_img_src.indexOf(".jpg") == -1 && io_img_src.indexOf(".jpe") == -1 && io_img_src.indexOf(".png") == -1 && io_img_src.indexOf(".gif") == -1 && io_img_src.indexOf(".tif") == -1 && io_img_src.indexOf(".webp") == -1)){
1089              i.style.display = "none";
1090            }else if(!firstImg && jQuery("#io_acc_accessorydd_"+main_id+"_"+pid).first().text()!=1){
1091              i.style.display = "none";
1092            }
1093            firstImg = false;
1094          }
1095          if(jQuery("#io_acc_accessorydd_"+main_id+"_"+pid).first().text()==1){
1096            /* Make the accessory category look more mike a label. */
1097            jQuery("#iothumb_"+main_id+"_"+pid).hide();
1098            jQuery("#io_acc_"+main_id+"_"+pid).css("border", "none");
1099            jQuery("#io_acc_"+main_id+"_"+pid).css("width", "100%");
1100            jQuery("#io_acc_"+main_id+"_"+pid).css("margin-bottom", "5vh");
1101            jQuery("#io_acc_"+main_id+"_"+pid).css("box-shadow", "none");
1102            jQuery("#io_acc_shortname_"+pid).css("font-weight", "bold");
1103            jQuery("#io_acc_shortname_"+pid).css("position", "absolute");
1104            /* Make this auto selected to fix an issue where we can not add to cart if this item is
1105                           a child of another hidden accessory on screen */
1106            jQuery("#io_acc_"+main_id+"_"+pid).prop("selected", true);
1107            accessory_cat_text = jQuery("#io_acc_shortname_"+pid).first().text();
1108            /* This is necessary to make sure there are not multiple colons. */
1109            if(!accessory_cat_text.includes(":")){
1110              jQuery("#io_acc_shortname_"+pid).text(accessory_cat_text+":");
1111            }
1112            /* Remove Href so we do not open images on click for dd accessories. */
1113            jQuery("[id^=io_acc_imgbig_"+pid+"_]").removeAttr("href");
1114
1115            /* Get the accessory limit for this set of acessories, then set up click events. */
1116            /* Unbind is used to prevent cascading calls. */
1117            accLmt = parseInt(jQuery("#io_acc_accessorylimit_"+main_id+"_"+pid).prop("textContent"));
1118            jQuery("[id^=io_acc_"+pid+"_]").unbind("click").click({pid: pid, accLmt: accLmt}, accDDClicked);
1119            jQuery("[id^=io_acc_"+pid+"_]").css("cursor", "pointer");
1120            /* Set up the slected property of all children accessories. Default to false. */
1121            jQuery("[id^=io_acc_"+pid+"_]").prop("selected", false);
1122            /* We need to add a hidden button so we can simulate a click on add_item for the cart. */
1123            let newButton = button_add.cloneNode(true);
1124            newButton.id = button_add.id + count;
1125            newButton.classList.remove("elementor-animation-grow");
1126            newButton.setAttribute("style", "display: none !important");
1127            i.appendChild(newButton);
1128          }else{
1129            let button_wrap = document.createElement("div");
1130            button_wrap.classList.add("elementor-widget-button");
1131            button_wrap.classList.add("io_access_button");
1132            button_wrap.appendChild(newButton);
1133            let req = false;
1134            if(jQuery("#io_acc_required_"+path).first().text()>0) req = true;
1135            if(!req){
1136              i.appendChild(button_wrap);
1137            }else{
1138              var textnode = document.createTextNode("Included");
1139              i.appendChild(textnode);
1140            }
1141          }
1142        }
1143      }
1144    }
1145    /*</editor-fold>*/
1146
1147    let upsell_array = document.querySelectorAll(".io_upsell_li");
1148    count = 0;
1149    for (let i of upsell_array) {
1150      count++;
1151      let newButton = button_add.cloneNode(true);
1152      newButton.id = button_add.id + count;
1153      newButton.classList.remove("elementor-animation-grow");
1154      newButton.classList.add("elementor-animation-shrink");
1155
1156      let button_wrap = document.createElement("div");
1157      button_wrap.classList.add("elementor-widget-button");
1158      button_wrap.classList.add("io_upsell_button");
1159      button_wrap.appendChild(newButton);
1160      i.appendChild(button_wrap);
1161    }
1162
1163    if(io_deliverymethod == "on" && jQuery(".calDeliveryMethodLabel").length==0){
1164      let delivery_method_container = jQuery("#ioDeliveryMethodContainer").first();
1165      delivery_method_container.append('<span class="calDeliveryMethodLabel">Select Delivery Method</span>');
1166      let delivery_method_html = '<select class="ioDeliveryMethods" onchange="deliveryMethodSelected()">';
1167      let delivery_methods = Object.keys(io_delivery_methods)
1168      for(const index in delivery_methods){
1169        if(!io_delivery_methods_restrict){
1170          delivery_method_html += '<option value="'+delivery_methods[index]+'">'+delivery_methods[index]+'</option>';
1171          if(index == 0 && !getCookie("io_delivery_method")) setCookie("io_delivery_method", delivery_methods[index], 14);
1172        }else if( !io_delivery_methods_restrict.includes( io_delivery_methods[ delivery_methods[index] ]["id"] ) ){
1173          delivery_method_html += '<option value="'+delivery_methods[index]+'">'+delivery_methods[index]+'</option>';
1174          if(index == 0 && !getCookie("io_delivery_method")) setCookie("io_delivery_method", delivery_methods[index], 14);
1175        }
1176      }
1177      delivery_method_container.append(delivery_method_html);
1178      delivery_method_container.show();
1179      if(getCookie("io_delivery_method")){
1180        jQuery(".ioDeliveryMethods").val(getCookie("io_delivery_method"));
1181      }
1182    }else{
1183      setCookie("io_delivery_method", "", 14);
1184    }
1185
1186    let allow_same_day = 1;
1187    if(io_cartAllowSameDay == "on"){
1188      allow_same_day = 0;
1189    }
1190
1191    /*<editor-fold desc="Cart Calandar and Time Settings Setup">*/
1192    //var fullmonth_array = jQuery.datepicker.regional["en"].monthNames;
1193    jQuery("#cartCalendar").datepicker({
1194      changeMonth: true,
1195      changeYear: true,
1196      //monthNamesShort : fullmonth_array,
1197      dateFormat: dateFormat,
1198      rangeSelect: true,
1199      numberOfMonths: 1,
1200      stepMonths: 1,
1201      prevText: "<< Previous Months",
1202      nextText: "Next Months >>",
1203      speed: "fast",
1204      showOn: "both",
1205      onChangeMonthYear: cal_onChangeMonthYear,
1206      onSelect: cal_onSelect,
1207      buttonText: "Calendar",
1208      minDate: allow_same_day,
1209      firstDay: 0
1210    });
1211    jQuery(".ui-datepicker-trigger").hide();
1212    if(restrictTimes){
1213      jQuery(".timepicker").timepicker({
1214        startTime: new Date(0, 0, 10, 0, 0, 0),
1215        endTime: new Date(0, 0, 0, 20, 0, 0, 0),
1216        minTime:restrictTimeStart,
1217        maxTime:restrictTimeEnd,
1218        /*show24Hours: $show24Hours,*/
1219        timeFormat: timeFormat,
1220        separator: ":",
1221        className: "elementor-widget-text-editor",
1222        step: 15,
1223        disableTouchKeyboard: true
1224      }).keypress(function(e){
1225        e.preventDefault();
1226      });
1227    } else{
1228      jQuery(".timepicker").timepicker({
1229        startTime: new Date(0, 0, 10, 0, 0, 0),
1230        endTime: new Date(0, 0, 0, 20, 0, 0, 0),
1231        /*show24Hours: $show24Hours,*/
1232        timeFormat: timeFormat,
1233        separator: ":",
1234        className: "elementor-widget-text-editor",
1235        step: 15,
1236        disableTouchKeyboard: true
1237      });
1238    }
1239
1240    /* if we have company wide timeslots, alter time select in cart. Do this only if we are set to single day only */
1241    if(io_company_timeslots.length != 0 && io_cartdayselect == "single_day"){
1242      let time_select_container = jQuery("#ioCartTimeSelectContainer").first();
1243      time_select_container.empty();
1244      let selected_date_html = '<span style="margin-right: 5px !important" class="calTimeLabel">Date</span><i class="fas fa-calendar-check"></i><input style="margin-left: 5px !important" type="text" name="dateStart" class="ioCartDateInput" readonly="readonly" /><input style="display: none !important" type="text" name="dateEnd" class="ioCartDateInput" readonly="readonly" />'
1245      time_select_container.append(selected_date_html);
1246      time_select_container.append("<br>")
1247      time_select_container.append('<span class="calTimeLabel">Select Timeslot</span>');
1248      let timeslot_html = '<select class="ioCartCompanyTimeslots">';
1249      for(i=0; i<io_company_timeslots.length; ++i){
1250        timeslot_html += io_company_timeslots[i];
1251      }
1252      timeslot_html += "</select>"
1253      time_select_container.append(timeslot_html);
1254
1255    }
1256
1257    // Timeslot element on Quote Form
1258    const timeslotSelectElement = jQuery(".controls select[name=timeslot]");
1259
1260    /* jQuery( ".datepicker" ).datepicker({dateFormat: "m/d/yy",minDate:0}); */
1261    /* jQuery( ".datepicker" ).val(getCookie("checkDate")); */
1262    start_date = getCookie("io_dateStart");
1263    end_date = getCookie("io_dateEnd");
1264    start_time = getCookie("io_timeStart");
1265    end_time = getCookie("io_timeEnd");
1266    jQuery("input[name=dateStart]").val(start_date);
1267    jQuery("input[name=dateEnd]").val(end_date);
1268    if(io_company_timeslots.length != 0 && io_cartdayselect == "single_day" && getCookie("io_company_timeslot_selected")){
1269      jQuery(".ioCartCompanyTimeslots").val(getCookie("company_timeslot_selected"));
1270      // Set it on the quote page too.
1271      timeslotSelectElement.val(getCookie("io_company_timeslot_selected"));
1272    } else{
1273      jQuery("input[name=timeStart]").val(start_time);
1274      jQuery("input[name=timeEnd]").val(end_time);
1275    }
1276
1277    timeslotSelectElement.on('change', function() {
1278      // IO-31167: Upon timeslot change on Quote Form,
1279      // update timeslot cookie value for persistence
1280      if(this.value) {
1281        setCookie('io_company_timeslot_selected', this.value, 14);
1282      }
1283    });
1284
1285    if (jQuery("input[name=dateEnd]").val() != "") {
1286      setCalBackground();
1287      jQuery("#cartSubtotal").html(simpleCart.toCurrency(simpleCart.total()));
1288      if(getCookie("io_dateApplied") === "true") calCancel();
1289      else {
1290        jQuery("input[name=dateStart]").val(getCookie("io_dateStart"));
1291        jQuery("input[name=dateEnd]").val(getCookie("io_dateEnd"));
1292        if(io_company_timeslots.length != 0 && io_cartdayselect == "single_day" && getCookie("io_company_timeslot_selected")){
1293          jQuery(".ioCartCompanyTimeslots").val(getCookie("io_company_timeslot_selected"));
1294        }
1295        else if(io_force_blank_timepickers == "on")
1296        {
1297          setCookie("io_timeStart", "", 14);
1298          setCookie("io_timeEnd", "", 14);
1299          jQuery('[name=timeStart]').val("");
1300          jQuery('[name=timeEnd]').val("");
1301        }
1302        else{
1303          jQuery("input[name=timeStart]").val(getCookie("io_timeStart"));
1304          jQuery("input[name=timeEnd]").val(getCookie("io_timeEnd"));
1305        }
1306
1307        jQuery(".changeDateLinkWrapper").hide();
1308      }
1309    }
1310    /*</editor-fold>*/
1311
1312    jQuery("#io-dialog").dialog({
1313      autoOpen: false,
1314      resizable: false,
1315      modal: true,
1316      dialogClass: "noTitleStuff",
1317      width: 350,
1318      open: function () {
1319        jQuery(".ui-widget-overlay").bind("click", function () {
1320          jQuery("#io-dialog").dialog("close");
1321        })
1322      }
1323    });
1324
1325    /* change jquery calendar next/prev buttons to fa arrows w/matching site color */
1326    jQuery("#cartCalendar .ui-datepicker-prev").addClass("fas fa-arrow-left").css("color", pallet_color1);
1327    jQuery("#cartCalendar .ui-datepicker-next").addClass("fas fa-arrow-right").css("color", pallet_color1);
1328
1329    /* hide sections if not set */
1330    if(jQuery(".io_product_circuits_right").first().text()=="0"){jQuery(".io_product_circuits_right,.io_product_circuits_left").hide();}
1331    if(jQuery(".io_city_list").html()==""){jQuery(".io_landingpages").hide();}
1332    /* using this instead as it will handle custom ones added */
1333    let io_field_valbox = document.querySelector(".io_product_infobox");
1334    if (io_field_valbox != null || io_field_valbox != undefined) {
1335      let io_field_valarr = io_field_valbox.querySelectorAll(".io_product_detail_box");
1336      for (let i of io_field_valarr) {
1337        let check = i.querySelector("p:nth-child(2)");
1338        if (check != null && check.innerText == "") i.style.display = "none";
1339      }
1340    }
1341
1342    /* Hide description if there is no description */
1343    desc_box = document.querySelector(".io_product_desc")
1344    if(desc_box != null && desc_box.innerText.length == 0 && desc_box.innerHTML.length == 0){
1345      desc_detail_box = desc_box.parentElement;
1346      desc_detail_box.style.display = "none";
1347    }
1348
1349    if(document.querySelector(".io_product_reviewbox")!=null){
1350      if (document.querySelector(".io_product_reviewbox").innerText == "") {
1351        if(document.querySelector(".io_star_rating")!=null) document.querySelector(".io_star_rating a").style.display = "none";
1352      }
1353    }
1354
1355    let rid = jQuery(".io_product_container .item_rentalid").first().text();
1356    let regex = new RegExp("^io_product_price_.*_" + rid + "$");
1357    for (const price_index in io_prices){
1358      if(regex.test(io_prices[price_index])){
1359        use_weekday_weekend = false;
1360      }
1361    }
1362
1363    /* hide end date input. */
1364    if(!multi_day){
1365      /* TODO: Need to wait and see if this is necessary. If so needs to be more involved than this. */
1366      /* jQuery("input[name=dateEnd]").style("visibility", "hidden"); */
1367    }
1368    /* Call page avail now so we can display live price if its enabled */
1369    setTimeout(function(){
1370      if(jQuery(".io_acc_accessorydd").text()==1 && jQuery(".io_acc_ispackage").text()!=1){
1371        jQuery("#bookNowBtn").removeClass("item_add").addClass("item_add_off").trigger("classChange");
1372        checkAvailPageOnly();
1373      }else{
1374        checkAvailPageOnly();
1375      }
1376    },50);
1377
1378    /* Adjust picbox for header heights */
1379    setTimeout(adjustPicBoxForHeader,500);
1380
1381    /* Show buttons for distance charge check if the setting is on. Hide or show map button if applicable*/
1382    if(io_distance_charge){
1383      jQuery(".delivery_charge_check_container").show();
1384      jQuery(".calc_price_with_map_container").hide();
1385      jQuery(".checkDeliveryCartContainer").show();
1386    } else {
1387      jQuery(".delivery_charge_check_container").hide();
1388      jQuery(".calc_price_with_map_container").hide();
1389      jQuery(".checkDeliveryCartContainer").hide();
1390    }
1391    if(io_brand=="EH"){
1392      jQuery(".delivery_charge_check_container").hide();
1393      jQuery(".eh_additional_description").show();
1394    }
1395    if(jQuery(".io_product_infobox .item_inputtype").text() === "Map"){
1396      jQuery(".delivery_charge_check_container").hide();
1397      jQuery(".checkDeliveryCartContainer").hide();
1398      jQuery(".calc_price_with_map_container").show();
1399    }
1400
1401    /* If we have delivery set in cookie, be sure to show the charge in the cart. */
1402    if(getCookie("io_deliveryFee") && simpleCart.items().length > 0) {
1403      setDeliverySubtotal(getCookie("io_deliveryFee"));
1404      jQuery("#deliverSubtotalContainer").show();
1405      jQuery("#checkDeliveryMessage").hide();
1406    } else{
1407      jQuery("#deliverSubtotalContainer").hide();
1408    }
1409
1410    /* moved back here for IO-22561 */
1411    if(simpleCart.items().length > 0){
1412      let headerBookButton = jQuery("a[href$='io_quoteform/']");
1413      headerBookButton.addClass("ioCart_link");
1414      headerBookButton.attr("href", "javascript:;");
1415    }
1416    jQuery(".cartInfo").unbind("click").one("click", function(event){
1417      event.stopPropagation();
1418      event.stopImmediatePropagation();
1419      cartShow();
1420    });
1421    jQuery(".ioCart,.ioCart_link").unbind("click").one("click", function(event){
1422      event.stopPropagation();
1423      event.stopImmediatePropagation();
1424      cartShow();
1425    });
1426
1427    /* hide if click outside cart */
1428    jQuery(document).mouseup(function(e){
1429      var container = jQuery("#cartPopover");
1430      var cartButton = jQuery(".cartInfo, .ioCart, .ioCart_link");
1431      var addButton = jQuery(".item_add");
1432      var timePicker = jQuery(".ui-timepicker-wrapper");
1433
1434      if(jQuery(".cartInfo, .ioCart, .ioCart_link").hasClass("open")){
1435        if(!container.is(e.target) && container.has(e.target).length === 0 && !cartButton.is(e.target) && cartButton.has(e.target).length === 0 && !addButton.is(e.target) &&  addButton.has(e.target).length === 0 && !timePicker.is(e.target) &&  timePicker.has(e.target).length === 0 && !jQuery(".address_entry").is(e.target) &&  jQuery(".address_entry").has(e.target).length === 0){
1436          cartHide();
1437        }
1438      }
1439    });
1440
1441    if(!getCookie("io_state") && io_default_state){
1442      setCookie("io_state", io_default_state, 14);
1443    }
1444    if(country != "US") {
1445      jQuery("#io_cd_state").replaceWith('<input id="io_cd_state" style="display: table-cell" name="state" type="text"></input>');
1446      jQuery("#io_cdl_zip_label").text("Postal code");
1447      if(country == "CA"){
1448        jQuery("#io_cdl_state_label").text("Province");
1449      } else if(country == "AU"){
1450        jQuery("#io_cdl_city_label").text("Suburb");
1451      }
1452    } else{
1453      jQuery("#io_cd_zip").attr("type", "number");
1454    }
1455    /* Set up on change events to stop end timepickers from allowing users to pick times before start time */
1456    setTimeout(restrictEndTimepickers, 500);
1457    if(io_hide_end_time == "on" && io_default_duration > 0){
1458      jQuery('[name="timeEnd"]').parent().hide();
1459      // Hide end time stuff on checkout page and in the text.
1460      jQuery(".io_event_body_time .control-group:nth-child(2)").hide();
1461      jQuery(".io_event_body_time_display_text").text(jQuery(".io_event_body_time_display_text").text().replace(/\s*→.*/, ""))
1462      jQuery('[name="timeStart"]').change(function(){
1463        const regex = /^(\d{1,2}):(\d{2})(?:\s*([AP]M))?$/i;
1464        const match = this.value.match(regex);
1465
1466        let hours = parseInt(match[1], 10);
1467        const minutes = parseInt(match[2], 10);
1468        const period = match[3] ? match[3].toUpperCase() : null;
1469
1470        if (period) {
1471          if (period === "PM" && hours !== 12) hours += 12;
1472          if (period === "AM" && hours === 12) hours = 0;
1473        }
1474
1475        const baseDate = new Date(1970, 0, 1, hours, minutes);
1476        const newTime = new Date(baseDate.getTime() + io_default_duration * 3600000);
1477
1478        if (period) {
1479          // 12-hour
1480          let newHours = newTime.getHours();
1481          const newMinutes = newTime.getMinutes();
1482          const newPeriod = newHours >= 12 ? "PM" : "AM";
1483          newHours = newHours % 12;
1484          if (newHours === 0) newHours = 12;
1485          let end_time = `${newHours}:${newMinutes.toString().padStart(2, "0")} ${newPeriod}`;
1486          jQuery('[name="timeEnd"]').val(end_time);
1487        } else {
1488          // 24 hour
1489          let end_time = `${newTime.getHours().toString().padStart(2, "0")}:${newTime.getMinutes().toString().padStart(2, "0")}`;
1490          jQuery('[name="timeEnd"]').val(end_time);
1491        }
1492      });
1493    }
1494
1495    /* If we have a custom message in cart, display it. */
1496    if(io_cart_message){
1497      show_cart_message();
1498    }
1499
1500    /* code for day select in cart */
1501    if(io_cartdayselect == "dropdown_options" && io_multidayquote === "on"){
1502      saved_whatday = getCookie("io_whatday");
1503      if(saved_whatday) jQuery("#whatday").val(saved_whatday);
1504      endDisplay();
1505      setCalBackground();
1506    } else{
1507      jQuery("#div-overnight").hide();
1508      jQuery("#whatday").val("");
1509    }
1510
1511    checkRestrictedDeliveries()
1512    /* If we are using the information gathering tool, we do not want to show this message. */
1513    if( live_pricing_is_on() && io_info_required == "off" ){
1514      if(!event_time_set() && io_always_display_live_price != "on"){
1515        jQuery("#item_live_price_time_set_message").show();
1516      }else{
1517        jQuery("#item_live_price_time_set_message").hide();
1518      }
1519    }
1520
1521
1522    /* Check if information gathering header exists. If it does, Remove set even button and add some classes on onclicks */
1523    if(jQuery("#ioInfoHeader").length){
1524      remove_set_event_buttton();
1525      add_classes_and_onClicks();
1526      header_increment_step();
1527    }
1528
1529    jQuery(".io_acc_li").each(function() {
1530      if(jQuery(this).find(".item_required").first().text() > 0 && jQuery(this).find(".item_accessorydd").first().text() == 1){
1531        jQuery(jQuery(jQuery(this).parent()).prev()).appendTo(".io_product_requiredDD_accessories");
1532        jQuery(jQuery(this).parent()).appendTo(".io_product_requiredDD_accessories");
1533        jQuery(".io_product_requiredDD_accessories").show();
1534      }
1535    });
1536
1537    if(jQuery(".io_product_accessories .io_acc_li").length == 0) jQuery(".io_product_accessories").hide();
1538
1539    /* Hide the cart add button for items with required accessories on category page */
1540    jQuery(".item_hasRequiredAcc").each(function() {
1541      if (this.innerText == '1') {
1542        let rental_id_element = jQuery(this).parent().find(".item_rentalid")[0];
1543        let addCartButton = jQuery(".io_item2_list_inner .add_cart_" + rental_id_element.innerText).find('.io_button');
1544        addCartButton.removeClass("item_add");
1545        addCartButton.html('<i class="fas fa-arrow-right"></i>');
1546
1547        let itemHref = jQuery(this).parent().find(".item_href").text();
1548        addCartButton.attr('href', itemHref);
1549      }
1550    });
1551
1552
1553    /* If they have same day selection allowed, need to update checkout page datepicker on delay to make sure it works */
1554    if(io_cartAllowSameDay == "on"){
1555      setTimeout(allow_same_day_select_on_checkout, 500);
1556    }
1557
1558    if(io_info_required_data && io_info_required == "on"){
1559      let io_required_data = io_info_required_data;
1560      jQuery("#ioAdditonalInformationContainer").show();
1561      for (const [data, value] of Object.entries(io_required_data)) {
1562        if(value == 1){
1563          jQuery("#io_info_modal_"+data).css("display", "inline-flex")
1564          jQuery("#io_im_"+data).val(getCookie(data));
1565        }
1566      }
1567      show_or_hide_required_info_message()
1568    }
1569    if(jQuery(".bootstrap-timepicker").length == 0) {
1570      if (!/Mobi|Android/i.test(navigator.userAgent)) {
1571        jQuery("#cartPopover").scroll(function () {
1572          jQuery("[name=timeStart]").timepicker("hide");
1573          jQuery("[name=timeEnd]").timepicker("hide");
1574        });
1575        jQuery(window).scroll(function () {
1576          jQuery("#cartPopover [name=timeStart]").timepicker("hide");
1577          jQuery("#cartPopover [name=timeEnd]").timepicker("hide");
1578        });
1579      }
1580    }
1581
1582    if(jQuery(".io_product_infobox .item_inputtype").text() == "Map"){
1583      simpleCart.items().forEach(function (item, index){
1584        if(item.get("rentalid") === jQuery(".io_product_infobox .item_rentalid").text()){
1585          if(item.get("quantity") > 1){
1586            let units;
1587            if(jQuery(".io_product_infobox .item_qtytype").text() == "Area"){
1588              units = "sq meters"
1589              if(country === "US") units = "sq feet"
1590            }else if(jQuery(".io_product_infobox .item_qtytype").text() == "Perimeter"){
1591              units = "meters"
1592              if(country === "US") units = "feet"
1593            }
1594            set_price_on_item_page(units, item.get("quantity"));
1595          }
1596        }
1597      });
1598    }
1599    /* IO-21808 */
1600    jQuery(".io_product_price_box").each(function() {
1601      let classes = jQuery(this).attr("class");
1602      jQuery(this).attr("class", classes.replace(":", "_"));
1603    });
1604
1605    /* Set time instructions (IO-21496) */
1606    set_cart_time_instructions();
1607
1608    if(io_accessory_select === "on"){
1609      if(jQuery(".io_product_acc_pkg").children().length > 0){
1610        let main_rental_id = jQuery(".item_rentalid").text();
1611        let sel_div = jQuery("<div class=\"io_product_acc_pkg\" style=\"display:flex; margin-top:10px;\"></div>");
1612        let sel = jQuery("<select class=\"io_product_acc_pkg\" onchange=\"accOnClick(this)\" />");
1613        sel.append("<option value=\"\" selected=\"selected\" style=\"display:none\" disabled>Select one..</option>")
1614        jQuery("[id^=io_acc_shortname_"+main_rental_id+"]").each(function(){
1615          sel.append("<option value="+this.id+">"+this.innerHTML+"</option>")
1616          if(this.id.split("_").length > 4){
1617            let split_id = this.id.split("_");
1618            let option_rental_id = split_id[split_id.length - 1];
1619            let sel2 = jQuery("<select id=\"io_product_acc_pkg_sel_"+option_rental_id+"\" style=\"display:none; margin-left:5px;\" onchange=\"accOnClick(this)\" />");
1620            sel2.append("<option value=\"\" selected=\"selected\" style=\"display:none\" disabled>Select one..</option>")
1621            jQuery("[id^=io_acc_shortname_"+option_rental_id+"_]").each(function(){
1622              sel2.append("<option value="+this.id+">"+this.innerHTML+"</option>")
1623            });
1624            sel_div.append(sel2);
1625          }
1626        });
1627        sel_div.prepend(sel);
1628        jQuery(".io_product_acc_pkg").replaceWith(sel_div);
1629      }
1630    }
1631    if(io_cart_party_planner_email === "on" && io_cart_party_planner_destination){
1632      jQuery("#cartPartyBuilderEmailContainer").show()
1633      if(getCookie("io_email")){
1634        jQuery("#cartPartyBuilderEmailInput").val(getCookie("io_email"));
1635      }
1636    }
1637
1638    if(io_brand == "PW"){
1639      jQuery(".io_product_price_box").attr("style", "display: none !important;");
1640      jQuery(".io_product_price_sqfoot").attr("style", "display: grid !important;");
1641    }
1642
1643    setTimeout(simpleCart.init, 100);
1644    if(io_hide_zero == 1){
1645      jQuery(".io_product_price_top_left").each(function (){
1646        if(Number(this.innerText.replace(/[^0-9.-]+/g,"")) == 0){
1647          jQuery(this).parent().attr('style','display:none !important');
1648        }
1649      });
1650      jQuery(".io_product_price_left").each(function (){
1651        if(Number(this.innerText.replace(/[^0-9.-]+/g,"")) == 0){
1652          jQuery(this).parent().attr('style','display:none !important');
1653        }
1654      });
1655    }
1656      if (io_categoryVariantImages == 'on'){
1657          jQuery(".io_category_thumbox").show();
1658          jQuery('.view-product-button').addClass('view-product-button2')
1659      }
1660    let giftcard_value = jQuery(".item_giftcardvalue");
1661    if(giftcard_value && giftcard_value.text()){
1662      jQuery(".delivery_charge_check_container").hide();
1663    }
1664
1665    if (io_customer_geolocation == 'on') initializeGeolocation();
1666  }); /*end of on-ready*/
1667  /*</editor-fold>*/
1668
1669  /*<editor-fold defaultstate="collapsed" desc="Helper Functions">*/
1670  function phraseUpdateCount(inputElement)
1671  {
1672  //read the text and strip out spaces
1673    const fullText = inputElement.value;
1674    const lettersOnly  = fullText.replace(/\s+/g, "");
1675    const count = lettersOnly.length;
1676
1677    const cookieKey = inputElement.classList[0];
1678
1679    document.querySelector(".item_quantity").textContent = count;
1680
1681    setCookie(cookieKey, fullText, 45);
1682  }
1683  function io_party_planner_email_submit(){
1684    let valid_regex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
1685    let email = jQuery("#cartPartyBuilderEmailInput").val();
1686    if(email){
1687      if(email.match(valid_regex)){
1688        setCookie("io_email", email, 14);
1689        window.open(io_cart_party_planner_destination, '_blank').focus();
1690      }else{
1691        jQuery("#cartPartyBuilderEmailWarning").show();
1692      }
1693    }else{
1694      jQuery("#cartPartyBuilderEmailWarning").show();
1695    }
1696  }
1697
1698  function rid_in_batch(rid, batch_ids){
1699    let result = batch_ids.filter(function(batch){
1700      if(batch.includes(this)) return true;
1701    }, rid);
1702    return result
1703  }
1704
1705  function set_cart_time_instructions(){
1706    /* Making it clearer that customers need to set the time in order to see pricing and availability. */
1707    let instructions_container = jQuery("<p id=\"ioCartTimeInstructions\"></p>");
1708    let instructions = "";
1709
1710    if(multi_day){
1711      instructions += "Select the event date or date range using the calendar";
1712    }else{
1713      instructions += "Select the event date using the calendar";
1714    }
1715    instructions += ".";
1716    instructions_container.text(instructions);
1717    jQuery("#cartCalendar").append(instructions_container);
1718  }
1719
1720  function live_pricing_is_on(){
1721    /*
1722    Checks to see if live pricing is on. Assumes it is on unless one of the following conditions:
1723       The setting Hide Live Price is off.
1724       The setting Show Weekend/Weekday Pricing is off.
1725       Delivery method pricing is enabled by default.
1726       We are on an item page that uses delivery method pricing.
1727    */
1728    if(io_hide_live_prices != 1 || io_weekEndPrice != "on" ||
1729            io_delivery_prices["default"].length != 0 || jQuery(".io_product_infobox .item_rentalid").innerText in io_delivery_prices["override"] ||
1730            io_custom_prices["default"].length != 0 || jQuery(".io_product_infobox .item_rentalid").innerText in io_delivery_prices["override"]){
1731      return false;
1732    }
1733    return true;
1734  }
1735
1736  function allow_same_day_select_on_checkout(){
1737    jQuery(".jquery-datepicker").datepicker("option", "minDate", 0);
1738  }
1739
1740  function show_or_hide_required_info_message(){
1741    if(io_info_required == "on"){
1742      if(!all_info_provided()){
1743        jQuery("#io_all_prices").hide();
1744        jQuery("#item_additonal_info_open_message").show();
1745      }else{
1746        jQuery("#io_all_prices").show();
1747        jQuery("#item_additonal_info_open_message").hide();
1748      }
1749    }
1750  }
1751
1752  function all_info_provided(){
1753    /* This is used for when the "Hide all pricing on page until information is provided" setting is on price settings. */
1754    let all_data_provided = true;
1755    let io_required_data = io_info_required_data;
1756    for (const [data, value] of Object.entries(io_required_data)) {
1757      if(value == 1){
1758        if(!getCookie(data)){
1759          all_data_provided = false
1760        }
1761      }
1762    }
1763
1764    if(live_pricing_is_on() && !event_time_set()) {
1765      all_data_provided = false;
1766    }
1767
1768    return all_data_provided;
1769  }
1770
1771  function event_time_set(){
1772    if(getCookie("io_timeStart") &&
1773            getCookie("io_timeEnd") &&
1774            getCookie("io_dateStart") &&
1775            getCookie("io_dateEnd")){
1776      return true;
1777    } else{
1778      return false
1779    }
1780  }
1781
1782  function show_cart_message(){
1783    message_container = jQuery("#cartCustomMessage");
1784    message_container.html(io_cart_message);
1785    message_container.show();
1786  }
1787
1788  function deliveryMethodSelected(){
1789    setCookie("io_delivery_method", jQuery(".ioDeliveryMethods option:selected").text(), 14);
1790    checkRestrictedDeliveries();
1791  }
1792
1793  function adjustPicBoxForHeader(){
1794    /* For some reason its hard to get css with querySelector so we use jQuery to get the picbox. */
1795    pic_box = jQuery(".io_product_picbox");
1796    io_header = document.querySelector(".io_header");
1797    if(pic_box != null && pic_box.css("position") == "sticky"){
1798      if(io_header != null){
1799        header_height = io_header.offsetHeight;
1800        pic_box.css("top", (10+header_height).toString()+"px");
1801      }
1802      else{
1803        possible_headers = document.querySelectorAll("header,section")
1804        possible_headers.forEach((ele) =>{
1805          if(ele.style.top == "0px" && (ele.style.position == "fixed" || ele.style.position == "sticky")){
1806            header = ele;
1807            header_height = header.offsetHeight;
1808            pic_box.css("top", (10+header_height).toString()+"px");
1809
1810          }
1811        });
1812      }
1813    }
1814  }
1815  function cart_times_all_set(){
1816    if(jQuery("#ioCartTimeSelectContainer [name=dateStart]").val() == ""){
1817      return false;
1818    }
1819    if(io_hidetimes === "off" || io_hidetimes === ""){
1820      if(jQuery("#ioCartTimeSelectContainer [name=timeStart]").val() == ""){
1821        return false;
1822      }
1823      if(jQuery("#ioCartTimeSelectContainer [name=timeEnd]").val() == ""){
1824        return false;
1825      }
1826    }
1827
1828    return true;
1829  }
1830  function checkRestrictedDeliveries(){
1831    let items = simpleCart.items()
1832    let restrictions_found = false;
1833    for(i in items){
1834      let rid = items[i].get("rentalid");
1835      if(typeof jQuery(".ioDeliveryMethods").val() != "undefined"){
1836        if(io_delivery_methods[jQuery(".ioDeliveryMethods").val()]["restricted"].includes(rid)){
1837          jQuery("#deliveryMethodWarning").show();
1838          restrictions_found = true;
1839        }
1840      }
1841    }
1842    if(!restrictions_found){
1843      jQuery("#deliveryMethodWarning").hide();
1844    }
1845  }
1846
1847  function display_cart_warning(item){
1848    let cart_warning_container = jQuery("#cartWarning");
1849
1850    // Check if an event date if not we should tell them to set it.
1851    event_times = getAvailTimes();
1852    if(!event_times[0] || !event_times[1]){
1853      cart_warning_container.text("Please set the date and time for your event above.");
1854      cart_warning_container.show();
1855      return false;
1856    }
1857
1858    let item_name = item.get("name");
1859    let item_timeslots = item.get("timeslots");
1860    let timeslot_name = getTimeslotName(item_timeslots);
1861
1862    let stop_loop = false;
1863    if(item_timeslots){
1864      if(jQuery(item_timeslots).nodeName == "SELECT"){
1865        /* NOTE: It should not be possible for timeslots to be empty.
1866                   But in the event they somehow are, we should have this here. */
1867        /* timeslots */
1868        var timeslot_sel_range = jQuery(".item-timeslots [name=\""+timeslot_name+"\"] option:selected").val();
1869        if(typeof timeslot_sel_range != "undefined"){
1870          var [start_time, end_time] = break_timeslot_sel_range(timeslot_sel_range);
1871        }
1872      }else{
1873        /*  timepickers */
1874        let [start_timepicker, end_timepicker] = get_cart_timepickers(timeslot_name);
1875        var start_time = start_timepicker.value;
1876        var end_time = end_timepicker.value;
1877      }
1878      if(!start_time || !end_time){
1879        cart_warning_container.text("Please select a time range for the following item: " + item_name);
1880        cart_warning_container.show()
1881        stop_loop = true;
1882      }
1883    } else{
1884      cart_warning_container.text("Some items are not available on this date.");
1885      cart_warning_container.show()
1886    }
1887    return stop_loop
1888  }
1889
1890  const io_personal_cookie_keys = ["io_email", "io_phone", "io_address", "io_city", "io_state", "io_zip"];
1891
1892  function ioHasMarketingConsent(){
1893    if(typeof cmplz_has_consent !== 'function'){
1894      return true;
1895    }
1896    return cmplz_has_consent('marketing');
1897  }
1898
1899  function ioUnwrapStoredValue(raw) {
1900      // Fully peel any {v,e} wrapper layers that may have accumulated when an
1901      // older plugin version re-saved an already-wrapped value (IO-36799). Cart
1902      // values (dates, times, addresses) are never JSON objects, so any layer
1903      // that parses to a {v,...} object is a wrapper to unwrap. Returns
1904      // { value, expired, malformed } describing the innermost stored string.
1905      var value = (raw == null) ? "" : String(raw);
1906      for (var depth = 0; depth < 25; depth++) {
1907        var trimmed = value.trim();
1908        if (trimmed.charAt(0) !== '{') break;          // plain value -> done
1909        var obj;
1910        try {
1911          obj = JSON.parse(trimmed);
1912        } catch (e) {
1913          break;                                       // not parseable -> stop, keep value
1914        }
1915        if (!obj || typeof obj !== 'object' || !('v' in obj)) break;  // not our wrapper
1916        if (obj.e && Date.now() > obj.e) {
1917          return { value: "", expired: true, malformed: false };
1918        }
1919        value = (obj.v != null) ? String(obj.v) : "";
1920      }
1921      // Only flag as malformed if what remains still looks like our own broken
1922      // {"v":...} wrapper (e.g. truncated) -- never an ordinary value that just
1923      // happens to start with "{", which must be preserved untouched.
1924      var malformed = /^\s*\{\s*"v"\s*:/.test(value);
1925      return { value: value, expired: false, malformed: malformed };
1926  }
1927
1928  function setCookie(cname, cvalue, exdays) {
1929      if(io_personal_cookie_keys.indexOf(cname) !== -1 && !ioHasMarketingConsent()){
1930        return;
1931      }
1932      // Store values in localStorage with an io_ prefix for uniqueness and emulate expiration
1933      try {
1934        // Unwrap first so an already-wrapped value can never be re-wrapped and
1935        // compound into nested {v,e} layers (IO-36799).
1936        var clean = ioUnwrapStoredValue(cvalue).value;
1937        var expiresAt = (typeof exdays === 'number' && exdays > 0)
1938          ? Date.now() + (exdays * 24 * 60 * 60 * 1000)
1939          : null;
1940        var payload = JSON.stringify({ v: clean, e: expiresAt });
1941        window.localStorage.setItem(cname, payload);
1942      } catch (e) {
1943        // Swallow errors to keep behavior similar to cookie writes silently failing
1944        console.log(e);
1945      }
1946  }
1947
1948  function getCookie(cname) {
1949    // Read values from localStorage honoring expiration; return empty string if missing/expired
1950    try {
1951      var raw = window.localStorage.getItem(cname);
1952      if (!raw) return "";
1953      var result = ioUnwrapStoredValue(raw);
1954      if (result.expired || result.malformed) {
1955        // Drop expired or corrupted entries so they self-heal instead of being
1956        // rendered as raw JSON in the date/time fields (IO-36799).
1957        try { window.localStorage.removeItem(cname); } catch (e) {}
1958        return "";
1959      }
1960      return result.value;
1961    } catch (e) {
1962      return "";
1963    }
1964  }
1965  async function fetchAndSetCookie(name) {
1966    var requestInit = { credentials: "include" };
1967    fetch("https://rental.software/include/get_cookie.php?name=" + name, requestInit).then(function (response) {
1968      return response.json();
1969    }).then(function (response) {
1970      return handleResponse(name, response);
1971    });
1972  }
1973
1974  function handleResponse(name, response) {
1975    var currentCookieValue = getCookie(name);
1976    if (!!response.value && currentCookieValue !== response.value) {
1977      setCookie(name, response.value, 14);
1978    }
1979    return response.value;
1980  }
1981
1982  function clearIoPersonalDataForNoConsent(){
1983    io_personal_cookie_keys.forEach(function(key){
1984      try {
1985        window.localStorage.removeItem(key);
1986      } catch (e) {
1987        console.log(e);
1988      }
1989    });
1990
1991    var trackingUrl = (window.location.href.indexOf("localhost") > -1)
1992      ? "http://localhost/io/bugs/include/iotracking.php"
1993      : "https://rental.software/include/iotracking.php";
1994    var clearImg = new Image();
1995    clearImg.src = trackingUrl + "?action=remove&nocache=" + Math.random();
1996  }
1997
1998  document.addEventListener("cmplz_status_change", function (e) {
1999    if (e.detail.category === 'marketing' && e.detail.value === 'deny') {
2000      clearIoPersonalDataForNoConsent();
2001    }
2002  });
2003
2004  function break_timeslot_sel_range(timeslot_sel_range){
2005    /* Takes a time range given by selected timeslot and gets the start and end time removing meridiem.*/
2006    timeslot_sel_arr = timeslot_sel_range.split(" - ");
2007    var start_time = timeslot_sel_arr[0].replace("am"," am").replace("pm"," pm").replace("  "," ");
2008    var end_time = timeslot_sel_arr[1].replace("am"," am").replace("pm"," pm").replace("  "," ");
2009
2010    return Array(start_time, end_time);
2011  }
2012  function getAvailTimes(){
2013    /*
2014    Commonly used helper function. Accomplishes two things:
2015      Returns an array containing start_date, start_time, and event duration.
2016      Sets cookies for start and end date, and start and end time.
2017
2018    Uses the inputs available in the cart if they are filled out, so dateStart, dateEnd, timeStart, and timeEnd.
2019    If timeslots are being used in cart it chooses the selected timeslot and breaks it on - and gets the start ane end time from that.
2020    */
2021    let start_date = jQuery("input[name=dateStart]").val();
2022    let end_date = jQuery("input[name=dateEnd]").val();
2023    if(io_company_timeslots.length != 0 && io_cartdayselect == "single_day"){
2024      let cart_company_timeslot_selected = jQuery(".ioCartCompanyTimeslots option:selected").first().val();
2025      if(cart_company_timeslot_selected){
2026        setCookie("io_company_timeslot_selected", cart_company_timeslot_selected, 14);
2027        cart_company_timeslot_selected = cart_company_timeslot_selected.split("-");
2028        var start_time = cart_company_timeslot_selected[0].trim();
2029        var end_time = cart_company_timeslot_selected[1].trim();
2030      }
2031    } else {
2032      var start_time = jQuery("input[name=timeStart]").val();
2033      var end_time = jQuery("input[name=timeEnd]").val();
2034    }
2035
2036    if (start_date.length == 0) {
2037      start_date = getCookie("io_dateStart");
2038      end_date = getCookie("io_dateEnd");
2039      start_time = getCookie("io_timeStart");
2040      end_time = getCookie("io_timeEnd");
2041    }
2042
2043    const has_selected_company_timeslot = io_company_timeslots.length != 0
2044      && io_cartdayselect == "single_day"
2045      && jQuery(".ioCartCompanyTimeslots option:selected").first().val();
2046
2047    if(io_hidetimes === "on"
2048      && io_force_blank_timepickers != "on"
2049      && !has_selected_company_timeslot) {
2050      start_time = start_default;
2051      end_time = end_default;
2052      jQuery("input[name=timeStart]").val(start_time);
2053      jQuery("input[name=timeEnd]").val(end_time);
2054    }
2055
2056    if(io_force_blank_timepickers != "on")
2057    {
2058      if(start_time.length == 0)
2059      {
2060        start_time = start_default;
2061      }
2062      if(end_time.length == 0)
2063      {
2064        end_time = end_default;
2065      }
2066    }
2067
2068
2069    /* no past dates */
2070    if(start_date.length != 0 && convertDateStringtoDateObject(start_date, start_time) < new Date()){
2071      start_date="";
2072      end_date="";
2073    }
2074    /* setCookie("checkDate", start_date, 14); */
2075    setCookie("io_dateStart", start_date, 14);
2076    setCookie("io_dateEnd", end_date, 14);
2077    setCookie("io_timeStart", start_time, 14);
2078    setCookie("io_timeEnd", end_time, 14);
2079    /* If we are using the information gathering tool, we do not want to show this message.*/
2080    if( live_pricing_is_on() && io_info_required == "off" ){
2081      if(!event_time_set() && io_always_display_live_price != "on"){
2082        jQuery("#item_live_price_time_set_message").show();
2083      }else{
2084        jQuery("#item_live_price_time_set_message").hide();
2085      }
2086    }
2087
2088    var newDate1 = convertDateStringtoDateObject(start_date, start_time);
2089    var newDate2 = convertDateStringtoDateObject(end_date, end_time);
2090    let time_duration = ((newDate2 - newDate1) / 3600) / 1000;
2091    return [start_date,start_time,time_duration];
2092  }
2093
2094  function  getAllRentalIDsFromCart(){
2095    let rental_ids = "";
2096    jQuery("[id^='cartItem_']").each(function(){
2097      children = this.children
2098      for(let i = 0; i < children.length; ++i){
2099        if(children[i].className == "item-rentalid") {
2100          rental_ids += children[i].innerText + "|";
2101          break;
2102        }
2103      }
2104    });
2105    return rental_ids
2106  }
2107  /*</editor-fold>*/
2108
2109  /*<editor-fold defaultstate="collapsed" desc="Info Header Functions">*/
2110  function init_date_timepicker_for_info_header(){
2111    jQuery(".ioInfoDatepicker").datepicker({
2112      changeMonth: true,
2113      changeYear: true,
2114      dateFormat: dateFormat,
2115      rangeSelect: true,
2116      numberOfMonths: 1,
2117      stepMonths: 1,
2118      speed: "fast",
2119      showOn: "both",
2120      onChangeMonthYear: cal_onChangeMonthYear,
2121      buttonText: "Calendar",
2122      minDate: 1,
2123      firstDay: 0
2124    });
2125    jQuery("#ioHeaderDateStart").datepicker("option", { onSelect: function() {
2126        set_info_header_end_date();
2127        saveInfoHeader();
2128        // Add more functions if needed
2129      }
2130    });
2131
2132    if(restrictTimes){
2133      jQuery(".ioInfoTimepicker").timepicker({
2134        startTime: new Date(0, 0, 10, 0, 0, 0),
2135        endTime: new Date(0, 0, 0, 20, 0, 0, 0),
2136        minTime:restrictTimeStart,
2137        maxTime:restrictTimeEnd,
2138        /*show24Hours: $show24Hours,*/
2139        timeFormat: timeFormat,
2140        separator: ":",
2141        className: "elementor-widget-text-editor",
2142        step: 15,
2143        disableTouchKeyboard: true
2144      });
2145    } else{
2146      jQuery(".ioInfoTimepicker").timepicker({
2147        startTime: new Date(0, 0, 10, 0, 0, 0),
2148        endTime: new Date(0, 0, 0, 20, 0, 0, 0),
2149        /*show24Hours: $show24Hours,*/
2150        timeFormat: timeFormat,
2151        separator: ":",
2152        className: "elementor-widget-text-editor",
2153        step: 15,
2154        disableTouchKeyboard: true
2155      });
2156    }
2157    setTimeout(setUpTimeRestrictions_infoHeaderTimepickers, 500);
2158  }
2159
2160  function saveInfoHeader(){
2161    let info_header_start_date = jQuery("[id$=ioHeaderDateStart]");
2162    let info_header_end_date = jQuery("[id$=ioHeaderDateEnd]");
2163    let info_header_start_time = jQuery("[id$=ioHeaderTimeStart]");
2164    let info_header_end_time = jQuery("[id$=ioHeaderTimeEnd]");
2165    let info_header_address = jQuery("[id$=ioHeaderAddress]");
2166    let info_header_city = jQuery("[id$=ioHeaderCity]");
2167    let info_header_state = jQuery("[id$=ioHeaderState]");
2168    let info_header_zip = jQuery("[id$=ioHeaderZipCode]");
2169    let info_header_phone = jQuery("[id$=ioHeaderPhone]");
2170    let info_header_email = jQuery("[id$=ioHeaderEmail]");
2171
2172    if(info_header_start_time.val()) setCookie("io_timeStart", info_header_start_time.val(), 14);
2173    if(info_header_end_time.val()) setCookie("io_timeEnd", info_header_end_time.val(), 14);
2174    if(info_header_start_date.val()) setCookie("io_dateStart", info_header_start_date.val(), 14);
2175    if(info_header_end_date.val()) setCookie("io_dateEnd", info_header_end_date.val(), 14);
2176    if(info_header_address.val()) setCookie("io_address", info_header_address.val(), 14);
2177    if(info_header_city.val()) setCookie("io_city", info_header_city.val(), 14);
2178    if(info_header_state.val()) setCookie("io_state", info_header_state.val(), 14);
2179    if(info_header_zip.val()) setCookie("io_zip", info_header_zip.val(), 14);
2180    if(info_header_phone.val()) setCookie("io_phone", info_header_phone.val(), 14);
2181    if(info_header_email.val()) setCookie("io_email", info_header_email.val(), 14);
2182
2183    /* Set information in the cart. */
2184    calCancel();
2185
2186    header_increment_step();
2187
2188    /* Stop form from doing anything else for elementor */
2189    // jpa - still allow, turn off actions in form if wanted. to turn off io lead submission use the plugin settings
2190    //event.preventDefault();
2191    //event.stopPropagation();
2192    return true;
2193  }
2194
2195  function set_info_header_values(){
2196    let info_header_start_date = jQuery("[id$=ioHeaderDateStart]");
2197    let info_header_end_date = jQuery("[id$=ioHeaderDateEnd]");
2198    let info_header_start_time = jQuery("[id$=ioHeaderTimeStart]");
2199    let info_header_end_time = jQuery("[id$=ioHeaderTimeEnd]");
2200    let info_header_street = jQuery("[id$=ioHeaderAddress]");
2201    let info_header_city = jQuery("[id$=ioHeaderCity]");
2202    let info_header_state = jQuery("[id$=ioHeaderState]");
2203    let info_header_zip = jQuery("[id$=ioHeaderZipCode]");
2204    let info_header_phone = jQuery("[id$=ioHeaderPhone]");
2205    let info_header_email = jQuery("[id$=ioHeaderEmail]");
2206
2207    if(getCookie("io_timeStart")) info_header_start_time.val(getCookie("io_timeStart"));
2208    if(getCookie("io_timeEnd")) info_header_end_time.val(getCookie("io_timeEnd"));
2209    if(getCookie("io_dateStart")) info_header_start_date.val(getCookie("io_dateStart"));
2210    if(getCookie("io_dateEnd")) info_header_end_date.val(getCookie("io_dateEnd"));
2211    if(getCookie("io_address")) info_header_street.val(getCookie("io_address"));
2212    if(getCookie("io_city")) info_header_city.val(getCookie("io_city"));
2213    if(getCookie("io_state")) info_header_state.val(getCookie("io_state"));
2214    if(getCookie("io_zip")) info_header_zip.val(getCookie("io_zip"));
2215    if(getCookie("io_phone")) info_header_phone.val(getCookie("io_phone"));
2216    if(getCookie("io_email")) info_header_email.val(getCookie("io_email"));
2217  }
2218
2219  function add_classes_and_onClicks(){
2220
2221    /* First set up for dates */
2222    let info_header_start_date = jQuery("#ioHeaderDateStart");
2223    let info_header_end_date = jQuery("#ioHeaderDateEnd");
2224    info_header_start_date.addClass("ioInfoDatepicker");
2225    info_header_end_date.addClass("ioInfoDatepicker");
2226
2227    /* Now Timepickers */
2228    let info_header_start_time = jQuery("#ioHeaderTimeStart");
2229    let info_header_end_time = jQuery("#ioHeaderTimeEnd");
2230    info_header_start_time.addClass("ioInfoTimepicker");
2231    info_header_end_time.addClass("ioInfoTimepicker");
2232
2233    /* Add the onClick to the button */
2234    let button = jQuery("#ioInfoHeaderSubmit");
2235    button.click(saveInfoHeader);
2236    button.css("cursor", "pointer");
2237
2238    /* Init datepicker and timepickers */
2239    init_date_timepicker_for_info_header();
2240
2241    /* Lastly set the values if they are set already */
2242    set_info_header_values();
2243  }
2244
2245  function remove_set_event_buttton(){
2246    let set_event_button = jQuery(".pageDateRangeWrapper");
2247    if(set_event_button.length > 0) set_event_button.hide();
2248  }
2249
2250  function set_info_header_end_date(){
2251    if(!jQuery("#ioHeaderDateEnd").val()){
2252      jQuery("#ioHeaderDateEnd").val(jQuery("#ioHeaderDateStart").val())
2253    }
2254    jQuery("#ioHeaderDateEnd").datepicker("option", { minDate: new Date(jQuery("#ioHeaderDateStart").val()) });
2255  }
2256
2257  function header_increment_step(){
2258    let active = jQuery(".io-step-active");
2259
2260    switch(active.attr("id")){
2261      case "io-step-1":
2262        if (/Mobi|Android/i.test(navigator.userAgent)) {
2263          jQuery("#io-step-2,#io-step-3,#io-step-4").hide();
2264        }
2265        if(check_header_step_one(active)){
2266          active.removeClass("io-step-active");
2267          active.addClass("io-step-done")
2268          jQuery("#io-step-2").addClass("io-step-active")
2269          header_increment_step();
2270        }
2271        break;
2272      case "io-step-2":
2273        if (/Mobi|Android/i.test(navigator.userAgent)) {
2274          jQuery("#io-step-2,#io-step-3,#io-step-4").show();
2275        }
2276        if(simpleCart.items().length > 0){
2277          active.removeClass("io-step-active");
2278          active.addClass("io-step-done")
2279          jQuery("#io-step-3").addClass("io-step-active")
2280          header_increment_step();
2281        }
2282        break;
2283      case "io-step-3":
2284        if (/Mobi|Android/i.test(navigator.userAgent)) {
2285          jQuery("#io-step-2,#io-step-3,#io-step-4").show();
2286        }
2287        if(document.location.href.indexOf("io_quoteconfirm") >= 0){
2288          active.removeClass("io-step-active");
2289          active.addClass("io-step-done")
2290          jQuery("#io-step-4").addClass("io-step-active")
2291          header_increment_step();
2292        }
2293        break;
2294      case "io-step-4":
2295        if (/Mobi|Android/i.test(navigator.userAgent)) {
2296          jQuery("#io-step-2,#io-step-3,#io-step-4").show();
2297        }
2298        break;
2299    }
2300  }
2301
2302  function check_header_step_one(active) {
2303    var allInputs = active.find('input');
2304
2305    for (var i = 0; i < allInputs.length; i++) {
2306      if (jQuery(allInputs[i]).val() === "") {
2307        return false; // Return false if any input is empty
2308      }
2309    }
2310    return true; // Return true if all inputs have a value
2311  }
2312
2313  /*</editor-fold>*/
2314
2315  /*<editor-fold defaultstate="collapsed" desc="Accessory Click Functions">*/
2316  function accDDClicked(event){
2317    this_element = jQuery(this)
2318    if(!this_element.prop("selected")){
2319      pid = event.data.pid
2320      accLmt = event.data.accLmt
2321      all_elements = jQuery("[id^=io_acc_"+pid+"_]")
2322      let count = 0;
2323      /* Tried using .filter and .length to get the count of selected items but could not make it work. */
2324      for(i = 0; i < all_elements.length; ++i){
2325        if(all_elements[i].selected){
2326          ++count;
2327        }
2328      }
2329      if(accLmt == 0){
2330        this_element.css("border", "5px solid #bbb");
2331        this_element.prop("selected", true);
2332      } else if(count >= accLmt){
2333        let selected_value = jQuery("[id^=io_acc_"+pid+"_]").filter(function() {
2334          return this["selected"];
2335        });
2336        /* be sure to unselect other slected values if our acc limit has been reached. */
2337        selected_value.prop("selected", false);
2338        selected_value.css("border", "1px solid #bbb");
2339      }
2340      this_element.css("border", "5px solid #bbb");
2341      this_element.prop("selected", true);
2342    } else{
2343      this_element.prop("selected", false);
2344      this_element.css("border", "1px solid #bbb");
2345    }
2346  }
2347
2348  /* when accessory choice is clicked */
2349  function accOnClick(acc_select=null){
2350    /* set name/img back to original main in case they are just clicking on a 1st level size option */
2351    jQuery("#bookNowBtn").removeClass("item_add").addClass("item_add_off").trigger("classChange");
2352    jQuery(".io_product_title.item_name").html(main_name_orig);
2353    jQuery(".io_product_container .item_image").first().attr("src",main_img_src);
2354    jQuery(".io_product_container .item_image").first().attr("data-src",main_img_src);
2355    jQuery(".io_product_container .item_encoded").first().html(main_encoded);
2356    jQuery(".io_product_container .io_image_big").first().attr("src",main_img_src);
2357    jQuery(".io_product_container .io_image_big").first().attr("data-src",main_img_src);
2358    let main_id = jQuery(".io_product_container .item_rentalid").first().text();
2359    let main_id_arr = main_id.split(":")
2360    jQuery(".io_product_container .item_rentalid").html(main_id_arr[0]);
2361    let clk_id;
2362    if(jQuery(acc_select).find(":selected").val()){
2363      clk_id = jQuery(acc_select).find(":selected").val().replace("io_acc_shortname_","");
2364    }else{
2365      clk_id = this.id.replace("io_acc_shortname_","");
2366    }
2367    clk_id = clk_id.replace("iothumb_","");
2368    let click_id_arr = clk_id.split("_");
2369    /* let pid = main_id; */
2370    /* if(main_id.split("_").length>1) pid = parseInt(click_id_arr[0]); */
2371    let acc_obj_relate_is_map = acc_obj_relate instanceof Map;
2372    let acc_obj_relate_entries = acc_obj_relate_is_map ? acc_obj_relate.entries() : Object.entries(acc_obj_relate);
2373    for (let [key, value] of acc_obj_relate_entries) {
2374      let id = key;
2375      let children = acc_obj_relate_is_map ? acc_obj_relate.get(key) : value;
2376      if(Object.keys(children).length>0){
2377        for (key2 in children) {
2378          if(Object.keys(children[key2]).length > 0){
2379            /* 3rd level */
2380            for (key3 in children[key2]) {
2381              displayPackageChoices(clk_id,key2,key3,children[key2]);
2382            }
2383          }else{
2384            displayPackageChoices(clk_id,key,key2,children);
2385          }
2386        }
2387      }else{
2388        displayPackageChoices(clk_id,0,id,acc_obj_relate);
2389      }
2390    }
2391  }
2392
2393  /* show/hide accessory levels as needed */
2394  /* clk_id: one they clicked on, pid: parentid, id: iterator, arr: relationship array */
2395  function displayPackageChoices(clk_id,pid,id,arr){
2396    let main_id = jQuery(".io_product_container .item_rentalid").first().text();
2397    let main_arr = main_id.split("_");
2398    if(main_arr.length>1) main_id = parseInt(main_arr[0]);
2399    let click_id_arr = clk_id.split("_");
2400    elem = getAccElem(id,pid);
2401    if(click_id_arr[0]==pid || click_id_arr[1]==pid || pid==0){
2402      elem.style.display="inline-block";
2403    }else{
2404      elem.style.display="none";
2405    }
2406    if(click_id_arr[1]==id && (click_id_arr[0]==pid || (pid==0 && click_id_arr[0]==main_id) ) || (click_id_arr.length==1 && click_id_arr[0]==id)){
2407      jQuery("#bookNowBtn").removeClass("item_add_off").addClass("item_add").trigger("classChange");
2408      updateMainItem(id,pid);
2409    }
2410  }
2411
2412  /* update it with accessory data for choices */
2413  var main_img_src = jQuery("#single_image").first().attr("href");
2414  var main_name_orig = jQuery(".io_product_title.item_name").html();
2415  var main_encoded = jQuery(".io_product_container .item_encoded").html();
2416  var main_desc = jQuery(".io_product_detailbox .io_product_desc").html();
2417  function updateMainItem(id,pid){
2418    /* update add to cart btn, name, img, desc */
2419    let name = "";
2420    let name_enc = "";
2421    let main_id = jQuery(".io_product_container .item_rentalid").first().text();
2422    let main_arr = main_id.split(":");
2423    if(main_arr.length>1) main_id = main_arr[0];
2424    if(pid!=0){
2425      name += jQuery("#io_acc_itemname_"+pid).html()+":";
2426      name_enc += jQuery("#io_acc_itemname_"+pid).html()+":";
2427      name += jQuery("#io_acc_shortname_"+id).html();
2428      name_enc += jQuery("#io_acc_itemname_"+id).html();
2429    }else{
2430      pid = main_id;
2431      name += jQuery("#io_acc_itemname_"+id).html();
2432      name_enc += jQuery("#io_acc_itemname_"+id).html();
2433    }
2434    jQuery(".io_product_container .item_encoded").html(encodeURIComponent(name_enc.replace(/[\u2032\u2019]+/ig,"'")));
2435    jQuery(".io_product_container .item_rentalid").html(main_id+":"+pid+"_"+id);
2436    jQuery(".io_product_title.item_name").html(name);
2437    // Make sure the description actually displays text.
2438    let acc_desc = jQuery("#io_acc_desc_"+pid+"_"+id).first();
2439    if(acc_desc.length>0 && acc_desc.text()){
2440      jQuery(".io_product_container .io_product_desc").first().html(jQuery("#io_acc_desc_"+pid+"_"+id).first()[0].innerHTML);
2441    }
2442
2443    /* swap accessory image with main image pic for drop-down type items (linens) */
2444    let img = jQuery("#io_acc_imgbig_"+pid+"_"+id).first().attr("href");
2445    if(img==null) img = jQuery("#iothumb_"+pid+"_"+id).first().attr("src")
2446    if(img==null){
2447    }else{
2448      if(img.length==0 && pid==main_id){
2449        /* for 1 level dd items that have no img, use the main img */
2450        img = main_img_src;
2451      }
2452      jQuery(".io_product_container .io_image_big").first().attr("src",img);
2453      jQuery(".io_product_container .io_image_big").first().attr("data-src",
2453img);
2454      jQuery(".io_product_container .item_image").first().attr("src",jQuery("#iothumb_"+pid+"_"+id).first().attr("src"));
2455      jQuery(".io_product_container .item_image").first().attr("data-src",jQuery("#iothumb_"+pid+"_"+id).first().attr("src"));
2456
2457      jQuery("#single_image").first().attr("href",img).show();
2458    }
2459    checkAvailFilter();
2460  }
2461
2462  /* get either img or text for accessory choices */
2463  function getAccElem(id,pid){
2464    let path =pid+"_"+id;
2465    if(pid==0){
2466      path=id;
2467    }
2468    let elem = null;
2469    try{
2470      elem = document.querySelector("#ioAccButtonWrapper_"+path);
2471    }catch(e){}
2472    if(elem == null){
2473      try{
2474        elem = document.querySelector("#iothumb_"+path);
2475      }catch(e){}
2476    }
2477    if(elem==null){
2478      try{
2479        elem = document.querySelector("#io_product_acc_pkg_sel_"+pid);
2480      }catch(e){}
2481      if(elem!=null) return elem;
2482    }else{ return elem; }
2483    if(elem == null){
2484      try{
2485        elem = document.querySelector("#io_acc_shortname_"+path);
2486      }catch(e){}
2487    }else if(elem.src=="" | elem.getAttribute("data-src")==""){
2488      try{
2489        elem = document.querySelector("#io_acc_shortname_"+path);
2490      }catch(e){}
2491    }else if(elem.src.substr(-1)=="/"){
2492      try{
2493        elem = document.querySelector("#io_acc_shortname_"+path);
2494      }catch(e){}
2495    }
2496    if(elem==null){
2497      try{
2498        elem = document.querySelector("#io_acc_shortname_"+id);
2499      }catch(e){}
2500    }
2501    return elem;
2502  }
2503
2504  /* create the accessory choice btn (img/text) */
2505  function makeAccBtn(button_add,pid){
2506    let newButton;
2507    if(button_add.nodeName=="IMG"){
2508      newButton = button_add;
2509      let id =  newButton.id.replace("iothumb_"+pid,"");
2510      var wrapper = document.createElement("div");
2511      wrapper.setAttribute("id", "ioAccButtonWrapper_"+pid+id);
2512      wrapper.style.display = "inline-block";
2513      wrapper.appendChild(newButton);
2514      let acc_name = document.createElement("span");
2515      acc_name.style.overflow = "hidden";
2516      acc_name.style.textOverflow = "ellipsis";
2517      acc_name.style.maxWidth = "80px";
2518      acc_name.style.display = "block";
2519      acc_name.style.whiteSpace = "nowrap";
2520      acc_name.textContent = jQuery("#io_acc_shortname"+id).text();
2521      acc_name.classList.add("accTextName");
2522      acc_name.setAttribute("id", "io_acc_shortname_"+pid+id);
2523      wrapper.appendChild(document.createElement("br"));
2524      wrapper.appendChild(acc_name);
2525
2526    }else{
2527      newButton = button_add.cloneNode(true);
2528      let id = newButton.id.replace("io_acc_shortname_","");
2529      newButton.id = "io_acc_shortname_" + pid + "_" + id;
2530    }
2531    newButton.classList.add("elementor-animation-grow");
2532    newButton.classList.remove("item_image");
2533    newButton.style="cursor:pointer;border: solid 1px grey";
2534    newButton.classList.add("io_access_button");
2535    newButton.style.display = "inline-block";
2536    newButton.style.verticalAlign = "top";
2537    newButton.onclick=accOnClick;
2538    if(newButton.nodeName=="IMG"){
2539      newButton.style.minWidth = "80px";
2540      newButton.style.width = "80px";
2541      newButton.style.margin = "2px";
2542      newButton.style.height = "80px";
2543    }else{
2544      newButton.style.margin = "0px 2px 0px 2px";
2545    }
2546    if(button_add.nodeName=="IMG"){
2547      return wrapper
2548    }
2549
2550    return newButton;
2551  }
2552  /* when clicking the thumb swatches under main image (2nd image for an item) */
2553  function updateMainPic(img) {
2554    let container = img.parentElement;
2555    while (container && !container.querySelector(".io_image_big")) {
2556      container = container.parentElement;
2557    }
2558
2559    const main_img = container ? container.querySelector(".io_image_big") : null;
2560    if (!main_img) return;
2561
2562    const dataBigSrc = img.getAttribute("data-big-src");
2563    if (dataBigSrc) {
2564      main_img.src = dataBigSrc;
2565      return;
2566    }
2567
2568    let thumb_id = img.id;
2569    let big_id = thumb_id.replace("thumb", "big");
2570    const img_big = document.getElementById(big_id);
2571
2572    if (img_big && img_big.href) {
2573      main_img.src = img_big.href;
2574    }
2575  }
2576  /*</editor-fold>*/
2577
2578  /*<editor-fold defaultstate="collapsed" desc="Calendar Functions">*/
2579  function calApply() {
2580    /* reset timeslots if filtering is on */
2581    filterTimeslotsByDay_itemTimeslots();
2582    simpleCart.update();
2583
2584    /* Prevent zero-duration selection: disallow identical start and end date/time */
2585    try
2586    {
2587      var ds = jQuery("input[name=dateStart]").val();
2588      var de = jQuery("input[name=dateEnd]").val();
2589      var ts = jQuery("input[name=timeStart]").val();
2590      var te = jQuery("input[name=timeEnd]").val();
2591      if(ts && te && ds && de)
2592      {
2593        var s24 = convert12HourTo24Hour(ts);
2594        var e24 = convert12HourTo24Hour(te);
2595        var sObj = buildDateObj(ds.split("/"), s24);
2596        var eObj = buildDateObj(de.split("/"), e24);
2597        if(sObj && eObj && typeof sObj.getTime === 'function' && typeof eObj.getTime === 'function')
2598        {
2599          if(eObj.getTime() === sObj.getTime())
2600          {
2601            alert("Please choose an end time that's after the start time.");
2602            jQuery("input[name=timeEnd]").val("");
2603            return false;
2604          }
2605        }
2606      }
2607    }catch(e){}
2608
2609    if(cart_times_all_set()){
2610      ioCartLoaderActivate();
2611      setCookie("io_dateApplied", "true", 1)
2612      checkAvailAll();
2613      // If no availability calls were made, hide loader shortly after
2614      setTimeout(function()
2615      {
2616        if(io_cart_loading_active && io_cart_loading_count === 0)
2617        {
2618          io_cart_loading_active = false;
2619          ioCartShowOverlay(false);
2620        }
2621      }, 300);
2622      calCancel();
2623    }
2624
2625
2626    let io_required_data = io_info_required_data;
2627    for (const [data, value] of Object.entries(io_required_data)) {
2628      if(value == 1){
2629        setCookie(data, jQuery("#io_im_"+data).val(), 14);
2630      }
2631    }
2632
2633    /* Check if information gathering header exists. If it does, update the times on there. */
2634    if(jQuery("#ioInfoHeader").length){
2635      jQuery("#ioHeaderTimeStart").val(jQuery("[name=timeStart]").val());
2636      jQuery("#ioHeaderTimeEnd").val(jQuery("[name=timeEnd]").val());
2637      jQuery("#ioHeaderDateStart").val(jQuery("[name=dateStart]").val());
2638      jQuery("#ioHeaderDateEnd").val(jQuery("[name=dateEnd]").val());
2639      header_increment_step();
2640    }
2641
2642    show_or_hide_required_info_message()
2643    /* if(!cartStayOpen) cartHide(); */
2644  }
2645
2646  function calCancel() {
2647    click_count = 0;
2648    start_date = getCookie("io_dateStart");
2649    end_date = getCookie("io_dateEnd");
2650    start_time = getCookie("io_timeStart");
2651    end_time = getCookie("io_timeEnd");
2652    jQuery("input[name=dateStart]").val(start_date);
2653    jQuery("input[name=dateEnd]").val(end_date);
2654    if(io_company_timeslots.length != 0 && io_cartdayselect == "single_day" && getCookie("io_company_timeslot_selected")){
2655      jQuery(".ioCartCompanyTimeslots").val(getCookie("io_company_timeslot_selected"));
2656    } else{
2657      jQuery("input[name=timeStart]").val(start_time);
2658      jQuery("input[name=timeEnd]").val(end_time);
2659    }
2660    setCalBackground();
2661
2662    jQuery(".ioDateRange").html(smartFormatDateRange())
2663    jQuery("#cartCalendar, #cartTimePicker").hide();
2664    jQuery(".ioDateRange").show();
2665    jQuery(".changeDateLinkWrapper").show();
2666  }
2667
2668  /* var cartStayOpen = false; */
2669  function calSetDateRange(stayOpen) {
2670    /*
2671        if(stayOpen==1){
2672            cartStayOpen = true;
2673        }else{
2674            cartStayOpen = false;
2675        }
2676        */
2677    jQuery(".changeDateLinkWrapper").hide();
2678    jQuery("#cartCalendar, #cartTimePicker").show();
2679    jQuery("#cartDateRange").hide();
2680  }
2681
2682  function smartFormatDateRange() {
2683    let start_date = jQuery("input[name=dateStart]").val();
2684    let end_date = jQuery("input[name=dateEnd]").val();
2685    if(io_company_timeslots.length != 0 && io_cartdayselect == "single_day"){
2686      let cart_company_timeslot_selected = jQuery(".ioCartCompanyTimeslots option:selected").first().val();
2687      if(cart_company_timeslot_selected){
2688        setCookie("io_company_timeslot_selected", cart_company_timeslot_selected, 14);
2689        cart_company_timeslot_selected = cart_company_timeslot_selected.split("-");
2690        var start_time = cart_company_timeslot_selected[0].trim();
2691        var end_time = cart_company_timeslot_selected[1].trim();
2692      }
2693    } else {
2694      var start_time = jQuery("input[name=timeStart]").val();
2695      var end_time = jQuery("input[name=timeEnd]").val();
2696    }
2697
2698    let text = "";
2699    text = start_date;
2700    if(io_hidetimes!="on") text += " " + start_time;
2701
2702    if (start_date == end_date) {
2703      if(io_hidetimes!="on"){
2704        text += "  <i class='fas fa-arrow-right' style='padding:5px;'></i> ";
2705        text += end_time;
2706      }
2707    } else {
2708      text += "  <i class='fas fa-arrow-right' style='padding:5px;'></i> ";
2709      text += end_date;
2710      if(io_hidetimes!="on") text += " " + end_time;
2711    }
2712    /* text += "  <i class='fas fa-pencil-alt' style='margin-left:9px;color:"+pallet_color1+";'></i> "; */
2713
2714    return text;
2715  }
2716
2717
2718  function resetCalButtons() {
2719    jQuery("#cartCalendar .ui-datepicker-prev").addClass("fas fa-arrow-left").css("color", pallet_color1);
2720    jQuery("#cartCalendar .ui-datepicker-next").addClass("fas fa-arrow-right").
2720css("color", pallet_color1);
2721  }
2722
2723  function cal_onChangeMonthYear(year, month, obj) {
2724    setTimeout(resetCalButtons, 10);
2725    setTimeout(setCalBackground, 10);
2726  }
2727
2728  function cal_onSelect(dateText, obj) {
2729    setTimeout(resetCalButtons, 10);
2730    let whatday_choice = "";
2731    if(io_cartdayselect === "dropdown_options" && io_multidayquote === "on"){
2732      let choice_obj = jQuery("#whatday");
2733      if(choice_obj){
2734        whatday_choice = choice_obj.val();
2735      }
2736    }
2737
2738    click_count++;
2739    end_timepicker = jQuery("input[name=timeEnd]");
2740    let timeStart = jQuery("input[name=timeStart]").val();
2741    if(io_force_blank_timepickers != "on")
2742    {
2743      if (timeStart == "") {
2744        jQuery("input[name=timeStart]").val(start_default);
2745        jQuery("input[name=timeEnd]").val(end_default);
2746      }
2747    }
2748
2749    if (click_count == 1 || !multi_day || whatday_choice==="Same Day" || whatday_choice==="Overnight") {
2750      jQuery("input[name=dateStart]").val(dateText);
2751      jQuery("input[name=dateEnd]").val(dateText)
2752      end_timepicker.timepicker("option",{"minTime": jQuery("input[name=timeStart]").val()});
2753      if(EndTimeLessThanStartTime(
2754              jQuery("input[name=timeStart]").val(),
2755              end_timepicker.val(),
2756              jQuery("[name='dateStart']").val(),
2757              jQuery("[name='dateEnd']").val() ) ) {
2758        end_timepicker.val("");
2759      }
2760      if(io_cartAllowSameDay == "on"){
2761        restrictStartTimepickerOnSameDaySelect(dateText, jQuery("input[name=timeStart]"), end_timepicker);
2762      }
2763    } else if (click_count == 2) {
2764      jQuery("input[name=dateEnd]").val(dateText);
2765      let start_date_str = jQuery("input[name=dateStart]").val();
2766      let start_date_obj = convertDateStringtoDateObject(start_date_str);
2767      let end_date_obj = convertDateStringtoDateObject(dateText);
2768      if(end_date_obj < start_date_obj){
2769        jQuery("input[name=dateStart]").val(dateText);
2770        if(io_cartAllowSameDay == "on"){
2771          restrictStartTimepickerOnSameDaySelect(dateText, jQuery("input[name=timeStart]"), end_timepicker);
2772        }
2773      } else{
2774        end_timepicker.timepicker("option",{"minTime": io_restrict_time_start});
2775      }
2776      click_count = 0;
2777    } else {
2778      click_count = 0;
2779    }
2780    //custom code for suncoast_event
2781    if(io_cartdayselect === "dropdown_options" && io_multidayquote === "on"){
2782      endDisplay();
2783      //daysSelect();
2784    }
2785    filterTimeslotsByDay_companyTimeslots();
2786
2787    setTimeout(setCalBackground, 10);
2788  }
2789
2790  function endDisplay(){
2791    //todo: need to figure out if these work and set triggers
2792    // trigger enddisplay after date is selected or possibly when dateEnd changes?
2793    let choice = jQuery("#whatday").val();
2794
2795    setCookie("io_whatday", choice, 14);
2796    let dateStart = jQuery("[name=dateStart]");
2797    let timeStart = jQuery("[name=timeStart]");
2798    let dateEnd = jQuery("[name=dateEnd]");
2799    let timeEnd = jQuery("[name=timeEnd]");
2800    if(choice==='Overnight'){
2801      let startdate = dateStart.val();
2802      let starttime = io_overnightPickupTime;
2803      let endcalc_date_obj = new Date(buildDateobjectstring(startdate,dateFormat,starttime));
2804      let duration_hrs = 24;
2805      let end_date_obj = new Date(endcalc_date_obj.getTime()+duration_hrs*60*60*1000);
2806      if(!isNaN(end_date_obj)){
2807        dateEnd.val(getFormatteddate(end_date_obj));
2808        timeEnd.val(getFormattedtime(end_date_obj));
2809        timeEnd.attr('readonly','readonly');
2810      }
2811    }else if(choice==='Multi-Day'){
2812      let startdate = dateStart.val();
2813      let starttime = timeStart.val() || start_default;
2814      let start_date_obj = new Date(buildDateobjectstring(startdate, dateFormat, starttime));
2815      if(!isNaN(start_date_obj)){
2816        //dateEnd.val(getFormatteddate(start_date_obj));
2817        let cal = jQuery("#cartCalendar");
2818        let origOnSelect = cal.datepicker("option", "onSelect");
2819        cal.datepicker("option", "onSelect", null);
2820        cal.datepicker("setDate", start_date_obj);
2821        cal.datepicker("option", "onSelect", origOnSelect);
2822      }
2823      timeEnd.removeAttr('readonly');
2824      if(io_force_blank_timepickers == "on" && !timeEnd.val()){
2825        timeEnd.val("");
2826      } else if(!timeEnd.val()){
2827        timeEnd.val(end_default);
2828      }
2829    }else{
2830      let startdate = dateStart.val();
2831      let starttime = timeStart.val() || start_default;
2832      let start_date_obj = new Date(buildDateobjectstring(startdate, dateFormat, starttime));
2833      if(!isNaN(start_date_obj)){
2834        dateEnd.val(getFormatteddate(start_date_obj));
2835        let cal = jQuery("#cartCalendar");
2836        let origOnSelect = cal.datepicker("option", "onSelect");
2837        cal.datepicker("option", "onSelect", null);
2838        cal.datepicker("setDate", start_date_obj);
2839        cal.datepicker("option", "onSelect", origOnSelect);
2840      }
2841      timeEnd.removeAttr('readonly');
2842      if(io_force_blank_timepickers == "on"  && !timeEnd.val()){
2843        timeEnd.val("");
2844      } else if(!timeEnd.val()){
2845        timeEnd.val(end_default);
2846      }
2847      click_count = 0;
2848    }
2849    setTimeout(setCalBackground, 10);
2850  }
2851  function setCalBackground() {
2852    let dateStart_string = jQuery("input[name=dateStart]").val();
2853    let dateEnd_string = jQuery("input[name=dateEnd]").val();
2854
2855    if (dateFormat == "d/m/yy") {
2856      let dateStartArray = dateStart_string.split("/");
2857      let dateEndArray = dateEnd_string.split("/");
2858      var dateStart = new Date(dateStartArray[2], Number(dateStartArray[1])-1, dateStartArray[0]);
2859      var dateEnd = new Date(dateEndArray[2], Number(dateEndArray[1])-1, dateEndArray[0]);
2860    } else {
2861      var dateStart = new Date(dateStart_string);
2862      var dateEnd = new Date(dateEnd_string);
2863    }
2864
2865
2866    let sday = dateStart.getDate();
2867    let smonth = dateStart.getMonth();
2868    let syear = dateStart.getFullYear();
2869
2870    let eday = dateEnd.getDate();
2871    let emonth = dateEnd.getMonth();
2872    let eyear = dateEnd.getFullYear();
2873
2874    /* clear any (in case of cancel) */
2875    jQuery(".ui-datepicker-calendar [data-handler=selectDay]").css("background-color","initial");
2876
2877    /* set the selected ones */
2878    jQuery("#cartCalendar [data-month=" + smonth + "][data-year=" + syear + "], #cartCalendar [data-month=" +
2879            emonth + "][data-year=" + eyear + "]").each(function (i) {
2880      let cday = jQuery(this).find("a").first().text();
2881      let cmonth = jQuery(this).attr("data-month");
2882      let cyear = jQuery(this).attr("data-year");
2883      /* let dateCurrent = new Date(Date.UTC(cyear,cmonth,cday,12)); */
2884      let dateCurrent = new Date(cyear, cmonth, cday);
2885      if (click_count == 1 && dateEnd_string.length == 0) dateEnd = dateStart;
2886      if (dateCurrent.getTime() == dateStart.getTime() && dateCurrent.getTime() == dateEnd.getTime()) {
2887        jQuery(this).css("border-radius", "6px 6px 6px 6px");
2888      } else if (dateCurrent.getTime() == dateStart.getTime()) {
2889        jQuery(this).css("border-radius", "6px 0 0 6px");
2890      } else if (dateCurrent.getTime() == dateEnd.getTime()) {
2891        jQuery(this).css("border-radius", "0 6px 6px 0");
2892      }
2893
2894      if (dateCurrent >= dateStart && dateCurrent <= dateEnd) {
2895        jQuery(this).css("background-color", pallet_color1);
2896      }
2897
2898
2899    });
2900  }
2901  /*</editor-fold>*/
2902
2903  /*<editor-fold defaultstate="collapsed" desc="Timeslot/Timepicker Functions">*/
2904  /* called from simplecart */
2905  function timeslotChange(){
2906    checkAvailCartTimeslots();
2907  }
2908  function filterTimeslotsByDay_companyTimeslots(){
2909    var weekday = new Array();
2910    weekday[0] = "Sunday";
2911    weekday[1] = "Monday";
2912    weekday[2] = "Tuesday";
2913    weekday[3] = "Wednesday";
2914    weekday[4] = "Thursday";
2915    weekday[5] = "Friday";
2916    weekday[6] = "Saturday";
2917
2918    let times = getAvailTimes();
2919    let start_date = times[0];
2920    var newDate1 = convertDateStringtoDateObject(start_date);
2921    let day = weekday[new Date(newDate1).getDay()];
2922
2923    let selected_option_label = jQuery(".ioCartCompanyTimeslots option:selected").first().text().toLowerCase();
2924    if(optionHasDay(weekday, selected_option_label)){
2925      if(selected_option_label.indexOf(day.toLowerCase()) === -1){
2926        jQuery(".ioCartCompanyTimeslots").val("");
2927      }
2928    }
2929    if(io_company_timeslots.length != 0 && io_cartdayselect == "single_day"){
2930      jQuery(".ioCartCompanyTimeslots > option").each(function() {
2931        if(optionHasDay(weekday, this.text.toLowerCase())){
2932          for(i=0; i<weekday.length; ++i){
2933            if(day.toLowerCase() == weekday[i].toLowerCase() && this.text.toLowerCase().indexOf(day.toLowerCase()) !== -1){
2934              jQuery(this).show();
2935              day_missing = false;
2936            } else if(day.toLowerCase() != weekday[i].toLowerCase() && this.text.toLowerCase().indexOf(day.toLowerCase()) === -1){
2937              jQuery(this).hide();
2938            }
2939          }
2940        }
2941      });
2942    }
2943  }
2944
2945  function filterTimeslotsByDay_itemTimeslots(){
2946    var weekday = new Array();
2947    weekday[0] = "Sunday";
2948    weekday[1] = "Monday";
2949    weekday[2] = "Tuesday";
2950    weekday[3] = "Wednesday";
2951    weekday[4] = "Thursday";
2952    weekday[5] = "Friday";
2953    weekday[6] = "Saturday";
2954
2955    let times = getAvailTimes();
2956    let start_date = times[0];
2957    var newDate1 = convertDateStringtoDateObject(start_date);
2958    let day = weekday[new Date(newDate1).getDay()];
2959
2960    simpleCart.each(function (item, x) {
2961      var timeslots_html = item.get('timeslots');
2962      if(typeof timeslots_html != "undefined" && jQuery.parseHTML(timeslots_html)[0].nodeName == "SELECT"){
2963        if(timeslots_html.length > 0){
2964          var timeslot_name = getTimeslotName(timeslots_html);
2965          if(typeof item.get("timeslots-orig") == "undefined"){
2966            var timeslots_obj = jQuery.parseHTML(timeslots_html);
2967          } else{
2968            var timeslots_obj = jQuery.parseHTML(item.get('timeslots-orig'));
2969          }
2970          jQuery(timeslots_obj).find("option").each(function(){
2971            if(optionHasDay(weekday, this.text.toLowerCase())){
2972              for(i=0; i<weekday.length; ++i){
2973                if(day.toLowerCase() == weekday[i].toLowerCase() && this.text.toLowerCase().indexOf(day.toLowerCase()) !== -1){
2974                  /* jQuery(this).show(); */
2975                } else if(day.toLowerCase() != weekday[i].toLowerCase() && this.text.toLowerCase().indexOf(day.toLowerCase()) === -1){
2976                  jQuery(this).remove();
2977                }
2978              }
2979            }
2980          });
2981          if(typeof item.get("timeslots-orig") == "undefined") item.set("timeslots-orig",item.get("timeslots"));
2982          item.set("timeslots",'<select class="simpleCart_timeslots" name="'+timeslot_name+'">'+jQuery(timeslots_obj).html()+'</select>');
2983        }
2984      }
2985    });
2986  }
2987
2988  function optionHasDay(weekdays, option_label){
2989    for(i=0; i<weekdays.length; ++i){
2990      if(option_label.indexOf(weekdays[i].toLowerCase()) !== -1){
2991        return true;
2992      }
2993    }
2994    return false;
2995  }
2996
2997  function getTimeslotName(timeslots_html){
2998    if(typeof timeslots_html=="undefined") return "";
2999    var timeslot_name_s = timeslots_html.indexOf('name="');
3000    timeslot_name_s += 6;
3001    var timeslot_name_e = timeslots_html.indexOf('"',timeslot_name_s);
3002    var timeslot_name = timeslots_html.substr(timeslot_name_s,timeslot_name_e-timeslot_name_s);
3003    return timeslot_name;
3004  }
3005  function setTimeslotSelected(item, timeslot_name){
3006    jQuery(".item-timeslots [name=\""+timeslot_name+"\"] option").not(":selected").removeAttr("selected");
3007    jQuery(".item-timeslots [name=\""+timeslot_name+"\"] option:selected").attr("selected","selected");
3008    if(jQuery(".item-timeslots [name=\""+timeslot_name+"\"]").length>0){
3009      item.set("timeslots",jQuery(".item-timeslots [name=\""+timeslot_name+"\"]")[0].outerHTML);
3010    }
3011
3012    /* set on quote page */
3013    jQuery(".controls [name=\""+timeslot_name+"\"] option").not(":selected").removeAttr("selected");
3014    jQuery(".controls [name=\""+timeslot_name+"\"] option[value='"+jQuery(".item-timeslots [name=\""+timeslot_name+"\"] option:selected").val()+"']").attr("selected","selected");
3015  }
3016
3017  function setTimePicker(item, timepicker_name){
3018    let [start_timepicker, end_timepicker] = get_cart_timepickers(timepicker_name);
3019    let start_time = start_timepicker.value;
3020    let end_time = end_timepicker.value;
3021
3022    if(!start_time){
3023      start_timepicker.style.borderColor = "red";
3024    } else{
3025      start_timepicker.style.borderColor = "";
3026    }
3027    if(!end_time){
3028      end_timepicker.style.borderColor = "red";
3029    } else{
3030      end_timepicker.style.borderColor = "";
3031    }
3032
3033    let start_timepicker_html = start_timepicker.outerHTML;
3034    let end_timepicker_html = end_timepicker.outerHTML;
3035    if(document.querySelectorAll(".item-timeslots [name=\""+timepicker_name+"\"]").length>0){
3036      start_timepicker_html = addOrReplaceValueInTimepicker(start_timepicker_html, start_time);
3037      end_timepicker_html = addOrReplaceValueInTimepicker(end_timepicker_html, end_time);
3038      item.set("timeslots", '<div name="'+timepicker_name+'"> Start: '+start_timepicker_html+' End: '+end_timepicker_html+'</div>');
3039    }
3040    /* set on quote page */
3041    /* For linen type items with timepickers */
3042    let rental_id = item.get("rentalid");
3043    let split_on_colon = rental_id.split(":");
3044    if(split_on_colon.length > 1){
3045      fix_time_name_for_linen_rid(timepicker_name, split_on_colon, start_time, end_time, rental_id)
3046    }else{
3047      let quote_page_start_timepicker = document.querySelectorAll(".controls [name=\""+timepicker_name.replace("io_timepicker_", "starttime_")+"\"]")[0];
3048      let quote_page_end_timepicker = document.querySelectorAll(".controls [name=\""+timepicker_name.replace("io_timepicker_", "endtime_")+"\"]")[0];
3049      if(quote_page_start_timepicker != null && quote_page_end_timepicker != null){
3050        quote_page_start_timepicker.value = start_time;
3051        quote_page_end_timepicker.value = end_time;
3052      }
3053    }
3054  }
3055
3056  function fix_time_name_for_linen_rid(time_name, split_rid, start_time, end_time, rental_id){
3057    for(let x = 0; x < split_rid.length; x++){
3058      temp_timepicker_name = time_name.replace(rental_id, split_rid[x]);
3059      let quote_page_start_timepicker = document.querySelectorAll(".controls [name=\""+temp_timepicker_name.replace("io_timepicker_", "starttime_")+"\"]")[0];
3060      let quote_page_end_timepicker = document.querySelectorAll(".controls [name=\""+temp_timepicker_name.replace("io_timepicker_", "endtime_")+"\"]")[0];
3061      if(quote_page_start_timepicker != null && quote_page_end_timepicker != null){
3062        quote_page_start_timepicker.value = start_time;
3063        quote_page_end_timepicker.value = end_time;
3064      }
3065    }
3066  }
3067
3068  function addOrReplaceValueInTimepicker(timepicker_html, time_value){
3069    if(timepicker_html.includes("value=")){
3070      timepicker_html = [timepicker_html.slice(0, timepicker_html.indexOf("value=")), 'value="'+time_value+'"', timepicker_html.slice(timepicker_html.length-1)].join("");
3071    }else{
3072      /* No value defined. Add it at the end of the outer html. */
3073      let position = timepicker_html.lastIndexOf(">");
3074      timepicker_html = [timepicker_html.slice(0, position), ' value="'+time_value+'"', timepicker_html.slice(position)].join("");
3075    }
3076    return timepicker_html
3077  }
3078
3079  function restrictEndTimepickers(){
3080    setUpTimeRestrictions_cartTimepickers()
3081    setUpTimeRestrictions_timeBasedItems()
3082  }
3083
3084  function setUpTimeRestrictions_timeBasedItems(){
3085    jQuery("input[name^=start_timeslot_]").change(function()
3086    {
3087      end_timepicker = jQuery("input[name='"+this.name.replace("start", "end")+"']");
3088      end_timepicker = jQuery(end_timepicker[end_timepicker.length - 1]);
3089      end_timepicker.timepicker("option",{"minTime": jQuery(this).val()});
3090      if( EndTimeLessThanStartTime( jQuery(this).val(), end_timepicker.val(), "0/0/0", "0/0/0" ) ){
3091        end_timepicker.val("");
3092      }
3093    });
3094  }
3095
3096  function setUpTimeRestrictions_cartTimepickers(){
3097    jQuery("input[name=timeStart]").change(function()
3098    {
3099      end_timepicker = jQuery("[name='"+this.name.replace("Start", "End")+"']");
3100      if(jQuery("[name='dateStart']").val() === jQuery("input[name='dateEnd']").val()){
3101        end_timepicker.timepicker("option",{"minTime": jQuery(this).val()});
3102        if(EndTimeLessThanStartTime(
3103                jQuery(this).val(),
3104                end_timepicker.val(),
3105                jQuery("[name='dateStart']").val(),
3106                jQuery("[name='dateEnd']").val() ) ) {
3107          end_timepicker.val("");
3108        }
3109      }
3110    });
3111  }
3112
3113  function setUpTimeRestrictions_infoHeaderTimepickers(){
3114    jQuery("#ioHeaderTimeStart").change(function()
3115    {
3116      end_timepicker = jQuery("#ioHeaderTimeEnd");
3117      if(jQuery("#ioHeaderDateStart").val() === jQuery("#ioHeaderDateEnd").val()){
3118        end_timepicker.timepicker("option",{"minTime": jQuery(this).val()});
3119        if(EndTimeLessThanStartTime(
3120                jQuery(this).val(),
3121                end_timepicker.val(),
3122                jQuery("#ioHeaderDateStart").val(),
3123                jQuery("#ioHeaderDateEnd").val() ) ) {
3124          end_timepicker.val("");
3125        }
3126      }
3127    });
3128  }
3129
3130  /*
3131        helper function to see if the value from a start timepicker is less than the string value of an end timepicker.
3132
3133        param start_time: string representation of the start time picker. 12hr or 24hr.
3134        param end_time: string representation of the end time picker. 12hr or 24hr.
3135        param start_date: string representation of the start date, seperated by "/". Can be wither d/m/y or m/d/y. Pass "0/0/0" if dates do not matter.
3136        param end_date: string representation of the end date, seperated by "/". Can be wither d/m/y or m/d/y. Pass "0/0/0" if dates do not matter.
3137
3138  */
3139  function EndTimeLessThanStartTime(start_time, end_time, start_date, end_date){
3140    if(!start_time || !end_time) return false;
3141    start_time = convert12HourTo24Hour(start_time);
3142    end_time = convert12HourTo24Hour(end_time);
3143    var split_start_date = start_date.split("/");
3144    var split_end_date = end_date.split("/");
3145    var startDate = buildDateObj(split_start_date, start_time);
3146    var endDate = buildDateObj(split_end_date, end_time);
3147    if(endDate < startDate){
3148      return true;
3149    } else {
3150      return false;
3151    }
3152  }
3153  function get_cart_timepickers(timepicker_name){
3154    let start_timepicker = document.getElementsByName(timepicker_name.replace("io_timepicker_", "start_timeslot_"));
3155    let end_timepicker = document.getElementsByName(timepicker_name.replace("io_timepicker_", "end_timeslot_"));
3156    start_timepicker = start_timepicker[start_timepicker.length-1];
3157    end_timepicker = end_timepicker[end_timepicker.length-1];
3158    return Array(start_timepicker, end_timepicker);
3159  }
3160  function restrictStartTimepickerOnSameDaySelect(start_date_str, start_timepicker, end_timepicker){
3161    let selected_date_obj = convertDateStringtoDateObject(start_date_str);
3162    let current_date_obj = new Date();
3163    if(current_date_obj.getDate()  == selected_date_obj.getDate() &&
3164            current_date_obj.getMonth() == selected_date_obj.getMonth() &&
3165            current_date_obj.getYear()  == selected_date_obj.getYear()){
3166      let next_hour_time_stamp = current_date_obj.setMinutes(60);
3167      let next_hour_str = getFormattedtime(new Date(next_hour_time_stamp))
3168      start_timepicker.timepicker("option",{"minTime": next_hour_str});
3169
3170      /* If the time in the input box is less than the time we just restricted too, then clear time inputs */
3171      restricted_time_obj = convertDateStringtoDateObject(start_date_str, next_hour_str);
3172      currently_selected_time_obj = convertDateStringtoDateObject(start_date_str, start_timepicker.val());
3173      if(currently_selected_time_obj < restricted_time_obj){
3174        start_timepicker.val(next_hour_str);
3175        end_timepicker.val("");
3176        end_timepicker.timepicker("option",{"minTime": next_hour_str});
3177      }
3178    }else{
3179      start_timepicker.timepicker("option",{"minTime": restrictTimeStart});
3180    }
3181  }
3182  /*</editor-fold>*/
3183
3184  /*<editor-fold defaultstate="collapsed" desc="Simple Cart Bound Functions">*/
3185  function cart_onUpdate() {
3186    /* need slight delay so simplecart updates before this runs */
3187    setTimeout(cart_onUpdate2, 500);
3188    try{
3189      for(var i=0;i<document.getElementsByClassName("ioCart").length;i++){
3190        document.getElementsByClassName("ioCart")[i].setAttribute("cnt", simpleCart.items().length);
3191      }
3192    }catch(e){}
3193  }
3194
3195  function cart_onUpdate2() {
3196    jQuery("#cartSubtotal").html(simpleCart.toCurrency(simpleCart.total()));
3197    if(io_checkavail=="off") return;
3198    jQuery("#cartWarning").hide();
3199    let hasUnavail = false;
3200    gift_cards_only = false;
3201    simpleCart.each(function (item, x) {
3202      let item_id = item.get("id");
3203      var giftCardValue = item.get("giftcardvalue");
3204      if (giftCardValue && giftCardValue.trim()) {
3205        gift_cards_only = true;
3206      }
3207      let avail = 0;
3208      let stop_loop = false;
3209      if (item.get("availability") != null) avail = item.get("availability").replace(" available", "");
3210      let quantity = Number(item.get("quantity"));
3211      if(item.get("inputtype") == "Map"){
3212        quantity = 1
3213      }
3214      if(typeof item.get("availability") != 'undefined'){
3215        if (quantity > Number(avail) || avail == "not") {
3216          /* item.set("availability","<span style=color:red>"+item.get("availability")+"</span>"); */
3217          setTimeout(function () {
3218            jQuery("#cartItem_" + item_id + " .item-availability").css("color", "red")
3219          }, 10);
3220          //jQuery("#cartWarning").show();
3221          stop_loop = display_cart_warning(item);
3222          hasUnavail = true;
3223        } else {
3224          jQuery("#cartItem_" + item_id + " .item-availability").css("color", "inherit");
3225        }
3226      }else{
3227        event_times = getAvailTimes();
3228        if(!event_times[0] || !event_times[1]){
3229          jQuery("#cartWarning").text("Please set the date and time for your event above.");
3230          jQuery("#cartWarning").show()
3231        }
3232      }
3233
3234      var timeslots_html = item.get("timeslots");
3235      if(typeof timeslots_html != "undefined"){
3236        if(timeslots_html.length > 0){
3237          var timeslot_name = getTimeslotName(timeslots_html);
3238          if(timeslots_html.indexOf("<select") >= 0){
3239            setTimeslotSelected(item, timeslot_name);
3240          }else{
3241            setTimePicker(item, timeslot_name);
3242          }
3243        }
3244      }
3245      if(stop_loop){
3246        return false;
3247      }
3248    });
3249
3250    if(gift_cards_only){
3251      jQuery("#cartCalendarTimePickerContainer").hide();
3252    }else{
3253      jQuery("#cartCalendarTimePickerContainer").show();
3254    }
3255
3256    if(hasUnavail && io_checkavail!="off"){
3257      jQuery(".simpleCart_checkout").removeClass("simpleCart_checkout").addClass("simpleCart_checkout_off").trigger("classChange").click(cartShow);
3258    }else if(io_checkavail!="off"){
3259      jQuery(".simpleCart_checkout_off").removeClass("simpleCart_checkout_off").addClass("simpleCart_checkout").trigger("classChange");
3260    }
3261
3262    add_cart_buttons = document.querySelectorAll("[class*=add_cart_]");
3263    if(add_cart_buttons){
3264      for(let i = 0; i < add_cart_buttons.length; ++i){
3265        add_cart_buttons[i].innerHTML = add_cart_buttons[i].innerHTML.replace("fa-cart-arrow-down", "fa-shopping-cart");
3266        add_cart_buttons[i].innerHTML = add_cart_buttons[i].innerHTML.replace("Added to Cart", "Add to Cart");
3267        add_cart_buttons[i].style.filter = "brightness(100%)";
3268        simpleCart.each(function (item, x) {
3269          if( add_cart_buttons[i].className.includes( item.get("rentalid") ) ){
3270            add_cart_buttons[i].innerHTML = add_cart_buttons[i].innerHTML.replace("fa-shopping-cart", "fa-cart-arrow-down");
3271            add_cart_buttons[i].innerHTML = add_cart_buttons[i].innerHTML.replace("Add to Cart", "Added to Cart");
3272            add_cart_buttons[i].style.filter = "brightness(90%)";
3273          }
3274        });
3275      }
3276    }
3277
3278    /* init time-based items */
3279    if(document.location.href.indexOf("io_quoteform") == -1){
3280      let today = new Date();
3281      let io_dd = today.getDate();
3282      let io_mm = today.getMonth() + 1;
3283      let io_yyyy = today.getFullYear();
3284      if(restrictTimes){
3285        jQuery(".item-timeslots .timepicker").each( function() {
3286          if(this.name.includes("end")){
3287            start_timepicker = jQuery("input[name='"+this.name.replace("end", "start")+"']");
3288            start_timepicker = jQuery(start_timepicker[start_timepicker.length - 1]);
3289
3290            if (io_force_blank_timepickers == "on")
3291            {
3292              start_timepicker.val("");
3293              jQuery(this).timepicker({
3294                startTime: "",
3295                endTime:   "",
3296                minTime:   restrictTimeStart,
3297                maxTime:   restrictTimeEnd,
3298                timeFormat: timeFormat,
3299                separator:  ":",
3300                className:  "elementor-widget-text-editor",
3301                step: 15,
3302                disableTouchKeyboard: true
3303              });
3304            }
3305            else
3306            {
3307              // Existing logic if "force blank" is not active
3308              if (start_timepicker.val() != "") {
3309                jQuery(this).timepicker({
3310                  startTime: new Date(io_mm+"/"+io_dd+"/"+io_yyyy + " " + start_default),
3311                  endTime:   new Date(io_mm+"/"+io_dd+"/"+io_yyyy + " " + end_default),
3312                  minTime:   start_timepicker.val(),
3313                  maxTime:   restrictTimeEnd,
3314                  timeFormat: timeFormat,
3315                  separator:  ":",
3316                  className:  "elementor-widget-text-editor",
3317                  step: 15,
3318                  disableTouchKeyboard: true
3319                });
3320              } else {
3321                jQuery(this).timepicker({
3322                  startTime: new Date(io_mm+"/"+io_dd+"/"+io_yyyy + " " + start_default),
3323                  endTime:   new Date(io_mm+"/"+io_dd+"/"+io_yyyy + " " + end_default),
3324                  minTime:   restrictTimeStart,
3325                  maxTime:   restrictTimeEnd,
3326                  timeFormat: timeFormat,
3327                  separator:  ":",
3328                  className:  "elementor-widget-text-editor",
3329                  step: 15,
3330                  disableTouchKeyboard: true
3331                });
3332              }
3333            }
3334
3335          }
3336          else {
3337            if (io_force_blank_timepickers == "on")
3338            {
3339              start_timepicker.val("");
3340              jQuery(this).timepicker({
3341                startTime: "",
3342                endTime:   "",
3343                minTime:   restrictTimeStart,
3344                maxTime:   restrictTimeEnd,
3345                timeFormat: timeFormat,
3346                separator:  ":",
3347                className:  "elementor-widget-text-editor",
3348                step: 15,
3349                disableTouchKeyboard: true
3350              });
3351            }
3352            else
3353            {
3354              jQuery(this).timepicker({
3355                startTime: new Date(io_mm+"/"+io_dd+"/"+io_yyyy + " " + start_default),
3356                endTime: new Date(io_mm+"/"+io_dd+"/"+io_yyyy + " " + end_default),
3357                minTime:restrictTimeStart,
3358                maxTime:restrictTimeEnd,
3359                timeFormat: timeFormat,
3360                separator: ":",
3361                className: "elementor-widget-text-editor",
3362                step: 15,
3363                disableTouchKeyboard: true
3364              });
3365            }
3366          }
3367        });
3368      } else{
3369        jQuery(".item-timeslots .timepicker").each( function() {
3370          if(this.name.includes("end") != -1){
3371            start_timepicker = jQuery("input[name='"+this.name.replace("end", "start")+"']");
3372            start_timepicker = jQuery(start_timepicker[start_timepicker.length - 1]);
3373            if (io_force_blank_timepickers == "on")
3374            {
3375              start_timepicker.val("");
3376              jQuery(this).timepicker({
3377                startTime: "",
3378                endTime:   "",
3379                minTime:   restrictTimeStart,
3380                maxTime:   restrictTimeEnd,
3381                timeFormat: timeFormat,
3382                separator:  ":",
3383                className:  "elementor-widget-text-editor",
3384                step: 15,
3385                disableTouchKeyboard: true
3386              });
3387            }
3388            else
3389            {
3390              if (start_timepicker.val() != "") {
3391                jQuery(this).timepicker({
3392                  startTime: new Date(io_mm + "/" + io_dd + "/" + io_yyyy + " " + start_default),
3393                  endTime: new Date(io_mm + "/" + io_dd + "/" + io_yyyy + " " + end_default),
3394                  minTime: start_timepicker.val(),
3395                  timeFormat: timeFormat,
3396                  separator: ":",
3397                  className: "elementor-widget-text-editor",
3398                  step: 15,
3399                  disableTouchKeyboard: true
3400                });
3401              } else {
3402                jQuery(this).timepicker({
3403                  startTime: new Date(io_mm + "/" + io_dd + "/" + io_yyyy + " " + start_default),
3404                  endTime: new Date(io_mm + "/" + io_dd + "/" + io_yyyy + " " + end_default),
3405                  timeFormat: timeFormat,
3406                  separator: ":",
3407                  className: "elementor-widget-text-editor",
3408                  step: 15,
3409                  disableTouchKeyboard: true
3410                });
3411              }
3412            }
3413          }
3414          else
3415          {
3416            if (io_force_blank_timepickers == "on")
3417            {
3418              start_timepicker.val("");
3419              jQuery(this).timepicker({
3420                startTime: "",
3421                endTime:   "",
3422                minTime:   restrictTimeStart,
3423                maxTime:   restrictTimeEnd,
3424                timeFormat: timeFormat,
3425                separator:  ":",
3426                className:  "elementor-widget-text-editor",
3427                step: 15,
3428                disableTouchKeyboard: true
3429              });
3430            }
3431            else
3432            {
3433              jQuery(this).timepicker({
3434                startTime: new Date(io_mm + "/" + io_dd + "/" + io_yyyy + " " + start_default),
3435                endTime: new Date(io_mm + "/" + io_dd + "/" + io_yyyy + " " + end_default),
3436                timeFormat: timeFormat,
3437                separator: ":",
3438                className: "elementor-widget-text-editor",
3439                step: 15,
3440                disableTouchKeyboard: true
3441              });
3442            }
3443          }
3444        });
3445      }
3446      setUpTimeRestrictions_timeBasedItems();
3447      if(!event_time_set()){
3448        jQuery(".itemRow .item-total").hide();
3449      }else{
3450        jQuery(".itemRow .item-total").show();
3451      }
3452    }
3453  }
3454  function cart_beforeCheckout(data) {
3455    data.startdate = jQuery("input[name=dateStart]").val();
3456    data.enddate = jQuery("input[name=dateEnd]").val();
3457    if(getCookie("guid")){
3458      data.guid = getCookie("guid");
3459    }else{
3460      data.io_custguid = fetchAndSetCookie("guid");
3461    }
3462    if(io_company_timeslots.length != 0 && io_cartdayselect == "single_day"){
3463      let cart_company_timeslot_selected = jQuery(".ioCartCompanyTimeslots option:selected").first().val();
3464      if(cart_company_timeslot_selected){
3465        setCookie("io_company_timeslot_selected", cart_company_timeslot_selected, 14);
3466        cart_company_timeslot_selected = cart_company_timeslot_selected.split("-");
3467        data.starttime = cart_company_timeslot_selected[0];
3468        data.endtime = cart_company_timeslot_selected[1];
3469      }
3470    } else {
3471      data.starttime = jQuery("input[name=timeStart]").val();
3472      data.endtime = jQuery("input[name=timeEnd]").val();
3473    }
3474  }
3475  function cart_beforeAdd(item) {
3476    var main_id = jQuery(".io_product_container .item_rentalid").first().text();
3477    var item_id = item.get("rentalid");
3478
3479    timeslots = item.get("timeslots");
3480    if(timeslots){
3481      if(timeslots.indexOf("<select") !== -1){
3482        timeslot_name_id_start_pos = timeslots.lastIndexOf('name="timeslot_') + 'name="timeslot_'.length;
3483        timeslot_name_id_end_pos = timeslots.indexOf('"', timeslot_name_id_start_pos);
3484        new_timeslots = [timeslots.slice(0, timeslot_name_id_start_pos), item_id, timeslots.slice(timeslot_name_id_end_pos,timeslots.length)]
3485        new_timeslots = new_timeslots.join("")
3486        item.set("timeslots", new_timeslots);
3487      }else if(timeslots.indexOf("<div name=\"io_timepicker_") !== -1){
3488        timeslot_name_id_start_pos = timeslots.lastIndexOf('name="io_timepicker_') + 'name="io_timepicker_'.length;
3489        timeslot_name_id_end_pos = timeslots.indexOf('"', timeslot_name_id_start_pos);
3490        new_timeslots = [timeslots.slice(0, timeslot_name_id_start_pos), item_id, timeslots.slice(timeslot_name_id_end_pos,timeslots.length)]
3491        new_timeslots = new_timeslots.join("")
3492
3493        timeslot_name_id_start_pos = new_timeslots.lastIndexOf('name="start_timeslot_') + 'name="start_timeslot_'.length;
3494        timeslot_name_id_end_pos = new_timeslots.indexOf('"', timeslot_name_id_start_pos);
3495        new_timeslots = [new_timeslots.slice(0, timeslot_name_id_start_pos), item_id, new_timeslots.slice(timeslot_name_id_end_pos,new_timeslots.length)]
3496        new_timeslots = new_timeslots.join("")
3497
3498        timeslot_name_id_start_pos = new_timeslots.lastIndexOf('name="end_timeslot_') + 'name="end_timeslot_'.length;
3499        timeslot_name_id_end_pos = new_timeslots.indexOf('"', timeslot_name_id_start_pos);
3500        new_timeslots = [new_timeslots.slice(0, timeslot_name_id_start_pos), item_id, new_timeslots.slice(timeslot_name_id_end_pos,new_timeslots.length)]
3501        new_timeslots = new_timeslots.join("")
3502
3503        item.set("timeslots", new_timeslots);
3504      }
3505
3506    }
3507    /* Here we are checking if we are on an item page and if we are adding the main item.
3508           If this is not true, we do not want to continue. Bail here. */
3509    if((!main_id || !item_id)){
3510      return true;
3511    }else if (item_id != main_id){
3512      /* we are adding an accessory, We want to forcibly add the main item first. */
3513      /* IO-26864 */
3514      jQuery("#bookNowBtn").click();
3515    }
3516    let required_dropdown_values = jQuery(".io_acc_li").filter(function() {
3517      let required_ele = jQuery(this).find(".item_required");
3518      let required = 0;
3519      if(required_ele[0]){
3520        required = required_ele[0].outerText;
3521      }
3522      let dropdown_ele = jQuery(this).find(".item_accessorydd");
3523      let dropdown = 0;
3524      if(dropdown_ele[0]){
3525        dropdown = dropdown_ele[0].outerText;
3526      }
3527      return (required > 0 && dropdown == 1)
3528    });
3529    var required_selected = true;
3530    required_dropdown_values.each(function() {
3531      required_value_id = jQuery(this).find(".item_rentalid")[0].outerText;
3532      required_value_id = required_value_id.split("_");
3533      required_value_id = required_value_id[required_value_id.length-1];
3534
3535      let selected = jQuery("[id^='io_acc_"+required_value_id+"']").filter(function() {
3536        return this["selected"];
3537      });
3538
3539      //IO-22431 - This wasnt catching if [0] was undefined
3540      if(jQuery(this).find(".io_acc_li_name")[0] != undefined){
3541        required_value_name = jQuery(this).find(".io_acc_li_name")[0].outerText ? jQuery(this).find(".io_acc_li_name")[0].outerText : "";
3542      }
3543      if(selected.length < jQuery(this).find(".item_required")[0].outerText){
3544        if(item_id == main_id){
3545          alert(required_value_name+" is a required field.");
3546        }
3547        required_selected = false;
3548      }
3549
3550      if(!required_selected){
3551        return false;
3552      }
3553      return true;
3554    });
3555    if(!required_selected){
3556      return false;
3557    }
3558
3559    /* IO-14857 */
3560    if(jQuery(".io_product_measurement_price").length > 0){
3561      let units;
3562      if(jQuery(".io_product_infobox .item_qtytype").text() == "Area"){
3563        units = "sq meters"
3564        if(country === "US") units = "sq feet"
3565      }else if(jQuery(".io_product_infobox .item_qtytype").text() == "Perimeter"){
3566        units = "meters"
3567        if(country === "US") units = "feet"
3568      }
3569      item.set("units", units);
3570      item.set("quantity", jQuery(".io_measure_price_raw_measurement").text());
3571    }
3572  }
3573  function cart_afterAdd(item) {
3574    /*loading animation*/
3575    ioCartLoaderActivate();
3576    setTimeout(function(){ if(io_cart_loading_active && io_cart_loading_count === 0){ io_cart_loading_active=false; ioCartShowOverlay(false);} }, 300);
3577
3578    /* Add required Accessories */
3579    let required_accs = jQuery("[id^=io_acc_required_]").filter(function() {
3580      return parseInt(this["outerText"]) > 0 && this.parentElement.style['display'] != 'none';
3581    });
3582    required_accs.each(function(index) {
3583      simpleCart.parse_html_and_add(this, true);
3584    });
3585
3586
3587    let selected_values = jQuery("[id^=io_acc_]").filter(function() {
3588      return this["selected"];
3589    });
3590
3591    selected_values.each(function() {
3592      let info = {};
3593      let rid = jQuery(this).find(".item_rentalid")[0].outerText;
3594      let split_rid = rid.split("_");
3595      if(split_rid.length == 3){
3596        let parent_rid = split_rid[1];
3597        let main_item_rid = split_rid[0];
3598        info["acc_dd_parent_limit"] = jQuery("#io_acc_accessorylimit_"+main_item_rid+"_"+parent_rid)[0].outerText;
3599      }else{
3600        info["acc_dd_parent_limit"] = "0";
3601      }
3602      info["name"]         = jQuery(this).find(".io_acc_li_name")[0].outerText
3603      info["qtyincrement"] = jQuery(this).find(".item_qtyincrement")[0].outerText
3604      info["quantity"]     = jQuery(this).find(".item_required")[0].outerText > 0 ? jQuery(this).find(".item_required")[0].outerText : 1;
3605      info["rentalid"]     = jQuery(this).find(".item_rentalid")[0].outerText
3606      info["linkqty"]      = jQuery(this).find(".item_linkqty")[0].outerText
3607      info["pagename"]     = io_pagename;
3608      if(jQuery(this).find(".io_acc_li_img_thumb")[0]){
3609        info["image"] = jQuery(this).find(".io_acc_li_img_thumb")[0].src
3610      }
3611      let already_added = simpleCart.items().filter((item) => item.get("rentalid").startsWith(split_rid[0]+"_"+split_rid[1]));
3612      if(jQuery(this).find(".item_accessorydd")[0].outerText != 1 &&
3613         (info["acc_dd_parent_limit"] == "0" || already_added.length < info["acc_dd_parent_limit"]) ){
3614        simpleCart.add(info, true);
3615      }
3616    });
3617
3618    checkAvailCartOnly(true);
3619
3620    let last_upsell_call_time = Date.now() - last_upsell_call;
3621    if(in_cart_upsell && last_upsell_call_time > 2000){
3622      let rental_ids = "";
3623
3624      /* Get the last element in the cart. This is the last item added. */
3625      last_added = jQuery("[id^='cartItem_']").last();
3626      if(last_added.length){
3627        last_added_children = last_added.children();
3628        for(let i = 0; i < last_added_children.length; ++i){
3629          if(last_added_children[i].className == "item-rentalid") {
3630            rental_ids += last_added_children[i].innerText + "|";
3631          }
3632        }
3633      }
3634
3635      if(rental_ids.length>0 && jQuery("#cartPopover").attr("class") == "cartIn"){
3636        var times = getAvailTimes();
3637        last_upsell_call = Date.now();
3638        getUpsellsCall(times[0],times[1],times[2],rental_ids,updateCartUpsell);
3639      }
3640      else{
3641        jQuery("#cart-carousel-container").hide();
3642      }
3643    }
3644
3645    if(io_company_timeslots.length != 0 && io_cartdayselect == "single_day"){
3646      filterTimeslotsByDay_itemTimeslots();
3647      simpleCart.update();
3648    }
3649
3650    if (jQuery(".cartInfo.open,.ioCart.open, .ioCart_link.open").length == 0) {
3651      setTimeout(function () {
3652        cartShow();
3653      }, 100);
3654    }
3655
3656    if(simpleCart.items().length==0){
3657      jQuery(".simpleCart_checkout").hide()
3658    }else{
3659      jQuery(".simpleCart_checkout").show();
3660    }
3661
3662    if(simpleCart.items().length > 0){
3663      let headerBookButton = jQuery("a[href$='io_quoteform/']");
3664      headerBookButton.addClass("ioCart_link");
3665      headerBookButton.attr("href", "javascript:;");
3666    }
3667
3668    checkRestrictedDeliveries()
3669
3670    if(jQuery("#ioInfoHeader").length){
3671      header_increment_step();
3672    }
3673  }
3674  function cart_afterQtyChange(){
3675    let last_checkAvail_call_time = Date.now() - last_checkAvail_call;
3676    if(last_checkAvail_call_time > 2000){
3677      /*loading animation*/
3678      ioCartLoaderActivate();
3679      setTimeout(function(){ if(io_cart_loading_active && io_cart_loading_count === 0){ io_cart_loading_active=false; ioCartShowOverlay(false);} }, 300);
3680      last_checkAvail_call = Date.now();
3681      checkAvailCart();
3682      checkAvailCartTimeslots();
3683    }
3684  }
3685  function cart_hideTimepickerWrapper(){
3686    jQuery(".ui-timepicker-wrapper").hide();
3687  }
3688  function cart_beforeRemove() {
3689    last_remove = Date.now();
3690  }
3691  function cart_afterRemove(removed_item){
3692    checkAvailCart();
3693    last_upsell_call_time = Date.now() - last_upsell_call;
3694    if(in_cart_upsell && last_upsell_call_time > 2000){
3695      rental_ids = getAllRentalIDsFromCart();
3696      if(rental_ids.length>0 && jQuery("#cartPopover").attr("class") == "cartIn"){
3697        var times = getAvailTimes();
3698        last_upsell_call = Date.now();
3699        getUpsellsCall(times[0],times[1],times[2],rental_ids,updateCartUpsell);
3700      }
3701      else{
3702        jQuery("#cart-carousel-container").hide();
3703      }
3704    }
3705
3706    /* IO-24060 */
3707    simpleCart.items().forEach(function (item, index) {
3708      let expression = '^' + removed_item.get('rentalid') + '(?:[_:]\\d+)*';
3709      if(item.get("rentalid").match(expression)){
3710        item.remove();
3711      }
3712    });
3713
3714
3715    checkAvailCartTimeslots();
3716    checkRestrictedDeliveries();
3717    if(simpleCart.items().length==0){
3718      jQuery(".simpleCart_checkout").hide()
3719    }else{
3720      jQuery(".simpleCart_checkout").show();
3721    }
3722
3723    if(jQuery("#ioInfoHeader").length && simpleCart.items().length == 0){
3724      jQuery("#io-step-3").removeClass("io-step-active");
3725      jQuery("#io-step-2").addClass("io-step-active");
3726      jQuery("#io-step-2").removeClass("io-step-done")
3727    }
3728  }
3729  function cart_afterLoad(){
3730    var items_removed = false;
3731    simpleCart.items().forEach(function(item){
3732      if(item.get("pagename") != io_pagename){
3733        item.remove()
3734        items_removed = true;
3735      }
3736    })
3737    if(items_removed){
3738      alert("Some items in the cart are from a different location and have been removed.");
3739    }
3740  }
3741  /*</editor-fold>*/
3742
3743  /*<editor-fold defaultstate="collapsed" desc="Date/Time Object/String Conversion Functions">*/
3744  function getFormatteddate(date_obj){
3745    if(dateFormat.substring(0,1)=='d'){
3746      let month = date_obj.getMonth() + 1;
3747      formatteddate = date_obj.getDate()+'/'+month+'/'+date_obj.getFullYear();
3748    }else{
3749      let month = date_obj.getMonth() + 1;
3750      formatteddate = month+'/'+date_obj.getDate()+'/'+date_obj.getFullYear();
3751    }
3752    return formatteddate;
3753  }
3754
3755  function getFormattedtime(date_obj){
3756    var hour24 = false;
3757    var ampm = 'am';
3758    var starttime = jQuery('[name=timeStart]').val();
3759    if(starttime.length>0 && starttime.indexOf('m')==-1) hour24 = true;
3760    if(hour24){ //24 hour return
3761      return date_obj.getHours()+':'+pad(date_obj.getMinutes(),2);
3762    }else{ //12 hour return
3763      var hour = date_obj.getHours();
3764      if(hour==12) ampm='pm';
3765      if(hour==0) hour=12;
3766      if(hour>12){
3767        hour-=12;
3768        ampm='pm';
3769      }
3770      return hour+':'+pad(date_obj.getMinutes(),2)+' '+ampm;
3771    }
3772  }
3773
3774  function buildDateobjectstring(date,dateformat,time){
3775    var ampm = 'am';
3776    var hour24 = false;
3777    if(typeof date == "undefined") return;
3778    if(typeof dateformat == "undefined") return;
3779    var start_arr = date.split('/');
3780    if(dateformat.substring(0,1)=='d'){
3781      date = start_arr[2]+'/'+pad(start_arr[1],2)+'/'+pad(start_arr[0],2);
3782    }else{
3783      date = start_arr[2]+'/'+pad(start_arr[0],2)+'/'+pad(start_arr[1],2);
3784    }
3785    if(time.length>0 && time.indexOf('m')==-1) hour24 = true;
3786    if(hour24){
3787      try{
3788        var time_arr = time.split(':');
3789        var hour = parseInt(time_arr[0]);
3790        var min = pad(time_arr[1], 2);
3791        time = hour + ':' + min + ':00';
3792      }catch(err){
3793        time = "";
3794      }
3795    }else {
3796      try {
3797        time = time.replace('am', "").replace(' ', "");
3798        if (time.indexOf('pm') != -1) ampm = 'pm';
3799        time = time.replace('pm', "").replace(' ', "");
3800        var time_arr = time.split(':');
3801        var hour = parseInt(time_arr[0]);
3802        var min = pad(time_arr[1], 2);
3803        if (ampm == 'pm') {
3804          if (hour < 12) hour += 12;
3805        } else if (ampm == 'am' && hour == 12) {
3806          hour -= 12;
3807        }
3808        hour = pad(hour, 2);
3809        time = hour + ':' + min + ':00';
3810      } catch (err) {
3811        time = "";
3812      }
3813    }
3814    return date+' '+time;
3815  }
3816
3817  function pad(num, size) {
3818    var s = num+"";
3819    while (s.length < size) s = "0" + s;
3820    return s;
3821  }
3822  function convertDateStringtoDateObject(date_str, time_str=null){
3823    if(date_str){
3824      split_date_str = date_str.split("/");
3825      /* Parse start and end time. */
3826      if(time_str){
3827        /* Check and see if we are in 12 hour format, if so convert it to 24 hour format. */
3828        split_time_str = convert12HourTo24Hour(time_str);
3829      }else{
3830        /* If we do not have a time, then default to zeros */
3831        split_time_str = [0, 0];
3832      }
3833      /* Create date object based off our set date format. */
3834      date_obj = buildDateObj(split_date_str, split_time_str);
3835      return date_obj;
3836    }else{
3837      return new Date();
3838    }
3839  }
3840
3841  function buildDateObj(split_date_str, split_time_str){
3842    if (dateFormat == "d/m/yy"){
3843      return new Date(split_date_str[2], (+split_date_str[1] - 1).toString(), split_date_str[0],
3844              split_time_str[0], split_time_str[1]);
3845    }else{
3846      return new Date(split_date_str[2], (+split_date_str[0] - 1).toString(), split_date_str[1],
3847              split_time_str[0], split_time_str[1]);
3848    }
3849  }
3850
3851  function convert12HourTo24Hour(time_str){
3852    /* This function returns an array containing hours and minutes of provided string in 24 hour format. */
3853    /* This is primarily used for creating JS Date objects */
3854    split_time = time_str.split(":");
3855
3856    /* We are in 12 hour format if there is an "m" attached to minutes portion. */
3857    if(split_time[1].toLowerCase().search("m") != -1) {
3858      let separated_minutes = split_time[1].split(" ");
3859      if(separated_minutes.length==1){
3860        split_time[1] = split_time[1].replace("am"," am");
3861        split_time[1] = split_time[1].replace("pm"," pm");
3862        separated_minutes = split_time[1].split(" ");
3863      }
3864      let minutes = separated_minutes[0];
3865      let modifier = separated_minutes[1];
3866      split_time[1] = minutes;
3867
3868      /* First assume that if the hours are 12, then its midnight. */
3869      if(split_time[0] == "12"){
3870        split_time[0] = "00";
3871      }
3872      /* Second if there is a "p" in the modifier, then add twelve to the hours. */
3873      if(typeof modifier != "undefined"){
3874        if(modifier.toLowerCase().search("p") != -1){
3875          split_time[0] = (parseInt(split_time[0], 10) + 12);
3876        }
3877      }
3878    }
3879    return split_time;
3880  }
3881  /*</editor-fold>*/
3882
3883  /*<editor-fold defaultstate="collapsed" desc="Cart Show and Hide">*/
3884  function cartShow() {
3885    jQuery("#cartPopover").show();
3886    jQuery("#cartPopover").removeClass("cartOut");
3887    jQuery("#cartPopover").addClass("cartIn");
3888    jQuery(".cartInfo,.ioCart,.ioCart_link").addClass("open");
3889    if (/Mobi|Android/i.test(navigator.userAgent)) {
3890      document.body.style.overflow = "hidden";
3891    }
3892    /* jQuery(this).one("click", cartHide); */
3893    jQuery(".cartInfo").unbind("click").one("click", function(event){
3894      event.stopPropagation();
3895      event.stopImmediatePropagation();
3896      cartHide();
3897    });
3898    jQuery(".ioCart, .ioCart_link").unbind("click").one("click", function(event){
3899      event.stopPropagation();
3900      event.stopImmediatePropagation();
3901      cartHide();
3902    });
3903    jQuery(".cartIcon").removeClass("fa-shopping-cart").addClass("fa-close");
3904    if(simpleCart.items().length==0){
3905      jQuery(".simpleCart_checkout").hide()
3906    }else{
3907      jQuery(".simpleCart_checkout").show();
3908    }
3909
3910    checkAvailCartOnly();
3911
3912    last_upsell_call_time = Date.now() - last_upsell_call;
3913    if(in_cart_upsell && last_upsell_call_time > 2000){
3914      rental_ids = getAllRentalIDsFromCart();
3915      if(rental_ids.length>0 && jQuery("#cartPopover").attr("class") == "cartIn"){
3916        var times = getAvailTimes();
3917        last_upsell_call = Date.now();
3918        getUpsellsCall(times[0],times[1],times[2],rental_ids,updateCartUpsell);
3919      }
3920      else{
3921        jQuery("#cart-carousel-container").hide();
3922      }
3923    }
3924  }
3925
3926  function cartHide() {
3927    jQuery("#cartPopover").removeClass("cartIn");
3928    jQuery("#cartPopover").addClass("cartOut");
3929    if (/Mobi|Android/i.test(navigator.userAgent)) {
3930      document.body.style.overflow = "auto";
3931    }
3932    /* jQuery("#cartPopover").hide(); */
3933    jQuery(".cartInfo,.ioCart, .ioCart_link").removeClass("open");
3934    /* jQuery(this).one("click", cartShow); */
3935    jQuery(".cartInfo").unbind("click").one("click", function(event){
3936      event.stopPropagation();
3937      event.stopImmediatePropagation();
3938      cartShow();
3939    });
3940    jQuery(".ioCart, .ioCart_link").unbind("click").one("click", function(event){
3941      event.stopPropagation();
3942      event.stopImmediatePropagation();
3943      cartShow();
3944    });
3945    jQuery(".cartIcon").removeClass("fa-close").addClass("fa-shopping-cart");
3946  }
3947  /*
3948    function set_date_cookie(){
3949        if(this.id.indexOf("start_") !== -1){
3950            setCookie("dateStart", this.value, 14);
3951        } else if(this.id.indexOf("end_") !== -1){
3952            setCookie("dateEnd", this.value, 14);
3953        }
3954    }
3955    */
3956  jQuery(document).ready(function () {setTimeout(simpleCart.init, 3);});
3957  /*</editor-fold>*/
3958
3959  /*<editor-fold defaultstate="collapsed" desc="Check Avail All Call">*/
3960  function checkAvailAll(){
3961    checkAvailCart();
3962    checkAvailCartTimeslots();
3963    checkAvailFilter();
3964  }
3965  /*</editor-fold>*/
3966
3967  /*<editor-fold defaultstate="collapsed" desc="Check Avail - Page">*/
3968  /* for items on page not in cart */
3969  function checkAvailFilter() {
3970    let rental_names = "";
3971    let rental_ids = "";
3972    let batch_ids = [];
3973    let cart_rental_names = "";
3974    let cart_rental_ids = "";
3975    let item_id = "";
3976    let main_id = "";
3977    jQuery(".item_encoded").each(function(){
3978      rental_names += this.innerText + "|";
3979    });
3980    jQuery(".io_product_infobox .item_rentalid").each(function(){
3981      rental_ids += this.innerText + "|";
3982      item_id = this.innerText;
3983      main_id = this.innerText;
3984    });
3985    let batch_count = 0;
3986    let batch_index = 0;
3987    // If we have rental id string set, then we don't want to include availability checking for fpw items in header
3988    // IO-31498
3989    if(!rental_ids) {
3990      jQuery(".io_item2_list_inner .item_rentalid, .io_item2_listrent .item_rentalid").each(function () {
3991        /*
3992        if(rental_ids.indexOf(this.innerText+"|") == -1){
3993          rental_ids += this.innerText + "|";
3994        }
3995        */
3996        if (batch_count < 9) {
3997          if (!batch_ids.length) batch_ids.push("")
3998          if (!rid_in_batch(this.innerText + "|", batch_ids).length) {
3999            batch_ids[batch_index] += this.innerText + "|";
4000            batch_count++;
4001          }
4002        } else {
4003          if (!rid_in_batch(this.innerText + "|", batch_ids).length) {
4004            batch_ids[batch_index] += this.innerText + "|";
4005            batch_index++;
4006            batch_count = 0;
4007            batch_ids.push("");
4008          }
4009        }
4010      });
4011    }
4012    simpleCart.each(function (item, x) {
4013      var cart_name = item.get("encoded");
4014      if(cart_name==null){
4015        cart_name = encodeURIComponent(item.get("name"));
4016        cart_name = encodeURIComponent(decodeURIComponent(cart_name).replace(/[\u2032\u2019]+/ig,"'"));
4017      }
4018      let quantity = item.get("quantity");
4019      if(item.get("inputtype") == "Map"){
4020        quantity = 1
4021      }
4022      cart_rental_names += cart_name + "-" + quantity + "|";
4023      var cart_id = item.get("rentalid");
4024      cart_rental_ids += cart_id + "-" + quantity + "|";
4025    });
4026    /* #14494 IO-13779 */
4027    let delivery_methods_arr = [];
4028    var delivery_prices = [];
4029    if(io_delivery_prices){
4030      if(Object.keys(io_delivery_prices["override"]).includes(item_id)){
4031        delivery_prices = io_delivery_prices["override"][item_id]
4032      }else{
4033        if(!item_is_in_overrride_group(main_id)){
4034          delivery_prices = io_delivery_prices["default"]
4035        }
4036      }
4037      for(item in io_delivery_methods){
4038        if(delivery_prices.includes(io_delivery_methods[item]["id"])){
4039          delivery_methods_arr.push(item);
4040        }
4041      }
4042    }
4043
4044    let custom_prices_arr = [];
4045    if(io_custom_prices){
4046      if(Object.keys(io_custom_prices["override"]).includes(item_id.replace(":", '_'))){
4047        custom_prices_arr = io_custom_prices["override"][item_id.replace(":", '_')]
4048      }else{
4049        if(!item_is_in_overrride_group(main_id)){
4050          custom_prices_arr = io_custom_prices["default"]
4051        }
4052      }
4053    }
4054
4055    /* IO-13548 */
4056    if(io_accessory_price == "on"){
4057      let times = getAvailTimes();
4058      let acc_rental_id_str = getAccIDforPrice();
4059      let return_id = 0;
4060      if(acc_rental_id_str != ""){
4061        checkAvailCall(times[0],times[1],times[2],rental_names,acc_rental_id_str,displayAccessoryPrices,0,[],[],return_id,0,null,1,"",1);
4062      }
4063    }
4064
4065    let times = getAvailTimes();
4066    if(rental_names.length>0){
4067      if(use_weekday_weekend && rental_ids && !item_is_in_overrride_group(main_id)){
4068        let return_id = 0;
4069        let week_weekend = "";
4070        if(rental_ids != ""){
4071          return_id = 1;
4072          week_weekend = get_week_weekend_times(times, main_id);
4073          checkAvailCall(week_weekend["weekday"][0],week_weekend["weekday"][1],week_weekend["weekday"][2],rental_names,rental_ids,updatePageAvail_weekday,0,cart_rental_ids,cart_rental_names,return_id,1);
4074          checkAvailCall(week_weekend["weekend"][0],week_weekend["weekend"][1],week_weekend["weekend"][2],rental_names,rental_ids,updatePageAvail_weekend,0,cart_rental_ids,cart_rental_names,return_id,1);
4075        }
4076      }
4077      let return_id = 0;
4078      if(rental_ids != "" || batch_ids.length){
4079        return_id = 1;
4080      }
4081      if(delivery_methods_arr && rental_ids){
4082        delivery_methods_arr.forEach(function(delivery_method){
4083          checkAvailCall(times[0],times[1],times[2],rental_names,rental_ids,updatePageAvail_delivery_method,0,cart_rental_ids,cart_rental_names,return_id,1,delivery_method);
4084        });
4085      }
4086      if(custom_prices_arr && rental_ids){
4087        custom_prices_arr.forEach(function(custom_price){
4088          let start_date = times[0];
4089          let start_time = times[1];
4090          if(!start_date){
4091            start_date = getFormatteddate(new Date());
4092          }
4093          if(!start_time){
4094            start_time = io_default_start_time;
4095          }
4096          checkAvailCall(start_date,start_time,custom_price['duration'],rental_names,rental_ids,updatePageAvail_custom_price,0,cart_rental_ids,cart_rental_names,return_id,1,"",1,custom_price['name']);
4097        });
4098      }
4099
4100      if(batch_ids.length){
4101        batch_ids.forEach(function(rids){
4102          return checkAvailCall(times[0],times[1],times[2],"",rids,updatePageAvail,0,cart_rental_ids,cart_rental_names,return_id,1,null,1,"",1);
4103        });
4104      }else{
4105        return checkAvailCall(times[0],times[1],times[2],rental_names,rental_ids,updatePageAvail,0,cart_rental_ids,cart_rental_names,return_id,1,null,1);
4106      }
4107    }
4108  }
4109
4110  function item_is_in_overrride_group(item_id){
4111    for(const group_id in io_prices['override_groups']){
4112      for(const search_id in io_prices['override_groups'][group_id]){
4113        if(search_id == item_id){
4114          return true;
4115        }
4116      }
4117    }
4118    return false
4119  }
4120
4121  function get_week_weekend_times(times, rid){
4122    /* Create a copy instead of reference.*/
4123    let temp_times = JSON.parse(JSON.stringify(times));
4124    let start_date = temp_times[0];
4125    if(!start_date){
4126      start_date = getFormatteddate(new Date());
4127      temp_times[0] = start_date;
4128    }
4129    temp_times[1] = io_default_start_time
4130    var newDate1 = convertDateStringtoDateObject(start_date, io_default_start_time);
4131    var newDate2 = convertDateStringtoDateObject(start_date, io_default_end_time);
4132    let time_duration = ((newDate2 - newDate1) / 3600) / 1000;
4133    temp_times[2] = time_duration;
4134    let day = new Date(newDate1).getDay(); //IO-28150 - Other countries put the date dd/mm/yy so using the formatted newDate1 instead of start_date accounts for this
4135    let weekday_weekend = {};
4136    weekday_weekend["rid"] = rid;
4137    if(io_weekendDefine == "friday-sunday"){
4138      if(day == 5 || day == 6 || day == 0){
4139        weekday_weekend["weekend"] = JSON.parse(JSON.stringify(temp_times));
4140        temp_times[0] = getNextMonday(temp_times[0]);
4141        weekday_weekend["weekday"] = JSON.parse(JSON.stringify(temp_times));
4142      }else if(day == 1 || day == 2 || day == 3 || day == 4){
4143        weekday_weekend["weekday"] = JSON.parse(JSON.stringify(temp_times));
4144        temp_times[0] = getNextSaturday(temp_times[0]);
4145        weekday_weekend["weekend"] = JSON.parse(JSON.stringify(temp_times));
4146      }
4147    }else if(io_weekendDefine == "saturday-sunday") {
4148      if (day == 6 || day == 0) {
4149        weekday_weekend["weekend"] = JSON.parse(JSON.stringify(temp_times));
4150        temp_times[0] = getNextMonday(temp_times[0]);
4151        weekday_weekend["weekday"] = JSON.parse(JSON.stringify(temp_times));
4152      } else if (day == 1 || day == 2 || day == 3 || day == 4 || day == 5) {
4153        weekday_weekend["weekday"] = JSON.parse(JSON.stringify(temp_times));
4154        temp_times[0] = getNextSaturday(temp_times[0]);
4155        weekday_weekend["weekend"] = JSON.parse(JSON.stringify(temp_times));
4156      }
4157    }else if (io_weekendDefine == "friday-monday"){
4158      if(day == 5 || day == 6 || day == 0 || day == 1){
4159        weekday_weekend["weekend"] = JSON.parse(JSON.stringify(temp_times));
4160        temp_times[0] = getNextTuesday(temp_times[0]);
4161        weekday_weekend["weekday"] = JSON.parse(JSON.stringify(temp_times));
4162      }else if(day == 2 || day == 3 || day == 4){
4163        weekday_weekend["weekday"] = JSON.parse(JSON.stringify(temp_times));
4164        temp_times[0] = getNextSaturday(temp_times[0]);
4165        weekday_weekend["weekend"] = JSON.parse(JSON.stringify(temp_times));
4166      }
4167    }
4168    return weekday_weekend;
4169  }
4170
4171  /*
4172        helper function found here:
4173        https://bobbyhadz.com/blog/javascript-get-date-of-next-monday#:~:text=To%20get%20the%20next%20Monday%2C%20we%3A&text=If%20the%20remainder%20is%20equal,month%20for%20the%20next%20Monday.
4174    */
4175  function getNextMonday(date_str) {
4176    const date_obj = parseDate(date_str, dateFormat);
4177
4178    const nextMonday = new Date(
4179            date_obj.setDate(
4180                    date_obj.getDate() + ((7 - date_obj.getDay() + 1) % 7 || 7),
4181            ),
4182    );
4183
4184    return getFormatteddate(nextMonday);
4185  }
4186
4187    function getNextTuesday(date_str) {
4188      const date_obj = parseDate(date_str, dateFormat);
4189
4190      const nextMonday = new Date(
4191              date_obj.setDate(
4192                      date_obj.getDate() + ((7 - date_obj.getDay() + 2) % 7 || 7),
4193              ),
4194      );
4195
4196      return getFormatteddate(nextMonday);
4197    }
4198
4199  function parseDate(date_str, format) {
4200      var parts = date_str.split(/[/.-]/);
4201      var day, month, year;
4202
4203      if (format === "m/d/yy") {
4204          month = parseInt(parts[0]) - 1;
4205          day = parseInt(parts[1]);
4206          year = parseInt(parts[2]) + (parts[2].length === 2 ? 2000 : 0);
4207      } else if (format === "d/m/yy") {
4208          day = parseInt(parts[0]);
4209          month = parseInt(parts[1]) - 1;
4210          year = parseInt(parts[2]) + (parts[2].length === 2 ? 2000 : 0);
4211      } else if (format === "yy/m/d") {
4212          year = parseInt(parts[0]) + (parts[0].length === 2 ? 2000 : 0);
4213          month = parseInt(parts[1]) - 1;
4214          day = parseInt(parts[2]);
4215      } else {
4216          throw new Error("Unsupported date format");
4217      }
4218
4219      return new Date(year, month, day);
4220  }
4221
4222  /* modified from function above */
4223  function getNextSaturday(date_str) {
4224    const date_obj = parseDate(date_str, dateFormat);
4225
4226    const next_friday = new Date(
4227            date_obj.setDate(
4228                    date_obj.getDate() + ((7 - date_obj.getDay() + 6) % 7 || 7),
4229            ),
4230    );
4231
4232    return getFormatteddate(next_friday);
4233  }
4234
4235  function updatePageAvail(data){
4236    let use_id = data["return_id"]
4237    delete data["return_id"];
4238    if(use_id == 1){
4239      updatePageAvail_itemIDs(data)
4240    }else{
4241      updatePageAvail_itemNames(data);
4242    }
4243  }
4244  function updatePageAvail_weekday(data){
4245    jQuery.each(data, function (rental_id, qty){
4246      if (rental_id == "price") {
4247        var prices = qty;
4248        jQuery.each(prices, function (price_id, amt) {
4249          let cust_price = document.querySelector(".io_product_cust_price_weekday");
4250          if(cust_price==undefined){
4251            var first_price = document.querySelector(".io_product_price_box");
4252            if(first_price != null){
4253              cust_price = first_price.cloneNode(true);
4254              /* clear all classes */
4255              cust_price.className = "";
4256              cust_price.classList.add("io_product_price_box");
4257              cust_price.classList.add("io_product_cust_price_weekday");
4258              cust_price.style.display = "none";
4259              first_price.before(cust_price);
4260            }
4261          }
4262
4263          main_item_id = jQuery(".io_product_infobox .item_rentalid").first().text();
4264          if(main_item_id == price_id && cust_price!=undefined){
4265            if(typeof amt == "string") amt = Number(amt.replace(",",""));
4266            cust_price.querySelector("p:nth-child(1)").innerHTML=simpleCart.toCurrency(amt);
4267            let times = getAvailTimes();
4268            cust_price.querySelector("p:nth-child(2)").innerHTML = io_weekDayText;
4269            if(amt>0){
4270              cust_price.style.display = "grid";
4271            }else{
4272              cust_price.style.display = "none";
4273            }
4274          }
4275        });
4276      }
4277    });
4278  }
4279  function updatePageAvail_delivery_method(data){
4280    var delivery_method = data["delivery_method"]
4281    jQuery.each(data, function (rental_id, qty){
4282      if (rental_id == "price") {
4283        var prices = qty;
4284        jQuery.each(prices, function (price_id, amt) {
4285          let cust_price = document.querySelector(".io_product_cust_price_delivery_method"+io_delivery_methods[delivery_method]["id"]);
4286          let rid = jQuery(".io_product_container .item_rentalid").first().text();
4287          if(cust_price==undefined && !io_delivery_methods[delivery_method]["restricted"].includes(rid)){
4288            var first_price = document.querySelector(".io_product_price_box");
4289            if(first_price != null){
4290              cust_price = first_price.cloneNode(true);
4291              /* clear all classes */
4292              cust_price.className = "";
4293              cust_price.classList.add("io_product_price_box");
4294              cust_price.classList.add("io_product_cust_price_delivery_method"+io_delivery_methods[delivery_method]["id"]);
4295              cust_price.style.display = "none";
4296              first_price.before(cust_price);
4297            }
4298          }
4299
4300          main_item_id = jQuery(".io_product_infobox .item_rentalid").first().text();
4301          if(main_item_id == price_id && cust_price!=undefined){
4302            if(typeof amt == "string") amt = Number(amt.replace(",",""));
4303            cust_price.querySelector("p:nth-child(1)").innerHTML=simpleCart.toCurrency(amt);
4304            let times = getAvailTimes();
4305            cust_price.querySelector("p:nth-child(2)").innerHTML = make_live_price_editable_time(times, delivery_method);
4306            if(amt>0 && event_time_set()){
4307              cust_price.style.display = "grid";
4308            }else{
4309              cust_price.style.display = "none";
4310            }
4311          }
4312        });
4313      }
4314    });
4315  }
4316  function updatePageAvail_custom_price(data, custom_price_name){
4317    let custom_price_class_name = custom_price_name.replace(/[\s:./()!]/g, '_');
4318    jQuery.each(data, function (rental_id, qty){
4319      if (rental_id == "price") {
4320        var prices = qty;
4321        jQuery.each(prices, function (price_id, amt) {
4322          let cust_price = document.querySelector(".io_product_cust_price_"+custom_price_class_name);
4323          let rid = jQuery(".io_product_container .item_rentalid").first().text();
4324          if(cust_price==undefined){
4325            var first_price = document.querySelector(".io_product_price_box");
4326            if(first_price != null){
4327              cust_price = first_price.cloneNode(true);
4328              /* clear all classes */
4329              cust_price.className = "";
4330              cust_price.classList.add("io_product_price_box");
4331              cust_price.classList.add("io_product_cust_price_"+custom_price_class_name);
4332              cust_price.style.display = "none";
4333              first_price.before(cust_price);
4334            }
4335          }
4336
4337          main_item_id = jQuery(".io_product_infobox .item_rentalid").first().text();
4338          if(main_item_id == price_id && cust_price!=undefined){
4339            if(typeof amt == "string") amt = Number(amt.replace(",",""));
4340            cust_price.querySelector("p:nth-child(1)").innerHTML=simpleCart.toCurrency(amt);
4341            cust_price.querySelector("p:nth-child(2)").innerHTML = "for " + custom_price_name;
4342            if(amt>0){
4343              cust_price.style.display = "grid";
4344            }else{
4345              cust_price.style.display = "none";
4346            }
4347          }
4348        });
4349      }
4350    });
4351  }
4352  function updatePageAvail_weekend(data){
4353    jQuery.each(data, function (rental_id, qty){
4354      if (rental_id == "price") {
4355        var prices = qty;
4356        jQuery.each(prices, function (price_id, amt) {
4357          let cust_price = document.querySelector(".io_product_cust_price_weekend");
4358          if(cust_price==undefined){
4359            var first_price = document.querySelector(".io_product_price_box");
4360            if(first_price != null){
4361              cust_price = first_price.cloneNode(true);
4362              /* clear all classes */
4363              cust_price.className = "";
4364              cust_price.classList.add("io_product_price_box");
4365              cust_price.classList.add("io_product_cust_price_weekend");
4366              cust_price.style.display = "none";
4367              first_price.before(cust_price);
4368            }
4369          }
4370
4371          main_item_id = jQuery(".io_product_infobox .item_rentalid").first().text();
4372          if(main_item_id == price_id && cust_price!=undefined){
4373            if(typeof amt == "string") amt = Number(amt.replace(",",""));
4374            cust_price.querySelector("p:nth-child(1)").innerHTML=simpleCart.toCurrency(amt);
4375            let times = getAvailTimes();
4376            cust_price.querySelector("p:nth-child(2)").innerHTML = io_weekEndText;
4377            if(amt>0){
4378              cust_price.style.display = "grid";
4379            }else{
4380              cust_price.style.display = "none";
4381            }
4382          }
4383        });
4384      }
4385    });
4386  }
4387  function updatePageAvail_itemIDs(data){
4388    jQuery.each(data, function (rental_id, qty){
4389      if (rental_id == "price"  && jQuery(".io_product_infobox .item_inputtype").text() != "Map") {
4390        var prices = qty;
4391        jQuery.each(prices, function (price_id, amt) {
4392          let cust_price = document.querySelector(".io_product_cust_price");
4393          if(cust_price==undefined){
4394            var first_price = document.querySelector(".io_product_price_box");
4395            if(first_price != null){
4396              cust_price = first_price.cloneNode(true);
4397              /* clear all classes */
4398              cust_price.className = "";
4399              cust_price.classList.add("io_product_price_box");
4400              cust_price.classList.add("io_product_cust_price");
4401              cust_price.style.display = "none";
4402              first_price.before(cust_price);
4403            }
4404          }
4405          main_item_id = jQuery(".io_product_infobox .item_rentalid").first().text();
4406          if(main_item_id == price_id && cust_price!=undefined){
4407            if(typeof amt == "string") amt = Number(amt.replace(",",""));
4408            cust_price.querySelector("p:nth-child(1)").innerHTML=simpleCart.toCurrency(amt);
4409            let times = getAvailTimes();
4410            cust_price.querySelector("p:nth-child(2)").innerHTML = make_live_price_editable_time(times);
4411            if(amt>0 && (event_time_set() || io_always_display_live_price == "on")){
4412              cust_price.style.display = "grid";
4413            }else{
4414              cust_price.style.display = "none";
4415            }
4416          }
4417        });
4418      }
4419
4420      if(qty<=0 && rental_id != "delivery_method"){
4421        /* cat,all-item,widget */
4422        if(io_checkavail=="warn"){
4423          jQuery(".add_cart_"+rental_id.replace(":", "\\\:")+" .item_add").removeClass("item_add").addClass("item_add_off").trigger("classChange");
4424          jQuery(".unavailable_message_"+rental_id.replace(":", "\\\:")).show();
4425        }
4426        if(io_checkavail=="hide") jQuery(".add_cart_"+rental_id).parent().parent().parent().hide();
4427
4428        /* product page */
4429        if(jQuery(".io_product_container").length && io_checkavail!="off" && jQuery(".io_product_container .item_rentalid").first().text() === rental_id){
4430          jQuery(".add_cart_"+rental_id.replace(":", "\\\:")+" .item_add").first().removeClass("item_add").addClass("item_add_off").trigger("classChange");
4431          jQuery(".io_product_container .unavailable_message").show();
4432        }
4433      }else if(qty>0){
4434        if(io_checkavail=="warn"){
4435          jQuery(".add_cart_"+rental_id.replace(":", "\\\:")+" .item_add_off").removeClass("item_add_off").addClass("item_add").trigger("classChange");
4436          jQuery(".unavailable_message_"+rental_id.replace(":", "\\\:")).hide();
4437        }
4438        if(io_checkavail=="hide") jQuery(".add_cart_"+rental_id).parent().parent().parent().show();
4439
4440        /* product page */
4441        if(jQuery(".io_product_container").length && io_checkavail!="off" && jQuery(".io_product_container .item_rentalid").first().text() === rental_id){
4442          jQuery(".add_cart_"+rental_id.replace(":", "\\\:")+" .item_add_off").removeClass("item_add_off").addClass("item_add").trigger("classChange");
4443          jQuery(".io_product_container .unavailable_message").hide();
4444        }
4445      }
4446    });
4447  }
4448  function updatePageAvail_itemNames(data){
4449    jQuery.each(data, function (rental_name, qty) {
4450      rental_name = rental_name.replace(/[\u2032\u2019]+/ig,"'");
4451      var main_name_temp = "";
4452      if(typeof main_name_orig != "undefined"){
4453        main_name_temp = main_name_orig.replace(/[\u2032\u2019]+/ig,"'");
4454      }
4455      rental_name_esc = rental_name.replace(/'/g, "\\\\'");
4456      if (rental_name == "price") {
4457        var prices = qty;
4458        jQuery.each(prices, function (price_name, amt) {
4459          /* var prices = document.querySelector(".io_product_price_box:not(.io_product_cust_price)"); */
4460          /* if(prices != null) prices.remove(); */
4461          let cust_price = document.querySelector(".io_product_cust_price");
4462          if(cust_price==undefined){
4463            var first_price = document.querySelector(".io_product_price_box");
4464            if(first_price != null){
4465              cust_price = first_price.cloneNode(true);
4466              /* clear all classes */
4467              cust_price.className = "";
4468              cust_price.classList.add("io_product_price_box");
4469              cust_price.classList.add("io_product_cust_price");
4470              cust_price.style.display = "none";
4471              first_price.before(cust_price);
4472            }
4473          }
4474          try{
4475            var main_name = decodeURIComponent(jQuery(".io_product_container .item_encoded").first().html().replace(/[+]/gi, "%20"));
4476          }catch(e){main_name=""}
4477          var i = main_name.lastIndexOf(":");
4478          let acc_name = "";
4479          let rental_name = "";
4480          var i = main_name.lastIndexOf(":");
4481          if(i>0){
4482            rental_name = main_name.substring(0, i);
4483            acc_name = main_name.substring(i+1);
4484          }
4485          if (acc_name.toUpperCase() == price_name.toUpperCase() && cust_price!=undefined){
4486            var rental_id = document.querySelector(".item_rentalid").innerText;
4487            if(rental_id != null){
4488              rid_arr = rental_id.split(":");
4489              /* ignore the main id for this */
4490              rental_id = rid_arr[rid_arr.length-1];
4491              if(jQuery("#io_acc_overrideprice_"+rental_id).first().text()>0){
4492                amt = prices[acc_name];
4493              }else{
4494                let item_price = Number(prices[rental_name].replace(",",""));
4495                amt = Number(amt.replace(",","")) + item_price;
4496                amt = simpleCart.toCurrency(amt, {symbol:""})
4497              }
4498            }
4499            cust_price.querySelector("p:nth-child(1)").innerText="$"+amt;
4500            if(typeof amt == "string") amt = Number(amt.replace(",",""));
4501            let times = getAvailTimes();
4502            cust_price.querySelector("p:nth-child(2)").innerHTML = make_live_price_editable_time(times);
4503            if(amt>0 && (event_time_set() || io_always_display_live_price == "on")){
4504              cust_price.style.display = "grid";
4505            }else{
4506              cust_price.style.display = "none";
4507            }
4508
4509          }else if(!rental_name && !acc_name && cust_price!=undefined){
4510            amt = prices[main_name];
4511            cust_price.querySelector("p:nth-child(1)").innerText="$"+amt;
4512            if(typeof amt == "string") amt = Number(amt.replace(",",""));
4513            let times = getAvailTimes();
4514            cust_price.querySelector("p:nth-child(2)").innerHTML = make_live_price_editable_time(times);
4515            if(amt>0 && (event_time_set() || io_always_display_live_price == "on")){
4516              cust_price.style.display = "grid";
4517            }else{
4518              cust_price.style.display = "none";
4519            }
4520          }
4521
4522        });
4523      }
4524
4525      if(qty<=0){
4526        /* cat,all-item,widget */
4527        if(io_checkavail=="warn"){
4528          jQuery("div[name='maindiv_"+rental_name_esc+"'] .item_add").removeClass("item_add").addClass("item_add_off").trigger("classChange");
4529          jQuery("div[name='maindiv_"+rental_name_esc+"'] .unavailable_message").show();
4530        }
4531        if(io_checkavail=="hide") jQuery("div[name='maindiv_"+rental_name_esc+"']").hide();
4532
4533        /* product page */
4534        if(jQuery(".io_product_container").length && io_checkavail!="off"){
4535          if(main_name_temp==rental_name){
4536            jQuery(".io_product_container .item_add").first().removeClass("item_add").addClass("item_add_off").trigger("classChange");
4537            jQuery(".io_product_container .unavailable_message").show();
4538          }
4539        }
4540      }else if(qty>0){
4541        /* console.log("good"); */
4542        if(io_checkavail=="warn"){
4543          jQuery("div[name='maindiv_"+rental_name_esc+"'] .item_add_off").removeClass("item_add_off").addClass("item_add").trigger("classChange");
4544          jQuery("div[name='maindiv_"+rental_name_esc+"'] .unavailable_message").hide();
4545        }
4546        if(io_checkavail=="hide") jQuery("div[name='maindiv_"+rental_name_esc+"']").show();
4547
4548        /* product page */
4549        if(jQuery(".io_product_container").length && io_checkavail!="off"){
4550          if(main_name_temp==rental_name){
4551            jQuery(".io_product_container .item_add_off").removeClass("item_add_off").addClass("item_add").trigger("classChange");
4552            jQuery(".io_product_container .unavailable_message").hide();
4553          }
4554        }
4555      }
4556    });
4557  }
4558  function displayAccessoryPrices(data) {
4559      if (data.price) {
4560          let acc_prices = data.price;
4561          for (const [key, value] of Object.entries(acc_prices)) {
4562              let new_key = key;
4563              if ((key.match(/_/g) || []).length > 1) {
4564                  let split_key = key.split("_");
4565                  let second_to_last = split_key[split_key.length - 2];
4566                  let last = split_key[split_key.length - 1];
4567                  new_key = second_to_last + "_" + last;
4568              }
4569              if (io_hide_zero == 1 && value > 0) {
4570                  let id_string = "#io_acc_desc_" + new_key;
4571                  let formatted_price = simpleCart.toCurrency(value);
4572                  if (jQuery("#io_acc_" + new_key + " .io_acc_price").length > 0) {
4573                      jQuery("#io_acc_" + new_key + " .io_acc_price").html(formatted_price);
4574                  } else {
4575                      let price_display = '<span class="io_acc_price"> ' + formatted_price + ' </span>';
4576                      jQuery(id_string).after(price_display);
4577                  }
4578              } else if (io_hide_zero == 0) {
4579                  let id_string = "#io_acc_desc_" + new_key;
4580                  let formatted_price = simpleCart.toCurrency(value);
4581                  if (jQuery("#io_acc_" + new_key + " .io_acc_price").length > 0) {
4582                      jQuery("#io_acc_" + new_key + " .io_acc_price").html(formatted_price);
4583                  } else {
4584                      let price_display = '<span class="io_acc_price"> ' + formatted_price + ' </span>';
4585                      jQuery(id_string).after(price_display);
4586                  }
4587              }
4588          }
4589      }
4590  }
4591  function make_live_price_editable_time(times, delivery_method=null) {
4592    if(!delivery_method) delivery_method = getCookie("io_delivery_method");
4593    let ele_text = "";
4594    if(times[0]) ele_text = "on " + times[0] + " ";
4595    if(times[2] === 0) times[2] = 1;
4596    if(io_hidetimes!="on" && !isNaN(times[2])) ele_text += "for "+times[2]+" hours ";
4597    if(delivery_method) ele_text += "for " + delivery_method + ". ";
4598    ele_text += '<span style="cursor:pointer; color:blue; text-decoration:underline;" onclick=checkAvailDateClick()>edit</span>';
4599    return ele_text;
4600  }
4601  function checkAvailDateClick(){
4602    cartShow();
4603    /* expand the date picker */
4604    setTimeout(calSetDateRange,100);
4605  }
4606  function checkAvailPageOnly(){
4607    checkAvailFilter();
4608    if(addressCookiesSet() && io_distance_charge){
4609      runDeliveryCall(true);
4610    }
4611  }
4612  function getAccIDforPrice(){
4613    let accessory_arr = jQuery(".io_acc_li").toArray();
4614    let acc_rental_id_str = "";
4615    for(let current_accessory = 0; current_accessory < accessory_arr.length; current_accessory++){
4616      let required_tag = jQuery(accessory_arr[current_accessory]).find(".item_required");
4617      if(required_tag.length > 0){
4618        if(required_tag[0].innerText == 0){
4619          acc_rental_id_str += jQuery(accessory_arr[current_accessory]).find(".item_rentalid")[0].innerText +"|";
4620        }
4621      }
4622    }
4623    return acc_rental_id_str;
4624  }
4625  function getUpsellIDforPrice(){
4626    let upsell_arr = jQuery(".page-carousel-rid").toArray();
4627    let upsell_rental_id_str = "";
4628    for(let current_upsell = 0; current_upsell < upsell_arr.length; current_upsell++){
4629      upsell_rental_id_str +=upsell_arr[current_upsell].innerText+"|";
4630    }
4631    return upsell_rental_id_str;
4632  }
4633  function displayUpsellPrices(data){
4634    if(data.price){
4635      let upsell_prices = data.price;
4636      for (const [key, value] of Object.entries(upsell_prices)) {
4637        if(io_hide_zero == 1 && value > 0){
4638          let id_string = "#rid"+ key;
4639          let formatted_price = simpleCart.toCurrency(value);
4640          let price_display ='<span class="page-carousel-price"> '+formatted_price+' </span>';
4641          jQuery(id_string).after(price_display);
4642        }else if(io_hide_zero == 0){
4643          let id_string = "#rid"+ key;
4644          let formatted_price = simpleCart.toCurrency(value);
4645          let price_display ='<span class="page-carousel-price"> '+formatted_price+' </span>';
4646          jQuery(id_string).after(price_display);
4647        }
4648      }
4649      pageFlickityRefresh();
4650    }
4651  }
4652  /*</editor-fold>*/
4653
4654  /*<editor-fold defaultstate="collapsed" desc="Check Avail - Cart">*/
4655  function checkAvailCartOnly(skip_timer=false){
4656    checkAvailCart();
4657    checkAvailCartTimeslots();
4658  }
4659
4660  function checkAvailCartTimeslots(){
4661    let rental_names = "";
4662    let rental_ids = "";
4663    let cart_rental_names = "";
4664    let cart_rental_ids = "";
4665    let times = getAvailTimes();
4666    let start_date = times[0];
4667    let event_duration = times[2];
4668    let end_date = start_date;
4669    var event_start_time = getCookie("io_timeStart");
4670    simpleCart.each(function (item, x) {
4671      var timeslots_html = item.get('timeslots');
4672      if(typeof timeslots_html == "undefined") return;
4673      if(timeslots_html.length == 0) return;
4674      var cart_name = item.get("encoded");
4675      if(cart_name==null) {
4676        cart_name = encodeURIComponent(item.get("name"));
4677        cart_name = encodeURIComponent(decodeURIComponent(cart_name).replace(/[\u2032\u2019]+/ig,"'"));
4678      }
4679      rental_id = item.get("rentalid");
4680
4681      var timeslot_name = getTimeslotName(timeslots_html);
4682      var timeslot_sel_range = jQuery(".item-timeslots [name=\""+timeslot_name+"\"] option:selected").val();
4683      if(typeof timeslot_sel_range != "undefined"){
4684        /* timeslots */
4685        setTimeslotSelected(item, timeslot_name);
4686      }else{
4687        /*  timepickers */
4688        setTimePicker(item, timeslot_name);
4689        let start_timepicker = document.getElementsByName(timeslot_name.replace("io_timepicker_", "start_timeslot_"));
4690        let end_timepicker = document.getElementsByName(timeslot_name.replace("io_timepicker_", "end_timeslot_"));
4691        timeslot_sel_range = start_timepicker[start_timepicker.length-1].value;
4692        timeslot_sel_range += " - " + end_timepicker[end_timepicker.length-1].value;
4693      }
4694
4695      var timeslot_sel_arr = "";
4696      if(typeof timeslot_sel_range != "undefined"){
4697        var [start_time, end_time] = break_timeslot_sel_range(timeslot_sel_range);
4698        if(start_time && end_time){
4699          let newDate1 = convertDateStringtoDateObject(start_date, start_time);
4700          let newDate2 = convertDateStringtoDateObject(end_date, end_time);
4701          let time_duration = ((newDate2 - newDate1) / 3600) / 1000;
4702          let quantity = item.get("quantity");
4703          if(item.get("inputtype") == "Map"){
4704            quantity = 1
4705          }
4706          rental_names += cart_name + "-" + quantity+"|";
4707          rental_ids += rental_id+"-"+quantity+"-"+start_time+"-"+time_duration+"|";
4708          cart_rental_names = rental_names;
4709          cart_rental_ids = rental_ids;
4710        }
4711      }
4712    });
4713    if(rental_ids || rental_names){
4714      checkAvailCall(start_date,event_start_time,event_duration,rental_names,rental_ids,updateCartAvail,1,cart_rental_ids,cart_rental_names,1);
4715    }
4716    return true;
4717  }
4718
4719  function checkAvailCart(){
4720    let rental_names = "";
4721    let rental_ids = "";
4722    let cart_rental_names = "";
4723    let cart_rental_ids = "";
4724    simpleCart.each(function (item, x) {
4725      if(typeof item.get('timeslots') != "undefined"){
4726        if(item.get('timeslots').length > 0){
4727          return;
4728        }
4729      }
4730      var cart_name = item.get("encoded");
4731      if(cart_name==null){
4732        cart_name = encodeURIComponent(item.get("name"));
4733        cart_name = encodeURIComponent(decodeURIComponent(cart_name).replace(/[\u2032\u2019]+/ig,"'"));
4734      }
4735      let quantity = item.get("quantity");
4736      if(item.get("inputtype") == "Map"){
4737        quantity = 1
4738      }
4739      rental_names += cart_name + "-" + quantity + "|";
4740      cart_rental_names += cart_name + "-" + quantity + "|";
4741      var cart_id = item.get("rentalid");
4742      rental_ids += cart_id + "-" + quantity + "|";
4743      cart_rental_ids += cart_id + "-" + quantity + "|";
4744    });
4745    var times = getAvailTimes();
4746    let return_id = 0;
4747    if(rental_ids != ""){
4748      return_id = 1;
4749    }
4750    if(rental_ids != "" || rental_names != ""){
4751      return checkAvailCall(times[0],times[1],times[2],rental_names,rental_ids,updateCartAvail,1,cart_rental_ids,cart_rental_names,return_id);
4752    }
4753    return true;
4754  }
4755  function updateCartAvail(data){
4756    let use_id = data["return_id"]
4757    delete data["return_id"];
4758    if(use_id == 1){
4759      updateCartAvail_itemIDs(data)
4760    }else{
4761      updateCartAvail_itemNames(data);
4762    }
4763    console.log("cart update");
4764    if(addressCookiesSet() && io_distance_charge){
4765      runDeliveryCall(true);
4766    }
4767    /* simpleCart.trigger("update"); */
4768    simpleCart.update();
4769    /* jQuery("#avail").html(output); */
4770  }
4771
4772  function updateCartAvail_itemIDs(data){
4773    jQuery.each(data, function (rental_id, qty){
4774      simpleCart.each(function (item, x) {
4775        if(rental_id == item.get("rentalid")){
4776          if(io_hideQuantityAvail == "off"){
4777            if(qty>=9999 || item.get("inputtype") == "Map" || (item.get("giftcardvalue") && item.get("giftcardvalue").trim())){
4778              item.set("availability", "available");
4779            }else{
4780              item.set("availability", qty + " available");
4781            }
4782          }else if(io_hideQuantityAvail == "on"){
4783            if(qty<=0 || qty < item.get("quantity")){
4784              item.set("availability", "not available");
4785            }else{
4786              item.set("availability", "available");
4787            }
4788          }
4789          var vendorid = item.get("vendorid");
4790          if(vendorid && vendorid.trim()){
4791            item.set("availability", "availability must be verified");
4792          }
4793        }
4794        if (rental_id == "price") {
4795          var prices = qty;
4796          jQuery.each(prices, function (price_name, amt) {
4797            if(price_name == item.get("rentalid")){
4798              if (typeof amt == "string" || amt instanceof String){
4799                if(amt != "TBD"){
4800                  if(typeof amt == "string") amt = Number(amt.replace(",",""));
4801                }
4802              }
4803              item.set("price", amt);
4804            }
4805          });
4806        }
4807      });
4808    });
4809  }
4810
4811  function updateCartAvail_itemNames(data){
4812    jQuery.each(data, function (rental_name, qty) {
4813      rental_name = rental_name.replace(/[\u2032\u2019]+/ig,"'");
4814      simpleCart.each(function (item, x) {
4815        try{
4816          var cart_name = decodeURIComponent(item.get("encoded").replace(/[+]/gi, "%20"));
4817        }catch(e){cart_name=null}
4818        if(cart_name==null) cart_name = item.get("name")
4819        cart_name = cart_name.replace(/[\u2032\u2019]+/ig,"'");
4820        var i = cart_name.lastIndexOf(":");
4821        if(i>0 && cart_name.toUpperCase() != rental_name.toUpperCase() && rental_name!="price"){cart_name = cart_name.substring(i+1)}
4822        if (cart_name.toUpperCase() == rental_name.toUpperCase()) {
4823          if(qty>9999){
4824            item.set("availability", "available");
4825          }else{
4826            item.set("availability", qty + " available");
4827          }
4828        }
4829        if (rental_name == "price") {
4830          var prices = qty;
4831          jQuery.each(prices, function (price_name, amt) {
4832            price_name = price_name.replace(/[\u2032\u2019]+/ig,"'");
4833            let acc_name = "";
4834            let rental_name = "";
4835            var i = cart_name.lastIndexOf(":");
4836            if(i>0){
4837              rental_name = cart_name.substring(0, i);
4838              acc_name = cart_name.substring(i+1);
4839            }
4840            if (acc_name === price_name) {
4841              var rental_id = item.get("rentalid");
4842              if(rental_id != null){
4843                rid_arr = rental_id.split(":");
4844                /* ignore the main id for this */
4845                rental_id = rid_arr[rid_arr.length-1];
4846                if(jQuery("#io_acc_overrideprice_"+rental_id).first().text()>0){
4847                  amt = prices[acc_name];
4848                }else{
4849                  let item_price = Number(prices[rental_name].replace(",",""));
4850                  amt = Number(amt.replace(",","")) + item_price;
4851                  item.set("price", amt);
4852                  return;
4853                }
4854              }
4855              if(amt==null){
4856                amt = "0";
4857              }
4858              /* returned price is per unit */
4859              if(typeof amt == "string") amt = Number(amt.replace(",",""));
4860              item.set("price", amt);
4861            }else if(!rental_name && !acc_name){
4862              amt = Number(prices[cart_name].replace(",",""));
4863              item.set("price", amt);
4864            }
4865          });
4866        }
4867      });
4868    });
4869  }
4870  /*</editor-fold>*/
4871
4872  /*<editor-fold defaultstate="collapsed" desc="Upsell Carousels">*/
4873  function updateCartUpsell(data){
4874    let cart_carousel = jQuery(".cart-carousel");
4875    viewport = jQuery(".cart-carousel .flickity-viewport");
4876    if(viewport.length > 0){
4877      cart_carousel.flickity("destroy");
4878    }
4879    cart_carousel.empty();
4880    data.forEach(function(upsell){
4881      cell = createCartCarouselCell(upsell["image"], upsell["name"], upsell["page"]);
4882      cart_carousel.append(cell);
4883    });
4884    makeCarousel(cart_carousel);
4885    jQuery("#cart-carousel-container").show();
4886    setTimeout(cartFlickityRefresh, 500);
4887  }
4888
4889  function cartFlickityRefresh(){
4890    jQuery(".cart-carousel").flickity("resize");
4891  }
4892
4893  //IO-14031
4894  function isMobile()
4895  {
4896  // Modern detection
4897    if (navigator.userAgentData && navigator.userAgentData.mobile !== undefined) {
4898      return navigator.userAgentData.mobile;
4899    }
4900
4901  // Fallback for older browsers
4902    return /Mobi|Android|iPhone|iPad|iPod/i.test(navigator.userAgent) ||
4903           ('ontouchstart' in window && navigator.maxTouchPoints > 0);
4904  }
4905
4906  function makeCarousel(cart_carousel)
4907  {
4908    cart_carousel.flickity({
4909      wrapAround: true,
4910      draggable: isMobile(),
4911      cellAlign: 'left',
4912      //autoPlay: 3000,
4913      groupCells: true,
4914      resize: true
4915    });
4916    cart_carousel_set = true;
4917  }
4918
4919  function createCartCarouselCell(image, name, page){
4920    cell = '<div class="io_cart_carousel_cell"> <a href='+page+' class="cart-carousel-link"> <img class="cart-carousel-image" src='+image+'> <p class="cart-carousel-name"> '+name+' </p> </a> </div>';
4921    return cell;
4922  }
4923  /*</editor-fold>*/
4924
4925  /*<editor-fold defaultstate="collapsed" desc="Ajax Calls">*/
4926  function checkAvailCall(start_date,start_time,time_duration,rental_names,rental_ids,returnFunc,singleCart,cart_rental_ids,cart_rental_names,return_id,temp=0,delivery_method=null,price_only=0,custom_price_name="", skip_hidden_lead = 0) {
4927        /*
4928        IO-21459 If we have no duration set (event not set in cart), and we are doing the call for the page live
4929        price, and we have the setting on where we want to display this price even if the event date is not set:
4930
4931        We set the time_duration to 1 hour. This defaults the start date to January 1, 1970 with duration of
4932        1 hour in the lead meaning it will be available and we have the one hour price.
4933        */
4934    if((isNaN(time_duration) || time_duration===0) && price_only==1 && io_always_display_live_price == "on"){
4935      time_duration = 1;
4936      if(!start_date){
4937        start_date = getFormatteddate(new Date());
4938      }
4939      if(!start_time){
4940        start_time = getFormattedtime(new Date());
4941      }
4942    }else if((isNaN(time_duration) || time_duration===0) && price_only==0 && io_hidetimes === "on"){
4943      /* IO-22689 if they have times hidden, and happen to have the same default start and end time, we still want to do the call. */
4944      time_duration = 1;
4945    }else if(isNaN(time_duration) || time_duration===0){
4946      return;
4947    }
4948    url = "https://rental.software/quotes/check_availability_v2.php?callback=?";
4949    if(window.location.href.indexOf("localhost") > -1){
4950      //url = "http://localhost/bugs/quotes/check_availability_v2.php?callback=?";
4951      url = "http://localhost/io/bugs/quotes/check_availability_v2.php?callback=?";
4952      //url = "http://localhost/jbug/trunk/quotes/check_availability_v2.php?callback=?";
4953    }
4954    if(!delivery_method) delivery_method = getCookie("io_delivery_method");
4955    let address_data = {
4956      "address": getCookie("io_address"),
4957      "state": getCookie("io_state"),
4958      "city": getCookie("io_city"),
4959      "zip": getCookie("io_zip")
4960    };
4961    if(!ioHasMarketingConsent()){
4962      address_data = {"address":"", "state":"", "city":"", "zip":""};
4963    }
4964    url +=
4965            "&name=" + encodeURIComponent("Mountain Bouncers LLC") +
4966            "&startdate=" + start_date +
4967            "&starttime=" + start_time +
4968            "&duration=" + time_duration +
4969            "&street=" + encodeURIComponent(address_data["address"]) +
4970            "&city=" + encodeURIComponent(address_data["city"]) +
4971            "&state=" + encodeURIComponent(address_data["state"]) +
4972            "&zip=" + encodeURIComponent(address_data["zip"]) +
4973            "&single_cart=" + singleCart +
4974            "&usecushion=1" +
4975            "&include_price=1" +
4976            "&showlocations=0" +
4977            "&rental_names=" + rental_names +
4978            "&rental_ids=" + rental_ids +
4979            "&cart_rental_names=" + cart_rental_names +
4980            "&cart_rental_ids=" + cart_rental_ids +
4981            "&return_id=" + return_id +
4982            "&delivery_method=" + delivery_method +
4983            "&temp=" + temp +
4984            "&skip_hidden_lead="+ skip_hidden_lead;
4985      if (custom_price_name)
4986      {
4987          ioCartLoaderIncrement();
4988          jQuery.getJSON(url, function (data)
4989          {
4990              try
4991              {
4992                  returnFunc(data, custom_price_name);
4993              }
4994              finally
4995              {
4996                  ioCartLoaderDecrement();
4997              }
4998          });
4999      }
5000      else
5001      {
5002          ioCartLoaderIncrement();
5003          jQuery.getJSON(url, function (data)
5004          {
5005              try
5006              {
5007                  returnFunc(data);
5008              }
5009              finally
5010              {
5011                  ioCartLoaderDecrement();
5012              }
5013          });
5014      }
5015  }
5016
5017  function getUpsellsCall(start_date,start_time,time_duration,rental_ids,returnFunc) {
5018    if(rental_ids.replace(/[|]/g,"").length==0){return;}
5019    url = "https://rental.software/quotes/in_cart_upsell.php?callback=?";
5020    if(window.location.href.indexOf("localhost") > -1){
5021      //url = "http://localhost/bugs/quotes/in_cart_upsell.php?callback=?"
5022      url = "http://localhost/io/bugs/quotes/in_cart_upsell.php?callback=?"
5023    }
5024    url +=
5025            "&name=" + encodeURIComponent("Mountain Bouncers LLC") +
5026            "&startdate=" + start_date +
5027            "&starttime=" + start_time +
5028            "&duration=" + time_duration +
5029            "&usecushion=1" +
5030            "&include_price=1" +
5031            "&showlocations=0" +
5032            "&rental_ids=" + rental_ids;
5033    //IO-25557
5034    if(window.location.href.indexOf("dev.rental.software") > -1)//if it is a dev site, we need to send
5035    {
5036      let pattern = /(https:\/\/dev\.rental\.software\/[^\/]+\/)/;
5037      let matches = window.location.href.match(pattern);
5038      matches && matches.length > 0 ? url += "&site=" + matches[0]:0;
5039    }
5040    else
5041    {
5042      url += "&site=" + window.location.host;
5043    }
5044    jQuery.getJSON(url, returnFunc);
5045  }
5046  /*</editor-fold>*/
5047
5048  /*<editor-fold defaultstate="collapsed" desc="Customer Geolocation Functions">*/
5049  function setLocationInLocalStorage(city)
5050  {
5051      try
5052      {
5053          const location_data =
5054          {
5055              city: city,
5056              timestamp: Date.now()
5057          };
5058          localStorage.setItem(storage_key, JSON.stringify(location_data));
5059          return true;
5060      }
5061      catch (e)
5062      {
5063          console.warn('Failed to save location to localStorage:', e);
5064          return false;
5065      }
5066  }
5067
5068  function getLocationFromLocalStorage()
5069  {
5070      try
5071      {
5072          const location_data = localStorage.getItem(storage_key);
5073          if (location_data)
5074          {
5075              return JSON.parse(location_data);
5076          }
5077
5078      }
5079      catch (e)
5080      {
5081          console.warn('Failed to retrieve location from localStorage:', e);
5082      }
5083      return null;
5084  }
5085
5086  function displayLocation(city)
5087  {
5088      const location_element = jQuery('.io_geo_city');
5089      const container_element = jQuery('#io_customer_geolocation');
5090
5091      if (location_element.length && container_element.length)
5092      {
5093          location_element.text(`${city}`);
5094          container_element.show();
5095          return true;
5096      }
5097      return false;
5098  }
5099
5100  function getCityFromIO(returnFunc)
5101  {
5102    var url = "https://rental.software/include/geolocation_handler.php?callback=?";
5103    if(window.location.href.indexOf("localhost") > -1)
5104    {
5105      url = "http://localhost//features//include/geolocation_handler.php?callback=?";
5106    }
5107    url +=
5108        "&name=" + encodeURIComponent("Mountain Bouncers LLC") +
5109        "&ip=" + encodeURIComponent(io_customer_ip);
5110
5111    jQuery.getJSON(url, returnFunc);
5112  }
5113
5114  function initializeGeolocation()
5115  {
5116      try
5117      {
5118      // Check local storage first
5119          const cached_location = getLocationFromLocalStorage();
5120          if (cached_location && cached_location.city)
5121          {
5122              if (displayLocation(cached_location.city))
5123              {
5124                  return;
5125              }
5126          }
5127
5128          // If no cached location, call the handler to get location
5129          getCityFromIO(function(location_data)
5130          {
5131              if (location_data && location_data.city && !location_data.error)
5132              {
5133                  // Display and store the location
5134                  if (displayLocation(location_data.city))
5135                  {
5136                      setLocationInLocalStorage(location_data.city);
5137                  }
5138              }
5139              else
5140              {
5141                  console.warn('Failed to get location:', location_data ? location_data.error : 'Unknown error');
5142              }
5143          });
5144      } 
5145      catch (error)
5146      {
5147          console.error('Geolocation initialization failed:', error);
5148      }
5149  }
5150  /*</editor-fold>*/
5151
5152  /*<editor-fold defaultstate="collapsed" desc="Loading Animation Helpers">*/
5153
5154  /**
5155  * Toggles the visibility of the cart loading overlay.
5156  *
5157  * @param {boolean} show - A boolean value to determine whether to show or hide the overlay.
5158  *                         If true, the overlay becomes visible; if false, it is hidden.
5159  * @return {void} This function does not return a value.
5160  */
5161  function ioCartShowOverlay(show)
5162  {
5163      try
5164      {
5165          var overlay = document.getElementById('ioCartLoadingOverlay');
5166          if (!overlay) return;
5167          if (show)
5168          {
5169              overlay.style.display = 'flex';
5170              overlay.setAttribute('aria-hidden', 'false');
5171          }
5172          else
5173          {
5174              overlay.style.display = 'none';
5175              overlay.setAttribute('aria-hidden', 'true');
5176          }
5177      }
5178      catch (e)
5179      {}
5180  }
5181
5182  /**
5183   * Activates the cart loader by setting the loading state to active, initializing the loading count,
5184   * and displaying the overlay. Includes a fallback to deactivate the loader if no response is received
5185   * within a specified timeout period.
5186   *
5187   * @return {void} This method does not return a value.
5188   */
5189  function ioCartLoaderActivate()
5190  {
5191      io_cart_loading_active = true;
5192      io_cart_loading_count = 0;
5193      ioCartShowOverlay(true);
5194
5195      //fallback in case the availability call doesn't come back
5196      if (io_cart_loading_fallback_timer) clearTimeout(io_cart_loading_fallback_timer);
5197      io_cart_loading_fallback_timer = setTimeout(function () {
5198          if (io_cart_loading_active) {
5199              io_cart_loading_active = false;
5200              io_cart_loading_count = 0;
5201              ioCartShowOverlay(false);
5202          }
5203      }, 15000);
5204  }
5205
5206  /**
5207   * Increments the count of active cart loading operations and ensures the cart overlay is displayed.
5208   *
5209   * This method increases the `io_cart_loading_count` if the `io_cart_loading_active` flag is set to true.
5210   * It also calls the `ioCartShowOverlay` function with a true value to show the overlay.
5211   *
5212   * @return {void} This function does not return any value.
5213   */
5214  function ioCartLoaderIncrement()
5215  {
5216      if (io_cart_loading_active)
5217      {
5218          io_cart_loading_count++;
5219          ioCartShowOverlay(true);
5220      }
5221  }
5222
5223  /**
5224   * Decrements the `io_cart_loading_count` if `io_cart_loading_active` is true.
5225   * If the count reaches zero, it deactivates the loader, removes the overlay,
5226   * and clears the fallback timer
5227   */
5228  function ioCartLoaderDecrement()
5229  {
5230      if (io_cart_loading_active)
5231      {
5232          io_cart_loading_count = Math.max(0, io_cart_loading_count - 1);
5233
5234          if (io_cart_loading_count === 0)
5235          {
5236              io_cart_loading_active = false;
5237              ioCartShowOverlay(false);
5238
5239              if (io_cart_loading_fallback_timer)
5240              {
5241                  clearTimeout(io_cart_loading_fallback_timer);
5242                  io_cart_loading_fallback_timer = null;
5243              }
5244          }
5245      }
5246  }
5247
5248  /*</editor-fold>*/</script>
5248 <div class="address_entry elementor-widget-text-editor"><table><tr><td> <label for="address" id="io_cdl_address_label" style="display: table-cell"> Street Address </label></td><td> <input id="io_cd_address" style="display: table-cell" name="address" type="text"></input></td></tr><tr><td> <label for="city" id="io_cdl_city_label" style="display: table-cell"> City </label></td><td> <input id="io_cd_city" style="display: table-cell" name="city" type="text"></input></td></tr><tr id="us-state-select"><td> <label for="state" id="io_cdl_state_label" style="display: table-cell"> State </label></td><td> <select name="state" id="io_cd_state" style="display: table-cell" class="input-mini"><option value=""></option><option value="AK">AK</option><option value="AL">AL</option><option value="AR">AR</option><option value="AZ">AZ</option><option value="CA">CA</option><option value="CO">CO</option><option value="CT">CT</option><option value="DC">DC</option><option value="DE">DE</option><option value="FL">FL</option><option value="GA">GA</option><option value="HI">HI</option><option value="IA">IA</option><option value="ID">ID</option><option value="IL">IL</option><option value="IN">IN</option><option value="KS">KS</option><option value="KY">KY</option><option value="LA">LA</option><option value="MA">MA</option><option value="MD">MD</option><option value="ME">ME</option><option value="MI">MI</option><option value="MN">MN</option><option value="MO">MO</option><option value="MS">MS</option><option value="MT">MT</option><option value="NC">NC</option><option value="ND">ND</option><option value="NE">NE</option><option value="NH">NH</option><option value="NJ">NJ</option><option value="NM">NM</option><option value="NV">NV</option><option value="NY">NY</option><option value="OH">OH</option><option value="OK">OK</option><option value="OR">OR</option><option value="PA">PA</option><option value="RI">RI</option><option value="SC">SC</option><option value="SD">SD</option><option value="TN">TN</option><option value="TX">TX</option><option value="UT">UT</option><option value="VA">VA</option><option value="VT">VT</option><option value="WA">WA</option><option value="WI">WI</option><option value="WV">WV</option><option value="WY">WY</option> </select></td></tr><tr><td> <label for="zip" id="io_cdl_zip_label" style="display: table-cell"> Zip Code </label></td><td> <input id="io_cd_zip" style="display: table-cell" name="zip" type="text"></input></td></tr></table> <a class="elementor-button elementor-size-sm io_button"
5249 id="address_entry_submit"
5250 href="javascript:;"> Save Address </a><div id="delivery_charge_info_box"><hr><h3 id="info_box_header"></h3><p id="info_box_information"></p> <a href="javascript:;" onClick="closeAddressEntry()" class="delivery_info_continue elementor-button elementor-size-sm io_button">Continue Shopping</a></div></div> 
5250<script>/* for checking delivery */
5251  function runDeliveryCall(cart_only = false){
5252    let address_fields = jQuery("[id^='io_cd_']");
5253    let address_data = {
5254      "address": getCookie("io_address"),
5255      "state": getCookie("io_state"),
5256      "city": getCookie("io_city"),
5257      "zip": getCookie("io_zip")
5258    };
5259
5260    let times = getAvailTimes();
5261
5262    let start_date = times[0];
5263    let end_date = start_date;
5264    let start_time = times[1];
5265    let duration = times[2];
5266
5267    let rental_ids = "";
5268    simpleCart.each(function (item, x) {
5269      if(typeof item.get('timeslots') != "undefined"){
5270        if(item.get('timeslots').length > 0){
5271        var timeslots_html = item.get('timeslots');
5272        var rental_id = item.get('rentalid');
5273        if(typeof timeslots_html == "undefined") return;
5274        if(timeslots_html.length == 0) return;
5275
5276        var timeslot_name = getTimeslotName(timeslots_html);
5277        var timeslot_sel_range = jQuery(".item-timeslots [name=\""+timeslot_name+"\"] option:selected").val();
5278        if(typeof timeslot_sel_range != "undefined"){
5279          /* timeslots */
5280          setTimeslotSelected(item, timeslot_name);
5281        }else{
5282          /*  timepickers */
5283          setTimePicker(item, timeslot_name);//todo?
5284          let start_timepicker = document.getElementsByName(timeslot_name.replace("io_timepicker_", "start_timeslot_"));
5285          let end_timepicker = document.getElementsByName(timeslot_name.replace("io_timepicker_", "end_timeslot_"));
5286          timeslot_sel_range = start_timepicker[start_timepicker.length-1].value;
5287          timeslot_sel_range += " - " + end_timepicker[end_timepicker.length-1].value;
5288        }
5289
5290        var timeslot_sel_arr = "";
5291        if(typeof timeslot_sel_range != "undefined"){
5292          timeslot_sel_arr = timeslot_sel_range.split(" - ");
5293          var timeslot_start_time = timeslot_sel_arr[0].replace("am"," am").replace("pm"," pm").replace("  "," ");
5294          var timeslot_end_time = timeslot_sel_arr[1].replace("am"," am").replace("pm"," pm").replace("  "," ");
5295          if(timeslot_start_time && timeslot_end_time){
5296            let newDate1 = convertDateStringtoDateObject(start_date, timeslot_start_time);
5297            let newDate2 = convertDateStringtoDateObject(end_date, timeslot_end_time);
5298            let timeslot_duration = ((newDate2 - newDate1) / 3600) / 1000;
5299            rental_ids += rental_id+"-"+item.get("quantity")+"-"+timeslot_start_time+"-"+timeslot_duration+"|";
5300          }
5301        }
5302      }
5303    }
5304  else{
5305    var cart_id = item.get("rentalid");
5306    rental_ids += cart_id + "-" + item.get("quantity") + "|";
5307  }
5308  });
5309
5310  address_fields.each(function() {
5311    let field = this.id.split("_")[2];
5312    value = this.value;
5313    if(!value && !address_data[field]){
5314      jQuery(this).addClass("invalid_address_field")
5315    }
5316    else if(value){
5317      jQuery(this).removeClass("invalid_address_field")
5318      address_data[field] = this.value;
5319    }
5320  });
5321  if(jQuery(".invalid_address_field").length > 0){
5322    return;
5323  }
5324    let delivery_method = ""
5325    if(io_default_delivery_method)
5326    {
5327      delivery_method = io_default_delivery_method;
5328    }
5329    else if(getCookie("io_delivery_method"))
5330    {
5331      delivery_method = getCookie("io_delivery_method");
5332    }
5333
5334
5335  setCookie("io_address", address_data["address"], 14);
5336  setCookie("io_city", address_data["city"], 14);
5337  setCookie("io_state", address_data["state"], 14);
5338  setCookie("io_zip", address_data["zip"], 14);
5339
5340  cart_total = simpleCart.total();
5341  if(cart_total === "TBD") cart_total = 0;
5342  url = "https://rental.software/quotes/get_delivery_info.php?callback=?";
5343  if(window.location.href.indexOf("localhost") > -1){
5344    //url = "http://localhost/bugs/quotes/get_delivery_info.php?callback=?";
5345    url = "http://localhost/io/bugs/quotes/get_delivery_info.php?callback=?";
5346  }
5347  url +=
5348          "&name=" + encodeURIComponent("Mountain Bouncers LLC") +
5349          "&rental_ids=" + rental_ids +
5350          "&street=" + encodeURIComponent(address_data["address"]) +
5351          "&city=" + encodeURIComponent(address_data["city"]) +
5352          "&state=" + encodeURIComponent(address_data["state"]) +
5353          "&zip=" + encodeURIComponent(address_data["zip"]) +
5354          "&startdate=" + start_date +
5355          "&starttime=" + start_time +
5356          "&duration=" + duration +
5357          "&delivery_method=" + encodeURIComponent(delivery_method) +
5358          "&total=" + cart_total +
5359          "&cart_only=" + cart_only;
5360  jQuery.getJSON(url, function(data){
5361    if(data["delivery_restrict"] === 1){
5362      data["charge"] = 0;
5363    }
5364    handleDeliveryInfo(data, cart_only);
5365  });
5366  }
5367
5368  function handleDeliveryInfo(data, cart_only = false){
5369    jQuery("#deliverSubtotalContainer").show();
5370    jQuery("#checkDeliveryMessage").hide();
5371    let info_box = jQuery("#delivery_charge_info_box");
5372    if(data["delivery_restrict"] == 1){
5373      jQuery("#info_box_header").text("Sorry...");
5374      jQuery("#info_box_information").text(data["error"])
5375      setDeliverySubtotal(data["charge"], true)
5376    }
5377    else{
5378      setDeliverySubtotal(data["charge"])
5379      jQuery("#info_box_header").text("Success!");
5380      if(data["charge"] > 0){
5381        jQuery("#info_box_information").html("We are able to deliver to your location with a " + simpleCart.toCurrency(data["charge"]) +" fee!");
5382      }
5383      else{
5384        jQuery("#info_box_information").html("We are able to deliver to your location with no charge!");
5385      }
5386    }
5387    if(simpleCart.items().length == 0 && cart_only){
5388      jQuery("#info_box_header").text("Items Required.");
5389      jQuery("#info_box_information").html("There needs to be items in your cart to check for delivery fees. But we will save the address information so you don't have to enter it again!")
5390    }
5391    info_box.show();
5392    jQuery.fancybox.update(jQuery(".address_entry"));
5393  }
5394  function showAddressEntry(cart_only=false){
5395    cartHide();
5396    jQuery(".invalid_address_field").removeClass("invalid_address_field")
5397    jQuery("#delivery_charge_info_box").hide();
5398    jQuery("#io_cd_address").val(getCookie("io_address"));
5399    jQuery("#io_cd_state").val(getCookie("io_state"));
5400    jQuery("#io_cd_city").val(getCookie("io_city"));
5401    jQuery("#io_cd_zip").val(getCookie("io_zip"));
5402    if(!cart_only){
5403      jQuery("#address_entry_submit").on("click", null, function(){ runDeliveryCall(); });
5404    } else{
5405      jQuery("#address_entry_submit").on("click", null, function(){ runDeliveryCall(cart_only); });
5406    }
5407    jQuery.fancybox.open(jQuery(".address_entry"));
5408  }
5409
5410  function closeAddressEntry(){
5411    jQuery.fancybox.close();
5412  }
5413
5414  function setDeliverySubtotal(amount, unavailable=false){
5415    if(unavailable){
5416      jQuery("#deliverySubtotal").html("Unavailable");
5417    } else{
5418      jQuery("#deliverySubtotal").html(simpleCart.toCurrency(amount));
5419    }
5420  }
5421
5422  function addressCookiesSet(){
5423    if(getCookie("address") && getCookie("state") && getCookie("city") && getCookie("zip")){
5424      return true;
5425    } else{
5426      return false
5427    }
5428  }</script>
vendor: 1 bytes, line 5428
5428
5429<script>let map;
5430  let geocoder;
5431  let item_id_map;
5432  let drawingManager;
5433  let drawingListener;
5434
5435  let polygons = new Array();
5436
5437  let polyline_markers = new Array();
5438  let polylines = new Array();
5439  let previous_marker;
5440  current_polyline = undefined;
5441  let previous_map_height = "";
5442
5443  function initMap() {
5444    map = new google.maps.Map(document.getElementById("map_container"), {
5445      center: { lat: -34.397, lng: 150.644 },
5446      zoom: 8,
5447      mapTypeId: "hybrid",
5448      disableDefaultUI: true,
5449      tilt: 0
5450    });
5451    drawingManager = new google.maps.drawing.DrawingManager({
5452      drawingControl: true,
5453      drawingControlOptions: {
5454        position: google.maps.ControlPosition.TOP_CENTER,
5455        drawingModes: [
5456          google.maps.drawing.OverlayType.POLYGON,
5457        ],
5458      }
5459    });
5460
5461    geocoder = new google.maps.Geocoder();
5462  }
5463
5464  function io_geocode(){
5465    let prefix = "#io_mc_"
5466    let request = ""
5467    let address_value = "";
5468    if(jQuery(prefix+"address").length) {
5469      address_value = jQuery(prefix+"address").val();
5470      if(address_value) setCookie("address", jQuery("#io_mc_address").val(), 14);
5471    }
5472    let city_value = "";
5473    if(jQuery(prefix+"city").length){
5474      city_value = jQuery(prefix+"city").val();
5475      if(city_value) setCookie("city", jQuery("#io_mc_city").val(), 14);
5476    }
5477    let state_value = "";
5478    if(jQuery(prefix+"state").length){
5479      state_value = jQuery(prefix+"state").val();
5480      if(state_value) setCookie("state", jQuery("#io_mc_state").val(), 14);
5481    }
5482    let zip_value = "";
5483    if(jQuery(prefix+"zip").length){
5484      zip_value = jQuery(prefix+"zip").val();
5485      if(zip_value) setCookie("zip", jQuery("#io_mc_zip").val(), 14);
5486    }
5487
5488    request = address_value + " " + city_value + " " + state_value + " " + zip_value;
5489    if(request){
5490      geocoder.geocode({address:request}).then((result) => {
5491        const { results } = result;
5492        map.setCenter(results[0].geometry.location);
5493        map.setZoom(24);
5494        return results;
5495      });
5496
5497    }
5498
5499    if(!addressProvided()) {
5500      jQuery("#io_map_address_entry").attr("open", "open");
5501    }else{
5502      jQuery("#io_map_address_entry").removeAttr("open");
5503    }
5504  }
5505
5506  function openMap(element){
5507    cartHide()
5508    io_map_clear()
5509    let unit = "meters"
5510    if(country === "US") unit = "feet"
5511    polygons = new Array();
5512    polyline_marker_sets = new Array();
5513    polylines = new Array();
5514    previous_marker = undefined;
5515    current_polyline = undefined;
5516
5517    jQuery("#io_mc_address").val(getCookie("address"));
5518    jQuery("#io_mc_state").val(getCookie("state"));
5519    jQuery("#io_mc_city").val(getCookie("city"));
5520    jQuery("#io_mc_zip").val(getCookie("zip"));
5521    io_geocode();
5522
5523    google.maps.event.removeListener(drawingListener);
5524
5525    if(element.id == "calcPriceOpenMap"){
5526      item_id_map = jQuery(".io_product_infobox .item_rentalid").text();
5527      if(jQuery(".io_product_infobox .item_qtytype").text() == "Area"){
5528        setMapTools_Area(unit, true)
5529      }else if(jQuery(".io_product_infobox .item_qtytype").text() == "Perimeter"){
5530        setMapTools_Perimeter(unit, true)
5531      }
5532    }
5533    else{
5534      item_id_map = jQuery(element).parent().parent().find(".item-rentalid").text();
5535      if(jQuery(element).parent().parent().find(".item-qtytype").text() == "Area"){
5536        setMapTools_Area(unit)
5537      }else if(jQuery(element).parent().parent().find(".item-qtytype").text() == "Perimeter"){
5538        setMapTools_Perimeter(unit)
5539      }
5540    }
5541  }
5542
5543  function addressProvided(){
5544    if(jQuery("#io_mc_address").val() && jQuery("#io_mc_state").val() &&
5545            jQuery("#io_mc_city").val() && jQuery("#io_mc_zip").val() ){
5546      return true;
5547    }
5548    return false;
5549  }
5550
5551  function setMapTools_Area(unit, item_page=false){
5552    jQuery.fancybox.open(jQuery(".map_fancybox"));
5553    drawingManager.setOptions({
5554      drawingControlOptions: {
5555        drawingModes: [google.maps.drawing.OverlayType.POLYGON]
5556      },
5557      drawingMode: google.maps.drawing.OverlayType.POLYGON,
5558      polygonOptions: {
5559        fillColor: "#0191fc",
5560        strokeColor: "#0113fc"
5561      },
5562    });
5563    let units = "meters"
5564    if(country === "US") units = "feet"
5565
5566    jQuery("#io_measurement_input_label").text("Approximate area in "+units+": ");
5567    jQuery("#io_map_manual_input").off("click");
5568    jQuery("#io_map_manual_input").on("click", function(){manual_calc_price("Area", item_page)});
5569    jQuery("#io_perimeter_options_container").hide();
5570    jQuery("#io_map_new_line_container").hide();
5571    jQuery("#io_map_instructions").html("Use the map below to take measurements by clicking on each corner of the area y
5571ou want to measure. <span id=\"io_map_additional_instructions\">You can draw multiple polygons to include multiple separate surfaces in the total area. Press Clear to remove all polygons and start again. Alternatively if you know the approximate area in "+units+" you can enter the measurement manually below. When finished press Done and the price of the item will be updated </span><i id=\"io_show_more_instructions\" onClick=\"show_more_instruct_click(this)\">(more)</i>")
5572
5573    drawingListener = google.maps.event.addListener(drawingManager, "polygoncomplete", function(polygon) {
5574      polygons.push(polygon);
5575      let convert_feet = 1;
5576      if(country === "US") convert_feet = 10.764;
5577      let approx_area = 0;
5578      polygons.forEach(function(polygon) {
5579        approx_area += google.maps.geometry.spherical.computeArea(polygon.getPath()) * convert_feet;
5580      });
5581      calcprice_approx_area(Math.round(approx_area));
5582    });
5583    drawingManager.setMap(map);
5584  }
5585
5586  function setMapTools_Perimeter(unit, item_page=false){
5587    jQuery.fancybox.open(jQuery(".map_fancybox"));
5588    drawingManager.setOptions({
5589      drawingControlOptions: {
5590        drawingModes: [google.maps.drawing.OverlayType.MARKER]
5591      },
5592      drawingMode: google.maps.drawing.OverlayType.MARKER
5593    });
5594    let height = jQuery("#perimeter_height").val();
5595    let units = "";
5596    if(height){
5597      units = "sq meters"
5598      if(country === "US") units = "sq feet"
5599      jQuery("#io_measurement_input_label").text("Approximate surface area in "+units+": ");
5600      jQuery("#io_map_instructions").html("Use the map below to take measurements by clicking on each corner of the area you want to measure. <span id=\"io_map_additional_instructions\">You can add additional lines by clicking Add New Line button to include more structures into the total. Press Clear to remove all lines and start again. Alternatively if you know the approximate surface area in "+units+" you can enter the measurement manually below. When finished press Done and the price of the item will be updated </span><i id=\"io_show_more_instructions\" onClick=\"show_more_instruct_click(this)\">(more)</i>")
5601
5602    }else{
5603      units = "meters"
5604      if(country === "US") units = "feet"
5605      jQuery("#io_measurement_input_label").text("Approximate perimeter in "+units+": ");
5606      jQuery("#io_map_instructions").html("Use the map below to take measurements by clicking on each corner of the area you want to measure. <span id=\"io_map_additional_instructions\">You can add additional lines by clicking Add New Line button to include more structures into the total. Press Clear to remove all lines and start again. Alternatively if you know the approximate perimeter in "+units+" you can enter the measurement manually below. When finished press Done and the price of the item will be updated </span><i id=\"io_show_more_instructions\" onClick=\"show_more_instruct_click(this)\">(more)</i>")
5607
5608    }
5609
5610    jQuery("#io_map_manual_input").off("click");
5611    jQuery("#io_map_manual_input").bind("click", function(){manual_calc_price("Perimeter", item_page)});
5612    jQuery("#perimeter_height").bind("change", function(){change_perimeter_instructions()});
5613    jQuery("#io_perimeter_options_container").show();
5614    jQuery("#io_map_clear_container").show();
5615    jQuery("#io_map_new_line_container").show();
5616
5617    current_polyline = new google.maps.Polyline({
5618      map: map,
5619      path: [],
5620      strokeColor: "#0113fc",
5621      strokeOpacity: 1.0,
5622      strokeWeight: 2
5623    })
5624    drawingListener = google.maps.event.addListener(drawingManager, "markercomplete", function(marker) {
5625      polyline_markers.push(marker)
5626      marker.setVisible(false);
5627      current_polyline.getPath().push(marker.getPosition())
5628      if(previous_marker){
5629        let convert_feet = 1;
5630        if(country === "US") convert_feet = 3.281;
5631        let approx_perimeter = 0;
5632        polylines.forEach(function(polyline) {
5633          if(convert_feet > 1) convert_feet = 10.764
5634          approx_perimeter += google.maps.geometry.spherical.computeArea(polyline.getPath()) * convert_feet;
5635        });
5636        approx_perimeter += google.maps.geometry.spherical.computeLength(current_polyline.getPath()) * convert_feet;
5637        calcprice_approx_perimeter(Math.round(approx_perimeter));
5638      }
5639      previous_marker = marker;
5640    });
5641
5642    jQuery("#perimeter_height_contianer").show();
5643
5644    drawingManager.setMap(map);
5645  }
5646
5647  function change_perimeter_instructions(){
5648    let height = jQuery("#perimeter_height").val();
5649    if(height){
5650      units = "sq meters"
5651      if(country === "US") units = "sq feet"
5652      jQuery("#io_measurement_input_label").text("Approximate surface area in "+units+": ");
5653      jQuery("#io_map_instructions").html("Use the map below to take measurements by clicking on each corner of the area you want to measure. <span id=\"io_map_additional_instructions\">You can add additional lines by clicking Add New Line button to include more structures into the total. Press Clear to remove all lines and start again. Alternatively if you know the approximate surface area in "+units+" you can enter the measurement manually below. When finished press Done and the price of the item will be updated </span><i id=\"io_show_more_instructions\" onClick=\"show_more_instruct_click(this)\">(more)</i>")
5654    }else {
5655      units = "meters"
5656      if(country === "US") units = "feet"
5657      jQuery("#io_measurement_input_label").text("Approximate perimeter in "+units+": ");
5658      jQuery("#io_map_instructions").html("Use the map below to take measurements by clicking on each corner of the area you want to measure. <span id=\"io_map_additional_instructions\">You can add additional lines by clicking Add New Line button to include more structures into the total. Press Clear to remove all lines and start again. Alternatively if you know the approximate perimeter in "+units+" you can enter the measurement manually below. When finished press Done and the price of the item will be updated </span><i id=\"io_show_more_instructions\" onClick=\"show_more_instruct_click(this)\">(more)</i>")
5659    }
5660  }
5661
5662  function manual_calc_price(method, item_page){
5663    let approx_measurement = parseInt(jQuery("#io_measurement_input").val());
5664    let units = "";
5665    if(approx_measurement){
5666      if(method == "Area"){
5667        units = "sq meters"
5668        if(country === "US") units = "sq feet"
5669      }else if(method == "Perimeter"){
5670        let height = jQuery("#perimeter_height").val();
5671        if(height){
5672          units = "sq meters"
5673          if(country === "US") units = "sq feet"
5674        }else{
5675          units = "meters"
5676          if(country === "US") units = "feet"
5677        }
5678      }
5679      simpleCart.items().forEach(function (item, index){
5680        if(item.get("rentalid") === item_id_map){
5681          item.set("units", units);
5682          item.set("quantity", approx_measurement);
5683        }
5684      });
5685
5686      simpleCart.update();
5687
5688      if(item_page || jQuery(".io_product_infobox .item_rentalid").text() == item_id_map) set_price_on_item_page(units, approx_measurement);
5689      if(!item_page) cartShow();
5690    }
5691    jQuery.fancybox.close();
5692  }
5693
5694  function calcprice_approx_area(approx_area){
5695    jQuery("#io_measurement_input").val(approx_area);
5696  }
5697
5698  function calcprice_approx_perimeter(approx_perimeter){
5699    let height = jQuery("#perimeter_height").val();
5700    if(height && height > 0) approx_perimeter *= parseInt(height);
5701
5702    jQuery("#io_measurement_input").val(approx_perimeter);
5703  }
5704
5705  function set_price_on_item_page(units, measurement){
5706    let measurement_price = document.querySelector(".io_product_measurement_price");
5707    if(measurement_price==undefined){
5708      var first_price = document.querySelector(".io_product_price_box");
5709      if(first_price != null){
5710        measurement_price = first_price.cloneNode(true);
5711        /* clear all classes */
5712        measurement_price.className = "";
5713        measurement_price.classList.add("io_product_price_box");
5714        measurement_price.classList.add("io_product_measurement_price");
5715        measurement_price.style.display = "grid";
5716        /* Make a hidden data span for when adding to cart */
5717        raw_measurement = document.createElement("span");
5718        raw_measurement.classList.add("io_measure_price_raw_measurement");
5719        raw_measurement.style.display = "none";
5720        raw_measurement.textContent = measurement;
5721        measurement_price.appendChild(raw_measurement);
5722        first_price.before(measurement_price);
5723      }
5724    }
5725    var price_1h = Number(jQuery(".io_product_price_1h_"+jQuery(".io_product_infobox .item_rentalid").text()).text().replace(/[^0-9.-]+/g,""));
5726    measurement_price.querySelector("p:nth-child(1)").innerHTML = simpleCart.toCurrency(price_1h*measurement);
5727    measurement_price.querySelector("p:nth-child(2)").innerHTML = "For approximately "+measurement+" "+units;
5728  }
5729
5730  function io_map_clear() {
5731    if(drawingManager.getDrawingMode() == "polygon"){
5732      drawingManager.setDrawingMode("polygon");
5733    }
5734
5735    if(polygons) polygons.forEach(function(polygon) {
5736      polygon.setMap(null);
5737    });
5738    if(current_polyline) current_polyline.setMap(null);
5739    if(polylines) polylines.forEach(function(polyline) {
5740      polyline.setMap(null);
5741    });
5742    if(polyline_markers) polyline_markers.forEach(function(marker) {
5743      marker.setMap(null);
5744    });
5745
5746    current_polyline = new google.maps.Polyline({
5747      map: map,
5748      path: [],
5749      strokeColor: "#0113fc",
5750      strokeOpacity: 1.0,
5751      strokeWeight: 2
5752    });
5753    polygons = new Array();
5754    polylines = new Array();
5755    polyline_markers = new Array();
5756    previous_marker = undefined;
5757  }
5758
5759  function io_map_new_line() {
5760    polylines.push(new google.maps.Polyline({
5761              map: map,
5762              path: current_polyline.getPath(),
5763              strokeColor: "#0113fc",
5764              strokeOpacity: 1.0,
5765              strokeWeight: 2
5766            })
5767    );
5768    previous_marker = undefined;
5769    current_polyline.setMap(null);
5770    current_polyline = new google.maps.Polyline({
5771      map: map,
5772      path: [],
5773      strokeColor: "#0113fc",
5774      strokeOpacity: 1.0,
5775      strokeWeight: 2
5776    });
5777  }
5778
5779  function show_more_instruct_click(show_more_button) {
5780    if(show_more_button.textContent == "(more)") {
5781      show_more_button.textContent = "(hide)";
5782      jQuery("#io_map_additional_instructions").show();
5783    }else if(show_more_button.textContent == "(hide)") {
5784      show_more_button.textContent = "(more)";
5785      jQuery("#io_map_additional_instructions").hide();
5786    }
5787  }
5788
5789  function perimeter_height_changed(){
5790    let current_map_height = jQuery("#perimeter_height").val();
5791    if(current_map_height && current_map_height > 0){
5792      if(jQuery("#io_measurement_input").val() && !previous_map_height){
5793        let measurement = jQuery("#io_measurement_input").val();
5794        jQuery("#io_measurement_input").val(measurement * current_map_height);
5795      }else if(jQuery("#io_measurement_input").val() && previous_map_height){
5796        let measurement = jQuery("#io_measurement_input").val();
5797        if(previous_map_height > 0){
5798          measurement = measurement / previous_map_height;
5799        }
5800        jQuery("#io_measurement_input").val(measurement * current_map_height);
5801      }
5802    }else if (!current_map_height || current_map_height == 0){
5803      if(jQuery("#io_measurement_input").val() && previous_map_height){
5804        let measurement = jQuery("#io_measurement_input").val();
5805        if(previous_map_height > 0){
5806          measurement = measurement / previous_map_height;
5807        }
5808        jQuery("#io_measurement_input").val(measurement);
5809      }
5810    }
5811    previous_map_height = current_map_height;
5812  }
5813
5814  window.initMap = initMap;</script>
5814 <div class="map_fancybox"><div class="elementor-widget-text-editor"><div> <details id="io_map_address_entry"> <summary style = "cursor:pointer">Enter Address Information (edit)</summary><table style="margin-left: 10px"><tr><td> <label for="address" id="io_mcl_address_label" style="display: table-cell"> Street Address </label></td><td> <input id="io_mc_address" style="display: table-cell" name="address" type="text"></input></td></tr><tr><td> <label for="city" id="io_mcl_city_label" style="display: table-cell"> City </label></td><td> <input id="io_mc_city" style="display: table-cell" name="city" type="text"></input></td></tr><tr id="io_mc_us-state-select"><td> <label for="state" id="io_mcl_state_label" style="display: table-cell"> State </label></td><td> <select name="state" id="io_mc_state" style="display: table-cell" class="input-mini"><option value=""></option><option value="AK">AK</option><option value="AL">AL</option><option value="AR">AR</option><option value="AZ">AZ</option><option value="CA">CA</option><option value="CO">CO</option><option value="CT">CT</option><option value="DC">DC</option><option value="DE">DE</option><option value="FL">FL</option><option value="GA">GA</option><option value="HI">HI</option><option value="IA">IA</option><option value="ID">ID</option><option value="IL">IL</option><option value="IN">IN</option><option value="KS">KS</option><option value="KY">KY</option><option value="LA">LA</option><option value="MA">MA</option><option value="MD">MD</option><option value="ME">ME</option><option value="MI">MI</option><option value="MN">MN</option><option value="MO">MO</option><option value="MS">MS</option><option value="MT">MT</option><option value="NC">NC</option><option value="ND">ND</option><option value="NE">NE</option><option value="NH">NH</option><option value="NJ">NJ</option><option value="NM">NM</option><option value="NV">NV</option><option value="NY">NY</option><option value="OH">OH</option><option value="OK">OK</option><option value="OR">OR</option><option value="PA">PA</option><option value="RI">RI</option><option value="SC">SC</option><option value="SD">SD</option><option value="TN">TN</option><option value="TX">TX</option><option value="UT">UT</option><option value="VA">VA</option><option value="VT">VT</option><option value="WA">WA</option><option value="WI">WI</option><option value="WV">WV</option><option value="WY">WY</option> </select></td></tr><tr><td> <label for="zip" id="io_mcl_zip_label" style="display: table-cell"> Zip Code </label></td><td> <input id="io_mc_zip" style="display: table-cell" name="zip" type="text"></input></td></tr></table> <a class="elementor-button elementor-size-sm io_button"
5815 id="map_geocode_submit"
5816 onClick="io_geocode()"
5817 href="javascript:;"> Locate </a> </details><div id="perimeter_height_contianer"><p>If you are taking measurements for a structure such as a building or fence, please provide the height of the structure here. If height does not apply to the wash, for instance for a gutter wash, leave this field empty. <strong> Please note if you enter a value here after taking measurements, you will need to take measurements again. </strong></p> <label> Height of structure: </label> <input type="number" id="perimeter_height" onChange="perimeter_height_changed()"/></div><div><p id="io_map_instructions"></p></div><div id="io_measurement_input_container"> <label id="io_measurement_input_label"> </label> <input type="number" id="io_measurement_input"/> <a class="elementor-button elementor-size-sm io_button"
5818 id="io_map_manual_input"
5819 href="javascript:;"> Done </a></div><div style="display: inline-flex"><div id="io_map_clear_container"> <a class="elementor-button elementor-size-sm io_button"
5820 id="io_map_clear_btn"
5821 onClick="io_map_clear()"
5822 href="javascript:;"> Clear </a></div><div id="io_map_new_line_container" style="margin-left:5px"> <a class="elementor-button elementor-size-sm io_button"
5823 id="io_map_new_line_btn"
5824 onClick="io_map_new_line()"
5825 href="javascript:;"> Add New Line </a></div></div></div></div> <br><div id="map_container"> 
5825<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDEuvvqefKaUABPvydm00SV8Fr8tQeGVcw&libraries=drawing&callback=initMap" defer></script>
5825 </div></div>  
5825<script>jQuery(".io_testimonials, #io_testimonials").each(function(){
5826           io_get_reviews(this);
5827        })
5828        setTimeout(function(){
5829            jQuery(".io_testimonials .w3-ul li p").each(function(){
5830                const container = jQuery(this).parent()
5831                const element = jQuery(this);
5832
5833                if (element[0].scrollHeight > container[0].clientHeight) {
5834
5835                    jQuery(this).parent().parent().append(create_read_more());
5836                }
5837            });
5838        }, 500);
5839
5840        function create_read_more(){
5841            let html = "<p class=\"io_review_readmore\" onClick=\"review_readmore_clicked(this)\">read more</p>"
5842            return html;
5843        }
5844
5845        function review_readmore_clicked(element){
5846            let review_li = jQuery(element).parent().find("li:eq(3)");
5847            new_height = jQuery(review_li).find("p").height() + 16;
5848            jQuery(review_li).height(new_height);
5849            jQuery(element).hide();
5850        }
5851
5852        function io_get_reviews(element){
5853        let io_un = "Mountainbouncers";
5854	  let io_loc = "0";
5855	  let io_url1 = 'https://rental.software/testimonials_iframe.php?user=';
5856	  if (location.hostname === "localhost"){
5857	      io_url1 = 'http://localhost/io/bugs/testimonials_iframe.php?user=';
5858          //io_url1 = 'http://localhost/jbug/trunk/testimonials_iframe.php?user=';
5859        }
5860	  let io_url2 = '&location_id=';
5861	  let io_url3 = '&width=100%&number_of_reviews=10&show_average_rating=1&show_stars=1&show_date=&show_reviewer_name=1&orderby=time&iframe=0';
5862	  let io_url_c = io_url1 + io_un + io_url2 + io_loc + io_url3;
5863	  fetch(io_url_c, {
5864		method: 'get'
5865	}).then(
5866	  function(response){
5867		 return response.json();
5868		}
5869	).then(function(data) {
5870
5871
5872
5873	//let element = document.getElementById("io_testimonials");
5874	//DOM-built on purpose: literal markup in this inline script lands in the raw page
5875	//source and SEO crawlers read it as page content (IO-37932).
5876	element.textContent = "";
5877	let review_cnt=0;
5878	let rating_sum = 0;
5879	data.forEach((user) => {
5880				const { name, review, rating, time } = user;
5881				rating_sum += Number(rating);
5882				review_cnt++;
5883				let review_div = document.createElement("div");
5884				let review_list = document.createElement("ul");
5885				review_list.className = "w3-ul";
5886				let name_li = document.createElement("li");
5887				name_li.textContent = name;
5888				let rating_li = document.createElement("li");
5889				rating_li.textContent = rating + " ";
5890				let date_li = document.createElement("li");
5891				date_li.textContent = time;
5892				let review_li = document.createElement("li");
5893				let review_p = document.createElement("p");
5894				review_p.textContent = review;
5895				review_li.appendChild(review_p);
5896				let img_star = Math.round(parseFloat(rating));
5897				let star_img = document.createElement("img");
5898				star_img.className = "review_img";
5899				star_img.src = "https://rental.software/images/" + img_star + "star.png";
5900				rating_li.appendChild(star_img);
5901				review_list.appendChild(name_li);
5902				review_list.appendChild(rating_li);
5903				review_list.appendChild(date_li);
5904				review_list.appendChild(review_li);
5905				review_div.appendChild(review_list);
5906				element.appendChild(review_div);
5907	});
5908	let avg = (parseFloat(rating_sum)/parseFloat(review_cnt)).toFixed(1);
5909	let avg_img = Math.round(avg);
5910	let head = document.createElement("div");
5911	let head_h2 = document.createElement("h2");
5912	head_h2.textContent = "Avg Rating: " + avg;
5913	let head_img = document.createElement("img");
5914	head_img.className = "review_avg_img";
5915	head_img.src = "https://rental.software/images/" + avg_img + "star.png";
5916	head.appendChild(head_h2);
5917	head.appendChild(head_img);
5918	element.prepend(head);
5919	}).catch(function(err) {
5920		console.log(err);
5921	});
5922}</script>
5922 <style type="text/css">.searchio-live-search-results {
5923						opacity: 0;
5924						transition: opacity .25s ease-in-out;
5925						-moz-transition: opacity .25s ease-in-out;
5926						-webkit-transition: opacity .25s ease-in-out;
5927						height: 0;
5928						overflow: hidden;
5929						z-index: 9999995; /* Exceed searchIO Modal Search Form overlay. */
5930						position: absolute;
5931						display: none;
5932					}
5933
5934					.searchio-live-search-results-showing {
5935						display: block;
5936						opacity: 1;
5937						height: auto;
5938						overflow: auto;
5939					}
5940
5941					.searchio-live-search-no-results {
5942						padding: 3em 2em 0;
5943						text-align: center;
5944					}
5945
5946					.searchio-live-search-no-min-chars:after {
5947						content: "Continue typing";
5948						display: block;
5949						text-align: center;
5950						padding: 2em 2em 0;
5951					}</style> 
5951<script>var _searchIO_LIVE_AJAX_SEARCH_BLOCKS = true;
5952			var _searchIO_LIVE_AJAX_SEARCH_ENGINE = 'default';
5953			var _searchIO_LIVE_AJAX_SEARCH_CONFIG = 'default';</script>
5953 
5953<script>( () => {
5954					const lazyloadRunObserver = () => {
5955						const lazyloadBackgrounds = document.querySelectorAll( `.e-con.e-parent:not(.e-lazyloaded)` );
5956						const lazyloadBackgroundObserver = new IntersectionObserver( ( entries ) => {
5957							entries.forEach( ( entry ) => {
5958								if ( entry.isIntersecting ) {
5959									let lazyloadBackground = entry.target;
5960									if( lazyloadBackground ) {
5961										lazyloadBackground.classList.add( 'e-lazyloaded' );
5962									}
5963									lazyloadBackgroundObserver.unobserve( entry.target );
5964								}
5965							});
5966						}, { rootMargin: '200px 0px 200px 0px' } );
5967						lazyloadBackgrounds.forEach( ( lazyloadBackground ) => {
5968							lazyloadBackgroundObserver.observe( lazyloadBackground );
5969						} );
5970					};
5971					const events = [
5972						'DOMContentLoaded',
5973						'elementor/lazyload/observe',
5974					];
5975					events.forEach( ( event ) => {
5976						document.addEventListener( event, lazyloadRunObserver );
5977					} );
5978				} )();</script>
5978 
5978<script id="jquery-ui-core-js-before">jQuery.uiBackCompat = true;
5979//# sourceURL=jquery-ui-core-js-before</script>
5979 
5979<script id="jquery-ui-datepicker-js-after">jQuery(function(jQuery){jQuery.datepicker.setDefaults({"closeText":"Close","currentText":"Today","monthNames":["January","February","March","April","May","June","July","August","September","October","November","December"],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"nextText":"Next","prevText":"Previous","dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dayNamesMin":["S","M","T","W","T","F","S"],"dateFormat":"MM d, yy","firstDay":1,"isRTL":false});});
5980//# sourceURL=jquery-ui-datepicker-js-after</script>
5980 
5980<script id="slick-carousel-js-js" src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js?ver=1.8.1"></script>
5980 
5980<script id="elementor-frontend-js-before">var elementorFrontendConfig = {"environmentMode":{"edit":false,"wpPreview":false,"isScriptDebug":false},"i18n":{"shareOnFacebook":"Share on Facebook","shareOnX":"Share on X","pinIt":"Pin it","download":"Download","downloadImage":"Download image","fullscreen":"Fullscreen","zoom":"Zoom","share":"Share","playVideo":"Play Video","previous":"Previous","next":"Next","close":"Close","a11yCarouselPrevSlideMessage":"Previous slide","a11yCarouselNextSlideMessage":"Next slide","a11yCarouselFirstSlideMessage":"This is the first slide","a11yCarouselLastSlideMessage":"This is the last slide","a11yCarouselPaginationBulletMessage":"Go to slide"},"is_rtl":false,"breakpoints":{"xs":0,"sm":480,"md":768,"lg":1025,"xl":1440,"xxl":1600},"responsive":{"breakpoints":{"mobile":{"label":"Mobile Portrait","value":767,"default_value":767,"direction":"max","is_enabled":true},"mobile_extra":{"label":"Mobile Landscape","value":880,"default_value":880,"direction":"max","is_enabled":false},"tablet":{"label":"Tablet Portrait","value":1024,"default_value":1024,"direction":"max","is_enabled":true},"tablet_extra":{"label":"Tablet Landscape","value":1200,"default_value":1200,"direction":"max","is_enabled":false},"laptop":{"label":"Laptop","value":1366,"default_value":1366,"direction":"max","is_enabled":false},"widescreen":{"label":"Widescreen","value":2400,"default_value":2400,"direction":"min","is_enabled":false}},"hasCustomBreakpoints":false},"version":"4.3.4","is_static":false,"experimentalFeatures":{"additional_custom_breakpoints":true,"theme_builder_v2":true,"landing-pages":true,"import-export-customization":true,"e_pro_atomic_form":true,"e_pro_collection_loop":true,"e_pro_variables":true,"e_pro_interactions":true},"urls":{"assets":"https:\/\/mountainbouncers.com\/wp-content\/plugins\/elementor\/assets\/","ajaxurl":"https:\/\/mountainbouncers.com\/wp-admin\/admin-ajax.php","uploadUrl":"https:\/\/mountainbouncers.com\/wp-content\/uploads"},"nonces":{"floatingButtonsClickTracking":"8099b7aecc","atomicFormsSendForm":"6af07bac49"},"swiperClass":"swiper","settings":{"page":[],"editorPreferences":[]},"kit":{"body_background_background":"classic","active_breakpoints":["viewport_mobile","viewport_tablet"],"lightbox_enable_counter":"yes","lightbox_enable_fullscreen":"yes","lightbox_enable_zoom":"yes","lightbox_enable_share":"yes","lightbox_title_src":"title","lightbox_description_src":"description"},"post":{"id":4319,"title":"Slide%20Combos%20-%20Mountain%20Bouncers%20LLC","excerpt":"","featuredImage":"https:\/\/mountainbouncers.com\/wp-content\/uploads\/2026\/02\/file_00000000d89471fdacd403a109717a64_1771703468_big.png"}};
5981//# sourceURL=elementor-frontend-js-before</script>
5981 
5981<script id="swp-live-search-client-js-extra">var searchio_live_search_params = [];
5982searchio_live_search_params = {"ajaxurl":"https:\/\/mountainbouncers.com\/wp-admin\/admin-ajax.php","origin_id":4319,"config":{"default":{"engine":"default","input":{"delay":300,"min_chars":3},"results":{"position":"bottom","width":"auto","offset":{"x":0,"y":5}},"spinner":{"lines":12,"length":8,"width":3,"radius":8,"scale":1,"corners":1,"color":"#424242","fadeColor":"transparent","speed":1,"rotate":0,"animation":"searchio-spinner-line-fade-quick","direction":1,"zIndex":2000000000,"className":"spinner","top":"50%","left":"50%","shadow":"0 0 1px transparent","position":"absolute"}}},"msg_no_config_found":"No valid searchIO Live Search configuration found!","aria_instructions":"When autocomplete results are available use up and down arrows to review and enter to go to the desired page. Touch device users, explore by touch or with swipe gestures.","io_search_results_same_width":"1","io_search_results_width":"400","io_search_results_align":"right"};;
5983//# sourceURL=swp-live-search-client-js-extra</script>
vendor: 131 bytes, line 5983
5983 <script id="elementor-recaptcha_v3-api-js" src="https://www.google.com/recaptcha/api.js?render=explicit&#038;ver=4.2.2"></script> 
5983<script id="wp-hooks-js" src="https://mountainbouncers.com/wp-includes/js/dist/hooks.min.js?ver=f0f188028580e8dc1255"></script>
5983 
5983<script id="wp-i18n-js" src="https://mountainbouncers.com/wp-includes/js/dist/i18n.min.js?ver=1dfe7db3940c23ea9216"></script>
5983 
5983<script id="wp-i18n-js-after">wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } );
5984//# sourceURL=wp-i18n-js-after</script>
5984 
5984<script id="elementor-pro-frontend-js-before">var ElementorProFrontendConfig = {"ajaxurl":"https:\/\/mountainbouncers.com\/wp-admin\/admin-ajax.php","nonce":"31828b67b0","urls":{"assets":"https:\/\/mountainbouncers.com\/wp-content\/plugins\/elementor-pro\/assets\/","rest":"https:\/\/mountainbouncers.com\/wp-json\/"},"settings":{"lazy_load_background_images":true},"popup":{"hasPopUps":true},"shareButtonsNetworks":{"facebook":{"title":"Facebook","has_counter":true},"twitter":{"title":"Twitter"},"linkedin":{"title":"LinkedIn","has_counter":true},"pinterest":{"title":"Pinterest","has_counter":true},"reddit":{"title":"Reddit","has_counter":true},"vk":{"title":"VK","has_counter":true},"odnoklassniki":{"title":"OK","has_counter":true},"tumblr":{"title":"Tumblr"},"digg":{"title":"Digg"},"skype":{"title":"Skype"},"stumbleupon":{"title":"StumbleUpon","has_counter":true},"mix":{"title":"Mix"},"telegram":{"title":"Telegram"},"pocket":{"title":"Pocket","has_counter":true},"xing":{"title":"XING","has_counter":true},"whatsapp":{"title":"WhatsApp"},"email":{"title":"Email"},"print":{"title":"Print"},"x-twitter":{"title":"X"},"threads":{"title":"Threads"}},"facebook_sdk":{"lang":"en_US","app_id":""},"lottie":{"defaultAnimationUrl":"https:\/\/mountainbouncers.com\/wp-content\/plugins\/elementor-pro\/modules\/lottie\/assets\/animations\/default.json"}};
5985//# sourceURL=elementor-pro-frontend-js-before</script>
5985 
5985<script defer src="https://mountainbouncers.com/wp-content/cache/autoptimize/js/autoptimize_0b55f68a0d56a6c72c7cde61ffd32f75.js"></script>
5985</body></html>
5986<!-- Cached by WP-Optimize (gzip) - https://teamupdraft.com/wp-optimize/ - Last modified: October 6, 2026 8:51 pm (UTC:0) -->

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.