Broker Check

Global Portfolio Strategy | November 2025

`; document.body.insertAdjacentHTML('beforeend', modalHTML); modal = document.getElementById('sc-video-modal'); } const iframe = document.getElementById('sc-modal-iframe'); const closeBtn = document.querySelector('.sc-modal-close'); const overlay = document.querySelector('.sc-modal-overlay'); // 2. Attach click events to the buttons buttons.forEach(function(btn, index) { if (videoUrls[index]) { // Find the CMS wrapper tag to prevent it from jumping the page const wrapper = btn.closest('.wrappedBoxLink'); if (wrapper) { wrapper.addEventListener('click', function(e) { e.preventDefault(); // Trigger the modal using the mapped URL for this box iframe.src = videoUrls[index]; modal.classList.add('active'); document.body.style.overflow = 'hidden'; }); } else { // Fallback just in case the wrapper is ever removed btn.addEventListener('click', function(e) { e.preventDefault(); iframe.src = videoUrls[index]; modal.classList.add('active'); document.body.style.overflow = 'hidden'; }); } } }); // 3. Modal Close Logic function closeModal() { modal.classList.remove('active'); iframe.src = ''; // Clear the iframe to stop the video document.body.style.overflow = ''; // Restore scrolling } if (closeBtn) { closeBtn.addEventListener('click', closeModal); } if (overlay) { overlay.addEventListener('click', function(e) { // Close only if they clicked the dark background, not the video itself if (e.target === this) { closeModal(); } }); } });