PageSourceSearch

https://get.tapeapp.com/wp-content/plugins/th-widget-pack/header-footer/inc/js/frontend.js?ver=2.1.14

js tapeapp.com collected 2026-09-24 13:11:22 UTC 25,476 bytes, 689 lines download raw bytes

1( function( $ ) {
2
3	/**
4	 * Sticky Header JS
5	 * 
6	 */
7
8	function scrollFunction() {
9
10		var regularHeader = $('#thhf-masthead');
11		var stickyHeader = $('#thhf-masthead-sticky');
12		var $wpAdminBar = $( '#wpadminbar' );
13		var scrollHeight = $(window).scrollTop();
14
15		if ($wpAdminBar.length) {
16			var $wpAdminBarHeight = $wpAdminBar.height();
17		} else {
18			var $wpAdminBarHeight = 0;
19		}
20
21
22		$mobileAdminBar = $wpAdminBarHeight;
23
24		/*if (window.matchMedia("(max-width: 600px)").matches) {
25			$mobileAdminBar = 0;
26		} else {
27			$mobileAdminBar = $wpAdminBarHeight;
28		}*/
29
30
31		if ( regularHeader.length && stickyHeader.length )  {
32			if ( regularHeader.height() < scrollHeight ) {
33				stickyHeader.css({
34					"position": "fixed",
35					"display": "inherit",
36					"top": 0 + $wpAdminBarHeight,
37				});
38
39				stickyHeader.show();
40			} else {
41
42				stickyHeader.css({
43					"position": "relative",
44					"display": "inherit",
45					"top": 0,
46				});
47				if ( stickyHeader.hasClass("sticky-stacked") ) {
48					stickyHeader.show();
49				} else {
50					stickyHeader.hide();
51				}
52			}
53		} else {
54			stickyHeader.css({
55				"position": "fixed",
56				"display": "inherit",
57				"top": 0 + $mobileAdminBar,
58			});
59			$wpAdminBar.css({
60				"position": "fixed",
61				"display": "inherit",
62				"top": 0,
63			});
64		}
65
66    }
67	
68	$(window).on('scroll resize load', function () {
69		scrollFunction();
70	});
71
72
73	/**
74	* Search widget JS
75	*/
76
77	var WidgethfeSearchButton = function( $scope, $ ){
78
79		if ( 'undefined' == typeof $scope )
80			return;
81
82			var $input = $scope.find( "input.thhf-search-form__input" );
83			var $clear = $scope.find( "button#clear" );
84			var $clear_with_button = $scope.find( "button#clear-with-button" );
85			var $search_button = $scope.find( ".hfe-search-submit" );
86			var $toggle_search = $scope.find( ".thhf-search-icon-toggle input" );
87
88		$scope.find( '.thhf-search-icon-toggle' ).on( 'click', function( ){
89			$scope.find( ".thhf-search-form-wrapper" ).addClass( "active" );
90			//$scope.find( ".thhf-search-form__input" ).focus();						
91		});	
92		$scope.find( '.thhf-search-overlay-close' ).on( 'click', function( ){
93			$scope.find( ".thhf-search-form-wrapper" ).removeClass( "active" );
94			//$scope.find( ".thhf-search-form__input" ).focus();						
95		});	
96
97		
98		
99		// $scope.find( ".thhf-search-form__input" ).focus( function(){
100		// 	$scope.find( ".thhf-search-form-wrapper" ).addClass( "active" );
101		// 	//$scope.find( ".thhf-search-button-wrapper" ).addClass( "hfe-input-focus" );
102		// });
103
104		$scope.find( ".thhf-search-form__input" ).blur( function() {
105			$scope.find( ".thhf-search-button-wrapper" ).removeClass( "hfe-input-focus" );
106		});
107  		   
108
109		$search_button.on( 'touchstart click', function(){
110			$input.submit();
111		});
112
113		$toggle_search.css( 'padding-right', $toggle_search.next().outerWidth() + 'px' );
114
115	
116		$input.on( 'keyup', function(){
117			$clear.style = (this.value.length) ? $clear.css('visibility','visible'): $clear.css('visibility','hidden');
118			$clear_with_button.style = (this.value.length) ? $clear_with_button.css('visibility','visible'): $clear_with_button.css('visibility','hidden');
119			$clear_with_button.css( 'right', $search_button.outerWidth() + 'px' );
120		});
121
122		$clear.on("click",function(){
123			this.style = $clear.css('visibility','hidden');
124			$input.value = "";
125		});
126		$clear_with_button.on("click",function(){
127			this.style = $clear_with_button.css('visibility','hidden');
128			$input.value = "";
129		});
130		
131	};
132		/**
133	 * Nav Menu handler Function.
134	 *
135	 */
136	var WidgethfeNavMenuHandler = function( $scope, $ ) {
137
138		if ( 'undefined' == typeof $scope )
139			return;
140		
141		var id = $scope.data( 'id' );
142		var wrapper = $scope.find('.elementor-widget-hfe-nav-menu ');		
143		var layout = $( '.elementor-element-' + id + ' .hfe-nav-menu' ).data( 'layout' );
144		var flyout_data = $( '.elementor-element-' + id + ' .hfe-flyout-wrapper' ).data( 'flyout-class' );
145		var last_item = $( '.elementor-element-' + id + ' .hfe-nav-menu' ).data( 'last-item' );
146		var last_item_flyout = $( '.elementor-element-' + id + ' .hfe-flyout-wrapper' ).data( 'last-item' );
147
148		$( 'div.hfe-has-submenu-container' ).removeClass( 'sub-menu-active' );
149
150		_toggleClick( id );
151
152		if( 'horizontal' !== layout ){
153
154			_eventClick( id );
155		}else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 767px )" ).matches ) {
156
157			_eventClick( id );
158		}else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 1024px )" ).matches ) {
159
160			_eventClick( id );
161		}
162
163		$( '.elementor-element-' + id + ' .hfe-flyout-trigger .hfe-nav-menu-icon' ).off( 'click keyup' ).on( 'click keyup', function() {
164
165			_openMenu( id );
166		} );
167
168		$( '.elementor-element-' + id + ' .hfe-flyout-close' ).off( 'click keyup' ).on( 'click keyup', function() {
169
170			_closeMenu( id );
171		} );
172
173		$( '.elementor-element-' + id + ' .hfe-flyout-overlay' ).off( 'click' ).on( 'click', function() {
174
175			_closeMenu( id );
176		} );	
177
178
179		$scope.find( '.sub-menu' ).each( function() {
180
181			var parent = $( this ).closest( '.menu-item' );
182
183			$scope.find( parent ).addClass( 'parent-has-child' );
184			$scope.find( parent ).removeClass( 'parent-has-no-child' );
185		});
186
187		if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
188			$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'elementor-button-wrapper' );
189			$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).addClass( 'elementor-button' );			
190		}
191
192		_borderClass( id );	
193
194		$( window ).on( 'resize', function(){
195
196			if( 'horizontal' !== layout ) {
197
198				_eventClick( id );
199			}else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 767px )" ).matches ) {
200
201				_eventClick( id );
202			}else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 1024px )" ).matches ) {
203
204				_eventClick( id );
205			}
206
207			if( 'horizontal' == layout && window.matchMedia( "( min-width: 977px )" ).matches){
208
209				$( '.elementor-element-' + id + ' div.hfe-has-submenu-container' ).next().css( 'position', 'absolute');	
210			}
211
212			if( 'expandible' == layout || 'flyout' == layout ){
213
214				_toggleClick( id );
215			}else if ( 'vertical' == layout || 'horizontal' == layout ) {
216				if( window.matchMedia( "( max-width: 767px )" ).matches && ($( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile'))){
217
218					_toggleClick( id );					
219				}else if ( window.matchMedia( "( max-width: 1024px )" ).matches && $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') ) {
220					
221					_toggleClick( id );
222				}
223			}
224
225			_borderClass( id );	
226
227		});
228
229        // Acessibility functions
230
231  		$scope.find( '.parent-has-child .hfe-has-submenu-container a').attr( 'aria-haspopup', 'true' );
232  		$scope.find( '.parent-has-child .hfe-has-submenu-container a').attr( 'aria-expanded', 'false' );
233
234  		$scope.find( '.hfe-nav-menu__toggle').attr( 'aria-haspopup', 'true' );
235  		$scope.find( '.hfe-nav-menu__toggle').attr( 'aria-expanded', 'false' );
236
237  		// End of accessibility functions
238
239		$( document ).trigger( 'hfe_nav_menu_init', id );
240
241		$( '.elementor-element-' + id + ' div.hfe-has-submenu-container' ).on( 'keyup', function(e){
242
243			var $this = $( this );
244
245		  	if( $this.parent().hasClass( 'menu-active' ) ) {
246
247		  		$this.parent().removeClass( 'menu-active' );
248
249		  		$this.parent().next().find('ul').css( { 'visibility': 'hidden', 'opacity': '0', 'height': '0' } );
250		  		$this.parent().prev().find('ul').css( { 'visibility': 'hidden', 'opacity': '0', 'height': '0' } );
251
252		  		$this.parent().next().find( 'div.hfe-has-submenu-container' ).removeClass( 'sub-menu-active' );
253		  		$this.parent().prev().find( 'div.hfe-has-submenu-container' ).removeClass( 'sub-menu-active' );
254			}else { 
255
256				$this.parent().next().find('ul').css( { 'visibility': 'hidden', 'opacity': '0', 'height': '0' } );
257		  		$this.parent().prev().find('ul').css( { 'visibility': 'hidden', 'opacity': '0', 'height': '0' } );
258
259		  		$this.parent().next().find( 'div.hfe-has-submenu-container' ).removeClass( 'sub-menu-active' );
260		  		$this.parent().prev().find( 'div.hfe-has-submenu-container' ).removeClass( 'sub-menu
260-active' );
261
262				$this.parent().siblings().find( '.hfe-has-submenu-container a' ).attr( 'aria-expanded', 'false' );
263
264				$this.parent().next().removeClass( 'menu-active' );
265		  		$this.parent().prev().removeClass( 'menu-active' );
266
267				event.preventDefault();
268
269				$this.parent().addClass( 'menu-active' );
270
271				if( 'horizontal' !== layout ){
272					$this.addClass( 'sub-menu-active' );	
273				}
274				
275				$this.find( 'a' ).attr( 'aria-expanded', 'true' );
276
277				$this.next().css( { 'visibility': 'visible', 'opacity': '1', 'height': 'auto' } );
278
279				if ( 'horizontal' !== layout ) {
280						
281		  			$this.next().css( 'position', 'relative');			
282				} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 767px )" ).matches && ($( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile'))) {
283										
284  					$this.next().css( 'position', 'relative');		  					
285				} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 1024px )" ).matches ) {
286					
287  					if ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') ) {
288
289  						$this.next().css( 'position', 'relative');	
290  					} else if ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-none') ) {
291  						
292  						$this.next().css( 'position', 'absolute');	
293  					}
294  				}		
295			}
296		});
297
298		$( '.elementor-element-' + id + ' li.menu-item' ).on( 'keyup', function(e){
299			var $this = $( this );
300
301	 		$this.next().find( 'a' ).attr( 'aria-expanded', 'false' );
302	 		$this.prev().find( 'a' ).attr( 'aria-expanded', 'false' );
303	  		
304	  		$this.next().find('ul').css( { 'visibility': 'hidden', 'opacity': '0', 'height': '0' } );
305	  		$this.prev().find('ul').css( { 'visibility': 'hidden', 'opacity': '0', 'height': '0' } );
306	  		
307	  		$this.siblings().removeClass( 'menu-active' );
308	  		$this.next().find( 'div.hfe-has-submenu-container' ).removeClass( 'sub-menu-active' );
309		  	$this.prev().find( 'div.hfe-has-submenu-container' ).removeClass( 'sub-menu-active' );
310		  		
311		});
312	};
313
314	function _openMenu( id ) {
315
316		var flyout_content = $( '#hfe-flyout-content-id-' + id );
317		var layout = $( '#hfe-flyout-content-id-' + id ).data( 'layout' );
318		var layout_type = $( '#hfe-flyout-content-id-' + id ).data( 'flyout-type' );
319		var wrap_width = flyout_content.width() + 'px';
320		var container = $( '.elementor-element-' + id + ' .hfe-flyout-container .hfe-side.hfe-flyout-' + layout );
321
322		$( '.elementor-element-' + id + ' .hfe-flyout-overlay' ).fadeIn( 100 );
323
324		if( 'left' == layout ) {
325
326			$( 'body' ).css( 'margin-left' , '0' );
327			container.css( 'left', '0' );
328
329			if( 'push' == layout_type ) {
330
331				$( 'body' ).addClass( 'hfe-flyout-animating' ).css({ 
332					position: 'absolute',
333					width: '100%',
334					'margin-left' : wrap_width,
335					'margin-right' : 'auto'
336				});
337			}	
338
339			container.addClass( 'hfe-flyout-show' );	
340		} else {
341
342			$( 'body' ).css( 'margin-right', '0' );
343			container.css( 'right', '0' );
344
345			if( 'push' == layout_type ) {
346
347				$( 'body' ).addClass( 'hfe-flyout-animating' ).css({ 
348					position: 'absolute',
349					width: '100%',
350					'margin-left' : '-' + wrap_width,
351					'margin-right' : 'auto',
352				});
353			}
354
355			container.addClass( 'hfe-flyout-show' );
356		}		
357	}
358
359	function _closeMenu( id ) {
360
361		var flyout_content = $( '#hfe-flyout-content-id-' + id );
362		var layout    = $( '#hfe-flyout-content-id-' + id ).data( 'layout' );
363		var wrap_width = flyout_content.width() + 'px';
364		var layout_type = $( '#hfe-flyout-content-id-' + id ).data( 'flyout-type' );
365		var container = $( '.elementor-element-' + id + ' .hfe-flyout-container .hfe-side.hfe-flyout-' + layout );
366
367		$( '.elementor-element-' + id + ' .hfe-flyout-overlay' ).fadeOut( 100 );	
368
369		if( 'left' == layout ) {
370
371			container.css( 'left', '-' + wrap_width );
372
373			if( 'push' == layout_type ) {
374
375				$( 'body' ).css({ 
376					position: '',
377					'margin-left' : '',
378					'margin-right' : '',
379				});
380
381				setTimeout( function() {
382					$( 'body' ).removeClass( 'hfe-flyout-animating' ).css({ 
383						width: '',
384					});
385				});
386			}	
387
388			container.removeClass( 'hfe-flyout-show' );					
389		} else {
390			container.css( 'right', '-' + wrap_width );
391			
392			if( 'push' == layout_type ) {
393
394				$( 'body' ).css({
395					position: '',
396					'margin-right' : '',
397					'margin-left' : '',
398				});
399
400				setTimeout( function() {
401					$( 'body' ).removeClass( 'hfe-flyout-animating' ).css({ 
402						width: '',
403					});
404				});
405			}
406			container.removeClass( 'hfe-flyout-show' );
407		}	
408	}
409
410	function _eventClick( id ){
411
412		var layout = $( '.elementor-element-' + id + ' .hfe-nav-menu' ).data( 'layout' );
413
414		$( '.elementor-element-' + id + ' div.hfe-has-submenu-container' ).off( 'click' ).on( 'click', function( event ) {
415
416			var $this = $( this );
417
418			if( $( '.elementor-element-' + id ).hasClass( 'hfe-link-redirect-child' ) ) {
419
420				if( $this.hasClass( 'sub-menu-active' ) ) {
421
422					if( ! $this.next().hasClass( 'sub-menu-open' ) ) {
423
424						$this.find( 'a' ).attr( 'aria-expanded', 'false' );
425
426						if( 'horizontal' !== layout ){
427
428							event.preventDefault();
429
430							$this.next().css( 'position', 'relative' );
431						} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 767px )" ).matches && ($( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile'))) {
432
433							event.preventDefault();
434
435							$this.next().css( 'position', 'relative' );
436						} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 1024px )" ).matches && ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile'))) {
437
438							event.preventDefault();
439
440							$this.next().css( 'position', 'relative' );
441						}
442
443						$this.removeClass( 'sub-menu-active' );
444						$this.next().removeClass( 'sub-menu-open' );
445						$this.next().css( { 'visibility': 'hidden', 'opacity': '0', 'height': '0' } );
446						$this.next().css( { 'transition': 'none'} );
447					} else{
448
449						$this.find( 'a' ).attr( 'aria-expanded', 'false' );
450
451						$this.removeClass( 'sub-menu-active' );
452						$this.next().removeClass( 'sub-menu-open' );
453						$this.next().css( { 'visibility': 'hidden', 'opacity': '0', 'height': '0' } );
454						$this.next().css( { 'transition': 'none'} );
455
456						if ( 'horizontal' !== layout ){
457
458							$this.next().css( 'position', 'relative' );
459						} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 767px )" ).matches && ($( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile'))) {
460
461							$this.next().css( 'position', 'relative' );
462
463						} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 1024px )" ).matches && ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile'))) {
464
465							$this.next().css( 'position', 'absolute' );
466						}
467					}
468				} else {
469
470					$this.find( 'a' ).attr( 'aria-expanded', 'true' );
471					if ( 'horizontal' !== layout ) {
472						
473						event.preventDefault();
474						$this.next().css( 'position', 'relative');
475					} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 767px )" ).matches && ($( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile'))) {
476						
477						event.preventDefault();
478						$this.next().css( 'position', 'relative');
479					} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 1024px )" ).matches ) {
480						event.preventDefault();
481
482						if ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') ) {
483
484							$this.next().css( 'position', 'relative');
485						} else if ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-none') ) {
486
487							$this.next().css( 'position', 'absolute');
488						}
489					}
490
491					$this.addClass( 'sub-menu-active' );
492					$this.next().addClass( 'sub-menu-open' );
493					$this.next().css( { 'visibility': 'visible', 'opacity': '1', 'height': 'auto' } );
494					$this.next().css( { 'transition': '0.3s ease'} );
495				}
496			}
497		});
498
499		$( '.elementor-element-' + id + ' .hfe-menu-toggle' ).off( 'click keyup' ).on( 'click keyup',function( event ) {
500
501			var $this = $( this );
502
503		  	if( $this.parent().parent().hasClass( 'menu-active' ) ) {
504
505	  			event.preventDefault();
506
507				$this.parent().parent().removeClass( 'menu-active' );
508				$this.parent().parent().next().css( { 'visibility': 'hidden', 'opacity': '0', 'height': '0' } );
509
510				if ( 'horizontal' !== layout ) {
511						
512		  			$this.parent().parent().next().css( 'position', 'relative');			
513				} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 767px )" ).matches && ($( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile'))) {
514										
515  					$this.parent().parent().next().css( 'position', 'relative');		  					
516				} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 1024px )" ).matches ) {
517					
518  					if ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') ) {
519
520  						$this.parent().parent().next().css( 'position', 'relative');	
521  					} else if ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-none') ) {
522  						
523  						$this.parent().parent().next().css( 'position', 'absolute');	
524  					}
525  				}
526			}else { 
527
528				event.preventDefault();
529
530				$this.parent().parent().addClass( 'menu-active' );
531
532				$this.parent().parent().next().css( { 'visibility': 'visible', 'opacity': '1', 'height': 'auto' } );
533
534				if ( 'horizontal' !== layout ) {
535						
536		  			$this.parent().parent().next().css( 'position', 'relative');			
537				} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 767px )" ).matches && ($( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile'))) {
538										
539  					$this.parent().parent().next().css( 'position', 'relative');		  					
540				} else if ( 'horizontal' === layout && window.matchMedia( "( max-width: 1024px )" ).matches ) {
541					
542  					if ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') ) {
543
544  						$this.parent().parent().next().css( 'position', 'relative');	
545  					} else if ( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-none') ) {
546  						
547  						$this.parent().parent().next().css( 'position', 'absolute');	
548  					}
549  				}		
550			}
551		});
552	}
553
554	function _borderClass( id ){
555
556		var last_item = $( '.elementor-element-' + id + ' .hfe-nav-menu' ).data( 'last-item' );
557		var last_item_flyout = $( '.elementor-element-' + id + ' .hfe-flyout-wrapper' ).data( 'last-item' );
558		var layout = $( '.elementor-element-' + id + ' .hfe-nav-menu' ).data( 'layout' );
559
560		$( '.elementor-element-' + id + ' nav').removeClass('hfe-dropdown');
561
562
563		if ( window.matchMedia( "( max-width: 767px )" ).matches ) {
564
565			if( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-mobile') || $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet')){
566				
567				$( '.elementor-element-' + id + ' nav').addClass('hfe-dropdown');
568				if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
569					$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().removeClass( 'elementor-button-wrapper' );
570					$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).removeClass( 'elementor-button' );	
571				}	
572			}else{
573				
574				$( '.elementor-element-' + id + ' nav').removeClass('hfe-dropdown');
575				if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
576					$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'elementor-button-wrapper' );
577					$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).addClass( 'elementor-button' );	
578				}
579
580			}
581		}else if ( window.matchMedia( "( max-width: 1024px )" ).matches ) {
582
583			if( $( '.elementor-element-' + id ).hasClass('hfe-nav-menu__breakpoint-tablet') ) {
584				
585				$( '.elementor-element-' + id + ' nav').addClass('hfe-dropdown');
586				if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
587					$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().removeClass( 'elementor-button-wrapper' );
588					$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).removeClass( 'elementor-button' );	
589				}
590			}else{
591				
592				$( '.elementor-element-' + id + ' nav').removeClass('hfe-dropdown');
593				if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
594					$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'elementor-button-wrapper' );
595					$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).addClass( 'elementor-button' );
596				}
597
598			}
599		}
600
601		var layout = $( '.elementor-element-' + id + ' .hfe-nav-menu' ).data( 'layout' );
602		if( 'expandible' == layout ){
603			if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
604				$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().removeClass( 'elementor-button-wrapper' );
605				$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).removeClass( 'elementor-button' );			
606			}			
607		}
608		// Clean up width and
609		if (!$( '.elementor-element-' + id + ' nav').hasClass('hfe-dropdown')) {
610			$( '.elementor-element-' + id + ' nav').removeAttr("style");
611		}
612	}
613
614	function _toggleClick( id ){
615
616		if ( $( '.elementor-element-' + id + ' .hfe-nav-menu__toggle' ).hasClass( 'hfe-active-menu-full-width' ) ){
617
618			$( '.elementor-element-' + id + ' .hfe-nav-menu__toggle' ).next().css( 'left', '0' );
619
620			var width = $( '.elementor-element-' + id ).closest('.elementor-section').outerWidth();
621			var sec_pos = $( '.elementor-element-' + id ).closest('.elementor-section').offset().left - $( '.elementor-element-' + id + ' .hfe-nav-menu__toggle' ).next().offset().left;
622			$( '.elementor-element-' + id + ' .hfe-nav-menu__toggle' ).next().css( 'width', width + 'px' );
623			$( '.elementor-element-' + id + ' .hfe-nav-menu__toggle' ).next().css( 'left', sec_pos + 'px' );
624		}
625
626		$( '.elementor-element-' + id + ' .hfe-nav-menu__toggle' ).off( 'click keyup' ).on( 'click keyup', function( event ) {
627
628
629			var $this = $( this );
630			var $selector = $this.next();
631
632			if ( $this.hasClass( 'hfe-active-menu' ) ) {
633
634				var layout = $( '.elementor-element-' + id + ' .hfe-nav-menu' ).data( 'layout' );
635				var full_width = $selector.data( 'full-width' );
636				var toggle_icon = $( '.elementor-element-' + id + ' nav' ).data( 'toggle-icon' );
637
638				$( '.elementor-element-' + id).find( '.hfe-nav-menu-icon' ).html( toggle_icon );
639
640				$this.removeClass( 'hfe-active-menu' );
641				$this.attr( 'aria-expanded', 'false' );
642				
643				if ( 'yes' == full_width ){
644
645					$this.removeClass( 'hfe-active-menu-full-width' );
646				
647					$selector.css( 'width', 'auto' );
648					$selector.css( 'left', '0' );
649					$selector.css( 'z-index', '0' );
650				}				
651			} else {
652				var layout = $( '.elementor-element-' + id + ' .hfe-nav-menu' ).data( 'layout' );
653				var full_width = $selector.data( 'full-width' );
654				var close_icon = $( '.elementor-element-' + id + ' nav' ).data( 'close-icon' );
655
656				$( '.elementor-element-' + id).find( '.hfe-nav-menu-icon' ).html( close_icon );
657				
658				$this.addClass( 'hfe-active-menu' );
659				$this.attr( 'aria-expanded', 'true' );
660
661				if ( 'yes' == full_width ){
662
663					$this.addClass( 'hfe-active-menu-full-width' );
664
665					var width = $( '.elementor-element-' + id ).closest('.elementor-section').outerWidth();
666					var sec_pos = $( '.elementor-element-' + id ).closest('.elementor-section').offset().left - $selector.offset().left;
667				
668					$selector.css( 'width', width + 'px' );
669					$selector.css( 'left', sec_pos + 'px' );
670					$selector.css( 'z-index', '9999' );
671				}
672			}
673
674			if( $( '.elementor-element-' + id + ' nav' ).hasClass( 'menu-is-active' ) ) {
675
676				$( '.elementor-element-' + id + ' nav' ).removeClass( 'menu-is-active' );
677			}else {
678
679				$( '.elementor-element-' + id + ' nav' ).addClass( 'menu-is-active' );
680			}				
681		} );
682	}
683
684	$( window ).on( 'elementor/frontend/init', function () {
685
686		elementorFrontend.hooks.addAction( 'frontend/element_ready/thhf-navigation-menu.default', WidgethfeNavMenuHandler );
687		elementorFrontend.hooks.addAction( 'frontend/element_ready/thhf-search-button.default', WidgethfeSearchButton );
688	});
689} )( 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.