PageSourceSearch

https://www.embargo-villa.com/js/custom.js?v=1791469942

js embargo-villa.com collected 2026-10-08 14:32:43 UTC 29,797 bytes, 1,338 lines download raw bytes

1$(function() {
2
3	// console.log(); addClass(); removeClass(); hasClass(); toggleClass(); slideUp(); slideDown(); slideToggle(); fadeIn(); fadeOut(); fadeToggle(); siblings();
4
5	/* Маска для телефона */
6
7	$('input[type="tel"]').mask('+7 (999) 999-99-99');
8
9	$('.periodFrom__input').mask('99.99.9999');
10	$('.periodTo__input').mask('99.99.9999');
11	$('.singleCalendar__input').mask('99.99.9999');
12
13
14	/* Смена на текста на кнопках */
15
16	function toggleText(elem, clas, text1, text2) {
17		if (elem.hasClass(clas)) {
18			elem.html(text2);
19		} else {
20			elem.html(text1);
21		}
22	}
23
24
25
26
27	/* МОБИЛЬНОЕ МЕНЮ */
28
29	$('.headerBurger1').on('click', function(e) {
30		e.preventDefault();
31
32		$(this).toggleClass('active');
33		$('.mobMenu1').slideToggle();
34
35		$('body').toggleClass('hidden');
36	});
37
38	$('.headerBurger2').on('click', function(e) {
39		e.preventDefault();
40
41		$(this).toggleClass('active');
42		$('.headerMenu2').slideToggle();
43
44		$('.mobMenuOverlay').fadeToggle();
45	});
46
47	$('.mobMenuOverlay').on('click', function(e) {
48		$('.headerBurger2').removeClass('active');
49		$('.headerMenu2').slideUp();
50
51		$('.mobMenuOverlay').fadeOut();
52	});
53
54	$('.headerBurger3').on('click', function(e) {
55		e.preventDefault();
56
57		$(this).toggleClass('active');
58		$('.mobMenu1').slideToggle();
59
60		$('.transparentHeader').toggleClass('transparentHeader_mobMenuOpen');
61		$('body').toggleClass('hidden');
62	});
63
64
65
66
67	/* ШАПКА */
68
69	/* Показать поиск */
70
71	$('.js_show_search_page').on('click', function(e) {
72		e.preventDefault();
73
74		$(this).toggleClass('active');
75		$(this).parents('.header').find('.headerSearchWrap').toggleClass('active');
76
77		if ($(this).hasClass('active')) {
78			$(this).parents('.header').find('.headerSearch__input').focus();
79
80			$(this).attr('title', 'Закрыть поиск');
81		} else {
82			$(this).attr('title', 'Открыть поиск');
83		}
84	});
85
86
87	/* Показать поиск (в попапе) */
88
89	$('.js_show_search_popup').on('click', function(e) {
90		e.preventDefault();
91
92		$('.searchOverlay, .searchPopup').fadeIn();
93
94		$('.searchPopupInput__input').focus();
95	});
96
97	$('.searchOverlay, .searchPopup__close').on('click', function(e) {
98		e.preventDefault();
99
100		$('.searchOverlay, .searchPopup').fadeOut();
101	});
102
103
104
105
106	/* БАННЕРЫ */
107
108	/* Баннер №1 */
109
110	let banner1 = new Swiper('.banner1Slider', {
111		slidesPerView: 1,
112		spaceBetween: 10,
113		speed: 1000,
114		loop: true,
115		navigation: {
116	        prevEl: "#banner1SliderPrev",
117	        nextEl: "#banner1SliderNext",
118	    },
119	    pagination: {
120	    	el: ".banner1Slider__dots"
121	    },
122	    autoplay: {
123	    	delay: 6000
124	    },
125	    breakpoints: {
126	    	1099: {
127	    		spaceBetween: 20,
128		      	pagination: false,
129		      	autoplay: false,
130		      	speed: 500
131	    	}
132	    }
133    });
134
135
136    /* Баннер №2 */
137
138	let banner2 = new Swiper('.banner2Block', {
139		slidesPerView: 'auto',
140		speed: 750,
141		loop: true,
142		navigation: {
143	        prevEl: "#banner2Prev",
144	        nextEl: "#banner2Next",
145	    },
146	    pagination: {
147	    	el: ".banner2Block__dots",
148	    }
149    });
150
151
152
153
154	/* ПОПУЛЯРНЫЕ ПРЕДЛОЖЕНИЯ */
155
156	/* Слайдер №1 */
157
158	if ($('.popular1').length > 0) {
159    	let popular1Length = $('.popular1Item').length;
160
161    	if ($(window).width() > 1099) {
162    		if (popular1Length <= 3) {
163	    		$('.popular1Arrows').hide();
164	    	}
165    	} else {
166    		if (popular1Length == 1) {
167	    		$('.popular1Arrows').hide();
168	    	}
169    	}
170    }
171	
172	let popular1 = new Swiper('.popular1', {
173		slidesPerView: 'auto',
174		speed: 500,
175		loop: false,
176		navigation: {
177	        prevEl: "#popular1Prev",
178	        nextEl: "#popular1Next",
179	    },
180		breakpoints: {
181			1099: {
182				slidesPerView: 3,
183				slidesPerGroup: 3,
184				spaceBetween: 20
185			}
186		}
187    });
188
189
190    /* Слайдер №2 */
191
192    if ($('.popular2').length > 0) {
193    	let popular2Length = $('.popular2Item').length;
194
195    	if (popular2Length <= 2) {
196    		$('.popular2__prev, .popular2__next').hide();
197    	}
198    }
199	
200	let popular2 = new Swiper('.popular2__slider', {
201		slidesPerView: 'auto',
202		speed: 500,
203		loop: false,
204		navigation: {
205	        prevEl: "#popular2Prev",
206	        nextEl: "#popular2Next",
207	    },
208		breakpoints: {
209			1099: {
210				slidesPerView: 2,
211				spaceBetween: 20,
212			}
213		}
214    });
215
216
217
218
219    /* АФИША */
220
221    /* Слайдер месяцев */
222
223    let posterMonths = new Swiper('.posterMonths', {
224		slidesPerView: 'auto',
225		speed: 500,
226		loop: false
227    });
228
229
230    /* Мультиселекты */
231
232    $('.multiSelect__field').on('click', function(e) {
233    	e.preventDefault();
234
235    	let parent = $(this).parents('.multiSelect');
236
237    	$('.multiSelect').not(parent).find('.multiSelect__field').removeClass('active');
238    	$('.multiSelect').not(parent).find('.multiSelect__popup').hide();
239
240    	$(this).toggleClass('active');
241    	$(this).parents('.multiSelect').find('.multiSelect__popup').toggle();
242    });
243
244    $(document).mouseup(function(e) {
245		let select = $('.multiSelect');
246
247		if (!select.is(e.target) && select.has(e.target).length === 0) {
248			select.find('.multiSelect__field').removeClass('active');
249    		select.find('.multiSelect__popup').hide();
250		}
251	});
252
253
254	/* Мобильный фильтр */
255
256	$('.filtersMobIcon').on('click', function(e) {
257		e.preventDefault();
258
259		$('.mobFilterOverlay, .mobFilter').show();
260	});
261
262	$('.mobFilterOverlay, .mobFilter__close').on('click', function(e) {
263		e.preventDefault();
264
265		$('.mobFilterOverlay, .mobFilter').hide();
266	});
267
268
269
270
271    /* О ТЕАТРЕ */
272
273    /* Читать ещё */
274
275    $('.moreButton1').on('click', function(e) {
276    	e.preventDefault();
277
278    	$(this).toggleClass('active');
279
280    	if ($(this).hasClass('active')) {
281    		$(this).find('.moreButton1__text').html('Скрыть');
282    	} else {
283    		$(this).find('.moreButton1__text').html('Читать ещё');
284    	}
285    });
286
287    $('.js_about1_more').on('click', function(e) {
288    	e.preventDefault();
289
290    	$(this).parents('.about1').find('.about1__side').toggleClass('active');
291    });
292
293
294    /* Читать дальше №1 */
295
296    $('.about2').each(function() {
297    	let text = $(this).find('.about2__text');
298
299    	let scrollHeight = text.prop('scrollHeight');
300    	let clientHeight = text.prop('clientHeight');
301
302    	if (clientHeight < scrollHeight) {
303    		$(this).find('.about2__more').addClass('active');
304    	}
305    });
306
307    $('.moreButton2').on('click', function(e) {
308    	e.preventDefault();
309
310    	$(this).toggleClass('active');
311
312    	if ($(this).hasClass('active')) {
313    		$(this).find('.moreButton2__text').html('Скрыть');
314    	} else {
315    		$(this).find('.moreButton2__text').html('Читать дальше');
316    	}
317    });
318
319    $('.js_about2_more').on('click', function(e) {
320    	e.preventDefault();
321
322    	$(this).parents('.about2').find('.about2__text').toggleClass('active');
323    });
324
325
326    /* Читать дальше №2 */
327
328    $('.about3').each(function() {
329    	let text = $(this).find('.about3__text');
330
331    	let scrollHeight = text.prop('scrollHeight');
332    	let clientHeight = text.prop('clientHeight');
333
334    	if (clientHeight < scrollHeight) {
335    		$(this).find('.about3__more').addClass('active');
336    	}
337    });
338
339    $('.js_about3_more').on('click', function(e) {
340    	e.preventDefault();
341
342    	$(this).parents('.about3').find('.about3__text').toggleClass('active');
343    });
344
345
346
347
348    /* ГАЛЕРЕЯ */
349
350    /* Галееря тип 1 */
351
352    let gallery1 = new Swiper('.gallery1__slider', {
353    	slidesPerView: 1,
354    	spaceBetween: 10,
355		speed: 500,
356		loop: true,
357		pagination: {
358	    	el: ".gallery1__dots",
359	    },
360	    breakpoints: {
361	    	639: {
362				spaceBetween: 20
363	    	},
364	    	1099: {
365	    		slidesPerView: 3,
366				spaceBetween: 60,
367		      	centeredSlides: true,
368		      	pagination: false
369	    	}
370	    }
371    });
372
373    $('#gallery1Prev').on('click', function(e) {
374    	e.preventDefault();
375
376    	gallery1.slidePrev(500);
377    });
378
379    $('#gallery1Next').on('click', function(e) {
380    	e.preventDefault();
381
382    	gallery1.slideNext(500);
383    });
384
385
386    /* Галееря тип 2 */
387
388    let gallery2 = new Swiper('.gallery2__slider', {
389    	slidesPerView: "auto",
390    	spaceBetween: 10,
391		speed: 500,
392		loop: true,
393	    breakpoints: {
394	    	639: {
395				spaceBetween: 20
396	    	},
397	    	1099: {
398	    		slidesPerView: 6,
399				spaceBetween: 20
400	    	}
401	    }
402    });
403
404
405    /* Галееря тип 3 */
406
407    let gallery3;
408	let initGallery3 = false;
409
410	function gallery3Init() {
411		if ($(window).width() <= 1099) {
412			if (!initGallery3) {
413				initGallery3 = true;
414
415				gallery3 = new Swiper('.gallery3__slider', {
416			    	slidesPerView: 1,
417			    	spaceBetween: 10,
418					speed: 500,
419					loop: true,
420					pagination: {
421				        el: ".gallery3__counter",
422				        type: "fraction",
423				    },
424				    navigation: {
425				        prevEl: "#gallery3Prev",
426				        nextEl: "#gallery3Next",
427				    },
428				    breakpoints: {
429				    	639: {
430							spaceBetween: 20
431				    	}
432				    }
433			    });
434			}
435		} else {
436			if (initGallery3) {
437				gallery3.destroy();
438
439				initGallery3 = false;
440			}
441		}
442	}
443
444	if ($('.gallery3').length > 0) {
445		gallery3Init();
446
447		$(window).on('resize', function() {
448			gallery3Init();
449		});
450	}
451
452
453    /* Галерейный попап №1 */
454
455    let gallery1Length;
456    let gallery2Length;
457
458    if ($('.gallery1').length > 0) {
459    	gallery1Length = $('.gallery1__item').length - 1;
460    }
461
462    if ($('.gallery2').length > 0) {
463    	gallery2Length = $('.gallery2__item').length - 1;
464    }
465
466    $('.gallery1__item').on('click', function(e) {
467    	e.preventDefault();
468
469    	let $this = $(this);
470    	let elemIndex = $this.data('swiper-slide-index');
471
472    	for (let i = 0; i <= gallery1Length; i++) {
473    		let imgSrc = $('.gallery1__item[data-swiper-slide-index="'+ i +'"]').find('img').attr('src');
474    		let imgAlt = $('.gallery1__item[data-swiper-slide-index="'+ i +'"]').find('img').attr('alt');
475
476    		$('.galleryPopup1__wrap').append('<div class="galleryPopup1__item"><img src="'+ imgSrc +'" alt="'+ imgAlt +'"></div>');
477    	}
478
479    	$('.galleryPopup1').fadeIn();
480    	$('body').addClass('hidden');
481
482    	$('.galleryPopup1__item').eq(elemIndex).get(0).scrollIntoView();
483
484    	$('.galleryPopup1').scrollTop($('.galleryPopup1').scrollTop() - 20);
485    });
486
487    $('.gallery2__item').on('click', function(e) {
488    	e.preventDefault();
489
490    	let $this = $(this);
491    	let elemIndex = $this.data('swiper-slide-index');
492
493    	for (let i = 0; i <= gallery2Length; i++) {
494    		let imgSrc = $('.gallery2__item[data-swiper-slide-index="'+ i +'"]').find('img').attr('src');
495    		let imgAlt = $('.gallery2__item[data-swiper-slide-index="'+ i +'"]').find('img').attr('alt');
496
497    		$('.galleryPopup1__wrap').append('<div class="galleryPopup1__item"><img src="'+ imgSrc +'" alt="'+ imgAlt +'"></div>');
498    	}
499
500    	$('.galleryPopup1').fadeIn();
501    	$('body').addClass('hidden');
502
503    	$('.galleryPopup1__item').eq(elemIndex).get(0).scrollIntoView();
504
505    	$('.galleryPopup1').scrollTop($('.galleryPopup1').scrollTop() - 20);
506    });
507
508    $('.galleryPopup1__close').on('click', function(e) {
509    	e.preventDefault();
510
511    	$('.galleryPopup1').fadeOut(400, function() {
512    		$('.galleryPopup1__wrap').html('');
513    	});
514    	
515    	$('body').removeClass('hidden');
516    });
517
518
519    /* Галерейный попап №2 */
520
521    let galleryPopupSlider;
522
523    if ($(window).width() > 1099) {
524    	$('.gallery3Item').on('click', function(e) {
525	    	e.preventDefault();
526
527	    	let elemIndex = $(this).index();
528
529	    	galleryPopupSlider = new Swiper('.galleryPopup2__slider', {
530		    	slidesPerView: 'auto',
531		    	spaceBetween: 40,
532		    	centeredSlides: true,
533				speed: 500,
534				loop: true
535		    });
536
537		    $('#galleryPopup2Prev').on('click', function(e) {
538		    	e.preventDefault();
539
540		    	galleryPopupSlider.slidePrev(500);
541		    });
542
543		    $('#galleryPopup2Next').on('click', function(e) {
544		    	e.preventDefault();
545
546		    	galleryPopupSlider.slideNext(500);
547		    });
548
549	    	
550
551	    	$('.galleryPopup2').fadeIn();
552	    	$('body').addClass('hidden');
553
554	    	galleryPopupSlider.slideTo(elemIndex, 0);
555	    });
556    }
557
558    $('.galleryPopup2__close').on('click', function(e) {
559    	e.preventDefault();
560
561    	$('.galleryPopup2').fadeOut(400, function() {
562    		galleryPopupSlider.destroy();
563    	});
564    	$('body').removeClass('hidden');
565    });
566
567
568
569
570    /* АКТЕРЫ */
571
572    /* Тип блока №1 */
573
574    let actorsList1Slider;
575	let initActorsList1Slider = false;
576
577	function actorsList1SliderInit() {
578		if ($(window).width() <= 1099) {
579			if (!initActorsList1Slider) {
580				initActorsList1Slider = true;
581
582				actorsList1Slider = new Swiper('.actorsList1_slider', {
583					slidesPerView: 'auto',
584					speed: 500,
585					loop: false
586			    });
587			}
588		} else {
589			if (initActorsList1Slider) {
590				actorsList1Slider.destroy();
591
592				initActorsList1Slider = false;
593			}
594		}
595	}
596
597	if ($('.actorsList1_slider').length > 0) {
598		actorsList1SliderInit();
599
600		$(window).on('resize', function() {
601			actorsList1SliderInit();
602		});
603	}
604
605
606	/* Тип блока №3 */
607
608	let actorsList3Slider;
609	let initActorsList3Slider = false;
610
611	function actorsList3SliderInit() {
612		if ($(window).width() <= 1099) {
613			if (!initActorsList3Slider) {
614				initActorsList3Slider = true;
615
616				actorsList3Slider = new Swiper('.actorsList3_slider', {
617					slidesPerView: 'auto',
618					speed: 500,
619					loop: false
620			    });
621			}
622		} else {
623			if (initActorsList3Slider) {
624				actorsList3Slider.destroy();
625
626				initActorsList3Slider = false;
627			}
628		}
629	}
630
631	if ($('.actorsList3_slider').length > 0) {
632		actorsList3SliderInit();
633
634		$(window).on('resize', function() {
635			actorsList3SliderInit();
636		});
637	}
638
639
640
641
642	/* РЕКОМЕНДУЕМ */
643
644	/* Тип блока №1 */
645
646	let recom1Slider;
647	let initRecom1Slider = false;
648
649	function recom1SliderInit() {
650		if ($(window).width() <= 1099) {
651			if (!initRecom1Slider) {
652				initRecom1Slider = true;
653
654				recom1Slider = new Swiper('.recom1', {
655					slidesPerView: 'auto',
656					speed: 500,
657					loop: false
658			    });
659			}
660		} else {
661			if (initRecom1Slider) {
662				recom1Slider.destroy();
663
664				initRecom1Slider = false;
665			}
666		}
667	}
668
669	if ($('.recom1').length > 0) {
670		recom1SliderInit();
671
672		$(window).on('resize', function() {
673			recom1SliderInit();
674		});
675	}
676
677
678
679
680	/* ПРЕИМУЩЕСТВА */
681
682	/* Тип блока №5 */
683
684	$('.advan5Item').on('click', function(e) {
685		$(this).toggleClass('active');
686	});
687
688
689
690
691	/* НОВОСТИ */
692
693	/* Тип блока №1 */
694
695	let news1Slider;
696	let initNews1Slider = false;
697
698	function news1SliderInit() {
699		if ($(window).width() <= 1099) {
700			if (!initNews1Slider) {
701				initNews1Slider = true;
702
703				news1Slider = new Swiper('.news1Slider', {
704					slidesPerView: 1,
705					spaceBetween: 10,
706					speed: 500,
707					loop: false,
708					navigation: {
709				        prevEl: "#news1Prev",
710				        nextEl: "#news1Next"
711				    },
712				    breakpoints: {
713				    	639: {
714							spaceBetween: 20
715				    	}
716				    }
717			    });
718			}
719		} else {
720			if (initNews1Slider) {
721				news1Slider.destroy();
722
723				initNews1Slider = false;
724			}
725		}
726	}
727
728	if ($('.news1Slider').length > 0) {
729		news1SliderInit();
730
731		$(window).on('resize', function() {
732			news1SliderInit();
733		});
734	}
735
736
737	/* Тип блока №2 */
738
739	let news2Slider;
740	let initNews2Slider = false;
741
742	function news2SliderInit() {
743		if ($(window).width() <= 1099) {
744			if (!initNews2Slider) {
745				initNews2Slider = true;
746
747				news2Slider = new Swiper('.news2Slider__slider', {
748					slidesPerView: 1,
749					spaceBetween: 10,
750					speed: 500,
751					loop: false,
752					navigation: {
753				        prevEl: "#news2Prev",
754				        nextEl: "#news2Next"
755				    },
756				    breakpoints: {
757				    	639: {
758							spaceBetween: 20
759				    	}
760				    }
761			    });
762			}
763		} else {
764			if (initNews2Slider) {
765				news2Slider.destroy();
766
767				initNews2Slider = false;
768			}
769		}
770	}
771
772	if ($('.news2Slider').length > 0) {
773		news2SliderInit();
774
775		$(window).on('resize', function() {
776			news2SliderInit();
777		});
778	}
779
780
781
782
783	/* КОНТАКТЫ */
784
785	/* Карта */
786
787	if ($('#map').length > 0) {
788 		let coords = $('.coordsBlock').attr('data-coords').replace( /\s/g, "").split(',');
789	    let coord1 = coords[0];
790	    let coord2 = coords[1];
791
792 		ymaps.ready(init);
793	    let myMap,
794	    myPlacemark;
795
796	    function init() {     
797	        myMap = new ymaps.Map ("map", { 
798	            center: [coord1, coord2], 
799	            zoom: 14
800	        });
801
802	        myPlacemark = new ymaps.Placemark([coord1, coord2]);
803
804	        myMap.geoObjects.add(myPlacemark);
805	    }
806 	}
807
808
809
810
811 	/* БИЛЕТЫ В НАЛИЧИИ */
812
813 	/* Вариант №1 */
814
815 	$('#inStock1ShowAll').on('click', function(e) {
816 		e.preventDefault();
817
818 		$(this).toggleClass('inStock1ShowAllActive');
819
820 		if ($(this).hasClass('inStock1ShowAllActive')) {
821 			$(this).html('Скрыть');
822 		} else {
823 			$(this).html('Ещё даты');
824 		}
825
826 		$('.inStock1Item').toggleClass('active');
827 	});
828
829
830 	/* Вариант 2 */
831
832 	$('#inStock2ShowAll').on('click', function(e) {
833 		e.preventDefault();
834
835 		$(this).toggleClass('inStock2More_active');
836
837 		if ($(this).hasClass('inStock2More_active')) {
838 			$(this).html('Скрыть');
839 		} else {
840 			$(this).html('Ещё даты');
841 		}
842
843 		$('.inStock2Item').toggleClass('active');
844 	});
845
846
847    let inStock2;
848	let initInStock2 = false;
849
850	function inStock2Init() {
851		if ($(window).width() <= 1099) {
852			if (!initInStock2) {
853				initInStock2 = true;
854
855				inStock2 = new Swiper('.inStock2', {
856			    	slidesPerView: 'auto',
857					speed: 700,
858					loop: true
859			    });
860			}
861		} else {
862			if (initInStock2) {
863				inStock2.destroy();
864
865				initInStock2 = false;
866			}
867		}
868	}
869
870	if ($('.inStock2').length > 0) {
871		inStock2Init();
872
873		$(window).on('resize', function() {
874			inStock2Init();
875		});
876	}
877
878
879
880
881	/* ОТЗЫВЫ */
882
883	/* Отзывы №1 */
884
885	let reviews1 = new Swiper('.reviews1__slider', {
886		slidesPerView: 'auto',
887		speed: 500,
888		loop: false,
889		navigation: {
890	        prevEl: "#reviews1Prev",
891	        nextEl: "#reviews1Next",
892	    },
893	    breakpoints: {
894	    	1099: {
895	    		slidesPerView: 3,
896	    		spaceBetween: 20,
897		      	loop: true,
898	    	}
899	    }
900    });
901
902    $('.reviews1Item').each(function() {
903    	let text = $(this).find('.reviews1Item__text');
904
905    	let scrollHeight = text.prop('scrollHeight');
906    	let clientHeight = text.prop('clientHeight');
907
908    	if (clientHeight < scrollHeight) {
909    		$(this).find('.reviews1ItemMore').addClass('active');
910    	}
911    });
912
913    $('.reviews1ItemMore').on('click', function(e) {
914    	$(this).parents('.reviews1Item').find('.reviews1Item__text').toggleClass('active');
915    });
916
917
918    /* Отзывы №2 */
919
920	let reviews2 = new Swiper('.reviews2__slider', {
921		slidesPerView: 1,
922	    spaceBetween: 10,
923		speed: 500,
924		loop: true,
925		navigation: {
926	        prevEl: "#reviews2Prev",
927	        nextEl: "#reviews2Next",
928	    },
929	    breakpoints: {
930	    	639: {
931	    		spaceBetween: 20,
932	    		speed: 750
933	    	}
934	    }
935    });
936
937    $('.reviews2Item').each(function() {
938    	let text = $(this).find('.reviews2Item__text');
939
940    	let scrollHeight = text.prop('scrollHeight');
941    	let clientHeight = text.prop('clientHeight');
942
943    	if (clientHeight < scrollHeight) {
944    		$(this).find('.reviews2Item__more').addClass('active');
945    	}
946    });
947
948    $('.reviews2ItemMore').on('click', function(e) {
949    	$(this).toggleClass('active');
950
951    	if ($(this).hasClass('active')) {
952    		$(this).find('.reviews2ItemMore__text').html('Скрыть');
953    	} else {
954    		$(this).find('.reviews2ItemMore__text').html('Читать полностью');
955    	}
956
957    	$(this).parents('.reviews2Item').find('.reviews2Item__text').toggleClass('active');
958    });
959
960
961    /* Отзывы №3 */
962
963	let reviews3 = new Swiper('.reviews3__slider', {
964		slidesPerView: 'auto',
965		speed: 500,
966		loop: true,
967		navigation: {
968	        prevEl: "#reviews3Prev",
969	        nextEl: "#reviews3Next",
970	    },
971	    breakpoints: {
972	    	639: {
973	    		slidesPerView: 'auto',
974	    		loop: false
975	    	},
976	    	1099: {
977	    		slidesPerView: 3,
978	    		spaceBetween: 20,
979		      	loop: true
980	    	}
981	    }
982    });
983
984    $('.reviews3Item').each(function() {
985    	let text = $(this).find('.reviews3Item__text');
986
987    	let scrollHeight = text.prop('scrollHeight');
988    	let clientHeight = text.prop('clientHeight');
989
990    	if (clientHeight < scrollHeight) {
991    		$(this).find('.reviews3Item__more').addClass('active');
992    	}
993    });
994
995    $('.reviews3ItemMore').on('click', function(e) {
996    	e.preventDefault();
997
998    	$(this).toggleClass('active');
999
1000    	if ($(this).hasClass('active')) {
1001    		$(this).html('Скрыть');
1002    	} else {
1003    		$(this).html('Читать полностью');
1004    	}
1005
1006    	$(this).parents('.reviews3Item').find('.reviews3Item__text').toggleClass('active');
1007    });
1008
1009
1010    /* Отзывы №4 */
1011
1012    $('.reviews4Item').each(function() {
1013    	let text = $(this).find('.reviews4Item__text');
1014
1015    	let scrollHeight = text.prop('scrollHeight');
1016    	let clientHeight = text.prop('clientHeight');
1017
1018    	if (clientHeight < scrollHeight) {
1019    		$(this).find('.reviews4Item__more').addClass('active');
1020    	}
1021    });
1022
1023    $('.reviews4ItemMore').on('click', function(e) {
1024    	e.preventDefault();
1025
1026    	$(this).toggleClass('active');
1027
1028    	if ($(this).hasClass('active')) {
1029    		$(this).html('Скрыть');
1030    	} else {
1031    		$(this).html('Читать полностью');
1032    	}
1033
1034    	$(this).parents('.reviews4Item').find('.reviews4Item__text').toggleClass('active');
1035    });
1036
1037    $('#reviews4ShowAll').on('click', function(e) {
1038    	e.preventDefault();
1039
1040    	$(this).toggleClass('active');
1041
1042    	if ($(this).hasClass('active')) {
1043    		$(this).html('Скрыть');
1044    	} else {
1045    		$(this).html('Показать ещё');
1046    	}
1047
1048    	$('.reviews4Item').toggleClass('active');
1049    });
1050
1051
1052
1053
1054    /* ТАБЫ ПО МЕСЯЦАМ (АФИША) */
1055
1056    let anchorTabs1 = new Swiper('.anchorTabs1', {
1057		slidesPerView: 'auto',
1058		speed: 500,
1059		loop: false
1060    });
1061
1062    let anchorTabs2 = new Swiper('.anchorTabs2', {
1063		slidesPerView: 'auto',
1064		speed: 500,
1065		loop: false
1066    });
1067
1068    let anchorTabs3 = new Swiper('.anchorTabs3', {
1069		slidesPerView: 'auto',
1070		speed: 500,
1071		loop: false
1072    });
1073
1074    $('.anchorTabs1__item, .anchorTabs2__item, .anchorTabs3__item').on('click', function(e) {
1075    	e.preventDefault();
1076
1077    	let $this = $(this);
1078
1079    	$('html, body').animate({
1080    		scrollTop: $($this.attr('href')).offset().top
1081    	}, 750);
1082    });
1083
1084
1085
1086
1087    /* АКТЁР */
1088
1089    /* Биография №1 */
1090
1091    $('.actorAbout1').each(function() {
1092    	let text = $(this).find('.actorAbout1__text');
1093
1094    	let scrollHeight = text.prop('scrollHeight');
1095    	let clientHeight = text.prop('clientHeight');
1096
1097    	if (clientHeight < scrollHeight) {
1098    		$(this).find('.actorAbout1__more').addClass('active');
1099    	}
1100    });
1101
1102    $('#actorAbout1More').on('click', function(e) {
1103    	e.preventDefault();
1104
1105    	$(this).parents('.actorAbout1').find('.actorAbout1__text').toggleClass('active');
1106    });
1107
1108
1109    /* Слайдер репертуара */
1110
1111    let repertoire2Slider = new Swiper('.repertoire2Slider__slider', {
1112		slidesPerView: 'auto',
1113		speed: 500,
1114		loop: false,
1115		navigation: {
1116	        prevEl: "#repertoire2SliderPrev",
1117	        nextEl: "#repertoire2SliderNext",
1118	    },
1119		breakpoints: {
1120			1099: {
1121				slidesPerView: 3,
1122				slidesPerGroup: 3,
1123				spaceBetween: 20
1124			}
1125		}
1126    });
1127
1128
1129
1130
1131    /* ПЛОЩАДКИ */
1132
1133    /* Селект с табами */
1134
1135    $('.anchorSelect__field').on('click', function(e) {
1136    	e.preventDefault();
1137
1138    	let parent = $(this).parents('.anchorSelect');
1139
1140    	$('.anchorSelect').not(parent).find('.anchorSelect__field').removeClass('active');
1141    	$('.anchorSelect').not(parent).find('.anchorSelect__popup').hide();
1142
1143    	$(this).toggleClass('active');
1144    	$(this).parents('.anchorSelect').find('.anchorSelect__popup').toggle();
1145    });
1146
1147    $(document).mouseup(function(e) {
1148		let select = $('.anchorSelect');
1149
1150		if (!select.is(e.target) && select.has(e.target).length === 0) {
1151			select.find('.anchorSelect__field').removeClass('active');
1152    		select.find('.anchorSelect__popup').hide();
1153		}
1154	});
1155
1156	$('.anchorSelect__variant').on('click', function(e) {
1157		e.preventDefault();
1158
1159		let $this = $(this);
1160
1161		let parent = $this.parents('.anchorSelect');
1162
1163		parent.find('.anchorSelect__field').removeClass('active');
1164    	parent.find('.anchorSelect__popup').hide();
1165
1166    	$('html, body').animate({
1167    		scrollTop: $($this.attr('href')).offset().top
1168    	}, 750);
1169	});
1170
1171
1172	/* Показать ещё */
1173
1174	$('.js_platforms1_more').on('click', function(e) {
1175		e.preventDefault();
1176
1177		$(this).toggleClass('active');
1178
1179		toggleText($(this), 'active', 'Показать ещё', 'Скрыть');
1180
1181		$(this).parents('.section').find('.platforms1Item').toggleClass('active');
1182	});
1183
1184	$('.js_platforms2_more').on('click', function(e) {
1185		e.preventDefault();
1186
1187		$(this).toggleClass('active');
1188
1189		toggleText($(this), 'active', 'Показать ещё', 'Скрыть');
1190
1191		$(this).parents('.section').find('.platforms2Item').toggleClass('active');
1192	});
1193
1194	$('.js_platforms3_more').on('click', function(e) {
1195		e.preventDefault();
1196
1197		$(this).toggleClass('active');
1198
1199		toggleText($(this), 'active', 'Показать ещё', 'Скрыть');
1200
1201		$(this).parents('.section').find('.platforms3Item').toggleClass('active');
1202	});
1203
1204	$('.js_platforms4_more').on('click', function(e) {
1205		e.preventDefault();
1206
1207		$(this).toggleClass('active');
1208
1209		toggleText($(this), 'active', 'Показать ещё', 'Скрыть');
1210
1211		$(this).parents('.section').find('.platforms4Item').toggleClass('active');
1212	});
1213
1214
1215
1216
1217	/* КАЛЕНДАРИ */
1218
1219	$.datepicker.regional['ru'] = {
1220		closeText: 'Закрыть',
1221		prevText: '<',
1222		nextText: '>',
1223		currentText: 'Сегодня',
1224		monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
1225		monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн','Июл','Авг','Сен','Окт','Ноя','Дек'],
1226		dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
1227		dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
1228		dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
1229		weekHeader: 'Не',
1230		dateFormat: 'dd.mm.yy',
1231		firstDay: 1,
1232		isRTL: false,
1233		showMonthAfterYear: false,
1234		yearSuffix: '',
1235		minDate: 0,
1236	};
1237
1238	$.datepicker.setDefaults($.datepicker.regional['ru']);
1239
1240	$('.periodFrom__input').datepicker({
1241		onSelect: function(dateText) {
1242			$('.periodTo__input').datepicker('option', {minDate: dateText});
1243		}
1244	});
1245
1246	$('.periodTo__input').datepicker();
1247	
1248	$('.singleCalendar__input').datepicker();
1249
1250
1251
1252
1253	/* Скролл из меню */
1254
1255	// $('.headerMenu__link').on('click', function(e) {
1256	// 	e.preventDefault();
1257
1258	// 	$('html, body').animate({
1259	// 		scrollTop: $($(this).attr('href')).offset().top
1260	// 	}, 1000);
1261	// });
1262
1263	// $('.mobileMenu__link').on('click', function(e) {
1264	// 	e.preventDefault();
1265
1266	// 	$('html, body').animate({
1267	// 		scrollTop: $($(this).attr('href')).offset().top
1268	// 	}, 1000);
1269
1270	// 	$('.mobMenu').slideUp();
1271	//  	$('body').removeClass('hidden');
1272	// });
1273
1274
1275
1276
1277	/* Мобильное меню */
1278
1279	// $('.burger').on('click', function(e) {
1280	// 	e.preventDefault();
1281
1282	// 	$('.mobMenu').slideDown();
1283	// 	$('body').addClass('hidden');
1284	// });
1285
1286	// $('.mobMenu__close').on('click', function(e) {
1287	// 	e.preventDefault();
1288
1289	// 	$('.mobMenu').slideUp();
1290	// 	$('body').removeClass('hidden');
1291	// });
1292
1293
1294
1295
1296	/* Модальные окна */
1297
1298	// $('.showModal').on('click', function(e) {
1299	// 	e.preventDefault();
1300
1301	// 	$('.overlay, #orderModal').fadeIn();
1302	// });
1303
1304	// $('.overlay, .modal__close').on('click', function(e) {
1305	// 	e.preventDefault();
1306
1307	// 	$('.overlay, .modal').fadeOut();
1308	// });
1309
1310
1311
1312
1313	/* Отправка форм */
1314
1315	 $('.form1, .form2, .form3').on('submit', function(e) {
1316	 	e.preventDefault();
1317
1318	 	let $this = $(this);
1319		
1320         $.ajax({
1321             url: '/order/',
1322             type: 'POST',
1323             data: $(this).serialize()
1324         }).done(function() {
1325         	//$this.find('input').not('[type="hidden"]').val('');
1326         	//$this.find('textarea').val('');
1327         	$this.html("<h2 class=\"form1__title form2__title form3__title\">Ваша заявка отправлена!</h2>");
1328         });
1329     });
1330 
1331 
1332 
1333
1334
1335
1336
1337
1338});

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.