PageSourceSearch

https://taavia.ai/wp-content/themes/ai-globe/assets/js/custom.js?ver=7.1.2

js taavia.ai collected 2026-10-05 15:18:22 UTC 11,786 bytes, 308 lines download raw bytes

1jQuery.noConflict();
2jQuery(document).ready(function($){
3    "use strict";
4
5    /**
6     * Keyboard navigation links
7     */
8        if( $("ul.wdt-primary-nav").length ) {
9            var $children = $("ul.wdt-primary-nav").find(".menu-item-has-children a");
10            var $sub_menu = $("ul.wdt-primary-nav").find(".sub-menu a");
11            var $a        = $("ul.wdt-primary-nav > li > a");
12
13            $( $a ).focus(function() {
14                $(this).parent("li").addClass('focus');
15            }).blur(function(){
16                $(this).parent("li").removeClass('focus');
17            });
18
19            $( $children ).focus(function(){
20                $(this).parents(".menu-item-has-children").addClass('focus');
21            }).blur(function(){
22                $(this).parents(".menu-item-has-children").removeClass('focus');
23            });
24
25            $( $sub_menu ).focus(function(){
26                $(this).parent("li").addClass('focus');
27            }).blur(function(){
28                $(this).parent("li").removeClass('focus');
29            });
30        }
31
32        jQuery(document).on('keydown', function( event ) {
33
34            if(!jQuery('body').hasClass('nav-is-visible')) {
35                return;
36            }
37
38            var tabKey = event.keyCode === 9;
39			var shiftKey = event.shiftKey;
40			var escKey = event.keyCode === 27;
41
42            if(escKey) {
43                jQuery('.mobile-menu-overlay').trigger('click');
44            }
45
46            var activeItem = jQuery(':focus');
47            if(activeItem.parent().hasClass('menu-item')) {
48
49                if( shiftKey && tabKey ) {
50
51                    var activeMenuItem = activeItem.parent('.menu-item');
52                    if(activeMenuItem.prev().hasClass('menu-item-has-children')) {
53                        event.preventDefault();
54                        activeMenuItem.prev().find('a:first').focus();
55                    }
56
57                } else if( !shiftKey && tabKey ) {
58
59                    var activeMenuItem = activeItem.parent('.menu-item');
60                    if(activeMenuItem.next().hasClass('menu-item-has-children')) {
61                        event.preventDefault();
62                        activeMenuItem.next().find('a:first').focus();
63                    } else if(activeMenuItem.hasClass('menu-item-has-children')) {
64                        event.preventDefault();
65                        activeMenuItem.next().find('a:first').focus();
66                    } else if(activeMenuItem.attr('class') == jQuery('.mobile-menu .menu-item:last').attr('class')) {
67                        event.preventDefault();
68                        jQuery('.mobile-menu').find('.close-nav:first a').focus();
69                    } else if(activeMenuItem.attr('class') == activeMenuItem.parent('.sub-menu').find('.menu-item:last').attr('class')) {
70                        event.preventDefault();
71                        activeMenuItem.parent('.sub-menu').find('.close-nav:first a').focus();
72                    }
73
74                }
75
76            } else {
77
78                if( shiftKey && tabKey ) {
79
80                    if(activeItem.parent('li').hasClass('close-nav')){
81                        event.preventDefault();
82                        if(activeItem.closest('.sub-menu').length){
83                            activeItem.closest('.sub-menu').find('.menu-item:last a').focus();
84                        } else {
85                            jQuery('.mobile-menu .menu-item-depth-0:last a').focus();
86                        }
87                    }
88
89                }
90
91            }
92
93        });
94
95        // Header Height
96        var header_container_height = $('body > .wrapper > .inner-wrapper > #header-wrapper > header');
97        var header_assign_height = $('body');
98        if( header_container_height.length ) {
99            header_container_height.each(function(){
100                var foot_height = $(this).height();
101                header_assign_height.css('--header-height', foot_height+'px');
102            });
103        }
104
105        // Footer Height
106
107        var footer_container_height = $('body.wdt-fixed-footer-enabled > .wrapper > .inner-wrapper > footer');
108        var footer_assign_height = $('body.wdt-fixed-footer-enabled > .wrapper > .inner-wrapper');
109
110        if( footer_container_height.length ) {
111            footer_container_height.each(function(){
112                var head_height = $(this).height();
113                footer_assign_height.css('--footer-height', head_height+'px');
114            });
115        }
116
117    /**
118     * Desktop Menu Animation
119     */
120
121        $('.animate-menu-item').parents('.menu-item').find('a')
122            .mouseenter(function() {
123                var animation_class = $(this).parents('.menu-item').find('.animate-menu-item').attr('data-animation');
124                $(this).parents('.menu-item').find('.animate-menu-item').addClass(animation_class);
125            })
126            .mouseleave(function() {
127                var animation_class = $(this).parents('.menu-item').find('.animate-menu-item').attr('data-animation');
128                $(this).parents('.menu-item').find('.animate-menu-item').removeClass(animation_class);
129            });
130
131    /**
132     * Mobile Menu
133     */
134
135        $('.menu-trigger').on('click', function( event ){
136
137            var menuItem = $(this).parents('.wdt-header-menu').find('.wdt-primary-nav:not(.wdt-secondary-nav)').clone();
138
139            // Remove animation Class
140            $('[data-animation]', menuItem ).each(function(ix, ele ){
141                $(ele).removeClass('animate-menu-item');
142            });
143
144            $('<div class="mobile-menu" />').appendTo( $("body") );
145            menuItem.appendTo('.mobile-menu');
146            $('<div class="mobile-menu-overlay"></div>').appendTo( $("body") );
147
148            $('.mobile-menu').toggleClass('nav-is-visible');
149            $('.mobile-menu-overlay').toggleClass('is-visible');
150            $('body').toggleClass('nav-is-visible');
151
152            $('.mobile-menu').find('.close-nav:first a').focus();
153
154            // Initializing mobile nav
155            initializeMobileNav();
156
157        });
158
159        // Closing Mobile Nav
160        function closeMobNav() {
161            $('body').removeClass('nav-is-visible');
162
163            $('.mobile-menu').remove();
164            $('.mobile-menu-overlay').remove();
165
166            $('.menu-trigger').focus();
167        }
168
169        // Initialize mobile nav
170        function initializeMobileNav() {
171
172            $('li.close-nav').on('click', function(event) {
173                closeMobNav();
174            });
175
176            $('.mobile-menu-overlay').on('click', function(event) {
177                closeMobNav();
178            });
179
180            // Sub Menu in Mobile Menu
181            $('.menu-item-has-children > a, .page_item_has_children > a').on('click', function(event) {
182                if ( $('body').hasClass('nav-is-visible') ) {
183                    event.preventDefault();
184                    var a = $(this).clone();
185                    $(this).next('.sub-menu').find('.see-all').html(a);
186                }
187
188                var selected = $(this);
189                if( selected.next('ul').hasClass('is-hidden') ) {
190                    selected.next('ul.sub-menu').removeClass('is-hidden');
191                } else {
192                    selected.next('ul.sub-menu').addClass('is-hidden');
193                }
194            });
195
196            $('.menu-item-has-children > a, .page_item_has_children > a').on('click', function(event) {
197
198                var selected = $(this);
199                selected.next('.sub-menu:not(.is-hidden)').find('a:first').focus();
200
201            });
202
203            // Go Back in Mobile Menu
204            $('.go-back').on('click', function(event) {
205                $(this).parent('ul:not(.menu)').addClass('is-hidden');
206                event.preventDefault();
207                $(this).parents('.menu-item').find('a:first').focus();
208            });
209
210        }
211
212        // For Video Post
213        if( $("div.wdt-video-wrap").length ) {
214           $("div.wdt-video-wrap").fitVids();
215        }
216
217        // Smart Resize
218        $(window).on("resize", function() {
219            // Blog Isotope
220            if( $(".apply-isotope").length ) {
221                $(".apply-isotope").isotope({itemSelector : '.column',transformsEnabled:false,masonry: { columnWidth: '.grid-sizer' } });
222            }
223        });
224
225        if( $('.single .entry-thumb.single-preview-img a.mag-pop, a.lightbox-preview-img').length ) {
226            $('.single .entry-thumb.single-preview-img a.mag-pop, a.lightbox-preview-img').magnificPopup({
227                type: 'image',
228                closeOnContentClick: false,
229                closeBtnInside: false,
230                mainClass: 'mfp-with-zoom mfp-img-mobile',
231                image: {
232                  verticalFit: true,
233                  titleSrc: function(item) {
234                    return item.el.attr('title') + ' &middot; <a class="image-source-link" href="'+item.el.attr('href')+'" target="_blank">image source</a>';
235                  }
236                },
237                zoom: {
238                  enabled: true,
239                  duration: 300, // don't foget to change the duration also in CSS
240                  opener: function(element) {
241                    return element.find('img');
242                  }
243                }
244            });
245        }
246
247        $("select:not(.dt-select-service,.dt-select-staff,.start-time,.end-time,.wdt-sf-field)").each(function() {
248            $(this).select2();
249        });
250
251});
252
253/* Live Search*/
254jQuery( 'body' ).delegate( '.text_input', 'keypress', function(e) {
255
256    if (jQuery('.text_input').is(":focus")) {
257
258    var this_item = jQuery(this),
259    search_val = this_item.val();
260        if(search_val == "" ){
261            jQuery('.quick_search_results').html("");
262            jQuery('.quick_search_results').removeClass('active');
263        } else {
264                jQuery.ajax({
265                    type:"POST",
266                    url: aiglobe_urls.ajaxurl,
267                    data: {
268                        action:'aiglobe_search_data_fetch',
269                        search_val:search_val,
270                        ajax_call: true,
271                        function_call: 'aiglobe_search_data_fetch',
272                    },
273                    success:function(data){
274                        jQuery('.quick_search_results').addClass('active');
275                        jQuery('.quick_search_results').html(data);
276                    }
277                });
278            }
279    }
280});
281
282(function ($) {
283    $(window).on('load', function() {
284
285        // Gallery Post Slider
286        if( ($("ul.entry-gallery-post-slider").length) && ( $("ul.entry-gallery-post-slider li").length > 1 ) ){
287            $("ul.entry-gallery-post-slider").bxSlider({mode: 'fade', auto:false, video:true, pager:'', autoHover:true, adaptiveHeight:false, responsive: true });
288        }
289
290        // Blog Isotope
291        if( $(".apply-isotope").length ) {
292            $(".apply-isotope").isotope({itemSelector : '.column',transformsEnabled:false,masonry: { columnWidth: '.grid-sizer' } });
293        }
294
295        // Blog Equal Height
296        if( $('.tpl-blog-holder.apply-equal-height').length ) {
297            $(".tpl-blog-holder.apply-equal-height article").matchHeight({ property:"min-height" });
298        }
299    });
300})(jQuery);
301
302(function( $ ) {
303    $(document).ready( function(){
304      $('form.wpcf7-form input').each(function(){
305        $(this).parent("p").addClass('with-spinner');
306      });
307    });
308  })( 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.