{"id":9532,"date":"2025-04-14T13:48:06","date_gmt":"2025-04-14T12:48:06","guid":{"rendered":"https:\/\/foxinaboxgames.com\/gavle\/?post_type=product&#038;p=9532"},"modified":"2026-01-19T14:45:28","modified_gmt":"2026-01-19T13:45:28","slug":"zombie-hunt","status":"publish","type":"product","link":"https:\/\/foxinaboxgames.com\/gavle\/p\/room-hunt\/zombie-hunt\/","title":{"rendered":"ZOMBIE HUNT"},"content":{"rendered":"\n<div class=\"wp-block-group alignfull has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\" style=\"margin-top:0;margin-bottom:0\">\n<div class=\"wp-block-cover alignfull has-custom-content-position is-position-bottom-center\" style=\"padding-bottom:2rem\"><img decoding=\"async\" width=\"2560\" height=\"1599\" class=\"wp-block-cover__image-background wp-image-9533\" alt=\"\" src=\"https:\/\/foxinaboxgames.com\/gavle\/wp-content\/uploads\/sites\/55\/2025\/04\/20250314_140917-scaled.jpg\" data-object-fit=\"cover\" srcset=\"https:\/\/foxinaboxgames.com\/gavle\/wp-content\/uploads\/sites\/55\/2025\/04\/20250314_140917-scaled.jpg 2560w, https:\/\/foxinaboxgames.com\/gavle\/wp-content\/uploads\/sites\/55\/2025\/04\/20250314_140917-300x187.jpg 300w, https:\/\/foxinaboxgames.com\/gavle\/wp-content\/uploads\/sites\/55\/2025\/04\/20250314_140917-1024x640.jpg 1024w, https:\/\/foxinaboxgames.com\/gavle\/wp-content\/uploads\/sites\/55\/2025\/04\/20250314_140917-768x480.jpg 768w, https:\/\/foxinaboxgames.com\/gavle\/wp-content\/uploads\/sites\/55\/2025\/04\/20250314_140917-1536x960.jpg 1536w, https:\/\/foxinaboxgames.com\/gavle\/wp-content\/uploads\/sites\/55\/2025\/04\/20250314_140917-2048x1279.jpg 2048w, https:\/\/foxinaboxgames.com\/gavle\/wp-content\/uploads\/sites\/55\/2025\/04\/20250314_140917-18x12.jpg 18w, https:\/\/foxinaboxgames.com\/gavle\/wp-content\/uploads\/sites\/55\/2025\/04\/20250314_140917-600x375.jpg 600w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim-0 has-background-dim\" style=\"background-color:#4a2d1e\"><\/span><div class=\"wp-block-cover__inner-container has-global-padding is-layout-constrained wp-block-cover-is-layout-constrained\">\n<div class=\"wp-block-group alignwide has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\" style=\"padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)\">\n<h1 class=\"wp-block-heading alignwide has-text-align-left has-custom-white-color has-text-color has-link-color has-larger-font-size wp-elements-da43411cd93f5a7a6cbb710653ac4823\" style=\"margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--50);line-height:0.9\">ZOMBIE HUNT<\/h1>\n<\/div>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull has-tertiary-background-color has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"margin-top:0;margin-bottom:0;padding-top:5rem;padding-bottom:5rem\">\n<div class=\"wp-block-group alignwide has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-columns alignwide stack-on-tablet-portrait is-layout-flex wp-container-core-columns-is-layout-123045d2 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<h2 class=\"wp-block-heading\">In this apocalypse scenario, you\u2019re part of the main research team, racing against time to uncover the truth behind the deadly Z0-M3I virus. As it spreads rapidly, turning victims into zombie-like creatures, the fate of humanity lies in your hands.<\/h2>\n\n\n\n<p>This is not a traditional escape room \u2014 it\u2019s an immersive Fox Hunt experience, where gameplay unfolds through a combination of physical clues in the room and interactive puzzles triggered by QR codes on your mobile device. The game is non-linear, meaning you and your team choose the path and the order in which to solve the puzzles.<\/p>\n\n\n\n<p>Designed as a<strong> <em>challenging experience<\/em><\/strong> for seasoned players, this room is not recommended for new players. You\u2019ll need to think, collaborate, and cross-reference clues received on your phone with real-world elements like research papers, news articles, flyers, and lab notes. Your mission: identify the virus\u2019s origin and develop a cure \u2014 before it\u2019s too late.<\/p>\n\n\n\n<p>Set inside a secure quarantine containment zone at&nbsp;<strong>Fox in a Box G\u00e4vle<\/strong>, this unique hybrid game offers a brain-teasing, high-stakes new experience!<br><br>Are you ready to crack the code and save the world?<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<div class=\"wp-block-group has-custom-white-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-b91ec625 wp-block-group-is-layout-constrained\" style=\"border-radius:4px;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--60)\">\n<div class=\"wp-block-group is-content-justification-space-between is-layout-flex wp-container-core-group-is-layout-6edfc491 wp-block-group-is-layout-flex\" style=\"border-bottom-color:var(--wp--preset--color--offwhite);border-bottom-width:1px;padding-top:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--50)\">\n<h3 class=\"wp-block-heading has-small-font-size\">number of players<\/h3>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\">1-10<\/h3>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-content-justification-space-between is-layout-flex wp-container-core-group-is-layout-f335b412 wp-block-group-is-layout-flex\" style=\"border-bottom-color:var(--wp--preset--color--offwhite);border-bottom-width:1px;padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)\">\n<h3 class=\"wp-block-heading has-small-font-size\">recommended minimum age<\/h3>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\">18+<\/h3>\n<\/div>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color has-small-font-size wp-elements-edc27d97258db1fa779bb9b956633a92\" style=\"margin-bottom:var(--wp--preset--spacing--70)\"><strong>Duration<\/strong>: 60 minutes<br><strong>Language<\/strong>: EN, SV<br><strong>Puzzles<\/strong>: 8<br><strong>Difficulty<\/strong>: Hard<br><strong>Starting Point<\/strong>: Fox in a Box G\u00e4vle<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-button-arrow\"><a class=\"wp-block-button__link wp-element-button\" href=\"#Book-Now\">Book now<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull has-offwhite-background-color has-background is-layout-flow wp-block-group-is-layout-flow\" id=\"Book-Now\" style=\"margin-top:0;margin-bottom:0;padding-top:3rem;padding-bottom:3rem\">\n<div class=\"wp-block-group alignwide has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\"><h2 style=\"margin-bottom:var(--wp--preset--spacing--20);\" class=\"alignwide wp-block-post-title has-extra-large-font-size\">ZOMBIE HUNT<\/h2>\n\n\n<h4 class=\"wp-block-heading alignwide\" style=\"margin-top:var(--wp--preset--spacing--30);margin-bottom:4rem\">Book a game<\/h4>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-columns alignwide is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group alignwide is-layout-flow wp-block-group-is-layout-flow\"><div data-block-name=\"woocommerce\/add-to-cart-form\" class=\"wp-block-add-to-cart-form wc-block-add-to-cart-form wc-block-add-to-cart-form--input wp-block-woocommerce-add-to-cart-form\" >\n<script type=\"text\/javascript\">\n  var siteData = {\n    id: 55  };\n  window.fiabBookingContext = {\n    product_id: 9532,\n    product_name: \"ZOMBIE HUNT\",\n    currency: \"SEK\",\n    city: \"G\\u00e4vle\",\n    affiliation: \"Fox in a Box G\\u00e4vle\",\n    site_id: 55,\n    item_location_id: \"g_vle_\",\n    is_staff: false,\n\tenable_last_minute_reservations: \"no\",\n\tlast_minute_fee: 0,\n\tdisable_sleep_mode: \"no\"};\n  window.fiabOperatingHours = {\n    first: \"09:30\", \/\/ e.g. \"09:30:00\"\n    last: \"18:30\"     \/\/ e.g. \"21:30:00\"\n  };\n<\/script>\n\n<style>\n  .single-product .fc-daygrid-event.booked .fc-event-title:after {\n    content: \"Booked\" !important;\n  }\n\n  .single-product .fc-daygrid-event.booked .fc-event-title[data-booked-time]:after {\n    content: \"Booked\\A\" attr(data-booked-time) !important;\n\twhite-space: pre;\n  }\n\n  .single-product .fc-daygrid-event.booked.selected .fc-event-title:after {\n    content: \"Selected \" !important;\n  }\n\n  .fc-header-toolbar {\n    width: 100% !important;\n  }\n\n  .booking-form.multiple .fc-header-toolbar,\n  .booking-form.single .fc-header-toolbar {\n    background: #ED6B06 !important;\n    padding: 20px 30px !important;\n    border-top-left-radius: 5px !important;\n    border-top-right-radius: 5px !important;\n  }\n<\/style>\n\n<noscript>Your browser must support JavaScript in order to make a booking.<\/noscript>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/hammer.js\/2.0.8\/hammer.min.js\"><\/script>\n\n\n<script type=\"text\/javascript\">\n\n\t\/\/ WordPress time format settings\n\tconst wpTimeFormat = {\n\t\tis24h: true,\n\t\tformat: \"H:i\"\t};\n\n\t\/\/ Function to format time according to WordPress settings\n\tfunction formatTimeAccordingToWP(date) {\n\t\tif (wpTimeFormat.is24h) {\n\t\t\treturn date.toLocaleString('en-US', { \n\t\t\t\thour: '2-digit', \n\t\t\t\tminute: '2-digit', \n\t\t\t\thour12: false \n\t\t\t});\n\t\t} else {\n\t\t\treturn date.toLocaleString('en-US', { \n\t\t\t\thour: 'numeric', \n\t\t\t\tminute: '2-digit', \n\t\t\t\thour12: true \n\t\t\t});\n\t\t}\n\t}\n\n\t\t\tfunction getOperationalReferenceTime(eventDate) {\n\n\t\t\tconst now = new Date();\n\t\t\tif (!window.fiabOperatingHours) {\n\t\t\t\treturn now; \/\/ fallback safety\n\t\t\t}\n\n\t\t\t \/\/ NEW: bypass sleep mode completely\n\t\t\tif (fiabBookingContext.disable_sleep_mode === 'yes') {\n\t\t\t\treturn now;\n\t\t\t}\n\n\t\t\tconst [firstHour, firstMin] = fiabOperatingHours.first.split(':').map(Number);\n\t\t\tconst [lastHour, lastMin] = fiabOperatingHours.last.split(':').map(Number);\n\t\t\t\n\n\t\t\t\/\/ First slot today\n\t\t\tconst firstSlotToday = new Date(now);\n\t\t\tfirstSlotToday.setHours(firstHour, firstMin, 0, 0);\n\n\t\t\t\/\/ Last slot today\n\t\t\tconst lastSlotToday = new Date(now);\n\t\t\tlastSlotToday.setHours(lastHour, lastMin, 0, 0);\n\n\t\t\t\/\/ First slot tomorrow\n\t\t\tconst firstSlotTomorrow = new Date(firstSlotToday);\n\t\t\tfirstSlotTomorrow.setDate(firstSlotTomorrow.getDate() + 1);\n\n\t\t\t\/\/ --- Sleep mode logic ---\n\t\t\tif (now < firstSlotToday) {\n\t\t\t\t\/\/ Before opening \u2192 freeze at today opening\n\t\t\t\treturn firstSlotToday;\n\t\t\t}\n\t\t\tif (now > lastSlotToday) {\n\t\t\t\t\/\/ After closing \u2192 freeze at tomorrow opening\n\t\t\t\treturn firstSlotTomorrow;\n\t\t\t}\n\t\t\t\/\/ During working hours\n\t\t\treturn now;\n\t\t}\n\n\n\tdocument.addEventListener('DOMContentLoaded', function() {\n\n\t\tconst defaultPlayers = product_data.default_players;\n\n\t\t\/\/ Find the radio input for the default number of players and select it\n\t\tconst playerInputs = document.querySelectorAll(\".persons-number-selector\");\n\t\t\t\tplayerInputs.forEach(input => {\n\t\t\t\t\tif (input.value === defaultPlayers) {\n\t\t\t\t\t\t\tinput.checked = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tvar myTranslations = {\"changeDate\":\"Change Date\"};\n\t\tconst locale = document.documentElement.lang;\t\n\t\t\n\t\t\/\/ Show initial loading state\n\t\tjQuery('#calendar-single').addClass('loading-spinner');\n\t\t\n\t\t\/\/ Set proper height and positioning for loading state\n\t\tjQuery('#calendar-single').css({\n\t\t\t'min-height': '500px',\n\t\t\t'position': 'relative',\n\t\t\t'background': '#f9f9f9',\n\t\t\t'width': '100%',\n\t\t\t'overflow': 'hidden'\n\t\t});\n\t\t\n\t\t\/\/ Ensure calendar content maintains width\n\t\tjQuery('#calendar-single .fc-view-harness, #calendar-single .fc-scrollgrid').css({\n\t\t\t'width': '100%',\n\t\t\t'min-width': '100%',\n\t\t\t'max-width': '100%'\n\t\t});\n\t\t\n\t\t\/\/ Add initial loading message with fade-in effect\n\t\tif (!jQuery('#calendar-single .initial-loading').length) {\n\t\t\tjQuery('#calendar-single').append('<div class=\"initial-loading\">Loading calendar...<\/div>');\n\t\t\t\/\/ Trigger fade-in animation\n\t\t\tsetTimeout(function() {\n\t\t\t\tjQuery('#calendar-single .initial-loading').css('opacity', '1');\n\t\t\t}, 100);\n\t\t}\n\n\t    var calendarEl = document.getElementById('calendar-single');\n\t    var calendar = new FullCalendar.Calendar(calendarEl, {\n\t    \tlocale: 'en',\n\t\t\tinitialView: 'dayGridFourDay',\n\t\t\theight:'auto',\n\t\t\tinitialDate: '' || new Date().toISOString().split('T')[0],\n\t\t\teventDisplay: 'block',\n\t\t\ttimeZone: 'local', \n\t\t\tviews: {\n\t\t\t    dayGridFourDay: {\n\t\t\t        type: 'dayGridWeek',\n\t\t\t        slotMinTime: '09:30',\n\t    \t\t\tslotMaxTime: '20:30',\n\t\t\t        duration: { days: jQuery(window).width() < 765 ? 3 : 7 },\n\t\t\t        \/\/ dayHeaderFormat: { weekday: 'short', month: 'short', day: 'numeric', omitCommas: false },\n\t\t\t        \/\/ eventTimeFormat: { \/\/ like '14:30:00'\n\t\t\t\t\t\/\/     hour: '2-digit',\n\t\t\t\t\t\/\/     minute: '2-digit',\n\t\t\t\t\t\/\/     meridiem: 'short',\n\t\t\t\t\t\/\/     hour12: true\n\t\t\t\t\t\/\/ },\n\t\t\t\t\tdayHeaderFormat: { weekday: 'short', month: 'short', day: 'numeric', omitCommas: false },\n\t\t\t\t\t\/\/ \u2b07\ufe0f Time format depends on WP time format\n\t\t\t\t\teventTimeFormat: {\n\t\t\t\t\t\thour: '2-digit',\n\t\t\t\t\t\tminute: '2-digit',\n\t\t\t\t\t\thour12: false,\n\t\t\t\t\t\tmeridiem: false\t\t\t\t\t},\n\n\t\t\t\t\t\/\/ If you also want the slot labels to follow WP format:\n\t\t\t\t\tslotLabelFormat: {\n\t\t\t\t\t\thour: '2-digit',\n\t\t\t\t\t\tminute: '2-digit',\n\t\t\t\t\t\thour12: false,\n\t\t\t\t\t\tmeridiem: false\t\t\t\t\t}\n\t\t\t    }\n\t\t\t},\n\t\t\tbuttonIcons: false,\n\t\t\theaderToolbar: {\n\t\t\t    left: 'prev',\n\t\t\t    center: 'title',\n\t\t\t    right: 'next' \/\/ user can switch between the two\n\t\t\t},\n\t\t\t\/\/ validRange: function(nowDate) {\n\t\t\t\/\/   return {\n\t\t\t\/\/     start: nowDate\n\t\t\t\/\/   };\n\t\t\t\/\/ },\n\t\t\tcustomButtons: {\n\t\t\t\tdatepicker: {\n\t\t\t\t\ttext: (locale === 'fr-CA') ? 'Changer la date' :\n\t\t\t\t\t\t(locale === 'zh-HK') ? '\u66f4\u6539\u65e5\u671f' :\n\t\t\t\t\t\t(locale === 'hr')    ? 'Promijeni datum' :\n\t\t\t\t\t\t(locale === 'hr_HR') ? 'Promijeni datum' :\n\t\t\t\t\t\t(locale === 'bs-BA') ? 'Promijeni datum' :\n\t\t\t\t\t\t(locale === 'es-MX') ? 'Cambiar fecha' :\n\t\t\t\t\t\t(locale === 'de-AT') ? 'Datum \u00e4ndern' :\n\t\t\t\t\t\t(myTranslations?.changeDate ?? 'Change date'),\n\t\t\t\t\tclick: function (e) {\n\t\t\t\t\t\tpicker.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t        },\n\t        headerToolbar: {\n\t            left: 'prev',\n\t            center: 'datepicker title',\n\t            right: 'next'\n\t        },\n\t\t\tfirstDay: 1,\n\t\t\tallDaySlot: false,\n\t\t\tloading: function(isLoading) {\n\t\t\t\tif (isLoading) {\n\t\t\t\t\t\/\/ Simple loading state - just add loading class\n\t\t\t\t\tjQuery('#calendar-single').addClass('loading-spinner');\n\t\t\t\t} else {\n\t\t\t\t\t\/\/ Remove loading class when done\n\t\t\t\t\tjQuery('#calendar-single').removeClass('loading-spinner');\n\t\t\t\t}\n\t\t\t},\n\n\t\t\teventClick: function(calEvent, jsEvent, view) {\n\t\t\t\t  \tvar el = calEvent.el;\n\t\t\t\t\tvar ev = calEvent.event;\n\t\t\t\t\tvar $el = jQuery(el);\n\n\n\t\t\t\t\tif (jQuery(el).hasClass('selected-block')) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\n\t\t\t\tif ( jQuery(calEvent.el).hasClass(\"available\") ) {\n\t\t\t\t\ttry {\n\t\t\t\t\tconst blockId  = calEvent.event.id || calEvent.event._def.publicId;\n\t\t\t\t\tconst startISO = calEvent.event.startStr;\n\t\t\t\t\tconst startDate = new Date(startISO);\n\n\t\t\t\t\tfireSelectTimeSlot({\n\t\t\t\t\t\titem_id: fiabBookingContext.product_id.toString(),\n\t\t\t\t\t\titem_location_id: fiabBookingContext.item_location_id,\n\t\t\t\t\t\tlocation_name: fiabBookingContext.city,\n\n\t\t\t\t\t\tbooking_date: startDate.toISOString().split('T')[0], \/\/ YYYY-MM-DD\n\t\t\t\t\t\tbooking_time: startDate.toTimeString().slice(0, 5),  \/\/ HH:mm\n\t\t\t\t\t\tblock_id: blockId,\n\t\t\t\t\t\tselection_source: \"calendar\"\n\t\t\t\t\t});\n\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\/\/ silent fail (UI must not break)\n\t\t\t\t\tconsole.log(e);\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\tdocument.querySelector('.wc-booking-product-id').value = calEvent.event._def.extendedProps.product_id;\n\n\t\t\t\t\tjQuery( \".submit-form-book\" ).css(\"display\", \"block\");\n\t\t\t\t\tjQuery( \".last-minute-notice\" ).css(\"display\", \"none\");\n\n\t\t\t\t\tif(siteData.id !== 17){\n\t\t\t\t\t\tlet x = document.getElementsByClassName(\"selected-block\");\n\t\t\t\t\t\tif( x.length > 0) { x[0].classList.remove(\"selected-block\"); }\n\t\t\t\t\t\tjQuery( calEvent.el ).addClass( 'selected-block' );\n\t\t\t\t\t}else {\n\t\t\t\t\t\tapplyPaletteToEl(el, SELECTED_PALETTE);\n\n\t\t\t\t\t\t\/\/ --- repaint previous selection first ---\n\t\t\t\t\t\trestorePrevSelection();\n\n\t\t\t\t\t\t\/\/ --- mark new selection + paint selected inline (no CSS) ---\n\t\t\t\t\t\t_selEvent = ev;\n\t\t\t\t\t\t_selEl = el;\n\t\t\t\t\t\tel.classList.remove('selected-block');\n\t\t\t\t\t\tel.classList.add('selected-block');\n\t\t\t\t\t}\n\t\t\t\t   \n\t\t\t\t\tjQuery( \".empty-state\" ).remove();\n\n\t\t\t\t    var timestamp = new Date().getUTCMilliseconds();\n\n\t\t\t\t\t\/\/ jQuery('input[name=\"wc_bookings_field_persons\"]').prop('checked', false);\n\n\t\t\t\t\t\/\/ \/\/ Select the first radio button\n\t\t\t\t\t\/\/ jQuery('input[name=\"wc_bookings_field_persons\"]').first().prop('checked', true);\n\n\t\t\t\t\t\/\/ Remove focus from all radio buttons\n\t\t\t\t\t\/\/ jQuery('input[name=\"wc_bookings_field_persons\"]').blur();\n\n\t\t\t\t    jQuery( \"#wc_bookings_field_start_date\" ).val( calEvent.event.startStr ).change();\n\n\t\t\t\t\tvar event_date = new Date(calEvent.event.startStr);\n\n\t\t\t\t\t\/\/ Sleep-mode aware reference time\n\t\t\t\t\tvar referenceTime = getOperationalReferenceTime(event_date);\n\n\t\t\t\t\tvar diff = event_date - referenceTime;\n\t\t\t\t\tvar minsDiff = Math.floor(diff \/ 60000);\n\n\t\t\t\t\t\/\/ Format time according to WordPress settings\n\t\t\t\t\tvar time = formatTimeAccordingToWP(event_date);\n\t\t\t\t\tvar dd = event_date.getDate();\n\t\t\t\t\tvar mm = event_date.getMonth()+1;\n\t\t\t\t\tvar month = event_date.toLocaleString('default', { month: 'long' });\n\t\t\t\t\tvar yyyy = event_date.getFullYear();\n\n\t\t\t\t\tjQuery( '.booking-date-text' ).empty();\n\t\t\t        jQuery( '.booking-date-text' ).prepend( month + ' ' + dd + ', ' + yyyy );\n\n\t\t\t        jQuery( '.booking-time-text' ).empty();\n\t\t\t        jQuery( '.booking-time-text' ).prepend( time );\n\n\n\t\t\t        jQuery( \".selected-room.data\" ).css(\"display\", \"block\");\n\n\t\t\t\t\tif (minsDiff < product_data.advance_call_confirmation_window) {\n\n\t\t\t\t\t\tif (Boolean(fiabBookingContext.is_staff) === false) {\n\n\t\t\t\t\t\t\tjQuery(\".last-minute-notice\").css(\"display\", \"block\");\n\n\t\t\t\t\t\t\tif (fiabBookingContext.enable_last_minute_reservations === 'no') {\n\t\t\t\t\t\t\t\tjQuery(\".submit-form-book\").css(\"display\", \"none\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif ( product_data.maximum_bookable_days_in_future > 0 ) {\n\n\t\t\t\t\t\tlet currentDate = new Date();\n\t\t\t\t\t\tlet timestampDaysFromToday = currentDate.getTime() + (product_data.maximum_bookable_days_in_future * 24 * 60 * 60 * 1000); \/\/ 90 days in milliseconds\n\n\t\t\t\t\t\t\/\/ Check if the event start date is no later than 90 days from today\n\t\t\t\t\t\tif (event_date <= timestampDaysFromToday) {\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery( \".submit-form-book\" ).css(\"display\", \"none\");\n\t\t\t        \t\tjQuery( \".maximum-days-in-future-notice\" ).css(\"display\", \"block\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t    jQuery(\"#trigger_calc\").val(timestamp).change();\n\n\t\t\t\t    jQuery([document.documentElement, document.body]).animate({\n\t\t\t\t        scrollTop: jQuery(\".booking-form-right\").offset().top\n\t\t\t\t    }, 1000);\n\t\t\t\t\n\t\t\t\t} else if ( jQuery(calEvent.el).hasClass(\"selected\") ) {\n\t\t\t\t\t\/\/console.log( 'selected' );\n\t\t\t\t\twindow.location.href = ajax_script.woo_cart_url;\n\t\t\t\t} else {\n\t\t\t\t\t\/\/console.log( 'booked' );\n\t\t\t\t}\t\n\n\t\t\t},\n\t\t\t\n\t\t\tevents: function(info, successCallback, failureCallback) {\n\t\t\t\t\/\/ Safely check if window.is_single_h2h is defined and parse it only if it is.\n\t\t\t\tvar isSingleH2h = window.is_single_h2h !== undefined ? JSON.parse(window.is_single_h2h) : false;\n\n\t\t\t\tvar data = {\n\t\t\t\t\taction: 'get_blocks',\n\t\t\t\t\tstart: info.startStr.valueOf(),\n\t\t\t\t\tend: info.endStr.valueOf(),\n\t\t\t\t\tid: jQuery(\".wc-booking-product-id\").val()\n\t\t\t\t};\n\n\t\t\t\tif (!isSingleH2h) {\n\t\t\t\t\t\/\/ Fetch events for the single room\n\t\t\t\t\tjQuery.post(ajax_script.ajaxurl, data, function(response) {\n\t\t\t\t\t\tvar obj = jQuery.parseJSON(response);\n\t\t\t\t\t\tif (obj.success) {\n\t\t\t\t\t\t\tvar events = jQuery.parseJSON(obj.data);\n\n\t\t\t\t\t\t\t\/\/ COLOR BLOCKS FOR STOCKHOLM\n\t\t\t\t\t\t\tif(siteData.id === 17){\n\t\t\t\t\t\t\t\tevents = decorateByTier(events);       \n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsuccessCallback(events);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.log('Error fetching events for single room');\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function() {\n\t\t\t\t\t\tconsole.log('AJAX request failed');\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t\/\/ Fetch events for both Room 1 and Room 2\n\t\t\t\t\tvar dataRoom1 = { ...data, id: jQuery(\".wc-booking-product-id\").val() };\n\t\t\t\t\tvar dataRoom2 = { ...data, id: window.second_room_product_id };\n\n\t\t\t\t\t\/\/ Use Promise.all to fetch both requests in parallel\n\t\t\t\t\tPromise.all([\n\t\t\t\t\t\tjQuery.post(ajax_script.ajaxurl, dataRoom1),\n\t\t\t\t\t\tjQuery.post(ajax_script.ajaxurl, dataRoom2)\n\t\t\t\t\t]).then(function(responses) {\n\t\t\t\t\t\tvar responseRoom1 = responses[0];\n\t\t\t\t\t\tvar responseRoom2 = responses[1];\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar objRoom1 = jQuery.parseJSON(responseRoom1);\n\t\t\t\t\t\tvar objRoom2 = jQuery.parseJSON(responseRoom2);\n\n\t\t\t\t\t\tif (objRoom1.success || objRoom2.success) {\n\t\t\t\t\t\t\t\/\/ Combine both events (Room 1 and Room 2)\n\t\t\t\t\t\t\tvar eventsRoom1 = objRoom1.success ? jQuery.parseJSON(objRoom1.data) : [];\n\t\t\t\t\t\t\tvar eventsRoom2 = objRoom2.success ? jQuery.parseJSON(objRoom2.data) : [];\n\n\t\t\t\t\t\t\t\/\/ Merge events and handle duplicate filtering\n\t\t\t\t\t\t\tvar allEvents = eventsRoom1.concat(eventsRoom2);\n\t\t\t\t\t\t\tlet mergedBookings;\n\t\t\t\t\t\t\tvar hasAnotherProduct = window.has_another_product !== undefined ? JSON.parse(window.has_another_product) : false;\n\t\t\t\t\t\t\tif(!hasAnotherProduct){\n\t\t\t\t\t\t\t\tmergedBookings = mergeBookings(eventsRoom1, eventsRoom2);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmergedBookings = mergeBookingsSameRoom(eventsRoom1, eventsRoom2);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\/\/ COLOR BLOCKS FOR STOCKHOLM\n\t\t\t\t\t\t\tif(siteData.id === 17){\n       \t\t\t\t\t\t\tmergedBookings = decorateByTier(mergedBookings);     \n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\/\/ Pass the merged events to the success callback\n\t\t\t\t\t\t\tsuccessCallback(mergedBookings);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.log('Error fetching events for both rooms');\n\t\t\t\t\t\t}\n\t\t\t\t\t}).catch(function(error) {\n\t\t\t\t\t\tconsole.log('Error fetching events:', error);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t\/\/ Ensure that the time is added after the event is rendered\n\t\t\teventsSet: function(info) {\n\t\t\t\twaitForElement('.fc-event.booked', function(el) {\n\t\t\t\t\tdocument.querySelectorAll('.fc-event.booked').forEach(function(event) {\n\t\t\t\t\tconst eventTitle = event.querySelector('.fc-event-title');\n\t\t\t\t\tconst eventTime = event.querySelector('.fc-event-time');\n\t\t\t\t\t\n\t\t\t\t\tif (eventTitle) {\n\t\t\t\t\t\tconst time = eventTime.textContent.trim();\n\t\t\t\t\t\t\/\/ Add a data attribute to event title to store the time\n\t\t\t\t\t\teventTitle.setAttribute('data-booked-time', time);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t\t}\n\n\t    });\n\n\t    calendar.render();\n\n\t\t\/\/ Remove initial loading state after calendar is rendered\n\t\tsetTimeout(function() {\n\t\t\t\/\/ Fade out initial loading message\n\t\t\tjQuery('#calendar-single .initial-loading').css({\n\t\t\t\t'opacity': '0',\n\t\t\t\t'transition': 'opacity 0.3s ease-in-out'\n\t\t\t});\n\t\t\t\n\t\t\t\/\/ Wait for fade-out, then clean up\n\t\t\tsetTimeout(function() {\n\t\t\t\t\/\/ Remove initial loading styling\n\t\t\t\tjQuery('#calendar-single').css({\n\t\t\t\t\t'min-height': 'auto',\n\t\t\t\t\t'background': 'transparent',\n\t\t\t\t\t'position': 'relative'\n\t\t\t\t});\n\t\t\t\t\/\/ Remove initial loading message\n\t\t\t\tjQuery('#calendar-single .initial-loading').remove();\n\t\t\t}, 300); \/\/ Match the fade-out duration\n\t\t}, 500);\n\n\t\t\/\/ Add Hammer.js to detect swipe gestures\n\t\tvar hammer = new Hammer(document.getElementById('calendar-single'));\n\n\t\t\/\/ Detect swipe left (to go to the next week or day)\n\t\thammer.on('swipeleft', function() {\n\t\t  calendar.next(); \/\/ Go to the next week or day\n\t\t});\n\n\t\t\/\/ Detect swipe right (to go to the previous week or day)\n\t\thammer.on('swiperight', function() {\n\t\t  calendar.prev(); \/\/ Go to the previous week or day\n\t\t});\n\n\t    jQuery(calendarEl).data('fullCalendarObj', calendar);\n\n\t\tvar picker = new Pikaday({\n\t\t\tfield: document.querySelector('.fc-datepicker-button'),\n\t\t\tformat: 'yy-mm-dd',\n\t\t\tfirstDay: 1, \/\/ Make Monday the first day of the week\n\t\t\tonSelect: function(dateString) {\n\t\t\t\tpicker.gotoDate(new Date(dateString));\n\t\t\t\tcalendar.gotoDate(new Date(dateString));\n\t\t\t}\n\t\t});\n\n\n\t\tfunction mergeBookings(response1, response2) {\n\t\t\t\tlet mergedEvents = [];\n\n\t\t\t\t\/\/ Create a mapping of block IDs from both responses\n\t\t\t\tlet events1 = response1.reduce((map, event) => {\n\t\t\t\t\tmap[event.id] = event; \/\/ Map block ID to event\n\t\t\t\t\treturn map;\n\t\t\t\t}, {});\n\n\t\t\t\tlet events2 = response2.reduce((map, event) => {\n\t\t\t\t\tmap[event.id] = event; \/\/ Map block ID to event\n\t\t\t\t\treturn map;\n\t\t\t\t}, {});\n\n\t\t\t\t\/\/ Iterate through each event in the first response\n\t\t\t\tfor (let id in events1) {\n\t\t\t\t\tlet event1 = events1[id];\n\t\t\t\t\tlet event2 = events2[id];\n\n\t\t\t\t\t\/\/ If the block is booked in Room 1 but available in Room 2\n\t\t\t\t\tif (event1.classNames.includes('booked') && event2.classNames.includes('available')) {\n\t\t\t\t\t\t\/\/ Replace the booked event from Room 1 with the available event from Room 2\n\t\t\t\t\t\tevent1 = { ...event1, ...event2 }; \/\/ Replace properties of event1 with event2\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ If the block is booked in Room 2 but available in Room 1\n\t\t\t\t\tif (event2.classNames.includes('booked') && event1.classNames.includes('available')) {\n\t\t\t\t\t\t\/\/ Replace the booked event from Room 2 with the available event from Room 1\n\t\t\t\t\t\tevent2 = { ...event2, ...event1 }; \/\/ Replace properties of event2 with event1\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ Add the merged event (from either Room 1 or Room 2)\n\t\t\t\t\tif (event1.classNames.includes('booked') || event2.classNames.includes('booked')) {\n\t\t\t\t\t\t\/\/ Keep it as booked if both are booked\n\t\t\t\t\t\tmergedEvents.push(event1.classNames.includes('booked') ? event1 : event2);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\/\/ Keep it available if either is available\n\t\t\t\t\t\tmergedEvents.push(event1.classNames.includes('available') ? event1 : event2);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\/\/ Return the merged events array\n\t\t\t\treturn mergedEvents;\n\t\t\t}\n\n\n\t\tfunction mergeBookingsSameRoom(response1, response2) {\n\t\t\tconst byId = (arr = []) => {\n\t\t\t\tconst m = new Map();\n\t\t\t\tfor (const ev of arr) m.set(ev.id, ev);\n\t\t\t\treturn m;\n\t\t\t};\n\n\t\t\tconst map1 = byId(response1);\n\t\t\tconst map2 = byId(response2);\n\n\t\t\tconst ids = new Set([...map1.keys(), ...map2.keys()]);\n\n\t\t\tconst hasClass = (ev, cls) =>\n\t\t\t\t!!ev && !!ev.classNames && ev.classNames.split(\/\\s+\/).includes(cls);\n\n\t\t\tconst stripAvailability = (classes = \"\") =>\n\t\t\t\tclasses.split(\/\\s+\/).filter(c => c && c !== \"booked\" && c !== \"available\" && c !== \"not-available\");\n\n\t\t\tconst merged = [];\n\n\t\t\tfor (const id of ids) {\n\t\t\t\tconst e1 = map1.get(id);\n\t\t\t\tconst e2 = map2.get(id);\n\n\t\t\t\t\/\/ Determine availability states for each room\n\t\t\t\tconst r1Booked = hasClass(e1, \"booked\");\n\t\t\t\tconst r2Booked = hasClass(e2, \"booked\");\n\t\t\t\tconst r1Available = hasClass(e1, \"available\");\n\t\t\t\tconst r2Available = hasClass(e2, \"available\");\n\n\t\t\t\t\/\/ Merge rule:\n\t\t\t\t\/\/ 1) booked if any is booked\n\t\t\t\t\/\/ 2) else available only if both available\n\t\t\t\t\/\/ 3) else not-available\n\t\t\t\tlet availabilityClass;\n\t\t\t\tif (r1Booked || r2Booked) {\n\t\t\t\tavailabilityClass = \"booked\";\n\t\t\t\t} else if (r1Available && r2Available) {\n\t\t\t\tavailabilityClass = \"available\";\n\t\t\t\t} else {\n\t\t\t\tavailabilityClass = \"not-available\";\n\t\t\t\t}\n\n\t\t\t\t\/\/ Base event (prefer response1\u2019s metadata if present, else response2)\n\t\t\t\tconst base = e1 || e2 || { id };\n\n\t\t\t\t\/\/ Build classNames: keep all non-availability classes, add the computed one\n\t\t\t\tconst classes = new Set([\n\t\t\t\t...stripAvailability(e1?.classNames),\n\t\t\t\t...stripAvailability(e2?.classNames),\n\t\t\t\tavailabilityClass,\n\t\t\t\t]);\n\n\t\t\t\tmerged.push({\n\t\t\t\t...base,\n\t\t\t\tclassNames: [...classes].join(\" \"),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t\/\/ Optional: stable sort by start time if present\n\t\t\tmerged.sort((a, b) => (a.start || \"\").localeCompare(b.start || \"\"));\n\t\t\treturn merged;\n\t\t}\n\n\t});\n\n<\/script>\n\n<form class=\"cart\" method=\"post\" enctype='multipart\/form-data' data-nonce=\"e023fcbe85\">\n\n\t<div class=\"form-loader\" style=\"display:none\">\n\t\t<div class=\"left-element\"><\/div>\n\t\t<div class=\"right-element\"><\/div>\n\t<\/div>\n\n\t<div id=\"wc-bookings-booking-form\" class=\"wc-bookings-booking-form\" style=\"display:none\">\n\n\t\t\n\t\t<div class=\"booking-form single\">\n\t\t\t<div class=\"booking-form-inner booking-form-left woo\">\n\t\t\t\t<div id=\"calendar-single\"><\/div>\n\t\t\t\t<p class=\"form-field form-field-wide wc_bookings_field_persons\">\n\t<label for=\"wc_bookings_field_persons\">Persons:<\/label>\n\t<input\n\t\ttype=\"number\"\n\t\tvalue=\"1\"\n\t\tstep=\"1\"\n\t\tmin=\"1\"\n\t\tmax=\"10\"\n\t\tname=\"wc_bookings_field_persons\"\n\t\tid=\"wc_bookings_field_persons\"\n\t\t\/> <\/p>\n<fieldset class=\"wc-bookings-date-picker wc_bookings_field_start_date\">\n\t<p class=\"wc-bookings-date-picker-timezone-block\" style=\"\" align=\"center\">\n\t\tTimes are in \t\t<span class=\"wc-bookings-date-picker-timezone\">Europe\/Stockholm<\/span>\n\t<\/p>\n\t<div class=\"picker\" data-display=\"always_visible\" data-default-availability=\"false\" data-min_date=\"0\" data-max_date=\"+12m\" data-default_date=\"2026-04-05\"><\/div>\n\t\t<div class=\"wc-bookings-date-picker-date-fields\">\n\t\t\t\t<label>\n\t\t\t<input type=\"text\" autocomplete=\"off\" name=\"wc_bookings_field_start_date_month\" placeholder=\"mm\" size=\"2\" class=\"required_for_calculation booking_date_month\" \/>\n\t\t\t<span>Month<\/span>\n\t\t<\/label> \/ <label>\n\t\t\t<input type=\"text\" autocomplete=\"off\" name=\"wc_bookings_field_start_date_day\" placeholder=\"dd\" size=\"2\" class=\"required_for_calculation booking_date_day\" \/>\n\t\t\t<span>Day<\/span>\n\t\t<\/label>\n\t\t\t\t\/ <label>\n\t\t\t<input type=\"text\" autocomplete=\"off\" value=\"2026\" name=\"wc_bookings_field_start_date_year\" placeholder=\"YYYY\" size=\"4\" class=\"required_for_calculation booking_date_year\" \/>\n\t\t\t<span>Year<\/span>\n\t\t<\/label>\n\t<\/div>\n<\/fieldset>\n<div class=\"form-field form-field-wide\">\n\t\t\t<ul class=\"block-picker\">\n\t\t\t<li>Choose a date above to see available times.<\/li>\n\t\t<\/ul>\n\t\t<input type=\"hidden\" class=\"required_for_calculation\" name=\"wc_bookings_field_start_date_time\" id=\"wc_bookings_field_start_date\" \/>\n<\/div>\n<div class=\"timezone-details\" style=\"display: none;\">\n\t<input type=\"hidden\" name=\"wc_bookings_field_start_date_local_timezone\" \/>\n<\/div>\n\t\t\t<\/div>\n\t\t\t<div class=\"booking-form-inner booking-form-right woo\" id=\"Players\">\n\t\t\t\t\n\t\t\t\t<div class='single-room-booking-summary'>\n\t\t\t\t\t\t<div class='section-title'>Booking summary<\/div>\n\t\t\t\t\t\t<p class='empty-state'>Please choose available timeslot for this room.<\/p>\n\t                <div class=\"additional-booking-data\" style=\"display: none !important;\"><\/div>\n\n\t\t\t\t<div class=\"multiple-booking-check\">\n\t\t\t\t\n\t\t\t\t<div class=\"title\">Need to book for more than 6 people?<\/div>\n\t\t\t\t\t<div class=\"link\"><a href=\"https:\/\/foxinaboxgames.com\/gavle\/multiple-rooms-booking\/\">Book multiple rooms \u2192<\/a><\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t\n\n\t\t\t\t<div class=\"selected-room data\" style=\"display: none;\">\n\t\t            <div class=\"room-name\">ZOMBIE HUNT<\/div>\n\t\t            <div class=\"room-booking-data\"><span><span>Booking Date:<\/span>:<\/span> <span class=\"booking-date-text\"><\/span><\/div>\n\t\t            <div class=\"room-booking-data\" style=\"margin-bottom: .8rem;\"><span><span>Booking Time:<\/span>:<\/span> <span class=\"booking-time-text\"><\/span><\/div>\n\t\t\t\t\t\n            \t\t\t<div class=\"number-of-persons-selector has-primary-color\"><div class=\"number-of-persons-selector has-primary-color\">Select Number of Players<\/div><\/div>\n\n            \t\t\t<ul class=\"persons-type\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"1\" value=\"1\" checked><label for=\"1\">1<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"2\" value=\"2\" ><label for=\"2\">2<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"3\" value=\"3\" ><label for=\"3\">3<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"4\" value=\"4\" ><label for=\"4\">4<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"5\" value=\"5\" ><label for=\"5\">5<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"6\" value=\"6\" ><label for=\"6\">6<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"7\" value=\"7\" ><label for=\"7\">7<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"8\" value=\"8\" ><label for=\"8\">8<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"9\" value=\"9\" ><label for=\"9\">9<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <li><input type=\"radio\" class=\"persons-number-selector\" name=\"wc_bookings_field_persons\" id=\"10\" value=\"10\" ><label for=\"10\">10<\/label><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\n\t\t\t\t\t\t<script type=\"text\/javascript\">\n\n\t\t\t\t\t\t\tjQuery('input[name=wc_bookings_field_persons]').on('change', function (e) {\n\t\t\t\t\t\t\t\tjQuery('#wc_bookings_field_persons').val(e.target.value);\n\t\t\t\t\t\t\t\tconst players = parseInt(e.target.value, 10);\n\t\t\t\t\t\t\tif (!players) return;\n\n\t\t\t\t\t\t\tif (!window.__fiab_last_selected_block_id) return;\n\n\t\t\t\t\t\t\twindow.__fiab_pending_players = players;\n\t\t\t\t\t\t\t});\n\n\n\t\t\t\t\t\t<\/script>\n\n\t\t\t\t\t\t\t        <\/div>\n\n\n\t\t\t\t<div class=\"wc-bookings-booking-cost price\" style=\"display:none\" data-raw-price=\"\"><\/div>\n\t\t\t\t<div class=\"wc-bookings-booking-cost_per_person\" style=\"display:none\" data-raw-price=\"\"><\/div>\n\t\t\t\t<input type=\"hidden\" name=\"add-to-cart\" value=\"9532\" class=\"wc-booking-product-id\" \/>\t\t\n\t\t\t\t<div class=\"room-price-from\"><\/div>\n\t\t\t\t<button type=\"submit\" class=\"submit-form-book wc-bookings-booking-form-button single_add_to_cart_button button alt \">Book this game<\/button>\n\n\t\t\t\t\t\t\t\t<div class=\"last-minute-notice\"><span class=\"last-minute-notice-title\">IMPORTANT NOTICE!<\/span><br\/><br\/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tIf you want to play the last minute games you have to give us a call to check the availability on\t\t\t\t\t\t<br\/>\n\t\t\t\t\t\t<a href=\"tel:+46 26 12 00 12\">\n\t\t\t\t\t\t\t+46 26 12 00 12\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t<br\/><br\/>\n\t\t\t\t\t\tWe can not guarantee that there will be an available game master to take your game.\n\t\t\t\t\t\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"maximum-days-in-future-notice\"><span class=\"maximum-days-in-future-notice-title\">IMPORTANT NOTICE!<\/span><br\/><br\/>\n\t\t\t\tPlease note that our online booking system allows reservations for events within a -day period. For bookings beyond this timeframe, we\u2019d love to assist you directly. To discuss availability and secure your preferred date, please call us at <br\/><a href=\"tel:+46 26 12 00 12\">+46 26 12 00 12<\/a><\/div>\n\t\t\t\t<input type=\"hidden\" id=\"timezone_offset\" name=\"timezone_offset\" value=\"0\"\/>\n\n\t\t\t\t<input type=\"hidden\" id=\"trigger_calc\" name=\"trigger_calc\" class=\"trigger_calc\" value=\"0\">\n\n\t            <\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\t<\/div>\n\n\t\n\t<script type=\"text\/javascript\">\n\n\t\twindow.__fiab_last_selected_block_id = null;\n\t\twindow.__fiab_last_players = null;\n\t\twindow.__fiab_add_to_cart_fired = false;\n\n\n\t\tfunction fireSelectTimeSlot(payload) {\n\t\tif (!payload || !payload.block_id) return;\n\n\t\t\/\/ \u274c isti slot ponovo \u2192 ne \u0161alji\n\t\tif (window.__fiab_last_selected_block_id === payload.block_id) return;\n\n\t\twindow.__fiab_last_selected_block_id = payload.block_id;\n\t\t  window.__fiab_add_to_cart_fired = false; \/\/ \u2705 RESET\n\n\n\n\t\tfiabPushEvent(\"select_time_slot\", payload);\n\t\t}\n\n\t\tfunction fireUpdatePlayers(payload) {\n  if (!payload || typeof payload.players !== 'number') return;\n\n  \/\/ \u274c isti broj kao prethodni\n  if (window.__fiab_last_players === payload.players) return;\n\n  window.__fiab_last_players = payload.players;\n  window.__fiab_add_to_cart_fired = false; \/\/ \u2705 RESET\n\n\n  fiabPushEvent(\"update_players\", payload);\n}\n\njQuery(document).on('click', '.submit-form-book', function (e) {\n\n  if (window.__fiab_add_to_cart_fired) return;\n  window.__fiab_add_to_cart_fired = true;\n\n    const price = fiabGetBookingPrice();\n\tconst players = fiabGetSelectedPlayersFromDOM();\n\n\n  \/\/ mora postojati kompletan booking kontekst\n  if (\n    !window.__fiab_last_selected_block_id ||\n    players === null ||\n    !price\n  ) {\n\tconsole.log(window.__fiab_last_selected_block_id)\n\tconsole.log(window.__fiab_last_players)\n\t\tconsole.log(price)\n\n    return;\n  }\n\n  const bookingDate = document.querySelector('.booking-date-text')?.textContent || null;\n  const bookingTime = document.querySelector('.booking-time-text')?.textContent || null;\n\n  \/\/ --- A4: GA4 ecommerce ---\n  fiabPushEcommerceEvent(\n    \"add_to_cart\",\n    [{\n      item_id: fiabBookingContext.product_id.toString(),\n      item_name: fiabBookingContext.product_name,\n      item_category: \"escape_room\",\n\n      price: price,\n      quantity: 1,\n\n      booking_date: fiabNormalizeDate(bookingDate),\n      booking_time: bookingTime,\n      block_id: window.__fiab_last_selected_block_id,\n      number_of_players: players\n    }],\n    {\n      value: price,\n      commerce_flow: \"booking\"\n    }\n  );\n\n  \/\/ --- A5: hold_started ---\n  fiabPushEvent(\"hold_started\", {\n    hold_minutes: 15\n  });\n});\n\nfunction fiabNormalizeDate(dateInput) {\n  const d = new Date(dateInput);\n  if (isNaN(d)) return null;\n\n  return d.toISOString().split('T')[0]; \/\/ YYYY-MM-DD\n}\n\n\nfunction fiabGetBookingPrice() {\n  \/\/ 1\ufe0f\u20e3 Ideal case \u2013 raw price (ako postoji)\n  const rawEl = document.querySelector('.wc-bookings-booking-cost[data-raw-price]');\n  if (rawEl) {\n    const raw = parseFloat(rawEl.getAttribute('data-raw-price'));\n    if (!isNaN(raw) && raw > 0) return raw;\n  }\n\n  \/\/ 2\ufe0f\u20e3 Visible calculated price (naj\u010de\u0161\u0107i real case)\n  const priceEl = document.querySelector(\n    '.woocommerce-Price-amount .price-number-only'\n  );\n  if (priceEl) {\n    const val = parseFloat(\n      priceEl.textContent.replace(',', '.')\n    );\n    if (!isNaN(val) && val > 0) return val;\n  }\n\n  \/\/ 3\ufe0f\u20e3 Fallback \u2013 ni\u0161ta jo\u0161 nije spremno\n  return null;\n}\n\nfunction fiabGetSelectedPlayersFromDOM() {\n  const el = document.querySelector('.persons-number-selector:checked');\n  if (!el) return null;\n\n  const val = parseInt(el.value, 10);\n  return isNaN(val) ? null : val;\n}\n\n\n\n\nlet priceTimeout = null;\nlet lastPrice = null;\n\nconst bookingCostEl = document.querySelector('.wc-bookings-booking-cost');\n\nif (bookingCostEl) {\n  console.log('FIAB: observing booking cost');\n\n  const observer = new MutationObserver(() => {\n    clearTimeout(priceTimeout);\n\n    priceTimeout = setTimeout(() => {\n      const text = bookingCostEl.textContent || '';\n      const normalized = text.replace(\/[^\\d.,]\/g, '').replace(',', '.');\n      const newPrice = parseFloat(normalized);\n\n      if (!newPrice || newPrice === lastPrice) return;\n\n      lastPrice = newPrice;\n\n      if (\n        window.__fiab_pending_players !== null &&\n        window.__fiab_last_selected_block_id\n      ) {\n        fireUpdatePlayers({\n          item_id: fiabBookingContext.product_id.toString(),\n          block_id: window.__fiab_last_selected_block_id,\n          players: window.__fiab_pending_players,\n          currency: fiabBookingContext.currency,\n          value: newPrice\n        });\n\n        window.__fiab_pending_players = null;\n      }\n    }, 400);\n  });\n\n  observer.observe(bookingCostEl, {\n    childList: true,\n    subtree: true,\n    characterData: true\n  });\n}\n\n\n\n\n\t\t\n\t\tfunction convertTimestampToISO(timestamp) {\n\t\t\tlet date = new Date(timestamp * 1000); \/\/ Convert seconds to milliseconds\n\t\t\tlet isoString = date.toISOString(); \/\/ Convert to ISO format\n\n\t\t\t\/\/ adjust the timezone offset manually (+01:00)\n\t\t\tlet formattedDate = isoString.split('.')[0] + ''; \/\/ Remove milliseconds and add timezone\n\n\t\t\treturn formattedDate;\n\t\t}\n\n\t\tfunction checkSelected() {\n\t\t\t\n\n\t\t\tif ( block_data.block_id !== '' ) {\n\t\t\t\t\tlet convertedDate = convertTimestampToISO(block_data.block_id);\n\t\t\t\t\tconst url = new URL(window.location.href);\n\t\t\t\t\tconst params = url.searchParams;\n\t\t\t\t\tconst source   = params.get('source');\n\t\t\t\t\tconst position = params.get('position');\n\n\t\t\t\t\t\t\t\tfireSelectTimeSlot({\n\t\t\t\t\titem_id: fiabBookingContext.product_id.toString(),\n\t\t\t\t\titem_location_id: fiabBookingContext.item_location_id,\n\t\t\t\t\tlocation_name: fiabBookingContext.city,\n\n\t\t\t\t\tbooking_date: convertedDate.split('T')[0],\n\t\t\t\t\tbooking_time: convertedDate.split('T')[1].slice(0, 5),\n\t\t\t\t\tblock_id: block_data.block_id,\n\t\t\t\t\tselection_source: source,\n\t\t\t\t\tindex: Number(position)\n\t\t\t\t\t});\n\n\n\t\t\t\t\/\/console.log(block_data.block_id);\n\n\t\t\t\tvar calendar = jQuery('#calendar-single').data('fullCalendarObj');\n\t    \t\tvar timestamp = new Date().getUTCMilliseconds();\n\n\t    \t\tvar event = calendar.getEventById( block_data.block_id );\n\t\t\t\t\tdocument.querySelector('.wc-booking-product-id').value = event._def.extendedProps.product_id;\n\n\t\t\t\t\/\/console.log(calendar);\n\t    \t\t\/\/console.log(event.startStr);\n\n\t\t\t    jQuery(\"#wc_bookings_field_start_date\").val(convertedDate).change();\n\n\t\t\t    if ( block_data_persons.persons !== '' ) {\n\t\t    \t\tjQuery(\"input[name=wc_bookings_field_persons][value=\" + block_data_persons.persons + \"]\").attr('checked', 'checked');\n\t\t    \t}\n\t\t\t    \n\t\t\t    jQuery( \".last-minute-notice\" ).css(\"display\", \"none\");\n\t\t\t    \n\t\t\t    var event_date = new Date(convertedDate);\n\t\t\t\tvar dd = event_date.getDate();\n\t\t\t\tvar mm = event_date.getMonth()+1;\n\t\t\t\tvar month = event_date.toLocaleString('default', { month: 'long' });\n\n\t\t\t\t\/\/ Format time according to WordPress settings\n\t\t\t\tvar time = formatTimeAccordingToWP(event_date);\n\n\t\t\t\tvar yyyy = event_date.getFullYear();\n\n\t\t\t\tjQuery( '.block-' + block_data.block_id ).addClass('selected-block');\n\t\t\t\tjQuery( \".empty-state\" ).remove();\n\n\t\t\t\tjQuery( '.booking-date-text' ).empty();\n\t\t        jQuery( '.booking-date-text' ).prepend( month + ' ' + dd + ', ' + yyyy );\n\n\t\t        jQuery( '.booking-time-text' ).empty();\n\t\t        jQuery( '.booking-time-text' ).prepend( time );\n\n\t\t        jQuery( \".selected-room.data\" ).css(\"display\", \"block\");\n\t\t\t\t\n\t\t\t\tconst defaultPlayers = product_data.default_players;\n\n\t\t\t\t\t\/\/ Find the radio input for the default number of players and select it\n\t\t\t\t\tconst playerInputs = document.querySelectorAll(\".persons-number-selector\");\n\t\t\t\t\tplayerInputs.forEach(input => {\n\t\t\t\t\t\tif (input.value === defaultPlayers) {\n\t\t\t\t\t\t\tinput.checked = true;\n\t\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t    jQuery( \"#trigger_calc\").val(timestamp).change();\n\n\t\t\t    jQuery( \".form-loader\" ).css(\"display\", \"none\");\n\t\t\t\tjQuery( \".booking-form-left.woo\" ).removeClass('hidden');\n\t\t\t\tjQuery( \".booking-form-right.woo\" ).removeClass('hidden');\n\n\t\t\t\tconst current_date = new Date();\n\t\t\t\tconst current_hour = current_date.getHours();\n\t\t\t\tconst current_min = current_date.getMinutes();\n\t\t\t\t\t\/\/ Sleep-mode aware reference time\n\t\t\t\t\tvar referenceTime = getOperationalReferenceTime(event_date);\n\n\t\t\t\t\tvar diff = event_date - referenceTime;\n\t\t\t\t\tvar minsDiff = Math.floor(diff \/ 60000);\n\n\t\t\t\t\tif (minsDiff < product_data.advance_call_confirmation_window) {\n\n\t\t\t\t\t\tif (Boolean(fiabBookingContext.is_staff) === false) {\n\n\t\t\t\t\t\t\tjQuery(\".last-minute-notice\").css(\"display\", \"block\");\n\n\t\t\t\t\t\t\tif (fiabBookingContext.enable_last_minute_reservations === 'no') {\n\t\t\t\t\t\t\t\tjQuery(\".submit-form-book\").css(\"display\", \"none\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tjQuery( \".form-loader\" ).css(\"display\", \"none\");\n\t\t\t\tjQuery( \".booking-form-left.woo\" ).removeClass('hidden');\n\t\t\t\tjQuery( \".booking-form-right.woo\" ).removeClass('hidden');\n\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tfunction loadFrame() {\n\t\t\tlet availableDate = document.querySelectorAll(\".single-product a.ui-state-default\");\n\t\t\tif ( document.contains(availableDate[0]) ) {\n\t\t\t\tavailableDate[0].click();\n\t\t\t}\n\t\t}\n\n\t\tfunction waitForElement(selector, callback) {\n\t\t\tlet observer = new MutationObserver((mutations, me) => {\n\t\t\t\tlet element = document.querySelector(selector);\n\t\t\t\tif (element) {\n\t\t\t\t\tme.disconnect(); \/\/ Stop observing once the element is found\n\t\t\t\t\tcallback(element);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tobserver.observe(document, { childList: true, subtree: true });\n\t\t}\n\n\t\t\/\/ Usage: Trigger function when element loads\n\t\twaitForElement('.single-product a.ui-state-default', function(el) {\n\t\t\twindow.onload = setTimeout(loadFrame, 1000);\n\t\t\twindow.onload = setTimeout(checkSelected, 1100);\n\n\t\t\tif ( block_data.block_id !== '' ) {\n\t\t\t\twindow.onload = setTimeout(enableifSelected, 2000);\n\t\t\t}\n\t\t});\n\n\t\t(function () {\n            if ((window.location.hash || '').toLowerCase() !== '#players') return;\n            if ('scrollRestoration' in history) history.scrollRestoration = 'manual';\n            function waitForElements(selector, callback) {\n                const existing = document.querySelectorAll(selector);\n                if (existing.length) return callback(existing);\n                const observer = new MutationObserver((mutations, me) => {\n                const els = document.querySelectorAll(selector);\n                if (els.length) {\n                    me.disconnect();\n                    callback(els);\n                }\n                });\n                observer.observe(document.documentElement, { childList: true, subtree: true });\n            }\n            function scrollToTarget(target, headerOffset) {\n                const y = target.getBoundingClientRect().top + window.pageYOffset - headerOffset;\n                \/\/ force visible movement (instant jump), then smooth adjust\n                window.scrollTo(0, y);\n                setTimeout(() => window.scrollTo({ top: y, behavior: 'smooth' }), 50);\n            }\n            const headerOffset = 0; \/\/ set if sticky header\n            window.addEventListener('load', function () {\n                waitForElements('#Players', function (els) {\n                \/\/ pick the LAST one (usually the actual section down the page)\n                const el = els[els.length - 1];\n                \/\/ scroll to a container around it (more \u201csection-like\u201d)\n                const target =\n                    el.closest('#Players') ||\n                    \/\/ el.closest(\u2018form\u2019) ||\n                    \/\/ el.closest(\u2018.elementor-section\u2019) ||\n                    el;\n                scrollToTarget(target, headerOffset);\n                \/\/ re-run after lazyload\/layout shifts\n                setTimeout(() => scrollToTarget(target, headerOffset), 800);\n                setTimeout(() => scrollToTarget(target, headerOffset), 1600);\n                });\n            });\n        })();\n\n\t\tfunction enableifSelected() {\n\t\t\tjQuery('.submit-form-book').removeClass('disabled').prop('disabled', false);\n\t\t\tjQuery( '.block-' + block_data.block_id ).addClass('selected-block');\n\t\t}\n\n\t\tjQuery( document ).ready(function() {\n\t\t\t\/\/ Usage: Trigger function when element loads\n\t\t\twaitForElement('.block-' + block_data.block_id, function(el) {\n\t\t\t\tjQuery( '.block-' + block_data.block_id ).addClass('selected-block');\n\t\t\t});\n\n\t\t\tif ( block_data.block_id !== '' ) {\n\t\t\t\twaitForElement('.submit-form-book', function(el) {\n\t\t\t\t\tjQuery('.submit-form-book').removeClass('disabled').prop('disabled', false);\n\t\t\t\t});\n\t\t\t\twindow.onload = setTimeout(enableifSelected, 2000);\n\t\t\t}\n\n\t\t\t(function () {\n\n\t\t\tif (!window.fiabBookingContext) return;\n\n\t\t\t\/\/ za\u0161tita od duplog fire-a\n\t\t\tif (window.__fiab_view_item_fired) return;\n\t\t\twindow.__fiab_view_item_fired = true;\n\n\t\t\tfiabPushEcommerceEvent(\n\t\t\t\t\"view_item\",\n\t\t\t\t[{\n\t\t\t\titem_id: fiabBookingContext.product_id.toString(),\n\t\t\t\titem_name: fiabBookingContext.product_name,\n\t\t\t\titem_category: \"escape_room\",\n\t\t\t\t}],\n\t\t\t\t{\n\t\t\t\tcommerce_flow: \"booking\"\n\t\t\t\t}\n\t\t\t);\n\t\t\t})();\n\n\n\n\t\t});\n\n\t\tjQuery(\"p.form-field.form-field-wide\").detach().prependTo( jQuery(\".additional-booking-data\") );\n\n\t<\/script>\n\n\t\t\n<\/form>\n\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this apocalypse scenario, you\u2019re part of the main research team, racing against time to uncover the truth behind the deadly Z0-M3I virus. As it spreads rapidly, turning victims into zombie-like creatures, the fate of humanity lies in your hands. This is not a traditional escape room \u2014 it\u2019s an immersive Fox Hunt experience, where [&hellip;]<\/p>\n","protected":false},"featured_media":9534,"template":"","meta":[],"foxhunt-tags":[52,53],"product_brand":[],"product_cat":[51],"product_tag":[],"class_list":{"0":"post-9532","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"foxhunt-tags-best-for-families-and-groups","7":"foxhunt-tags-indoor","8":"product_cat-room-hunt","10":"first","11":"instock","12":"virtual","13":"sold-individually","14":"taxable","15":"purchasable","16":"product-type-booking"},"_links":{"self":[{"href":"https:\/\/foxinaboxgames.com\/gavle\/wp-json\/wp\/v2\/product\/9532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/foxinaboxgames.com\/gavle\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/foxinaboxgames.com\/gavle\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/foxinaboxgames.com\/gavle\/wp-json\/wp\/v2\/media\/9534"}],"wp:attachment":[{"href":"https:\/\/foxinaboxgames.com\/gavle\/wp-json\/wp\/v2\/media?parent=9532"}],"wp:term":[{"taxonomy":"foxhunt-tags","embeddable":true,"href":"https:\/\/foxinaboxgames.com\/gavle\/wp-json\/wp\/v2\/foxhunt-tags?post=9532"},{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/foxinaboxgames.com\/gavle\/wp-json\/wp\/v2\/product_brand?post=9532"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/foxinaboxgames.com\/gavle\/wp-json\/wp\/v2\/product_cat?post=9532"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/foxinaboxgames.com\/gavle\/wp-json\/wp\/v2\/product_tag?post=9532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}