$(document).ready(function () {
javascript: (function () { $.getScript('https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.js'); }());
});
$('.lego-box-stavebnice').click(function () {
const index = $('.lego-box-stavebnice').index(this);
const el = $('.lego-box-stavebnice')[index]
const str = '#owl-example-' + index;
const carousel = $('.lego-product_right-column > .lego-product_carousel').eq(index)
carousel.owlCarousel({
addClassActive: true,
singleItem: true,
navigation: true,
lazyLoad: true,
nav: true,
navigationText: [
"
\n "1.1\" class=\"left-arrow\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\" y=\"0px\" viewBox=\"0 0 477.175 477.175\" style=\"enable-background:new 0 0 477.175 477.175;\"\n xml:space=\"preserve\">\n "M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225\n c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z\" />\n \n ",
"
\n "1.1\" class=\"right-arrow\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\" y=\"0px\" viewBox=\"0 0 477.175 477.175\" style=\"enable-background:new 0 0 477.175 477.175;\"\n xml:space=\"preserve\">\n "M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225\n c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z\" />\n \n "]
});
function sequence(index) {
const arr = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31];
const result = arr.filter(function (el) { return el === index })
return Boolean(result[0])
}
// ADD lego-product_triangle to selected square/tile
if ($('.lego-product_container > .lego-product_triangle')[index]) {
let position;
const indexPlusOne = index + 1
if (window.innerWidth > 729) {
if (sequence(indexPlusOne)) {
position = '16%'
} else if (indexPlusOne % 3 === 0) {
position = '84%'
} else {
position = '50%'
}
} else {
position = '50%'
}
$('.lego-product_container > .lego-product_triangle')[index].style.left = position;
}
$('.lego-product_container').not($(this).next()).hide(0);
if (window.innerWidth > 729) {
$(this)
.next('.lego-product_container')
.toggle(0)
.addClass('order');
} else {
$(this).next('.lego-product_container').toggle(400)
}
});
$(function () {
$('.bnr-full').remove();
});