Wed Mar 03 2021
Copied to clipboard! Copy reply
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
<style>
  .product .header {
  padding: 16px 0;
}
.dollar {
  font-size: 26px;
  font-weight: 700;
}
.product .body { min-height: 192px; }
.pricing {
 border-bottom: 1px solid #979797;
color: #262626;
  padding-top: 5px!important;
  width: 80%;
}
.pricing .dollar span:nth-of-type(1) {
      top: -18px!important;
    right: -3px!important;
  font-size: 18px!important;
}

.pricing .cents, .pricing .parcel {
  font-size: 18px!important; 
}

.pricing .cents-wrap {
top: -10px!important;
}

.prod-desc {
  padding: 22px 32px;
}

.footer {
flex-direction: column;
}
.footer .original-price {
  order: 0;
  padding: 10px 0 30px 0;
  text-align: center;
}

.footer a.add-to-cart { margin: 25px auto 11px }

.footer a.add-to-cart.disabled { background: #999!important; }

.language-container {
  max-width: 900px;
  width: 100%!important;
}

section.product[data-level='lifetimeplus-u'] .description {
display: none!important;
}

section.product[data-level='12-u'] .prod-desc {
   width: 195px;
}
section.product[data-level='lifetimeplus-u'] .prod-desc {
  width: 200px;
}

section.product[data-level='lifetime-u'] .prod-desc {
  width: 201px;
}
section.product[data-level='3'] .prod-desc {
  width: 188px;
  padding: 22px 9px;
}

#showlangs { color: #0098DB; font-weight: 700; }

#langswrap h4 { margin-bottom: 21px!important }

.languages ul {
  line-height: 25px;
}

.young { display: none!important }
  
  .products  {
  position: relative;
}
#langswrap {
  position: absolute;
  z-index: 1;
  top: 27%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 88%;
    max-width: 950px;
}
  
.languages-wrap { 
  display: none;
 
}
  
  .products  {
  position: relative;
}



.language-container {  
}
</style>

<script>

vuedata.abTest = { showlangs: false };

document.querySelector("section[data-level='12-u'] .header").classList.add("pink");
document.querySelector("section[data-level='lifetime-u'] .header").classList.add("pink");

// 3 MONTHS
threeMonthText = "<div class='prod-desc'>Try our fully immersive language curriculum,<br>set to your brain’s natural learning ability.</div><a href='#' id='showlangs'>SELECT A LANGUAGE</a>";

document.querySelector(".product[data-level='3'] .body .pricing").insertAdjacentHTML('afterend', threeMonthText);
$op = document.querySelector(".product[data-level='3'] .body .original-price");
$opElement = document.querySelector(".product[data-level='3'] .body").removeChild($op);
document.querySelector(".product[data-level='3'] .footer").insertAdjacentElement('beforeend',$opElement);

// 12 MONTHS
twelveMonthText = "<div class='prod-desc'>Spend a year working on as many languages as you like with course goals set to your pace.</div>";

document.querySelector(".product[data-level='12-u'] .body .pricing").insertAdjacentHTML('afterend', twelveMonthText);
$op = document.querySelector(".product[data-level='12-u'] .body .original-price");
$opElement = document.querySelector(".product[data-level='12-u'] .body").removeChild($op);
document.querySelector(".product[data-level='12-u'] .footer").insertAdjacentElement('beforeend',$opElement);

// LIFETIME U
lifetimeText = "<div class='prod-desc'>Immerse yourself in all 24 of our languages, and our award-winning auxiliary tools, for as long as you want.</div>";

document.querySelector(".product[data-level='lifetime-u'] .body .pricing").insertAdjacentHTML('afterend', lifetimeText);
$op = document.querySelector(".product[data-level='lifetime-u'] .body .original-price");
$opElement = document.querySelector(".product[data-level='lifetime-u'] .body").removeChild($op);
document.querySelector(".product[data-level='lifetime-u'] .footer").insertAdjacentElement('beforeend',$opElement);

// LIFETIME PLUS
lifetimeplusText = "<div class='prod-desc'>Unlock all 24 languages plus <strong>12 months of Unlimited Live Coaching</strong> with our native-speaking experts to deepen and accelerate your learning.</div>";

document.querySelector(".product[data-level='lifetimeplus-u'] .body .pricing").insertAdjacentHTML('afterend', lifetimeplusText);
$op = document.querySelector(".product[data-level='lifetimeplus-u'] .body .original-price");
$opElement = document.querySelector(".product[data-level='lifetimeplus-u'] .body").removeChild($op);
document.querySelector(".product[data-level='lifetimeplus-u'] .footer").insertAdjacentElement('beforeend',$opElement);

var closeX = "<span style='position:absolute; right: 16px; top: -4px; color: #fff;font-size: 52px;cursor: pointer', id='close-langs'>&times;</span>";
document.querySelector('#langswrap').insertAdjacentHTML('afterbegin', closeX);

// Show lang dialog when 'select a lang' is clicked in 3m
document.querySelector("#showlangs").addEventListener('click', function (e) {
	e.preventDefault()
    vuedata.abTest = {showlangs: true}
})


// Hide lang dialog when X is clicked
document.querySelector("#close-langs").addEventListener('click', function () {
    vuedata.abTest = {showlangs: false}
})

// lifetimeplus footer text
document.querySelector('.product[data-level="lifetimeplus-u"] .footer a')
.insertAdjacentHTML('afterend', "<div style='text-align:center;width: 160px; color:#4b4b4b;font-size:10px;line-height:12px; margin: 0 auto'>After that, keep Unlimited Live Coaching for just $129 a year</div>")


document.querySelector("section[data-level='3'] .subname").innerHTML = "Single Language"

var original = document.querySelector(".product[data-level='3'] .add-to-cart");
var clone = original.cloneNode(true);
original.parentNode.replaceChild(clone, original);
clone.removeAttribute("href");

// Make 3m disabled
clone.classList.add("disabled")

for (let link of document.querySelectorAll('.menu-groups.languages a')) {
    link.addEventListener("click", function(e) {
        e.preventDefault();
        let id = e.target.dataset.id;
        vuedata.$store.commit("UPDATE_LANG_ID", id);

        // clone.parentNode is null after this is ran once
        if (clone.parentNode) {
          clone.parentNode.replaceChild(original, clone);
        }
        vuedata.abTest = { showlangs: false };
        //
        var languageName = e.target.innerHTML
        window.setTimeout(function() {
          document.querySelector("section[data-level='3'] .subname").innerHTML = "Single Language"
        },0)
        document.querySelector("#showlangs").innerHTML = languageName
        
    });
}
</script>