1(function($) { 2 3 $(function() { 4 $('table').wrap('<div class="table-wrapper"></div>'); 5 6 $(window).resize(function() { 7 menuWidth(); 8 }); 9 10 var IsMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), 11 $body = $(document.body), 12 $html = $(document.documentElement); 13 14 if (IsMobile){ 15 $('.site-wrapper').addClass('IsMobile'); 16 } 17 18 $('.loop').owlCarousel({ 19 loop:true, 20 margin:25, 21 nav:true, 22 responsive:{ 23 0:{ 24 items:1 25 }, 26 768:{ 27 items:1 28 }, 29 980:{ 30 items:2 31 } 32 } 33 }); 34 35//select_plagins 36s3From.initForms(".top-form", function() { 37 callDate(); 38 callUniqeId(); 39 var $selects = $('select'); 40 $selects.easyDropDown({ 41 cutOff: 10, 42 wrapperClass: 'dropdown' 43 }); 44}); 45 46 47 // menu-top------------------------------------- 48 $('.search-div .lupa').click(function(){ 49 $('.search-div').toggleClass('opened'); 50 $('.exsid').toggleClass('opened'); 51 52 }); 53 54 $('.search-div .exsid').click(function(){ 55 $('.search-div').removeClass('opened'); 56 57 }); 58 59 $body.click(function(srch){ 60 if ($(srch.target).closest($('.search-div')).length) return; 61 if ($('.search-div').hasClass('opened')) { 62 $('.search-div').removeClass('opened'); 63 } 64 65 }); 66 67 68 function callDate() { 69 $.datepicker.setDefaults( $.datepicker.regional[ "ru" ] ); 70 $( ".datepicker" ).datepicker({ 71 dateFormat: 'dd.mm.yy', 72 minDate: new Date(), 73 changeMonth: true, 74 changeYear: true, 75 dayNames: ["ÐоÑкÑеÑ.", "Ðонедел.", "ÐÑоÑник", "СÑеда", "ЧеÑвеÑг", "ÐÑÑниÑа", "СÑббоÑа"], 76 monthNames: ["ЯнваÑÑ,","ФевÑалÑ,","ÐаÑÑа,","ÐпÑелÑ,","ÐаÑ,","ÐÑнÑ,","ÐÑлÑ,","ÐвгÑÑÑа,","СенÑÑбÑÑ,","ÐкÑÑбÑÑ,","ÐоÑбÑÑ,","ÐекабÑÑ,"], 77 monthNamesShort: ["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑа","ÐпÑелÑ","ÐаÑ","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑа","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"], 78 monthNamesTitle: ["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑ","ÐпÑелÑ","Ðай","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑ","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"], 79 dayNamesShort: ["ÐÑ", "Ðн", "ÐÑ", "СÑ", "ЧÑ", "ÐÑ", "Сб"], 80 dayNamesMin: ["ÐÑ", "Ðн", "ÐÑ", "СÑ", "ЧÑ", "ÐÑ", "Сб"] 81 }); 82 } 83 84 function callUniqeId() { 85 var id_cont = 0; 86 $('.tpl-anketa input[name=form_id]').each(function(eq, elem) { 87 $('.tpl-anketa input[name=form_id]').not($(elem)).each(function(ind, elem_in) { 88 id_cont++; 89 if ( $(elem).val() == $(elem_in).val() ) { 90 buttons = $(elem_in).closest('.tpl-anketa').find('input[type=checkbox], input[type=radio]'); 91 buttons.each(function(input_index, btn) { 92 $(btn).attr('id', $(btn).attr('id')+'_'+id_cont); 93 $(btn).next().attr('for', $(btn).next().attr('for')+'_'+id_cont); 94 }); 95 } 96 }); 97 $(elem).clone(true).prependTo($(elem).parent()); 98 $(elem).remove(); 99 }); 100 } 101 102 callDate(); 103 104 callUniqeId(); 105 106 function menuWidth() { 107 var winWidth = $(window).width(); 108 if ( winWidth > 1000 && $('.menu-top-wrapper .menu-top > li').length ) { 109 var width_li = 0, countLi = 0, 110 menuTWidth = $('.menu-top-wrapper .menu-top').outerWidth(); 111 112 $('.menu-top-wrapper .menu-top').append($('.menu-top-wrapper .menu-top > li.last-childrens > ul > li')); 113 $('.menu-top-wrapper .menu-top > li.last-childrens').remove(); 114 115 $('.menu-top-wrapper .menu-top > li').each(function() { 116 width_li += Math.ceil($(this).outerWidth()); 117 countLi++; 118 }); 119 120 width_li = width_li + 45; 121 122 if (menuTWidth < width_li) { 123 menuTWidth = $('.menu-top-wrapper .menu-top').outerWidth()-60; 124 $('.menu-top-wrapper .menu-top').append("<li class='last-childrens'><a href='javascript:void(0);'>...</a><ul class='level-2'></ul></li>"); 125 for (var i = countLi-1; menuTWidth < width_li; i--) { 126 width_li -= $('.menu-top-wrapper .menu-top > li:not(last-childrens)').eq(i).outerWidth(); 127 $('.menu-top-wrapper .menu-top > li.last-childrens > ul').prepend($('.menu-top-wrapper .menu-top > li:not(last-childrens)').eq(i)); 128 } 129 $('.menu-top-wrapper .menu-top').removeAttr('style'); 130 } 131 } 132 } 133 134 setTimeout(function() { 135 menuWidth(); 136 }, 1000); 137 138 139 140 $('.menu-top-wrapper .menu-top > li.has-child > a').on('click', function(cl) { 141 if ( ($(this).parent().hasClass('mt-active') && IsMobile) || !IsMobile ) { 142 document.location.href = $(this).attr('href'); 143 } else { 144 $('.menu-top-wrapper .menu-top > li.has-child').removeClass('mt-active'); 145 cl.preventDefault(); 146 $(this).parent().addClass('mt-active'); 147 } 148 }); 149 150 $body.click(function(mt) { 151 if (!$(mt.target).closest('.menu-top-wrapper .menu-top > li.has-child').length) { 152 $('.menu-top-wrapper .menu-top > li.has-child').removeClass('mt-active'); 153 } 154 }); 155 156// ----------------------------- 157 158 var MenuTop = $('.mobile-manu-wrapper'); 159 160 $('.header-top-buts .open-menu').on("click", function(){ 161 $pos = $(window).scrollTop(); 162 $html.css('top',-$pos); 163 $(this).addClass('opened'); 164 setTimeout(function() { 165 MenuTop.addClass('opened'); 166 $html.addClass('overflowHidden'); 167 $('.site-wrapper').addClass('ten-bg-menu'); 168 }); 169 }); 170 171 MenuTop.find('.close-menu').on("click", function(){ 172 MenuTop.add($('.header-top-buts .open-menu')).removeClass('opened'); 173 $html.removeClass('overflowHidden').removeAttr('style'); 174 $('.site-wrapper').removeClass('ten-bg-menu'); 175 $(window).scrollTop($pos); 176 }); 177 178 $body.on("click touchstart", function(event){ 179 if ($(event.target).closest(MenuTop).length) return; 180 if (MenuTop.hasClass('opened')) { 181 MenuTop.add($('.header-top-buts .open-menu')).removeClass('opened'); 182 $html.removeClass('overflowHidden').removeAttr('style'); 183 $(window).scrollTop($pos);; 184 $('.site-wrapper').removeClass('ten-bg-menu'); 185 } 186 }); 187 188 MenuTop.find('.menu-top li ul').parent().find('a').append("<span class='arr-menu'></span>"); 189 190 MenuTop.find('.menu-top').s3MenuAllIn({ 191 type: 'dropdown', 192 showTime: 150, 193 hideTime: 150, 194 showFn: $.fn.slideDown, 195 hideFn: $.fn.slideUp 196 }); 197 198 MenuTop.find('.menu-top').on('click', 'li.s3-menu-allin-has > a', function(cl) { 199 if ( !$(cl.target).closest(MenuTop.find('.menu-top li a .arr-menu')).length ) { 200 $(this).next().css({'visibility':'hidden','padding':'0','max-height':'0','display':'none'}); 201 document.location.href = $(this).attr('href'); 202 } else { 203 cl.preventDefault(); 204 } 205 }); 206 207 MenuTop.find('.menu-top').on('click', 'li.s3-menu-allin-has > a', function(clArr) { 208 var $this = $(this); 209 $this.parents('ul:first').find('>li > a.s3-menu-allin-open').not($this).next().slideUp(400, function() { 210 $this.parents('ul:first').find('>li > a.s3-menu-allin-open').not($this).removeClass('s3-menu-allin-open'); 211 }); 212 213 }); 214 215 216 217 var wrForm = $('.top-form'), 218 btnForm = $('.zakaz-konsult'); 219 220 $('.top-form-close').on('click', function() { 221 wrForm.removeClass('opened'); 222 $html.removeClass('overflowHidden').removeAttr('style'); 223 $(window).scrollTop($pos); 224 }); 225 btnForm.on('click', function(b) { 226 $pos = $(window).scrollTop(); 227 b.preventDefault(); 228 wrForm.addClass('opened'); 229 $html.addClass('overflowHidden').css('top',-$pos); 230 231 }); 232 $body.on('click touchstart', function(fr) { 233 if ($(fr.target).closest($('.top-form .top-form-in').add(btnForm).add($('.ui-datepicker'))).length) return; 234 if (wrForm.hasClass('opened')) { 235 wrForm.removeClass('opened'); 236 $html.removeClass('overflowHidden').removeAttr('style'); 237 $(window).scrollTop($pos); 238 } 239 }); 240 $html.on('keyup', function(ky) { 241 if (wrForm.hasClass('opened') && ky.keyCode == 27) { 242 wrForm.removeClass('opened'); 243 $html.removeClass('overflowHidden').removeAttr('style'); 244 $(window).scrollTop($pos); 245 } 246 }); 247//select-script 248 var $selects = $('select'); 249 250 $selects.easyDropDown({ 251 cutOff: 10, 252 wrapperClass: 'dropdown' 253 }); 254 255 }); 256 257})(jQuery); 258 259$(document).ready(function(){ 260 $('.link_top').click(function () { 261 $('body,html').animate({ 262 scrollTop: 0 263 }, 800); 264 return false; 265 }); 266});
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.