jQuery(document).ready(function ($) {
    if ($('.sb-header').length) {
        let sbMenuListDropdown = $('.sb-menu ul li:has(ul)');
        let headerShadow = $('.sb-header.header-shadow');

        let burgerMenu = $('.burger-menu');
        let sbMenuListWrapper = $('.sb-menu > ul');

        /* ========== Dropdown Menu Toggle ========== */
        burgerMenu.on('click', function () {
            $(this).toggleClass('menu-open');
            sbMenuListWrapper.slideToggle(300);
        })

        sbMenuListDropdown.each(function () {
            $(this).append('<span class="dropdown-plus"></span>');
            $(this).addClass('dropdown_menu');
        });

        $('.dropdown-plus').on("click", function () {
            $(this).prev('ul').slideToggle(300);
            $(this).toggleClass('dropdown-open');
        });

        $('.dropdown_menu a').append('<span></span>');

        /* ========== Added header shadow ========== */
        headerShadow.append('<div class="header-shadow-wrapper"></div>');

        /* ========== Sticky on scroll ========== */
        $(window).on("scroll", function () {
            // stickyNav();
        }).scroll();
    }

    if ($(".login-user").length > 0) {
        $(".login-user").click(function () {
            $(".dropdown-user-login").slideToggle("slow");
        });
    }

})