PageSourceSearch

https://xn--santibaezdelasierra-13b.es/wp-content/themes/qwery-child/skins/flooring/skin.js

js xn--santibaezdelasierra-13b.es collected 2026-10-03 01:20:09 UTC 38,876 bytes, 945 lines download raw bytes

1/* global jQuery:false */
2/* global QWERY_STORAGE:false */
3
4(function() {
5	"use strict";
6
7	function qwery_skin_post_header_init() {
8		var header = jQuery('.post_header_wrap_style_style-1.with_featured_image, .post_header_wrap_style_style-2.with_featured_image');
9		header.find('.post_featured').css('min-height', 0);
10
11		if ( jQuery(header).find('.post_featured.with_gallery').length > 0 ) {
12			return;
13		}
14		if ( jQuery(header).find('.post_featured.with_thumb.post_featured_bg.with_video').length > 0 ) {
15			return;
16		}
17
18		header.each(function() {
19			var self = jQuery(this);
20			var image_h = self.find('.post_featured').outerHeight();
21			var info_h = self.find('.post_header').outerHeight();
22			var x = 180;
23			if ( jQuery('body').hasClass('mobile_layout') ) {
24				x = 100;
25			}
26
27			info_h = info_h + x;
28			if ( info_h >= image_h ) {
29				self.find('.post_featured').css('min-height', info_h);
30			}
31		});
32	}
33
34	qwery_add_filter( 'trx_addons_filter_skills_pie_options', function(opt) {
35		opt.animateScale = false;
36		return opt;
37	} );
38
39	if ( typeof TRX_ADDONS_STORAGE != 'undefined' && TRX_ADDONS_STORAGE['mouse_helper'] > 0 && TRX_ADDONS_STORAGE['mouse_helper_in_swiper_slider'] > 0 ) {
40		if (jQuery('body').find('.slider_container.slider_swiper:not(.go)').length > 0) {
41			jQuery('body').find('.slider_container.slider_swiper:not(.go)').each(function () {
42				jQuery(this).addClass('go');
43				var check_helper = jQuery(this).closest('.elementor-widget').data('mouse-helper');
44				if(!check_helper) {					
45					jQuery(this).attr('data-mouse-helper-hide-cursor', '1');
46					jQuery(this).attr('data-mouse-helper', 'hover');
47					jQuery(this).attr('data-mouse-helper-centered', '1');
48					jQuery(this).attr('data-mouse-helper-magnet', '0');
49					jQuery(this).attr('data-mouse-helper-bg-color', 'rgba(0, 0, 0, 1)');
50					jQuery(this).attr('data-mouse-helper-mode', 'normal');
51					jQuery(this).attr('data-mouse-helper-axis', 'xy');
52					jQuery(this).attr('data-mouse-helper-delay', '8');
53					jQuery(this).attr('data-mouse-helper-text-round', '0');
54					jQuery(this).attr('data-mouse-helper-layout', '<div class=custom-helper><span></span></div>');
55				}
56			});
57		}
58	}
59
60	// Create Swiper Controls - Title
61	function skin_blogger_controls_title() {
62		if (jQuery('body').find('.sc_slider_controls:not(.go)').length > 0) {
63			jQuery('body').find('.sc_slider_controls:not(.go)')
64				.each(function () {
65					var controls = jQuery(this).addClass('go'),
66						slider_id = controls.data('slider-id'),
67						pagination_style = controls.data('pagination-style');
68					if (!slider_id) return;
69					slider_id = jQuery('#' + slider_id + ' .slider_swiper').attr('id');
70					if (!slider_id) return;
71
72					// Add pagination
73					var s = typeof TRX_ADDONS_STORAGE['swipers'] != 'undefined' && typeof TRX_ADDONS_STORAGE['swipers'][slider_id] != 'undefined' ? TRX_ADDONS_STORAGE['swipers'][slider_id] : false,
74						slides = jQuery('#' + slider_id + ' .swiper-slide'),
75						spv = s
76							? (s.params.loop
77									? s.loopedSlides
78									: 0
79							)
80							: 0;
81					if (pagination_style == 'title') {
82						var html = '';
83						slides.each(function (idx) {
84							var slide = jQuery(this);
85							if (idx < spv || idx >= slides.length - spv) return;
86							var title = (slide.data('title')
87									? slide.data('title')
88									: slide.find('[class*="_item_title"]').text()
89							);
90							html += '<span class="slider_pagination_bullet swiper-pagination-bullet" data-slide-number="' + (s ? jQuery(this).data('slide-number') : idx) + '">' + title + '</span>';
91						});
92						controls.find('.slider_pagination_wrap').html(html);
93
94						jQuery('#' + slider_id).on('slider_init slide_change_start', function (e) {
95							if (TRX_ADDONS_STORAGE['swipers'][slider_id]) {
96								var s = TRX_ADDONS_STORAGE['swipers'][slider_id];
97								var current = jQuery(s.slides[s.activeIndex]).data('slide-number') + 1,
98									total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;
99								if (total > 0) {
100									controls.find('.slider_pagination_bullet')
101										.removeClass('slider_pagination_bullet_active swiper-pagination-bullet-active')
102										.eq(current - 1)
103										.addClass('slider_pagination_bullet_active swiper-pagination-bullet-active');
104								}
105							}
106						});
107					}
108				});
109		}
110	}
111
112
113	// Init skin-specific actions on first run
114	// Attention! Don't forget to add the class "inited" and check it to prevent re-initialize the elements
115
116	// Change param "slides per" in exactly sliders
117	qwery_add_filter( 'trx_addons_filter_slider_init_args', function( $param, $init ) {
118		if( $init.parents('.slider_width_auto').length > 0 && ( $init.parents('.sc_portfolio_extra').length > 0 || $init.parents('.sc_portfolio_default').length > 0 ) ) {
119			$param.slidesPerView = 'auto';
120		}
121		return $param;
122	} );
123
124
125	// Toggle for Filter
126	function skin_blogger_toggle_filter_add_element() {
127		if ( jQuery('.content').find(".sc_style_toggle").length > 0 ) {
128			jQuery(" .sc_style_toggle").each(function() {
129				var toggle_title = QWERY_STORAGE['toggle_title'];
130				jQuery(this).find('.sc_item_filters').append('<div class="title_wrap"><span class="toggle_title"></span><span class="active_tab"></span></div>');
131				jQuery(this).find('.sc_item_filters .sc_item_filters_tabs').wrap('<div class="list_wrap"></div>');
132				jQuery(this).find('.sc_item_filters .toggle_title').text(toggle_title);
133
134				jQuery(this).find('span.active_tab')
135					.mouseenter( function() {
136							jQuery(this).parents('.sc_item_filters').find('.sc_item_filters_tabs').addClass('active');
137						}
138					);
139				jQuery(this).find('.sc_blogger_filters')
140					.mouseleave( function() {
141							jQuery(this).find('.sc_item_filters_tabs').removeClass('active');
142						}
143					);
144			})
145		}
146	}
147	function skin_blogger_toggle_filter_upd_value() {
148		if ( jQuery('.content').find(".sc_style_toggle").length > 0 ) {
149			jQuery(" .sc_style_toggle").each(function() {
150				var text = jQuery(this).find('.sc_item_filters .sc_item_filters_tabs .sc_item_filters_tabs_active a').text();
151				jQuery(this).find('.sc_item_filters .active_tab').text(text);
152			})
153		}
154	}
155	function skin_add_custom_width_filter_list() {
156		if ( jQuery('.content').find(".sc_style_toggle").length > 0 ) {
157			jQuery('.sc_style_toggle .sc_item_filters_wrap .sc_item_filters').each(function() {
158				var check_element = jQuery(this).find('.list_wrap');
159				var width = jQuery(this).find( '.title_wrap' ).outerWidth();
160				jQuery(check_element).css('width', 'calc(100% - ' + (width + 10) + 'px)');
161			})
162		}
163	}
164	// Move title with cursor
165	function mousemove_for_portfolio_small() {
166		if (jQuery( window ).width() > 1279 ) {
167			if ( jQuery('.content').find(".sc_blogger_lay_portfolio_grid_grid_style_7").length > 0 ) {
168				jQuery(".sc_blogger_lay_portfolio_grid_grid_style_7 .sc_blogger_item").each(function() {
169					let $Target = jQuery(this);
170					let $TargetInner = $Target.find('.post_info_bl');
171					$Target.mousemove(function(event){
172						let y = event.pageY - $Target.offset().top + 20;
173						let x = event.pageX - $Target.offset().left + 20;
174						$TargetInner.css({'top': y,'left': x,'bottom': "auto",'right': "auto",'opacity': 1});
175
176					})
177						.mouseleave(function() {
178							$TargetInner.css({'top': 'auto','left': 30,'bottom': 30,'right': "auto",'opacity': 0});
179						});
180				});
181			}
182		}
183	}
184	// Add wrap in portfolio style
185	function add_portfolio_image_wrap() {
186		var $portfolio_grid_style_7 = jQuery('.content').find(".sc_blogger_lay_portfolio_grid_grid_style_7:not(.init-wrap)");
187		if ( $portfolio_grid_style_7.length > 0 ) {
188			jQuery( $portfolio_grid_style_7).each( function() {
189				jQuery(this).addClass('init-wrap');
190				let $ImageInner = jQuery(this).find(".sc_blogger_item .bg_in");
191				jQuery($ImageInner).wrap('<div class="bg_in_wrap"></div>');
192			});
193		}
194
195		var $portfolio_grid_style_9 = jQuery('.content').find(".sc_blogger_lay_portfolio_grid_grid_style_9:not(.init-wrap)");
196		if ( $portfolio_grid_style_9.length > 0 ) {
197			jQuery( $portfolio_grid_style_9).each( function() {
198				jQuery(this).addClass('init-wrap');
199				let $ImageInner2 = jQuery(this).find(".sc_blogger_item .bg_in");
200				jQuery($ImageInner2).wrap('<div class="bg_in_wrap"></div>');
201			});
202		}
203	}
204	// Move title with cursor
205	function mousemove_for_portfolio_large() {
206		if (jQuery( window ).width() > 1279 ) {
207			if ( jQuery('.content').find(".sc_blogger_lay_portfolio_grid_grid_style_9").length > 0 ) {
208				jQuery(".sc_blogger_lay_portfolio_grid_grid_style_9 .sc_blogger_item").each(function() {
209					let $Target = jQuery(this);
210					let $TargetInner = $Target.find('.post_info_bl');
211					$Target.mousemove(function(event){
212						let y = event.pageY - $Target.offset().top + 20;
213						let x = event.pageX - $Target.offset().left + 20;
214						$TargetInner.css({'top': y,'left': x,'bottom': "auto",'right': "auto",'opacity': 1 });
215					})
216						.mouseleave(function() {
217							$TargetInner.css({'top': "auto",'left': 30,'bottom': 30,'right': "auto",'opacity': 0 });
218						});
219				});
220			}
221		}
222	}
223	/* Add image background on wrap in portfolio Stretch */
224	function background_image_portfolio_stretch() {
225		if ( jQuery('.content').find(".sc_blogger_portmodern").length > 0 ) {
226
227            jQuery(".sc_blogger_portmodern .sc_blogger_item .sc_blogger_item_title").on( 'mouseover', function() {
228                jQuery(this).addClass('active_item');
229            }).on( 'mouseleave', function() {
230                jQuery(this).removeClass('active_item');
231            });
232			if (jQuery( window ).width() > 1279 ) {
233				jQuery(".sc_blogger_portmodern .sc_blogger_item:not(.inited_item)").each(function() {
234					let $Target = jQuery(this).addClass('inited_item');
235					let $TargetInner = $Target.find('.sc_blogger_item_title');
236					let $TargetInnerId = $TargetInner.data('item-id');
237					let $TargetInnerImg = $TargetInner.data('item-image');
238					if ( $TargetInnerImg ) {
239						var obj = new Image();
240						obj.src = $TargetInnerImg;
241					}
242					let $WrapImage = jQuery( this ).parents(".sc_blogger_portmodern").find(".decor_image_wrap");
243
244					if( jQuery($WrapImage).find('#' + $TargetInnerId ).length <= 0 ) {
245						jQuery($WrapImage).append('<div id="' + $TargetInnerId + '" class="image_item" ></div>');
246						jQuery($TargetInner).on('mouseover', function() {
247							let $NewTarget = jQuery( this ).parents(".sc_blogger_portmodern").find(".decor_image_wrap");
248							jQuery($NewTarget).find('div#' + $TargetInnerId + '').css({'background-image': 'url(' + $TargetInnerImg + ')'});
249						})
250					}
251				});
252			}
253
254			jQuery(".sc_blogger_portmodern .sc_blogger_item").each(function() {
255				let $Target = jQuery(this);
256				let $TargetInner = $Target.find('.sc_blogger_item_title');
257				let $TargetInnerId = $TargetInner.data('item-id');
258				let $WrapImage = jQuery( this ).parents(".sc_blogger_portmodern").find(".decor_image_wrap");
259				jQuery($TargetInner).on('mouseover', function() {
260					jQuery($WrapImage).find('div#' + $TargetInnerId + '').addClass('active_image')
261				}).on( 'mouseleave', function() {
262					let $WrapImage = jQuery( this ).parents(".sc_blogger_portmodern").find(".image_item");
263					jQuery($WrapImage).removeClass('active_image');
264				});
265			});
266
267			jQuery(".sc_blogger_portmodern .sc_blogger_item").each(function() {
268				//jQuery(this).addClass('inited_description');
269				jQuery(this).find(".sc_blogger_item_title").on( 'click', function() {
270					let $eachTitleItem = jQuery( this ).parents(".sc_blogger_portmodern").find(".sc_blogger_item").find(".sc_blogger_item_title");
271					let $WrapPreview = jQuery( this ).parents(".sc_blogger_portmodern").find(".portfolio_preview");
272					let $PreviewDescription = jQuery($WrapPreview).find(".portfolio_description");
273					let $PreviewImage = jQuery($WrapPreview).find(".portfolio_image");
274					let $PreviewClose = jQuery($WrapPreview).find(".close");
275					let $TargetInnerDetails = jQuery( this ).data('details');
276					let $TargetInnerImg = jQuery( this ).data('item-image');
277					$PreviewImage.css({'background-image': 'url(' + $TargetInnerImg + ')'});
278					$PreviewDescription.html($TargetInnerDetails);
279					jQuery($eachTitleItem).addClass('anim_fade');
280					jQuery($WrapPreview).addClass('portfolio_preview_show');
281
282					if( $WrapPreview.hasClass('portfolio_preview_show') ) {
283						jQuery('html').addClass('portfolio_preview_opened');
284						$PreviewClose.on('click', function() {
285							jQuery('html').removeClass('portfolio_preview_opened');
286							jQuery($eachTitleItem).removeClass('anim_fade');
287							jQuery($WrapPreview).removeClass('portfolio_preview_show');
288							jQuery($PreviewDescription).empty();
289						});
290						jQuery( window ).on( 'keyup', function(e) {
291								if (e.keyCode === 27) {
292									jQuery('html').removeClass('portfolio_preview_opened');
293									jQuery($WrapPreview).removeClass('portfolio_preview_show');
294									jQuery($eachTitleItem).removeClass('anim_fade');
295									jQuery($PreviewDescription).empty();
296								}
297						});
298					}
299
300					//jQuery(document).trigger( 'action.init_hidden_elements', [$WrapPreview] );
301
302					// Socials share
303					//----------------------------------------------
304					var $share_items = $PreviewDescription.find('.socials_share .social_items:not(.inited)');
305					if ($share_items.length > 0) {
306						$share_items
307							.addClass('inited')
308							.on('click', '.social_item_popup', function(e) {
309								var url = jQuery(this).data('link');
310								window.open(url, '_blank', 'scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=480, height=400, toolbar=0, status=0');
311								e.preventDefault();
312								return false;
313							})
314							.on('click', '.social_item[data-copy-link-url]', function(e) {
315								var $self = jQuery(this),
316									url = $self.data('copy-link-url');
317								if ( url != '' ) {
318									trx_addons_copy_to_clipboard( url );
319									var msg = $self.data('message') ? $self.data('message') : QWERY_STORAGE['msg_copied'];
320									if ( msg ) {
321										$self.attr('data-tooltip-text', msg);
322										setTimeout( function() {
323											$self.removeAttr('data-tooltip-text');
324										}, 3000 );
325									}
326								}
327								e.preventDefault();
328								return false;
329							});
330					}
331				});
332			});
333		}
334	}
335	// Audio
336	function qwery_skin_audio_init() {
337		jQuery('[class*="single_style_style-"]:not(.single_style_style-1):not(.single_style_style-3) .post_header_wrap_in_header .post_featured.with_audio.with_thumb:not(.audio_inited)').addClass('audio_inited').each(function() {
338			var featured = jQuery(this);
339			var audio_wrap = featured.find('.post_audio');
340			var btn = jQuery('<div class="post_audio_btn"></div>');
341			featured.prepend(btn);
342			btn.on('click', function() {				
343				audio_wrap.toggleClass('show');
344				audio_wrap.find('.mejs-playpause-button').click();			
345			});
346		});
347	}
348
349
350	jQuery( window ).load(function() {
351
352		// Audio
353		qwery_skin_audio_init();
354
355		// Toggle for Filter
356		skin_add_custom_width_filter_list();
357
358		// Add image background on wrap in portfolio Stretch
359		background_image_portfolio_stretch();
360
361		qwery_skin_post_header_init();
362
363	});
364
365	jQuery( document ).on(
366		'action.ready_qwery', function() {
367			extra_margin_top_video_popup_button();
368			// Move title with cursor
369			mousemove_for_portfolio_large();
370			mousemove_for_portfolio_small();
371
372			// Toggle for Filter
373			skin_blogger_toggle_filter_add_element();
374
375			skin_blogger_controls_title();
376
377			// Anim for 404 page
378			if ( typeof window.TweenMax != 'undefined' ) {
379				if (jQuery('.post_item_404').length > 0) {
380					var $layer_1 = jQuery('.post_item_404 .svg-1'),
381						$layer_2 = jQuery('.post_item_404 .svg-2'),
382						$layer_3 = jQuery('.post_item_404 .svg-3'),
383						$layer_4 = jQuery('.post_item_404 .svg-4'),
384						$container = jQuery('.error404 .page_content_wrap'),
385						container_w = $container.width(),
386						container_h = $container.height();
387
388					jQuery(window).on('mousemove.parallax', function (event) {
389						var pos_x = event.pageX,
390							pos_y = event.pageY,
391							left = 0,
392							top = 0;
393						left = container_w / 2 - pos_x;
394						top = container_h / 2 - pos_y;
395
396						TweenMax.to(
397							$layer_1,
398							1,
399							{
400								css: {
401									transform: 'translateX(' + left / 25 + 'px) translateY(' + top / 25 + 'px)'
402								},
403								ease: Power2.easeOut,
404								overwrite: 'all' //'none'
405							});
406						TweenMax.to(
407							$layer_2,
408							1,
409							{
410								css: {
411									transform: 'translateX(' + left / 35 + 'px) translateY(' + top / 35 + 'px)'
412								},
413								ease: Power2.easeOut,
414								overwrite: 'all'
415							});
416						TweenMax.to(
417							$layer_3,
418							1,
419							{
420								css: {
421									transform: 'translateX(' + left / 55 + 'px) translateY(' + top / 55 + 'px)'
422								},
423								ease: Power2.easeOut,
424								overwrite: 'all' //'none'
425							});
426						TweenMax.to(
427							$layer_4,
428							1,
429							{
430								css: {
431									transform: 'translateX(' + left / 70 + 'px) translateY(' + top / 70 + 'px)'
432								},
433								ease: Power2.easeOut,
434								overwrite: 'all' //'none'
435							});
436					});
437				}
438			}
439
440			// for woo tinv
441			if(jQuery('.woocommerce-product-gallery__wrapper > .tinv-wraper').length > 0) {
442				var tinv = jQuery('.woocommerce-product-gallery__wrapper > .tinv-wraper');
443				jQuery('.woocommerce-product-gallery__wrapper').after(tinv);
444			}
445
446			//Tilt 3d hover for Class - VanillaTiltHover
447			if (jQuery( '.VanillaTiltHover' ).length > 0) {
448				VanillaTilt.init(document.querySelectorAll('.VanillaTiltHover'), {
449					max: 8,
450					speed: 1000,
451					scale: 1.05,
452					transition: true,
453					easing: 'cubic-bezier(.03,.98,.52,.99)',
454					perspective: 1200,
455				});
456			}
457			//Tilt 3d hover for teams
458			if (jQuery( '.start-inner-3d' ).length > 0) {
459				VanillaTilt.init(document.querySelectorAll('.start-inner-3d'), {
460					max: 5,
461					speed: 1000,
462					scale: 1,
463					transition: true,
464					easing: 'cubic-bezier(.03,.98,.52,.99)',
465					perspective: 1500,
466				});
467			}
468
469            //Tilt 3d hover
470	        if (jQuery( '.tilt_action' ).length > 0) {
471                VanillaTilt.init(document.querySelectorAll('.tilt_action'), {
472                    max: 8,
473                    speed: 1000,
474                    scale: 1.05,
475                    transition: true,
476                    easing: 'cubic-bezier(.03,.98,.52,.99)',
477                    perspective: 1400,
478                });
479            }
480
481			//Tilt 3d hover for cat list
482			if (jQuery( '.tilt_action_cat_list' ).length > 0) {
483				VanillaTilt.init(document.querySelectorAll('.tilt_action_cat_list'), {
484					max: 8,
485					speed: 1500,
486					scale: 1.02,
487					transition: true,
488					easing: 'cubic-bezier(.03,.98,.52,.99)',
489					perspective: 2400,
490				});
491			}
492
493            // Process Tribe Events view after it was reloaded by AJAX
494			jQuery('.tribe-events-view').on( 'beforeAjaxComplete.tribeEvents beforeAjaxSuccess.tribeEvents beforeAjaxError.tribeEvents', qwery_tribe_events_after_ajax );
495			function qwery_tribe_events_after_ajax( jqXHR, textStatus ) {
496				setTimeout( function() {
497					// Set up event handler again because .tribe-events-view was recreated after AJAX
498					jQuery('.tribe-events-view').on( 'beforeAjaxComplete.tribeEvents beforeAjaxSuccess.tribeEvents beforeAjaxError.tribeEvents', qwery_tribe_events_after_ajax );
499					// ToDo: Any actions after the Tribe Events View is reloaded
500
501				}, 10 );
502			}
503
504			jQuery('.wpcf7-submit').wrap("<span class='wpcf7-submit-style'></span>").after("<span class='submit-style-in'></span>");
505
506			// style line
507			if (jQuery( 'div.wpcf7 .style-line .wpcf7-form-control-wrap' ).length > 0) {
508				jQuery( 'div.wpcf7 .style-line .wpcf7-form-control-wrap' ).each(
509					function () {
510						jQuery(this).append('<span class="line"></span>');
511					}
512				);
513			}
514
515			function textarea_auto_height(txt) {
516				var hiddenDiv = jQuery(document.createElement('div')),
517					content = null;
518				txt.addClass('noscroll');
519				hiddenDiv.addClass('hiddendiv');
520				txt.after(hiddenDiv);
521				if(txt.val()) {
522					hiddenDiv.html(txt.val());
523					txt.animate({ 'height' : hiddenDiv.outerHeight()
524					},800);
525				}
526				txt.bind('keyup', function() {
527					content = txt.val();
528					content = content.replace(/\n/g, '<br>');
529					hiddenDiv.html(content);
530					txt.animate({ 'height' : hiddenDiv.outerHeight()
531					},50);
532				});
533			}
534
535			if (jQuery( 'div.wpcf7 .form-style-2 textarea' ).length > 0) {
536				jQuery( 'div.wpcf7 .form-style-2 textarea' ).each(
537					function () {
538						textarea_auto_height(jQuery(this));
539					});
540			}
541
542			// mc4wp - id
543			if (jQuery( '.mc4wp-form-fields' ).length > 0) {
544				var count_mc4wp = 1;
545				jQuery( '.mc4wp-form-fields' ).each(
546					function () {
547						jQuery(this).find('input[type="checkbox"]').each(
548							function () {
549								var id = jQuery(this).attr( 'id' );
550								if(id) {}
551								else {
552									id = 'go';
553								}
554								jQuery(this).attr('id', id + count_mc4wp);
555								jQuery(this).next('label').attr('for', id + count_mc4wp);
556								count_mc4wp++;
557							});
558					});
559			}
560
561			function mc4wpGO(form) {
562				jQuery(form).each(function () {
563
564					var form = jQuery(this),
565						btn = form.find('button, input[type="submit"], input[type="button"]');
566					var $i_agree = form.find('input[type="checkbox"][name="i_agree_privacy_policy"]:not(.inited)'
567						+ ',input[type="checkbox"][name="gdpr_terms"]:not(.inited)'
568						+ ',input[type="checkbox"][name="wpgdprc"]:not(.inited)'
569						+ ',input[type="checkbox"][name="AGREE_TO_TERMS"]:not(.inited)'
570					);
571					form.addClass('inited_validation');
572
573					if ( $i_agree.length > 0 ) {
574						$i_agree.addClass( 'inited' );
575					}
576
577					btn.on( 'click', function(e) {
578						form.find('.trx_addons_message_box').remove();
579
580						if ( $i_agree.length > 0 ) {
581							if ( ! $i_agree.get(0).checked ) {
582								form.append( '<div class="trx_addons_message_box trx_addons_message_box_error">' + QWERY_STORAGE['msg_i_agree_error'] + '</div>' );
583								var error_msg = form.find('.trx_addons_message_box');
584								error_msg.fadeIn(600);
585								setTimeout( function() {
586									error_msg.fadeOut( 600, function() {error_msg = form.find('.trx_addons_message_box');
587										error_msg.remove();
588									} );
589								}, 3000 );
590
591								e.preventDefault();
592								return false;
593							}
594						}
595
596						var rez = qwery_form_validate(form, {
597							error_message_show: true,
598							error_message_time: 3000,
599							error_message_class: 'trx_addons_message_box trx_addons_message_box_error',
600							error_message_text: 'Global error text',
601							error_fields_class: 'mc4wp_error_field',
602							exit_after_first_error: true,
603							rules: [
604								{
605									field: 'EMAIL',
606									min_length: {value: 7, message: QWERY_STORAGE['mc4wp_msg_email_min']},
607									max_length: {value: 60, message: QWERY_STORAGE['mc4wp_msg_email_max']},
608									mask: {
609										value: '^([a-zA-Z0-9_\\-]+\\.)*[a-zA-Z0-9_\\-]+@[a-zA-Z0-9_\\-]+(\\.[a-zA-Z0-9_\\-]+)*\\.[a-zA-Z]{2,6}$',
610										message: 'Invalid email address'
611									}
612								},
613							]
614						});
615
616						if (!rez) {
617							jQuery(form).submit();
618						}
619						else {
620							e.preventDefault();
621							return rez;
622						}
623
624					});
625				});
626			}
627			mc4wpGO(jQuery(".mc4wp-form:not(.inited_validation)"));
628
629			var $document = jQuery(document),
630				body = jQuery('body');
631
632			// Open/Close mobile menu
633			$document.on( 'action.mobile_menu_open', function(e, $menu) {
634				$menu.find( '.menu_mobile_widgets_area a[href*="mailto"]').addClass( 'underline_anim' );
635                setTimeout(
636                    function() {
637                        $menu.find( '.menu_mobile_widgets_area a[href*="mailto"]' ).addClass( 'underline_do_hover' );
638                    }, 600
639                );
640			} );
641			$document.on( 'action.mobile_menu_close', function(e, $menu) {
642				$menu.addClass( 'out_anim' );
643                setTimeout( function () {
644                    $menu.removeClass('out_anim');
645					jQuery('.menu_mobile_widgets_area a[href*="mailto"]').removeClass('underline_do_hover');
646                }, 1000);
647			} );
648			qwery_add_filter( 'qwery_filter_mobile_menu_close_timeout', function( timeout, $menu ) {
649				return 1000;
650			} );
651
652            // Open/Close panel menu
653			// Prepare links to panel
654            body.find('.sc_layouts_panel_menu:not(.inited)').each( function() {
655				var self = jQuery(this),
656					id = self.attr('id');
657				if (!id) return;
658				var link = jQuery('a[href="#'+id+'"]');
659				if (link.length === 0) {
660					body.append('<a href="#'+id+'" class="trx_addons_hidden"></a>');
661					link = jQuery('a[href="#'+id+'"]');
662				}
663				link.addClass('trx_addons_panel_menu_link');
664			});
665
666            // Display panel on click on the panel link
667            function qwery_skin_open_panel( id ) {
668                var $panel = jQuery( '#' + id ).addClass( 'opened' );
669                $panel.prev('.sc_layouts_panel_menu_overlay' ).fadeIn();
670                $panel.find( '[class*="trx_addons_title_with_link"] > a:not(.underline_anim)' ).addClass( 'underline_anim' );
671                setTimeout(
672                    function() {
673                        $panel.find( '[class*="trx_addons_title_with_link"] > a.underline_anim' ).addClass( 'underline_do_hover' );
674                    }, 600
675                );
676                body.addClass( 'sc_layouts_panel_menu_opened' );
677                $document.trigger( 'action.stop_wheel_handlers' );
678            }
679
680            jQuery( '.trx_addons_panel_menu_link:not(.panel_inited)' )
681				.addClass( 'panel_inited' )
682				.on( 'click', function(e) {
683					qwery_skin_open_panel( jQuery(this).attr('href').substring(1) );
684					e.preventDefault();
685					return false;
686				});
687
688            // Close panel
689            function qwery_skin_close_panel() {
690
691               var $panel = jQuery( '.sc_layouts_panel_menu.opened' ).addClass( 'out_anim' );
692
693                jQuery( '.sc_layouts_panel_menu_close' ).parents( 'sc_layouts_panel_menu' ).addClass( 'out_anim' );
694
695                setTimeout(function () {
696                    $panel.prev( '.sc_layouts_panel_menu_overlay' ).fadeOut();
697                    $panel.removeClass('out_anim').removeClass('opened');
698                    $panel.find('[class*="trx_addons_title_with_link"] > a.underline_anim').removeClass('underline_do_hover');
699                    body.removeClass( 'sc_layouts_panel_menu_opened' );
700                    $document.trigger( 'action.start_wheel_handlers' );
701                }, 1000);
702            }
703            $document
704                .on( 'keyup', function(e) {
705                	var $panel = jQuery( '.sc_layouts_panel_menu.opened');
706					if (e.keyCode === 27) {
707						if  ($panel.length === 1) {
708							qwery_skin_close_panel();
709							e.preventDefault();
710							return false;
711						}
712					}
713                }
714            );
715
716            jQuery( '.sc_layouts_panel_menu_close, .sc_layouts_panel_menu_overlay' )
717				.on( 'click', function(e) {
718					qwery_skin_close_panel();
719					e.preventDefault();
720					return false;
721           		}
722            );
723
724            jQuery( '.sc_layouts_panel_menu_close' )
725                .on( 'keyup', function(e) {
726                    var $panel = jQuery( '.sc_layouts_panel_menu.opened');
727                    if (e.keyCode === 13) {
728                        if ($panel.length === 1) {
729                            qwery_skin_close_panel();
730                            e.preventDefault();
731                            return false;
732                        }
733                    }
734                } )
735                .on( 'focus', function() {
736                    if ( ! body.hasClass( 'sc_layouts_panel_menu_opened' ) ) {
737                        jQuery( '#content_skip_link_anchor' ).focus();
738                    }
739                } );
740
741        }
742	);
743
744    // Search Modern -----------------
745    //-------------------------------
746	var $search_wrap = jQuery( '.search_modern .search_wrap:not(.inited)' );
747
748    if ( $search_wrap.length > 0 ) {
749        jQuery( $search_wrap.each( function() {
750            var $body =  jQuery('body'),
751				$search_wrap_init = jQuery(this).addClass( 'inited' ),
752                search_field = $search_wrap_init.find( '.search_field' ),
753           	    ajax_timer = null;
754
755            // ESC is pressed
756            search_field.on('keyup', function(e) {
757                if (e.keyCode === 27) {
758                    search_field.val('');
759                    $body.addClass('search_out_anim');
760                    setTimeout(function () {
761                        qwery_search_close($search_wrap_init);
762                        $body.removeClass('search_open_anim');
763                        $body.removeClass('search_out_anim');
764                        $search_wrap_init.next( '.search_overlay' ).fadeOut();
765
766                        e.preventDefault();
767                        return false;
768                    }, 800);
769
770                    setTimeout(function () {
771                        $search_wrap_init.parent().removeClass('search_active');
772                        $body.removeClass('search_active');
773                    }, 1200);
774                }
775                // AJAX search
776                if ($search_wrap_init.hasClass('search_ajax')) {
777                    var s = search_field.val();
778                    if (ajax_timer) {
779                        clearTimeout(ajax_timer);
780                        ajax_timer = null;
781                    }
782                    if (s.length >= 4) {
783                        ajax_timer = setTimeout(function () {
784                            $search_wrap_init.addClass('search_progress');
785                            jQuery.post(TRX_ADDONS_STORAGE['ajax_url'], {
786                                action: 'ajax_search',
787                                nonce: TRX_ADDONS_STORAGE['ajax_nonce'],
788                                text: s,
789                                post_types: $search_wrap_init.find('input[name="post_types"]').val()
790                            }).done(function (response) {
791                                clearTimeout(ajax_timer);
792                                ajax_timer = null;
793                                var rez = {};
794                                if (response == '' || response == 0) {
795                                    rez = {error: TRX_ADDONS_STORAGE['msg_search_error']};
796                                } else {
797                                    try {
798                                        rez = JSON.parse(response);
799                                    } catch (e) {
800                                        rez = {error: TRX_ADDONS_STORAGE['msg_search_error']};
801                                        console.log(response);
802                                    }
803                                }
804                                var msg = rez.error === '' ? rez.data : rez.error;
805                                $search_wrap_init.removeClass('search_progress');
806                                search_field.parents('.search_ajax').find('.search_results_content').empty().append(msg);
807                                search_field.parents('.search_ajax').find('.search_results').fadeIn();
808                                jQuery(document).trigger('action.got_ajax_response', {
809                                    action: 'ajax_search',
810                                    result: rez
811                                });
812                            });
813                        }, 500);
814                    }
815                }
816
817            });
818
819            //Search Submit
820			var  $search = $search_wrap_init.prev('.search_submit');
821            $search.on('click', function(e) {
822                $search_wrap_init.parent().addClass('search_active');
823                $body.addClass('search_active');
824                if (!$search_wrap_init.hasClass('search_opened')) {
825                    $search_wrap_init.addClass('search_opened');
826                    $body.addClass('search_open_anim');
827                    $search_wrap_init.next( '.search_overlay' ).fadeIn();
828                    setTimeout(function() { search_field.get(0).focus(); }, 500);
829                } else if (search_field.val() === '') {
830                    if ($search_wrap_init.hasClass('search_opened'))
831                            qwery_search_close($search_wrap_init);
832                    else
833                        search_field.get(0).focus();
834                } else {
835                    $search_wrap_init.addClass('search_progress');
836                    $search_wrap_init.find('form').get(0).submit();
837                }
838                e.preventDefault();
839                return false;
840            });
841
842            // Click "Search close"
843            $search_wrap_init.find('.search_close').add(
844            $search_wrap_init.next('.search_overlay')
845			).on('click', function(e) {
846                $body.addClass('search_out_anim');
847
848                setTimeout(function () {
849                    qwery_search_close($search_wrap_init);
850                    $body.removeClass('search_open_anim');
851                    $body.removeClass('search_out_anim');
852                    $search_wrap_init.next( '.search_overlay' ).fadeOut();
853
854                    e.preventDefault();
855                    return false;
856                }, 800);
857
858                setTimeout(function () {
859                    $search_wrap_init.parent().removeClass('search_active');
860                    $body.removeClass('search_active');
861                }, 1200);
862
863            });
864
865            // Click "Close search results"
866            $search_wrap_init.find('.search_results_close').on('click', function(e) {
867                jQuery(this).parent().fadeOut();
868                e.preventDefault();
869                return false;
870            });
871            // Click "More results"
872            $search_wrap_init.on('click', '.search_more', function(e) {
873                if (search_field.val() !== '')
874                    $search_wrap_init.find('form').get(0).submit();
875                e.preventDefault();
876                return false;
877            });
878        }));
879    }
880    // Close search field (remove class 'search_opened' and close search results)
881    function qwery_search_close($search_wrap_init) {
882        $search_wrap_init.removeClass('search_opened');
883        $search_wrap_init.find('.search_results').fadeOut();
884    }
885
886	// Add skin specific styles to the Google map
887	jQuery(document).on('action.add_googlemap_styles', function(e) {
888		if (typeof TRX_ADDONS_STORAGE == 'undefined') return;
889		TRX_ADDONS_STORAGE['googlemap_styles']['extra'] = [{"featureType": "water", "elementType": "geometry", "stylers": [{"color": "#e9e9e9"}, {"lightness": 17}]}, {"featureType": "landscape", "elementType": "geometry", "stylers": [{"color": "#f5f5f5"}, {"lightness": 20}]}, {"featureType": "road.highway", "elementType": "geometry.fill", "stylers": [{"color": "#ffffff"}, {"lightness": 17}]}, {"featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [{"color": "#ffffff"}, {"lightness": 29}, {"weight": 0.2}]}, {"featureType": "road.arterial", "elementType": "geometry", "stylers": [{"color": "#ffffff"}, {"lightness": 18}]}, {"featureType": "road.local", "elementType": "geometry", "stylers": [{"color": "#ffffff"}, {"lightness": 16}]}, {"featureType": "poi", "elementType": "geometry", "stylers": [{"color": "#f5f5f5"}, {"lightness": 21}]}, {"featureType": "poi.park", "elementType": "geometry", "stylers": [{"color": "#dedede"}, {"lightness": 21}]}, {"elementType": "labels.text.stroke", "stylers": [{"visibility": "on"}, {"color": "#ffffff"}, {"lightness": 16}]}, {"elementType": "labels.text.fill", "stylers": [{"saturation": 36}, {"color": "#333333"}, {"lightness": 40}]}, {"elementType": "labels.icon", "stylers": [{"visibility": "off"}]}, {"featureType": "transit", "elementType": "geometry", "stylers": [{"color": "#f2f2f2"}, {"lightness": 19}]}, {"featureType": "administrative", "elementType": "geometry.fill", "stylers": [{"color": "#fefefe"}, {"lightness": 20}]}, {"featureType": "administrative", "elementType": "geometry.stroke", "stylers": [{"color": "#fefefe"}, {"lightness": 17}, {"weight": 1.2}]}];
890	} );
891
892    // Init skin-specific hidden elements when their parent container becomes visible
893	// Attention! Don't forget to add the class "inited" and check it to prevent re-initialize the elements
894	jQuery( document ).on(
895		'action.init_hidden_elements', function() {
896			skin_blogger_toggle_filter_upd_value();
897			skin_add_custom_width_filter_list();
898			// Move title with cursor
899			mousemove_for_portfolio_large();
900			mousemove_for_portfolio_small();
901
902			add_portfolio_image_wrap();
903
904			// Add image background on wrap in portfolio Stretch
905			background_image_portfolio_stretch();
906
907			skin_blogger_controls_title();
908		}
909	);
910
911	// Skin-specific scroll actions
912	jQuery( document ).on(
913		'action.scroll_qwery', function() {
914
915		}
916	);
917
918	// Skin-specific resize actions
919	jQuery( document ).on(
920		'action.resize_qwery', function() {
921			extra_margin_top_video_popup_button();
922			qwery_skin_post_header_init();
923			skin_add_custom_width_filter_list();
924		}
925	);
926
927	function extra_margin_top_video_popup_button() {
928		if (jQuery('.single-format-video .post_header_wrap_style_style-1 .post_featured.with_video.with_thumb.post_featured_bg + .post_header').length > 0) {
929			var alter_height = jQuery('.single-format-video .post_header_wrap_style_style-1 .post_featured.with_video.with_thumb.post_featured_bg + .post_header').height();
930			jQuery('.single-format-video .post_header_wrap_style_style-1 .post_featured.with_video.with_thumb.post_featured_bg .post_video_hover_popup').css({"margin-top": (- alter_height / 2 + 'px'), "opacity":1});
931		}
932	}
933
934	// Click woo filter button
935	jQuery( '.qwery_woocommerce_filters_button,.sidebar > .sidebar_close,.sidebar_overlay' ).on( 'click', function(e) {
936		var sidebar_float = jQuery( '.sidebar.sidebar_float' );
937		sidebar_float.addClass('float_anim');
938		setTimeout(function () {
939			sidebar_float.removeClass('float_anim');
940			e.preventDefault();
941			return false;
942		}, 400);
943	});
944	
945})();

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.