PageSourceSearch

https://lashforevercanada.com/wp-content/themes/cherie/assets/js/scripts.js?ver=1.0

js lashforevercanada.com collected 2026-10-04 02:14:41 UTC 35,718 bytes, 1,183 lines download raw bytes

1jQuery.noConflict()(function($) {
2
3    "use strict";
4
5    var $window = window,
6        offset = '90%',
7        cherie_window = $( window ),
8        $doc = $(document),
9        cherie_preloader = $('.art-preloader-holder'),
10        self = this,
11        $body = $('body'),
12        page_preloader  = $body.data('page-preloader'),
13        hamburgerButton  = $('.hamburger--collapse-r'),
14        TweenMax = window.TweenMax,
15        TweenLite = window.TweenLite,
16        fl_theme = window.fl_theme || {};
17
18    fl_theme.window = $(window);
19    fl_theme.document = $(document);
20    window.fl_theme = fl_theme;
21    fl_theme.window = $(window);
22    fl_theme.sameOrigin = true;
23
24
25
26
27
28    // Loader
29    function artFadeInLogo() {
30        $(".art-preloader-holder img.img-logotype").fadeIn(800);
31        setTimeout(function(){
32            $(".art-preloader-holder").fadeOut(400);
33        }, 800);
34    }
35
36    if (!$.cookie('smartCookies')) {
37        setTimeout(artFadeInLogo, 200);
38
39        $.cookie('smartCookies', true, {
40            expires: 1,
41            path: '/'
42        });
43    } else {
44        $( document ).ready(function() {
45            $(".art-preloader-holder").fadeOut(400);
46        });
47    }
48
49    // Fix for Safari bfcache: hide preloader when navigating back
50    window.addEventListener('pageshow', function(event) {
51        if (event.persisted) {
52            // Page was restored from bfcache (back/forward navigation)
53            $(".art-preloader-holder").hide();
54        }
55    });
56
57
58
59    function cherie_checkURL(url) {
60        return(url.match(/\.(jpeg|jpg|gif|png)$/) != null);
61    }
62
63    fl_theme.initSiteLoader = function() {
64
65        $("a").on('click', function(event) {
66
67            let cherie_link_ref = $(this).attr('href');
68
69
70            if(this.pathname !== window.location.pathname && this.pathname !== '/'){
71                if( cherie_link_ref !== undefined && cherie_link_ref[0] != '#' ) {
72                    if(cherie_link_ref.indexOf(window.location.href) +1) {
73
74                    } else {
75
76                        if(cherie_link_ref.indexOf(document.location.host) +1 && ( !cherie_checkURL(cherie_link_ref )) ) {
77                            $(".art-preloader-holder").fadeIn(400);
78                        }
79                    }
80                }
81            }
82
83
84        });
85
86    };
87
88
89    // blog category dropdown
90    $(document).mouseup(function(e)
91    {
92        let container = $(".art-categories-dropdown");
93
94        if (!container.is(e.target) && container.has(e.target).length === 0)
95        {
96            container.removeClass('art-cat-open');
97        }
98    });
99    $('.art-categories-dropdown').on('click', function () {
100        $(this).toggleClass('art-cat-open');
101    })
102
103    // Custom Animation
104    $( window ).on( "load", function() {
105
106        $('.art-fadeInUp.art-anim').each(function (){
107            $(this).addClass('art-hidden');
108            let itemPosition = $(this).offset().top;
109            let bottomOfWindow = $(window).scrollTop() + $(window).height();
110            if (itemPosition < bottomOfWindow - 35){
111                $(this).removeClass('art-hidden');
112                $(this).addClass('animate__animated animate__fadeInUp');
113            }
114        });
115
116        $('.art-fadeIn.art-anim').each(function (){
117            $(this).addClass('art-hidden');
118            let itemPosition = $(this).offset().top;
119            let bottomOfWindow = $(window).scrollTop() + $(window).height();
120            if (itemPosition < bottomOfWindow - 35){
121                $(this).removeClass('art-hidden');
122                $(this).addClass('animate__animated animate__fadeIn');
123            }
124        });
125
126    });
127
128    $(window).scroll(function (){
129
130        $('.art-fadeInUp.art-anim').each(function (){
131            $(this).addClass('art-hidden');
132            let itemPosition = $(this).offset().top;
133            let bottomOfWindow = $(window).scrollTop() + $(window).height();
134            if (itemPosition < bottomOfWindow - 35){
135                $(this).removeClass('art-hidden art-anim');
136                $(this).addClass('animate__animated animate__fadeInUp');
137            }
138        });
139
140        $('.art-fadeIn.art-anim').each(function (){
141            $(this).addClass('art-hidden');
142            let itemPosition = $(this).offset().top;
143            let bottomOfWindow = $(window).scrollTop() + $(window).height();
144            if (itemPosition < bottomOfWindow - 35){
145                $(this).removeClass('art-hidden');
146                $(this).addClass('animate__animated animate__fadeIn');
147            }
148        });
149
150    });
151
152
153
154
155
156// Stiky Header
157    fl_theme.initStikyHeader = function(){
158
159        var header = $('header.art-header-one .art-header-one-content');
160        var header_two = $('header.art-header-two .art-header-two-content');
161
162        if(header.length){
163            window.onscroll = function() {FirstStickyHeaderFunction()};
164        }
165        if(header_two.length){
166            window.onscroll = function() {SecondStickyHeaderFunction()};
167        }
168
169        function FirstStickyHeaderFunction() {
170
171            if( $body.hasClass('admin-bar') && cherie_window.width() < 601 ) {
172                if(window.pageYOffset > 46) {
173                    header.addClass('art-sticky');
174                } else {
175                    header.removeClass('art-sticky');
176                }
177            } else if (window.pageYOffset > 1) {
178                header.addClass('art-sticky');
179            } else {
180                header.removeClass('art-sticky');
181            }
182        }
183
184        function SecondStickyHeaderFunction() {
185
186            if (window.pageYOffset > 1) {
187                header_two.addClass('art-sticky');
188            } else {
189                header_two.removeClass('art-sticky');
190            }
191        }
192
193    };
194
195// Stiky Sidebar
196    fl_theme.initStikySidebar = function(){
197        var sidebar_stiky = $('.sidebar-sticky');
198        if(sidebar_stiky.length){
199            sidebar_stiky.theiaStickySidebar({
200                additionalMarginTop: 30,
201                additionalMarginBottom: 30
202            });
203        }
204    };
205
206
207// Resize iframe video
208    fl_theme.initResponsiveIframe = function(){
209        var resizeitem = $('iframe');
210        resizeitem.height(
211            resizeitem.attr("height") / resizeitem.attr("width") * resizeitem.width()
212        );
213    };
214
215
216// Fixed Nav Bar   (do I need this?)
217    fl_theme.initNavBarFixed = function() {
218        var c, currentScrollTop = 0;
219        var body = $('body'),
220            nav_bar = $('.fl--header'),
221            nav_bar_height = nav_bar.height();
222
223        if(nav_bar.length && nav_bar.hasClass( "fixed-navbar" )){
224            body.find('.header-padding').css("padding-top",nav_bar_height+"px");
225            $(window).scroll(function () {
226                var a = $(window).scrollTop();
227                var b = nav_bar.height();
228                var d = nav_bar.find('.fl-top-header-content').outerHeight();
229                currentScrollTop = a;
230
231                if (c < currentScrollTop && a > b + b * 2) {
232                    nav_bar.addClass("scrollUp");
233                } else if (c > currentScrollTop && !(a <= b) || !(a >= b) ) {
234                    nav_bar.removeClass("scrollUp");
235                }
236
237                if (c < currentScrollTop && a > b) {
238                    nav_bar.addClass("padding-disable");
239                } else if (c > currentScrollTop && a < b + d ) {
240                    nav_bar.removeClass("padding-disable");
241                }
242
243                if (c < currentScrollTop && a > d ) {
244                    nav_bar.addClass("fixed-enable");
245                }else if (c > currentScrollTop && a < d ) {
246                    nav_bar.removeClass("fixed-enable");
247                }
248
249
250                c = currentScrollTop;
251            });
252        }
253    };
254
255
256    // Open Close Cart Side
257    fl_theme.initCartSideOpenClose = function() {
258        let $cart_container   = $('.art-woo-side-cart'),
259            $site_main_holder = $('.art-woo-container-wrapper'),
260            OpenNavBar        = void 0;
261
262
263        $doc.on('click', '.art-open-cart-side, .art-cart-side-close, .art-woo-content-mask', function (e) {
264            e.preventDefault();
265            self.toogleOpenCloseCartSide();
266        });
267
268        self.toogleOpenCloseCartSide = function () {
269            self[OpenNavBar ? 'closeFullscreenCart' : 'openFullscreenCart']();
270        };
271
272        self.openFullscreenCart = function () {
273
274            if (OpenNavBar || !$cart_container.length) {
275                return;
276            }
277            OpenNavBar = 1;
278
279
280            // container
281            TweenMax.set($site_main_holder, {
282                opacity: 1,
283                display: 'block',
284                x: '0'
285            });
286            TweenMax.to($site_main_holder, 0.3, {
287                opacity: 1,
288                x: '-375px',
289                display: 'block',
290                delay: 0
291            }, 0);
292
293
294            // Cart side
295            TweenMax.set($cart_container, {
296                opacity: 1,
297                display: 'none',
298                x: '375px'
299                //force3D: true
300            });
301            TweenMax.to($cart_container, 0.3, {
302                opacity: 1,
303                x: '0',
304                display: 'block',
305                delay: 0
306            }, 0);
307
308
309            $cart_container.addClass('open');
310            $site_main_holder.addClass('cart-sidebar-open');
311        };
312
313
314        self.closeFullscreenCart = function () {
315            if (!OpenNavBar || !$cart_container.length) {
316                return;
317            }
318            OpenNavBar = 0;
319
320
321            // container
322            TweenMax.to($site_main_holder, 0.3, {
323                x: '0',
324                opacity: 1,
325                display: 'block',
326                delay: 0
327            });
328
329            // Cart side
330            TweenMax.to($cart_container, 0.3, {
331                x: '375px',
332                opacity: 1,
333                display: 'none',
334                delay: 0
335            });
336
337
338
339            // close
340            $cart_container.removeClass('open');
341            $site_main_holder.removeClass('cart-sidebar-open');
342        }
343
344
345    };
346
347
348    // Open Close Mobile Navigation (all states are here)
349    fl_theme.initMobileNavigationOpenClose = function () {
350        let $navbar_wrapper         = $('.art-mobile-menu-wrapper'),
351            $navbar_menu_sidebar    = $('.art--mobile-menu-navigation-wrapper'),
352            $site_main_holder       = $('.art-main-container'),
353            $site_header            = $('#art-main-holder header.art--header'),
354            $hamburgerbars          = $('.art--hamburger-menu-wrapper'), /* no need ?*/
355            OpenNavBar              = void 0;
356
357        self.fullscreenNavbarIsOpened = function () {
358            return OpenNavBar;
359        };
360
361        self.toogleOpenCloseMobileMenu = function () {
362            self[OpenNavBar ? 'closeFullscreenNavbar' : 'openFullscreenNavbar']();
363        };
364        self.openFullscreenNavbar = function () {
365
366            if (OpenNavBar || !$navbar_wrapper.length) {
367                return;
368            }
369            OpenNavBar = 1;
370
371
372            $hamburgerbars.addClass('opened');
373            $hamburgerbars.removeClass('closed');
374
375            $site_main_holder.removeClass('art-no-transform');
376
377
378
379            // NavBarMenu wrapper Animation
380            TweenMax.set($site_main_holder, {
381                opacity: 1,
382                display: 'block',
383                x: '0'
384            });
385
386            TweenMax.to($site_main_holder, 0.3, {
387                opacity: 1,
388                x: '-280px',
389                display: 'block',
390                delay: 0
391            }, 0);
392
393
394            // NavBarMenu Items Animation
395            TweenMax.set($navbar_wrapper, {
396                opacity: 1,
397                display: 'none',
398                x: '280px'
399            });
400            TweenMax.to($navbar_wrapper, 0.3, {
401                opacity: 1,
402                x: '0',
403                display: 'block',
404                delay: 0
405            }, 0);
406
407
408
409
410            $navbar_wrapper.addClass('open');
411            hamburgerButton.addClass('is-active');
412            $navbar_menu_sidebar.addClass('sidebar-open');
413
414            $site_header.addClass('art-menu-open');
415
416
417
418        };
419
420        self.closeFullscreenNavbar = function (dontTouchBody) {
421            if (!OpenNavBar || !$navbar_wrapper.length) {
422                return;
423            }
424            OpenNavBar = 0;
425
426            // disactive all togglers
427            $hamburgerbars.removeClass('opened');
428            $hamburgerbars.addClass('closed');
429
430
431            // container
432            TweenMax.to($site_main_holder, 0.3, {
433                x: '0',
434                opacity: 1,
435                display: 'block',
436                delay: 0
437            });
438
439
440            TweenMax.to($navbar_wrapper, 0.3, {
441                x: '280px',
442                opacity: 1,
443                display: 'none',
444                delay: 0
445            });
446
447
448
449            setTimeout(function () {
450                $site_main_holder.addClass('art-no-transform');
451            }, 300);
452
453
454
455            // open navbar block
456            $navbar_wrapper.removeClass('open');
457            hamburgerButton.removeClass('is-active');
458            $navbar_menu_sidebar.removeClass('sidebar-open');
459
460            $site_header.removeClass('art-menu-open');
461
462        };
463
464
465        $doc.on('click', '.art--hamburger-menu-wrapper,.art--mobile-menu-icon,.info_block_hamburger', function (e) {
466            self.toogleOpenCloseMobileMenu();
467            e.preventDefault();
468        });
469
470        $( window ).resize(function() {
471            if( cherie_window.width() > 1240 ) {
472                self.closeFullscreenNavbar();
473            }
474        });
475
476    };
477
478
479
480// Mobile Menu
481    fl_theme.initMobileNavigationSubMenuAnimation = function () {
482        var $mobileMenu = $('.art--mobile-menu');
483
484        $mobileMenu.find('li').each(function(){
485            var $this = $(this);
486            if($this.find('ul').length > 0) {
487                $this.find('> a').append('<span class="fl-menu-flipper-icon fl--open-child-menu"><span class="fl-front-content"><i class="fa fa-angle-down" aria-hidden="true"></i></span><span class="fl-back-content"><i class="fa fa-angle-up" aria-hidden="true"></i></span></span>');
488            }
489        });
490
491
492
493        // open -> close sub-menu
494        function toggleSub_menu($sub_menu_find) {
495            var $navigation_Items = $sub_menu_find.find('.sub-nav >.sub-menu >li >a');
496
497            if (!$sub_menu_find.find('.sub-nav >.sub-menu >li.opened').length) {
498                $navigation_Items = $sub_menu_find.find('.sub-menu >li >a');
499            }
500
501            TweenMax.set($navigation_Items, {
502                opacity: 0,
503                x: '-20%',
504                force3D: true
505            }, 0.04);
506
507            if ($sub_menu_find.hasClass('opened')) {
508                $sub_menu_find.removeClass('opened');
509                $sub_menu_find.find('li').removeClass('opened');
510                $sub_menu_find.find('ul').slideUp(200);
511                TweenMax.staggerTo($navigation_Items, 0.3, {
512                    opacity: 0,
513                    x: '-20%',
514                    force3D: true
515                }, 0.04);
516            } else {
517                TweenMax.staggerTo($navigation_Items, 0.3, {
518                    x: '0%',
519                    opacity: 1,
520                    delay: 0.2
521                }, 0.04);
522
523                $sub_menu_find.addClass('opened');
524                if (!$sub_menu_find.children('ul').length) {
525                    $sub_menu_find.find('div').children('ul').slideDown();
526                } else {
527                    $sub_menu_find.children('ul').slideDown();
528                }
529                // Sub menu Children
530                $sub_menu_find.siblings('li').children('ul').slideUp(200);
531                $sub_menu_find.siblings('li').removeClass('opened');
532                $sub_menu_find.siblings('li').find('li').removeClass('opened');
533                $sub_menu_find.siblings('li').find('ul').slideUp(200);
534            }
535        }
536
537        $mobileMenu.on('click', 'li.has-submenu >a, li.menu-item-has-children >a', function (e) {
538            toggleSub_menu($(this).parent());
539            e.preventDefault();
540        });
541    };
542
543
544
545
546// Velocity Animation Save
547    fl_theme.initVelocityAnimationSave = function(){
548        var animated_velocity = $('.fl-animated-item-velocity');
549
550        // Hided item if animated not complete
551        animated_velocity.each(function () {
552            var $this = $(this),
553                $item;
554
555            if ($this.data('item-for-animated')) {
556                $item = $this.find($this.data('item-for-animated'));
557                $item.each(function() {
558                    if(!$(this).hasClass('animation-complete')) {
559                        $(this).css('opacity','0');
560                    }
561                });
562            } else {
563                if(!$this.hasClass('animation-complete')) {
564                    $this.css('opacity','0');
565                }
566            }
567        });
568
569        // animated Function
570        animated_velocity.each(function () {
571            var $this_item = $(this), $item, $animation;
572            $animation = $this_item.data('animate-type');
573            if ($this_item.data('item-for-animated')) {
574                $item = $this_item.find($this_item.data('item-for-animated'));
575                $item.each(function() {
576                    var $this = $(this);
577                    var delay='';
578                    if ($this_item.data('item-delay')) {
579                        delay = $this_item.data('item-delay');
580                    }else {
581                        if ($this.data('item-delay')) {
582                            delay = $this.data('item-delay');
583                        }
584                    }
585                    $this.waypoint(function () {
586                            if(!$this.hasClass('animation-complete')) {
587                                $this.addClass('animation-complete')
588                                    .velocity('transition.'+$animation,{delay:delay,display:'undefined',opacity:1});
589                            }
590                        },
591                        {
592                            offset: offset
593                        });
594                });
595            } else {
596                $this_item.waypoint(function () {
597                        var delay='';
598                        if ($this_item.data('item-delay')) {
599                            delay = $this_item.data('item-delay');
600                        }
601
602                        if(!$this_item.hasClass('animation-complete')) {
603                            $this_item.addClass('animation-complete')
604                                .velocity('transition.'+$animation,{  delay:delay,display:'undefined',opacity:1});
605                        }
606
607                    },
608                    {
609                        offset: offset
610                    });
611            }
612        });
613    };
614
615
616
617
618
619// Opacity header With Scroll
620    fl_theme.initOpacityScrollFunction = function(){
621        window.addEventListener("scroll", function() {
622            let header = $('.enable-opacity-with-scroll .content_header');
623            let wScroll = $(this).scrollTop();
624            let targetHeight = header.outerHeight();
625            let scrollPercent = (targetHeight*1.9 - window.scrollY) / targetHeight ;
626            header.each(function () {
627                let $this = $(this);
628                $this.waypoint(function () {
629                        TweenMax.to( $this, 0, {
630                            y:wScroll / 4,
631                            opacity: scrollPercent,
632                            ease: Power2.easeOut
633                        });
634                    },
635                    {
636                        offset: offset
637                    });
638
639            });
640        });
641    };
642// Testimonial Slider
643    fl_theme.initPostImageSliderFunction = function () {
644        var testimonila_slider = $('.fl-post-image-slider');
645        if(testimonila_slider.length){
646            testimonila_slider.each(function() {
647                var $this = $(this);
648                $this.not('.slick-initialized').slick({
649                    dots: false,
650                    infinite: true,
651                    arrows: true,
652                    autoplay:true,
653                    autoplaySpeed: 6000,
654                    speed: 500,
655                    slidesToShow: 1,
656                    slidesToScroll: 1,
657                    draggable: true,
658                    prevArrow: $('.post-prev-slider-btn'),
659                    nextArrow: $('.post-next-slider-btn'),
660                });
661            });
662        }
663    };
664
665
666// Line Height Check
667    fl_theme.initLineHeightСheck = function () {
668        var $element = $('.post-inner_content >p ,.single-page-wrapper >p');
669        $element.each(function() {
670            if ($(this).css("font-size") >= "20px") {
671                $(this).css('line-height','1.6');
672            }
673        });
674    };
675
676
677//Search Form Navigatop
678    fl_theme.initHeaderSearchForm = function() {
679        var $SearchForm = $('.header-search-form'),
680            OpenSearchForm = void 0,
681            search_form_input = $('form.search_global input'),
682            search_form_info_text = $('form.search_global .info-text'),
683            $searchformicon =  $('.header-search');
684
685        self.toggleFullscreenSearchForm = function () {
686            self[OpenSearchForm ? 'closeFullscreenSearchForm' : 'openFullscreenSearchForm']();
687        };
688
689
690
691
692        self.openFullscreenSearchForm = function () {
693            if (OpenSearchForm || !$SearchForm.length) {
694                return;
695            }
696            OpenSearchForm = 1;
697            //Default
698            $searchformicon.addClass('opened');
699            $searchformicon.removeClass('closed');
700
701            // set top position and animate
702            TweenMax.to($SearchForm, 0.4, {
703                opacity: 1,
704                display: 'block'
705            });
706            // Search Input
707            TweenMax.to(search_form_input, .2, {
708                opacity: 1,
709                y: '0',
710                delay: .3
711            });
712            //Info Text
713            TweenMax.to(search_form_info_text, .2, {
714                opacity: 1,
715                y: '0',
716                delay: .5
717            });
718
719
720            $SearchForm.addClass('open');
721        };
722
723        self.closeFullscreenSearchForm = function () {
724            if (!OpenSearchForm || !$SearchForm.length) {
725                return;
726            }
727            OpenSearchForm = 0;
728            // disactive all togglers
729            $searchformicon.removeClass('opened');
730            $searchformicon.addClass('closed');
731            // Search input
732            TweenMax.to(search_form_input, .4, {
733                opacity: 0,
734                y: '-20px',
735
736            });
737            // Search info text
738            TweenMax.to(search_form_info_text, .4, {
739                opacity: 0,
740                y: '20px',
741                delay: .3
742            });
743            // set top position and animate
744            TweenMax.to($SearchForm, .4, {
745                force3D: true,
746                display: 'none',
747                opacity: 0,
748                delay: .7
749            });
750
751            // open search form wrapper block
752            $SearchForm.removeClass('open');
753
754        };
755
756        $(document).keyup(function(e) {
757            if(OpenSearchForm === 1){
758                if (e.keyCode === 27 )  {
759                    $searchformicon.trigger('click');
760                }
761            }
762        });
763
764        $(document).on("scroll",function(e) {
765            if(OpenSearchForm === 1){
766                $searchformicon.trigger('click');
767            }
768        });
769
770
771        $doc.on('click', '.header-search', function (e) {
772            self.toggleFullscreenSearchForm();
773            e.preventDefault();
774        });
775
776
777
778    };
779
780
781
782
783    // Load More button for Blog
784    fl_theme.initLoadMoreForBlog = function () {
785
786        let cherie_load_next_page;
787        let cherie_lmp_ajax_instance;
788        let lmp_is_loading;
789        let cherie_blog_pagination_wrapper = $('.art-blog-pagination-wrapper');
790
791        cherie_current_style();
792
793        $(document).on( 'click', '.art-button-container .art-button-load-more', function (event) {
794            event.preventDefault();
795
796            cherie_load_next_page();
797        });
798
799        cherie_load_next_page = function () {
800
801
802            var $cherie_next_page = cherie_jquery_get_next_page(); //.next-page a
803
804
805            if( $cherie_next_page.length > 0 ) {
806
807
808                cherie_start_ajax_loading();  // pre loader
809
810                var cherie_next_page;
811                cherie_next_page = $cherie_next_page.attr('href');
812
813
814                cherie_lmp_ajax_instance = $.get( cherie_next_page, function( data ) {
815
816
817                    cherie_lmp_ajax_instance = false;
818                    var $data = $('<div>'+data+'</div>');
819
820                    var $posts = $data.find('.art-all-posts-itself').html();
821                    $('.art-all-posts-itself').append( $posts );
822
823
824                    var $cherie_next_page = cherie_jquery_get_next_page();
825                    var $cherie_new_next_page = cherie_jquery_get_next_page($data);
826                    if( $cherie_new_next_page.length ) {
827                        $cherie_next_page.replaceWith($cherie_new_next_page);
828                    } else {
829                        $cherie_next_page.remove();
830                    }
831
832
833                    cherie_end_ajax_loading();
834
835                    cherie_current_style();
836
837                });
838
839            }
840
841        };
842
843        function cherie_jquery_get_next_page($parent) {
844
845            var $next_page;
846
847            if( typeof($parent) == 'undefined' ) {
848                $parent = $(document);
849            }
850
851            var $pagination = $parent.find('.art-pagination');
852
853            if( $pagination.find('.next-page a').length > 0 ) {
854
855                $next_page = $pagination.find('.next-page a');
856            } else {
857
858                $next_page = $parent.find('.next-page a');
859            }
860
861
862            return $next_page;
863        }
864
865        function cherie_start_ajax_loading() {
866            cherie_blog_pagination_wrapper.addClass('art-is-loading');
867        }
868
869        function cherie_end_ajax_loading() {
870            cherie_blog_pagination_wrapper.removeClass('art-is-loading');
871        }
872
873
874
875        function cherie_current_style() {
876            $( '.art-blog-pagination-wrapper .art-load-more-button-container' ).hide();
877
878            var $cherie_next_page = cherie_jquery_get_next_page();
879            if ( $cherie_next_page.length > 0 ) {
880                $( '.art-blog-pagination-wrapper .art-load-more-button-container' ).show();
881            }
882
883        }
884
885    };
886
887    // Load More button for Shop
888    fl_theme.initLoadMoreForShop = function () {
889
890            var cherie_load_next_page;
891            var cherie_lmp_ajax_instance;
892            var lmp_is_loading;
893            var cherie_blog_pagination_wrapper = $('.art-shop-pagination-wrapper');
894
895            cherie_current_style();
896
897            $(document).on( 'click', '.art-button-container .art-button-load-more', function (event) {
898                event.preventDefault();
899
900
901                cherie_load_next_page();
902            });
903
904            cherie_load_next_page = function () {
905
906
907                var $cherie_next_page = cherie_jquery_get_next_page(); // .next-page a;
908
909
910                if( $cherie_next_page.length > 0 ) {
911
912
913                    cherie_start_ajax_loading();  // pre loader
914
915                    var cherie_next_page;
916                    cherie_next_page = $cherie_next_page.attr('href');
917
918
919                    cherie_lmp_ajax_instance = $.get( cherie_next_page, function( data ) {
920
921
922                        cherie_lmp_ajax_instance = false;
923                        var $data = $('<div>'+data+'</div>');
924
925                        var $posts = $data.find('ul.products').html();
926                        $('ul.products').append( $posts );
927
928
929                        var $cherie_next_page = cherie_jquery_get_next_page();
930                        var $cherie_new_next_page = cherie_jquery_get_next_page($data);
931                        if( $cherie_new_next_page.length ) {
932                            $cherie_next_page.replaceWith($cherie_new_next_page);
933                        } else {
934                            $cherie_next_page.remove();
935                        }
936
937
938                        cherie_end_ajax_loading();
939
940                        cherie_current_style();
941
942                    });
943
944                }
945
946            };
947
948            function cherie_jquery_get_next_page($parent) {
949
950                var $next_page;
951
952                if( typeof($parent) == 'undefined' ) {
953                    $parent = $(document);
954                }
955
956                var $pagination = $parent.find('.art-shop-pagination-wrapper .woocommerce-pagination');
957
958                if( $pagination.find('.woocommerce-pagination a.next').length > 0 ) {
959
960                    $next_page = $pagination.find('.woocommerce-pagination a.next');
961                } else {
962
963                    $next_page = $parent.find('.woocommerce-pagination a.next');
964                }
965
966                return $next_page;
967            }
968
969            function cherie_start_ajax_loading() {
970                cherie_blog_pagination_wrapper.addClass('art-is-loading');
971            }
972
973            function cherie_end_ajax_loading() {
974                cherie_blog_pagination_wrapper.removeClass('art-is-loading');
975            }
976
977
978
979            function cherie_current_style() {
980                $( '.art-shop-pagination-wrapper .art-load-more-button-container' ).hide();
981
982                var $cherie_next_page = cherie_jquery_get_next_page(
982);
983                if ( $cherie_next_page.length > 0 ) {
984                    $( '.art-shop-pagination-wrapper .art-load-more-button-container' ).show();
985                }
986
987            }
988
989        };
990
991
992
993
994    // Line Height Check
995    fl_theme.initFullScreenSearchBlog = function () {
996
997        $( '.art-search-blog-button' ).on( 'click', function(e) {
998            e.preventDefault();
999
1000            $('.art-search-blog .art-overlay').fadeIn(350);
1001        });
1002
1003        $( '.art-search-blog .art-overlay-close' ).on( 'click', function(e) {
1004
1005            $('.art-search-blog .art-overlay').fadeOut(350);
1006        });
1007
1008    };
1009
1010
1011
1012    // Blog Sticky
1013    fl_theme.initBlogStickyArchive = function () {
1014
1015        $('.art-content-left, .art-content-right').theiaStickySidebar({
1016
1017        });
1018
1019
1020
1021        $('.art-services-tabs-left, .art-services-tabs-center').theiaStickySidebar({
1022            additionalMarginTop: 100 // 65
1023        });
1024
1025
1026        // smooth scroll
1027        $("#scroll-spy ul li a[href^='#']").on('click', function(event) {
1028            let hash = this.hash;
1029            if (hash) {
1030                event.preventDefault();
1031                $('html, body').animate({scrollTop: $(hash).offset().top - cherieSettings.headerHeight}, 750);
1032            }
1033        });
1034
1035
1036        $(window).bind('scroll', function() {
1037            var currentTop = $(window).scrollTop();
1038
1039			var headerOne = $('header.art-header-one .art-header-one-content');
1040       		var headerTwo = $('header.art-header-two .art-header-two-content');
1041			var headerHeight = 100;
1042
1043			if (headerOne.length) {
1044				headerHeight += headerOne.height();
1045			} else if (headerTwo.length) {
1046				headerHeight += headerTwo.height();
1047			}
1048
1049            var elems = $('.art-service-wrapper');
1050            var cherie_all_nav = $('.art-service-full-page-tabs li a');
1051
1052            elems.each(function(index){
1053                var elemTop 	= $(this).offset().top;
1054                var elemBottom 	= elemTop + $(this).height();
1055
1056                if(currentTop >= elemTop - headerHeight && currentTop <= elemBottom){
1057                    var id 		= $(this).attr('id');
1058                    var navElem = $('a[href="#' + id+ '"]');
1059
1060
1061                    cherie_all_nav.removeClass( 'active' );
1062                    navElem.addClass('active');
1063                }
1064            })
1065
1066        });
1067
1068    };
1069    fl_theme.initCustomFunction = function(){
1070
1071        // Loader
1072        fl_theme.initSiteLoader();
1073
1074
1075        // Blog Sticky
1076        fl_theme.initBlogStickyArchive();
1077
1078        // Load More button for Blog
1079        fl_theme.initFullScreenSearchBlog();
1080
1081        // Load More button for Blog
1082        fl_theme.initLoadMoreForBlog();
1083
1084
1085        // Load More button for Blog
1086        fl_theme.initLoadMoreForShop();
1087
1088
1089        // header
1090        fl_theme.initStikyHeader();
1091
1092        // Sidebar  initStikySidebar
1093
1094
1095        // Resize iframe video
1096        fl_theme.initResponsiveIframe();
1097
1098        // Open Close Cart Side
1099        fl_theme.initCartSideOpenClose();
1100
1101        // Open Close Mobile Navigation
1102        fl_theme.initMobileNavigationOpenClose();
1103
1104        // Sub Menu Animation
1105        fl_theme.initMobileNavigationSubMenuAnimation();
1106
1107
1108        //Navbar fixed  initNavBarFixed
1109
1110
1111        // Maybe I need it
1112        fl_theme.initOpacityScrollFunction();
1113
1114
1115        // Post Image Slider
1116        fl_theme.initPostImageSliderFunction();
1117
1118
1119        // Line Height Check  initLineHeightСheck
1120
1121        // FullscreenSearch
1122        fl_theme.initHeaderSearchForm();
1123    };
1124
1125
1126
1127
1128    fl_theme.initCustomFunction();
1129    $($window).on('resize', function() {
1130        fl_theme.initResponsiveIframe();
1131        // initNavBarFixed
1132        // Resize iframe video
1133        fl_theme.initResponsiveIframe();
1134    });
1135
1136
1137
1138
1139
1140    
1141    /*$('.art-product-layout-classic').on('click', '.zoomImg', function(){
1142        if ($(window).width() > 640) {
1143            $(this).siblings('.fresco').trigger('click');
1144        }
1145    });*/
1146
1147    // WooCommerce navigation
1148    if (jQuery.fn.slick) {
1149
1150    }
1151
1152
1153
1154    /* Service accordion */
1155    var acc = document.getElementsByClassName("accordion");
1156    var i;
1157
1158    for (i = 0; i < acc.length; i++) {
1159        acc[i].addEventListener("click", function() {
1160
1161            if( !$(this).hasClass('active') ) {
1162                $('.accordion').removeClass('active');
1163                $('.panel').removeAttr("style")
1164            }
1165
1166            this.classList.toggle("active");
1167            var panel = this.nextElementSibling;
1168            if (panel.style.maxHeight) {
1169                panel.style.maxHeight = null;
1170            } else {
1171                panel.style.maxHeight = (panel.scrollHeight + 100) + "px";
1172            }
1173        });
1174    }
1175
1176
1177});
1178
1179
1180
1181jQuery( document.body ).on( 'updated_cart_totals', function () {
1182    jQuery('#calc_shipping_country').select2();
1183} );

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.