domReady.stickyJump = function () {
    var jumpMenuStyles = document.createElement('style');
    jumpMenuStyles.innerHTML = 
        `.MMM--sticky {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 99999999999;
        }
        @media screen and (min-width: 768px) {
                .MMM--tileList li:last-child {
                        border: 0px!important;
                }
        }
        @media screen and (min-width: 1025px) {
            .MMM--sticky {
                position: fixed;
                top: 0;
                left: auto;
                width: 1160px;
                z-index: 99999999999;
            }
        }
        .MMM--tileList li {
            border-right: 1px solid #6a6a6a!important;
            margin-top: 4px!important;
            margin-bottom: 4px!important;
        }
        .sps2-pdp_stickyNav--button_top {
            background: none;
            border: solid 1px white;
            border-radius: 2px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: white;
        }
        .sps2-pdp_stickyNav--button_top_icon {
            height: 25px;
            width: 25px;
            color: #F9F9F9 !important;
            padding-top: 4px;
            padding-bottom: 4px;
        }
        .sps2-pdp_stickyNav--button_top:hover {
            background-color: #6a6a6a;
            cursor: pointer;
        }
        .MMM--listHeight{
            padding: 9px!important;
        }
        .MMM--listHeight_focused{
            background-color: #6a6a6a;
        }
        .MMM--listHeight:hover{
            background-color: #6a6a6a;
        }
        .MMM--basicLink:hover{
            border-bottom: none!important;
        }
        .MMM--basickLinkClicked, .MMM--basicLinkFocused{
            border-bottom: none!important;
        }
        .MMM--featuredBox-hd.MMM--hdg.MMM--hdg_6.MMM--padBottom {
            padding-top: 10px!important;
            padding-bottom: 3px!important;
        }
        .MMM--jumpFeaturedBox {
            padding: 10px 0px 10px 0px!important;
            background-color: rgba(0,0,0,0.75)!important;
            display: flex;
            backdrop-filter: blur(10px);
            justify-content: space-evenly;
            align-items: center;
            flex-direction: row;
        }
        .sps2-pdp_stickyNav--button_top_label{
            padding-bottom: 2px;
        }
        .MMM--selectJumpDiv{
            padding-left: 24px;
            padding-right: 24px;
            padding-top: 20px;
            padding-bottom: 12px;
            width: -webkit-fill-available; 
        }
        @media screen and (max-width: 1024px) {
            .MMM--sticky {
                position: fixed;
                top: 0;
                width: -webkit-fill-available;
                z-index: 99999999999;
            }
        }
        .js-menuList-select{
            margin-top: -13px;
            height: 60px;
            font-size: 16.5px;
            text-align: center;
            white-space: pre-wrap;
        }
        .MMM--jumpFeaturedBox li:hover {
            cursor: pointer;
        }
    `;
    document.head.append(jumpMenuStyles);
    
    if (!(window.location.href.toString().includes('?uri=utb%3Aopen&locale') || window.location.href.toString().includes('!ut'))) {
		var checkTopJumpMenu = document.getElementById('MMM--TopJumpMenu'); // Check rN-52-JumpMenu exists or not
		if(typeof checkTopJumpMenu !== 'undefined' && checkTopJumpMenu !== null) {
        document.querySelector("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div").classList.add('MMM--jumpFeaturedBox');
        document.querySelectorAll('.tileList-panel > a').forEach(function (element) {
            element.classList.add('MMM--basicLink');
            element.classList.add('MMM--txt_whiteLink');
            element.classList.add('MMM--txt_md_3');
        });
        var onThisPage = document.querySelector('#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div > div p');
        var nextSiblingDPL = document.getElementById('MMM--TopJumpMenu').parentElement.nextElementSibling.classList[1];
        var jumpToTop = document.createElement('div');
       
        jumpToTop.innerHTML = `<button class="sps2-pdp_stickyNav--button_top"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="white" class="sps2-pdp_stickyNav--button_top_icon"><path d="M32.032 24.352c0 .384-.16.768-.448 1.024a1.459 1.459 0 01-2.048-.032L15.968 11.232 2.4 25.376c-.544.576-1.472.576-2.048.032-.544-.544-.576-1.472-.032-2.048l14.592-15.2c.256-.288.64-.448 1.024-.448s.768.16 1.024.448l14.656 15.2c.256.288.416.64.416.992z"></path></svg></button>`;
        document.querySelector("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div").appendChild(jumpToTop);
        jumpToTop.id = "jumpToTopDiv";
        document.querySelector('#MMM--TopJumpMenu button.sps2-pdp_stickyNav--button_top').addEventListener('click', function () {
            $('html, body').animate({
                scrollTop: document.querySelector("#pageContent").offsetTop - 147,
            }, 1000);
            $('.js-menuList-select')[0] ? $('.js-menuList-select')[0].value = 'undefined' : '';
        });
        var sticky = document.querySelector("#MMM--TopJumpMenu").offsetTop;
        if (window.pageYOffset < sticky) {
            jumpToTop.setAttribute('style', 'padding-right: 19.5px; padding-top: 4px; padding-bottom: 6px; display: none;');
        }
        else {
            jumpToTop.setAttribute('style', 'padding-right: 19.5px; padding-top: 4px; padding-bottom: 6px; display: block; align-self: baseline;');
        }
        document.querySelector("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div > ul").childNodes.forEach(function (c) {
            if (c.nodeType === 1) c.classList.add('MMM--listHeight');
        });
        $(onThisPage).addClass('MMM--txt_white MMM--txt_md_3 MMM--isNotOnMobile');
        var jumpMenu = document.querySelector("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div");
        var ofL;
        var ofW;
        function setLeftAndWidth() {
            ofL = document.querySelector("#js-bodyWrapper").offsetLeft;
            ofW = document.querySelector("#js-bodyWrapper").offsetWidth;
            $('.MMM--sticky').attr('style', 'left:' + ofL.toString() + 'px; width:' + ofW.toString() + 'px');
        }
        document.querySelectorAll('#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div > ul > li a').forEach(function (a) {
            if (window.location.href.toString().includes(a.href)) setTimeout(function () { a.click(); }, 500);
            if ($('.js-menuList-select')[0]) {
                setTimeout(function () { $('.js-menuList-select')[0].value = window.location.href.split('#')[1]; }, 500);
            }
        });
        window.addEventListener("resize", function () {
            setTimeout(function () {
                var tabletMode = /iPad|iPad Pro|iPad Mini|iPad Air/i.test(navigator.userAgent);
                var mobileMode = /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
                if (tabletMode == false && mobileMode == false) {
                    ofL = document.querySelector("#js-bodyWrapper").offsetLeft;
                    ofW = document.querySelector("#js-bodyWrapper").offsetWidth;
                    $('.MMM--sticky').attr('style', 'left: ' + ofL.toString() + 'px; width: ' + ofW.toString() + 'px');
                }
                if (tabletMode == true || mobileMode == true) $('.MMM--featuredBox').removeAttr('style');
                if ($('#selectJumpDiv').html() == '') {
                    $('#selectJumpDiv').remove();
                }
                stickyFunction();
                if (/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) == true || window.outerWidth <= 767.3) {
                    try {
                        $('.js-menuList-select')[0].childNodes.forEach(function (child) {
                            child.value != 'undefined' && child.value.includes('#') ? child.value = child.value.split('#')[1] : '';
                        });
                        if ($('#selectJumpDiv')[0] != 'undefined') {
                            $("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div.featuredBox-bd.MMM--featuredBox-bd-table.js-menuList > select").wrap('<div id="selectJumpDiv" class="MMM--selectJumpDiv"></div>');
                            var selectJumpDiv = $('#selectJumpDiv');
                            $("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div.featuredBox-bd.MMM--featuredBox-bd-table.js-menuList").after(selectJumpDiv);
                            $('.js-menuList-select').change(function () { setMenuList() });
                        }
                        $('.js-menuList-select')[0] ? $('.js-menuList-select')[0].firstElementChild.innerHTML = $(onThisPage).text().trim() : ''; 
                        $('.js-menuList-select')[0] ? $('.js-menuList-select')[0].firstElementChild.setAttribute('value', 'undefined') : ''; 
                        $('.js-menuList-select')[0] ? $('.js-menuList-select')[0].value = 'undefined' : '';
                    }
                    catch { }
                }
            }, 475);
        });
        function stickyFunction() {
            if (window.pageYOffset >= document.querySelector("#MMM--TopJumpMenu").offsetTop) {
                jumpMenu.classList.add("MMM--sticky");
                $(onThisPage).parent().hide();
                $("#jumpToTopDiv").show();
            }
            else {
                jumpMenu.classList.remove("MMM--sticky");
                $(onThisPage).parent().show();
                $("#jumpToTopDiv").hide();
                $('.MMM--featuredBox').removeAttr('style');
                ofW = document.querySelector("#MMM--TopJumpMenu").parentElement.parentElement.offsetWidth;
                $('.js-menuList-select')[0] && window.pageYOffset < sticky - 100 ? $('.js-menuList-select')[0].value = 'undefined' : '';
            }
        }
        window.onscroll = function () {
            stickyFunction();
            setLeftAndWidth();
            document.querySelector("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div > ul").childNodes.forEach(function (li) {
                if (li.nodeType === 1) {
                    var id = '#' + li.firstElementChild.firstElementChild.href.split('#')[1];
                    if ((window.pageYOffset >= $(id)[0].offsetTop - document.querySelector("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div").offsetHeight - 20) && (window.pageYOffset <= ($(id)[0].offsetTop + $(id)[0].offsetHeight - document.querySelector("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div").offsetHeight))) {
                        li.classList.add('MMM--listHeight_focused');
                        li.firstElementChild.firstElementChild.classList.add('MMM--basickLinkClicked');
                        $('.js-menuList-select')[0] ? $('.js-menuList-select')[0].value = id.split('#')[1] : '';
                    }
                    else if (li.classList.contains('MMM--listHeight_focused')) {
                        li.classList.remove('MMM--listHeight_focused');
                        if (li.firstElementChild.firstElementChild.classList.contains('MMM--basickLinkClicked')) {
                            li.firstElementChild.firstElementChild.classList.remove('MMM--basickLinkClicked');
                        }
                    }
                }
            });
        }
        document.querySelectorAll('#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div > ul li').forEach(function (li) {
            li.addEventListener('click', function () {
                this.firstElementChild.firstElementChild.click();
            });
            li.addEventListener('mouseover', function () {
                this.firstElementChild.firstElementChild.classList.add('MMM--basicLinkFocused');
            });
            li.addEventListener('mouseout', function () {
                this.firstElementChild.firstElementChild.classList.remove('MMM--basicLinkFocused');
            })
        })
        function scrollToDiv(value) {
            $('html, body').animate({
                scrollTop: value
            }, 700);
        }
        document.querySelectorAll('#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div > ul > li a').forEach(function (anchor) {
            anchor.addEventListener('click', function (event) {
                event.preventDefault();
                sticky = document.querySelector("#MMM--TopJumpMenu").offsetTop;
                var element = "#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div";
                if (document.querySelector('#' + anchor.href.toString().split('#')[1]).parentElement.classList.contains(nextSiblingDPL)) {//DPls which are directly under Jump Menu
                    scrollToDiv(sticky - 1);
                }
                else { //DPLs which are not the directly under the Jump Menu
                    document.querySelector(element).classList.contains('MMM--sticky') ? scrollToDiv(document.querySelector('#' + this.href.toString().split('#')[1]).offsetTop - document.querySelector(element).offsetHeight - 15) : scrollToDiv(document.querySelector('#' + this.href.toString().split('#')[1]).offsetTop - (document.querySelector(element).offsetHeight) * 2 - 9.838623046875);
                }
                setTimeout(function () {
                    document.querySelectorAll('#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div > ul li').forEach(function (li) {
                        if (li.classList.contains('MMM--listHeight_focused')) {
                            li.classList.remove('MMM--listHeight_focused');
                        }
                        if (li.firstElementChild.firstElementChild.classList.contains('MMM--basickLinkClicked')) {
                            li.firstElementChild.firstElementChild.classList.remove('MMM--basickLinkClicked');
                        }
                    });
                    anchor.parentElement.parentElement.classList.add('MMM--listHeight_focused');
                    anchor.classList.add('MMM--basickLinkClicked');
                }, 1000)
            });
        });
        $('.js-menuList-select')[0] ? $('.js-menuList-select')[0].firstElementChild.innerHTML = $(onThisPage).text().trim() : '';
        $('#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div > select option').each(function () {
            this.value != 'undefined' ? this.value = this.value.toString().split('#')[1] : '';
        });
        function setMenuList() {
            var currentSelectOption = document.querySelector("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div > select").value.toString().trim();
            var mobElement = "#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div";
            if (currentSelectOption != document.querySelector('.js-menuList-select').firstElementChild.value.toString().trim()) { //Mobile Mode
                if (document.querySelector('#' + currentSelectOption).parentElement.classList.contains(nextSiblingDPL)) { //For Direct DPL under Jump Menu
                    sticky = document.querySelector("#MMM--TopJumpMenu").offsetTop;
                    scrollToDiv(sticky - 1);
                }
                else { //For DPLs which are not directly under Jump Menu
                    document.querySelector(mobElement).classList.contains('MMM--sticky') ? scrollToDiv(document.querySelector('#' + currentSelectOption).offsetTop - document.querySelector(mobElement).offsetHeight) : scrollToDiv(document.querySelector('#' + currentSelectOption).offsetTop - (document.querySelector(mobElement).offsetHeight) * 2 - 37.169921875);
                }
            }
        }
        var checkMenuListExistence = setInterval(function () {
            if ($('.js-menuList-select')[0]) {
                $('.js-menuList-select').change(function () { setMenuList() });
                if (/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) == true || window.outerWidth <= 767.3) {
                    $("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div.featuredBox-bd.MMM--featuredBox-bd-table.js-menuList > select").wrap('<div id="selectJumpDiv" class="MMM--selectJumpDiv"></div>');
                    var selectJumpDiv = $('#selectJumpDiv');
                    $("#MMM--TopJumpMenu > div.MMM--pageSection.MMM--pageSection_noDividers > div > div.featuredBox-bd.MMM--featuredBox-bd-table.js-menuList").after(selectJumpDiv);
                }
                cancelInterval(checkMenuListExistence);
            }
        }, 250);
        function cancelInterval(checkMenuListExistence) {
            clearInterval(checkMenuListExistence);
        }
	  }
    }
}