(function () {
if(!document.querySelector('.eg-scroll-arrow'))
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);
}
function live(selector, event, callback, context) {
/****Helper Functions****/
// helper for enabling IE 8 event bindings
function addEvent(el, type, handler) {
if (el.attachEvent) el.attachEvent("on" + type, handler);
else el.addEventListener(type, handler);
}
// matches polyfill
this.Element &&
(function (ElementPrototype) {
ElementPrototype.matches =
ElementPrototype.matches ||
ElementPrototype.matchesSelector ||
ElementPrototype.webkitMatchesSelector ||
ElementPrototype.msMatchesSelector ||
function (selector) {
var node = this,
nodes = (
node.parentNode || node.document
).querySelectorAll(selector),
i = -1;
while (nodes[++i] && nodes[i] != node);
return !!nodes[i];
};
})(Element.prototype);
// live binding helper using matchesSelector
function live(selector, event, callback, context) {
addEvent(context || document, event, function (e) {
var found,
el = e.target || e.srcElement;
while (
el &&
el.matches &&
el !== context &&
!(found = el.matches(selector))
)
el = el.parentElement;
if (found) callback.call(el, e);
});
}
live(selector, event, callback, context);
}
var egHeroText = `<h2 class="eg-heading">The Best of <br>Both Worlds</h2>
<p class="eg-para">Puffy or fuzzy to light and lofty, your comfort can thrive off-grid and off-mountain.</p>
<div class="eg-button-container">
<a href="https://www.marmot.com/men/new-arrivals/" target="_self" class="eg-button btn large btn-black solid-fill">Shop Men</a>
<a href="https://www.marmot.com/women/new-arrivals/" target="_self" class="eg-button btn large btn-black solid-fill">Shop Women</a>
</div>`;
function init() {
document.querySelector('.storepage .experience-commerce_layouts-masonrybrick:nth-child(2) .col-lg-3.layout-region .text-container').innerHTML = egHeroText;
document.querySelector('.storepage .experience-commerce_layouts-masonrybrick:nth-child(2) .masonry-brick').insertAdjacentHTML('afterend', `<div class="eg-scroll-arrow"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.4606 8.72222C24.0994 8.17502 24.1827 7.20277 23.6467 6.55064C23.1375 5.93112 22.2524 5.82338 21.6175 6.28331L21.5194 6.36065L12 14.5155L2.48058 6.36065C1.84175 5.81346 0.889338 5.89852 0.353299 6.55064C-0.18274 7.20277 -0.0994143 8.17502 0.539412 8.72222L10.9497 17.6393C11.2547 17.9006 11.6311 18.0177 11.9996 17.9978C12.3274 18.0157 12.6615 17.9251 12.946 17.7212L13.0503 17.6393L23.4606 8.72222Z" fill="white"/>
</svg></div>`);
window.addEventListener('scroll', () => {
if(window.pageYOffset >= document.querySelector('body header.hasStickyNav').clientHeight){
document.body.classList.add('eg-sticky-element');
}else{
document.body.classList.remove('eg-sticky-element');
}
})
live('.header-banner.header-row-brands button', 'click', function(){
document.body.classList.add('eg-no-banner');
});
document.querySelector('.eg-scroll-arrow').addEventListener('click',function(){
//console.log('helloo');
document.querySelector('.experience-commerce_assets-duoTileCarouselt').scrollIntoView({behavior: "smooth"});
});
}
function noBanner(){
document.body.classList.add('eg-no-banner');
}
/* Initialise variation */
waitForElement(".storepage .experience-commerce_layouts-masonrybrick:nth-child(2) .col-lg-3.layout-region .text-container", init, 100, 25000);
waitForElement('.header-banner.header-row-brands.d-none',noBanner,50,10000);
} catch (e) {
if (debug) console.log(e, "error in Test" + variation_name);
}
})();
.eg-button-container ~ .cta-container,
.eg-button-container ~ p,
.eg-button-container ~ h1 {
display: none !important;
}
@media screen and (min-width:991px) and (max-width:1200px){
.storepage .experience-commerce_layouts-masonrybrick:nth-child(2){
background-position: top right 50%!important;
}
}
@media screen and (min-width:991px){
body:not(.sticky-nav-min) .eg-mob-acc .eg-icon svg path,
body:not(.sticky-nav-min) .eg-cart-icon>div svg{
fill: #ffffff !important;
}
.storepage {
overflow-x: initial;
}
.storepage .experience-commerce_layouts-masonrybrick:nth-child(2){
padding-top: 63px;
}
html body div#maincontent {
padding-top: 59px !important;
}
.navbar.bg-inverse .navbar-nav .nav-link{
color: #000000 !important;
}
}
body:not(.sticky-nav-min) header.sticky-nav-desktop .main-menu.menu-toggleable-left.navbar-toggleable-lg{
border-radius: 0px !important;
background: linear-gradient(180deg, rgba(0, 0, 0, 0.40) 0%, rgba(0, 0, 0, 0.00) 100%) !important;
backdrop-filter: blur(2px);
}
body:not(.sticky-nav-min) header.hasStickyNav.sticky-nav-desktop{
background: transparent !important;
}
.storepage .experience-commerce_layouts-masonrybrick:nth-child(2) .layout-region-9 {
display: none;
}
.storepage .experience-commerce_layouts-masonrybrick:nth-child(2) {
height: 92vh;
background-position: bottom center !important;
background-size: cover !important;
background-repeat: no-repeat;
background: url('https://editor-assets.abtasty.com/50844/651e4129376fb1696481577.png');
position: relative;
}
.storepage .experience-commerce_layouts-masonrybrick:nth-child(2) .col-lg-3.layout-region .image-container {
opacity: 0;
visibility: hidden;
display: none;
}
.eg-button-container {
display: flex;
flex-direction: column;
gap: 10px;
}
html body .eg-button-container .eg-button{
background: #491040 !important;
width: 270px;
}
html body .eg-button-container .eg-button:hover {
background: #2a0024 !important;
}
@media screen and (max-width:767px) {
html body.sticky-nav-mobile #maincontent[role="main"]{
padding-top: 55px !important;
}
}
@media screen and (max-width:990px) {
.eg-button-container{
align-items: center;
}
html body .eg-heading{
font-size: 2.5rem !important;
}
body:not(.eg-sticky-element) header .navbar-header .logo img{
opacity: 0;
visibility: hidden;
}
body:not(.eg-sticky-element) header .navbar-header .logo{
background: url('https://editor-assets.abtasty.com/50844/64ff568b1e73d1694455435.svg');
background-position: center;
background-size: 128px 24px;
background-repeat: no-repeat;
}
.sticky-nav-mobile .header.container {
max-width: 100%;
margin-left: 0px;
margin-right: 0px;
padding-left: 3%;
padding-right: 3%;
}
.sticky-nav-mobile .header.container .header-inner-row {
max-width: 94%;
margin: 0 auto;
}
body:not(.eg-sticky-element) .sticky-nav-mobile .header.container{
background: linear-gradient(180deg, rgb(0 0 0 / 65%) 0%, rgba(0, 0, 0, 0.00) 100%)!important;
}
body:not(.eg-sticky-element) .eg-mob-acc .eg-icon svg path,
body:not(.eg-sticky-element) .search-mobile .reset-button-mobile .icon.svg-icon.close-x,
body:not(.eg-sticky-element) .header .navbar-header .pull-right .minicart-link svg,
body:not(.eg-sticky-element) .search-button-mobile .svg-icon.search{
fill: #ffffff !important
}
body:not(.eg-sticky-element) .menu-icon:not(.open)::after{
color: #ffffff !important;
}
body:not(.eg-sticky-element) .header .navbar-header .pull-left .navbar-toggler .menu-icon:not(.open) span {
background: #ffffff !important;
}
body:not(.eg-sticky-element) header.hasStickyNav.sticky-nav-mobile:not(.header-navbar-open) {
background: transparent;
}
body.sticky-nav-mobile #maincontent {
padding-top: 70px !important;
}
html body .eg-button-container .eg-button.btn {
background: #ffffff !important;
color: #000000 !important;
}
html body .eg-heading,
html body .eg-para {
text-align: center;
color: #ffffff;
}
.storepage .experience-commerce_layouts-masonrybrick:nth-child(2) {
background: url('https://editor-assets.abtasty.com/50844/651e414b11ccf1696481611.png');
background-repeat: no-repeat !important;
background-position: top left !important;
}
.storepage .experience-commerce_layouts-masonrybrick:nth-child(2) .text-cta-container{
justify-content: end !important;
}
}
@media screen and (min-width: 991px) {
html body .page header .header.container {
background: #ffffff;
padding-bottom: 10px;
}
html body .page header .main-menu .menu-group>ul.navbar-nav {
justify-content: flex-start !important;
margin-left: 20px;
}
.storepage .experience-commerce_layouts-masonrybrick:nth-child(2) .layout-region.col-lg-3 {
-webkit-box-flex: 0;
-ms-flex: 0 0 650px;
flex: 0 0 650px;
max-width: 650px;
}
html body .eg-para {
text-align: left;
font-size: 20px !important;
margin-bottom: 20px !important;
color: #ffffff;
}
html body .eg-heading {
text-align: left;
font-size: 64px;
font-style: normal;
font-weight: 700;
line-height: 80px;
color: #ffffff;
}
.eg-bar-detail {
flex-wrap: nowrap;
width: 900px;
}
}
.storepage .experience-commerce_layouts-masonrybrick:nth-child(2) .masonry-brick {
height: 100%;
}
html body:not(.sticky-nav-min) .page header .main-menu .menu-group>ul.navbar-nav>li.desktop>a,
html body .page header .main-menu .desktop.mega-nav-item.show > a,
html body .page header .main-menu .menu-group>ul.navbar-nav>li.desktop>a:hover {
color: #ffffff !important;
}
html body.eg-no-banner.sticky-nav-mobile #maincontent[role="main"] {
padding-top: 24px !important;
}
@media screen and (max-width:990px) and (min-width:768px){
html body.eg-no-banner.sticky-nav-mobile #maincontent[role="main"] {
padding-top: 39px !important;
}
}
html body .eg-button-container .eg-button.btn {
background: #ffffff !important;
color: #000000 !important;
}
html body .eg-button-container .eg-button.btn:hover {
color: #ffffff !important;
background: linear-gradient(to bottom,#2a0024,#2a0024) !important;
}
body:not(.sticky-nav-min) .menu-group .eg-logo img{
opacity: 0;
visibility: hidden;
}
body:not(.sticky-nav-min) .menu-group .eg-logo{
background: url('https://editor-assets.abtasty.com/50844/64ff568b1e73d1694455435.svg');
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
.eg-scroll-arrow {
position: absolute;
bottom: 8%;
width: 20px;
height: 20px;
transform: translateX(-50%);
left: 50%;
cursor: pointer;
z-index: 9999;
}
@media screen and (min-height:1130px){
html body .eg-scroll-arrow {
bottom: 40px;
}
}