PageSourceSearch

https://admiralclub.com.ua/wp-content/themes/rhythm/js/all.js

js admiralclub.com.ua collected 2026-10-07 17:41:48 UTC 54,420 bytes, 1,643 lines download raw bytes

vendor: 4,599 bytes, lines 1-19
1var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
2if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
3{
4  let window = _____WB$wombat$assign$function_____("window");
5  let self = _____WB$wombat$assign$function_____("self");
6  let document = _____WB$wombat$assign$function_____("document");
7  let location = _____WB$wombat$assign$function_____("location");
8  let top = _____WB$wombat$assign$function_____("top");
9  let parent = _____WB$wombat$assign$function_____("parent");
10  let frames = _____WB$wombat$assign$function_____("frames");
11  let opener = _____WB$wombat$assign$function_____("opener");
12
13/*!
14 * imagesLoaded PACKAGED v4.1.2
15 * JavaScript is all like "You images are done yet or what?"
16 * MIT License
17 */
18
19!function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e}function o(t,e,r){return this instanceof o?("string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=n(t),this.options=i({},this.options),"function"==typeof e?r=e:i(this.options,e),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(function(){this.check()}.bind(this))):new o(t,e,r)}function r(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var h=t.jQuery,a=t.console;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&d[e]){for(var i=t.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=t.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var d={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(e.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,t),n=i.exec(e.backgroundImage)}},o.prototype.addImage=function(t){var e=new r(t);this.images.push(e)},o.prototype.addBackground=function(t,e){var i=new s(t,e);this.images.push(i)},o.prototype.check=function(){function t(t,i,n){setTimeout(function(){e.progress(t,i,n)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},o.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,t,e)},o.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},r.prototype=Object.create(e.prototype),r.prototype.check=function(){var t=this.getIsImageComplete();
19return t?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},r.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var t=this.getIsImageComplete();t&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},o.makeJQueryPlugin=function(e){e=e||t.jQuery,e&&(h=e,h.fn.imagesLoaded=function(t,e){var i=new o(this,t,e);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
20
21(function($){
22    "use strict"; // Start of use strict
23
24
25    /* Inview Js */
26    $.fn.inView=function(t){var o={};o.top=$(window).scrollTop(),o.bottom=o.top+$(window).height();var p={};switch(p.top=this.offset().top,p.bottom=p.top+this.outerHeight(),t){case"bottomOnly":return p.bottom<=o.bottom&&p.bottom>=o.top;case"topOnly":return p.top<=o.bottom&&p.top>=o.top;case"both":return p.top>=o.top&&p.bottom<=o.bottom;default:return p.top>=o.top&&p.bottom<=o.bottom}};
27
28    /* ---------------------------------------------
29     Scripts initialization
30     --------------------------------------------- */
31
32    $(window).load(function(){
33
34        calc_vc_container_size();
35
36        // Page loader
37        $(".page-loader .loader").delay(0).fadeOut();
38        $(".page-loader").delay(200).fadeOut("slow");
39
40        init_scroll_navigate();
41
42        $(window).trigger("scroll");
43        $(window).trigger("resize");
44
45    });
46
47    $(document).ready(function(){
48
49        $(window).trigger("resize");
50
51        // init_classic_menu();
52		init_fullscreen_menu();
53		init_side_panel();
54        init_lightbox();
55        init_parallax();
56        init_shortcodes();
57        init_tooltips();
58        init_counters();
59        init_team();
60        initPageSliders();
61        initWorkFilter();
62        init_map();
63        init_wow();
64        init_masonry();
65        init_video_bg();
66        stickySidebar();
67        enableMatchHeight();
68    });
69
70    $(window).resize(function(){
71
72        calc_vc_container_size();
73        init_classic_menu_resize();
74        js_height_init();
75        fullwidthElementInit();
76        fullHeightElementInit();
77		init_side_panel_resize();
78        stickySidebar();
79        split_height_init();
80    });
81
82
83    /* --------------------------------------------
84     Platform detect
85     --------------------------------------------- */
86    var mobileTest;
87    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
88        mobileTest = true;
89        $("html").addClass("mobile");
90    }
91    else {
92        mobileTest = false;
93        $("html").addClass("no-mobile");
94    }
95
96    var mozillaTest;
97    if (/mozilla/.test(navigator.userAgent)) {
98        mozillaTest = true;
99    }
100    else {
101        mozillaTest = false;
102    }
103    var safariTest;
104    if (/safari/.test(navigator.userAgent)) {
105        safariTest = true;
106    }
107    else {
108        safariTest = false;
109    }
110
111    // Detect touch devices
112    if (!("ontouchstart" in document.documentElement)) {
113        document.documentElement.className += " no-touch";
114    }
115
116    /* ---------------------------------------------
117     Sections helpers
118     --------------------------------------------- */
119
120    // Sections backgrounds
121
122    var pageSection = $(".home-section, .content-section, .small-section, .split-section, .page-section");
123    pageSection.each(function(indx){
124
125        if ($(this).attr("data-background")){
126            $(this).css("background-image", "url(" + $(this).data("background") + ")");
127        }
128    });
129
130    // Function for block height 100%
131    function height_line(height_object, height_donor){
132        height_donor.imagesLoaded(function(){
133            height_object.height(height_donor.height());
134            height_object.css({
135                "line-height": height_donor.height() + "px"
136            });
137        });
138    }
139
140    // Function equal height
141    !function(a){
142        a.fn.equalHeights = function(){
143            var b = 0, c = a(this);
144            return c.each(function(){
145                var c = a(this).innerHeight();
146                c > b && (b = c)
147            }), c.css("height", b)
148        }, a("[data-equal]").each(function(){
149            var b = a(this), c = b.data("equal");
150            b.find(c).equalHeights()
151        })
152    }(jQuery);
153
154
155    // Progress bars
156    var progressBar = $(".progress-bar");
157    $(window).on("scroll", function() {
158
159       progressBar.each(function(indx){
160
161         var $this = $(this);
162
163         if ($this.inView("topOnly") == true) {
164            $this.css("width", $this.attr("aria-valuenow") + "%");
165         };
166
167       });
168    });
169
170    var pageSection = $(".home-section, .content-section, .small-section, .split-section");
171    pageSection.each(function(indx){
172
173        if ($(this).attr("data-background")){
174            $(this).css("background-image", "url(" + $(this).data("background") + ")");
175        }
176    });
177
178
179    /*------------------------------------------
180    Fullwidth Elements
181    ------------------------------------------*/
182    function fullwidthElementInit(){
183        var container = jQuery('.container:first-child'),
184            containerPaddingLeft = parseInt(container.css('padding-left')),
185            fullwidthElement = jQuery('.content-section.full-width').not('.with-col');
186
187        if( ! fullwidthElement.length ) {
188            return
189        };
190
191        fullwidthElement.css({
192            marginLeft: (container.offset().left + containerPaddingLeft) * -1,
193            marginRight: (container.offset().left + containerPaddingLeft) * -1
194        });
195        if ( ( $('#top.side-panel-is-left').length || $('#top.side-panel-is-right').length ) && ( $(window).width() >= 1199 )  ) {
196            fullwidthElement.css({
197                marginLeft: (container.offset().left + containerPaddingLeft - 270) * -1,
198                marginRight: (container.offset().left + containerPaddingLeft - 270) * -1
199            });
200            if( fullwidthElement.outerWidth() == container.outerWidth() ){
201                fullwidthElement.css({
202                    marginLeft: (container.offset().left + containerPaddingLeft - 270) * -1,
203                    marginRight: (container.width() + containerPaddingLeft - $('#top').width())
204                });
205                jQuery('.content-section.full-width.with-col').css({
206                    marginLeft: (container.offset().left + containerPaddingLeft - 270) * -1,
207                    marginRight: (container.width() + containerPaddingLeft - $('#top').width())
208                });
209            }
210        };
211    };
212    fullwidthElementInit();
213
214    function fullHeightElementInit() {
215        var el = jQuery('.fullHeight'),
216            finalHeight = jQuery(window).outerHeight();
217
218        if ( ! el.length ) {
219            return;
220        }
221
222        if ( jQuery('.main-nav:not(.stick-fixed)').length ) {
223            finalHeight = jQuery(window).outerHeight() - jQuery('.main-nav').outerHeight();
224        }
225
226        el.each(function() {
227            var $this = jQuery(this);
228
229            $this.height(finalHeight)
230        });
231    };
232    fullHeightElementInit();
233
234
235
236    /* ---------------------------------------------
237     Nav panel classic
238     --------------------------------------------- */
239
240    var mobile_nav = $(".mobile-nav");
241    var desktop_nav = $(".desktop-nav");
242
243    function init_classic_menu_resize(){
244
245			var mnHasSub = $(".mn-has-sub"),
246				mnMultiCol = $('.mn-sub.mn-has-multi'),
247				mnThisLi;
248
249        // Mobile menu max height
250        if ($('.main-nav').hasClass('mobile-on') ) {
251            $(".inner-nav.desktop-nav").height('');
252        }
253        $(".mobile-on .desktop-nav >
253 ul").css("max-height", $(window).height() - $(".main-nav").height() - 20 + "px");
254
255        // Mobile menu style toggle
256        if ($(window).width() <= 1024) {
257            $(".main-nav").addClass("mobile-on");
258
259						if (mnMultiCol.length) {
260	            mnMultiCol.each(function() {
261								var $this = $(this);
262
263								$this.hide()
264									.css({
265										'left': '',
266										'right': ''
267									})
268
269								if ( $this.children('.columns-container').length ) {
270
271									$this.children('.columns-container').children('li').unwrap()
272
273								}
274							})
275						}
276
277        }
278        else if ($(window).width() > 1024) {
279          $(".main-nav").removeClass("mobile-on");
280          // desktop_nav.show();
281
282	        if (mnMultiCol.length) {
283	            mnMultiCol.each(function() {
284	                var $this = $(this),
285									 liItems = $this.children('li');
286
287									$this.show();
288
289	                if ( $this.offset().left < 0 ) {
290
291										$this.css({
292											'left': $this.parent().offset().left * -1,
293											'right': 0
294										}).addClass('overflowed').children('li').wrapAll('<div class="columns-container"></div>')
295
296	                } else {
297
298										$this.css({
299											// 'left': 'auto',
300											// 'right': -15
301											'left': '',
302											'right': ''
303										}).removeClass('overflowed');
304
305									}
306	            });
307	        };
308        }
309
310        // if ( $('.main-nav').hasClass('mobile-on') == true ) {
311        //     $('.inner-nav.desktop-nav').removeAttr('style');
312        // };
313    }
314
315    // vc container
316
317    function calc_vc_container_size() {
318
319      var _w = jQuery(window).width();
320
321      $('.page').each(function() {
322        // get the width
323
324        var _width = $(this).width();
325
326        var _diff = (_w - _width) / 2 + 15;
327
328        var mainSectionW = $('.main-section').width(),
329            containerW = $('.container').first().width();
330
331        $('.content-section.with-col').css({
332          marginLeft: '-' + _diff + 'px',
333          paddingLeft: _diff + 'px',
334          marginRight: '-' + _diff + 'px',
335          paddingRight: _diff + 'px'
336        });
337        if ( ( $('#top.side-panel-is-left').length || $('#top.side-panel-is-right').length ) && ( $(window).width() >= 1199 )  ) {
338
339            if( mainSectionW < containerW ){
340                $('.content-section.with-col').css({
341                  marginLeft: '-' + _diff + 'px',
342                  paddingLeft: _diff + 'px',
343                  marginRight: (containerW - mainSectionW) / 2 + 15 + 'px',
344                  paddingRight: (containerW - mainSectionW) / 2 + 15 + 'px'
345                });
346                $('.content-section.with-col').find('.content-section.with-col').css({
347                  marginLeft: '-' + _diff + 'px',
348                  paddingLeft: _diff + 'px',
349                  marginRight: '-' + _diff + 'px',
350                  paddingRight: _diff + 'px'
351                });
352            }
353        }
354      });
355
356    }
357
358    function init_classic_menu(){
359
360
361        // Navbar sticky
362
363        $(".js-stick").sticky({
364            topSpacing: 0
365        });
366
367        if (! $('.main-nav').hasClass('mobile-on') ) {
368            $(".inner-nav.desktop-nav").height($(".main-nav").outerHeight());
369        }
370        height_line($(".inner-nav ul > li > a"), $(".nav-logo-wrap"));
371        // height_line(mobile_nav, $(".nav-logo-wrap"));
372
373        mobile_nav.imagesLoaded(function(){
374            // mobile_nav.css({
375            //     "width": $(".nav-logo-wrap").height() + "px"
376            // });
377        });
378
379        if ( $('.main-nav.mn-centered') || $('.main-nav.mn-align-left') ){
380            height_line($(".inner-nav ul > li > a"), $(".main-nav"));
381            // height_line(mobile_nav, $(".main-nav"));
382
383            mobile_nav.imagesLoaded(function(){
384                // mobile_nav.css({
385                //     "width": $(".main-nav").height() + "px"
386                // });
387            });
388        };
389        // Transpaner menu
390
391        if ($(".main-nav").hasClass("transparent")){
392           $(".main-nav").addClass("js-transparent");
393        }
394
395        $(window).scroll(function(){
396
397                if ($(window).scrollTop() > 10 && ( $('.main-nav').hasClass('stick-fixed') || $('.main-nav').hasClass('js-stick') ) ) {
398                    $(".js-transparent").removeClass("transparent").addClass('is-sticked');
399                    $(".main-nav, .nav-logo-wrap .logo, .mobile-nav").addClass("small-height");
400                    if ($('.sticky-wrapper').length) {
401                        $('.sticky-wrapper').addClass('small-height');
402                    };
403                }
404                else {
405                    $(".js-transparent").addClass("transparent").removeClass('is-sticked');
406                    $(".main-nav, .nav-logo-wrap .logo, .mobile-nav").removeClass("small-height");
407                    if ($('.sticky-wrapper').length) {
408                        $('.sticky-wrapper').removeClass('small-height');
409                    };
410                }
411
412                if ($('.logo.small-height').height() > $('.main-nav.small-height').height() && $(window).scrollTop() > 10) {
413                    $('.logo.small-height').height( $('.main-nav.small-height').height() )
414                };
415
416        });
417
418        // Mobile menu toggle
419
420        mobile_nav.click(function(){
421
422            if (desktop_nav.hasClass("js-opened")) {
423                desktop_nav.slideUp("slow", "easeOutExpo").removeClass("js-opened");
424                $(this).removeClass("active");
425            }
426            else {
427                desktop_nav.slideDown("slow", "easeOutQuart").addClass("js-opened");
428                $(this).addClass("active");
429            }
430
431        });
432
433        desktop_nav.find("a:not(.mn-has-sub)").click(function(){
434            if (mobile_nav.hasClass("active")) {
435                desktop_nav.slideUp("slow", "easeOutExpo").removeClass("js-opened");
436                mobile_nav.removeClass("active");
437            }
438        });
439
440
441        // Sub menu
442
443
444        var mnHasSub = $(".mn-has-sub"),
445            mnMultiCol = $('.mn-sub.mn-has-multi'),
446            mnThisLi;
447
448        if (mnMultiCol.length) {
449            mnMultiCol.each(function() {
450                var $this = $(this);
451                if (($this.width() + $this.offset().left) >= $(window).width()) {
452                    $this.addClass('drop-to-left')
453                }
454            });
455        };
456
457        $(".mobile-on .mn-has-sub").find(".fm-angle-icon").removeClass("fa-angle-right").addClass("fa-angle-down");
458
459		$(".mn-has-sub:not(.mn-active-link)").click(function(){
460			return activate_classic_menu_item(this);
461		});
462
463		$(".mn-has-sub.mn-active-link").find('i').click(function(){
464			return activate_classic_menu_item(this);
465		});
466
467        mnThisLi = mnHasSub.parent("li");
468        mnThisLi.hover(function(){
469
470            if (!($(".main-nav").hasClass("mobile-on"))) {
471
472                $(this).find(".mn-sub:first").stop(true, true).fadeIn("fast");
473            }
474
475        }, function(){
476
477            if (!($(".main-nav").hasClass("mobile-on"))) {
478
479                $(this).find(".mn-sub:first").stop(true, true).delay(100).fadeOut("fast");
480            }
481
482        });
483    }
484    $('.nav-logo-wrap').imagesLoaded(function(){
485        init_classic_menu();
486    });
487
488	function activate_classic_menu_item(item) {
489
490		var mnThisLi;
491
492		if ($(".main-nav").hasClass("mobile-on")) {
493			mnThisLi = $(item).closest("li");
494
495			if (mnThisLi.hasClass("js-opened")) {
496				mnThisLi.find(".mn-sub:first").slideUp(function(){
497					mnThisLi.removeClass("js-opened");
498					mnThisLi.find(".mn-has-sub").find(".mn-angle-icon").removeClass("fa-angle-up").addClass("fa-angle-down");
499				});
500			}
501			else {
502				$(item).find(".mn-angle-icon").removeClass("fa-angle-down").addClass("fa-angle-up");
503				mnThisLi.addClass("js-opened");
504				mnThisLi.find(".mn-sub:first").slideDown();
505			}
506
507			return false;
508		}
509		return false;
510	}
511
512    /* ---------------------------------------------
513     Scroll navigation
514     --------------------------------------------- */
515
516    function init_scroll_navigate(){
517
518        $(".local-scroll").localScroll({
519            duration: 1500,
520            offset: 0,
521            easing: "easeInOutExpo"
522        });
523
524        var sections = $(".content-section");
525        var menu_links = $(".scroll-nav li a");
526
527        $(window).scroll(function(){
528
529			sections.filter(":in-viewport:first").each(function(){
530				var active_section = $(this);
531				var active_link = $('.scroll-nav li a[href="#' + active_section.attr("id") + '"]');
532                menu_links.removeClass("active");
533                active_link.addClass("active");
534            });
535        });
536
537    }
538
539
540
541    /* ---------------------------------------------
542     Lightboxes
543     --------------------------------------------- */
544
545    function init_lightbox(){
546
547		if (typeof $.fn.magnificPopup == 'function') {
548
549			// Works Item Lightbox
550			$(".work-lightbox-link").magnificPopup({
551				gallery: {
552					enabled: true
553				},
554				mainClass: "mfp-fade"
555			});
556
557			// Works Item Lightbox
558			$(".lightbox-gallery-1").magnificPopup({
559				gallery: {
560					enabled: true
561				}
562			});
563
564			// Other Custom Lightbox
565			$(".lightbox-gallery-2").magnificPopup({
566				gallery: {
567					enabled: true
568				}
569			});
570			$(".lightbox-gallery-3").off('click'); // removing prettyphoto
571			$(".lightbox-gallery-3").magnificPopup({
572				gallery: {
573					enabled: true
574				}
575			});
576			$(".lightbox").magnificPopup();
577
578			$('.popup-video-box').magnificPopup({
579				disableOn: 700,
580				type: 'iframe',
581				mainClass: 'mfp-fade',
582				removalDelay: 160,
583				preloader: false,
584
585				fixedContentPos: false
586			});
587
588
589			$('.video-popup-modal').magnificPopup({
590				type: 'inline',
591				preloader: false,
592//				focus: '#username',
593//				modal: true
594			});
595
596			$(document).on('click', '.popup-modal-dismiss', function (e) {
597				e.preventDefault();
598				$.magnificPopup.close();
599			});
600		}
601
602    }
603
604
605
606    /* -------------------------------------------
607     Parallax
608     --------------------------------------------- */
609
610    function init_parallax(){
611
612        // Parallax
613        if (($(window).width() >= 1024) && (mobileTest == false)) {
614            $(".parallax-1").parallax("50%", 0.1);
615            $(".parallax-2").parallax("50%", 0.2);
616            $(".parallax-3").parallax("50%", 0.3);
617            $(".parallax-4").parallax("50%", 0.4);
618            $(".parallax-5").parallax("50%", 0.5);
619            $(".parallax-6").parallax("50%", 0.6);
620            $(".parallax-7").parallax("50%", 0.7);
621            $(".parallax-8").parallax("50%", 0.5);
622            $(".parallax-9").parallax("50%", 0.5);
623            $(".parallax-10").parallax("50%", 0.5);
624            $(".parallax-11").parallax("50%", 0.05);
625        }
626
627    }
628
629
630
631    /* ---------------------------------------------
632     Shortcodes
633     --------------------------------------------- */
634    // Tabs minimal
635    function init_shortcodes() {
636
637        var tpl_tab_height;
638        $(".tpl-minimal-tabs > li > a").click(function(){
639
640            if (!($(this).parent("li").hasClass("active"))) {
641                tpl_tab_height = $(".tpl-minimal-tabs-cont > .tab-pane").filter($(this).attr("href")).height();
642                $(".tpl-minimal-tabs-cont").animate({
643                    height: tpl_tab_height
644                }, function(){
645                    $(".tpl-minimal-tabs-cont").css("height", "auto");
646                });
647
648            }
649
650        });
651
652
653        // Accordion
654        $('.accordion-wrapper').each(function() {
655
656            var $this = $(this),
657            $wrap = $this.find('.accordion');
658
659            $wrap.each( function() {
660
661				var $accordion  = $(this),
662                $content    = $accordion.find('.accordion-content');
663
664				if ($this.hasClass('toggle-wrapper')) {
665					$accordion.on('click', '.accordion-title', function( e ) {
666						e.preventDefault();
667
668						console.dir($wrap.find('.accordion-title').attr('class'));
669
670						if ($(this).hasClass('active')) {
671							$(this).removeClass('active');
672							$(this).closest('.accordion').find('.accordion-content').stop().slideUp('easeInExpo');
673						} else {
674							$(this).addClass('active');
675
676							$(this).closest('.accordion').find('.accordion-content').stop().slideDown('easeOutExpo');
677						}
678					});
679				} else {
680					 $accordion.on('click', '.accordion-title:not(.selected)', function( e ) {
681						e.preventDefault();
682
683						$wrap.find('.accordion-title').removeClass('active');
684						$(this).addClass('active');
685
686						$this.find('.accordion-content:visible').stop().slideUp('easeInExpo');
687						$content.stop().slideDown('easeOutExpo');
688
689					});
690				}
691            });
692        });
693
694		// FAQ
695        var allPanels = $(".faq-wrapper .accordion > div.dd").hide();
696        allPanels.first().slideDown("easeOutExpo");
697        $(".faq-wrapper .accordion > div.dt > a").first().addClass("active");
698
699        $(".faq-wrapper .accordion > div.dt > a").click(function(){
700
701            var current = $(this).parent().next("div.dd");
702            $(".accordion > div.dt > a").removeClass("active");
703            $(this).addClass("active");
704            allPanels.not(current).slideUp("easeInExpo");
705            $(this).parent().next().slideDown("easeOutExpo");
706
707            return false;
708
709        });
710
711        // Toggle
712        $('.toggle').each(function() {
713
714            var $this     = $(this),
715            $content  = $this.find('.toggle-content');
716
717            $this.on('click', '.toggle-title', function( e ) {
718                e.preventDefault();
719                $content.slideToggle('easeInOutExpo');
720                $(this).toggleClass('active');
721            });
722        });
723
724        // Responsive video
725		if (typeof $.fn.fitVids == 'function') {
726			$(".video, .resp-media, .blog-media").fitVids();
727			$(".work-full-media").fitVids();
728		}
729
730    }
731
732
733
734    /* ---------------------------------------------
735     Tooltips (bootstrap plugin activated)
736     --------------------------------------------- */
737
738    function init_tooltips(){
739
740        $(".tooltip-bot, .tooltip-bot a, .nav-social-links a").tooltip({
741            placement: "bottom"
742        });
743
744        $(".tooltip-top, .tooltip-top a").tooltip({
745            placement: "top"
746        });
747
748    }
749
750
751
752    /* ---------------------------------------------
753     Some facts section
754     --------------------------------------------- */
755
756     function init_counters(){
757
758		if (typeof $.fn.appear == 'function') {
759			$(".count-number").appear(function(){
760				var count = $(this);
761				count.countTo({
762					from: 0,
763					to: count.html(),
764					speed: 1300,
765					refreshInterval: 60,
766				});
767
768			});
769		}
770    }
771
772
773
774
775    /* ---------------------------------------------
776     Team
777     --------------------------------------------- */
778
779    function init_team(){
780
781        // Hover
782        $(".team-item").click(function(){
783            if ($("html").hasClass("mobile")) {
784                $(this).toggleClass("js-active");
785            }
786        });
787
788    }
789
790	/* ---------------------------------------------
791     Comment form validation
792     --------------------------------------------- */
793	function init_comment_form_validation() {
794
795		if ($('#comment-form').length > 0) {
796			$('#comment-form').validator();
797		}
798	}
799
800
801	/* ---------------------------------------------
802     Fullscreen menu
803     --------------------------------------------- */
804
805    var fm_menu_wrap = $("#fullscreen-menu");
806    var fm_menu_button = $(".fm-button");
807
808    function init_fullscreen_menu(){
809
810        fm_menu_button.click(function(){
811
812            if ($(this).hasClass("animation-process")){
813                return false;
814            }
815            else{
816                if ($(this).hasClass("active")) {
817                    $(this).removeClass("active").css("z-index", "2001").addClass("animation-process");;
818
819                    fm_menu_wrap.find(".fm-wrapper-sub").fadeOut("fast", function(){
820                        fm_menu_wrap.fadeOut(function(){
821                            fm_menu_wrap.find(".fm-wrapper-sub").removeClass("js-active").show();
822                            fm_menu_button.css("z-index", "1030").removeClass("animation-process");
823
824                        });
825                    });
826
827                    if ($(".owl-carousel").lenth) {
828                        $(".owl-carousel").data("owlCarousel").play();
829                    }
830
831                }
832                else {
833                    if ($(".owl-carousel").lenth) {
834                        $(".owl-carousel").data("owlCarousel").stop();
835                    }
836                    $(this).addClass("active").css("z-index", "2001").addClass("animation-process");
837
838                    fm_menu_wrap.fadeIn(function(){
839                        fm_menu_wrap.find(".fm-wrapper-sub").addClass("js-active");
840                        fm_menu_button.removeClass("animation-process");
841                    });
842                }
843
844                return false;
845            }
846
847        });
848
849        $("#fullscreen-menu").find("a:not(.fm-has-sub)").click(function(){
850
851            if (fm_menu_button.hasClass("animation-process")){
852                return false;
853            }
854            else {
855                fm_menu_button.removeClass("active").css("z-index", "2001").addClass("animation-process");;
856
857                fm_menu_wrap.find(".fm-wrapper-sub").fadeOut("fast", function(){
858                    fm_menu_wrap.fadeOut(function(){
859                        fm_menu_wrap.find(".fm-wrapper-sub").removeClass("js-active").show();
860                        fm_menu_button.css("z-index", "1030").removeClass("animation-process");
861
862                    });
863                });
864
865                if ($(".owl-carousel").lenth) {
866                    $(".owl-carousel").data("owlCarousel").play();
867                }
868            }
869        });
870
871        // Sub menu
872        $(".fm-has-sub:not(.fm-active-link)").click(function(){
873			return activate_fullscreen_menu_item(this);
874		});
875
876		$(".fm-has-sub.fm-active-link").find('i').click(function(){
877			return activate_fullscreen_menu_item(this);
878		});
879    }
880
881	function activate_fullscreen_menu_item(item) {
882
883		var fmThisLi = $(item).closest("li");
884		if (fmThisLi.hasClass("js-opened")) {
885			fmThisLi.find(".fm-sub:first").slideUp(function(){
886				fmThisLi.removeClass("js-opened");
887				fmThisLi.find(".fm-has-sub").find(".mn-angle-icon").removeClass("fa-angle-up").addClass("fa-angle-down");
888			});
889		}
890		else {
891			$(item).find(".mn-angle-icon").removeClass("fa-angle-down").addClass("fa-angle-up");
892			fmThisLi.addClass("js-opened");
893			fmThisLi.find(".fm-sub:first").slideDown();
894		}
895
896		return false;
897	}
898
899	/* ---------------------------------------------
900     Side panel
901   --------------------------------------------- */
902
903    var side_panel = $(".side-panel");
904    var sp_button = $(".sp-button");
905    var sp_close_button = $(".sp-close-button");
906    var sp_overlay = $(".sp-overlay");
907
908    function sp_panel_close(){
909        side_panel.animate({
910            opacity: 0,
911            left: -270
912        }, 500, "easeOutExpo");
913        sp_overlay.fadeOut();
914
915
916        if ($(".owl-carousel").lenth) {
917            $(".owl-carousel").data("owlCarousel").play();
918        }
919    }
920
921    function init_side_panel(){
922        (function($){
923            "use strict";
924
925            sp_button.click(function(){
926
927                side_panel.animate({
928                    opacity: 1,
929                    left: 0
930                }, 500, "easeOutExpo");
931
932                setTimeout(function(){
933                    sp_overlay.fadeIn();
934                }, 100);
935
936                if ($(".owl-carousel").lenth) {
937                    $(".owl-carousel").data("owlCarousel").stop();
938                }
939
940                return false;
941
942            });
943
944            sp_close_button.click(function(){
945                sp_panel_close();
946                return false;
947            });
948            sp_overlay.click(function(){
949                sp_panel_close();
950                return false;
951            });
952
953            $("#side-panel-menu").find("a:not(.sp-has-sub)").click(function(){
954                if (!($(window).width() >= 1199)) {
955                    sp_panel_close();
956                }
957            });
958
959
960            // Sub menu
961			$(".sp-has-sub:not(.sp-active-link)").click(function(){
962				return activate_side_menu_item(this);
963			});
964
965			$(".sp-has-sub.sp-active-link").find('i').click(function(){
966				return activate_side_menu_item(this);
967			});
968
969        })(jQuery);
970    }
971
972	function activate_side_menu_item(item) {
973
974		var spThisLi = $(item).closest("li");
975
976		if (spThisLi.hasClass("js-opened")) {
977			spThisLi.find(".sp-sub:first").slideUp(function(){
978				spThisLi.removeClass("js-opened");
979				spThisLi.find(".sp-has-sub").find(".sp-angle-icon").removeClass("fa-angle-up").addClass("fa-angle-down");
980			});
981		}
982		else {
983			$(item).find(".sp-angle-icon").removeClass("fa-angle-down").addClass("fa-angle-up");
984			spThisLi.addClass("js-opened");
985			spThisLi.find(".sp-sub:first").slideDown();
986		}
987
988		return false;
989	}
990
991    function init_side_panel_resize(){
992        (function($){
993            "use strict";
994
995            if ( ! $(".side-panel").length  ) {
996                return
997            }
998            if ($(window).width() >= 1199){
999               side_panel.css({
1000                    opacity: 1,
1001                    left: 0
1002               });
1003               $(".side-panel-is-left").css("margin-left", "270px");
1004               sp_button.css("display", "none");
1005               sp_close_button.css("display", "none");
1006            } else {
1007                side_panel.css({
1008                    opacity: 0,
1009                    left: -270
1010                });
1011                $(".side-panel-is-left").css("margin-left", "0");
1012                sp_button.css("display", "block");
1013                sp_close_button.css("display", "block");
1014            }
1015
1016        })(jQuery);
1017    }
1018})(jQuery); // End of use strict
1019
1020
1021/* ---------------------------------------------
1022     Sliders
1023   --------------------------------------------- */
1024function initPageSliders(){
1025    (function($){
1026        "use strict";
1027
1028		function syncPosition(el){
1029          var current = this.currentItem;
1030          $(".fullwidth-slideshow-pager").find(".owl-item").removeClass("synced").eq(current).addClass("synced")
1031          if ($(".fullwidth-slideshow-pager").data("owlCarousel") !== undefined) {
1032              center(current)
1033          }
1034      }
1035
1036	function center(number){
1037		var sync2visible = sync2.data("owlCarousel").owl.visibleItems;
1038		var num = number;
1039		var found = false;
1040		for (var i in sync2visible) {
1041			if (num === sync2visible[i]) {
1042				var found = true;
1043			}
1044		}
1045		if (found === false) {
1046			if (num > sync2visible[sync2visible.length - 1]) {
1047				sync2.trigger("owl.goTo", num - sync2visible.length + 2)
1048			}
1049			else {
1050				if (num - 1 === -1) {
1051					num = 0;
1052				}
1053				sync2.trigger("owl.goTo", num);
1054			}
1055		}
1056		else
1057			if (num === sync2visible[sync2visible.length - 1]) {
1058				sync2.trigger("owl.goTo", sync2visible[1])
1059			}
1060			else
1061				if (num === sync2visible[0]) {
1062					sync2.trigger("owl.goTo", num - 1)
1063				}
1064	}
1065
1066		if (typeof $.fn.owlCarousel == 'function') {
1067
1068			// Fullwidth slider
1069			var _full_width_slider_selc     = $(".fullwidth-slider");
1070
1071			if ( _full_width_slider_selc.length ) {
1072
1073				_full_width_slider_selc.each(function() {
1074
1075					var $this = $(this),
1076						_full_width_slider_speed = (typeof $this.attr('data-speed') !== typeof undefined || $this.attr('data-speed') !== null ) ? parseInt($this.attr('data-speed'), 10) : 3500,
1077						_full_width_slider_autoplay = ($this.attr('data-autoplay') == 'true') ? true : false;
1078
1079					$this.owlCarousel({
1080						slideSpeed: _full_width_slider_speed,
1081						singleItem: true,
1082						autoHeight: true,
1083						navigation: true,
1084						autoPlay: _full_width_slider_autoplay,
1085						navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1086					});
1087
1088				});
1089
1090			}
1091
1092			// Fullwidth slider Fade
1093			var _full_width_fade_selc = $(".fullwidth-slider-fade");
1094
1095			if ( _full_width_fade_selc.length ) {
1096
1097				_full_width_fade_selc.each(function() {
1098					var $this = $(this),
1099						_full_width_fade_speed    = (typeof $this.attr('data-speed') !== typeof undefined || $this.attr('data-speed') !== null ) ? parseInt($this.attr('data-speed'), 10):3500,
1100						_full_width_fade_autoplay = ($this.attr('data-autoplay') == 'true') ? true : false;
1101
1102					$this.owlCarousel({
1103						transitionStyle: "fadeUp",
1104						slideSpeed: _full_width_fade_speed,
1105						singleItem: true,
1106						autoHeight: true,
1107						navigation: true,
1108						autoPlay:_full_width_fade_autoplay,
1109						navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1110					});
1111
1112				});
1113
1114			}
1115
1116      // Fullwidth gallery
1117      var _full_width_gallery_selc = $(".fullwidth-gallery");
1118
1119			if ( _full_width_gallery_selc.length ) {
1120
1121				_full_width_gallery_selc.each(function() {
1122
1123					var $this = $(this),
1124						_full_width_gallery_speed    = (typeof $this.attr('data-speed') !== typeof undefined || $this.attr('data-speed') !== null ) ? parseInt($this.attr('data-speed'), 10):7000,
1125						_full_width_gallery_autoplay = ($this.attr('data-autoplay') == 'true') ? true : 5000;
1126
1127					$(".fullwidth-gallery").owlCarousel({
1128						transitionStyle: "fade",
1129						autoPlay: _full_width_gallery_autoplay,
1130						slideSpeed: _full_width_gallery_speed,
1131						singleItem: true,
1132						autoHeight: true,
1133						navigation: false,
1134						pagination: false
1135					});
1136
1137				})
1138
1139			}
1140
1141
1142			// Item carousel
1143			$(".item-carousel").owlCarousel({
1144				autoPlay: 2500,
1145				//stopOnHover: true,
1146				items: 3,
1147				itemsDesktop: [1199, 3],
1148				itemsTabletSmall: [768, 3],
1149				itemsMobile: [480, 1],
1150				navigation: false,
1151				navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1152			});
1153
1154			// Item carousel
1155			$(".small-item-carousel").owlCarousel({
1156				autoPlay: 2500,
1157				stopOnHover: true,
1158				items: 6,
1159				itemsDesktop: [1199, 4],
1160				itemsTabletSmall: [768, 3],
1161				itemsMobile: [480, 2],
1162				pagination: false,
1163				navigation: false,
1164				navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1165			});
1166
1167         // Item carousel
1168         $(".small-item-carousel-items-4").owlCarousel({
1169             autoPlay: 2500,
1170             stopOnHover: true,
1171             items: 4,
1172             itemsDesktop: [1199, 4],
1173             itemsTabletSmall: [768, 3],
1174             itemsMobile: [480, 2],
1175             pagination: false,
1176             navigation: false
1177         });
1178
1179			// Single carousel
1180			$(".single-carousel").owlCarousel({
1181				//transitionStyle: "backSlide",
1182				singleItem: true,
1183				autoHeight: true,
1184				navigation: true,
1185				navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1186			});
1187
1188			// Content Slider
1189			$(".content-slider").owlCarousel({
1190				slideSpeed: 350,
1191				singleItem: true,
1192				autoHeight: true,
1193				navigation: true,
1194				navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1195			});
1196
1197			// Photo slider
1198			$(".photo-slider").owlCarousel({
1199				//transitionStyle: "backSlide",
1200				slideSpeed: 350,
1201				items: 4,
1202				itemsDesktop: [1199, 4],
1203				itemsTabletSmall: [768, 2],
1204				itemsMobile: [480, 1],
1205				autoHeight: true,
1206				navigation: true,
1207				navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1208			});
1209
1210			// Fullwidth slider
1211			var _work_full_slider_selc = $(".work-full-slider");
1212
1213			if ( _work_full_slider_selc.length ) {
1214
1215				_work_full_slider_selc.each(function() {
1216
1217					var $this = $(this),
1218						_work_full_slider_speed    = (typeof $this.attr('data-speed') !== typeof undefined || $this.attr('data-speed') !== null ) ? parseInt($this.attr('data-speed'), 10):3500,
1219						_work_full_slider_autoplay = ($this.attr('data-autoplay') == 'true') ? true : false;
1220
1221					// Work slider
1222					$(".work-full-slider").owlCarousel({
1223						slideSpeed : _work_full_slider_speed,
1224						autoPlay:_work_full_slider_autoplay,
1225						singleItem: true,
1226						autoHeight: true,
1227						navigation: true,
1228						navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1229					});
1230
1231				})
1232
1233			}
1234
1235			// Blog posts carousel
1236			$(".blog-posts-carousel").owlCarousel({
1237				autoPlay: 5000,
1238				stopOnHover: true,
1239				items: 3,
1240				itemsDesktop: [1199, 3],
1241				itemsTabletSmall: [768, 2],
1242				itemsMobile: [480, 1],
1243				pagination: false,
1244				navigation: true,
1245				navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1246			});
1247
1248			// Blog posts carousel alt
1249			$(".blog-posts-carousel-alt").owlCarousel({
1250				autoPlay: 3500,
1251				stopOnHover: true,
1252				slideSpeed: 350,
1253				singleItem: true,
1254				autoHeight: true,
1255				pagination: false,
1256				navigation: true,
1257				navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1258			});
1259
1260      // Image carousel
1261      $(".image-carousel").owlCarousel({
1262          autoPlay: 5000,
1263          stopOnHover: true,
1264          items: 4,
1265          itemsDesktop: [1199, 3],
1266          itemsTabletSmall: [768, 2],
1267          itemsMobile: [480, 1],
1268          navigation: true,
1269          navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1270      });
1271
1272      // Image carousel
1273      $(".image-carousel-items-5").owlCarousel({
1274          autoPlay: 5000,
1275          stopOnHover: true,
1276          items: 5,
1277          itemsDesktop: [1199, 4],
1278          itemsTabletSmall: [768, 2],
1279          itemsMobile: [480, 1],
1280          pagination: false,
1281          navigation: true,
1282          navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
1283      });
1284
1285      // Fullwidth slideshow
1286
1287        var sync1 = $(".fullwidth-slideshow");
1288        var sync2 = $(".fullwidth-slideshow-pager");
1289
1290      $(".fullwidth-slideshow").owlCarousel({
1291          autoPlay: 5000,
1292          stopOnHover: true,
1293          transitionStyle: "fade",
1294          slideSpeed: 350,
1295          singleItem: true,
1296          autoHeight: true,
1297          pagination: false,
1298          navigation: true,
1299          navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
1300          afterAction : syncPosition,
1301          responsiveRefreshRate : 200
1302      });
1303      $(".fullwidth-slideshow-pager").owlCarousel({
1304          autoPlay: 5000,
1305          stopOnHover: true,
1306          items: 8,
1307          itemsDesktop: [1199,8],
1308          itemsDesktopSmall: [979,7],
1309          itemsTablet: [768,6],
1310          itemsMobile: [480,4],
1311          autoHeight: true,
1312          pagination: false,
1313          navigation: false,
1314          responsiveRefreshRate : 100,
1315          afterInit : function(el){
1316            el.find(".owl-item").eq(0).addClass("synced");
1317          }
1318      });
1319
1320      $(".fullwidth-slideshow-pager").on("click", ".owl-item", function(e){
1321          e.preventDefault();
1322          var number = $(this).data("owlItem");
1323          sync1.trigger("owl.goTo", number);
1324      });
1325
1326	  var owl = $(".fullwidth-slideshow").data("owlCarousel");
1327
1328      $(document.documentElement).keyup(function(event){
1329          // handle cursor keys
1330          if (event.keyCode == 37) {
1331              owl.prev();
1332          }
1333          else
1334              if (event.keyCode == 39) {
1335                  owl.next();
1336              }
1337      });
1338
1339			if ($(".owl-carousel").length) {
1340				var owl = $(".owl-carousel").data('owlCarousel');
1341				owl.reinit();
1342			}
1343		}
1344
1345    })(jQuery);
1346};
1347
1348
1349
1350/* ---------------------------------------------
1351 Portfolio section
1352 --------------------------------------------- */
1353
1354// Projects filtering
1355var fselector = 0;
1356var work_grid = jQuery("#work-grid, #isotope");
1357
1358function initWorkFilter(){
1359
1360	if (typeof jQuery.fn.isotope == 'function') {
1361
1362		"use strict";
1363		var isotope_mode;
1364		if (work_grid.hasClass("masonry")){
1365			isotope_mode = "masonry";
1366		} else{
1367			isotope_mode = "packery"
1368		}
1369
1370		work_grid.imagesLoaded(function(){
1371			work_grid.isotope({
1372				itemSelector: '.mix',
1373				layoutMode: isotope_mode,
1374			 	filter: fselector
1375			});
1376		});
1377
1378		jQuery(".filter").click(function(){
1379			jQuery(".filter").removeClass("active");
1380			jQuery(this).addClass("active");
1381			fselector = jQuery(this).attr('data-filter');
1382
1383			work_grid.isotope({
1384				filter: fselector
1385			});
1386			return false;
1387		});
1388		jQuery('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
1389			work_grid.isotope('layout')
1390		})
1391	}
1392}
1393
1394
1395/* ---------------------------------------------
1396 Height 100%
1397 --------------------------------------------- */
1398function js_height_init(){
1399    (function($){
1400        $(".js-height-full").height($(window).height());
1401        $(".js-height-parent").each(function(){
1402            $(this).height($(this).parent().first().height());
1403        });
1404    })(jQuery);
1405}
1406
1407
1408
1409
1410/* ---------------------------------------------
1411 Gmap3 map
1412 --------------------------------------------- */
1413
1414var gmMapDiv = jQuery(".map-canvas");
1415
1416function init_map(){
1417    (function($){
1418
1419        $('.map-section').click(function(){
1420            $(this).toggleClass("js-active");
1421            $(this).find(".mt-open").toggle();
1422            $(this).find(".mt-close").toggle();
1423        });
1424
1425        gmMapDiv.each(function() {
1426
1427            var _this = $(this);
1428
1429    		if (typeof $.fn.gmap3 == 'function') {
1430
1431    			if (_this.length) {
1432
1433    				var gmCenterAddress = _this.attr("data-address");
1434    				var gmMarkerAddress = _this.attr("data-address");
1435    				var gmMarker        = _this.attr("data-marker");
1436    				var gmLatitude      = _this.attr("data-lat");
1437    				var gmLongitude     = _this.attr("data-long");
1438    				var gmZ             =  parseInt(_this.attr("data-zoom"));
1439                    var gmGreyscale     = _this.attr("data-greyscale");
1440                    var gmStyles        = ( gmGreyscale ==  'true') ? [{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#d3d3d3"}]},{"featureType":"transit","stylers":[{"color":"#808080"},{"visibility":"off"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"visibility":"on"},{"color":"#b3b3b3"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"road.local","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#ffffff"},{"weight":1.8}]},{"featureType":"road.local","elementType":"geometry.stroke","stylers":[{"color":"#d7d7d7"}]},{"featureType":"poi","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#ebebeb"}]},{"featureType":"administrative","elementType":"geometry","stylers":[{"color":"#a7a7a7"}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"landscape","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#efefef"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#696969"}]},{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"color":"#737373"}]},{"featureType":"poi","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#d6d6d6"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{},{"featureType":"poi","elementType":"geometry.fill","stylers":[{"color":"#dadada"}]}]:false;
1441
1442    				_this.gmap3({
1443    					mapTypeId : google.maps.MapTypeId.ROADMAP,
1444    					mapTypeControl: false,
1445    					scrollwheel: false,
1446    					streetViewControl: false,
1447    					scaleControl: false,
1448    					address: gmCenterAddress,
1449    					center:[gmLatitude, gmLongitude],
1450    					zoom: gmZ,
1451    					})
1452    					.styledmaptype( "style1", gmStyles, {name: "Style 1"})
1453    					.marker([
1454	    					{position:[gmLatitude, gmLongitude]},
1455    						{ address: gmMarkerAddress, icon: gmMarker || get.siteurl + "/images/map-marker.png" }
1456    					]);
1457    			}
1458    		}
1459        });
1460    })(jQuery);
1461}
1462
1463/* ---------------------------------------------
1464 WOW animations
1465 --------------------------------------------- */
1466
1467function init_wow(){
1468    (function($){
1469
1470        var wow = new WOW({
1471            boxClass: 'wow',
1472            animateClass: 'animated',
1473            offset: 90,
1474            mobile: false,
1475            live: true
1476        });
1477
1478        if ($("body").hasClass("appear-animate")){
1479           wow.init();
1480        }
1481
1482    })(jQuery);
1483}
1484
1485
1486/* ---------------------------------------------
1487 Masonry
1488 --------------------------------------------- */
1489
1490function init_masonry(){
1491    (function($){
1492
1493		if (typeof $.fn.masonry == 'function') {
1494
1495			$(".masonry").imagesLoaded(function(){
1496				$(".masonry").masonry();
1497			});
1498
1499		}
1500
1501    })(jQuery);
1502}
1503
1504/* ---------------------------------------------
1505 Video BG
1506 --------------------------------------------- */
1507function init_video_bg() {
1508    (function($){
1509
1510        if (typeof $.fn.vide == 'function') {
1511
1512
1513            $('.bg-video-wrapper').each(function() {
1514
1515                $this = $(this);
1516
1517                $this.vide({
1518                    mp4: $this.data('mp4'),
1519                    webm: $this.data('webm'),
1520                    ogv: $this.data('ogv'),
1521                    poster: $this.data('poster')
1522                    }, {
1523                        volume: 0,
1524                        playbackRate: 1,
1525                        muted: $this.data('muted'),
1526                        loop: true,
1527                        autoplay: $this.data('autoplay'),
1528                        position: '50% 50%', // Similar to the CSS `background-position` property.
1529                        posterType: $this.data('poster-type'), // Poster image type. "detect" — auto-detection; "none" — no poster; "jpg", "png", "gif",... - extensions.
1530                        resizing: true // Auto-resizing, read: https://github.com/VodkaBears/Vide#resizing
1531                });
1532            });
1533        }
1534
1535    })(jQuery);
1536}
1537
1538/* ---------------------------------------------
1539 Sticky Sidebar
1540 --------------------------------------------- */
1541
1542function stickySidebar() {
1543    (function($){
1544        var $stickySidebar   = $(".sidebar-fixed").children('.sidebar-inner'),
1545            $window    = $(window),
1546            topPadding = 100,
1547            parentSection = $('.main-section.page-section'),
1548            parentSectionOffset = parentSection.offset(),
1549            parentSectionPadding = parseInt(parentSection.css('padding-top'));
1550
1551        $stickySidebar.imagesLoaded(function(){
1552            var height = $stickySidebar.height(),
1553                offset     = $stickySidebar.offset(),
1554                footerHeight = parseInt($('.footer').last().outerHeight(true), 10),
1555                mainSectionPB = parseInt($('.main-section.page-section').css('padding-bottom'), 10),
1556                topSpace,
1557                bottomSpace;
1558
1559            $stickySidebar.parent().css('height', '');
1560            $stickySidebar.parent().height(height);
1561
1562            if ($('.sticky-wrapper').length) {
1563                topSpace = 85;
1564            } else {
1565                topSpace = 0;
1566            };
1567
1568            if ($('.footer').length) {
1569                bottomSpace = footerHeight + mainSectionPB ;
1570            } else {
1571                bottomSpace = mainSectionPB ;
1572            };
1573
1574            $stickySidebar.sticky({
1575                topSpacing: topSpace,
1576                bottomSpacing: bottomSpace
1577            });
1578        });
1579    })(jQuery);
1580
1581}
1582
1583/* ---------------------------------------------
1584 Split section
1585 --------------------------------------------- */
1586
1587function split_height_init(){
1588    (function($){
1589
1590        $(".ssh-table, .split-section-content").css("height", "auto");
1591
1592        if ($(window).width() > 992) {
1593            $(".split-section").each(function(){
1594                var split_section_height = $(this).find(".split-section-content").innerHeight();
1595                $(this).find(".ssh-table").height(split_section_height);
1596            });
1597        }
1598
1599    })(jQuery);
1600}
1601
1602/* ---------------------------------------------
1603 match height
1604 --------------------------------------------- */
1605
1606 function enableMatchHeight() {
1607
1608    var mhEl = jQuery('.matchHeight-element');
1609
1610    if ( ! mhEl.length || typeof jQuery.fn.matchHeight != 'function' ) {
1611        return
1612    };
1613
1614    mhEl.imagesLoaded(function(){
1615        mhEl.matchHeight();
1616        jQuery.fn.matchHeight._afterUpdate = function(event, groups) {
1617            mhEl.addClass('matchHeight-applied');
1618        }
1619    });
1620 }
1621
1622}
1623/*
1624     FILE ARCHIVED ON 22:41:17 Mar 31, 2022 AND RETRIEVED FROM THE
1625     INTERNET ARCHIVE ON 18:32:46 Jul 17, 2023.
1626     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
1627
1628     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
1629     SECTION 108(a)(3)).
1630*/
1631/*
1632playback timings (ms):
1633  captures_list: 64.11
1634  exclusion.robots: 0.073
1635  exclusion.robots.policy: 0.063
1636  RedisCDXSource: 0.614
1637  esindex: 0.008
1638  LoadShardBlock: 41.013 (3)
1639  PetaboxLoader3.datanode: 63.356 (5)
1640  load_resource: 111.912
1641  PetaboxLoader3.resolve: 48.857
1642  loaddict: 44.156
1643*/

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.