PageSourceSearch

https://amarylis.ru/local/templates/amarylis/js/main.js

js amarylis.ru collected 2026-09-26 11:59:18 UTC 17,256 bytes, 639 lines download raw bytes

1$(document).ready(function () {
2
3	$(window).on("load resize orientationchange", function () {
4		if (window.matchMedia('(max-width: 640px)').matches) {
5			var screenHeight = window.innerHeight,
6				rem = parseInt($('html').css("font-size"));
7			$('.products-page__popup').height(screenHeight - (3.5 * rem))
8		}
9	})
10
11
12	var height = $(this).scrollTop();
13	var topNavHeight = $('.top-nav').outerHeight();
14	var headerHeight = $('.header').outerHeight();
15	var totalHeaderHeight = topNavHeight + headerHeight;
16	var bodyWidth = $('html').width();
17	var mobFixedBnts = $('.product-detail-specifications').offset();
18	var mobCartBtns = $('#cart-order').offset();
19
20	if (bodyWidth <= '991') {
21		$('.product-detail-values').prependTo('.product-detail__mob-buyer');
22		$('.product-detail__main-wrap .product-detail-buyer__add-to-fave').prependTo('.product-detail-buyer__wrap2');
23		$('.product-detail-buyer').prependTo('.product-detail__mob-buyer');
24		$('.product-detail-specifications').prependTo('.product-detail__main-wrap');
25		$('.product-detail__delivery').prependTo('.js-mob-prepend-delivery');
26		$('.product-reviews__add-reviews').prependTo('.product-reviews__show-all-wrap');
27		$('.cart-order').prependTo('.cart-oder__mobile');
28		$('.js-stiky').hcSticky({
29			top: 32,
30			bottom: 80,
31		});
32	} else {
33		$('.js-stiky').hcSticky({
34			top: 96,
35			bottom: 80,
36		});
37	}
38
39	$('.js-mask__tell').inputmask('+7 (999) 999-99-99');
40
41	$('.js-mask__email').inputmask({
42		mask: "*{1,20}[.*{1,20}][.*{1,20}][.*{1,20}]@*{1,20}.*{2,14}[.*{1,8}]",
43		greedy: false,
44		onBeforePaste: function (pastedValue, opts) {
45			pastedValue = pastedValue.toLowerCase();
46			return pastedValue.replace("mailto:", "");
47		},
48		definitions: {
49			'*': {
50				validator: "[0-9A-Za-z!#$%&'*+/=?^_`{|}~\-]",
51				casing: "lower"
52			}
53		}
54	});
55
56	$(".filter-sidebar__brands-wrapper").mCustomScrollbar({
57		axis: "y",
58		theme: "minimal-dark"
59	});
60
61	$(window).scroll(function (e) {
62		height = $(this).scrollTop();
63		$('.catalog-nav')[height >= totalHeaderHeight ? 'addClass' : 'removeClass']('fixed');
64		$('.products-page__top-mobile')[height >= totalHeaderHeight ? 'addClass' : 'removeClass']('fixed');
65	});
66
67	$(window).scroll(function (e) {
68		var height = $(this).scrollTop(),
69			headerHeight = $(".mob-top-nav").height() - 10;
70		$('.products-page__top-mobile')[height >= headerHeight ? 'addClass' : 'removeClass']('fixed');
71	});
72
73	$(window).scroll(function (e) {
74		height = $(this).scrollTop();
75		if ($('.js-mob-fixed-cart').length > 0) {
76			$('.js-mob-fixed-cart')[height >= mobCartBtns.top ? 'removeClass' : 'addClass']('is-show');
77			$('.fixed-callback')[height >= mobCartBtns.top ? 'removeClass' : 'addClass']('is-side-up');
78		}
79		if ($('.js-mob-fixed-bnts').length > 0) {
80			$('.js-mob-fixed-bnts')[height >= mobFixedBnts.top ? 'addClass' : 'removeClass']('is-show');
81			$('.fixed-callback')[height >= mobFixedBnts.top ? 'addClass' : 'removeClass']('is-side-up');
82		}
83	});
84
85	$('.js-mob-menu-toogle').on('click', function () {
86		$('.mob-top-nav').toggleClass('is-open');
87		$('body').toggleClass('js-no-scroll');
88	});
89
90	$('.js-mob-menu-catalog-toogle').on('click', function () {
91		$('.mob-bottom-nav__btn.--catalog').toggleClass('is-open-catalog-menu');
92		$('body').toggleClass('js-no-scroll');
93	});
94
95	$('.js-slide-mob-catalog').on('click', function () {
96		var lvl = $(this).data('lvl');
97		$(this).parent().toggleClass('is-open')
98		$('.mob-catalog-nav__sections').toggleClass('is-show-lvl-' + lvl);
99	});
100
101	$('.js-back-mob-catalog').on('click', function () {
102		var lvl = $(this).data('lvl');
103		$(this).parents('.mob-catalog-nav__section.--section-lvl-' + lvl).parent().toggleClass('is-open')
104		$('.mob-catalog-nav__sections').toggleClass('is-show-lvl-' + lvl);
105	});
106
107	$('.js-callback-toogle').on('click', function () {
108		$(this).parents('.fixed-callback').toggleClass('is-open');
109		$(this).toggleClass('--svg__mail-tell');
110		$(this).toggleClass('--svg__close2');
111		$('body').toggleClass('js-no-scroll');
112	});
113
114	$('.js-color-toogle').on('click', function () {
115		$(this).parents('.product-colors').toggleClass('is-open');
116	});
117
118	$(".js-btn-open-tags").on("click", function () {
119		$(this).toggleClass("--is-active");
120		$(this).parents(".tag-filter-top").toggleClass("--is-open")
121	});
122
123	$(".js-arrow-toggle").on("click", function () {
124		$(this).toggleClass("--is-active");
125		$(this).siblings().removeClass("--is-active");
126	});
127
128	$(".filter-sidebar__form, .catalog").hcSticky({
129		stickTo: ".filter-sidebar",
130		top: 64,
131		bottomEnd: 16
132	});
133
134	$(".js-accordeon-sidebar-part").on("click", function () {
135		$(this).toggleClass("--is-open");
136		$(this).toggleClass("--is-close");
137		$(this).siblings(".filter-sidebar__part-content").slideToggle(240);
138	});
139
140	$(".js-accordeon-catalog").on("click", function () {
141		$(this).toggleClass("--is-open");
142		$(this).toggleClass("--is-close");
143		$(this).siblings(".filter-sidebar__part-content").slideToggle(240);
144		$(this).parent().siblings().children(".filter-sidebar__part-content").slideUp(240)
145		$(this).parent().siblings().children(".js-accordeon-catalog").addClass("--is-close").removeClass("--is-open")
146	});
147
148	$(".js-brands-show").on("click", function () {
149		$(this).toggleClass("--is-active");
150		$(this).siblings(".filter-sidebar__brands-wrapper").toggleClass("--is-open");
151	});
152
153	$(".--js-spoiler-open").on("click", function () {
154		$(".catalog-descr__wrapper").toggleClass("is-open");
155		$(this).toggleClass("is-active");
156		$(this).children().text() == "Развернуть" ? $(this).children().text("Свернуть") : $(this).children().text("Развернуть")
157	});
158
159	$('.collapseLines').collapser({
160		mode: 'lines',
161		truncate: 2,
162		showText: '...',
163	});
164
165	$('.collapsestr').collapser({
166		mode: 'chars',
167		truncate: 50,
168		lockHide: true,
169		showText: ''
170
171	})
172});
173
174
175
176// var review_carusel = new Swiper('. .swiper-container', {
177// 	slidesPerView: 3,
178// 	slidesPerColumn: 1,
179// 	spaceBetween: 32,
180// 	loop:false,
181// 	autoHeight:true,
182// 	slidesPerGroup: 3,
183// 	pagination: {
184// 		el: '. .swiper-pagination',
185// 		clickable: true,
186// 	},
187// 	navigation: {
188// 		nextEl: '. .swiper-button-next',
189// 		prevEl: '. .swiper-button-prev',
190// 	},
191// 	breakpoints: {
192// 		990: {
193// 		  slidesPerView: 2,
194// 		  slidesPerColumn: 1,
195// 		  spaceBetween: 24,
196// 		},
197// 		640: {
198// 		  slidesPerView: 1,
199// 		  slidesPerColumn: 1,
200// 		  slidesPerGroup: 1,
201// 		  spaceBetween: 24,
202// 		},
203// 	}    
204// });
205
206$(window).on('load',function () {
207
208	var reviewCarusel = new Swiper('.js-swiper__related-blog .swiper-container', {
209		slidesPerView: 3,
210		slidesPerColumn: 1,
211		spaceBetween: 32,
212		loop: false,
213		autoHeight: true,
214		slidesPerGroup: 3,
215		pagination: {
216			el: '.js-swiper__related-blog .swiper-pagination',
217			clickable: true,
218		},
219		navigation: {
220			nextEl: '.js-swiper__related-blog .swiper-button-next',
221			prevEl: '.js-swiper__related-blog .swiper-button-prev',
222		},
223		breakpoints: {
224			990: {
225				slidesPerView: 2,
226				slidesPerColumn: 1,
227				spaceBetween: 16,
228			},
229			640: {
230				slidesPerView: 1.025,
231				slidesPerColumn: 1,
232				slidesPerGroup: 1,
233				spaceBetween: 8,
234			},
235		}
236	});
237	var reviewCarusel = new Swiper('.js-swiper__big-slider .swiper-container', {
238		slidesPerView: 1,
239		slidesPerColumn: 1,
240		spaceBetween: 0,
241		loop: true,
242		autoHeight: false,
243		slidesPerGroup: 1,
244		pagination: {
245			el: '.js-swiper__big-slider .swiper-pagination',
246			clickable: true,
247		},
248		navigation: {
249			nextEl: '.js-swiper__big-slider .swiper-button-next',
250			prevEl: '.js-swiper__big-slider .swiper-button-prev',
251		},
252		breakpoints: {
253			990: {
254				slidesPerView: 1,
255				slidesPerColumn: 1,
256				spaceBetween: 16,
257			},
258			640: {
259				slidesPerView: 1,
260				slidesPerColumn: 1,
261				slidesPerGroup: 1,
262				spaceBetween: 16,
263			},
264		}
265	});
266
267	var personalCarusel = new Swiper('.js-swiper__personal-about .swiper-container', {
268		slidesPerView: 1,
269		slidesPerColumn: 1,
270		spaceBetween: 0,
271		loop: true,
272		autoHeight: true,
273		slidesPerGroup: 1,
274		pagination: {
275			el: '.js-swiper__personal-about .swiper-pagination',
276			clickable: true,
277			type: 'fraction',
278		},
279		navigation: {
280			nextEl: '.js-swiper__personal-about .swiper-button-next',
281			prevEl: '.js-swiper__personal-about .swiper-button-prev',
282		},
283		breakpoints: {
284			990: {
285				slidesPerView: 1,
286				slidesPerColumn: 1,
287				spaceBetween: 0,
288			},
289			640: {
290				slidesPerView: 1,
291				slidesPerColumn: 1,
292				slidesPerGroup: 1,
293				spaceBetween: 0,
294			},
295		}
296	});
297
298	var personalCarusel = new Swiper('.js-swiper__partners .swiper-container', {
299		slidesPerView: 7,
300		slidesPerColumn: 3,
301		spaceBetween: 16,
302		loop: false,
303		autoHeight: false,
304		slidesPerGroup: 1,
305		pagination: {
306			el: '.js-swiper__partners .swiper-pagination',
307			clickable: true,
308		},
309		navigation: {
310			nextEl: '.js-swiper__partners .swiper-button-next',
311			prevEl: '.js-swiper__partners .swiper-button-prev',
312		},
313		breakpoints: {
314			990: {
315				slidesPerView: 6,
316				slidesPerColumn: 3,
317				spaceBetween: 8,
318			},
319			640: {
320				slidesPerView: 3.125,
321				slidesPerColumn: 2,
322				slidesPerGroup: 1,
323				spaceBetween: 8,
324			},
325		}
326	});
327
328	var relatedCounter = 0;
329	$('.js-swiper__related').each(function () {
330		relatedCounter++;
331		var personalCarusel = new Swiper('#js-swiper__related-' + relatedCounter + ' .swiper-container', {
332			slidesPerView: 4,
333			slidesPerColumn: 1,
334			spaceBetween: 16,
335			loop: false,
336			autoHeight: false,
337			slidesPerGroup: 1,
338			pagination: {
339				el: '#js-swiper__related-' + relatedCounter + ' .swiper-pagination',
340				clickable: true,
341			},
342			navigation: {
343				nextEl: '#js-swiper__related-' + relatedCounter + ' .swiper-button-next',
344				prevEl: '#js-swiper__related-' + relatedCounter + ' .swiper-button-prev',
345			},
346			breakpoints: {
347				990: {
348					slidesPerView: 4,
349					slidesPerColumn: 1,
350					spaceBetween: 8,
351				},
352				640: {
353					slidesPerView: 2.125,
354					slidesPerColumn: 1,
355					slidesPerGroup: 1,
356					spaceBetween: 8,
357				},
358			}
359		});
360	});
361
362	var popularProduct = 0;
363	$('.js-swiper__popular-products').each(function () {
364		popularProduct++;
365		var personalCarusel = new Swiper('#js-swiper__popular-products-' 
365+ popularProduct + ' .swiper-container', {
366			slidesPerView: 4,
367			slidesPerColumn: 2,
368			spaceBetween: 16,
369			loop: false,
370			autoHeight: false,
371			slidesPerGroup: 1,
372			pagination: {
373				el: '#js-swiper__popular-products-' + popularProduct + ' .swiper-pagination',
374				clickable: true,
375			},
376			navigation: {
377				nextEl: '#js-swiper__popular-products-' + popularProduct + ' .swiper-button-next',
378				prevEl: '#js-swiper__popular-products-' + popularProduct + ' .swiper-button-prev',
379			},
380			breakpoints: {
381				990: {
382					slidesPerView: 4,
383					slidesPerColumn: 2,
384					spaceBetween: 8,
385				},
386				640: {
387					slidesPerView: 2,
388					slidesPerColumn: 4,
389					slidesPerGroup: 1,
390					spaceBetween: 8,
391				},
392			}
393		});
394	});
395
396	var popularBrands = 0;
397	$('.js-swiper__brands').each(function () {
398		popularBrands++;
399		var personalCarusel = new Swiper('#js-swiper__brands-' + popularBrands + ' .swiper-container', {
400			slidesPerView: 7,
401			slidesPerColumn: 2,
402			spaceBetween: 16,
403			loop: false,
404			autoHeight: false,
405			slidesPerGroup: 1,
406			pagination: {
407				el: '#js-swiper__brands-' + popularBrands + ' .swiper-pagination',
408				clickable: true,
409			},
410			navigation: {
411				nextEl: '#js-swiper__brands-' + popularBrands + ' .swiper-button-next',
412				prevEl: '#js-swiper__brands-' + popularBrands + ' .swiper-button-prev',
413			},
414			breakpoints: {
415				990: {
416					slidesPerView: 6,
417					slidesPerColumn: 3,
418					spaceBetween: 8,
419				},
420				640: {
421					slidesPerView: 3.125,
422					slidesPerColumn: 2,
423					slidesPerGroup: 1,
424					spaceBetween: 8,
425				},
426			}
427		});
428	});
429	var whyUs = new Swiper('.why-us .swiper-container', {
430		slidesPerView: 2,
431		slidesPerColumn: 1,
432		spaceBetween: 32,
433		loop: false,
434		pagination: {
435			el: '.why-us .swiper-pagination',
436			clickable: true,
437		},
438		navigation: {
439			nextEl: '.why-us .swiper-button-next',
440			prevEl: '.why-us .swiper-button-prev',
441		},
442		breakpoints: {
443			640: {
444				slidesPerView: 1
445			}
446		}
447	});
448
449	var aboutImages = new Swiper('.about__images .swiper-container', {
450		slidesPerView: 1,
451		slidesPerColumn: 1,
452		loop: true,
453		slidesPerGroup: 1,
454		autoplay: {
455			delay: 8000,
456		},
457		navigation: {
458			prevEl: '.about__images .swiper-button-prev',
459			nextEl: '.about__images .swiper-button-next'
460		}
461	});
462
463	var alsoSlider = new Swiper('.js-also-slider .swiper-container', {
464		slidesPerView: 2,
465		spaceBetween: 16,
466		loop: false,
467		autoHeight: true,
468		autoplay: {
469			delay: 8000,
470		},
471		slidesPerGroup: 1,
472		pagination: {
473			el: '.js-also-slider .swiper-pagination',
474			clickable: true,
475		},
476		navigation: {
477			nextEl: '.js-also-slider .swiper-button-next',
478			prevEl: '.js-also-slider .swiper-button-prev',
479		},
480		breakpoints: {
481			991: {
482				slidesPerView: "auto",
483				spaceBetween: 8,
484			}
485		}
486	});
487
488
489
490
491	var personalCarusel = new Swiper('.js-swiper__instagram .swiper-container', {
492		slidesPerView: 6,
493		slidesPerColumn: 1,
494		spaceBetween: 16,
495		loop: false,
496		autoHeight: false,
497		slidesPerGroup: 1,
498		pagination: {
499			el: '.js-swiper__instagram .swiper-pagination',
500			clickable: true,
501		},
502		navigation: {
503			nextEl: '.js-swiper__instagram .swiper-button-next',
504			prevEl: '.js-swiper__instagram .swiper-button-prev',
505		},
506		breakpoints: {
507			990: {
508				slidesPerView: 4.125,
509				slidesPerColumn: 1,
510				spaceBetween: 8,
511			},
512			640: {
513				slidesPerView: 2.125,
514				slidesPerColumn: 1,
515				slidesPerGroup: 1,
516				spaceBetween: 8,
517			},
518		}
519	});
520
521	//G-NOTE: функуия вызова попапа
522
523	$('.js-show-one-tab .tabs__block').removeClass('is-show');
524	$('.js-show-one-tab .tabs__block').hide();
525	$('.js-show-one-tab .tabs__block:first-child').addClass('is-show');
526	$('.js-show-one-tab .tabs__block:first-child').show();
527
528});
529
530/*$(document).on('click', '#callback .callback__btn', function () {
531	console.log('111');
532	ym(48910175,'reachGoal','callback-send');
533	return true;
534});
535
536$(document).on('click', '.feedback-from__line .add-review__btn', function () {
537	console.log('222');
538	ym(48910175,'reachGoal','vacant-send');
539	return true;
540});
541
542$(document).on('click', '.one-from__button', function () {
543	console.log('333');
544	ym(48910175,'reachGoal','1click-send');
545	return true;
546});
547$(document).on('click', '.add-review__btn', function () {
548	console.log('444');
549	ym(48910175,'reachGoal','reviewscart-send');
550	return true;
551});
552$(document).on('click', '.auth__confirm-btn', function () {
553	console.log('555');
554	ym(48910175,'reachGoal','registration-send');
555	return true;
556});*/
557
558//Это работает
559$(document).on('click', '.cart-cupon__btn', function () {	
560	ym(48910175,'reachGoal','promocode-send');
561	return true;
562});
563
564/*$(document).on('click', '.ident-input', function () {
565	if($('.ident-input option[value="26"]').prop('selected')){
566		$('.inn-input').css('display', 'block');
567		//$('.inn-input').removeClass("hide_inn");
568		$('.inn-input input').val('');
569	} else {
570		$('.inn-input').css('display', 'none');
571		//$('.inn-input').addClass("hide_inn");
572		$('.inn-input input').val('-');
573	}
574});*/
575
576$(document).on('change', '.ident-input select', function () {
577	if($('.ident-input option[value="26"]').prop('selected')){
578		$('.inn-input').css('display', 'block');
579		$('.inn-input input').val('');
580		$('.ur_oferta_check').css('display', 'block');
581	} else {
582		$('.inn-input').css('display', 'none');
583		$('.inn-input input').val('-');
584		$('.ur_oferta_check').css('display', 'none');
585	}
586});
587
588$(document).on('click', '.top-menu__item', function () {
589	if($('.ident-input option[value="26"]').prop('selected')){
590		$('.inn-input').css('display', 'block');
591		$('.inn-input input').val('');
592	} else {
593		$('.inn-input').css('display', 'none');
594		$('.inn-input input').val('-');
595	}
596});
597$(document).on('click', '.answer_rev_btn', function () {
598	console.log($(this).data('rev-id'));
599	$('.review_answer_popup').data('answ-id', $(this).data('rev-id'));
600
601});
602
603
604// Добавление loaded для HTML после полной загрузки страницы
605function addLoadedClass() {
606	window.addEventListener("load", function () {
607		setTimeout(function () {
608			document.documentElement.classList.add('loaded');
609		}, 0);
610	});
611}
612addLoadedClass();
613
614$(document).on('click', 'a[href="?on_bann_open_reg=Y"]', function (e) {
615	e.preventDefault();
616	$(".top-menu__item a[data-pform-id='popup-bitrix-register']").trigger('click');
617});
618
619$(document).ready(function () {
620	// при клике на ссылку с классом "scroll-link" будет происходить скроллинг
621	$('a.scroll-link').on('click', function (event) {
622		event.preventDefault(); // отменяем стандартное поведение ссылки
623		let target = $(this).attr('href'); // получаем ID блока, на который нужно перейти
624		let offset = $(target).offset().top; // получаем позицию блока относительно верха страницы
625		$('html, body').animate({ scrollTop: offset }, 1000); // плавно скроллим до нужного блока за 1000 миллисекунд
626	});
627});
628
629$(document).ready(function () {
630	function addAttr() {
631		$('.fotorama__img').each(function () {
632			$(this).attr("title", $('h1 b').text());
633			$(this).attr("alt", $('h1 b').text());
634		});
635	}
636
637	setTimeout(addAttr, 1000);
638});
639

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.