$(document).ready(function(){function e(e){$(e).each(function(){var e=$(this);e.isOnScreen()&&!e.hasClass("enabled")&&e.addClass("enabled")})}$(this).scrollTop(0);var i={varBannerHeight1:0,varBannerHeight2:0,varScroll1:$(window).height()-185,varScroll2:$(window).height(),scrollFixedOffset:180,roomContainerOffsetTop:135};gc.website.init(i);var a=gc.website.getData(),r=gc.website.getHtmlNodes();if(r.bodyNode.hasClass("homepage")&&r.hasNoBanner&&"Location"!=a.pages.current||(r.bodyNode.addClass("scrolling"),r.bodyNode.addClass("scroll1"),r.bodyNode.addClass("scroll2")),"Gallery"==a.pages.current){if(r.browserWidth>992){$("#pg").width()/4-4}if(r.browserWidth<=992){$("#pg").width()/3-4}if(r.browserWidth<768){$("#pg").width()/2-4}if(r.browserWidth<640){$("#pg").width()/1-4}gc.website.galleryUnite("tiles",{tiles_justified_space_between:10,tiles_type:"justified"})}if("Location"==a.pages.current&&gc.website.movingGoogleMaps(),"Rooms"==a.pages.current){$(".roomContainer").addClass("col-lg-12 col-md-12 col-sm-12 col-xs-12");var t=$(".roomName h2:contains('Villa')");r.bodyNode.hasClass("lang-pt")&&(t=$(".roomName h2:contains('Villa')")),$("#c1 .roomContainer").addClass("col-lg-6 col-md-6 col-sm-6 col-xs-12"),t.closest(".roomContainer").appendTo("#c2 .holder"),$("#c2 .holder .roomContainer").wrapAll('
'),$("#c2 .roomContainer").addClass("col-lg-4 col-md-6 col-sm-6 col-xs-12"),gc.website.mod01roomContainer(),gc.website.roomSlide($(this))}"Offers"==a.pages.current&&($(".roomContainer").addClass("col-lg-6 col-md-6 col-sm-12 col-xs-12"),gc.website.mod01roomContainer(),gc.website.roomSlide($(this))),$(".imagelinkgadget.video").click(function(){var e=$(this).find("img").attr("id");_imageLinkGadget.showVideo(e)}),$(".navigation li").each(function(e){$(this).addClass("nav"+e)});var s=$("#subscribe_newsletter_form").find("input[name='femail']");if(s.focusout(function(){s.filter(function(){var e=s.val(),i=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;i.test(e)?s.parent().removeClass("error"):s.parent().addClass("error")})}),$("#subscribe_newsletter_form").submit(function(e){s.val()||(s.parent().addClass("error"),e.preventDefault())}),r.bodyNode.hasClass("pre-arrival-form")&&($("#arrival").datepicker({dateFormat:"mm-dd-yy",onClose:function(e){var i=e.split("-"),a=new Date(i[2]+"/"+i[1]+"/"+(+i[0]+30));$("#departure").datepicker("option","minDate",a)}}),$("#departure").datepicker({dateFormat:"mm-dd-yy"}),$("#anniversary").datepicker({dateFormat:"mm-dd-yy"}),$("#birthday").datepicker({dateFormat:"mm-dd-yy"}),$("#adults, #children").change(function(){var e=parseInt($("#adults").val())+parseInt($("#children").val()-1),i=$(".guestsNames");$(".clone").remove();for(var a=0;a992){var l=$(window);$.fn.isOnScreen=function(){var e={};e.top=l.scrollTop(),e.bottom=e.top+l.height();var i={};return i.top=this.offset().top,i.bottom=i.top+this.outerHeight(),i.top<=e.bottom&&i.bottom>=e.top},e(".roomContainer"),l.scroll(function(){e(".roomContainer")})}if($(".hotel-rooms .roomName h2").lettering("words"),$(".hotel-rooms #c2 .roomName h2").lettering("words"),r.bodyNode.hasClass("homepage")&&r.browserWidth>992){var o=$(".imagelinkgadget.slide"),n=$(".imagelinkgadget.quote");if($("#c1").find(o).length>0&&$("#c1").find(o).wrapAll(""),$("#c2").find(o).length>0&&$("#c2").find(o).wrapAll(""),$("#c1").find(n).length>0&&$("#c1").find(n).wrapAll(""),$("#c2").find(n).length>0&&$("#c2").find(n).wrapAll(""),$("#c3").find(n).length>0&&$("#c3").find(n).wrapAll(""),$("#c1 .holder").children().length>0&&$("#c1").addClass("section"),$(".imagelinkgadget.medium").length>0)for(var d=$(".imagelinkgadget.medium"),c=0,m=d.length;c');if($(".imagelinkgadget.mediumhalf").length>0)for(var g=$(".imagelinkgadget.mediumhalf"),c=0,m=g.length;c');if($(".imagelinkgadget.small").length>0)for(var p=$(".imagelinkgadget.small"),c=0,m=p.length;c');if($(".imagelinkgadget.smaller").length>0)for(var h=$(".imagelinkgadget.smaller"),c=0,m=h.length;c');$.fn.changeElementType=function(e){var i={};$.each(this[0].attributes,function(e,a){i[a.nodeName]=a.nodeValue}),this.replaceWith(function(){return $("<"+e+"/>",i).append($(this).contents())})},$(".imagelinkgadget.large").length>0&&$(".large").changeElementType("section"),$(".imagelinkgadget.mediumlarge").length>0&&$(".mediumlarge").changeElementType("section"),$(".imagelinkgadget.mediumsmall").length>0&&$(".mediumsmall").changeElementType("section"),$(".section").wrapAll(""),$("#fullpage").insertBefore($("#contentblock")),$("#fullpage").fullpage({verticalCentered:!0,css3:!1,navigation:!0,navigationPosition:"right",slidesNavigation:!0,afterRender:function(){setInterval(function(){$.fn.fullpage.moveSlideRight()},8e3)}})}else(!r.bodyNode.hasClass("homepage")||r.bodyNode.hasClass("homepage")&&r.browserWidth<992)&&($("#c1 .image").wrapAll(""),$("#c2 .image").wrapAll(""),$("#c1 .quote").wrapAll(""),$("#c2 .quote").wrapAll(""),$("#c3 .quote").wrapAll(""),$("#slide, #slide2, #slide3, #qslide, #qslide2, #qslide3").bxSlider({minSlides:1,maxSlides:1,moveSlides:1,auto:!0}),$(".quote").parents(".bx-wrapper").addClass("Quo"),$(".bx-wrapper.Quo .bx-viewport").css("height",r.browserHeight/2));if($(".imagelinkgadget").each(function(){$(this).hasClass("slide")||($("").appendTo($(this).find(".imgImageWrapper")).css("background-image",'url("'+$(this).find(".imgImageWrapper").find("img").attr("src")+'")'),$(this).find(".imgImageWrapper").find("img").css("display","none"))}),"Homepage"==a.pages.current){var u=new Instafeed({get:"user",userId:"2332645289",clientId:"462fa8ad16cf44eda7518ac8992ce5d2",accessToken:"2332645289.462fa8a.0f8ed634e61344c5bbb38542a68833c6",resolution:"standard_resolution",template:'♥ {{likes}}',sortBy:"most-recent"});u.run()}for(var f=$(".press.col-md-3"),c=0;c");var v=setInterval(function(){$("#c1 .team").length>0&&(clearInterval(v),$("#c1 .team").wrapAll("")),$("#c2 .team").length>0&&(clearInterval(v),$("#c2 .team").wrapAll("")),$("#c3 .team").length>0&&(clearInterval(v),$("#c3 .team").wrapAll(""))},500),w=setInterval(function(){$("#c1 .navigator").length>0&&(clearInterval(w),$("#c1 .navigator").wrapAll("")),$("#c2 .navigator").length>0&&(clearInterval(w),$("#c2 .navigator").wrapAll("")),$("#c3 .navigator").length>0&&(clearInterval(w),$("#c3 .navigator").wrapAll(""))},500);if("Homepage"==a.pages.current&&r.browserWidth>=768){var b=[{videoURL:"-t8cE0oEIpw",containment:"self",autoPlay:!0,mute:!0,startAt:0,opacity:1,loop:!1,ratio:"auto",showYTLogo:!1}];$("#videoTest").YTPlaylist(b,!0),$(".view").click(function(){$("body").addClass("skipped"),$("#videoTest").YTPPlay(),$("#wrappervideo").css("visibility","visible")}),$(".skip").click(function(){$("body").addClass("skipped"),$("#wrappervideo").css("visibility","hidden"),$("#videoTest").YTPStop()}),$("#videoTest").on("YTPEnd",function(e){e.time;$("#wrappervideo").css("visibility","hidden")}),"block"==$("#wrappervideo").css("display")&&$("body").css("overflow-y","hidden"),$(".video_unmute").click(function(){$(this).is(".on")?($(this).removeClass("on"),jQuery("#videoTest").YTPMute()):($(this).addClass("on"),jQuery("#videoTest").YTPUnmute())})}$(".toggle").click(function(){r.bodyNode.toggleClass("menuOpened"),$(".secondarymenu").toggleClass("menuOpened")});var C=function(){r.hasNoBanner&&"Location"!=a.pages.current||r.contentBlock.css("margin-top",r.browserHeight+"px");var e=r.browserHeight,i=r.browserHeight/2;r.browserWidth>=768?($(".large .imgImageWrapper, .large .imgContentWrapper").css("height",e+"px"),$(".mediumlarge .imgImageWrapper, .mediumlarge .imgContentWrapper").css("height",e+"px"),$(".mediumsmall .imglinkWrapper").css("height",e+"px"),$(".slide .imgImageWrapper, .slide .imgContentWrapper").css("height",e+"px"),$(".quote .imglinkWrapper, .quote .imgContentWrapper").css("height",i+"px"),$(".bx-wrapper .bx-viewport").css("height",e+"px"),$(".medium .imgImageWrapper, .medium .imgContentWrapper").css("height",e+"px"),$(".mediumhalf .imgImageWrapper, .mediumhalf .imgContentWrapper").css("height",i+"px"),$(".small .imgImageWrapper, .small .imgContentWrapper").css("height",e+"px"),$(".smaller .imgImageWrapper, .smaller .imgContentWrapper").css("height",i+"px")):($(".large .imgImageWrapper, .large .imgContentWrapper").css("height","420px"),$(".mediumlarge .imgImageWrapper, .mediumlarge .imgContentWrapper").css("height","420px"),$(".mediumsmall .imglinkWrapper").css("height","500px"),$(".slide .imgImageWrapper, .slide .imgContentWrapper").css("height","420px"),$(".quote .imglinkWrapper, .quote .imgContentWrapper").css("height","420px"),$(".bx-wrapper .bx-viewport").css("height","420px"),$(".medium .imgImageWrapper, .medium .imgContentWrapper").css("height","420px"),$(".small .imgImageWrapper, .small .imgContentWrapper").css("height","420px"),$(".smaller .imgImageWrapper, .smaller .imgContentWrapper").css("height","420px"))};C(),$(window).resize(function(){C()})});