Mon Aug 22 2016
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
<script>

var SPO = 2;

$(document).ready(function(){
    // hide inactive spo experience
    if (typeof SPO !== "undefined") {
        $("body").addClass("spo");
        var selector = ".spo-prod:not(.exp"+SPO+"A-prod), .spo-banner:not(.exp"+SPO+"A-banner)";
        $(selector).remove();
        $(".control-exp").remove();
        $(".spo-banner, .spo-prod, .spo-description, .spo-bottomsection").show();
    }
    
    $(".spo-description-wrap").show();
    var _24s = $('.spo-prod .product-select label:nth-of-type(2)');
    var parents = _24s.map(function(i,v){ return $(v).parent() });
    _24s.detach();
    parents.each(function(i,v){ $(v).prepend(_24s[i]); })
    //click first radio
    $($("input[name^='product-radio']").get().reverse()).click();

// change product name in cart lightbox
try {
  window.setTimeout(function() {
  jQuery.each(jQuery('.cart-product-name'), function(i, e) {
    var langname = jQuery(e).text().match(/.+(?=lifetime)/i)
    if (langname) {
      console.log('langname: ',langname)
      $(e).html(langname[0] + '<br> 24 months- Family Pack')
    }
  })  
  }, 3000)  
} catch(e) {}


});

</script>