PageSourceSearch

https://calcbank.com.br/wp-content/themes/gurus/assets/js/theme.js?ver=1.0.6

js calcbank.com.br collected 2026-10-02 07:02:44 UTC 33,927 bytes, 854 lines download raw bytes

1;(function ($) {
2
3    "use strict";
4    
5    var pxl_scroll_top;
6    var pxl_window_height;
7    var pxl_window_width;
8    var pxl_scroll_status = '';
9    var pxl_last_scroll_top = 0;
10    var pxl_post_slip = false;
11
12    $(window).on('load', function () {
13        $(".pxl-loader").addClass("is-loaded");
14        $('.pxl-swiper-slider, .pxl-header-mobile-elementor, .pxl-slider').css('opacity', '1');
15        $('.pxl-gallery-scroll').parents('body').addClass('body-overflow').addClass('body-visible-sm');
16        pxl_window_width = $(window).width();
17        pxl_window_height = $(window).height();
18        gurus_header_sticky();
19        gurus_header_mobile();
20        gurus_scroll_to_top();
21        gurus_footer_fixed();
22        gurus_shop_quantity();
23        gurus_submenu_responsive();
24        gurus_panel_anchor_toggle();
25        gurus_post_grid();
26        
27    });
28
29    $(window).on('scroll', function () {
30        pxl_scroll_top = $(window).scrollTop();
31        pxl_window_height = $(window).height();
32        pxl_window_width = $(window).width();
33        if (pxl_scroll_top < pxl_last_scroll_top) {
34            pxl_scroll_status = 'up';
35        } else {
36            pxl_scroll_status = 'down';
37        }
38        pxl_last_scroll_top = pxl_scroll_top;
39        gurus_header_sticky();
40        gurus_scroll_to_top();
41        gurus_footer_fixed();
42        gurus_ptitle_scroll_opacity();
43        if (pxl_scroll_top < 100) {
44            $('.elementor > .pin-spacer').removeClass('scroll-top-active');
45        }
46        translateBackgroundSidebar();
47    });
48
49
50    $(window).on('resize', function () {
51        pxl_window_height = $(window).height();
52        pxl_window_width = $(window).width();
53        gurus_submenu_responsive();
54        gurus_header_mobile();
55        gurus_post_grid();
56    });
57
58
59    
60    function translateBackgroundSidebar() {
61        let section = $('#intro, #pxl-page-title-elementor, #pxl-page-title-default');
62        let bgHeader = $('#pxl-header-elementor .pxl-header-sidebar--left .elementor-background-overlay').first();0
63        if(section.length && bgHeader.length) {
64            let sectionOffset = section.offset();
65            let sectionHeight = section.outerHeight();
66            let sectionBottom = sectionOffset.top + sectionHeight;
67    
68            let viewportHeight = $(window).height();
69            let scrollTop = $(window).scrollTop();
70            let viewportBottom = scrollTop + viewportHeight;
71            
72            let distanceToViewportBottom = viewportBottom - sectionBottom;
73            if(distanceToViewportBottom > 0) {
74                $(bgHeader).css({'transform' : 'translateX(0)'});
75                return
76            }
77            $(bgHeader).css({'transform' : 'translateX(-100%)'});
78
79        }
80    }
81
82
83    $(document).ready(function () {
84        translateBackgroundSidebar();        
85        gurus_backtotop_progess_bar();
86        gurus_type_file_upload();
87        gurus_zoom_point();
88        on_submit_contact_form7();
89        let focus = $(".focus");
90        if(focus.length) {
91            $(focus).on('mousemove', function (e) {
92                let x = e.pageX;
93                let y = e.pageY;
94                $(this).css('background', "radial-gradient(circle at "+x+"px "+y+'px ,rgba(190, 255, 255, 0.2), transparent 5%)'); 
95            })
96        }
97    
98        // Hover Portfolio Accordion
99        if($('.pxl-portfolio-accordion').length > 0) {
100            $('.pxl-portfolio-accordion .pxl-item').on('click', function() {
101                $('.pxl-portfolio-accordion .pxl-item').removeClass('active');
102                $(this).addClass('active');
103            });
104        }
105
106        // View Demos
107        if($('.pxl-btn-view-demos').length){
108            $('.pxl-btn-view-demos').on('click', function(e) {
109                e.preventDefault();
110                let section = $(document).find('.pxl-elementor-section-demos')[0];
111                section.scrollIntoView({ behavior: 'smooth' });
112            })
113        } 
114
115        // Marquee
116        if($('.pxl-marquee').length > 0){
117            $('.pxl-marquee').each(function(index, element) {
118                let settings = $(this).find('.pxl-marquee-inner').data().settings;
119                $(this).marquee({
120                    allowCss3Support : true,
121                    css3Easing       : settings['css3_easing'] ,
122                    delayBeforeStart : settings['delay_before_start'] ,
123                    direction        : settings['direction'] ,
124                    duplicated       : settings['duplicated'] ,
125                    duration         : settings['duration'] , 
126                    gap              : settings['gap'] ,
127                    pauseOnHover     : settings['pause_on_hover'] ,
128                    startVisible     : settings['start_visible']
129                });
130            })
131        }
132
133        // Typewrriter
134        if ($('.pxl-typewriter-effect').length > 0) {
135            $('.pxl-typewriter-effect').each(function() {
136                const typewriterTexts = $(this).find('.pxl-typewriter-text')[0];
137                const settings = $(typewriterTexts).data('texts');
138                if (settings) {
139                    new Typed(typewriterTexts, {
140                        strings: settings,
141                        typeSpeed: 100,
142                        backSpeed: 30,
143                        loop: false,
144                        showCursor: false,
145                        startDelay: 500,
146                    });
147                }
148            });
149        }
150
151        // Deactive Link
152        $('.deactive-click a').on("click", function (e) {
153            e.preventDefault();
154        });
155
156        /* Start Menu Mobile */
157        $('.pxl-header-menu li.menu-item-has-children').append('<span class="pxl-menu-toggle"></span>');
158        $('.pxl-menu-toggle').on('click', function () {
159            if( $(this).hasClass('active')){
160                $(this).closest('ul').find('.pxl-menu-toggle.active').toggleClass('active');
161                $(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();    
162            }else{
163                $(this).closest('ul').find('.pxl-menu-toggle.active').toggleClass('active');
164                $(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();
165                $(this).toggleClass('active');
166                $(this).parent().find('> .sub-menu').toggleClass('active');
167                $(this).parent().find('> .sub-menu').slideToggle();
168            }      
169        });
170    
171        $("#pxl-nav-mobile, .pxl-anchor-mobile-menu").on('click', function () {
172            $(this).toggleClass('active');
173            $('body').toggleClass('body-overflow');
174            $('.pxl-header-menu').toggleClass('active');
175        });
176
177        $(".pxl-menu-close, .pxl-header-menu-backdrop, #pxl-header-mobile .pxl-menu-primary a.is-one-page").on('click', function () {
178            $(this).parents('.pxl-header-main').find('.pxl-header-menu').removeClass('active');
179            $('#pxl-nav-mobile').removeClass('active');
180            $('body').toggleClass('body-overflow');
181        });
182        /* End Menu Mobile */
183
184        /* Menu Vertical */
185        $('.pxl-nav-vertical li.menu-item-has-children > a').append('<span class="pxl-arrow-toggle"><i class="flaticon-right-arrow"></i></span>');
186        $('.pxl-nav-vertical li.menu-item-has-children > a').on('click', function () {
187            if( $(this).hasClass('active')){
188                $(this).next().toggleClass('active').slideToggle(); 
189            }else{
190                $(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();
191                $(this).closest('ul').find('a.active').toggleClass('active');
192                $(this).find('.pxl-menu-toggle.active').toggleClass('active');
193                $(this).toggleClass('active');
194                $(this).next().toggleClass('active').slideToggle();
195            }   
196        });
197
198        /* Menu Hidden Sidebar Popup */
199        $('.pxl-menu-hidden-sidebar li.menu-item-has-children > a').append('<span class="pxl-arrow-toggle"><i class="flaticon-right-arrow"></i></span>');
200        $('.pxl-menu-hidden-sidebar li.menu-item-has-children > a').on('click', function () {
201            if( $(this).hasClass('active')){
202                $(this).next().toggleClass('active').slideToggle(); 
203            }else{
204                $(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();
205                $(this).closest('ul').find('a.active').toggleClass('active');
206                $(this).find('.pxl-menu-toggle.active').toggleClass('active');
207                $(this).toggleClass('active');
208                $(this).next().toggleClass('active').slideToggle();
209            }   
210        });
211
212        $('.pxl-menu-hidden-sidebar .pxl-menu-button').on('click', function () {
213            $(this).parents('.pxl-menu-hidden-sidebar').toggleClass('active');
214            $(this).parents('.pxl-menu-hidden-sidebar').removeClass('boxOut');
215            $(this).parents('body').toggleClass('body-overflow');
216        });
217        $('.pxl-menu-popup-overlay').on('click', function () {
218            $(this).parent().removeClass('active');
219            $(this).parent().addClass('boxOut');
220            $(this).parents('body').removeClass('body-overflow');
221        });
222        $('.pxl-menu-popup-close, .pxl-menu-hidden-sidebar .pxl-menu-hidden a.is-one-page').on('click', function () {
223            $(this).parents('.pxl-menu-hidden-sidebar').removeClass('active');
224            $(this).parents('.pxl-menu-hidden-sidebar').addClass('boxOut');
225            $(this).parents('body').removeClass('body-overflow');
226        });
227
228
229        /* Mega Menu Max Height */
230        var m_h_mega = $('li.pxl-megamenu > .sub-menu > .pxl-mega-menu-elementor').outerHeight();
231        var w_h_mega = $(window).height();
232        var w_h_mega_css = w_h_mega - 120;
233        if(m_h_mega > w_h_mega) {
234            $('li.pxl-megamenu > .sub-menu > .pxl-mega-menu-elementor').css('max-height', w_h_mega_css + 'px');
235            $('li.pxl-megamenu > .sub-menu > .pxl-mega-menu-elementor').css('overflow-x', 'scroll');
236        }
237        /* End Mega Menu Max Height */
238
239        /* Scroll To Top */
240        $('.pxl-scroll-top').on('click', function () {
241            $('html, body').animate({scrollTop: 0}, 1200);
242            $(this).parents('.pxl-wrapper').find('.elementor > .pin-spacer').addClass('scroll-top-active');
243            return false;
244        });
245
246        /* Animate Time Delay */
247        $('.pxl-grid-masonry').each(function () {
248            var eltime = 80;
249            var elt_inner = $(this).children().length;
250            var _elt = elt_inner - 1;
251            $(this).find('> .pxl-grid-item > .wow').each(function (index, obj) {
252                $(this).css('animation-delay', eltime + 'ms');
253                if (_elt === index) {
254                    eltime = 80;
255                    _elt = _elt + elt_inner;
256                } else {
257                    eltime = eltime + 80;
258                }
259            });
260        });
261
262        /* Lightbox Popup */
263        setTimeout(function() {
264            $('.pxl-action-popup').magnificPopup({
265                type: 'iframe',
266                mainClass: 'mfp-fade',
267                removalDelay: 160,
268                preloader: false,
269                fixedContentPos: false
270            });
271        }, 300);
272
273        $('.pxl-gallery-lightbox').each(function () {
274            $(this).magnificPopup({
275                delegate: 'a.lightbox',
276                type: 'image',
277                gallery: {
278                    enabled: true
279                },
280                mainClass: 'mfp-fade',
281            });
282        });
283        /* Page Title Parallax */
284
285        
286        /* Cart Sidebar Popup */
287        $(".pxl-cart-sidebar-button").on('click', function () {
288            $('body').addClass('body-overflow');
289            $('#pxl-cart-sidebar').addClass('active');
290        });
291        $("#pxl-cart-sidebar .pxl-popup--overlay").on('click', function () {
292            $('body').removeClass('body-overflow');
293            $('#pxl-cart-sidebar').removeClass('active');
294        });
295
296        /* Hover Active Item */
297        $('.pxl--widget-hover').each(function () {
298            $(this).on('mouseenter', function () {
299                $(this).parents('.elementor-row').find('.pxl--widget-hover').removeClass('pxl--item-active');
300                $(this).parents('.elementor-container').find('.pxl--widget-hover').removeClass('pxl--item-active');
301                $(this).addClass('pxl--item-active');
302            }).on('mouseleave', function () {
303                // If you need to do something on mouse leave, add the logic here
304                // For example, removing the class when the mouse leaves the element
305                // $(this).removeClass('pxl--item-active');
306            });
307        });
308        
309
310        /* Start Icon Bounce */
311        var boxEls = $('.el-bounce, .pxl-image-effect1, .el-effect-zigzag');
312        $.each(boxEls, function(boxIndex, boxEl) {
313            loopToggleClass(boxEl, 'active');
314        });
315
316        function loopToggleClass(el, toggleClass) {
317            el = $(el);
318            let counter = 0;
319            if (el.hasClass(toggleClass)) {
320                waitFor(function () {
321                    counter++;
322                    return counter == 2;
323                }, function () {
324                    counter = 0;
325                    el.removeClass(toggleClass);
326                    loopToggleClass(el, toggleClass);
327                }, 'Deactivate', 1000);
328            } else {
329                waitFor(function () {
330                    counter++;
331                    return counter == 3;
332                }, function () {
333                    counter = 0;
334                    el.addClass(toggleClass);
335                    loopToggleClass(el, toggleClass);
336                }, 'Activate', 1000);
337            }
338        }
339
340        function waitFor(condition, callback, message, time) {
341            if (message == null || message == '' || typeof message == 'undefined') {
342                message = 'Timeout';
343            }
344            if (time == null || time == '' || typeof time == 'undefined') {
345                time = 100;
346            }
347            var cond = condition();
348            if (cond) {
349                callback();
350            } else {
351                setTimeout(function() {
352                    waitFor(condition, callback, message, time);
353                }, time);
354            }
355        }
356        /* End Icon Bounce */
357
358        /* Image Effect */
359        if($('.pxl-image-tilt').length){
360            $('.pxl-image-tilt').parents('.elementor-top-section').addClass('pxl-image-tilt-active');
361            $('.pxl-image-tilt').each(function () {
362                var pxl_maxtilt = $(this).data('maxtilt'),
363                    pxl_speedtilt = $(this).data('speedtilt'),
364                    pxl_perspectivetilt = $(this).data('perspectivetilt');
365                VanillaTilt.init(this, {
366                    max: pxl_maxtilt,
367                    speed: pxl_speedtilt,
368                    perspective: pxl_perspectivetilt
369                });
370            });
371        }
372
373        /* Select Theme Style */
374        $('.wpcf7-select').each(function(){
375            var $this = $(this), numberOfOptions = $(this).children('option').length;
376          
377            $this.addClass('pxl-select-hidden'); 
378            $this.wrap('<div class="pxl-select"></div>');
379            $this.after('<div class="pxl-select-higthlight"></div>');
380
381            var $styledSelect = $this.next('div.pxl-select-higthlight');
382            $styledSelect.text($this.children('option').eq(0).text());
383          
384            var $list = $('<ul />', {
385                'class': 'pxl-select-options'
386            }).insertAfter($styledSelect);
387          
388            for (var i = 0; i < numberOfOptions; i++) {
389                $('<li />', {
390                    text: $this.children('option').eq(i).text(),
391                    rel: $this.children('option').eq(i).val()
392                }).appendTo($list);
393            }
394          
395            var $listItems = $list.children('li');
396          
397            $styledSelect.on('click', function(e) {
398                e.stopPropagation();
399                $('div.pxl-select-higthlight.active').not(this).each(function(){
400                    $(this).removeClass('active').next('ul.pxl-select-options').addClass('pxl-select-lists-hide');
401                });
402                $(this).toggleClass('active');
403            });
404          
405            $listItems.on('click', function(e) {
406                e.stopPropagation();
407                $styledSelect.text($(this).text()).removeClass('active');
408                $this.val($(this).attr('rel'));
409            });
410          
411            $(document).on('click', function() {
412                $styledSelect.removeClass('active');
413            });
414
415        });
416
417        /* Nice Select */
418        $('.woocommerce-ordering .orderby, #pxl-sidebar-area select, .variations_form.cart .variations select, .pxl-open-table select, .pxl-nice-select').each(function () {
419            $(this).niceSelect();
420        });
421
422
423        /* Section Particles */      
424        setTimeout(function() {
425            $(".pxl-row-particles").each(function() {
426                particlesJS($(this).attr('id'), {
427                  "particles": {
428                    "number": {
429                        "value": $(this).data('number'),
430                    },
431                    "color": {
432                        "value": $(this).data('color')
433                    },
434                    "shape": {
435                        "type": "circle",
436                    },
437                    "size": {
438                        "value": $(this).data('size'),
439                        "random": $(this).data('size-random'),
440                    },
441                    "line_linked": {
442                        "enable": false,
443                    },
444                    "move": {
445                        "enable": true,
446                        "speed": 2,
447                        "direction": $(this).data('move-direction'),
448                        "random": true,
449                        "out_mode": "out",
450                    }
451                  },
452                  "retina_detect": true
453                });
454            });
455        }, 400);
456
457        /* Get checked input - Mailchimpp */
458        $('.mc4wp-form input:checkbox').change(function(){
459            if($(this).is(":checked")) {
460                $('.mc4wp-form').addClass("pxl-input-checked");
461            } else {
462                $('.mc4wp-form').removeClass("pxl-input-checked");
463            }
464        });
465        /* Item Hover Active */
466        $('.pxl-hover-item').each(function () {
467            $(this).on('mouseenter', function () {
468                $(this).parent('.pxl-hover-wrap').find('.pxl-hover-item').removeClass('pxl-active');
469                $(this).addClass('pxl-active');
470            }).on('mouseleave', function () {
471                ///
472            });
473        });
474        
475
476    });
477    
478    jQuery(document).ajaxComplete(function(event, xhr, settings){
479        gurus_shop_quantity();
480    });
481
482    jQuery( document ).on( 'updated_wc_div', function() {
483        gurus_shop_quantity();
484    } );
485     
486    /* Header Sticky */
487    function gurus_header_sticky() {
488        if($('#pxl-header-elementor').hasClass('is-sticky')) {
489            if (pxl_scroll_top > 100) {
490                $('.pxl-header-elementor-sticky.pxl-sticky-stb').addClass('pxl-header-fixed');
491                $('#pxl-header-mobile').addClass('pxl-header-mobile-fixed');
492            } else {
493                $('.pxl-header-elementor-sticky.pxl-sticky-stb').removeClass('pxl-header-fixed');
494                $('#pxl-header-mobile').removeClass('pxl-header-mobile-fixed');
495            }
496
497            if (pxl_scroll_status == 'up' && pxl_scroll_top > 100) {
498                $('.pxl-header-elementor-sticky.pxl-sticky-stt').addClass('pxl-header-fixed');
499            } else {
500                $('.pxl-header-elementor-sticky.pxl-sticky-stt').removeClass('pxl-header-fixed');
501            }
502        }
503
504        $('.pxl-header-elementor-sticky').parents('body').addClass('pxl-header-sticky');
505    }
506
507    /* Header Mobile */
508    function gurus_header_mobile() {
509        var h_header_mobile = $('#pxl-header-elementor').outerHeight();
510        if(pxl_window_width < 1199) {
511            $('#pxl-header-elementor').css('min-height', h_header_mobile + 'px');
512        }
513    }
514
515    /* Scroll To Top */
516    function gurus_scroll_to_top() {
517        if (pxl_scroll_top < pxl_window_height) {
518            $('.pxl-scroll-top').addClass('pxl-off').removeClass('pxl-on');
519        }
520        if (pxl_scroll_top > pxl_window_height) {
521            $('.pxl-scroll-top').addClass('pxl-on').removeClass('pxl-off');
522        }
523    }
524
525    /* Footer Fixed */
526    function gurus_footer_fixed() {
527        setTimeout(function(){
528            var h_footer = $('.pxl-footer-fixed #pxl-footer-elementor').outerHeight() - 1;
529            $('.pxl-footer-fixed #pxl-main').css('margin-bottom', h_footer + 'px');
530        }, 600);
531    }
532
533    /* WooComerce Quantity */
534    function gurus_shop_quantity() {
535        "use strict";
536        $('#pxl-wrapper .quantity').append('<span class="quantity-icon quantity-down pxl-icon--minus"></span><span class="quantity-icon quantity-up pxl-icon--plus"></span>');
537        $('.quantity-up').on('click', function () {
538            $(this).parents('.quantity').find('input[type="number"]').get(0).stepUp();
539            $(this).parents('.woocommerce-cart-form').find('.actions .button').removeAttr('disabled');
540        });
541        $('.quantity-down').on('click', function () {
542            $(this).parents('.quantity').find('input[type="number"]').get(0).stepDown();
543            $(this).parents('.woocommerce-cart-form').find('.actions .button').removeAttr('disabled');
544        });
545        $('.quantity-icon').on('click', function () {
546            var quantity_number = $(this).parents('.quantity').find('input[type="number"]').val();
547            var add_to_cart_button = $(this).parents( ".product, .woocommerce-product-inner" ).find(".add_to_cart_button");
548            add_to_cart_button.attr('data-quantity', quantity_number);
549            add_to_cart_button.attr("href", "?add-to-cart=" + add_to_cart_button.attr("data-product_id") + "&quantity=" + quantity_number);
550        });
551        $('.woocommerce-cart-form .actions .button').removeAttr('disabled');
552    }
553
554    /* Menu Responsive Dropdown */
555    function gurus_submenu_responsive() {
556        var $gurus_menu = $('.pxl-header-elementor-main, .pxl-header-elementor-sticky');
557        $gurus_menu.find('.pxl-menu-primary li').each(function () {
558            var $gurus_submenu = $(this).find('> ul.sub-menu');
559            if ($gurus_submenu.length == 1) {
560                if ( ($gurus_submenu.offset().left + $gurus_submenu.width() + 0 ) > $(window).width()) {
561                    $gurus_submenu.addClass('pxl-sub-reverse');
562                }
563            }
564        });
565    }
566
567    function gurus_panel_anchor_toggle(){
568        'use strict';
569        $(document).on('click','.pxl-anchor-button',function(e){
570            e.preventDefault();
571            e.stopPropagation();
572            var target = $(this).attr('data-target');
573            $(target).toggleClass('active');
574            $('body').addClass('body-overflow');
575            $('.pxl-popup--conent .wow').addClass('animated').removeClass('aniOut');
576            $('.pxl-popup--conent .fadeInPopup').removeClass('aniOut');
577            if($(target).find('.pxl-search-form').length > 0){
578                setTimeout(function(){
579                    $(target).find('.pxl-search-form .pxl-search-field').focus();
580                },1000);
581            }
582        });
583
584        $('.pxl-anchor-button').each(function () {
585            var t_target = $(this).attr('data-target');
586            var t_delay = $(this).attr('data-delay-hover');
587            $(t_target).find('.pxl-popup--conent').css('transition-delay', t_delay + 'ms');
588            $(t_target).find('.pxl-popup--overlay').css('transition-delay', t_delay + 'ms');
589        });
590
591        $(".pxl-hidden-panel-popup .pxl-popup--overlay, .pxl-hidden-panel-popup .pxl-close-popup").on('click', function () {
592            $('body').removeClass('body-overflow');
593            $('.pxl-hidden-panel-popup').removeClass('active');
594            $('.pxl-popup--conent .wow').addClass('aniOut').removeClass('animated');
595            $('.pxl-popup--conent .fadeInPopup').addClass('aniOut');
596        });
597
598        
599        $(".pxl-hidden-panel-button.pxl-atc-popup").on('click', function () {
600            $('body').addClass('body-overflow');
601            // $(this).parents('.pxl-wrapper').find('.pxl-page-popup').addClass('active');
602            $(this).parents('.pxl-wrapper').find('.pxl-hidden-panel-popup').addClass('active');
603        });
604
605        $(".pxl-button-anchor .pxl-button-toggle").on('click', function () {
606            $('body').addClass('body-overflow');
607            $(this).parents('.pxl-wrapper').find('.pxl-hidden-panel-popup').addClass('active');
608        });
609        
610        $(".pxl-popup--close").on('click', function () {
611            $('body').removeClass('body-overflow');
612            $(this).parent().removeClass('active');
613        });
614    }
615
616    /* Post Grid */
617    function gurus_post_grid() {
618        setTimeout(function(){
619            $('.pxl-item--inner').each(function () {
620                var item_w = $(this).outerWidth();
621                var item_h = $(this).outerHeight();
622                $(this).find('.pxl-item--imgfilter').css('width', item_w + 'px');
623                $(this).find('.pxl-item--imgfilter').css('height', item_h + 'px');
624            });
625        }, 300);
626    }
627
628    /* Page Title Scroll Opacity */
629    function gurus_ptitle_scroll_opacity() {
630        var divs = $('#pxl-page-title-elementor.pxl-scroll-opacity .elementor-widget'),
631            limit = $('#pxl-page-title-elementor.pxl-scroll-opacity').outerHeight();
632        if (pxl_scroll_top <= limit) {
633            divs.css({ 'opacity' : (1 - pxl_scroll_top/limit)});
634        }
635    }
636
637    /* Preloader Default */
638    $.fn.extend({
639        jQueryImagesLoaded: function () {
640          var $imgs = this.find('img[src!=""]')
641
642          if (!$imgs.length) {
643            return $.Deferred()
644              .resolve()
645              .promise()
646          }
647
648          var dfds = []
649
650          $imgs.each(function () {
651            var dfd = $.Deferred()
652            dfds.push(dfd)
653            var img = new Image()
654            img.onload = function () {
655              dfd.resolve()
656            }
657            img.onerror = function () {
658              dfd.resolve()
659            }
660            img.src = this.src
661          })
662
663          return $.when.apply($, dfds)
664        }
665    })
666
667    /* Back To Top Progress Bar */
667
668    function gurus_backtotop_progess_bar() {
669        if($('.pxl-scroll-top').length > 0) {
670            var progressPath = document.querySelector('.pxl-scroll-top path');
671            var pathLength = progressPath.getTotalLength();
672            progressPath.style.transition = progressPath.style.WebkitTransition = 'none';
673            progressPath.style.strokeDasharray = pathLength + ' ' + pathLength;
674            progressPath.style.strokeDashoffset = pathLength;
675            progressPath.getBoundingClientRect();
676            progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear';      
677            var updateProgress = function () {
678                var scroll = $(window).scrollTop();
679                var height = $(document).height() - $(window).height();
680                var progress = pathLength - (scroll * pathLength / height);
681                progressPath.style.strokeDashoffset = progress;
682            }
683            updateProgress();
684            $(window).scroll(updateProgress);   
685            var offset = 50;
686            var duration = 550;
687            $(window).on('scroll', function() {
688                if ($(this).scrollTop() > offset) {
689                    $('.pxl-scroll-top').addClass('active-progress');
690                } else {
691                    $('.pxl-scroll-top').removeClass('active-progress');
692                }
693            });
694        }
695    }
696
697    /* Custom Type File Upload*/
698    function gurus_type_file_upload() {
699
700        var multipleSupport = typeof $('<input/>')[0].multiple !== 'undefined',
701        isIE = /msie/i.test( navigator.userAgent );
702
703        $.fn.pxl_custom_type_file = function() {
704
705            return this.each(function() {
706
707            var $file = $(this).addClass('pxl-file-upload-hidden'),
708            $wrap = $('<div class="pxl-file-upload-wrapper">'),
709            $button = $('<button type="button" class="pxl-file-upload-button">Choose File</button>'),
710            $input = $('<input type="text" class="pxl-file-upload-input" placeholder="No File Choose" />'),
711            $label = $('<label class="pxl-file-upload-button" for="'+ $file[0].id +'">Choose File</label>');
712            $file.css({
713                position: 'absolute',
714                opacity: '0',
715                visibility: 'hidden'
716            });
717
718            $wrap.insertAfter( $file )
719            .append( $file, $input, ( isIE ? $label : $button ) );
720
721            $file.attr('tabIndex', -1);
722            $button.attr('tabIndex', -1);
723
724            $button.on('click', function () {
725                $file.focus().click();
726            });
727            
728            $file.change(function() {
729
730            var files = [], fileArr, filename;
731
732            if ( multipleSupport ) {
733                fileArr = $file[0].files;
734                for ( var i = 0, len = fileArr.length; i < len; i++ ) {
735                files.push( fileArr[i].name );
736                }
737                filename = files.join(', ');
738            } else {
739                filename = $file.val().split('\\').pop();
740            }
741
742            $input.val( filename )
743                .attr('title', filename)
744                .focus();
745            });
746
747            $input.on({
748                blur: function() { $file.trigger('blur'); },
749                keydown: function( e ) {
750                if ( e.which === 13 ) {
751                    if ( !isIE ) { 
752                        $file.trigger('click'); 
753                    }
754                } else if ( e.which === 8 || e.which === 46 ) {
755                    $file.replaceWith( $file = $file.clone( true ) );
756                    $file.trigger('change');
757                    $input.val('');
758                } else if ( e.which === 9 ){
759                    return;
760                } else {
761                        return false;
762                    }
763                }
764            });
765
766            });
767
768        };
769        $('.wpcf7-file[type=file]').pxl_custom_type_file();
770    }
771
772    function on_submit_contact_form7() {
773        let contactForms = $('.pxl-contact-form');
774        contactForms.each(function() {
775            let form = $(this).find('.wpcf7-form');
776            let loader = $(this).find('.pxl-form-loader'); 
777            $(form).on('wpcf7submit', function(e) {
778                $(loader).css('visibility', 'hidden');
779            });
780            
781            $(form).on('wpcf7beforesubmit', function(e) {
782                $(loader).css('visibility', 'visible');
783            });
784        });
785    }
786    
787    // Zoom Point
788    function gurus_zoom_point() {
789        $(".pxl-zoom-point").each(function () {
790
791            let scaleOffset = $(this).data('offset');
792            let scaleAmount = $(this).data('scale-mount');
793
794            function scrollZoom() {
795                const images = document.querySelectorAll("[data-scroll-zoom]");
796                let scrollPosY = 0;
797                scaleAmount = scaleAmount / 100;
798
799                const observerConfig = {
800                    rootMargin: "0% 0% 0% 0%",
801                    threshold: 0
802                };
803
804                images.forEach(image => {
805                    let isVisible = false;
806                    const observer = new IntersectionObserver((elements, self) => {
807                        elements.forEach(element => {
808                            isVisible = element.isIntersecting;
809                        });
810                    }, observerConfig);
811
812                    observer.observe(image);
813
814                    image.style.transform = `scale(${1 + scaleAmount * percentageSeen(image)})`;
815
816                    window.addEventListener("scroll", () => {
817                    if (isVisible) {
818                        scrollPosY = window.pageYOffset;
819                        image.style.transform = `scale(${1 +
820                        scaleAmount * percentageSeen(image)})`;
821                    }
822                    });
823                });
824
825                function percentageSeen(element) {
826                    const parent = element.parentNode;
827                    const viewportHeight = window.innerHeight;
828                    const scrollY = window.scrollY;
829                    const elPosY = parent.getBoundingClientRect().top + scrollY + scaleOffset;
830                    const borderHeight = parseFloat(getComputedStyle(parent).getPropertyValue('border-bottom-width')) + parseFloat(getComputedStyle(element).getPropertyValue('border-top-width'));
831                    const elHeight = parent.offsetHeight + borderHeight;
832
833                    if (elPosY > scrollY + viewportHeight) {
834                        return 0;
835                    } else if (elPosY + elHeight < scrollY) {
836                        return 100;
837                    } else {
838                        const distance = scrollY + viewportHeight - elPosY;
839                        let percentage = distance / ((viewportHeight + elHeight) / 100);
840                        percentage = Math.round(percentage);
841
842                        return percentage;
843                    }
844                }
845            }
846            scrollZoom();
847        });
848    }
849
850
851
852    
853
854})(jQuery);

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.