PageSourceSearch

https://www.sechenov.ru/local/templates/new2020/js/main.js?178159994823218

js sechenov.ru collected 2026-10-02 02:31:20 UTC 23,218 bytes, 711 lines download raw bytes

1$(document).ready(function () {
2    $('.slider_wrapper').slick({
3        autoplay: true,
4        draggable: false,
5        speed: 1000,
6        autoplaySpeed: 3500,
7        easing: 'ease',
8        initialSlide: 0,
9        arrows: false,
10        slidesToShow: 1,
11        slideToScroll: 1,
12        dots: false,
13        vertical: true,
14        verticalScrolling: true,
15        adaptiveHeight: true,
16        infinite: true,
17        pauseOnHover: true,
18        swipe: true,
19        touchMove: true,
20        asNavFor: '.vertical-dots',
21
22    });
23
24
25    $('.vertical-dots').slick({
26        autoplay: true,
27
28        arrows: true,
29        appendArrows: $('.vertical-dots'),
30        speed: 1000,
31        autoplaySpeed: 3500,
32        nextArrow: '<button type="button" class="slick-next flaticon-up-chevron"></button>',
33        prevArrow: '<button type="button" class="slick-prev flaticon-up-chevron"></button>',
34        slidesToShow: 3,
35        vertical: true,
36        verticalScrolling: true,
37        slideToScroll: 1,
38        asNavFor: '.slider_wrapper',
39        dots: false,
40        centerMode: false,
41        focusOnSelect: true
42    });
43
44
45    $('#main_select').select2({
46        minimumResultsForSearch: -1
47    });
48    $('.nice-select').select2({
49        minimumResultsForSearch: -1
50    });
51    $('.block-slider_news').slick({
52        slidesToShow: 4,
53        slideToScroll: 1,
54        autoplay: true,
55        dots: false,
56        appendArrows: $('.slider-news-head'),
57        nextArrow: '<button type="button" class="slick-next flaticon-up-chevron"></button>',
58        prevArrow: '<button type="button" class="slick-prev flaticon-up-chevron"></button>',
59        variableWidth: true
60    });
61
62    $(".buildings").niceScroll({
63            cursorcolor: "#004899",
64            cursorwidth: "10px",
65            background: "#F2F2F2",
66            borderradius: 7,
67            cursorborderradius: 7
68        }
69    );
70    $('.select2-selection__arrow').addClass('flaticon-up-chevron');
71    $('.header-top-sub_menu').hover(function () {
72    }, function () {
73        setTimeout(function () {
74            if ($('.header-top-sub_menu:hover').length == 0 && $('.lists-menu:hover').length == 0) {
75                $('.header-top-sub_menu').slideUp(200);
76            }
77        }, 100);
78    });
79
80    $('.top_menu__link').hover(function () {
81        var index = $(this).parents('.list-item').index();
82        if (!$('.header-top-sub_menu[data-item="' + $(this).parents('.list-item').index() + '"]').length) {
83            $('.header-top-sub_menu').slideUp(200);
84
85        }
86        if ($('.header-top-sub_menu[data-item="' + $(this).parents('.list-item').index() + '"]').is(":hidden")) {
87            var index = $(this).parents('.list-item').index();
88            $('.header-top-sub_menu').slideUp(200);
89            $('.header-top-sub_menu[data-item="' + index + '"]').slideDown(200);
90        }
91    }, function () {
92        setTimeout(function () {
93            if ($('.header-top-sub_menu:hover').length == 0
94                && $('.top_menu__link:hover').length == 0) {
95                $('.header-top-sub_menu').slideUp(200);
96            }
97        }, 100);
98    });
99
100    /*   if ($(window).width() <= 991) {
101
102           $('.slick_news-slider').each(function (index, el) {
103               $(el).slick({
104                   arrows: false,
105                   variableWidth: true,
106                   infinite: true,
107                   autoplay: false,
108                   speed: 700,
109               });
110
111           })
112
113           $('#slick_news_block').slick({
114               arrows: false,
115               variableWidth: true,
116               infinite: true,
117               autoplay: false,
118           });
119
120           $('.wrapper_media_cards').slick({
121               arrows: false,
122               variableWidth: true,
123               infinite: true,
124               autoplay: false,
125           });
126
127
128           $('#slider_structure').slick({
129               arrows: false,
130               variableWidth: true,
131               infinite: true,
132               autoplay: false,
133               speed: 700,
134           });
135
136           $('.preview_text_block').equalHeights();
137           $('.wrapper_cards_news .card').equalHeights();
138           $('.media-card .equal').equalHeights();
139           $('.section-info__item .equal').equalHeights();
140
141       }*/
142
143    $('.header_bottom_submenu').hover(function () {
144    }, function () {
145        setTimeout(function () {
146            if ($('.header_bottom_submenu:hover').length == 0 && $('.block-menu-sub:hover').length == 0) {
147                $('.header_bottom_submenu').slideUp(200);
148            }
149        }, 100);
150    });
151
152    $('.link_item_menu').click(function () {
153        if ($('.header_bottom_submenu[data-elem="' + $(this).parents('.item_sub').index() + '"]').is(":hidden")) {
154            var index = $(this).parents('.item_sub').index();
155            $('.header_bottom_submenu').slideUp(200);
156            $('.header_bottom_submenu[data-elem="' + index + '"]').slideDown(200);
157        }
158    }, function () {
159        setTimeout(function () {
160            if ($('.header_bottom_submenu:click').length == 0 && $('.link_item_menu:click').length == 0) {
161                $('.header_bottom_submenu').slideUp(200);
162            }
163        }, 100);
164    });
165
166    $('.link_item_menu').click(function () {
167        var index = $(this).parents('.item_sub').index();
168        $('.header_bottom_submenu').attr('data-elem');
169    });
170
171
172    // $('.link_item_menu').on('click', function (e) {
173    //   e.preventDefault();
174    //   var index = $(this).parents('.item_sub').index();
175    //   console.log(index);
176    //   if ($('.header_bottom_submenu[data-elem="' + $(this).parents('.item_sub').index() + '"]').is("hidden")) {
177    //     console.log(123)
178    //     $('.header_bottom_submenu').slideUp(200);
179    //     $('.header_bottom_submenu[data-elem="' + index + '"]').slideDown(200);
180    //   }
181    // });
182
183
184    $('.link_item_menu').on('click', function () {
185        if ($('.header_bottom_submenu[data-elem="' + $(this).parents('.item_sub').index() + '"]').is(":hidden")) {
186            console.log(123)
187        }
188
189    })
190
191
192    // ***********************************************
193
194    $('.input-search').on('click', function () {
195        $(this).toggleClass('flaticon-cancel');
196    });
197
198    $('.form-search').slideUp();
199    $('.input-search').on('click', function () {
200        if ($('.form-search').is(':visible')) {
201            $('.form-search').slideUp();
202        } else {
203            $('.form-search').slideDown();
204        }
205    });
206// ************************************************
207
208    $('.input_name').on('keyup', function () {
209        var inp = $(this).val();
210        if (inp == "") {
211            $(this).removeClass('inpwrited');
212        } else {
213            $(this).addClass('inpwrited');
214        }
215    });
216// ************************************************
217
218    $('#main_select').select2({
219        minimumResultsForSearch: -1
220    });
221
222
223    $('.select2-selection__arrow').addClass('flaticon-up-chevron');
224
225    $('.btn-mobile-menu').on('click', function () {
226        $('.container_block-menu').toggleClass('open-menu');
227        $(this).toggleClass('menu-icon-active');
228        $('.mobile_sub_menu-lists').removeClass('open_sub_menu');
229        $('.menu-left-item> a').removeClass('rotate-arrow');
230    });
231    $('.block-left-menu-overlay').on('click', function () {
232        $('.container_block-menu').removeClass('open-menu');
233        $('.btn-mobile-menu').removeClass('menu-icon-active');
234        $('.mobile_sub_menu-lists').removeClass('open_sub_menu');
235
236    });
237
238
239    $('.menu-left-item> a').on('click', function (event) {
240        event.preventDefault();
241        $(this).toggleClass('rotate-arrow');
242        // $('.mobile_sub_menu-lists').toggleClass('open_sub_menu');
243        $(this).siblings('.mobile_sub_menu-lists').toggleClass('open_sub_menu');
244    });
245
246    $('.btn_hidden_search').on('click', function () {
247        $('.search_mobile-block').toggleClass('open_search');
248        $(this).toggleClass('flaticon-cancel');
249    });
250    if ($(window).width() <= 991) {
251        responsive();
252    }
253
254    $(window).resize(function () {
255        if ($(window).width() <= 1200) {
256            $('.link_balloon').on('click', function (e) {
257                e.preventDefault();
258                $(this).find('.popover_inform_balloon').toggleClass('visible');
259            });
260        }
261    });
262
263    if ($(window).width() <= 1200) {
264        $('.link_balloon').on('click', function (e) {
265            e.preventDefault();
266            $(this).find('.popover_inform_balloon').toggleClass('visible');
267        });
268    }
269
270    $(window).resize(function () {
271        if ($(window).width() <= 991) {
272            responsive();
273        } else {
274            responsive_cancel();
275        }
276    })
277
278    function responsive_cancel() {
279        if ($('.slick_news_block').length) {
280            $('.slick_news_block').slick('unslick');
281        }
282        if ($('.wrapper_media_cards').length) {
283            $('.wrapper_media_cards').slick('unslick');
284        }
285        if ($('#slick_news_press').length) {
286            $('#slick_news_press').slick('unslick');
287        }
288        if ($('#slider_structure').length) {
289            $('#slider_structure').slick('unslick');
290        }
291    }
292
293    function responsive() {
294        if ($('.slick_news_block').length) {
295            $('.slick_news_block').slick({
296                arrows: true,
297                prevArrow: "<button type='button' class='slider-arrow slider-arrow__prev'></button>",
298                nextArrow: "<button type='button' class='slider-arrow slider-arrow__next'></button>",
299                responsive: [
300                    {
301                        breakpoint: 992,
302                        settings: {
303                            slidesToShow: 3,
304                        }
305                    },
306                    {
307                        breakpoint: 768,
308                        settings: {
309                            slidesToShow: 2,
310                        }
311                    },
312                    {
313                        breakpoint: 480,
314                        settings: {
315                            slidesToShow: 1,
316                        }
317                    }
318                    // You can unslick at a given breakpoint now by adding:
319                    // settings: "unslick"
320                    // instead of a settings object
321                ],
322                variableWidth: false,
323                slidesToShow: 1,
324                slidesToScroll: 1,
325                infinite: true,
326                autoplay: false,
327                adaptiveHeight: true,
328            });
329        }
330
331        if ($('.nav-link').length) {
332            $('.nav-link').on('show.bs.tab', function (e) {
333                $('.slick_news_block').slick('slickGoTo', 0);
334            });
335        }
336
337        if ($('#slick_news_block').length) {
338            $('#slick_news_block').slick({
339                arrows: false,
340                variableWidth: true,
341                infinite: true,
342                autoplay: false,
343            });
344        }
345
346        if ($('.wrapper_media_cards').length) {
347            $('.wrapper_media_cards').slick({
348                prevArrow: "<button type='button' class='slider-arrow slider-arrow__prev'></button>",
349                nextArrow: "<button type='button' class='slider-arrow slider-arrow__next'></button>",
350                variableWidth: false,
351                responsive: [
352                    {
353                        breakpoint: 992,
354                        settings: {
355                            slidesToShow: 3,
356                            slidesToScroll: 3,
357
358                        }
359                    },
360                    {
361                        breakpoint: 769,
362                        settings: {
363                            slidesToShow: 2,
364                        }
365                    },
366                    {
367                        breakpoint: 480,
368                        settings: {
369                            slidesToShow: 1,
370                        }
371                    }
372                    // You can unslick at a given breakpoint now by adding:
373                    // settings: "unslick"
374                    // instead of a settings object
375                ],
376                infinite: true,
377                autoplay: false,
378            });
379        }
380
381        /*   $('#slick_news_press').slick({
382               arrows: false,
383               variableWidth: true,
384               infinite: true,
385               autoplay: false,
386               speed: 700,
387           });*/
388
389        if ($('#slick_news_press_two').length) {
390            $("#slick_news_press_two").slick({
391                arrows: false,
392                variableWidth: true,
393                infinite: true,
394                autoplay: false,
395                speed: 700,
396            });
397        }
398
399        if ($('#slick_news_press_three').length) {
400            $('#slick_news_press_three').slick({
401                arrows: false,
402                variableWidth: true,
403                infinite: true,
404                autoplay: false,
405                speed: 700,
406            });
407        }
408
409        if ($('#slider_structure').length) {
410            $('#slider_structure').slick({
411                arrows: true,
412                prevArrow: "<button type='button' class='slider-arrow slider-arrow__prev'></button>",
413                nextArrow: "<button type='button' class='slider-arrow slider-arrow__next'></button>",
414                variableWidth: false,
415                responsive: [
416                    {
417                        breakpoint: 992,
418                        settings: {
419                            slidesToShow: 3,
420                            slidesToScroll: 3,
421
422                        }
423                    },
424                    {
425                        breakpoint: 769,
426                        settings: {
427                            slidesToShow: 2,
428                        }
429                    },
430                    {
431                        breakpoint: 480,
432                        settings: {
433                            slidesToShow: 1,
434                        }
435                    }
436                    // You can unslick at a given breakpoint now by adding:
437                    // settings: "unslick"
438                    // instead of a settings object
439                ],
440                infinite: true,
441                autoplay: false,
442                speed: 700,
443            });
444        }
445
446        $('.preview_text_block').equalHeights();
447        $('.wrapper_cards_news .card').equalHeights();
448        $('.media-card .equal').equalHeights();
449        $('.section-info__item .equal').equalHeights();
450
451    }
452
453    if ($('.inputwrapp input').length > 0) {
454        if ($('.inputwrapp input').val().trim() !== "") {
455            $(this).addClass(el.replace('.', '') + '--filled');
456        }
457
458        $('.inputwrapp input').on("blur", function () {
459            if ($(this).val().trim() !== "") {
460                $(this).addClass('field__input--filled');
461            }
462        });
463    }
464});
465
466(function ($) {
467
468    $.fn.equalHeights = function () {
469        var maxHeight = 0,
470            $this = $(this);
471        $this.each(function () {
472            var height = $(this).innerHeight();
473
474            if (height > maxHeight) {
475                maxHeight = height;
476            }
477        });
478        /*  for (var i = 0; i < $this.length; ++i) {
479              var el = $this[i];
480              var height = el.innerHeight();
481
482              if (height > maxHeight) {
483                  maxHeight = height;
484              }
485          }*/
486        return $this.css('height', maxHeight);
487    };
488    // auto-initialize plugin
489
490})(jQuery);
491
492// ОТКЛЮЧЕНО НА ВРЕМЯ ТЕСТИРОВАНИЯ (ДОСТУПНО В ШАБЛОНЕ ДЛЯ РАЗРАБОТКИ)
493// function showMobileImages () {
494// 	const desktopImgWrappers = document.querySelectorAll('.card-wrapper-img--desktop');
495// 	if (desktopImgWrappers.length > 0) {
496// 		desktopImgWrappers.forEach((wrapper) => {
497// 			const parentEl = wrapper.closest('.card_news');
498// 			const mobileImgWrapper = parentEl.querySelector('.card-wrapper-img--mobile');
499// 			console.log(mobileImgWrapper)
500// 			if (mobileImgWrapper) {
501// 				wrapper.style.display = 'none';
502// 				mobileImgWrapper.style.display = 'block';
503// 			}
504// 		});
505// 	}
506// }
507//
508// function hideMobileImages () {
509// 	const desktopImgWrappers = document.querySelectorAll('.card-wrapper-img--desktop');
510// 	if (desktopImgWrappers.length > 0) {
511// 		desktopImgWrappers.forEach((wrapper) => {
512// 			const parentEl = wrapper.closest('.card_news');
513// 			const mobileImgWrapper = parentEl.querySelector('.card-wrapper-img--mobile');
514// 			console.log(mobileImgWrapper)
515// 			if (mobileImgWrapper) {
516// 				wrapper.style.display = 'block';
517// 				mobileImgWrapper.style.display = 'none';
518// 			}
519// 		});
520// 	}
521// }
522//
523// document.addEventListener('DOMContentLoaded', () => {
524// 	if (window.screen.width <= 767) {
525// 		showMobileImages();
526// 	}
527//
528// 	window.addEventListener('resize', function () {
529// 		if (window.screen.width <= 767) {
530// 			showMobileImages();
531// 		} else {
532// 			hideMobileImages();
533// 		}
534// 	});
535// });
536
537/* версия для слабовидящих начало */
538$(function () {
539    var width = $(window).width();
540
541    $(document).ready(function () {
542
543        if ($.cookie('CecutientCookie') == 'on') {
544            CecutientOn();
545            if ($.cookie('fonts') == 'small') {
546                SmallFonts();
547            }
548            if ($.cookie('fonts') == 'medium') {
549                MediumFonts();
550            }
551            if ($.cookie('fonts') == 'big') {
552                BigFonts();
553            }
554            if ($.cookie('style') == 'white') {
555                WhiteStyle();
556            }
557            if ($.cookie('style') == 'black') {
558                BlackStyle();
559            }
560        }
561    });
562    /* Размер шрифта */
563    $(document).on('click', '.font-size-item1', function (e) {
564        SmallFonts();
565    });
566    $(document).on('click', '.font-size-item2', function (e) {
567        MediumFonts();
568    });
569    $(document).on('click', '.font-size-item3', function (e) {
570        BigFonts();
571    });
572    /* Цветовая схема */
573    $(document).on('click', '.color-shema-item1', function (e) {
574        WhiteStyle();
575    });
576    $(document).on('click', '.color-shema-item2', function (e) {
577        BlackStyle();
578    });
579
580    /* пишем куки */
581    function CecutientOn() {
582
583        $('html').addClass('cecutient-on');
584        $.cookie('CecutientCookie', 'on', {
585            expires: 365,
586            path: '/'
587        });
588        return false;
589    }
590
591    /* Функции изменения размера шрифта */
592    function SmallFonts() {
593        $('.font-size-item').removeClass('font-size-item-select');
594        $('.font-size-item1').addClass('font-size-item-select');
595        if ($.cookie('CecutientCookie') == 'on') {
596            $('html').removeClass('medium-fonts big-fonts').addClass('small-fonts');
597            $.cookie('fonts', 'small', {
598                expires: 365,
599                path: '/'
600            });
601            return false;
602        }
603    }
604
605    function MediumFonts() {
606        console.log('medium');
607        $('.font-size-item').removeClass('font-size-item-select');
608        $('.font-size-item2').addClass('font-size-item-select');
609        if ($.cookie('CecutientCookie') == 'on') {
610            $('html').removeClass('small-fonts big-fonts').addClass('medium-fonts');
611            $.cookie('fonts', 'medium', {
612                expires: 365,
613                path: '/'
614            });
615            return false;
616        }
617    }
618
619    function BigFonts() {
620        console.log('big');
621
622        $('.font-size-item').removeClass('font-size-item-select');
623        $('.font-size-item3').addClass('font-size-item-select');
624        if ($.cookie('CecutientCookie') == 'on') {
625            $('html').removeClass('small-fonts medium-fonts').addClass('big-fonts');
626            $.cookie('fonts', 'big', {
627                expires: 365,
628                path: '/'
629            });
630            return false;
631        }
632    }
633
634    /* Функции изменения цветовой схемы */
635    function WhiteStyle() {
636        if ($.cookie('CecutientCookie') == 'on') {
637            $('html').removeClass('black-style').addClass('white-style');
638            $.cookie('style', 'white', {
639                expires: 365,
640                path: '/'
641            });
642            return false;
643        }
644    }
645
646    function BlackStyle() {
647
648        if ($.cookie('CecutientCookie') == 'on') {
649            $('html').removeClass('white-style').addClass('black-style');
650            $.cookie('style', 'black', {
651                expires: 365,
652                path: '/'
653            });
654            return false;
655        }
656    }
657
658    /* включаем режим для слабовидящих */
659    $(document).on('click', '.glasses-icon', function (e) {
660        if (width > 992) {
661            $('.cecutient').show();
662            CecutientOn();
663        }
664    });
665
666    /* выключаем режим для слабовидящих */
667    $(document).on('click', '.full-version', function (e) {
668        CecutientOff();
669    });
670
671});
672
673/* выключаем режим для слабовидящих */
674// function CecutientOff(reload) {
675// 	reload = reload || 'Y';
676// 	$('html').removeClass('cecutient-on');
677// 	$.cookie('CecutientCookie', null);
678// 	$.cookie('style', null);
679// 	$.cookie('fonts', null);
680//
681// 	$.cookie('CecutientCookie', null, {
682// 		expires: 365,
683// 		path: '/'
684// 	});
685//
686//
687// 	if(reload === 'Y') {
688// 		window.location.reload();
689// 	}
690// 	return false;
691// }
692function CecutientOff(reload) {
693    reload = reload || 'Y';
694    $('html').removeClass('cecutient-on');
695
696    // Используем $.removeCookie для надежного удаления cookie
697    // Важно указать path: '/', чтобы удалить cookie, установленную для всего сайта.
698    $.removeCookie('CecutientCookie', {path: '/'});
699    // Для текущего пути (если была установлена без указания path, т.е. для текущей страницы)
700    $.removeCookie('CecutientCookie');
701
702    $.removeCookie('style', {path: '/'});
703    $.removeCookie('fonts', {path: '/'});
704
705    if (reload === 'Y') {
706        window.location.reload();
707    }
708    return false;
709}
710
711/* версия для слабовидящих конец */

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.