- 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
<script>
window.setTimeout(function() {
;(function() {
var fullLangName = $('.masthead_langname1').html()
// Step 1: Create dom nodes
var productDescription = ''
+ '<div class="product-desc">'
+ ' <div class="oct_2016_language_header">Learn ' + fullLangName + '</div>'
+ ' <h3>SUBSCRIPTION BOX</h3>'
+ ' <p>'
+ ' Grab the classic Rosetta Stone box and get access to a 24 month. '
+ ' subscription, which also includes a code to download Rosetta Stone'
+ ' on your computer. Featuring TruAccent® speech-recognition technology,'
+ ' it’s the only program that gets you talking like a local.'
+ ' </p>'
+ ' <div class="guarantee">'
+ ' <div></div>'
+ ' <div>'
+ ' <h3>PURCHASE WITH CONFIDENCE</h3>'
+ ' <p>'
+ ' No long-term commitments. Cancel anytime.'
+ ' 30-Day Money back guarantee.'
+ ' </p>'
+ ' </div>'
+ ' </div>'
+ '</div>'
;
var stripes = ''
+ '<svg class="gifting_bg" style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 0;" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice">'
+ ' <rect x="0" y="0" width="100%" height="100%" style="fill: url(#yllines);"></rect>'
+ ' </svg>'
+ ' <svg aria-hidden="" id="gifting_bg_defs" width="1px" height="1px" style="z-index: -1; position: absolute; left: -100vw; border: 5px solid black">'
+ ' <defs>'
+ ' <pattern id="redlines" x="0" y="0" width="20" height="100" patternUnits="userSpaceOnUse" patternTransform="rotate(50)"></pattern>'
+ ' <rect x="0" y="0" height="100" width="10" style="stroke: none; fill: #ffffff; fill-opacity: .10;"></rect>'
+ ' </pattern>'
+ ' <pattern id="redlinesb" x="0" y="0" width="20" height="100" patternUnits="userSpaceOnUse" patternTransform="translate(-6.1, 0) rotate(50)">'
+ ' <rect x="0" y="0" height="100" width="10" style="stroke: none; fill: #ffffff; fill-opacity: .10;"></rect>'
+ ' </pattern>'
+ ' <pattern id="yllines" x="0" y="0" width="30" height="100" patternUnits="userSpaceOnUse" patternTransform="translate(-1, 0) rotate(50)" style="display: inline;">'
+ ' <rect x="0" y="0" height="100" width="15" style="stroke: none; fill: #ffffff; fill-opacity: .15;"></rect>'
+ ' </pattern>'
+ ' </defs>'
+ ' </svg>'
;
var index = !!RSI({cat:lang, lvl:'S5'}) ? -1 : -2
// This is the "Learn {lang}. Subscription Box. lorem lorem lorem.."
$('.oct_2016_gold_bg .js_product_boxes_desktop').prepend(productDescription)
// The grey header over the product section
$('.oct_2016_gold_bg .oct_2016_product_square.js_oct_2016_product').eq(index)
.find('.oct_2016_product_square_content .oct_2016_product_square_header')
.show().find('span').html('24-MONTH').siblings('div')
.html('SUBSCRIPTION BOX')
// Yellow stripes in gold bg section
$('.oct_2016_container.oct_2016_gold_bg').append(stripes)
$('.rs_classic span').html('SUBSCRIPTION BOX')
// Step 2: magic
var productImg, ptoSku, msrp;
switch (lang)
{
case 'eng':
productImg = 'English_box_DL_24.png'
ptoSku = 91190
break;
case 'fra':
productImg = 'French_box_DL_24.png'
ptoSku = 91192
break;
case 'deu':
productImg = 'German_box_DL_24.png'
ptoSku = 91194
break;
case 'ita':
productImg = 'Italian_box_DL_24.png'
ptoSku = 91196
break;
case 'esp':
productImg = 'SpanishLA_box_DL_24.png'
ptoSku = 91198
break;
case 'chi':
productImg = 'Chinese_box_DL_24.png'
ptoSku = 91200
break;
case 'jpn':
productImg = 'Japanese_box_DL_24.png'
ptoSku = 91208
break;
default:
productImg = 'Agnostic_box_DL_24.png'
ptoSku = 91187
break;
}
$('.oct_2016_gold_bg .oct_2016_product_square.js_oct_2016_product')
.css({
'background-image' : 'url("https://www.rosettastone.com/lp/globals/img/retailboxes/' + productImg + '")'
})
$cartButton = $('.oct_2016_gold_bg .oct_2016_addtocart_square.js_oct_2016_addtocart.js_cddl_media').eq(2)
var currentHref = $cartButton.attr('href')
var newHref = currentHref.replace(/\/sku\/\d+/i, '/sku/' + ptoSku)
console.log(newHref)
$cartButton.attr('href', newHref)
})();
}, 1000)
</script>