PageSourceSearch

https://www.buzzsneakers.sk/nb-public/themes/nbshop5_buzz_redizajn…/js/nbscript/theme.script.js?ver=1008_7.1

js buzzsneakers.sk collected 2026-10-06 20:00:47 UTC 44,939 bytes, 1,100 lines download raw bytes

1/*
2    JS fajl za inicijalizaciju teme
3
4    BASIC AND HELPER FUNCTIONS
5    INICIJALIZACIJA SLIDER-A
6    INICIJALIZACIJA PRODUCT SLIDER-A
7    INICIJALIZACIJA ARTICLE I CATEGORY SLIDER-A
8    INICIJALIZACIJA SLIDERA NA MOBILNIM TELEFONIMA | UGLANOM TABOVA
9    OSTALO
10    MAPA
11*/
12
13window.nbshopJS = new NBShopJS();
14const MAP_STYLE = [];
15
16$(document).ready(function(){
17
18
19    $("input").each(function () {
20        if(!$(this).parents('.block').hasClass('newsletter') && !$(this).parents('.block').hasClass('autocomplete-wrapper')){
21           if($(this).attr('id') !=='cart_onepage_street' && !$(this).parents('.lc-ro'))
22            $(this).removeAttr('placeholder');
23        }
24    });
25    //$('body.lc-ro .cart-step #cart_onepage_street.form-control').attr('placeholder', 'Scrie primele 3-5 caractere si alege de jos');
26    $('.address-registrated input, .address-no-registration input,.registration_form input').each(function(){
27        if($(this).data('placeholder')){
28            $(this).attr('placeholder',$(this).data('placeholder'))
29        }
30    });
31    $('.autocomplete-button-simple').click(function () {
32        $('body').addClass('search-overflow');
33    });
34
35    $('.autocomplete-close').click(function () {
36        $('body').removeClass('search-overflow');
37    });
38
39    $('.autocomplete-close').click(function () {
40        $('body').removeClass('search-overflow');
41    });
42
43    $('.product-details .product-detail-wrapper .favorite').appendTo('.product-detail-buy');
44
45    //$('#size_shart_by_product_type_modal .table-wrapper').niceScroll();/**/
46    $('#size_shart_by_product_type_modal').on('shown.bs.modal', function () {
47        $('#size_shart_by_product_type_modal .table-wrapper').niceScroll().resize();
48    });
49    $('#size_shart_by_product_type_modal').on('hidden.bs.modal', function () {
50        $('#size_shart_by_product_type_modal .table-wrapper').niceScroll().resize();
51    });
52
53    var attr = $('.products-detail-noslider .product-gallery-wrapper img').data('zoom-image');
54
55    if (typeof attr !== typeof undefined && attr !== false) {
56        var InerZoomReinit = function(){
57
58            $('.products-detail-noslider .product-gallery-wrapper img').elevateZoom({
59                zoomType: "inner",
60                cursor: "crosshair",
61                zoomWindowFadeIn: 500,
62                zoomWindowFadeOut: 750
63            });
64        };
65        InerZoomReinit();
66    }
67    let appendLangSliderToMobileMenu = () =>{
68        let langMenuSlider = $('.header-top .lang-wrapper.lang-from-slider');
69        $('.nav-main').append(langMenuSlider);
70    }
71    let autoSearchForDesktop = () => {
72        if($(window).width() >= 992 && $('#f_typesearch').val() === '-1') {
73            $('#typesearch').click().change();
74        }
75    }
76
77    if(app.width() < 960){
78
79        $('.quick-links.nav-header_top_fast_link li.item-topmobile').insertAfter('.nav-main-wrapper .nav-main.list-inline .buzz-crew');
80        $('.quick-links li.item-outlet').insertAfter('.nav-main-wrapper .nav-main.list-inline .buzz-crew');
81        $('.autocomplete-button').insertBefore('.nav-main-useractions');
82
83        $('.threed-icon-wrapper').insertBefore('.product-detail-wrapper');
84        $('#modal360').insertBefore('.product-detail-wrapper');
85
86        $('.filters-close').insertAfter('.top-filter-custom-text');
87
88        if($('#typesearch').is(':checked')) {
89            $('.filter-group .items-wrapper > li .icheckbox_flat').on('click', function () {
90                $('.filters-close').click();
91            });
92            window.addEventListener('loadproductsevent', function (){
93
94                $('.filter-group .items-wrapper > li .icheckbox_flat').on('click', function() {
95                    $('.filters-close').click();
96                });
97
98            });
99        }
100
101
102
103        $('.handlines-sldier .item').each(function(){
104            var link = $(this).find('.text-wrapper a').attr('href');
105            if($(this).find('.btn-small').length != 0){
106                $(this).find('.content').wrap('<a href="'+link+'"></a>');
107                $(this).find('.btn-small').remove();
108            }
109        });
110
111    }
112
113    autoSearchForDesktop();
114
115    //$('.product-detail-rate').appendTo('.pan-description.comments-panel .panel-title>a');
116
117    if(app.width() > 769) {
118
119        var $sortToFiltersDropdown = $('.product-listing-intro .form-group.sort-product');
120        $sortToFiltersDropdown.appendTo('.filters-dropdown-menu');
121
122        $('.reset-wrapper').appendTo('.tags .items-wrapper');
123
124        window.addEventListener('loadproductsevent', function (){
125
126            $sortToFiltersDropdown.appendTo('.filters-dropdown-menu');
127            initOrderSelect();
128            $('.reset-wrapper').appendTo('.tags .items-wrapper');
129        });
130
131    }
132
133    if(app.width() < 767) {
134
135        $('.product-listing-intro .intro-filters').appendTo('.product-listing-headline-wrapper');
136
137        $('.product-listing-headline-wrapper').addClass('product-listing-intro');
138    }
139
140
141    $('.product-details .product-detail-wrapper .favorite').popover('disable');
142
143    $('.product-details-related .items > .item a').popover('disable');
144
145
146    $(".nav-main-wrapper .close-menu").tooltip("disable");
147
148    $(".product .item .caption-icons .favorite").tooltip("disable");
149
150    // $(".product-details-price .current-price").data('placement', 'right');
151    //
152    // $(".product-details-price .current-price").tooltip("destroy");
153
154    $(".product-details-price .current-price").tooltip('destroy');
155
156    app.handleTooltip($('.product-details-price .current-price').attr('data-placement','right'));
157
158
159    if(app.width() < 900) {
160        $('.remove-all-tags').appendTo('.selected-filters .items-wrapper');
161        window.addEventListener('loadproductsevent', function (){
162
163            $('.remove-all-tags').appendTo('.selected-filters .items-wrapper');
164
165        });
166    }
167
168    function formatSizeLabel(text, regex = /[:;,.\-–]$/) {
169        if (typeof text === 'string' && text.trim() !== '') {
170            if (regex instanceof RegExp) {
171                const trimmed = text.trim();
172                if (regex.test(trimmed)) {
173                    return trimmed.slice(0, -1);
174                }
175                return trimmed;
176            }
177            return ''; // regex nije RegExp
178        }
179        return ''; // naziv veličine nije string ili je prazan
180    }
181
182
183    $('.product-attributes-wrapper label').text(function (_,txt) {
184        // return txt.slice(0, -1); // uklonjeno zato što skraćuje poslednji karakter sa veličina gde ne treba
185        return formatSizeLabel(txt); // provera da li se trimovani string(veličina) završava specijalnim k
185arakterom, ako da, uklanja ga
186    });
187
188
189    // $('.nav > ul > li').on('click', function() {
190    //     $(this).toggleClass("active", 800, "easeOutQuint");
191    // });
192
193
194    flagCart = true;
195    window.addEventListener('initCartOnePage', function (e){
196        if(!flagCart){
197            nbshopJS.handleProductSizeSelector();
198        }
199        $('.product-slider.cart_products-slider .item .options-wrapper').removeClass('product-sizes-v2');
200        $('.product-slider.cart_products-slider .item .prices-wrapper').removeClass('prices-wrapper-v2');
201
202        $('.cart-products-slider-wrapper').css('opacity', '1');
203        flagCart = false;
204        nbshopJS.SizesTabsOnCart();
205    });
206    //reloadCartHtmlBlock
207
208
209    /** BASIC AND HELPER FUNCTIONS */
210    //init basic function
211    nbshopJS.init();
212
213    //init mobile break point
214    var mobileBreakpointRes = 800;
215    nbshopJS.mobileBreakpoint(mobileBreakpointRes);
216
217    //init
218    nbshopJS.handleBindedToTab('.binded-to-tab', 'html, body', 80, 800);
219
220    nbshopJS.handleBindedToTab('.binded-to-tab-v3', 'html, body', 80, 800);
221
222    nbshopJS.handleBindedToTab('.binded-to-tab-v2', 'html, body', 80, 800);
223
224    //init link scrol to poin
225    nbshopJS.handleAnchorLinks('.smooth-scroll', 'html,body', 80, 500);
226
227    $('.product-detail-rate').on('click', function(){
228        $('#tab_product_comments').toggleClass('active in');
229        $('#tab_product_comments').addClass('in');
230        $('#tab_product_comments').removeAttr( 'style' );
231        $('#tab_product_comments').attr("aria-expanded","true");
232    })
233
234    nbshopJS.clickOpenVerticalTabTab($('.rate-action'), 'html, body', 800)
235
236    /** INICIJALIZACIJA SLIDER-A */
237        //init homapage main slider
238    var mainSliderElementId = '.main-slider > .slider-init';
239    var mainSliderOptions   = {dots: true, arrows: false, speed: 300, autoplay: true, autoplaySpeed: 5000, slidesToShow: 1, slidesToScroll: 1, adaptiveHeight: true, pauseOnHover: false,
240        customPaging: function(slick,index) {
241            return '<button type="button" data-role="none">' + (index + 1) + '</button>';
242        }};
243    $(mainSliderElementId).each(function () {
244        nbshopJS.initSlider(this, mainSliderOptions);
245    });
246
247    $('.main-slider .slock-dots li').on('afterChange', function(event, slick, currentSlide){
248        setTimeout(function(){
249            $('.item').addClass('slick-active');
250        },1000);
251    });
252
253    //init product list in tabs items slider | Nespresso poreklo kafe
254/*    var itesmProductListTabs = function(){
255        var itemsTabListSliderElementId = '.product-list-tabs-items .product-slider > .slider-init';
256        var itemsTabListSliderOptions   = {slidesToShow: 9,
257            dots: false,
258            arrows: true,
259            swipeToSlide: false,
260            swipe: false,
261            infinite: false,
262            useTransform: true,
263            touchThreshold: 100,
264            responsive: [
265                {breakpoint: 1024, settings: { slidesToShow: 7}},
266                {breakpoint: 768,  settings: { slidesToShow: 3}},
267                {breakpoint: 480,  settings: { slidesToShow: 1, centerMode: true, variableWidth: true}}
268            ]};
269        $(itemsTabListSliderElementId).each(function () {
270            nbshopJS.initSlider(this, itemsTabListSliderOptions);
271        });
272
273            if($(window).width() > 767) {
274                $('.product-list-tabs-items .tab-pane.active .product-slider > .slider-init .item.slick-current').click();
275            }
276        };*/
277
278    /*itesmProductListTabs();*/
279
280    // $('.product-list-tabs-items ul.items-wrapper li.item a').click(function () {
281    //     setTimeout(function () {
282    //         $('.product-list-tabs-items .product-slider > .slider-init').each(function () {
283    //             $(this).slick('unslick');
284    //         });
285    //         itesmProductListTabs();
286    //     }, 0);
287    // });
288
289    $('.lists-tabs .tab-items').click(function(){
290
291        var lsit_tab = $(this);
292        var active_link='';
293
294        if(lsit_tab.hasClass('active')){
295            return false;
296        }
297
298        active_link = lsit_tab.find('a').attr('href');
299    });
300
301    var itemsTabListSliderElementId = '.detail-product-info-lists-tabs .items-wrapper';
302    var itemsTabListSliderOptions   = {slidesToShow: 3, variableWidth: true,
303        dots: false,
304        arrows: true,
305        swipeToSlide: false,
306        swipe: true,
307        infinite: false,
308        useTransform: true,
309        touchThreshold: 100,
310        responsive: [
311            {breakpoint: 1024, settings: { slidesToShow: 2}},
312            {breakpoint: 768,  settings: { slidesToShow: 2}},
313            {breakpoint: 480,  settings: { slidesToShow: 2}}
314        ]};
315
316    if(nb_type_page === 'product'){
317        let lists = $(itemsTabListSliderElementId).find('li');
318        let listsContent = $('.tab-content .tab-pane').removeClass('active in');
319        nbshopJS.initSlider(itemsTabListSliderElementId, itemsTabListSliderOptions);
320        $(itemsTabListSliderElementId).find('li').each(function (e){
321            lists.removeClass('active');
322            $(this).on('click',function (e){
323                e.preventDefault();
324                lists.removeClass('active');
325                listsContent.removeClass('active in');
326            })
327        });
328    }
329
330    //init landing text and image slider
331    var landingImgTextSliderElementId = '.landing-image-text-slider > .slider-init';
332    var landingImgTextSliderOptions   = {dots: true, speed: 300, slidesToShow: 1, slidesToScroll: 1};
333    $(landingImgTextSliderElementId).each(function () {
334        nbshopJS.initSlider(this, landingImgTextSliderOptions);
335    });
336
337    //init similar color list slider
338    var similarColorSliderSlider = function(){
339        var similarColorSliderSliderElementId = '.similar-products-by-color-slider > .items-wrapper';
340        var similarColorSliderSliderOptions   = {dots: false, speed: 300, slidesToShow: 3, slidesToScroll: 1, arrows: true, infinite: false};
341        $(similarColorSliderSliderElementId).each(function () {
342            nbshopJS.initSlider(this, similarColorSliderSliderOptions);
343        });
344    };
345
346    similarColorSliderSlider();
347
348    window.addEventListener('loadproductsevent', function (e){
349        similarColorSliderSlider();
350        initCategoriesSliderOnListing();
351    });
352
353    //init items Product with similar color grid12
354    var itemSimilarProductSliderElementId = '.product-with-similar-color-grid12 > .slider-init';
355    var itemSimilarProductSliderOptions   = {slidesToShow: 1, dots: true, arrows: fal
355se, fade: true, draggable: false, swipe: false, swipeToSlide: false, touchMove: false};
356    $(itemSimilarProductSliderElementId).each(function () {
357        nbshopJS.initSlider(this, itemSimilarProductSliderOptions);
358    });
359
360    //init slider with text in pagination
361    var customPaginationSliderElementId = '.custom-pagination-slider > .slider-init';
362    var customPaginationSliderOptions   = {
363        speed: 300,
364        slidesToShow: 1,
365        slidesToScroll: 1,
366        autoplay: false,
367        arrows: false,
368        dots: true,
369        customPaging : function(slider, i) {
370            var thumb = $(slider.$slides[i]).data('slide-name');
371            return '<span>'+thumb+'</span>';
372        }
373    };
374    $(customPaginationSliderElementId).each(function () {
375        nbshopJS.initSlider(this, customPaginationSliderOptions);
376    });
377
378    //init store gallery slider
379    var storeGallerzSliderElementId = '.store-gallery-slider > .slider-init';
380    var storeGallerzSliderOptions   = {dots: false, speed: 300, slidesToShow: 3, slidesToScroll: 1, adaptiveHeight: true};
381    $(storeGallerzSliderElementId).each(function () {
382        nbshopJS.initSlider(this, storeGallerzSliderOptions);
383    });
384
385    //init categopty gallery slider
386    var categoptyGallerySliderElementId = '.category-gallery-slider > .slider-init';
387    var categoptyGallerySliderOptions   = {dots: false, speed: 300, slidesToScroll: 1, centerMode: true, centerPadding: '50px', slidesToShow: 3, variableWidth: true};
388    $(categoptyGallerySliderElementId).each(function () {
389        nbshopJS.initSlider(this, categoptyGallerySliderOptions);
390    });
391
392    //init Double image grid slider
393    var doubleImgGgridSliderElementId = '.double-img-grid-slider > .slider-init';
394    var doubleImgGgridSliderOptions   = {slidesToShow: 4,
395        responsive: [
396            {breakpoint: 768,  settings: { slidesToShow: 2}},
397            {breakpoint: 480,  settings: { slidesToShow: 1}}
398        ]};
399    $(doubleImgGgridSliderElementId).each(function () {
400        nbshopJS.initSlider(this, doubleImgGgridSliderOptions);
401    });
402
403    //init grid gallery slider
404    var gridGallerySliderElementId = '.article-grid-gallery-slider > .slider-init';
405    var gridGallerySliderOptions   = {slidesToShow: 1, arrows: false, dots: true};
406    $(gridGallerySliderElementId).each(function () {
407        nbshopJS.initSlider(this, gridGallerySliderOptions);
408    });
409
410    //init Small simple slider
411    var smallSimpleSliderElementId = '.simple-small-slider > .slider-init';
412    var smallSimpleSliderOptions   = {slidesToShow: 1,
413        responsive: [
414            {breakpoint: 768,  settings: { slidesToShow: 2}},
415            {breakpoint: 480,  settings: { slidesToShow: 1}}
416        ]};
417    $(smallSimpleSliderElementId).each(function () {
418        nbshopJS.initSlider(this, smallSimpleSliderOptions);
419    });
420
421    //init instagram slider
422    var instagramSliderElementId = '.instagram-slider > .slider-init';
423    var instagramSliderOptions   = {
424        slidesToShow: 5 ,
425        arrows: true,
426        dots: false,
427        responsive: [
428            {breakpoint: 769,  settings: { slidesToShow: 3, centerMode: true, centerPadding: '60px'}},
429            {breakpoint: 480,  settings: { slidesToShow: 1, centerMode: true, centerPadding: '60px'}}
430        ]};
431    $(instagramSliderElementId).each(function () {
432        nbshopJS.initSlider(this, instagramSliderOptions);
433    });
434
435    //init Slider with background
436    var withBackgroundSliderElementId = '.slider-with-background > .slider-init';
437    var withBackgroundSliderOptions   = {slidesToShow: 1, dots:true,arrows: false,autoplay:true,
438        responsive: [
439            {breakpoint: 768,  settings: { slidesToShow: 1}},
440            {breakpoint: 480,  settings: { slidesToShow: 1}}
441        ]};
442    $(withBackgroundSliderElementId).each(function () {
443        nbshopJS.initSlider(this, withBackgroundSliderOptions);
444    });
445
446
447    //init item product slider
448    var itemProductSliderElementId = $('.product-slider.item-product-slider .slider-init');
449    var itemProductSliderOptions   = {slidesToShow: 6, swipeToSlide: false, swipe: false,  infinite: false, useTransform: true, touchThreshold: 100,
450        responsive: [
451            {breakpoint: 1024, settings: { slidesToShow: 4}},
452            {breakpoint: 768,  settings: { slidesToShow: 3.5}},
453            {breakpoint: 480,  settings: { slidesToShow: 2.5}}
454        ]};
455    $(itemProductSliderElementId).each(function () {
456        nbshopJS.initSlider(this, itemProductSliderOptions);
457    });
458
459    //init slider for servisices on product detail page
460    var servicesSliderElementId = '.service-products-slider > .slider-init';
461    var servicesSliderOptions   = {dots: true, speed: 300, slidesToShow: 4, slidesToScroll: 1, arrows: true, dots: false};
462    $(servicesSliderElementId).each(function () {
463        nbshopJS.initSlider(this, servicesSliderOptions);
464    });
465
466    //init slider for servisices on product detail page
467    var productsMapSliderElementId = '.products-map-item .product-slider > .slider-init';
468    var productsMapSliderOptions   = {dots: false, speed: 300, slidesToShow: 9, slidesToScroll: 1, arrows: true, draggable: false, swipeToSlide: false, swipe: false,  infinite: false, useTransform: true, touchThreshold: 100,
469        responsive: [
470            {breakpoint: 1024,  settings: { slidesToShow: 7}},
471            {breakpoint: 768,  settings: { slidesToShow: 5, centerMode: true}},
472            {breakpoint: 480,  settings: { slidesToShow: 3, centerMode: true}}
473        ]};
474    $(productsMapSliderElementId).each(function () {
475        nbshopJS.initSlider(this, productsMapSliderOptions);
476    });
477
478    //init item product slider
479    var itemProductSliderLandingElementId = $('.product-slider.product-slider-landing .slider-init');
480    var itemProductSliderLandingOptions   = {slidesToShow: 6, swipeToSlide: false, swipe: false,  infinite: false, useTransform: true, touchThreshold: 100,
481        responsive: [
482            {breakpoint: 1024, settings: { slidesToShow: 4}},
483            {breakpoint: 768,  settings: { slidesToShow: 3.5}},
484            {breakpoint: 480,  settings: { slidesToShow: 2.5}}
485        ]};
486    $(itemProductSliderLandingElementId).each(function () {
487        nbshopJS.initSlider(this, itemProductSliderLandingOptions);
488    });
489
490    //init actions main slider
491    var actionsMainSliderElementId = '.actions-main-slider > .slider-init';
492    var actionsMainSliderOptions   = {dots: true, slidesToShow: 1, slidesToScroll: 1, centerMode: true, variableWidth: true, infinite: true, centerPadding: '0px'};
493    $(actionsMainSliderElementId).each(function () {
494        nbshopJS.initSlider(this, actionsMainSliderOptions);
495    });
496
497    //init product slider in product list
498    var productLisrElementId = '.product-list > .slider-init';
499    var productLisrOptions   = {dots: true, slidesToShow: 4,
500        responsive: [
501            {breakpoint: 768,  settings: { slidesToShow: 3.5}},
502            {breakpoint: 480,  settings: { slidesToShow: 2.5}}
503        ]};
504    $(productLisrElementId).each(function () {
505        nbshopJS.initSlider(this, productLisrOptions);
506    });
507
508    //init product slider in sele product list
509    var productLisrSliderElementId = '.list_sale_product > .slider-init';
510    var productLisrSliderOptions   = {dots: true, slidesToShow: 4,
511        responsive: [
512            {breakpoint: 768,  settings: { slidesToShow: 3.5}},
513            {breakpoint: 480,  settings: { slidesToShow: 2.5}}
514        ]};
515    $(productLisrSliderElementId).each(function () {
516        nbshopJS.initSlider(this, productLisrSliderOptions);
517    });
518
519    //init action detail product slider
520    var actionDetailProductLisrElementId = '.actions-detail-product-slider > .slider-init';
521    var actionDetailProductLisrOptions   = {dots: false, slidesToShow: 4, swipeToSlide: false, swipe: false,  infinite: false, useTransform: true, touchThreshold: 100,
522        responsive: [
523            {breakpoint: 768,  settings: { slidesToShow: 3.5}},
524            {breakpoint: 480,  settings: { slidesToShow: 2.5}}
525        ]};
526    $(actionDetailProductLisrElementId).each(function () {
527        nbshopJS.initSlider(this, actionDetailProductLisrOptions);
528    });
529
530    window.addEventListener('initCartOnePage', function (e) {
531        //init product outfit slider
532        var cartOutfitElementId = '.cart-outfit-slider > .slider-init';
533        var cartOutfitOptions = {
534            dots: false, slidesToShow: 6,
535            responsive: [
536                {breakpoint: 1024, settings: {slidesToShow: 4, dots: false}},
537                {breakpoint: 768, settings: {slidesToShow: 3, dots: false}},
538                {breakpoint: 480, settings: {slidesToShow: 2, dots: false}}
539            ]
540        };
541        nbshopJS.initSlider(cartOutfitElementId, cartOutfitOptions);
542
543    });
544
545    //init product slider top-arrows
546    var topArrowsElementId = '.top-arrows > .slider-init';
547    var topArrowsOptions   = {
548        dots: false,
549        slidesToShow: 1,
550        arrows: true,
551        cssEase: 'linear',
552        swipeToSlide: false,
553        swipe: false,
554        infinite: false,
555        useTransform: true,
556        touchThreshold: 100,
557        responsive: [
558            {breakpoint: 1024, settings: { slidesToShow: 2, cssEase: 'linear', swipeToSlide: false}},
559            {breakpoint: 800,  settings: { slidesToShow: 1.5, arrows: fal
559se, cssEase: 'linear', swipeToSlide: false,touchMove: false, infinite: false}},
560            {breakpoint: 480,  settings: { slidesToShow: 2, cssEase: 'linear', swipeToSlide: false,touchMove: false, infinite: false}}
561        ]};
562    if(app.width() > 800){
563        var topArrowsOptions   = {dots: false, slidesToShow: 1, arrows:false,swipeToSlide:false,infinite: false,slidesToScroll:1,swipe:false,
564            rows: 2,
565            slidesPerRow: 2};
566    }
567    $(topArrowsElementId).each(function () {
568        nbshopJS.initSlider(this, topArrowsOptions);
569    });
570
571    //init product slider product-cart-confirm
572    var productCartConfirmElementId = '.product-cart-confirm > .slider-init';
573    var productCartConfirmOptions   = {dots: true, slidesToShow: 6,
574        responsive: [
575            {breakpoint: 1024, settings: { slidesToShow: 4}},
576            {breakpoint: 768,  settings: { slidesToShow: 3.5}},
577            {breakpoint: 480,  settings: { slidesToShow: 2.5}}
578        ]};
579    $(productCartConfirmElementId).each(function () {
580        nbshopJS.initSlider(this, productCartConfirmOptions);
581    });
582
583    //init product slider most-sale-product
584    var mostsaleElementId = '.most-sale-product > .slider-init';
585    var mostsaleOptions   = {
586        dots: false,
587        slidesToShow: 1,
588        swipeToSlide: false,
589        swipe: false,
590        infinite: false,
591        useTransform: true,
592        touchThreshold: 100,
593        responsive: [
594            {breakpoint: 1024, settings: { slidesToShow: 3}},
595            {breakpoint: 800,  settings: { slidesToShow: 1.5, cssEase: 'linear', swipeToSlide: false, touchMove: false, infinite: false}},
596            {breakpoint: 480,  settings: { slidesToShow: 2, cssEase: 'linear', swipeToSlide: false, touchMove: false, infinite: false,dots: false}}
597        ]};
598    if(app.width() > 800){
599        var mostsaleOptions   = {dots: false, slidesToShow: 1, arrows:false,swipeToSlide:false,infinite: false,slidesToScroll:1,swipe:false,
600            rows: 2,
601            slidesPerRow: 2};
602    }
603    $(mostsaleElementId).each(function () {
604        nbshopJS.initSlider(this, mostsaleOptions);
605    });
606
607    //init product slider for new-product
608    var newProductElementId = '.new-products > .slider-init';
609    var newProductOptions   = {
610        dots: true,
611        slidesToShow: 6,
612        swipeToSlide: false,
613        swipe: false,
614        infinite: false,
615        useTransform: true,
616        touchThreshold: 100,
617        responsive: [
618            {breakpoint: 1024, settings: { slidesToShow: 4, cssEase: 'linear', swipeToSlide: false, touchMove: false, infinite: false}},
619            {breakpoint: 768,  settings: { slidesToShow: 3.5, cssEase: 'linear', swipeToSlide: false, touchMove: false, infinite: false}},
620            {breakpoint: 480,  settings: { slidesToShow: 2.5, cssEase: 'linear', swipeToSlide: false, touchMove: false, infinite: false}}
621        ]};
622    $(newProductElementId).each(function () {
623        nbshopJS.initSlider(this, newProductOptions);
624    });
625
626    //init product slider for action-product
627    var actionProductElementId = '.product-action > .slider-init';
628    var actionProductOptions   = {
629        dots: true,
630        slidesToShow: 6,
631        swipeToSlide: false,
632        swipe: false,
633        infinite: false,
634        useTransform: true,
635        touchThreshold: 100,
636        responsive: [
637            {breakpoint: 1024, settings: { slidesToShow: 4}},
638            {breakpoint: 768,  settings: { slidesToShow: 3.5}},
639            {breakpoint: 480,  settings: { slidesToShow: 2.5}}
640        ]};
641    $(actionProductElementId).each(function () {
642        nbshopJS.initSlider(this, actionProductOptions);
643    });
644
645    //init product slider for breands slider
646    var brandsElementId = '.brands-slider > .slider-init';
647    var brandsOptions   = {dots: false, slidesToShow: 6, arrows: false, cssEase: 'linear', swipeToSlide: false, swipe: false,  infinite: false, useTransform: true, touchThreshold: 100,
648        responsive: [
649            {breakpoint: 1024, settings: { slidesToShow: 4, cssEase: 'linear', swipeToSlide: true}},
650            {breakpoint: 768,  settings: { slidesToShow: 3, cssEase: 'linear', swipeToSlide: true, touchMove: true, infinite: false}},
651            {breakpoint: 480,  settings: { slidesToShow: 3, cssEase: 'linear', swipeToSlide: true, touchMove: true, infinite: false}}
652        ]};
653    $(brandsElementId).each(function () {
654        nbshopJS.initSlider(this, brandsOptions);
655    });
656
657    //init product outfit slider
658    var outfitElementId = '.outfit-slider > .slider-init';
659    var outfitOptions   = {dots: false, slidesToShow: 6, cssEase: 'linear', swipeToSlide: false, swipe: false,  infinite: false, useTransform: true, touchThreshold: 100,
660        responsive: [
661            {breakpoint: 1024, settings: { slidesToShow: 4, cssEase: 'linear', swipeToSlide: true}},
662            {breakpoint: 768,  settings: { slidesToShow: 3 ,cssEase: 'linear', swipeToSlide: true, touchMove: true, infinite: false}},
663            {breakpoint: 480,  settings: { slidesToShow: 2, cssEase: 'linear', swipeToSlide: true, touchMove: true, infinite: false}}
664        ]};
665    $(outfitElementId).each(function () {
666        nbshopJS.initSlider(this, outfitOptions);
667    });
668
669    //init product last viewed slider
670
671    /*AJAX ovde*/
672    //lastviewedproducts_load
673    var lastViewedProductsSliderElementId = '.last-viewed-slider .slider-init';
674    var lastViewedProductsSliderOptions   = {dots: false, slidesToShow: 6, cssEase: 'linear', swipeToSlide: true, swipe: false,  infinite: false, useTransform: true, touchThreshold:100,
675        responsive: [
676            {breakpoint: 1024, settings: { slidesToShow: 4, cssEase: 'linear', swipeToSlide: true}},
677            {breakpoint: 768,  settings: { slidesToShow: 3, cssEase: 'linear', swipeToSlide: true, touchMove: true, infinite: false}},
678            {breakpoint: 480,  settings: { slidesToShow: 2, cssEase: 'linear', swipeToSlide: true, touchMove: true, infinite: false}}
679        ]};
680    window.addEventListener('lastviewedproducts_load', function (e){
681        //init last viewed products slider
682        nbshopJS.initSlider(lastViewedProductsSliderElementId, lastViewedProductsSliderOptions);
683    });
684
685    //init similar products slider
686    var similarproductsSliderElementId = '.similar-products-slider > .slider-init';
687    var similarproductsSliderOptions   = {dots: false, slidesToShow: 6, cssEase: 'linear', swipeToSlide: true, swipe: false,  infinite: false, useTransform: true, touchThreshold:100,
688        responsive: [
689            {breakpoint: 1024, settings: { slidesToShow: 4, cssEase: 'linear', swipeToSlide: true}},
690            {breakpoint: 768,  settings: { slidesToShow: 3, cssEase: 'linear', swipeToSlide: true}},
691            {breakpoint: 480,  settings: { slidesToShow: 2, cssEase: 'linear', swipeToSlide: true, touchMove: true, infinite: false}}
692        ]};
693    $(similarproductsSliderElementId).each(function () {
694        nbshopJS.initSlider(this, similarproductsSliderOptions);
695    });
696
697    //init vertical scroll slider
698    var verticalScrollSliderElementId = '.vertical-scroll-slider > .slider-init';
699    var verticalScrollSliderOptions   = {autoplay: true, arrows: fal
699se, dots: false, rows: 1,slidesToShow: 1, slidesToScroll: 1, draggable: true, infinite: true, pauseOnHover: false, swipe: true, touchMove: true, vertical: true, speed: 5000, autoplaySpeed: 1, adaptiveHeight: false, useTransform: false,
700    };
701    $(verticalScrollSliderElementId).each(function () {
702        nbshopJS.initSlider(this, verticalScrollSliderOptions);
703    });
704
705    //init landing product slider
706    var landingProductSliderElementId = '.landing-product > .slider-init';
707    var landingProductSliderOptions   = {slidesToShow: 6,
708        responsive: [
709            {breakpoint: 1024, settings: { slidesToShow: 4}},
710            {breakpoint: 768,  settings: { slidesToShow: 3.5}},
711            {breakpoint: 480,  settings: { slidesToShow: 2.5}}
712        ]};
713    $(landingProductSliderElementId).each(function () {
714        nbshopJS.initSlider(this, landingProductSliderOptions);
715    });
716
717    /** INICIJALIZACIJA ARTICLE I CATEGORY SLIDER-A*/
718
719        //init article derail products slider
720    var articleProductsSliderElementId = '.article-detail-slider > .slider-init';
721    var articleProductsSliderOptions   = {dots: false, slidesToShow: 6,
722        responsive: [
723            {breakpoint: 1024, settings: { slidesToShow: 4, arrows: false}},
724            {breakpoint: 768,  settings: { slidesToShow: 3, arrows: false}},
725            {breakpoint: 480,  settings: { slidesToShow: 2, arrows: false}}
726        ]};
727    $(articleProductsSliderElementId).each(function () {
728        nbshopJS.initSlider(this, articleProductsSliderOptions);
729    });
730
731    //init category slider
732    var categorySliderElementId = '.category-slider > .slider-init';
733    var categorySliderOptions   = {slidesToShow: 4,
734        responsive: [
735            {breakpoint: 1024, settings: { slidesToShow: 4}},
736            {breakpoint: 768,  settings: { slidesToShow: 2}},
737            {breakpoint: 480,  settings: { slidesToShow: 1.1}}
738        ]};
739    $(categorySliderElementId).each(function () {
740        nbshopJS.initSlider(this, categorySliderOptions);
741    });
742
743    //init article slider
744    var articleSliderElementId = '.article-slider > .slider-init';
745    var articleSliderOptions   = {slidesToShow: 3, centerMode: true, centerPadding: '130px',
746        responsive: [
747            {breakpoint: 1024, settings: { slidesToShow: 1, centerMode: true, centerPadding: '90px'}},
748            {breakpoint: 769,  settings: { slidesToShow: 1, centerMode: true, centerPadding: '50px'}},
749            {breakpoint: 480,  settings: { slidesToShow: 1, centerMode: true, centerPadding: '30px'}}
750        ]};
751    $(articleSliderElementId).each(function () {
752        nbshopJS.initSlider(this, articleSliderOptions);
753    });
754
755    //init article slider witouth links
756    var articleSliderWLElementId = '.article-slider-witouth-links > .slider-init';
757    var articleSliderWLOptions   = {slidesToShow: 4,
758        responsive: [
759            {breakpoint: 1024, settings: { slidesToShow: 4}},
760            {breakpoint: 768,  settings: { slidesToShow: 2}},
761            {breakpoint: 480,  settings: { slidesToShow: 2}}
762        ]};
763    $(articleSliderWLElementId).each(function () {
764        nbshopJS.initSlider(this, articleSliderWLOptions);
765    });
766
767    //init article event slider witouth image
768    var articleEventSliderElementId = '.article-event-home-slider > .slider-init';
769    var articleEventSliderOptions   = {slidesToShow: 4,
770        responsive: [
771            {breakpoint: 1024, settings: { slidesToShow: 4}},
772            {breakpoint: 768,  settings: { slidesToShow: 2}},
773            {breakpoint: 480,  settings: { slidesToShow: 1.1}}
774        ]};
775    $(articleEventSliderElementId).each(function () {
776        nbshopJS.initSlider(this, articleEventSliderOptions);
777    });
778
779    var SimilarArticleSliderElementId = '.similar-article-slider > .slider-init';
780    var SimilarArticleSliderOptions   = {slidesToShow: 3, centerMode: true, centerPadding: '130px',
781        responsive: [
782            {breakpoint: 1024, settings: { slidesToShow: 4, centerMode: true, centerPadding: '90px'}},
783            {breakpoint: 769,  settings: { slidesToShow: 3, centerMode: true, centerPadding: '30px', arrows: fal
783se}},
784            {breakpoint: 480,  settings: { slidesToShow: 1, centerMode: true, centerPadding: '30px', arrows: false}}
785        ]};
786    $(SimilarArticleSliderElementId).each(function () {
787        nbshopJS.initSlider(this, SimilarArticleSliderOptions);
788    });
789
790    //init Similar category slider
791    var similarCategorySliderElementId = '.similar-category-slider > .slider-init';
792    var similarCategorySliderOptions   = {slidesToShow: 3,
793        dots: false,
794        arrows: true,
795        responsive: [
796            {breakpoint: 768,  settings: { slidesToShow: 2}},
797            {breakpoint: 480,  settings: { slidesToShow: 1}}
798        ]};
799    $(similarCategorySliderElementId).each(function () {
800        nbshopJS.initSlider(this, similarCategorySliderOptions);
801    });
802
803    if(screen.width < 900) {
804        appendLangSliderToMobileMenu();
805    }
806
807
808    /** INICIJALIZACIJA SLIDERA NA MOBILNIM TELEFONIMA | UGLANOM TABOVA */
809    if(screen.width < 768) {
810
811        var listsTabsSliderElementId = '.lists-tabs > .slider-init';
812        var listsTabsSliderOptions = {dots: false, arrows: false, infinite: true, variableWidth: true, speed: 300, slidesToShow: 2, centerPadding: '0', centerMode: false, focusOnSelect: true};
813        $(listsTabsSliderElementId).each(function () {
814            nbshopJS.initSlider(this, listsTabsSliderOptions);
815        });
816
817
818    }
819
820    function initCategoriesSliderOnListing() {
821
822        if($('.categories-slider-listing > .slider-init').length === 0) {
823            return false;
824        }
825
826        var categoriesSliderElementId = '.categories-slider-listing > .slider-init';
827        var categoriesSliderOptions   = {
828            dots: false,
829            arrows: true,
830            slidesToShow: 4,
831            slidesToScroll: 1,
832            swipeToSlide: true,
833            infinite: false,
834            responsive: [
835                { breakpoint: 1200,  settings: { slidesToShow: 2.3, dots: false, arrows: false, swipeToSlide: true }},
836                { breakpoint: 768,  settings: { slidesToShow: 2.3, dots: true, arrows: false, swipeToSlide: true }},
837            ],
838        };
839
840        $(categoriesSliderElementId).slick('unslick');
841        $(categoriesSliderElementId).each(function () {
842            nbshopJS.initSlider(this, categoriesSliderOptions);
843        });
844    }
845
846    initCategoriesSliderOnListing();
847
848
849    /* funkcija za inicijalizaciju Full Screen prikaza glavne slike proizvoda na klik*/
850    nbshopJS.handleFullscreenMouseoverZoom($(".fullscreen-product-slider .slider-init.fscrren img"));
851
852    /* Da se disable klik glavne slike proizvoda na mobilnim uredjajima*/
853    if(nbshopJS.width() < 769){
854        $('.product-images-zoom-open, .slider.product-main .item').off('click');
855    }
856
857    /* Da se ispiše tekst pored kursora miša koji je u ID-u "mousetext" */
858    nbshopJS.handleMouseText($('.slider.product-main img'), $('#mousetext'));
859
860
861    nbshopJS.initDatepicker('.date',{
862        autoclose: true,
863        format:'dd.mm.yyyy'
864    });
865
866    /** MAPA */
867        //init Map style
868    var style =[];
869    if(nb_type_page ==='store_details') {
870        nbshopJS.handleMap($('.map'));
871    }
872    if(!nb_enableCzMap){
873        nbshopJS.handleMap($('.map'),style);
874        nbshopJS.handleNearestStoresMap(style);
875    }
876
877    // dodati custom scroll bar na listu proizvoda i brendove
878
879    $('.brands-slider > .slider-init, .product-slider:not(.after-add-to-cart) .slider-init').each(function () {
880
881        if ($(this).slick('slickGetOption', 'slidesToShow') >= $(this).find('> .slick-list > .slick-track > .slick-slide').length) return;
882
883        $(this).find('.slick-list').niceScroll($(this).find('.slick-track'), {
884            background: '#f5f5f5',
885            cursorcolor: "#757575",
886            touchbehavior: true,
887            // preservenativescrolling: false,
888            scrollspeed: 80,
889            // smoothscroll: false,
890            autohidemode: false
891        });
892    });
893
894    var filtersFixed = function(){
895        var introFilters = $('.intro-filters');
896
897        if (!introFilters.length) return false;
898
899        var fixmeTop = introFilters.offset().top;
900        $(window).scroll(function() {
901            var currentScroll = $(window).scrollTop();
902            if (currentScroll >= fixmeTop) {
903                $('.intro-filters').addClass('fixed-filters-bar');
904                $('.intro-filters').css({
905                    position: 'fixed',
906                    top: '110px',
907                    left: '0',
908                    margin: '0',
909                    padding: '10px',
910                    height: '50px'
911                });
912            } else {
913                $('.intro-filters').removeClass('fixed-filters-bar');
914                $('.intro-filters').css({
915                    position: 'relative',
916                    top: '0',
917                    left: '0',
918                    margin: '15px 0 0',
919                    padding: '0',
920                    height: '30px'
921                });
922            }
923        });
924    };
925    filtersFixed();
926
927    var filtersFixedDesktop = function(){
928        var introFiltersDesk = $('.product-listing-filters');
929        if (!introFiltersDesk.length) return false;
930        var fixmeTop = introFiltersDesk.offset().top;
931        $(window).scroll(function() {
932            var currentScroll = $(window).scrollTop();
933            if (currentScroll >= fixmeTop) {
934                $('.product-listing-filters').addClass('fixed-filters-bar-desk');
935            }else{
936                $('.product-listing-filters').removeClass('fixed-filters-bar-desk');
937            }
938        });
939    };
940
941    filtersFixedDesktop();
942
943    if($('.landing-subscribe-black').length > 0){
944        $('body').addClass('landing-subscribe-black-bg');
945    }
946    if($('.uc-landing-subscription').length > 0){
947        $('#onload_modal').remove();
948    }
949
950    nbshopJS.handleWarningCart($('.menu-lang-wrapper-v2'),$('.menu-lang-wrapper-v2 .item'),true);
951
952    window.addEventListener('initCartOnePage', function (e) {
953        if ($('.cascade-cart').length === 0) {
954            return false;
955        } else {
956
957            var giftCardOptions = {dots: true, slidesToShow: 3, variableWidth: true};
958
959            if (!$('#gift_cards_content').hasClass('slick-initialized')) {
960                nbshopJS.initSlider('#gift_cards_content', giftCardOptions);
961            }
962
963
964        }
965    });
966    if($('.lc-sr,.lc-ro').length > 0){
967        nbshopJS.addRequiredFieldsApostrophe();
968    }
969
970    if(typeof nbshopJS.RateCommentsShow == 'function' && nb_type_page === 'product'){
971        nbshopJS.RateCommentsShow();
972    }
973    init_ratingStars(true);
974
975    $(window).on("profileReviewsModalShown", function () {
976        init_ratingStars('halfstar');
977    })
978
979    function addTableToSpecTable(){
980        let productSpecTable =  $('table.product-attrbite-table tbody');
981        let productSpecTableBrand =  $('.declaration-wrapper table');
982        if(productSpecTableBrand.length){
983            productSpecTableBrand.find('tr').appendTo(productSpecTable);
984            productSpecTableBrand.remove();
985        }
986
987    }
988
989    addTableToSpecTable();
990
991    if($('.lc-ro').length > 0){
992
993        $('#registration_modal .user-identification-input-wrapper').insertAfter('#registration_modal .company-name-input-wrapper');
994
995        $('#registration_page .user-identification-input-wrapper').insertAfter('#registration_page .company-name-input-wrapper');
996
997        $('.modal .company-pib-input-wrapper').insertAfter('.modal .user-identification-type-input-wrapper');
998
999        $('.registration-page-form-inputs .pib-input-wrapper').insertAfter('.registration-page .user-identification-type-input-wrapper');
1000
1001        // Uppercase field
1002        $('#reg_bank_number, #reg_page_bank_number').on('input', function(){
1003            $(this).val($(this).val().toUpperCase());
1004        })
1005    }
1006
1007    if($('.lc-bg').length > 0){
1008        // Uppercase field
1009        $('#reg_bank_number, #reg_page_bank_number').on('input', function(){
1010            $(this).val($(this).val().toUpperCase());
1011        })
1012    }
1013
1014    handleProductStateSizeMessage();
1015/*
1016    setTimeout(function(){
1017        $('.lc-gr .current-price').tooltip('dispose');
1018    },1000)*/
1019
1020    if($(window).width() < 768) {
1021        $(".nav-main-wrapper .close-menu").click(function (e) {
1022            let navElement = $(".nav > ul > li.active > a i.visible-xs");
1023            let navLink = $(".nav > ul > li.active");
1024
1025            if(typeof navElement !== "undefined" && navElement.length > 0) {
1026                $(navElement).trigger("click");
1027                $(navLink).find(".nav-main-dropdown-wrapper").addClass('hidden');
1028                $(navElement).parents('.nav-main-submenu').removeClass('active');
1029                $(navElement).parent().parent('li').removeClass('active');
1030                $(navElement).addClass("fa-angle-right");
1031            }
1032        })
1033    }
1034
1035    function  initProductAfterAddToCartSlider() {
1036        var afterAddToCartproductsSliderElementId = '.after-add-to-cart > .slider-init';
1037        var afterAddToCartrproductsSliderOptions   = {dots: true, arrows: true,  slidesToShow: 3,
1038            responsive: [
1039                {breakpoint: 1400, settings: { slidesToShow: 3}},
1040                {breakpoint: 1025, settings: { slidesToShow: 3}},
1041                {breakpoint: 768,  settings: { slidesToShow: 3}},
1042                {breakpoint: 480,  settings: { slidesToShow: 2, arrows: fal
1042se}}
1043            ]};
1044
1045        window.addEventListener('products_after_add_to_cart', function (e){
1046            nbshopJS.initSlider(afterAddToCartproductsSliderElementId, afterAddToCartrproductsSliderOptions);
1047        });
1048    }
1049
1050    initProductAfterAddToCartSlider();
1051
1052    // Kada se klikne na zvezdice na detalju proizvoda, automatski se skroluje do bloka gde su prikazani komentari
1053    function rateBlock(){
1054        const rateInfo = document.querySelector(".product-detail-rate");
1055        const commentsList = document.getElementById("comments-list-content");
1056        const header = document.querySelector(".header-wrapper");
1057
1058        if (rateInfo && commentsList) {
1059            rateInfo.addEventListener("click", function () {
1060                const headerHeight = header ? header.offsetHeight : 0;
1061                const targetPosition = commentsList.getBoundingClientRect().top + window.scrollY - headerHeight;
1062
1063                window.scrollTo({
1064                    top: targetPosition,
1065                    behavior: "smooth"
1066                });
1067            });
1068        }
1069    }
1070    if(nb_type_page === "product"){
1071        rateBlock();
1072    }
1073
1074
1075    function suggestedPriceMove(){
1076        let price = $('.product-prev-price.product-infooldprice');
1077        if(price.length){
1078            price.appendTo('.gr-sugest-price')
1079        }
1080    }
1081
1082    function hidePopoverOnStickerOnBodyScroll() {
1083        const popoverTrigger = $('[rel="popover"]');
1084
1085        window.addEventListener('scroll', () => {
1086            if(popoverTrigger) {
1087                popoverTrigger.popover('hide');
1088            }
1089        })
1090    }
1091    if($('.tp-product').length > 0) {
1092        hidePopoverOnStickerOnBodyScroll();
1093    }
1094
1095    
1096    if(nb_lang === 'gr'){
1097        suggestedPriceMove();
1098    }
1099
1100});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.