$(function() {
var searchTrigger;
eviivo.availabilitySearch.init({
isDefaultReferrer: true,
defaultNightsServiced: 0,
roomsLimit: 8,
cultureLanguageCode: "",
baseSearchUrl: "/rooms",
resources:
{
adults: "Adulte(s)",
children: "Enfants",
rooms: "Chambres",
room: "Chambre",
roomAdded: "ajout de {0} Chambre",
roomsAdded: "ajout de {0} Chambres"
}
});
searchTrigger = eviivo.availabilitySearch.triggerSearch;
eviivo.smoothScrolling.init();
eviivo.popup.init();
eviivo.imageMainGallery.init({
initializeGalleryByDefault: true,
initializeGalleryOnClick: false,
initializeGalleryForRooms: true,
});
var showMapByDefault = false;
//enable jquery UI tooltip (only for specific targeted cp-tip items)
$(".cp-tip").tooltip({
position: {
my: "center bottom-15",
at: "center top",
using: function (position, feedback) {
$(this).css(position);
$("")
.addClass("arrow")
.addClass(feedback.vertical)
.addClass(feedback.horizontal)
.appendTo(this);
}
},
content: function (){
return $(this).prop('title');
}
});
//Accordion
$(".accordion a.accordion-toggle").on("click", function () {
$(this).siblings(".accordion-content").slideToggle("slow");
$(this).parent().toggleClass("active");
});
//Accordion rooms needs to be moved to separate js file
$(".accordion-rooms a.accordion-rooms-toggle").on("click", function () {
if ($(".main").hasClass("instantweb")) {
$(this).parent().siblings(".intro-description").slideToggle("slow");
}
$(this).siblings(".accordion").slideToggle("slow");
$(this).parent().toggleClass("expanded");
var textDefault = "Plus d'infos";
var textExpanded = "Moins d'info...";
$(this).text(function (i, text) {
return text === textExpanded ? textDefault : textExpanded;
});
});
// Close error/notice box
var $closeControl = $(".cp-close");
$closeControl.on("click", function () {
$(this).parent().parent().hide();
});
eviivo.stickyContainer.init({
resources: {
room: "Chambre",
found: "en réponse"
}
});
$('#accept-cookies').on("click", function () {
var currentCookieSession = Cookies.get('userSettings');
Cookies.set('userSettings', currentCookieSession.concat('&' + 'cookienotification' + '=accepted'), { expires: 3650 });
$('.cookiebar').remove();
});
$.widget("custom.iconselectmenu", $.ui.selectmenu, {
_renderItem: function (ul, item) {
var li = $("
", { text: item.label });
if (item.disabled) {
li.addClass("ui-state-disabled");
}
$("", {
style: item.element.attr("data-style"),
"class": "ui-icon " + item.element.attr("data-class")
})
.appendTo(li);
return li.appendTo(ul);
}
});
//Let stry to disabled zooming for mobile screens
if (/iphone|ipod|android|blackberry|opera mini|opera mobi|skyfire|maemo|windows phone|palm|iemobile|symbian|symbianos|fennec/i.test(navigator.userAgent.toLowerCase())) {
$("meta[name='viewport']").attr("content", "width=device-width, initial-scale=1.0, maximum-scale=1.0");
}
eviivo.bookingSystem.managePageLogin.init({
popupHeaderTitle: "Gérer votre réservation",
ajaxUrl: "/instantweb/manage/RetrieveOrderCancellationPermissions",
referrerShortName: "MyWeb",
propertyShortName: "theoak_cv83au",
requestVerificationToken: "76tzAz-iQpaj8ddZemrBcOGbSKTQ6cxbonKSq40o0QMuEHyo4tEBI-xus4FE5XloP0UXL4v9rvBTuNkmU2sf1UMcN1g1:RDcKZyws258sQuJLoLcfP3tZhh_Bb9m9xh3zkLkXXTbvMW9QOri08oGoChqsimVYHf-iLsS_1xtxx8hbQbgF4deQQRE1",
ajaxLoaderResources: {
loadingUpdateResults: "Nous vérifions votre numéro de réservation et votre adresse e-mail...",
loadingSlowSystemWarning: "Merci de votre patience... nous recherchons votre réservation pour l'annuler.",
loadingRefreshingIssueWarning: "Une erreur est intervenue! Merci de cliquer sur",
ajaxFailText: "Il y a une erreur, merci d'essayer de",
refreshPageText: "relancer la page"
}
});
eviivo.bookingFlow.init();
eviivo.mapView.init({
googleMapsApiUrl: "//maps.googleapis.com/maps/api/js?key=AIzaSyCtPYb_pV8h_-HxZJIEJ_pJBuPel7LUz5s&v=3&callback=",
lat: "52.366810",
lng: "-1.491750",
resources: {
switchToMap: "Voir la carte",
switchToImage: "Voir les photos"
},
showMapByDefault: showMapByDefault
});
window.eviivo.instantWebMenu.init();
});