newHeight = imgURLParamWidth[0] + '550', unchangedURLsubstring = "&sfrm=jpg"; var linkNewDimensions = unchangedImgURL + '?' + newWidth + '&' + newHeight + unchangedURLsubstring; if (imgURLparameters[0]!= newWidth && imgURLparameters[1]!= newHeight ) { $(productDWoutput).find(".product-image a").children("img").attr("src", linkNewDimensions); }); var promoCodes = {"200018446": "CAUDALIE50", "200018448": "OSKIA50", "200018451": "LIVING50", "200018447": "TAN75", "200018450": "REN75", "200018452": "JURLIQUE75", "200018449": "NUDE100", "200018455": "NUXE100", "200018453": "OMORO100", "200018454": "ZONDAG100" }; $("#hp_campaign .product-tile_pricing").remove(); $(".tier_products a").on("click", function (ev) { ev.preventDefault(); }); $("a.product-tile_title").each(function() { // Krijg waarden van geklikte link.
var title = $(this).text().trim(); var product = title.split(' (')[0]; var url = $(this).attr("href"); var sku = $(this).attr("href").substring(url.indexOf("MUK")+3).split(".html")[0]; var volume = title.substring(title.indexOf('(')) + " | VOLLEDIGE GROOTTE"; var volumeNoBrackets = volume.replace(/(|)/g,''); if (sku == "200018448") { volume = title.substring(title.indexOf('(')); volumeNoBrackets = volume.replace(/(|)/g,''); } var dataBlock = $( "
"+product+"
"+volumeNoBrackets+"
Gebruik code: "+promoCodes[sku]+"
"); $(this).parent().replaceWith(dataBlock); console.log(promoCodes[sku]); }); functie viewable() { $("img.isOverlay").each(function(i, el) { var el = $(el); if (el.visible(true)) { el.css("opacity","0"); } else { el.css("opacity","1"); } } viewable(); $(window).scroll(function() { viewable(); }); $(window).blur(function() { viewable(); }); $(window).on("load", function () { $(".tier_products").css({"height":"auto","opacity":"1"}); });