PageSourceSearch

https://www.ilearning.hk/html/js/main.js

js ilearning.hk collected 2026-10-02 01:55:34 UTC 101,041 bytes, 2,815 lines download raw bytes

1"use strict";
2var lastScroll = 0;
3
4//check for browser os
5var isMobile = false;
6var isiPhoneiPad = false;
7if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
8    isMobile = true;
9}
10
11if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
12    isiPhoneiPad = true;
13}
14
15function SetMegamenuPosition() {
16    if ($(window).width() > 991) {
17        setTimeout(function () {
18            var totalHeight = $('nav.navbar').outerHeight();
19            $('.mega-menu').css({top: totalHeight});
20            if ($('.navbar-brand-top').length === 0)
21                $('.dropdown.simple-dropdown > .dropdown-menu').css({top: totalHeight});
22        }, 200);
23    } else {
24        $('.mega-menu').css('top', '');
25        $('.dropdown.simple-dropdown > .dropdown-menu').css('top', '');
26    }
27}
28
29function pad(d) {
30    return (d < 10) ? '0' + d.toString() : d.toString();
31}
32
33function isIE() {
34    var ua = window.navigator.userAgent;
35    var msie = ua.indexOf("MSIE ");
36    if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))  // If Internet Explorer, return version number
37    {
38        return true;
39    } else  // If another browser, return 0
40    {
41        return false;
42    }
43}
44
45//page title space
46function setPageTitleSpace() {
47    if ($('.navbar').hasClass('navbar-top') || $('nav').hasClass('navbar-fixed-top')) {
48        if ($('.top-space').length > 0) {
49            var top_space_height = $('.navbar').outerHeight();
50            if ($('.top-header-area').length > 0) {
51                top_space_height = top_space_height + $('.top-header-area').outerHeight();
52            }
53            $('.top-space').css('margin-top', top_space_height + "px");
54        }
55    }
56}
57
58//swiper button position in auto height slider
59function setButtonPosition() {
60    if ($(window).width() > 767 && $(".swiper-auto-height-container").length > 0) {
61        var leftPosition = parseInt($('.swiper-auto-height-container .swiper-slide').css('padding-left'));
62        var bottomPosition = parseInt($('.swiper-auto-height-container .swiper-slide').css('padding-bottom'));
63        var bannerWidth = parseInt($('.swiper-auto-height-container .slide-banner').outerWidth());
64        $('.navigation-area').css({'left': bannerWidth + leftPosition + 'px', 'bottom': bottomPosition + 'px'});
65    } else if ($(".swiper-auto-height-container").length > 0) {
66        $('.navigation-area').css({'left': '', 'bottom': ''});
67    }
68}
69
70$(window).on("scroll", init_scroll_navigate);
71function init_scroll_navigate() {
72
73    /*==============================================================
74     One Page Main JS - START CODE
75     =============================================================*/
76    var menu_links = $(".navbar-nav li a");
77    var scrollPos = $(document).scrollTop();
78    scrollPos = scrollPos + 60;
79    menu_links.each(function () {
80        var currLink = $(this);
81        var hasPos = currLink.attr("href").indexOf("#");
82        if (hasPos > -1) {
83            var res = currLink.attr("href").substring(hasPos);
84            if ($(res).length > 0) {
85                var refElement = $(res);
86                if (refElement.offset().top <= scrollPos && refElement.offset().top + refElement.height() > scrollPos) {
87                    menu_links.not(currLink).removeClass("active");
88                    currLink.addClass("active");
89                } else {
90                    currLink.removeClass("active");
91                }
92            }
93        }
94    });
95
96    /*==============================================================*/
97    //background color slider Start
98    /*==============================================================*/
99    var $window = $(window),
100            $body = $('.bg-background-fade'),
101            $panel = $('.color-code');
102    var scroll = $window.scrollTop() + ($window.height() / 2);
103    $panel.each(function () {
104        var $this = $(this);
105        if ($this.position().top <= scroll && $this.position().top + $this.height() > scroll) {
106            $body.removeClass(function (index, css) {
107                return (css.match(/(^|\s)color-\S+/g) || []).join(' ');
108            });
109            $body.addClass('color-' + $(this).data('color'));
110        }
111    });
112
113    /* ===================================
114     sticky nav Start
115     ====================================== */
116    var headerHeight = $('nav').outerHeight();
117    if (!$('header').hasClass('no-sticky')) {
118        if ($(document).scrollTop() >= headerHeight) {
119            $('header').addClass('sticky');
120
121        } else if ($(document).scrollTop() <= headerHeight) {
122            $('header').removeClass('sticky');
123            setTimeout(function () {
124                setPageTitleSpace();
125            }, 500);
126        }
127        SetMegamenuPosition();
128    }
129
130    /* ===================================
131     header appear on scroll up
132     ====================================== */
133    var st = $(this).scrollTop();
134    if (st > lastScroll) {
135        $('.sticky').removeClass('header-appear');
136        //  $('.dropdown.on').removeClass('on').removeClass('open').find('.dropdown-menu').fadeOut(100);
137    } else
138        $('.sticky').addClass('header-appear');
139    lastScroll = st;
140    if (lastScroll <= headerHeight)
141        $('header').removeClass('header-appear');
142}
143
144/*==============================================================
145 parallax text - START CODE
146 ==============================================================*/
147function parallax_text() {
148    var window_width = $(window).width();
149    if (window_width > 1024) {
150        if ($('.swiper-auto-slide .swiper-slide').length !== 0) {
151            $(document).on("mousemove", ".swiper-auto-slide .swiper-slide", function (e) {
152                var positionX = e.clientX;
153                var positionY = e.clientY;
154                positionX = Math.round(positionX / 10) - 80;
155                positionY = Math.round(positionY / 10) - 40;
156                $(this).find('.parallax-text').css({'transform': 'translate(' + positionX + 'px,' + positionY + 'px)', 'transition-duration': '0s'});
157            });
158
159            $(document).on("mouseout", ".swiper-auto-slide .swiper-slide", function (e) {
160                $('.parallax-text').css({'transform': 'translate(0,0)', 'transition-duration': '0.5s'});
161            });
162        }
163    }
164}
165
166/*==============================================================*/
167//Search - START CODE
168/*==============================================================*/
169function ScrollStop() {
170    return false;
171}
172function ScrollStart() {
173    return true;
174}
175function validationSearchForm() {
176    var error = true;
177    $('#search-header input[type=text]').each(function (index) {
178        if (index === 0) {
179            if ($(this).val() === null || $(this).val() === "") {
180                $("#search-header").find("input:eq(" + index + ")").css({"border": "none", "border-bottom": "2px solid red"});
181                error = false;
182            } else {
183                $("#search-header").find("input:eq(" + index + ")").css({"border": "none", "border-bottom": "2px solid #000"});
184            }
185        }
186    });
187    return error;
188}
189
190/*==============================================================
191 //Parallax - START CODE
192 ==============================================================*/
193function stellarParallax() {
194    if ($(window).width() > 1024) {
195        $.stellar();
196    } else {
197        $.stellar('destroy');
198        $('.parallax').css('background-position', '');
199    }
200}
201
202
203/*==============================================================
204 full screen START CODE
205 ==============================================================*/
206function fullScreenHeight() {
207    var element = $(".full-screen");
208    var $minheight = $(window).height();
209    element.parents('section').imagesLoaded(function () {
210        if ($(".top-space .full-screen").length > 0) {
211            var $headerheight = $("header nav.navbar").outerHeight();
212            $(".top-space .full-screen").css('min-height', $minheight - $headerheight);
213        } else {
214            element.css('min-height', $minheight);
215        }
216    });
217
218    var minwidth = $(window).width();
219    $(".full-screen-width").css('min-width', minwidth);
220
221    var sidebarNavHeight = $('.sidebar-nav-style-1').height() - $('.logo-holder').parent().height() - $('.footer-holder').parent().height() - 10;
222    $(".sidebar-nav-style-1 .nav").css('height', (sidebarNavHeight));
223    var style2NavHeight = parseInt($('.sidebar-part2').height() - parseInt($('.sidebar-part2 .sidebar-middle').css('padding-top')) - parseInt($('.sidebar-part2 .sidebar-middle').css('padding-bottom')) - parseInt($(".sidebar-part2 .sidebar-middle .sidebar-middle-menu .nav").css('margin-bottom')));
224    $(".sidebar-part2 .sidebar-middle .sidebar-middle-menu .nav").css('height', (style2NavHeight));
225
226
227}
228
229function SetResizeContent() {
230    //    all function call
231    SetMegamenuPosition();
232    setPageTitleSpace();
233    setButtonPosition();
234    parallax_text();
235    stellarParallax();
236    fullScreenHeight();
237//    navClick();
238}
239
240/* ===================================
241 START RESIZE
242 ====================================== */
243$(window).resize(function (event) {
244    setTimeout(function () {
245        SetResizeContent();
246    }, 500);
247    $('.menu-back-div').each(function () {
248        $(this).attr('style', '');
249    });
250    $('.navbar-collapse').collapse('hide');
251
252    event.preventDefault();
253});
254
255/* ===================================
256 START READY
257 ====================================== */
258$(document).ready(function () {
259    "use strict";
260
261    // Active class to current menu for only html
262    var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/") + 1);
263    var $hash = window.location.hash.substring(1);
264
265    if ($hash) {
266        $hash = "#" + $hash;
267        pgurl = pgurl.replace($hash, "");
268    } else {
269        pgurl = pgurl.replace("#", "");
270    }
271
272    $(".nav li a").each(function () {
273        if ($(this).attr("href") == pgurl || $(this).attr("href") == pgurl + '.html') {
274            $(this).parent().addClass("active");
275            $(this).parents('li.dropdown').addClass("active");
276        }
277    });
278    $(window).scroll(function () {
279        if ($(this).scrollTop() > 150)
280            $('.scroll-top-arrow').fadeIn('slow');
281        else
282            $('.scroll-top-arrow').fadeOut('slow');
283    });
284    //Click event to scroll to top
285    $(document).on('click', '.scroll-top-arrow', function () {
286        $('html, body').animate({scrollTop: 0}, 800);
287        return false;
288    });
289
290    /* ===================================
291     swiper slider
292     ====================================== */
293    var swiperFull = new Swiper('.swiper-full-screen', {
294        loop: true,
295        slidesPerView: 1,
296        preventClicks: false,
297        allowTouchMove: true,
298        pagination: {
299            el: '.swiper-full-screen-pagination',
300            clickable: true
301        },
302        autoplay: {
303            delay: 5000
304        },
305        keyboard: {
306            enabled: true
307        },
308        navigation: {
309            nextEl: '.swiper-button-next',
310            prevEl: '.swiper-button-prev'
311        },
312        on: {
313            resize: function () {
314
315                // console.log(swiperFull);
316
317                swiperFull.update();
318            }
319        }
320    });
321
322    var swiperAutoFade = new Swiper('.swiper-auto-fade', {
323        allowTouchMove: true,
324        loop: true,
325        slidesPerView: 1,
326        preventClicks: false,
327        effect: 'fade',
328        autoplay: {
329            delay: 5000
330        },
331        keyboard: {
332            enabled: true
333        },
334        navigation: {
335            nextEl: '.swiper-button-next',
336            prevEl: '.swiper-button-prev'
337        },
338        pagination: {
339            el: '.swiper-auto-pagination',
340            clickable: true
341        },
342        on: {
343            resize: function () {
344                swiperAutoFade.update();
345            }
346        }
347    });
348
349    var swiperSecond = new Swiper('.swiper-slider-second', {
350        allowTouchMove: true,
351        slidesPerView: 1,
352        preventClicks: false,
353        keyboard: {
354            enabled: true
355        },
356        navigation: {
357            nextEl: '.swiper-button-next',
358            prevEl: '.swiper-button-prev'
359        },
360        pagination: {
361            el: '.swiper-pagination-second',
362            clickable: true
363        },
364        on: {
365            resize: function () {
366                swiperSecond.update();
367            }
368        }
369    });
370
371    var swiperThird = new Swiper('.swiper-slider-third', {
372        allowTouchMove: true,
373        slidesPerView: 1,
374        preventClicks: false,
375        keyboard: {
376            enabled: true
377        },
378        navigation: {
379            nextEl: '.swiper-button-next',
380            prevEl: '.swiper-button-prev'
381        },
382        pagination: {
383            el: '.swiper-pagination-third',
384            clickable: true
385        },
386        on: {
387            resize: function () {
388                swiperThird.update();
389            }
390        }
391    });
392
393    var swiperNumber = new Swiper('.swiper-number-pagination', {
394        allowTouchMove: true,
395        preventClicks: false,
396        autoplay: {
397            delay: 4000,
398            disableOnInteraction: true
399        },
400        pagination: {
401            el: '.swiper-number',
402            clickable: true,
403            renderBullet: function (index, className) {
404                return '<span class="' + className + '">' + pad((index + 1)) + '</span>';
405            }
406        },
407        on: {
408            resize: function () {
409                swiperNumber.update();
410            }
411        }
412    });
413
414    var swiperVerticalPagination = new Swiper('.swiper-vertical-pagination', {
415        allowTouchMove: true,
416        direction: 'vertical',
417        slidesPerView: 1,
418        spaceBetween: 0,
419        preventClicks: false,
420        mousewheel: {
421            mousewheel: true,
422            sensitivity: 1,
423            releaseOnEdges: true
424        },
425        navigation: {
426            nextEl: '.swiper-button-next',
427            prevEl: '.swiper-button-prev'
428        },
429        pagination: {
430            el: '.swiper-pagination-vertical',
431            clickable: true
432        },
433        on: {
434            resize: function () {
435                swiperVerticalPagination.update();
436            }
437        }
438    });
439
440    var swiperClients = new Swiper('.swiper-slider-clients', {
441        allowTouchMove: true,
442        slidesPerView: 4,
443        paginationClickable: true,
444        preventClicks: true,
445        autoplay: {
446            delay: 3000,
447            disableOnInteraction: true
448        },
449        pagination: {
450            el: null
451        },
452        breakpoints: {
453            1199: {
454                slidesPerView: 3
455            },
456            991: {
457                slidesPerView: 2
458            },
459            767: {
460                slidesPerView: 1
461            }
462        },
463        on: {
464            resize: function () {
465                swiperClients.update();
466            }
467        }
468    });
469
470    var swiperClients2 = new Swiper('.swiper-slider-clients-second', {
471        allowTouchMove: true,
472        slidesPerView: 4,
473        paginationClickable: true,
474        preventClicks: true,
475        autoplay: {
476            delay: 3000,
477            disableOnInteraction: true
478        },
479        pagination: {
480            el: null
481        },
482        breakpoints: {
483            1199: {
484                slidesPerView: 3
485            },
486            991: {
487                slidesPerView: 2
488            },
489            767: {
490                slidesPerView: 1
491            }
492        },
493        on: {
494            resize: function () {
495                swiperClients2.update();
496            }
497        }
498    });
499
500    var swiperThreeSlides = new Swiper('.swiper-three-slides', {
501        allowTouchMove: true,
502        slidesPerView: 3,
503        preventClicks: false,
504        pagination: {
505            el: '.swiper-pagination-three-slides',
506            clickable: true
507        },
508        autoplay: {
509            delay: 3000
510        },
511        keyboard: {
512            enabled: true
513        },
514        navigation: {
515            nextEl: '.swiper-three-slide-next',
516            prevEl: '.swiper-three-slide-prev'
517        },
518        breakpoints: {
519            991: {
520                slidesPerView: 2
521            },
522            767: {
523                slidesPerView: 1
524            }
525        },
526        on: {
527            resize: function () {
528                swiperThreeSlides.update();
529            }
530        }
531    });
532
533    /***** pause on hover *****/
534    $(".swiper-three-slides").hover(function() {
535        (this).swiper.autoplay.stop();
536    }, function() {
537        (this).swiper.autoplay.start();
538    });
539    /***** /pause on hover *****/
540
541    var swiperFourSlides = new Swiper('.swiper-four-slides', {
542        allowTouchMove: true,
543        slidesPerView: 4,
544        preventClicks: false,
545        pagination: {
546            el: '.swiper-pagination-four-slides',
547            clickable: true
548        },
549        autoplay: {
550            delay: 3000
551        },
552        keyboard: {
553            enabled: true
554        },
555        navigation: {
556            nextEl: '.swiper-button-next',
557            prevEl: '.swiper-button-prev'
558        },
559        breakpoints: {
560            1199: {
561                slidesPerView: 3
562            },
563            991: {
564                slidesPerView: 2
565            },
566            767: {
567                slidesPerView: 1
568            }
569        },
570        on: {
571            resize: function () {
572                swiperFourSlides.update();
573            }
574        }
575    });
576
577    var swiperDemoHeaderStyle = new Swiper('.swiper-demo-header-style', {
578        allowTouchMove: true,
579        loop: true,
580        slidesPerView: 4,
581        preventClicks: true,
582        slidesPerGroup: 4,
583        pagination: {
584            el: '.swiper-pagination-demo-header-style',
585            clickable: true
586        },
587        autoplay: {
588            delay: 3000
589        },
590        keyboard: {
591            enabled: true
592        },
593        navigation: {
594            nextEl: '.swiper-button-next',
595            prevEl: '.swiper-button-prev'
596        },
597        breakpoints: {
598            1199: {
599                slidesPerGroup: 2,
600                slidesPerView: 2
601            },
602            767: {
603                slidesPerGroup: 1,
604                slidesPerView: 1
605            }
606        },
607        on: {
608            resize: function () {
609                swiperDemoHeaderStyle.update();
610            }
611        }
612    });
613
614    var $swiperAutoSlideIndex = 0;
615    var swiperAutoSlide = new Swiper('.swiper-auto-slide', {
616        allowTouchMove: true,
617        slidesPerView: 'auto',
618        centeredSlides: true,
619        spaceBetween: 80,
620        preventClicks: false,
621        observer: true,
622        speed: 1000,
623        pagination: {
624            el: null
625        },
626        scrollbar: {
627            el: '.swiper-scrollbar',
628            draggable: true,
629            hide: false,
630            snapOnRelease: true
631        },
632        autoplay: {
633            delay: 3000
634        },
635        mousewheel: {
636            invert: false
637        },
638        keyboard: {
639            enabled: true
640        },
641        navigation: {
642            nextEl: '.swiper-next-style2',
643            prevEl: '.swiper-prev-style2'
644        },
645        breakpoints: {
646            1199: {
647                spaceBetween: 60
648            },
649            960: {
650                spaceBetween: 30
651            },
652            767: {
653                spaceBetween: 15
654            }
655        },
656        on: {
657            resize: function () {
658                swiperAutoSlide.update();
659            }
660        }
661    });
662
663    if ($(window).width() > 767) {
664        var swiperBottomScrollbarFull = new Swiper('.swiper-bottom-scrollbar-full', {
665            allowTouchMove: true,
666            slidesPerView: 'auto',
667            grabCursor: true,
668            preventClicks: false,
669            spaceBetween: 30,
670            keyboardControl: true,
671            speed: 1000,
672            pagination: {
673                el: null
674            },
675            scrollbar: {
676                el: '.swiper-scrollbar',
677                draggable: true,
678                hide: false,
679                snapOnRelease: true
680            },
681            mousewheel: {
682                enable: true
683            },
684            keyboard: {
685                enabled: true
686            },
687            navigation: {
688                nextEl: '.swiper-button-next',
689                prevEl: '.swiper-button-prev'
690            }
691        });
692    }
693
694    var swiperAutoHieght = new Swiper('.swiper-auto-height-container', {
695        allowTouchMove: true,
696        effect: 'fade',
697        loop: true,
698        autoHeight: true,
699        pagination: {
700            el: '.swiper-auto-height-pagination',
701            clickable: true
702        },
703        autoplay: {
704            delay: 3000
705        },
706        navigation: {
707            nextEl: '.swiper-button-next',
708            prevEl: '.swiper-button-prev'
709        },
710        on: {
711            resize: function () {
712                swiperAutoHieght.update();
713            }
714        }
715    });
716
717    var swiperMultyRow = new Swiper('.swiper-multy-row-container', {
718        allowTouchMove: true,
719        slidesPerView: 4,
720        spaceBetween: 15,
721        pagination: {
722            el: '.swiper-multy-row-pagination',
723            clickable: true
724        },
725        autoplay: {
726            delay: 3000,
727            disableOnInteraction: true
728        },
729        navigation: {
730            nextEl: '.swiper-portfolio-next',
731            prevEl: '.swiper-portfolio-prev'
732        },
733        breakpoints: {
734            991: {
735                slidesPerView: 2
736            },
737            767: {
738                slidesPerView: 1
739            }
740        },
741        on: {
742            resize: function () {
743                swiperMultyRow.update();
744            }
745        }
746    });
747
748    var swiperBlog = new Swiper('.swiper-blog', {
749        allowTouchMove: true,
750        slidesPerView: "auto",
751        centeredSlides: true,
752        spaceBetween: 15,
753        preventClicks: false,
754        loop: true,
755        loopedSlides: 3,
756        pagination: {
757            el: '.swiper-blog-pagination',
758            clickable: true
759        },
760        autoplay: {
761            delay: 5000,
762            disableOnInteraction: true
763        },
764        navigation: {
765            nextEl: '.swiper-button-next',
766            prevEl: '.swiper-button-prev'
767        },
768        on: {
769            resize: function () {
770                swiperBlog.update();
771            }
772        }
773    });
774
775    var swiperPresentation = new Swiper('.swiper-presentation', {
776        allowTouchMove: true,
777        slidesPerView: 4,
778        centeredSlides: true,
779        spaceBetween: 30,
780        preventClicks: true,
781        loop: true,
782        loopedSlides: 6,
783        pagination: {
784            el: '.swiper-presentation-pagination',
785            clickable: true
786        },
787        autoplay: {
788            delay: 3000,
789            disableOnInteraction: true
790        },
791        keyboard: {
792            enabled: true
793        },
794        navigation: {
795            nextEl: '.swiper-button-next',
796            prevEl: '.swiper-button-prev'
797        },
798        breakpoints: {
799            991: {
800                spaceBetween: 15,
801                slidesPerView: 2
802            },
803            767: {
804                slidesPerView: 1
805            }
806        },
807        on: {
808            resize: function () {
809                swiperPresentation.update();
810            }
811        }
812    });
813
814    var resizeId;
815
816    $(window).resize(function () {
817        if ($(".swiper-auto-slide").length > 0 && swiperAutoSlide) {
818            $swiperAutoSlideIndex = swiperAutoSlide.activeIndex;
819            swiperAutoSlide.detachEvents();
820            swiperAutoSlide.destroy(true, false);
821            swiperAutoSlide = undefined;
822            $(".swiper-auto-slide .swiper-wrapper").css("transform", "").css("transition-duration", "");
823            $(".swiper-auto-slide .swiper-slide").css("margin-right", "");
824
825            setTimeout(function () {
826                swiperAutoSlide = new Swiper('.swiper-auto-slide', {
827                    allowTouchMove: true,
828                    slidesPerView: 'auto',
829                    centeredSlides: true,
830                    spaceBetween: 80,
831                    preventClicks: false,
832                    mousewheelControl: true,
833                    observer: true,
834                    speed: 1000,
835                    pagination: {
836                        el: null
837                    },
838                    scrollbar: {
839                        el: '.swiper-scrollbar',
840                        draggable: true,
841                        hide: false,
842                        snapOnRelease: true
843                    },
844                    autoplay: {
845                        delay: 3000
846                    },
847                    keyboard: {
848                        enabled: true
849                    },
850                    navigation: {
851                        nextEl: '.swiper-next-style2',
852                        prevEl: '.swiper-prev-style2'
853                    },
854                    breakpoints: {
855                        1199: {
856                            spaceBetween: 60
857                        },
858                        960: {
859                            spaceBetween: 30
860                        },
861                        767: {
862                            spaceBetween: 15
863                        }
864                    },
865                    on: {
866                        resize: function () {
867                            swiperAutoSlide.update();
868                        }
869                    }
870                });
871
872                swiperAutoSlide.slideTo($swiperAutoSlideIndex, 1000, false);
873            }, 1000);
874        }
875
876        if ($(".swiper-bottom-scrollbar-full").length > 0) {
877            clearTimeout(resizeId);
878            resizeId = setTimeout(doneResizing, 1000);
879        }
880
881        /* update all swiper on window resize */
882
883        setTimeout(function () {
884            if ($('.swiper-full-screen').length > 0 && swiperFull)
885            {
886                swiperFull.update();
887            }
888
889            if ($('.swiper-auto-fade').length > 0 && swiperAutoFade)
890            {
891                swiperAutoFade.update();
892            }
893
894            if ($('.swiper-slider-second').length > 0 && swiperSecond)
895            {
896                swiperSecond.update();
897            }
898
899            if ($('.swiper-slider-third').length > 0 && swiperThird)
900            {
901                swiperThird.update();
902            }
903
904            if ($('.swiper-number-pagination').length > 0 && swiperNumber)
905            {
906                swiperNumber.update();
907            }
908
909            if ($('.swiper-vertical-pagination').length > 0 && swiperVerticalPagination)
910            {
911                swiperVerticalPagination.update();
912            }
913
914            if ($('.swiper-slider-clients').length > 0 && swiperClients)
915            {
916                swiperClients.update();
917            }
918
919            if ($('.swiper-slider-clients-second').length > 0 && swiperClients2)
920            {
921                swiperClients2.update();
922            }
923
924            if ($('.swiper-three-slides').length > 0 && swiperThreeSlides)
925            {
926                swiperThreeSlides.update();
927            }
928
929            if ($('.swiper-four-slides').length > 0 && swiperFourSlides)
930            {
931                swiperFourSlides.update();
932            }
933
934            if ($('.swiper-demo-header-style').length > 0 && swiperDemoHeaderStyle)
935            {
936                swiperDemoHeaderStyle.update();
937            }
938
939            if ($('.swiper-auto-slide').length > 0 && swiperAutoSlide)
940            {
941                swiperAutoSlide.update();
942            }
943
944            if ($('.swiper-auto-height-container').length > 0 && swiperAutoHieght)
945            {
946                swiperAutoHieght.update();
947            }
948
949            if ($('.swiper-multy-row-container').length > 0 && swiperMultyRow)
950            {
951                swiperMultyRow.update();
952            }
953
954            if ($('.swiper-blog').length > 0 && swiperBlog)
955            {
956                swiperBlog.update();
957            }
958
959            if ($('.swiper-presentation').length > 0 && swiperPresentation)
960            {
961                swiperPresentation.update();
962            }
963
964        }, 500);
965        if (isIE()) {
966            setTimeout(function () {
967                if ($('.swiper-full-screen').length > 0 && swiperFull)
968                {
969                    swiperFull.update();
970                }
971
972                if ($('.swiper-auto-fade').length > 0 && swiperAutoFade)
973                {
974                    swiperAutoFade.update();
975                }
976
977                if ($('.swiper-slider-second').length > 0 && swiperSecond)
978                {
979                    swiperSecond.update();
980                }
981
982                if ($('.swiper-slider-third').length > 0 && swiperThird)
983                {
984                    swiperThird.update();
985                }
986
987                if ($('.swiper-number-pagination').length > 0 && swiperNumber)
988                {
989                    swiperNumber.update();
990                }
991
992                if ($('.swiper-vertical-pagination').length > 0 && swiperVerticalPagination)
993                {
994                    swiperVerticalPagination.update();
995                }
996
997                if ($('.swiper-slider-clients').length > 0 && swiperClients)
998                {
999                    swiperClients.update();
1000                }
1001
1002                if ($('.swiper-slider-clients-second').length > 0 && swiperClients2)
1003                {
1004                    swiperClients2.update();
1005                }
1006
1007                if ($('.swiper-three-slides').length > 0 && swiperThreeSlides)
1008                {
1009                    swiperThreeSlides.update();
1010                }
1011
1012                if ($('.swiper-four-slides').length > 0 && swiperFourSlides)
1013                {
1014                    swiperFourSlides.update();
1015                }
1016
1017                if ($('.swiper-demo-header-style').length > 0 && swiperDemoHeaderStyle)
1018                {
1019                    swiperDemoHeaderStyle.update();
1020                }
1021
1022                if ($('.swiper-auto-slide').length > 0 && swiperAutoSlide)
1023                {
1024                    swiperAutoSlide.update();
1025                }
1026
1027                if ($('.swiper-auto-height-container').length > 0 && swiperAutoHieght)
1028                {
1029                    swiperAutoHieght.update();
1030                }
1031
1032                if ($('.swiper-multy-row-container').length > 0 && swiperMultyRow)
1033                {
1034                    swiperMultyRow.update();
1035                }
1036
1037                if ($('.swiper-blog').length > 0 && swiperBlog)
1038                {
1039                    swiperBlog.update();
1040                }
1041
1042                if ($('.swiper-presentation').length > 0 && swiperPresentation)
1043                {
1044                    swiperPresentation.update();
1045                }
1046
1047            }, 500);
1048        }
1049
1050    });
1051
1052    function doneResizing() {
1053        if (swiperBottomScrollbarFull) {
1054            swiperBottomScrollbarFull.detachEvents();
1055            swiperBottomScrollbarFull.destroy(true, true);
1056            swiperBottomScrollbarFull = undefined;
1057        }
1058
1059        $(".swiper-bottom-scrollbar-full .swiper-wrapper").css("transform", "").css("transition-duration", "");
1060        $(".swiper-bottom-scrollbar-full .swiper-slide").css("margin-right", "");
1061        $('.swiper-bottom-scrollbar-full .swiper-wrapper').removeAttr('style');
1062        $('.swiper-bottom-scrollbar-full .swiper-slide').removeAttr('style');
1063
1064        if ($(window).width() > 767) {
1065            setTimeout(function () {
1066                swiperBottomScrollbarFull = new Swiper('.swiper-bottom-scrollbar-full', {
1067                    allowTouchMove: true,
1068                    slidesPerView: 'auto',
1069                    grabCursor: true,
1070                    preventClicks: false,
1071                    spaceBetween: 30,
1072                    keyboardControl: true,
1073                    speed: 1000,
1074                    pagination: {
1075                        el: null
1076                    },
1077                    scrollbar: {
1078                        el: '.swiper-scrollbar',
1079                        draggable: true,
1080                        hide: false,
1081                        snapOnRelease: true
1082                    },
1083                    mousewheel: {
1084                        enable: true
1085                    },
1086                    keyboard: {
1087                        enabled: true
1088                    },
1089                    navigation: {
1090                        nextEl: '.swiper-button-next',
1091                        prevEl: '.swiper-button-prev'
1092                    }
1093                });
1094            }, 500);
1095        }
1096    }
1097
1098    /*==============================================================
1099     smooth scroll
1100     ==============================================================*/
1101
1102    var scrollAnimationTime = 1200, scrollAnimation = 'easeInOutExpo';
1103    $(document).on('click.smoothscroll', 'a.scrollto', function (event) {
1104        event.preventDefault();
1105        var target = this.hash;
1106        if ($(target).length != 0) {
1107            $('html, body').stop()
1108                    .animate({
1109                        'scrollTop': $(target)
1110                                .offset()
1111                                .top
1112                    }, scrollAnimationTime, scrollAnimation, function () {
1113                        window.location.hash = target;
1114                    });
1115        }
1116    });
1117
1118    /*==============================================================
1119     humburger menu one page navigation
1120     ==============================================================*/
1121
1122    if ($('.full-width-pull-menu').length > 0) {
1123        $(document).on('click', '.full-width-pull-menu .inner-link', function (e) {
1124            //$('body').removeClass('overflow-hidden position-fixed');
1125            $(".full-width-pull-menu .close-button-menu").trigger("click");
1126            var _this = $(this);
1127            setTimeout(function () {
1128                var target = _this.attr("href");
1129                if ($(target).length > 0) {
1130                    $('html, body').stop()
1131                            .animate({
1132                                'scrollTop': $(target).offset().top
1133                            });
1134                }
1135            }, 500);
1136        });
1137    }
1138
1139    // Inner links
1140    if ($('.navbar-top').length > 0 || $('.navbar-scroll-top').length > 0 || $('.navbar-top-scroll').length > 0) {
1141        $('.inner-link').smoothScroll({
1142            speed: 900,
1143            offset: 0
1144        });
1145    } else {
1146        $('.inner-link').smoothScroll({
1147            speed: 900,
1148            offset: -59
1149        });
1150    }
1151
1152    $('.section-link').smoothScroll({
1153        speed: 900,
1154        offset: 1
1155    });
1156
1157    /*==============================================================*/
1158    //PieChart For Onepage - START CODE
1159    /*==============================================================*/
1160    if ($('.chart1').length > 0) {
1161        $('.chart1').appear();
1162        $('.chart1').easyPieChart({
1163            barColor: '#929292',
1164            trackColor: '#d9d9d9',
1165            scaleColor: false,
1166            easing: 'easeOutBounce',
1167            scaleLength: 1,
1168            lineCap: 'round',
1169            lineWidth: 3, //12
1170            size: 150, //110
1171            animate: {
1172                duration: 2000,
1173                enabled: true
1174            },
1175            onStep: function (from, to, percent) {
1176                $(this.el).find('.percent').text(Math.round(percent));
1177            }
1178        });
1179        $(document.body).on('appear', '.chart1', function (e) {
1180            // this code is executed for each appeared element
1181            if (!$(this).hasClass('appear')) {
1182                $(this).addClass('appear');
1183                $(this).data('easyPieChart').update(0).update($(this).data('percent'));
1184            }
1185        });
1186    }
1187
1188    if ($('.chart2').length > 0) {
1189        $('.chart2').appear();
1190        $('.chart2').easyPieChart({
1191            easing: 'easeOutCirc',
1192            barColor: '#ff214f',
1193            trackColor: '#c7c7c7',
1194            scaleColor: false,
1195            scaleLength: 1,
1196            lineCap: 'round',
1197            lineWidth: 2, //12
1198            size: 120, //110
1199            animate: {
1200                duration: 2000,
1201                enabled: true
1202            },
1203            onStep: function (from, to, percent) {
1204                $(this.el).find('.percent').text(Math.round(percent));
1205            }
1206        });
1207        $(document.body).on('appear', '.chart2', function (e) {
1208            // this code is executed for each appeared element
1209            if (!$(this).hasClass('appear')) {
1210                $(this).addClass('appear');
1211                $(this).data('easyPieChart').update(0).update($(this).data('percent'));
1212            }
1213        });
1214    }
1215
1216    if ($('.chart3').length > 0) {
1217        $('.chart3').appear();
1218        $('.chart3').easyPieChart({
1219            easing: 'easeOutCirc',
1220            barColor: '#ff214f',
1221            trackColor: '',
1222            scaleColor: false,
1223            scaleLength: 1,
1224            lineCap: 'round',
1225            lineWidth: 3, //12
1226            size: 140, //110
1227            animate: {
1228                duration: 2000,
1229                enabled: true
1230            },
1231            onStep: function (from, to, percent) {
1232                $(this.el).find('.percent').text(Math.round(percent));
1233            }
1234        });
1235        $(document.body).on('appear', '.chart3', function (e) {
1236            // this code is executed for each appeared element
1237            if (!$(this).hasClass('appear')) {
1238                $(this).addClass('appear');
1239                $(this).data('easyPieChart').update(0).update($(this).data('percent'));
1240            }
1241        });
1242    }
1243
1244    /*==============================================================
1245     portfolio filter
1246     ==============================================================*/
1247    var $portfolio_filter = $('.portfolio-grid');
1248    $portfolio_filter.imagesLoaded(function () {
1249        $portfolio_filter.isotope({
1250            layoutMode: 'masonry',
1251            itemSelector: '.grid-item',
1252            percentPosition: true,
1253            masonry: {
1254                columnWidth: '.grid-sizer'
1255            }
1256        });
1257        $portfolio_filter.isotope();
1258    });
1259
1260    // Default filter selector start code
1261
1262    var $active_grid_selector = $('.portfolio-filter > li.active > a');
1263    var selector = $active_grid_selector.attr('data-filter');
1264    $portfolio_filter.find('.grid-item').removeClass('animated').css("visibility", ""); // avoid problem to filter after sorting
1265    $portfolio_filter.isotope({filter: selector});
1266
1267    // Default filter selector end code
1268
1269    var $grid_selectors = $('.portfolio-filter > li > a');
1270    $grid_selectors.on('click', function () {
1271        $grid_selectors.parent().removeClass('active');
1272        $(this).parent().addClass('active');
1273        var selector = $(this).attr('data-filter');
1274        $portfolio_filter.find('.grid-item').removeClass('animated').css("visibility", ""); // avoid problem to filter after sorting
1275        $portfolio_filter.find('.grid-item').each(function () {
1276            /* remove perticular element from WOW array when you don't want animation on element after DOM lead */
1277            wow.removeBox(this);
1278            $(this).css("-webkit-animation", "none");
1279            $(this).css("-moz-animation", "none");
1280            $(this).css("-ms-animation", "none");
1281            $(this).css("animation", "none");
1282        });
1283        $portfolio_filter.isotope({filter: selector});
1284        return false;
1285    });
1286    $(window).resize(function () {
1287        if (!isMobile && !isiPhoneiPad) {
1288            $portfolio_filter.imagesLoaded(function () {
1289                setTimeout(function () {
1290                    $portfolio_filter.find('.grid-item').removeClass('wow').removeClass('animated'); // avoid problem to filter after window resize
1291                    $portfolio_filter.isotope('layout');
1292                }, 300);
1293            });
1294        }
1295    });
1296    var $blog_filter = $('.blog-grid');
1297    $blog_filter.imagesLoaded(function () {
1298        $blog_filter.isotope({
1299            layoutMode: 'masonry',
1300            itemSelector: '.grid-item',
1301            percentPosition: true,
1302            masonry: {
1303                columnWidth: '.grid-sizer'
1304            }
1305        });
1306    });
1307    $(window).resize(function () {
1308        setTimeout(function () {
1309            $blog_filter.find('.grid-item').removeClass('wow').removeClass('animated'); // avoid problem to filter after window resize
1310            $blog_filter.isotope('layout');
1311        }, 300);
1312    });
1313
1314    /*==============================================================
1315     lightbox gallery
1316     ==============================================================*/
1317    $('.lightbox-gallery').magnificPopup({
1318        delegate: 'a',
1319        type: 'image',
1320        tLoading: 'Loading image #%curr%...',
1321        mainClass: 'mfp-fade',
1322        fixedContentPos: true,
1323        closeBtnInside: false,
1324        gallery: {
1325            enabled: true,
1326            navigateByImgClick: true,
1327            preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
1328        }
1329    });
1330    /* for group gallery */
1331    var lightboxgallerygroups = {};
1332    $('.lightbox-group-gallery-item').each(function () {
1333        var id = $(this).attr('data-group');
1334        if (!lightboxgallerygroups[id]) {
1335            lightboxgallerygroups[id] = [];
1336        }
1337        lightboxgallerygroups[id].push(this);
1338    });
1339    $.each(lightboxgallerygroups, function () {
1340        $(this).magnificPopup({
1341            type: 'image',
1342            closeOnContentClick: true,
1343            closeBtnInside: false,
1344            gallery: {enabled: true}
1345        });
1346    });
1347
1348    $('.lightbox-portfolio').magnificPopup({
1349        delegate: '.gallery-link',
1350        type: 'image',
1351        tLoading: 'Loading image #%curr%...',
1352        mainClass: 'mfp-fade',
1353        fixedContentPos: true,
1354        closeBtnInside: false,
1355        gallery: {
1356            enabled: true,
1357            navigateByImgClick: false,
1358            preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
1359        }
1360    });
1361    /*==============================================================
1362     single image lightbox - zoom animation
1363     ==============================================================*/
1364    $('.single-image-lightbox').magnificPopup({
1365        type: 'image',
1366        closeOnContentClick: true,
1367        fixedContentPos: true,
1368        closeBtnInside: false,
1369        mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
1370        image: {
1371            verticalFit: true
1372        },
1373        zoom: {
1374            enabled: true,
1375            duration: 300 // don't foget to change the duration also in CSS
1376        }
1377    });
1378    /*==============================================================
1379     zoom gallery
1380     ==============================================================*/
1381    $('.zoom-gallery').magnificPopup({
1382        delegate: 'a',
1383        type: 'image',
1384        mainClass: 'mfp-with-zoom mfp-img-mobile',
1385        fixedContentPos: true,
1386        closeBtnInside: false,
1387        image: {
1388            verticalFit: true,
1389            titleSrc: function (item) {
1390                return item.el.attr('title');
1391            }
1392        },
1393        gallery: {
1394            enabled: true
1395        },
1396        zoom: {
1397            enabled: true,
1398            duration: 300, // don't foget to change the duration also in CSS
1399            opener: function (element) {
1400                return element.find('img');
1401            }
1402        }
1403    });
1404    /*==============================================================*/
1405    //Modal popup - START CODE
1406    /*==============================================================*/
1407    $('.modal-popup').magnificPopup({
1408        type: 'inline',
1409        preloader: false,
1410        // modal: true,
1411        blackbg: true,
1412        callbacks: {
1413            open: function () {
1414                $('html').css('margin-right', 0);
1415            }
1416        }
1417    });
1418    $(document).on('click', '.popup-modal-dismiss', function (e) {
1419        e.preventDefault();
1420        $.magnificPopup.close();
1421    });
1422
1423    /*==============================================================*/
1424    //Modal popup - zoom animation - START CODE
1425    /*==============================================================*/
1426    $('.popup-with-zoom-anim').magnificPopup({
1427        type: 'inline',
1428        fixedContentPos: false,
1429        fixedBgPos: true,
1430        overflowY: 'auto',
1431        closeBtnInside: true,
1432        preloader: false,
1433        midClick: true,
1434        removalDelay: 300,
1435        blackbg: true,
1436        mainClass: 'my-mfp-zoom-in'
1437    });
1438
1439    $('.popup-with-move-anim').magnificPopup({
1440        type: 'inline',
1441        fixedContentPos: false,
1442        fixedBgPos: true,
1443        overflowY: 'auto',
1444        closeBtnInside: true,
1445        preloader: false,
1446        midClick: true,
1447        removalDelay: 300,
1448        blackbg: true,
1449        mainClass: 'my-mfp-slide-bottom'
1450    });
1451
1452    /*==============================================================
1453     popup with form
1454     ==============================================================*/
1455    $('.popup-with-form').magnificPopup({
1456        type: 'inline',
1457        preloader: false,
1458        closeBtnInside: false,
1459        fixedContentPos: true,
1460        focus: '#name',
1461        callbacks: {
1462            beforeOpen: function () {
1463                if ($(window).width() < 700) {
1464                    this.st.focus = false;
1465                } else {
1466                    this.st.focus = '#name';
1467                }
1468            }
1469        }
1470    });
1471    /*==============================================================
1472     video magnific popup
1473     ==============================================================*/
1474
1475    $('.popup-youtube, .popup-vimeo, .popup-googlemap').magnificPopup({
1476        disableOn: 700,
1477        type: 'iframe',
1478        mainClass: 'mfp-fade',
1479        removalDelay: 160,
1480        preloader: false,
1481        fixedContentPos: "auto",
1482        closeBtnInside: false
1483    });
1484    /*==============================================================
1485     ajax magnific popup for onepage portfolio
1486     ==============================================================*/
1487    $('.ajax-popup').magnificPopup({
1488        type: 'ajax',
1489        alignTop: true,
1490        fixedContentPos: true,
1491        overflowY: 'scroll', // as we know that popup content is tall we set scroll overflow by default to avoid jump
1492        callbacks: {
1493            open: function () {
1494                $('.navbar .collapse').removeClass('show');
1495                $('.navbar a.dropdown-toggle').addClass('collapsed');
1496            }
1497        }
1498    });
1499
1500    $('.open-popup-link').magnificPopup({
1501        type: 'inline',
1502        midClick: true,
1503        mainClass: 'mfp-fade',
1504        callbacks: {
1505        close: function(){
1506            $('video').trigger('pause');
1507        }
1508    }
1509    });
1510
1511    /*==============================================================
1512     mega menu width
1513     ===============================================================*/
1514    $("ul.mega-menu-full").each(function (idx, elm) {
1515        var megaMenuWidth = 0;
1516        $(this).children('li').each(function (idx, elm) {
1517            var LIheight = 0;
1518            megaMenuWidth += $(this).outerWidth();
1519        });
1520        $(this).width(megaMenuWidth + 95);
1521        megaMenuWidth = 0;
1522    });
1523    /*==============================================================
1524     fit videos
1525     ==============================================================*/
1526    $(".fit-videos").fitVids();
1527
1528    /*==============================================================
1529     form to email
1530     ==============================================================*/
1531    $("#success-subscribe-newsletter").hide();
1532    $("#success-subscribe-newsletter2").hide();
1533    $("#success-contact-form").hide();
1534    $("#success-project-contact-form").hide();
1535    $("#success-contact-form-2").hide();
1536    $("#success-contact-form-3").hide();
1537    $("#success-project-contact-form-4").hide();
1538
1539    //Subscribe newsletter form
1540    $(document).on("click", '#button-subscribe-newsletter', function () {
1541        var error = ValidationsubscribenewsletterForm();
1542        if (error) {
1543            $.ajax({
1544                type: "POST",
1545                url: "../html/email-templates/subscribe-newsletter.php",
1546                data: $("#subscribenewsletterform").serialize(),
1547                success: function (result) {
1548                    // Un-comment below code to redirect user to thank you page.
1549                    //window.location.href="thank-you.html";
1550
1551                    $('input[type=text],textarea').each(function () {
1552                        $(this).val('');
1553                    });
1554                    $("#success-subscribe-newsletter").html(result);
1555                    $("#success-subscribe-newsletter").fadeIn("slow");
1556                    $('#success-subscribe-newsletter').delay(4000).fadeOut("slow");
1557                }
1558            });
1559        }
1560    });
1561
1562    function ValidationsubscribenewsletterForm() {
1563        var error = true;
1564        $('#subscribenewsletterform input[type=text]').each(function (index) {
1565            if (index == 0) {
1566                if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) {
1567                    $("#subscribenewsletterform").find("input:eq(" + index + ")").addClass("required-error");
1568                    error = false;
1569                } else {
1570                    $("#subscribenewsletterform").find("input:eq(" + index + ")").removeClass("required-error");
1571                }
1572            }
1573
1574        });
1575        return error;
1576    }
1577
1578    $(document).on("click", '#button-subscribe-newsletter2', function () {
1579        var error = ValidationsubscribenewsletterForm2();
1580        if (error) {
1581            $.ajax({
1582                type: "POST",
1583                url: "../html/email-templates/subscribe-newsletter.php",
1584                data: $("#subscribenewsletterform2").serialize(),
1585                success: function (result) {
1586                    // Un-comment below code to redirect user to thank you page.
1587                    //window.location.href="thank-you.html";
1588
1589                    $('input[type=text],textarea').each(function () {
1590                        $(this).val('');
1591                    });
1592                    $("#success-subscribe-newsletter2").html(result);
1593                    $("#success-subscribe-newsletter2").fadeIn("slow");
1594                    $('#success-subscribe-newsletter2').delay(4000).fadeOut("slow");
1595
1596
1597                }
1598            });
1599        }
1600    });
1601
1602    function ValidationsubscribenewsletterForm2() {
1603        var error = true;
1604        $('#subscribenewsletterform2 input[type=text]').each(function (index) {
1605            if (index == 0) {
1606                if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) {
1607                    $("#subscribenewsletterform2").find("input:eq(" + index + ")").addClass("required-error");
1608                    error = false;
1609                } else {
1610                    $("#subscribenewsletterform2").find("input:eq(" + index + ")").removeClass("required-error");
1611                }
1612            }
1613        });
1614        return error;
1615    }
1616
1617    //Contact us form
1618    $(document).on("click", '#contact-us-button', function () {
1619        var error = ValidationContactForm();
1620        if (error) {
1621            $.ajax({
1622                type: "POST",
1623                url: "../html/email-templates/contact.php",
1624                data: $("#contact-form").serialize(),
1625                success: function (result) {
1626                    console.log(result);
1627                    // Un-comment below code to redirect user to thank you page.
1628                    //window.location.href="thank-you.html";
1629
1630                    $('input[type=text],textarea').each(function () {
1631                        $(this).val('');
1632                    });
1633                    $("#success-contact-form").html(result);
1634                    $("#success-contact-form").fadeIn("slow");
1635                    $('#success-contact-form').delay(4000).fadeOut("slow");
1636                }
1637            });
1638        }
1639    });
1640    function ValidationContactForm() {
1641        var error = true;
1642        $('#contact-form input[type=text]').each(function (index) {
1643            if (index == 0) {
1644                if ($(this).val() == null || $(this).val() == "") {
1645                    $("#contact-form").find("input:eq(" + index + ")").addClass("required-error");
1646                    error = false;
1647                } else {
1648                    $("#contact-form").find("input:eq(" + index + ")").removeClass("required-error");
1649                }
1650            } else if (index == 1) {
1651                if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) {
1652                    $("#contact-form").find("input:eq(" + index + ")").addClass("required-error");
1653                    error = false;
1654                } else {
1655                    $("#contact-form").find("input:eq(" + index + ")").removeClass("required-error");
1656                }
1657            }
1658
1659        });
1660        return error;
1661    }
1662
1663    //Contact us form 2
1664    $('#contact-us-button-2').on("click", function () {
1665        var error = ValidationContactForm2();
1666        if (error) {
1667            $.ajax({
1668                type: "POST",
1669                url: "email-templates/contact.php",
1670                data: $("#contact-form-2").serialize(),
1671                success: function (result) {
1672                    // Un-comment below code to redirect user to thank you page.
1673                    //window.location.href="thank-you.html";
1674
1675                    $('input[type=text],textarea').each(function () {
1676                        $(this).val('');
1677                    });
1678                    $("#success-contact-form-2").html(result);
1679                    $("#success-contact-form-2").fadeIn("slow");
1680                    $('#success-contact-form-2').delay(4000).fadeOut("slow");
1681                }
1682            });
1683        }
1684    });
1685    function ValidationContactForm2() {
1686        var error = true;
1687        $('#contact-form-2 input[type=text]').each(function (index) {
1688            if (index == 0) {
1689                if ($(this).val() == null || $(this).val() == "") {
1690                    $("#contact-form-2").find("input:eq(" + index + ")").addClass("required-error");
1691                    error = false;
1692                } else {
1693                    $("#contact-form-2").find("input:eq(" + index + ")").removeClass("required-error");
1694                }
1695            } else if (index == 1) {
1696                if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) {
1697                    $("#contact-form-2").find("input:eq(" + index + ")").addClass("required-error");
1698                    error = false;
1699                } else {
1700                    $("#contact-form-2").find("input:eq(" + index + ")").removeClass("required-error");
1701                }
1702            }
1703        });
1704        return error;
1705    }
1706
1707    //Contact us form 3
1708
1709    $(document).on("click", '#contact-us-button-3', function () {
1710        var error = ValidationContactForm3();
1711        if (error) {
1712            $.ajax({
1713                type: "POST",
1714                url: "email-templates/contact.php",
1715                data: $("#contact-form-3").serialize(),
1716                success: function (result) {
1717                    // Un-comment below code to redirect user to thank you page.
1718                    //window.location.href="thank-you.html";
1719                    $('input[type=text],textarea').each(function () {
1720                        $(this).val('');
1721                    });
1722                    $("#success-contact-form-3").html(result);
1723                    $("#success-contact-form-3").fadeIn("slow");
1724                    $('#success-contact-form-3').delay(4000).fadeOut("slow");
1725                }
1726            });
1727        }
1728    });
1729    function ValidationContactForm3() {
1730        var error = true;
1731        $('#contact-form-3 input[type=text]').each(function (index) {
1732            if (index == 0) {
1733                if ($(this).val() == null || $(this).val() == "") {
1734                    $("#contact-form-3").find("input:eq(" + index + ")").addClass("required-error");
1735                    error = false;
1736                } else {
1737                    $("#contact-form-3").find("input:eq(" + index + ")").removeClass("required-error");
1738                }
1739            } else if (index == 1) {
1740                if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) {
1741                    $("#contact-form-3").find("input:eq(" + index + ")").addClass("required-error");
1742                    error = false;
1743                } else {
1744                    $("#contact-form-3").find("input:eq(" + index + ")").removeClass("required-error");
1745                }
1746            }
1747
1748        });
1749        return error;
1750    }
1751
1752    //Project Contact us form
1753    $(document).on("click", '#project-contact-us-button', function (e) {
1754        e.preventDefault();
1755        var error = ValidationProjectContactForm();
1756        if (error) {
1757            $.ajax({
1758                type: "POST",
1759                url: "email-templates/project-contact.php",
1760                data: $("#project-contact-form").serialize(),
1761                success: function (result) {
1762                    // Un-comment below code to redirect user to thank you page.
1763                    //window.location.href="thank-you.html";
1764
1765                    $('input[type=text],textarea').each(function () {
1766                        $(this).val('');
1767                    });
1768                    $("#success-project-contact-form").html(result);
1769                    $("#success-project-contact-form").fadeIn("slow");
1770                    $('#success-project-contact-form').delay(4000).fadeOut("slow");
1771                }
1772            });
1773        }
1774    });
1775    function ValidationProjectContactForm() {
1776        var error = true;
1777        $('#project-contact-form input[type=text]').each(function (index) {
1778            if (index == 0) {
1779                if ($(this).val() == null || $(this).val() == "") {
1780                    $("#project-contact-form").find("input:eq(" + index + ")").addClass("required-error");
1781                    error = false;
1782                } else {
1783                    $("#project-contact-form").find("input:eq(" + index + ")").removeClass("required-error");
1784                }
1785            } else if (index == 2) {
1786                if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) {
1787                    $("#project-contact-form").find("input:eq(" + index + ")").addClass("required-error");
1788                    error = false;
1789                } else {
1790                    $("#project-contact-form").find("input:eq(" + index + ")").removeClass("required-error");
1791                }
1792            }
1793
1794        });
1795        return error;
1796    }
1797
1798    //Project Contact us form 2
1799    $(document).on("click", '#project-contact-us-4-button', function () {
1800        var error = ValidationProjectContactForm4();
1801        if (error) {
1802            $.ajax({
1803                type: "POST",
1804                url: "email-templates/project-contact.php",
1805                data: $("#project-contact-form-4").serialize(),
1806                success: function (result) {
1807                    // Un-comment below code to redirect user to thank you page.
1808                    //window.location.href="thank-you.html";
1809
1810                    $('input[type=text],textarea').each(function () {
1811                        $(this).val('');
1812                    });
1813                    $("#success-project-contact-form-4").html(result);
1814                    $("#success-project-contact-form-4").fadeIn("slow");
1815                    $('#success-project-contact-form-4').delay(4000).fadeOut("slow");
1816                }
1817            });
1818        }
1819    });
1820    function ValidationProjectContactForm4() {
1821        var error = true;
1822        $('#project-contact-form-4 input[type=text]').each(function (index) {
1823            if (index == 0) {
1824                if ($(this).val() == null || $(this).val() == "") {
1825                    $("#project-contact-form-4").find("input:eq(" + index + ")").addClass("required-error");
1826                    error = false;
1827                } else {
1828                    $("#project-contact-form-4").find("input:eq(" + index + ")").removeClass("required-error");
1829                }
1830            } else if (index == 2) {
1831                if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) {
1832                    $("#project-contact-form-4").find("input:eq(" + index + ")").addClass("required-error");
1833                    error = false;
1834                } else {
1835                    $("#project-contact-form-4").find("input:eq(" + index + ")").removeClass("required-error");
1836                }
1837            }
1838        });
1839        return error;
1840    }
1841
1842    /*==============================================================
1843     wow animation - on scroll
1844     ==============================================================*/
1845    var wow = new WOW({
1846        boxClass: 'wow',
1847        animateClass: 'animated',
1848        offset: 0,
1849        mobile: false,
1850        live: true
1851    });
1852    $(window).imagesLoaded(function () {
1853        wow.init();
1854    });
1855    /*==============================================================
1856     counter
1857     ==============================================================*/
1858    $(function ($) {
1859        animatecounters();
1860    });
1861    function animatecounters() {
1862        $('.timer').each(count);
1863        function count(options) {
1864            var $this = $(this);
1865            options = $.extend({}, options || {}, $this.data('countToOptions') || {});
1866            $this.countTo(options);
1867        }
1868    }
1869    /* ===================================
1870     counter number reset while scrolling
1871     ====================================== */
1872    $('.timer').appear();
1873    $(document.body).on('appear', '.timer', function (e) {
1874        // this code is executed for each appeared element
1875        if (!$(this).hasClass('appear')) {
1876            animatecounters();
1877            $(this).addClass('appear');
1878        }
1879    });
1880    $('.countdown').countdown($('.countdown').attr("data-enddate")).on('update.countdown', function (event) {
1881        $(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>'));
1882    });
1883
1884    /* ===================================
1885     left nav
1886     ====================================== */
1887    $(document).on('click', '.right-menu-button', function (e) {
1888        $('body').toggleClass('left-nav-on');
1889    });
1890
1891    /*==============================================================*/
1892    //    hamburger menu
1893    /*==============================================================*/
1894    $(document).on('click', '.btn-hamburger', function () {
1895        $('.hamburger-menu').toggleClass('show-menu');
1896        $('body').removeClass('show-menu');
1897    });
1898
1899    /*==============================================================*/
1900    //sidebar nav open
1901    /*==============================================================*/
1902    $(document).on('click', '#mobileToggleSidenav', function () {
1903        $(this).closest('nav').toggleClass('sidemenu-open');
1904    });
1905
1906    /*=================================
1907     //justified Gallery
1908     =================================*/
1909    $(document).imagesLoaded(function () {
1910        if ($(".justified-gallery").length > 0) {
1911            $(".justified-gallery").justifiedGallery({
1912                rowHeight: 400,
1913                maxRowHeight: false,
1914                captions: true,
1915                margins: 10,
1916                waitThumbnailsLoad: true
1917            });
1918        }
1919    });
1920
1921    $('.atr-nav').on("click", function () {
1922        $(".atr-div").append("<a class='close-cross' href='#'>X</a>");
1923        $(".atr-div").animate({
1924            width: "toggle"
1925        });
1926    });
1927
1928    $('.close-cross').on("click", function () {
1929        $(".atr-div").hide();
1930    });
1931
1932    var menuRight = document.getElementById('cbp-spmenu-s2'),
1933            showRightPush = document.getElementById('showRightPush'),
1934            body = document.body;
1935    if (showRightPush) {
1936        showRightPush.onclick = function () {
1937            classie.toggle(this, 'active');
1938            if (menuRight)
1939                classie.toggle(menuRight, 'cbp-spmenu-open');
1940        };
1941    }
1942
1943    var test = document.getElementById('close-pushmenu');
1944    if (test) {
1945        test.onclick = function () {
1946            classie.toggle(this, 'active');
1947            if (menuRight)
1948                classie.toggle(menuRight, 'cbp-spmenu-open');
1949        };
1950    }
1951
1952    //blog page header animation
1953    $(".blog-header-style1 li").hover(function () {
1954        $('.blog-header-style1 li.blog-column-active').removeClass('blog-column-active');
1955        $(this).addClass('blog-column-active');
1956    }, function () {
1957        $(this).removeClass('blog-column-active');
1958        $('.blog-header-style1 li:first-child').addClass('blog-column-active');
1959    });
1960
1961    /*==============================================================*/
1962    //big menu open close start
1963    /*==============================================================*/
1964    $('.big-menu-open').on("click", function () {
1965        $('.big-menu-right').addClass("open");
1966    });
1967
1968    $('.big-menu-close').on("click", function () {
1969        $('.big-menu-right').removeClass("open");
1970    });
1971
1972    /*==============================================================
1973     instagramfeed
1974     ==============================================================*/
1975    if ($('#instaFeed-style1').length != 0) {
1976
1977        var token = 'IGQVJVNWh1dnBlVkRkNzl4TjU5djIxT24yZAjNaOUxNU0tBZAklNcnlCUnF6eFBJUzFJS1dHNWdLMjRyNmFtZAzF0S05BMVFBTWZABYVVNN0Rvd19QbHNya19TODMtUC1uWXN2a0I2aVpTbWt4S0hvSEI5ZAgZDZD';
1978
1979        $.ajax({
1980            url: 'https://graph.instagram.com/me/media?fields=id,media_type,media_url,timestamp,permalink,comments_count,like_count&access_token=' 
1980+ token,
1981            type: 'GET',
1982            success: function( response ) {
1983
1984                var num_photos = 8; // how much photos do you want to get
1985
1986                for( var x in response.data ) {
1987                    if( x < num_photos ) {
1988                        if( response.data[x]['media_type'] == 'IMAGE' ) {
1989                            var link    = response.data[x]['permalink'],
1990                                image   = response.data[x]['media_url'],
1991                                likes   = response.data[x]['like_count'],
1992                                comments= response.data[x]['comments_count'],
1993                                html    = '';
1994
1995                            html += '<div class="col-lg-3 col-md-6 instafeed-style1">';
1996                                html += '<a class="insta-link" href="' + link + '" target="_blank">';
1997                                    html += '<img src="' + image + '" class="insta-image" />';
1998                                     html += '<div class="insta-counts">';
1999                                        if( ( likes != '' && likes != undefined ) || ( comments != '' && comments != undefined ) ) {
2000                                            if( likes != '' && likes != undefined ) {
2001                                                html += '<span><i class="ti-heart"></i> <span class="count-number">' + likes + '</span></span>';
2002                                            }
2003                                            if( comments != '' && comments != undefined ) {
2004                                                html += '<span><i class="ti-comment"></i> <span class="count-number">' + comments + '</span></span>';
2005                                            }
2006                                        } else {
2007                                            html += '<span class="mr-0"><i class="ti-instagram"></i></span>';
2008                                        }
2009                                    html += '</div>';
2010                                html += '</a>';
2011                            html += '</div>';
2012
2013                            $('#instaFeed-style1').append(html);
2014                        }
2015                    }
2016                }
2017            },
2018            error: function(data) {
2019
2020                var html = '<div class="col-12"><span class=text-center>No Images Found</span></div>';
2021                $('#instaFeed-style1').append(html);
2022            }
2023        });
2024    }
2025
2026    if ($('#instaFeed-aside').length != 0) {
2027
2028        var token = 'IGQVJVNWh1dnBlVkRkNzl4TjU5djIxT24yZAjNaOUxNU0tBZAklNcnlCUnF6eFBJUzFJS1dHNWdLMjRyNmFtZAzF0S05BMVFBTWZABYVVNN0Rvd19QbHNya19TODMtUC1uWXN2a0I2aVpTbWt4S0hvSEI5ZAgZDZD'; // learn how to obtain it below
2029
2030        $.ajax({
2031            url: 'https://graph.instagram.com/me/media?fields=id,media_type,media_url,timestamp,permalink,comments_count,like_count&access_token=' 
2031+ token,
2032            type: 'GET',
2033            success: function( response ) {
2034
2035                var num_photos = 6; // how much photos do you want to get
2036
2037                for( var x in response.data ) {
2038                    if( x < num_photos ) {
2039                        if( response.data[x]['media_type'] == 'IMAGE' ) {
2040                            var link    = response.data[x]['permalink'],
2041                                image   = response.data[x]['media_url'],
2042                                likes   = response.data[x]['like_count'],
2043                                comments= response.data[x]['comments_count'],
2044                                html    = '';
2045
2046                            html += '<li><figure>';
2047                                html += '<a href="' + link + '" target="_blank">';
2048                                    html += '<img src="' + image + '" class="insta-image" />';
2049                                    if( likes != '' && likes != undefined ) {
2050                                        html += '<span class="insta-counts">';
2051                                            html += '<i class="ti-heart"></i>' + likes;
2052                                        html += '</span>';
2053                                    } else {
2054                                        html += '<span class="insta-counts"><i class="ti-instagram"></i></span>';
2055                                    }
2056                                html += '</a>';
2057                            html += '</figure></li>';
2058
2059                            $('#instaFeed-aside').append(html);
2060                        }
2061                    }
2062                }
2063            },
2064            error: function(data) {
2065
2066                var html = '<div class="col-12"><span class=text-center>No Images Found</span></div>';
2067                $('#instaFeed-aside').append(html);
2068            }
2069        });
2070    }
2071
2072    if ($('#instaFeed-footer').length != 0) {
2073
2074        var token = 'IGQVJVNWh1dnBlVkRkNzl4TjU5djIxT24yZAjNaOUxNU0tBZAklNcnlCUnF6eFBJUzFJS1dHNWdLMjRyNmFtZAzF0S05BMVFBTWZABYVVNN0Rvd19QbHNya19TODMtUC1uWXN2a0I2aVpTbWt4S0hvSEI5ZAgZDZD'; // learn how to obtain it below
2075
2076        $.ajax({
2077            url: 'https://graph.instagram.com/me/media?fields=id,media_type,media_url,timestamp,permalink,comments_count,like_count&access_token=' 
2077+ token,
2078            type: 'GET',
2079            success: function( response ) {
2080
2081                var num_photos = 6; // how much photos do you want to get
2082
2083                for( var x in response.data ) {
2084                    if( x < num_photos ) {
2085                        if( response.data[x]['media_type'] == 'IMAGE' ) {
2086                            var link    = response.data[x]['permalink'],
2087                                image   = response.data[x]['media_url'],
2088                                likes   = response.data[x]['like_count'],
2089                                comments= response.data[x]['comments_count'],
2090                                html    = '';
2091
2092                            html += '<li><figure>';
2093                                html += '<a href="' + link + '" target="_blank">';
2094                                    html += '<img src="' + image + '" class="insta-image" />';
2095                                    if( likes != '' && likes != undefined ) {
2096                                        html += '<span class="insta-counts">';
2097                                            html += '<i class="ti-heart"></i><span>' + likes + '</span>';
2098                                        html += '</span>';
2099                                    } else {
2100                                        html += '<span class="insta-counts"><i class="ti-instagram"></i></span>';
2101                                    }
2102                                html += '</a>';
2103                            html += '</figure></li>';
2104
2105                            $('#instaFeed-footer').append(html);
2106                        }
2107                    }
2108                }
2109            },
2110            error: function(data) {
2111
2112                var html = '<div class="col-12"><span class=text-center>No Images Found</span></div>';
2113                $('#instaFeed-footer').append(html);
2114            }
2115        });
2116    }
2117
2118    /*==============================================================*/
2119    //revolution Start
2120    /*==============================================================*/
2121    /* ================================
2122     home-creative-studio
2123     ================================*/
2124    if ($("#rev_slider_151_1").revolution == undefined) {
2125        revslider_showDoubleJqueryError("#rev_slider_151_1");
2126    } else {
2127        var revapi = $("#rev_slider_151_1").show().revolution({
2128            sliderType: "standard",
2129            jsFileLocation: "revolution/js/",
2130            sliderLayout: "fullscreen",
2131            dottedOverlay: "none",
2132            delay: 9000,
2133            navigation: {
2134                keyboardNavigation: "off",
2135                keyboard_direction: "vertical",
2136                mouseScrollNavigation: "off",
2137                mouseScrollReverse: "default",
2138                onHoverStop: "off",
2139                touch: {
2140                    touchenabled: "on",
2141                    swipe_threshold: 75,
2142                    swipe_min_touches: 1,
2143                    swipe_direction: "horizontal",
2144                    drag_block_vertical: false
2145                },
2146                arrows: {
2147                    style: "uranus",
2148                    enable: true,
2149                    hide_onmobile: false,
2150                    hide_over: 479,
2151                    hide_onleave: false,
2152                    tmp: '',
2153                    left: {
2154                        h_align: "left",
2155                        v_align: "center",
2156                        h_offset: 0,
2157                        v_offset: 0
2158                    },
2159                    right: {
2160                        h_align: "right",
2161                        v_align: "center",
2162                        h_offset: 0,
2163                        v_offset: 0
2164                    }
2165                }
2166                // ,
2167                // bullets: {
2168                //     enable: true,
2169                //     style: 'hesperiden',
2170                //     tmp: '',
2171                //     direction: 'horizontal',
2172                //     rtl: false,
2173                //     container: 'slider',
2174                //     h_align: 'center',
2175                //     v_align: 'bottom',
2176                //     h_offset: 0,
2177                //     v_offset: 20,
2178                //     space: 5,
2179                //     hide_onleave: false,
2180                //     hide_onmobile: false,
2181                //     hide_under: 0,
2182                //     hide_over: 9999,
2183                //     hide_delay: 200,
2184                //     hide_delay_mobile: 1200
2185                // }
2186            },
2187            responsiveLevels: [1240, 1024, 778, 480],
2188            visibilityLevels: [1240, 1024, 778, 480],
2189            gridwidth: [1240, 1024, 778, 480],
2190            gridheight: [868, 768, 960, 720],
2191            lazyType: "none",
2192            scrolleffect: {
2193                blur: "on",
2194                maxblur: "20",
2195                on_slidebg: "on",
2196                direction: "top",
2197                multiplicator: "2",
2198                multiplicator_layers: "2",
2199                tilt: "10",
2200                disable_on_mobile: "off"
2201            },
2202            parallax: {
2203                type: "scroll",
2204                origo: "slidercenter",
2205                speed: 400,
2206                levels: [5, 10, 15, 20, 25, 30, 35, 40, 45, 46, 47, 48, 49, 50, 51, 55]
2207            },
2208            shadow: 0,
2209            spinner: "spinner3",
2210            stopLoop: "off",
2211            stopAfterLoops: -1,
2212            stopAtSlide: -1,
2213            shuffle: "off",
2214            autoHeight: "off",
2215            fullScreenAutoWidth: "off",
2216            fullScreenAlignForce: "off",
2217            fullScreenOffsetContainer: "",
2218            fullScreenOffset: "0px",
2219            hideThumbsOnMobile: "off",
2220            hideSliderAtLimit: 0,
2221            hideCaptionAtLimit: 0,
2222            hideAllCaptionAtLilmit: 0,
2223            debugMode: false,
2224            fallbacks: {
2225                simplifyAll: "off",
2226                nextSlideOnWindowFocus: "off",
2227                disableFocusListener: false
2228            }
2229        });
2230
2231        // event for when slide is changed
2232        revapi.on('revolution.slide.onchange', function(e, data) {
2233
2234            // slider changed
2235            var currentSlideNumber = data.slideIndex;
2236
2237            $('.tp-static-layer').removeClass('active');
2238
2239            $('.tp-static-layer-'+currentSlideNumber).addClass('active');
2240
2241        });
2242
2243    }
2244
2245    /* ================================
2246     home-classic-web-agency
2247     ================================*/
2248    if ($("#rev_slider_1174_1").revolution == undefined) {
2249        revslider_showDoubleJqueryError("#rev_slider_1174_1");
2250    } else {
2251        $("#rev_slider_1174_1").show().revolution({
2252            sliderType: "hero",
2253            jsFileLocation: "revolution/js/",
2254            sliderLayout: "fullscreen",
2255            dottedOverlay: "none",
2256            delay: 9000,
2257            navigation: {
2258            },
2259            responsiveLevels: [1240, 1024, 778, 480],
2260            visibilityLevels: [1240, 1024, 778, 480],
2261            gridwidth: [1240, 1024, 778, 480],
2262            gridheight: [868, 768, 960, 720],
2263            lazyType: "none",
2264            parallax: {
2265                type: "scroll",
2266                origo: "slidercenter",
2267                speed: 400,
2268                levels: [10, 15, 20, 25, 30, 35, 40, -10, -15, -20, -25, -30, -35, -40, -45, 55]
2269            },
2270            shadow: 0,
2271            spinner: "off",
2272            autoHeight: "off",
2273            fullScreenAutoWidth: "off",
2274            fullScreenAlignForce: "off",
2275            fullScreenOffsetContainer: "",
2276            disableProgressBar: "on",
2277            hideThumbsOnMobile: "off",
2278            hideSliderAtLimit: 0,
2279            hideCaptionAtLimit: 0,
2280            hideAllCaptionAtLilmit: 0,
2281            debugMode: false,
2282            fallbacks: {
2283                simplifyAll: "off",
2284                disableFocusListener: false
2285            }
2286        });
2287    }
2288
2289    /* ================================
2290     home-classic-corporate
2291     ================================*/
2292    if ($("#rev_slider_1078_1").revolution == undefined) {
2293        revslider_showDoubleJqueryError("#rev_slider_1078_1");
2294    } else {
2295        $("#rev_slider_1078_1").show().revolution({
2296            sliderType: "standard",
2297            jsFileLocation: "revolution/js/",
2298            sliderLayout: "fullscreen",
2299            dottedOverlay: "none",
2300            delay: 9000,
2301            navigation: {
2302                keyboardNavigation: "on",
2303                keyboard_direction: "horizontal",
2304                mouseScrollNavigation: "off",
2305                mouseScrollReverse: "default",
2306                onHoverStop: "off",
2307                touch: {
2308                    touchenabled: "on",
2309                    swipe_threshold: 75,
2310                    swipe_min_touches: 1,
2311                    swipe_direction: "horizontal",
2312                    drag_block_vertical: false
2313                }
2314                ,
2315                arrows: {
2316                    style: "zeus",
2317                    enable: true,
2318                    hide_onmobile: true,
2319                    hide_under: 600,
2320                    hide_onleave: true,
2321                    hide_delay: 200,
2322                    hide_delay_mobile: 1200,
2323                    tmp: '<div class="tp-title-wrap">  	<div class="tp-arr-imgholder"></div> </div>',
2324                    left: {
2325                        h_align: "left",
2326                        v_align: "center",
2327                        h_offset: 30,
2328                        v_offset: 0
2329                    },
2330                    right: {
2331                        h_align: "right",
2332                        v_align: "center",
2333                        h_offset: 30,
2334                        v_offset: 0
2335                    }
2336                }
2337                ,
2338                bullets: {
2339                    enable: true,
2340                    hide_onmobile: false,
2341                    hide_under: 300,
2342                    style: "hermes",
2343                    hide_onleave: false,
2344                    hide_delay: 200,
2345                    hide_delay_mobile: 1200,
2346                    direction: "horizontal",
2347                    h_align: "center",
2348                    v_align: "bottom",
2349                    h_offset: 0,
2350                    v_offset: 30,
2351                    space: 8,
2352                    tmp: '<span class="tp-bullet-img-wrap">  <span class="tp-bullet-image"></span></span><span class="tp-bullet-title">{{title}}</span>'
2353                }
2354            },
2355            viewPort: {
2356                enable: true,
2357                outof: "pause",
2358                visible_area: "80%",
2359                presize: false
2360            },
2361            responsiveLevels: [1240, 1024, 778, 480],
2362            visibilityLevels: [1240, 1024, 778, 480],
2363            gridwidth: [1240, 1024, 778, 480],
2364            gridheight: [600, 600, 500, 400],
2365            lazyType: "none",
2366            parallax: {
2367                type: "mouse",
2368                origo: "slidercenter",
2369                speed: 2000,
2370                levels: [2, 3, 4, 5, 6, 7, 12, 16, 10, 50, 46, 47, 48, 49, 50, 55]
2371            },
2372            shadow: 0,
2373            spinner: "off",
2374            stopLoop: "off",
2375            stopAfterLoops: -1,
2376            stopAtSlide: -1,
2377            shuffle: "off",
2378            autoHeight: "off",
2379            hideThumbsOnMobile: "off",
2380            hideSliderAtLimit: 0,
2381            hideCaptionAtLimit: 0,
2382            hideAllCaptionAtLilmit: 0,
2383            debugMode: false,
2384            fallbacks: {
2385                simplifyAll: "off",
2386                nextSlideOnWindowFocus: "off",
2387                disableFocusListener: false
2388            }
2389        });
2390    }
2391
2392    /* ================================
2393     home-creative-minimalist-portfolio
2394     ================================*/
2395
2396    if ($("#rev_slider_26_1").revolution == undefined) {
2397        revslider_showDoubleJqueryError("#rev_slider_26_1");
2398    } else {
2399        $("#rev_slider_26_1").show().revolution({
2400            sliderType: "standard",
2401            jsFileLocation: "revolution/js/",
2402            sliderLayout: "fullscreen",
2403            dottedOverlay: "none",
2404            delay: 9000,
2405            navigation: {
2406                keyboardNavigation: "on",
2407                keyboard_direction: "horizontal",
2408                mouseScrollNavigation: "off",
2409                mouseScrollReverse: "default",
2410                onHoverStop: "off",
2411                touch: {
2412                    touchenabled: "on",
2413                    touchOnDesktop: "on",
2414                    swipe_threshold: 75,
2415                    swipe_min_touches: 1,
2416                    swipe_direction: "horizontal",
2417                    drag_block_vertical: false
2418                }
2419                ,
2420                arrows: {
2421                    style: "uranus",
2422                    enable: false,
2423                    hide_onmobile: true,
2424                    hide_under: 778,
2425                    hide_onleave: false,
2426                    tmp: '',
2427                    left: {
2428                        h_align: "left",
2429                        v_align: "center",
2430                        h_offset: 15,
2431                        v_offset: 0
2432                    },
2433                    right: {
2434                        h_align: "right",
2435                        v_align: "center",
2436                        h_offset: 15,
2437                        v_offset: 0
2438                    }
2439                }
2440                ,
2441                bullets: {
2442                    enable: true,
2443                    hide_onmobile: false,
2444                    style: "hermes",
2445                    hide_onleave: false,
2446                    direction: "horizontal",
2447                    h_align: "center",
2448                    v_align: "bottom",
2449                    h_offset: 0,
2450                    v_offset: 30,
2451                    space: 6,
2452                    tmp: ''
2453                }
2454            },
2455            responsiveLevels: [1240, 1025, 778, 480],
2456            visibilityLevels: [1240, 1025, 778, 480],
2457            gridwidth: [1240, 1025, 778, 480],
2458            gridheight: [868, 768, 960, 720],
2459            lazyType: "none",
2460            parallax: {
2461                type: "scroll",
2462                origo: "slidercenter",
2463                speed: 2000,
2464                levels: [5, 10, 15, 20, 25, 30, 35, 40, 45, 46, 47, 48, 49, 50, 51, 55],
2465            },
2466            shadow: 0,
2467            spinner: "off",
2468            stopLoop: "off",
2469            stopAfterLoops: -1,
2470            stopAtSlide: -1,
2471            shuffle: "off",
2472            autoHeight: "off",
2473            fullScreenAutoWidth: "off",
2474            fullScreenAlignForce: "off",
2475            fullScreenOffsetContainer: "",
2476            fullScreenOffset: "0px",
2477            hideThumbsOnMobile: "off",
2478            hideSliderAtLimit: 0,
2479            hideCaptionAtLimit: 0,
2480            hideAllCaptionAtLilmit: 0,
2481            debugMode: false,
2482            fallbacks: {
2483                simplifyAll: "off",
2484                nextSlideOnWindowFocus: "off",
2485                disableFocusListener: false,
2486            }
2487        });
2488    }
2489
2490    /*==============================================================*/
2491    //magnificPopup Start
2492    /*==============================================================*/
2493    $('.header-search-form').magnificPopup({
2494        mainClass: 'mfp-fade',
2495        closeOnBgClick: true,
2496        preloader: false,
2497        // for white backgriund
2498        fixedContentPos: false,
2499        closeBtnInside: false,
2500        callbacks: {
2501            open: function () {
2502                setTimeout(function () {
2503                    $('.search-input').focus();
2504                }, 500);
2505                $('#search-header').parent().addClass('search-popup');
2506                if (!isMobile) {
2507                    $('body').addClass('overflow-hidden');
2508                    //$('body').addClass('position-fixed');
2509                    $('body').addClass('width-100');
2510                    document.onmousewheel = ScrollStop;
2511                } else {
2512                    $('body, html').on('touchmove', function (e) {
2513                        e.preventDefault();
2514                    });
2515                }
2516            },
2517            close: function () {
2518                if (!isMobile) {
2519                    $('body').removeClass('overflow-hidden');
2520                    //$('body').removeClass('position-fixed');
2521                    $('body').removeClass('width-100');
2522                    $('#search-header input[type=text]').each(function (index) {
2523                        if (index == 0) {
2524                            $(this).val('');
2525                            $("#search-header").find("input:eq(" + index + ")").css({"border": "none", "border-bottom": "2px solid rgba(255,255,255,0.5)"});
2526                        }
2527                    });
2528                    document.onmousewheel = ScrollStart;
2529                } else {
2530                    $('body, html').unbind('touchmove');
2531                }
2532            }
2533        }
2534    });
2535
2536    $("input.search-input").on("keypress", function (event) {
2537        if (event.which == 13 && !isMobile) {
2538            $("button.search-button").trigger("click");
2539            event.preventDefault();
2540        }
2541    });
2542
2543    $("input.search-input").on("keyup", function (event) {
2544        if ($(this).val() == null || $(this).val() == "") {
2545            $(this).css({"border": "none", "border-bottom": "2px solid red"});
2546        } else {
2547            $(this).css({"border": "none", "border-bottom": "2px solid rgba(255,255,255,0.5)"});
2548        }
2549    });
2550
2551    $("form.search-form, form.search-form-result").submit(function (event) {
2552        var error = validationSearchForm();
2553        if (error) {
2554            var action = $(this).attr('action');
2555            action = action == '#' || action == '' ? 'blog-grid-3columns.html' : action;
2556            action = action + '?' + $(this).serialize();
2557            window.location = action;
2558        }
2559
2560        event.preventDefault();
2561    });
2562
2563    $(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-toggle="tab"], a.shopping-cart', function (e) {
2564        e.preventDefault();
2565    });
2566
2567    $(document).on('touchstart click', 'body', function (e) {
2568        if ($(window).width() < 992) {
2569            if (!$('.navbar-collapse').has(e.target).is('.navbar-collapse') && $('.navbar-collapse').hasClass('show') && !$(e.target).hasClass('navbar-toggle')) {
2570                $('.navbar-collapse').collapse('hide');
2571            }
2572        } else {
2573            if (!$('.navbar-collapse').has(e.target).is('.navbar-collapse') && $('.navbar-collapse').hasClass('show')) {
2574                $('.navbar-collapse').find('a.dropdown-toggle').addClass('collapsed');
2575                $('.navbar-collapse').find('ul.dropdown-menu').removeClass('show');
2576                $('.navbar-collapse a.dropdown-toggle').removeClass('active');
2577            }
2578        }
2579    });
2580
2581    $('.navbar-collapse a.dropdown-toggle').on('touchstart', function (e) {
2582        $('.navbar-collapse a.dropdown-toggle').not(this).removeClass('active');
2583        if ($(this).hasClass('active'))
2584            $(this).removeClass('active');
2585        else
2586            $(this).addClass('active');
2587    });
2588
2589    $('button.navbar-toggle').on("click", function (e) {
2590        if (isMobile) {
2591            $(".cart-content").css('opacity', '0');
2592            $(".cart-content").css('visibility', 'hidden');
2593        }
2594    });
2595
2596    $('a.dropdown-toggle').on("click", function (e) {
2597        if (isMobile) {
2598            $(".cart-content").css('opacity', '0');
2599            $(".cart-content").css('visibility', 'hidden');
2600        }
2601    });
2602
2603    $(document).on('touchstart click', '.navbar-collapse [data-toggle="dropdown"]', function (event) {
2604
2605        var $innerLinkLI = $(this).parents('ul.navbar-nav').find('li.dropdown a.inner
2605-link').parent('li.dropdown');
2606        if (!$(this).hasClass('inner-link') && !$(this).hasClass('dropdown-toggle') && $innerLinkLI.hasClass('show')) {
2607            $innerLinkLI.removeClass('show');
2608        }
2609        var target = $(this).attr('target');
2610        if ($(window).width() <= 991 && $(this).attr('href') && $(this).attr('href').indexOf("#") <= -1 && !$(event.target).is('i')) {
2611            if (event.ctrlKey || event.metaKey) {
2612                window.open($(this).attr('href'), "_blank");
2613                return false;
2614            } else if (!target)
2615                window.location = $(this).attr('href');
2616            else
2617                window.open($(this).attr('href'), target);
2618
2619        } else if ($(window).width() > 991 && $(this).attr('href').indexOf("#") <= -1) {
2620            if (event.ctrlKey || event.metaKey) {
2621                window.open($(this).attr('href'), "_blank");
2622                return false;
2623            } else if (!target)
2624                window.location = $(this).attr('href');
2625            else
2626                window.open($(this).attr('href'), target);
2627
2628        } else if ($(window).width() <= 991 && $(this).attr('href') && $(this).attr('href').length > 1 && $(this).attr('href').indexOf("#") >= 0 && $(this).hasClass('inner-link')) {
2629            $(this).parents('ul.navbar-nav').find('li.dropdown').not($(this).parent('.dropdown')).removeClass('show');
2630            if ($(this).parent('.dropdown').hasClass('show')) {
2631                $(this).parent('.dropdown').removeClass('show');
2632            } else {
2633                $(this).parent('.dropdown').addClass('show');
2634            }
2635            $(this).toggleClass('active');
2636        }
2637    });
2638
2639    /* ===================================
2640     skillbar
2641     ====================================== */
2642    $('.skillbar').appear();
2643    $('.skillbar').skillBars({
2644        from: 0,
2645        speed: 4000,
2646        interval: 100,
2647        decimals: 0
2648    });
2649
2650    $(document.body).on('appear', '.skillbar', function (e) {
2651        // this code is executed for each appeared element
2652        if (!$(this).hasClass('appear')) {
2653            $(this).addClass('appear');
2654            $(this).find('.skillbar-bar').css("width", "0%");
2655            $(this).skillBars({
2656                from: 0,
2657                speed: 4000,
2658                interval: 100,
2659                decimals: 0
2660            });
2661        }
2662    });
2663
2664    /*==============================================================*/
2665    //Set Resize Header Menu - START CODE
2666    /*==============================================================*/
2667    $('nav.full-width-pull-menu ul.panel-group li.dropdown a.dropdown-toggle').on("click", function (e) {
2668        if ($(this).parent('li').find('ul.dropdown-menu').length > 0) {
2669            if ($(this).parent('li').hasClass('show')) {
2670                $(this).parent('li').removeClass('show');
2671            } else {
2672                $(this).parent('li').addClass('show');
2673            }
2674        }
2675    });
2676
2677    /*==============================================================*/
2678    //accordion  - START CODE
2679    /*==============================================================*/
2680    $('.accordion-style1 .collapse').on('show.bs.collapse', function () {
2681        var id = $(this).attr('id');
2682        $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion');
2683        $('a[href="#' + id + '"] .panel-title span').html('<i class="ti-minus"></i>');
2684    });
2685
2686    $('.accordion-style1 .collapse').on('hide.bs.collapse', function () {
2687        var id = $(this).attr('id');
2688        $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion');
2689        $('a[href="#' + id + '"] .panel-title span').html('<i class="ti-plus"></i>');
2690    });
2691
2692    $(document).on('click', '.nav.navbar-nav a.inner-link', function (e) {
2693        $(this).parents('ul.navbar-nav').find('a.inner-link').removeClass('active');
2694        var $this = $(this);
2695        $(this).parents('.navbar-collapse').collapse('hide');
2696
2697        setTimeout(function () {
2698            $this.addClass('active');
2699        }, 1000);
2700    });
2701
2702    $('.accordion-style2 .collapse').on('show.bs.collapse', function () {
2703        var id = $(this).attr('id');
2704        $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion');
2705        $('a[href="#' + id + '"] .panel-title').find('i').addClass('fa-angle-up').removeClass('fa-angle-down');
2706    });
2707
2708    $('.accordion-style2 .collapse').on('hide.bs.collapse', function () {
2709        var id = $(this).attr('id');
2710        $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion');
2711        $('a[href="#' + id + '"] .panel-title').find('i').removeClass('fa-angle-up').addClass('fa-angle-down');
2712    });
2713
2714    $('.accordion-style3 .collapse').on('show.bs.collapse', function () {
2715        var id = $(this).attr('id');
2716        $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion');
2717        $('a[href="#' + id + '"] .panel-title').find('i').addClass('fa-angle-up').removeClass('fa-angle-down');
2718    });
2719
2720    $('.accordion-style3 .collapse').on('hide.bs.collapse', function () {
2721        var id = $(this).attr('id');
2722        $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion');
2723        $('a[href="#' + id + '"] .panel-title').find('i').removeClass('fa-angle-up').addClass('fa-angle-down');
2724    });
2725
2726    /*==============================================================*/
2727    //toggles  - START CODE
2728    /*==============================================================*/
2729    $('.toggles .collapse').on('show.bs.collapse', function () {
2730        var id = $(this).attr('id');
2731        $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion');
2732        $('a[href="#' + id + '"] .panel-title span').html('<i class="ti-minus"></i>');
2733    });
2734
2735    $('.toggles .collapse').on('hide.bs.collapse', function () {
2736        var id = $(this).attr('id');
2737        $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion');
2738        $('a[href="#' + id + '"] .panel-title span').html('<i class="ti-plus"></i>');
2739    });
2740
2741    $('.toggles-style2 .collapse').on('show.bs.collapse', function () {
2742        var id = $(this).attr('id');
2743        $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion');
2744        $('a[href="#' + id + '"] .panel-title span').html('<i class="fa fa-angle-up"></i>');
2745    });
2746
2747    $('.toggles-style2 .collapse').on('hide.bs.collapse', function () {
2748        var id = $(this).attr('id');
2749        $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion');
2750        $('a[href="#' + id + '"] .panel-title span').html('<i class="fas fa-angle-down"></i>');
2751    });
2752
2753    /* ===================================
2754     blog hover box
2755     ====================================== */
2756    $(document).on("mouseenter", ".blog-post-style4 .grid-item", function (e) {
2757        $(this).find("figcaption .blog-hover-text").slideDown(300);
2758    });
2759    $(document).on("mouseleave", ".blog-post-style4 .grid-item", function (e) {
2760        $(this).find("figcaption .blog-hover-text").slideUp(300);
2761    });
2762    SetResizeContent();
2763
2764    var $allNonRatinaImages = $("img:not([data-rjs])");
2765    $allNonRatinaImages.attr('data-no-retina', '');
2766
2767    /*==============================================================*/
2768    //demo button  - START CODE
2769    /*==============================================================*/
2770    /*var $buythemediv = '<div class="buy-theme alt-font md-display-none">
2770<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 md-display-none"><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>';
2771    $('body').append($buythemediv);*/
2772
2773    $(document).on("touchstart", ".sidebar-wrapper", function () {
2774        clearOpen();
2775    });
2776
2777    var getNav = $("nav.navbar.bootsnav"), getIn = getNav.find("ul.nav").data("in"), getOut = getNav.find("ul.nav").data("out");
2778    function clearOpen() {
2779        $('li.dropdown').removeClass("on").removeClass("show");
2780        $(".dropdown-menu").stop().fadeOut('fast');
2781        $(".dropdown-menu").removeClass(getIn);
2782        $(".dropdown-menu").addClass(getOut);
2783    }
2784
2785});
2786/* ===================================
2787 END READY
2788 ====================================== */
2789
2790/* ===================================
2791 START Page Load
2792 ====================================== */
2793$(document).on('load', function () {
2794    var hash = window.location.hash.substr(1);
2795    if (hash != "") {
2796        setTimeout(function () {
2797            $(document).imagesLoaded(function () {
2798                var scrollAnimationTime = 1200,
2799                        scrollAnimation = 'easeInOutExpo';
2800                var target = '#' + hash;
2801                if ($(target).length > 0) {
2802
2803                    $('html, body').stop()
2804                            .animate({
2805                                'scrollTop': $(target).offset().top
2806                            }, scrollAnimationTime, scrollAnimation, function () {
2807                                window.location.hash = target;
2808                            });
2809                }
2810            });
2811        }, 500);
2812    }
2813
2814    fullScreenHeight();
2815});

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.