element.offset().top
            }, 500);
        }
    }

    function activateTabAndHeaderFromUrl() {
        var urlParams = new URLSearchParams(window.location.search);
        var tabName = urlParams.get('tab');
        var anchorId = urlParams.get('anchor');
        var nestedTabName = urlParams.get('nested-tab');

        if (tabName) {
            activaTab(tabName);
            if (anchorId) {
                setTimeout(function() {
                    scrollToAnchor(anchorId);
                }, 1