var BREAKPOINTS={DESKTOP:1024,TABLET:912,MOBILE:576};window.setPortalHeroVideoHeight=function(){var i=$("#fac-filters-wrapper").height(),c=$("#trd-header").height(),n=$("#hero-video"),t=$(".video-home").data("desktop-url"),r=$(".video-home").data("mobile-url"),l=$(".site-logo-container"),u=n&&n.length&&t&&t.length&&r&&r.length,f="video-home__video--horizontal",e="video-home__video--vertical",o=$(window).outerHeight(),s=window.innerWidth,h;s>=BREAKPOINTS.DESKTOP&&u&&(n.attr("src",t),n.removeClass(e).addClass(f));(vrcIsPhone.any()||s<=BREAKPOINTS.TABLET)&&u&&(facFiltersHeight=$(".fac-filters").height(),facFilterHeight=$(".fac-filters li").outerHeight(!0),i=i-facFiltersHeight+facFilterHeight,n.attr("src",r),n.removeClass(f).addClass(e));h=o-c-i;o<BREAKPOINTS.MOBILE&&s>BREAKPOINTS.MOBILE&&u&&(h=o-c,l.hide(),n.attr("src",t),n.removeClass(e).addClass(f));$("#trd-hero-video, #hero-video, .hero-fallback").css("height",h)};window.getPortalHeroVideoHeight=vcDebounce(function(){window.setPortalHeroVideoHeight()},200,!1);window.wireupVideo=function(){var i=$("#trd-hero-play-video"),r=$("#trd-hero-pause-video"),t,n;if($(".hero-overlay, .hero-text").show(),t=$("#hero-video"),t==null||t.size()==0){window.showFallbackImages();return}try{if(n=new Vimeo.Player(t[0]),!n)return;n.play();n.on("playing",function(){i.hide();r.show()});n.on("error",function(){window.showFallbackImages()});$("#trd-hero-pause-video, #trd-hero-play-video").on("click",function(){n.getPaused().then(function(t){t?(n.play(),i.hide().attr("aria-pressed",!0),r.show().attr("aria-pressed",!1)):(n.pause(),i.show().attr("aria-pressed",!1),r.hide().attr("aria-pressed",!0))})})}catch(u){window.showFallbackImages()}};window.showFallbackImages=function(){$("#trd-hero-video .hero-fallback, #trd-hero-video .hero-overlay, #trd-hero-video .hero-text").show()};$(document).ready(function(){window.setPortalHeroVideoHeight();window.wireupVideo();var n=$(window).width();$(window).resize(function(){var t=$(window).width();t!==n&&($("#hero-video").attr("src",""),window.getPortalHeroVideoHeight(),n=t)})})