@media (min-width: 992px){
.eg-menu-open header.sticky-nav-desktop .main-menu.menu-toggleable-left.navbar-toggleable-lg {
display: block !important;
}
.eg-menu-open header.sticky-nav-desktop .main-menu.menu-toggleable-left.navbar-toggleable-lg,
.eg-menu-open header.sticky-nav-desktop .navbar.bg-inverse .navbar-nav {
height: 2.5rem;
}
body.eg-menu-open.sticky-nav-desktop .eg-overlay{
top: 0;
}
.eg-menu-open .eg-overlay, .eg-overlay .underlay {
position: absolute;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
text-align: center;
}
.eg-menu-open .eg-overlay .underlay-menu {
opacity: .4;
position: absolute;
background-color: #000;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
text-align: center;
}
body:not(.eg-menu-open) .searchOverlay.menu.eg-overlay,
.searchOverlay.menu:not(.eg-overlay),
html body .main-menu.menu-toggleable-left .navbar-nav .menu-content.show{
display: none !important;
}
html body .main-menu.menu-toggleable-left.multilevel-dropdown .navbar-nav .menu-content:not(#menu-gracobaby-premier-collection){
width: 100% !important;
max-width: max-content !important;
}
.eg-menu-open .searchOverlay.menu.eg-overlay{
display: block !important;
}
nav .navbar-nav > .nav-item.dropdown.d-lg-block.eg-active .menu-content{
display: -webkit-box !important;
display: -ms-flexbox !important;
display: flex !important;
-webkit-box-pack: end !important;
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
nav .navbar-nav #menu-yankeecandle-discover-yankee-candle,
nav .navbar-nav #menu-yankeecandle-sale,
nav .navbar-nav #menu-yankeecandle-shopbyfragrance{
width: 663.891px !important;
max-width: 663.891px !important;
}
.eg-menu-open .main-menu .navbar-nav .eg-active .menu-content .menu-content-bg{
width: 100vw !important;
height: 100% !important;
background: #ffffff !important;
-webkit-box-shadow: 0 0.3125rem 0.625rem -0.375rem rgba(0,0,0,.5);
box-shadow: 0 0.3125rem 0.625rem -0.375rem rgba(0,0,0,.5);
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 50%;
width: 100vw;
-webkit-transform: translate3d(-50%,0,0);
transform: translate3d(-50%,0,0);
background-color: #fff;
}
body.eg-menu-open {
position: relative;
}
nav .navbar-nav > .nav-item.dropdown.d-lg-block > .nav-link{
cursor: pointer;
}
.eg-active .menu-content-bg,
.eg-active .dropdown-menu {
display: block !important;
}
.menu-content-bg.show{
display: none !important;
}
/* .eg-active .menu-content-bg{
max-height: 270.031px;
height: 270px;
} */
.eg-content-bg{
-webkit-box-shadow: 0 0.3125rem 0.625rem -0.375rem rgba(0,0,0,.5);
box-shadow: 0 0.3125rem 0.625rem -0.375rem rgba(0,0,0,.5);
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 50%;
width: 100vw;
-webkit-transform: translate3d(-50%,0,0);
transform: translate3d(-50%,0,0);
background-color: #fff;
}
.main-menu .navbar-nav .eg-active .menu-content .enhanced-nav ~ .menu-content-bg {
display: none !important;
}
}
@media (min-width: 992px) and (max-width: 1100px){
html body .navbar-expand-lg>.container{
max-width: 100% !important;
}
}
(function () {
try {
/* main variables */
var debug = 0;
var variation_name = '';
/* all Pure helper functions */
function waitForElement(selector, trigger, delayInterval, delayTimeout) {
var interval = setInterval(function () {
if (document && document.querySelector(selector) && document.querySelectorAll(selector).length > 0) {
clearInterval(interval);
trigger();
}
}, delayInterval);
setTimeout(function () {
clearInterval(interval);
}, delayTimeout);
}
var egAbout = `<div class="text14 bold l2-heading d-none d-lg-flex">
<a class="l2-heading-link" data-category-name="About Us" href="https://www.gracobaby.com/about-us.html">About Us</a>
</div>`;
function init() {
document.querySelector('.main-menu.menu-toggleable-left .menu-content#menu-About-Graco .meganav-dropdown-column > .text14:nth-child(1)').insertAdjacentHTML('beforebegin', egAbout);
var egNav = document.querySelectorAll('nav .navbar-nav > .nav-item.dropdown.d-lg-block > .nav-link[href]');
egNav.forEach(function (val) {
val.parentElement.addEventListener('mouseover', function (e) {
//console.log('init0');
//e.preventDefault();
// e.stopImmediatePropagation();
// e.stopPropagation();
});
val.addEventListener('click', function () {
var self = this;
document.querySelectorAll('nav .navbar-nav > .nav-item.dropdown.d-lg-block').forEach(function(item, index) {
if(item != self.parentElement) {
item.classList.remove('eg-active');
document.body.classList.remove('eg-menu-open');
}
})
this.parentElement.classList.toggle('eg-active');
document.body.classList.toggle('eg-menu-open');
if(this.parentElement.classList.contains('eg-active')) {
this.parentElement.querySelector('.eg-content-bg') && this.parentElement.querySelector('.eg-content-bg').remove();
this.parentElement.querySelector('.menu-link-content > .enhanced-nav').insertAdjacentHTML('afterend', '<div class="eg-content-bg"></div>');
} else {
document.body.classList.remove('eg-menu-open');
}
if(this.parentElement.querySelector('.eg-content-bg')) {
setTimeout(function() {
self.parentElement.querySelector('.eg-content-bg').style.height = self.parentElement.querySelector('.menu-link-content .enhanced-nav').clientHeight + 'px';
console.log(self.parentElement.querySelector('.eg-content-bg'), ' >>>>> ' , self.parentElement.querySelector('.menu-link-content').clientHeight);
}, 50);
}
});
val.removeAttribute('href');
});
document.body.insertAdjacentHTML('beforeend', '<div class=" eg-overlay"><div class="underlay-menu"></div></div>');
document.querySelector('.eg-overlay').addEventListener('click', function() {
document.querySelector('nav .navbar-nav > .nav-item.dropdown.d-lg-block.eg-active') && document.querySelector('nav .navbar-nav > .nav-item.dropdown.d-lg-block.eg-active').classList.remove('eg-active');
document.body.classList.remove('eg-menu-open');
})
// document.querySelectorAll('header .home-banner > .header-banner, header .home-banner > .header-row-brands, header .home-banner > .header').forEach(function(item) {
// item.addEventListener('click', function() {
// console.log('clicked >>>>')
// document.querySelector('nav .navbar-nav > .nav-item.dropdown.d-lg-block.eg-active') && document.querySelector('nav .navbar-nav > .nav-item.dropdown.d-lg-block.eg-active').classList.remove('eg-active');
// document.body.classList.remove('eg-menu-open');
// })
// })
document.querySelector('header .home-banner').addEventListener('click', function(e) {
if(!e.target.closest('.home-banner > .main-menu')) {
document.querySelector('nav .navbar-nav > .nav-item.dropdown.d-lg-block.eg-active') && document.querySelector('nav .navbar-nav > .nav-item.dropdown.d-lg-block.eg-active').classList.remove('eg-active');
document.body.classList.remove('eg-menu-open');
}
})
}
/* Initialise v iation */
waitForElement('nav .navbar-nav > .nav-item.dropdown.d-lg-block > .nav-link[href]', init, 100, 25000);
} catch (e) {
if (debug) console.log(e, 'error in Test' + variation_name);
}
})();