PageSourceSearch

https://profinitygroup.com/wp-content/themes/consultio/assets/js/main.js?ver=3.2.0

js profinitygroup.com collected 2026-10-02 00:33:08 UTC 33,716 bytes, 796 lines download raw bytes

1;(function ($) {
2
3    "use strict";
4
5    /* ===================
6     Page reload
7     ===================== */
8    var scroll_top;
9    var window_height;
10    var window_width;
11    var scroll_status = '';
12    var lastScrollTop = 0;
13    $(window).on('load', function () {
14        $(".ct-loader").fadeOut("slow");
15        window_width = $(window).width();
16        consultio_col_offset();
17        consultio_header_sticky();
18        consultio_scroll_to_top();
19        consultio_quantity_icon();
20        consultio_wow_init();
21        consultio_mouse_move();
22        consultio_header_offset();
23        consultio_footer_fixed();
24        consultio_portfolio_ex();
25    });
26    $(window).on('resize', function () {
27        window_width = $(window).width();
28        consultio_col_offset();
29        consultio_header_offset();
30        consultio_footer_fixed();
31        consultio_portfolio_ex();
32    });
33
34    $(window).on('scroll', function () {
35        scroll_top = $(window).scrollTop();
36        window_height = $(window).height();
37        window_width = $(window).width();
38        if (scroll_top < lastScrollTop) {
39            scroll_status = 'up';
40        } else {
41            scroll_status = 'down';
42        }
43        lastScrollTop = scroll_top;
44        consultio_header_sticky();
45        consultio_scroll_to_top();
46    });
47
48    $(document).on('click', '.h-btn-search, .ct-search-popup', function () {
49        $('.ct-modal-search').addClass('open');
50        $('body').addClass('ov-hidden');
51        setTimeout(function(){
52            $('.ct-modal-search .search-field').focus();
53        },1000);
54    });
55
56    $(document).ready(function () {
57
58        /* =================
59         Menu Dropdown
60         =================== */
61        var $menu = $('.ct-main-navigation');
62        $menu.find('.ct-main-menu li').each(function () {
63            var $submenu = $(this).find('> ul.sub-menu, > .children');
64            if ($submenu.length == 1) {
65                $(this).hover(function () {
66                    if ($submenu.offset().left + $submenu.width() > $(window).width()) {
67                        $submenu.addClass('back');
68                    } else if ($submenu.offset().left < 0) {
69                        $submenu.addClass('back');
70                    }
71                }, function () {
72                    $submenu.removeClass('back');
73                });
74            }
75        });
76        
77        $('.show-demos').on("click", function (e) {
78            e.preventDefault();
79            $( this ).parents('body').find('.ct-demo-bar').toggleClass('active');
80        });
81
82        /* Menu Click */
83        $(".ct-main-menu.sub-click > li > a").on('click', function () {
84            $(this).parent().toggleClass('opened');
85        });
86
87        $('body').on('click', '.ct-main-menu.sub-click > li > a', function () {
88            return false;
89        });
90
91        /* Main Header */
92        $('.ct-header-fixed-transparent').parents('.ct-header-elementor-main').addClass('ct-header-fixed-transparent-wrap');
93
94        /* =================
95         Menu Mobile
96         =================== */
97        $('.ct-main-navigation li.menu-item-has-children').append('<span class="ct-menu-toggle far fac-angle-right"></span>');
98        $('.ct-menu-toggle').on('click', function () {
99            $(this).toggleClass('toggle-open');
100            $(this).parent().find('> .sub-menu, > .children').toggleClass('submenu-open');
101            $(this).parent().find('> .sub-menu, > .children').slideToggle();
102        });
103
104        $(".ct-main-menu li a.is-one-page").on('click', function () {
105           $(this).parents('.ct-header-navigation').removeClass('navigation-open');
106           $(this).parents('.ct-header-main').find('.btn-nav-mobile').removeClass('opened');
107        });
108
109        /*if ($(window).width() < 1199) {
110            $('.ct-main-menu li.menu-item-has-children > a').on("click", function (e) {
111                e.preventDefault();
112                $(this).parent().find('> .sub-menu, > .children').toggleClass('submenu-open');
113                $(this).parent().find('> .sub-menu, > .children').slideToggle();
114                $(this).parent().find('> .ct-menu-toggle').toggleClass('toggle-open');
115            });
116        }*/
117
118        /* =================
119         Menu Popup
120         =================== */
121        $('.ct-main-menu-popup li.menu-item-has-children > a').after('<span class="ct-menu-toggle"></span>');
122        $('.ct-main-menu-popup .ct-menu-toggle').on('click', function () {
123            $(this).toggleClass('toggle-open');
124            $(this).parent().find('> .sub-menu, > .children').toggleClass('submenu-open');
125            $(this).parent().find('> .sub-menu, > .children').slideToggle();
126        });
127        $('.ct-menu-popup').on('click', function () {
128            $('body').addClass('ov-hidden');
129            $(this).parents('body').find('.ct-header-popup-wrap').toggleClass('open');
130        });
131        $('.ct-menu-close').on('click', function () {
132            $('body').removeClass('ov-hidden');
133            $(this).parents('body').find('.ct-header-popup-wrap').toggleClass('open');
134        });
135        
136        $("#ct-menu-mobile .open-menu").on('click', function () {
137            $(this).toggleClass('opened');
138            $('.ct-header-navigation').toggleClass('navigation-open');
139        });
140
141        $(".ct-menu-close").on('click', function () {
142            $(this).parents('.header-navigation').removeClass('navigation-open');
143            $('.ct-menu-overlay').removeClass('active');
144            $('#ct-menu-mobile .open-menu').removeClass('opened');
145            $('body').removeClass('ov-hidden');
146        });
147
148        $(".ct-menu-overlay").on('click', function () {
149            $(this).parents('#header-main').find('.header-navigation').removeClass('navigation-open');
150            $(this).removeClass('active');
151            $('#ct-menu-mobile .open-menu').removeClass('opened');
152            $('.header-navigation').removeClass('navigation-open');
153            $('body').removeClass('ov-hidden');
154        });
155
156        $('.ct-header-menu-popup').on('click', function () {
157            $(this).parents('body').find('.ct-header-elementor-popup').toggleClass('open');
158        });
159
160        /* ===================
161         Search Toggle
162         ===================== */
163        $('.h-btn-form').click(function (e) {
164            e.preventDefault();
165            $('.ct-modal-contact-form').removeClass('remove').toggleClass('open');
166        });
167        $('.ct-close').click(function (e) {
168            e.preventDefault();
169            $(this).parents('.ct-header-elementor-popup').removeClass('open');
170            $(this).parents('.ct-widget-cart-wrap').removeClass('open');
171            $(this).parents('.ct-modal').addClass('remove').removeClass('open');
172            $(this).parents('#page').find('.site-overlay').removeClass('open');
173            $(this).parents('body').removeClass('ov-hidden');
174        });
175
176        $('.ct-hidden-sidebar-overlay, .ct-widget-cart-overlay').click(function (e) {
177            e.preventDefault();
178            $(this).parent().toggleClass('open');
179            $(this).parents('body').removeClass('ov-hidden');
180        });
181
182        /* Video 16:9 */
183        $('.entry-video iframe').each(function () {
184            var v_width = $(this).width();
185
186            v_width = v_width / (16 / 9);
187            $(this).attr('height', v_width + 35);
188        });
189
190        /* Video Light Box */
191        $('.ct-video-button, .btn-video, .slider-video').magnificPopup({
192            type: 'iframe',
193            mainClass: 'mfp-fade',
194            removalDelay: 160,
195            preloader: false,
196            fixedContentPos: false
197        });
198
199        $('.ct-service-grid1').magnificPopup({
200            delegate: 'a.z-view', 
201            type: 'inline',
202            gallery: {
203             enabled: false
204            },
205            mainClass: 'mfp-fade mfp-menu',
206        });
207        
208        /* ====================
209         Scroll To Top
210         ====================== */
211        $('.scroll-top, .scroll-top i, .ct-wg-backtotop-inner').click(function () {
212            $('html, body').animate({scrollTop: 0}, 800);
213            return false;
214        });
215        $('.ct-wg-backtotop-inner').parents('body').find('.scroll-top').hide();
216
217        /* =================
218        Add Class
219        =================== */
220        $('.wpcf7-select').parent().addClass('wpcf7-menu');
221        
222
223        /* =================
224         The clicked item should be in center in owl carousel
225         =================== */
226        var $owl_item = $('.owl-active-click');
227        $owl_item.children().each(function (index) {
228            $(this).attr('data-position', index);
229        });
230        $(document).on('click', '.owl-active-click .owl-item > div', function () {
231            $owl_item.trigger('to.owl.carousel', $(this).data('position'));
232        });
233
234        /* Select */
235        $('select:not([id*="ui-id-"])').each(function () {
236            $(this).niceSelect();
237        });
238
239        setTimeout(function(){
240            $('.nice-select').on('click', function () {
241                $(this).find('.list').toggleClass('open');
242            });
243        }, 300);
244
245        /* Newsletter */
246        $('.widget_newsletterwidget, form.newsletter, form.tnp-subscription').each(function () {
247            var email_text = $(this).find('.tnp-field-email label').text();
248            $(this).find('.tnp-field-email label').remove();
249            $(this).find(".tnp-email").each(function (ev) {
250                if (!$(this).val()) {
251                    $(this).attr("placeholder", email_text);
252                }
253            });
254            var firstname_text = $(this).find('.tnp-field-firstname label').text();
255            $(this).find('.tnp-field-firstname label').remove();
256            $(this).find(".tnp-firstname").each(function (ev) {
257                if (!$(this).val()) {
258                    $(this).attr("placeholder", firstname_text);
259                }
260            });
261            var lastname_text = $(this).find('.tnp-field-lastname label').text();
262            $(this).find('.tnp-field-lastname label').remove();
263            $(this).find(".tnp-lastname").each(function (ev) {
264                if (!$(this).val()) {
265                    $(this).attr("placeholder", lastname_text);
266                }
267            });
268        });
269
270        /* bbPress */
271        $('.bbp-search-form').each(function () {
272            var search_text = 'Search...';
273            $(this).find("#bbp_search").each(function (ev) {
274                if (!$(this).val()) {
275                    $(this).attr("placeholder", search_text);
276                }
277            });
278        });
279
280        /* Search */
281        $('.ct-modal-close').on('click', function () {
282            $(this).parent().removeClass('open');
283            $(this).parents('body').removeClass('ov-hidden');
284        });
285        $(document).on('click', function (e) {
286            if (e.target.className == 'ct-modal ct-modal-search open')
287                $('.ct-modal-search').removeClass('open');
288            if (e.target.className == 'ct-hidden-sidebar open')
289                $('.ct-hidden-sidebar').removeClass('open');
290        });
291
292        /* Hidden Sidebar */
293        $(".h-btn-sidebar").on('click', function (e) {
294            e.preventDefault();
295            $('.ct-hidden-sidebar-wrap').toggleClass('open');
296            $(this).parents('body').addClass('ov-hidden');
297        });
298
299        $(".ct-hidden-close").on('click', function (e) {
300            e.preventDefault();
301            $(this).parents('.ct-hidden-sidebar-wrap').removeClass('open');
302            $(this).parents('body').removeClass('ov-hidden');
303        });
304
305        /* Cart Sidebar */
306        $(".h-btn-cart, .btn-nav-cart, .ct-cart-bar").on('click', function (e) {
307            e.preventDefault();
308            $('.ct-widget-cart-wrap').toggleClass('open');
309            $('.ct-header-navigation').removeClass('navigation-open');
310            $('#ct-menu-mobile .open-menu').removeClass('opened');
311            $(this).parents('body').addClass('ov-hidden');
312        });
313
314        /* Year Copyright */
315        var _year_footer = $(".ct-footer-year"),
316            _year_clone = _year_footer.parents(".site").find('.ct-year');
317        _year_clone.after(_year_footer.clone());
318        _year_footer.remove();
319        _year_clone.remove();
320
321        /* Comment Reply */
322        $('.comment-reply a').append( '<i class="fa fa-angle-right"></i>' );
323
324        /* Widget Menu */
325        $('.ct-navigation-menu1.default a').append( '<i class="fac fac-angle-right"></i>' );
326
327        /* Nav Slider */
328        setTimeout(function () {
329            $('.revslider-initialised').each(function () {
330                $(this).find('.ct-slider-nav .slider-nav-right').on('click', function () {
331                    $(this).parents('.revslider-initialised').find('.tp-rightarrow').trigger('click');
332                });
333                $(this).find('.ct-slider-nav .slider-nav-left').on('click', function () {
334                    $(this).parents('.revslider-initialised').find('.tp-leftarrow').trigger('click');
335                });
336            });
337            $('.ct-slider-nav').parents('.revslider-initialised').find('.tparrows').addClass('arrow-hidden');
338        }, 300);
339
340        /* Icon Form */
341        setTimeout(function () {
342            $('.input-filled').each(function () {
343                var icon_input = $(this).find(".input-icon"),
344                    control_wrap = $(this).find('.wpcf7-form-control');
345                control_wrap.before(icon_input.clone());
346                icon_input.remove();
347
348            });
349        }, 200);
350
351        /* Image Pointer */
352        $('.ct-pointer-item').each(function () {
353            $(this).find('.ct-pointer-btn').on('click', function () {
354                $(this).toggleClass('open');
355                $(this).parents('.elementor-widget-wrap').find('.ct-pointer-item .ct-pointer-btn').removeClass('open');
356                $(this).addClass('open');
357            });
358        });
359
360        /* Blog */
361        $( ".ct-blog-grid-layout1 .grid-item-inner, .ct-blog-carousel-layout1 .grid-item-inner" ).hover(
362          function() {
363            $( this ).find('.entry-readmore').slideToggle(300);
364            $( this ).find('.entry-meta').slideToggle(300);
365          }, function() {
366            $( this ).find('.entry-readmore').slideToggle(300);
367            $( this ).find('.entry-meta').slideToggle(300);
368          }
369        );
370
371        /* FancyBox */
372        $( ".ct-fancy-box-layout18" ).hover(
373          function() {
374            $( this ).find('.item--button').slideToggle(300);
375            $( this ).find('.item--description').slideToggle(300);
376          }, function() {
377            $( this ).find('.item--button').slideToggle(300);
378            $( this ).find('.item--description').slideToggle(300);
379          }
380        );
381
382        /* Team */
383        $( ".ct-team-carousel1 .item--inner, .ct-team-carousel2 .item--inner, .ct-team-grid4 .item--inner" ).hover(
384          function() {
385            $( this ).find('.item--social').slideToggle(300);
386          }, function() {
387            $( this ).find('.item--social').slideToggle(300);
388          }
389        );
390
391        $( ".ct-team-carousel6 .item--inner, .ct-team-grid6 .item--inner" ).hover(
392          function() {
393            $( this ).find('.item--meta').slideToggle(200);
394          }, function() {
395            $( this ).find('.item--meta').slideToggle(200);
396          }
397        );
398
399        $(".social-button").on('click', function () {
400            $(this).parent().toggleClass('active');
401        });
402
403        /* Service */
404        $( ".ct-service-grid6 .grid-item-inner" ).hover(
405          function() {
406            $( this ).find('.item-readmore').slideToggle(300);
407          }, function() {
408            $( this ).find('.item-readmore').slideToggle(300);
409          }
410        );
411
412        $( ".ct-service-grid7 .grid-item-inner" ).hover(
413          function() {
414            $( this ).find('.item--desc').slideToggle(300);
415          }, function() {
416            $( this ).find('.item--desc').slideToggle(300);
417          }
418        );
419
420        $( ".ct-service-grid10 .grid-item-inner" ).hover(
421          function() {
422            $( this ).find('.item--readmore').slideToggle(300);
423          }, function() {
424            $( this ).find('.item--readmore').slideToggle(300);
425          }
426        );
427
428        /* Fancy Box Grid */
429        $('.ct-fancy-box-grid1').each(function () {
430            $(this).find('.item--inner').hover(function () {
431                $(this).parents('.elementor-element').find('.item--inner').removeClass('active');
432                $(this).addClass('active');
433            });
434        });
435
436        $('.ct-fancy-box-layout9').each(function () {
437            $(this).hover(function () {
438                $(this).parents('.elementor-row').find('.ct-fancy-box-layout9').removeClass('active');
439                $(this).parents('.elementor-container').find('.ct-fancy-box-layout9').removeClass('active');
440                $(this).addClass('active');
441            });
442        });
443
444        /* Same Height */
445        $('.ct-fancy-box-grid1 .item--inner').matchHeight();
446        $('.ct-feature-layout1').matchHeight();
447        $('.ct-fancy-box-layout4').matchHeight();
448        $('.ct-fancy-box-layout5 .ct-fancy-box-inner').matchHeight();
449        $('.ct-fancy-box-layout1.style4').matchHeight();
450        $('.ct-testimonial-carousel3 .item--description').matchHeight();
451
452        $('.same-height').matchHeight();
453        $('.ct-fancy-box-layout14').matchHeight();
454        $('.ct-service-grid3 .grid-item-holder').matchHeight();
455        $('.ct-service-grid5 .grid-item-inner').matchHeight();
456
457        /* Demo Bar */
458        $(".choose-demo, .ct-demo-bar-close").on('click', function () {
459            $(this).parents('.ct-demo-bar').toggleClass('active');
460        });
461
462        /* Animate Time */
463        $('.animate-time').each(function () {
464            var eltime = 100;
465            var elt_inner = $(this).children().length;
466            var _elt = elt_inner - 1;
467            $(this).find('> .grid-item > .wow').each(function (index, obj) {
468                $(this).css('animation-delay', eltime + 'ms');
469                if (_elt === index) {
470                    eltime = 100;
471                    _elt = _elt + elt_inner;
472                } else {
473                    eltime = eltime + 80;
474                }
475            });
476        });
477
478        /* Overlay particle */
479        setTimeout(function(){
480            $('.elementor-top-section').each(function () {                
481                var _el_bg_animate = $(this).find(".ct-background-animate"),
482                    _row_bg_animate = _el_bg_animate.parents(".elementor-container");
483                _row_bg_animate.before(_el_bg_animate.clone());
484                _el_bg_animate.remove();
485
486                var _el_text = $(this).find(".ct-text"),
487                    _row_text = _el_text.parents(".elementor-container");
488                _row_text.before(_el_text.clone());
489                _el_text.remove();
490            });
491        }, 200);
492
493        $('.h9-section-01 > .elementor-container').after('<div class="h9-section-gradient"></div>');
494        $('.h9-section-02 > .elementor-container').after('<div class="h9-section-overlay"></div>');
495
496        /* Team */
497        $('.item--social-btn').on('click', function () {
498            $(this).toggleClass('active');
499            $(this).parent().toggleClass('active');
500        });
501
502        /* Range Slider */
503        $('.wpcf7-form').each(function () {
504            var range = $(this).find('.ct-range-slider');
505            var range_value = $(this).find('.ct-range-slider').attr('data-value');
506            var range_maxvalue = $(this).find('.ct-range-slider').attr('data-maxvalue');
507            var range_currency = $(this).find('.ct-range-slider').attr('data-currency');
508            $(this).find( ".ct-range-slider" ).slider({
509                range: "min",
510                value: range_value,
511                min: 1,
512                max: range_maxvalue,
513                slide: function( event, ui ) {
514                    $(this).parent().find( ".ct-range-result" ).val( range_currency + ui.value );
515                }
516            });
517            $(this).find( ".ct-range-result" ).val( range_currency + $(this).find( ".ct-range-slider" ).slider( "value" ) );
518        });
519
520        /* Slider Revolution */
521        $('.ct-slider-arrow').parents('.elementor-widget-slider_revolution').addClass('hide-arrow');
522
523        /* Cover Boxes */
524        $('body:not(.elementor-editor-active) .ct-cover-boxes1 .ct-cover-item').each(function () {
525            $(this).hover(function () {
526                $(this).parents('.ct-cover-boxes1').find('.ct-cover-item').removeClass('active');
527                $(this).addClass('active');
528            });
529        });
530
531        /* Counter Column */
532        $('.counter-col-line1').append('<span class="counter-line"></span>');
533
534        /* Pricing */
535        $(".ct-pricing-tab-active .ct-pricing-tab-item").on('click', function () {
536            $(this).parent().find('.ct-pricing-tab-item').removeClass('active');
537            $(this).addClass('active');
538        });
539        $(".ct-pricing-tab-active .title-tab-monthly").on('click', function () {
540            $(this).parents('.ct-pricing-multi').find('.ct-pricing-monthly').removeClass('ct-pricing-hide');
541            $(this).parents('.ct-pricing-multi').find('.ct-pricing-year').addClass('ct-pricing-hide');
542        });
543        $(".ct-pricing-tab-active .title-tab-year").on('click', function () {
544            $(this).parents('.ct-pricing-multi').find('.ct-pricing-year').removeClass('ct-pricing-hide');
545            $(this).parents('.ct-pricing-multi').find('.ct-pricing-monthly').addClass('ct-pricing-hide');
546        });
547
548        $('.case-animate-time > span').each(function () {
549            var eltime = 0;
550            var elt_inner = $(this).children().length;
551            var _elt = elt_inner - 1;
552            $(this).find('> .slide-in-container > .wow').each(function (index, obj) {
553                $(this).css('transition-delay', eltime + 'ms');
554                if (_elt === index) {
555                    eltime = 0;
556                    _elt = _elt + elt_inner;
557                } else {
558                    eltime = eltime + 100;
559                }
560            });
561        });
562
563        /* Header Elementor */
564        $('.ct-header-elementor-sticky').parents('body').addClass('header-sticky');
565
566    });
567
568    function consultio_header_offset() {
569        if($('#ct-header-wrap').html() != "") {
570            var space_branding = $('.ct-header-branding').offset().left;
571            var width_branding = $('.ct-header-branding').outerWidth();
572            var offset_branding = space_branding + width_branding;
573            $('.ct-header-layout10 .ct-header-branding-bg').css('width', offset_branding + 'px');
574            $('.site-h10 .ct-header-offset').css('width', offset_branding + 'px');
575            $('.h9-section-overlay').css('left', offset_branding + 'px');
576            $('.h9-section-03 > .elementor-container.elementor-column-gap-no > .elementor-row > .elementor-element:nth-child(1)').css('max-width', offset_branding + 'px');
577            $('.h9-section-03 > .elementor-container.elementor-column-gap-no > .elementor-row > .elementor-element:nth-child(1)').css('min-width', offset_branding + 'px');
578
579            $('.h9-section-03 > .elementor-container.elementor-column-gap-no > .elementor-element:nth-child(1)').css('max-width', offset_branding + 'px');
580            $('.h9-section-03 > .elementor-container.elementor-column-gap-no > .elementor-element:nth-child(1)').css('min-width', offset_branding + 'px');
581
582            $('.h9-section-gradient').css('width', offset_branding + 'px');
583        }
584    }
585
586    function consultio_header_sticky() {
587        var offsetTop = $('#ct-header-wrap').outerHeight();
588        var h_header = $('.fixed-height').outerHeight();
589        var offsetTopAnimation = offsetTop + 200;
590        var offsetTopHide = offsetTop + 400;
591        if($('#ct-header-wrap').hasClass('is-sticky')) {
592            if (scroll_top > offsetTopAnimation) {
593                $('#ct-header').addClass('h-fixed');
594            } else {
595                $('#ct-header').removeClass('h-fixed');
596            }
597            if (scroll_status == 'up' && scroll_top > 0) {
598                $('#ct-header').addClass('scroll-up');
599            } else {
600                $('#ct-header').removeClass('scroll-up');
601            }
602            if (scroll_status == 'up' && scroll_top < offsetTopHide) {
603                $('#ct-header').addClass('h-fixed-hide');
604            }
605            if (scroll_status == 'up' && scroll_top < offsetTopAnimation) {
606                $('#ct-header').removeClass('h-fixed-hide');
607            }
608        }
609
610        var h_header_slider = $('.ct-header-slider').outerHeight();
611        if($('#ct-header-wrap').hasClass('is-sticky-offset')) {
612            if (scroll_top > h_header_slider) {
613                $('#ct-header').addClass('h-fixed');
614                $('#ct-header-wrap').addClass('is-sticky-active');
615            } else {
616                $('#ct-header').removeClass('h-fixed'); 
617                $('#ct-header-wrap').removeClass('is-sticky-active');  
618            }
619            if (scroll_top > 200) {
620                $('#ct-header-wrap').removeClass('sub-show-top');
621            }
622            if (scroll_top == 0) {
623                $('#ct-header-wrap').addClass('sub-show-top');
624            }
625        }
626
627        if (window_width > 1200) {
628            $('.fixed-height').css({
629                'height': h_header
630            });
631        }
632
633        /* Header Elementor */
634        var e_offsetTop = $('#ct-header-elementor').outerHeight();
635        if($('#ct-header-elementor').hasClass('is-sticky')) {
636            if (scroll_top > e_offsetTop) {
637                $('.ct-header-elementor-sticky').addClass('h-fixed');
638            } else {
639                $('.ct-header-elementor-sticky').removeClass('h-fixed');   
640            }
641        }
642
643        /* Iamge Scale  */
644        $('.ct-image-single.img-hover-scale').parents('.elementor-widget-ct_image').addClass('pxl-img-hover-scale');
645    }
646
647    /* =================
648     Column Offset
649     =================== */
650    function consultio_col_offset() {
651        setTimeout(function(){
652            var w_vc_row_lg_medium = ($('#content').width() - 1200) / 2;
653            var w_vc_row_lg_full_medium = ($('#content section.elementor-element section.elementor-element').width() - 1200) / 2;
654            if (window_width > 1200) {
655                $('body:not(.rtl) .col-offset-left').parents('.elementor-container').css('padding-left', w_vc_row_lg_medium + 'px');
656                $('body:not(.rtl) .col-offset-right').parents('.elementor-container').css('padding-right', w_vc_row_lg_medium + 'px');
657
658                $('.rtl .col-offset-left').parents('.elementor-container').css('padding-right', w_vc_row_lg_medium + 'px');
659                $('.rtl .col-offset-right').parents('.elementor-container').css('padding-left', w_vc_row_lg_medium + 'px');
660
661                $('body:not(.rtl) .ct-row-full-width .col-offset-left').parents('.elementor-container').css('padding-left', w_vc_row_lg_full_medium + 'px');
662                $('body:not(.rtl) .ct-row-full-width .col-offset-right').parents('.elementor-container').css('padding-right', w_vc_row_lg_full_medium + 'px');
663
664                $('.rtl .ct-row-full-width .col-offset-left').parents('.elementor-container').css('padding-right', w_vc_row_lg_full_medium + 'px');
665                $('.rtl .ct-row-full-width .col-offset-right').parents('.elementor-container').css('padding-left', w_vc_row_lg_full_medium + 'px');
666
667                /* Fixed somes section - demo markerting */
668                $('body:not(.rtl) .h9-section-03 .col-offset-right > .elementor-column-wrap > .elementor-widget-wrap').css('padding-right', w_vc_row_lg_medium + 'px');
669
670                /* Custom Settings */
671                if (window_width > 1200) {
672                    $('body:not(.rtl) .ct-column-offset-left > .elementor-column-wrap > .elementor-widget-wrap, body:not(.rtl) .ct-column-offset-left > .elementor-widget-wrap').css('padding-left', w_vc_row_lg_medium + 'px');
673                    $('body:not(.rtl) .ct-column-offset-right > .elementor-column-wrap > .elementor-widget-wrap, body:not(.rtl) .ct-column-offset-right > .elementor-widget-wrap').css('padding-right', w_vc_row_lg_medium + 'px');
674
675                    $('.rtl .ct-column-offset-left > .elementor-column-wrap > .elementor-widget-wrap').css('padding-right', w_vc_row_lg_medium + 'px');
676                    $('.rtl .ct-column-offset-right > .elementor-column-wrap > .elementor-widget-wrap').css('padding-left', w_vc_row_lg_medium + 'px');
677                }
678            }
679        }, 10 );
680    }
681
682    /* ====================
683     Scroll To Top
684     ====================== */
685    function consultio_scroll_to_top() {
686        if (scroll_top < window_height) {
687            $('.scroll-top').addClass('off').removeClass('on');
688        }
689        if (scroll_top > window_height) {
690            $('.scroll-top').addClass('on').removeClass('off');
691        }
692    }
693
694    /* ====================
695     WOW Animate
696     ====================== */
697    function consultio_wow_init() {
698        var wow = new WOW(
699            {
700                boxClass:     'wow',      // animated element css class (default is wow)
701                animateClass: 'animated', // animation css class (default is animated)
702                offset:       0,          // distance to the element when triggering the animation (default is 0)
703                mobile:       true,       // trigger animations on mobile devices (default is true)
704                live:         true,       // act on asynchronously loaded content (default is true)
705                callback:     function(box) {
706                    // the callback is fired every time an animation is started
707                    // the argument that is passed in is the DOM node being animated
708                },
709                scrollContainer: null,    // optional scroll container selector, otherwise use window,
710                resetAnimation: true,     // reset animation on end (default is true)
711            }
712        );
713        wow.init();
714    }
715
716    /* ====================
717     Mouse Move
718     ====================== */
719    function consultio_mouse_move() {
720        var follower, init, mouseX, mouseY, positionElement, timer;
721
722        follower = document.getElementById('ct-mouse-move');
723
724        mouseX = (event) => {
725            return event.clientX;
726        };
727
728        mouseY = (event) => {
729            return event.clientY;
730        };
731
732        positionElement = (event) => {
733            var mouse;
734            mouse = {
735                x: mouseX(event),
736                y: mouseY(event)
737            };
738
739            follower.style.top = mouse.y + 'px';
740            return follower.style.left = mouse.x + 'px';
741        };
742
743        timer = false;
744
745        window.onmousemove = init = (event) => {
746            var _event;
747            _event = event;
748                return timer = setTimeout(() => {
749                return positionElement(_event);
750            }, 0);
751        };
752    }
753
754    /* ====================
755     WooComerce Quantity
756     ====================== */
757    function consultio_quantity_icon() {
758        $('#content .quantity').append('<span class="quantity-icon"><i class="quantity-down fa fa-sort-desc"></i><i class="quantity-up fa fa-sort-asc"></i></span>');
759        $('.quantity-up').on('click', function () {
760            $(this).parents('.quantity').find('input[type="number"]').get(0).stepUp();
761            $(this).parents('.woocommerce-cart-form').find('.actions .button').removeAttr('disabled');
762        });
763        $('.quantity-down').on('click', function () {
764            $(this).parents('.quantity').find('input[type="number"]').get(0).stepDown();
765            $(this).parents('.woocommerce-cart-form').find('.actions .button').removeAttr('disabled');
766        });
767        $('.woocommerce-cart-form .actions .button').removeAttr('disabled');
768    }
769
770    $( document ).ajaxComplete(function() {
771       consultio_quantity_icon();
772    });
773
774    /* =================
775     Footer Fixed
776     =================== */
777    function consultio_footer_fixed() {
778        setTimeout(function(){
779            var h_footer = $('.fixed-footer .site-footer-custom').outerHeight() - 1;
780            $('.fixed-footer .site-content').css('margin-bottom', h_footer + 'px');
781        }, 600);
782    }
783
784    /* =================
785    Portfolio
786     =================== */
787    function consultio_portfolio_ex() {
788        window_width = $(window).width();
789        var w_container = (window_width - 1170) / 2;
790        var w_image_box = (window_width - w_container) - 415;
791        if (window_width > 1199) {
792            $('.ct-portfolio-external1 .ct-carousel-inner').css('max-width', w_image_box + 'px');
793        }
794    }
795
796})(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.