PageSourceSearch

https://wadebridgemuseum.co.uk/js/all.js

js wadebridgemuseum.co.uk collected 2026-10-02 20:22:38 UTC 50,259 bytes, 1,599 lines download raw bytes

1(function($){
2    "use strict"; // Start of use strict
3    
4    
5    /* ---------------------------------------------
6     Scripts initialization
7     --------------------------------------------- */
8    
9    $(window).load(function(){
10        
11        // Page loader
12        
13        $("body").imagesLoaded(function(){
14            $(".page-loader div").fadeOut();
15            $(".page-loader").delay(200).fadeOut("slow");
16        });
17        
18        
19        initWorkFilter();
20        init_scroll_navigate();
21        
22        $(window).trigger("scroll");
23        $(window).trigger("resize");
24        
25        // Hash menu forwarding
26        if ((window.location.hash) && ($(window.location.hash).length)){
27            var hash_offset = $(window.location.hash).offset().top;
28            $("html, body").animate({
29                scrollTop: hash_offset
30            });
31        }
32        
33    });
34    
35    $(document).ready(function(){
36        
37        $(window).trigger("resize");            
38        init_classic_menu();
39        init_fullscreen_menu();
40        init_side_panel();
41        init_lightbox();
42        init_parallax();
43        init_shortcodes();
44        init_tooltips();
45        init_counters();
46        init_team();
47        initPageSliders();
48        init_map();
49        init_wow();
50        init_masonry();
51    });
52    
53    $(window).resize(function(){
54        
55        init_classic_menu_resize();
56        init_side_panel_resize()
57        js_height_init();
58        split_height_init();
59        
60    });
61    
62    
63    /* --------------------------------------------
64     Platform detect
65     --------------------------------------------- */
66    var mobileTest;
67    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
68        mobileTest = true;
69        $("html").addClass("mobile");
70    }
71    else {
72        mobileTest = false;
73        $("html").addClass("no-mobile");
74    }
75    
76    var mozillaTest;
77    if (/mozilla/.test(navigator.userAgent)) {
78        mozillaTest = true;
79    }
80    else {
81        mozillaTest = false;
82    }
83    var safariTest;
84    if (/safari/.test(navigator.userAgent)) {
85        safariTest = true;
86    }
87    else {
88        safariTest = false;
89    }
90    
91    // Detect touch devices    
92    if (!("ontouchstart" in document.documentElement)) {
93        document.documentElement.className += " no-touch";
94    }
95    
96    
97    /* ---------------------------------------------
98     Sections helpers
99     --------------------------------------------- */
100    
101    // Sections backgrounds
102    
103    var pageSection = $(".home-section, .page-section, .small-section, .split-section");
104    pageSection.each(function(indx){
105        
106        if ($(this).attr("data-background")){
107            $(this).css("background-image", "url(" + $(this).data("background") + ")");
108        }
109    });
110    
111    // Function for block height 100%
112    function height_line(height_object, height_donor){
113        height_object.height(height_donor.height());
114        height_object.css({
115            "line-height": height_donor.height() + "px"
116        });
117    }
118    
119    // Function equal height
120    !function(a){
121        a.fn.equalHeights = function(){
122            var b = 0, c = a(this);
123            return c.each(function(){
124                var c = a(this).innerHeight();
125                c > b && (b = c)
126            }), c.css("height", b)
127        }, a("[data-equal]").each(function(){
128            var b = a(this), c = b.data("equal");
129            b.find(c).equalHeights()
130        })
131    }(jQuery);
132    
133    
134    // Progress bars
135    var progressBar = $(".progress-bar");
136    progressBar.each(function(indx){
137        $(this).css("width", $(this).attr("aria-valuenow") + "%");
138    });
139    
140    
141
142    /* ---------------------------------------------
143     Nav panel classic
144     --------------------------------------------- */
145    
146    var mobile_nav = $(".mobile-nav");
147    var desktop_nav = $(".desktop-nav");
148    
149    function init_classic_menu_resize(){
150        
151        // Mobile menu max height
152        $(".mobile-on .desktop-nav > ul").css("max-height", $(window).height() - $(".main-nav").height() - 20 + "px");
153        
154        // Mobile menu style toggle
155        if ($(window).width() <= 1024) {
156            $(".main-nav").addClass("mobile-on");
157        }
158        else 
159            if ($(window).width() > 1024) {
160                $(".main-nav").removeClass("mobile-on");
161                desktop_nav.show();
162            }
163    }
164    
165    function init_classic_menu(){
166    
167        
168        // Navbar sticky
169        
170        $(".js-stick").sticky({
171            topSpacing: 0
172        });
173        
174        
175        height_line($(".inner-nav > ul > li > a"), $(".main-nav"));
176        height_line(mobile_nav, $(".main-nav"));
177        
178        mobile_nav.css({
179            "width": $(".main-nav").height() + "px"
180        });
181        
182        // Transpaner menu
183        
184        if ($(".main-nav").hasClass("transparent")){
185           $(".main-nav").addClass("js-transparent"); 
186        }
187        
188        $(window).scroll(function(){        
189            
190            if ($(window).scrollTop() > 10) {
191                $(".js-transparent").removeClass("transparent");
192                $(".main-nav, .nav-logo-wrap .logo, .mobile-nav").addClass("small-height");
193            }
194            else {
195                $(".js-transparent").addClass("transparent");
196                $(".main-nav, .nav-logo-wrap .logo, .mobile-nav").removeClass("small-height");
197            }
198            
199            
200        });
201        
202        // Mobile menu toggle
203        
204        mobile_nav.click(function(){
205        
206            if (desktop_nav.hasClass("js-opened")) {
207                desktop_nav.slideUp("slow", "easeOutExpo").removeClass("js-opened");
208                $(this).removeClass("active");
209            }
210            else {
211                desktop_nav.slideDown("slow", "easeOutQuart").addClass("js-opened");
212                $(this).addClass("active");
213                
214                // Fix for responsive menu
215                if ($(".main-nav").hasClass("not-top")){
216                    $(window).scrollTo(".main-nav", "slow"); 
217                }
218                
219            }
220            
221        });
222        
223        desktop_nav.find("a:not(.mn-has-sub)").click(function(){
224            if (mobile_nav.hasClass("active")) {
225                desktop_nav.slideUp("slow", "easeOutExpo").removeClass("js-opened");
226                mobile_nav.removeClass("active");
227            }
228        });
229        
230        
231        // Sub menu
232        
233        var mnHasSub = $(".mn-has-sub");
234        var mnThisLi;
235        
236        $(".mobile-on .mn-has-sub").find(".fa:first").removeClass("fa-angle-right").addClass("fa-angle-down");
237        
238        mnHasSub.click(function(){
239        
240            if ($(".main-nav").hasClass("mobile-on")) {
241                mnThisLi = $(this).parent("li:first");
242                if (mnThisLi.hasClass("js-opened")) {
243                    mnThisLi.find(".mn-sub:first").slideUp(function(){
244                        mnThisLi.removeClass("js-opened");
245                        mnThisLi.find(".mn-has-sub").find(".fa:first").removeClass("fa-angle-up").addClass("fa-angle-down");
246                    });
247                }
248                else {
249                    $(this).find(".fa:first").removeClass("fa-angle-down").addClass("fa-angle-up");
250                    mnThisLi.addClass("js-opened");
251                    mnThisLi.find(".mn-sub:first").slideDown();
252                }
253                
254                return false;
255            }
256            else {
257                
258            }
259            
260        });
261        
262        mnThisLi = mnHasSub.parent("li");
263        mnThisLi.hover(function(){
264        
265            if (!($(".main-nav").hasClass("mobile-on"))) {
266            
267                $(this).find(".mn-sub:first").stop(true, true).fadeIn("fast");
268            }
269            
270        }, function(){
271        
272            if (!($(".main-nav").hasClass("mobile-on"))) {
273            
274                $(this).find(".mn-sub:first").stop(true, true).delay(100).fadeOut("fast");
275            }
276            
277        });
278        
279        /* Keyboard navigation for main menu */
280        
281        $(".inner-nav a").focus(function(){
282            if (!($(".main-nav").hasClass("mobile-on"))) {
283                $(this).parent("li").parent().children().find(".mn-sub:first").stop(true, true).delay(100).fadeOut("fast");
284            }
285        });
286     
287        $(".inner-nav a").first().keydown(function(e){
288            if (!($(".main-nav").hasClass("mobile-on"))) {
289                if (e.shiftKey && e.keyCode == 9) {
290                    $(this).parent("li").find(".mn-sub:first").stop(true, true).delay(100).fadeOut("fast");
291                }
292            }
293        });
294        
295        $(".mn-sub li:last a").keydown(function(e){
296            if (!($(".main-nav").hasClass("mobile-on"))) {
297                if (!e.shiftKey && e.keyCode == 9) {
298                    $(this).parent("li").parent().stop(true, true).delay(100).fadeOut("fast");
299                }
300            }
301        });
302
303        $(document).keydown(function(e){
304            if (!($(".main-nav").hasClass("mobile-on"))) {
305                if (e.keyCode == 27) {
306                    if (mnHasSub.parent("li").find(".mn-sub:first li .mn-sub").is(":visible")){
307                        mnHasSub.parent("li").find(".mn-sub:first li .mn-sub").stop(true, true).delay(100).fadeOut("fast");
308                    } else{
309                        mnHasSub.parent("li").find(".mn-sub:first").stop(true, true).delay(100).fadeOut("fast");
310                    }
311                    
312                }
313            }
314        });
315        
316        mnHasSub.focus(function(){
317            if (!($(".main-nav").hasClass("mobile-on"))) {                
318                $(this).parent("li").find(".mn-sub:first").stop(true, true).fadeIn("fast");
319            }
320        });
321        
322    }
323    
324    
325    
326    /* ---------------------------------------------
327     Scroll navigation
328     --------------------------------------------- */
329    
330    function init_scroll_navigate(){
331        
332        $(".local-scroll").localScroll({
333            target: "body",
334            duration: 1500,
335            offset: 0,
336            easing: "easeInOutExpo",
337            onAfter: function(anchor, settings){
338                anchor.focus();
339                if (anchor.is(":focus")) {
340                    return !1;
341                }
342                else {
343                    anchor.attr('tabindex', '-1');
344                    anchor.focus()
345                }        
346            }
347        });
348        
349        var sections = $(".home-section, .split-section, .page-section");
350        var menu_links = $(".scroll-nav li a");
351        
352        $(window).scroll(function(){
353        
354            sections.filter(":in-viewport:first").each(function(){
355                var active_section = $(this);
356                var active_link = $('.scroll-nav li a[href="#' + active_section.attr("id") + '"]');
357                menu_links.removeClass("active");
358                active_link.addClass("active");
359            });
360            
361        });
362        
363    }
364    
365    
366    
367    /* ---------------------------------------------
368     Lightboxes
369     --------------------------------------------- */
370    
371    function init_lightbox(){
372    
373        // Works Item Lightbox				
374        $(".work-lightbox-link").magnificPopup({
375            gallery: {
376                enabled: true
377            },
378            mainClass: "mfp-fade"
379        });
380        
381        // Works Item Lightbox	
382        $(".lightbox-gallery-1").magnificPopup({
383            gallery: {
384                enabled: true
385            }
386        });
387        
388        // Other Custom Lightbox
389        $(".lightbox-gallery-2").magnificPopup({
390            gallery: {
391                enabled: true
392            }
393        });
394        $(".lightbox-gallery-3").magnificPopup({
395            gallery: {
396                enabled: true
397            }
398        });
399        $(".lightbox").magnificPopup();
400        
401    }
402    
403    
404    
405    /* -------------------------------------------
406     Parallax
407     --------------------------------------------- */
408    
409    function init_parallax(){
410    
411        // Parallax        
412        if (($(window).width() >= 1024) && (mobileTest == false) && $("html").hasClass("no-touch")) {
413            $(".parallax-1").parallax("50%", 0.1);
414            $(".parallax-2").parallax("50%", 0.2);
415            $(".parallax-3").parallax("50%", 0.3);
416            $(".parallax-4").parallax("50%", 0.4);
417            $(".parallax-5").parallax("50%", 0.5);
418            $(".parallax-6").parallax("50%", 0.6);
419            $(".parallax-7").parallax("50%", 0.7);
420            $(".parallax-8").parallax("50%", 0.5);
421            $(".parallax-9").parallax("50%", 0.5);
422            $(".parallax-10").parallax("50%", 0.5);
423            $(".parallax-11").parallax("50%", 0.05);
424        }
425        
426    }
427    
428    
429    
430    /* ---------------------------------------------
431     Shortcodes
432     --------------------------------------------- */
433    // Tabs minimal	
434    function init_shortcodes(){
435    
436        var tpl_tab_height;
437        $(".tpl-minimal-tabs > li > a").click(function(){
438        
439            if (!($(this).parent("li").hasClass("active"))) {
440                tpl_tab_height = $(".tpl-minimal-tabs-cont > .tab-pane").filter($(this).attr("href")).height();
441                $(".tpl-minimal-tabs-cont").animate({
442                    height: tpl_tab_height
443                }, function(){
444                    $(".tpl-minimal-tabs-cont").css("height", "auto");
445                });
446                
447            }
448            
449        });
450        
451        // Accordion        
452        $(".accordion").each(function(){
453            var allPanels = $(this).children("dd").hide();
454            $(this).children("dd").first().slideDown("easeOutExpo");
455            $(this).children("dt").children("a").first().addClass("active");
456                        
457            $(this).children("dt").children("a").click(function(){        
458                var current = $(this).parent().next("dd");
459                $(".accordion > dt > a").removeClass("active");
460                $(this).addClass("active");
461                allPanels.not(current).slideUp("easeInExpo");
462                $(this).parent().next().slideDown("easeOutExpo");                
463                return false;                
464            });
465            
466         });
467        
468        
469        
470        // Toggle
471        var allToggles = $(".toggle > dd").hide();
472        
473        $(".toggle > dt > a").click(function(){
474        
475            if ($(this).hasClass("active")) {
476            
477                $(this).parent().next().slideUp("easeOutExpo");
478                $(this).removeClass("active");
479                
480            }
481            else {
482                var current = $(this).parent().next("dd");
483                $(this).addClass("active");
484                $(this).parent().next().slideDown("easeOutExpo");
485            }
486            
487            return false;
488        });
489        
490        // Responsive video
491        $(".video, .resp-media, .blog-media").fitVids();
492        $(".work-full-media").fitVids(); 
493               
494    }
495    
496    
497    
498    /* ---------------------------------------------
499     Tooltips (bootstrap plugin activated)
500     --------------------------------------------- */
501    
502    function init_tooltips(){
503    
504        $(".tooltip-bot, .tooltip-bot a, .nav-social-links a").tooltip({
505            placement: "bottom"
506        });
507        
508        $(".tooltip-top, .tooltip-top a").tooltip({
509            placement: "top"
510        });
511        
512    }
513    
514    
515    
516    /* ---------------------------------------------
517     Some facts section
518     --------------------------------------------- */
519    
520     function init_counters(){
521        $(".count-number").appear(function(){
522            var count = $(this);
523            count.countTo({
524                from: 0,
525                to: count.html(),
526                speed: 1300,
527                refreshInterval: 60,
528            });
529            
530        });
531    }
532    
533    
534    
535    
536    /* ---------------------------------------------
537     Team
538     --------------------------------------------- */   
539     
540    function init_team(){
541    
542        // Hover        
543        $(".team-item").click(function(){
544            if ($("html").hasClass("mobile")) {
545                $(this).toggleClass("js-active");
546            }
547        });
548        
549        // Keayboar navigation for team section        
550        $(".team-social-links > a").on("focus blur", function(){
551             if (!($("html").hasClass("mobile"))) {
552                 $(this).parent().parent().parent().parent().toggleClass("js-active");
553             }       
554        });
555        
556    }
557    
558    
559})(jQuery); // End of use strict
560
561
562/* ---------------------------------------------
563 Sliders
564 --------------------------------------------- */
565function initPageSliders(){
566    (function($){
567        "use strict";
568        
569        function owl_keynav(el){
570            el.find(".owl-page").attr({
571                "role": "button",
572                "tabindex": "0"
573            });
574            $(".owl-carousel").each(function(){
575                var owl = $(this).data('owlCarousel');
576                $(this).find(".owl-page").keydown(function(e){
577                    if (event.key === "Enter") {
578                        owl.goTo($(this).index());
579                    }
580                });
581            });
582        }
583        
584        // Fullwidth slider
585        $(".fullwidth-slider").owlCarousel({
586            slideSpeed: 350,
587            singleItem: true,
588            autoHeight: true,
589            navigation: true,
590            lazyLoad: true,
591            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
592            afterInit: owl_keynav
593        });
594        
595        // Fullwidth slider
596        $(".fullwidth-slider-fade").owlCarousel({
597            transitionStyle: "fadeUp",
598            slideSpeed: 350,
599            singleItem: true,
600            autoHeight: true,
601            navigation: true,
602            lazyLoad: true,
603            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
604            afterInit: owl_keynav
605        });
606        
607        // Fullwidth gallery
608        $(".fullwidth-gallery").owlCarousel({
609            transitionStyle: "fade",
610            autoPlay: 5000,
611            slideSpeed: 700,
612            singleItem: true,
613            autoHeight: true,
614            navigation: false,
615            pagination: false,
616            lazyLoad: true,
617            afterInit: owl_keynav
618        });
619        
620        // Item carousel
621        $(".item-carousel").owlCarousel({
622            autoPlay: 2500,
623            //stopOnHover: true,
624            items: 3,
625            itemsDesktop: [1199, 3],
626            itemsTabletSmall: [768, 3],
627            itemsMobile: [480, 1],
628            navigation: false,
629            lazyLoad: true,
630            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
631            afterInit: owl_keynav
632        });
633        
634        // Item carousel
635        $(".small-item-carousel").owlCarousel({
636            autoPlay: 2500,
637            stopOnHover: true,
638            items: 6,
639            itemsDesktop: [1199, 4],
640            itemsTabletSmall: [768, 3],
641            itemsMobile: [480, 2],
642            pagination: false,
643            navigation: false,
644            lazyLoad: true,
645            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
646            afterInit: owl_keynav
647        });
648        
649        // Single carousel
650        $(".single-carousel").owlCarousel({
651            singleItem: true,
652            autoHeight: true,
653            navigation: true,
654            lazyLoad: true,
655            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
656            afterInit: owl_keynav
657        });
658        
659        // Content Slider
660        $(".content-slider").owlCarousel({
661            slideSpeed: 350,
662            singleItem: true,
663            autoHeight: true,
664            navigation: true,
665            lazyLoad: true,
666            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
667            afterInit: owl_keynav
668        });
669
670        // Photo slider
671        $(".photo-slider").owlCarousel({
672            slideSpeed: 350,
673            items: 4,
674            itemsDesktop: [1199, 4],
675            itemsTabletSmall: [768, 2],
676            itemsMobile: [480, 1],
677            autoHeight: true,
678            navigation: true,
679            lazyLoad: true,
680            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
681            afterInit: owl_keynav
682        }); 
683        
684        // Work slider
685        $(".work-full-slider").owlCarousel({
686            slideSpeed : 350,
687            singleItem: true,
688            autoHeight: true,
689            navigation: true,
690            lazyLoad: true,
691            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
692            afterInit: owl_keynav
693        });
694        
695        // Blog posts carousel
696        $(".blog-posts-carousel").owlCarousel({
697            autoPlay: 5000,
698            stopOnHover: true,
699            items: 3,
700            itemsDesktop: [1199, 3],
701            itemsTabletSmall: [768, 2],
702            itemsMobile: [480, 1],
703            pagination: false,
704            navigation: true,
705            lazyLoad: true,
706            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
707            afterInit: owl_keynav
708        });
709        
710        // Blog posts carousel alt
711        $(".blog-posts-carousel-alt").owlCarousel({
712            autoPlay: 3500,
713            stopOnHover: true,
714            slideSpeed: 350,
715            singleItem: true,
716            autoHeight: true,
717            pagination: false,
718            navigation: true,
719            lazyLoad: true,
720            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
721            afterInit: owl_keynav
722        });
723        
724        // Image carousel
725        $(".image-carousel").owlCarousel({
726            autoPlay: 5000,
727            stopOnHover: true,
728            items: 4,
729            itemsDesktop: [1199, 3],
730            itemsTabletSmall: [768, 2],
731            itemsMobile: [480, 1],
732            navigation: true,
733            lazyLoad: true,
734            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
735            afterInit: owl_keynav
736        });
737        
738        // Fullwidth slideshow
739        
740          var sync1 = $(".fullwidth-slideshow");
741          var sync2 = $(".fullwidth-slideshow-pager");
742  
743        $(".fullwidth-slideshow").owlCarousel({
744            autoPlay: 5000,
745            stopOnHover: true,
746            transitionStyle: "fade",
747            slideSpeed: 350,
748            singleItem: true,
749            autoHeight: true,
750            pagination: false,
751            navigation: true,
752            navigationText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
753            afterAction : syncPosition,
754            responsiveRefreshRate : 200
755        });
756        $(".fullwidth-slideshow-pager").owlCarousel({
757            autoPlay: 5000,
758            stopOnHover: true,
759            items: 8,
760            itemsDesktop: [1199,8],
761            itemsDesktopSmall: [979,7],
762            itemsTablet: [768,6],
763            itemsMobile: [480,4],
764            autoHeight: true,
765            pagination: false,
766            navigation: false,
767            responsiveRefreshRate : 100,
768            afterInit : function(el){
769              el.find(".owl-item").eq(0).addClass("synced");
770              el.find(".owl-item").attr({
771                  "role": "button",
772                  "tabindex": "0"
773              });
774              $(".fullwidth-slideshow").each(function(){
775                  var owl = $(this).data('owlCarousel');
776                  $(".fullwidth-slideshow-pager").find(".owl-item").keydown(function(e){
777                      if (event.key === "Enter") {
778                          owl.goTo($(this).index());
779                      }
780                  });
781              });
782            }
783        });
784        
785        function syncPosition(el){
786            var current = this.currentItem;
787            $(".fullwidth-slideshow-pager").find(".owl-item").removeClass("synced").eq(current).addClass("synced")
788            if ($(".fullwidth-slideshow-pager").data("owlCarousel") !== undefined) {
789                center(current)
790            }
791        }
792        
793        $(".fullwidth-slideshow-pager").on("click", ".owl-item", function(e){
794            e.preventDefault();
795            var number = $(this).data("owlItem");
796            sync1.trigger("owl.goTo", number);
797        });
798 
799        function center(number){
800            var sync2visible = sync2.data("owlCarousel").owl.visibleItems;
801            var num = number;
802            var found = false;
803            for (var i in sync2visible) {
804                if (num === sync2visible[i]) {
805                    var found = true;
806                }
807            }
808            if (found === false) {
809                if (num > sync2visible[sync2visible.length - 1]) {
810                    sync2.trigger("owl.goTo", num - sync2visible.length + 2)
811                }
812                else {
813                    if (num - 1 === -1) {
814                        num = 0;
815                    }
816                    sync2.trigger("owl.goTo", num);
817                }
818            }
819            else 
820                if (num === sync2visible[sync2visible.length - 1]) {
821                    sync2.trigger("owl.goTo", sync2visible[1])
822                }
823                else 
824                    if (num === sync2visible[0]) {
825                        sync2.trigger("owl.goTo", num - 1)
826                    }
827        }
828          
829        var owl = $(".fullwidth-slideshow").data("owlCarousel");
830        
831        $(document.documentElement).keyup(function(event){
832            // handle cursor keys
833            if (event.keyCode == 37) {
834                owl.prev();
835            }
836            else 
837                if (event.keyCode == 39) {
838                    owl.next();
839                }
840        });
841        
842        if ($(".owl-carousel").length) {
843            var owl = $(".owl-carousel").data('owlCarousel');
844            owl.reinit();
845        }
846
847    })(jQuery);
848};
849
850
851/* ---------------------------------------------
852     Fullscreen menu
853   --------------------------------------------- */
854    
855    var fm_menu_wrap = $("#fullscreen-menu");
856    var fm_menu_button = $(".fm-button");
857    
858    function init_fullscreen_menu(){
859        
860        fm_menu_button.click(function(){
861            
862            if ($(this).hasClass("animation-process")){
863                return false;
864            }
865            else{
866                if ($(this).hasClass("active")) {
867                    $(this).removeClass("active").css("z-index", "2001").addClass("animation-process");;
868                    
869                    fm_menu_wrap.find(".fm-wrapper-sub").fadeOut("fast", function(){
870                        fm_menu_wrap.fadeOut(function(){
871                            fm_menu_wrap.find(".fm-wrapper-sub").removeClass("js-active").show();
872                            fm_menu_button.css("z-index", "1030").removeClass("animation-process");
873                            
874                        });
875                    });
876                    
877                    if ($(".owl-carousel").lenth) {
878                        $(".owl-carousel").data("owlCarousel").play();
879                    }
880                    
881                }
882                else {
883                    if ($(".owl-carousel").lenth) {
884                        $(".owl-carousel").data("owlCarousel").stop();
885                    }
886                    $(this).addClass("active").css("z-index", "2001").addClass("animation-process");
887                    
888                    fm_menu_wrap.fadeIn(function(){
889                        fm_menu_wrap.find(".fm-wrapper-sub").addClass("js-active");
890                        fm_menu_button.removeClass("animation-process");
891                    });
892                }
893                
894                return false;
895            }
896            
897        });
898        
899        $(document).keydown(function(e){
900            
901            if (fm_menu_button.hasClass("animation-process")){
902                return false;
903            } 
904            else {
905                if (e.keyCode == 27 && fm_menu_button.hasClass("active")) {
906                    
907                    fm_menu_button.removeClass("active").css("z-index", "2001").addClass("animation-process");;
908                    
909                    fm_menu_wrap.find(".fm-wrapper-sub").fadeOut("fast", function(){
910                        fm_menu_wrap.fadeOut(function(){
911                            fm_menu_wrap.find(".fm-wrapper-sub").removeClass("js-active").show();
912                            fm_menu_button.css("z-index", "1030").removeClass("animation-process");
913                            
914                        });
915                    });
916                    
917                    if ($(".owl-carousel").lenth) {
918                        $(".owl-carousel").data("owlCarousel").play();
919                    }
920                    
921                    return false;
922                    
923                }
924            }
925            
926        });
927        
928        fm_menu_button.click(function(){
929            
930            if ($(this).hasClass("animation-process")){
931                return false;
932            }
933            else{
934                if ($(this).hasClass("active")) {
935                    $(this).removeClass("active").css("z-index", "2001").addClass("animation-process");;
936                    
937                    fm_menu_wrap.find(".fm-wrapper-sub").fadeOut("fast", function(){
938                        fm_menu_wrap.fadeOut(function(){
939                            fm_menu_wrap.find(".fm-wrapper-sub").removeClass("js-active").show();
940                            fm_menu_button.css("z-index", "1030").removeClass("animation-process");
941                            
942                        });
943                    });
944                    
945                    if ($(".owl-carousel").lenth) {
946                        $(".owl-carousel").data("owlCarousel").play();
947                    }
948                    
949                }
950                else {
951                    if ($(".owl-carousel").lenth) {
952                        $(".owl-carousel").data("owlCarousel").stop();
953                    }
954                    $(this).addClass("active").css("z-index", "2001").addClass("animation-process");
955                    
956                    fm_menu_wrap.fadeIn(function(){
957                        fm_menu_wrap.find(".fm-wrapper-sub").addClass("js-active");
958                        fm_menu_button.removeClass("animation-process");
959                    });
960                }
961                
962                return false;
963            }
964            
965        });
966        
967        $("#fullscreen-menu").find("a:not(.fm-has-sub)").click(function(){
968            
969            if (fm_menu_button.hasClass("animation-process")){
970                return false;
971            } 
972            else {
973                fm_menu_button.removeClass("active").css("z-index", "2001").addClass("animation-process");
974                    
975                fm_menu_wrap.find(".fm-wrapper-sub").fadeOut("fast", function(){
976                    fm_menu_wrap.fadeOut(function(){
977                        fm_menu_wrap.find(".fm-wrapper-sub").removeClass("js-active").show();
978                        fm_menu_button.css("z-index", "1030").removeClass("animation-process");
979                        
980                    });
981                });
982                
983                if ($(".owl-carousel").lenth) {
984                    $(".owl-carousel").data("owlCarousel").play();
985                }
986            }
987        });
988        
989        // Sub menu
990        
991        var fmHasSub = $(".fm-has-sub");
992        var fmThisLi;
993        
994        fmHasSub.click(function(){
995        
996            fmThisLi = $(this).parent("li:first");
997            if (fmThisLi.hasClass("js-opened")) {
998                fmThisLi.find(".fm-sub:first").slideUp(function(){
999                    fmThisLi.removeClass("js-opened");
1000                    fmThisLi.find(".fm-has-sub").find(".fa:first").removeClass("fa-angle-up").addClass("fa-angle-down");
1001                });
1002            }
1003            else {
1004                $(this).find(".fa:first").removeClass("fa-angle-down").addClass("fa-angle-up");
1005                fmThisLi.addClass("js-opened");
1006                fmThisLi.find(".fm-sub:first").slideDown();
1007            }
1008            
1009            return false;
1010            
1011        });
1012      
1013    }    
1014    
1015
1016/* ---------------------------------------------
1017     Side panel
1018   --------------------------------------------- */
1019    
1020    var side_panel = $(".side-panel");
1021    var sp_button = $(".sp-button");
1022    var sp_close_button = $(".sp-close-button");
1023    var sp_overlay = $(".sp-overlay");
1024    
1025    function sp_panel_close(){
1026        side_panel.animate({
1027            opacity: 0,
1028            left: -270
1029        }, 500, "easeOutExpo");
1030        sp_overlay.fadeOut();
1031        
1032        
1033        if ($(".owl-carousel").lenth) {
1034            $(".owl-carousel").data("owlCarousel").play();
1035        }
1036    }
1037    
1038    function init_side_panel(){
1039        (function($){
1040            "use strict";
1041            
1042            sp_button.click(function(){
1043            
1044                side_panel.animate({
1045                    opacity: 1,
1046                    left: 0
1047                }, 500, "easeOutExpo");
1048                
1049                setTimeout(function(){
1050                    sp_overlay.fadeIn();
1051                }, 100);
1052                
1053                if ($(".owl-carousel").lenth) {
1054                    $(".owl-carousel").data("owlCarousel").stop();
1055                }
1056                
1057                return false;
1058            
1059            });
1060            
1061            sp_close_button.click(function(){
1062                sp_panel_close();
1063                return false;
1064            });
1065            sp_overlay.click(function(){
1066                sp_panel_close();
1067                return false;
1068            });
1069            
1070            $("#side-panel-menu").find("a:not(.sp-has-sub)").click(function(){
1071                if (!($(window).width() >= 1199)) {
1072                    sp_panel_close();
1073                }
1074            });
1075            
1076            
1077            // Sub menu
1078        
1079            var spHasSub = $(".sp-has-sub");
1080            var spThisLi;
1081            
1082            spHasSub.click(function(){
1083            
1084                spThisLi = $(this).parent("li:first");
1085                if (spThisLi.hasClass("js-opened")) {
1086                    spThisLi.find(".sp-sub:first").slideUp(function(){
1087                        spThisLi.removeClass("js-opened");
1088                        spThisLi.find(".sp-has-sub").find(".fa:first").removeClass("fa-angle-up").addClass("fa-angle-down");
1089                    });
1090                }
1091                else {
1092                    $(this).find(".fa:first").removeClass("fa-angle-down").addClass("fa-angle-up");
1093                    spThisLi.addClass("js-opened");
1094                    spThisLi.find(".sp-sub:first").slideDown();
1095                }
1096                
1097                return false;
1098                
1099            });
1100            
1101        })(jQuery);
1102    }
1103    
1104    function init_side_panel_resize(){
1105        (function($){
1106            "use strict";
1107            
1108             if ($(window).width() >= 1199){
1109               side_panel.css({
1110                   opacity: 1,
1111                   left: 0
1112               });
1113               $(".side-panel-is-left").css("margin-left", "270px");
1114               sp_button.css("display", "none");
1115               sp_close_button.css("display", "none");
1116             } else {
1117                 if (sp_close_button.is(":hidden")) {
1118                     side_panel.css({
1119                         opacity: 0,
1120                         left: -270
1121                     });
1122                     $(".side-panel-is-left").css("margin-left", "0");
1123                     sp_button.css("display", "block");
1124                     sp_close_button.css("display", "block");
1125                 }
1126             }
1127            
1128        })(jQuery);
1129    }
1130
1131/* ---------------------------------------------
1132 Portfolio section
1133 --------------------------------------------- */
1134
1135// Projects filtering
1136var fselector = 0;
1137var work_grid = $("#work-grid, #isotope");
1138
1139function initWorkFilter(){
1140    (function($){
1141     "use strict";
1142     var isotope_mode;
1143     if (work_grid.hasClass("masonry")){
1144         isotope_mode = "masonry";
1145     } else{
1146         isotope_mode = "fitRows"
1147     }
1148     
1149     $(".filter").click(function(){
1150         $(".filter").removeClass("active");
1151         $(this).addClass("active");
1152         fselector = $(this).attr('data-filter');
1153
1154         work_grid.imagesLoaded(function(){
1155             work_grid.isotope({
1156                 itemSelector: '.mix',
1157                 layoutMode: isotope_mode,
1158                 filter: fselector
1159             });
1160         });
1161         return false;
1162     });
1163        
1164     if (window.location.hash) {
1165         $(".filter").each(function(){
1166             if ($(this).attr("data-filter") == "." + window.location.hash.replace("#", "")) {
1167                 $(this).trigger('click');
1168                 
1169                 $("html, body").animate({
1170                     scrollTop: $("#portfolio").offset().top
1171                 });
1172                 
1173             }
1174         });
1175     }
1176
1177     work_grid.imagesLoaded(function(){
1178         work_grid.isotope({
1179             itemSelector: '.mix',
1180             layoutMode: isotope_mode,
1181             filter: fselector
1182         });
1183     });
1184     
1185     // Lazy loading plus isotope filter
1186     $(".img-lazy-work").load(function(){
1187         masonry_update();
1188     });     
1189     function masonry_update(){
1190         work_grid.imagesLoaded(function(){
1191             work_grid.isotope({
1192                 itemSelector: '.mix',
1193                 layoutMode: isotope_mode,
1194                 filter: fselector
1195             });
1196         });
1197     }
1198     work_grid.on("arrangeComplete", function(){
1199         $(window).trigger("scroll");
1200     });
1201    
1202    })(jQuery);
1203}
1204
1205
1206
1207
1208
1209/* ---------------------------------------------
1210 Height 100%
1211 --------------------------------------------- */
1212function js_height_init(){
1213    (function($){
1214        $(".js-height-full").height($(window).height());
1215        $(".js-height-parent").each(function(){
1216            $(this).height($(this).parent().first().height());
1217        });
1218    })(jQuery);
1219}
1220
1221
1222
1223
1224/* ---------------------------------------------
1225 Google map
1226 --------------------------------------------- */
1227
1228var gmMapDiv = $("#map-canvas");
1229
1230function init_map(){
1231    (function($){
1232        
1233        $(".map-section").click(function(){
1234            $(this).toggleClass("js-active");
1235            $(this).find(".mt-open").toggle();
1236            $(this).find(".mt-close").toggle();
1237            return false;
1238        });
1239
1240    })(jQuery);
1241}
1242
1243
1244
1245
1246/* ---------------------------------------------
1247 WOW animations
1248 --------------------------------------------- */
1249
1250function init_wow(){
1251    (function($){    
1252    
1253        var wow = new WOW({
1254            boxClass: 'wow',
1255            animateClass: 'animated',
1256            offset: 90,
1257            mobile: false, 
1258            live: true 
1259        });
1260        
1261        if ($("body").hasClass("appear-animate")){
1262           wow.init(); 
1263        }        
1264        
1265    })(jQuery);
1266}
1267
1268
1269/* ---------------------------------------------
1270 Masonry
1271 --------------------------------------------- */
1272
1273function init_masonry(){
1274    (function($){    
1275    
1276        $(".masonry").imagesLoaded(function(){
1277            $(".masonry").masonry();
1278        });
1279        
1280    })(jQuery);
1281}
1282        
1283        
1284/* ---------------------------------------------
1285 Split section
1286 --------------------------------------------- */
1287    
1288function split_height_init(){
1289    (function($){
1290        
1291        $(".ssh-table, .split-section-content").css("height", "auto");
1292        
1293        if ($(window).width() > 992) {
1294            $(".split-section").each(function(){
1295                var split_section_height = $(this).find(".split-section-content").innerHeight();
1296                $(this).find(".ssh-table").height(split_section_height);
1297            });
1298        }
1299            
1300    })(jQuery);
1301}
1302
1303
1304/* ---------------------------------------------
1305 Polyfill for :focus-visible     
1306 --------------------------------------------- */
1307
1308/**
1309 * https://github.com/WICG/focus-visible
1310 */
1311function init() {
1312  var hadKeyboardEvent = true;
1313  var hadFocusVisibleRecently = false;
1314  var hadFocusVisibleRecentlyTimeout = null;
1315
1316  var inputTypesWhitelist = {
1317    text: true,
1318    search: true,
1319    url: true,
1320    tel: true,
1321    email: true,
1322    password: true,
1323    number: true,
1324    date: true,
1325    month: true,
1326    week: true,
1327    time: true,
1328    datetime: true,
1329    'datetime-local': true
1330  };
1331
1332  /**
1333   * Helper function for legacy browsers and iframes which sometimes focus
1334   * elements like document, body, and non-interactive SVG.
1335   * @param {Element} el
1336   */
1337  function isValidFocusTarget(el) {
1338    if (
1339      el &&
1340      el !== document &&
1341      el.nodeName !== 'HTML' &&
1342      el.nodeName !== 'BODY' &&
1343      'classList' in el &&
1344      'contains' in el.classList
1345    ) {
1346      return true;
1347    }
1348    return false;
1349  }
1350
1351  /**
1352   * Computes whether the given element should automatically trigger the
1353   * `focus-visible` class being added, i.e. whether it should always match
1354   * `:focus-visible` when focused.
1355   * @param {Element} el
1356   * @return {boolean}
1357   */
1358  function focusTriggersKeyboardModality(el) {
1359    var type = el.type;
1360    var tagName = el.tagName;
1361
1362    if (tagName == 'INPUT' && inputTypesWhitelist[type] && !el.readOnly) {
1363      return true;
1364    }
1365
1366    if (tagName == 'TEXTAREA' && !el.readOnly) {
1367      return true;
1368    }
1369
1370    if (el.isContentEditable) {
1371      return true;
1372    }
1373
1374    return false;
1375  }
1376
1377  /**
1378   * Add the `focus-visible` class to the given element if it was not added by
1379   * the author.
1380   * @param {Element} el
1381   */
1382  function addFocusVisibleClass(el) {
1383    if (el.classList.contains('focus-visible')) {
1384      return;
1385    }
1386    el.classList.add('focus-visible');
1387    el.setAttribute('data-focus-visible-added', '');
1388  }
1389
1390  /**
1391   * Remove the `focus-visible` class from the given element if it was not
1392   * originally added by the author.
1393   * @param {Element} el
1394   */
1395  function removeFocusVisibleClass(el) {
1396    if (!el.hasAttribute('data-focus-visible-added')) {
1397      return;
1398    }
1399    el.classList.remove('focus-visible');
1400    el.removeAttribute('data-focus-visible-added');
1401  }
1402
1403  /**
1404   * Treat `keydown` as a signal that the user is in keyboard modality.
1405   * Apply `focus-visible` to any current active element and keep track
1406   * of our keyboard modality state with `hadKeyboardEvent`.
1407   * @param {Event} e
1408   */
1409  function onKeyDown(e) {
1410    if (isValidFocusTarget(document.activeElement)) {
1411      addFocusVisibleClass(document.activeElement);
1412    }
1413
1414    hadKeyboardEvent = true;
1415  }
1416
1417  /**
1418   * If at any point a user clicks with a pointing device, ensure that we change
1419   * the modality away from keyboard.
1420   * This avoids the situation where a user presses a key on an already focused
1421   * element, and then clicks on a different element, focusing it with a
1422   * pointing device, while we still think we're in keyboard modality.
1423   * @param {Event} e
1424   */
1425  function onPointerDown(e) {
1426    hadKeyboardEvent = false;
1427  }
1428
1429  /**
1430   * On `focus`, add the `focus-visible` class to the target if:
1431   * - the target received focus as a result of keyboard navigation, or
1432   * - the event target is an element that will likely require interaction
1433   *   via the keyboard (e.g. a text box)
1434   * @param {Event} e
1435   */
1436  function onFocus(e) {
1437    // Prevent IE from focusing the document or HTML element.
1438    if (!isValidFocusTarget(e.target)) {
1439      return;
1440    }
1441
1442    if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) {
1443      addFocusVisibleClass(e.target);
1444    }
1445  }
1446
1447  /**
1448   * On `blur`, remove the `focus-visible` class from the target.
1449   * @param {Event} e
1450   */
1451  function onBlur(e) {
1452    if (!isValidFocusTarget(e.target)) {
1453      return;
1454    }
1455
1456    if (
1457      e.target.classList.contains('focus-visible') ||
1458      e.target.hasAttribute('data-focus-visible-added')
1459    ) {
1460      // To detect a tab/window switch, we look for a blur event followed
1461      // rapidly by a visibility change.
1462      // If we don't see a visibility change within 100ms, it's probably a
1463      // regular focus change.
1464      hadFocusVisibleRecently = true;
1465      window.clearTimeout(hadFocusVisibleRecentlyTimeout);
1466      hadFocusVisibleRecentlyTimeout = window.setTimeout(function() {
1467        hadFocusVisibleRecently = false;
1468        window.clearTimeout(hadFocusVisibleRecentlyTimeout);
1469      }, 100);
1470      removeFocusVisibleClass(e.target);
1471    }
1472  }
1473
1474  /**
1475   * If the user changes tabs, keep track of whether or not the previously
1476   * focused element had .focus-visible.
1477   * @param {Event} e
1478   */
1479  function onVisibilityChange(e) {
1480    if (document.visibilityState == 'hidden') {
1481      // If the tab becomes active again, the browser will handle calling focus
1482      // on the element (Safari actually calls it twice).
1483      // If this tab change caused a blur on an element with focus-visible,
1484      // re-apply the class when the user switches back to the tab.
1485      if (hadFocusVisibleRecently) {
1486        hadKeyboardEvent = true;
1487      }
1488      addInitialPointerMoveListeners();
1489    }
1490  }
1491
1492  /**
1493   * Add a group of listeners to detect usage of any pointing devices.
1494   * These listeners will be added when the polyfill first loads, and anytime
1495   * the window is blurred, so that they are active when the window regains
1496   * focus.
1497   */
1498  function addInitialPointerMoveListeners() {
1499    document.addEventListener('mousemove', onInitialPointerMove);
1500    document.addEventListener('mousedown', onInitialPointerMove);
1501    document.addEventListener('mouseup', onInitialPointerMove);
1502    document.addEventListener('pointermove', onInitialPointerMove);
1503    document.addEventListener('pointerdown', onInitialPointerMove);
1504    document.addEventListener('pointerup', onInitialPointerMove);
1505    document.addEventListener('touchmove', onInitialPointerMove);
1506    document.addEventListener('touchstart', onInitialPointerMove);
1507    document.addEventListener('touchend', onInitialPointerMove);
1508  }
1509
1510  function removeInitialPointerMoveListeners() {
1511    document.removeEventListener('mousemove', onInitialPointerMove);
1512    document.removeEventListener('mousedown', onInitialPointerMove);
1513    document.removeEventListener('mouseup', onInitialPointerMove);
1514    document.removeEventListener('pointermove', onInitialPointerMove);
1515    document.removeEventListener('pointerdown', onInitialPointerMove);
1516    document.removeEventListener('pointerup', onInitialPointerMove);
1517    document.removeEventListener('touchmove', onInitialPointerMove);
1518    document.removeEventListener('touchstart', onInitialPointerMove);
1519    document.removeEventListener('touchend', onInitialPointerMove);
1520  }
1521
1522  /**
1523   * When the polfyill first loads, assume the user is in keyboard modality.
1524   * If any event is received from a pointing device (e.g. mouse, pointer,
1525   * touch), turn off keyboard modality.
1526   * This accounts for situations where focus enters the page from the URL bar.
1527   * @param {Event} e
1528   */
1529  function onInitialPointerMove(e) {
1530    // Work around a Safari quirk that fires a mousemove on <html> whenever the
1531    // window blurs, even if you're tabbing out of the page. ¯\_(ツ)_/¯
1532    if (e.target.nodeName.toLowerCase() === 'html') {
1533      return;
1534    }
1535
1536    hadKeyboardEvent = false;
1537    removeInitialPointerMoveListeners();
1538  }
1539
1540  document.addEventListener('keydown', onKeyDown, true);
1541  document.addEventListener('mousedown', onPointerDown, true);
1542  document.addEventListener('pointerdown', onPointerDown, true);
1543  document.addEventListener('touchstart', onPointerDown, true);
1544  document.addEventListener('focus', onFocus, true);
1545  document.addEventListener('blur', onBlur, true);
1546  document.addEventListener('visibilitychange', onVisibilityChange, true);
1547  addInitialPointerMoveListeners();
1548
1549  document.body.classList.add('js-focus-visible');
1550}
1551
1552/**
1553 * Subscription when the DOM is ready
1554 * @param {Function} callback
1555 */
1556function onDOMReady(callback) {
1557  var loaded;
1558
1559  /**
1560   * Callback wrapper for check loaded state
1561   */
1562  function load() {
1563    if (!loaded) {
1564      loaded = true;
1565
1566      callback();
1567    }
1568  }
1569
1570  if (['interactive', 'complete'].indexOf(document.readyState) >= 0) {
1571    callback();
1572  } else {
1573    loaded = false;
1574    document.addEventListener('DOMContentLoaded', load, false);
1575    window.addEventListener('load', load, false);
1576  }
1577}
1578
1579if (typeof document !== 'undefined') {
1580  onDOMReady(init);
1581}
1582
1583
1584/* ---------------------------------------------
1585 Adding aria-hidden to Font Awesome and Et-line 
1586 icons
1587 --------------------------------------------- */
1588
1589(function(){
1590    let getIcons = document.querySelectorAll('i.fa, span[class^="icon"]');
1591    getIcons.forEach(function(iconEach)
1592    {
1593        let getIconAttr = iconEach.getAttribute('aria-hidden');
1594        if (!getIconAttr)
1595        {
1596            iconEach.setAttribute('aria-hidden','true');
1597        }
1598    });
1599})();

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.