(function() { function bxBootstrap() { var re = /bot|crawl|slurp|spider|mediapartners|headlesschrome|snap-prefetch|remotasks|woorank|uptime\.com|facebookexternalhit|facebookcatalog/i; if (re.test(navigator.userAgent) || navigator.userAgent == '') { return; } if (!(window.bouncex&&bouncex.website)) { var pushedData = []; if(window.bouncex && bouncex.push && bouncex.length){ pushedData = bouncex; } window.bouncex = {}; bouncex.pushedData = pushedData; bouncex.website = {"id":4862,"name":"Apple Vacations","cookie_name":"bounceClientVisit4862","domain":"applevacations.com","ct":"bind_to_domain","ally":0,"ei":0,"tcjs":"","cjs":"/* enable.feature.DISABLE_IOS_ABSOLUTE */","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-9876550-1","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":2,"ettm":false,"etjs":"var MONTHS = [\n\t'January',\n\t'February',\n\t'March',\n\t'April',\n\t'May',\n\t'June',\n\t'July',\n\t'August',\n\t'September',\n\t'October',\n\t'November',\n\t'December',\n];\n\nvar MONTHSOBJ = {\n\t'Jan': 'January',\n\t'Feb': 'February',\n\t'Mar': 'March',\n\t'Apr': 'April',\n\t'May': 'May',\n\t'Jun': 'June',\n\t'Jul': 'July',\n\t'Aug': 'August',\n\t'Sep': 'September',\n\t'Oct': 'October',\n\t'Nov': 'November',\n\t'Dec': 'December',\n};\n\nvar globalConfig = {\n\t\t4862: {\n\t\t\tdomain: 'applevacations.com',\n\t\t\tviewEventDomain: 'applevacations.com/Availability',\n\t\t\tcartEventDomain: 'applevacations.com/Booking/Cart/Summary',\n bookingCartEventDomain: 'checkout/review',\n\t\t},\n\t},\n\tconfig = globalConfig[bouncex.website.id];\n\nif (window.location.hostname.indexOf(config.domain) > -1) {\n\tinitTracking();\n}\n\nfunction initTracking() {\n\tvar url = bouncex.utils.url.allowParams();\n\t\n\tif(hasPLCode()){\n\t fireCancelEvent();\n\t}\n\n\tif (url.indexOf(config.viewEventDomain) > -1 || bouncex.website.pts === 'product') {\n\t\tfireViewEvents(url);\n\t}\n\n\tif (url.indexOf(config.cartEventDomain) > -1) {\n\t\tfireCartEvents();\n }\n\n if (url.indexOf(config.bookingCartEventDomain) > -1) {\n fireBookingCartEvents();\n }\n\n if (bouncex.website.pts === 'category') {\n fireCategoryEvents();\n }\n}\n\n/* ---------- HELPER FUNCTIONS --------- */\nfunction formatDate(date) {\n\tvar dateArr = date.split('/'),\n\t\tmonth = dateArr[0],\n\t\tday = dateArr[1],\n\t\tyear = dateArr[2];\n\n\treturn MONTHS[month - 1] + ' ' + day + ', ' + year;\n}\n\nfunction formatMonth(date) {\n if(!date){\n return '';\n }\n\tvar dateArr = date.split(' '),\n\t\tmonth = dateArr[0],\n\t\tday = dateArr[1],\n\t\tyear = dateArr[2];\n\n\treturn MONTHSOBJ[month] + ' ' + day + ' ' + year;\n}\n\nfunction getDestination() {\n\tvar locationText = jQuery('.hotel-avail-heading h1').text();\n\treturn locationText\n\t\t? locationText.split('Hotels in ')[1].split(',')[0]\n\t\t: bouncex.utils.gtmLookup('page.data.destination_name') || '';\n}\n\nfunction hasPLCode(){\n return (window.google_tag_manager['GTM-TTBDMZ'].dataLayer.get('page.data.pl_code') !== \"\" && window.google_tag_manager['GTM-TTBDMZ'].dataLayer.get('page.data.pl_code') !== undefined && bouncex.vars.fired_cancel_event === false) ? true : false\n}\n\n// /* -------- SEARCH ABANDONMENT ---------*/\n\nfunction fireViewEvents(url) {\n\tvar pageTitle = jQuery('title').text().toLowerCase();\n\n\t// Search Abandonment\n\tif (pageTitle.indexOf('hotel availability') > -1 || url.indexOf('/avail/hotels/') > -1) {\n\t\tvar destination = getDestination();\n\n\t\tif (destination) {\n\t\t\tbouncex.push([\n\t\t\t\t'view_search',\n\t\t\t\t{\n\t\t\t\t\t'destination': destination,\n\t\t\t\t},\n\t\t\t]);\n\t\t\tbouncex.setVar('destination', destination);\n\t\t}\n\t}\n\n\t// Destination Abandonment\n\tif (pageTitle.indexOf('flight availability') > -1 || url.indexOf('/avail/flights/') > -1) {\n\t\tif (bouncex.vars.destination) {\n\t\t\tbouncex.push([\n\t\t\t\t'view_destination',\n\t\t\t\t{\n\t\t\t\t\t'destination': bouncex.vars.destination\n\t\t\t\t}\n\t\t\t]);\n\t\t}\n\t}\n}\n\n// /* -------- CATEGORY ABANDONMENT ---------*/\nfunction fireCategoryEvents(){\n var url = bouncex.utils.url.allowParams();\n bouncex.push([\n 'view_category',\n {\n 'page_title': jQuery('.root-breadcrumbs span:last').text(),\n 'url': url,\n 'isdealspage': url.indexOf('/deals') > -1 && url.indexOf('/brand') === -1 && url.indexOf('/deals/brand') === -1\n },\n ]);\n}\n\n// /* ------ CART ABANDONMENT -------*/\nfunction fireCartEvents() {\n\tvar tripDatesArr = jQuery('.is-highlighted dd:eq(3)').text().split('-'),\n\t\tdepartureDate = formatDate(tripDatesArr[0]),\n\t\tarrivalDate = formatDate(tripDatesArr[1]),\n\t\tarrivalLocation = jQuery('.mini-cart-header h2').text().trim();\n\n\tif (arrivalLocation) {\n\t\tarrivalLocation = arrivalLocation\n\t\t\t.toUpperCase()\n\t\t\t.split('YOUR TRIP TO ')\n\t\t\t.pop();\n\t}\n\n\tif (departureDate && arrivalDate && arrivalLocation && bouncex.vars.destination) {\n\t\tbouncex.push([\n\t\t\t'view_checkout',\n\t\t\t{\n\t\t\t\t'departure_date': departureDate,\n\t\t\t\t'arrival_date': arrivalDate,\n\t\t\t\t'arrival_location': arrivalLocation,\n\t\t\t},\n\t\t]);\n\t}\n}\n\nfunction fireBookingCartEvents() {\n\tbouncex.et.onTrue(\n\t\tfunction () {\n\t\t\treturn jQuery('.mat-end-date').length > 0 && jQuery('.mat-start-date').length > 0;\n\t\t},\n\t\tfunction () {\n\t\t\tvar startDate = jQuery('.mat-end-date').val();\n\t\t\tvar endDate = jQuery('.mat-start-date').val();\n\n\t\t\tvar departureDate = startDate ? formatMonth(jQuery('.mat-start-date').val()) : '',\n\t\t\t\tarrivalDate = endDate ? formatMonth(jQuery('.mat-end-date').val()) : '',\n\t\t\t\tarrivalLocation = jQuery('[name=\"destination\"] input').val().trim();\n\n\t\t\tif (arrivalLocation) {\n\t\t\t\tarrivalLocation = arrivalLocation\n\t\t\t\t\t.toUpperCase()\n\t\t\t\t\t.split('YOUR TRIP TO ')\n\t\t\t\t\t.pop();\n\t\t\t}\n\n\n\t\t\tif (departureDate && arrivalDate && arrivalLocation) {\n\t\t\t\tbouncex.push([\n\t\t\t\t\t'view_checkout',\n\t\t\t\t\t{\n\t\t\t\t\t\t'departure_date': departureDate,\n\t\t\t\t\t\t'arrival_date': arrivalDate,\n\t\t\t\t\t\t'arrival_location': arrivalLocation,\n\t\t\t\t\t},\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t);\n}\n\nfunction fireCancelEvent(){\n bouncex.push(['cancel_event']);\n bouncex.setVar('fired_cancel_event', true);\n}\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/Cart"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/Registration/Login"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/account"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'DestinationPage' || document.querySelectorAll('.destinations-filter-wrap').length > 0;"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/destinations/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/deals/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/brands"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/last-minute-deals/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/hawaii-sale"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"brands/#!/"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/TravelersInfo"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'Checkout_step2';"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout/review"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/Registration/Login"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/information"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'HomePage';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"https://www.applevacations.com/brands/#!/"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'HotelPage';"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'Hotel Profile';"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'Avail/Flights';"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'Avail/RoomSelection';"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/avail/flights/"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"?q="},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'SiteSearchResultsPage';"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'Avail/Hotels';"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search?"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/search/externalformpost.aspx"}]]}},"els":{"PDP_restool":".megaOnSale.ng-isolate-scope"},"vars":[{"name":"logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function () {\n\tvar account = jQuery('.member-account').text();\n\n\tif (account.indexOf('Account Details') > -1) {\n\t\treturn true;\n\t}\n\tif (account.indexOf('Sign In') > -1) {\n\t\treturn false;\n\t}\n\n\treturn null;\n})();","trigger":"pageload"},{"name":"ever_logged_in","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":"pageload"},{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(bouncex.website.pts === 'cart' || bouncex.website.pts === 'checkout') ? 1 : 0;","trigger":"pageload"},{"name":"cart_value","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(bouncex.website.pts === 'cart' || bouncex.website.pts === 'checkout') ? bouncex.utils.gtmLookup('page.data.package_total_value') : 0;","trigger":"pageload"},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function () {\n\tvar $pdpTitles = jQuery('#hotelName, [class*=\"hotel-title\"] h2:visible').eq(0);\n\n\tif ($pdpTitles.length > 0) {\n\t\treturn $pdpTitles.text().trim();\n\t}\n\t\n\treturn jQuery('.hotel .booking-navigation-summary').text().trim();\n})();","trigger":"pageload"},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.megapricequote:visible, .COMPONENT-PRICE span:visible, .COMPONENT-PRICE').last().text().replace(/[^0-9.]/g, '') || jQuery('.mini-cart-price-wrap:visible:first').last().text().replace(/[^0-9.]/g, '');","trigger":"pageload"},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"!jQuery('#megaSubmit').attr('disabled');","trigger":"pageload"},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('#FooterEmailConfirmation:visible, syn-quick-email-signup form.ng-submitted').length > 0 || jQuery('.Form__Success__Message:visible').text().indexOf('Congrats') > -1 || null;","trigger":"pageload"},{"name":"cookie_modal_present","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"destination","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"static_code","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n var todaysDate = new Date(),\n currentMonth = todaysDate.getMonth();\n currentYear = todaysDate.getFullYear();\n if (currentYear === 2022) {\n switch (currentMonth) {\n case 0:\n return 'WAVJANQ1T';\n case 1:\n return 'WAVFEBQ1T';\n case 2:\n return 'WAVMARQ1T';\n case 3:\n return 'WAVAPRQ2T';\n case 4:\n return 'WAVMAYQ2T';\n case 5:\n return 'WAVJUNQ2T';\n case 6:\n return 'WAVJULQ3T';\n case 7:\n return 'WAVAUGQ3T';\n case 8:\n return 'WAVSEPQ3T';\n case 9:\n return 'WAVOCTQ4T';\n case 10:\n return 'WAVNOVQ4T';\n case 11:\n return 'WAVDECQ4T';\n default:\n return '';\n }\n }\n if (currentYear === 2023) {\n switch (currentMonth) {\n case 0:\n return 'WAV23JAN';\n case 1:\n return 'WAV23FEB';\n case 2:\n return 'WAV23MAR';\n case 3:\n return 'WAV23APR';\n case 4:\n return 'WAV23MAY';\n case 5:\n return 'WAV23JUN';\n case 6:\n return 'WAV23JUL';\n case 7:\n return 'WAV23AUG';\n case 8:\n return 'WAV23SEP';\n case 9:\n return 'WAV23OCT';\n case 10:\n return 'WAV23NOV';\n case 11:\n return 'WAV23DEC';\n default:\n return '';\n }\n }\n return '';\n})();","trigger":"pageload"},{"name":"quick_search_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.heroBlock-container.alg10-cro-sticky:visible').length > 0","trigger":"pageload"},{"name":"already_subscribed","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"email_exist","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n var camps = bouncex.campaigns;\n var campIds = Object.keys(camps);\n var adVisible;\n \n campIds.forEach(function (campId) {\n /* can optionaly add additional condition here: \n bouncex.campaigns[campId].type === 'overlay' */\n if (bouncex.campaigns[campId].ad_visible) {\n adVisible = true;\n }\n });\n \n if (adVisible) {\n return null;\n }\n \n /*this is the statement that determines the value of \n the rtv if no bx ads are visible */\n return jQuery('.bx-row-validation').text().indexOf('already been subscribed') > -1;;\n \n})();","trigger":"pageload"},{"name":"fired_cancel_event","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":0,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"bxid":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":1,"spatm":0,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"Hit 'Send' to sign-up for automated, recurring Apple Vacations mktg txts (like cart reminders) to this #, per terms.","eventSharing":false,"shqId":"","enabled":1},"pde":true,"fmc":["AW","AI","AG","AR","BS","BB","BZ","BM","BO","BQ","BR","CA","KY","CL","CO","CR","CU","CW","DM","DO","EC","SV","GF","GL","GD","GT","GP","HT","HN","JM","MQ","MX","MS","NI","PA","PY","PE","PR","PM","MF","BL","KN","LC","VC","SX","SR","TT","US","UM","UY","VE","VG","VI"],"fme":true,"fmx":"","sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0},"ga4_property_id":"286630053","ga4_measurement_id":"G-WRNM9LWGYK","tag_state_domain":"api.bounceexchange.com"} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 1 }; bouncex.assets = {"ads":"005ab6b05ecd8ae76686b26c919990d4","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"3cdb3cd0b71927a211b8afdc85918cfd"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_6459738026535cda4232dc813c61447d.br.js'); runtime.setAttribute('async', 'async'); runtime.setAttribute('onload', 'bouncex.initializeTag()'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_756cfb1d158076d67943a971b41e5c68.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_3a843477d8e318f67237a66d0a58c542.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-gm","Value":"1"},{"Key":"data-fire","Value":"1"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();