document.write("
<script type = "text/javascript"
src = "https://www.domain.com/mm5/clientside.mvc?T=93863264&amp;Filename=AttributeMachine.js"
integrity = "sha512-L9TswJp+6ItukWJrph55EYo9yHmk0BBQC+qg0JsmXI/BtxHGB0RIecJCYEqfODLFACaS90Ld/X0XMThP18v0yA=="
crossorigin = "use-credentials"
async defer > </script>
<script type = "text/javascript" >
(function(obj, eventType, fn) {
if (obj.addEventListener) {
obj.addEventListener(eventType, fn, false);
} else if (obj.attachEvent) {
obj.attachEvent('on' + eventType, fn);
}
})(window, 'attributemachine_override', function() {
AttributeMachine.prototype.Generate_Discount = function(discount) {
var discount_div;
discount_div = document.createElement('div');
discount_div.innerHTML = discount.descrip + ': ' + discount.formatted_discount;
return discount_div;
}
AttributeMachine.prototype.Generate_Swatch = function(product_code, attribute, option) {
var swatch = document.createElement('li');
var span = document.createElement('span'); // to vertically center the swatch images
var img = document.createElement('img');
img.src = option.image;
swatch.appendChild(span);
swatch.appendChild(img);
return swatch;
}
});
</script>
output - Snippet hosted by \"Cacher\"
");