PageSourceSearch

https://www.licojimenez.com/french/js/main.js

js licojimenez.com collected 2026-10-06 11:09:43 UTC 79,093 bytes, 1,899 lines download raw bytes

1(function ($) {
2
3    "use strict";
4
5    var lastScroll = 0,
6            simpleDropdown = 0,
7            linkDropdown = 0,
8            isotopeObjs = [],
9            swiperObjs = [],
10            wow = '';
11    var sliderBreakPoint = 991;
12
13    /* check for browser os */
14    var isMobile = false;
15    var isiPhoneiPad = false;
16    var mobileAnimation = false;
17    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
18        isMobile = true;
19    }
20
21    if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
22        isiPhoneiPad = true;
23    }
24
25    /* jQuery appear */
26    $('.pie-chart-style-01, .pie-chart-style-02, .pie-chart-style-03, .counter, .progress-bar').each(function () {
27        $(this).appear().trigger('resize');
28    });
29
30    /* swiper slider using params */
31    setupSwiper();
32    destroySwiperLoop();
33    setHeaderPosition();
34
35    $(window).on('scroll', init_scroll_navigate);
36
37
38    function init_scroll_navigate() {
39
40        /* one page navigation */
41        var menu_links = $(".navbar-nav li a");
42        var scrollPos = $(document).scrollTop();
43        scrollPos = scrollPos + 60;
44        menu_links.each(function () {
45            var currLink = $(this);
46            var hasPos = currLink.attr("href").indexOf("#");
47            if (hasPos > -1) {
48                var res = currLink.attr("href").substring(hasPos);
49                if (res != '' && res != '#' && $(res).length > 0) {
50                    var refElement = $(res);
51                    if (refElement.offset().top <= scrollPos && refElement.offset().top + refElement.height() > scrollPos) {
52                        menu_links.not(currLink).removeClass("active");
53                        currLink.addClass("active");
54                    } else {
55                        currLink.removeClass("active");
56                    }
57                }
58            }
59        });
60
61        /* background color slider */
62        var $window = $(window),
63                $body = $('.bg-background-fade'),
64                $panel = $('.color-code');
65        var scroll = $window.scrollTop() + ($window.height() / 2);
66        $panel.each(function () {
67            var _self = $(this);
68            if (_self.position().top <= scroll && _self.position().top + _self.height() > scroll) {
69                $body.removeClass(function (index, css) {
70                    return (css.match(/(^|\s)color-\S+/g) || []).join(' ');
71                });
72                $body.addClass('color-' + _self.data('color'));
73            }
74        });
75
76        /* sticky nav */
77        setHeaderPosition()
78
79        /* header appear on scroll up */
80        var st = $(this).scrollTop();
81        if (st >= lastScroll) {
82            $('.sticky').removeClass('header-appear');
83        } else {
84            $('.sticky').addClass('header-appear');
85        }
86
87        lastScroll = st;
88        var headerHeight = $('nav').outerHeight();
89        if (lastScroll <= headerHeight)
90            $('header').removeClass('header-appear');
91    }
92
93    /* header search */
94    function ScrollStop() {
95        return false;
96    }
97    function ScrollStart() {
98        return true;
99    }
100
101    function setHeaderPosition()
102    {
103        var headerHeight = $('nav').outerHeight();
104        if (!$('header').hasClass('no-sticky')) {
105            if ($(document).scrollTop() >= headerHeight) {
106                $('header').addClass('sticky');
107
108            } else if ($(document).scrollTop() <= headerHeight) {
109                $('header').removeClass('sticky');
110                setTimeout(function () {
111                    setPageTitleSpace();
112                }, 500);
113            }
114            SetMegamenuPosition();
115        }
116    }
117
118    /* parallax background */
119    function setParallax() {
120        if (!isIE()) {
121            $('[data-parallax-background-ratio]').each(function () {
122                var ratio = $(this).attr('data-parallax-background-ratio') || 0.5;
123                $(this).parallax('0%', ratio);
124            });
125            $('[data-parallax-layout-ratio]').each(function () {
126                var ratio = $(this).attr('data-parallax-layout-ratio') || 1;
127                $(this).parallaxImg(ratio);
128            });
129        }
130    }
131
132    /* full screen */
133    function fullScreenHeight() {
134        var element = $(".full-screen");
135        var $minheight = $(window).height();
136        element.parents('section').imagesLoaded(function () {
137            if ($(".top-space .full-screen").length > 0) {
138                var $headerheight = $("header nav.navbar").outerHeight();
139                $(".top-space .full-screen").css('height', $minheight - $headerheight);
140            } else {
141                element.css('height', $minheight);
142            }
143        });
144
145        var minwidth = $(window).width();
146        $(".full-screen-width").css('width', minwidth);
147
148        var sidebarNavHeight = $('.sidebar-nav-style-1').height() - $('.logo-holder').parent().height() - $('.footer-holder').parent().height() - 10;
149        $(".sidebar-nav-style-1 .nav").css('height', (sidebarNavHeight));
150        var style2NavHeight = parseInt($('.sidebar-part2').height() - parseInt($('.sidebar-part2 .sidebar-middle').
150css('padding-top')) - parseInt($('.sidebar-part2 .sidebar-middle').css('padding-bottom')) - parseInt($(".sidebar-part2 .sidebar-middle .sidebar-middle-menu .nav").css('margin-bottom')));
151        $(".sidebar-part2 .sidebar-middle .sidebar-middle-menu .nav").css('height', (style2NavHeight));
152    }
153
154    /* function call */
155    function SetResizeContent() {
156        SetMegamenuPosition();
157        setPageTitleSpace();
158        setTimeout(function () {
159            setButtonPosition();
160        }, 600);
161        parallax_text();
162        setParallax();
163        fullScreenHeight();
164        if ( $( '.swiper-container:not( .swiper-auto-slide ):not( .swiper-bottom-scrollbar-full ):not( .instafeed-wrapper )' ).length > 0 ) {
165            resetSwiperLoop();
166        }
167    }
168
169    /* window load */
170    $(window).on('load', function () {
171        setParallax();
172        SetResizeContent();
173    });
174
175    /* window resize */
176    $(window).resize(function (event) {
177        destroySwiperLoop();
178
179        setTimeout(function () {
180            SetResizeContent();
181        }, 500);
182        $('.menu-back-div').each(function () {
183            /** iPad scroll issue - start **/
184            if ($(this).is(':visible')) {
185                $(this).parent().addClass('re-open');
186            }
187            /** iPad scroll issue - end **/
188            $(this).attr('style', '');
189        });
190        /*$('.navbar-collapse').collapse('hide');
191        $('ul.navbar-nav .open').removeClass('open');*/
192
193        event.preventDefault();
194    });
195
196    /** iPad scroll issue - start **/
197    $(document).on('click', '.dropdown.megamenu-fw.re-open', function() {
198        $(this).removeClass('re-open');
199        $(this).trigger('mouseenter');
200    });
201    /** iPad scroll issue - end **/
202
203    $( window ).on( 'orientationchange', function(e) {
204        $('.navbar-collapse').collapse('hide');
205        $('ul.navbar-nav .open').removeClass('open');
206    });
207
208    /* document ready */
209    $(document).ready(function () {
210
211        /* active class to current menu for only html */
212        var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/") + 1);
213        var $hash = window.location.hash.substring(1);
214
215        if ($hash) {
216            $hash = "#" + $hash;
217            pgurl = pgurl.replace($hash, "");
218        } else {
219            pgurl = pgurl.replace("#", "");
220        }
221
222        $(".nav li a").each(function () {
223            if ($(this).attr("href") == pgurl || $(this).attr("href") == pgurl + '.html') {
224                $(this).parent().addClass("active");
225                $(this).parents('li.dropdown').addClass("active");
226            }
227        });
228        $(window).scroll(function () {
229            if ($(this).scrollTop() > 150)
230                $('.scroll-top-arrow').fadeIn('slow');
231            else
232                $('.scroll-top-arrow').fadeOut('slow');
233        });
234
235        /* scroll to top */
236        $(document).on('click', '.scroll-top-arrow', function () {
237            $('html, body').animate({scrollTop: 0}, 800);
238            return false;
239        });
240
241        /* portfolio filter */
242        $('.portfolio-wrapper').each(function () {
243            var _this = $(this);
244            if (!_this.find('.wow').length > 0) {
245                _this.find('.grid-item').css('visibility', 'hidden');
246            }
247            _this.imagesLoaded(function () {
248                if (!_this.find('.wow').length > 0) {
249                    _this.find('.grid-item').css('visibility', '');
250                } else if (!isMobile) {
251                    _this.find('.grid-item').css('visibility', 'hidden');
252                }
253                _this.removeClass('grid-loading');
254                _this.removeClass('grid-loading-white');
255                _this.isotope({
256                    layoutMode: 'masonry',
257                    itemSelector: '.grid-item',
258                    percentPosition: true,
259                    stagger: 0,
260                    masonry: {
261                        columnWidth: '.grid-sizer',
262                    }
263                });
264                _this.isotope();
265                isotopeObjs.push(_this);
266            });
267        });
268        $(document).on('click', '.portfolio-filter > li > a', function () {
269            var _this = $(this),
270                    parentSectionObj = _this.parents('section');
271            parentSectionObj.find('.portfolio-filter > li').removeClass('active');
272            _this.parent().addClass('active');
273            var selector = _this.attr('data-filter'),
274                    portfolioFilter = parentSectionObj.find('.portfolio-wrapper');
275            removeWowAnimation(portfolioFilter);
276            portfolioFilter.isotope({filter: selector});
277            return false;
278        });
279
280        /* smooth scroll */
281        var scrollAnimationTime = 1200, scrollAnimation = 'easeInOutExpo';
282        $(document).on('click.smoothscroll', 'a.scrollto', function (event) {
283            event.preventDefault();
284            var target = this.hash;
285            if ($(target).length != 0) {
286                $('html, body').stop()
287                        .animate({
288                            'scrollTop': $(target)
289                                    .offset()
290                                    .top
291                        }, scrollAnimationTime, scrollAnimation, function () {
292                            window.location.hash = target;
293                        });
294            }
295        });
296
297        /* humburger menu one page navigation */
298        if ($('.full-width-pull-menu').length > 0) {
299            $(document).on('click', '.full-width-pull-menu .inner-link', function (e) {
300                $(".full-width-pull-menu .close-button-menu").trigger("click");
301                var _this = $(this);
302                setTimeout(function () {
303                    var target = _this.attr("href");
304                    if ($(target).length > 0) {
305                        $('html, body').stop()
306                                .animate({
307                                    'scrollTop': $(target).offset().top
308                                });
309                    }
310                }, 500);
311            });
312        }
313
314        /* inner link */
315        if ($('.navbar-top').length > 0 || $('.navbar-scroll-top').length > 0 || $('.navbar-top-scroll').length > 0) {
316            $('.inner-link').smoothScroll({
317                speed: 900,
318                offset: 0
319            });
320        } else {
321            $('.inner-link').smoothScroll({
322                speed: 900,
323                offset: -59
324            });
325        }
326
327        $('.section-link').smoothScroll({
328            speed: 900,
329            offset: 1
330        });
331        
332        /* pie chart */
333        if ($('.pie-chart-style-01').length > 0) {
334            $(document.body).on('appear', '.pie-chart-style-01', function (e) {
335                $('.pie-chart-style-01').easyPieChart({
336                    barColor: '#929292',
337                    trackColor: '#d9d9d9',
338                    scaleColor: false,
339                    easing: 'easeOutBounce',
340                    scaleLength: 1,
341                    lineCap: 'round',
342                    lineWidth: 3, //12
343                    size: 150, //110
344                    animate: {
345                        duration: 2000,
346                        enabled: true
347                    },
348                    onStep: function (from, to, percent) {
349                        $(this.el).find('.percent').text(Math.round(percent) + '%');
350                    }
351                });
352            });
353        }
354
355        if ($('.pie-chart-style-02').length > 0) {
356            $(document.body).on('appear', '.pie-chart-style-02', function (e) {
357                $('.pie-chart-style-02').easyPieChart({
358                    easing: 'easeOutCirc',
359                    barColor: '#ff214f',
360                    trackColor: '#c7c7c7',
361                    scaleColor: false,
362                    scaleLength: 1,
363                    lineCap: 'round',
364                    lineWidth: 2, //12
365                    size: 120, //110
366                    animate: {
367                        duration: 2000,
368                        enabled: true
369                    },
370                    onStep: function (from, to, percent) {
371                        $(this.el).find('.percent').text(Math.round(percent) + '%');
372                    }
373                });
374            });
375        }
376
377        if ($('.pie-chart-style-03').length > 0) {
378            $(document.body).on('appear', '.pie-chart-style-03', function (e) {
379                $('.pie-chart-style-03').easyPieChart({
380                    easing: 'easeOutCirc',
381                    barColor: '#ff214f',
382                    trackColor: '',
383                    scaleColor: false,
384                    scaleLength: 1,
385                    lineCap: 'round',
386                    lineWidth: 3, //12
387                    size: 140, //110
388                    animate: {
389                        duration: 2000,
390                        enabled: true
391                    },
392                    onStep: function (from, to, percent) {
393                        $(this.el).find('.percent').text(Math.round(percent) + '%');
394                    }
395                });
396            });
397        }
398        
399        /* masonry blog */
400        var $blog_filter = $('.blog-wrapper');
401        $blog_filter.imagesLoaded(function () {
402            $blog_filter.removeClass('grid-loading');
403            $blog_filter.isotope({
404                layoutMode: 'masonry',
405                itemSelector: '.grid-item',
406                percentPosition: true,
407                masonry: {
408                    columnWidth: '.grid-sizer'
409                }
410            });
411        });
412
413        $(window).resize(function () {
414            setTimeout(function () {
415                $blog_filter.find('.grid-item').removeClass('wow').removeClass('animated'); // avoid problem to filter after window resize
416                $blog_filter.isotope('layout');
417            }, 300);
418        });
419
420        /* lightbox gallery */
421        $('.lightbox-gallery').magnificPopup({
422            delegate: 'a',
423            type: 'image',
424            tLoading: 'Loading image #%curr%...',
425            mainClass: 'mfp-fade',
426            fixedContentPos: true,
427            closeBtnInside: false,
428            gallery: {
429                enabled: true,
430                navigateByImgClick: true,
431                preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
432            }
433        });
434
435        /* group gallery */
436        var lightboxgallerygroups = {};
437        $('.lightbox-group-gallery-item').each(function () {
438            var id = $(this).attr('data-group');
439            if (!lightboxgallerygroups[id]) {
440                lightboxgallerygroups[id] = [];
441            }
442            lightboxgallerygroups[id].push(this);
443        });
444        $.each(lightboxgallerygroups, function () {
445            $(this).magnificPopup({
446                type: 'image',
447                closeOnContentClick: true,
448                closeBtnInside: false,
449                fixedContentPos: true,
450                gallery: {enabled: true}
451            });
452        });
453
454        $('.lightbox-portfolio').magnificPopup({
455            delegate: '.gallery-link',
456            type: 'image',
457            tLoading: 'Loading image #%curr%...',
458            mainClass: 'mfp-fade',
459            fixedContentPos: true,
460            closeBtnInside: false,
461            closeOnContentClick: true,
462            gallery: {
463                enabled: true,
464                navigateByImgClick: false,
465                preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
466            }
467        });
468        
469         /* single image lightbox - zoom animation */
470        $('.single-image-lightbox').magnificPopup({
471            type: 'image',
472            closeOnContentClick: true,
473            fixedContentPos: true,
474            closeBtnInside: false,
475            mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
476            image: {
477                verticalFit: true
478            },
479            zoom: {
480                enabled: true,
481                duration: 300 // don't foget to change the duration also in CSS
482            }
483        });
484        
485        /* zoom gallery */
486        $('.zoom-gallery').magnificPopup({
487            delegate: 'a',
488            type: 'image',
489            mainClass: 'mfp-with-zoom mfp-img-mobile',
490            fixedContentPos: true,
491            closeBtnInside: false,
492            image: {
493                verticalFit: true,
494                titleSrc: function (item) {
495                    return item.el.attr('title');
496                }
497            },
498            gallery: {
499                enabled: true
500            },
501            zoom: {
502                enabled: true,
503                duration: 300, // don't foget to change the duration also in CSS
504                opener: function (element) {
505                    return element.find('img');
506                }
507            }
508        });
509        
510        /* modal popup */
511        $('.modal-popup').magnificPopup({
512            type: 'inline',
513            preloader: false,
514            // modal: true,
515            blackbg: true,
516            callbacks: {
517                open: function () {
518                    $('html').css('margin-right', 0);
519                }
520            }
521        });
522        $(document).on('click', '.popup-modal-dismiss', function (e) {
523            e.preventDefault();
524            $.magnificPopup.close();
525        });
526        
527        /* modal popup - zoom animation */
528        $('.popup-with-zoom-anim').magnificPopup({
529            type: 'inline',
530            fixedContentPos: false,
531            fixedBgPos: true,
532            overflowY: 'auto',
533            closeBtnInside: true,
534            preloader: false,
535            midClick: true,
536            removalDelay: 300,
537            blackbg: true,
538            mainClass: 'my-mfp-zoom-in'
539        });
540
541        $('.popup-with-move-anim').magnificPopup({
542            type: 'inline',
543            fixedContentPos: false,
544            fixedBgPos: true,
545            overflowY: 'auto',
546            closeBtnInside: true,
547            preloader: false,
548            midClick: true,
549            removalDelay: 300,
550            blackbg: true,
551            mainClass: 'my-mfp-slide-bottom'
552        });
553        
554        /* popup with form */
555        $('.popup-with-form').magnificPopup({
556            type: 'inline',
557            preloader: false,
558            closeBtnInside: false,
559            fixedContentPos: true,
560            focus: '#name',
561            callbacks: {
562                beforeOpen: function () {
563                    if (getWindowWidth() < 700) {
564                        this.st.focus = false;
565                    } else {
566                        this.st.focus = '#name';
567                    }
568                }
569            }
570        });
571        
572        /* video magnific popup */
573        $('.popup-youtube, .popup-vimeo, .popup-googlemap').magnificPopup({
574            disableOn: 700,
575            type: 'iframe',
576            mainClass: 'mfp-fade',
577            removalDelay: 160,
578            preloader: false,
579            fixedContentPos: "auto",
580            closeBtnInside: false
581        });
582        
583        /* ajax magnific popup for onepage portfolio */
584        $('.ajax-popup').magnificPopup({
585            type: 'ajax',
586            alignTop: true,
587            fixedContentPos: true,
588            overflowY: 'scroll', // as we know that popup content is tall we set scroll overflow by default to avoid jump
589            callbacks: {
590                open: function () {
591                    $('.navbar .collapse').removeClass('show');
592                    $('.navbar a.dropdown-toggle').addClass('collapsed');
593                }
594            }
595        });
596        
597        /* mega menu width */
598        $("ul.mega-menu-full").each(function (idx, elm) {
599            var megaMenuWidth = 0;
600            $(this).children('li').each(function (idx, elm) {
601                var LIheight = 0;
602                megaMenuWidth += $(this).outerWidth();
603            });
604            $(this).width(megaMenuWidth + 95);
605            megaMenuWidth = 0;
606        });
607        
608        /* fit videos */
609        $(".fit-videos").fitVids();
610        
611        /* form to email */
612        /* contact form validation on submit */
613        $(document).on('click', '.submit', function () {
614            var error = false,
615                    captchaFlag = false,
616                    _this = $(this),
617                    formObj = _this.parents('form'),
618                    emailFormat = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/,
619                    telFormat = /[0-9 -()+]+$/,
620                    actionURL = formObj.attr('action'),
621                    resultsObj = formObj.find('.form-results'),
622                    grecaptchav3 = _this.attr('data-sitekey') || '',
623                    redirectVal = formObj.find('[name="redirect"]').val();
624            formObj.find('.required').removeClass('required-error');
625            formObj.find('.required').each(function () {
626                var __this = $(this),
627                        fieldVal = __this.val();
628                if (fieldVal == '' || fieldVal == undefined) {
629                    error = true;
630                    __this.addClass('required-error');
631                } else if (__this.attr('type') == 'email' && !emailFormat.test(fieldVal)) {
632                    error = true;
633                    __this.addClass('required-error');
634                } else if (__this.attr('type') == 'tel' && !telFormat.test(fieldVal)) {
635                    error = true;
636                    __this.addClass('required-error');
637                }
638            });
639            var termsObj = formObj.find('.terms-condition');
640            if (termsObj.length > 0) {
641                if (!termsObj.is(':checked')) {
642                    error = true;
643                    termsObj.addClass('required-error');
644                }
645            }
646            
647            /* google reCaptcha verify */
648            if (typeof (grecaptcha) !== 'undefined' && grecaptcha !== null) {
649                if (formObj.find('.g-recaptcha').length > 0) { // For Version 2
650                    var gResponse = grecaptcha.getResponse();
651                    if (!(gResponse.length)) {
652                        error = true;
653                        formObj.find('.g-recaptcha').addClass('required-error');
654                    }
655                } else if (grecaptchav3 != '' && grecaptchav3 != undefined) { // For Version 3
656                    captchaFlag = true;
657                    formObj.find('input[name=action],input[name=g-recaptcha-response]').remove();
658                    grecaptcha.ready(function () {
659                        grecaptcha.execute(grecaptchav3, {action: 'subscribe_newsletter'}).then(function (token) {
660                            formObj.prepend('<input type="hidden" name="g-recaptcha-response" value="' + token + '">');
661                            formObj.prepend('<input type="hidden" name="action" value="subscribe_newsletter">');
662
663                            if (!error) {
664                                submitAJAXForm(_this);
665                            }
666                        });
667                    });
668                }
669            }
670            if (!error && !captchaFlag) { // Check no errors && no google reCaptcha V3
671                submitAJAXForm(_this);
672            }
673            return false;
674        });
675
676        /* Contact form validation on blur */
677        $(document).on('blur', '.required', function () {
678            var emailFormat = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/,
679                    telFormat = /[0-9 -()+]+$/,
680                    fieldVal = $(this).val();
681            if (fieldVal == '' || fieldVal == undefined) {
682                $(this).addClass('required-error');
683            } else if ($(this).attr('type') == 'email' && !emailFormat.test(fieldVal)) {
684                $(this).addClass('required-error');
685            } else if ($(this).attr('type') == 'tel' && !telFormat.test(fieldVal)) {
686                $(this).addClass('required-error');
687            } else {
688                $(this).removeClass('required-error');
689            }
690        });
691
692        /* Validate terms and conditions in form */
693        $(document).on('click', '.terms-condition', function () {
694            var termsObj = $(this);
695            if (!termsObj.is(':checked')) {
696                termsObj.addClass('required-error');
697            } else {
698                termsObj.removeClass('required-error');
699            }
700        });
701        
702        /* wow animation - on scroll */
703        if ($('.wow').length > 0) {
704            wow = new WOW({
705                boxClass: 'wow',
706                animateClass: 'animate__animated',
707                offset: 30,
708                mobile: mobileAnimation,
709                live: true
710            });
711            $(document).imagesLoaded(function () {
712                wow.init();
713            });
714        }
715        
716        /* counter */
717        /* counter number reset on jQuery appear */
718        if ($('.counter').length > 0) {
719            $(document).on('appear', '.counter', function (e) {
720                var _this = $(this);
721                if (!_this.hasClass('appear')) {
722                    var options = _this.data('countToOptions') || {};
723                    _this.countTo(options);
724                    _this.addClass('appear');
725                }
726            });
727        }
728        
729        /* counter number reset while scrolling */
730        $('.countdown').countdown($('.countdown').attr("data-enddate")).on('update.countdown', function (event) {
731            $(this).html(event.strftime('' + '<div class="counter-container"><div class="counter-box first"><div class="number">%-D</div><span>Day%!d</span></div>' + '<div class="counter-box"><div class="number">%H</div><span>Hours</span></div>' + '<div class="counter-box"><div class="number">%M</div><span>Minutes</span></div>' + '<div class="counter-box last"><div class="number">%S</div><span>Seconds</span></div></div>'));
732        });
733        
734        /* left nav */
735        $(document).on('click', '.right-menu-button', function (e) {
736            $('body').toggleClass('left-nav-on');
737        });
738        
739        /* hamburger menu */
740        $(document).on('click', '.btn-hamburger', function () {
741            $('.hamburger-menu').toggleClass('show-menu');
742            $('body').removeClass('show-menu');
743        });
744        
745        /* sidebar nav open */
746        $(document).on('click', '#mobileToggleSidenav', function () {
747            $(this).closest('nav').toggleClass('sidemenu-open');
748        });
749        
750        /* justified Gallery */
751        if ($('.justified-gallery').length > 0) {
752            $('.justified-gallery').each(function () {
753                var _this = $(this),
754                        justifiedOptions = _this.attr('data-justified-options') || '{ "rowHeight": 500, "maxRowHeight": false, "captions": true, "margins": 15, "waitThumbnailsLoad": true }';
755                if (typeof (justifiedOptions) !== 'undefined' && justifiedOptions !== null) {
756                    _this.imagesLoaded(function () {
757                        justifiedOptions = $.parseJSON(justifiedOptions);
758                        _this.justifiedGallery(justifiedOptions);
759                    });
760                }
761            });
762        }
763
764        $('.atr-nav').on("click", function () {
765            $(".atr-div").append("<a class='close-cross' href='#'>X</a>");
766            $(".atr-div").animate({
767                width: "toggle"
768            });
769        });
770
771        $('.close-cross').on("click", function () {
772            $(".atr-div").hide();
773        });
774
775        var menuRight = document.getElementById('cbp-spmenu-s2'),
776                showRightPush = document.getElementById('showRightPush'),
777                body = document.body;
778        if (showRightPush) {
779            showRightPush.onclick = function () {
780                classie.toggle(this, 'active');
781                if (menuRight)
782                    classie.toggle(menuRight, 'cbp-spmenu-open');
783            };
784        }
785
786        var test = document.getElementById('close-pushmenu');
787        if (test) {
788            test.onclick = function () {
789                classie.toggle(this, 'active');
790                if (menuRight)
791                    classie.toggle(menuRight, 'cbp-spmenu-open');
792            };
793        }
794        
795        /* blog page header animation */
796        $(".blog-header-style1 li").hover(function () {
797            $('.blog-header-style1 li.blog-column-active').removeClass('blog-column-active');
798            $(this).addClass('blog-column-active');
799        }, function () {
800            $(this).removeClass('blog-column-active');
801            $('.blog-header-style1 li:first-child').addClass('blog-column-active');
802        });
803        
804        /* big menu open close */
805        $('.big-menu-open').on("click", function () {
806            $('.big-menu-right').addClass("open");
807        });
808
809        $('.big-menu-close').on("click", function () {
810            $('.big-menu-right').removeClass("open");
811        });
812        
813        /* swiper auto slider */
814        var $swiperAutoSlideIndex = 0;
815        var swiperAutoSlideObj = undefined;
816        var swiperAutoSlide = document.querySelectorAll( '.swiper-auto-slide' );
817        swiperAutoSlide.forEach(function ( swiperItem, index ) {
818            var _this = $(swiperItem),
819                sliderOptions = _this.attr( 'data-slider-options' );
820
821            if ( typeof ( sliderOptions ) !== 'undefined' && sliderOptions !== null ) {
822                /* apply swiper */
823                var sliderOptions = $.parseJSON( sliderOptions );
824                    sliderOptions['on'] = {
825                        resize: function () {
826                            this.update();
827                        }
828                    };
829                swiperAutoSlideObj = new Swiper(swiperItem, sliderOptions);
830            }
831        });
832
833        $( window ).resize( function () {
834            if ( $( '.swiper-auto-slide' ).length > 0 && swiperAutoSlideObj ) {
835                $swiperAutoSlideIndex = swiperAutoSlideObj.activeIndex;
836                swiperAutoSlideObj.detachEvents();
837                swiperAutoSlideObj.destroy( true, false );
838                swiperAutoSlideObj = undefined;
839                $( '.swiper-auto-slide .swiper-wrapper' ).css( 'transform', '' ).css( 'transition-duration', '' );
840                $( '.swiper-auto-slide .swiper-slide' ).css( 'margin-right', '' ); 
841
842                setTimeout(function () {
843                    swiperAutoSlide.forEach(function ( swiperItem, index ) {
844                        var _this = $( swiperItem ),
845                            sliderOptions = _this.attr( 'data-slider-options' );
846                        if ( typeof ( sliderOptions ) !== 'undefined' && sliderOptions !== null ) {
847                            var sliderOptions = $.parseJSON(sliderOptions);
848                            sliderOptions['on'] = {
849                                init: function () {
850                                    this.update();
851                                }
852                            };
853                            swiperAutoSlideObj = new Swiper( swiperItem, sliderOptions );
854                            swiperAutoSlideObj.slideTo( $swiperAutoSlideIndex, 1200, false );
855                        }
856                    });
857                }, 1000 );
858            }
859        });
860        
861        /* swiper bottom scrollbar slider */
862        var resizeId;
863        var swiperBottomScrollbarFullObj = undefined;
864        var swiperBottomScrollbarFull = document.querySelectorAll('.swiper-bottom-scrollbar-full');
865        if ($(window).width() > 767) {
866            swiperBottomScrollbarFull.forEach(function (swiperItem, index) {
867                var _this = $(swiperItem),
868                        sliderOptions = _this.attr('data-slider-options');
869
870                if (typeof (sliderOptions) !== 'undefined' && sliderOptions !== null) {
871                    var sliderOptions = $.parseJSON(sliderOptions);
872                    swiperBottomScrollbarFullObj = new Swiper(swiperItem, sliderOptions);
873                }
874            });
875        }
876
877        if ($(".swiper-bottom-scrollbar-full").length > 0) {
878            $(window).resize(function () {
879                clearTimeout(resizeId);
880                resizeId = setTimeout(doneResizing, 1000);
881            });
882        }
883
884
885        function doneResizing() {
886            if (typeof (swiperBottomScrollbarFullObj) !== 'undefined' && swiperBottomScrollbarFullObj !== null) {
887                swiperBottomScrollbarFullObj.detachEvents();
888                swiperBottomScrollbarFullObj.destroy(true, true);
889                swiperBottomScrollbarFullObj = undefined;
890            }
891
892            $(".swiper-bottom-scrollbar-full .swiper-wrapper").css("transform", "").css("transition-duration", "").removeAttr("style");
893            $(".swiper-bottom-scrollbar-full .swiper-slide").css("margin-right", "").removeAttr("style");
894
895            if ($(window).width() > 767) {
896                setTimeout(function () {
897                    swiperBottomScrollbarFull.forEach(function (swiperItem, index) {
898                        var _this = $(swiperItem),
899                                sliderOptions = _this.attr('data-slider-options');
900
901                        if (typeof (sliderOptions) !== 'undefined' && sliderOptions !== null) {
902                            var sliderOptions = $.parseJSON(sliderOptions);
903                            swiperBottomScrollbarFullObj = new Swiper(swiperItem, sliderOptions);
904                        }
905                    });
906                }, 500);
907            }
908        }
909        
910        /* instagramfeed */
911        var instagramWrapperItems = document.querySelectorAll('.instafeed-wrapper');
912        instagramWrapperItems.forEach(function (instagramWrapperItem, index) {
913            var token = 'IGQVJYM0lCYW1ub2ViV2ZAzTVl4dVB6NUwzb3BhX0poazZALWUpWZA1NVdXJ2RU1HZA3llV2N5ajg3UlRIZA2dwSXNFT1F5UldzUHhSUDQ5TU9ZATFFSZAkhIQlhGdnRSc3V4Q3VOS2NDdVJFU29kdjRWSzBKbwZDZD',
914                    _this = $(instagramWrapperItem),
915                    token = _this.attr('data-token') || token,
916                    total = _this.attr('data-total') || '6', // how much photos do you want to get
917                    slider = _this.attr('data-slider-options'),
918                    _html = _this.html(),
919                    outputHTML = '';
920            if (typeof (slider) !== 'undefined' && slider !== null) {
921                _this.html('');
922            }
923            $.ajax({
924                url: 'https://graph.instagram.com/me/media?fields=id,media_type,media_url,timestamp,permalink,comments_count,like_count&access_token=' + token,
925                type: 'GET',
926                success: function (response) {
927                    outputHTML += _this.find('.grid-item').length > 0 ? '<li class="grid-sizer"></li>' : '';
928                    for (var x in response.data) {
929                        if (x < parseInt(total)) {
930                            if (response.data[x]['media_type'] == 'IMAGE') {
931                                var link = response.data[x]['permalink'] || '',
932                                        image = response.data[x]['media_url'] || '',
933                                        likes = response.data[x]['like_count'] || '',
934                                        comments = response.data[x]['comments_count'] || '',
935                                        output = _html;
936
937                                output = output.replace(' href="#"', '');
938                                output = output.replace(' src="#"', '');
939                                output = output.replace('data-href', 'href');
940                                output = output.replace('data-src', 'src');
941                                output = output.replace('{{link}}', link);
942                                output = output.replace('{{image}}', image);
943                                output = output.replace('{{likes}}', likes);
944                                output = output.replace('{{comments}}', comments);
945                                outputHTML += output;
946                            }
947                        }
948                    }
949                    _this.html(outputHTML);
950                    if (typeof (slider) !== 'undefined' && slider !== null) {
951                        // Apply swiper
952                        var sliderOptions = $.parseJSON(slider);
953                        var swiperObj = instagramWrapperItem.parentElement;
954                        new Swiper(swiperObj, sliderOptions);
955                    } else {
956                        // Apply isotope
957                        if (!_this.find('.wow').length > 0) {
958                            _this.find('.grid-item').css('visibility', 'hidden');
959                        }
960                        _this.imagesLoaded(function () {
961                            if (!_this.find('.wow').length > 0) {
962                                _this.find('.grid-item').css('visibility', '');
963                            } else if (!isMobile) {
964                                _this.find('.grid-item').css('visibility', 'hidden');
965                            }
966                            _this.removeClass('grid-loading');
967                            _this.isotope({
968                                layoutMode: 'masonry',
969                                itemSelector: '.grid-item',
970                                percentPosition: true,
971                                stagger: 0,
972                                masonry: {
973                                    columnWidth: '.grid-sizer',
974                                }
975                            });
976                            isotopeObjs.push(_this);
977                        });
978                    }
979                },
980                error: function (data) {
981                    var output = '<div class="col-12"><span class=text-center>No Images Found</span></div>';
982                    _this.append(output);
983                }
984            });
985        });
986        
987        /* revolution */
988        /* home-creative-studio */
989        if ($("#rev_slider_151_1").length > 0 && $("#rev_slider_151_1").revolution == undefined) {
990            revslider_showDoubleJqueryError("#rev_slider_151_1");
991        } else if ($("#rev_slider_151_1").length > 0) {
992            $("#rev_slider_151_1").show().revolution({
993                sliderType: "standard",
994                jsFileLocation: "revolution/js/",
995                sliderLayout: "fullscreen",
996                dottedOverlay: "none",
997                delay: 9000,
998                navigation: {
999                    keyboardNavigation: "off",
1000                    keyboard_direction: "vertical",
1001                    mouseScrollNavigation: "off",
1002                    mouseScrollReverse: "default",
1003                    onHoverStop: "off",
1004                    touch: {
1005                        touchenabled: "on",
1006                        swipe_threshold: 75,
1007                        swipe_min_touches: 1,
1008                        swipe_direction: "horizontal",
1009                        drag_block_vertical: false
1010                    },
1011                    arrows: {
1012                        style: "uranus",
1013                        enable: true,
1014                        hide_onmobile: false,
1015                        hide_over: 479,
1016                        hide_onleave: false,
1017                        tmp: '',
1018                        left: {
1019                            h_align: "left",
1020                            v_align: "center",
1021                            h_offset: 0,
1022                            v_offset: 0
1023                        },
1024                        right: {
1025                            h_align: "right",
1026                            v_align: "center",
1027                            h_offset: 0,
1028                            v_offset: 0
1029                        }
1030                    }
1031                },
1032                responsiveLevels: [1240, 1024, 778, 480],
1033                visibilityLevels: [1240, 1024, 778, 480],
1034                gridwidth: [1240, 1024, 778, 480],
1035                gridheight: [868, 768, 960, 720],
1036                lazyType: "none",
1037                scrolleffect: {
1038                    blur: "on",
1039                    maxblur: "20",
1040                    on_slidebg: "on",
1041                    direction: "top",
1042                    multiplicator: "2",
1043                    multiplicator_layers: "2",
1044                    tilt: "10",
1045                    disable_on_mobile: "off"
1046                },
1047                parallax: {
1048                    type: "scroll",
1049                    origo: "slidercenter",
1050                    speed: 400,
1051                    levels: [5, 10, 15, 20, 25, 30, 35, 40, 45, 46, 47, 48, 49, 50, 51, 55]
1052                },
1053                shadow: 0,
1054                spinner: "spinner3",
1055                stopLoop: "off",
1056                stopAfterLoops: -1,
1057                stopAtSlide: -1,
1058                shuffle: "off",
1059                autoHeight: "off",
1060                fullScreenAutoWidth: "off",
1061                fullScreenAlignForce: "off",
1062                fullScreenOffsetContainer: "",
1063                fullScreenOffset: "0px",
1064                hideThumbsOnMobile: "off",
1065                hideSliderAtLimit: 0,
1066                hideCaptionAtLimit: 0,
1067                hideAllCaptionAtLilmit: 0,
1068                debugMode: false,
1069                fallbacks: {
1070                    simplifyAll: "off",
1071                    nextSlideOnWindowFocus: "off",
1072                    disableFocusListener: false
1073                }
1074            });
1075        }
1076        
1077        /* home classic web agency */
1078        if ($("#rev_slider_1174_1").length > 0 && $("#rev_slider_1174_1").revolution == undefined) {
1079            revslider_showDoubleJqueryError("#rev_slider_1174_1");
1080        } else if ($("#rev_slider_1174_1").length > 0) {
1081            $("#rev_slider_1174_1").show().revolution({
1082                sliderType: "hero",
1083                jsFileLocation: "revolution/js/",
1084                sliderLayout: "fullscreen",
1085                dottedOverlay: "none",
1086                delay: 9000,
1087                navigation: {
1088                },
1089                responsiveLevels: [1240, 1024, 778, 480],
1090                visibilityLevels: [1240, 1024, 778, 480],
1091                gridwidth: [1240, 1024, 778, 480],
1092                gridheight: [868, 768, 960, 720],
1093                lazyType: "none",
1094                parallax: {
1095                    type: "scroll",
1096                    origo: "slidercenter",
1097                    speed: 400,
1098                    levels: [10, 15, 20, 25, 30, 35, 40, -10, -15, -20, -25, -30, -35, -40, -45, 55]
1099                },
1100                shadow: 0,
1101                spinner: "off",
1102                autoHeight: "off",
1103                fullScreenAutoWidth: "off",
1104                fullScreenAlignForce: "off",
1105                fullScreenOffsetContainer: "",
1106                disableProgressBar: "on",
1107                hideThumbsOnMobile: "off",
1108                hideSliderAtLimit: 0,
1109                hideCaptionAtLimit: 0,
1110                hideAllCaptionAtLilmit: 0,
1111                debugMode: false,
1112                fallbacks: {
1113                    simplifyAll: "off",
1114                    disableFocusListener: false
1115                }
1116            });
1117        }
1118        
1119        /* home classic corporate */
1120        if ($("#rev_slider_1078_1").length > 0 && $("#rev_slider_1078_1").revolution == undefined) {
1121            revslider_showDoubleJqueryError("#rev_slider_1078_1");
1122        } else if ($("#rev_slider_1078_1").length > 0) {
1123            $("#rev_slider_1078_1").show().revolution({
1124                sliderType: "standard",
1125                jsFileLocation: "revolution/js/",
1126                sliderLayout: "fullscreen",
1127                dottedOverlay: "none",
1128                delay: 9000,
1129                navigation: {
1130                    keyboardNavigation: "on",
1131                    keyboard_direction: "horizontal",
1132                    mouseScrollNavigation: "off",
1133                    mouseScrollReverse: "default",
1134                    onHoverStop: "off",
1135                    touch: {
1136                        touchenabled: "on",
1137                        swipe_threshold: 75,
1138                        swipe_min_touches: 1,
1139                        swipe_direction: "horizontal",
1140                        drag_block_vertical: false
1141                    }
1142                    ,
1143                    arrows: {
1144                        style: "zeus",
1145                        enable: true,
1146                        hide_onmobile: true,
1147                        hide_under: 600,
1148                        hide_onleave: true,
1149                        hide_delay: 200,
1150                        hide_delay_mobile: 1200,
1151                        tmp: '<div class="tp-title-wrap">  	<div class="tp-arr-imgholder"></div> </div>',
1152                        left: {
1153                            h_align: "left",
1154                            v_align: "center",
1155                            h_offset: 30,
1156                            v_offset: 0
1157                        },
1158                        right: {
1159                            h_align: "right",
1160                            v_align: "center",
1161                            h_offset: 30,
1162                            v_offset: 0
1163                        }
1164                    }
1165                    ,
1166                    bullets: {
1167                        enable: true,
1168                        hide_onmobile: false,
1169                        hide_under: 300,
1170                        style: "hermes",
1171                        hide_onleave: false,
1172                        hide_delay: 200,
1173                        hide_delay_mobile: 1200,
1174                        direction: "horizontal",
1175                        h_align: "center",
1176                        v_align: "bottom",
1177                        h_offset: 0,
1178                        v_offset: 30,
1179                        space: 8,
1180                        tmp: '<span class="tp-bullet-img-wrap">  <span class="tp-bullet-image"></span></span><span class="tp-bullet-title">{{title}}</span>'
1181                    }
1182                },
1183                viewPort: {
1184                    enable: true,
1185                    outof: "pause",
1186                    visible_area: "80%",
1187                    presize: false
1188                },
1189                responsiveLevels: [1240, 1024, 778, 480],
1190                visibilityLevels: [1240, 1024, 778, 480],
1191                gridwidth: [1240, 1024, 778, 480],
1192                gridheight: [600, 600, 500, 400],
1193                lazyType: "none",
1194                parallax: {
1195                    type: "mouse",
1196                    origo: "slidercenter",
1197                    speed: 2000,
1198                    levels: [2, 3, 4, 5, 6, 7, 12, 16, 10, 50, 46, 47, 48, 49, 50, 55]
1199                },
1200                shadow: 0,
1201                spinner: "off",
1202                stopLoop: "off",
1203                stopAfterLoops: -1,
1204                stopAtSlide: -1,
1205                shuffle: "off",
1206                autoHeight: "off",
1207                hideThumbsOnMobile: "off",
1208                hideSliderAtLimit: 0,
1209                hideCaptionAtLimit: 0,
1210                hideAllCaptionAtLilmit: 0,
1211                debugMode: false,
1212                fallbacks: {
1213                    simplifyAll: "off",
1214                    nextSlideOnWindowFocus: "off",
1215                    disableFocusListener: false
1216                }
1217            });
1218        }
1219        
1220        /* home creative minimalist portfolio */
1221        if ($("#rev_slider_26_1").length > 0 && $("#rev_slider_26_1").revolution == undefined) {
1222            revslider_showDoubleJqueryError("#rev_slider_26_1");
1223        } else if ($("#rev_slider_26_1").length > 0) {
1224            $("#rev_slider_26_1").show().revolution({
1225                sliderType: "standard",
1226                jsFileLocation: "revolution/js/",
1227                sliderLayout: "fullscreen",
1228                dottedOverlay: "none",
1229                delay: 9000,
1230                navigation: {
1231                    keyboardNavigation: "on",
1232                    keyboard_direction: "horizontal",
1233                    mouseScrollNavigation: "off",
1234                    mouseScrollReverse: "default",
1235                    onHoverStop: "off",
1236                    touch: {
1237                        touchenabled: "on",
1238                        touchOnDesktop: "on",
1239                        swipe_threshold: 75,
1240                        swipe_min_touches: 1,
1241                        swipe_direction: "horizontal",
1242                        drag_block_vertical: false
1243                    }
1244                    ,
1245                    arrows: {
1246                        style: "uranus",
1247                        enable: false,
1248                        hide_onmobile: true,
1249                        hide_under: 778,
1250                        hide_onleave: false,
1251                        tmp: '',
1252                        left: {
1253                            h_align: "left",
1254                            v_align: "center",
1255                            h_offset: 15,
1256                            v_offset: 0
1257                        },
1258                        right: {
1259                            h_align: "right",
1260                            v_align: "center",
1261                            h_offset: 15,
1262                            v_offset: 0
1263                        }
1264                    }
1265                    ,
1266                    bullets: {
1267                        enable: true,
1268                        hide_onmobile: false,
1269                        style: "hermes",
1270                        hide_onleave: false,
1271                        direction: "horizontal",
1272                        h_align: "center",
1273                        v_align: "bottom",
1274                        h_offset: 0,
1275                        v_offset: 30,
1276                        space: 6,
1277                        tmp: ''
1278                    }
1279                },
1280                responsiveLevels: [1240, 1025, 778, 480],
1281                visibilityLevels: [1240, 1025, 778, 480],
1282                gridwidth: [1240, 1025, 778, 480],
1283                gridheight: [868, 768, 960, 720],
1284                lazyType: "none",
1285                parallax: {
1286                    type: "scroll",
1287                    origo: "slidercenter",
1288                    speed: 2000,
1289                    levels: [5, 10, 15, 20, 25, 30, 35, 40, 45, 46, 47, 48, 49, 50, 51, 55],
1290                },
1291                shadow: 0,
1292                spinner: "off",
1293                stopLoop: "off",
1294                stopAfterLoops: -1,
1295                stopAtSlide: -1,
1296                shuffle: "off",
1297                autoHeight: "off",
1298                fullScreenAutoWidth: "off",
1299                fullScreenAlignForce: "off",
1300                fullScreenOffsetContainer: "",
1301                fullScreenOffset: "0px",
1302                hideThumbsOnMobile: "off",
1303                hideSliderAtLimit: 0,
1304                hideCaptionAtLimit: 0,
1305                hideAllCaptionAtLilmit: 0,
1306                debugMode: false,
1307                fallbacks: {
1308                    simplifyAll: "off",
1309                    nextSlideOnWindowFocus: "off",
1310                    disableFocusListener: false,
1311                }
1312            });
1313        }
1314        
1315        /* magnific popup */
1316        $('.header-search-form').magnificPopup({
1317            mainClass: 'mfp-fade',
1318            closeOnBgClick: true,
1319            preloader: false,
1320            // for white backgriund
1321            fixedContentPos: false,
1322            closeBtnInside: false,
1323            callbacks: {
1324                open: function () {
1325                    setTimeout(function () {
1326                        $('.search-input').focus();
1327                    }, 500);
1328                    $('#search-header').parent().addClass('search-popup');
1329                    if (!isMobile) {
1330                        $('body').addClass('overflow-hidden');
1331                        $('body').addClass('w-100');
1332                        document.onmousewheel = ScrollStop;
1333                    } else {
1334                        $('body, html').on('touchmove', function (e) {
1335                            e.preventDefault();
1336                        });
1337                    }
1338                },
1339                close: function () {
1340                    if (!isMobile) {
1341                        $('body').removeClass('overflow-hidden');
1342                        $('body').removeClass('w-100');
1343                        $('#search-header input[type=text]').each(function (index) {
1344                            if (index == 0) {
1345                                $(this).val('');
1346                                $("#search-header").find("input:eq(" + index + ")").css({"border": "none", "border-bottom": "2px solid rgba(255,255,255,0.5)"});
1347                            }
1348                        });
1349                        document.onmousewheel = ScrollStart;
1350                    } else {
1351                        $('body, html').unbind('touchmove');
1352                    }
1353                }
1354            }
1355        });
1356
1357        $(document).on('click', '.search-button', function () {
1358            var error = true;
1359            var formObj = $(this).parents('form');
1360            formObj.find('input[type=text]').each(function (index) {
1361                var _this = $(this),
1362                        searchVal = _this.val();
1363                if (searchVal === null || searchVal === '') {
1364                    formObj.find('input:eq(' + index + ')').addClass('required-error');
1365                    error = false;
1366                } else {
1367                    formObj.find('input:eq(' + index + ')').removeClass('required-error');
1368                }
1369            });
1370            return error;
1371        });
1372
1373        $(document).on("click", '.navbar .navbar-collapse a.dropdown-toggle, .accordion-style1 .panel-heading a, .accordion-style2 .panel-heading a, .accordion-style3 .panel-heading a, .toggles .panel-heading a, .toggles-style2 .panel-heading a, .toggles-style3 .panel-heading a, a.carousel-control, .nav-tabs a[data-bs-toggle="tab"], a.shopping-cart', function (e) {
1374            e.preventDefault();
1375            resetIsotopeLayoutLoop(isotopeObjs, true);
1376        });
1377
1378        $(document).on('touchstart click', 'body', function (e) {
1379            if ($(window).width() < 992) {
1380                if (!$('.navbar-collapse').has(e.target).is('.navbar-collapse') && $('.navbar-collapse').hasClass('show') && !$(e.target).hasClass('navbar-toggle')) {
1381                    $('.navbar-collapse').collapse('hide');
1382                    $('ul.navbar-nav .open').removeClass('open');
1383                }
1384            } else {
1385                if (!$('.navbar-collapse').has(e.target).is('.navbar-collapse') && $('.navbar-collapse').hasClass('show')) {
1386                    $('.navbar-collapse').find('a.dropdown-toggle').addClass('collapsed');
1387                    $('.navbar-collapse').find('ul.dropdown-menu').removeClass('show');
1388                    $('.navbar-collapse a.dropdown-toggle').removeClass('active');
1389                }
1390            }
1391        });
1392
1393        $('.navbar-collapse a.dropdown-toggle').on('touchstart', function (e) {
1394            $('.navbar-collapse a.dropdown-toggle').not(this).removeClass('active');
1395            if ($(this).hasClass('active'))
1396                $(this).removeClass('active');
1397            else
1398                $(this).addClass('active');
1399        });
1400
1401        $('button.navbar-toggle').on("click", function (e) {
1402            if (isMobile) {
1403                $(".cart-content").css('opacity', '0');
1404                $(".cart-content").css('visibility', 'hidden');
1405            }
1406        });
1407
1408        $('a.dropdown-toggle').on("click", function (e) {
1409            if (isMobile) {
1410                $(".cart-content").css('opacity', '0');
1411                $(".cart-content").css('visibility', 'hidden');
1412            }
1413        });
1414
1415        $(document).on('click', '.navbar-toggler', function () {
1416            if ($(this).hasClass('collapsed')) {
1417                $('ul.navbar-nav').find('.open').removeClass('open');
1418            }
1419        });
1420
1421        $(document).on('click', '.navbar-collapse [data-bs-toggle="dropdown"]', function (event) {
1422
1423            event.preventDefault();
1424            var _thisParent = $(this).parent();
1425            if (!_thisParent.hasClass('open')) {
1426                _thisParent.siblings('.dropdown').removeClass('open');
1427                _thisParent.addClass('open');
1428            } else {
1429                $('ul.navbar-nav').find('.open').removeClass('open');
1430            }
1431
1432            var $innerLinkLI = $(this).parents('ul.navbar-nav').find('li.dropdown a.inner
1432-link').parent('li.dropdown');
1433            if (!$(this).hasClass('inner-link') && !$(this).hasClass('dropdown-toggle') && $innerLinkLI.hasClass('show')) {
1434                $innerLinkLI.removeClass('show');
1435            }
1436            var target = $(this).attr('target');
1437            if ($(window).width() <= 991 && $(this).attr('href') && $(this).attr('href').indexOf("#") <= -1 && !$(event.target).is('i')) {
1438                if (event.ctrlKey || event.metaKey) {
1439                    window.open($(this).attr('href'), "_blank");
1440                    return false;
1441                } else if (!target)
1442                    window.location = $(this).attr('href');
1443                else
1444                    window.open($(this).attr('href'), target);
1445
1446            } else if ($(window).width() > 991 && $(this).attr('href').indexOf("#") <= -1) {
1447                if (event.ctrlKey || event.metaKey) {
1448                    window.open($(this).attr('href'), "_blank");
1449                    return false;
1450                } else if (!target)
1451                    window.location = $(this).attr('href');
1452                else
1453                    window.open($(this).attr('href'), target);
1454
1455            } else if ($(window).width() <= 991 && $(this).attr('href') && $(this).attr('href').length > 1 && $(this).attr('href').indexOf("#") >= 0 && $(this).hasClass('inner-link')) {
1456                $(this).parents('ul.navbar-nav').find('li.dropdown').not($(this).parent('.dropdown')).removeClass('show');
1457                if ($(this).parent('.dropdown').hasClass('show')) {
1458                    $(this).parent('.dropdown').removeClass('show');
1459                } else {
1460                    $(this).parent('.dropdown').addClass('show');
1461                }
1462                $(this).toggleClass('active');
1463            }
1464        });
1465
1466        /* progress bar on jQuery appear */
1467        if ($('.progress-bar').length > 0) {
1468            $(document).on('appear', '.progress-bar', function (e) {
1469                if (!$(this).hasClass('appear')) {
1470                    $(this).addClass('appear');
1471                    var total = $(this).attr('aria-valuenow'),
1472                            delay = 300;
1473                    $(this).animate({'width': total + '%'}, {
1474                        duration: delay,
1475                        easing: "swing",
1476                        progress: function (animation, progress, msRemaining) {
1477                            var counter = parseInt(total * progress);
1478                            $(this).find('span').html(counter + '%');
1479                        }
1480                    });
1481                }
1482            });
1483        }
1484        
1485        /* resize header menu */
1486        $('nav.full-width-pull-menu ul li.dropdown .dropdown-toggle').on('click', function (e) {
1487
1488            var _thisParent = $(this).parent('li');
1489            if (_thisParent.find('ul.dropdown-menu').length > 0) {
1490                if (!_thisParent.hasClass('show')) {
1491                    _thisParent.siblings('.dropdown').removeClass('show');
1492                    _thisParent.addClass('show');
1493                } else {
1494                    $('nav.full-width-pull-menu ul').find('.show').removeClass('show');
1495                }
1496            }
1497        });
1498        
1499        /* accordion */
1500        $('.accordion-event').each(function () {
1501            var _this = $(this),
1502                    activeIconClass = _this.attr('data-active-icon') || '',
1503                    inactiveIconClass = _this.attr('data-inactive-icon') || '';
1504            $('.collapse', this).on('show.bs.collapse', function () {
1505                var id = $(this).attr('id');
1506                $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion');
1507                $('a[href="#' + id + '"] .panel-title i').addClass(activeIconClass).removeClass(inactiveIconClass);
1508            }).on('hide.bs.collapse', function () {
1509                var id = $(this).attr('id');
1510                $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion');
1511                $('a[href="#' + id + '"] .panel-title i').addClass(inactiveIconClass).removeClass(activeIconClass);
1512            });
1513        });
1514
1515        $(document).on('click', '.nav.navbar-nav a.inner-link', function (e) {
1516            $(this).parents('ul.navbar-nav').find('a.inner-link').removeClass('active');
1517            var $this = $(this);
1518            $(this).parents('.navbar-collapse').collapse('hide');
1519
1520            setTimeout(function () {
1521                $this.addClass('active');
1522            }, 1000);
1523        });
1524        
1525        /* blog hover box */
1526        $(document).on("mouseenter", ".blog-post-style4 .grid-item", function (e) {
1527            $(this).find("figcaption .blog-hover-text").slideDown(300);
1528        });
1529        $(document).on("mouseleave", ".blog-post-style4 .grid-item", function (e) {
1530            $(this).find("figcaption .blog-hover-text").slideUp(300);
1531        });
1532
1533        SetResizeContent();
1534        
1535        /* demo button */
1536        /* var $buythemediv = '<div class="buy-theme alt-font d-none d-lg-block">
1536<a href="https://themeforest.net/item/pofo-creative-agency-corporate-and-portfolio-multipurpose-template/20645944?ref=themezaa" target="_blank"><i class="ti-shopping-cart"></i><span>Buy Theme</span></a></div><div class="all-demo alt-font d-none d-lg-block"><a href="mailto:[email protected]?subject=POFO - Creative Agency, Corporate and Portfolio Multi-purpose Template - Quick Question"><i class="ti-email"></i><span>Quick Question?</span></a></div>';
1537        $('body').append($buythemediv); */
1538
1539        $(document).on("touchstart", ".sidebar-wrapper", function () {
1540            clearOpen();
1541        });
1542
1543        var getNav = $("nav.navbar.bootsnav"), getIn = getNav.find("ul.nav").data("in"), getOut = getNav.find("ul.nav").data("out");
1544        function clearOpen() {
1545            $('li.dropdown').removeClass("on").removeClass("show");
1546            $(".dropdown-menu").stop().fadeOut('fast');
1547            $(".dropdown-menu").removeClass(getIn);
1548            $(".dropdown-menu").addClass(getOut);
1549        }
1550
1551    });
1552
1553    /* non retina image code */
1554    $( "img:not([data-at2x])" ).each( function() {
1555        $( this ).attr( 'data-no-retina', '' );
1556    });
1557    
1558    /* page load */
1559    $(document).on('load', function () {
1560        var hash = window.location.hash.substr(1);
1561        if (hash != "") {
1562            setTimeout(function () {
1563                $(document).imagesLoaded(function () {
1564                    var scrollAnimationTime = 1200,
1565                            scrollAnimation = 'easeInOutExpo';
1566                    var target = '#' + hash;
1567                    if ($(target).length > 0) {
1568                        $('html, body').stop()
1569                                .animate({
1570                                    'scrollTop': $(target).offset().top
1571                                }, scrollAnimationTime, scrollAnimation, function () {
1572                                    window.location.hash = target;
1573                                });
1574                    }
1575                });
1576            }, 500);
1577        }
1578
1579        fullScreenHeight();
1580    });
1581
1582    function pad(d) {
1583        return (d < 10) ? '0' + d.toString() : d.toString();
1584    }
1585
1586    function isIE() {
1587        var ua = window.navigator.userAgent;
1588        var msie = ua.indexOf("MSIE ");
1589        if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))  // If Internet Explorer, return version number
1590        {
1591            return true;
1592        } else  // If another browser, return 0
1593        {
1594            return false;
1595        }
1596    }
1597
1598    /* reset isotope loop */
1599    resetIsotopeLayoutLoop(isotopeObjs, false);
1600
1601    /* window resize */
1602    $(window).resize(function () {
1603
1604        setTimeout(function () {
1605            resetIsotopeLayoutLoop(isotopeObjs, true);
1606        }, 300);
1607
1608    });
1609
1610    /* get window width */
1611    function getWindowWidth() {
1612        return $(window).width();
1613    }
1614
1615    /* get window height */
1616    function getWindowHeight() {
1617        return $(window).height();
1618    }
1619
1620    /* megamenu position */
1621    function SetMegamenuPosition() {
1622        if ($(window).width() > 991) {
1623            setTimeout(function () {
1624                var totalHeight = $('nav.navbar').outerHeight();
1625                $('.mega-menu').css({top: totalHeight});
1626                if ($('.navbar-brand-top').length === 0)
1627                    $('.dropdown.simple-dropdown > .dropdown-menu').css({top: totalHeight});
1628            }, 200);
1629        } else {
1630            $('.mega-menu').css('top', '');
1631            $('.dropdown.simple-dropdown > .dropdown-menu').css('top', '');
1632        }
1633    }
1634    
1635    /* page title space */
1636    function setPageTitleSpace() {
1637        if ($('.navbar').hasClass('navbar-top') || $('nav').hasClass('navbar-fixed-top')) {
1638            if ($('.top-space').length > 0) {
1639                var top_space_height = $('.navbar').outerHeight();
1640                if ($('.top-header-area').length > 0) {
1641                    top_space_height = top_space_height + $('.top-header-area').outerHeight();
1642                }
1643                $('.top-space').css('margin-top', top_space_height + "px");
1644            }
1645        }
1646    }
1647    
1648    /* swiper button position in auto height slider */
1649    function setButtonPosition() {
1650        if ($(window).width() > 767 && $(".swiper-auto-height-container").length > 0) {
1651            var leftPosition = parseInt($('.swiper-auto-height-container .swiper-slide').css('padding-left'));
1652            var bottomPosition = parseInt($('.swiper-auto-height-container .swiper-slide').css('padding-bottom'));
1653            var bannerWidth = parseInt($('.swiper-auto-height-container .slide-banner').outerWidth());
1654            $('.navigation-area').css({'left': bannerWidth + leftPosition + 'px', 'bottom': bottomPosition + 'px'});
1655        } else if ($(".swiper-auto-height-container").length > 0) {
1656            $('.navigation-area').css({'left': '', 'bottom': ''});
1657        }
1658    }
1659    
1660    /* parallax text */
1661    function parallax_text() {
1662        var window_width = $(window).width();
1663        if (window_width > 1024) {
1664            if ($('.swiper-auto-slide .swiper-slide').length !== 0) {
1665                $(document).on("mousemove", ".swiper-auto-slide .swiper-slide", function (e) {
1666                    var positionX = e.clientX;
1667                    var positionY = e.clientY;
1668                    positionX = Math.round(positionX / 10) - 80;
1669                    positionY = Math.round(positionY / 10) - 40;
1670                    $(this).find('.parallax-text').css({'transform': 'translate(' + positionX + 'px,' + positionY + 'px)', 'transition-duration': '0s'});
1671                });
1672
1673                $(document).on("mouseout", ".swiper-auto-slide .swiper-slide", function (e) {
1674                    $('.parallax-text').css({'transform': 'translate(0,0)', 'transition-duration': '0.5s'});
1675                });
1676            }
1677        }
1678    }
1679
1680    /* setup swiper slider */
1681    function setupSwiper() {
1682
1683        /* swiper slider using params */
1684        var swiperItems = document.querySelectorAll(".swiper-container:not( .swiper-auto-slide ):not( .swiper-bottom-scrollbar-full ):not( .instafeed-wrapper )");
1685        swiperItems.forEach(function (swiperItem, index) {
1686            var _this = $(swiperItem),
1687                    sliderOptions = _this.attr('data-slider-options'),
1688                    swiperAutoSlideIndex = 0;
1689            if (typeof (sliderOptions) !== 'undefined' && sliderOptions !== null) {
1690
1691                sliderOptions = $.parseJSON(sliderOptions);
1692
1693                /* If user have provided "data-slider-md-direction" attribute then below code will execute */
1694                var mdDirection = _this.attr('data-slider-md-direction');
1695                if (mdDirection != '' && mdDirection != undefined) {
1696
1697                    var direction = (sliderOptions['direction'] != '' && sliderOptions['direction'] != undefined) ? sliderOptions['direction'] : mdDirection;
1698                    sliderOptions['on'] = {
1699                        init: function () {
1700                            if (getWindowWidth() <= sliderBreakPoint) {
1701                                this.changeDirection(mdDirection);
1702                            } else {
1703                                this.changeDirection(direction);
1704                            }
1705                            this.update();
1706                        },
1707                        resize: function () {
1708                            if (getWindowWidth() <= sliderBreakPoint) {
1709                                this.changeDirection(mdDirection);
1710                            } else {
1711                                this.changeDirection(direction);
1712                            }
1713                            this.update();
1714                        }
1715                    };
1716                }
1717
1718                /* If user have provided "data-thumb-slider-md-direction" attribute then below code will execute */
1719                if (sliderOptions['thumbs'] != '' && sliderOptions['thumbs'] != undefined) {
1720
1721                    var mdThumbDirection = _this.attr('data-thumb-slider-md-direction');
1722                    if (mdThumbDirection != '' && mdThumbDirection != undefined) {
1723
1724                        var thumbDirection = (sliderOptions['thumbs']['swiper']['direction'] != '' && sliderOptions['thumbs']['swiper']['direction'] != undefined) ? sliderOptions['thumbs']['swiper']['direction'] : mdThumbDirection;
1725                        sliderOptions['thumbs']['swiper']['on'] = {
1726                            init: function () {
1727                                if (getWindowWidth() <= sliderBreakPoint) {
1728                                    this.changeDirection(mdThumbDirection);
1729                                } else {
1730                                    this.changeDirection(thumbDirection);
1731                                }
1732                                this.update();
1733                            },
1734                            resize: function () {
1735                                if (getWindowWidth() <= sliderBreakPoint) {
1736                                    this.changeDirection(mdThumbDirection);
1737                                } else {
1738                                    this.changeDirection(thumbDirection);
1739                                }
1740                                this.update();
1741                            },
1742                            click: function () {
1743                                /* Product thumbs automatic next / previous on click slide */
1744                                if (this.activeIndex == this.clickedIndex) {
1745                                    this.slidePrev();
1746                                } else {
1747                                    this.slideNext();
1748                                }
1749                            }
1750                        };
1751                    }
1752                }
1753
1754                /* If user have provided "data-slider-number-pagination" attribute then below code will execute */
1755                var numberPagination = _this.attr('data-slider-number-pagination');
1756                if (numberPagination != '' && numberPagination != undefined) {
1757
1758                    sliderOptions['pagination']['renderBullet'] = function (index, className) {
1759                        return '<span class="' + className + '">' + pad((index + 1)) + '</span>';
1760                    };
1761
1762                    sliderOptions['on'] = {
1763                        resize: function () {
1764                            this.update();
1765                        }
1766                    };
1767                }
1768
1769                /* If user have provided "data-slide-change-on-click" attribute then below code will execute */
1770                var changeOnClick = _this.attr('data-slide-change-on-click');
1771                if (changeOnClick != '' && changeOnClick != undefined) {
1772
1773                    sliderOptions['on'] = {
1774                        click: function () {
1775                            if (this.activeIndex > this.clickedIndex) {
1776                                this.slidePrev();
1777                            } else if (this.activeIndex < this.clickedIndex) {
1778                                this.slideNext();
1779                            }
1780                        }
1781                    };
1782                }
1783
1784                /* If user have provided "data-thumbs" attribute then below code will execute */
1785                var dataThumbs = _this.attr('data-thumbs');
1786                if (dataThumbs != '' && dataThumbs != undefined) {
1787                    dataThumbs = $.parseJSON(dataThumbs);
1788                    if (typeof (dataThumbs) !== 'undefined' && dataThumbs !== null) {
1789                        sliderOptions['pagination']['renderBullet'] = function (index, className) {
1790                            return '<span class="' + className + '" style="background-image: url( ' + dataThumbs[index] + ' )"></span>';
1791                        }
1792                    }
1793                }
1794
1795                var swiperObj = new Swiper(swiperItem, sliderOptions);
1796                swiperObjs.push(swiperObj);
1797            }
1798        });
1799    }
1800
1801    /* destroy swiper loop */
1802    function destroySwiperLoop() {
1803        for (var i = 0; i < swiperObjs.length; i++) {
1804            var swiperObj = swiperObjs[i],
1805                    destroyWidth = swiperObj.$el.attr('data-slider-destroy');
1806            // If user have provided "data-slider-destroy" attribute then below code will execute
1807            if (destroyWidth != '' && destroyWidth != undefined) {
1808                if (getWindowWidth() <= destroyWidth) {
1809                    swiperObj.destroy(false, true); // Destroy swiper
1810                } else if (swiperObj.destroyed) {
1811                    swiperObjs.splice(i, 1);
1812                    setupSwiper(); // Initialize swiper again
1813                }
1814            }
1815        }
1816        ;
1817    }
1818
1819    /* reset swiper loop */
1820    function resetSwiperLoop() {
1821        setTimeout(function () {
1822            for (var i = 0; i < swiperObjs.length; i++) {
1823                var swiperObj = swiperObjs[i];
1824                swiperObj.update();
1825            }
1826        }, 500);
1827    }
1828
1829    /* remove wow animation */
1830    function removeWowAnimation(gridObj) {
1831        gridObj.find('.grid-item').removeClass('animate__animated').css('visibility', ''); // avoid problem to filter after sorting
1832        if ($('.wow').length > 0) {
1833            gridObj.find('.grid-item').each(function () {
1834                var _this = $(this);
1835                // remove perticular element from WOW array when you don't want animation on element after DOM lead
1836                wow.removeBox(this);
1837                _this.css('-webkit-animation', 'none');
1838                _this.css('-moz-animation', 'none');
1839                _this.css('-ms-animation', 'none');
1840                _this.css('animation', 'none');
1841            });
1842        }
1843    }
1844
1845    /* reset isotope loop */
1846    function resetIsotopeLayoutLoop(isotopeObjs, removeAnimation) {
1847        for (var i = 0; i < isotopeObjs.length; i++) {
1848            if (removeAnimation) {
1849                removeWowAnimation(isotopeObjs[i]);
1850            }
1851            if (isotopeObjs[i].data('isotope')) {
1852                isotopeObjs[i].isotope('layout');
1853            }
1854        }
1855        ;
1856    }
1857
1858    /* submit form using ajax */
1859    function submitAJAXForm(_this) {
1860
1861        var formObj = _this.parents('form'),
1862                actionURL = formObj.attr('action'),
1863                resultsObj = formObj.find('.form-results'),
1864                redirectVal = formObj.find('[name="redirect"]').val();
1865
1866        if (actionURL != '' && actionURL != undefined) {
1867            _this.addClass('loading');
1868            $.ajax({
1869                type: 'POST',
1870                url: actionURL,
1871                data: formObj.serialize(),
1872                success: function (result) {
1873                    _this.removeClass('loading');
1874                    if (redirectVal != '' && redirectVal != undefined) {
1875                        window.location.href = redirectVal;
1876                    } else {
1877                        if (typeof (result) !== 'undefined' && result !== null) {
1878                            result = $.parseJSON(result);
1879                        }
1880                        formObj.find('input[type=text],input[type=email],input[type=tel],input[type=password],textarea').each(function () {
1881                            $(this).val('');
1882                            $(this).removeClass('required-error');
1883                        });
1884                        formObj.find('.g-recaptcha').removeClass('required-error');
1885                        formObj.find('input[type=checkbox],input[type=radio]').prop('checked', false);
1886                        if (formObj.find('.g-recaptcha').length > 0) {
1887                            grecaptcha.reset();
1888                        }
1889                        formObj.find('input[name=action],input[name=g-recaptcha-response]').remove();
1890                        resultsObj.removeClass('alert-success').removeClass('alert-danger').hide();
1891                        resultsObj.addClass(result.alert).html(result.message);
1892                        resultsObj.removeClass('d-none').fadeIn('slow').delay(4000).fadeOut('slow');
1893                    }
1894                }
1895            });
1896        }
1897    }
1898
1899})(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.