document.addEventListener('DOMContentLoaded', function() { if($("select.custom-select option:selected").text().indexOf('Bitte') >= 0){ $('.info>li.av').hide(); var oldArtNr = $('.art-no>span:nth-child(2)').html(); var newArtNr = oldArtNr.split('-', 1)[0]; $('.art-no>span:nth-child(2)').after('' + newArtNr + '').hide(); }; $("select.custom-select").change(function() { $('.newnr').remove(); $('.art-no>span:nth-child(2)').delay( 1500 ).show(); $('.add-to-basket-container').removeClass("disabled");$('.info>li.av').delay( 1500 ).show();}); $('input[name="variationid"]').val('93224'); if ($('.p-container .rrp>del.strike>span').length > 0){var oldUVP=24.95;var currentPrice = 25.95;function calculatePercent() {var percent = (oldUVP-currentPrice)/oldUVP*100;var percentRound = Math.round(percent);if(percentRound>2){ $(".img-container .bubble").html("-"+percentRound+"%");}else {$(".img-container .bubble").hide();};};calculatePercent();};var averageCount=$('.feedback-average-count').text();$('.sectionHeader .reviewCountTarget').html(averageCount);});