Dynamic Variation:
Book
Norway Now
Choose Language
Search & Book
Search
or search all of Norway
Fjord Norway Ryfylke Finnøy

Furrehytter

  • Fårasundet, Finnøy
  • 51 71 04 81
  •  /  km From You
Overview
Details

Vil du oppleve definisjonen av ordet stillhet, skal du besøke Furrehytter på Sjernarøy. Kun en liten time fra Haugesund og Stavanger, ligger en skjermet idyll av et ferieparadis du neppe har sett maken til. Vi tilbyr overnatting i romslige hytter eller leiligheter, alle med fantastisk utsikt og beliggenhet i nærhet til sjøen. I naturskjønne omgivelser kan du fiske, spille golf, dra på tur, ta et bad i sjøen eller bare sitte i utendørs badestamp, eller på kaikanten og dingle med føttene og lade batteriene. Restaurant og konferansedelen på Sjernarøy Maritim byr på god mat og drikke hele året og fasiliteter til selskaper og firmaturer.

Vi har noe for en hver smak. Innen- eller utendørs boblebad, badstu, golfbane, turløyper, gårdsbesøk, geocaching, sightseeing, svært gode fiskemuligheter og sist men ikke minst: Freden og roen! Senk skuldrene, sett deg ned og hør godt etter; hører du? Absolutt stillhet... Nyt lyden av Sjernarøy!


  • Last Updated:
  • Source: Region Stavanger

Generelt

Tilgjengelighet
  • Tilgjengelig for rullestolbrukere

Overnatting

Hotellfasiliteter
  • Bar
  • Konferansefaciliteter
  • Familievennlig

Utendørsaktiviteter

Sykling
  • Sykkelutleie

Planlegg reisen

Tjenester
  • Familievennlig
  • WiFi

Aktiviteter

Fornøyelsesparker
  • Familievennlig
