!function(t,o,n){t(function(){t('a[href^="#"]').on("click",function(n){if("1"===t(this).attr("data-op3-smooth-scroll")){let i=this.hash;t("html, body").animate({scrollTop:t(i).offset().top},1500,function(){o.location.hash=i}),n.preventDefault()}})})}(jQuery,window,document);!function(t,e,i){"use strict";t(i).ready(function(){var i=t('[data-op3-element-type="video"]'),s=i.find("iframe");s.ready(function(){t('[data-op3-element-type="video"] .op3-video-image-overlay').on("click",o)}),s.ready(function(){t('[data-op3-element-type="video"] .op3-video-magic-overlay').on("click",a)}),t(e).on("beforeunload",function(){s.each(function(){var e=t(this).attr("src");e&&(e=e.replace("autoplay=1","autoplay=0"),t(this).attr("src",e))})});var d=t('[data-op3-video-sticky="1"]'),n=t('[data-op3-video-magic-overlay="1"]');if(i.attr("data-op3-video-sticky-active","0"),e.IntersectionObserver&&d.length>0){var c=function(t){t.css("height",t.height()+"px"),t.attr("data-op3-video-sticky-active","1"),setTimeout(function(){var e=t.find(".op3-video-wrapper");"fixed"===e.css("position")&&(t.find(".op3-video-image-overlay").css({height:e.height(),"max-width":e.width(),left:e.css("left"),right:e.css("right"),top:e.css("top"),bottom:e.css("bottom")}).attr("data-op3-video-sticky-position",e.attr("data-op3-video-sticky-position")).find(".op3-icon").css("font-size","70px"),n.length>0&&t.find(".op3-video-magic-overlay").css({height:e.height(),"max-width":e.width(),left:e.css("left"),right:e.css("right"),top:e.css("top"),bottom:e.css("bottom")}).attr("data-op3-video-sticky-position",e.attr("data-op3-video-sticky-position")).find(".op3-video-magic-overlay-image").css("display","none"))})},r=function(t){t.css("height","auto"),t.attr("data-op3-video-sticky-active","0"),setTimeout(function(){var e=t.find(".op3-video-image-overlay"),i=t.find(".op3-video-magic-overlay");e.css({height:"","max-width":"",left:"",right:"",top:"",bottom:""}).removeAttr("data-op3-video-sticky-position").find(".op3-icon").css("font-size",""),i.css({height:"","max-width":"",left:"",right:"",top:"",bottom:""}).removeAttr("data-op3-video-sticky-position").find(".op3-video-magic-overlay-image").css("width","").css("display","block")})};OP3.StickyVideo={},OP3.StickyVideo.observer=new IntersectionObserver(function(e,i){e.forEach(function(e){e.isIntersecting||e.boundingClientRect.y>0?r(t(e.target)):"1"!==t(e.target).attr("data-op3-video-sticky-closed")&&c(t(e.target))})}),d.each(function(){if("1"===t(this).attr("data-op3-video-sticky-close")){var e=t(this),i=e.closest(".op3-element").find(".op3-video-image-overlay");t('').appendTo(i.length?i:e)}OP3.StickyVideo.observer.observe(t(this).parent().get(0))}),t(e).on("resize",function(){d.each(function(){var e=t(this).parent();"0"!==e.attr("data-op3-video-sticky-active")&&(r(e),c(e))})}),t(".op3-video-sticky-close").on("click",function(e){var i=t(this).closest(".op3-element");i.attr("data-op3-video-sticky-closed","1"),r(i);var o=i.find("iframe");if(o.length>0){var a=o.attr("src");a&&(o.attr("src",""),o.attr("data-src",a),a=a.replace(/([\?&])autoplay=[01]/,"$1autplay=0"),o.attr("src",a),o.removeAttr("data-src"))}var s=i.find("video");s.length>0&&s.get(0).pause(),e.preventDefault()})}i.each(function(){var e=t(this),i=e.find(".op3-video-image-overlay");e.find('.op3-video-wrapper[data-op3-video-autoplay="1"]').length>0&&i.is(":visible")&&i.css("display","none")})}),t("video[data-op3-video-selfhosted]").each(function(e){var o=this;o.autoplay&&o.paused&&t(i).one("touchstart",function(){o.play()})});var o=function(e){if(!t(e.target).closest(".op3-video-sticky-close").length){var i=t(this).parent().find("iframe");if(t(this).addClass("op3-video-image-overlay-disabled").find(".op3-icon").css("display","none"),t(this).find(".op3-video-sticky-close").appendTo(t(this).closest(".op3-element").find('[data-op3-video-sticky="1"]')),!t(this).is(".embed-video-facade-interact"))if(i.length>0){var o=i.attr("src");o=-1!==o.indexOf("autoplay=0")?o.replace("autoplay=0","autoplay=1"):o+=(o.indexOf("?")>-1?"&":"?")+"autoplay=1",i.attr("src",o)}else{var a=t(this).parent().find("video");a.length>0&&a.get(0).play()}}},a=function(e){if(!t(e.target).closest(".op3-video-sticky-close").length){var i=t(this).parent().find("iframe");if(t(this).addClass("op3-video-magic-overlay-disabled"),t(this).find(".op3-video-sticky-close").appendTo(t(this).closest(".op3-element").find('[data-op3-video-sticky="1"]')),i.length>0){var o=i.attr("src");if(-1!==o.indexOf("autoplay=0"))o=o.replace("autoplay=0","autoplay=1");else o=o+=(o.indexOf("?")>-1?"&":"?")+"autoplay=1";return o=(o=(o=(o=(o=o.replace("muted=1","muted=0")).replace("mute=1","mute=0")).replace("loop=1","loop=0")).replace("muted=true","muted=false")).replace("endVideoBehavior=loop","endVideoBehavior=stop"),void i.attr("src",o)}var a=t(this).parent().find("video");a.length>0&&(a.get(0).currentTime=0,a.get(0).muted=!1,a.get(0).loop=!1,a.get(0).play())}}}(jQuery,window,document);