PageSourceSearch

https://offerilla.com/wp-content/plugins/azexo_vc_elements/js/azexo_vc.js

js offerilla.com collected 2026-09-26 15:23:34 UTC 7,312 bytes, 162 lines download raw bytes

1(function($) {
2    "use strict";
3
4    function initAzexoCarousel() {
5        if ('owlCarousel' in $.fn) {
6            $('.carousel-wrapper .carousel').each(function() {
7                var carousel = this;
8                if ($(carousel).data('owlCarousel') == undefined) {
9
10                    while ($(carousel).find('> div:not(.item)').length) {
11                        $(carousel).find('> div:not(.item)').slice(0, $(carousel).data('contents-per-item')).wrapAll('<div class="item" />');
12                    }
13
14                    var r = $(carousel).data('responsive');
15                    if (typeof r !== 'object') {
16                        r = window[r];
17                    }
18                    $(carousel).show();
19                    var hold = false;
20                    $(carousel).owlCarousel({
21                        responsive: r,
22                        center: ($(carousel).data('center') == 'yes'),
23                        margin: $(carousel).data('margin'),
24                        loop: ($(carousel).data('loop') == 'yes') && ($(carousel).find('.item').length > 1),
25                        autoplay: ($(carousel).data('autoplay') == 'yes'),
26                        autoplayHoverPause: true,
27                        nav: true,
28                        navText: ['', '']
29                    }).on('translate.owl.carousel', function(event) {
30                        if (!hold) {
31                            var item = $(carousel).data('owlCarousel')._items[event.item.index];
32                            $(item).find('.triggerable.active').click();
33                        }
34                    }).on('translated.owl.carousel', function(event) {
35                        if (!hold) {
36                            var item = $(carousel).data('owlCarousel')._items[event.item.index];
37                            $(item).find('.triggerable:not(.active)').click();
38                        }
39                        try {
40                            BackgroundCheck.refresh($(carousel).find('.owl-controls .owl-prev, .owl-controls .owl-next'));
41                        } catch (e) {
42                        }
43                    });
44                    setTimeout(function() {
45                        var item = $(carousel).data('owlCarousel')._items[$(carousel).data('owlCarousel')._current];
46                        $(item).find('.triggerable').click();
47
48                        $(carousel).find('.triggerable').on('click', function() {
49                            hold = true;
50                            var item = $(this).closest('.owl-item');
51                            var index = $(carousel).find('.owl-item').index(item);
52                            $(carousel).data('owlCarousel').to($(carousel).data('owlCarousel').relative(index));
53                            hold = false;
54                        });
55                    }, 0);
56                    try {
57                        BackgroundCheck.init({
58                            targets: $(carousel).find('.owl-controls .owl-prev, .owl-controls .owl-next'),
59                            images: $(carousel).find('.item .image')
60                        });
61                    } catch (e) {
62                    }
63                }
64            });
65        }
66    }
67    function initAzexoFilters() {
68        $('.filters-wrapper > .filters-header > .filters > .filter').on('click', function() {
69            $(this).closest('.filters').find('.filter').removeClass('active');
70            $(this).closest('.filters').find('.filter').each(function() {
71                if ($(this).data('selector')) {
72                    $(this).closest('.filters-wrapper').find('> .filterable ' + $(this).data('selector')).removeClass('showed');
73                }
74            });
75            $(this).addClass('active');
76            if ($(this).data('selector')) {
77                $(this).closest('.filters-wrapper').find('> .filterable ' + $(this).data('selector')).addClass('showed');
78            }
79            if ('masonry' in $.fn) {
80                var container = $(this).closest('.filters-wrapper').find('> .filterable');
81                if ($(container).is('.masonry')) {
82                    //$(container).masonry('layout');
83                    $(container).data('masonry')._resetLayout();
84                    var items = $(container).data('masonry')._itemize($(container).find('> .showed'));
85                    $(container).masonry('layoutItems', items, false);
86                    $(container).masonry('once', 'layoutComplete', function(event) {
87                        console.log(event);
88                    });
89                }
90            }
91        });
92        $('.filters-wrapper > .filters-header > .filters > .filter').each(function() {
93            if ($(this).data('selector')) {
94                $(this).closest('.filters-wrapper').find('> .filterable ' + $(this).data('selector')).addClass('showed');
95            }
96        });
97    }
98    function initMasonry() {
99        if ('masonry' in $.fn) {
100            $('.masonry').each(function() {
101                var container = this;
102                var containerWidth = $(container).width();
103
104                var r = $(container).data('responsive');
105                if (typeof r !== 'object') {
106                    r = window[r];
107                }
108                var items = 0;
109                for (var width in r) {
110                    if (containerWidth > width) {
111                        items = r[width].items;
112                    }
113                }
114                var columnWidth = containerWidth / parseInt(items, 10);
115                $(container).find($(container).data('selector')).addClass('showed');
116                $(container).closest('.filters-wrapper').find('.filters .filter[data-selector="> *"]').addClass('active');
117                setTimeout(function() {
118                    $(container).masonry({
119                        itemSelector: $(container).data('selector'),
120                        gutter: parseInt($(container).data('gutter'), 10),
121                        columnWidth: columnWidth
122                    });
123                }, 0);
124            });
125        }
126    }
127    $(function() {
128        initAzexoCarousel();
129        initAzexoFilters();
130        initMasonry();
131        if (document.documentElement.clientWidth > 768) {
132            if (typeof scrollReveal === 'function') {
133                window.scrollReveal = new scrollReveal();
134            }
135        }
136        $(window).on('resize', function() {
137            initMasonry();
138        });
139        if ('tabs' in $.fn) {
140            $('.azexo-tabs').each(function() {
141                if (!$(this).tabs('instance')) {
142                    $(this).tabs();
143                }
144            });
145        }
146        if ('accordion' in $.fn) {
147            $('.azexo-accordion').each(function() {
148                if (!$(this).accordion('instance')) {
149                    $(this).accordion({
150                        header: ".accordion-section > h3",
151                        autoHeight: false,
152                        heightStyle: "content",
153                        active: $(this).data('active-section'),
154                        collapsible: $(this).data('collapsible'),
155                        navigation: true,
156                        animate: 200
157                    });
158                }
159            });
160        }
161    });
162})(jQuery);

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.