var common=new Object;common.$windowH,common.$windowW,common.$documentW,common.$windowInnerWidth,common.$fullHeight,common.$windowW_actual,common.activSECTION,common.IN_VIEW="accueil",common.smooth,common.disableSECTIONS=!1,common.$sections=$("._section"),common.waypoint,common.movePlaceSection=!1,common.placeSECTION=function(){},common.goTOP=function(){TweenMax.to($("html,body"),.6,{scrollTop:0,ease:Cubic.easeOut})},common.newsletter_height,common.newsletter_pos,common.fullH,common.init=function(){common.forms(),cookies.init(),common.deleteObj(),common.newsletter_height=$(".__ophorus_newsletter").height(),common.newsletter_pos=$(".__ophorus_newsletter").offset(),$(document).on("click",".__close_newsletter",function(){common.newsletter_pos=$(".__ophorus_newsletter").offset(),gsap.to(".__ophorus_newsletter",{height:0,duration:.6,ease:Cubic.easeOut})}),$(document).on("click","._open_newsletter",function(){gsap.to(".__ophorus_newsletter",{height:"auto",duration:.6,onComplete:function(){console.log(common.$windowH+" > "+$(document).height()+" > "+$(".__ophorus_newsletter").offset().top);document.getElementById("__newsletter");gsap.to(window,{scrollTo:{y:common.newsletter_pos.top-70},duration:1.2,ease:Expo.easeOut})}})}),common.getWINDOW();document.querySelector("._wrapper");$(window).on("debouncedresize",function(){common.getWINDOW()}),!1===common.disableSECTIONS&&($("._section").waypoint(function(e){"down"===e&&!1===common.movePlaceSection&&(common.activSECTION=$(this.element).data("section"),common.activSECTION!=common.IN_VIEW&&common.section($(this.element).data("nav"),"down"))},{offset:"55%"}),$("._section").waypoint(function(e){"up"===e&&!1===common.movePlaceSection&&(common.activSECTION=$(this.element).data("section"),common.activSECTION!=common.IN_VIEW&&common.section($(this.element).data("nav"),"up"))},{offset:function(){return Waypoint.viewportHeight()/2-$(this)[0].element.offsetHeight}}))},common.forms=function(){0<$("button._quantity").length&&$("button._quantity._minus").each(function(e){var t=$(this).data("op"),t=$("input[data-op="+t+"]").val();0===parseInt(t)&&$(this).addClass("_disabled").attr("disabled","disabled")}),$(document).on("click","button._quantity",function(){var e=$(this).hasClass("_extra"),t=1,a=product.maxQuantity;!1===e&&(t=product.minQuantity);var o=$(this).data("op"),n=parseInt($("input[data-op="+o+"]").val(),10),n=isNaN(n)?0:n;$(this).hasClass("_plus")?!1===e?0<$("input[name=force_min]").length&&0===n?n=t:n++:a<=n+1?n=a:n++:!1===e?(n<1&&(n=1),0<$("input[name=force_min_pers]").length?($("button._minus._book"),0<$("input[name=force_min]").length&&n==parseInt(t)?n=t:n--):0<$("input[name=force_min]").length&&n==t?n=0:n--):n--,$("input[data-op="+o+"]").val(n),!1===e?!(0<$("input[name=force_min_pers]").length&&n===parseInt(t))&&0<n?$("button._minus[data-op="+o+"]").removeClass("_disabled").removeAttr("disabled"):$("button._minus[data-op="+o+"]").addClass("_disabled").attr("disabled","disabled"):0<n?$("button._minus[data-op="+o+"]").removeClass("_disabled").removeAttr("disabled"):$("button._minus[data-op="+o+"]").addClass("_disabled").attr("disabled","disabled"),$(this).hasClass("_book")&&product.getPrice(),$(this).hasClass("_extra_from_product")&&product.checkExtras()})},common.deleteObj=function(){!0===mobile.state&&$("._col_contain_map").remove()},common.section=function(e,t){},common.adjustSECTION=function(e){e===common.IN_VIEW&&(scroll.destroy(),e="accueil"===e?0:$("._section[data-section="+e+"]").position().top-90,TweenMax.to($("html,body"),.6,{scrollTop:e,delay:.6,onComplete:function(){scroll.show()}}))},common.tracking=function(e,t){$.ajax({url:_SITE_URL+"recuperation-onglet",data:{slug:e},type:"POST",context:document.body}).done(function(e){return"empty"===e||(e=jQuery.parseJSON(e),window.history.replaceState(null,null,e.url),document.title=e.title),!1}).fail(function(){console.log("erreur de récuperation")})},common.getWINDOW=function(){common.$windowH=$(window).height(),common.$windowInnerHeight=$(window).innerHeight(),common.$fullHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),common.$windowW=$(window).width(),common.$documentW=$(document).width(),common.$windowInnerWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,common.$windowW_actual!=common.$windowW&&(common.$windowW_actual=common.$windowW)},common.trim=function(e,t){return e.length>t?e.substring(0,t)+" ...":e},common.disableDates=function(){if(""!=$("input[name=j_periode]").val())return $("input[name=j_periode]").val()},common.wichTransitionEvent=function(){var e,t=document.createElement("fakeelement"),a={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in a)if(void 0!==t.style[e])return a[e]},common.homeDISABLE=function(){$("._menu_link").removeClass("_activ_menu"),$(document).off("click","._ham"),$(document).off("click",".__button_nav"),$(document).off("click","._bl_menu > a, .__container_logo > a, .__nav_right > ul > li")},common.UnCryptMailto=function(e){for(var t=0,a="",o=0;o<e.length;o++)8364<=(t=e.charCodeAt(o))&&(t=128),a+=String.fromCharCode(t-1);return a};var menu={hideLOGO:!(common.getSize=function(){var e=common.$windowW,t=common.$windowH;1!=$("body").hasClass("_is_robot")&&$.ajax({url:_SITE_URL+"get-screen-size",type:"post",data:{width:e,height:t},success:function(e){common.$windowW>=mobile.step&&!1===mobile.state&&$("body").hasClass("_is_mobile")&&($("header").css("opacity",0),location.reload()),common.$windowW<=mobile.step&&!0===mobile.state&&1!=$("body").hasClass("_is_mobile")&&($("header").css("opacity",0),location.reload()),(common.$windowW<=mobile.step&&!1===mobile.state||common.$windowW>mobile.step&&!0===mobile.state)&&($("header").css("opacity",0),location.reload())}})}),OPEN:!1,name:"",anchor:""};menu.show_logoTM=new TimelineLite,menu.animMENU=new TimelineLite,menu.LOADED=!1,menu.search=!1,menu.init=function(){$(window).on("blur",function(){menu.closeSub()}),$(window).on("click",function(){event.target.matches(".__module_search, .__module_search * ,._desktop, ._desktop *")||menu.closeSub()}),$(document).on("click","._close_modal,._background_modal",function(e){$(".__modal").removeClass("_show"),$("html,body").css("overflow","auto").removeClass("_overflow")}),$(document).on("click","._ham_mobile",function(){menu.showMENU()}),$(document).on("click","._search",function(){!0===mobile.state&&$(this).toggleClass("_opened"),$(".__module_search").toggleClass("_open_search"),$(this).toggleClass("_cancel_search"),mobile.loadDestinations()}),$(document).on("click","._cancel_search",function(){$(".__module_search").removeClass("_open_search"),$("._search").removeClass("_cancel_search")}),$(document).on("click",".__ss_menus_mobile > .__menus > ul > li",function(){var e=$(this).data("menu");"undefined"!=e&&menu.showMOBILEssMENU(e)}),$(document).on("click","._back_ss_menu",function(){menu.closeMOBILEssMENU()}),$(window).on("scroll",function(){menu.onScroll()}),$(document).on("mouseover","nav > ul > li[data-ss] > span",function(){var e=$(this).parent().data("ss");$(".--ss_menu").css("display","block"),$(".__header").addClass("__open_sub"),$(".__contain_ss").css("display","none"),$(".__contain_ss[data-ss="+e+"]").css("display","block")}),$(document).on("mouseleave",".--ss_menu",menu.onMouseOut),$(document).on("click","._mobile_menu_level_p",function(){$(this).hasClass("_opened")?($("._mobile_menu_level_p").removeClass("_opened"),$(".ss_menu").css("display","none")):($("._mobile_menu_level_p").removeClass("_opened"),$(this).addClass("_opened"),$(".ss_menu").css("display","none"),$(this).next(".ss_menu").css("display","block"))}),$(document).on("click","._mobile_menu_level_p_2",function(){$(this).hasClass("_opened")?($("._mobile_menu_level_p_2").removeClass("_opened"),$(".ss_ssmenu").css("display","none")):($("._mobile_menu_level_p_2").removeClass("_opened"),$(this).addClass("_opened"),$(".ss_ssmenu").css("display","none"),$(this).next(".ss_ssmenu").css("display","block"))})},menu.closeSub=function(){!1===mobile.state&&(menu.search=!1,$(".__header").removeClass("__open_sub __open_modal"),$(".--ss_menu, .__contain_ss").css("display","none"),$(".__module_search").removeClass("_open_search"))},menu.onMouseOut=function(e){e=e.toElement||e.relatedTarget;(null===e||e.parentNode!=this&&e!=this&&"_contain"!=e.className)&&menu.closeSub()},menu.hideMENU=function(){!1===mobile.state?($(".__header").removeClass("__move_header").addClass("__hide_header"),$(".__nav_right").addClass("__hide_nav")):$(".__header").removeClass("__move_header").addClass("__hide_header_mobile")},menu.hideNAV=function(){$(".__nav_right").addClass("__hide_nav")},menu.showNAV=function(){$(".__nav_right").removeClass("__hide_nav")},menu.closeMOBILE=function(){},menu.showMENU=function(){$("._contain_ss_menus").hasClass("_open")?($("._contain_ss_menus").addClass("_close"),!1===product.activ&&Tawk_API.showWidget()):($("._contain_ss_menus").removeClass("_close"),Tawk_API.hideWidget()),$(".__header").toggleClass("_open_mobile"),$(".ham").toggleClass("active"),$("._contain_ss_menus").toggleClass("_open"),$("html,body").toggleClass("_overflow"),$("._contain_ss_menus").removeClass("_show_ss"),$(".__mobile_ss_menus").removeClass("_show_ss")},menu.closeMENU=function(){$("html,body").css("overflow","auto"),menu.OPEN=!1},menu.showMOBILEssMENU=function(e){null!=e&&($(".__mobile_ss_menus[data-menu!="+e+"]").removeClass("_show_ss"),$(".__mobile_ss_menus[data-menu="+e+"]").addClass("_show_ss"),$("._contain_ss_menus").addClass("_show_ss"))},menu.closeMOBILEssMENU=function(e){$(".__mobile_ss_menus").removeClass("_show_ss"),$("._contain_ss_menus").removeClass("_show_ss")},menu.onScroll=function(){menu.closeSub();var e=$(window).scrollTop();!1===mobile.state?(100<e&&!1===mobile.state?$("header").addClass("__move_header"):$("header").removeClass("__move_header"),!0===product.activ&&!1===mobile.state&&(e>product.header_height-60?($(".__product_nav,.__ophorus_product").addClass("__fixed"),!1===$(".__booking").hasClass("__bottom_open")&&(!0!==product.scanValidity&&!0!==product.moduleContact||((!0===product.valid||!0===product.moduleContact)&&!1===$(".__booking").hasClass("__block_open")?($(".__booking").addClass("__fixed __product_valid __show_bottom"),$(".--show_contain").removeClass("__force_open"),$(".--contain_options").slideUp(100)):$(".__booking").addClass("__fixed")))):($(".__product_nav,.__ophorus_product").removeClass("__fixed"),$(".__booking").removeClass("__fixed __show_bottom __bottom_open __force_open"),$(".--show_contain").removeClass("__force_open"),!0===product.scanValidity&&!0===product.valid&&$(".--contain_options").slideDown(100))),!0===cmd.activ&&!1===mobile.state&&(e>cmd.header_height-60?($("._ophorus_cmd_recap").addClass("__fixed"),1800<e&&$("._ophorus_cmd_recap").removeClass("__fixed")):e<cmd.header_height-60&&$("._ophorus_cmd_recap").removeClass("__fixed"))):$("._mobile").hasClass("--modal_menu")&&(100<e?($(".__menu_modal").addClass("_move_modal"),$("._mobile,.__module_search").addClass("_move_up")):($(".__menu_modal").removeClass("_move_modal"),$("._mobile,.__module_search").removeClass("_move_up")))},menu.select=function(){$(document).on("click",".__select_mobile_hublo",function(){var e,t=$(this);t.toggleClass("_open"),t.hasClass("_open")?(t.find(".__list_select").slideDown(300),e=t.offset().top-120,TweenMax.to($("html,body"),.6,{scrollTop:e,delay:.3,onComplete:function(){}})):t.find(".__list_select").slideUp(200)}),$(document).on("click",".__select_mobile_hublo > .__list_select > span",function(){$(this).parent().parent().find(".__first_entry").html($(this).html())}),$(document).on("mouseleave",".__select_mobile_hublo",function(){$(".__select_mobile_hublo").removeClass("_open").find(".__list_select").slideUp(0)}),$(document).on("scroll",function(){})},menu.openDESKTOP=function(){menu.animMENU.kill(),menu.animMENU=new TimelineLite,menu.animMENU.fromTo($(".__menus_desktop"),.8,{opacity:0,display:"none"},{opacity:1,display:"block"},.3),menu.animMENU.fromTo($(".__back_menu"),.6,{opacity:0,display:"none"},{opacity:1,display:"block"},0),!1===mobile.state?($("header").addClass("__move_top_open"),menu.animMENU.fromTo($(".__news"),.8,{opacity:0,y:"-=100"},{opacity:1,y:0,ease:Expo.easeOut},.4)):menu.animMENU.fromTo($(".__news"),.8,{opacity:0,y:"+=100"},{opacity:1,y:0,ease:Expo.easeOut},.6),600<common.$windowW&&menu.animMENU.fromTo($(".__background_menu"),1,{opacity:0},{opacity:.8},.6),menu.animMENU.staggerFromTo($("nav").find("ul > li"),.8,{opacity:0,y:150},{opacity:1,y:0,ease:Expo.easeOut},.02,.5)},menu.checkPos=function(){},menu.closeDESKTOP=function(){$("._ham_desktop > ._ham").removeClass("_open"),$("header").removeClass("__move_top_open"),menu.animMENU.kill(),menu.animMENU=new TimelineLite,menu.animMENU.to($(".__background_menu"),.6,{opacity:0},0),menu.animMENU.to($(".__back_menu"),.6,{opacity:0,display:"none"},.8),menu.animMENU.staggerTo($("nav").find("ul > li").get().reverse(),.6,{opacity:0,y:"+=300",ease:Expo.easeInOut},.04,.1),!1===mobile.state?menu.animMENU.to($(".__news"),1,{opacity:0,y:"-=100",ease:Expo.easeInOut},.1):menu.animMENU.to($(".__news"),1,{opacity:0,y:"+=200",ease:Expo.easeOut},.1),menu.animMENU.to($(".__menus_desktop"),.4,{opacity:0,display:"none"},.6)},menu.activBARBA=function(e){!0===e?$("._menu_link").removeClass("no-barba"):$("._menu_link").addClass("no-barba")};var results={search:""};(function(l){"use strict";l.fn.numericFlexboxSorting=function(e){var t=l.extend({elToSort:"._wrap_produit"},e),a=this,r=(e,t)=>e-t,c=(e,t)=>t-e;return a.on("change",()=>{var e=a.find("option:selected").attr("data-sort");!function(e,t){var a="data-"+t.split(":")[0],o=t.includes("asc")?r:c,n=t.includes("asc")?"":"-",i=l(e).map((e,t)=>l(t).attr(a)).sort(o);console.log(i);for(var s=0;s<i.length;s++)l(e).filter(`[${a}="${i[s]}"]`).css("order",n+i[s])}(t.elToSort,e)}),a}})(jQuery),$(".--sorting").numericFlexboxSorting(),results.init=function(){onglet.init(),0<$(".__results_container").length&&(results.search=!0),$(".__owl_destinations").owlCarousel({touchDrag:!0,responsive:{0:{items:1,stagePadding:30,dots:!1,autoplay:!1},600:{items:2,stagePadding:20,dots:!1,autoplay:!1},992:{items:3.3},1200:{items:3.5},1450:{items:5}},onInitialized:function(){$(".__owl_destinations").removeClass("_hide")}}),$(document).on("click",".__close-filter",function(){$(".__results_container").toggleClass("__close"),$(".__close-filter").toggleClass("__close")}),$("._less_cities").hide(),$(document).on("click","._more_cities",function(){$(this).hide(),$(".__dest_others").show(),$("._less_cities").show()}),$(document).on("click","._less_cities",function(){$(this).hide(),$("._more_cities").show(),$(".__dest_others").hide()}),$(document).on("click","._show_filters",function(){$(".__block_filtre").toggle(),$("._show_filters").toggleClass("_open"),$("html,body").toggleClass("_overflow"),$("._show_filters").hasClass("_open")?Tawk_API.hideWidget():Tawk_API.showWidget()}),$(document).on("click","._bl_sort",function(){$(this).hasClass("--sort-line")&&($(this).addClass("_activ"),$(".--sort-grid").removeClass("_activ"),$("._wrap_produit").addClass("_full"),$(".__bl_produit").addClass("_width"),$("input[name=produit_show]").val("_width")),$(this).hasClass("--sort-grid")&&($(this).addClass("_activ"),$(".--sort-line").removeClass("_activ"),$("._wrap_produit").removeClass("_full"),$(".__bl_produit").removeClass("_width"),$("input[name=produit_show]").val(" "))});var a=$(".__block_filter[data-block=destinations]");$(".--filter_region").each(function(){var e=$(this).val(),t=!0;1!=$(this).is(":checked")?t=!1:(a.removeClass("_close"),$(".--filter_destination[data-region="+e+"]").each(function(){$(this).prop("checked",!0)})),$(this).prop("checked",t)}),$(".--filter_destination").each(function(){var e=$(this).data("region"),t=!0;$(this).is(":checked")&&($(this).parent().parent().prependTo(a.find(".__dest_phares")),$(".--filter_destination[data-region="+e+"]").each(function(){1!=$(this).is(":checked")&&(t=!1)}),$(".--filter_region[value="+$(this).data("region")+"]").prop("checked",t),!0===t&&$(".__block_filter[data-block=regions]").removeClass("_close")),0===$(".__dest_others > li").length&&($("._less_cities").hide(),$("._more_cities").hide())}),$(document).on("click",".--filter_destination",function(){var e=$(this).data("region"),t=!0;$(".--filter_destination[data-region="+e+"]").each(function(){1!=$(this).is(":checked")&&(t=!1)}),$(".--filter_region[value="+$(this).data("region")+"]").prop("checked",t),!0===t&&$(".__block_filter[data-block=regions]").removeClass("_close")}),$(document).on("click",".--filter_region",function(){var e=$(this).val();$(this).is(":checked")?$(".--filter_destination[data-region="+e+"]").each(function(){$(this).prop("checked",!0)}):($(".--filter_destination[data-region="+e+"]").prop("checked",!1),$(".--filter_destination[data-region="+e+"]").each(function(){console.log($(this).data("type")),$(this).parent().parent().prependTo(a.find(".__dest_"+$(this).parent().parent().data("type")))})),$(".--filter_destination:checked").parent().parent().sort(results.sort).prependTo(a.find(".__dest_phares")),0===$(".__dest_others > li").length?($("._less_cities").hide(),$("._more_cities").hide()):($(".__dest_others").hide(),$("._more_cities").show(),$("._less_cities").hide())}),$(document).on("click",".--load_more_btn",function(){results.loadMore()}),$(document).on("click",".__block_filter > ._entete",function(){$(this).parent().toggleClass("_close")});var e=$("input[name=filter_date_deb]").val(),t=$("input[name=filter_date_end]").val(),e=""!=e&&""!=t?[e,t]:""!=e?e:"today";$("._calendar_results").flatpickr({altInput:!0,inline:!0,altFormat:"Y-m-d",mode:"range",dateFormat:"Y-m-d",locale:{firstDayOfWeek:1},minDate:"today",nextArrow:'<svg><use xlink:href="#__ic_arrow_fleche"/></svg>',prevArrow:'<svg class="_inverse"><use xlink:href="#__ic_arrow_fleche"/></svg>',defaultDate:e,onChange:function(e,t,a){2===e.length?($("input[name=filter_date_deb]").val(dayjs(e[0]).format("YYYY-MM-DD")),$("input[name=filter_date_end]").val(dayjs(e[1]).format("YYYY-MM-DD"))):(1===e.length?($("._calendar_search").val(t),$("input[name=filter_date_deb]").val(t)):$("input[name=filter_date_deb]").val(""),$("input[name=filter_date_end]").val(""))},onReady:function(e,t,a){a.calendarContainer.classList.add("calendarNormal")}})},results.sort=function(e,t){return $(t).data("name")<$(e).data("name")?1:-1},results.loadMore=function(){var e=$("input[name=produit_show]").val();$.ajax({url:_SITE_URL+"more-results",type:"post",data:{type_grille:e},success:function(e){e=jQuery.parseJSON(e);console.log(e.nb_inview+" et "+e.nb_total),e.nb_inview===e.nb_total&&$(".__load_more").hide(),$(".__results_products").append(e.products)}})};var home={};home.grid,home.slide_nb,home.dest_actual,home.owl,home.init=function(){!1===mobile.state&&(home.slide_nb=1,galerie.init(home.slide_nb,".slide_bg",".slide_infos",".__nav_slides > li",!0)),home.map(),home.lastminutes(),$(document).on("mouseover",".__bl_category",function(){$(".__background[data-cat!="+$(this).data("cat")+"]").removeClass("_show"),$(".__background[data-cat="+$(this).data("cat")+"]").addClass("_show")});var t=$(".__owl_categories");t.owlCarousel({loop:!0,autoplay:!0,mouseDrag:!1,touchDrag:!1,autoplayHoverPause:!0,autoplayTimeout:4e3,autoplaySpeed:1e3,responsive:{0:{items:2.3,autoplay:!1,touchDrag:!0},600:{items:3,touchDrag:!0},1e3:{items:4},1400:{items:5}}});var a=$(".__owl_destinations");a.owlCarousel({loop:!0,autoplay:!0,touchDrag:!0,autoplayHoverPause:!0,autoplayTimeout:3e3,autoplaySpeed:1500,responsive:{0:{items:1.2,stagePadding:7,dots:!1,autoplay:!1},600:{items:2.2,stagePadding:15,dots:!1,autoplay:!1},700:{items:2.3,stagePadding:5,dots:!1,autoplay:!1},992:{stagePadding:15,items:3},1200:{items:2,dots:!0,autoplay:!0},1400:{items:2.3},1650:{items:3.2}},onInitialized:function(){$(".__owl_destinations").removeClass("_hide")}}),a.on("drag.owl.carousel",function(e){a.trigger("stop.owl.autoplay")}),$(".__owl_team").owlCarousel({loop:!0,items:6,autoplay:!0,center:!0,mouseDrag:!1,touchDrag:!0,autoplayHoverPause:!0,autoplayTimeout:3e3,autoplaySpeed:1e3,responsive:{0:{items:2,dots:!1,autoplay:!1},600:{items:3,dots:!1,autoplay:!1},900:{items:4},1400:{items:5}}}),$(".__owl_partenaires").owlCarousel({loop:!0,items:6,lazyLoad:!0,autoplay:!0,mouseDrag:!1,touchDrag:!0,autoplayHoverPause:!0,autoplayTimeout:3e3,autoplaySpeed:1e3,responsive:{0:{items:2},400:{items:3},700:{items:4},900:{items:5},1200:{items:6},1500:{items:8}}});var e=$(".__popular_nav"),o=$(".__owl_produits"),n=$(".__owl_blog");$(".__owl_destinations,.__owl_partenaires,.__owl_categories,.__owl_team").each(function(){$(this).find(".owl-dot").each(function(e){$(this).attr("aria-label",e+1)})}),common.$windowW<768&&(e.owlCarousel({items:3,margin:5,stagePadding:20,autoWidth:!0,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,onInitialized:function(e){var t=$(e.target).find(".owl-stage").width();$(e.target).find(".owl-stage").css("width",t+30)}}),o.owlCarousel({margin:0,stagePadding:0,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,responsive:{0:{items:1,stagePadding:20},400:{items:1},600:{items:2,stagePadding:20}}}),n.owlCarousel({items:2,margin:5,stagePadding:5,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,responsive:{0:{stagePadding:0,items:1,margin:0},600:{items:1.3},700:{items:2}}})),$(window).on("blur",function(){$(".owl-carousel").trigger("stop.owl.autoplay")}),t.on("resized.owl.carousel",function(e){common.$windowW<500||t.owlCarousel({loop:!0,autoplay:!0,mouseDrag:!1,touchDrag:!1,autoplayHoverPause:!0,autoplayTimeout:4e3,autoplaySpeed:1e3,responsive:{0:{items:2},650:{items:2},1e3:{items:5}}})}),home.popular_destinations()},home.destinations=function(){var e=$(".__dest_line").find("li").height();$(".__dest_line").css("height",e),$(".__dest_line > ul").each(function(){var t=0;$(this).find("li").each(function(){var e=$(this).width();t+=e+80}),$(this).css("width",t+10)}),$(document).on("mouseover",".__dest",function(){var e=$(this)[0].getBoundingClientRect();0<e.x&&e.x+e.width<common.$windowW&&($(".__dest_line > ul ").addClass("_pause"),$(this).addClass("_hovered"),e=$(this).data("dest"),home.dest_actual!=e&&(home.dest_actual=e,$(".__sibling > ul > li").removeClass("_show"),$(".__sibling > ul > li[data-dest="+e+"]").addClass("_show")))}),$(document).on("mouseleave",".__dest",function(){$(".__dest").removeClass("_hovered"),$(".__dest_line > ul ").removeClass("_pause"),$(".__sibling > ul > li").removeClass("_show"),home.dest_actual=0}),$(document).on("click",".__dest",function(){$(this).addClass("_hovered_all"),$(".__dest_line > ul ").addClass("_pause_all");var e=$(this).data("dest");home.getDestination(e)}),$(document).on("click","._back_volet,._close_volet",function(){var e=$("._wrap_volet").width()+60;$(".__sibling > ul > li").removeClass("_show_all"),$(".__dest_line > ul ").removeClass("_pause_all"),$(".__dest").removeClass("_hovered_all"),gsap.to($(".__destination_volet"),.6,{x:"+="+e,display:"none",ease:Expo.easeOut})})},home.getDestination=function(t){$.ajax({url:_SITE_URL+"get-home-destinations",type:"post",data:{dest_id:t},beforeSend:function(){},success:function(e){"empty"!=e&&($(".__sibling > ul > li[data-dest="+t+"]").addClass("_show_all"),$("._contain_produits_destinations").html(e),$("._wrap_volet").css("display","flex"),e=$("._wrap_volet").width(),gsap.fromTo($(".__destination_volet"),.6,{x:"+="+e,display:"none",ease:Expo.easeOut},{x:0,display:"flex"}))}})},home.actualPopular,home.popular_destinations=function(){home.actualPopular=$("._popular_dest._activ").data("dest"),home.getPopular_destination(),$(document).on("click","._popular_dest",function(){var e=$(this).data("dest");e!=home.actualPopular&&($("._popular_dest").removeClass("_activ"),$(this).addClass("_activ"),home.actualPopular=e,home.getPopular_destination())})},home.swiper_last,home.owllast=function(){$(".__last_destinations").owlCarousel({items:3,margin:5,stagePadding:20,autoWidth:!0,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,onInitialized:function(e){var t=$(e.target).find(".owl-stage").width();$(e.target).find(".owl-stage").css("width",t+30)}})},home.lastminutes=function(){home.swiper_last=new Swiper("._swiper_last_minute",{direction:"horizontal",slidesPerView:3.6,spaceBetween:10,autoHeight:!0,watchOverflow:!0,Observer:!0,breakpoints:{320:{slidesPerView:1.2,spaceBetween:20},600:{slidesPerView:1.6},765:{slidesPerView:2.2},960:{slidesPerView:2.7},1200:{slidesPerView:3.1},1450:{slidesPerView:3.5},1600:{slidesPerView:4.2}},pagination:{el:".__swipe_nav",clickable:!0}});var o=[],n=$(".__bl_produit[data-last-minute]").length-1;$(".__bl_produit[data-last-minute]").each(function(t,e){var a=$(this);$.ajax({url:_SITE_URL+"get-product-avaibility",type:"post",data:{productCode:$(this).data("product")},success:function(e){"empty"===e?(a.parent().data("nb"),a.parent().remove()):(e=jQuery.parseJSON(e),a.find(".lm-date").html(e.date),a.find(".lm-hour").html(e.hour),a.find(".lm-nb-places").html(e.places),a.find("._load").hide(),!1===o.includes(a.parent().data("dest"))&&($(".__city[data-dest="+a.parent().data("dest")+"]").show(),o.push(a.parent().data("dest")))),t===n&&(home.swiper_last.update(),common.$windowW<768&&home.owllast())}})}),$(document).on("click","._last_dest",function(){$("._last_dest").removeClass("_activ");var o=$(this).data("dest");$(this).addClass("_activ"),"all"===o?$(".swiper-slide").show():$(".swiper-slide").each(function(e,t){var a=$(this).data("dest");a!=o||void 0===a?$(this).hide():$(this).show()}),home.swiper_last.update(),home.swiper_last.slideTo(0)})},home.heightminPopular,home.getPopular_destination=function(){$.ajax({url:_SITE_URL+"get-home-destinations-popular",type:"post",data:{dest_id:home.actualPopular},beforeSend:function(){$(".__popular_destinations").css("height",home.heightminPopular).html(' <div class="__loader"><div class="__load_product">\n                <img src="'+_SITE_URL+'img/SITE/SVG/_ophorus_loading_purple.svg">\n            </div></div>')},success:function(e){"empty"!=e&&setTimeout(function(){$(".__popular_destinations").html(e),common.$windowW<768?$(".__owl_produits_ajax").owlCarousel({items:2,margin:5,stagePadding:5,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,responsive:{0:{items:1,stagePadding:20},600:{items:2,stagePadding:20,margin:0}}}):home.heightminPopular=$(".__popular_destinations").height()},400)}})},home.map=function(){!0===mobile.state?$("._col_contain_map").remove():($(document).on("mouseover","._area,._label_map",function(){var e=$(this).data("area");$("._area[data-area="+e+"],._label_map[data-area="+e+"]").addClass("_hover")}),$(document).on("mouseleave","._area,._label_map",function(){$(this).data("area");$("._area,._label_map").removeClass("_hover")}))};var galerie={};galerie.actual,galerie.timer,galerie.nb_slides,galerie.nb,galerie.elt,galerie.elt_inf,galerie.nav,galerie.anim=new gsap.timeline,galerie.init=function(e,t,a,o,n){galerie.splitting(e),galerie.nav=o,0!=n&&(galerie.nb=e,galerie.timer=setInterval(galerie.newSlide,5e3),galerie.nb_slides=$(t).length),galerie.elt=t,galerie.elt_inf=a,galerie.actual=e,$(a+"[data-nb="+e+"]").removeClass("_hide").addClass("_show"),"Y"===$(t+"[data-nb="+e+"]").data("shadow")?$(".__back_black").addClass("_show"):$(".__back_black").removeClass("_show"),$(document).on("click",o,function(){clearInterval(galerie.timer);var e=$(this).data("nb");$(galerie.nav).removeClass("_activ"),$(this).addClass("_activ"),e!=galerie.actual&&($(o).removeClass("_activ"),$(this).addClass("_activ"),galerie.move(galerie.actual,e,t,a))}),$(document).on("mouseover",".slide_infos",function(){clearInterval(galerie.timer)}),$(window).on("blur",function(){clearInterval(galerie.timer)})},galerie.newSlide=function(e){galerie.nb++,galerie.nb>galerie.nb_slides&&(galerie.nb=1),galerie.move(galerie.actual,galerie.nb,galerie.elt,galerie.elt_inf)},galerie.move=function(e,t,a,o){"Y"===$(a+"[data-nb="+t+"]").data("shadow")?$(".__back_black").addClass("_show"):$(".__back_black").removeClass("_show"),$(galerie.nav).removeClass("_activ"),$(galerie.nav+"[data-nb="+t+"]").addClass("_activ"),galerie.anim.pause(),galerie.anim=new gsap.timeline;var n=$(a).height(),i=$(a+"[data-nb="+e+"]"),a=$(a+"[data-nb="+t+"]"),s=$(o+"[data-nb="+e+"]"),r=$(o+"[data-nb="+t+"]");i.css("z-index","5"),a.css("z-index","10"),s.removeClass("_show").addClass("_hide"),setTimeout(function(){galerie.splitting(t),r.removeClass("_hide").addClass("_show"),s.removeClass("_hide")},1500),galerie.anim.to(s,{y:-150,duration:1,opacity:0,display:"none",ease:Cubic.easeInOut},.3),galerie.anim.fromTo(r,{y:200,opacity:0,display:"none"},{ease:Expo.easeOut,y:0,duration:1.5,rotationZ:.01,opacity:1,display:"flex"},.6),galerie.anim.to(i,{duration:1,y:-n,ease:Cubic.easeInOut,rotationZ:.01,display:"none"},.33),galerie.anim.fromTo(a,{y:n},{y:0,duration:1,rotationZ:.01,ease:Cubic.easeInOut,opacity:1,display:"block"},.3),galerie.actual=t},galerie.splitting=function(e){e=document.querySelector('h2[data-nb="'+e+'"]'),Splitting({target:e,by:"lines"});document.querySelectorAll("h2.words.lines .word").forEach(function(e){var t=e.style.getPropertyValue("--line-index");e.classList.add(`line-${t}`)})},galerie.lightbox=function(){$("._grid_medias").lightGallery({selector:"._grid_medias .__img",mode:"lg-slide",enableDrag:!1,speed:800,download:!1,closable:!1,counter:!0,nextHtml:'<svg><use xlink:href="#__ic_arrow_nav"/></svg>',prevHtml:'<svg><use xlink:href="#__ic_arrow_nav"/></svg>'}),$(document).on("click","._show_medias",function(){var e=$(this).data("id");$("#"+e+" .__img").trigger("click")})};var product={array_dates:""};product.maxQuantity,product.minQuantity,product.placesLeft,product.totalQuantity=0,product.dateChoosen,product.hourChoosen,product.id,product.code,product.name,product.type_price,product.type,product.roundTripSave=!1,product.roundTrip=!1,product.roundTripPrice=!1,product.activ=!1,product.reservable=!1,product.moduleContact=!1,product.valid=!1,product.scanValidity=!1,product.header_height=0,product.gal_nb=0,product.list_reviews="",product.basket=!1,product.is_mobile=!1,product.calendarObj,product.init=function(){var e,t;new ClipboardJS("._btn_copy_code").on("success",function(e){$("._tip_code").show(),setTimeout(function(){$("._tip_code").hide()},1e3)}),$(document).on("click","._go_anchor",function(){var e=$(this).data("nav");gsap.to("html,body",{scrollTo:$("._section_product[data-nav="+e+"]").offset().top-200})}),0<$("input[name=non_reservable]").length&&(product.reservable=!0),!0===mobile.state?(Tawk_API.onLoad=function(){Tawk_API.hideWidget()},product.mobile()):$(".contain_drop").mCustomScrollbar({theme:"white",mouseWheel:{scrollAmount:250}}),product.id=$("input[name=product_id]").val(),product.code=$("input[name=productCode]").val(),product.name=$("input[name=productName]").val(),product.type_price=$("input[name=product_type_price]").val(),product.type=$("input[name=product_type]").val(),onglet.init(),reviews.init(),product.onScroll(),galerie.lightbox(),product.prepare_options(),"TRANSFER"===product.type&&transfers.product(),$(document).on("click","._close_modal_calendar",function(){$(".__modal_calendar_mobile").removeClass("_show"),$("html,body").css("overflow","auto")}),$(document).on("click","._close_modal_calendar_hour",function(){$(".__modal_calendar_mobile_hours").removeClass("_show"),$("html,body").css("overflow","auto")}),0<$("input[name=already_basket]").length&&(product.basket=!0,product.openBooking(),$(".--price_ind").hide()),0<$("input[name=basket_participants]").length&&(product.totalQuantity=$("input[name=basket_participants]").val()),0<$("input[name=lat]").length&&(t=$("input[name=lat]").val(),e=$("input[name=lng]").val(),""!=t&&""!=e&&map.init(t,e)),product.activ=!0,product.header_height=$(".__ophorus_p_header").height(),$(document).on("click",".--show_contain",function(e){$(this).hasClass("__force_open")?($(".--contain_options").slideUp(200),$(".__booking").removeClass("__force_open")):($(".--contain_options").slideDown(200),$(".__booking").addClass("__force_open")),$(this).toggleClass("__force_open"),$(".__booking").toggleClass("__bottom_open")}),!1===product.reservable?($(document).on("click",".__header_booking",function(){!1===mobile.state&&($(this).hide(),product.openBooking())}),t=$("input[name=productCode]").val(),product.calendar("principal",t,product.id,$("._calendar")),"TRANSFER"===product.type&&0<$("input[name=product_roundtrip]").length&&(e=$("input[name=product_roundtrip]").val(),t=$("input[name=product_roundtrip_code]").val(),product.calendar("transfer",t,e,$("._calendar_return"))),$(document).on("click",".__btn_book[data-valid=true]",function(e){0<product.totalQuantity&&product.saveBooking()}),$(document).on("change",".__extra_opt",function(){product.checkExtras()}),$(document).on("click",".--save_extras",function(e){1!=$(this).hasClass("_desactivate")&&product.saveExtras()}),$(document).on("click",".--no_extras",function(e){product.nextStep("extra"),product.saveExtras(!0)}),$(document).on("click",".--return_extras",function(e){product.nextStep("home")}),$(document).on("click",".--no_offres",function(e){product.nextStep("offres")})):(product.bookingContact(),product.moduleContact=!0,$(document).on("click",".__header_booking",function(){$(".--modal-contact").addClass("_show"),$("html,body").addClass("_overflow")}))},product.bookingContact=function(){$(".__load_product").hide(),$(".__btn_open_booking").addClass("_available"),$(".__header_booking").show(),$(".__price").css("opacity","1");var e=(new Date).fp_incr(2);$("._calendar_contact").flatpickr({altInput:!0,nextArrow:'<svg><use xlink:href="#__ic_arrow_fleche"/></svg>',prevArrow:'<svg class="_inverse"><use xlink:href="#__ic_arrow_fleche"/></svg>',altFormat:"M j, Y",mode:"range",dateFormat:"Y-m-d",minDate:e,defaultDate:[e,e],position:"auto center",onChange:function(e,t,a){2===e.length?($("input[name=date_deb]").val(dayjs(e[0]).format("YYYY-MM-DD")),$("input[name=date_end]").val(dayjs(e[1]).format("YYYY-MM-DD"))):(1===e.length?($("._calendar_search").val(t),$("input[name=date_deb]").val(t)):$("input[name=date_deb]").val(""),$("input[name=date_end]").val(""))}})},product.openBooking=function(){$(".__booking").removeClass("__closed"),1!=$(".--show_contain").hasClass("__force_open")&&($(".--contain_options").slideDown(200),$(".--show_contain").addClass("__force_open")),$(".__price_total_mobile").css("display","flex"),$(".__price_mobile").hide(),$(".__btn_open_booking > ._open > span").html("View Booking options")},product.checkExtras=function(){var e=!1;$("input[type=checkbox].__extra_opt").each(function(){!0===$(this).prop("checked")&&(e=!0)}),$("input[type=number].__extra_opt").each(function(){0<$(this).val()&&(e=!0)}),!0===e?$(".--save_extras").removeClass("_desactivate"):$(".--save_extras").addClass("_desactivate")},product.saveExtras=function(e){var o=[];$("input[name*=extra]").each(function(e,t){var a;null!=$(t).data("id")&&((a={}).extra_id=$(t).data("id"),a.label=$(t).data("label"),$(t).is(":checkbox")?(a.type=$(t).data("type"),a.price=$(t).val(),a.value=$(t).prop("checked")):(a.type=$(t).data("type"),a.value=$(t).val(),a.price=$(t).data("price")),o.push(a))});e=!0===e;$.ajax({url:_SITE_URL+"book-extras",type:"post",data:{extras:o,product_id:product.id,clean:e},beforeSend:function(){},success:function(e){e=jQuery.parseJSON(e);$("._recap_booking > .__contain").html(e),product.nextStep("extra")}})},product.activMenu=!1,product.onScroll=function(){$(".__product_nav").find("li");$(document).on("click",".__li_nav",function(){var e=$(this).data("nav");gsap.to("html,body",{scrollTo:$("._section_product[data-nav="+e+"]").offset().top-200})}),$("._section_product").waypoint(function(e){"down"===e&&(e=$(this.element).data("nav"),product.activMenu!=e&&null!=e&&(product.activMenu=e,$(".__product_nav").removeClass("_up").addClass("_down"),$(".__product_nav").find("li").removeClass("_activ"),$(".__product_nav").find("li[data-nav="+e+"]").addClass("_activ"),product.movNav("next",e)))},{offset:"45%"}),$("._section_product").waypoint(function(e){"up"===e&&(e=$(this.element).data("nav"),product.activMenu!=e&&null!=e&&($(".__product_nav").removeClass("_down").addClass("_up"),$(".__product_nav").find("li").removeClass("_activ"),$(".__product_nav").find("li[data-nav="+e+"]").addClass("_activ"),product.movNav("prev",e)))},{offset:function(){return Waypoint.viewportHeight()/2-$(this)[0].element.offsetHeight-250}})},product.prepare_options=function(){0<$(".__btns_offres").length&&0===$(".__btns_extras").length&&($(".__btns_offres").show(),$(".__options_offres").show())},product.nextStep=function(e){"extra"===e?0<$(".__btns_offres").length?($(".__btns_extras").hide(),$(".__btns_offres").show(),$(".__options_extras").hide(),$(".__options_offres").show()):location.href=_SITE_URL+"ophorus-cmd":"home"===e?($(".__btns_extras").show(),$(".__options_extras").show(),$(".__options_offres").hide(),$(".__btns_offres").hide()):location.href=_SITE_URL+"ophorus-cmd"},product.saveBooking=function(){var t=[];$("input[data-op]").not(".__extra_opt").each(function(){var e={};e.type=$(this).data("type"),e.label=$(this).data("label"),e.id=$(this).data("id"),e.num=$(this).val(),t.push(e)});var e,a,o,n,i=$("input[name=force_price]").val(),s=$("select[name=_horaires]").find("option:selected").val(),r=$("select[name=_horaires]").find("option:selected").data("id"),c=[],l="",_="";"TRANSFER"===product.type&&(a=$("input[name=product_date]").val(),o=$("input[name=_transfer_time_01]").val(),e=$("input[name=transfer_choice]:checked").val(),n=product.roundTripSave,"RT"===e&&(l=$("input[name=_transfer_time_02]").val(),_=$("input[name=_transfer_date_round]").val()),c.push({type:e,product_round:n,date_first:a,time_first:o,date_round:_,time_round:l})),$.ajax({url:_SITE_URL+"book-product",type:"post",data:{option:t,product_id:product.id,product_type:product.type,date:product.dateChoosen,horaire:s,option_id_from_horaire:r,price:i,transfer:c},beforeSend:function(){},success:function(e){gtag("event","add_to_cart",{currency:"EUR",value:i,items:[{item_id:product.code,item_name:product.name,index:0,item_brand:"Ophorus",price:i,quantity:product.totalQuantity}]});e=jQuery.parseJSON(e);$(".__waiting_page").removeClass("_show"),0<$("input[name=show_extras]").length||0<$("input[name=show_offres]").length?($(".--modal-booking").addClass("_show"),$("html,body").css("overflow","hidden"),$("._recap_booking > .__contain").html(e),product.checkExtras()):location.href=_SITE_URL+"ophorus-cmd"}})},product.calendar=function(o,e,t,n){product.maxQuantity=$("input[name=max_required]").val(),product.minQuantity=$("input[name=min_required]").val(),$.ajax({url:_SITE_URL+"get-avaibilities",type:"post",data:{product:e,product_id:t},beforeSend:function(){},success:function(e){var t,a;try{t=JSON.parse(e)}catch(e){t=null}"principal"===o&&(product.scanValidity=!0),null!=t&&""!=t?(product.valid=!0,e=jQuery.parseJSON(e),$(".--no_dates").hide(),$(".__load_product").hide(),$(".__btn_open_booking").addClass("_available"),!1===product.basket&&$(".__header_booking").show(),product.array_dates=e,a=[],jQuery.each(e,function(e,t){a.push(e)}),$(".__price").addClass("_show"),e=a[0],$(n).hasClass("_calendar")&&0<$("input[name=date_basket]").length&&(e=$("input[name=date_basket]").val()),$(n).hasClass("_calendar_return")&&0<$("input[name=date_dountrip_basket]").length&&(e=$("input[name=date_dountrip_basket]").val()),product.calendarObj=n.flatpickr({altInput:!0,defaultDate:e,altFormat:"F j, Y",dateFormat:"Y-m-d",minDate:a[0],locale:{firstDayOfWeek:1},enable:a,nextArrow:'<svg><use xlink:href="#__ic_arrow_fleche"/></svg>',prevArrow:'<svg class="_inverse"><use xlink:href="#__ic_arrow_fleche"/></svg>',onReady:function(e,t,a){a.calendarContainer.classList.add("_calendar_price"),product.updateCells(a)},onOpen:function(e,t,a){!0===mobile.state&&($(".__modal_calendar_mobile").addClass("_show"),$(".flatpickr-calendar").not(".hasTime").hide(),$(".flatpickr-calendar.open").not(".hasTime").show().addClass("inline").removeAttr("style").detach().appendTo(".__modal_calendar_mobile > ._contain")),product.updateCustomDateCells(a)},onMonthChange:function(e,t,a){product.updateCells(a)},onYearChange:function(e,t,a){product.updateCells(a)},onClose:function(){},onChange:function(e,t,a){product.updateCells(a),0<product.array_dates[t].length&&product.showDate(product.array_dates[t],t,a.input),!0===mobile.state&&($(".__modal_calendar_mobile").removeClass("_show"),$("html,body").css("overflow","auto"))}}),""!=$("#__calendar_01").val()?product.showDate(product.array_dates[$("#__calendar_01").val()],$("#__calendar_01").val()):0<product.array_dates[a[0]].length&&product.showDate(product.array_dates[a[0]],a[0])):($(".__btn_open_booking").hide(),$(".__mobile_no_dates").addClass("_open"),$(".--no_dates").show(),$(".__load_product").hide(),$(".__header_booking").hide(),$(".__main_booking").hide())}})},product.updateCells=function(e){$(".flatpickr-day").find(".custom-price").remove();const t=e.calendarContainer.querySelectorAll(".flatpickr-day");t.forEach(e=>{var t=e.getAttribute("aria-label"),a=dayjs(t).format("YYYY-MM-DD");e.setAttribute("data-date",a);t=product.array_dates[a];if(null!=t){a=t[0].price,t=t[0].color;if(void 0!==t&&e.classList.add(t),void 0!==a){const o=parseFloat(a.replace(/,/g,""));a=o%1==0?o.toFixed(0):o;const n=document.createElement("span");n.classList.add("custom-price"),n.textContent=a+"€",e.appendChild(n)}}})},product.updateCustomDateCells=function(e){$(".flatpickr-day").find(".custom-price").remove(),e.calendarContainer.querySelectorAll(".flatpickr-day").forEach(e=>{var t=e.getAttribute("data-date"),a=product.array_dates[t];if(null!=a){t=a[0].price,a=a[0].color;if(void 0!==a&&e.classList.add(a),void 0!==t){t=parseFloat(t),t=Math.round(t);const o=document.createElement("span");o.classList.add("custom-price"),o.textContent=t+"€",e.appendChild(o)}}})},product.showDate=function(e,t,a){""!=a&&$(a).hasClass("_calendar_return")&&product.checkBtnBooking(),product.dateChoosen=t,product.gestionPlacesLeft(e[0].places),$("select[name=_horaires]").off("change"),$(".--product_hours").show(),$(".--product_hours").find("select > option").remove(),jQuery.each(e,function(e,t){var a="",o="";null!=t.price&&(product.reinit(),0===e&&product.ModPriceHoraire(t.price),a=t.price,o=t.id);e=" - "+t.places+" available";t.places>product.maxQuantity&&(e=""),0!=t.start&&$(".--product_hours").find("select").append($("<option>",{value:t.start,data:{price:a,id:o},html:"<span>"+t.start_us+e+"</span>"}))}),0<$("input[name=_horaire_basket]").length&&(e=$("input[name=_horaire_basket]").val(),$(".--product_hours").find('select > option[value="'+e+'"]').prop("selected",!0)),0===$(".--product_hours").find("select > option").length&&$(".--product_hours").hide(),$("select[name=_horaires]").on("change",function(){product.hourChoosen=$(this).find("option:selected").val(),product.getPriceFromDate(t),product.getPlacesFromHours($(this).find("option:selected").val())}),product.getPriceFromDate(t),$(".__load_product").hide(),$(".--contain_options").show()},product.getPriceFromDate=function(e){var t=[];$("input[data-op]").not(".__extra_opt").each(function(){var e={};e.type=$(this).data("type"),e.label=$(this).data("label"),e.id=$(this).data("id"),e.num=$(this).val(),t.push(e)}),0<$("select[name=_horaires]").length&&(product.hourChoosen=$("select[name=_horaires]").find("option:selected").val(),void 0===product.hourChoosen&&(product.hourChoosen=$("select[name=_horaires]").find("option:first-child").val())),$.ajax({url:_SITE_URL+"get-price-from-date",type:"post",data:{option:t,date:e,hour:product.hourChoosen,product:product.id},beforeSend:function(){},success:function(e){var t=jQuery.parseJSON(e),e=t.reduce((e,t)=>parseFloat(t.price)<parseFloat(e.price)?t:e,t[0]);$(".__price_ind_show").html(e.price),jQuery.each(t,function(e,t){var a=t.label,a=$(".__bl_line[data-bl-label="+a+"]");0<a.length&&a.find("small").html("€ "+t.price+" /person")}),TweenMax.to($(".__price,.__price_mobile"),{opacity:1},1),product.getPrice()}})},product.ModPriceHoraire=function(e){$(".__bl_line[data-bl=CUSTOM] > ._quantity_label").find("small").html("€ "+e+" /person"),0<product.totalQuantity&&product.getPrice()},product.test=0,product.gestionPlacesLeft=function(e){$("input[name=places_availables]").val(e),product.placesLeft=e,parseInt(product.maxQuantity)===parseInt(product.totalQuantity)||parseInt(product.placesLeft)===parseInt(product.totalQuantity)?$("button._plus._book").addClass("_disabled").attr("disabled","disabled"):$("button._plus._book").removeClass("_disabled").removeAttr("disabled"),product.placesLeft<product.maxQuantity?($(".nb_advert").html("<span>Only <small>"+product.placesLeft+" places</small> left on this tour</span>").show(),product.totalQuantity>product.placesLeft&&(product.totalQuantity=0,$("input[data-op]").not(".__extra_opt").each(function(){$(this).val(0)}),$("._menu_dropdown").addClass("_show"))):$(".nb_advert").html("").hide()},product.reinit=function(){"TRANSFER"!=$("input[name=product_type]").val()&&($("input[name=nb_participants]").val("Participants x 0"),$(".__total > span").html("€ 0.00"),$(".__btn_book").attr("data-valid","false"),$(".--price_ind").show(),$(".--price_total").hide(),$("button._plus._book").removeClass("_disabled").removeAttr("disabled"),0===product.totalQuantity?$("button._minus._book").addClass("_disabled").attr("disabled","disabled"):$("button._minus._book").removeClass("_disabled").removeAttr("disabled"),0<$("input[name=_horaire_basket]").length&&product.getPlacesFromHours($("input[name=_horaire_basket]").val()))},product.getPlacesFromHours=function(a){var e=jQuery.grep(product.array_dates[product.dateChoosen],function(e,t){return e.start===a});null!=e&&product.gestionPlacesLeft(e[0].places)},product.getPlacesFromDate=function(e,t){$.ajax({url:_SITE_URL+"get-places",type:"post",data:{date:t,product:e},beforeSend:function(){},success:function(e){jQuery.parseJSON(e)}})},product.getPrice=function(){var t=[];$("input[data-op]").not(".__extra_opt").each(function(){var e={};e.type=$(this).data("type"),e.label=$(this).data("label"),e.id=$(this).data("id"),e.num=$(this).val(),t.push(e)});var e=$("input[name=force_price]").val();$.ajax({url:_SITE_URL+"get-price",type:"post",data:{option:t,date:product.dateChoosen,hour:product.hourChoosen,product_id:product.id,product_roundTrip:product.roundTrip,price:e,product_type:product.type},beforeSend:function(){},success:function(e){var t,e=jQuery.parseJSON(e);e.price_each&&$(".__bl_line[data-bl=EACH] > ._quantity_label").find("small").html("€ "+e.price_each+" /person"),e.price_total&&$(".__bl_line[data-bl=TOTAL] > ._quantity_label").find("small").html("€ "+e.price_total),parseInt(product.maxQuantity)===parseInt(e.total_places)||parseInt(product.placesLeft)===parseInt(e.total_places)?$("button._plus._book").addClass("_disabled").attr("disabled","disabled"):$("button._plus._book").removeClass("_disabled").removeAttr("disabled"),null!=e.transfers_extras?(t="<span>€ "+e.transfers_extras.total_price+'</span><small class="_single">Total price - Taxes inc.</small>',$(".--price_total").html(t).show(),$(".__price_mobile").hide(),$(".__price_total_mobile > ._contain").html(t),0<e.transfers_extras.nb?$(".--transfer-extras").show().html(e.transfers_extras.extras):$(".--transfer-extras").hide()):0<e.total_places?($(".__btn_book").attr("data-valid","true"),t="<span>€ "+e.total_price+'</span><small class="_single">Total price - Taxes inc.</small>',$(".--price_total").html(t).show(),$(".__price_total_mobile > ._contain").html(t),$(".__price_total_mobile").css("display","flex"),$(".__price_mobile").hide(),$(".--price_ind").hide(),$(".__show_book > span").html("Book now"),$(".__header_booking > h2").html("Book now")):($(".__btn_book").attr("data-valid","false"),$(".__price_mobile").show(),$(".__price_total_mobile").hide(),$(".--price_ind").show(),$(".--price_total").hide(),$(".__show_book > span").html("Check Availability"),$(".__header_booking > h2").html("Check Availability")),$("input[name=nb_participants]").val("Participants x "+e.total_places),product.totalQuantity=e.total_places}})},product.checkBtnBooking=function(){!1!==product.roundTrip&&""===$("input._calendar_return").val()?$(".__btn_book").attr("data-valid","false"):$(".__btn_book").attr("data-valid","true")},product.mobile=function(e){!(product.is_mobile=!0)===product.reservable?($(document).on("click",".__btn_open_booking",function(){$("html,body").toggleClass("_overflow"),$(".__booking").toggleClass("__fixed_mobile"),$(this).toggleClass("__open")}),$(document).on("click","._close_mobile",function(){$(".__booking").removeClass("__fixed_mobile"),$(".__btn_open_booking").removeClass("__open"),$("html,body").removeClass("_overflow")}),0<$("input[name=force_price_mobile]").length?($(".__price_total_mobile").css("display","flex"),$(".__price_mobile").hide()):(t=$(".--price_ind").html(),$(".__price_mobile > ._contain").html(t))):(t=$(".--price_ind").html(),$(".__price_mobile > ._contain").html(t),$(".__price_mobile").show().css("opacity","1"),$(document).on("click",".__btn_open_booking",function(){$(".--modal-contact").addClass("_show"),$("html,body").addClass("_overflow")})),$(".__ul_icons").owlCarousel({margin:10,stagePadding:0,mouseDrag:!0,touchDrag:!0,dots:!1,singleItem:!0,items:3,nav:!0,navText:['<div><svg class="_reverse"><use xlink:href="#__ic_arrow_nav"/></svg></div>','<div><svg class="_inverse"><use xlink:href="#__ic_arrow_nav"/></svg></div>'],onInitialized:function(e){var t=$(e.target).find(".owl-stage").width();$(e.target).find(".owl-stage").css("width",t+40)},responsive:{0:{margin:10,autoWidth:!0},700:{autoWidth:!0,margin:5,nav:!0},900:{autoWidth:!0,margin:5}}});var t=$("._ul_nav");!0===e?t.owlCarousel({items:3,stagePadding:20,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,onInitialized:function(e){},responsive:{0:{items:2},700:{items:3},900:{items:4}}}):t.owlCarousel({items:3,margin:5,stagePadding:20,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,onInitialized:function(e){var t=$(e.target).find(".owl-stage").width();$(e.target).find(".owl-stage").css("width",t+100)},responsive:{0:{autoWidth:!0,stagePadding:10},700:{items:1},900:{items:2}}});var a=0;$("._ul_nav").find(".owl-item").each(function(e){a++,$(this).attr("data-nb",a)}),common.$windowW<768&&$(".__owl_produits").owlCarousel({items:2,margin:10,stagePadding:30,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,responsive:{0:{items:1},600:{items:2}}})},product.movNav=function(e,t){var a,o;!0===product.is_mobile&&(a=$("._ul_nav"),o=$("._ul_nav").find("._activ").parent().data("nb"),a.trigger("to.owl.carousel",o-1))};var product_package={init:function(){mobile.state,reviews.init(),product.onScroll(),galerie.lightbox()}},onglet={init:function(){$(".__onglet").each(function(){onglet.check($(this))?$(this).addClass("__valid_onglet"):$(this).addClass("__no_more")}),$(document).on("click",".__onglet > ._show_more",function(){var e=$(this).parent();e.toggleClass("_open"),1!=e.hasClass("_open")&&(e=e.offset(),gsap.to($("html,body"),{scrollTo:e.top-300,duration:.6}))}),$(document).on("click","._accordion",function(){$("._accordion").not(this).removeClass("_open"),$("._accordion").not(this).find(".__answer").slideUp(),$(this).toggleClass("_open"),$(this).find(".__answer").slideToggle()})},check:function(e){return $(e).find(".__content._short").height()<$(e).find(".__content._long").height()}},newsletter={};newsletter.swiper,newsletter.init=function(){newsletter.swiper=new Swiper(".__swipe_feeds",{direction:"horizontal",slidesPerView:3.6,spaceBetween:10,autoHeight:!0,watchOverflow:!0,Observer:!0,breakpoints:{320:{slidesPerView:1.7,spaceBetween:15},600:{slidesPerView:2.1},765:{slidesPerView:2.4},960:{slidesPerView:2.7},1200:{slidesPerView:3.2},1450:{slidesPerView:3.6},1600:{slidesPerView:4.2}},pagination:{el:".__swipe_nav",clickable:!0}})};var map={};map.view,map.init=function(e,t){var a=L.icon({iconUrl:_URL+"img/SITE/GENERAL/__icon_marker.png?v=1",iconSize:[50,66],iconAnchor:[22,94]});map.view=L.map("__map",{center:[e,t],zoom:14,zoomControl:!1}),L.tileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png",{attribution:""}).addTo(map.view),L.marker(L.latLng(e,t),{icon:a,title:"Meeting point"}).addTo(map.view),$(document).on("click",".__zoom_plus",function(){var e=map.view.getZoom();map.view.setZoom(e+1)}),$(document).on("click",".__zoom_minus",function(){var e=map.view.getZoom();map.view.setZoom(e-1)}),$(document).on("click",".__map_center",function(){map.view.setView(new L.LatLng(e,t),15),map.view.panTo(new L.LatLng(e,t))})};var search={};search.awesomplete,search.rand,search.array_product=[],search.array_destination=[],search.array_transfers=[],search.calendar_module=[],search.participants=1,search.participants_nb=1,search.participants_anim=gsap.timeline(),search.type="home",search.container,search.init=function(){$(window).on("click",function(){$("._search_warning").removeClass("_show"),$("._search_empty").removeClass("_show")}),$(document).on("focus","input",function(){$("._search_warning").removeClass("_show"),$("._search_empty").removeClass("_show")}),$(document).on("click",".__search_module",function(){menu.search=!0,$(".__module_search").toggleClass("_open_search"),$("header").toggleClass("__open_sub").addClass("__open_modal"),$(".__contain_ss").css("display","none")}),$(document).on("click","._cancel_search",function(){menu.closeSub()}),$(document).on("click","._close_empty",function(){$("._search_empty").removeClass("_show")}),$(document).on("click",".--search_btn",function(e){var t=$(this).data("btn");return search.container=search.getContainer(t),e.preventDefault(),!1===search.check(!1,t)?(search.container.find("._search_warning").addClass("_show"),setTimeout(function(){$("._search_warning").removeClass("_show")},3e3)):$(this).hasClass("_module")?search.submit(!1,!0):search.submit(),!1}),search.participants(),search.rand=Math.floor(1e3*Math.random()+1);var e=new Date;e.getFullYear(),e.getMonth(),e.getDate();$(".__search_calendar").flatpickr({nextArrow:'<svg><use xlink:href="#__ic_arrow_fleche"/></svg>',inline:!0,mode:"single",minDate:"today",dateFormat:"M j, Y",position:"auto center",locale:{firstDayOfWeek:1},onReady:function(e,t,a){search.calendar_module.push({type:$(a.element).data("env"),instance:a}),a.calendarContainer.classList.add("_search_module"),a.calendarContainer.classList.add("calendarNormal")},onChange:function(e,t,a){search.container=search.getContainer($(a.element).data("env")),search.container.find("._choose_date").removeClass("_activ"),search.container.find("._btn_plus").removeClass("_activ _no_valid"),search.container.find("#"+search.calendar_id).val(t),search.container.find("input[name=date_deb]").val(dayjs(e[0]).format("YYYY-MM-DD"))}}),search.calendarSearch(),$("._calendar_search").flatpickr({altInput:!0,nextArrow:'<svg><use xlink:href="#__ic_arrow_fleche"/></svg>',prevArrow:'<svg class="_inverse"><use xlink:href="#__ic_arrow_fleche"/></svg>',altFormat:"M j, Y",mode:"single",dateFormat:"M j, Y",minDate:"today",defaultDate:["today"],position:"auto center",locale:{firstDayOfWeek:1},onChange:function(e,t,a){2===e.length?($("input[name=date_deb]").val(dayjs(e[0]).format("YYYY-MM-DD")),$("input[name=date_end]").val(dayjs(e[1]).format("YYYY-MM-DD"))):1===e.length?($("._calendar_search").val(t),$("input[name=date_deb]").val(t),$("input[name=date_end]").val(""),$("._clear_calendar").addClass("_show")):($("input[name=date_deb]").val(""),$("input[name=date_end]").val(""),$("._clear_calendar").removeClass("_show"))}}),$.getJSON(_SITE_URL+"JSON/search_results_destinations.json?v="+search.rand,function(e){$.each(e,function(e,t){search.array_destination.push(t)})}),$(document).on("click","._clear_destination",function(){search.container=search.getContainer($(this).data("env")),search.container.find("input[name=destination_id]").val(""),search.container.find("input[name=destination_type]").val(""),search.container.find("input[name=__search_destination]").val(""),search.container.find("._clear_destination").removeClass("_show")}),Awesomplete.$$("input._autocomplete").forEach(function(t){var e="product"==t.dataset.type?search.array_product:"destination"==t.dataset.type?search.array_destination:search.array_transfers;new Awesomplete(t,{list:e,minChars:0,maxItems:6,sort:Awesomplete.SORT_BYORDER,replace:function(e){this.input.value=e.title}});t.offsetWidth;e=$(".awesomplete > input").position();$(".awesomplete > ul").css("left",e.left),$(".awesomplete > ul").css("top",e.top+43),t.addEventListener("awesomplete-close",function(e){"destination"==t.dataset.type&&"blur"===e.reason&&(search.container.find("input[name=destination_id]").val(""),search.container.find("input[name=destination_type]").val(""),search.container.find("input[name=__search_destination]").val(""),search.container.find("._clear_destination").removeClass("_show"))},{passive:!0}),t.addEventListener("awesomplete-select",function(e){"product"==t.dataset.type?document.location=e.text.url:"destination"==t.dataset.type&&(search.container=search.getContainer($(e.target).data("env")),search.container.find("input[name=destination_id]").val(e.text.id),search.container.find("input[name=destination_type]").val(e.text.type),search.container.find("input[name=__search_destination]").addClass("__clear"),search.container.find("._clear_destination").addClass("_show"))},{passive:!0}),t.addEventListener("awesomplete-selectcomplete",function(e){"transfers"==t.dataset.type&&($(".module-transfers").addClass("__readonly"),$("input[name=departure_id]").val(e.text.id),transfers.getDestinations(e.text.id,e.text.type))},{passive:!0}),t.addEventListener("click",function(e){"transfers"==t.dataset.type&&($(".module-transfers").removeClass("__readonly"),$("input[name=trans_departure]").val(""),transfers.cleanDestinations())},{passive:!0})})},search.getContainer=function(e){return"_classic"===e?$(".__ophorus_search_module._classic"):$(".__ophorus_search_module._menu_top")},search.calendar_id,search.calendarSearch=function(){var n=new Date,i=new Date(n);i.setDate(i.getDate()+1),$(document).on("click","._choose_date",function(){var t=$(this).parent().data("env");search.container=search.getContainer(t),search.container.find("._choose_date").removeClass("_activ"),$(this).addClass("_activ"),search.container.find("._btn_plus").removeClass("_no_valid _activ");var a,o="tomorrow"===$(this).data("date")?i:n;search.calendar_module.forEach(function(e){e.type===t&&(a=e.instance).setDate(o)}),search.container.find("input[name=date_deb]").val(dayjs(a.selectedDates[0]).format("YYYY-MM-DD")),$("._calendar_inline").hide();var e=dayjs(o).format("MMM DD, YYYY");search.container.find("#"+search.calendar_id).val(e)}),$(document).on("click","._btn_plus:not(._no_valid)",function(){var t=$(this).data("env");search.container=search.getContainer(t),search.container.find("._btn_plus").removeClass("_activ"),$(this).addClass("_activ");var e=$(this).data("plus"),a="";search.calendar_module.forEach(function(e){e.type===t&&(a=e.instance.selectedDates[0])});var o=dayjs(a).add(e,"day"),e=dayjs(a).format("MMM DD")+" - "+dayjs(o).format("MMM DD, YYYY");search.container.find("#"+search.calendar_id).val(e),search.container.find("input[name=date_end]").val(dayjs(o).format("YYYY-MM-DD"))}),$(document).on("click",".__close_calendar",function(){$("._calendar_inline").hide()}),$(document).on("click","input[name=__search_date]",function(){search.calendar_id=$(this).attr("id"),$(this).next().next().show()}),$(document).on("click","._btn_clear",function(){var t=$(this).data("env");search.container=search.getContainer(t),search.calendar_module.forEach(function(e){e.type===t&&e.instance.clear()}),search.container.find("input[name=__search_date]").val(""),search.container.find("._btn_plus").removeClass("_activ"),search.container.find("._choose_date").removeClass("_activ"),search.container.find("._btn_plus").addClass("_no_valid"),search.container.find("input[name=date_deb]").val(""),search.container.find("input[name=date_end]").val("")}),$(window).on("click",function(e){e.target.matches("._calendar_inline, ._calendar_inline *")||e.target.matches("input[name=__search_date]")||$("._calendar_inline").hide()})},search.check=function(e,t){if(!0===e){var a=$("input[name=__search_destination]").val();return""!==(i=$("input[name=__search_date]").val())||""!=a}search.container=search.getContainer(t);var o=[];search.container.find("input[name='category[]']:checked").each(function(){o.push(parseInt($(this).val()))});var n=[];search.container.find("input[name='type[]']:checked").each(function(){n.push($(this).val())});var a=search.container.find("input[name=destination_id]").val(),i=search.container.find("input[name=date_deb]").val(),t=search.container.find("input[name=__search_participants]").val();return""!==a||""!==i||""!==t||""!=o||""!=n},search.submit=function(t,e){var a,o,n,i,s,r;$("._calendar_inline").hide(),!0===t?(a=$("input[name=destination_id]").val(),n=$("input[name=__search_date]").val(),r=i="",o=$("input[name=destination_type]").val(),s=""):($("._search_warning").removeClass("_show"),$("._menu_dropdown").removeClass("_show"),drop.get_result=!1,drop.cleanResult(),a=search.container.find("input[name=destination_id]").val(),o=search.container.find("input[name=destination_type]").val(),n=search.container.find("input[name=date_deb]").val(),i=search.container.find("input[name=date_end]").val(),s=(!0===e?search.container.find("input[name=__search_participants_module]"):search.container.find("input[name=__search_participants]")).val(),r=search.container.find("form[name=_form_search] input[name='type[]']:checked").map(function(){return $(this).val()}).get(),search.container.find("form[name=_form_search] input[name='category[]']:checked").map(function(){return $(this).val()}).get()),$.ajax({url:_SITE_URL+"search",type:"post",data:{dest_id:a,dest_type:o,date_deb:n,date_end:i,participants:s,type:r},beforeSend:function(){},success:function(e){"empty"===e?!0===t?alert("No results with these criteria"):((!0===menu.search?$(".__ophorus_search_module._menu"):$(".__ophorus_search_module._home")).find("._search_empty").addClass("_show"),setTimeout(function(){$("._search_empty").removeClass("_show")},3e3)):location.href=_SITE_URL+"search-results/"+e}})},search.participants_module=1,search.fromMenu=!1,search.participants=function(n){search.participants_module=1;search.participants=1,!0!==n&&!0!==results.search||(search.type="participants"),0<$("input[name=__search_participants_results]").length&&""!=$("input[name=__search_participants_results]").val()&&(search.participants=$("input[name=__search_participants_results]").val(),1<search.participants&&$(".__participants").find(".__btn._minus").removeClass("_inactiv"));var e="";!0===search.fromMenu?(search.type="home",e=".__participants[data-type="+search.type+"] > .__btn:not(._inactiv)"):(e=".__participants[data-type="+search.type+"] > .__btn:not(._inactiv)",0<$(".__results_container").length&&(search.type="participants",e=".__participants[data-type=participants] > ._center > .__btn:not(._inactiv)")),$(document).on("click",e+",.__participants_module > .__btn:not(._inactiv)",function(){search.participants_nb=$(".__participants[data-type="+search.type+"]").find("._number > ._list > span").length;var e="",t="",a="";""!=drop._id?(search.participants_nb=$("._menu_dropdown[data-drop="+drop._id+"]").find($(".__participants > ._number > ._list > span")).length,e=$("._menu_drop[data-drop="+drop._id+"]").find("input[name=__search_participants]"),t=$("._menu_drop[data-drop="+drop._id+"]").find("input[name=__search_participants_label]"),a=$("._menu_dropdown[data-drop="+drop._id+"]").find(".__participants")):!0===results.search&&(e=$("input[name=__search_participants_results]"),a=$("._participants_filter")),""!=e.val()?search.participants=e.val():search.participants=1;var o="";$(this).hasClass("_minus")?(o="+=",search.participants--):(o="-=",search.participants++),!0===results.search&&""===drop._id?$("input[name=__search_participants_results]").val(search.participants):(e.val(search.participants),t.val("Participants x "+search.participants)),!0===n&&$("input[name=__search_participants_label]").val("Participants x "+search.participants),search.participants_anim.play().to(a.find("._number > ._list"),{duration:.2,y:o+55}),1<search.participants?a.find(".__btn._minus").removeClass("_inactiv"):a.find(".__btn._minus").addClass("_inactiv"),search.participants===search.participants_nb?(a.find(".__btn._plus").addClass("_inactiv"),""!=t&&t.val("Participants > "+(search.participants-1))):a.find(".__btn._plus").removeClass("_inactiv")})};var stripe,reviews={list:!(search.moveParticipants=function(e,t){var a=$(".__participants");"module"===e&&(a=$(".__participants_module"));var o="";t.hasClass("_minus")?(o="+=","module"===e?search.participants_module--:search.participants--):(o="-=","module"===e?search.participants_module++:search.participants++),"module"===e?$("._menu_drop_search").find("input[name='__search_participants']").val(search.participants_module):$("input[name=__search_participants_results]").val(search.participants),!0===results.search&&$("input[name=__search_participants_results]").val(search.participants),!0===mobile&&$("input[name=__search_participants_label]").val(search.participants+" X participants"),search.participants_anim.play().to(a.find("._number > ._list"),{duration:.2,y:o+55}),"module"===e?(1<search.participants_module?a.find(".__btn._minus").removeClass("_inactiv"):a.find(".__btn._minus").addClass("_inactiv"),search.participants_module===search.participants_nb?a.find(".__btn._plus").addClass("_inactiv"):a.find(".__btn._plus").removeClass("_inactiv")):(1<search.participants?a.find(".__btn._minus").removeClass("_inactiv"):a.find(".__btn._minus").addClass("_inactiv"),search.participants===search.participants_nb?a.find(".__btn._plus").addClass("_inactiv"):a.find(".__btn._plus").removeClass("_inactiv"))}),init:function(){$(document).on("click",".__best_reviews > li",function(){var e=$(this).data("review");reviews.loadReviews(e)}),$(document).on("click","._load_reviews",function(){reviews.loadReviews()})},loadReviews:function(o){!1===reviews.list?$.ajax({url:_SITE_URL+"get-reviews",type:"post",data:{product_id:product.id},beforeSend:function(){},success:function(e){var a,t;""!=e&&(product.list_reviews=jQuery.parseJSON(e),a="",jQuery.each(product.list_reviews.from,function(e,t){a+='<li data-from="'+t.id+'"><div class="cc-checkbox-outer _small _grey"><input checked="checked" class="__check" type="checkbox" data-from="'+t.id+'" name="from['+t.id+']" id="from['+t.id+']"><div class="cc-checkbox-inner"></div></div><div class="_filter_title"><span>'+t.label+"</span></div></li>"}),$(".--filter_from").html("<ul>"+a+"</ul>"),$(".nb_reviews").html(product.list_reviews.nb_reviews+" <small>Reviews</small>"),$(".--list_reviews").html(product.list_reviews.content),null!=o?(t=$(".--list_reviews").find(".__review_bl[data-id="+o+"]").position().top,setTimeout(function(){$(".__contain_reviews").mCustomScrollbar("scrollTo",t)},600)):setTimeout(function(){$(".__contain_reviews").mCustomScrollbar("scrollTo",0)},600),$("html,body").css("overflow","hidden"),$(".--modal-reviews").addClass("_show"),reviews.filters())}}):"object"===jQuery.type(product.list_reviews)&&($("html,body").css("overflow","hidden"),$(".--modal-reviews").addClass("_show"),reviews.filters())},filters:function(){$(document).on("change",".__check",function(){var e=$(this).data("from");1==$(this).prop("checked")?$(".__review_bl[data-from="+e+"]").show():$(".__review_bl[data-from="+e+"]").hide(),$(".nb_reviews").html($(".__review_bl:visible").length+" <small>Reviews</small>")}),$(document).on("click",".--filter-asc",function(){$(".--filter-asc").removeClass("_activ"),$(this).addClass("_activ");var i=[],e=$(this).data("filter");$(".__review_bl").each(function(e,t){var a={},o=$(this).data("rate"),n=$(this).data("date");a.rate=o,a.date=n,a.elt=t,i.push(a)}),i.sort(reviews.sortByRate(e,"desc")),$(".--list_reviews").html(""),jQuery.each(i,function(e,t){$(".--list_reviews").append(t.elt)})})},sortByRate:function(o,n="asc"){return function(e,t){if(!e.hasOwnProperty(o)||!t.hasOwnProperty(o))return 0;e="string"==typeof e[o]?e[o].toUpperCase():e[o],t="string"==typeof t[o]?t[o].toUpperCase():t[o];let a=0;return t<e?a=1:e<t&&(a=-1),"desc"===n?-1*a:a}}},stripe_oph={};stripe_oph.form_payment=document.querySelector("#form-ophorus-cmd"),stripe_oph.intervalInput,stripe_oph.init=function(e){stripe="ENV"===e?Stripe("pk_live_yKNMyUaflEQ71lLOOVK9x2L200U7nZvXuD"):Stripe("pk_test_MR04eCziov4CfplsbgxcAfM000p5vskx0S"),stripe_oph.initStripe()},stripe_oph.cardNumber,stripe_oph.cardExpiry,stripe_oph.cardCvc,stripe_oph.cardHolderName,stripe_oph.cardButton,stripe_oph.clientSecret,stripe_oph.errorMessage,stripe_oph.animation,stripe_oph.initStripe=function(){var e=document.getElementById("error-message-cb");stripe_oph.errorMessage=e.querySelector(".message"),$(".__payment-error").on("click",function(){gsap.to(e,.6,{opacity:0,y:20,display:"none"})}),stripe_oph.cardHolderName=document.getElementById("_cardHolder"),stripe_oph.cardButton=document.getElementById("_cardButton"),stripe_oph.clientSecret=stripe_oph.cardButton.dataset.secret;var t=stripe.elements(),a={base:{color:"#200952",backgroundColor:"#FFFFFF",fontWeight:"500",cssSrc:"https://fonts.googleapis.com/css2?family=Manrope:wght@400;500&display=swap",fontSize:"18px",textAlign:"center",padding:"20px",lineHeight:"50px",fontSmoothing:"antialiased","::placeholder":{color:"#D8C8FC",fontWeight:"500"},":-webkit-autofill":{color:"#e39f48"}},invalid:{color:"#AA0011","::placeholder":{color:"#AA0011"}}};stripe_oph.cardNumber=t.create("cardNumber",{showIcon:!0,style:{base:{color:"#200952",backgroundColor:"#FFFFFF",fontWeight:"500",fontFamily:"Manrope",fontSize:"18px",padding:"20px",lineHeight:"50px",fontSmoothing:"antialiased","::placeholder":{color:"#D8C8FC",fontWeight:"500"},":-webkit-autofill":{color:"#e39f48"}},invalid:{color:"#AA0011","::placeholder":{color:"#AA0011"}}}}),stripe_oph.cardNumber.mount("#card-number"),stripe_oph.cardExpiry=t.create("cardExpiry",{style:a}),stripe_oph.cardExpiry.mount("#card-expiry"),stripe_oph.cardCvc=t.create("cardCvc",{style:a}),stripe_oph.cardCvc.mount("#card-cvc"),stripe_oph.cardNumber.addEventListener("change",function(e){var t=document.getElementById("card-errors");e.error?t.textContent=e.error.message:t.textContent=""}),stripe_oph.cardNumber.addEventListener("focus",function(e){$("#error-message-cb").hide()}),stripe_oph.cardExpiry.addEventListener("focus",function(e){$("#error-message-cb").hide()}),stripe_oph.cardCvc.addEventListener("focus",function(e){$("#error-message-cb").hide()}),stripe_oph.animation=bodymovin.loadAnimation({container:document.getElementById("payment_valid"),path:"img/SITE/PAYMENT/icon_payment_valid.json",renderer:"svg",loop:!1,autoplay:!1}),stripe_oph.cardButton.addEventListener("click",function(e){if(e.preventDefault(),!0!==stripe_oph.checkForm())return $(".__msg_order").html("Please check the mandatory fields before validating"),$(".__load").hide(),setTimeout(function(){$("._background_wait").hide()},2e3),!1;e=$("input[name=random_sess]").val();if(""===e)return"function"==typeof hj&&hj("tagRecording",["bug_detected","no_session"]),$(".__msg_order").html("Your session is not valid anymore, please refresh the page.<br><br> <a class='_ophorus_btn_order' href='"+_SITE_URL+"ophorus-cmd'><span>Reload the page</span></a>"),$(".__load").hide(),!1;$.ajax({url:_SITE_URL+"control-session",type:"post",data:{session:e},beforeSend:function(){$(".__msg_order").html("Control of the session before the paiement process, please wait..")},success:function(e){return"error_session"===e?("function"==typeof hj&&hj("tagRecording",["bug_detected","error_session"]),$(".__msg_order").html("Your session is not valid anymore, please refresh the page. <br> No payment procedure has been made. <br><br> <a class='_ophorus_btn_order' href='"+_SITE_URL+"ophorus-cmd'><span>Reload the page</span></a>"),$(".__load").hide(),!1):"error"===e?("function"==typeof hj&&hj("tagRecording",["bug_detected","error"]),$(".__msg_order").html("Your basket encounter an error, please refresh the page. <br> No payment procedure has been made. <br><br> <a class='_ophorus_btn_order' href='"+_SITE_URL+"ophorus-cmd'><span>Reload the page</span></a>"),$(".__load").hide(),!1):void stripe_oph.exe_cmd()}})})},stripe_oph.exe_cmd=function(){var e=$("input[name=contact_principal_phone]").val(),t=$("input[name=contact_principal_email]").val(),a=$("input[name=contact_principal_city]").val(),o=$("input[name=random_sess]").val(),n=document.getElementById("error-message-cb");stripe.confirmCardPayment(stripe_oph.clientSecret,{payment_method:{card:stripe_oph.cardNumber,billing_details:{address:{city:a=""===a?null:a},name:stripe_oph.cardHolderName.value,phone:e,email:t},metadata:{booking_session:o}},receipt_email:t}).then(function(e){e.error?(stripe_oph.errorMessage.innerText=e.error.message,gsap.fromTo(n,{opacity:0,y:20},{duration:.6,opacity:1,y:0,display:"flex"}),stripe_oph.cardNumber.clear(),stripe_oph.cardCvc.clear(),stripe_oph.cardExpiry.clear(),$("._background_wait").hide()):"succeeded"===e.paymentIntent.status&&($("input[name=amount_stripe]").val(),$(".__load").hide(),$("#payment_valid").show(),stripe_oph.animation.play(),stripe_oph.cardHolderName.value="",stripe_oph.cardNumber.clear(),stripe_oph.cardCvc.clear(),stripe_oph.cardExpiry.clear(),$(".__msg_order").html("Your payment has been validated ! <br> We reserve the chosen product, please wait"),$("input[name=paymentID]").val(e.paymentIntent.id),stripe_oph.form_payment.submit(),setTimeout(function(){$(".__msg_order").html("The creation process is taking a little longer than expected, <br> please be patient...")},1e4),setTimeout(function(){$(".__msg_order").html("The creation of your reservation could not be completed, <br> please contact us by live chat or by email. <br> We apologize for the inconvenience")},2e4),setTimeout(function(){$("._background_wait").hide(),animation.stop(),$("#payment_valid").hide(),window.Tawk_API.maximize()},25e3))})},stripe_oph.checkForm=function(){var t=!0;return $("#form-ophorus-cmd").find("input,select,textarea,checkbox").each(function(){var e;$(this).prop("required")&&("text"===(e=$(this).attr("type"))&&(""===$(this).val()?($(this).addClass("_error_field"),t=!1):$(this).removeClass("_error_field")),"checkbox"===e&&($(this).is(":checked")?$(this).parent().removeClass("_error_field"):($(this).parent().addClass("_error_field"),t=!1)))}),t},stripe_oph.checkPaymentId=function(){""!=$("input[name=paymentID]").val()&&(clearInterval(stripe_oph.intervalInput),stripe_oph.form_payment.submit())},stripe_oph.stripeCB=function(t,e){document.querySelector("."+e);var a=document.getElementById("error-message-cb"),o=a.querySelector(".message");$(".__payment-error").on("click",function(){gsap.to(a,.6,{opacity:0,y:20,display:"none"})});var n={};t.forEach(function(e,t){e.on("change",function(e){e.error?(n[t]=e.error.message,o.innerText=e.error.message,gsap.fromTo(a,{opacity:0,y:20},{duration:.6,opacity:1,y:0,display:"flex"}),$("._background_wait").hide()):(n[t]=null,(e=Object.keys(n).sort().reduce(function(e,t){return e||n[t]},null))?o.innerText=e:gsap.to(a,.6,{opacity:0,y:20,display:"none"}))})}),$(document).on("submit",stripe_oph.form_payment,function(e){e.preventDefault(),stripe.createToken(t[0]).then(function(e){e.error?(document.getElementById("card-errors"),o.innerText=e.error.message,gsap.fromTo(a,.6,{opacity:0,y:20},{opacity:1,y:0,display:"flex"}),$("._background_wait").hide()):function(e){var t=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name","stripeToken"),t.setAttribute("value",e.id),stripe_oph.form_payment.appendChild(t);t=$("input[name=__total_cmd]").val();$("input[name=__montant_stripe]").val(t),stripe_oph.form_payment.submit()}(e.token)})})};var drop=new Object;drop.get_result=!1,drop._id="",drop.init=function(){$(document).on("click",".__close_drop > span",function(){$("._menu_dropdown").removeClass("_show"),drop.get_result=!1,drop.cleanResult(),search.fromMenu=!1}),$(document).on("click","._menu_drop",function(){drop._id=$(this).data("drop"),$(this).hasClass("_menu_drop_search")&&(search.fromMenu=!0),$("._menu_drop").removeClass("_opened"),$(this).addClass("_opened"),$(this).find("input").attr("readonly",!0),$(this).hasClass("_drop_result")?(drop.get_result=!0,drop.putResult()):(drop.get_result=!1,drop.cleanResult()),$("._menu_dropdown").removeClass("_show"),$("._menu_dropdown[data-drop="+drop._id+"]").addClass("_show")}),$(window).on("click",function(e){e.target.matches("._menu_drop")||e.target.matches("._menu_drop > input")||e.target.closest(".--product_hours > .__select_ophorus")||e.target.closest("._menu_dropdown")||($("._menu_dropdown").removeClass("_show"),drop.get_result=!1,search.fromMenu=!1,drop.cleanResult())})},drop.putResult=function(){$(document).on("change","._menu_dropdown[data-drop="+drop._id+"] > .__bl_line > .__ul_checkbox > li > .cc-checkbox-outer > input[type=checkbox]",function(){var a="",o=!1,n=0;$("._menu_dropdown[data-drop="+drop._id+"]").find("input").each(function(e,t){1==$(this).prop("checked")&&(n++,20<(a+=$(this).data("label")+" - ").length&&(a=a.substr(0,20)+" ...   ",o=!0))}),$("._menu_drop[data-drop="+drop._id+"] > input ").val(a.slice(0,-3)),!0===o?$("._menu_drop[data-drop="+drop._id+"]").find("._nb_drop").html(n).show():$("._menu_drop[data-drop="+drop._id+"]").find("._nb_drop").hide()}),$(document).on("click","._menu_dropdown[data-drop="+drop._id+"] > .mCustomScrollBox > .mCSB_container > .__bl_line > .__ul_select > li",function(){var e=$(this).data("label");$(this).data("id");$("._menu_dropdown[data-drop="+drop._id+"] > .mCustomScrollBox > .mCSB_container > .__bl_line > .__ul_select > li").removeClass("_activ"),$(this).addClass("_activ"),$("._menu_drop[data-drop="+drop._id+"] > input ").val(e),$("._menu_dropdown").removeClass("_show"),$("._menu_drop[data-drop="+drop._id+"] > input ").attr("readonly",!1),$(document).off("click","._menu_dropdown[data-drop="+drop._id+"] > .mCustomScrollBox > .mCSB_container > .__bl_line > .__ul_select > li"),drop.get_result=!1,drop.cleanResult()})},drop.cleanResult=function(){$("._menu_drop").removeClass("_opened"),null!=drop._id&&($(document).off("click","._menu_dropdown[data-drop="+drop._id+"] > .__bl_line > .__ul_select > li"),$(document).off("change","._menu_dropdown[data-drop="+drop._id+"] > .__bl_line > .__ul_select > li"),drop._id="")};var cookies={init:function(){$(document).on("click","._add_favorite:not(._liked)",function(e){e.preventDefault();e=$(this).data("id");$(this).addClass("_liked"),$(this).find("small").html("Remove favorite"),$.ajax({url:_SITE_URL+"add-favorite",type:"post",data:{product_id:e},success:function(e){}})}),$(document).on("click","._liked",function(e){e.preventDefault();e=$(this).data("id");$(this).removeClass("_liked"),$(this).find("small").html("Add to favorites"),$.ajax({url:_SITE_URL+"remove-favorite",type:"post",data:{product_id:e},success:function(e){}})});var e="",t=$("main").data("namespace");0<$("input[name=product_id]").length&&(e=$("input[name=product_id]").val()),$.ajax({url:_SITE_URL+"cookies",type:"post",data:{product_id:e,page:t},success:function(e){""!=e&&($(".__last_view_products").html(e),$(".__ophorus_view_products").show(),common.$windowW)}})}},functions={init:function(){$(document).on("click","._send_newsletter",function(e){e.preventDefault(),functions.sendNewsletter()})},sendNewsletter:function(){$.ajax({url:_SITE_URL+"send-newsletter",type:"post",data:{email:$("input[name=newsletter_email]").val()},success:function(e){var t="";"ok"===e?(t="Congrats! <br> You are registered on the Ophorus newsletter",$("input[name=newsletter_email]").val("")):t="You are already registered or this email is not valid",$("._newsletter_msg").html(t).show(),setTimeout(function(){$("._newsletter_msg").hide()},3e3)}})}},transfers={active:!1,init:function(){function t(e){return $("<div class='_line_"+e.type+"'>"+e.text+"</div>")}transfers.active=!0,common.$windowW<768&&$(".__owl_populars").owlCarousel({loop:!0,margin:5,stagePadding:5,mouseDrag:!0,touchDrag:!0,dots:!1,nav:!1,onInitialized:function(e){},responsive:{0:{items:1.5},500:{items:1.8},610:{items:2.5}}}),0<$(".__transfers_results").length&&gsap.to("html,body",{scrollTo:$(".__transfers_results").position().top-70,duration:1,ease:Expo.easeOut,delay:.6}),""!=$("input[name=departure_id]").val()&&transfers.getDestinations($("input[name=departure_id]").val(),$("input[name=departure_type]").val(),!0),$.getJSON(_SITE_URL+"JSON/search_results_transfers.json?v="+search.rand,function(e){$(".js-transfers").select2({data:e,placeholder:"Pick up location",allowClear:!0,templateResult:t})}),$(".js-transfers").on("select2:open",function(e){transfers.cleanDestinations(),setTimeout(function(){$(".select2-results__options").mCustomScrollbar({theme:"purple"})},400)}),$(".js-transfers").on("select2:closing",function(e){$(".select2-results__options").mCustomScrollbar("destroy")}),$(".js-transfers").on("select2:select",function(e){transfers.getDestinations(e.params.data.id,e.params.data.type,!1),$("input[name=departure_id]").val(e.params.data.id),$("input[name=departure_type]").val(e.params.data.type)}),$(".js-transfers").on("select2:clearing",function(e){transfers.cleanDestinations()})},cleanDestinations:function(){$("._menu_drop[data-drop=trans_arrival] > input ").val(""),$("._menu_dropdown[data-drop=trans_arrival] > .mCustomScrollBox > .mCSB_container > .__bl_line").html(""),drop.cleanResult(),$("._menu_dropdown").removeClass("_show"),$("._menu_dropdown[data-drop=trans_arrival]").mCustomScrollbar("destroy")},getDestinations:function(e,t,n){$.ajax({url:_SITE_URL+"get-transfers-arrival",type:"post",data:{departure:e,type:t},beforeSend:function(){},success:function(e){var t,a,o=jQuery.parseJSON(e);1===o.nb?(t=o.list[0].id,e=o.list[0].type,$("input[name=arrival_id]").val(t),$("input[name=arrival_type]").val(e),$("input[name=_arrival_input]").val(o.list[0].name)):(a='<ul class="__ul_select">',jQuery.each(o.list,function(e,t){null!=t.id&&(t.disable?a+='<li class="_disabled _line_'+t.type+'"><div class="_title"><span>'+t.name+"</span></div></li>":a+='<li class="_line_'+t.type+'" data-type="'+t.type+'" data-id="'+t.id+'" data-label="'+t.name+'" ><div class="_title"><span>'+t.name+"</span></div></li>",jQuery.each(t,function(e,t){null!=t.type&&(a+='<li class="_line_'+t.type+'" data-type="'+t.type+'" data-id="'+t.id+'" data-label="'+t.name+'" ><small>'+t.name+"</small></li>")}))}),a+="</ul>",!1===n&&$("._menu_drop[data-drop=trans_arrival] > input ").val(""),$("._menu_dropdown[data-drop=trans_arrival] > .__bl_line").html(a),$("._menu_dropdown[data-drop=trans_arrival]").mCustomScrollbar({theme:"purple",mouseWheel:{scrollAmount:250}}))}});$("._menu_dropdown[data-drop=trans_arrival] > .mCustomScrollBox > .mCSB_container > .__bl_line > ul > li");$(document).on("click","._menu_dropdown[data-drop=trans_arrival] > .mCustomScrollBox > .mCSB_container > .__bl_line > ul > li",function(){var e=$(this).data("id"),t=$(this).data("type");$("input[name=arrival_id]").val(e),$("input[name=arrival_type]").val(t)})},check:function(e){var t=$("input[name=departure_id]").val(),a=$("input[name=arrival_id]").val();return""!==t&&""!==a},product:function(){0<$("input[name=product_roundtrip_price]").length&&(product.roundTripPrice=$("input[name=product_roundtrip_price]").val(),transfers.check_choice());var e="09:00";"TRANSFER"==product.type&&0<$("input[name=time_transfer_01]").length&&(e=""),0<$("input[name=basket_extras]").length&&transfers.prepare_extras(),$("._time_prefer").flatpickr({enableTime:!0,noCalendar:!0,allowInput:!1,defaultDate:e,dateFormat:"H:i",hourIncrement:1,minuteIncrement:15,time_24hr:!1,onOpen:function(e,t,a){!0===mobile.state&&($("html,body").css("overflow","hidden"),$(".__modal_calendar_mobile_hours").addClass("_show"),$(".flatpickr-calendar.hasTime").hide(),$(".flatpickr-calendar.hasTime.open").addClass("inline").removeAttr("style").detach().appendTo(".__modal_calendar_mobile_hours > ._contain"))},onChange:function(e,t,a){}}),$("input.flatpickr-hour").attr("readonly",!0),$("input.flatpickr-minute").attr("readonly",!0),0<$("input[name=product_roundtrip]").length&&(product.roundTrip=$("input[name=product_roundtrip]").val(),product.roundTripSave=$("input[name=product_roundtrip]").val()),$(document).on("change","input[name=transfer_choice]",function(){"RT"===$(this).val()?$("._transfer_return_parameters").show():(product.roundTrip=!1,$("._transfer_return_parameters").hide()),product.getPrice(),product.checkBtnBooking()}),$(document).on("click","button._extra",function(){var e=$(this).data("extra-id"),t=$("input[name='extra["+e+"]']"),a=$("button._plus._extra[data-extra-id="+e+"]");transfers.add_extra(e,t,a)}),$(document).on("click",".__add_extra",function(){var e=$(this),t=e.data("extra-id");transfers.add_extra(t,e)})},check_choice:function(){"RT"===$("input[name=transfer_choice]:checked").val()&&($("._transfer_return_parameters").show(),product.roundTrip=$("input[name=product_roundtrip]").val())},add_extra:function(e,a,t){var o=0;"TOTAL"===product.type_price&&(o=$("input[name=fixed_price]").val());var n=0;$("input[data-op]").not(".__extra_opt").each(function(){n+=parseInt($(this).val())});var i="false";a.hasClass("_selected")&&(i="true");var s=[],r={};r.id=e,r.price=a.data("price"),r.type_extra=a.data("type"),r.label=a.data("label"),r.value=null,"ANY"===r.type_extra&&(r.value=parseInt($("input[name='extra["+r.id+"]']").val()),0===r.value&&(i="true"),parseInt(product.maxQuantity)===parseInt(r.value)?t.addClass("_disabled").attr("disabled","disabled"):t.removeClass("_disabled").removeAttr("disabled")),s.push(r),$.ajax({url:_SITE_URL+"add-extra",type:"post",data:{extras:s,product_id:product.id,product_roundTrip:product.roundTrip,product_type:product.type_price,product_price:o,nb_pers:n,remove:i},beforeSend:function(){},success:function(e){var t=jQuery.parseJSON(e),e="<span>€ "+t.total_price+'</span><small class="_single">Total price - Taxes inc.</small>';$(".--price_total").html(e).show(),$(".__price_mobile").hide(),$(".__price_total_mobile > ._contain").html(e),0<t.nb?$(".--transfer-extras").show().html(t.extras):$(".--transfer-extras").hide(),"ANY"===r.type_extra?0===r.value?$(".--extras-list >li[data-extra-id="+r.id+"]").removeClass("__selected"):$(".--extras-list >li[data-extra-id="+r.id+"]").addClass("__selected"):(t="Remove stop","true"===i?(t="Add a stop or Extra",a.removeClass("_selected"),$(".--extras-list >li[data-extra-id="+r.id+"]").removeClass("__selected")):(a.addClass("_selected"),$(".--extras-list >li[data-extra-id="+r.id+"]").addClass("__selected")),a.find("span").html(t))}})},prepare_extras:function(){$.ajax({url:_SITE_URL+"get-extras",type:"post",data:{product_id:product.id},beforeSend:function(){},success:function(e){e=jQuery.parseJSON(e);0<e.nb?$(".--transfer-extras").show().html(e.extras):$(".--transfer-extras").hide()}})}},forms=new Object;function onSubmit(e){(0<$("#ophorus_form").length?document.getElementById("ophorus_form"):document.getElementById("ophorus-product")).submit()}forms.checkContact=function(){};var cmd={activ:!(forms.init=function(){$(document).on("click","._checkbox_uniq > input",function(){var e=$(this).attr("name");$("input[name="+e+"]").not(this).prop("checked",!1)})})};cmd.header_height,cmd.bottom_position,cmd.recap_width,cmd.securitycode=document.getElementById("_card_ccv"),cmd.expirationdate=document.getElementById("_card_expiry"),cmd.cardnumber=document.getElementById("_card_number"),cmd.step=0,cmd.iti,cmd.init=function(){var e;cmd.activ=!0,cmd.recap_width=$("._ophorus_cmd_recap").width(),cmd.header_height=$(".__ophorus_header").height(),cmd.bottom_position=$("._contain_summary").offset().top+$("._contain_summary").height(),0<$("#_p_phone").length&&(e=document.querySelector("#_p_phone"),cmd.iti=window.intlTelInput(e,{showSelectedDialCode:!0,utilsScript:_SITE_URL+"js/PLUGINS/intel-input/build/js/utils.js"})),$("._ophorus_cmd_recap").css("width",cmd.recap_width),cmd.checkavaibility(),$(document).on("click","._view_recap_details",function(){$("._hide_mobile").toggleClass("_open"),$("._hide_mobile").hasClass("_open")?$("._view_recap_details").html("Hide details"):$("._view_recap_details").html("View details")}),$(document).on("click","._refresh_page",function(){location.reload()}),$("._section_cmd").each(function(e,t){$(t).hasClass("_activ")&&$(t).find(".__content_cmd").slideDown(600,function(){})}),$(document).on("click","._ophorus_btn_order",function(){var e=$(this).data("step"),t=$(this).data("step-billing"),a=$(this).data("step-infos"),o=!0;!0===t&&(o=cmd.checkBilling()),!0===(o=!0===a?cmd.checkInfos():o)&&($("._section_cmd").removeClass("_activ"),$("._section_cmd[data-step="+e+"] > .__content_cmd").slideUp(),$("._section_cmd[data-step="+e+"]").addClass("_validate"),e++,$("._section_cmd[data-step="+e+"]").addClass("_activ"),$("._section_cmd[data-step="+e+"] > .__content_cmd").slideDown(600,function(){gsap.to(window,{duration:1,scrollTo:{y:$("._section_cmd[data-step="+e+"]"),offsetY:100}})}),cmd.step=e)}),$(document).on("click","._section_cmd._validate",function(){var o=$(this).data("step");$("._section_cmd").not(this).removeClass("_activ"),$("._section_cmd").not(this).find(".__content_cmd").slideUp();var e=$(this);$("._section_cmd").not(this).each(function(e,t){var a=$(t).data("step");o<a&&$(t).removeClass("_validate")}),e.removeClass("_validate").addClass("_activ"),e.find(".__content_cmd").slideDown(600,function(){gsap.to(window,{duration:1,scrollTo:{y:e,offsetY:100}})}),cmd.step=o}),$(document).on("focus","._error_required",function(){$(this).removeClass("_error_required"),$(this).parent().find("._error_msg").remove()}),$(document).on("click",".__open_form_code",function(){$(".__form_promotion").toggleClass("_open"),$("._unvalid").hide(),$(".__form_promotion").hasClass("_open")?$(".__open_form_code").hide():$(".__open_form_code").show()}),$(document).on("click","._close_promo",function(){$(".__form_promotion").removeClass("_open"),$(".__open_form_code").css("display","block"),$("._unvalid").hide()}),$(document).on("click",".__bnt_order",function(e){$("._background_wait").find("span").html("Your order is being processed, please wait"),$("._background_wait").addClass("_cmd").show()})},cmd.checkBilling=function(){var e=$(".__content_detail[data-step-billing=true]").find("input"),a=!0;return e.each(function(e,t){!0===$(t).prop("required")&&(""===$(t).val()?(a=!1,$(t).addClass("_error_required"),$(t).parent().append("<div class='_error_msg'>This field is required</div>")):"email"===$(t).prop("type")&&!1===cmd.isMail($(t).val())&&(a=!1,$(t).addClass("_error_required"),$(t).parent().append("<div class='_error_msg'>This email is not valid</div>")));$(t).data("type")}),!0===a&&($("input[name=contact_principal_phone]").val(cmd.iti.getNumber()),e=$(".__content_detail[data-step-billing=true]").find("input").serialize(),$.ajax({url:_SITE_URL+"save-cmd",type:"post",data:{fields:e},beforeSend:function(){},success:function(e){return $(".load-more").text("Loading...").show(),!1}})),a},cmd.checkInfos=function(){var e=$(".__content_detail[data-step-infos=true]").find("input,select,textarea"),a=!0;return e.each(function(e,t){!0===$(t).prop("required")&&(""===$(t).val()||!1===$(t).prop("checked")?(a=!1,"checkbox"!=$(t).prop("type")?($(t).addClass("_error_required"),$(t).parent().append("<div class='_error_msg'>This field is required</div>")):$(t).parent().addClass("_error_required")):"email"===$(t).prop("type")&&!1===cmd.isMail($(t).val())&&(a=!1,$(t).addClass("_error_required"),$(t).parent().append("<div class='_error_msg'>This email is not valid</div>")))}),!0===a&&cmd.save_cmd_infos(),a},cmd.checkavaibility=function(){$.ajax({url:_SITE_URL+"check-avaibility",type:"POST",success:function(e){console.log(e),""!=e&&(e=jQuery.parseJSON(e),jQuery.each(e,function(e,t){$(".__prod[data-product="+t.product_id+"]").remove()}),$("._product_non_availables").css("display","flex"))}})},cmd.save_cmd_infos=function(){var e=$(".__content_detail[data-step-infos=true]").find("input,select,textarea").serialize(),t=$("input[name=contact_principal_email]").val(),a=$("input[name=contact_principal_name]").val();$.ajax({url:_SITE_URL+"save-cmd-infos",type:"post",data:{fields:e,email:t,name:a},beforeSend:function(){},success:function(e){$("input[name=random_sess]").val(e)}})},cmd.isMail=function(e){return!!/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)},cmd.isphone=function(e){return!!e.match(/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im)};var blog={init:function(){var o,n;common.$windowW<768&&(o=$(".__owl_nav_blog"),n=0,o.owlCarousel({items:2,margin:5,stagePadding:5,mouseDrag:!0,touchDrag:!0,dots:!1,nav:!1,autoWidth:!0,onInitialized:function(e){var t=$(e.target).find(".owl-stage").width();$(e.target).find(".owl-stage").css("width",t+150),$(".__owl_nav_blog").find(".owl-item").each(function(e){n++,$(this).attr("data-nb",n)});var a=$(".__owl_nav_blog").find("a._activ").parent().data("nb");setTimeout(function(){o.trigger("to.owl.carousel",a-1)},500)},responsive:{0:{},600:{}}}))}},about={};home.grid,home.slide_nb,home.dest_actual,about.owl,about.owl_guides,about.init=function(){var e=$(".__owl_team");e.children().each(function(e){$(this).attr("data-position",e)}),e.owlCarousel({loop:!0,autoplay:!1,mouseDrag:!1,touchDrag:!1,center:!0,nav:!0,dots:!1,navText:['<div><svg><use xlink:href="#__ic_arrow_nav"/></svg></div>','<div><svg class="_inverse"><use xlink:href="#__ic_arrow_nav"/></svg></div>'],autoplayHoverPause:!0,responsive:{0:{touchDrag:!0,items:1},600:{touchDrag:!0,items:4},1500:{items:4},1700:{items:5}}});var t=$(".__owl_guides");t.children().each(function(e){$(this).attr("data-position",e)}),t.owlCarousel({loop:!0,autoplay:!1,mouseDrag:!1,touchDrag:!1,center:!0,nav:!0,dots:!1,navText:['<div><svg><use xlink:href="#__ic_arrow_nav"/></svg></div>','<div><svg class="_inverse"><use xlink:href="#__ic_arrow_nav"/></svg></div>'],autoplayHoverPause:!0,responsive:{0:{touchDrag:!0,items:1},600:{touchDrag:!0,items:4},1500:{items:4},1700:{items:5}}}),$(document).on("click",".owl-item>div",function(){("team"===$(this).parent().parent().parent().parent().data("type")?e:t).trigger("to.owl.carousel",[$(this).data("position"),800])}),$(window).on("blur",function(){$(".owl-carousel").trigger("stop.owl.autoplay")});var a=$(".__owl_blog"),o=$(".__feeds");common.$windowW<768&&(a.owlCarousel({items:2,margin:5,stagePadding:5,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,responsive:{0:{items:1,margin:5,stagePadding:0},600:{items:1.3},700:{items:2}}}),o.owlCarousel({items:2,margin:0,stagePadding:5,mouseDrag:!1,touchDrag:!0,dots:!1,nav:!1,responsive:{0:{items:1.2,margin:5,stagePadding:0},600:{items:2,stagePadding:20,margin:0},700:{items:3,stagePadding:20}}}))};var mobile=new Object;mobile.step=998,mobile.state=!1,mobile.searchFrom,mobile.destination_url,mobile.init=function(){common.$windowW<=mobile.step&&(mobile.state=!0),$(document).on("click","._basket",function(){$(".__module_basket").toggle()}),$(document).on("click","._close_basket",function(){$(".__module_basket").hide()}),search.participants(!0),$(document).on("click","._close_modal,.__save_modal",function(){mobile.closeModal()}),$(document).on("click",".__open_modal_search",function(){Tawk_API.hideWidget(),$("html,body").css("overflow","hidden");var e=$(this).data("type");mobile.searchFrom=$(this).data("from"),$(".__modal_search").addClass("_show"),$("._modal_bloc[data-type="+e+"]").addClass("_show"),"destination"===e&&$("input[name=_contain_destination]").focus()}),$.getJSON(_SITE_URL+"JSON/search_results_destinations.json?v="+search.rand,function(e){$.each(e,function(e,t){search.array_destination.push(t)})}),$(document).on("click","._validate_destination",function(){mobile.closeModal(),"home"===mobile.searchFrom&&(document.location=mobile.destination_url)}),$(document).on("click","._clear_destination",function(){$("input[name=destination_id]").val(""),$("input[name=destination_type]").val(""),$("input[name=__search_destination]").val(""),$("input[name=_contain_destination]").val(""),$("._btn_dest").hide(),$("input[name=_contain_destination]").focus()}),Awesomplete.$$("input._autocomplete").forEach(function(e){var t=search.array_destination;new Awesomplete(e,{list:t,minChars:0,maxItems:12,class:"_test",sort:Awesomplete.SORT_BYORDER,replace:function(e){this.input.value=e.title}});e.offsetWidth;t=$(".awesomplete > input").position();$(".awesomplete > ul").css("left",t.left),$(".awesomplete > ul").css("top",t.top+43),e.addEventListener("awesomplete-close",function(e){"blur"===e.reason&&($("input[name=destination_id]").val(""),$("input[name=destination_type]").val(""),$("input[name=__search_destination]").val(""))},{passive:!0}),e.addEventListener("awesomplete-select",function(e){mobile.destination_url=e.text.url,$("input[name=destination_id]").val(e.text.id),$("input[name=destination_type]").val(e.text.type),$("input[name=__search_destination]").val(e.text.title),$("._btn_dest").show()},{passive:!0})}),$("._calendar_mobile").flatpickr({nextArrow:'<svg><use xlink:href="#__ic_arrow_fleche"/></svg>',inline:!0,mode:"single",minDate:"today",dateFormat:"M j, Y",position:"auto center",locale:{firstDayOfWeek:1},onReady:function(e,t,a){},onChange:function(e,t,a){$("input[name=__search_date]").val(t),mobile.closeModal()}}),$(document).on("click",".--submit_search",function(e){return e.preventDefault(),0!=search.check(!0)?search.submit(!0):alert("No results with the filters"),!1})},mobile.closeModal=function(){$(".__modal_search").removeClass("_show"),$("._modal_bloc").removeClass("_show"),$("html,body").css("overflow","auto").removeClass("_overflow"),Tawk_API.showWidget(),$("html,body").css("overflow","auto")},mobile.loadDestinations=function(){$(".js-destinations-mobile").select2({selectionCssClass:"mobile_drop",placeholder:'<svg><use xlink:href="#__ic_destination"/></svg>Destination',allowClear:!0,escapeMarkup:function(e){return e},templateResult:function(e){return $("<div class='_line_VI'>"+e.text+"</div>")}}),$(".js-destinations-mobile").on("select2:open",function(e){setTimeout(function(){$(".select2-results__options").mCustomScrollbar({theme:"purple"})},200)}),$(".js-destinations-mobile").on("select2:selecting",function(e){$("input[name=__search_destinations]").val(e.params.args.data.id)})};var others={init:function(){galerie.lightbox(),onglet.init();var e=(new Date).fp_incr(2);$("._calendar_contact").flatpickr({altInput:!0,nextArrow:'<svg><use xlink:href="#__ic_arrow_fleche"/></svg>',prevArrow:'<svg class="_inverse"><use xlink:href="#__ic_arrow_fleche"/></svg>',altFormat:"M j, Y",mode:"range",dateFormat:"Y-m-d",minDate:e,defaultDate:[e,e],position:"auto center",onChange:function(e,t,a){2===e.length?($("input[name=date_deb]").val(dayjs(e[0]).format("YYYY-MM-DD")),$("input[name=date_end]").val(dayjs(e[1]).format("YYYY-MM-DD"))):(1===e.length?($("._calendar_search").val(t),$("input[name=date_deb]").val(t)):$("input[name=date_deb]").val(""),$("input[name=date_end]").val(""))}})}},faq=new Object;faq.init=function(){$(document).on("click",".__block_faq > h3",function(){$(this).hasClass("_open")?$(this).next().slideUp():$(this).next().slideDown(400,function(){var e=$(this).offset();gsap.to($("html,body"),{duration:1,ease:Expo.easeOut,scrollTo:e.top-300})}),$(this).toggleClass("_open"),$(".__block_faq > h3._open").not(this).removeClass("_open").next().slideUp()})};var partners=new Object;partners.init=function(){$(document).on("click","._cat_partners",function(){$(this).hasClass("_open")?$(this).next().slideUp():$(this).next().slideDown(400,function(){var e=$(this).offset();gsap.to($("html,body"),{duration:1,ease:Expo.easeOut,scrollTo:e.top-300})}),$(this).toggleClass("_open"),$("._cat_partners._open").not(this).removeClass("_open").next().slideUp()})};var swiper={load:function(e,t,a,o,n){if(!0===o&&!1===n&&768<common.$windowW)return!1;e=new Swiper(t,{direction:"horizontal",loop:!0,slidesPerView:a,speed:1300,autoplay:{delay:1800,disableOnInteraction:!0},breakpoints:{0:{slidesPerView:1.2,spaceBetween:3,autoplay:!1,speed:500,pagination:!1},600:{slidesPerView:2.2,spaceBetween:5,autoplay:!1,speed:500,pagination:!1},760:{slidesPerView:2.5,spaceBetween:5,speed:500,autoplay:!1},992:{slidesPerView:3.5,spaceBetween:5,autoplay:!1},1200:{slidesPerView:4,spaceBetween:5},1450:{slidesPerView:5,spaceBetween:10}},pagination:{el:".__swiper_nav",bulletClass:"_bullet_nav",bulletActiveClass:"_bullet_nav_activ",clickable:!0}});$(".swiper-container").hover(function(){e.autoplay.stop()},function(){e.autoplay.start()})}},survey=new Object;survey.init=function(){$(document).on("mouseover","._rating > span",function(){var e=$(this).data("n");$("input[name=booking_rating]").val(e),$("._rating >span").removeClass("_hov");for(var t=1;t<e+1;t++)$("._rating >span[data-n="+t+"]").addClass("_hov")}),$(document).on("click","input[name=_tour]",function(){$(this).is("#_tour_03")?$("li[data-id=_tour]").show():$("li[data-id=_tour]").hide()}),$(document).on("click","input[name=_guide]",function(){$(this).is("#_guide_03")?$("li[data-id=_guide]").show():$("li[data-id=_guide]").hide()})};var _full={};_full.move,_full.nb_slide=0;var player,blazy="",_dev=!1,_in_dev=!0,_consent_cookies=!0,_reval_played_first=!1;window.addEventListener("load",function(){console.log("Page load in "+performance.now()/1e3+" s");var e=new Date;console.log("%c Made By Kalfeutre ","background: #000; font-size:1.2em;padding:5px;color: #CAB377"),console.log("%c"+e.getFullYear()+" - www.kalfeutre.fr","background: #000; font-size:1em;padding:5px 10px;color: #CAB377")},!1),$(window).on("beforeunload",function(){$(window).scrollTop(0)}),$(document).ready(function(){0<$("#stripe_ready").length&&(e=$("input[name=_stripe]").val(),stripe_oph.init(e));navigator.userAgent;$("a").hover(function(e){$(this).attr("title","")}),common.getWINDOW(),common.getSize(),common.$windowW<=mobile.step?mobile.state=!0:mobile.state=!1,$("body").hasClass("_is_mobile"),common.init();var e;window.devicePixelRatio;!1===_dev&&(console.log=function(){}),!1===mobile.state&&($(".__custom_scroll").mCustomScrollbar({theme:"purple",mouseWheel:{scrollAmount:250}}),$(".__custom_scroll_white").mCustomScrollbar({theme:"white",mouseWheel:{scrollAmount:250}})),0<$(".__send_success").length&&(e=$(".__send_success").offset().top,gsap.to($("html,body"),{scrollTo:e-100,delay:1,duration:1.6,ease:Expo.easeOut})),$(window).on("debouncedresize",function(){common.getWINDOW(),(common.$windowW<=mobile.step&&!1===mobile.state||common.$windowW>mobile.step&&!0===mobile.state)&&$("._background_wait").show(),common.getSize()});window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;menu.init(),drop.init(),functions.init(),forms.init(),(!0===mobile.state?mobile:search).init(),0<$(".__ophorus_home").length&&home.init(),0<$(".__ophorus_package").length&&product_package.init(),0<$(".__ophorus_product").length&&product.init(),0<$(".__ophorus_results").length&&results.init(),0<$(".__ophorus_transfers").length&&transfers.init(),0<$(".--cmd").length&&cmd.init(),0<$(".__ophorus_blog").length&&blog.init(),0<$(".__ophorus_about").length&&about.init(),0<$(".__ophorus_others").length&&others.init(),0<$(".__ophorus_faq").length&&faq.init(),0<$(".__ophorus_partners").length&&partners.init(),0<$(".__ophorus_page_newsletter").length&&newsletter.init(),0<$(".__ophorus_survey").length&&survey.init(),$("form,input,select,textarea").attr("autocomplete","off"),$(document).on("click",".js-social-share",function(e){var t=$(this).attr("href"),a=null!=window.screenLeft?window.screenLeft:screen.left,o=null!=window.screenTop?window.screenTop:screen.top,n=window.innerWidth||document.documentElement.clientWidth||screen.width,i=window.innerHeight||document.documentElement.clientHeight||screen.height;window.open(t,"","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=500,height=300,top="+(i/2-150+o)+",left="+(n/2-250+a)),e.preventDefault()}),$("input[type='tel']").keyup(function(){$(this).val($(this).val().replace(/^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})+$/,"$1 $2 $3 $4 $5"))}),$(document).on("mouseenter",".js-btn",function(e){var t=$(this).offset(),a=e.pageX-t.left,t=e.pageY-t.top;$(this).find("._mask").css({top:t,left:a})}),$(document).on("mouseleave",".js-btn",function(e){var t=$(this).offset(),a=e.pageX-t.left,t=e.pageY-t.top;$(this).find("._mask").css({top:t,left:a})}),$(document).on("click","._view_pwd",function(){$(this).toggleClass("_view"),"password"==$(this).prev("input").attr("type")?cmd.switchPWD($(this).prev("input"),"text"):cmd.switchPWD($(this).prev("input"),"password")}),$(document).on("submit","._form_captcha",function(e){return 0==grecaptcha.getResponse().length?(alert("Merci de confirmer que vous n'êtes pas un robot !"),e.preventDefault(),!1):void $("._form_captcha").submit()})});