(function(){
var style=document.createElement('style');style.type='text/css';style.appendChild(document.createTextNode('html body .header-promo-banner { display: none !important;}html body .cv-0-trust-bar { display: flex; justify-content: center; align-items: center; grid-gap: 9px; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(17px); padding: 12px 0;}html body .cv-0-new-hero { background: linear-gradient(180deg, #000B2B 0%, #314C71 0.01%, #001125 100%); margin-bottom: 66px;}html body .cv-0-trust-bar_brand,html body .cv-0-trust-bar_rating-stars { display: flex; align-items: center;}html body .cv-0-trust-bar_ratings { margin: 0 !important; color: #FFF; font-size: 16px; font-style: normal; font-weight: 400; line-height: 155.09%;}html body .cv-0-hero-body_usps { list-style: none; display: flex; margin-bottom: 0; grid-gap: 24px; justify-content: center; padding: 0 50px 24px !important;}html body .cv-0-hero-body_usp { display: flex; padding: 24px; align-items: center; grid-gap: 24px; width: 100%; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(17px);}html body .cv-0-hero-body_usp-right { margin-bottom: 0 !important; color: white;}html body .cv-0-hero-body_usp-right strong { color: #FFF; font-size: 14px; font-style: normal; font-weight: 700; line-height: normal; text-transform: uppercase; font-family: DaxPro-WideBold !important; display: block;}html body .cv-0-hero-body_usp-right span { color: rgba(255, 255, 255, 0.70); font-size: 14px; font-style: normal; font-weight: 400; line-height: normal; display: block; margin-top: 5px; font-family: DaxPro-WideRegular !important;}html body .cv-0-hero-body_usp-left,html body .cv-0-hero-body_usp-left img { min-width: 34px !important; max-width: 34px !important; aspect-ratio: 1/1;}html body .cv-0-hero-body { display: flex; justify-content: space-between; padding-top: 55px; padding-bottom: 94px;}html body .cv-0-hero-body_left p { color: #FFF; font-family: DaxPro-WideBold; font-size: 48px; font-style: normal; font-weight: 700; line-height: normal; margin-bottom: 43px;}html body .cv-0-hero-body_left a { display: flex; padding: 16px 30px; justify-content: center; align-items: center; gap: 10px; width: max-content; border-radius: 4px; background: #3162C6; color: white; font-family: DaxPro-WideBold; font-size: 16px; font-style: normal; font-weight: 700; line-height: normal; text-decoration: none;}html body .cv-0-hero-body_left { display: flex; justify-content: flex-start; width: 100%; align-items: center; padding-right: 25px; padding-top: 25px; padding-left: 12%;}html body .cv-0-hero-body_left>div { width: 100%; max-width: 356px;}html body .cv-0-hero-body_left { max-height: 394px !important; flex: 1;}html body .cv-0-hero-body_right { flex: 1; min-height: 427px;}html body .cv-0-hero-body_right img { max-height: 100% !important;}html body .cv-0-hero-body_right { display: flex; justify-content: flex-end;}html body .minicart .minicart-link .minicart-icon { display: none;}html body .minicart .minicart-link::before { content: ""; width: 24px; height: 24px; background: url("https://cfactory-img.s3.amazonaws.com/pitches/tempur/np_shopping-bag_356202_000000%201.svg"); background-repeat: no-repeat; display: inline-block !important;}html body:not(.eg-show-search) #simpleSearch { opacity: 0 !important; pointer-events: none !important;}@media(max-width:1155px) { html body .cv-0-hero-body_left { padding-left: 16px !important; } html body .cv-0-hero-body_usps { padding-left: 16px !important; padding-right: 16px !important; } html body .cv-0-hero-body_right { min-height: unset !important; } html body .cv-0-hero-body_right img { width: 100% !important; }}@media(min-width:768px) and (max-width:991px) { html body .cv-0-hero-body_usp { padding: 10px !important; } html body .cv-0-hero-body_usp-right strong, html body .cv-0-hero-body_usp-right span { font-size: 12px !important; }}@media(max-width:767px) { html body .cv-0-hero-body { flex-direction: column !important; } html body .cv-0-hero-body_usps { display: grid; grid-template-columns: repeat(2, minmax(auto, 1fr)); grid-template-rows: repeat(2, minmax(109px, auto)); grid-gap: 10px !important; } html body .cv-0-hero-body_usp { flex-direction: column; align-items: flex-start !important; grid-gap: 8px !important; padding: 16px !important; } html body .cv-0-hero-body { padding-bottom: 0 !important; margin-bottom: -22px; padding-top: 36px; } html body .cv-0-hero-body_right img { object-position: 121px 0; margin-top: 28px; } html body .cv-0-hero-body_left { padding: 0; text-align: center; padding-left: 0 !important; justify-content: center; } html body .cv-0-hero-body_left>div { display: flex; flex-direction: column; align-items: center; } html body .cv-0-hero-body_left p { font-size: 34px !important; margin-bottom: 24px; } html body .cv-0-hero-body_left a { padding-left: 25px !important; padding-right: 25px !important; }}/* navigation */@media(min-width:1024px) { html body nav .mega-menu-container .navbar-top-items { display: none !important; } html body nav .heading-container { background: white; flex-wrap: nowrap !important; margin-left: 0 !important; margin-right: 0 !important; max-width: 100%; } html body nav .brand { background: none !important; display: flex; justify-content: center; align-items: center; padding-bottom: 11px; padding-top: 11px; } html body nav .brand img { filter: invert(1); } html body nav .mega-menu-container { flex-direction: row !important; display: flex; padding-right: 0 !important; } html body nav .mega-menu-container>.row:last-child { order: -1 !important; } html body nav .mega-menu-container .menu-group, html body nav .mega-menu-container .navbar-header { background: white !important; } html body nav .mega-menu-container .main-menu { background-color: white !important; } html body nav .mega-menu-container .header { background: white !important; } html body nav .mega-menu-container .row { margin-left: 0 !important; margin-right: 0 !important; } html body nav .brand a { margin: 0 !important; } html body nav .mega-menu-container #sg-navbar-collapse { display: flex; align-items: center; } html body nav .mega-menu-container .searchbox-wrapper { position: static !important; max-width: unset !important; margin-top: 0 !important; } html body nav .mega-menu-container .navbar-nav { margin-left: 0 !important; } html body nav .mega-menu-container .row .header { display: flex; align-items: center; } html body nav .mega-menu-container .row .header .site-search .search-field { width: 100% !important; } html body nav .mega-menu-container .row .header .header-wishlist { display: flex; align-items: flex-start; margin-top: -3px; margin-left: 10px; margin-right: 4px; } html body nav .mega-menu-container .row .header .menu-wrapper { padding: 0 !important; } html body nav>.container { padding-right: 0 !important; } html body nav .mega-menu-container .row .header .minicart { margin-right: 0 !important; padding-right: 36px !important; }}@media(max-width:1302px)and (min-width:1024px) { html body nav .mega-menu-container .row .header .minicart { position: relative; }}@media(max-width:1200px) and (min-width:1024px) { html body nav .brand { flex: 0 0 8.33333% !important; max-width: 8.33333% !important; }}@media(min-width:1024px) { html body .minicart .minicart-quantity { position: absolute; top: 0 !important; right: 10px !important; }}/* mobile nav */@media(max-width:1024px) { html body .navbar-header { background: white !important; } html body .navbar-header .icon-m-hamburger-menu, html body .navbar-header .icon-close-white { filter: invert(1) !important; } html body .navbar-header .brand-mobile img { filter: invert(1) !important; } html body .navbar-header .brand-mobile { padding-top: 10px !important; } html body .navbar-header .icons { padding-top: 10px !important; } html body .navbar-header .icons .header-wishlist { margin-top: -3px; }}'));document.head.appendChild(style);
(function (w) {
"use strict";
var tag = "cv-0",
debug = document.cookie.indexOf("cfQA") > -1,
window = typeof unsafeWindow !== "undefined" ? unsafeWindow : w;
window[tag] = {
log: function (msg) {
if (debug) console.log("[EXPO]", tag, "-->", msg);
},
waitForElement: function (cssSelector, callback) {
var stop,
elementCached,
timeout,
check = function () {
try {
elementCached = document.querySelector(cssSelector);
if (stop) return;
if (elementCached) {
callback(elementCached);
clearTimeout(timeout);
window[tag].log(cssSelector + " found");
} else {
window.requestAnimationFrame(check);
}
} catch (err) {
window[tag].log(err.message);
}
};
window.requestAnimationFrame(check);
timeout = setTimeout(function () {
stop = true;
window[tag].log(cssSelector + " not found");
}, 5000);
},
testStart: function () {
try {
this.waitForElement("body", function (docBody) {
docBody.classList.add(tag);
});
// INITIALIZE THE TEST
initVariation();
window[tag].log("test running");
} catch (err) {
window[tag].log(err.message);
}
},
};
var NewHeroHTML = '' +
' <div class="' + tag + '-new-hero">' +
' <div class="' + tag + '-trust-bar">' +
' <span class="' + tag + '-trust-bar_brand">' +
' <img src="https://cfactory-img.s3.amazonaws.com/pitches/tempur/star.svg">' +
' </span>' +
' <span class="' + tag + '-trust-bar_rating-stars">' +
' <img src="https://cfactory-img.s3.amazonaws.com/pitches/tempur/stars.svg">' +
' </span>' +
' <p class="' + tag + '-trust-bar_ratings"><strong>4.5</strong> out of 5</p>' +
' </div>' +
' <div class="' + tag + '-hero-body">' +
' <div class="' + tag + '-hero-body_left">' +
' <div><p>More than just memory foam</p><a href="https://uk.tempur.com/mattresses/">Find your perfect mattress</a></div>' +
' </div>' +
' <div class="' + tag + '-hero-body_right">' +
' <img src="https://cfactory-img.s3.amazonaws.com/pitches/tempur/herodesktopimage.svg">' +
' </div>' +
' </div>' +
' <div class="' + tag + '-hero-body_footer">' +
' <ul class="' + tag + '-hero-body_usps">' +
' <li class="' + tag + '-hero-body_usp">' +
' <span class="' + tag + '-hero-body_usp-left">' +
' <img src="https://cfactory-img.s3.amazonaws.com/pitches/tempur/moonusp.svg">' +
' </span>' +
' <p class="' + tag + '-hero-body_usp-right">' +
' <strong>100 night trial</strong>' +
' <span>Love it or return it</span>' +
' </p>' +
' </li>' +
' <li class="' + tag + '-hero-body_usp">' +
' <span class="' + tag + '-hero-body_usp-left">' +
' <img src="https://cfactory-img.s3.amazonaws.com/pitches/tempur/washusp.svg">' +
' </span>' +
' <p class="' + tag + '-hero-body_usp-right">' +
' <strong>Easy zip cover</strong>' +
' <span>Washable at 60°</span>' +
' </p>' +
' </li>' +
' <li class="' + tag + '-hero-body_usp">' +
' <span class="' + tag + '-hero-body_usp-left">' +
' <img src="https://cfactory-img.s3.amazonaws.com/pitches/tempur/aprusp.svg">' +
' </span>' +
' <p class="' + tag + '-hero-body_usp-right">' +
' <strong>Interest free credit*</strong>' +
' <span>for up to 2 years</span>' +
' </p>' +
' </li>' +
' <li class="' + tag + '-hero-body_usp">' +
' <span class="' + tag + '-hero-body_usp-left">' +
' <img src="https://cfactory-img.s3.amazonaws.com/pitches/tempur/dlvrusp.svg">' +
' </span>' +
' <p class="' + tag + '-hero-body_usp-right">' +
' <strong>Free delivery & returns</strong>' +
' <span>For mainland UK</span>' +
' </p>' +
' </li>' +
' </ul>' +
' </div>' +
' </div>';
// INITIALIZE VARIATION
window[tag].testStart();
function initVariation() {
window[tag].waitForElement(".home-main.homepage", () => {
var sel = '.' + tag + '-new-hero'
if (!document.querySelector(sel)) {
document.querySelector('.home-main.homepage').innerHTML = NewHeroHTML;
events();
}
});
}
var events = function () {
document.querySelector("html body .search-button.desktop-search").addEventListener("click", function () {
document.body.classList.toggle("eg-show-search");
});
}
})(window);
})();