jQuery(document).ready(function () { function business_landing_page_search_loop_focus(element) { var business_landing_page_focus = element.find('select, input, textarea, button, a[href]'); var business_landing_page_firstFocus = business_landing_page_focus[0]; var business_landing_page_lastFocus = business_landing_page_focus[business_landing_page_focus.length - 1]; var KEYCODE_TAB = 9; element.on('keydown', function business_landing_page_search_loop_focus(e) { var isTabPressed = (e.key === 'Tab' || e.keyCode === KEYCODE_TAB); if (!isTabPressed) { return; } if ( e.shiftKey ) /* shift + tab */ { if (document.activeElement === business_landing_page_firstFocus) { business_landing_page_lastFocus.focus(); e.preventDefault(); } } else /* tab */ { if (document.activeElement === business_landing_page_lastFocus) { business_landing_page_firstFocus.focus(); e.preventDefault(); } } }); } }); // Video Popup (function( $ ) { $(document).ready(function(){ $('#openBtn').on('click', function() { $('#videoOverlay').css('display', 'flex'); }); $('.close-btn').on('click', function() { $('#videoOverlay').hide(); }); }); })( jQuery ); /* Progress Bar */ document.addEventListener("DOMContentLoaded", function () { const business_landing_page_progressBar = document.getElementById("business_landing_page_elemento_progress_bar"); if (!business_landing_page_progressBar) return; window.addEventListener("scroll", function () { const business_landing_page_scrollTop = document.documentElement.scrollTop || document.body.scrollTop; const business_landing_page_height = document.documentElement.scrollHeight - document.documentElement.clientHeight; const business_landing_page_scrolled = (business_landing_page_scrollTop / business_landing_page_height) * 100; business_landing_page_progressBar.style.width = business_landing_page_scrolled + "%"; }); });