DrSport scripts
<script>
$(window).scroll(function () {
if ($(this).scrollTop() > 27) {
$("body").addClass("sticky");
} else {
$("body").removeClass("sticky");
}
});
</script>
<script>
$('.type-product .row-header-label-colon').remove();
$('.detail-parameters tr th').each(function() {
var param_class_by_content = $(this).text().toLowerCase();
$(this).parent().addClass(param_class_by_content);
});
</script>
<script>
$("#hp_grid").prependTo('.in-index #content-wrapper');
if ($('.votes-wrap.simple-vote > .vote-wrap').length %2 != 0){
$('.votes-wrap.simple-vote').addClass('odd_reviews');
}else{
$('.votes-wrap.simple-vote').addClass('even_reviews');
}
function isEmpty( el ){
return !$.trim(el.html())
}
if (isEmpty($('.p-image + .row'))) {
$('.p-image').addClass('no_thumbnails');
}
$('.in-index .site-name a img').attr('src','/user/documents/upload/res2023/DrSport/logo_white.png');
$('.type-product .breadcrumbs').prependTo('.p-data-wrapper');
$('.type-category .breadcrumbs').prependTo('#content');
$('.p-detail-tabs-wrapper').appendTo('.p-data-wrapper');
$(".stars-label:contains('Neohodnoceno')").hide();
$('<div class="footer_brands"> <a href="/znacka/beany/"><img src='https://cdn.myshoptet.com/usr/code.kubanavratil.com/user/documents/upload/res2023/DrSport/brands/brand_beany.png'></a> <a href="/znacka/rock-machine/"><img src='https://cdn.myshoptet.com/usr/code.kubanavratil.com/user/documents/upload/res2023/DrSport/brands/brand_rock_machine.png'></a> <a href="/znacka/kalas/"><img src='https://cdn.myshoptet.com/usr/code.kubanavratil.com/user/documents/upload/res2023/DrSport/brands/brand_kalas.png'></a> <a href="/znacka/giro/"><img src='https://cdn.myshoptet.com/usr/code.kubanavratil.com/user/documents/upload/res2023/DrSport/brands/brand_giro.png'></a> <a href="/znacka/focus/"><img src='https://cdn.myshoptet.com/usr/code.kubanavratil.com/user/documents/upload/res2023/DrSport/brands/brand_focus.png'></a> <a href="/znacka/100/"><img src='https://cdn.myshoptet.com/usr/code.kubanavratil.com/user/documents/upload/res2023/DrSport/brands/brand_100.png'></a> </div>').insertBefore('#footer');
if ( $('.extended-description-inner').children().length > 0 ) {
} else {
$('#extendedDescription').addClass('has_no_params');
}
</script>
<script>
$('.p-thumbnail').click(function() {
setTimeout(
function() {
$('.p-main-image').trigger('click');
}, 50);
});
</script>
<script>
var doit;
$('#header').bind("DOMSubtreeModified", function() {
clearTimeout(doit);
doit = setTimeout(function() {
console.log('render');
$('#navigation').addClass('menu-show');
$('#header').unbind("DOMSubtreeModified");
}, 200);
});
</script>
<script>
$('.description-inner .basic-description>h4:first-child').text('Popis produktu');
$('.basic-description > *:gt(0)').wrapAll('<div class="acc_wrapper"> </div>');
$('.basic-description > h4:first-child').click(function() {
$(this).parent().toggleClass('acc_opened');
});
$('<h4>Parametry produktu</h4>').prependTo('.extended-description');
$('.extended-description .detail-parameters').wrapAll('<div class="acc_wrapper"> </div>');
$('.extended-description > h4:first-child').click(function() {
$(this).parent().toggleClass('acc_opened');
});
$('<h4>Diskuze k produktu</h4>').prependTo('#productDiscussion');
$('#productDiscussion > *:gt(0)').wrapAll('<div class="acc_wrapper"> </div>');
$('#productDiscussion > h4:first-child').click(function() {
$(this).parent().toggleClass('acc_opened');
});
$('<h4>Více o výrobci</h4>').prependTo('#manufacturerDescription');
$('#manufacturerDescription > *:gt(0)').wrapAll('<div class="acc_wrapper"> </div>');
$('#manufacturerDescription > h4:first-child').click(function() {
$(this).parent().toggleClass('acc_opened');
});
$('<h4>Recenze produktu</h4>').prependTo('#ratingTab');
$('#ratingTab > *:gt(0)').wrapAll('<div class="acc_wrapper"> </div>');
$('#ratingTab > h4:first-child').click(function() {
$(this).parent().toggleClass('acc_opened');
});
</script>
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script>
<script>
$('.footer_brands').slick({
dots: true,
infinite: true,
slidesToShow: 5,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
responsive: [
{
breakpoint: 992,
settings: {
slidesToShow: 4,
slidesToScroll: 1,
infinite: true,
dots: true
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 3,
slidesToScroll: 1
}
}
]
});
</script>
<script>
$('.carousel-control.right').click(function() {
const audio = new Audio("https://code2.kubanavratil.com/user/documents/upload/res2023/DrSport/bicycle_bell.mp3");
audio.play();
});
</script>
<script>
var added_signature = '<div class="kn_made_by" style="color: #000;margin: 3px 0px 0px 0px;"><style>#signature {text-align: right;}</style><span style="white-space: nowrap;margin-right: 10px; color: #787878;">& upravil </span><a href="http://kubanavratil.com/" target="blank_"><img src='https://cdn.myshoptet.com/usr/code.kubanavratil.com/user/documents/upload/res2023/DrSport/signature_white.svg' style="max-height: 40px;"></a></div>';
$(added_signature).appendTo('#signature');
$("#footer #signature ").css("display", "flex");
</script>