PageSourceSearch

https://advokatvspb.ru/wp-content/themes/lawyer-zone/assets/js/lawyer-zone-custom.js?ver=1.0.5

js advokatvspb.ru collected 2026-10-04 20:24:17 UTC 8,308 bytes, 236 lines download raw bytes

1jQuery(document).ready(function($){
2    var at_window = $(window);
3    var at_body = $('body');
4    function at_ticker() {
5        var ticker = $('.news-notice-content'),
6            ticker_first = ticker.children(':first');
7
8        if( ticker_first.length ){
9            setInterval(function() {
10                if ( !ticker_first.is(":hover") ){
11                    ticker_first.fadeOut(function() {
12                        ticker_first.appendTo(ticker);
13                        ticker_first = ticker.children(':first');
14                        ticker_first.fadeIn();
15                    });
16                }
17            },3000);
18        }
19    }
20
21    at_ticker();
22    
23    function homeFullScreen() {
24
25        var homeSection = $('#at-banner-slider');
26        var windowHeight = at_window.outerHeight();
27
28        if (homeSection.hasClass('home-fullscreen')) {
29
30            $('.home-fullscreen').css('height', windowHeight);
31        }
32    }
33    //make slider full width
34    homeFullScreen();
35
36    //window resize
37    at_window.resize(function () {
38        homeFullScreen();
39    });
40
41    at_window.on("load", function() {
42        /*loading*/
43        $('#wrapper').removeClass('loading');
44        var $bubblingG_loader = $('.bubblingG-loader');
45        $bubblingG_loader.addClass('removing');
46        $bubblingG_loader.remove();
47
48        /*slick*/
49        $('.acme-slick-carausel').each(function() {
50            var at_featured_img_slider = $(this);
51
52            var slidesToShow = parseInt(at_featured_img_slider.data('column'));
53            var slidesToScroll = parseInt(at_featured_img_slider.data('column'));
54            var prevArrow =at_featured_img_slider.closest('.widget').find('.at-action-wrapper > .prev');
55            var nextArrow =at_featured_img_slider.closest('.widget').find('.at-action-wrapper > .next');
56            at_featured_img_slider.css('visibility', 'visible').slick({
57                slidesToShow: slidesToShow,
58                slidesToScroll: slidesToScroll,
59                autoplay: true,
60                adaptiveHeight: true,
61                cssEase: 'linear',
62                arrows: true,
63                prevArrow: prevArrow,
64                nextArrow: nextArrow,
65                responsive: [
66                    {
67                        breakpoint: 768,
68                        settings: {
69                            slidesToShow: ( slidesToShow > 1 ? slidesToShow - 1 : slidesToShow ),
70                            slidesToScroll: ( slidesToScroll > 1 ? slidesToScroll - 1 : slidesToScroll )
71                        }
72                    },
73                    {
74                        breakpoint: 480,
75                        settings: {
76                            slidesToShow: ( slidesToShow > 2 ? slidesToShow - 2 : slidesToShow ),
77                            slidesToScroll: ( slidesToScroll > 2 ? slidesToScroll - 2 : slidesToScroll )
78                        }
79                    }
80                ]
81            });
82        });
83
84        $('.featured-slider').show().slick({
85            autoplay: true,
86            adaptiveHeight: true,
87            autoplaySpeed: 3000,
88            speed: 700,
89            cssEase: 'linear',
90            fade: true,
91            prevArrow: '<i class="prev fa fa-angle-left"></i>',
92            nextArrow: '<i class="next fa fa-angle-right"></i>'
93        });
94        /*parallax scolling*/
95        $('a[href*="\\#"]').click(function(event){
96            var at_offset= $.attr(this, 'href');
97            var id = at_offset.substring(1, at_offset.length);
98            if ( ! document.getElementById( id ) ) {
99                return;
100            }
101            if( $( at_offset ).offset() ){
102                $('html, body').animate({
103                    scrollTop: $( at_offset ).offset().top-$('.at-navbar').height()
104                }, 1000);
105                event.preventDefault();
106            }
107
108        });
109        /*bootstrap sroolpy*/
110        $("body").scrollspy({target: ".at-sticky", offset: $('.at-navbar').height()+50 } );
111
112        /*featured slider*/
113        $('.acme-gallery').each(function(){
114            var $masonry_boxes = $(this);
115            var $container = $masonry_boxes.find('.fullwidth-row');
116            $container.imagesLoaded( function(){
117                $masonry_boxes.fadeIn( 'slow' );
118                $container.masonry({
119                    itemSelector : '.at-gallery-item'
120                });
121            });
122            /*widget*/
123            $masonry_boxes.find('.image-gallery-widget').magnificPopup({
124                type: 'image',
125                closeBtnInside: false,
126                gallery: {
127                    enabled: true
128                },
129                fixedContentPos: false
130
131            });
132            $masonry_boxes.find('.single-image-widget').magnificPopup({
133                type: 'image',
134                closeBtnInside: false,
135                fixedContentPos: false
136            });
137        });
138
139        /*widget slider*/
140        $('.acme-widget-carausel').show().slick({
141            autoplay: true,
142            autoplaySpeed: 3000,
143            speed: 700,
144            cssEase: 'linear',
145            fade: true,
146            prevArrow: '<i class="prev fa fa-angle-left"></i>',
147            nextArrow: '<i class="next fa fa-angle-right"></i>'
148        });
149
150        //Select 2 js init
151        if (typeof select2 !== 'undefined' && $.isFunction(select2)){
152           $('.woocommerce-ordering .orderby').select2({
153                minimumResultsForSearch: -1
154            }); 
155        }
156        
157
158    });
159
160    function stickyMenu() {
161
162        var scrollTop = at_window.scrollTop();
163        if ( scrollTop > 250 ) {
164            $('.lawyer-zone-sticky').addClass('at-sticky');
165            $('.sm-up-container').show();
166        }
167        else {
168            $('.lawyer-zone-sticky').removeClass('at-sticky');
169            $('.sm-up-container').hide();
170        }
171    }
172    //What happen on window scroll
173    stickyMenu();
174    at_window.on("scroll", function (e) {
175        setTimeout(function () {
176            stickyMenu();
177        }, 300)
178    });
179    
180    
181    function accordion() {
182        // Runs when the image button is clicked.
183        jQuery('body').on('click','.accordion-title', function(e){
184            var $this = $(this),
185                accordion_content  = $this.closest('.accordion-content'),
186                accordion_item  = $this.closest('.accordion-item'),
187                accordion_details  = accordion_item.find('.accordion-details'),
188                accordion_all_items  = accordion_content.find('.accordion-item'),
189                accordion_icon  = accordion_content.find('.accordion-icon');
190
191            accordion_icon.each(function () {
192                $(this).addClass('fa-plus');
193                $(this).removeClass('fa-minus');
194            });
195            accordion_all_items.each(function () {
196                $(this).find('.accordion-details').slideUp();
197            });
198
199            if( accordion_details.is(":visible")){
200                accordion_details.slideUp();
201                $this.find('.accordion-icon').addClass('fa-plus');
202                $this.find('.accordion-icon').removeClass('fa-minus');
203            }
204            else{
205                accordion_details.slideDown();
206                $this.find('.accordion-icon').addClass('fa-minus');
207                $this.find('.accordion-icon').removeClass('fa-plus');
208            }
209            e.preventDefault();
210        });
211    }
212    function at_site_origin_grid() {
213        $('.panel-grid').each(function(){
214            var count = $(this).children('.panel-grid-cell').length;
215            if( count < 1 ){
216                count = $(this).children('.panel-grid').length;
217            }
218            if( count > 1 ){
219                $(this).addClass('at-grid-full-width');
220            }
221        });
222    }
223    accordion();
224    at_site_origin_grid();
225
226
227    /*animation with wow*/
228    if(typeof WOW !== 'undefined' && at_body.hasClass('acme-animate')){
229        eb_wow = new WOW({
230                boxClass: 'init-animate'
231            }
232        );
233        eb_wow.init();
234    }
235
236});

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.