1jQuery(function($){ 2 // ÐÑе ÑлеменÑÑ ÐºÐ»Ð°ÑÑа .social_share ÑÑиÑаем кнопками ÑаÑинга 3 $(document).on('click', '.social_share', function(){ 4 Share.go(this); 5 }); 6 $( "#archives-2 .widget-title").each(function() { 7 $(this).on("click", function(){ 8 var childUl = $(this).parent().find("ul"); 9 if(childUl.length) { 10 $(this).parent().find("ul").toggle("show"); 11 return false; 12 } 13 }); 14 }); 15 $( ".wrap-form-cf .givequest").each(function() { 16 $(this).on("click", function(){ 17 var childUl = $(this).parent().find(".w-cf"); 18 if(childUl.length) { 19 $(this).parent().find(".w-cf").toggle("show"); 20 return false; 21 } 22 }); 23 }); 24 $(window).on('load', function(){ 25 var docHeight = $('.site-footer').offset().top + 28; 26 $('.sdb').height(docHeight); 27 }); 28 $(document).ready(function() { 29 if(window.innerWidth <=992 && $('.home .latest-news').length) { 30 var news = $('.home .latest-news').clone().show(); 31 $('.site-main').append(news); 32 } 33 if($('#id_wpcr3_ftext').length) { 34 $('#id_wpcr3_ftext').removeAttr('cols'); 35 } 36 }); 37 38 var mainPostAdaptive; 39 var autoPlayInt; 40 var clickGuard = true; 41 42 function mainPostAdaptivefunc() { 43 mainPostAdaptive = setInterval(function(){ 44 $('.main-news').height($('.main-post-wrapper.active-post').height()) 45 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 46 'top': $('.main-post-wrapper.active-post').height()/2 - $('.main-news .fa-chevron-left').height()/2 47 }) 48 }, 100) 49 } 50 51 mainPostAdaptivefunc() 52 53 $(window).resize(function(){ 54 setTimeout(function(){ 55 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 56 'line-height': $('.main-post-wrapper.active-post').height()+'px' 57 }) 58 }, 300) 59 }) 60 61 var mainPostlength = $('.main-post-wrapper').length; 62 var mainPostHeight; 63 64 $('.main-post-wrapper').eq(0).addClass('active-post'); 65 66 $('.main-news').prepend('<i class="fa fa-chevron-left" aria-hidden="true"></i><i class="fa fa-chevron-right" aria-hidden="true"></i>') 67 68 function sliderRightClick(){ 69 clearInterval(mainPostAdaptive) 70 clearInterval(mainPostHeight) 71 clearInterval(autoPlayInt) 72 clearInterval(autoPlayTo) 73 74 var currentPost = $('.main-post-wrapper.active-post'), 75 currentPostIndex = currentPost.index('.main-post-wrapper'), 76 nextPostIndex = currentPostIndex + 1, 77 nextPost = $('.main-post-wrapper').eq(nextPostIndex), 78 currentNum = $('.slider-nums .active-post-num'), 79 currentNumIndex = $('.slider-nums i.active-post-num').index('.slider-nums i'), 80 nextNumIndex = currentNumIndex + 1, 81 nextNum = $('.slider-nums i').eq(nextNumIndex); 82 83 $('.main-post-wrapper').stop(true, true).fadeOut(1500); 84 $('.main-post-wrapper').removeClass('active-post'); 85 $('.slider-nums i').removeClass('active-post-num'); 86 87 if(nextPostIndex == mainPostlength) { 88 $('.main-post-wrapper').eq(0).fadeIn(1500); 89 $('.main-post-wrapper').eq(0).addClass('active-post'); 90 $('.slider-nums i').removeClass('active-post-num'); 91 $('.slider-nums').animate({ 92 'left': 0 93 }, 500); 94 $('.slider-nums i').eq(0).addClass('active-post-num'); 95 } else { 96 nextPost.fadeIn(1500); 97 nextPost.addClass('active-post'); 98 nextNum.addClass('active-post-num'); 99 $('.slider-nums').stop(true, false).animate({ 100 'left': $('.slider-nums').position().left - 30 101 }, 500) 102 } 103 104 mainPostHeight = setInterval(function(){ 105 $('.main-news').height($('.main-post-wrapper.active-post').height()) 106 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 107 'line-height': $('.main-post-wrapper.active-post').height()+'px' 108 }) 109 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 110 'top': 0 111 }) 112 113 }, 100) 114 115 autoPlayTo = setTimeout(function(){ 116 autoPlayInt = setInterval(function(){ 117 $('.main-news .fa-chevron-right').trigger('click') 118 }, 5000) 119 }, 5000) 120 121 } 122 123 124 125 $(document).on('click', '.main-news .fa-chevron-right', function(){ 126 127 if(clickGuard == true){ 128 sliderRightClick(); 129 clickGuard = false; 130 setTimeout(function(){ 131 clickGuard = true 132 }, 1000); 133 } 134 135 }) 136 137 function sliderLeftClick(){ 138 clearInterval(mainPostAdaptive) 139 clearInterval(mainPostHeight) 140 clearInterval(autoPlayInt) 141 clearInterval(autoPlayTo) 142 143 var currentPost = $('.main-post-wrapper.active-post'), 144 currentPostIndex = currentPost.index('.main-post-wrapper'), 145 prevPostIndex = currentPostIndex - 1, 146 prevPost = $('.main-post-wrapper').eq(prevPostIndex), 147 currentNum = $('.slider-nums .active-post-num'), 148 currentNumIndex = $('.slider-nums .active-post-num').index('.slider-nums i'), 149 prevNumIndex = currentNumIndex - 1, 150 prevNum = $('.slider-nums i').eq(prevNumIndex); 151 152 $('.main-post-wrapper').stop(true, true).fadeOut(1500); 153 $('.main-post-wrapper').removeClass('active-post'); 154 155 if(prevPostIndex < 0) { 156 $('.main-post-wrapper').eq(mainPostlength-1).fadeIn(1500); 157 $('.main-post-wrapper').eq(mainPostlength-1).addClass('active-post'); 158 $('.slider-nums').animate({ 159 'left': -(mainPostlength * 30)+30 160 }) 161 } else { 162 prevPost.fadeIn(1500); 163 prevPost.addClass('active-post'); 164 $('.slider-nums').animate({ 165 'left': $('.slider-nums').position().left + 30 166 }) 167 } 168 169 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right') 170 171 mainPostHeight = setInterval(function(){ 172 $('.main-news').height($('.main-post-wrapper.active-post').height()) 173 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 174 'line-height': $('.main-post-wrapper.active-post').height()+'px' 175 }) 176 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 177 'top': 0 178 }) 179 }, 100) 180 181 autoPlayTo = setTimeout(function(){ 182 autoPlayInt = setInterval(function(){ 183 $('.main-news .fa-chevron-right').trigger('click') 184 }, 5000) 185 }, 5000) 186 187 } 188
189 $(document).on('click', '.main-news .fa-chevron-left', function(){ 190 191 if(clickGuard == true){ 192 sliderLeftClick(); 193 clickGuard = false; 194 setTimeout(function(){ 195 clickGuard = true 196 }, 1000); 197 } 198 }) 199 200 setTimeout(function(){ 201 202 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 203 'line-height': $('.main-post-wrapper.active-post').height()+'px' 204 }) 205 206 for(var i=0; i<mainPostlength; i++) { 207 $('.slider-num-list').append('<i>'+Number.parseInt(i+1)+'</i>') 208 if(i == 0){ 209 $('.slider-nums').append('<i class="active-post-num">'+Number.parseInt(i+1)+'</i>') 210 } else { 211 $('.slider-nums').append('<i>'+Number.parseInt(i+1)+'</i>') 212 } 213 } 214 215 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 216 'top': 0 217 }) 218 219 $('.slider-nums-wrap').delay(250).fadeIn(500); 220 $('.slider-num-list').width($('.main-news').width()); 221 $('.slider-num-list').css({ 222 'left': -$('.main-news').width() + 148 +'px', 223 'padding-right': '164px' 224 }) 225 226 }, 5000) 227 228 $('.main-news').prepend('<div class="slider-nums-wrap"><div class="slider-num-list"></div><div class="slider-num-controllers"><i class="mid-i">из</i><i>'+mainPostlength+'</i></div><div class="slider-nums-wrap-2"><div class="slider-nums"></div></div></div>'); 229 230 $(window).blur(function(){ 231 clearInterval(mainPostHeight); 232 clearInterval(mainPostAdaptive); 233 clearInterval(autoPlayInt); 234 clearInterval(autoPlayTo) 235 }) 236 237 $(window).focus(function(){ 238 mainPostAdaptivefunc(); 239 autoPlayTo = setTimeout(function(){ 240 autoPlayInt = setInterval(function(){ 241 $('.main-news .fa-chevron-right').trigger('click') 242 }, 5000) 243 }, 5000) 244 }) 245 246 $('.main-news, .main-news *').mousedown(function(e){ 247 e.preventDefault() 248 }) 249 250 //ÐÑÐ±Ð¾Ñ ÑÑÑаниÑÑ 251 252 $('body').on('click', '.slider-num-list>i', function(){ 253 254 if(clickGuard == true){ 255 clearInterval(autoPlayInt) 256 clearInterval(autoPlayTo) 257 258 var ths = $(this), 259 thsIndex = ths.index('.slider-num-list>i'); 260 261 $('.main-post-wrapper').stop(true, true).removeClass('active-post'); 262 $('.main-post-wrapper').stop(true, true).fadeOut(1500); 263 $('.slider-num-list>i').stop(true, true).removeClass('active-post-num'); 264 $('.main-post-wrapper').eq(thsIndex).addClass('active-post'); 265 $('.main-post-wrapper').eq(thsIndex).fadeIn(1500); 266 $('.slider-nums').animate({ 267 'left': -thsIndex*30+'px' 268 }) 269 ths.addClass('active-post-num'); 270 271 mainPostHeight = setInterval(function(){ 272 $('.main-news').height($('.main-post-wrapper.active-post').height()) 273 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 274 'line-height': $('.main-post-wrapper.active-post').height()+'px' 275 }) 276 $('.main-news .fa-chevron-left, .main-news .fa-chevron-right').css({ 277 'top': 0 278 }) 279 }, 100) 280 281 autoPlayTo = setTimeout(function(){ 282 autoPlayInt = setInterval(function(){ 283 $('.main-news .fa-chevron-right').trigger('click') 284 }, 5000) 285 }, 5000) 286 clickGuard = false; 287 setTimeout(function(){ 288 clickGuard = true 289 }, 1000); 290 } 291 292 }) 293 294 295 autoPlayTo = setTimeout(function(){ 296 autoPlayInt = setInterval(function(){ 297 $('.main-news .fa-chevron-right').trigger('click') 298 }, 5000) 299 }, 5000) 300 301});
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.