1$(document).ready(function(){ 2 3 if($(".detail-news-page") != null) { 4 $(".detail-news-page").find(".text").find("b").first().after('<p></p><ntvk id="v8wju0AqDA"></ntvk><p></p>'); 5 6 //$(".natimatica_video").html('<ntvk id="v8wju0AqDA"></ntvk>'); 7 } 8 9 $(".search_btn").click(function(){ 10 $(".search_suggest").toggle(); 11 }); 12 13 14 function getMoscowDate() 15 { 16 var offset = +3; 17 var moskowDate = new Date( new Date().getTime() + offset * 3600 * 1000); 18 $("#doc_time .day").text(moskowDate.getUTCDate()); 19 var arrMonth = ['ЯнваÑÑ', 'ФевÑалÑ', 'ÐаÑÑа', 'ÐпÑелÑ', 'ÐаÑ', 'ÐÑнÑ', 'ÐÑлÑ', 'ÐвгÑÑÑа', 'СенÑÑбÑÑ', 'ÐкÑÑбÑÑ', 'ÐоÑбÑÑ', 'ÐекабÑÑ' ]; 20 $("#doc_time .month").text(arrMonth[moskowDate.getUTCMonth()]); 21 $("#doc_time .times").text(moskowDate.getUTCHours()+":"+moskowDate.getUTCMinutes()+" ÐСÐ"); 22 } 23 getMoscowDate(); 24 setInterval(function(){getMoscowDate();}, 60*1000); 25 26 $(".soc_block .item").click(function(){ 27 $(".soc_block .item").removeClass("active"); 28 $(this).addClass("active"); 29 $(".soc_block .soc_content .item"+$(this).data("elem")).addClass("active"); 30 }); 31 32 33 //resizeSlide(); 34 resizeImage(); 35 resizeLeftBlock(); 36 fontSizeNew(); 37 38 if($(window).width() >= 550) 39 { 40 weather(); 41 } 42 43 if($(window).width() >= 800) 44 { 45 currency(); 46 } 47 48 49 $(".add_short_news").click(function(){ 50 var lastDate = $(".short_news .item:last").data("lastdate"); 51 console.log(lastDate); 52 $.ajax({ 53 url: "/ajax/short_news.php", 54 method: "POST", 55 type: "POST", 56 data: {lastdate: lastDate}, 57 success: function(msg){ 58 $(".add_short_news").before(msg); 59 } 60 }); 61 }); 62 63 Calendar2("calendar2", new Date().getFullYear(), new Date().getMonth()); 64 // пеÑеклÑÑаÑÐµÐ»Ñ Ð¼Ð¸Ð½ÑÑ Ð¼ÐµÑÑÑ 65 $('.calendar .cal_title .arrow:last-child').click(function(){ 66 Calendar2("calendar2", document.querySelector('.calendar .cal_title .text').dataset.year, parseFloat(document.querySelector('.calendar .cal_title .text').dataset.month)+1); 67 }); 68 69 $('.calendar .cal_title .arrow:first-child').click(function(){ 70 Calendar2("calendar2", document.querySelector('.calendar .cal_title .text').dataset.year, parseFloat(document.querySelector('.calendar .cal_title .text').dataset.month)-1); 71 }); 72 73 74 $("#news_form").on("submit", function(){ 75 $.ajax({ 76 url: "/ajax/news_form.php", 77 method: "POST", 78 type: "POST", 79 data: $("#news_form").serialize(), 80 success: function(msg){ 81 $("#news_form").html(msg); 82 } 83 }); 84 }); 85 86 87 88 89}); 90 91function CalendarClick(e) 92{ 93 var date = e.data("day"); 94 //alert(date); 95 location.href="/news/?date="+date; 96} 97 98 99 $(document).on("change", ".device-menu", function(){ 100 var locations = $(this).val(); 101 //alert("ÐедÑÑÑÑ ÑÐµÑ Ð½Ð¸ÑеÑкие ÑабоÑÑ!!\n"+locations); 102 if( locations !== '#' ) { 103 window.location.href = $(this).val(); 104 }; 105 }); 106 107 108 109 110function Calendar2(id, year, month) { 111var Dlast = new Date(year,month+1,0).getDate(), 112 D = new Date(year,month,Dlast), 113 DNlast = new Date(D.getFullYear(),D.getMonth(),Dlast).getDay(), 114 DNfirst = new Date(D.getFullYear(),D.getMonth(),1).getDay(), 115 calendar = '<tr>', 116 month=["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑ","ÐпÑелÑ","Ðай","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑ","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"]; 117if (DNfirst != 0) { 118 for(var i = 1; i < DNfirst; i++) calendar += '<td></td>'; 119}else{ 120 for(var i = 0; i < 6; i++) calendar += '<td></td>'; 121} 122for(var i = 1; i <= Dlast; i++) { 123 thisMonth = D.getMonth() + 1; 124 if (i == new Date().getDate() && D.getFullYear() == new Date().getFullYear() && D.getMonth() == new Date().getMonth()) { 125 calendar += '<td class="today" data-day="'+i+'.'+thisMonth+'.'+D.getFullYear()+'" onclick="CalendarClick($(this));">' + i + '</td>'; 126 }else{ 127 calendar += '<td data-day="'+i+'.'+thisMonth+'.'+D.getFullYear()+'" onclick="CalendarClick($(this));">' + i + '</td>'; 128 } 129 if (new Date(D.getFullYear(),D.getMonth(),i).getDay() == 0) { 130 calendar += '<tr>'; 131 } 132} 133if(DNlast != 0) 134{ 135 for(var i = DNlast; i < 7; i++) calendar += '<td> </td>'; 136} 137document.querySelector('#'+id+' tbody').innerHTML = calendar; 138document.querySelector('.calendar .cal_title .text').innerHTML = month[D.getMonth()] +' '+ D.getFullYear(); 139document.querySelector('.calendar .cal_title .text').dataset.month = D.getMonth(); 140document.querySelector('.calendar .cal_title .text').dataset.year = D.getFullYear(); 141 142} 143 144 145 146function resizeLeftBlock() 147{ 148 if($("#wrapsite").outerWidth() <= 750) 149 { 150 var pdiv = $('.main_left_block'); 151 pdiv.insertAfter($('.main_center_block')); 152 } 153 else 154 { 155 var pdiv = $('.main_left_block'); 156 pdiv.insertBefore($('.main_center_block')); 157 } 158} 159 160 161function currency() 162{ 163 $.ajax({ 164 url: "/ajax/currency.php", 165 method: "POST", 166 type: "POST", 167 success: function(msg){ 168 var arr = msg.split(' '); 169 if(arr[0] != "") 170 { 171 $(".usd_info .usd").text(arr[0]); 172 } 173 else 174 { 175 $(".usd_info").hide(); 176 } 177 178 if(arr[1] != "") 179 { 180 $(".euro_info .eur").text(arr[1]); 181 } 182 else 183 { 184 $(".euro_info").hide(); 185 } 186 } 187 }); 188} 189 190function weather() 191{ 192 $.ajax({ 193 url: "/ajax/weather.php", 194 method: "POST", 195 type: "POST", 196 success: function(msg){ 197 if(msg != "") 198 { 199 $(".sun_info .temperature").text(msg); 200 } 201 else 202 { 203 $(".sun_info").hide(); 204 } 205 } 206 }); 207} 208 209 210 211function resizeImage() 212{ 213 var max_height = $(".main_news_block .item").width()*3/4; 214 $(".main_news_block .item .img").css("height", max_height+"px"); 215} 216 217function resizeSlide() 218{ 219 if($("#wrapsite").outerWidth() > 750) 220 { 221 var oneSlideHeight = ($('.exclusive_slider').parent().height() - 15)/2; 222 $(".last_news .slide").css("height", oneSlideHeight+"px"); 223 } 224 else 225 { 226 $(".last_news .slide").css("height", "auto"); 227 } 228 229 $(".last_news .slide").each(function( index ) { 230 var oneImg = $(this).find(".more_img").width() - 20; 231 if(oneImg > 0) 232 $(this).find(".more_info").css("width", oneImg+"px"); 233 }); 234} 235 236$(window).resize(function(){ 237 resizeImage(); 238 //resizeSlide(); 239 resizeLeftBlock(); 240 fontSizeNew(); 241}); 242 243 244function fontSizeNew() 245{ 246 // ÑиÑина, Ð¾Ñ ÐºÐ¾ÑоÑой Ð¸Ð´ÐµÑ Ð¾ÑÑÑÐµÑ 247 var width = 1200; 248 // минималÑнÑй ÑÐ°Ð·Ð¼ÐµÑ ÑÑиÑÑа 249 var fontSize = 20; 250 // ТекÑÑÐ°Ñ ÑиÑина ÑайÑа 251 var bodyWidth = $('#wrapsite').width(); 252 253 if(bodyWidth > 1024) 254 { 255 $('html').css({fontSize: '20px'}); 256 } 257 else 258 { 259 $('html').css({fontSize: '24px'}); 260 } 261} 262 263 264function fontSize() 265{ 266 // ÑиÑина, Ð¾Ñ ÐºÐ¾ÑоÑой Ð¸Ð´ÐµÑ Ð¾ÑÑÑÐµÑ 267 var width = 1200; 268 // минималÑнÑй ÑÐ°Ð·Ð¼ÐµÑ ÑÑиÑÑа 269 var fontSize = 20; 270 // ТекÑÑÐ°Ñ ÑиÑина ÑайÑа 271 var bodyWidth = $('#wrapsite').width(); 272 // ÐножиÑÐµÐ»Ñ 273 var multiplier = bodyWidth / width; 274 275 if(bodyWidth > 1024) 276 { 277 if (bodyWidth >= width) 278 fontSize = Math.floor(fontSize * multiplier); 279 $('html').css({fontSize: fontSize+'px'}); 280 } 281 else if(bodyWidth > 900) 282 { 283 $('html').css({fontSize: '17px'}); 284 } 285 else 286 { 287 $('html').css({fontSize: '16px'}); 288 } 289}
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.