1var TimeToEvent = function(){ 2 var now = new Date(); 3 var event = new Date('October 31 2015 10:00:00'); 4 olDay = Math.floor( ( event.getTime() - now.getTime() ) /1000/60/60/24 ); 5 olHour = Math.floor( ( event.getTime() - now.getTime() ) /1000/60/60 ); 6 olMin = Math.floor( ( event.getTime() - now.getTime() ) /1000/60 ); 7 olSec = Math.floor( ( event.getTime() - now.getTime() ) /1000 ); 8 olDay = olDay < 0 ? 0 : olDay; 9 olHour = olHour < 0 ? 0 : olHour; 10 olMin = olMin < 0 ? 0 : olMin; 11 olSec = olSec < 0 ? 0 : olSec; 12 $('.timer span').html('Ðней '+olDay+' : ЧаÑов '+( olHour - (olDay * 24) )+' : ÐинÑÑ '+( olMin - ( olHour * 60) ) ); 13 //setTimeout( TimeToEvent, 10000); 14} 15Date.prototype.getUnixTime = function() { return this.getTime()/1000|0 }; 16if(!Date.now) Date.now = function() { return new Date(); } 17Date.time = function() { return Date.now().getUnixTime(); } 18function proURIDecoder(val) 19{ 20 val=val.replace(/\+/g, '%20'); 21 var str=val.split("%"); 22 var cval=str[0]; 23 for (var i=1;i<str.length;i++) 24 { 25 cval+=String.fromCharCode(parseInt(str[i].substring(0,2),16))+str[i].substring(2); 26 } 27 28 return cval; 29} 30$(document).ready(function() { 31 32 //IE 9 и менÑÑе 33 if( document.all && !window.atob ) 34 $('#content').html( 35 '<div class="block">'+ 36 '<h1>ÐепÑавилÑно оÑобÑажаеÑÑÑ ÑайÑ</h1><br/>'+ 37 '<p>ÐожалÑйÑÑа, ÑледÑйÑе ÑÑой инÑÑÑÑкÑии:</p><br/>'+ 38 '<ul>'+ 39 '<li>обновиÑе ÑÑÑаниÑÑ, нажав на клавиаÑÑÑе Ctrl + F5 (одновÑеменно обе клавиÑи). ÐождиÑеÑÑ Ð¿Ð¾Ð»Ð½Ð¾Ð¹ загÑÑзки обновлениÑ'+ 40 'ÑÑÑаниÑÑ.</li>'+ 41 '<li>УбедиÑеÑÑ, ÑÑо Ñ Ð²Ð°Ñ ÑÑÑановлена поÑледнÑÑ Ð²ÐµÑÑÐ¸Ñ Ð¸ÑполÑзÑемого бÑаÑзеÑа. Рболее ÑÐ°Ð½Ð½Ð¸Ñ Ð²ÐµÑÑиÑÑ Ð¼Ð¾Ð³ÑÑ Ð½Ð°Ð±Ð»ÑдаÑÑÑÑ'+ 42 'оÑибки пÑи ÑабоÑе некоÑоÑÑÑ ÑовÑеменнÑÑ ÑÐµÑ Ð½Ð¾Ð»Ð¾Ð³Ð¸Ð¹. ÐÑи Ð½ÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ÑÑи обновиÑе бÑаÑзеÑ. СкаÑаÑÑ Ð¸ ÑÑÑановиÑÑ ÑвежÑÑ'+ 43 'веÑÑÐ¸Ñ Ð±ÑаÑзеÑа можно <a href="http://windows.microsoft.com/ru-ru/internet-explorer/ie-11-worldwide-languages">здеÑÑ.</a>'+ 44 '</li></div>'); 45 46 var body = document.querySelector('body'); 47 document.oncopy = function () { 48 var bodyElement = document.body; 49 var selection = window.getSelection(); 50 var href = document.location.href; 51 var copyright = '\n' + 'ÐÑÑоÑник - ÑÐ°Ð¹Ñ ÐолÑного ÑкономиÑеÑкого обÑеÑÑва РоÑÑии, ' + decodeURI(window.location.href); 52 var text = selection + copyright; 53 var divElement = document.createElement('div'); 54 divElement.style.position = 'absolute'; 55 divElement.style.left = '-99999px'; 56 divElement.innerHTML = text; 57 bodyElement.appendChild(divElement); 58 selection.selectAllChildren(divElement); 59 console.log(selection); 60 setTimeout(function() { bodyElement.removeChild(divElement); }, 0); 61 }; 62 63 if( navigator.userAgent.toLowerCase().indexOf('firefox') > -1 || 64 navigator.userAgent.toLowerCase().indexOf('microsoft internet explorer') > -1 || 65 navigator.userAgent.toLowerCase().indexOf('rv:') > -1 66 ){ 67 $('.veo-250 .left .preview figure p').css({'font-size': '15.5px'}); 68 $('.veo-slider-b .slider-wrapper .slider figure p').css({'font-size': '13px'}); 69 70 } 71 72 $(document).on('scroll',function(){ 73 if( $(this).scrollTop() > 50 ) 74 $('.up').show(); 75 else 76 $('.up').hide(); 77 }); 78 79 $('.up').on('click', function(){ 80 $('body,html').animate({'scrollTop': 0}, 1000 ); 81 }); 82 83 84 $('.veo-actions .slider' ).bxSlider({ 85 slideWidth: 390, 86 slideMargin: 0, 87 minSlides: 1, 88 maxSlides: 1, 89 moveSlides: 1, 90 pager: false, 91 onSlideAfter: function( elem, oldIndex, newIndex){ 92 $('.veo-actions .link').data('where', elem.attr('rel')); 93 } 94 }); 95 96 $('.veo-slider-c.experts .slider' ).bxSlider({ 97 slideWidth: 370, 98 slideMargin: 10, 99 minSlides: 3, 100 maxSlides: 3, 101 moveSlides: 1, 102 pager: false 103 }); 104 $('.veo-slider-c .slider' ).bxSlider({ 105 slideWidth: 370, 106 slideMargin: 10,
107 minSlides: 3, 108 maxSlides: 3, 109 moveSlides: 1, 110 pager: false 111 }); 112 113 $('.veo-slider-c.logos .slider').bxSlider({ 114 slideWidth: 360, 115 slideMargin: 10, 116 minSlides: 3, 117 maxSlides: 3, 118 moveSlides: 1, 119 pager: false 120 }); 121 122 $('.veo-slider-c.partners .slider' ).bxSlider({ 123 slideWidth: 360, 124 slideMargin: 10, 125 minSlides: 3, 126 maxSlides: 3, 127 moveSlides: 1, 128 pager: false 129 }); 130 131 $('.veo-slider-c.doers .slider' ).bxSlider({ 132 slideWidth: 220, 133 slideMargin: 10, 134 minSlides: 5, 135 maxSlides: 5, 136 moveSlides: 1, 137 pager: false 138 }); 139 140 $('.veo-data-list .left .slider' ).bxSlider({ 141 slideWidth: 290, 142 slideMargin: 0, 143 minSlides: 1, 144 maxSlides: 1, 145 moveSlides: 1, 146 pager: false 147 }); 148 149 $('#myCarousel').on('slid.bs.carousel', function() { 150 //alert("slid"); 151 }); 152 var arrCalendar = null; 153 var date = new Date(); 154 var start = date.getFullYear() + '-' + ("0" + (parseInt(date.getMonth())+parseInt(1))).slice(-2) + '-01'; 155 var finish = date.getFullYear() + '-' + ("0" + (parseInt(date.getMonth())+parseInt(1))).slice(-2) + '-31'; 156 var url = "/ajax/event.php?b="+start+"&f="+finish; 157 $.ajax({ 158 url: url, 159 async: false 160 }).done(function(data) { 161 arrCalendar = data; 162 }); 163 164 $('#calendar-container').datepicker({ 165 language: "ru", 166 todayHighlight: true, 167 /*templates:{ 168 leftArrow: '<', 169 rightArrow: '>' 170 },*/ 171 beforeShowDay: function (date){ 172 //console.log(date.toString()); 173 let curDate = ("0" + (date.getDate())).slice(-2) + '.' + ("0" + (parseInt(date.getMonth())+parseInt(1))).slice(-2) + '.' + date.getFullYear(); 174 if(arrCalendar!=null && arrCalendar['items'] !== undefined ){ 175 if( arrCalendar['items'][curDate] !== undefined ){ 176 return { 177 tooltip: 'ÐÑего ÑобÑÑий:' + arrCalendar['items'][curDate].length, 178 classes: 'active' 179 }; 180 } 181 } 182 if (date.getMonth() == (new Date()).getMonth()){ 183 184 } 185 /*switch (date.getDate()){ 186 case 4: 187 return { 188 tooltip: 'Example tooltip', 189 classes: 'active', 190 content: '4+' 191 }; 192 case 8: 193 return false; 194 case 12: 195 return "green"; 196 }*/ 197 } 198 }).on('changeDate',function(e){ 199 var $target = $(e.currentTarget); 200 var timestamp = $target.data('date'); 201 var date = new Date(e.date); 202 var start = date.getFullYear() + '-' + ("0" + (parseInt(date.getMonth())+parseInt(1))).slice(-2) + '-' + ("0" + (date.getDate())).slice(-2); 203 var finish = start; 204 var url = "/ajax/event.php?b="+start+"&f="+finish; 205 $.ajax({ 206 url: url 207 }).done(function(data) { 208 if(data['count']>0){ 209 $('#calendarEvent .modal-title').html('СобÑÑÐ¸Ñ ' + start); 210 var text = '<ol>'; 211 var name = new Array(); 212 var i = 0; 213 for (var key in data['items']) { 214 if (data['items'].hasOwnProperty(key)) { 215 for (var subkey in data['items'][key]) { 216 name[i] = '<li><a href="' + data['items'][key][subkey]['DETAIL_PAGE_URL'] + '" >' + data['items'][key][subkey]['NAME'] + '</a></li>'; 217 i++; 218 } 219 } 220 } 221 text += name.join('') + "</ol>"; 222 console.log(name); 223 $('#calendarEvent .modal-body p').html('<h4>СобÑÑиÑ</h4> ' + text); 224 $('#calendarEvent').modal({ 225 keyboard: false 226 }); 227 } 228 }); 229 }).on('changeMonth',function(e){ 230 var $target = $(e.currentTarget); 231 var timestamp = $target.data('date'); 232 var date = new Date(e.date); 233 var start = date.getFullYear() + '-' + ("0" + (parseInt(date.getMonth())+parseInt(1))).slice(-2) + '-01'; 234 var finish = date.getFullYear() + '-' + ("0" + (parseInt(date.getMonth())+parseInt(1))).slice(-2) + '-31'; 235 var url = "/ajax/event.php?b="+start+"&f="+finish; 236 $.ajax({ 237 url: url, 238 async: false 239 }).done(function(data) { 240 arrCalendar = data; 241 }); 242 243 }); 244 $('#calendar-container').datepicker('update'); 245 $('#calendar-container').on('click', '.click-date',function(){ 246 console.log(this); 247 }); 248 var min, max, line, current, left, widthLine; 249 min = 1766; 250 max = 2016; 251 line = max - min; 252 var timelineWidth = $('section .history').width(); 253 var timelineStep = Math.floor(timelineWidth/(max-min)); 254 $('section.history .year1850').css('left', timelineStep*(1750-min)); 255 $('section.history .line.year1800').css('left', timelineStep*(1800-min)); 256 $('section.history .year1850').css('left', timelineStep*(1850-min)); 257 $('section.history .line.year1900').css('left', timelineStep*(1900-min)); 258 $('section.history .year1950').css('left', timelineStep*(1950-min)); 259 $('section.history .line.year2000').css('left', timelineStep*(2000-min)); 260 $('section.history .year2050').css('left', timelineStep*(2050-min)); 261 $('.veo-slider-b .slider' ).bxSlider({ 262 slideWidth: 313, 263 speed: 200, 264 slideMargin: 15, 265 minSlides: 1, 266 maxSlides: 3, 267 moveSlides: 1, 268 pager: false, 269 infiniteLoop: true, 270 onSlideAfter: function($slideElement, oldIndex, newIndex){ 271 $('.veo-slider-b .slider figure').removeClass('active'); 272 $('section .dot').removeClass('hidden'); 273 274 $($slideElement).addClass('active'); 275 let year = $($slideElement).find('h2').text();
276 year = year.split(' - ')[0]; 277 left = ((year-min)*timelineStep); 278 $('section .dot').css('left', left); 279 280 if(left>150){ 281 widthLine = left-164; 282 $('section .history .lineline').removeClass('hidden'); 283 $('section .history .lineline2').addClass('hidden'); 284 $('section .history .lineline').css('width', widthLine); 285 }else{ 286 widthLine = 174+left; 287 $('section .history .lineline2').removeClass('hidden'); 288 $('section .history .lineline').addClass('hidden'); 289 $('section .history .lineline2').css('left', left+10); 290 $('section .history .lineline2').css('width', widthLine); 291 } 292 293 } 294 }); 295 296 var $text = $('a.active').text(); 297 var $loc = 'location.href'; 298 if(location.pathname.indexOf($text)) { 299 var $c = $('#year-menu .book-row').length - $('a.active').parent().parent().parent().index() + 1; 300 if($c == $('#year-menu .book-row').length) { 301 $c = 0; 302 } 303 } 304 $('#year-menu').ulslide({ 305 effect: { 306 type: 'carousel', // slide or fade 307 axis: 'y', // x, y 308 showCount: 2 309 }, 310 width: 785, 311 height: 48, 312 bnext: '#slide1_prev', 313 bprev: '#slide1_next', 314 duration: 500, 315 current:$c, 316 autoslide: 0 317 }); 318 319 $('a.fancy').fancybox({ 320 prevEffect : 'none', 321 nextEffect : 'none', 322 323 closeBtn : false, 324 arrows : false, 325 nextClick : true, 326 327 helpers : { 328 thumbs : { 329 width : 100, 330 height : 100 331 } 332 } 333 }); 334 335 $('.fancy-call').on('click', function( e ){ 336 e.preventDefault(); 337 var param = $.param( {'CFORM': $(this).data('cform'), 'IBLOCK': $(this).data('iblock'), 'ITEM': $(this).data('item')} ); 338 var where = $(this).data('where'); 339 var title = {'form_text_78' : 'ФамилиÑ', 'form_text_79' : 'ÐÐ¼Ñ ÐÑÑеÑÑво', 'form_text_80' : 'ÐолжноÑÑÑ Ð¸ меÑÑо ÑабоÑÑ', 'form_text_81' : 'УÑÐµÐ½Ð°Ñ ÑÑепенÑ', 'form_text_82' : 'e-mail', 'form_text_83' : 'СоÑовÑй ÑелеÑон'}; 340 $.fancybox({ 341 type: 'ajax', 342 href: $(this).attr('rel')+'?'+param, 343 afterShow: function(){ 344 $('input[name=form_hidden_18]').val( where ); 345 $('.inputtext').each(function(index){ 346 var val = $(this).val(); 347 var id = $(this).attr('name'); 348 //val = title[id]; 349 //console.log(val); 350 $(this).attr('placeholder', val ).val(''); 351 }); 352 $('.inputtextarea').each(function(index){ 353 var val = $(this).val(); 354 $(this).attr('placeholder', val ).val(''); 355 }); 356 357 }, 358 beforeShow: function(){ 359 $('.ajax-slider .slider').nivoSlider({ 360 manualAdvance: true, 361 controlNav: false, 362 prevText: '', 363 nextText: '', 364 }); 365 } 366 }); 367 }); 368 369 $("body").on('submit', 'form', function(event){ 370 if( $( this ).hasClass('search-line') ) 371 return; 372 373 event.preventDefault(); 374 $.fancybox.showLoading(); 375 $(this).ajaxForm(); 376 $(this).ajaxSubmit({ 377 uploadProgress: function(event, position, total, percent){ 378 }, 379 success: function( data ) { 380 $.fancybox.hideLoading(); 381 if( data !== 'success' ) 382 $('.form-errors').html(data); 383 else 384 $.fancybox.close(); 385 }, 386 onerror: function(){ 387 $.fancybox.hideLoading(); 388 } 389 }); 390 }); 391 392 393 $(window).scroll(function () { 394 if ($(this).scrollTop() > 100) { 395 $('.scrollup').fadeIn(); 396 } else { 397 $('.scrollup').fadeOut(); 398 } 399 }); 400 401 $('.scrollup').click(function () { 402 $("html, body").animate({ 403 scrollTop: 0 404 }, 600); 405 return false; 406 }); 407 408 409});
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.