1(function(){if(window.externalLinks)window.externalLinks();}()); 2NewMind.registerNameSpace('NewMind.DataCapture').Core=(function(){"use strict";if(!NewMind.env||!NewMind.env.platform||!NewMind.DataCapture.Data||!NewMind.DataCapture.Data.host||!NewMind.DataCapture.Data.serverTimestampUtc){throw new Error("Unable to initialise data capture functionality.");}window.document.body.addEventListener("click",function(e){if(!e.target){return;}var $target=$(e.target);sendPollingBookingReferralOutIfApplicable($target);sendBookingWebsiteReferralIfApplicable($target);});var strServerTimestampUtc=NewMind.DataCapture.Data.serverTimestampUtc,bUserHasConsented=false,bIsKnownToBeNewSession=false,arrObjectsToPost=[],queueFlushTimeoutId,bQueueFlushIsPending,dataPersister;dataPersister={setItem:function(strName,strValue){window.localStorage.setItem(strName,strValue);},getItem:function(strName){return window.localStorage.getItem(strName);},removeItem:function(strName){window.localStorage.removeItem(strName);}};var hexChars=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];function getNewGUID(){if(window.crypto&&window.crypto.getRandomValues&&window.Uint8Array){var guidBytes=new Uint8Array(16);crypto.getRandomValues(guidBytes);guidBytes[6]=(guidBytes[6]&0x0F)|0x40;guidBytes[8]=(guidBytes[8]&0x3F)|0x80;var guid='';for(var i=0;i<16;i++){if(i==4||i==6||i==8||i==10){guid+='-';}guid+=hexChars[(guidBytes[i]>>4)&0xF];guid+=hexChars[guidBytes[i]&0xF];}return guid;}return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=(c==='x')?r:(r&0x3|0x8);return v.toString(16);});}var SessionStorageKey="SVInsights-Session";var SessionExpiryMsec=20*60*1000;var UserStorageKey="SVInsights-User";var UserExpiryMsec=180*24*60*60*1000;function getUserSession(){var storedUser=JSON.parse(dataPersister.getItem(UserStorageKey));var storedSession=JSON.parse(dataPersister.getItem(SessionStorageKey));var currentTimestamp=Date.now();var isNewSession=false;if(storedUser===null||currentTimestamp>(storedUser.lastUsedTimestamp+UserExpiryMsec)){storedUser={id:getNewGUID()};}storedUser.lastUsedTimestamp=currentTimestamp;if(storedSession===null||currentTimestamp>(storedSession.lastUsedTimestamp+SessionExpiryMsec)){storedSession={id:storedUser.id+"-"+getNewGUID()};isNewSession=true;}storedSession.lastUsedTimestamp=currentTimestamp;dataPersister.setItem(UserStorageKey,JSON.stringify(storedUser));dataPersister.setItem(SessionStorageKey,JSON.stringify(storedSession));return{userId:storedUser.id,sessionId:storedSession.id,isNewSession:isNewSession};}function generateNewEventId(){return getNewGUID();}function etwpPrintTrace(message){if(NewMind.ETWP&&NewMind.ETWP.Trace&&NewMind.ETWP.Trace.PrintTrace){NewMind.ETWP.Trace.PrintTrace(message);}}function etwpPrintTraceWarning(message){if(NewMind.ETWP&&NewMind.ETWP.Trace&&NewMind.ETWP.Trace.PrintTraceWarning){NewMind.ETWP.Trace.PrintTraceWarning(message);}}function record(objEvent,bFlushImmediately){if(!objEvent){throw new Error("Called record without an event");}var userSession=getUserSession();if(userSession.isNewSession){bIsKnownToBeNewSession=true;var objSessionStartEvent={type:"sessionStart",id:userSession.sessionId};setGenericEventProperties(objSessionStartEvent,userSession.sessionId,userSession.userId);arrObjectsToPost.push(objSessionStartEvent);}setGenericEventProperties(objEvent,userSession.sessionId,userSession.userId);arrObjectsToPost.push(objEvent);registerNewEventPushedToQueue(bFlushImmediately);}function registerNewEventPushedToQueue(bFlushImmediately){var flushQueue=function(synchronous){if(bUserHasConsented&&arrObjectsToPost.length>0){var json=JSON.stringify(arrObjectsToPost);var beaconSent=false;try{beaconSent=(navigator.sendBeacon&&navigator.sendBeacon(NewMind.DataCapture.Data.host,json));}catch(e){}if(!beaconSent){var request=new XMLHttpRequest();request.open("POST",NewMind.DataCapture.Data.host,!synchronous);request.send(json);}etwpPrintTrace("Simpleview Insights: Event sent: "+json);arrObjectsToPost=[];}bQueueFlushIsPending=false;};if(bFlushImmediately){if(queueFlushTimeoutId){clearTimeout(queueFlushTimeoutId);}flushQueue(true);}else if(!bQueueFlushIsPending){bQueueFlushIsPending=true;queueFlushTimeoutId=setTimeout(function(){flushQueue(false)},400);}}function setGenericEventProperties(objEvent,strSessionId,strUserId){objEvent.sessionId=strSessionId;objEvent.userId=strUserId;objEvent.serverTimestamp=strServerTimestampUtc;objEvent.clientTimestamp=new Date().toJSON();objEvent.timeElapsed=(function(){if((typeof(window.performance)==="undefined")||(typeof(window.performance.now)!=="function" )){return -1;}return window.performance.now();}());if(NewMind.env&&NewMind.env.platform&&NewMind.env.platform.dmsName){objEvent.dms=NewMind.env.platform.dmsName;}if(NewMind.env&&NewMind.env.page&&NewMind.env.page.channelId){objEvent.websiteChannelId=NewMind.env.page.channelId;}if(window.navigator&&window.navigator.userAgent){objEvent.userAgent=window.navigator.userAgent;}if(!objEvent.causalId){if(NewMind.DataCapture.PageView&&NewMind.DataCapture.PageView.PageViewEventId){objEvent.causalId=NewMind.DataCapture.PageView.PageViewEventId;}else if(bIsKnownToBeNewSession){objEvent.causalId=strSessionId;}}}var strTrackedNavigationsKey="Navigations",iTrackingNavigationExpirationInMs=60000;function registerImminentNavigation(strAbsoluteUrl,strEventID){var objNavigations=JSON.parse(dataPersister.getItem(strTrackedNavigationsKey));if(objNavigations){pruneExpiredEntries(objNavigations);}else{objNavigations={};}objNavigations[strAbsoluteUrl]={id:strEventID,from:new Date()};dataPersister.setItem(strTrackedNavigationsKey,JSON.stringify(objNavigations));}function getCausalIdIfTrackedNavigation(strAbsoluteUrl){var objNavigations=JSON.parse(dataPersister.getItem(strTrackedNavigationsKey));if(!objNavigations){return null;}pruneExpiredEntries(objNavigations);var objEntry=objNavigations[strAbsoluteUrl];var strID;if(objEntry){strID=objEntry.id;delete(objNavigations[strAbsoluteUrl]);}else{strID=null;}dataPersister.setItem(strTrackedNavigationsKey,JSON.stringify(objNavigations));return strID;}function pruneExpiredEntries(objNavigations){var now=new Date();for(var strName in objNavigations){if(!objNavigations.hasOwnProperty(strName)){continue;}var objEntry=objNavigations[strName];if((now-new Date(objEntry.from))>=iTrackingNavigationExpirationInMs){delete(objNavigations[strName]);}}}window.addEventListener("unload",function(){var objNavigations=JSON.parse(dataPersister.getItem(strTrackedNavigationsKey));var iMaxAcceptableAgeOfNavigationTrackingEntriesInMs=5000;var strTrackingNavigationCausalIdIfFound=null;var now=new Date();if(objNavigations){var iMaxAgeOfDataToConsiderInMs;for(var strName in objNavigations){if(!objNavigations.hasOwnProperty(strName)){continue;}var objEntry=objNavigations[strName];if((now-new Date(objEntry.from))<=iMaxAcceptableAgeOfNavigationTrackingEntriesInMs){strTrackingNavigationCausalIdIfFound=objNavigations[strName].id;break;}}}var objPageUnload={type:"pageUnload",pageViewId:NewMind.DataCapture.PageView?NewMind.DataCapture.PageView.PageViewEventId:null};if(strTrackingNavigationCausalIdIfFound){objPageUnload.causalId=strTrackingNavigationCausalIdIfFound;}NewMind.DataCapture.Core.record(objPageUnload,true);},false);function retryWhileFalse(func,attempts,interval,onSuccess,onFailure){function work(){attempts--;var success=(func()!==false);
2if(success){if(onSuccess){onSuccess();}}else if(attempts>0){setTimeout(work,interval);}else{if(onFailure){onFailure();}}}work();}function integrateWithTCFAPI(){if(typeof(window.__tcfapi)!=="function" )return false;window.__tcfapi('addEventListener',2,function(tcData,success){if(!success){return;}if(tcData.eventStatus!=='tcloaded'&&tcData.eventStatus!=='useractioncomplete'){return;}var eventPrefix="Simpleview Insights: CMP API v2 Event '"+tcData.eventStatus+"': ";if(tcData.gdprApplies===false){etwpPrintTrace(eventPrefix+"gdprApplies is false; events will be sent");bUserHasConsented=true;registerNewEventPushedToQueue(false);return;}if(tcData.gdprApplies!==true){etwpPrintTrace(eventPrefix+"gdprApplies is neither true or false; events will not be sent");bUserHasConsented=false;registerNewEventPushedToQueue(false);return;}function isStandardPurposeConsented(purposeId){return(tcData.purpose.consents[purposeId]||tcData.purpose.legitimateInterests[purposeId]||tcData.publisher.consents[purposeId]||tcData.publisher.legitimateInterests[purposeId]);}if(isStandardPurposeConsented(1)&&isStandardPurposeConsented(8)&&isStandardPurposeConsented(9)&&isStandardPurposeConsented(10)){etwpPrintTrace(eventPrefix+"GDPR applies and the required Standard Purposes have been accepted; events will be sent");bUserHasConsented=true;registerNewEventPushedToQueue(false);return;}etwpPrintTrace(eventPrefix+"GDPR applies but the required Standard Purposes have not been accepted; events will not be sent");bUserHasConsented=false;registerNewEventPushedToQueue(false);});}var integrateWithTCFAPIWithRetries=retryWhileFalse.bind(null,integrateWithTCFAPI,5,2000,null,function(){etwpPrintTraceWarning('Simpleview Insights: Unable to gain user consent because window.__tcfapi was not present after 10 seconds; events will not be sent');});if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',integrateWithTCFAPIWithRetries);}else{integrateWithTCFAPIWithRetries();}function sendBookingWebsiteReferralIfApplicable($target){var $possibleLinkWrapper=$target.closest("a.ProvClickCustom");if($possibleLinkWrapper.length===0){return;}var name=$possibleLinkWrapper.attr("name");if(!name){return;}var nameSegments=name.split("|");if((nameSegments.length!==3)||(nameSegments[0]!=="PROBWEBREF")){return;}var iProductKey=parseInt(nameSegments[2],10);if(isNaN(iProductKey)){return;}record({type:"providerBookingWebsiteReferralOut",productKey:iProductKey,url:$possibleLinkWrapper.attr("href"),pageViewId:getPageViewEventIdIfAny()},true);}function sendPollingBookingReferralOutIfApplicable($target){if(!$target.hasClass("btnBookStay")){return;}var $form=$target.closest("form.FrmUnitOptions");if($form.length===0){return;}var iProductKey=parseInt($form.find("input[name=product]").val(),10);var strProviderId=$form.find("input[name=SupplierId]").val();if(isNaN(iProductKey)||!strProviderId){return;}record({type:"pollingBookingReferralOut",productKey:iProductKey,supplierId:strProviderId,pageViewId:getPageViewEventIdIfAny()},true);}function getPageViewEventIdIfAny(){return NewMind.DataCapture.PageView?NewMind.DataCapture.PageView.PageViewEventId:null;}return{record:record,registerImminentNavigation:registerImminentNavigation,getCausalIdIfTrackedNavigation:getCausalIdIfTrackedNavigation,generateNewEventId:generateNewEventId,formatDate:function(dValue){dValue=new Date(dValue);if(isNaN(dValue)){throw new Error("formatDate called with a value that is not (and is not parseable as) a Date");}var padToTwoDigits=function(iValue){return(iValue<10)?("0"+iValue):(""+iValue);};return dValue.getFullYear()+"-"+padToTwoDigits(dValue.getMonth()+1)+"-"+padToTwoDigits(dValue.getDate());},getPageViewEventIdIfAny:getPageViewEventIdIfAny};}()); 3NewMind.registerNameSpace('NewMind.DataCapture').PageView=(function(){"use strict";var strPageViewEventId=null;var pageView={type:"pageView",id:NewMind.DataCapture.Core.generateNewEventId(),url:window.location.href,navigationType:window.performance.navigation.type};if(NewMind.env&&NewMind.env.page&&NewMind.env.page.pagekey){pageView.pageKey=NewMind.env.page.pagekey;}
3if(NewMind.env.lang&&NewMind.env.lang.languagecode){pageView.languageCode=NewMind.env.lang.languagecode;}var strCausalIdIfAny=NewMind.DataCapture.Core.getCausalIdIfTrackedNavigation(window.location);if(strCausalIdIfAny){pageView.causalId=strCausalIdIfAny;}NewMind.DataCapture.Core.record(pageView);strPageViewEventId=pageView.id;return{PageViewEventId:strPageViewEventId,CausalIdIfKnown:strCausalIdIfAny};}()); 4NewMind.registerNameSpace('NewMind.DataCapture').Links=(function(){"use strict";document.body.addEventListener("click",function(e){var optionalTextOverride;if(!e.target){return;}var eleLink;if(e.target.tagName==="A"){eleLink=e.target;}else{var $parentLink=$(e.target).closest("a");if($parentLink.length===0){return;}eleLink=$parentLink[0];if(e.target.tagName==="IMG"){optionalTextOverride=e.target.alt;}}var strHrefAttributeValue=eleLink.getAttribute("href");if(!strHrefAttributeValue||(strHrefAttributeValue==="#")){return;}recordLink(eleLink,optionalTextOverride);});var arrLinkClickSpecialisationHandlers=[];function registerToAugmentLinkClickEvents(fncHandler){arrLinkClickSpecialisationHandlers.push(fncHandler);}function recordLink(anchor,optionalTextOverride){var strAbsoluteUrl=extractAddressFromReferrerWhereApplicable(anchor.href);var strID=NewMind.DataCapture.Core.generateNewEventId();var bIsDifferentHost=(tryToGetHostFromAbsoluteURL(strAbsoluteUrl)!==window.location.host);var objEvent={type:"linkClicked",id:strID,url:strAbsoluteUrl,isDifferentHost:bIsDifferentHost,text:optionalTextOverride||$.trim($(anchor).text()),pageViewId:NewMind.DataCapture.PageView?NewMind.DataCapture.PageView.PageViewEventId:null};var iControlKey=NewMind.ETWP.GetControlKey(anchor,true);if(iControlKey){objEvent.controlKey=iControlKey;}for(var i=0;i<arrLinkClickSpecialisationHandlers.length;i++){var handler=arrLinkClickSpecialisationHandlers[i];if(handler(objEvent,anchor)){break;}}if(!objEvent.linkType){objEvent.linkType="Content";}var strCausalIdFromLinkIfAvailable=tryToGetCausalIdFromLink(anchor);if(strCausalIdFromLinkIfAvailable){objEvent.causalId=strCausalIdFromLinkIfAvailable;}NewMind.DataCapture.Core.record(objEvent,true);if(!bIsDifferentHost){NewMind.DataCapture.Core.registerImminentNavigation(strAbsoluteUrl,strID);}}var strLinkCausalIdDataAttributeName="datacapture-causalid";function attachCausalIdToLink(anchor,strEventId){$(anchor).data(strLinkCausalIdDataAttributeName,strEventId);}function tryToGetCausalIdFromLink(anchor){return $(anchor).data(strLinkCausalIdDataAttributeName);}function extractAddressFromReferrerWhereApplicable(strUrl){if(strUrl.indexOf("/engine/referrer.asp?")===-1){return strUrl;}return NewMind.ETWP.GetQuerystringData(strUrl,true).get("web")||strUrl;}function tryToGetHostFromAbsoluteURL(strUrl){var arrProtocolAndEverythingElse=(""+strUrl).split("//",2);if(arrProtocolAndEverythingElse.length<2){return null;}return arrProtocolAndEverythingElse[1].split('/')[0];}return{recordLink:recordLink,attachCausalIdToLink:attachCausalIdToLink,registerToAugmentLinkClickEvents:registerToAugmentLinkClickEvents};}()); 5$(function(){NewMind.ajax.itinUpdated.subscribe(function(action,params){if(action!=="itinUpdated"||params[0]!=="add"){return;}var productListKeyIfAny=NewMind.ETWP.GetControlKey($(params[2]).closest(".sys_control"));NewMind.DataCapture.Core.record({type:"addedToItinerary",productKey:params[1],pageViewId:NewMind.DataCapture.PageView?NewMind.DataCapture.PageView.PageViewEventId:null,productDetailsId:NewMind.DataCapture.ProductDetail?NewMind.DataCapture.ProductDetail.ProductDetailViewedEventId:null,productListId:productListKeyIfAny&&NewMind.DataCapture.ProductList[productListKeyIfAny]?NewMind.DataCapture.ProductList[productListKeyIfAny]:null,id:NewMind.DataCapture.Core.generateNewEventId()});});}); 6$(function(){"use strict";NewMind.DataCapture.Links.registerToAugmentLinkClickEvents(function(objEvent,anchor){var $featuredItems=$(anchor).closest(".ctl_FeaturedItems");if($featuredItems.length===0){return false;}objEvent.linkType="Featured Items";var intProductKey=tryToGetProductKeyFromSpecificProductBlock($(anchor).closest(".SpecificProductBlock"));if(intProductKey){objEvent.productId=intProductKey;}return true;});$(".ctl_FeaturedItems").each(function(){var $featuredItems=$(this);var intControlKey=NewMind.ETWP.GetControlKey($featuredItems);if(!intControlKey){return;}var arrProductBlocks=[];$featuredItems.find("li.SpecificProductBlock").each(function(){var arrClasses=this.classList;var intCell=null;var objDimensions=null;for(var i=0;i<arrClasses.length;i++){var strClass=arrClasses[i];if(strClass.substr(0,4)==="cell"){var intCellIndex=parseInt(strClass.substr(4),10);if(!isNaN(intCellIndex)&&(intCellIndex>=0)){intCell=intCellIndex;}}else if(strClass.substr(0,4)==="size"){var arrDimensions=strClass.substr(4).split('x');
6if(arrDimensions.length===2){var x=parseInt(arrDimensions[0],10);var y=parseInt(arrDimensions[1],10);if(x&&y){objDimensions={x:x,y:y};}}}}if((intCell===null)||!objDimensions){return;}var intProductKey=tryToGetProductKeyFromSpecificProductBlock(this);if(!intProductKey){return;}arrProductBlocks.push({type:"blockDisplayed",blockType:"Product",productId:intProductKey,position:intCell+1,id:NewMind.DataCapture.Core.generateNewEventId()});});if(arrProductBlocks.length===0){return;}var featuredItemsView={type:"featuredItemsView",id:NewMind.DataCapture.Core.generateNewEventId(),controlId:intControlKey,url:window.location.href,blocks:arrProductBlocks};if(NewMind.DataCapture.PageView&&NewMind.DataCapture.PageView.CausalIdIfKnown){featuredItemsView.causalId=NewMind.DataCapture.PageView.CausalIdIfKnown;}NewMind.DataCapture.Core.record(featuredItemsView);});function tryToGetProductKeyFromSpecificProductBlock(block){var strLinksTo=$(block).find(".title a").attr("href");if(!strLinksTo){return null;}var strProductKeyComponentOfUrl=strLinksTo.split('/').splice(-1)[0].split('-').splice(-1)[0];if(strProductKeyComponentOfUrl.substr(0,1)!=="p"){return null;}var intProductKey=parseInt(strProductKeyComponentOfUrl.substr(1),10);return intProductKey||null;}}()); 7(function(){NewMind.registerNameSpace("NewMind.env.lang.dynamicmapping");NewMind.registerNameSpace("NewMind.mapping").MapInit=new(function(){$(document).ready(function(){if(!NewMind.ETWP||!NewMind.ETWP.GetResource){NewMind.mapping.DebugOutput("NewMind.ETWP.GetResource not defined");return;}InitializeDynamicMappingControls();InitializeItineraryPanToLinks();DisplaySearchResultsMap();});function toggleSearchResultsMap(strId){if(NewMind.env.install.mapping.configurations[strId].showlistmaplink!==true){$('body').toggleClass('mapShow');}NewMind.mapping.loadGenericSearchResultsMap(strId);}this.InitDynamicMappingControls=function(){InitializeDynamicMappingControls();};this.DisplaySearchResultsMap=function(){DisplaySearchResultsMap();};function InitializeDynamicMappingControls(){$("dd.showResultsOnMap, div.showResultsOnMap").each(function(index){var objEle=$(this)[0];var strTagName=objEle.tagName;var strClass=objEle.className;var strTitle=objEle.title;var strInnerContent="<input type=\"checkbox\" name=\"autoshowmap\" id=\"showonmap_"+index+"\" value=\"-1\" class=\"checkbox\" />"+"<label for=\"showonmap_"+index+"\">"+strTitle+"</label>";strOut="<"+strTagName+" class=\""+strClass+"\">"+strInnerContent+"</"+strTagName+">";$(this).replaceWith(strOut);});$('input.checkbox[name=autoshowmap]').each(function(){if(window.location.search.indexOf('autoshowmap')>-1){this.checked=true;}});$('#SearchByMap').hide(0);}function InitializeItineraryPanToLinks(){$("div.ctl_ItineraryDetail td.item a.point").removeClass("hidden");}function DisplaySearchResultsMap(){var jqMapContainer=$('div.dynMapContainer');if(jqMapContainer.length===0){return;}var strMapId=jqMapContainer[0].id;var objMapConfig=NewMind.env.install.mapping.configurations[strMapId];if(objMapConfig.api==="microsoftv7"){jqMapContainer.css({position:"relative",overflow:"hidden"});}if((objMapConfig.showalways!==true)||(objMapConfig.showlistmaplink===true)){if((objMapConfig.showmaplink===true)&&(objMapConfig.showlistmaplink!==true)){if($('#mapShowHideLink').length===0){jqMapContainer.after('<a href="" id="mapShowHideLink">'+NewMind.ETWP.GetResource('NewMind.env.lang.resources.searchresults["dynamicmapping"]["showhidemaplink"]','Show / Hide Map')+'</a>');$('#mapShowHideLink').click(function(e){e.preventDefault();toggleSearchResultsMap(strMapId);});}}}var bDisplayMapNow;if(window.location.search.indexOf('autoshowmap')>-1){NewMind.mapping.DebugOutput("Display map immediately (QueryString)");bDisplayMapNow=true;}else if(objMapConfig.showalways){bDisplayMapNow=((objMapConfig.showlistmaplink!==true)||objMapConfig.showlistmaplinkbutshowmapfirst);if(bDisplayMapNow){NewMind.mapping.DebugOutput("Display map immediately (Control Configuration)");}}else{bDisplayMapNow=false;}if(bDisplayMapNow){var isIE10=$.browser.msie&&(parseInt($.browser.version,10)>=10);var isIE11Plus=!!navigator.userAgent.match(/Trident.*rv/)&&!$.browser.msie;if((objMapConfig.api==="googlev3")&&(isIE10||isIE11Plus)){setTimeout(function(){NewMind.mapping.DebugOutput("Applying workaround for IE10+ with Google where delayed initialisation is required");toggleSearchResultsMap(strMapId);},2000);}else{toggleSearchResultsMap(strMapId);}}var jqListMapContainer=$('div.listMapLinkContainer');if(jqListMapContainer.length>0&&jqMapContainer.length>0){var strMapId=jqMapContainer[0].id;var intCtrlKey=NewMind.ETWP.GetControlKey(jqMapContainer[0],true);if(objMapConfig.showlistmaplink===true){$('div.dynMapContainer').hide();$('div#mapProductList').hide();var mapText=NewMind.ETWP.GetResource('NewMind.env.lang.resources.searchresults["dynamicmapping"]["showasmap"]','Show as Map');var listText=NewMind.ETWP.GetResource('NewMind.env.lang.resources.searchresults["dynamicmapping"]["showaslist"]','Show as List');var mapListHTML='<ul class="listMapLinks"><li class="showListLink showList"><a href="">'+listText+'</a></li><li class="showMapLink"><a href="">'+mapText+'</a></li></ul>';jqListMapContainer.html(mapListHTML);$('.showListLink').click(function(e){e.preventDefault();$('.showListLink').addClass('showList');$('.showMapLink').removeClass('showMap');$('body').removeClass('mapShow');$("div.dynMapContainer").hide();$("div#mapProductList").hide();
7$("div.c"+intCtrlKey+" div.ProductListMain").show();if(objMapConfig.showfilters){$('div.ctl_SearchRefineSummary').show();}});$('.showMapLink').click(function(e){e.preventDefault();$('.showListLink').removeClass('showList');$('.showMapLink').addClass('showMap');$('body').addClass('mapShow');$("div.dynMapContainer").show();$("div#mapProductList").show();$("div.c"+intCtrlKey+" div.ProductListMain").hide();if(objMapConfig.showfilters){$('div.ctl_SearchRefineSummary').hide();}});$('.showMapLink').one('click',function(e){e.preventDefault();toggleSearchResultsMap(strMapId);});if(bDisplayMapNow){$('.showMapLink').trigger('click');}}}}NewMind.mapping.DebugOutput=function(strOut){if(!isDebugEnabled()){return;}var strId="DebugOutput";var objEleOut=document.getElementById(strId);if(!objEleOut){objEleOut=document.createElement("div");objEleOut.style.position="fixed";objEleOut.style.zIndex="5000";objEleOut.style.top=0;objEleOut.style.left=0;objEleOut.style.width="30%";if(jQuery.support.opacity){objEleOut.style.backgroundColor="rgba(0, 0, 255, 0.5)";}else{objEleOut.style.background="transparent";objEleOut.style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#7f0000ff,endColorstr=#7f0000ff)";}objEleOut.style.color="white";objEleOut.style.padding="1em";objEleOut.style.fontSize="10pt";objEleOut.id=strId;var objCont=document.body;if(objCont.childNodes.length===0){objCont.appendChild(objEleOut);}else{objCont.insertBefore(objEleOut,objCont.childNodes[0]);}}objEleOut.innerHTML+="["+formatTime(new Date())+"] "+strOut.replace(/\n/g,"<br/>")+"<br/>";function isDebugEnabled(){var objQuerystring=NewMind.ETWP.GetQuerystringData();var strDebugFlag=objQuerystring.get("MapDebug");if(strDebugFlag===null){return false;}strDebugFlag=String(strDebugFlag).toLowerCase();return((strDebugFlag==="1")||(strDebugFlag==="true"));}function formatTime(dtIn){var dtNow=new Date();return adjLen(dtNow.getHours(),2)+":"+adjLen(dtNow.getMinutes(),2)+":"+adjLen(dtNow.getSeconds(),2)+"."+adjLen(dtNow.getMilliseconds(),3);function adjLen(varIn,intLen){var strIn=String(varIn);while(strIn.length<intLen){strIn="0"+strIn;}return strIn;}}};});})(); 8NewMind.registerNameSpace('NewMind.DataCapture').ProductList=(function(){"use strict";var ProductListed=function(iProductKey,iPagePosition,$Product,pageNumber){if(typeof(iProductKey)==="undefined"||isNaN(iPagePosition)||!$Product){throw new Error("(Data Capture) Could not create a Product Listed event.");}var productListed={type:"productListed",productId:iProductKey,position:iPagePosition,id:NewMind.DataCapture.Core.generateNewEventId()};if(!isNaN(pageNumber)){productListed.page=pageNumber;}if($Product.hasClass("Available")){productListed.bookableProduct=true;}var priceFrom=$Product.find("span.priceFrom>span.priceValue").text(),priceTo=$Product.find("span.priceTo>span.priceValue").text(),price={};if(""+priceFrom!==""){price.From=priceFrom;}if(""+priceTo!==""){price.To=priceTo;}if(price.To||price.From){productListed.price=price;}var categoryGrouping;if($Product.attr("class").indexOf(" cat_")!==-1&&$Product.attr("class").split(" cat_").length>1&&$Product.attr("class").split(" cat_")[1].split(" ").length){categoryGrouping=$Product.attr("class").split(" cat_")[1].split(" ")[0];}if(categoryGrouping){productListed.categoryGrouping=categoryGrouping;}var eleProduct=$Product[0];if(eleProduct){var arrClasses=eleProduct.classList;for(var i=0;i<arrClasses.length;i++){var strClass=arrClasses[i];if(strClass.substr(0,2)!=="ll"){continue;}var intListingLevelValue=parseInt(strClass.substr(2),10);if(intListingLevelValue){productListed.listingLevel=intListingLevelValue;}}}return productListed;};var ProductSummaryList=function(iControl,strCausedBy,products){var objControlData=NewMind.ETWP.ControlData[iControl];if(typeof(objControlData)==="undefined"){throw new Error("(Data Capture) ControlData["+iControl+"] was empty.");}var productSummaryList={type:"productSummaryList",id:NewMind.DataCapture.Core.generateNewEventId(),controlId:iControl,pageViewId:NewMind.DataCapture.PageView.PageViewEventId,causedBy:strCausedBy,total:products?products.length:objControlData.Total};var dynamicSearchTypeId="Dynamic Search",dynamicSearchStandaloneTypeId="Standalone";var pageNumber;if(objControlData.Type&&(objControlData.Type===dynamicSearchTypeId||objControlData.Type===dynamicSearchStandaloneTypeId)){pageNumber=objControlData.Page?objControlData.Page:1;productSummaryList.pageNumber=pageNumber;}var productsListed=getProductsListed(iControl,objControlData,pageNumber,products);var sortOrder=objControlData.SortOrder?objControlData.SortOrder:"";var querystringData=NewMind.ETWP.GetQuerystringData(window.location.search,true);if(typeof(querystringData.order)!=="undefined"){sortOrder=querystringData.order;}if(sortOrder!==""){productSummaryList.sortOrder=sortOrder;}if(objControlData.Date){productSummaryList.date=objControlData.Date;}if(objControlData.Type&&(objControlData.Type===dynamicSearchTypeId||objControlData.Type===dynamicSearchStandaloneTypeId)&&NewMind.DataCapture.PageView.CausalIdIfKnown){productSummaryList.causalId=NewMind.DataCapture.PageView.CausalIdIfKnown;}if(objControlData.Type){productSummaryList.listType=objControlData.Type;}if(productsListed){productSummaryList.productsListed=productsListed;}if($(".c"+iControl).find(".slick-track").length){productSummaryList.total=productsListed.length;}return productSummaryList;};function getProductsListed(iControlId,objControlData,pageNumber,products){if(!objControlData||typeof objControlData.ProductKeys==="undefined"){throw new Error("(Data Capture) There should always be a \"ProductKeys\" member available on a control's data when gathering products listed.");}else if(objControlData.ProductKeys.length===0){return;}var $products;if(products){$products=products;}else{if(objControlData.ItemsToShow){$products=$(objControlData.ItemsToShow);}else if($(".c"+iControlId).find(".swipeGalleryInner").children().length){$products=$(".c"+iControlId).find(".swipeGalleryInner").children();}else if($(".c"+iControlId).find(".WrapperShow").children().length){$products=$(".c"+iControlId).find(".WrapperShow").children();}else if($(".c"+iControlId).find(".slick-track").children().length){$products=$(".c"+iControlId).find(".slick-track").children(".slick-active");}else if($(".c"+iControlId).find(".ItemWrapper").children().length){$products=$(".c"+iControlId).find(".ItemWrapper").children();}
8else if($(".c"+iControlId).find("ol.productList").children().length){$products=$(".c"+iControlId).find("ol.productList").children();}else if($(".c"+iControlId).find("ol.recentlyViewedProducts").children().length){$products=$(".c"+iControlId).find("ol.recentlyViewedProducts").children();}else if($(".c"+iControlId).find("div.ProductListMain > ol").children().length){$products=$(".c"+iControlId).find("div.ProductListMain > ol").children();}else{throw new Error("(Data Capture) Could not find product container.");}}var productsListed=[],arrProductKeysListed=objControlData.ProductKeys.map(function(x){return parseInt(x);});$products.each(function(){var $product=$(this);var positionFromClassAttribute=(function(){var strClassNames=$product.attr("class");if(!strClassNames){return;}var arrClassNames=strClassNames.split(" ");for(var iClassIndex=0;iClassIndex<arrClassNames.length;iClassIndex++){if(arrClassNames[iClassIndex].indexOf("Item")===0&&!isNaN(arrClassNames[iClassIndex].charAt(4))){return parseFloat(arrClassNames[iClassIndex].slice(4));}}}());if(isNaN(positionFromClassAttribute)){return;}var bValidProduct=true;if(objControlData.ItemsThatWillBeShown){bValidProduct=false;for(var iItemToShowIndex=0;iItemToShowIndex<objControlData.ItemsThatWillBeShown.length;iItemToShowIndex++){if(positionFromClassAttribute===objControlData.ItemsThatWillBeShown[iItemToShowIndex]){bValidProduct=true;}}}if(!bValidProduct){return;}var productKey;for(var iProductsListedIndex=0;iProductsListedIndex<arrProductKeysListed.length;iProductsListedIndex++){productKey=arrProductKeysListed[iProductsListedIndex];if($product.hasClass("p"+productKey)){return productsListed.push(new ProductListed(productKey,positionFromClassAttribute+1,$product,pageNumber));}}throw new Error("(Data Capture) Could not pair up a product Id to the markup.");});return productsListed;}function productSummaryListWork(eventName,arrArguments){if(typeof(arrArguments)==="undefined"||arrArguments.length===0){return;}var iControlId=Math.abs(arrArguments[0]),$control=$(".c"+iControlId);var strCausedBy=arrArguments.length>1&&arrArguments[1]?arrArguments[1]:"initial load";if($control.parent().closest(".ctl_Tabs").length){if(!$control.parent().closest(".ctl_Tabs").hasClass("dataCaptureInitialised")){$control.parent().closest(".ctl_Tabs").addClass("dataCaptureInitialised");
8var tabControlId=NewMind.ETWP.GetControlKey($control.parent().closest(".ctl_Tabs"));NewMind.ETWP.ActiveTabSwitchers["tabs"+tabControlId].TabChange.subscribe(function(e){var $activeContainer=getActiveTabContainer($control);if($activeContainer){NewMind.DataCapture.Core.record(new ProductSummaryList(NewMind.ETWP.GetControlKey($activeContainer),strCausedBy));}});}var $activeContainer=getActiveTabContainer($control);if(!$activeContainer||iControlId!==NewMind.ETWP.GetControlKey($activeContainer)){return;}}NewMind.DataCapture.Core.record(new ProductSummaryList(iControlId,strCausedBy));}function getActiveTabContainer($control){if(!$control.parent().closest(".ctl_Tabs")){return;}var activeTabId=$control.parent().closest(".ctl_Tabs").find("ul.tabNav > li.selected > a").attr("id");var $activeContainer=$control.parent().closest(".ctl_Tabs").find("#"+activeTabId.split("tabnav_")[1]).find(".sys_control");return $activeContainer;}$(".ctl_RecentlyViewedProducts").each(function(){productSummaryListWork(null,[NewMind.ETWP.GetControlKey($(this))]);});$(".ctl_ProductList").each(function(){productSummaryListWork(null,[NewMind.ETWP.GetControlKey($(this))]);});if(typeof $.fn.on==="function" ){$('.slick-initialized').on("afterChange",function(event,slick,currentSlide){slickOnChange(event,slick,currentSlide)});}else if(typeof $.fn.bind==="function" &&typeof $('.slick-initialized')!=="undefined"){$('.slick-initialized').bind("afterChange",function(event,slick,currentSlide){slickOnChange(event,slick,currentSlide)});}function slickOnChange(event,slick,currentSlide){var $controlContainer=$(this).closest(".sys_control");
8var iControlKey=NewMind.ETWP.GetControlKey($controlContainer);if(typeof NewMind.ETWP.ControlData[iControlKey]==="undefined"){return;}var products=$(this).find(".Highlight[data-slick-index='"+currentSlide+"']").toArray();products.push(...$(products[0]).nextAll(":lt("+(parseInt(slick.options.slidesToShow)-1)+")").toArray());NewMind.DataCapture.Core.record(new ProductSummaryList(iControlKey,"initial load",$(products)));}if(NewMind.ETWP.ProductList&&NewMind.ETWP.ProductList.listLoaded){NewMind.ETWP.ProductList.listLoaded.subscribe(productSummaryListWork);}if(NewMind.ETWP.ProductList&&NewMind.ETWP.ProductList.SelectionChanged){NewMind.ETWP.ProductList.SelectionChanged.subscribe(productSummaryListWork);}if(NewMind.ETWP.HighlightedProducts&&NewMind.ETWP.HighlightedProducts.SelectionInitialised){NewMind.ETWP.HighlightedProducts.SelectionInitialised.subscribe(productSummaryListWork);}if(NewMind.ETWP.HighlightedProducts&&NewMind.ETWP.HighlightedProducts.SelectionChanged){NewMind.ETWP.HighlightedProducts.SelectionChanged.subscribe(productSummaryListWork);}if(NewMind.ETWP.SwipeGallery&&NewMind.ETWP.SwipeGallery.UserSwiped){NewMind.ETWP.SwipeGallery.UserSwiped.subscribe(productSummaryListWork);}if(NewMind.DataCapture.Links){NewMind.DataCapture.Links.registerToAugmentLinkClickEvents(applyLinkSpecialisationsIfApplicable);}function applyLinkSpecialisationsIfApplicable(objEvent,anchor){var $controlContainer=$(anchor).closest(".sys_control"),iControlKey=NewMind.ETWP.GetControlKey($c
8ontrolContainer),objControlData=NewMind.ETWP.ControlData[iControlKey];if($controlContainer.parent().closest(".sys_control").hasClass("ctl_HighlightedProducts")){iControlKey=NewMind.ETWP.GetControlKey($controlContainer.parent().closest(".sys_control"));objControlData=NewMind.ETWP.ControlData[iControlKey];}if(objControlData&&objControlData.Type){var $anchor=$(anchor);if($anchor.closest("div.node.externallinks").length>0&&$anchor.closest('[id="Youtube Video"]').length==0&&$anchor.closest('[id="Video"]').length==0){objEvent.linkType="External Link";objEvent.productKey=getProductKeyIfWithinProductListControl($anchor);}else{objEvent.linkType=objControlData.Type+" Result";}}else if($controlContainer.hasClass("ctl_ProductList")){objEvent.linkType="Product List Result";}else if($controlContainer.hasClass("ctl_HighlightedProducts")){objEvent.linkType="Highlighted Product Result";}else{return false;}return true;}function getProductKeyIfWithinProductListControl(target){var $target=$(target);var $productDetail=$target.closest("ol>li");if($productDetail.length===0){return null;}var arrClasses=$productDetail[0].className.split(" ");for(var i=0;i<arrClasses.length;i++){var strClass=arrClasses[i];if(strClass.substr(0,1)!=="p"){continue;}var iPossibleNumber=parseInt(strClass.substr(1),10);if(!isNaN(iPossibleNumber)){return iPossibleNumber;}}return null;}}());
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.