function runAfterElementExists(jquery_selector, callback) {var checker = window.setInterval(function() {if ($(jquery_selector).length) {clearInterval(checker);callback();}}, 500);} $(document).ready(function(){ runAfterElementExists('.widget-attribute', function() { if ($('.variation-select').length==0){ $('.info>li.av').removeClass('d-none'); $('.info>li.art-no').removeClass('d-none'); } else { $('.widget-item-availability-notification').addClass('d-none'); }; }); var swiper = new Swiper(".ItemImgPreview", {lazy: true, loop: false, spaceBetween: 10, slidesPerView: 6, freeMode: false, watchSlidesProgress: true, }); var swiper2 = new Swiper(".ItemImg", {lazy: true, loop: true, spaceBetween: 10, navigation: {nextEl: ".swiper-next",prevEl: ".swiper-prev", },thumbs: {swiper: swiper, },}); var oldArtNr = $('.art-no>span.variationNumber').html(); var newArtNr = oldArtNr.split('-', 3); runAfterElementExists('li.xmas.xmas10.d-none', function() {if(newArtNr[0]==10){$('li.xmas.xmas10').removeClass('d-none')};}); runAfterElementExists('.indexOfText', function() {if ((newArtNr[0] != 20) || (newArtNr[0] != 21) || (newArtNr[0] != 22) || (newArtNr[0] != 23)) {$('.indexOfText').remove();};}); runAfterElementExists('.variation-select', function() { var pleaseSelect = $('.variation-select .select_container>b').text(); if (pleaseSelect.includes('Bitte')){} else { $('.info>li.av.d-none').removeClass('d-none'); $('.info>li.art-no.d-none').removeClass('d-none'); }; $('.dropdown_container .v-s-box').click(function(){ $('.info>li.av.d-none').removeClass('d-none'); $('.info>li.art-no.d-none').removeClass('d-none'); $('.widget-item-availability-notification.d-none').removeClass('d-none'); }); $(".variation-select select").change(function() { $('.info>li.av.d-none').removeClass('d-none'); $('.info>li.art-no.d-none').removeClass('d-none'); $('.widget-item-availability-notification.d-none').removeClass('d-none'); }); $(document).ready(function(){ if ( $('.add-to-basket-container button').hasClass('disabled')){} else { $('.diamondInfoText').show(); $('.info>li.av').delay( 1500 ).show(); $('input[name="variationid"]').val('10-38382'); $(".ItemQuestionForm form > input[data-mail='subject']").val("Artikel-Nummer: " + oldArtNr); $('.ItemQuestionForm input[name="Artikelnr."]').attr('disabled', 'disabled').val(oldArtNr);};}); $('.p-container').removeClass('d-none'); $('.widget-add-to-basket').removeClass('d-none'); if($("select.custom-select option").val() == '-1'){ $('.info>li.av').hide(); if (newArtNr.length > 2) { $('.art-no>span:nth-child(2)').after('' + newArtNr[0] +'-'+ newArtNr[1] +'').hide();} else { $('.art-no>span:nth-child(2)').after('' + newArtNr[0] +'-'+ newArtNr[1] +'').hide();} }; $(".v-s-boxes .v-s-box").click(function() { $('.fromPrice').addClass('d-none');$('.newnr').remove(); $('.art-no>span:nth-child(2)').delay( 1500 ).show(); $('.add-to-basket-container').removeClass("disabled"); $('.info>li.av').delay( 1500 ).show(); }); $("select[id='Diamant Qualität']").change(function() { $('.diamondInfoText').show(); $('.info>li.av').delay( 1500 ).show(); }); }); runAfterElementExists('.img-container .bubble', function() { var oldUVP=5913; var currentPrice = 5285; function calculatePercent() {var percent = (oldUVP-currentPrice)/oldUVP*100;var percentRound = Math.round(percent); if(percentRound>2){ $(".img-container .bubble").html("-"+percentRound+"%");} else {$(".short .crossprice").hide(); $(".img-container .bubble").hide();};}; calculatePercent();}); var averageCount=$('.feedback-average-count').text(); $('.sectionHeader .reviewCountTarget').html(averageCount); }); function timeOut() {$('.single .p-container').show();} runAfterElementExists('.single .cross-box>div.col-12>.itemBox', function() { $('.single .cross-box>div.col-12>.itemBox').addClass('col-xs-6 col-sm-4 col-lg-3 col-xl-2 item'); }); runAfterElementExists('.v-s-boxes .v-s-box.invalid', function() { $(".v-s-boxes .v-s-box").not(".v-s-boxes .v-s-box.invalid").click(function() {$('.fromPrice').remove(); setTimeout(timeOut, 1000);}); $(".v-s-boxes .v-s-box.invalid").click(function() {$('.single .p-container').hide();}); }); runAfterElementExists('.ItemQuestionForm form', function() { var oldArtNr = $('.art-no>span.variationNumber').html(); var newArtNr = oldArtNr.split('-', 3); $('input[name="variationid"]').val('10-38382'); $(".ItemQuestionForm form > input[data-mail='subject']").val("Artikel-Nummer: " + oldArtNr); $('.ItemQuestionForm input[name="Artikelnr."]').attr('disabled', 'disabled').val(oldArtNr); $("select.custom-select").change(function() { $(".ItemQuestionForm form > input[data-mail='subject']").val("Artikel-Nummer: " + oldArtNr); }); });
(function () { var _tsid = 'XA48ACB074A9B82AE582D121E63B0A3EA'; _tsConfig = { 'yOffset': '0', /* offset from page bottom */ 'variant': 'reviews', /* default, reviews, custom, custom_reviews */ 'customElementId': '', /* required for variants custom and custom_reviews */ 'trustcardDirection': '', /* for custom variants: topRight, topLeft, bottomRight, bottomLeft */ 'disableResponsive': 'false', /* deactivate responsive behaviour */ 'disableTrustbadge': 'false' /* deactivate trustbadge */ }; var _ts = document.createElement('script'); _ts.type = 'text/javascript'; _ts.charset = 'utf-8'; _ts.async = true; _ts.src = '//widgets.trustedshops.com/js/' + _tsid + '.js'; var __ts = document.getElementsByTagName('script')[ 0]; __ts.parentNode.insertBefore(_ts, __ts); }) ();