PageSourceSearch

https://bouncehousepalmbeach.com/rentals/

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