1// ÐпÑеделÑем пеÑеменнÑÑ Ð´Ð»Ñ Ñкономии памÑÑи. 2var doc = $(document), 3 menuTimer; 4 5doc 6 .on('click keypress', '.search-button', function(e) { 7 if (e.type == 'keypress' && e.which != 13) { 8 return; 9 } 10 if(e.type == 'keypress' && e.which == 13) { 11 $('.container-search').find('.search-input').addClass('tabindex'); 12 } 13 // ÐбÑабоÑка нажаÑÐ¸Ñ Ð½Ð° ÐºÐ½Ð¾Ð¿ÐºÑ Ð¿Ð¾Ð¸Ñка 14 $('.container-search').addClass('opened').find('.search-input').focus(); 15 }) 16 .on('click', '.search-close-button', function(e) { 17 // ÐбÑабоÑка нажаÑÐ¸Ñ Ð½Ð° ÐºÐ½Ð¾Ð¿ÐºÑ Ð·Ð°ÐºÑÑÑÐ¸Ñ Ð¿Ð¾Ð¸Ñка 18 $('.container-search').removeClass('opened'); 19 }) 20 .on('blur', '.search-input.tabindex', function() { 21 if ($(this).val() == '') { 22 $(this).closest('.container-search').removeClass('opened'); 23 $('.search-button').focus(); 24 }; 25 }) 26 .on('input', '.search-input', function() { 27 /** 28 * @todo ÐÑÐ¾Ñ ÐºÐ¾Ð´ Ð½ÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ ÑдалиÑÑ, он ÑÑÑ ÑолÑко Ð´Ð»Ñ Ð´ÐµÐ¼Ð¾Ð½ÑÑÑаÑии Ð¿Ð¾Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð¸Ñка 29 */ 30 if ($(this).val() != '') { 31 $('.search-suggestions').slideDown(500); 32 } else { 33 $('.search-suggestions').slideUp(300) 34 } 35 }) 36 .on('click', '.mobile-navrazdel .parent > a', function(e) { 37 e.preventDefault(); 38 39 var $this = $(this), 40 $parent = $this.closest('.parent'); 41 42 if ($parent.hasClass('active')) { 43 $parent.removeClass('active'); 44 } else { 45 $parent.addClass('active').siblings().removeClass('active'); 46 } 47 48 return false; 49 }) 50 .on('click', '.mobile-nav .parent > a', function(e) { 51 e.preventDefault(); 52 53 var $this = $(this), 54 $parent = $this.closest('.parent'); 55 56 if ($parent.hasClass('active')) { 57 $parent.removeClass('active'); 58 } else { 59 $parent.addClass('active').siblings().removeClass('active'); 60 } 61 62 return false; 63 }) 64 .on('click', '.top-nav-block .parent > a', function(e) { 65 var parent = $(this).parent(); 66 if (!parent.hasClass('active')) { 67 e.preventDefault(); 68 parent.addClass('active').siblings().removeClass('active'); 69 } 70 }) 71 .on('keydown', '.top-nav-block', function(e) { 72 if (e.key === 'Escape') { 73 $(this).find('.active').removeClass('active'); 74 $(e.target).closest('.parent').children('a').first().focus(); 75 } 76 }) 77 .on('click', function(e) { 78 if (!$(e.target).closest('.top-nav-block').length) { 79 $('.top-nav-block .active').removeClass('active'); 80 } 81 }) .on('input keyup', '.jq-selectbox__search input', function(e) { 82 // ÐбÑабоÑка клика и ÑаÑа по ÑодиÑелÑÑким пÑнкÑам Ð¼ÐµÐ½Ñ 83 if (e.type == 'input') { 84 // $(this).off('keyup'); 85 } 86 $(this).closest('ul').perfectScrollbar('update'); 87 88 }) 89 .on('click', '.toggle-next', function(e) { 90 // СвоÑаÑивание/ÑазвоÑаÑивание ÑледÑÑÑего за ÑекÑÑим ÑлеменÑа 91 e.preventDefault(); 92 $(this).toggleClass('opened').next().slideToggle(500); 93 }) 94 .on('click', '.vertical-filter-header', function(e) { 95 // СвоÑаÑиваем/ÑазвоÑаÑиваем блоки в веÑÑикалÑном ÑилÑÑÑе 96 var $this = $(this), 97 $parent = $this.closest('.vertical-filter-box'); 98 $this.next().slideToggle(500, function () { 99 $('.styler').trigger('refresh'); // обновлÑем ÑÑилизаÑÐ¸Ñ ÑелекÑа 100 $parent.toggleClass('active'); 101 }) 102 }) 103 .on('click', '.info-box-close', function(event) { 104 // ÐакÑÑваем инÑо-полоÑÐºÑ 105 event.preventDefault(); 106 $(this).closest('.info-box').slideUp(200); 107 }) 108 .on('click', '[data-schedule-modal]', function(event) { 109 // ÐоказÑваем модалÑное окно Ñ Ð¿Ð¾Ð´ÑобноÑÑÑми в ÑаÑпиÑании 110 var url = $(this).data('scheduleModal'); 111 $.magnificPopup.open({ 112 items: { 113 src: url 114 }, 115 type: 'ajax' 116 }); 117 }) 118 .on('touchend', '.footer-menu-content ul .h4', function(event) { 119 // СвоÑаÑиваем/ÑазвоÑаÑиваем Ð¼ÐµÐ½Ñ Ð² ÑÑÑеÑе ÑайÑа ÑолÑко на ÑаÑ-ÑÑÑÑойÑÑÐ²Ð°Ñ 120 $(this).toggleClass('opened').next().slideToggle(500); 121 }) 122 .on('click', '.sidebar-navrazdel .parent > a', function(e) { 123 // ÐÐµÐ½Ñ Ð² ÑайдбаÑе 124 e.preventDefault(); 125 var $this = $(this), 126 $parent = $(this).parent(); 127 128 if ($parent.hasClass('current')) { 129 $parent.removeClass('current'); 130 } else { 131 $('.sidebar-navrazdel .parent').removeClass('current'); 132 $parent.addClass('current'); 133 } 134 return false;
135 }) 136 // ÐÑи пеÑвом наведении на блок Ñ Ð¼ÐµÐ½Ñ Ð´ÐµÐ»Ð°ÐµÐ¼ задеÑÐ¶ÐºÑ Ð´Ð»Ñ Ð¿ÑедоÑвÑаÑÐµÐ½Ð¸Ñ ÑлÑÑайного показа пÑнкÑов 137 .on('mouseenter', '.top-nav-block', function() { 138 var $this = $(this); 139 if (menuTimer) { 140 clearTimeout(menuTimer); 141 menuTimer = null 142 } 143 menuTimer = setTimeout(function () { 144 $this.addClass('hovered'); 145 }, 400); 146 147 }) 148 .on('mouseleave', '.top-nav-block', function() { 149 if (menuTimer) { 150 clearTimeout(menuTimer); 151 menuTimer = null 152 } 153 $(this).removeClass('hovered'); 154 155 }); 156 157 158 159jQuery(function () { mainJsFile(); }); 160if (window.frameCacheVars !== undefined) { 161 // ÐÐ¾Ð¼Ð¿Ð¾Ð·Ð¸Ñ 162 BX.addCustomEvent("onFrameDataReceived", function (json) { 163 mainJsFile(); 164 }); 165} 166else { 167 // ÐбÑÑнÑй Ñежим 168 jQuery(document).ready(function ($) { 169 mainJsFile(); 170 }); 171} 172 173// ÐÑновной js-код, вÑполнÑемÑй пÑи загÑÑзке ÑÑÑаниÑÑ 174function mainJsFile() { 175 // СÑÑоим мобилÑнÑÑ Ð½Ð°Ð²Ð¸Ð³Ð°ÑÐ¸Ñ 176 $.simpleMobileNav({ 177 navBlock: '.top-nav-block > ul', 178 navContainer: '.mobile-nav', 179 navWrapper: '.mobile-nav-wrapper', 180 navRazdelBlock: '.sidebar-navrazdel > ul', 181 navRazdelContainer: '.mobile-navrazdel', 182 navRazdelWrapper: '.mobile-navrazdel-wrapper' 183 }); 184 185 186 // Ð¡Ð»Ð°Ð¹Ð´ÐµÑ Ð½Ð° главной ÑÑÑаниÑе 187 $('.big-slider').owlCarousel({ 188 items: 1, 189 navContainer: '.big-slider-nav', 190 navText: ['Ðазад', 'ÐÑÑ'], 191 responsive: { 192 0: { 193 nav: false, 194 dots: true 195 }, 196 768: { 197 nav: true, 198 dots: false 199 } 200 } 201 }); 202 203 // СÑилизаÑÐ¸Ñ ÑелекÑов 204 $('.styler').styler({ 205 selectSearch: true, 206 selectSearchLimit: 20, 207 onSelectOpened: function() { 208 // к оÑкÑÑÑÐ¾Ð¼Ñ Ð¿ÑименÑем плагин ÑÑилизаÑии ÑкÑоллбаÑа 209 $(this).find('ul').perfectScrollbar(); 210 // console.log('onSelectOpened', $(this).find('ul').html()); 211 }, 212 onFormStyled: function () { 213 $('.jq-selectbox').addClass('opacity-one'); 214 } 215 }); 216 217 // ÐÐ´Ð¸Ð½Ð°ÐºÐ¾Ð²Ð°Ñ Ð²ÑÑоÑа блоков 218 $('.equal').matchHeight(); 219 220 // ÐавоÑаÑиваем ÑаблиÑÑ Ð² блоки Ð´Ð»Ñ Ð¿ÑокÑÑÑки на Ð¼ÐµÐ»ÐºÐ¸Ñ ÑкÑÐ°Ð½Ð°Ñ 221 var $tables = $('.table').not('.table-schedule').not('.table-schedule table'); 222 if ($tables.length) { 223 $.each($tables, function(index, val) { 224 var $this = $(this); 225 if (!$this.parent().hasClass('responsive-table')) { $this.wrap('<div class="responsive-table" />'); } 226 }); 227 $('.responsive-table').perfectScrollbar(); 228 }; 229 230 231} 232 233
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.