TripAdvisor Reviews
Traveler Reviews in partnership with
"}],"sources":[{"sourcename":"TA-Tag3-With-ID(15)","sourceid":152}]},"tacatid":1,"accountudfs":[{"name":"External CustomerID","value":"721413","digits":0,"fieldid":31,"typeid":8,"type":"Text","value_raw":"721413","value_string":"721413"}],"description":"Vil du oppleve definisjonen av ordet stillhet, skal du besøke Furrehytter på Sjernarøy. Kun en liten time fra Haugesund og Stavanger, ligger en skjermet idyll av et ferieparadis du neppe har sett maken til. Vi tilbyr overnatting i romslige hytter eller leiligheter, alle med fantastisk utsikt og beliggenhet i nærhet til sjøen. I naturskjønne omgivelser kan du fiske, spille golf, dra på tur, ta et bad i sjøen eller bare sitte i utendørs badestamp, eller på kaikanten og dingle med føttene og lade batteriene. Restaurant og konferansedelen på Sjernarøy Maritim byr på god mat og drikke hele året og fasiliteter til selskaper og firmaturer.\n\nVi har noe for en hver smak. Innen- eller utendørs boblebad, badstu, golfbane, turløyper, gårdsbesøk, geocaching, sightseeing, svært gode fiskemuligheter og sist men ikke minst: Freden og roen! Senk skuldrene, sett deg ned og hør godt etter; hører du? Absolutt stillhet... Nyt lyden av Sjernarøy!","city":"Finnøy","acctid":22818,"sortcompany":"furrehytter","typename":"International","state":"Sjernarøy","recid":20764,"weburl":"http://www.furrehytter.no","status":"Member","phone":"51 71 04 81","amenities_array":[{"tabshortname":"accomodation","amenitytabid":1095,"value":"true","label":"Bar","shortname":"bar_1095_494","amenitygroupid":494,"digits":0,"fieldid":5064,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"accomodation_bar_1095_494"},{"tabshortname":"accomodation","amenitytabid":1095,"value":"true","label":"Conference facilities","shortname":"conferencefacilities_1095_494","amenitygroupid":494,"digits":0,"fieldid":5070,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"accomodation_conferencefacilities_1095_494"},{"tabshortname":"accomodation","amenitytabid":1095,"value":"true","label":"Family friendly","shortname":"familyfriendly_1095_494","amenitygroupid":494,"digits":0,"fieldid":5073,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"accomodation_familyfriendly_1095_494"},{"tabshortname":"general","amenitytabid":1097,"value":"true","label":"Access for wheelchairs","shortname":"accessforwheelchairs_1097_499","amenitygroupid":499,"digits":0,"fieldid":5100,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"general_accessforwheelchairs_1097_499"},{"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":"planyourtrip","amenitytabid":1099,"value":"true","label":"Family friendly","shortname":"familyfriendly_1099_521","amenitygroupid":521,"digits":0,"fieldid":5287,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"planyourtrip_familyfriendly_1099_521"},{"tabshortname":"planyourtrip","amenitytabid":1099,"value":"true","label":"Wifi","shortname":"wifi_1099_521","amenitygroupid":521,"digits":0,"fieldid":5292,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"planyourtrip_wifi_1099_521"},{"tabshortname":"thingstodo","amenitytabid":1101,"value":"true","label":"Family friendly","shortname":"familyfriendly_1101_530","amenitygroupid":530,"digits":0,"fieldid":5351,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"thingstodo_familyfriendly_1101_530"}],"email":"booking@furrehytter.no","locale_related":[{"locale_code":"en","recid":7406},{"locale_code":"de","recid":36094},{"locale_code":"es","recid":48640}],"crmtracking":{"custom_click_map":"63_20764","core_itinerary":"58_20764","core_booking_click":"7_20764","custom_click_add_to_trip":"60_20764","core_map_view":"59_20764","core_listing_view":"1_20764","core_mobile_click":"16_20764","core_listing_click":"4_20764","custom_click_booking":"66_20764","core_mobile_view":"17_20764","core_facebook_view":"14_20764","custom_click_share_on_social":"64_20764","core_mobile_call":"18_20764","custom_click_homepage":"62_20764","custom_listing_views":"67_20764","custom_click_tripadvisor":"65_20764","core_facebook_click":"15_20764","custom_click_email":"61_20764","core_twitter_view":"12_20764","core_twitter_click":"13_20764"},"country":"Norge","locale_code":"no","statusid":15,"categories":[{"primary":true,"subcatid":197,"subcatname":"Apartments","catname":"Hotels & More","catid":23},{"primary":false,"subcatid":199,"subcatname":"Cottages & Holiday Houses","catname":"Hotels & More","catid":23}],"updated":"2017-07-26T03:22:58.000Z","listingudfs_object":{"23":{"name":"External ProductID","value":"468723","digits":0,"fieldid":23,"typeid":8,"type":"Text","value_raw":"468723","value_string":"468723"},"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-07-26T00:00:00.000Z","digits":0,"fieldid":40,"typeid":2,"type":"Date","value_raw":"2017-07-26T00:00:00.000Z","value_string":"07/26/2017"},"44":{"listid":1981,"name":"Destination","value":"Sjernarøy","digits":0,"fieldid":44,"typeid":7,"type":"Dropdown","value_raw":{"listid":1981,"value":"Sjernarøy"},"value_string":"Sjernarøy"},"55":{"listid":2567,"name":"Municipality","value":"Finnøy - 1141","digits":0,"fieldid":55,"typeid":7,"type":"Dropdown","value_raw":{"listid":2567,"value":"Finnøy - 1141"},"value_string":"Finnøy - 1141"},"56":{"listid":2460,"name":"County","value":"Rogaland","digits":0,"fieldid":56,"typeid":7,"type":"Dropdown","value_raw":{"listid":2460,"value":"Rogaland"},"value_string":"Rogaland"},"57":{"name":"Region","valuearray":[{"listid":3446,"value":"Ryfylke"},{"listid":3429,"value":"Stavanger"}],"digits":0,"fieldid":57,"typeid":12,"type":"Multi-Select","value_raw":[{"listid":3446,"value":"Ryfylke"},{"listid":3429,"value":"Stavanger"}],"value_string":"Ryfylke, Stavanger"},"58":{"listid":3448,"name":"Country Part","value":"Fjord Norway","digits":0,"fieldid":58,"typeid":7,"type":"Dropdown","value_raw":{"listid":3448,"value":"Fjord Norway"},"value_string":"Fjord Norway"},"97":{"listid":3702,"name":"DB Owner","value":"Region Stavanger","digits":0,"fieldid":97,"typeid":7,"type":"Dropdown","value_raw":{"listid":3702,"value":"Region Stavanger"},"value_string":"Region Stavanger"},"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":"721413","digits":0,"fieldid":31,"typeid":8,"type":"Text","value_raw":"721413","value_string":"721413"}},"amenities":{"accomodation_bar_1095_494":{"tabshortname":"accomodation","amenitytabid":1095,"value":"true","label":"Bar","shortname":"bar_1095_494","amenitygroupid":494,"digits":0,"fieldid":5064,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"accomodation_bar_1095_494"},"accomodation_conferencefacilities_1095_494":{"tabshortname":"accomodation","amenitytabid":1095,"value":"true","label":"Conference facilities","shortname":"conferencefacilities_1095_494","amenitygroupid":494,"digits":0,"fieldid":5070,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"accomodation_conferencefacilities_1095_494"},"accomodation_familyfriendly_1095_494":{"tabshortname":"accomodation","amenitytabid":1095,"value":"true","label":"Family friendly","shortname":"familyfriendly_1095_494","amenitygroupid":494,"digits":0,"fieldid":5073,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"accomodation_familyfriendly_1095_494"},"general_accessforwheelchairs_1097_499":{"tabshortname":"general","amenitytabid":1097,"value":"true","label":"Access for wheelchairs","shortname":"accessforwheelchairs_1097_499","amenitygroupid":499,"digits":0,"fieldid":5100,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"general_accessforwheelchairs_1097_499"},"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"},"planyourtrip_familyfriendly_1099_521":{"tabshortname":"planyourtrip","amenitytabid":1099,"value":"true","label":"Family friendly","shortname":"familyfriendly_1099_521","amenitygroupid":521,"digits":0,"fieldid":5287,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"planyourtrip_familyfriendly_1099_521"},"planyourtrip_wifi_1099_521":{"tabshortname":"planyourtrip","amenitytabid":1099,"value":"true","label":"Wifi","shortname":"wifi_1099_521","amenitygroupid":521,"digits":0,"fieldid":5292,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"planyourtrip_wifi_1099_521"},"thingstodo_familyfriendly_1101_530":{"tabshortname":"thingstodo","amenitytabid":1101,"value":"true","label":"Family friendly","shortname":"familyfriendly_1101_530","amenitygroupid":530,"digits":0,"fieldid":5351,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"thingstodo_familyfriendly_1101_530"}},"title":"Furrehytter","alpha":"f","loc":{"type":"Point","coordinates":[5.80837,59.26098]},"sites":["no"],"primary_site":"no","rankorder":-118,"primary_category":{"primary":true,"subcatid":197,"subcatname":"Apartments","catname":"Hotels & More","catid":23},"primarycatid":23,"primarysubcatid":197,"cms_title":"Furrehytter - Hotels & More - Apartments (20764)","cms_title_sort":"furrehytter - hotels & more - apartments (20764)","primary_image_url":"https://media.newmindmedia.com/TellUs/image/?file=41E1545BD8ED204EEB149AA0DCCEAA6D64D49924.jpg&dh=533&dw=800","primary_image_is_default":false,"locale_items_ids":[7406,36094,48640],"filter_tags":["catid_23","subcatid_197","subcatid_199","site_no","site_no_catid_23","site_no_subcatid_197","site_no_catid_23_subcatid_197","site_no_subcatid_199","site_no_catid_23_subcatid_199"],"qualityScore":-1,"amenityTree":[{"tabshortname":"general","amenitytabname":"General","altlabels":[{"displayname":"Danish","locale":"da","value":"Generelt"},{"displayname":"German","locale":"de","value":"Allgemein"},{"displayname":"English","locale":"en","value":"General"},{"displayname":"Spanish","locale":"es","value":"General"},{"displayname":"French","locale":"fr","value":"Général"},{"displayname":"Italian","locale":"it","value":"Generale"},{"displayname":"Dutch","locale":"nl","value":"Algemeen"},{"displayname":"Norwegian","locale":"no","value":"Generelt"},{"displayname":"Polish","locale":"pl","value":"Ogólne"},{"displayname":"Portuguese","locale":"pt-br","value":"Geral"},{"displayname":"Russian","locale":"ru","value":"Общая"},{"displayname":"Swedish","locale":"sv","value":"Generelt"},{"displayname":"Chinese","locale":"zh","value":"综合"}],"amenitytabid":1097,"sortorder":1,"groups":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Tilgængelighed"},{"displayname":"German","locale":"de","value":"Barrierefreiheit"},{"displayname":"English","locale":"en","value":"Accessibility"},{"displayname":"Spanish","locale":"es","value":"Accesibilidad"},{"displayname":"French","locale":"fr","value":"Accessibilité"},{"displayname":"Italian","locale":"it","value":"Accessibilità"},{"displayname":"Dutch","locale":"nl","value":"Toegankelijkheid"},{"displayname":"Norwegian","locale":"no","value":"Tilgjengelighet"},{"displayname":"Polish","locale":"pl","value":"Udogodnienia dla osób niepełnosprawnych"},{"displayname":"Portuguese","locale":"pt-br","value":"Acessibilidade"},{"displayname":"Russian","locale":"ru","value":"Доступность"},{"displayname":"Swedish","locale":"sv","value":"Tillgänglighet"},{"displayname":"Chinese","locale":"zh","value":"无障碍设施"}],"amenitytabid":1097,"sortorder":1,"amenitygroupname":"Accessibility","amenitygroupid":499,"fields":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Adgang for kørestole"},{"displayname":"German","locale":"de","value":"Für Rollstuhlfahrer geeignet"},{"displayname":"English","locale":"en","value":"Access for wheelchairs"},{"displayname":"Spanish","locale":"es","value":"Acceso para sillas de ruedas"},{"displayname":"French","locale":"fr","value":"Accès en fauteuil roulant"},{"displayname":"Italian","locale":"it","value":"Accesso per sedie a rotelle"},{"displayname":"Dutch","locale":"nl","value":"Toegankelijk voor rolstoelgebruikers"},{"displayname":"Norwegian","locale":"no","value":"Tilgjengelig for rullestolbrukere"},{"displayname":"Polish","locale":"pl","value":"Dostęp dla wózków inwalidzkich"},{"displayname":"Russian","locale":"ru","value":"Доступ на инвалидных колясках"},{"displayname":"Swedish","locale":"sv","value":"Tillgänglighet för rullstolar"}],"sortorder":1,"label":"Access for wheelchairs","amenitygroupid":499,"tabshortname":"general","amenitytabid":1097,"fieldtype":"Yes/No","numeric":false,"shortname":"accessforwheelchairs_1097_499","array":false,"fieldid":5100,"typeid":11,"uniquename":"general_accessforwheelchairs_1097_499","doc":{"tabshortname":"general","amenitytabid":1097,"value":"true","label":"Access for wheelchairs","shortname":"accessforwheelchairs_1097_499","amenitygroupid":499,"digits":0,"fieldid":5100,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"general_accessforwheelchairs_1097_499"}}],"hasDoc":[true]}]},{"tabshortname":"accomodation","amenitytabname":"Accommodation","altlabels":[{"displayname":"Danish","locale":"da","value":"Overnatning"},{"displayname":"German","locale":"de","value":"Übernachtung"},{"displayname":"English","locale":"en","value":"Accommodation"},{"displayname":"Spanish","locale":"es","value":"Alojamiento"},{"displayname":"French","locale":"fr","value":"Hébergement"},{"displayname":"Italian","locale":"it","value":"Pernottamento"},{"displayname":"Dutch","locale":"nl","value":"Overnachting"},{"displayname":"Norwegian","locale":"no","value":"Overnatting"},{"displayname":"Polish","locale":"pl","value":"Zakwaterowanie"},{"displayname":"Portuguese","locale":"pt-br","value":"Hospedagem"},{"displayname":"Russian","locale":"ru","value":"Размещение"},{"displayname":"Swedish","locale":"sv","value":"Övernattning"},{"displayname":"Chinese","locale":"zh","value":"住宿"}],"amenitytabid":1095,"sortorder":2,"groups":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Hotelfaciliteter"},{"displayname":"German","locale":"de","value":"Hoteleinrichtungen"},{"displayname":"English","locale":"en","value":"Hotel facilities"},{"displayname":"Spanish","locale":"es","value":"Instalaciones hoteleras"},{"displayname":"French","locale":"fr","value":"Services d'hôtel"},{"displayname":"Italian","locale":"it","value":"Strutture alberghiere"},{"displayname":"Dutch","locale":"nl","value":"Hotel voorzieningen"},{"displayname":"Norwegian","locale":"no","value":"Hotellfasiliteter"},{"displayname":"Polish","locale":"pl","value":"Wyposażenie hotelu"},{"displayname":"Portuguese","locale":"pt-br","value":"Instalações do hotel"},{"displayname":"Russian","locale":"ru","value":"Гостиничные услуги"},{"displayname":"Swedish","locale":"sv","value":"Hotellfaciliteter"},{"displayname":"Chinese","locale":"zh","value":"酒店"}],"amenitytabid":1095,"sortorder":22,"amenitygroupname":"Hotel facilities","amenitygroupid":494,"fields":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Bar"},{"displayname":"German","locale":"de","value":"Bar"},{"displayname":"English","locale":"en","value":"Bar"},{"displayname":"Spanish","locale":"es","value":"Bar"},{"displayname":"French","locale":"fr","value":"Bar"},{"displayname":"Italian","locale":"it","value":"Bar"},{"displayname":"Dutch","locale":"nl","value":"Bar"},{"displayname":"Norwegian","locale":"no","value":"Bar"},{"displayname":"Polish","locale":"pl","value":"Bar"},{"displayname":"Russian","locale":"ru","value":"Бар"},{"displayname":"Swedish","locale":"sv","value":"Bar"}],"sortorder":2,"label":"Bar","amenitygroupid":494,"tabshortname":"accomodation","amenitytabid":1095,"fieldtype":"Yes/No","numeric":false,"shortname":"bar_1095_494","array":false,"fieldid":5064,"typeid":11,"uniquename":"accomodation_bar_1095_494","doc":{"tabshortname":"accomodation","amenitytabid":1095,"value":"true","label":"Bar","shortname":"bar_1095_494","amenitygroupid":494,"digits":0,"fieldid":5064,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"accomodation_bar_1095_494"}},{"altlabels":[{"displayname":"Danish","locale":"da","value":"Konferencefaciliteter"},{"displayname":"German","locale":"de","value":"Konferenzeinrichtungen"},{"displayname":"English","locale":"en","value":"Conference facilities"},{"displayname":"Spanish","locale":"es","value":"Instalaciones para conferencias"},{"displayname":"French","locale":"fr","value":"Équipement de conférence"},{"displayname":"Italian","locale":"it","value":"Strutture per conferenze"},{"displayname":"Dutch","locale":"nl","value":"Vergaderfaciliteiten"},{"displayname":"Norwegian","locale":"no","value":"Konferansefaciliteter"},{"displayname":"Polish","locale":"pl","value":"Wyposażenie sal konferencyjnych"},{"displayname":"Portuguese","locale":"pt-br","value":"Instalações para conferências"},{"displayname":"Russian","locale":"ru","value":"Обслуживание конференции"},{"displayname":"Swedish","locale":"sv","value":"Konferensanläggningar"},{"displayname":"Chinese","locale":"zh","value":"会议设施"}],"sortorder":8,"label":"Conference facilities","amenitygroupid":494,"tabshortname":"accomodation","amenitytabid":1095,"fieldtype":"Yes/No","numeric":false,"shortname":"conferencefacilities_1095_494","array":false,"fieldid":5070,"typeid":11,"uniquename":"accomodation_conferencefacilities_1095_494","doc":{"tabshortname":"accomodation","amenitytabid":1095,"value":"true","label":"Conference facilities","shortname":"conferencefacilities_1095_494","amenitygroupid":494,"digits":0,"fieldid":5070,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"accomodation_conferencefacilities_1095_494"}},{"altlabels":[{"displayname":"Danish","locale":"da","value":"Familievenligt"},{"displayname":"German","locale":"de","value":"Familienfreundlich"},{"displayname":"English","locale":"en","value":"Family-friendly"},{"displayname":"Spanish","locale":"es","value":"Ideal para familias"},{"displayname":"French","locale":"fr","value":"Convient aux familles"},{"displayname":"Italian","locale":"it","value":"Adatto alle famiglie"},{"displayname":"Dutch","locale":"nl","value":"Gezinsvriendelijk"},{"displayname":"Norwegian","locale":"no","value":"Familievennlig"},{"displayname":"Polish","locale":"pl","value":"Przyjazne rodzinom"},{"displayname":"Russian","locale":"ru","value":"Для семей"},{"displayname":"Swedish","locale":"sv","value":"Familjevänlig"}],"sortorder":11,"label":"Family friendly","amenitygroupid":494,"tabshortname":"accomodation","amenitytabid":1095,"fieldtype":"Yes/No","numeric":false,"shortname":"familyfriendly_1095_494","array":false,"fieldid":5073,"typeid":11,"uniquename":"accomodation_familyfriendly_1095_494","doc":{"tabshortname":"accomodation","amenitytabid":1095,"value":"true","label":"Family friendly","shortname":"familyfriendly_1095_494","amenitygroupid":494,"digits":0,"fieldid":5073,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"accomodation_familyfriendly_1095_494"}}],"hasDoc":[true,true,true]}]},{"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":"planyourtrip","amenitytabname":"Plan Your Trip","altlabels":[{"displayname":"Danish","locale":"da","value":"Planlæg rejsen"},{"displayname":"German","locale":"de","value":"Planen Sie Ihre Reise"},{"displayname":"English","locale":"en","value":"Plan Your Trip"},{"displayname":"Spanish","locale":"es","value":"Planifica tu viaje"},{"displayname":"French","locale":"fr","value":"Planifiez votre voyage"},{"displayname":"Italian","locale":"it","value":"Pianifica il viaggio"},{"displayname":"Dutch","locale":"nl","value":"Plan je reis"},{"displayname":"Norwegian","locale":"no","value":"Planlegg reisen"},{"displayname":"Polish","locale":"pl","value":"Zaplanuj swoją podróż"},{"displayname":"Portuguese","locale":"pt-br","value":"Planeje sua viagem"},{"displayname":"Russian","locale":"ru","value":"Планирование путешествия"},{"displayname":"Swedish","locale":"sv","value":"Planera din resa"},{"displayname":"Chinese","locale":"zh","value":"规划行程"}],"amenitytabid":1099,"sortorder":4,"groups":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Tjenester"},{"displayname":"German","locale":"de","value":"Services"},{"displayname":"English","locale":"en","value":"Services"},{"displayname":"Spanish","locale":"es","value":"Servicios"},{"displayname":"French","locale":"fr","value":"Services"},{"displayname":"Italian","locale":"it","value":"Servizi"},{"displayname":"Dutch","locale":"nl","value":"Services"},{"displayname":"Norwegian","locale":"no","value":"Tjenester"},{"displayname":"Polish","locale":"pl","value":"Usługi"},{"displayname":"Portuguese","locale":"pt-br","value":"Serviços"},{"displayname":"Russian","locale":"ru","value":"Услуги"},{"displayname":"Swedish","locale":"sv","value":"Servicios"},{"displayname":"Chinese","locale":"zh","value":"服务"}],"amenitytabid":1099,"sortorder":33,"amenitygroupname":"Services","amenitygroupid":521,"fields":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Familievenligt"},{"displayname":"German","locale":"de","value":"Familienfreundlich"},{"displayname":"English","locale":"en","value":"Family-friendly"},{"displayname":"Spanish","locale":"es","value":"Ideal para familias"},{"displayname":"French","locale":"fr","value":"Convient aux familles"},{"displayname":"Italian","locale":"it","value":"Adatto alle famiglie"},{"displayname":"Dutch","locale":"nl","value":"Gezinsvriendelijk"},{"displayname":"Norwegian","locale":"no","value":"Familievennlig"},{"displayname":"Polish","locale":"pl","value":"Przyjazne rodzinom"},{"displayname":"Russian","locale":"ru","value":"Для семей"},{"displayname":"Swedish","locale":"sv","value":"Familjevänlig"}],"sortorder":2,"label":"Family friendly","amenitygroupid":521,"tabshortname":"planyourtrip","amenitytabid":1099,"fieldtype":"Yes/No","numeric":false,"shortname":"familyfriendly_1099_521","array":false,"fieldid":5287,"typeid":11,"uniquename":"planyourtrip_familyfriendly_1099_521","doc":{"tabshortname":"planyourtrip","amenitytabid":1099,"value":"true","label":"Family friendly","shortname":"familyfriendly_1099_521","amenitygroupid":521,"digits":0,"fieldid":5287,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"planyourtrip_familyfriendly_1099_521"}},{"altlabels":[{"displayname":"Danish","locale":"da","value":"WiFi"},{"displayname":"German","locale":"de","value":"WLAN"},{"displayname":"English","locale":"en","value":"WiFi"},{"displayname":"Spanish","locale":"es","value":"WiFi"},{"displayname":"French","locale":"fr","value":"Wi-Fi"},{"displayname":"Italian","locale":"it","value":"WiFi"},{"displayname":"Dutch","locale":"nl","value":"WiFi"},{"displayname":"Norwegian","locale":"no","value":"WiFi"},{"displayname":"Polish","locale":"pl","value":"WiFi"},{"displayname":"Russian","locale":"ru","value":"Wi-Fi"},{"displayname":"Swedish","locale":"sv","value":"WiFi"}],"sortorder":7,"label":"Wifi","amenitygroupid":521,"tabshortname":"planyourtrip","amenitytabid":1099,"fieldtype":"Yes/No","numeric":false,"shortname":"wifi_1099_521","array":false,"fieldid":5292,"typeid":11,"uniquename":"planyourtrip_wifi_1099_521","doc":{"tabshortname":"planyourtrip","amenitytabid":1099,"value":"true","label":"Wifi","shortname":"wifi_1099_521","amenitygroupid":521,"digits":0,"fieldid":5292,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"planyourtrip_wifi_1099_521"}}],"hasDoc":[true,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":"Forlystelsesparker"},{"displayname":"German","locale":"de","value":"Freizeitparks"},{"displayname":"English","locale":"en","value":"Theme park"},{"displayname":"Spanish","locale":"es","value":"Parques temáticos"},{"displayname":"French","locale":"fr","value":"Parcs d'attractions"},{"displayname":"Italian","locale":"it","value":"Parchi divertimento"},{"displayname":"Dutch","locale":"nl","value":"Pretparken"},{"displayname":"Norwegian","locale":"no","value":"Fornøyelsesparker"},{"displayname":"Polish","locale":"pl","value":"Parki rozrywki"},{"displayname":"Portuguese","locale":"pt-br","value":"Parques temáticos"},{"displayname":"Russian","locale":"ru","value":"Тематические парки"},{"displayname":"Swedish","locale":"sv","value":"Temaparker"},{"displayname":"Chinese","locale":"zh","value":"主题公园"}],"amenitytabid":1101,"sortorder":37,"amenitygroupname":"Theme park","amenitygroupid":530,"fields":[{"altlabels":[{"displayname":"Danish","locale":"da","value":"Familievenligt"},{"displayname":"German","locale":"de","value":"Familienfreundlich"},{"displayname":"English","locale":"en","value":"Family-friendly"},{"displayname":"Spanish","locale":"es","value":"Ideal para familias"},{"displayname":"French","locale":"fr","value":"Convient aux familles"},{"displayname":"Italian","locale":"it","value":"Adatto alle famiglie"},{"displayname":"Dutch","locale":"nl","value":"Gezinsvriendelijk"},{"displayname":"Norwegian","locale":"no","value":"Familievennlig"},{"displayname":"Polish","locale":"pl","value":"Przyjazne rodzinom"},{"displayname":"Russian","locale":"ru","value":"Для семей"},{"displayname":"Swedish","locale":"sv","value":"Familjevänlig"}],"sortorder":3,"label":"Family friendly","amenitygroupid":530,"tabshortname":"thingstodo","amenitytabid":1101,"fieldtype":"Yes/No","numeric":false,"shortname":"familyfriendly_1101_530","array":false,"fieldid":5351,"typeid":11,"uniquename":"thingstodo_familyfriendly_1101_530","doc":{"tabshortname":"thingstodo","amenitytabid":1101,"value":"true","label":"Family friendly","shortname":"familyfriendly_1101_530","amenitygroupid":530,"digits":0,"fieldid":5351,"typeid":11,"type":"Yes/No","value_raw":true,"value_string":"Yes","uniquename":"thingstodo_familyfriendly_1101_530"}}],"hasDoc":[true]}]}],"locale_items":[{"_id":"5786cda8daaef928fddd9077","recid":7406,"locale_code":"en","title":"Furrehytter","sites":["primary","cn","dk","fr","it","nl","pl","ru","se","br"],"primary_site":"primary","id":"5786cda8daaef928fddd9077","detailURL":"/listings/furrehytter/7406/","genericUrl":"/listings/furrehytter/7406/","url":"/listings/furrehytter/7406/","absolute_url":"https://www.visitnorway.no/listings/furrehytter/7406/","absolute_primary_url":"https://www.visitnorway.com/listings/furrehytter/7406/","isListing":true,"hasTripAdvisor":false,"hasYelp":false},{"_id":"5786d3ccdaaef928fddde9a2","recid":36094,"locale_code":"de","title":"Furrehytter","sites":["de"],"primary_site":"de","id":"5786d3ccdaaef928fddde9a2","detailURL":"/listings/furrehytter/36094/","genericUrl":"/listings/furrehytter/36094/","url":"/listings/furrehytter/36094/","absolute_url":"https://www.visitnorway.no/listings/furrehytter/36094/","absolute_primary_url":"https://www.visitnorway.de/listings/furrehytter/36094/","isListing":true,"hasTripAdvisor":false,"hasYelp":false},{"_id":"5786d63ddaaef928fdde0cb8","recid":48640,"locale_code":"es","title":"Furrehytter","sites":["es"],"primary_site":"es","id":"5786d63ddaaef928fdde0cb8","detailURL":"/listings/furrehytter/48640/","genericUrl":"/listings/furrehytter/48640/","url":"/listings/furrehytter/48640/","absolute_url":"https://www.visitnorway.no/listings/furrehytter/48640/","absolute_primary_url":"https://www.visitnorway.es/listings/furrehytter/48640/","isListing":true,"hasTripAdvisor":false,"hasYelp":false}],"id":"5786d0b0daaef928fdddba2f","detailURL":"/listings/furrehytter/20764/","genericUrl":"/listings/furrehytter/20764/","url":"/listings/furrehytter/20764/","absolute_url":"https://www.visitnorway.no/listings/furrehytter/20764/","absolute_primary_url":"https://www.visitnorway.no/listings/furrehytter/20764/","isListing":true,"longitude":5.80837,"latitude":59.26098,"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. if(data.media[0].mediatype === "Image"){ var primaryImageHTML = goatee.fill(primaryImageTemplate, { media : data.media[0] }); var galleryImages = data.media.slice(1); } else { // @T299824 If first mediatype is not 'Image' => leave primaryImage blank and send all media items to gallery var primaryImageHTML = ''; var galleryImages = data.media; } primaryImageContainer.replaceWith(primaryImageHTML); var galleryHTML = goatee.fill(galleryTemplate, { media : galleryImages, 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) { //@T248901 updating selector to target the slider used for images only var $slider = $('[data-sv-slider]').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 } } ] }); // @T248901 init video slider if detail page has both images and videos // @T287919 - remove videos if we're on the Chinese site if(site.site !== 'cn' && $('[data-sv-videoslider]').length){ require(["plugins_nav_custom_youtube_iframe_api"], function(youtube_iframe_api) { var $videoSlider = $('[data-sv-videoslider]').find('.slides'); var $videos = $videoSlider.find('[data-sv-video]'); // @T248901 show prev/next arrows for sliders w/ multiple videos if(galCount > 1) { $videoSlider.find(".arrows").removeClass("hide"); } // build array of youtube player objects var youtube_players = []; $videos.each(function(i, vid){ if(vid.src.indexOf('youtube') != -1){ youtube_players.push(new youtube_iframe_api.Player($(vid).get(0))); } }); // @T248901 iterate over all youtube player object -- pause active youtube videos var pauseActiveVideo = function(){ youtube_players.forEach(function(ytVideo){ if(ytVideo.getPlayerState !== undefined && ytVideo.getPlayerState() === 1){ ytVideo.pauseVideo(); } }); } $videoSlider.slick({ prevArrow: galleryParent.find(".prevVideoSlide"), nextArrow: galleryParent.find(".nextVideoSlide"), 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 } } ] }); // @T248901 fix to start videoslider on first slide $videoSlider.slick('slickGoTo', 0); //init dot events for image slider after videoslider inits $slider.slick('initDotEvents'); /* T248901 handle Photo / Video tab clicks */ galleryParent.on('click', '[data-sv-slidertab]', function(e){ if($(this).hasClass('is-active')){ return false // prevent active button clicks } else { // toggle active button styling $(this).siblings().removeClass('is-active'); $(this).addClass('is-active'); // pause active videos when switching tabs if(galleryParent.hasClass('showVideos')){ pauseActiveVideo(); $slider.slick('initDotEvents'); } else { //set video slider to first video in slider and init dot events $videoSlider.slick('slickGoTo', 0); $videoSlider.slick('initDotEvents'); } galleryParent.toggleClass('showVideos'); } }); }); } } 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, zoomControlOptions: { position: google.maps.ControlPosition.LEFT_BOTTOM }, 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; }); //@T251044 - "Click to Activate" element var $mapMessage = root.find('[data-map-message]'); //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 }); $mapMessage.addClass('active'); } else { mapOptions.setOptions({ scrollwheel: true, draggable : true }); $mapMessage.removeClass('active'); } }); 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: 6, 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 forecast = []; var measure = site.site === "us" ? "F" : "C"; var forecastData = res.data.forecast.slice(1, 6); forecastData.forEach(function(day){ forecast.push({ 'iconsrc' : '/includes/client_public/weather-black/' + day.condition.yahoo + '.svg', 'temp' : Math.round((day.low + day.high)/2) + '° ' + measure, 'text': day.condition.text, 'date': moment(day.date).format('dddd') }); }); var weatherTemplate = root.find("[data-sv-weatherTemplate]").html(); var weatherHTML = goatee.fill(weatherTemplate, { current: { iconsrc : '/includes/client_public/weather-black/' + current.condition.yahoo + '.svg', temp : current.temp + '° ' + unit, }, forecast: forecast }); root.find('[data-sv-detailWeatherContainer]').html(weatherHTML); //show weather tab when data is available root.find('.weatherTab').addClass('loaded'); $(document).trigger('translate'); }); } createWeather(); function initHowToGetHere () { 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 directionsService = new google.maps.DirectionsService(); var directionsDisplay = new google.maps.DirectionsRenderer(); var infowindow = new google.maps.InfoWindow(); 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) { var icon = { url: result.icon, size: new google.maps.Size(71, 71), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(17, 34), scaledSize: new google.maps.Size(25, 25) }; parsed_results[type].push({ name : result.name, icon : icon, id: result.id, lat: result.geometry.location.lat(), lng: result.geometry.location.lng(), distance : new geodist({ start : {lat : data.latitude, lng : data.longitude}, end : {lat : result.geometry.location.lat(), lng : result.geometry.location.lng()} }).format({ unit: distance_unit }) + ' ' + distance_unit }); } } }); }); /***@T235931 - Add transit map markers and draw route /* between transit location and destination ****/ var markers = []; function addMarker(id){ var target = results.filter(function(obj){ return obj.id === id; }); var icon = { url: target[0].icon, size: new google.maps.Size(71, 71), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(17, 34), scaledSize: new google.maps.Size(25, 25) }; markers.push(new google.maps.Marker({ map: map._map, icon: icon, title: target[0].name, position: target[0].geometry.location, })); } // Sets the map on all markers in the array. function setMapOnAll(map) { for (var i = 0; i < markers.length; i++) { markers[i].setMap(map); } } // Removes the markers from the map, but keeps them in the array. function clearMarkers() { setMapOnAll(null); } function drawRoute(start){ directionsDisplay.setMap(null); var end = new google.maps.LatLng(data.latitude, data.longitude); var bounds = new google.maps.LatLngBounds(); bounds.extend(start); bounds.extend(end); map._map.fitBounds(bounds); var request = { origin: start, destination: end, travelMode: google.maps.TravelMode.TRANSIT }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); directionsDisplay.setMap(map._map); directionsDisplay.setOptions( { suppressMarkers: true } ); } else { //if no route exists between transit location and destination //marker is placed, no line is drawn } }); } var howToGetHereTemplate = root.find('[data-sv-how-to-get-here-template]').html(); var howToGetHereContainer = root.find('[data-sv-how-to-get-here-container]'); var howToGetHereHTML = goatee.fill(howToGetHereTemplate, parsed_results); howToGetHereContainer.html(howToGetHereHTML); //show 'How To Get Here' link when data is available root.find('[data-how-to-link]').addClass('loaded'); $(document).trigger('translate'); } /* @T235931 How To Get Here: click a place name to show the marker and directions on the map */ $('[data-sv-how-to-get-here-container]').on('click', 'a', function (e) { e.preventDefault(); e.stopPropagation(); $('[data-map-view-link]').trigger('click'); var id = $(this).attr('data-place-id'); var start = new google.maps.LatLng($(this).attr('data-latitude'), $(this).attr('data-longitude')); if(window.innerWidth < 640){ var url = 'https://maps.google.com/?saddr=' + latitude + ',' + longitude + '&daddr=' + $(this).attr('data-latitude') + ',' + $(this).attr('data-longitude'); window.open(url, "_blank") } else { clearMarkers(); addMarker(id); drawRoute(start); $('[data-how-to-link]').removeClass('active'); // scroll to the top of the map (useful on tablet/mobile when the dropdowns are below the map) $('html,body').animate({ scrollTop: root.find('.detailMaps').offset().top - 75 }, 1000); } }); }); }); } // T254599 - disabled how to get here for now // initHowToGetHere(); /* @T235931 -- hide dropdowns when user clicks elsewhere */ root.on('click', function (click) { $('[data-how-to-link]').removeClass('active'); $('[data-weather-link]').removeClass('active'); }); /* @T235931 -- Handle Map Tab Click Events */ root.find('.mapTabs > li').on('click', function(e){ e.preventDefault(); e.stopPropagation(); $(this).siblings().removeClass('active'); $(this).toggleClass('active'); }); } 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"); // @T235931 Change placement and function of map dropdowns for tablet and mobile function placeMapDropdowns() { var mapTabs = root.find('.mapTabs'); var footerTab = root.find('.tabFooter'); if(window.innerWidth <= 1024){ $(footerTab).appendTo("#maps"); } else { $(footerTab).appendTo(mapTabs); } } placeMapDropdowns(); $(window).on('resize', function() { placeMapDropdowns(); }); });
Your Recently Viewed Pages
Ad
Ad
Ad