PageSourceSearch

https://ekodim.org.ua/wp-content/themes/monolit/js/scripts.js

js ekodim.org.ua collected 2026-10-07 21:10:21 UTC 48,564 bytes, 1,254 lines download raw bytes

1jQuery(window).load(function() {
2    "use strict";
3    if(jQuery("#monolit-loader").length){
4        jQuery(".loader").fadeOut(500, function() {
5            jQuery("#main-theme").animate({
6                opacity: "1"
7            },function(){contanimshow();});
8        });
9    }else{
10        contanimshow();
11    }
12});
13function initMonolit() {
14    "use strict";
15    var ss = jQuery(".single-slider");
16    var ss_ops = ss.data('options') ? ss.data('options') : {smartSpeed:1300,autoplay:false,autoplaySpeed: 3600,items:1,autoplayTimeout:4000,responsive:false,autoHeight:true,loop:true,dots:true,center:false,autoWidth:false};
17    if(ss_ops.responsive){
18        var respArr = ss_ops.responsive.split(',');
19        ss_ops.responsive = {};
20        for (var i = 0; i < respArr.length ; i++){
21            var tempVal = respArr[i].split(':');
22            ss_ops.responsive[tempVal[0]] = { items: tempVal[1] };
23
24        }
25    }else{
26        ss_ops.responsive = false;
27    }
28    ss.imagesLoaded( function() {
29        ss.owlCarousel({
30            margin: 0,
31            items: ss_ops.items,
32            smartSpeed: ss_ops.smartSpeed,
33            loop: ss_ops.loop,
34            nav: false,
35            dots:ss_ops.dots,
36            autoHeight: ss_ops.autoHeight,
37            autoplay: ss_ops.autoplay,
38            autoplayTimeout: ss_ops.autoplayTimeout,
39            autoplaySpeed: ss_ops.autoplaySpeed,
40            responsive:ss_ops.responsive,
41            center:ss_ops.center,
42            autoWidth:ss_ops.autoWidth,
43        });
44    });
45    jQuery(document).on('keydown.carousel-ss', function(e) {
46        if(e.keyCode == 37) {
47            console.log('left arrow');
48            ss.trigger("prev.owl");
49        };
50        if(e.keyCode == 39) {
51            ss.trigger("next.owl");
52        };
53    });
54    jQuery(".single-slider-holder a.next-slide").on("click", function() {
55        jQuery(this).closest(".single-slider-holder").find(ss).trigger("next.owl.carousel");
56        return false;
57    });
58    jQuery(".single-slider-holder a.prev-slide").on("click", function() {
59        jQuery(this).closest(".single-slider-holder").find(ss).trigger("prev.owl.carousel");
60        return false;
61    });
62    var sync1 = jQuery(".hero-wrap-image-slider"), sync2 = jQuery(".hero-wrap-text-slider"), flag = false, duration = parseInt(sync1.data('dur')), rtlt = eval(jQuery(this).data("rtlt"));
63    var sync2_ops = sync2.data('options') ? sync2.data('options') : {smartSpeed:1200,autoplay:false,autoplaySpeed: 3600,items:1,autoplayTimeout:4000,responsive:false,loop:false,dots:true,center:false};
64    if(sync2_ops.responsive){
65        var respArr = sync2_ops.responsive.split(',');
66        sync2_ops.responsive = {};
67        for (var i = 0; i < respArr.length ; i++){
68            var tempVal = respArr[i].split(':');
69            sync2_ops.responsive[tempVal[0]] = { items: tempVal[1] };
70
71        }
72    }else{
73        sync2_ops.responsive = false;
74    }
75    sync1.owlCarousel({
76        loop: false,
77        margin: 0,
78        nav: false,
79        items: sync2_ops.items,
80        dots: false,
81        smartSpeed: sync2_ops.smartSpeed,
82        autoHeight: false,
83        autoplay: false,
84        autoplayTimeout: sync2_ops.autoplayTimeout,
85        autoplaySpeed: sync2_ops.autoplaySpeed,
86        responsive:sync2_ops.responsive,
87        center:sync2_ops.center,
88        autoWidth:false,
89    }).on("changed.owl.carousel", function(a) {
90        if (!flag) {
91            flag = true;
92            sync2.trigger("to.owl.carousel", [ a.item.index, duration, true ]);
93            flag = false;
94        }
95    });
96    sync2.owlCarousel({
97        loop: false,
98        margin: 0,
99        nav: false,
100        items: sync2_ops.items,
101        dots: sync2_ops.dots,
102        smartSpeed: sync2_ops.smartSpeed,
103        autoHeight: false,
104        autoplay: sync2_ops.autoplay,
105        autoplayTimeout: sync2_ops.autoplayTimeout,
106        autoplaySpeed: sync2_ops.autoplaySpeed,
107        responsive:sync2_ops.responsive,
108        center:sync2_ops.center,
109        autoWidth:false,
110    }).on("changed.owl.carousel", function(a) {
111        if (!flag) {
112            flag = true;
113            sync1.trigger("to.owl.carousel", [ a.item.index, duration, true ]);
114            flag = false;
115        }
116    });
117    jQuery(".hero-wrap-text-slider-holder a.next-slide").on("click", function() {
118        jQuery(this).closest(".hero-wrap-text-slider-holder").find(sync2).trigger("next.owl.carousel");
119        return false;
120    });
121    jQuery(".hero-wrap-text-slider-holder a.prev-slide").on("click", function() {
122        jQuery(this).closest(".hero-wrap-text-slider-holder").find(sync2).trigger("prev.owl.carousel");
123        return false;
124    });
125    //new home slider with loop
126    jQuery('.home-slider-loop').each(function(){
127        var slloop = jQuery(this);
128        var slloop_ops = slloop.data('options') ? slloop.data('options') : {smartSpeed:1200,autoplay:false,autoplaySpeed: 3600,items:1,autoplayTimeout:4000,responsive:false,loop:true,dots:true,center:false};
129        if(slloop_ops.responsive){
130            var respArr = slloop_ops.responsive.split(',');
131            slloop_ops.responsive = {};
132            for (var i = 0; i < respArr.length ; i++){
133                var tempVal = respArr[i].split(':');
134                slloop_ops.responsive[tempVal[0]] = { items: tempVal[1] };
135
136            }
137        }else{
138            slloop_ops.responsive = false;
139        }
140        slloop.owlCarousel({
141            loop: slloop_ops.loop,
142            margin: 0,
143            nav: false,
144            items: slloop_ops.items,
145            dots: slloop_ops.dots,
146            smartSpeed: slloop_ops.smartSpeed,
147            autoHeight: false,
148            autoplay: slloop_ops.autoplay,
149            autoplayTimeout: slloop_ops.autoplayTimeout,
150            autoplaySpeed: slloop_ops.autoplaySpeed,
151            responsive:slloop_ops.responsive,
152            center:slloop_ops.center,
153            autoWidth:false,
154
155            // animateOut: 'fadeOut',
156            // animateIn: 'fadeIn'
157        });
158        jQuery(".hero-wrap-image-slider-holder a.next-slide").on("click", function() {
159            jQuery(this).closest(".hero-wrap-image-slider-holder").find(slloop).trigger("next.owl.carousel");
160            return false;
161        });
162        jQuery(".hero-wrap-image-slider-holder a.prev-slide").on("click", function() {
163            jQuery(this).closest(".hero-wrap-image-slider-holder").find(slloop).trigger("prev.owl.carousel");
164            return false;
165        });
166    
167    });
168    var gR = jQuery(".gallery_horizontal"), w = jQuery(window);//, cf = jQuery(".gallery_horizontal").data("cen");
169    var gR_ops = gR.data('options') ? gR.data('options') : {smartSpeed:1300,autoplay:false,items:1,loop:true,center:true,autoWidth:true,thumbs:true};
170    function initGalleryhorizontal() {
171        var a = jQuery(window).height(), b = jQuery("header.monolit-header").outerHeight(), c = jQuery(".gallery_horizontal");
172        var d = 0;
173        if(!jQuery(".control-panel").hasClass('hide-cpanel')) d = jQuery(".control-panel").outerHeight();
174        c.find("img").css({
175            height: a - b - d - 20
176        });
177        // if (gR.find(".owl-stage-outer").length) {
178        //     gR.trigger("destroy.owl.carousel");
179        //     gR.find(".horizontal_item").unwrap();
180        // }
181        if (w.width() > 1036){
182            gR.owlCarousel({
183                autoWidth: gR_ops.autoWidth,
184                margin: 10,
185                items: gR_ops.items,
186                smartSpeed: gR_ops.smartSpeed,
187                loop: gR_ops.loop,
188                autoplay: gR_ops.autoplay,
189                center: gR_ops.center,
190                nav: false,
191                thumbs: gR_ops.thumbs,
192                thumbImage: true,
193                thumbContainerClass: "owl-thumbs",
194                thumbItemClass: "owl-thumb-item",
195                onInitialized: function() {
196                    // gR.find(".owl-stage").css({
197                    //     height: a - b - d,
198                    //     overflow: "hidden"
199                    // });
200                    var c = jQuery(".owl-carousel").find(".active").find(".horizontal_item");
201                    var e = c.data("phdesc");
202                    var f = c.data("phname");
203                    if (e) jQuery(".caption").html("<h4>" + f + "</h4><p>" + e + "</p>");
204                }
205            }).on("changed.owl.carousel", function(a) {
206                gR.find(".owl-stage").css({
207                    height: a - b - d,
208                    overflow: "hidden"
209                });
210            });
211
212            var full_in_mousewheel_pro = false;
213                
214            gR.on("translated.owl.carousel", function(a) {
215                full_in_mousewheel_pro = false;
216            });
217            
218            gR.on("mousewheel", ".owl-stage", function(a) {
219                if(!full_in_mousewheel_pro) {
220                    full_in_mousewheel_pro = true;
221                    if (a.deltaY < 0) gR.trigger("next.owl"); else gR.trigger("prev.owl");
222                }
223                a.preventDefault();
224            });
225
226            gR.closest('.monolit_sec').css('height', a );
227
228        }else{
229            if (gR.find(".owl-stage-outer").length) {
230                gR.trigger("destroy.owl.carousel");
231                //gR.find(".horizontal_item").unwrap();
232            }
233            gR.closest('.monolit_sec').css('height',c.outerHeight() );
234        }
235    }
236    if (gR.length) {
237        gR.imagesLoaded( function() {
238            initGalleryhorizontal();
239            w.on("resize.destroyhorizontal", function() {
240                setTimeout(initGalleryhorizontal, 150);
241            });
242        });
243    }
244    // jQuery(window).on('resize',function(){
245    //     if(gR.find(".owl-stage-outer").length) gR.trigger('refresh.owl.carousel');
246    // });
247    jQuery(document).on('keydown.carousel-hz', function(e) {
248        if(e.keyCode == 37) {
249            gR.trigger("prev.owl");
250        };
251        if(e.keyCode == 39) {
252            gR.trigger("next.owl");
253        };
254    });
255
256    /*new from version 1.5 */
257    // var full_in_mousewheel_pro = false;
258    // jQuery(".mousecontr").each(function(){
259    //     var slider = jQuery(this);
260        
261    //     slider.on("translated.owl.carousel", function(a) {
262    //         full_in_mousewheel_pro = false;
263    //     });
264        
265    //     slider.on("mousewheel", ".owl-stage", function(a) {
266    //         if(!full_in_mousewheel_pro) {
267    //             full_in_mousewheel_pro = true;
268    //             if (a.deltaY < 0) slider.trigger("next.owl"); else slider.trigger("prev.owl");
269    //         }
270    //         a.preventDefault();
271    //     });
272    // });
273    jQuery(".keyboardcontr").each(function(){
274        var slider = jQuery(this);
275        jQuery(document).on('keydown.slider-carousel', function(e) {
276            if(e.keyCode == 37) {
277                slider.trigger("prev.owl");
278            };
279            if(e.keyCode == 39) {
280                slider.trigger("next.owl");
281            };
282        });
283    });
284
285    jQuery(".refrestonresizeowl").each(function(){
286        var slider = jQuery(this);
287        jQuery(window).on('resize',function(){
288            if(slider.find(".owl-stage-outer").length) slider.trigger('refresh.owl.carousel');
289        });
290    });
291
292    /* end new from version 1.5 */
293    /*if(jQuery('.monolit_folio_head_sec').length == 0 && jQuery('.content-footer').length == 0){
294        gR.on("mousewheel", ".owl-stage", function(a) {
295            if (a.deltaY < 0) gR.trigger("next.owl"); else gR.trigger("prev.owl");
296            a.stopPropagation();
297            a.preventDefault();
298        });
299    }*/
300    
301    gR.on("translated.owl.carousel", function(a) {
302        var b = jQuery(this).find(".active").find(".horizontal_item").data("phdesc");
303        var c = jQuery(this).find(".active").find(".horizontal_item").data("phname");
304        if (b) jQuery(".caption").html("<h4>" + c + "</h4><p>" + b + "</p>");
305    });
306    jQuery(".resize-carousel-holder a.next-slide").on("click", function() {
307        jQuery(this).closest(".resize-carousel-holder").find(gR).trigger("next.owl.carousel");
308        return false;
309    });
310    jQuery(".resize-carousel-holder a.prev-slide").on("click", function() {
311        jQuery(this).closest(".resize-carousel-holder").find(gR).trigger("prev.owl.carousel");
312        return false;
313    });
314    var gf = jQuery(".full-screen-gallery"), w2 = jQuery(window);
315    var gf_ops = gf.data('options') ? gf.data('options') : {smartSpeed:1300,autoplay:false,items:1,loop:true,center:false,autoWidth:false,thumbs:false,responsive:false};
316    if(gf_ops.responsive){
317        var respArr = gf_ops.responsive.split(',');
318        gf_ops.responsive = {};
319        for (var i = 0; i < respArr.length ; i++){
320            var tempVal = respArr[i].split(':');
321            gf_ops.responsive[tempVal[0]] = { items: tempVal[1] };
322
323        }
324    }else{
325        gf_ops.responsive = false;
326    }
327    function initGalleryFullscreen() {
328        var a = jQuery(window).height(), b = jQuery(".full-screen-gallery"), c = jQuery(".control-panel").outerHeight(), d = jQuery(".resize-carousel-holder").outerHeight(), e = jQuery(".full-screen-gallery .full-screen-item");
329        if(!b.is('.autowidth-yes') && !b.is('.autoheight-yes')){
330            b.css({
331                height: d - c
332            });
333            e.css({
334                height: d
335            });
336        }
337        gf.owlCarousel({
338            autoWidth: gf_ops.autoWidth,
339            margin: 0,
340            items: gf_ops.items,
341            smartSpeed: gf_ops.smartSpeed,
342            loop: gf_ops.loop,
343            autoplay: gf_ops.autoplay,
344            center: gf_ops.center,
345            nav: false,
346            thumbs: gf_ops.thumbs,
347            responsive: gf_ops.responsive
348        });
349    }
350    if (gf.length) {
351        gf.imagesLoaded( function() {
352            initGalleryFullscreen();
353            w2.on("resize.destroyfullscreen", function() {
354                setTimeout(initGalleryFullscreen, 150);
355            });
356        });
357    }
358    jQuery(document).on('keydown.carousel-fs', function(e) {
359        if(e.keyCode == 37) {
360            gf.trigger("prev.owl");
361        };
362        if(e.keyCode == 39) {
363            gf.trigger("next.owl");
364        };
365    });
366    /*gf.on("mousewheel", ".owl-stage", function(a) {
367        if (a.deltaY < 0) gf.trigger("next.owl"); else gf.trigger("prev.owl");
368        a.preventDefault();
369    });*/
370    jQuery(".full-screen-gallery-holder a.next-slide").on("click", function() {
371        jQuery(this).closest(".full-screen-gallery-holder").find(gf).trigger("next.owl.carousel");
372        return false;
373    });
374    jQuery(".full-screen-gallery-holder a.prev-slide").on("click", function() {
375        jQuery(this).closest(".full-screen-gallery-holder").find(gf).trigger("prev.owl.carousel");
376        return false;
377    });
378    jQuery(".single-popup-image").lightGallery({
379        selector: "this",
380        cssEasing: "cubic-bezier(0.25, 0, 0.25, 1)",
381        download: false,
382        counter: false
383    });
384    // woo lightgallery
385    if(jQuery('.woocommerce-product-gallery__wrapper').length){
386        jQuery('.woocommerce-product-gallery__wrapper').each(function(){
387            var $woolg = jQuery(this);
388            $woolg.lightGallery({
389                selector: ".woocommerce-product-gallery__image a",
390                cssEasing: "cubic-bezier(0.25, 0, 0.25, 1)",
391                download: false,
392                loop: true,
393                thumbnail:false
394            });
395        });
396    }
397    var $lg = jQuery(".lightgallery"), dlt = $lg.data("looped");
398    $lg.lightGallery({
399        selector: ".lightgallery a.popup-image",
400        cssEasing: "cubic-bezier(0.25, 0, 0.25, 1)",
401        download: false,
402        loop: dlt,
403        thumbnail:false
404    });
405    jQuery(".lightgallery").on("onBeforeNextSlide.lg", function(a) {
406        gR.trigger("next.owl.carousel");
407        gf.trigger("next.owl.carousel");
408        ss.trigger("next.owl.carousel");
409    });
410    jQuery(".lightgallery").on("onBeforePrevSlide.lg", function(a) {
411        gR.trigger("prev.owl.carousel");
412        gf.trigger("prev.owl.carousel");
413        ss.trigger("prev.owl.carousel");
414    });
415    function initFolioGal(){
416        console.log('initFolioGal is called');
417        if(jQuery(".folio-gallery").length){
418            jQuery(".folio-gallery").each(function(){
419                var $folg = jQuery(this), dlt = $folg.data("looped");
420                if( $folg.data('lightGallery') != undefined){
421                    $folg.data('lightGallery').destroy(true);
422                }
423                $folg.lightGallery({
424                    //selector: ".folio-gallery .folio-popup-gallery",
425                    selector: ".folio-gallery .portfolio_item:not([style*='display: none']) .folio-popup-gallery,.folio-gallery .gallery-item:not([style*='display: none']) .folio-popup-gallery",
426                    cssEasing: "cubic-bezier(0.25, 0, 0.25, 1)",
427                    download: false,
428                    loop: dlt,
429                    thumbnail:false,
430                    youtubePlayerParams: { modestbranding: 1, showinfo: 0, controls: 1 },
431                    vimeoPlayerParams: { byline : 0, portrait : 0, color : 'CCCCCC' },
432                    dailymotionPlayerParams: {}
433                });
434            });
435        }
436    }
437    initFolioGal();
438    var slsl = jQuery(".slideshow-item");
439    var slsl_ops = slsl.data('options') ? slsl.data('options') : {autoplaySpeed: 3600,items:1,autoplayTimeout:4000};
440    slsl.owlCarousel({
441        loop: true,
442        margin: 0,
443        nav: false,
444        items: slsl_ops.items,
445        dots: false,
446        animateOut: "fadeOut",
447        animateIn: "fadeIn",
448        autoplay: true,
449        autoplayTimeout: slsl_ops.autoplayTimeout,
450        autoplayHoverPause: false,
451        autoplaySpeed: slsl_ops.autoplaySpeed
452    });
453    var tsh = jQuery(".testimon-slider");
454    var tsh_ops = tsh.data('options') ? tsh.data('options') : {smartSpeed:1300,autoplay:false,autoplaySpeed: 3600,items:1,autoplayTimeout:4000,responsive:false,autoHeight:true,loop:true,dots:false,center:false,autoWidth:false};
455    if(tsh_ops.responsive){
456        var respArr = tsh_ops.responsive.split(',');
457        tsh_ops.responsive = {};
458        for (var i = 0; i < respArr.length ; i++){
459            var tempVal = respArr[i].split(':');
460            tsh_ops.responsive[tempVal[0]] = { items: tempVal[1] };
461
462        }
463    }else{
464        tsh_ops.responsive = false;
465    }
466    tsh.owlCarousel({
467        margin: 0,
468        items: tsh_ops.items,
469        smartSpeed: tsh_ops.smartSpeed,
470        loop: tsh_ops.loop,
471        nav: false,
472        dots:tsh_ops.dots,
473        autoHeight: tsh_ops.autoHeight,
474        autoplay: tsh_ops.autoplay,
475        autoplayTimeout: tsh_ops.autoplayTimeout,
476        autoplaySpeed: tsh_ops.autoplaySpeed,
477        responsive:tsh_ops.responsive,
478        center:tsh_ops.center,
479        autoWidth:tsh_ops.autoWidth,
480    });
481    jQuery(".testimon-slider-holder a.next-slide").on("click", function() {
482        jQuery(this).closest(".testimon-slider-holder").find(tsh).trigger("next.owl.carousel");
483    });
484    jQuery(".testimon-slider-holder a.prev-slide").on("click", function() {
485        jQuery(this).closest(".testimon-slider-holder").find(tsh).trigger("prev.owl.carousel");
486    });
487    var ts = jQuery(".show-thumbs").data("textshow");
488    var th = jQuery(".show-thumbs").data("texthide");
489    jQuery(".show-thumbs").text(ts);
490    function showThumbs() {
491        jQuery(".show-thumbs").removeClass("vis-t");
492        jQuery(".owl-thumbs").addClass("vis-thumbs");
493        jQuery(".show-thumbs").text(th);
494        setTimeout(function() {
495            jQuery(".owl-thumb-item").addClass("himask");
496        }, 650);
497    }
498    function hideThumbs() {
499        jQuery(".show-thumbs").text(ts);
500        jQuery(".show-thumbs").addClass("vis-t");
501        jQuery(".owl-thumbs").removeClass("vis-thumbs");
502        jQuery(".owl-thumb-item").removeClass("himask");
503    }
504    jQuery(".show-thumbs").on("click", function() {
505        if (jQuery(this).hasClass("vis-t")) showThumbs(); else hideThumbs();
506        return false;
507    });
508    jQuery(document).on("click", ".owl-thumb-item", function() {
509        hideThumbs();
510        return false;
511    });
512    // css functionts------------------
513    function a() {
514        jQuery(".hero-wrap-image-slider .item").css({
515            height: jQuery(".hero-wrap-image-slider").outerHeight(true)
516        });
517        jQuery(".hero-wrap-text-slider .item").css({
518            height: jQuery(".hero-wrap-text-slider").outerHeight(true)
519        });
520        jQuery(".home-slider-loop .item").css({
521            height: jQuery(".home-slider-loop").outerHeight(true)
522        });
523        jQuery(".slideshow-item .item").css({
524            height: jQuery(".slideshow-item ").outerHeight(true)
525        });
526        setTimeout(function(){ 
527            jQuery(".height-emulator").css({
528                height: jQuery(".content-footer").outerHeight(true)
529            });
530        }, 1000);
531
532        jQuery(".team-social").css({
533            "margin-top": -1 * jQuery(".team-social").height() / 2 + "px"
534        });
535        var a = jQuery(window).height(), b = jQuery("header.monolit-header").outerHeight(), c = jQuery(".p_horizontal_wrap");
536        var d = jQuery(window).width();
537        var e = 0;
538        if(jQuery('.portfolio-pagination').length)
539            e = jQuery('.portfolio-pagination').outerHeight();
540        c.css("height", a - b - 30 - e);
541        if(jQuery('.portfolio-pagination').length) 
542            jQuery(".resize-carousel-holder").css("height", a - b - e);
543        
544        //if (d <= 768) c.css("height", a - b - 60 - e);
545        var hoz_folio_height = jQuery("#portfolio_horizontal_container").outerHeight();
546        if (d <= 768) c.css("height", hoz_folio_height );
547        jQuery(" #portfolio_horizontal_container .portfolio_item img  ").css({
548            height: jQuery(".portfolio_item").outerHeight(true)
549        });
550        if (jQuery(window).width() > 1036){
551            jQuery('.nav-holder').css('display','block');
552        }else{
553            jQuery('.nav-holder').css('display','none');
554        }
555        /* home landing page */
556        if(jQuery(".landing-logo-inner").length){
557            jQuery(".landing-logo-inner").css({
558                "margin-top": -1 * jQuery(".landing-logo-inner").height() / 2 + "px"
559            });
560            jQuery(".box-inner").css({
561                "margin-top": -1 * jQuery(".box-inner").height() / 2 + "px"
562            });
563        }
564        
565    }
566    a();
567    jQuery(window).resize(function() {
568        a();
569    });
570    if(jQuery('#iframe-demo').length){
571        jQuery(".box li a").on("mouseenter", function() {
572            var goTo = jQuery(this).attr("href");
573            jQuery("#iframe-demo").attr("src",goTo);
574        });
575    }
576    // scroll animation ------------------
577    var i = 1;
578    jQuery(document.body).on("appear", ".stats", function(a) {
579        if (1 === i) k(2600);
580        i++;
581    });
582    function number(a, b, c, d) {
583        if (d) {
584            var e = 0;
585            var f = parseInt(d / a) // + 3000; // 3000 for 3 seconds
586            var g = setInterval(function() {
587                if (e - 1 < a) c.html(e); else {
588                    c.html(b);
589                    clearInterval(g);
590                }
591                e++;
592            }, f);
593        } else c.html(b);
594    }
595    function k(a) {
596        jQuery(".stats .num").each(function() {
597            var b = jQuery(this);
598            var c = b.attr("data-num");
599            var d = b.attr("data-content");
600            number(c, d, b, a);
601        });
602    }
603    jQuery(".animaper").appear();
604    jQuery(document.body).on("appear", ".piechart-holder", function() {
605        jQuery(this).find(".chart").each(function() {
606            var a = jQuery(".piechart-holder").data("skcolor"),
607                b = jQuery(".piechart-holder").data("pies"),
608                c = jQuery(".piechart-holder").data("pielw");
609            jQuery(".chart").easyPieChart({
610                barColor: a,
611                trackColor: "transparent",
612                scaleColor: "transparent",
613                size: b,
614                lineWidth: c,
615                lineCap: "butt",
616                onStep: function(a, b, c) {
617                    jQuery(this.el).find(".percent").text(Math.round(c));
618                }
619            });
620        });
621    });
622    jQuery(document.body).on("appear", ".skillbar-box", function() {
623        jQuery(this).find("div.skillbar-bg").each(function() {
624            jQuery(this).find(".custom-skillbar").delay(600).animate({
625                width: jQuery(this).attr("data-percent")
626            }, 1500);
627        });
628    });
629
630    // Background video ------------------
631    jQuery(".background-youtube").each(function(){
632        var $that   = jQuery(this),
633            vid     = $that.data('vid'),
634            mt     = $that.data('mv'),
635            ql     = $that.data('ql') ? $that.data('ql') : 'highres',
636            pos     = $that.data('pos');
637
638        $that.YTPlayer({
639            fitToBackground: true,
640            videoId: vid,
641            pauseOnScroll: pos,
642            mute: mt,
643
644            // repeat: false,
645            //ratio: 16 / 9,// 4/3
646            callback: function() {
647                var a = $that.data("ytPlayer").player;
648                a.setPlaybackQuality(ql);//small,medium,large,hd720,hd1080,highres,default
649            },
650        });
651    });
652    jQuery(".background-vimeo").each(function(){
653        var $that       = jQuery(this),
654            options     = $that.data('opts') ? $that.data('opts') : {video: '143243001',quality: '1080p',mute: '1', loop: '1'};
655        var url         = '//player.vimeo.com/video/' + options.video;
656        if(options.mute == '1') url +='?background=1&quality='+options.quality+'&loop='+options.loop;
657        else url += '?autoplay=1&quality='+options.quality+'&loop='+options.loop;
658        $that.append('<iframe src="' + url + '"  frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe>');
659
660    });
661    jQuery(".video-holder").height(jQuery(".media-container").height());
662    if (jQuery(window).width() > 1024) {
663        if (jQuery(".video-holder").size() > 0) {
664            if (jQuery(".media-container").height() / 9 * 16 > jQuery(".media-container").width()) {
665                jQuery(".background-vimeo iframe ").height(jQuery(".media-container").height()).width(jQuery(".media-container").height() / 9 * 16);
666                jQuery(".background-vimeo iframe ").css({
667                    "margin-left": -1 * jQuery("iframe").width() / 2 + "px",
668                    top: "-75px",
669                    "margin-top": "0px"
670                });
671            } else {
672
673                jQuery(".background-vimeo iframe ").width(jQuery(window).width()).height(jQuery(window).width() / 16 * 9);
674                jQuery(".background-vimeo iframe ").css({
675                    "margin-left": -1 * jQuery("iframe").width() / 2 + "px",
676                    "margin-top": -1 * jQuery("iframe").height() / 2 + "px",
677                    top: "50%"
678                });
679            }
680        }
681    } else if (jQuery(window).width() < 760) {
682        jQuery(".video-holder").height(jQuery(".media-container").height());
683        jQuery(".background-vimeo iframe ").height(jQuery(".media-container").height());
684    } else {
685        jQuery(".video-holder").height(jQuery(".media-container").height());
686        jQuery(".background-vimeo iframe ").height(jQuery(".media-container").height());
687    }
688    // Isotope ------------------
689    function n() {
690        if (jQuery(".gallery-items").length) {
691            var a = jQuery(".gallery-items").isotope({
692                itemSelector: ".gallery-item, .gallery-item-second, .gallery-item-three",
693                percentPosition: true,
694                masonry: {
695                    // use outer width of grid-sizer for columnWidth
696                    columnWidth: ".grid-sizer, .grid-sizer-second, .grid-sizer-three",
697                    //isFitWidth: true
698                },
699                transformsEnabled: true,
700                transitionDuration: "700ms",
701            });
702            a.imagesLoaded(function() {
703                a.isotope("layout");
704            });
705            jQuery(".gallery-filters").on("click", "a.gallery-filter", function(b) {
706                b.preventDefault();
707                var c = jQuery(this).attr("data-filter");
708                a.isotope({
709                    filter: c
710                });
711                jQuery(".gallery-filters a.gallery-filter").removeClass("gallery-filter-active");
712                jQuery(this).addClass("gallery-filter-active");
713                return false;
714            });
715            // if(jQuery('main .products > .product').length){
716            //     jQuery(".gallery-filters").on("click", "a.gallery-filter", function(b) {
717            //         b.preventDefault();
718            //         var c = jQuery(this).attr("data-filter");
719
720            //         var $products = jQuery('.products > .product');
721            //         if(c == '*'){
722            //             $products.fadeIn();
723            //         }else{
724            //             $products.fadeOut();
725
726            //             jQuery('.products > .product'+c).fadeIn();
727            //         }
728
729            //         jQuery(".gallery-filters a.gallery-filter").removeClass("gallery-filter-active");
730            //         jQuery(this).addClass("gallery-filter-active");
731            //         return false;
732            //     });
733            // }
734                
735
736            a.isotope("on", "layoutComplete", function(a, b) {
737                jQuery.each(a, function(index,value){
738                    var $this = jQuery(value.element);
739                    if($this.is('.is_folio_video')){
740                        var a = $this.outerHeight();
741                    }
742                });
743                var b = a.length;
744                jQuery(".num-album").html(b);
745            });
746            a.on( 'arrangeComplete', function( event, filteredItems ) {
747                initFolioGal();
748            } );
749        }
750        var b = {
751            touchbehavior: false,
752            cursoropacitymax: 1,
753            cursorborderradius: "0",
754            background: "transparent",
755            cursorwidth: "4px",
756            cursorborder: "0px",
757            cursorcolor: "transparent",
758            autohidemode: true,
759            bouncescroll: false,
760            scrollspeed: 120,
761            mousescrollstep: 90,
762            grabcursorenabled: true,
763            horizrailenabled: false,
764            preservenativescrolling: true,
765            cursordragontouch: true
766        };
767        jQuery(".hid-sidebar").niceScroll(b);
768        var c = {
769            touchbehavior: true,
770            cursoropacitymax: 1,
771            cursorborderradius: "0",
772            background: "transparent",
773            cursorwidth: "10px",
774            cursorborder: "0px",
775            cursorcolor: "#191919",
776            autohidemode: false,
777            bouncescroll: false,
778            scrollspeed: 120,
779            mousescrollstep: 90,
780            grabcursorenabled: true,
781            horizrailenabled: true,
782            preservenativescrolling: true,
783            cursordragontouch: true,
784            railpadding: {
785                top: -10,
786                right: 0,
787                left: 0,
788                bottom: 0
789            },
790            zindex: 22,
791            //enablemousewheel: false,
792        };
793        if(jQuery(".p_horizontal_wrap").is('.hoz_has_headfoot_wrap')) c.enablemousewheel = false;
794        //jQuery(".p_horizontal_wrap:not('.hoz_has_headfoot_wrap')").niceScroll(c);
795        var d = jQuery("#portfolio_horizontal_container");
796        d.imagesLoaded(function(a, b, e) {
797            var f = {
798                itemSelector: ".portfolio_item",
799                layoutMode: "packery",
800                packery: {
801                    isHorizontal: true,
802                    gutter: 0
803                },
804                resizable: true,
805                transformsEnabled: true,
806                transitionDuration: "700ms"
807            };
808            var g = {
809                itemSelector: ".portfolio_item",
810                layoutMode: "packery",
811                packery: {
812                    isHorizontal: false,
813                    gutter: 0
814                },
815                resizable: true,
816                transformsEnabled: true,
817                transitionDuration: "700ms"
818            };
819            if (jQuery(window).width() <= 768) {
820                if(d.is('.hoz_has_headfoot'))
821                    d.isotope({
822                        itemSelector: ".portfolio_item",
823                        percentPosition: true,
824                        masonry: {
825                            // use outer width of grid-sizer for columnWidth
826                            //columnWidth: ".portfolio_item",
827                            //isFitWidth: true
828                        },
829                        transformsEnabled: true,
830                        transitionDuration: "700ms",
831                    });
832                else
833                    d.isotope(g);
834                    d.isotope("layout");
835                    if (jQuery(".p_horizontal_wrap").getNiceScroll()) jQuery(".p_horizontal_wrap").getNiceScroll().remove();
836            } else {
837                d.isotope(f);
838                d.isotope("layout");
839                jQuery(".p_horizontal_wrap").niceScroll(c);
840            }
841            jQuery(".gallery-filters").on("click", "a", function(a) {
842                a.preventDefault();
843                var b = jQuery(this).attr("data-filter");
844                d.isotope({
845                    filter: b
846                });
847                jQuery(".gallery-filters a").removeClass("gallery-filter_active");
848                jQuery(this).addClass("gallery-filter_active");
849            });
850            d.isotope("on", "layoutComplete", function(a, b) {
851                jQuery.each(a, function(index,value){
852                    var $this = jQuery(value.element);
853                    if($this.is('.is_folio_video')){
854                        var a = $this.outerHeight();
855                        $this.find(".resp-video-holder").css("height", a).find("iframe").css("height", a);
856                        $this.find(".resp-video-holder").css("width", a*1.61).find("iframe").css("width", a*1.61);//1.61 golden ratio
857                    }
858                });
859                var hoz_folio_height = jQuery("#portfolio_horizontal_container").outerHeight();
860                if (jQuery(window).width() <= 768) {
861                    jQuery('.p_horizontal_wrap').css("height", hoz_folio_height );
862                    jQuery('.resize-carousel-holder').css("height", hoz_folio_height );
863                    jQuery('.portfolio-horizontal').css("height", hoz_folio_height + jQuery('.portfolio-pagination').outerHeight() + 60 );
864                }
865                var b = a.length;
866                jQuery(".num-album").html(b);
867            });
868            d.on( 'arrangeComplete', function( event, filteredItems ) {
869                initFolioGal();
870            } );
871        });
872    }
873    jQuery(".grid-item a").on("click", function() {
874        var a = jQuery(this).attr("href");
875        window.location.href = a;
876        return false;
877    });
878    var j = jQuery(".portfolio_item , .gallery-item").length;
879    jQuery(".all-album , .num-album").html(j);
880    //n();
881    jQuery(window).load(function() {
882        n();
883    });
884
885    jQuery(".filter-button").addClass("act-filter");
886    jQuery(".filter-button").on("click", function() {
887        if (jQuery(this).hasClass("act-filter")){
888            showfilter();
889        }
890        else {
891            hidefilter();
892        }
893        return false;
894    });
895    function showfilter() {
896        jQuery(".filter-button").removeClass("act-filter");
897        jQuery(".hid-filter").slideDown(500);
898        jQuery(".resize-carousel-holder").addClass("visfilb");
899    }
900    function hidefilter() {
901        jQuery(".filter-button").addClass("act-filter");
902        jQuery(".hid-filter").slideUp(500);
903        jQuery(".resize-carousel-holder").removeClass("visfilb");
904    }
905    // Team hover  ------------------
906    jQuery(".team-box").hover(function() {
907        jQuery(this).find("ul.team-social").fadeIn();
908        jQuery(this).find(".team-social a").each(function(a) {
909            var b = jQuery(this);
910            setTimeout(function() {
911                b.animate({
912                    opacity: 1,
913                    top: "0"
914                }, 400);
915            }, 150 * a);
916        });
917    }, function() {
918        jQuery(this).find(".team-social a").each(function(a) {
919            var b = jQuery(this);
920            setTimeout(function() {
921                b.animate({
922                    opacity: 0,
923                    top: "50px"
924                }, 400);
925            }, 150 * a);
926        });
927        setTimeout(function() {
928            jQuery(this).find("ul.team-social").fadeOut();
929        }, 150);
930    });
931    // Scroll window ------------------
932    jQuery(".to-top").click(function() {
933        jQuery("html, body").animate({
934            scrollTop: 0
935        }, 1500);
936        return false;
937    });
938    jQuery(document).on("click", ".serv-item", function(a) {
939        var b = jQuery(this);
940        a.preventDefault();
941        jQuery(".serv-item").removeClass("act-ser");
942        b.addClass("act-ser");
943        jQuery("html, body").animate({
944            scrollTop: b.closest('.services-main-holder').find(".serv-post").offset().top - 120 //jQuery(".serv-post").offset().top - 120
945        }, {
946            queue: false,
947            duration: 1200,
948            easing: "easeInOutExpo"
949        });
950        jQuery(".serv-details").stop(true, true).css("display", "none");
951        jQuery(b.attr("href")).stop(true, true).fadeIn(500);
952    });
953    jQuery(".to-top").hover(function() {
954        if(_monolit.shuffle_off != '1')
955            jQuery(this).shuffleLetters({});
956        jQuery(".footer-wrap").addClass("tth");
957    }, function() {
958        jQuery(".footer-wrap").removeClass("tth");
959    });
960    jQuery(".scroll-nav  ul").singlePageNav({
961        filter: ":not(.external)",
962        updateHash: false,
963        offset: 70,
964        threshold: 120,
965        speed: 1200,
966        currentClass: "act-link",
967        beforeStart : function(){
968            if(jQuery(window).width() < 1037 ) hideMenu();
969        },
970        onComplete: function() {
971            if (jQuery(".scroll-nav  a").hasClass("act-link")) jQuery(".scroll-nav  a.act-link").each(function() {
972                // var a = jQuery(this).data("bgtex");
973                var a = jQuery(this).attr("title") != undefined ? jQuery(this).attr("title") : jQuery(this).text();
974                if(_monolit.shuffle_off != '1')
975                    jQuery(".footer-title h2").html(a);
976                else
977                    jQuery(".footer-title h2").html(a).shuffleLetters({});
978            });
979        }
980    });
981    jQuery(".scroll-page-nav  ul").singlePageNav({
982        filter: ":not(.external)",
983        updateHash: false,
984        offset: 70,
985        threshold: 120,
986        speed: 1200,
987        currentClass: "act-link"
988    });
989    jQuery(".custom-scroll-link,.menu-scroll-link").on("click", function() {
990        var a = 80;
991        if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") || location.hostname == this.hostname) {
992            var b = jQuery(this.hash);
993            b = b.length ? b : jQuery("[name=" + this.hash.slice(1) + "]");
994            if (b.length) {
995                jQuery("html,body").animate({
996                    scrollTop: b.offset().top - a
997                }, {
998                    queue: false,
999                    duration: 1600,
1000                    easing: "easeInOutExpo"
1001                });
1002                return false;
1003            }
1004        }
1005    });
1006    if(jQuery('.particular').length){
1007        jQuery(window).scroll(function() {
1008            if (jQuery(window).scrollTop() + jQuery(window).height() > jQuery(document).height() - 50) jQuery(".particular.footer-canvas").fadeIn(1); else jQuery(".particular.footer-canvas").fadeOut(1);
1009        });
1010        var cscl = jQuery('.particular').data('color') ? jQuery('.particular').data('color') : "rgba(255, 255, 255, .5)";
1011        jQuery(".particular").constellation({
1012            star: {
1013                width: 1
1014            },
1015            line: {
1016                color: cscl
1017            },
1018            radius: 350
1019        });
1020    }
1021    
1022    // Other functions  ------------------
1023    jQuery.fn.duplicate = function(a, b) {
1024        var c = [];
1025        for (var d = 0; d < a; d++) jQuery.merge(c, this.clone(b).get());
1026        return this.pushStack(c);
1027    };
1028    jQuery("<div class='scale-callback'></div>").duplicate(12).appendTo(".sb-bg");
1029    jQuery(".show-hid-sidebar").on("click", function(a) {
1030        a.preventDefault();
1031        jQuery(".hid-sidebar").addClass("vissb");
1032        setTimeout(function() {
1033            jQuery(".scale-callback").addClass("scale-bg5");
1034        }, 450);
1035        setTimeout(function() {
1036            jQuery(".sb-inner").addClass("sb-innervis");
1037            /* For gallery masonry on portfolio details */
1038            if (jQuery(".gallery-items").length) {
1039                var a = jQuery(".gallery-items").isotope({
1040                    itemSelector: ".gallery-item, .gallery-item-second, .gallery-item-three",
1041                    percentPosition: true,
1042                    masonry: {
1043                        columnWidth: ".grid-sizer, .grid-sizer-second, .grid-sizer-three",
1044                    },
1045                    transformsEnabled: true,
1046                    transitionDuration: "700ms",
1047                });
1048                a.imagesLoaded(function() {
1049                    a.isotope("layout");
1050                });
1051            }
1052        }, 800);
1053        jQuery(".sb-overlay").addClass("vis-overlay");
1054        return false;
1055    });
1056    jQuery(".close-sidebar , .sb-overlay").on("click", function() {
1057        jQuery(".hid-sidebar").removeClass("vissb");
1058        jQuery(".sb-inner").removeClass("sb-innervis");
1059        jQuery(".scale-callback").removeClass("scale-bg5");
1060        jQuery(".sb-overlay").removeClass("vis-overlay");
1061        return false;
1062    });
1063    var bgImage = jQuery(".bg");
1064    bgImage.each(function(a) {
1065        if (jQuery(this).attr("data-bg")) jQuery(this).css("background-image", "url(" + jQuery(this).data("bg") + ")");
1066    });
1067    if (jQuery(".hor-nav-layout").hasClass("hor-content")) {
1068        jQuery("header.monolit-header").addClass("fw-head");
1069        jQuery(".share-inner").addClass("hor-inner");
1070        jQuery(".content-holder").children('.content:first').css('padding-top','80px');
1071        jQuery(window).trigger('resize.destroyfullscreen');
1072    }
1073    // Share   ------------------
1074    var shs = eval(jQuery(".share-container").attr("data-share"));
1075    if(shs){
1076        jQuery(".share-container").share({
1077            networks: shs
1078        });
1079    }
1080    var blshs = eval(jQuery(".blog-share-container").attr("data-share"));
1081    if(blshs){
1082        jQuery(".blog-share-container").share({
1083            networks: blshs
1084        });
1085    }
1086    function hideShare() {
1087        jQuery(".share-inner").removeClass("visshare");
1088        jQuery(".show-share").addClass("isShare");
1089        jQuery(".share-container ").removeClass("vissc");
1090        jQuery("header.monolit-header").removeClass("vis-header-b");
1091    }
1092    function showShare() {
1093        jQuery(".share-inner").addClass("visshare");
1094        jQuery(".show-share").removeClass("isShare");
1095        setTimeout(function() {
1096            jQuery("header.monolit-header").addClass("vis-header-b");
1097            jQuery(".share-container ").addClass("vissc");
1098        }, 400);
1099    }
1100    jQuery(".show-share").on("click", function(a) {
1101        a.preventDefault();
1102        if (jQuery(".show-share").hasClass("isShare")) showShare(); else hideShare();
1103    });
1104    // Mobile bavigation   ------------------
1105    var nb = jQuery(".nav-button"), nh = jQuery(".nav-holder");
1106    function showMenu() {
1107        nb.removeClass("vis-m");
1108        nh.slideDown(500);
1109    }
1110    function hideMenu() {
1111        nb.addClass("vis-m");
1112        nh.slideUp(500);
1113    }
1114    nb.on("click", function() {
1115        if (jQuery(this).hasClass("vis-m")) showMenu(); else hideMenu();
1116    });
1117    var mobileHover = function () {
1118        jQuery('.portfolio_item,.grid-item-holder , nav li').on('touchstart', function () {
1119            jQuery(this).trigger('hover');
1120        }).on('touchend', function () {
1121            jQuery(this).trigger('hover');
1122        });
1123    };
1124
1125    mobileHover();
1126
1127    //initPopups();
1128}
1129function contanimshow() {
1130    var a = window.location.href;
1131    var b = jQuery(".dynamic-title").text();
1132    var ua = window.navigator.userAgent;
1133    var msie = ua.indexOf("MSIE ");
1134    jQuery(".footer-title a").attr("href", a);
1135    if(msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)){
1136        jQuery(".footer-title a").html(b);
1137    }else{
1138        jQuery(".footer-title a").html(b);
1139        if(_monolit.shuffle_off != '1')
1140        jQuery(".footer-title a").shuffleLetters({});
1141    }
1142    return false;
1143}
1144
1145// remove parallax and video on mobile   ------------------
1146function initparallax() {
1147    var a = {
1148        Android: function() {
1149            return navigator.userAgent.match(/Android/i);
1150        },
1151        BlackBerry: function() {
1152            return navigator.userAgent.match(/BlackBerry/i);
1153        },
1154        iOS: function() {
1155            return navigator.userAgent.match(/iPhone|iPad|iPod/i);
1156        },
1157        Opera: function() {
1158            return navigator.userAgent.match(/Opera Mini/i);
1159        },
1160        Windows: function() {
1161            return navigator.userAgent.match(/IEMobile/i);
1162        },
1163        any: function() {
1164            return a.Android() || a.BlackBerry() || a.iOS() || a.Opera() || a.Windows();
1165        }
1166    };
1167    trueMobile = a.any();
1168    if (null == trueMobile && _monolit.parallax_off != '1') {
1169        var b = jQuery("#main-theme");
1170
1171        if(b.find("[data-top-bottom]").length > 0){
1172            b.imagesLoaded( function() {
1173                s = skrollr.init();
1174                s.destroy();
1175                jQuery(window).resize(function() {
1176                    var a = jQuery(window).width();
1177                    if (a < 1036) s.destroy(); else skrollr.init({
1178                        forceHeight: !1,
1179                        easing: "easeInOutElastic",
1180                        mobileCheck: function() {
1181                            return !1;
1182                        }
1183                    });
1184                });
1185                skrollr.init({
1186                    forceHeight: !1,
1187                    easing: "easeInOutElastic",
1188                    mobileCheck: function() {
1189                        return !1;
1190                    }
1191                });
1192
1193            });
1194        }
1195        var c = jQuery(window).width();
1196        if (c < 1036) {
1197            s = skrollr.init();
1198            s.destroy();
1199        }
1200    }
1201    if (trueMobile) jQuery(".background-youtube , .background-vimeo").remove();
1202}
1203jQuery(document).ready(function($) {
1204    initMonolit();
1205    initparallax();
1206
1207    if (_monolit.enable_image_click == '1') {
1208        $(".gallery-item:not(.has-popup) .port-desc-holder").on("click", function(e) {
1209            e.preventDefault();
1210            var a = $(this).find('h3 a').attr("href");
1211            window.location.href = a;
1212            
1213        });
1214
1215        $(".portfolio_item:not(.has-popup) .port-desc-holder").on("click", function(e) {
1216            e.preventDefault();
1217            var a = $(this).find('h3 a').attr("href");
1218            window.location.href = a;
1219            
1220        });
1221
1222    }
1223
1224
1225    $(document).on("click",'li.menu-item-language a', function(e) {
1226        e.preventDefault();
1227        var a = $(this).attr("href");
1228        window.location.href = a;
1229        
1230    });
1231
1232    if(jQuery('main .products > .product').length){
1233        jQuery(".gallery-filters").on("click", "a.gallery-filter", function(b) {
1234            b.preventDefault();
1235            var c = jQuery(this).attr("data-filter");
1236
1237            var $products = jQuery('.products > .product');
1238            if(c == '*'){
1239                $products.fadeIn();
1240            }else{
1241                $products.fadeOut();
1242
1243                jQuery('.products > .product'+c).fadeIn();
1244            }
1245
1246            jQuery(".gallery-filters a.gallery-filter").removeClass("gallery-filter-active");
1247            jQuery(this).addClass("gallery-filter-active");
1248            return false;
1249        });
1250    }
1251            
1252
1253});
1254

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.