function academic_education_lite_openNav() { jQuery(".sidenav").addClass('show'); } function academic_education_lite_closeNav() { jQuery(".sidenav").removeClass('show'); } ( function( window, document ) { function academic_education_lite_keepFocusInMenu() { document.addEventListener( 'keydown', function( e ) { const academic_education_lite_nav = document.querySelector( '.sidenav' ); if ( ! academic_education_lite_nav || ! academic_education_lite_nav.classList.contains( 'show' ) ) { return; } const elements = [...academic_education_lite_nav.querySelectorAll( 'input, a, button' )], academic_education_lite_lastEl = elements[ elements.length - 1 ], academic_education_lite_firstEl = elements[0], academic_education_lite_activeEl = document.activeElement, tabKey = e.keyCode === 9, shiftKey = e.shiftKey; if ( ! shiftKey && tabKey && academic_education_lite_lastEl === academic_education_lite_activeEl ) { e.preventDefault(); academic_education_lite_firstEl.focus(); } if ( shiftKey && tabKey && academic_education_lite_firstEl === academic_education_lite_activeEl ) { e.preventDefault(); academic_education_lite_lastEl.focus(); } } ); } academic_education_lite_keepFocusInMenu(); } )( window, document ); var academic_education_lite_btn = jQuery('#button'); jQuery(window).scroll(function() { if (jQuery(window).scrollTop() > 300) { academic_education_lite_btn.addClass('show'); } else { academic_education_lite_btn.removeClass('show'); } }); academic_education_lite_btn.on('click', function(e) { e.preventDefault(); jQuery('html, body').animate({scrollTop:0}, '300'); }); window.addEventListener('load', (event) => { jQuery(".loading").delay(2000).fadeOut("slow"); }); if(document.getElementById("openModalButton")) { if(document.getElementById("openModalButton").getAttribute('data-modal-src')) { var modal=document.getElementById("myModal") var openModalButton=document.getElementById("openModalButton") var closeModalButton=document.getElementById("closeModalButton"); openModalButton.addEventListener("click",function(){ let e=jQuery(this).attr("data-modal-src"); document.getElementById("videoPlayer").src=e modal.style.display="block" }) closeModalButton.addEventListener("click",function(){ document.getElementById("videoPlayer").src="" modal.style.display="none" }) window.addEventListener("click",function(e){ if(e.target==modal) { modal.style.display="none" } else { document.getElementById("videoPlayer").src="" } }); } }