PageSourceSearch

https://www.eumed.net/assets/custom/js/main.js

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

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.