function cover_fixcontentheight(id,isOrientationChange){var el=$("#rec"+id),hcover=el.find(".t-cover").height(),hcontent=el.find("div[data-hook-content]").outerHeight();if(hcontent>300&&hcover0&&(console.log("correct video from cover_fixcontentheight"),setWidthHeightYoutubeVideo(divvideo,hcontent+"px")),divvideo.find("video").length>0&&console.log("correct html5video from cover_fixcontentheight")}),2e3),cover_updateResizeElem(el);else if(window.isMobile&&isOrientationChange)cover_setRecalculatedCoverHeight(el,hcontent),cover_updateResizeElem(el);else if(window.isMobile&&"100vh"===el.find(".t-cover__carrier").attr("data-content-cover-height")){var height=window.innerHeight;el.find(".t-cover").height(height),el.find(".t-cover__filter").height(height),el.find(".t-cover__carrier").height(height),el.find(".t-cover__wrapper").height(height)}}function cover_setRecalculatedCoverHeight(el,hcontent){var startHeight=el.find(".t-cover__carrier").attr("data-content-cover-height"),height=$(window).height();height=-1!==startHeight.indexOf("vh")?Math.round(parseInt(startHeight,10)/100*height):parseInt(startHeight,10);var hcontentReserve=$(window).width()<=568?40:120,hcontentMargin=$(window).width()<=568?50:100;(hcontent+=hcontentReserve)>1e3&&(hcontent+=hcontentMargin),height=heightpos+windowHeight)){var backgroundVerticalShift=-1*Math.round(rect.top*speedFactor);isWebkitTransform?this.style["-webkit-transform"]="translateY("+backgroundVerticalShift+"px)":this.style.top=backgroundVerticalShift+"px"}}))}isWebkitTransform&&$this.css("position","relative"),window.correctFirstTop4Parallax=function(){$this.each((function(){firstTop=$this.offset().top}))},window.correctFirstTop4Parallax(),getHeight=outerHeight?function(jqo){return jqo.outerHeight(!0)}:function(jqo){return jqo.height()},(arguments.length<1||null===speedFactor)&&(speedFactor=.1),(arguments.length<2||null===outerHeight)&&(outerHeight=!0),update(),$(window).resize(window.correctFirstTop4Parallax),$window.bind("scroll",update).resize(update),"complete"!==document.readyState&&window.addEventListener("load",(function(){update()}))}}(jQuery),function($){window.cover_init=function(id){$(document).ready((function(){var cover_carrier=document.body.querySelector("#coverCarry"+id),el=$(cover_carrier),backgroundurl=el.attr("data-content-cover-bg"),height=el.attr("data-content-cover-height"),parallax=el.attr("data-content-cover-parallax"),videomp4=el.attr("data-content-video-url-mp4"),videowebm=el.attr("data-content-video-url-webm"),youtubeid=el.attr("data-content-video-url-youtube"),noloop=el.attr("data-content-video-noloop"),nomute=el.attr("data-content-video-nomute"),bgbase64=el.attr("data-content-bg-base64"),video_nocover=el.attr("data-content-video-nocover");backgroundurl||(backgroundurl=""),height||(height=""),parallax||(parallax=""),videomp4||(videomp4=""),videowebm||(videowebm=""),youtubeid||(youtubeid=""),noloop||(noloop=""),nomute||(nomute=""),youtubeid||(youtubeid=""),bgbase64||(bgbase64=""),video_nocover&&"yes"==video_nocover&&(videomp4="",videowebm="",youtubeid=""),!window.isMobile||""==videowebm&&""==videomp4&&""==youtubeid||el.css("background-image","url('"+backgroundurl+"')"),setTimeout((function(){cover_fixcontentheight(id,!1),cover_fixBackgroundFixedStyles(id)}),500),cover_fixBackgroundFixedNode(id);var clogo=$("#rec"+id).find("img[data-hook-clogo]");if(clogo.length&&clogo.load((function(){setTimeout((function(){cover_fixcontentheight(id,!1),cover_fixBackgroundFixedStyles(id)}),500)})),window.isMobile&&$(window).on("orientationchange",(function(){$(window).one("resize",(function(){cover_fixcontentheight(id,!0),cover_fixBackgroundFixedStyles(id)}))})),(""!==videomp4||""!==videowebm||""!==youtubeid)&&!window.isMobile)if(""!=youtubeid||""==videomp4&&""==videowebm){if(""!=youtubeid){var cotimer;el.css("background-color","#000000"),el.css("background-image",""),el.attr("data-content-cover-bg","");var flagprocessed=0,wnd;(wnd=$(window)).scroll((function(){cotimer&&window.clearTimeout(cotimer),cotimer=window.setTimeout((function(){var a,b,c,d;(flagprocessed=el.find("iframe").length)>0||(a=el.offset().top,b=el.height(),(c=wnd.scrollTop())+(d=wnd.height())>a-500&&c<=a+b+500&&cover_onFuncLoad(window.processYoutubeVideo,(function(){window.processYoutubeVideo(cover_carrier,height)})))}),100)})),wnd.scroll()}}else{el.css("background-color","#000000"),el.css("background-image","url('https://tilda.ws/img/spinner-white.gif')"),el.css("background-size","auto"),el.attr("data-content-cover-bg","");var loop=!1;loop=""==noloop;var muted=!0;muted=""==nomute;var height_more_vh="",cotimer;"fixed"==parallax&&(height.indexOf("vh")>-1&&parseInt(height)>100&&(el.css("height","100vh"),height_more_vh="yes"),height.indexOf("px")>-1&&parseInt(height)>$(window).height()&&(el.css("height","100vh"),height_more_vh="yes"));var flagprocessed="",wnd=$(window),prnt=el.parent();wnd.scroll((function(){var aa,bb,cc,dd;(cotimer&&window.clearTimeout(cotimer),cotimer=window.setTimeout((function(){var a,b,c,d;flagprocessed>0||(a=el.offset().top,b=el.height(),(c=wnd.scrollTop())+(d=wnd.height())>a-500&&c<=a+b+500&&cover_onFuncLoad(el.videoBG,(function(){var vid=el.videoBG({mp4:videomp4,webm:videowebm,poster:"",preload:"none",autoplay:"true",loop:loop,volume:1,scale:!0,zIndex:0,width:"100%"});vid.setAttribute("muted",muted),vid.setAttribute("playsinline",""),videoLoadProcessor.registerNewVideo(vid),flagprocessed=1})))}),100),"fixed"==parallax&&"yes"==height_more_vh)&&(aa=prnt.offset().top,bb=prnt.height(),(cc=wnd.scrollTop())>=aa+bb-(dd=wnd.height())?(el.css("position","absolute"),el.css("bottom","0px"),el.css("top","auto")):cc>=aa?(el.css("position","fixed"),el.css("top","0px")):cc").attr("src",backgroundurl).load((function(){$(this).remove(),el.css("background-image","url('"+backgroundurl+"')"),el.css("opacity","1"),bg_already="yes"})),"yes"!=bg_already&&(el.css("background-image",""),el.css("opacity","0"),el.css("transition","opacity 25ms"))}var coverarrow=$("#rec"+id).find(".t-cover__arrow-wrapper");coverarrow.length>0&&coverarrow.click((function(){var recheight=$("#rec"+id).height();recheight>0&&$("html, body").animate({scrollTop:$("#rec"+id).offset().top+recheight},500)})),void 0===el.attr("data-content-video-url-youtube")&&void 0===el.attr("data-content-video-url-mp4")&&void 0===el.attr("data-content-video-url-webm")||$(window).bind("resize",t_throttle((function(){if(0!==el.find(".videoBG").length&&setWidthHeightHTMLVideo(el.find(".videoBG"),el.height()),0!==el.find("iframe").length){var height=el.attr("data-content-cover-height");setWidthHeightYoutubeVideo(el,height)}})))}))},$(document).ready((function(){var curMode;"edit"!=$(".t-records").attr("data-tilda-mode")&&$(".t-cover__carrier").each((function(){var id=$(this).attr("data-content-cover-id");id>0&&cover_init(id)}))}))}(jQuery);