Dynamic Variation:
Book
Norway Now
Choose Language
Search & Book
Search
or search all of Norway
Eastern Norway Nordre Land

Hugulia

  • Nordre Land, Nordre Land
  •  /  km From You
Overview
Details

Hugulia har mange gode turmuligheter. Hugulia velforening er sterkt engasjert i løypekjøring, og er med på å tilrettelegge løyper i nærområdet.

Hugulia har mange gode turmuligheter. Hugulia velforening er sterkt engasjert i løypekjøring, og er med på å tilrettelegge løyper i nærområdet.




  • Last Updated:
  • Source: Turistkontoret Gjøvik Land Toten

Utendørsaktiviteter

Sykling
  • Sykkelutleie

Aktiviteter

Shopping
  • Souvenirbutikker
Click to activate
Nordre Land, Norway
The latitude and longitude
61° 2' 11" N / 9° 50' 0" E
TripAdvisor Reviews
Traveler Reviews in partnership with
\n","city":"Nordre Land","acctid":3431,"sortcompany":"hugulia","typename":"International","recid":20992,"weburl":"http://www.gjovik.com","status":"Member","meetingfacility":{"additional":[{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Exhibition area","shortname":"exhibitionarea_999_532","amenitygroupid":532,"digits":0,"fieldid":5380,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"},{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Max meeting capacity","shortname":"maxmeetingcapacity_999_532","amenitygroupid":532,"digits":0,"fieldid":5382,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"},{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Number of attendees","shortname":"numberofattendees_999_532","amenitygroupid":532,"digits":0,"fieldid":5383,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"},{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Number of beds","shortname":"numberofbeds_999_532","amenitygroupid":532,"digits":0,"fieldid":5384,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"},{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Number of guest rooms","shortname":"numberofguestrooms_999_532","amenitygroupid":532,"digits":0,"fieldid":5385,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"}],"additional_object":{"exhibitionarea_999_532":{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Exhibition area","shortname":"exhibitionarea_999_532","amenitygroupid":532,"digits":0,"fieldid":5380,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"},"maxmeetingcapacity_999_532":{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Max meeting capacity","shortname":"maxmeetingcapacity_999_532","amenitygroupid":532,"digits":0,"fieldid":5382,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"},"numberofattendees_999_532":{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Number of attendees","shortname":"numberofattendees_999_532","amenitygroupid":532,"digits":0,"fieldid":5383,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"},"numberofbeds_999_532":{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Number of beds","shortname":"numberofbeds_999_532","amenitygroupid":532,"digits":0,"fieldid":5384,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"},"numberofguestrooms_999_532":{"tabshortname":"custommeetingfacilities","amenitytabid":999,"value":"0","label":"Number of guest rooms","shortname":"numberofguestrooms_999_532","amenitygroupid":532,"digits":0,"fieldid":5385,"typeid":4,"type":"Number","value_raw":0,"value_string":"0"}}},"amenities_array":[{"tabshortname":"outdooractivities","amenitytabid":1098,"value":"true","label":"Bike rental","shortname":"bikerental_1098_512","amenitygroupid":512,"digits":0,"fieldid":5234,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"outdooractivities_bikerental_1098_512"},{"tabshortname":"thingstodo","amenitytabid":1101,"value":"true","label":"Souveniers shops","shortname":"souveniersshops_1101_529","amenitygroupid":529,"digits":0,"fieldid":5346,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"thingstodo_souveniersshops_1101_529"}],"email":"info@gjovik.com","crmtracking":{"custom_click_map":"63_20992","core_itinerary":"58_20992","core_booking_click":"7_20992","custom_click_add_to_trip":"60_20992","core_map_view":"59_20992","core_listing_view":"1_20992","core_mobile_click":"16_20992","core_listing_click":"4_20992","custom_click_booking":"66_20992","core_mobile_view":"17_20992","core_facebook_view":"14_20992","custom_click_share_on_social":"64_20992","core_mobile_call":"18_20992","custom_click_homepage":"62_20992","custom_listing_views":"67_20992","custom_click_tripadvisor":"65_20992","core_facebook_click":"15_20992","custom_click_email":"61_20992","core_twitter_view":"12_20992","core_twitter_click":"13_20992"},"country":"Norge","locale_code":"no","statusid":15,"categories":[{"primary":true,"subcatid":158,"subcatname":"Skiing","catname":"The Great Outdoors","catid":115},{"primary":false,"subcatid":227,"subcatname":"Tour Suggestions","catname":"Tours & Sightseeing","catid":118}],"updated":"2017-05-22T04:08:35.000Z","listingudfs_object":{"23":{"name":"External ProductID","value":"478092","digits":0,"fieldid":23,"typeid":8,"type":"Text","value_raw":"478092","value_string":"478092"},"33":{"listid":2,"name":"External Product Source","value":"TellUs","digits":0,"fieldid":33,"typeid":7,"type":"Dropdown","value_raw":{"listid":2,"value":"TellUs"},"value_string":"TellUs"},"40":{"name":"External Modified Date","value":"2017-05-22T00:00:00.000Z","digits":0,"fieldid":40,"typeid":2,"type":"Date","value_raw":"2017-05-22T00:00:00.000Z","value_string":"05/22/2017"},"42":{"name":"Introduction","value":"Hugulia har mange gode turmuligheter. Hugulia velforening er sterkt engasjert i løypekjøring, og er med på å tilrettelegge løyper i nærområdet.","digits":0,"fieldid":42,"typeid":9,"type":"Text Area","value_raw":"Hugulia har mange gode turmuligheter. Hugulia velforening er sterkt engasjert i løypekjøring, og er med på å tilrettelegge løyper i nærområdet.","value_string":"Hugulia har mange gode turmuligheter. Hugulia velforening er sterkt engasjert i løypekjøring, og er med på å tilrettelegge løyper i nærområdet."},"55":{"listid":2743,"name":"Municipality","value":"Nordre Land - 538","digits":0,"fieldid":55,"typeid":7,"type":"Dropdown","value_raw":{"listid":2743,"value":"Nordre Land - 538"},"value_string":"Nordre Land - 538"},"56":{"listid":2457,"name":"County","value":"Oppland","digits":0,"fieldid":56,"typeid":7,"type":"Dropdown","value_raw":{"listid":2457,"value":"Oppland"},"value_string":"Oppland"},"58":{"listid":3447,"name":"Country Part","value":"Eastern Norway","digits":0,"fieldid":58,"typeid":7,"type":"Dropdown","value_raw":{"listid":3447,"value":"Eastern Norway"},"value_string":"Eastern Norway"},"97":{"listid":3717,"name":"DB Owner","value":"Turistkontoret Gjøvik Land Toten","digits":0,"fieldid":97,"typeid":7,"type":"Dropdown","value_raw":{"listid":3717,"value":"Turistkontoret Gjøvik Land Toten"},"value_string":"Turistkontoret Gjøvik Land Toten"},"100":{"name":"Premium Partner","valuearray":[{"listid":5195,"value":"Fjell Norway"}],"digits":0,"fieldid":100,"typeid":12,"type":"Multi-Select","value_raw":[{"listid":5195,"value":"Fjell Norway"}],"value_string":"Fjell Norway"},"102":{"name":"Leisure Product","value":true,"digits":0,"fieldid":102,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes"},"114":{"name":"Active","value":true,"digits":0,"fieldid":114,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes"},"130":{"name":"importLanguage","value":"no","digits":0,"fieldid":130,"typeid":8,"type":"Text","value_raw":"no","value_string":"no"}},"accountudfs_object":{"31":{"name":"External CustomerID","value":"117","digits":0,"fieldid":31,"typeid":8,"type":"Text","value_raw":"117","value_string":"117"}},"amenities":{"outdooractivities_bikerental_1098_512":{"tabshortname":"outdooractivities","amenitytabid":1098,"value":"true","label":"Bike rental","shortname":"bikerental_1098_512","amenitygroupid":512,"digits":0,"fieldid":5234,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"outdooractivities_bikerental_1098_512"},"thingstodo_souveniersshops_1101_529":{"tabshortname":"thingstodo","amenitytabid":1101,"value":"true","label":"Souveniers shops","shortname":"souveniersshops_1101_529","amenitygroupid":529,"digits":0,"fieldid":5346,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"thingstodo_souveniersshops_1101_529"}},"title":"Hugulia","alpha":"h","loc":{"type":"Point","coordinates":[9.83354,61.03647]},"sites":["no"],"primary_site":"no","rankorder":-104,"primary_category":{"primary":true,"subcatid":158,"subcatname":"Skiing","catname":"The Great Outdoors","catid":115},"primarycatid":115,"primarysubcatid":158,"cms_title":"Hugulia - The Great Outdoors - Skiing (20992)","cms_title_sort":"hugulia - the great outdoors - skiing (20992)","primary_image_url":"https://media.newmindmedia.com/TellUs/image/?file=C8C3A91201392B6BA1B0964C8932F36F7E8F4317.jpg&dh=900&dw=1200&cropX=0&cropY=0&cropH=1944&cropW=2592","primary_image_is_default":false,"filter_tags":["catid_115","subcatid_158","catid_118","subcatid_227","site_no","site_no_catid_115","site_no_subcatid_158","site_no_catid_115_subcatid_158","site_no_catid_118","site_no_subcatid_227","site_no_catid_118_subcatid_227"],"qualityScore":-1,"amenityTree":[{"tabshortname":"outdooractivities","amenitytabname":"Outdoor Activities","altlabels":[{"displayname":"Danish","locale":"da","value":"Udendørs aktiviteter"},{"displayname":"German","locale":"de","value":"Aktivitäten im Freien"},{"displayname":"English","locale":"en","value":"Outdoor Activities"},{"displayname":"Spanish","locale":"es","value":"Actividades al aire libre"},{"displayname":"French","locale":"fr","value":"Activités en plein air"},{"displayname":"Italian","locale":"it","value":"Attività all'aperto"},{"displayname":"Dutch","locale":"nl","value":"Buitenactiviteiten"},{"displayname":"Norwegian","locale":"no","value":"Utendørsaktiviteter"},{"displayname":"Polish","locale":"pl","value":"Aktywny wypoczynek"},{"displayname":"Portuguese","locale":"pt-br","value":"Atividades ao ar livre"},{"displayname":"Russian","locale":"ru","value":"Отдых на природе"},{"displayname":"Swedish","locale":"sv","value":"Utomhusaktiviteter"},{"displayname":"Chinese","locale":"zh","value":"户外活动"}],"amenitytabid":1098,"sortorder":3,"groups":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Cykling"},{"displayname":"German","locale":"de","value":"Radfahren"},{"displayname":"English","locale":"en","value":"Biking"},{"displayname":"Spanish","locale":"es","value":"Ciclismo"},{"displayname":"French","locale":"fr","value":"Cyclisme"},{"displayname":"Italian","locale":"it","value":"Bicicletta"},{"displayname":"Dutch","locale":"nl","value":"Fietsen"},{"displayname":"Norwegian","locale":"no","value":"Sykling"},{"displayname":"Polish","locale":"pl","value":"Jazda na rowerze"},{"displayname":"Portuguese","locale":"pt-br","value":"Ciclismo"},{"displayname":"Russian","locale":"ru","value":"Велоспорт"},{"displayname":"Swedish","locale":"sv","value":"Cykling"},{"displayname":"Chinese","locale":"zh","value":"骑行"}],"amenitytabid":1098,"sortorder":10,"amenitygroupname":"Biking","amenitygroupid":512,"fields":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Cykelleje"},{"displayname":"German","locale":"de","value":"Radverleih"},{"displayname":"English","locale":"en","value":"Bike rental"},{"displayname":"Spanish","locale":"es","value":"Alquiler de bicicletas"},{"displayname":"French","locale":"fr","value":"Location de vélo"},{"displayname":"Italian","locale":"it","value":"Noleggio bici"},{"displayname":"Dutch","locale":"nl","value":"Fietshuur"},{"displayname":"Norwegian","locale":"no","value":"Sykkelutleie"},{"displayname":"Polish","locale":"pl","value":"Wypożyczalnia rowerów"},{"displayname":"Russian","locale":"ru","value":"Прокат велосипедов"},{"displayname":"Swedish","locale":"sv","value":"Cykeluthyrning"}],"sortorder":1,"label":"Bike rental","amenitygroupid":512,"tabshortname":"outdooractivities","amenitytabid":1098,"fieldtype":"Yes/No","numeric":false,"shortname":"bikerental_1098_512","array":false,"fieldid":5234,"typeid":11,"uniquename":"outdooractivities_bikerental_1098_512","doc":{"tabshortname":"outdooractivities","amenitytabid":1098,"value":"true","label":"Bike rental","shortname":"bikerental_1098_512","amenitygroupid":512,"digits":0,"fieldid":5234,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"outdooractivities_bikerental_1098_512"}}],"hasDoc":[true]}]},{"tabshortname":"thingstodo","amenitytabname":"Things To Do","altlabels":[{"displayname":"Danish","locale":"da","value":"Aktiviteter"},{"displayname":"German","locale":"de","value":"Aktivitäten"},{"displayname":"English","locale":"en","value":"Things To Do"},{"displayname":"Spanish","locale":"es","value":"Actividades"},{"displayname":"French","locale":"fr","value":"Activités"},{"displayname":"Italian","locale":"it","value":"Attività"},{"displayname":"Dutch","locale":"nl","value":"Activiteiten"},{"displayname":"Norwegian","locale":"no","value":"Aktiviteter"},{"displayname":"Polish","locale":"pl","value":"Atrakcje"},{"displayname":"Portuguese","locale":"pt-br","value":"Atividades"},{"displayname":"Russian","locale":"ru","value":"Активный отдых"},{"displayname":"Swedish","locale":"sv","value":"Aktiviteter"},{"displayname":"Chinese","locale":"zh","value":"要做的事"}],"amenitytabid":1101,"sortorder":6,"groups":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Shopping"},{"displayname":"German","locale":"de","value":"Shopping"},{"displayname":"English","locale":"en","value":"Shopping"},{"displayname":"Spanish","locale":"es","value":"Compras"},{"displayname":"French","locale":"fr","value":"Shopping"},{"displayname":"Italian","locale":"it","value":"Shopping"},{"displayname":"Dutch","locale":"nl","value":"Winkelen"},{"displayname":"Norwegian","locale":"no","value":"Shopping"},{"displayname":"Polish","locale":"pl","value":"Zakupy"},{"displayname":"Portuguese","locale":"pt-br","value":"Compras"},{"displayname":"Russian","locale":"ru","value":"Шоппинг"},{"displayname":"Swedish","locale":"sv","value":"Shopping"},{"displayname":"Chinese","locale":"zh","value":"购物"}],"amenitytabid":1101,"sortorder":34,"amenitygroupname":"Shopping","amenitygroupid":529,"fields":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Souvenirbutik"},{"displayname":"German","locale":"de","value":"Souvenirläden"},{"displayname":"English","locale":"en","value":"Souvenier shops"},{"displayname":"Spanish","locale":"es","value":"Tiendas de suvenires"},{"displayname":"French","locale":"fr","value":"Magasin de souvenirs"},{"displayname":"Italian","locale":"it","value":"Negozio di souvenir"},{"displayname":"Dutch","locale":"nl","value":"Souvenirwinkels"},{"displayname":"Norwegian","locale":"no","value":"Souvenirbutikker"},{"displayname":"Polish","locale":"pl","value":"Sklep z pamiątkami"},{"displayname":"Russian","locale":"ru","value":"Сувениры"},{"displayname":"Swedish","locale":"sv","value":"Souvenirbutiker"}],"sortorder":9,"label":"Souveniers shops","amenitygroupid":529,"tabshortname":"thingstodo","amenitytabid":1101,"fieldtype":"Yes/No","numeric":false,"shortname":"souveniersshops_1101_529","array":false,"fieldid":5346,"typeid":11,"uniquename":"thingstodo_souveniersshops_1101_529","doc":{"tabshortname":"thingstodo","amenitytabid":1101,"value":"true","label":"Souveniers shops","shortname":"souveniersshops_1101_529","amenitygroupid":529,"digits":0,"fieldid":5346,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"thingstodo_souveniersshops_1101_529"}}],"hasDoc":[true]}]}],"id":"5786d0c2daaef928fdddbb30","detailURL":"/listings/hugulia/20992/","genericUrl":"/listings/hugulia/20992/","url":"/listings/hugulia/20992/","absolute_url":"https://www.visitnorway.no/listings/hugulia/20992/","absolute_primary_url":"https://www.visitnorway.no/listings/hugulia/20992/","isListing":true,"longitude":9.83354,"latitude":61.03647,"hasTripAdvisor":true,"hasYelp":false}; var locale = "no"; var moment_locale_map = { no : "nb", zh : "zh-cn" }; data.moment_locale_code = moment_locale_map[locale] || locale; moment.locale(data.moment_locale_code); var goatee = new gt.Goatee(); goatee.addPlugin("crmLib", crmLib); goatee.addPlugin("moment", moment); goatee.addPlugin("seo", seot); // @T207259: Set lat/long for related listings and trigger load event // related listings is a collection dropped on the /listings/ page window.latitude = data.latitude; window.longitude = data.longitude; window.listingid = data.recid; $("html").trigger("loadRelated", { latitude : data.latitude, longitude : data.longitude, listingid : data.recid }); // @T212578: If this is an enlish listing on a non-english site then hide the description and let the use load the description if they want to. var siteLocale = $("html").prop("lang"); var listingLocale = data.locale_code; if(siteLocale === listingLocale) { $("[data-description-to-load]").addClass("loaded"); } else { $("[data-load-description]").first().removeClass("hide"); } // validate and track social urls root.find("[data-sv-social]").each(function() { var validServices =['facebook', 'twitter', 'youtube', 'instagram', 'pinterest']; var service = $(this).data('svService').toLowerCase(); var href = $(this).attr('href'); if (validServices.indexOf(service) > -1) { href = lib.getValidSocialUrl({ url : href, urlType : service }); switch (service) { case "twitter": $(this).attr("href", sv_crmLib.getTrackUrl(data.crmtracking.core_twitter_click, href)); break; case "facebook": $(this).attr("href", sv_crmLib.getTrackUrl(data.crmtracking.core_facebook_click, href)); break; default: $(this).attr("href", href); } } }); // @T231940 - custom CRM tracking - email click $('[data-crmtracking-custom_click_email]').on('click', function (click) { sv_crmLib.trackAjax(data.crmtracking.custom_click_email); }); /**** CRM tracking - DO NOT REMOVE!!!! ****/ // @T231940 - updates to custom CRM tracking // track website "click-throughs": root.find('[data-crmtracking-weburl]').each(function () { // simply forcing this to be dependent on JS, to be consistent with other tracking var trackURL = $(this).attr('data-crmtracking-weburl'); $(this).attr('href', trackURL); }); // track booking clicks root.find('[data-crmtracking-booking]').each(function () { var trackURL = $(this).attr('data-crmtracking-booking'); $(this).attr('href', trackURL); }); sv_crmLib.trackAjax(data.crmtracking.core_listing_view); /*** Media Gallery ***/ var getVideoID = function(url) { if (url.match(/https?:\/\/www\.youtube\.com\/watch\?v=.*/) !== null) { return url.replace(/.*\?v=/, ""); } else if (url.match(/https?:\/\/youtu\.be\/.*/) !== null) { return url.replace(/.*\//, ""); } } var galleryTemplate = root.find("[data-sv-galleryTemplate]").html(); var galleryContainer = root.find('[data-sv-galleryContainer]'); var galleryParent = galleryContainer.parent(); // T251039 Add primary image template var primaryImageTemplate = root.find("[data-sv-primaryImageTemplate]").html(); var primaryImageContainer = root.find('[data-sv-primaryImageContainer]'); var primaryImageParent = primaryImageContainer.parent(); if(data.media !== undefined) { for(var i = 0; i < data.media.length; i++) { if (data.media[i].mediaurl !== undefined && (data.media[i].mediatype === "Image" || data.media[i].mediatype === "Logo")) { data.media[i].image = sv_cloudinaryLib.default.createResource({ imageUrl : data.media[i].mediaurl }); // @T209849 remove logos from data.media and place first logo in data.logo if(data.media[i].mediatype === "Logo") { if(data.logo === undefined) { data.logo = data.media[i]; } data.media.splice(i, 1); i--; } } else if (data.media[i].mediatype === "YouTube") { data.media[i].videoID = getVideoID(data.media[i].mediafile); //you may use default, 0, 1, 2 or 3 for the youtube file name data.media[i].image = sv_cloudinaryLib.default.createResource({ imageUrl : "http://img.youtube.com/vi/" + data.media[i].videoID + "/0.jpg" }); } } // @T287919 - remove videos if we're on the Chinese site if (site.site === 'cn') { data.media = data.media.filter(function (item) { return !item.videoID; }) } var galCount = data.media.length; // @T251039 Send first image to template for use as Primary Image. Use all but first image for listing detail gallery. var primaryImageHTML = goatee.fill(primaryImageTemplate, { media : data.media[0] }); primaryImageContainer.replaceWith(primaryImageHTML); var galleryHTML = goatee.fill(galleryTemplate, { media : data.media.slice(1), total : galCount }); galleryContainer.replaceWith(galleryHTML); // @T214936 fallback for when media.tellus.no/images/?...t=4 images fail galleryParent.find('[data-sv-hero]').error(function() { var img = $(this); var shadowbox = img.parent('a'); var slide = shadowbox.parent('.slide'); var index = slide.data('slick-index'); var thumb = galleryParent.find('[data-sv-thumb][data-slick-index="'+index+'"] img'); var src = img.prop('src'); if(src.match(/media\.tellus\.no\/images\/.+t%3D4/)) { src = src.replace('t%3D4', 't%3D1'); img.prop('src', src); thumb.prop('src', src); shadowbox.prop('href', src); } else { galleryParent.find(".slides").slick('slickRemove', parseInt(img.closest("slick-slide").attr("data-slick-index"))); } }); function setImg(nodes, maxSlides) { var screenWidth = window.innerWidth; var size = "lg"; if(screenWidth <= 640) { size = "sm"; //maxSlides = 1; } else if(screenWidth <= 1130) { size = "md"; } nodes.each(function(index) { if(index < maxSlides) { $(this).attr("src", $(this).data(size + "-src")); $(this).closest(".slide").addClass("img-loaded"); } else { return true; } }); } // T251039 Set Responsive Primary Image var primaryImage = root.find('[data-sv-primaryImage]'); setImg(primaryImage, 1); // toggle credits root.find("[data-sv-creditstoggle]").click(function() { $(this).parent().toggleClass("open"); }); if(galCount > 1) { var $slider = galleryParent.find(".slides"); var $images = $slider.find("[data-sv-image]"); var screenWidth = window.innerWidth; setImg($images, 1); //initial image setup $slider.on("init", function() { screenWidth = window.innerWidth; if(screenWidth <= 640){ setImg($images, 2); }else{ setImg($images, ($slider.find(".slick-active").length + 2)); } if($slider.width() < $slider.find(".slick-track").width()) { galleryParent.find(".arrows").removeClass("hide"); } // @T239384 - don't init shadowbox on mobile if (window.innerWidth > 668) { Shadowbox.init({ resizeLgImages : true }); } }).on("beforeChange", function(event, slick, current, next) { var increment = 3; if(screenWidth <= 640){ increment = 0; } var nextImg = next+increment; var $nextSlide = $slider.find(".slide[data-slick-index=" + nextImg + "] img"); setImg($nextSlide, 1); if(screenWidth <= 640){ // load next image on mobile (shows when touch-dragging) setImg($slider.find(".slide[data-slick-index=" + (nextImg+1) + "] img"), 1); } }); $slider.slick({ prevArrow: galleryParent.find(".prevSlide"), nextArrow: galleryParent.find(".nextSlide"), draggable: false, infinite: false, slidesToShow: 2, slidesToScroll: 1, variableWidth: true, responsive: [ { breakpoint: 1130, settings: { slidesToShow: 1 } }, { breakpoint: 641, settings: { dots: true, slidesToShow: 1, variableWidth: false } } ] }); // @T287919 - remove videos if we're on the Chinese site if (site.site !== 'cn') { require(["plugins_nav_custom_youtube_iframe_api"], function(youtube_iframe_api) { var youtube_players = {}; galleryParent.on("beforeChange", ".slides", function(event, slick, currentSlide, nextSlide) { var i = currentSlide; if(youtube_players[i] && youtube_players[i].getPlayerState() === 1) { //if playing youtube_players[i].pauseVideo(); } else { var youtube_iframe = galleryParent.find("[data-slick-index='" + i + "'] iframe[src*=youtube]"); if(youtube_iframe.length) { youtube_players[i] = new youtube_iframe_api.Player(youtube_iframe.get(0), { events : { onReady : function() { if(youtube_players[i].getPlayerState() === 1) { //if playing youtube_players[i].pauseVideo(); } } } }); } } }); }); } } else { var $slider = galleryParent.find(".slides"); var $images = galleryParent.find(".slides").find("[data-sv-image]"); $slider.css({ opacity : 1 }); setImg($images, 1); if (galCount === 1) { // single slides need to be floated so the credits toggle // is in the correct position $slider.find('.slide').css('float', 'left'); } galleryParent.find(".slider").addClass("fadein"); // @T239384 - don't init shadowbox on mobile if (window.innerWidth > 668) { Shadowbox.init({ resizeLgImages : true }); } } // @T238281: added credits toggle to listings slider $slider.find('.credits-toggle').on('click', function (click) { $(this).closest('.slick-slide').toggleClass('show-credits'); }); } else { var galleryHTML = goatee.fill(galleryTemplate, {}); galleryContainer.replaceWith(galleryHTML); } var fetchTA = function() { var args = {service: "tripadvisor", recid: data.recid}; $.get("/includes/plugins/listings/getreviews/", args, function(res) { if (res.success === true && res.data.num_reviews > 0) { res.data.tripadvisorVersion = tripadvisorVersion; root.find("#panel_tripadvisor").html(goatee.fill(root.find("[data-sv-tripadvisorTemplate]").html(), res.data)); $(document).trigger('translate'); root.find(".detailTA-header").removeClass("hide"); root.find(".detailTA").removeClass("hide"); root.find("[data-sv-tripadvisorPreview]").html(goatee.fill(root.find("[data-sv-tripadvisorPreviewTemplate]").html(), res.data)); $(document).trigger('translate'); root.find("[data-sv-tripadvisorPreview]").removeClass("hide"); return true; } else { return false; } }).fail(function() { return false; } ); } fetchTA(); if (site.site !== 'cn') { require([ "plugins_listings_custom_map", "plugins_listings_custom_map_alt", // @T208185: load in 2nd map js "plugins_listings_custom_snazzymaps", "geodist", // @T209715: how to get here ], function( mapObj, mapObjSmall, snazzymaps, geodist ) { root.find(".tab-button.tb").removeClass("hide"); root.find("#maps").removeClass("hide"); root.find('[href=#maps]').on('click', function (click) { // @T231940 add custom CRM tracking sv_crmLib.trackAjax(data.crmtracking.core_map_view); }); if (data.latitude && data.longitude) { var placemarks = [{ id : "listing_" + data.recid, marker : { position : [data.latitude, data.longitude] }, infoWindow : { content : goatee.fill("
{{company}}
{{address1}}
", data) } }]; var initMapTab = function() { mapObj.init({ node : root.find(".detailMaps .primary"), map : { markerIcon : '/includes/client_public/shared/map_point.png', mapOptions : { zoom: 16, styles : snazzymaps.norway, draggable : false, scrollwheel : false, } } }, true); mapObj.setState({ placemarksAdded : false, placemarks : placemarks }, function() { mapObj.getMap(function(map) { var markers = map.getPlacemarks(); for(marker in markers) { map.placemarkOn(marker, 'click', function() { map.on(map._curInfoWindow, 'domready', function() { $(document).trigger('translate'); }); }); } }); }); //touchstart or mousedown var click = ('ontouchstart' in document.documentElement) ? 'touchend' : 'mousedown'; var mapOptions; mapObj.getMap(function(map) { if(map._map !== undefined) mapOptions = map._map; }); //set scroll wheel to true or false : true when clicked inside and viewing map. $('body').on(click, function(event) { var clickedInsideMap = $(event.target).parents('.primary [data-gmapcontainer]').length > 0; if(!clickedInsideMap) { mapOptions.setOptions({ scrollwheel: false, draggable : false }); } else{ mapOptions.setOptions({ scrollwheel: true, draggable : true }); } }); mapObj.initDetailInterface(); }; initMapTab(); /* * @T208185 * Initialize 2nd map and weather */ var initMapTabSmall = function() { mapObjSmall.init({ node : root.find(".detailMaps .sidebar"), map : { markerIcon : '/includes/client_public/shared/map_point_small.png', mapOptions : { zoom: 8, styles : snazzymaps.norway } } }, true); mapObjSmall.setState({ placemarksAdded : false, placemarks : placemarks }, function() { mapObjSmall.getMap(function(map) { var markers = map.getPlacemarks(); for(marker in markers) { map.placemarkOn(marker, 'click', function() { map.on(map._curInfoWindow, 'domready', function() { $(document).trigger('translate'); }); }); } }); }); }; initMapTabSmall(); function createWeather() { var unit = /dcLanguage=usa/.test(document.cookie) ? 'F' : 'C'; var url = urlLib.build({ path : "/plugins/core/svapi/", get : { service : "weatherv2", endpoint : "latlng", serviceArgs : JSON.stringify({ // t282687 / t273362 coordinates rounded to closest whole number ( 3-40 mile radius ) // original: { "lat":59.5123, "lng":10.4987 } // rounded : { "lat":60.0, "lng":10.0 } lat : Math.round(data.latitude), lng : Math.round(data.longitude), unit : unit.toLowerCase() }) } }); $.get(url, function(res) { if (res.success !== true) { return; } var current = res.data.current; var weatherTemplate = root.find("[data-sv-weatherTemplate]").html(); var weatherHTML = goatee.fill(weatherTemplate, { iconsrc : '/includes/client_public/weather/' + current.condition.yahoo + '.svg', temp : current.temp + '° ' + unit }); root.find('[data-sv-weatherContainer]').html(weatherHTML); }); } createWeather(); if(site.site !== "cn") { mapObj.getMap(function(map) { var wanted_types = ['bus_station', 'airport', 'subway_station', 'train_station']; var service = new google.maps.places.PlacesService(map._map); service.nearbySearch({ location : new google.maps.LatLng(latitude, longitude), rankBy : google.maps.places.RankBy.DISTANCE, types : wanted_types }, function(results, status) { if(status == google.maps.places.PlacesServiceStatus.OK) { var parsed_results = {}; var result_limit = 5; var distance_unit = (document.cookie.indexOf('dcLanguage=us') > -1 || document.cookie.indexOf('dcLanguage=uk') > -1) ? 'mi' : 'km'; results.forEach(function(result) { result.types.forEach(function(type) { if(wanted_types.indexOf(type) > -1) { if(parsed_results[type] === undefined) { parsed_results[type] = []; } if(parsed_results[type].length < result_limit) { parsed_results[type].push({ name : result.name, distance : new geodist({ start : {lat : latitude, lng : longitude}, end : {lat : result.geometry.location.lat(), lng : result.geometry.location.lng()} }).format({unit:distance_unit}) + ' ' + distance_unit }); } } }); }); var howToGetHereTemplate = root.find('[data-sv-howtogethereTemplate]').html(); var howToGetHereContainer = root.find('[data-sv-howtogethereContainer]'); var howToGetHereHTML = goatee.fill(howToGetHereTemplate, parsed_results); howToGetHereContainer.html(howToGetHereHTML); $(document).trigger('translate'); } }); }); } } if ("geolocation" in navigator) { navigator.geolocation.getCurrentPosition(function(position) { var coords = {}; coords.latitude = position.coords.latitude; coords.longitude = position.coords.longitude; var distance = new geodist({ start : { lat : coords.latitude, lon : coords.longitude }, end : { lat : data.latitude, lon : data.longitude } }); root.find("[data-distance]").text(distance.format({ unit : "km" })); root.find("[data-distance-container]").removeClass("hide"); }, function(error) { // do nothing since we already rendered }); } else { root.find("[data-distance-container]").addClass("hide"); } }); } $('.tabs.no-stack > dd > a').on('click', function(e) { e.preventDefault(); var tid = $(this).attr('href'); var t = $(this).closest('.tabs'); var dd = $(this).closest('dd'); var tc = t.closest('.tabs-content').closest('.content'); tc.removeClass('active'); $(tid).addClass('active'); $(tid).siblings().removeClass('active'); dd.addClass('active'); dd.siblings().removeClass('active'); t.toggleClass('open'); }); $(".tabs.subtab").each(function(i) { if ($(this).find('dd').length < 2) { $(this).addClass('solo'); } }); var linkifyPhoneNumber = function() { var windowWidth = window.innerWidth; if(windowWidth <= 1025) { if(!root.find(".phone-number").hasClass("linkified")) { var phoneNumber = root.find(".phone-number"); phoneNumber.html('' + phoneNumber.text() + ''); phoneNumber.addClass("linkified"); } } else { if(root.find(".phone-number").hasClass("linkified")) { var phoneNumber = root.find(".phone-number"); phoneNumber.html(phoneNumber.text()); phoneNumber.removeClass("linkified"); } } }; $(window).on('resize', function() { /* when using open left menu tabs in desktop and closed dropdown style tabs in mobile we want to reset the open state. otherwise clicking on a tab in desktop will leave it stuck on open when re-sizing to responsive */ $('.listings .tabs.open').removeClass('open'); linkifyPhoneNumber(); }); // add seo data // data to data layer on page load - custom request window.sem = window.sem || {}; window.sem.customData = { account: data.company ,accountId: data.acctid ,categories: data.categories ,event: 'pView' }; if(data.listingudfs_object[44] !== undefined) { window.sem.customData['destination'] = data.listingudfs_object[44].value_string; } if(data.listingudfs_object[55] !== undefined) { window.sem.customData['municipality'] = data.listingudfs_object[55].value_string; } if(data.listingudfs_object[56] !== undefined) { window.sem.customData['county'] = data.listingudfs_object[56].value_string; } if(data.listingudfs_object[57] !== undefined) { window.sem.customData['region'] = data.listingudfs_object[57].value_string; } if(data.listingudfs_object[58] !== undefined) { window.sem.customData['countryPart'] = data.listingudfs_object[58].value_string; } if(data.listingudfs_object[97] !== undefined) { window.sem.customData['dbOwner'] = data.listingudfs_object[97].value_string; } if(data.listingudfs_object[100] !== undefined) { window.sem.customData['premiumPartner'] = data.listingudfs_object[100].value_string; } // ,canonicalId: "en" listing recid if (data.locale_code === 'en') { window.sem.customData['canonicalId'] = data.recid; } else { if (typeof data.locale_related !== "undefined" && data.locale_related.length > 0) { for (var sem_i = 0; sem_i < data.locale_related.length; sem_i++) { if (data.locale_related[sem_i]["locale_code"] === 'en') { window.sem.customData['canonicalId'] = data.locale_related[sem_i]["recid"]; } } } } gtmDataLayer.push(window.sem.customData); // end data to data layer on page load - custom request var seoCat = "Listings"; var seoLabel = "Account: " + data.acctid + " | ID: " + data.recid + " | " + data.title; var seoVars = {vt: 'Detail', cat: seoCat, ua: 'Click'}; var seoArgs = {'event': 'tEvent', 'eventCategory': seoCat, 'eventLabel': seoLabel}; var si; sem.getSeoData = function (o,a,b) { var _b = (arguments.length >= 3) ? b : a; return $(o).closest("[" + a + "]").attr(_b); }; $.extend(seoArgs, seoVars); var seoTObj = { website: {'eventAction': 'Visit Website', 'lt': 'Website', 'ot': 'Text', 'cm11': 1, 'cm12': 1}, email: {'eventAction': 'Email', 'lt': 'Email', 'ot': 'Text', 'cm11': 1, 'cm12': 1}, phone: {'eventAction': 'Phone', 'lt': 'Phone', 'ot': 'Text', 'cm11': 1, 'cm12': 1}, green: {'eventAction': 'Green Travel', 'lt': 'Green Travel', 'ot': 'Text'}, greenViewAll: {'eventAction': 'Green Travel View All', 'lt': 'Green Travel', 'ot': 'Text'}, mapview: {'eventAction': 'Map View', 'lt': 'Map', 'ot': 'Text'}, streetview: {'eventAction': 'Street View', 'lt': 'Map', 'ot': 'Text'}, booking: {'eventAction': 'Booking', 'lt': 'Booking', 'ot': 'Button', 'cm11': 1, 'cm12': 1}, price: {'eventAction': 'Price', 'lt': 'Price', 'ot': 'Button'}, routePlanner: {'eventAction': 'Route Planner', 'lt': 'Route Planner', 'ot': 'Button'}, tabOffers: {'eventAction': 'Click Tab Offers', 'lt': 'Offers', 'ot': 'Tab'}, tabEvents: {'eventAction': 'Click Tab Events', 'lt': 'Events', 'ot': 'Tab'}, tabMeetingFacilities: {'eventAction': 'Click Tab Meeting Facilities', 'lt': 'Meeting Facilities', 'ot': 'Tab'}, tabAmenities: {'eventAction': 'Click Tab Amenities', 'lt': 'Amenities', 'ot': 'Tab'}, tabOverview: {'eventAction': 'Click Tab Overview', 'lt': 'Overview', 'ot': 'Tab'}, tabYelp: {'eventAction': 'Click Tab Yelp', 'lt': 'Yelp', 'ot': 'Tab'}, tripAdvisor: {'eventAction': 'TripAdvisor', 'lt': 'TripAdvisor', 'ot': 'Image'}, subtabFacilityInfo: {'eventAction': 'Click Subtab Facility Info', 'lt': 'Facility Info', 'ot': 'Tab'}, subtabMeetingRooms: {'eventAction': 'Click Subtab Meeting Rooms', 'lt': 'Meeting Rooms', 'ot': 'Tab'}, subtabAmenities: {'eventAction': 'Click Subtab Amenities', 'lt': 'Amenities', 'ot': 'Tab'}, category: {'eventAction': 'Category', 'lt': 'Category', 'ot': 'Text'} }; for (var si in seoTObj) { $.extend(seoTObj[si], seoArgs); } root.on('click', '[data-seo-website]', function () { gtmDataLayer.push(seoTObj.website); }); root.on('click', '[data-seo-email]', function () { gtmDataLayer.push(seoTObj.email); }); root.on('click', '[data-seo-phone]', function () { gtmDataLayer.push(seoTObj.phone); }); root.on('click', '[data-seo-green]', function () { gtmDataLayer.push(seoTObj.green); }); root.on('click', '[data-seo-green-viewall]', function () { gtmDataLayer.push(seoTObj.greenViewAll); }); root.on('click', '[data-seo-mapview]', function () { gtmDataLayer.push(seoTObj.mapview); }); root.on('click', '[data-seo-streetview]', function () { gtmDataLayer.push(seoTObj.streetview); }); root.on('click', '[data-seo-booking]', function () { gtmDataLayer.push(seoTObj.booking); }); root.on('click', '[data-seo-price]', function () { gtmDataLayer.push(seoTObj.price); }); root.on('click', '[data-seo-routeplanner]', function () { gtmDataLayer.push(seoTObj.routePlanner); }); root.on('click', '[data-seo-tab-offers]', function () { gtmDataLayer.push(seoTObj.tabOffers); }); root.on('click', '[data-seo-tab-events]', function () { gtmDataLayer.push(seoTObj.tabEvents); }); root.on('click', '[data-seo-tab-meetingfacilities]', function () { gtmDataLayer.push(seoTObj.tabMeetingFacilities); }); root.on('click', '[data-seo-tab-amenities]', function () { gtmDataLayer.push(seoTObj.tabAmenities); }); root.on('click', '[data-seo-tab-overview]', function () { gtmDataLayer.push(seoTObj.tabOverview); }); root.on('click', '[data-seo-tab-yelp]', function () { gtmDataLayer.push(seoTObj.tabYelp); }); root.on('click', '[data-seo-tripadvisor]', function () { gtmDataLayer.push(seoTObj.tripAdvisor); }); root.on('click', '[data-seo-subtab-facilityinfo]', function () { gtmDataLayer.push(seoTObj.subtabFacilityInfo); }); root.on('click', '[data-seo-subtab-meetingrooms]', function () { gtmDataLayer.push(seoTObj.subtabMeetingRooms); }); root.on('click', '[data-seo-subtab-amenities]', function () { seoTObj.subtabAmenities.eventAction = 'Click Subtab | ' + sem.getSeoData(this, 'data-seo-subtab-amenities'); gtmDataLayer.push(seoTObj.subtabAmenities); }); root.on('click', '[data-seo-category]', function () { seoTObj.category.eventAction = 'Category: ' + sem.getSeoData(this, 'data-seo-category'); gtmDataLayer.push(seoTObj.category); }); // end seo data var scrollToId = function(id, startingPoint, baseSpeed, buffer) { var thisOffset = startingPoint.offset(); var thatOffset = $(id).offset(); var offsetDiff = Math.abs(thatOffset.top - thisOffset.top); var speed = (offsetDiff * baseSpeed) / 1000; $("html,body").animate({ scrollTop : thatOffset.top - buffer }, speed); } root.find("[data-accordion] a").on("click", function() { var thisLink = $(this); var scroll = window.setTimeout(function() { scrollToId("#" + thisLink.attr("id"), thisLink, 600, 50); }, 200); }); $("[data-sv-tripadvisorPreview]").on("click", function() { scrollToId("#ta-scroll-to", $(this), 600, 75); sv_crmLib.trackAjax(data.crmtracking.custom_click_tripadvisor); }); // @T212578: If this is an enlish listing on a non-english site then hide the description and let the use load the description if they want to. $("[data-load-description]").on("click", function() { $("[data-load-description]").toggleClass("hide"); $("[data-description-to-load]").toggleClass("loaded"); }); //@T219434: green travel view all link var green = root.find("[data-green-viewall]"); if(green.length > 0) { var path = $("[data-locale='/about/sustainability/'] a").attr("href"); var base = window.location.origin; var options = "#gt"; root.find("[data-green-viewall]").attr("href", base + path + options); } //@T214857: go to category page if(data.categories !== undefined && data.categories[0] !== undefined && data.categories[0].catid !== undefined) { var base = window.location.origin; var path = "/all-listings/"; var options = "?filter%5Bcategories.catid%5D=" + data.categories[0].catid + "&filter%5Bcategories.subcatid%5D%5B%24in%5D%5B0%5D=0&options%5Blimit%5D=12&options%5Bskip%5D=0"; $(".category a").attr("href", base + path + options); $(".category").removeClass("hide"); } if (tripbuilder !== undefined) { tripbuilder.initButtons({ root : root, addButtonTemplate : "Add to Your Trip", removeButtonTemplate : " View Your Trip" }); tripbuilder.events.on("change", function() { setTimeout(function() { $(document).trigger('translate'); }, 0); }); tripbuilder.events.trigger("change"); // @T231940 add custom CRM tracking $('[data-tb-button]').on('click', function (click) { sv_crmLib.trackAjax(data.crmtracking.custom_click_add_to_trip); }); $('[href="/"]').on('click', function () { sv_crmLib.trackAjax(data.crmtracking.custom_click_homepage); }) } linkifyPhoneNumber(); if(data.listingudfs_object[40]) { var lastUpdated = moment(data.listingudfs_object[40].value_string, "MM/DD/YYYY"); root.find("[data-sv-lastupdated] .date").text(lastUpdated.format("L")); root.find("[data-sv-lastupdated]").removeClass("hide"); } // @T232789 - Remove hreflang link tags from english listings / events on non-English sites $("html").bind("localeSwitchListingEvent", function() { // get requested locale and site var localeCode = $("[data-locale-requested]").attr("data-locale-requested"); var siteCode = $("[data-locale-requested]").attr("data-site-requested"); var localeURL = ""; // @T222834 save slug only for handling multiple detail urls var localeURLslug; // check if requested locale has listings data for(var i = 0; i < data.locale_items.length; i++) { if(data.locale_items[i].locale_code === localeCode) { localeURL = data.locale_items[i].absolute_primary_url; localeURLslug = localeURL.match(/\/listings\/.+$/); if (localeURLslug && localeURLslug.length) { localeURLslug = localeURLslug[0]; } break; } } // if listing data for the requested locale could not be found, then get the english listing path and combine with base url for requested site if(localeURL === "") { for(var i = 0; i < data.locale_items.length; i++) { if(data.locale_items[i].locale_code === "en") { localeURL = data.locale_items[i].detailURL; break } } if(localeURL === "") { localeURL = site.siteConfigs[siteCode].urlNoSlash + window.location.pathname; } else { // @T222834 save slug only for handling multiple detail urls below localeURLslug = localeURL; localeURL = site.siteConfigs[siteCode].urlNoSlash + localeURL; } } // @T222834 handle multiple listing detail pages -- find matching language detail page if not default // check if we're not on the default listing page if (window.location.href.indexOf('listings-') >= 0) { // replace the default listing url with the contextual detail url using locale tag equivalent var locale_item_href = $('[data-sv-localecontainer] [data-language-site=' + siteCode + '] span').attr('link-href'); // check if there's a locale equivalent detail URL if (locale_item_href.indexOf('listings-') >= 0) { // grab just the part of the default detail url after the `/listings/` part... var url_listing_segments = localeURL.match(/\/listings-?[^\/]*\/(.+)$/); if (url_listing_segments && url_listing_segments.length > 1) { // ...and append it to the end of the locale equivalent nav item localeURL = locale_item_href + url_listing_segments[1]; } } else { // no locale URL equivalent if (localeURLslug) { // language site has a localized listing localeURL = site.siteConfigs[siteCode].urlNoSlash + localeURLslug; } else { // target language site does not have a localized listing localeURL = site.siteConfigs[siteCode].urlNoSlash + data.genericUrl; } } } window.location.href = localeURL; }); /* @T250672: Booking Url: Add single detail offer to booking menu in header */ var bookingData = {}; if(data.listingudfs_object[25] !== undefined){ bookingData.bookingUrl = data.listingudfs_object[25].value; } if(bookingData.bookingUrl) { if(data.company !== undefined){ bookingData.title = data.company; } if(data.listingudfs_object[41] !== undefined){ bookingData.price = data.listingudfs_object[41].value; } if(data.listingudfs_object[93] !== undefined){ bookingData.preprice = data.listingudfs_object[93].value; } if(data.listingudfs_object[91] !== undefined){ bookingData.postprice = data.listingudfs_object[91].value; } // @T231940 - add custom CRM tracking bookingData.bookingUrl = sv_crmLib.getTrackUrl(data.crmtracking.custom_click_booking, bookingData.bookingUrl); // @T285372 Determine which booking container is being used then: //Target offer template, find destination container, //fill template with listing data, add partial to container and display hidden container var bookingContainer = $('.booking-wrapper').find('.detailBooking'); var bookingListContainer = $('.booking-wrapper').find('[data-sv-bookinglist-ul]'); if(bookingContainer.length){ var offerTemplate = root.find('[data-sv-offersTemplate]').html(); bookingContainer.css('display', 'block'); dataOffersHTML = goatee.fill(offerTemplate, bookingData); bookingContainer.html(dataOffersHTML); } else if (bookingListContainer.length){ var bookListItemTemplate = root.find('[data-sv-bookListItemTemplate]').html(); dataOffersHTML = goatee.fill(bookListItemTemplate, bookingData); bookingListContainer.prepend(dataOffersHTML); } // Init navmenu event handlers after partial is added to header if($.fn.navmenu){ $( '.button-content.book-content .navPrimary' ).navmenu({ headerButton : "[data-header-btn='book']" }); } } // @T231940 add custom CRM tracking $('[data-sv-addthis-track-social-click]').on('click', function (click) { sv_crmLib.trackAjax(data.crmtracking.custom_click_share_on_social); }); /* * @T239384: Shadowbox for gallery slider. * Prevent navigation to image url. Open Shadowbox manually. * Clear cache and setup shadowbox on window.resize. */ function setSliderHrefs(){ var slideAnchors = root.find("[data-sv-shadow]"); var screenWidth = window.innerWidth; var size = "lg"; if(screenWidth <= 640) { size = "sm"; } else if(screenWidth <= 1130) { size = "md"; } slideAnchors.each(function(index, anchor){ var $anchor = $(anchor); $anchor.attr("href", $anchor.data(size + "-src")); }); // @T251039 Set Shadowbox href on Primary anchor // ** update: disabled since image in shadowbox is smaller than regular image ** // var primaryAnchor = root.find("[data-sv-shadowPrimary]"); // primaryAnchor.attr("href", primaryAnchor.data(size + "-src")); // @T239384 - don't init shadowbox on mobile if(window.innerWidth > 668 && slideAnchors.length){ Shadowbox.init({ resizeLgImages : true }); Shadowbox.setup(slideAnchors); //Shadowbox.setup(primaryAnchor); } } setSliderHrefs(); root.on('click', "[data-sv-shadow]", function(e){ e.preventDefault(); if(window.innerWidth > 668){ Shadowbox.open(e.target); } }); $(window).on("resize", function() { Shadowbox.clearCache(); setSliderHrefs(); setImg(primaryImage, 1); }); /* * @T201431: GET PAGE DATA FOR RECENT PAGES * Used for building the data for the recent pages collections widget */ if(window.hasLocalStorage) { var cp = window.currentPage; cp.title = data.title; if(data.primary_image_url !== undefined) { cp.image = encodeURI(data.primary_image_url + ""); } cp.description = data.description; window.currentPage = cp; $("html").trigger("saveRecentPage"); } if(document.referrer.indexOf(location.hostname) > -1) { root.find('.sharedBackButton').slideDown(); } // @T231961 - Hide/blur opening hours when they are too many var detailPanes = root.find('.detailPanes').children(); var detailPaneOne = detailPanes.first(); var detailPaneTwo = detailPanes.last(); var hours = detailPaneTwo.find('.hours'); var hoursContent = hours.find('.hours-content'); hours.addClass('show'); if(hours.height() > detailPaneOne.height()) { hours.addClass('hide-long'); var height = detailPaneOne.height() - (detailPaneTwo.height() - hoursContent.height()); height = height < 250 ? 250 : height; hoursContent.height(height); hours.find('.see-all').click(function() { hours.removeClass('hide-long'); hoursContent.height('auto'); return false; }); } //@T268007: REMOVE TOP SLIDESHOW VERTICAL SPACE FROM DETAIL PAGE var topSlideshowContainer = $(".root_panel"); topSlideshowContainer.addClass("isDetailPage"); });
Your Recently Viewed Pages
Ad
Ad
Ad