function pausePlayingVideo(){$.each(vimeoPlayers,function(i,player){player.pause()})}function toggleFullscreen(element){function fullscreenChange(element,fullscreenElement){$(element).toggleClass("fullscreen",fullscreenElement)}document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen():element.requestFullscreen?element.requestFullscreen():element.mozRequestFullScreen?element.mozRequestFullScreen():element.webkitRequestFullscreen?element.webkitRequestFullscreen():element.msRequestFullscreen&&element.msRequestFullscreen();document.onfullscreenchange=function(evt){fullscreenChange(evt.target,document.fullscreenElement)};document.onwebkitfullscreenchange=function(evt){fullscreenChange(evt.target,document.webkitFullscreenElement)};document.onmozfullscreenchange=function(evt){fullscreenChange(evt.target,document.mozFullScreenElement)};document.onmsfullscreenchange=function(evt){fullscreenChange(evt.target,document.msFullscreenElement)}}function initVimeoPlayers(retryTimeout){if(vimeoPlayersInitialized){vimeoPlayersTimeout&&clearTimeout(vimeoPlayersTimeout);return}var dependenciesOk=typeof $!="undefined"&&typeof Vimeo!="undefined";dependenciesOk?(vimeoPlayersInitialized=!0,$(".video-player[data-vimeo-video-id]").each(function(){var options={id:$(this).attr("data-vimeo-video-id"),width:$(this).width(),maxheight:$(this).height(),title:!1,byline:!1,portrait:!1,dnt:!0,playsinline:!isSmallDevice,loop:$(this).attr("data-vimeo-video-loop")==="true",muted:$(this).attr("data-vimeo-video-muted")==="true",controls:$(this).attr("data-vimeo-video-controls")==="true"},player,video,videoControls;!isSmallDevice&&options.muted&&(options.autoplay=$(this).attr("data-vimeo-video-autoplay")==="true");player=new Vimeo.Player(this,options);vimeoPlayers.push(player);video=$(this).closest(".video");videoControls=$(".video-controls",video);player.ready().then(function(){if(videoControls.length){var videoControlsPlay=$(".video-controls-play",videoControls).toggleClass("hidden",options.autoplay),videoControlsPause=$(".video-controls-pause",videoControls).toggleClass("hidden",!options.autoplay),videoControlsFullscreen=$(".video-controls-fullscreen",videoControls).toggleClass("hidden",isSmallDevice);videoControlsPlay.on("click",function(){player.play()});videoControlsPause.on("click",function(){player.pause()});videoControlsFullscreen.on("click",function(){player.play();toggleFullscreen(video[0])});player.on("play",function(){videoControlsPlay.toggleClass("hidden",!0);videoControlsPause.toggleClass("hidden",!1)});player.on("pause",function(){videoControlsPlay.toggleClass("hidden",!1);videoControlsPause.toggleClass("hidden",!0)})}})})):retryTimeout&&(vimeoPlayersTimeout=setTimeout(function(){initVimeoPlayers(retryTimeout)},retryTimeout))}var mql=window.matchMedia("(max-width: 820px)"),isSmallDevice=mql.matches,vimeoPlayersTimeout,vimeoPlayersInitialized=!1,vimeoPlayers=[];$(function(){initVimeoPlayers()});
$(function(){function updateStickyElements(){var windowHeight=$(window).height(),windowScrollTop=$(window).scrollTop(),courseJumpNavHeight=0,heroAreaVideoBottom,heroAreaVideoBottomIsOffScreen;courseJumpNav.length&&(courseJumpNavHeight=courseJumpNav.height());heroAreaVideo.length&&(heroAreaVideoBottom=heroAreaVideo.offset().top+heroAreaVideo.outerHeight(),heroAreaVideoBottomIsOffScreen=windowHeight+windowScrollTop-courseJumpNavHeight<heroAreaVideoBottom,heroAreaVideoBottomIsOffScreen!==heroAreaVideoBottomWasOffScreen&&($(".video-controls",heroAreaVideo).toggleClass("sticky-bottom",heroAreaVideoBottomIsOffScreen).toggleClass("has-jump-nav",courseJumpNavHeight>0),courseJumpNav.toggleClass("sticky-bottom",heroAreaVideoBottomIsOffScreen),heroAreaVideoBottomWasOffScreen=heroAreaVideoBottomIsOffScreen))}var heroAreaVideo=$(".hero-area .video"),courseJumpNav=$(".course-jump-nav"),heroAreaVideoBottomWasOffScreen=!1;updateStickyElements();$(window).on("scroll resize orientationchange",function(){updateStickyElements()})});
//# sourceMappingURL=/sb/nmap/vimeo-scripts.js.v638518761756558693