PageSourceSearch

https://ik.org.pl/wp-content/themes/mstron/assets/js/custom.js?ver=4.4.2

js ik.org.pl collected 2026-09-24 19:34:19 UTC 30,782 bytes, 1,009 lines download raw bytes

1/* Custom codevz menu - 1.7.6 */
2!function(i,e){"use strict";var o,n,r,t,s,a,l,c,h,u=(r="sf-breadcrumb",t="sf-js-enabled",s="sf-with-ul",a="sf-arrows",(n=/^(?![\w\W]*Windows Phone)[\w\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent))&&i("html").css("cursor","pointer").on("click",i.noop),l=n,c="behavior"in(o=document.documentElement.style)&&"fill"in o&&/iemobile/i.test(navigator.userAgent),h=!!e.PointerEvent,{hide:function(e){if(this.length){var o=m(this);if(!o)return this;var n=!0===o.retainPath?o.$path:"",t=this.find("li."+o.hoverClass).add(this).not(n).removeClass(o.hoverClass).children(o.popUpSelector);if(o.speedOut,e&&t.show(),(o.retainPath=!1)===o.onBeforeHide.call(t))return this;t.hide()}return this},show:function(){var e=m(this);if(!e)return this;var o=this.addClass(e.hoverClass).children(e.popUpSelector);return!1===e.onBeforeShow.call(o)||o.show(),this},destroy:function(){return this.each(function(){var e,o=i(this),n=o.data("sf-options");return!!n&&(e=o.find(n.popUpSelector).parent("li"),clearTimeout(n.sfTimer),d(o,n),p(e),f(o),o.off(".codevzMenu").off(".hoverIntent"),e.children(n.popUpSelector).attr("style",function(e,o){return o.replace(/display[^;]+;?/g,"")}),n.$path.removeClass(n.hoverClass+" "+r).addClass(n.pathClass),o.find("."+n.hoverClass).removeClass(n.hoverClass),n.onDestroy.call(o),void o.removeData("sf-options"))})},init:function(s){return this.each(function(){var e=i(this);if(e.data("sf-options"))return!1;var o,n=i.extend({},i.fn.codevzMenu.defaults,s),t=e.find(n.popUpSelector).parent("li");n.$path=(o=n,e.find("li."+o.pathClass).slice(0,o.pathLevels).addClass(o.hoverClass+" "+r).filter(function(){return i(this).children(o.popUpSelector).hide().show().length}).removeClass(o.pathClass)),e.data("sf-options",n),d(e,n),p(t),f(e),function(e,o){var n="li:has("+o.popUpSelector+")";i.fn.hoverIntent&&!o.disableHI?e.hoverIntent(y,C,n):e.on("mouseenter.codevzMenu",n,y).on("mouseleave.codevzMenu",n,C);var t=h?"pointerdown.codevzMenu":"MSPointerDown.codevzMenu";l||(t+=" touchend.codevzMenu"),c&&(t+=" mousedown.codevzMenu"),e.on("focusin.codevzMenu","li",y).on("focusout.codevzMenu","li",C).on(t,"a",o,M)}(e,n),t.not("."+r).codevzMenu("hide",!0),n.onInit.call(this)})}});function d(e,o){var n=t;o.cssArrows&&(n+=" "+a),e.toggleClass(n)}function p(e){e.children("a").toggleClass(s)}function f(e){var o=e.css("ms-touch-action"),n=e.css("touch-action");n="pan-y"===(n=n||o)?"auto":"pan-y",e.css({"ms-touch-action":n,"touch-action":n})}function v(e){return e.closest("."+t)}function m(e){return v(e).data("sf-options")}function y(){var e=i(this),o=m(e);clearTimeout(o.sfTimer),e.siblings().codevzMenu("hide").end().codevzMenu("show")}function w(e){e.retainPath=-1<i.inArray(this[0],e.$path),this.codevzMenu("hide"),this.parents("."+e.hoverClass).length||(e.onIdle.call(v(this)),e.$path.length&&i.proxy(y,e.$path)())}function C(){var e=i(this),o=m(e);l?i.proxy(w,e,o)():(clearTimeout(o.sfTimer),o.sfTimer=setTimeout(i.proxy(w,e,o),o.delay))}function M(e){var o=i(this),n=m(o),t=o.siblings(e.data.popUpSelector);return!1===n.onHandleTouch.call(t)?this:void(0<t.length&&t.is(":hidden")&&(o.one("click.codevzMenu",!1),"MSPointerDown"===e.type||"pointerdown"===e.type?o.trigger("focus"):i.proxy(y,o.parent("li"))()))}i.fn.codevzMenu=function(e,o){return u[e]?u[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?i.error("Method "+e+" does not exist on jQuery.fn.codevzMenu"):u.init.apply(this,arguments)},i.fn.codevzMenu.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:300,easing:"linear",animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:100,speedOut:100,cssArrows:!0,disableHI:!1,onInit:i.noop,onBeforeShow:i.noop,onShow:i.noop,onBeforeHide:i.noop,onHide:i.noop,onIdle:i.noop,onDestroy:i.noop,onHandleTouch:i.noop}}(jQuery,window);
3
4/* Custom theme scripts */
5var Codevz = ( function( $ ) {
6	"use strict";
7
8	var wind = $( window ),
9		body = $( document.body ),
10		page = $( 'html, body' ),
11		inla = $( '.inner_layout' );
12
13	// Custom easing.
14	$.extend( $.easing, {
15		def: 'easeInOutCodevz',
16		easeInOutCodevz: function(x) {
17			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;
18		}
19	});
20
21	// Codevz callback.
22	if ( ! $.fn.codevz ) {
23
24		$.fn.codevz = function( data, callback ) {
25
26			if ( $( this ).length ) {
27
28				var $this = $( this ),
29					run = function( e ) {
30
31						var l = e.length, i = 0;
32
33						for( i; i < l; i++ ) {
34
35							var x = $( e[i] );
36
37							if ( x.data( 'codevz' ) !== data ) {
38								callback.apply( x.data( 'codevz', data ), [ x, i ] );
39							}
40
41						}
42
43					};
44
45				if ( Codevz.inview( $this, 100 ) ) {
46
47					run( $this );
48
49				} else {
50
51					$( window ).on( 'scroll.codevz', function() {
52
53						run( $this );
54
55						$( this ).off( 'scroll.codevz' );
56
57					} );
58
59				}
60
61			}
62
63		}
64
65	}
66
67	return {
68
69		inview: function( e, offset ) {
70
71			var offset 			= offset || 0,
72				docViewTop 		= wind.scrollTop(),
73				docViewBottom 	= docViewTop + wind.height(),
74				elemTop 		= e.offset().top,
75				elemBottom 		= elemTop + e.height();
76
77			return ( ( elemTop <= docViewBottom + offset ) && ( elemBottom >= docViewTop - offset ) );
78
79		},
80
81		init: function() {
82
83			// Header custom shape size.
84			$( 'div[class*="cz_row_shape_"]' ).codevz( 'row_shape', function( x ) {
85
86				Codevz.heightChanged( x, function() {
87
88					var cls = '.' + ( x.attr( 'class' ) || '' ).replace( /  | /g, '.' ),
89						hei = x.height() + 37;
90
91					!x.find( '> style' ).length && x.append( '<style></style>' );
92
93					x.find( '> style' ).html( cls + ' .row:before,' + cls + ' .row:after{width:' + hei + 'px}.elms_row ' + cls + ':before, .elms_row ' + cls + ':after{width:' + hei + 'px}' );
94
95				});
96
97			});
98
99			// Social Dorpdown.
100			body.on( 'click', '.xtra-social-icon-trigger', function() {
101
102				var x 	= $( this ),
103					box = x.next( '.xtra-social-dropdown' );
104
105				if ( box.length ) {
106
107					if ( box.is( ':visible' ) ) {
108						box.fadeOut( 'fast' );
109					} else {
110						box.fadeIn( 'fast' );
111					}
112
113				}
114
115			}).on( 'click', function( e ) {
116
117				if ( $( e.target ).closest( '.cz_elm' ).length ) {
118					return;
119				}
120
121				$( '.xtra-social-dropdown' ).fadeOut( 'fast' );
122
123			});
124
125			// On resize.
126			var alignFull 	= $( '.alignfull' ),
127				headerLine 	= $( '.header_line_1' ),
128				fixedFooter = $( '.cz_fixed_footer' ),
129				videos 		= $( '.cz_iframe, .content iframe, object, embed' ).not( '.wp-embedded-content' ),
130				timeout;
131
132			// Functions on window resize.
133			wind.on( 'resize.xtra', function() {
134
135				clearTimeout( timeout );
136
137				timeout = setTimeout( function() {
138
139					// Current window width.
140					var wind_width = wind.width();
141
142					// WP 5.x gutenberg ready.
143					alignFull.length && alignFull.each( function( i, x ) {
144
145						var x = $( x ), 
146							inla_width = x.parent().width(),
147							from_left  = ( ( wind_width - inla_width ) / 2 );
148
149						x.css( { width: wind_width, left: -from_left } );
150
151					});
152
153					// Footer fixed.
154					fixedFooter.length && body.css( 'margin-bottom', fixedFooter.height() );
155
156					// Videos iframe auto size.
157					videos.length && videos.each( function( i, x, w ) {
158
159						x = $( x );
160
161						x.attr( 'data-aspectRatio', x.height() / x.width() ).removeAttr( 'height width' );
162
163						w = x.parent().width();
164						x.width( w ).height( w * x.attr( 'data-aspectRatio' ) );
165
166					});
167
168				}, 1000 );
169
170			}).trigger( 'resize.xtra' );
171
172			// Element: line auto height.
173			setTimeout( function() {
174
175				headerLine.codevz( 'full_line', function( x ) {
176
177					Codevz.heightChanged( x.closest( '.row' ), function() {
178
179						x.css( 'height', '0' ).css( 'height', x.closest( '.row' ).height() );
180
181					});
182
183				});
184
185			}, body.hasClass( 'elementor-editor-active' ) ? 2500 : 1000 );
186
187			// Posts equality.
188			$( '.cz_default_loop_grid' ).closest( '.cz_posts_container' ).codevz( 'dlg_equal', function( x ) {
189				x.addClass( 'cz_posts_equal' );
190			});
191
192			// Widget nav menu dropdown.
193			$( '.widget_nav_menu .menu-item-has-children > a' ).codevz( 'wnmi', function( x ) {
194
195				if ( ! x.find( '.fa-angle-down' ).length ) {
196					x.append( '<i class="fa fa-angle-down"></i>' );
197				}
198
199			});
200
201			// Widget nav menu dropdown arrow.
202			body.on( 'click', '.widget_nav_menu .menu-item-has-children > a > i', function( e ) {
203
204				$( this ).toggleClass( 'fa-angle-down fa-angle-up' ).closest( 'li' ).find( '> ul' ).slideToggle();
205
206				e.preventDefault();
207
208			// Dropdown menu off screen.
209			}).on( 'mouseenter', '.sf-menu .menu-item-has-children', function() {
210
211				var dropdown = $( this ).find( '> ul' ).removeClass( 'cz_open_menu_reverse' ),
212					isVisible = dropdown.offset().left + dropdown.width() <= inla.width();
213
214				dropdown[ isVisible ? 'removeClass' : 'addClass' ]( 'cz_open_menu_reverse' );
215
216			});
217
218			// Menus
219			$( '.sf-menu' ).each( function( i ) {
220
221				var x 			= $( this ),
222					indicator 	= x.data( 'indicator' ) || ( x.hasClass( 'offcanvas_menu' ) ? 'fa fa-angle-down' : '' ),
223					indicator2 	= x.data( 'indicator2' ) || ( x.hasClass( 'offcanvas_menu' ) ? 'fa fa-angle-down' : '' );
224
225				// Superfish.
226				x.codevzMenu({
227
228					onInit: function() {
229
230						// Menu indicators.
231						$( '.sub-menu', this ).parent().each( function() {
232
233							var en = $( this ),
234								a = en.find( '> a, > h6' );
235
236							if ( ! a.find( '.cz_indicator' ).length ) {
237
238								if ( $( '.cz_menu_subtitle', a ).length ) {
239									$( '.cz_menu_subtitle', a ).before( '<i class="cz_indicator"></i>' );
240								} else {
241									a.append( '<i class="cz_indicator"></i>' );
242								}
243
244							}
245
246							if ( indicator || indicator2 ) {
247								$( '.cz_indicator', a ).addClass( a.closest( '.sub-menu' ).length ? indicator2 : indicator );
248							}
249
250							if ( ! en.find( 'li, div' ).length ) {
251								en.find( '.cz_indicator' ).remove();
252								en.next( 'ul' ).remove();
253							}
254
255							// Empty href.
256							!en.attr( 'href' ) && en.removeClass( 'current_menu' );
257
258							// Fix: Current active menu in dropdown.
259							en.find( '.current_menu' ).length && setTimeout(function() {
260								en.addClass( 'current_menu' );
261							}, 250 );
262
263						});
264
265						// Fix: Keep original current menu in dropdown menu.
266						if ( x.find( '.current_menu ul > .current-menu-item' ).length ) {
267
268							x.find( '.current_menu ul > .current-menu-item' ).siblings().removeClass( 'current_menu' );
269
270						// If there is no current menu but ancestor exists.
271						} else if ( ! x.find( '.current_menu' ).length && x.find( '.current-page-ancestor, .current-post-ancestor, .current-menu-item' ).length ) {
272
273							$( x.find( '.current-page-ancestor, .current-post-ancestor, .current-menu-item' )[0] ).addClass( 'current_menu' );
274
275						}
276
277						// Auto responsive menu items according to window width.
278						if ( x.not( '#menu_header_4, #menu_fixed_side_1, .cz-not-three-dots' ).length ) {
279
280							//var last = x.parent().parent().find( '.sf-menu' ).last().parent().attr( 'class' );
281
282							wind.on( 'resize.responsive', function() {
283
284								var en = x,
285									parent = en.parent(),
286									elementor = en.closest( '.elementor-container' ),
287									menu_margin = parseFloat( parent.css( 'margin-left' ) ) + parseFloat( parent.css( 'margin-right' ) ),
288									elements = 0,
289									container;
290
291								setTimeout( function() {
292
293									//if ( parent.attr( 'class' ) != last ) {
294										//return;
295									//}
296
297									// Reset
298									en.append( en.find( '.cz-extra-menus > .sub-menu > li' ) ).find( '.cz-extra-menus' ).remove();
299
300									// Add icon dots
301									if ( ! en.find( '.cz-extra-menus' ).length ) {
302										var submenu_title = $( '.cz_menu_subtitle' ).text() ? '<span class="cz_menu_subtitle">&nbsp;</span>' : '';
303										en.append( '<li class="cz-extra-menus cz"><a href="#" class="sf-with-ul" aria-label="More links" aria-hidden="true"><span>&nbsp;<i class="fa czico-055-three cz-extra-menus" style="margin:0" aria-hidden="true"></i>&nbsp;</span>' + submenu_title + '</a><ul class="sub-menu"></ul></li>');
304									}
305
306									var nw = en.find( '.cz-extra-menus' ), 
307										nw_ul = nw.find( '> ul' );
308
309									nw.hide().prev().addClass( 'cz-last-child' );
310
311									// Get elements width
312									en.parent().parent().find( '.cz_elm' ).not( parent ).each(function() {
313
314										elements += $( this ).outerWidth() + parseFloat( $( this ).css( 'margin-left' ) ) + parseFloat( $( this ).css( 'margin-right' ) );
315
316									});
317
318									// Move back to parent
319									nw_ul.find( '> li' ).appendTo( en );
320
321									// Move to hidden menu
322									$( en.find( '> li' ).not( '.cz-extra-menus' ).get().reverse() ).each( function() {
323
324										if ( elementor.length ) {
325											container = elementor.outerWidth();
326										} else {
327											container = en.closest( '.have_center' ).length ? parent.parent().parent().outerWidth() : parent.parent().outerWidth();
328										}
329
330										if ( ( parent.outerWidth() + menu_margin ) + elements + ( elementor ? 0 : 25 ) > container ) {
331											$( this ).prependTo( nw_ul );
332											nw.show();
333										}
334
335									});
336
337								}, 1000 );
338
339							}).trigger( 'resize.responsive' );
340
341						}
342
343					},
344					onBeforeShow: function() {
345
346						var x = $( this );
347
348						// Sub menu.
349						if ( x.hasClass('sub-menu') ) {
350
351							// Check if mega menu is fullwide
352							if ( x.parent().hasClass( 'cz_megamenu_width_fullwide' ) ) {
353
354								var megamenu_row = body,
355									megamenu_row_offset = megamenu_row.offset().left,
356									megamenu_row_width = megamenu_row.width();
357
358								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;' );
359
360							}
361
362							// Sub-menu styling
363							if ( x.parent().data( 'sub-menu' ) ) {
364								setTimeout(function() {
365									x.attr( 'style', x.attr( 'style' ) + x.parent().data( 'sub-menu' ) );
366								}, 50 );
367							}
368
369							// Megamenu
370							if ( x.parent().hasClass( 'cz_parent_megamenu' ) ) {
371								x.addClass( 'cz_megamenu_' + $( '> .cz', x ).length ).find( 'ul' ).addClass( 'cz_megamenu_inner_ul clr' );
372							}
373
374							// Megamenu full row
375							if ( x.parent().hasClass( 'cz_megamenu_width_full_row' ) ) {
376
377								var megamenu_row = $( '.row' ),
378									megamenu_row_offset = megamenu_row.offset().left,
379									megamenu_row_width = megamenu_row.width();
380
381								if ( x.closest( '.cz-extra-menus' ).length ) {
382
383									megamenu_row_width = megamenu_row_width - ( megamenu_row.width() - x.parent().offset().left + 10 );
384
385								}
386
387								x.attr( 'style', x.attr( 'style' ) + 'width: ' + megamenu_row_width + 'px;left:' + ( megamenu_row_offset - x.parent().offset().left ) + 'px;' );
388
389							}
390
391						}
392
393						if ( x.closest('.fixed_side').length ) {
394							var pwidth = x.parent().closest( '.sub-menu' ).length ? '.sub-menu' : '.sf-menu',
395								ff_pos = $( '.fixed_side' ).hasClass( 'fixed_side_left' ) ? 'left' : 'right';
396							x.css( ff_pos, x.closest( pwidth ).width() );
397						}
398
399						setTimeout( function() {
400
401							// Lazyload image in dropdown menus.
402							wind.trigger( 'scroll.lazyload' );
403
404							// Fix carousel.
405							if ( x.find( '.slick' ).length ) {
406								wind.trigger( 'resize.slick' );
407							}
408
409						}, 200 );
410
411					}
412
413				});
414
415			});
416
417			// Fix mobile menu icon.
418			$( 'i.icon_mobile_offcanvas_menu' ).removeClass( 'hide' );
419
420			// Dropdown Menu
421			body.on( 'click', '.icon_dropdown_menu', function( e ) {
422
423				var x = $( this ),
424					pos = x.position(),
425					nav = x.parent().find('.sf-menu'),
426					row = $( this ).closest('.row').height(),
427					offset = ( ( inla.outerWidth() + inla.offset().left ) - x.offset().left );
428
429				nav.fadeToggle( 'fast' );
430
431				body.on( 'click.cz_idm', function(e) {
432					nav.fadeOut( 'fast' );
433					body.off( 'click.cz_idm' );
434				});
435
436				$( '.cz', nav ).on( 'mouseenter mouseleave', function(e) {
437					e.stopPropagation();
438				}).off( 'click' ).on( 'click', function(e) {
439					if ( $( e.target ).hasClass( 'cz_indicator' ) ) {
440						$( this ).closest( 'li' ).find('> ul').fadeToggle( 'fast' );
441						e.preventDefault();
442						e.stopPropagation();
443					}
444				});
445
446				e.stopPropagation();
447
448			// Open Menu Horizontal
449			}).on( 'click', '.icon_open_horizontal', function( e ) {
450
451				var x = $( this ),
452					pos = x.position(),
453					nav = x.parent().find('.sf-menu'),
454					row = $( this ).closest('.row').height(),
455					offset = ( ( inla.outerWidth() + inla.offset().left ) - x.offset().left );
456
457				nav.fadeToggle( 'fast' );
458
459				Codevz.showOneByOne( $( '> .cz', nav ), 100, ( nav.hasClass( 'inview_left' ) ? 'left' : 'right' ) );
460
461				body.on( 'click.cz_ioh', function(e) {
462					nav.fadeOut( 'fast' );
463					body.off( 'click.cz_ioh' );
464				});
465
466				e.stopPropagation();
467
468			// Mobile Menu
469			}).on( 'click', 'i.icon_mobile_offcanvas_menu', function() {
470
471				var x = $( this );
472
473				if ( ! x.hasClass( 'done' ) ) {
474
475					Codevz.offCanvas( x.addClass( 'done' ), 1 );
476
477					var ul_offcanvas = $( 'ul.offcanvas_area' ),
478						indicator 	= ul_offcanvas.data( 'indicator' ),
479						default_ind = ul_offcanvas.hasClass( 'offcanvas_menu' ) ? 'fa fa-angle-down' : '',
480						indicator 	= indicator ? indicator : default_ind,
481						indicator2 	= ul_offcanvas.data( 'indicator2' ),
482						indicator2 	= indicator2 ? indicator2 : default_ind,
483						additional  = x.parent().find( '.xtra-mobile-menu-additional' );
484
485					additional.length && ul_offcanvas.append( '<li class="xtra-mobile-menu-additional">' + additional.html() + '</li>' );
486
487					// Add mobile menus indicator
488					if ( indicator.length || indicator2.length ) {
489						x.next( '.sf-menu' ).find( '.sf-with-ul' ).each(function() {
490							$( '.cz_indicator', this ).addClass( ( x.parent().parent().hasClass( 'sf-menu' ) ? indicator : indicator2 ) );
491						});
492					}
493
494					$( '.sf-with-ul, .cz > h6', ul_offcanvas ).on( 'click', function(e) {
495						if ( $( e.target ).hasClass( 'cz_indicator' ) || $( e.target ).attr( 'href' ) == '#' ) {
496							$( this ).next().slideToggle( 'fast' );
497							e.preventDefault();
498						}
499					});
500
501				}
502
503			// OffCanvas
504			}).on( 'click', '.offcanvas_container > i', function() {
505
506				var x = $( this );
507
508				if ( ! x.hasClass( 'done' ) ) {
509
510					Codevz.offCanvas( x.addClass( 'done' ), 1 );
511
512				}
513
514			// Fullscreen Menu
515			}).on( 'click', '.icon_fullscreen_menu', function( e ) {
516
517				var x = $( '.fullscreen_menu' );
518
519				body.addClass( 'cz_noStickySidebar' ).find( '.fixed_side_1.have_center' ).find( '.fullscreen_menu,.xtra-close-icon' ).appendTo( '.fixed_side_1.have_center' );
520
521				x.fadeIn( 'fast' ).on( 'click', function() {
522					$( this ).delay( 500 ).fadeOut( 'fast', function() {
523						body.removeClass( 'cz_noStickySidebar' );
524						$( '.xtra-close-icon' ).addClass( 'hide' );
525						page.removeClass( 'no-scroll' );
526					});
527				});
528
529				if ( x.is(':visible') ) {
530
531					page.addClass( 'no-scroll' );
532					Codevz.showOneByOne( $( '> .cz', x ), 150 );
533
534				}
535
536				var h = x.find( '> li' ).height() * ( ( x.find( '> li' ).length - 1 ) / 2 );
537
538				x.css( 'padding-top', ( ( wind.height() / 2 ) - h ) );
539
540				$( '.xtra-close-icon' ).toggleClass( 'hide' ).off().on( 'click', function() {
541					$( this ).addClass( 'hide' );
542					x.fadeOut( 'fast' );
543					page.removeClass( 'no-scroll' );
544				});
545
546			// Fullscreen
547			}).on( 'mouseenter mouseleave', 'ul.fullscreen_menu .cz', function( e ) {
548
549				e.stopPropagation();
550
551			}).on( 'click', 'ul.fullscreen_menu .cz', function( e ) {
552
553				if ( $( e.target ).hasClass( 'cz_indicator' ) ) {
554					$( this ).closest( 'li' ).find( '> ul' ).fadeToggle( 'fast' );
555					e.preventDefault();
556					e.stopPropagation();
557				}
558
559			// Hidden fullwidth content
560			}).on( 'click', '.hf_elm_icon', function( e ) {
561
562				var x = $( this );
563
564				x.next( '.hf_elm_area' ).slideToggle( 'fast' ).css({
565					width: inla.outerWidth(),
566					left: inla.offset().left,
567					top: x.offset().top + x.outerHeight()
568				});
569
570				body.on( 'click.cz_hf_elm', function(e) {
571					$( '.hf_elm_area' ).slideUp( 'fast' );
572					body.off( 'click.cz_hf_elm' );
573				});
574
575				e.preventDefault();
576				e.stopPropagation();
577
578			});
579
580			// Extra
581			$( '.tagcloud' ).addClass( 'clr' );
582
583			// Input buttons to button tag
584			$( '.form-submit .submit, input.search-submit, .wpcf7-submit' ).codevz( 'button', function() {
585
586				var x = $( this );
587
588				$( '<button name="submit" type="submit" class="' + x.attr('class') + '">' + x.val() + '</button>' ).insertAfter( x );
589
590				x.detach();
591
592			});
593
594			this.menu_anchor();
595		},
596
597		// Menu Anchor.
598		menu_anchor: function() {
599
600			// Disable Elementor links anchor.
601			if ( typeof elementorFrontend != 'undefined' ) {
602
603				setTimeout( function() {
604
605					elementorFrontend.elements.$document.off(
606						'click', 
607						elementorFrontend.utils.anchors.getSettings( 'selectors.links' ),
608						elementorFrontend.utils.anchors.handleAnchorLinks
609					);
610
611				}, 500 );
612
613			}
614
615			// Prevent hashtag link jump.
616			$( "a[href='#']" ).not( 'a[target="_blank"]' ).on( 'click.prevent_jump', function( e ) {
617				e.preventDefault();
618			});
619
620			// Init.
621			var aBar 	= body.hasClass( 'admin-bar' ) ? 32 : 0,
622				mLink 	= $( "a[href*='#']" ).not( "a[href='#'],a[target='_blank']" ),
623				sticky 	= $( '.header_is_sticky' ).not( '.smart_sticky, .header_4' ),
624				scrollTop = 0, timeout,
625				scrollToAnchor = function( target ) {
626
627					clearTimeout( timeout );
628
629					timeout = setTimeout( function() {
630
631						target = target.replace( '%20', ' ' );
632						target = ( target.indexOf( '#' ) >= 0 ) ? $( target ) : $( '#' + target );
633
634						if ( target.length && ! target.hasClass( 'cz_popup_modal' ) ) {
635
636							scrollTop = $( document ).scrollTop();
637
638							if ( wind.width() < 768 && $( '.header_4.header_is_sticky' ).length ) {
639								sticky = $( '.header_4.header_is_sticky' ).not( '.smart_sticky' );
640							}
641
642							if ( scrollTop == 0 && sticky.length ) {
643								$( document ).scrollTop( 1 );
644							}
645
646							setTimeout( function() {
647
648								page.animate({ scrollTop: target.offset().top - aBar - ( sticky.outerHeight() || 0 ) }, 1200, 'easeInOutCodevz', function() {
649
650									page.stop();
651
652								});
653
654							}, scrollTop == 0 ? 450 : 1 );
655
656						}
657
658					}, 50 );
659
660				};
661
662			// Prevent page scroll jumping.
663			var target = window.location.hash;
664			if ( target ) {
665				target = target.replace( '#', '' ).replace( '%20', ' ' );
666				if ( $( '#' + target ).length ) {
667
668					// Stop scroll.
669					page.animate({scrollTop: 0}, 1);
670
671					// Scroll to anchor.
672					setTimeout(function() {
673						scrollToAnchor( target );
674					}, 1500 );
675				}
676			}
677
678			// Links.
679			if ( mLink.length ) {
680
681				mLink.off( 'click.anchor' ).on( 'click.anchor', function( e ) {
682
683					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, .cz_edit_popup_link, .page-numbers a, #cancel-comment-reply-link, .vc_carousel-control, [data-vc-container],.comment-form-rating a,.sm2-bar-ui a,.lwptoc a' ).length ) {
684
685						if ( $( this.hash ).length && location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname ) {
686							scrollToAnchor( this.hash );
687						} else if ( this.hash ) {
688							location = $( this ).attr( 'href' );
689						}
690
691						e.preventDefault();
692
693					}
694
695				});
696
697				var mPage  = $( '.sf-menu' ),
698					mPageH = mPage.outerHeight() + 15,
699					mItems = mPage.find( "a[href*='#']" ).not( "a[href='#']" ),
700					sItems = mItems.map(function(){
701						var item = $( $( this ).attr( "href" ).replace( /\s+|%20/g, "" ).replace( /^.*\#(.*)$/g, "#$1" ) );
702						if ( item.length ) {
703							return item;
704						}
705					});
706
707				wind.on( 'scroll.anchor', function() {
708
709					clearTimeout( timeout );
710
711					timeout = setTimeout( function() {
712
713						var ft = $( this ).scrollTop() + mPageH + aBar + ( sticky.outerHeight() || 0 ),
714							cur = sItems.map(function() {
715								if ( $(this).offset().top < ft )
716									return this;
717								});
718
719						cur = cur[cur.length-1];
720						var id = cur && cur.length ? cur[0].id : "";
721						if ( id && ! $( '#' + id + '.cz_popup_modal' ).length && $( '#' + id ).length ) {
722							body.trigger( 'click' );
723							mItems.parent().removeClass( "current_menu" ).end().filter( "[href*='#" + id + "']" ).parent().addClass( "current_menu" );
724						} else {
725							mItems.parent().removeClass( "current_menu" );
726						}
727
728					}, 50 );
729
730				});
731			}
732		},
733
734		// Height changed = run callback.
735		heightChanged: function( elm, callback ) {
736			var lastHeight = elm.outerHeight(), newHeight;
737
738			// First.
739			callback();
740
741			// Height detect.
742			( function run() {
743
744				newHeight = elm.outerHeight();
745
746				if ( lastHeight != newHeight ) {
747					callback();
748					lastHeight = newHeight;
749				}
750
751				if ( elm.onElementHeightChangeTimer ) {
752					clearTimeout( elm.onElementHeightChangeTimer );
753				}
754
755				elm.onElementHeightChangeTimer = setTimeout( run, 500 );
756
757			})();
758
759		},
760
761		/*
762		*   offCanvas area
763		*/
764		offCanvas: function( selector, click ) {
765
766			var parent  = selector.parent(),
767				area    = selector.next(),
768				layout  = $( '#layout' ),
769				overlay = $( '.cz_overlay' ),
770				isRight, i, 
771				fixed_side = 0,
772				close, timeout;
773
774			if ( area.length ) {
775				var area = area.clone(),
776					isRight = area.hasClass( 'inview_right' ),
777					new_class = area.hasClass('sf-menu') ? 'sf-menu offcanvas_area' : 'offcanvas_area offcanvas_original';
778
779				body.prepend( area.removeClass().addClass( 'sidebar_offcanvas_area' ).addClass( new_class + ( isRight ? ' inview_right' : ' inview_left' ) ) );
780				var area_w = area.width() + 80;
781
782				area.find( '.sub-menu' ).hide();
783
784			} else {
785				return;
786			}
787
788			// Open icon
789			selector.on( 'click', function(e) {
790
791				if ( area.hasClass( 'active_offcanvas' ) && ! body.hasClass( 'offcanvas_doing' ) ) {
792
793					page.removeClass( 'no-scroll' );
794					
795					overlay.trigger( 'click' );
796
797				} else {
798
799					page.addClass( 'no-scroll' );
800
801					// Close icon
802					if ( body.attr( 'class' ).indexOf( 'codevz-plus' ) >= 0 ) {
803						area.before( '<i class="fa czico-198-cancel offcanvas-close"></i>' );
804					} else {
805						area.before( '<i class="fa fa-times offcanvas-close"></i>' );
806					}
807					close = area.prev( '.offcanvas-close' );
808					close.on( 'click', function(e) {
809						if ( click ) {
810							body.removeClass( 'active_offcanvas' );
811							area.removeClass( 'active_offcanvas' );
812							
813							overlay.fadeOut();
814							setTimeout(function() {
815								$( '.offcanvas-close' ).detach();
816								wind.trigger( 'resize' );
817								page.removeClass( 'no-scroll' );
818							}, 500 );
819							
820							click = 0;
821						} else {
822							overlay.trigger( 'click' );
823						}
824					});
825					close.css( ( isRight ? 'right' : 'left' ), area.outerWidth() + fixed_side );
826
827					body.addClass( 'offcanvas_doing active_offcanvas' + ( isRight ? ' cz_offcanvas_right' : ' cz_offcanvas_left' ) );
828					area.addClass( 'active_offcanvas' );
829
830					if ( wind.width() > 768 ) {
831
832						if ( ( $( '.fixed_side_left' ).length && $( '.cz_offcanvas_left' ).length ) || $( '.fixed_side_right' ).length  && $( '.cz_offcanvas_right' ).length ) {
833							if ( ! $( '#cz_ofs' ).length ) {
834								$( 'head' ).append( '<style id="cz_ofs"></style>' );
835							}
836							fixed_side = $( '.fixed_side' ).width();
837							$( '#cz_ofs' ).html( '.active_offcanvas .offcanvas_area.active_offcanvas{transform:translateX(' + ( isRight ? '-' : '' ) + fixed_side + 'px)}' );
838						}
839						
840					}
841
842					overlay.fadeIn();
843
844					setTimeout(function() {
845						body.removeClass( 'offcanvas_doing' );
846					}, 1250 );
847				}
848
849				e.stopPropagation();
850			});
851
852			// First time
853			if ( click ) {
854				selector.trigger( 'click' );
855			}
856
857			// Prevent close on open icon
858			area.on( 'click', function(e) {
859				e.stopPropagation();
860			});
861
862			// reCall anchors
863			this.menu_anchor();
864
865			// Click on body
866			overlay.on( 'click', function( e ) {
867
868				if ( $( '.active_offcanvas' ).length && ! body.hasClass( 'offcanvas_doing' ) ) {
869
870					body.removeClass( 'active_offcanvas' );
871					area.removeClass( 'active_offcanvas' );
872
873					overlay.fadeOut();
874
875					setTimeout(function() {
876
877						$( '.offcanvas-close' ).detach();
878						wind.trigger( 'resize' );
879						page.removeClass( 'no-scroll' );
880
881					}, 500 );
882
883				}
884
885				setTimeout(function() {
886
887					if ( ! overlay.is( ':visible' ) && $( '.active_offcanvas' ).length ) {
888
889						$( '.offcanvas-close' ).trigger( 'click' );
890
891						page.removeClass( 'no-scroll' );
892
893					}
894
895				}, 500 );
896
897			});
898
899			// Close mobile on window resize.
900			wind.on( 'resize.offcanvas_close', function( e ) {
901
902				clearTimeout( timeout );
903
904				timeout = setTimeout( function() {
905
906					var mh4 = $( '#menu_header_4' );
907
908					if( mh4.hasClass( 'active_offcanvas' ) && wind.width() > 768 ) {
909						mh4.prev( 'i' ).trigger( 'click' );
910					}
911
912				}, 50 );
913
914			});
915
916			// Reload necessary scripts.
917			if( ! area.hasClass( 'xtra-reload-js' ) ) {
918
919				// Fix menu icon click issue specially on mobile.
920				area.find( '.cz a' ).on( 'click', function( e ) {
921
922					if ( $( e.target ).hasClass( 'cz_indicator' ) ) {
923
924						var en = $( this );
925
926						en.attr( 'data-href', en.attr( 'href' ) ).attr( 'href', '#' );
927
928						setTimeout( function() {
929							en.attr( 'href', en.attr( 'data-href' ) );
930						}, 250 );
931
932					}
933
934				});
935
936				// reInit codevz plus.
937				if ( typeof Codevz_Plus != 'undefined' ) {
938
939					Codevz_Plus.init();
940					if ( typeof Codevz_Plus.working_hours != 'undefined' ) {
941						Codevz_Plus.working_hours();
942					}
943
944				}
945
946				// Lazyload image inside offcanvas.
947				setTimeout( function() {
948
949					$( window ).trigger( 'scroll.lazyload' );
950
951					area.find( '[data-src]' ).each( function() {
952						$( this ).attr( 'src', $( this ).data( 'src' ) ).removeAttr( 'data-src' );
953					});
954
955					area.find( '.cz_tooltip' ).removeClass( 'cz_tooltip_down cz_tooltip_right cz_tooltip_left' ).addClass( 'cz_tooltip_up' );
956
957				}, 500 );
958
959				// reInit contact form 7.
960				if( typeof wpcf7 != 'undefined' && area.find( '.wpcf7' ).length ) {
961
962					area.find( 'div.wpcf7 > form' ).each( function() {
963
964						var $this = $( this );
965
966						if ( $.fn.initForm ) {
967							wpcf7.initForm( $this );
968
969							if ( wpcf7.cached ) {
970								wpcf7.refill( $this );
971							}
972						}
973
974					} );
975
976				}
977
978				// reInit Facebook.
979				setTimeout( function(){
980					if ( window.FB ) {
981						FB.XFBML.parse();
982					}
983				}, 2000 );
984
985				area.addClass( 'xtra-reload-js' );
986
987			}
988
989		},
990
991		/*
992		*   Show one by one with delay
993		*/
994		showOneByOne: function( e, s, d ) {
995			var e = ( d == 'left' ) ? $( e.get().reverse() ) : e,
996				b = ( d == 'left' ) ? {opacity:0,left:10} : {opacity: 0,left:-10};
997
998			e.css( b ).each(function( i ) {
999				$( this ).delay( s * i ).animate({opacity:1,left:0});
1000			});
1001		},
1002
1003	};
1004
1005})( jQuery );
1006
1007jQuery( function( $ ) {
1008	Codevz.init();
1009});

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.