PageSourceSearch

https://2event.com/dist/scripts/main.js?v1758899151

js 2event.com collected 2026-09-24 09:46:07 UTC 59,797 bytes, 1,442 lines download raw bytes

1'use strict';
2
3var app = {
4
5    init: function init() {
6        app.windowResize();
7        app.menu();
8        app.datepicker();
9        app.slider();
10        app.SearchEvents();
11        app.allScript();
12        app.modals();
13        app.tabs();
14        app.simpletabs();
15        app.adminGallery();
16        app.validate();
17        app.selectLists();
18        // app.accordeon();
19        app.selectric();
20        app.mCustomScrollbar();
21        app.subscribeAjax();
22        app.checkedCategory();
23        app.fixMenuPoland();
24        app.checkboxAgreement();
25    },
26
27    windowResize: function windowResize() {
28        $(window).on('resize', function () {});
29    },
30
31    windowLoad: function windowLoad() {
32        $(window).on('load', function () {
33            app.Scrollbarsearchevents();
34
35            if ($(window).width() > 1199) {
36                if ($('.aside').length) {
37                    var height = 0;
38
39                    $('.aside').each(function () {
40                        var h = $(this).height();
41                        height = height + h;
42                    });
43                    $('.main').css('min-height', height);
44                }
45            }
46        });
47    },
48
49    menu: function menu() {
50
51        // MOBILE_MENU
52        $('.toggle-menu').click(function () {
53            $(this).toggleClass('on');
54            $('.header-menu').slideToggle();
55            return false;
56        });
57    },
58
59    datepicker: function datepicker() {
60
61        if ($('#datepicker').length) {
62            var lang = document.documentElement.lang;
63            if (!['en', 'uk', 'ru', 'pl', 'fr', 'pt'].includes(lang)) {
64                lang = 'en';
65            }
66            var translations = {
67                en: {
68                    this_weekend: 'This weekend',
69                    this_week: 'This week',
70                    this_month: 'This month',
71                    next_weekend: 'Next month'
72                },
73                uk: {
74                    this_weekend: 'Ці вихідні',
75                    this_week: 'Цей тиждень',
76                    this_month: 'Цей місяць',
77                    next_weekend: 'Наступний місяць'
78                },
79                ru: {
80                    this_weekend: 'Эти выходные',
81                    this_week: 'Эта неделя',
82                    this_month: 'Этот месяц',
83                    next_weekend: 'Следующий месяц'
84                },
85                pl: {
86                    this_weekend: 'W ten weekend',
87                    this_week: 'W tym tygodniu',
88                    this_month: 'Ten miesiąc',
89                    next_weekend: 'W następnym miesiącu'
90                },
91                fr: {
92                    this_weekend: 'Cette fin de semaine',
93                    this_week: 'Cette semaine',
94                    this_month: 'Ce mois-ci',
95                    next_weekend: 'Le mois prochain'
96                },
97                pt: {
98                    this_weekend: 'Neste fim de semana',
99                    this_week: 'Nesta semana',
100                    this_month: 'Neste mês',
101                    next_weekend: 'No próximo mês'
102                }
103            };
104            $('#datepicker').dateRangePicker({
105                startOfWeek: 'monday',
106                separator: ' ~ ',
107                format: 'DD.MM.YYYY HH:mm',
108                //autoClose: true,
109                showShortcuts: true,
110                shortcuts: null,
111                getValue: function getValue() {
112                    return $(this).val();
113                },
114
115                customShortcuts: [{
116                    name: translations[lang].this_weekend,
117                    dates: function dates() {
118                        var start = moment().day(6).toDate();
119                        var end = moment().day(7).toDate();
120                        return [start, end];
121                    }
122                }, {
123                    name: translations[lang].this_week,
124                    dates: function dates() {
125                        var start = moment().day(1).toDate();
126                        var end = moment().day(7).toDate();
127                        return [start, end];
128                    }
129                }, {
130                    name: translations[lang].this_month,
131                    dates: function dates() {
132                        var day1 = moment().startOf('month').toDate();
133                        var day2 = moment().endOf('month').toDate();
134                        return [day1, day2];
135                    }
136                }, {
137                    name: translations[lang].next_weekend,
138                    dates: function dates() {
139                        var day1 = moment().add(1, 'months').startOf('month').toDate();
140                        var day2 = moment().add(1, 'months').endOf('month').toDate();
141                        return [day1, day2];
142                    }
143                }]
144            }).bind('datepicker-change', function (event, obj) {
145                if ($('#datepicker').val()) {
146                    $('#clearSearchTime').css('display', 'inline-block');
147                }
148                var dateAsObject = $(this).val();
149                $('#alternate').text(dateAsObject);
150                var counter = $('#counter-all').val();
151                console.log(counter);
152                $('.wrap-all-selected').append('\n                    <div class=\'category-checked\' data-id=\'' + counter++ + '\'>\n                    ' + dateAsObject + '\n                    <sp
152an class="remove-category">x</span>\n                    </div>');
153            });
154        }
155        $('#clearSearchTime').on('click', function () {
156            $('#alternate').text('');
157            $('#datepicker').val('');
158            $(this).css('display', 'none');
159        });
160    },
161
162    slider: function slider() {
163        if ($('.mega-slider').get(0)) {
164            $('.mega-slider').slick({
165                autoplay: true,
166                autoplaySpeed: 5000,
167                dots: true,
168                infinite: true,
169                slidesToShow: 1,
170                appendDots: $('.mega-slider__dots'),
171                prevArrow: $('.mega-slider__arr-l'),
172                nextArrow: $('.mega-slider__arr-r')
173            });
174        }
175
176        if ($('#eventSlider').get()) {
177            var event_id = $('#eventSlider').data('event');
178            if (event_id) {
179                $.ajax({
180                    url: '/api/events/get-event-gallery?event_id=' + event_id,
181                    method: 'GET',
182                    success: function success(data) {
183                        if (data.length) {
184                            $('#eventSlider').show();
185                        }
186                        for (var i in data) {
187                            if (data[i].type == 'img') {
188                                $('.ev-slider').append('<div class="ev-slider__item"><div class="ev-slider__img" style="background-image: url(\'' + data[i].url + '\');"></div></div>');
189                            } else if (data[i].type == 'video') {
190                                $('.ev-slider').append('<div class="ev-slider__item"><iframe width="100%" height="100%" src="' + data[i].url + '" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>');
191                            } else {
192                                console.log('problem with type');
193                            }
194                        }
195                        setTimeout(startEventSlider, 10);
196                    }
197                });
198            }
199        }
200
201        function startEventSlider() {
202            if ($('.ev-slider').length) {
203                $('.ev-slider').slick({
204                    autoplay: true,
205                    autoplaySpeed: 5000,
206                    dots: true,
207                    infinite: true,
208                    slidesToShow: 1,
209                    appendDots: $('.slider__dots'),
210                    prevArrow: $('.main__arr-l'),
211                    nextArrow: $('.main__arr-r')
212                });
213            }
214        }
215
216        if ($('.jsMainSlider').length) {
217            $('.jsMainSlider').slick({
218                autoplay: true,
219                autoplaySpeed: 5000,
220                dots: true,
221                infinite: true,
222                centerMode: true,
223                centerPadding: '27%',
224                slidesToShow: 1,
225                appendDots: $('.slider__dots'),
226                prevArrow: $('.main__arr-l'),
227                nextArrow: $('.main__arr-r'),
228                responsive: [{
229                    breakpoint: 1500,
230                    settings: {
231                        centerPadding: '20%'
232                    }
233                }, {
234                    breakpoint: 992,
235                    settings: {
236                        centerPadding: '12%'
237                    }
238                }, {
239                    breakpoint: 768,
240                    settings: {
241                        centerMode: false
242                    }
243                }]
244            });
245        }
246
247        if ($('.b_events_block.main').length) {
248            // if($(window).width() < 767){
249            //     $('.b_events_block.main .events_block').slick({
250            //         dots: true,
251            //         arrows: false
252            //     });
253            // }
254        }
255    },
256
257    selectric: function selectric() {
258        $('.jsSelectricView').selectric({
259            maxHeight: 100
260        });
261    },
262
263    mCustomScrollbar: function mCustomScrollbar() {
264        $('.b_search_events .filter_wrapper').mCustomScrollbar({
265            axis: 'x',
266            scrollInertia: 200
267        });
268
269        $('.b_add_events .add_events').mCustomScrollbar({
270            axis: 'x',
271            scrollInertia: 200
272        });
273    },
274
275    Scrollbarsearchevents: function Scrollbarsearchevents() {
276        $('.b_search_events .select_list').mCustomScrollbar({
277            scrollInertia: 200
278        });
279        $('#geo_fields .select_list_city').mCustomScrollbar({
280            scrollInertia: 200
281        });
282        $('.b_control_page .select_list_city').mCustomScrollbar({
283            scrollInertia: 200
284        });
285        $('.simple_select_list').mCustomScrollbar({
286            scrollInertia: 200
287        });
288    },
289
290    SearchEvents: function SearchEvents() {
291
292        $(document).on('click', '.jsSelectCity', function (e) {
293            var $geo = $('.geo_fields'),
294                $subscribe_btn_city = $geo.find('.jsSelectCity'),
295                $select_list_city = $geo.find('.select_list_city');
296
297            e.preventDefault();
298            var $this = $(this),
299                $this_list = $this.closest('.select_city_wrapper').find('.select_list_city');
300            if ($this.hasClass('active')) {
301                $this.removeClass('active');
302                $this_list.slideUp();
303            } else {
304                $subscribe_btn_city.removeClass('active');
305                $select_list_city.slideUp();
306                $this.addClass('active');
307                $this_list.slideDown();
308            }
309        });
310
311        $(document).click(function (e) {
312            var $geo = $('.geo_fields'),
313                $subscribe_btn_city = $geo.find('.jsSelectCity'),
314                $SelectListCity = $geo.find('.select_list_city');
315            if (!$subscribe_btn_city.is(e.target) && $subscribe_btn_city.has(e.target).length === 0 && !$SelectListCity.is(e.target) && $SelectListCity.has(e.target).length === 0) {
316                $SelectListCity.fadeOut(200);
317                $subscribe_btn_city.removeClass('active');
318            }
319        });
320
321        $(document).on('click', '.select_list_city li', function (e) {
322            var $itemselect = $(this).text();
323            $(this).parents('.select_city_wrapper').find('input.form_select').val($itemselect);
324            $(this).parents('.select_city_wrapper').find('.label_select span').text($itemselect);
325            $(this).parents('.select_list_city').fadeOut(200);
326            $('.jsSelectCity').removeClass('active');
327        });
328
329        function SubscribeBtnCity() {}
330        // SubscribeBtnCity();
331
332        $('.jsAddGeo').click(function (e) {
333            e.preventDefault();
334            var $list = $('#list_from_db .item').clone();
335            $(this).prev('.all_geo_fields').append($list);
336
337            $('#geo_fields .select_list_city').mCustomScrollbar({
338                scrollInertia: 200
339            });
340        });
341
342        $(document).on('click', '.jsRemoveCity', function (e) {
343            $(this).parents('.select_city_wrapper').parent('.item').remove();
344        });
345
346        var $subscribe = $('.b_search_events'),
347            $subscribe_btn = $subscribe.find('.jsLabelSelect'),
348            $select_list = $subscribe.find('.select_list');
349
350        $subscribe_btn.on('click', function (e) {
351            e.preventDefault();
352
353            var $this = $(this),
354                $this_list = $this.closest('.tabel_item_inner').find('.select_list');
355
356            if ($this.hasClass('active')) {
357                $this.removeClass('active');
358                $this_list.slideUp();
359            } else {
360                $subscribe_btn.removeClass('active');
361                $select_list.slideUp();
362                $this.addClass('active');
363                $this_list.slideDown();
364            }
365        });
366
367        var $LabelSelect = $('.jsLabelSelect'),
368            $SelectList = $('.select_list');
369
370        $(document).click(function (e) {
371            if (!$LabelSelect.is(e.target) && $LabelSelect.has(e.target).length === 0 && !$SelectList.is(e.target) && $SelectList.has(e.target).length === 0) {
372                $('.select_list').fadeOut(200);
373                $LabelSelect.removeClass('active');
374            }
375        });
376
377        $(document).on('click', function () {
378            $('.select_list li').click(function (e) {
379                var $itemselect = $(this).text();
380                $(this).parents('.select_wrapper').find('input.form_select').val($itemselect);
381                $(this).parents('.select_wrapper').find('.label_select span').text($itemselect);
382                $(this).parents('.select_list').fadeOut(200);
383                $LabelSelect.removeClass('active');
384            });
385        });
386
387        // $('.b_search_events .input_search').focus(function(){
388        //   $( this ).attr('placeholder', '');
389        // }).focusout(function(){
390        //   $( this ).attr('placeholder', 'Search events');
391        // });
392
393        $('.jsNumberTicketsMinus').click(function () {
394            var $input = $(this).parent().find('input');
395            var count = parseInt($input.val()) - 1;
396            count = count < 0 ? 0 : count;
397            $input.val(count);
398            $input.change();
399            return false;
400        });
401        $('.jsNumberTicketsPlus').click(function () {
402            var $input = $(this).parent().find('input');
403            $input.val(parseInt($input.val()) + 1);
404            $input.change();
405            return false;
406        });
407        $('.number_tickets').on('keypress keyup blur', function (event) {
408            $(this).val($(this).val().replace(/[^\d].+/, ''));
409            if (event.which < 48 || event.which > 57) {
410                event.preventDefault();
411            }
412        });
413
414        $('.jsOpenFilter').on('click', function () {
415            $(this).parents('.b_search_events').toggleClass('active');
416            $(this).parents('.search_events').find('.filter_item').slideToggle(300);
417        });
418    },
419    selectLists: function selectLists() {
420
421        $(document).off('click.jsOpenSubList').on('click.jsOpenSubList', '.jsOpenSubList', function (e) {
422            e.stopPropagation();
423            $(this).parents('.profile-btn-wrapper').find('.profile_list').slideToggle(300);
424        });
425
426        $(document).off('mouseover.visCard').on('mouseover.visCard', '.visitor-card-wrap', function () {
427            $(this).addClass('active');
428        });
429
430        $(document).off('mouseleave.visCard').on('mouseleave.visCard', '.visitor-card-wrap', function () {
431            $('.profile-btn-wrapper').find('.profile_list').slideUp(100);
432            $(this).removeClass('active');
433        });
434
435        $(document).off('click.jsOpenList').on('click.jsOpenList', '.jsOpenList', function (e) {
436            var $wrapper = $('.all_select_wrap'),
437                $btn_open_list = $wrapper.find('.jsOpenList'),
438                $simple_select_list = $wrapper.find('.simple_select_list');
439
440            e.preventDefault();
441            var $this = $(this),
442                $this_list = $this.closest('.all_select_wrap').find('.simple_select_list');
443            if ($this.hasClass('active')) {
444                $this.removeClass('active');
445                $this_list.slideUp();
446            } else {
447                $btn_open_list.removeClass('active');
448                $simple_select_list.slideUp();
449                $this.addClass('active');
450                $this_list.slideDown();
451            }
452        });
453
454        $(document).off('click.allSelectWrap').on('click.allSelectWrap', function (e) {
455            var $wrapper = $('.all_select_wrap'),
456                $btn_open_list = $wrapper.find('.jsOpenList'),
457                $simple_select_list = $wrapper.find('.simple_select_list');
458            if (!$btn_open_list.is(e.target) && $btn_open_list.has(e.target).length === 0 && !$simple_select_list.is(e.target) && $simple_select_list.has(e.target).length === 0) {
459                $simple_select_list.fadeOut(200);
460                $btn_open_list.removeClass('active');
461            }
462        });
463
464        $(document).off('click.simpleSelectList').on('click.simpleSelectList', '.simple_select_list li', function (e) {
465            var $itemselect = $(this).text();
466            $(this).parents('.simple_select_wrapper').find('input.form_select').val($itemselect);
467            $(this).parents('.simple_select_wrapper').find('.simple_label_select span').text($itemselect);
468            $(this).parents('.simple_select_list').fadeOut(200);
469            $('.jsOpenList').removeClass('active');
470        });
471
472        $('#appointment .label_wrapper [type="radio"]').off('change.appInputRadio').on('change.appInputRadio', function () {
473            if ($(this).prop('checked', true)) {
474                $('#set_time').parents('.appointment_row').find('.appointment_time_wrapper').slideToggle(300);
475            } else {
476                $('#set_time').parents('.appointment_row').find('.appointment_time_wrapper').slideToggle(300);
477            }
478        });
479    },
480    allScript: function allScript() {
481
482        var $upButton = $('.menu-button');
483        var $windowHeight = $(window).height() / 4;
484        $(window).on('scroll', function () {
485
486            if ($(window).scrollTop() >= $windowHeight) {
487                //$upButton.addClass('show');
488            } else {
489                $upButton.removeClass('show');
490            };
491        });
492
493        var $firstBlock = $(window).height();
494        if ($('.afisha__img').length && $(window).width() < 500) {
495            $('header.header_event').css('min-height', $firstBlock);
496        }
497
498        $(window).on('resize', function () {
499            var $firstBlock = $(window).height();
500            if ($('.afisha__img').length && $(window).width() < 500) {
501                $('header.header_event').css('min-height', $firstBlock);
502            }
503        });
504        $(window).on('scroll touchmove', function () {
505            var $firstBlock = $(window).height();
506            if ($('.afisha__img').length && $(window).width() < 500) {
507                $('header.header_event').css('min-height', $firstBlock);
508            }
509        });
510
511        $('.jsSelectShipping').click(function (e) {
512            e.preventDefault();
513            $(this).toggleClass('open');
514            $(this).parents('.trip_plan_content').find('.trip_plan_content_inner').slideToggle(300);
515        });
516
517        $('.jsMoreSubscribe').click(function (e) {
518            e.preventDefault();
519            $(this).toggleClass('open');
520            $('.delivery_subscribe_form').slideToggle(300);
521        });
522
523        $('.checkbox').click(function () {
524            $(this).toggleClass('checked');
525        });
526
527        $('.menu-button').click(function () {
528            $('.shadow_gradient').fadeToggle(300);
529            $(this).toggleClass('clicked');
530            return false;
531        });
532        $(document).on('click.menu-button touchstart.menu-button', '.menu-button', function (e) {
533            var menubutton = $('.menu-button');
534            if (!menubutton.is(e.target) && menubutton.has(e.target).length === 0) {
535                $('.shadow_gradient').fadeOut(300);
536                $('.menu-button').removeClass('clicked');
537            }
538        }, { passive: false });
539
540        if ($('.menu-links').length) {
541            var startOffset = null;
542
543            $(window).on('scroll.menu-links', function () {
544                if ($(window).width() <= 1366) {
545                    if ($(window).scrollTop() >= $('.menu-links').offset().top + $('.menu-links').get(0).offsetHeight) {
546                        $('.menu-links-mob').show();
547                    } else $('.menu-links-mob').hide();
548                } else {
549                    $('.menu-links-mob').hide();
550                }
551
552                if ($('.menu-links').length && $(window).width() > 1366) {
553
554                    if ($('.menu-links:not(.on_event)').length) {
555                        if ($('.menu-links:not(.menu-links--fixed) .menu-links__i-wrap').length) {
556                            startOffset = $('.menu-links:not(.menu-links--fixed)').offset().top - parseFloat($('.menu-links').css('margin-top'));
557                        }
558                        if (!$('.menu-links').hasClass('menu-links--fixed') && $(window).scrollTop() > startOffset) {
559                            $('.menu-links').addClass('menu-links--fixed');
560                        } else if ($('.menu-links').hasClass('menu-links--fixed') && $(window).scrollTop() <= startOffset) {
561                            $('.menu-links').removeClass('menu-links--fixed');
562                        }
563                    } else {
564                        if ($('.menu-links:not(.menu-links--fixed) .menu-links__i-wrap').length) {
565                            var style = $('.menu-links__i').get(0).currentStyle || window.getComputedStyle($('.menu-links__i').get(0));
566                            startOffset = $('.menu-links:not(.menu-links--fixed) .menu-links__i-wrap').offset().top;
567                        }
568                        if (!$('.menu-links').hasClass('menu-links--fixed') && $(window).scrollTop() > startOffset) {
569                            $('.menu-links').addClass('menu-links--fixed');
570                        } else if ($('.menu-links').hasClass('menu-links--fixed') && $(window).scrollTop() <= startOffset) {
571                            $('.menu-links').removeClass('menu-links--fixed');
572                        }
573                    }
574                } else {
575                    $('.menu-links').removeClass('menu-links--fixed');
576                }
577            });
578        }
579
580        $('.mod--red').click(function () {
581            $(this).toggleClass('mod--red--clicked');
582            return false;
583        });
584
585        $('.plan-v__i-hidden.tooltiping a').click(function () {
586            $('.tooltiped').tooltipster('close');
587            return false;
588        });
589
590        $('.visitor-card').each(function () {
591            if ($(this).get(0).offsetHeight <= 200) $(this).parent().addClass('nohover');
592        });
593
594        if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
595            $('.tooltiped').tooltipster({
596                interactive: true,
597                side: ['bottom', 'top'],
598                trigger: 'click'
599            });
600
601            $('.visitor-card-wrap').addClass('nohover');
602        } else {
603            $('.tooltiped').tooltipster({
604                interactive: true,
605                side: ['bottom', 'top']
606            });
607        }
608
609        $(document).on('click', '.filter__trigger', function () {
610            $('.filter__block-curling').slideToggle(300);
611            $(this).toggleClass('filter__trigger--opened');
612            $('.filter-wrap').toggleClass('filter-wrap--curled');
613
614            if ($(this).hasClass('filter__trigger--opened')) {
615                $(this).find('span').text('view less');
616            } else {
617                $(this).find('span').text('view more');
618            }
619        });
620
621        $('.filter-mob-trigger').click(function () {
622            $('.filter').slideToggle(300);
623        });
624
625        var first_input = $('.filter').find('.filter__el-wrap:first-of-type input[type="checkbox"]');
626
627        $(document).on('click', '.jsFilterClear', function (e) {
628            e.preventDefault();
629            $('.filter').find('input[type="checkbox"]').prop('checked', false);
630            first_input.prop('checked', true);
631        });
632
633        $('.filter__el-wrap input[type="checkbox"]').click(function () {
634            if ($(this).parents('.filter__el-wrap').index() != 0) {
635                $(this).parents('.filter__row').find('.filter__el-wrap:first-of-type input[type="checkbox"]').prop('checked', false);
636            } else {
637                $(this).parents('.filter__row').find('.filter__el-wrap input[type="checkbox"]').prop('checked', false);
638                $(this).parents('.filter__row').find('.filter__el-wrap:first-of-type input[type="checkbox"]').prop('checked', true);
639            }
640        });
641
642        $('.visitor-card__trigger').click(function () {
643            if ($(this).hasClass('on')) {
644                $(this).find('span').text('full info');
645                var that = $(this);
646                $('html, body').animate({
647                    scrollTop: $(that).closest('.visitor-card').offset().top
648                }, 500);
649            } else $(this).find('span').text('less info');
650            $(this).toggleClass('on');
651            $(this).closest('.visitor-card').find('.visitor-card__desc').slideToggle();
652            $(this).closest('.visitor-card').find('.visitor-card__plan').slideToggle();
653
654            if ($(this).closest('.visitor-card').find('.plan-v.slicked').get(0) && !$(this).closest('.visitor-card').find('.plan-v.slicked').hasClass('slick-initialized')) {
655                $(this).closest('.visitor-card').find('.plan-v.slicked').slick({
656                    dots: false,
657                    infinite: false,
658                    slidesToShow: 3,
659                    arrows: false,
660                    vertical: true,
661                    verticalSwiping: true
662                });
663            }
664        });
665
666        $('[data-href]').each(function () {
667            $(this).click(function () {
668                $('html, body').animate({
669                    scrollTop: $($(this).attr('data-href')).offset().top
670                }, 500);
671                return false;
672            });
673        });
674
675        $('.to-favorite').click(function () {
676            $(this).toggleClass('active');
677            return false;
678        });
679
680        if ($('.plan-v.slicked').get(0)) {
681            $('.plan-v.slicked').each(function () {
682                if ($(this).closest('.visitor-card').find('.visitor-card__plan').css('display') != 'none') {
683                    $(this).slick({
684                        dots: false,
685                        infinite: false,
686                        slidesToShow: 3,
687                        arrows: false,
688                        vertical: true,
689                        verticalSwiping: true
690                    });
691                }
692            });
693        }
694
695        if ($('.afisha-cont').length) {
696            if ($(window).width() > 1750) $('.header-top .logo').css('margin-right', ($('header').width() - $('.afisha-cont').get(0).offsetWidth) / 2 - 163);
697        }
698
699        // SCROLL ON PAGE
700        $('.scroll').click(function () {
701            $('html, body').animate({
702                scrollTop: 0
703            }, 300);
704        });
705
706        /////////// SELECT //////////
707        $('.ks-select__current, .flex-hack').each(function () {
708            $(this).click(function () {
709                if ($('.ks-select.opened').get(0) && $('.ks-select.opened').get(0) !== $(this).closest('.ks-select').get(0)) {
710                    $('.ks-select.opened').find('.ks-select__block').fadeToggle(300);
711                    $('.ks-select.opened').find('.ks-search').val('');
712                    $('.ks-select.opened').toggleClass('opened');
713                }
714                $(this).closest('.ks-select').find('.ks-select__item').show();
715                $(this).closest('.ks-select').toggleClass('opened');
716                $(this).next('.ks-select__block').fadeToggle(300);
717                $(this).closest('.ks-select').find('.ks-search').val('');
718
719                if ($(this).closest('.jsMiniProfile').get(0)) {
720                    $(this).closest('.jsMiniProfile').toggleClass('opened');
721                }
722                if ($(this).closest('.lang').get(0)) {
723                    $('.jsMiniProfile').removeClass('opened');
724                }
725                if ($(this).closest('.btn--orange--multi').get(0)) {
726                    $(this).closest('.btn--orange--multi').toggleClass('nohover');
727                }
728            });
729        });
730
731        $('.event_drop_down').on('click', function () {
732            $('.event_drop_down.ks-select__block').fadeToggle(300);
733            $('event_drop_down').toggleClass('opened');
734            if ($('html, body').find('.header_event').hasClass('header_event')) {
735                $('.header_event #event-dropdown .header-menu__link').toggleClass('event_link_active');
736            };
737        });
738        $('.jsMiniProfile .mini-profile__ava').on('click', function () {
739            $(this).parent().toggleClass('opened');
740            $(this).next('.ks-select').toggleClass('opened').find('.ks-select__block').fadeToggle(300);
741        });
742
743        $('.link_event').on('click', function (e) {
744            if ($('.link_event').attr('href') == '# ') {
745                e.preventDefault;
746                var eventId = document.location.pathname.split('/');
747                var eventId = eventId[eventId.length - 1];
748                var url = 'https://2event.com/events/' + eventId + '/visitors';
749                location.href = url;
750            }
751        });
752
753        $('.ks-select__item').each(function () {
754            $(this).click(function (e) {
755                if (e.target.tagName == 'A') return;
756                if ($(e.target).hasClass('checkbox')) return false;
757                $(this).closest('.ks-select').find('.ks-select__current span').html($(this).html());
758                $(this).closest('.ks-select__block').find('.ks-select__item.active').removeClass('active');
759                $(this).addClass('active');
760                $(this).closest('.ks-select__block').fadeToggle(300);
761                $(this).closest('.ks-select').removeClass('opened');
762            });
763        });
764
765        $('body').click(function (e) {
766            if ($('.ks-select.opened').get(0)) {
767                var parent = e.target;
768                if ($(parent).hasClass('opened')) return;
769                while (!$(parent).hasClass('opened')) {
770                    if ($(parent).hasClass('opened') || parent.tagName == 'BODY') break;
771                    parent = parent.parentNode;
772                }
773                if (!$(parent).hasClass('opened')) {
774                    $('.ks-select.opened').find('.ks-select__current').click();
775                    // $(".ks-select.opened").removeClass("opened");
776                }
777            }
778        });
779        /////// end select /////////
780
781
782        var filter_is_open = false;
783
784        function heightses() {
785
786            if (!filter_is_open) {
787                if ($(window).width() <= 992) $('.filter__trigger').click();
788                filter_is_open = true;
789            }
790
791            if ($(window).width() <= 1000) {
792                $('.col2-c, .col3-c').addClass('tab-c');
793                $('.col3-c').addClass('tab-c--active');
794                $('.col2 span').addClass('tab--active');
795            }
796
797            if ($(window).width() > 1199) {
798                if ($('.part2').get(0)) $('.part2').css('top', $('.part1').get(0).offsetHeight);
799                if ($('.part3').get(0)) $('.part3').css('top', $('.part1').get(0).offsetHeight + $('.part2').get(0).offsetHeight);
800                if ($('.part4').get(0)) $('.part4').css('top', $('.part1').get(0).offsetHeight + $('.part2').get(0).offsetHeight + $('.part3').get(0).offsetHeight);
801                if ($('.part5').get(0)) $('.part5').css('top', $('.part1').get(0).offsetHeight + $('.part2').get(0).offsetHeight + $('.part3').get(0).offsetHeight + $('.part4').get(0).offsetHeight);
802            }
803
804            function clearTabs() {
805                $('div').text('');
806            }
807
808            if ($('.block-v__i').get()) {
809                // Считает высоту шапки в блоке block-v__i
810                var block_v_i_height = 0;
811                $('.block-v__i-h').each(function () {
812                    if ($(this).get(0).offsetHeight > block_v_i_height) block_v_i_height = $(this).get(0).offsetHeight;
813                });
814                $('.block-v__i-h').css('height', block_v_i_height);
815            }
816
817            if ($(window).width() <= 640) {
818                $('.b-tabs__subtabs').each(function () {
819                    var that = $(this);
820                    if (!that.hasClass('slick-initialized')) {
821                        $(that).slick({
822                            infinite: true,
823                            slidesToShow: 1,
824                            prevArrow: $(that).closest('.b-tabs-wrap').find('.b-tabs__subtabs-l'),
825                            nextArrow: $(that).closest('.b-tabs-wrap').find('.b-tabs__subtabs-r')
826                        });
827
828                        $(this).on('afterChange', function (event, slick, currentSlide, nextSlide) {
829                            $(this).find('.slick-current .tab').click();
830                        });
831                    }
832                });
833
834                $('.partners__block .slicked').on('init', function () {
835                    $('.partners__block .slicked .slick-current .partners__block-i').addClass('noshadows');
836                });
837
838                if (!$('.partners__block .slicked').hasClass('slick-initialized')) {
839                    $('.partners__block .slicked').slick({
840                        slidesToShow: 1,
841                        centerMode: true,
842                        arrows: false,
843                        centerPadding: '20vw',
844                        dots: true,
845                        appendDots: $('.slicked__dots')
846                    });
847
848                    $('.partners__block .slicked').on('afterChange', function (event, slick, currentSlide, nextSlide) {
849                        $('.partners__block-i.noshadows').removeClass('noshadows');
850                        $('.partners__block .slicked .slick-current .partners__block-i').addClass('noshadows');
851                    });
852                }
853
854                $('.cols5').on('init', function () {
855                    $('.cols5 .slick-current .cols5__i').addClass('noshadows');
856                });
857                if (!$('.cols5').hasClass('slick-initialized')) {
858                    $('.cols5').slick({
859                        slidesToShow: 1,
860                        centerMode: true,
861                        arrows: false,
862                        centerPadding: '20vw',
863                        dots: true,
864                        appendDots: $('.cols5__dots')
865                    });
866                    $('.cols5').on('afterChange', function (event, slick, currentSlide, nextSlide) {
867                        $('.cols5__i.noshadows').removeClass('noshadows');
868                        $('.cols5 .slick-current .cols5__i').addClass('noshadows');
869                    });
870                }
871            }
872            if ($(window).width() <= 1000) {
873                $('.block-v__wrap').each(function () {
874                    var that = $(this);
875
876                    if (!that.hasClass('slick-initialized')) {
877                        $(that).slick({
878                            slidesToShow: 2,
879                            arrows: false,
880                            dots: true,
881                            appendDots: $(that).next('.block-v__wrap__dots'),
882                            responsive: [{
883                                breakpoint: 700,
884                                settings: {
885                                    slidesToShow: 1,
886                                    centerMode: true,
887                                    infinite: false,
888                                    centerPadding: '10vw'
889                                }
890                            }, {
891                                breakpoint: 360,
892                                settings: {
893                                    slidesToShow: 1,
894                                    centerMode: false,
895                                    infinite: false
896                                }
897                            }]
898                        });
899                    }
900                });
901            }
902            app.modals();
903        }
904
905        $('.jsSpeakersSlider').on('init', function (event, slick) {
906            $('.content_wrap').each(function () {
907                var $blocks = $('.content_wrap'),
908                    maxH = $blocks.eq(0).height();
909                $blocks.each(function () {
910                    maxH = $(this).height() > maxH ? $(this).height() : maxH;
911                });
912                $blocks.height(maxH);
913            });
914        });
915
916        $('.jsSpeakersSlider').each(function () {
917            var that = $(this);
918            $(that).slick({
919                slidesToShow: 3,
920                arrows: false,
921                dots: true,
922                appendDots: $(that).next('.block-v__wrap__dots'),
923                responsive: [{
924                    breakpoint: 1400,
925                    settings: {
926                        slidesToShow: 2
927                    }
928                }, {
929                    breakpoint: 1200,
930                    settings: {
931                        slidesToShow: 3
932                    }
933                }, {
934                    breakpoint: 880,
935                    settings: {
936                        slidesToShow: 2
937                    }
938                }, {
939                    breakpoint: 600,
940                    settings: {
941                        slidesToShow: 1
942                    }
943                }]
944            });
945        });
946
947        window.addEventListener('orientationchange', function () {
948            heightses();
949        }, false);
950
951        heightses();
952
953        $(window).on('load', function () {
954            heightses();
955        });
956
957        var width = $(window).width();
958        $(window).resize(function () {
959            if ($(window).width() != width) {
960                heightses();
961                width = $(window).width();
962            }
963        });
964
965        $('.jsInfoToggle').each(function () {
966            var item = $(this).find('.label_title, .column_dropdown'),
967                content = $(this).find('.column_content');
968            item.click(function () {
969                if (!$(this).closest('.item').hasClass('jsInfoToggle')) {
970                    return;
971                }
972                content.toggleClass('open');
973                content.slideToggle(500);
974            });
975        });
976
977        $('.b_on_event [type="checkbox"]').each(function () {
978            var percent = parseInt($(this).parents('.item').find('.percent').text());
979
980            var line = $('.progressbar .completion');
981
982            $(this).click(function () {
983                $(this).parents('.item').toggleClass('active');
984
985                if ($(this).prop('checked') == true) {
986                    var allpercent = parseInt($('.jsAllPercent').text());
987                    allpercent = allpercent + percent;
988                    $('.jsAllPercent').text(allpercent);
989                    line.css('width', allpercent + '%');
990                    $('#allpercent').val(allpercent);
991                } else {
992                    var allpercent = parseInt($('.jsAllPercent').text());
993                    allpercent = allpercent - percent;
994                    $('.jsAllPercent').text(allpercent);
995                    line.css('width', allpercent + '%');
996                    $('#allpercent').val(allpercent);
997                }
998            });
999        });
1000
1001        function BtnProgram() {
1002            if ($('#allpercent').val() >= 50) {
1003                $('.program .program_item.red').prop('disabled', false);
1004            } else {
1005                $('.program .program_item.red').prop('disabled', true);
1006            }
1007            if ($('#allpercent').val() >= 75) {
1008                $('.program .program_item.orange').prop('disabled', false);
1009            } else {
1010                $('.program .program_item.orange').prop('disabled', true);
1011            }
1012            if ($('#allpercent').val() == 100) {
1013                $('.program .program_item.green').prop('disabled', false);
1014            } else {
1015                $('.program .program_item.green').prop('disabled', true);
1016            }
1017        };
1018
1019        $(window).on('load', function () {
1020            var allpercent = parseInt($('.jsAllPercent').text());
1021            $('#allpercent').val(allpercent);
1022            BtnProgram();
1023        });
1024        $('.b_on_event ._checkbox').on('click', function () {
1025            BtnProgram();
1026        });
1027
1028        $('.jsCopyThisText').click(function (e) {
1029            e.preventDefault();
1030            var $temp = $('<input>');
1031            $('body').append($temp);
1032            $temp.val($(this).text()).select();
1033            document.execCommand('copy');
1034            $temp.remove();
1035        });
1036
1037        if ($(window).width() < 768) {
1038            $('.create_trip_plan .trip_plan_block_icon').click(function () {
1039                $(this).next('.create_trip_plan .trip_plan_content').slideToggle();
1040            });
1041        }
1042
1043        $('.jsSearch').click(function (e) {
1044            e.preventDefault();
1045            $(this).parents('body').find('.b_search_form').slideToggle(300);
1046        });
1047
1048        $('.btn_remove_text').click(function (e) {
1049            e.preventDefault();
1050            $(this).parents('form').find('input').val('');
1051        });
1052
1053        $('.jsOpenLogin').click(function (e) {
1054            e.preventDefault();
1055            //$(this).hide(0);
1056            $(this).parent().find('.form_wrapper').slideDown(400);
1057        });
1058
1059        var d = 1,
1060            dl = $('.b_steps_page .all_steps .step_wrapper').length;
1061        $('.jsBtnNext').click(function (e) {
1062            e.preventDefault();
1063            var $step = $('.all_steps').find('.step_wrapper.active');
1064            $step.removeClass('active').hide().next().addClass('active').fadeIn(300);
1065
1066            d++;
1067            var $step_dots = $('.login_steps li.active');
1068            $step_dots.removeClass('active').next().addClass('active');
1069
1070            if (d >= dl) {
1071                $('.b_steps_page .control_buttons').addClass('last');
1072                $('.b_steps_page .control_buttons .btn_skip').hide();
1073            }
1074        });
1075
1076        $('.login_steps li a').click(function (e) {
1077            var index = $(this).parent().index() + 1;
1078            d = index;
1079            e.preventDefault();
1080            $('.login_steps li').removeClass('active');
1081            $(this).parent().addClass('active');
1082            $('.all_steps .step_wrapper').removeClass('active').hide();
1083            var $href = $(this).attr('href');
1084            $($href).addClass('active').fadeIn(300);
1085            $('.b_steps_page .control_buttons .btn_skip').show();
1086            $('.b_steps_page .control_buttons').removeClass('last');
1087        });
1088
1089        $('.login_steps li a.last').click(function (e) {
1090            e.preventDefault();
1091            $('.b_steps_page .control_buttons').addClass('last');
1092            $('.b_steps_page .control_buttons .btn_skip').hide();
1093        });
1094
1095        $('input[name="be_here_transport"]').on('click', function () {
1096            if ($(this).hasClass('checked')) {
1097                $('input[name="be_here_transport"]').prop('checked', false);
1098                $('input[name="be_here_transport"]').removeClass('checked');
1099            } else {
1100                $('input[name="be_here_transport"]').prop('checked', false);
1101                $('input[name="be_here_transport"]').removeClass('checked');
1102                $(this).addClass('checked');
1103                $(this).prop('checked', true);
1104            }
1105        });
1106        $('input[name="be_here_transport"]').on('change', function () {
1107            if ($(this).prop('checked')) {
1108                $(this).parents('.trip_plan_item').find('.btn--here-check').css('display', 'inline-block');
1109            } else {
1110                $(this).parents('.trip_plan_item').find('.btn--here-check').css('display', 'none');
1111            }
1112        });
1113
1114        var availableTags = ['ActionScript', 'AppleScript', 'Asp', 'BASIC', 'C', 'C++', 'Clojure', 'COBOL', 'ColdFusion', 'Erlang', 'Fortran', 'Groovy', 'Haskell', 'Java', 'JavaScript', 'Lisp', 'Perl', 'PHP', 'Python', 'Ruby', 'Scala', 'Scheme', 'ActionScript', 'AppleScript', 'Asp', 'BASIC', 'C', 'C++', 'Clojure', 'COBOL', 'ColdFusion', 'Erlang', 'Fortran', 'Groovy', 'Haskell', 'Java', 'JavaScript', 'Lisp', 'Perl', 'PHP', 'Python', 'Ruby', 'Scala', 'Scheme'];
1115        $('#input_search .input_search').autocomplete({
1116            source: availableTags,
1117            appendTo: '#input_search'
1118        });
1119
1120        var availableTagssearchform = ['ActionScript', 'AppleScript', 'Asp', 'BASIC', 'C', 'C++', 'Clojure', 'COBOL', 'ColdFusion', 'Erlang', 'Fortran', 'Groovy', 'Haskell', 'Java', 'JavaScript', 'Lisp', 'Perl', 'PHP', 'Python', 'Ruby', 'Scala', 'Scheme', 'ActionScript', 'AppleScript', 'Asp', 'BASIC', 'C', 'C++', 'Clojure', 'COBOL', 'ColdFusion', 'Erlang', 'Fortran', 'Groovy', 'Haskell', 'Java', 'JavaScript', 'Lisp', 'Perl', 'PHP', 'Python', 'Ruby', 'Scala', 'Scheme'];
1121        $('#search_form .input_search').autocomplete({
1122            source: availableTagssearchform,
1123            appendTo: '#search_form'
1124        });
1125    },
1126
1127    modals: function modals() {
1128        var initModals = function initModals() {
1129            $('.jsOpenModal').magnificPopup({
1130                type: 'inline',
1131                removalDelay: 300,
1132                mainClass: 'my-mfp-slide-bottom'
1133            });
1134        };
1135        // To fix if magnificPopup is enabled
1136        $('body').on('click', '.jsOpenModal', function () {
1137            if (!$.magnificPopup.instance.isOpen) {
1138                initModals();
1139                this.click();
1140            }
1141        });
1142        initModals();
1143
1144        $('.jsVideoEvent').magnificPopup({
1145            removalDelay: 300,
1146            mainClass: 'my-mfp-slide-bottom',
1147            type: 'iframe',
1148            preloader: false,
1149            fixedContentPos: false
1150        });
1151
1152        $('body').on('click', '.jsCloseModal', function () {
1153            $(this).parents('.b_modal').magnificPopup('close');
1154        });
1155    },
1156
1157    tabs: function tabs() {
1158        $('.tab').off('click.tabs').on('click.tabs', function () {
1159            var id = $(this).attr('data-content');
1160            $('.tab--active[data-content=\'' + id + '\']').removeClass('tab--active');
1161            $('.tab-c--active[data-content=\'' + id + '\']').removeClass('tab-c--active');
1162            $(this).addClass('tab--active');
1163            $('.tab-c[data-id=\'' + $(this).attr('data-id') + '\'][data-content=\'' + id + '\']').addClass('tab-c--active');
1164        });
1165
1166        $('.b-tabs__tab').each(function () {
1167            var that = $(this);
1168            $(that).off('click.tabs').on('click.tabs', function () {
1169                $(that).closest('.b-tabs').find('.b-tabs__tab--active').removeClass('b-tabs__tab--active');
1170                $(that).addClass('b-tabs__tab--active');
1171            });
1172        });
1173
1174        $('.tabs-slicked .b-tabs__tab').each(function () {
1175            $(this).css('min-width', $('.tabs-slicked').width() / $('.tabs-slicked .b-tabs__tab').length);
1176        });
1177
1178        if (!$('.tabs-slicked').hasClass('slick-initialized')) {
1179            $('.tabs-slicked').slick({
1180                infinite: false,
1181                speed: 300,
1182                slidesToShow: 1,
1183                variableWidth: true,
1184                arrows: false
1185            });
1186        }
1187
1188        // $(".tabs-slicked").on('afterChange', function (event, slick, currentSlide, nextSlide) {});
1189    },
1190
1191    adminGallery: function adminGallery() {
1192        $(document).on('change', '#file', function () {
1193            var name = document.getElementById('file').files[0].name;
1194            var form_data = new FormData();
1195            var ext = name.split('.').pop().toLowerCase();
1196            if (jQuery.inArray(ext, ['gif', 'png', 'jpg', 'jpeg']) == -1) {
1197                alert('Invalid Image File');
1198            }
1199            var oFReader = new FileReader();
1200            oFReader.readAsDataURL(document.getElementById('file').files[0]);
1201            var f = document.getElementById('file').files[0];
1202            var fsize = f.size || f.fileSize;
1203            if (fsize > 2000000) {
1204                alert('Image File Size is very big');
1205            } else {
1206                form_data.append('file', document.getElementById('file').files[0]);
1207                $.ajax({
1208                    url: 'upload.php',
1209                    method: 'POST',
1210                    data: form_data,
1211                    contentType: false,
1212                    cache: false,
1213                    processData: false,
1214                    beforeSend: function beforeSend() {
1215                        $('.upload__done').css('width', '50%');
1216                    },
1217                    success: function success(data) {
1218                        addedItem(data);
1219                        removeItemImg();
1220                        $('.upload__done').css('width', '100%');
1221                    }
1222                });
1223            }
1224        });
1225
1226        $('#uploadImgJs').on('click', function () {
1227            $('#file').click();
1228        });
1229
1230        $('#uploadVideoJs').on('click', function () {
1231            var link = uploadFilter($('#uploadVideoLink').val());
1232
1233            var newUploadItem = '\n                  <div class="upload__item">\n                      <div class="upload__item-main">\n                          <div class="upload__img">\n                              <div class="upload__drag"></div>\n                              <a title="View" href="' + link + '" target="_blank"></a>\n                              <iframe src="' + link + '" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n                          </div>\n                          <div class="upload__name">\n                              <p>YouTube Video</p>\n                          </div>\n                          <div class="upload__item-control">
1233\n                              <span class="upload__size"></span>\n                              <i class="upload__delete"></i>\n                              <a title="View" class="upload__watch" href="' + link + '" target="_blank"></a>\n                              \n                          </div>\n                      </div>\n                      <div class="upload__progress">\n                          <div class="upload__done"></div>\n                      </div>\n                  </div>';
1234            $('#uploadWrap').append(newUploadItem);
1235            $('.upload__item').slideDown();
1236            removeItemImg();
1237            $('.upload__done').css('width', '100%');
1238        });
1239
1240        function uploadFilter(link) {
1241            if (link.indexOf('&') != -1) {
1242                var cutFrom = link.indexOf('&');
1243                link = link.slice(0, cutFrom);
1244            }
1245
1246            link = link.split('watch?v=');
1247            link = link.join('embed/');
1248
1249            return link;
1250        }
1251
1252        function addedItem(img) {
1253            var newUploadItem = '\n            <div class="upload__item" style="display:none;">\n                <div class="upload__item-main">\n                    <div class="upload__img">\n                        <div class="upload__drag"></div>\n                        <img src="uploads/' + img + '" alt="">\n                    </div>\n                    <div class="upload__name">\n                        <p>' + img + '</p>\n                    </div>\n                    <div class="upload__item-control">\n                        <span class="upload__size">115.8 KB</span>\n                        <i class="upload__delete"></i>\n                        <a title="View" class="upload__watch" href="uploads/' + img + '" target="_blank"></a>\n                        \n                    </div>\n                </div>\n                <div class="upload__progress">\n                    <div class="upload__done"></div>\n                </div>\n            </div>\n        ';
1254            $('#uploadWrap').append(newUploadItem);
1255            $('.upload__item').slideDown();
1256        }
1257
1258        function removeItemImg() {
1259            $('.upload__delete').on('click', function () {
1260                var _this = this;
1261
1262                $(this).parents('.upload__item').slideUp();
1263                setTimeout(function () {
1264                    $(_this).parents('.upload__item').remove();
1265                }, 1000);
1266            });
1267        }
1268    },
1269
1270    simpletabs: function simpletabs() {
1271        var tabs = $('.tabs');
1272        tabs.each(function () {
1273
1274            var tabs = $(this),
1275                tab = tabs.find('.tabs__tab'),
1276                content = tabs.find('.tabs__item');
1277
1278            tab.each(function (index, element) {
1279                $(this).attr('data-tab', index);
1280            });
1281
1282            function showContent(i) {
1283                tab.removeClass('-active');
1284                content.removeClass('-active').removeClass('-fade');
1285                tab.eq(i).addClass('-active');
1286                content.eq(i).addClass('-active');
1287                setTimeout(function () {
1288                    content.eq(i).addClass('-fade');
1289                }, 1);
1290            }
1291
1292            tab.on('click', function (e) {
1293                e.preventDefault();
1294                showContent(parseInt($(this).attr('data-tab')));
1295            });
1296        });
1297    },
1298
1299    subscribeAjax: function subscribeAjax() {
1300        $('#submit-subscribe').on('click', function (event) {
1301            event.preventDefault();
1302            var data = $('#subscribe_form').serialize();
1303            $.ajax({
1304                type: 'POST',
1305                url: '/uk/subscribe',
1306                data: data,
1307                success: function success(data) {
1308                    $.magnificPopup.open({
1309                        items: {
1310                            src: '#subscribe-done'
1311                        },
1312                        type: 'inline',
1313                        removalDelay: 300,
1314                        mainClass: 'my-mfp-slide-bottom'
1315                    });
1316                },
1317                error: function error(request, status, _error) {
1318                    $.magnificPopup.open({
1319                        items: {
1320                            src: '#subscribe-error'
1321                        },
1322                        type: 'inline',
1323                        removalDelay: 300,
1324                        mainClass: 'my-mfp-slide-bottom'
1325                    });
1326                }
1327
1328            });
1329        });
1330    },
1331    fixMenuPoland: function fixMenuPoland() {
1332        if ($('.logo').attr('href') == '/pl/') {
1333            $('.header-menu').css('margin-left', '-23px');
1334            var windowWidth = $(window).width();
1335            if (windowWidth == 1311) {
1336                $('.header-menu__link').css('font-size', '14px');
1337            }
1338        }
1339        if ($('.mini-profile').attr('href') == '#login' && $('.logo').attr('href') == '/pl/') {
1340            $('.header-menu__link').css('font-size', '14px');
1341        }
1342    },
1343
1344
1345    checkboxAgreement: function checkboxAgreement() {
1346        $('#check-agreement').on('click', function () {
1347            if ($('#check-agreement').is(':checked')) {
1348                /* $('#reg_submit').removeClass('disabled') */
1349
1350                // enable social media links
1351                $('.registration_social_media_link').removeClass('disabled_link');
1352
1353                // validate registration form
1354                var valid = true;
1355                valid = valid && $('.registration_form')[0].checkValidity();
1356                valid = valid && $('.register_email .registration_name_field').val().length > 0;
1357                valid = valid && $('.register_email .registration_password_field').val().length > 0 && $('.registration_password_field').val() === $('.registration_confirm_password_field').val();
1358                if (valid) {
1359                    $('#reg_submit').removeClass('disabled');
1360                } else {
1361                    $('#reg_submit').addClass('disabled');
1362                }
1363            }
1364            if (!$('#check-agreement').is(':checked')) {
1365                $('#reg_submit').addClass('disabled');
1366
1367                // disable social media links
1368                if (!$('.registration_social_media_link').hasClass('disabled_link')) {
1369                    $('.registration_social_media_link').addClass('disabled_link');
1370                }
1371            }
1372        });
1373    },
1374
1375    checkedCategory: function checkedCategory() {
1376        // $('.category-detail .checkbox').on('click', function(){
1377        //     var isChecked = $(this).hasClass('checked');
1378        //     var checkedCategory = $(this).closest('label').text();
1379        //     if(isChecked == true){
1380        //         $('.wrap-all-selected').append('<div class=\'category-checked\'>'+ checkedCategory +'</div>');
1381        //     }
1382        //     if(isChecked == false){
1383        //         $(this).closest('.wrap-all-selected > div').remove('.category-checked');
1384        //     }
1385        // })
1386    },
1387
1388    validate: function validate() {
1389        // $('input[type="tel"]').mask('+7 (999) 999-9999');
1390    },
1391
1392    accordeon: function accordeon() {
1393        // var accord = $('.accord'),
1394        //   accord_btn = accord.find('.accord__btn'),
1395        //   accord_content = accord.find('.accord__content');
1396
1397        // accord_btn.on('click', function (e) {
1398        //   e.preventDefault();
1399
1400        //   var $this = $(this),
1401        //     $this_content = $this.closest('.accord__item').find('.accord__content');
1402
1403        //   if ($this.hasClass('-active')) {
1404        //     $this.removeClass('-active');
1405        //     $this_content.slideUp();
1406        //   } else {
1407        //     accord_btn.removeClass('-active');
1408        //     accord_content.slideUp();
1409        //     $this.addClass('-active');
1410        //     $this_content.slideDown();
1411        //   }
1412        // });
1413    }
1414
1415};
1416
1417$(document).ready(app.init());
1418
1419app.windowLoad();
1420
1421var vueInit = {
1422    shedule: function shedule() {
1423        $('.shedule-block__trigger').click(function () {
1424            if ($(this).parent().next('.shedule-hidden-wrap').get(0)) {
1425                $(this).parent().next('.shedule-hidden-wrap').slideToggle();
1426            }
1427            return false;
1428        });
1429    }
1430};
1431
1432$(document).ready(function () {
1433    var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
1434    if (window.location.hash && isChrome) {
1435        setTimeout(function () {
1436            var hash = window.location.hash;
1437            window.location.hash = '';
1438            window.location.hash = hash;
1439        }, 1000);
1440    }
1441});
1442//# sourceMappingURL=main.js.map

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.