1// ÑÑнкÑÐ¸Ñ Ð¿ÐµÑемеÑÐ¸Ð²Ð°Ð½Ð¸Ñ Ð¼Ð°ÑÑива 2Array.prototype.shuffle = function() { 3 for (var i = this.length - 1; i > 0; i--) { 4 var num = Math.floor(Math.random() * (i + 1)); 5 var d = this[num]; 6 this[num] = this[i]; 7 this[i] = d; 8 } 9 return this; 10} 11 12// Смена баннеÑа-Ñкз 13function swapTKZ(){ 14 var $active = $('#banner-tkz .active'); 15 var $next = ($active.next().length > 0) ? $active.next() : $('#banner-tkz img:first'); 16 $next.css('z-index',2);//move the next image up the pile 17 $active.fadeOut(1500,function(){//fade out the top image 18 $active.css('z-index',1).show().removeClass('active');//reset the z-index and hide the image 19 $next.css('z-index',3).addClass('active');//make the next image the top one 20 }); 21} 22 23// Смена баннеÑа-вÑÑÑего балла 24function swapBall(){ 25 var $active = $('#banner-ball .active'); 26 var $next = ($active.next().length > 0) ? $active.next() : $('#banner-ball img:first'); 27 $next.css('z-index',2);//move the next image up the pile 28 $active.fadeOut(1500,function(){//fade out the top image 29 $active.css('z-index',1).show().removeClass('active');//reset the z-index and hide the image 30 $next.css('z-index',3).addClass('active');//make the next image the top one 31 }); 32} 33 34// Ð¡Ð¾Ð·Ð´Ð°ÐµÑ ÐºÐ°ÑÑики в Ð´Ð»Ñ ÑлайдеÑа инÑеÑвÑÑ 35// каÑÑинки ÑаÑÐ¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ñ Ð² background-url, ÑÑÐ¾Ð±Ñ Ð½Ðµ гÑÑзилиÑÑ Ð¿Ñи оÑкÑÑÑии 36// каÑÑинки ÑаÑÐ¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ñ Ñандомно 37function createImgsToSlide(containerId,prefix,qty){ 38 var container = $(containerId); // опÑеделиÑÑ ÑлеменÑ, ÑодеÑжаÑий каÑÑинки 39 $('.img a', container).append('<span class="swap-group"></span>'); // добавиÑÑ ÐºÐ¾Ð½ÑÐµÐ¹Ð½ÐµÑ Ð´Ð»Ñ ÑлайдеÑа 40 var arrNums = []; for(i=1;i<=qty;i++){arrNums.push(i);} // ÑоздаÑÑ Ð¼Ð°ÑÑив ÑиÑел 41 arrNums.shuffle(); // пеÑемеÑаÑÑ ÑлеменÑÑ 42 $.each(arrNums,function() { // добавиÑÑ ÐºÐ°ÑÑинки 43 url = '/bitrix/templates/twit_main/img/press-inter/'+prefix+'-'+this+'.jpg'; 44 ie_fix = "filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"',sizingMethod='scale')"; 45 $('.swap-group', container).append('<span class="hidden swap-el"><span style="background-image:url('+url+');'+ie_fix+'" class="swap-img"></span></span>'); 46 }); 47 $('.swap-group .swap-el:first',container).removeClass('hidden').addClass('active'); // показаÑÑ Ð²ÐµÑÑ Ð½ÑÑ ÐºÐ°ÑÑÐ¸Ð½ÐºÑ 48 $('div a img',container).remove(); // ÑбÑаÑÑ Ð´ÐµÑолÑнÑÑ (коÑоÑÑÑ ÑгенеÑил ÑеÑвеÑ) 49} 50// Смена ÑазнÑÑ ÑлеменÑов (пока-ÑÑо инÑеÑвÑÑ) 51function slideSomething(containerId){ 52 var $container = $(containerId + ' .swap-group'); 53 var $active = $('span.active ',$container); 54 var $next = ($active.next().length > 0) ? $active.next() : $('span:first', $container); 55 $next.css('z-index',2).removeClass('hidden');//move the next image up the pile 56 $active.fadeOut(1500,function(){//fade out the top image 57 $active.css('z-index',1).show().removeClass('active'); //reset the z-index and hide the image 58 $next.css('z-index',3).addClass('active');//make the next image the top one 59 }); 60} 61 62$(function() 63{ 64 /* Ðа вÑÐµÑ ÑÑÑаниÑÐ°Ñ */ 65 66 /* Ð¤Ð¸ÐºÑ bootstrap dropdown menu Ð´Ð»Ñ iPad */ 67 $('.dropdown-menu').on('touchstart.dropdown.data-api', function(e) { 68 e.stopPropagation(); 69 }); 70 71 /* СпиÑок Ñилиалов */ 72 $("#branch").hover(function(){ 73 $('#branch_open').css({'visibility': 'visible', display:'block'}); 74 $("#branch").css({background: 'url("/bitrix/templates/bit_main/images/branch-bg-open.png") no-repeat'}); 75 $("#branch ul").eq(0).css({background: 'url("/bitrix/templates/bit_main/images/ul-up.png") no-repeat 140px 5px'}); 76 $("#branch .title").css({'color':'#000', 'text-decoration':'none'}); 77 },function(){ 78 $('#branch_open').css({'visibility': 'hidden', display:'none'}); 79 $("#branch").css({background: 'url("/bitrix/templates/bit_main/images/branch-bg.png") no-repeat'}); 80 $("#branch ul").eq(0).css({background: 'url("/bitrix/templates/bit_main/images/ul-bot.png") no-repeat 140px 5px'}); 81 $("#branch .title").css({'color':'#2C72A3', 'text-decoration':'underline'}); 82 }); 83 84 /* Ðа главной */ 85 86 /* Ð¡Ð»Ð°Ð¹Ð´ÐµÑ Ð±Ð°Ð½Ð½ÐµÑа ТÐÐ */ 87 if($('#banner-tkz').length){ 88 setInterval('swapTKZ()', 5000); 89 } 90 /* Ð¡Ð»Ð°Ð¹Ð´ÐµÑ Ð±Ð°Ð½Ð½ÐµÑа ÐÑÑÑего балла */ 91 if($('#banner-ball').length){ 92 setInterval('swapBall()', 5000); 93 } 94 /* Ð¡Ð»Ð°Ð¹Ð´ÐµÑ ÐºÐ°ÑÑинок-инÑеÑвÑÑ Ñо ÑÑÑденÑами и абиÑÑÑиенÑами */ 95 if($('#press-inter').length){ 96 // добавиÑÑ ÐºÑÑÑ ÐºÐ°ÑÑинок абиÑÑÑиенÑов 97 var abitContainer = '#press-inter-data li:first .tbl-row'; 98 createImgsToSlide(abitContainer, 'abit', 6); 99 // добавиÑÑ ÐºÑÑÑ ÐºÐ°ÑÑинок ÑÑÑденÑов 100 var studContainer = '#press-inter-data li:nth-child(2) .tbl-row'; 101 createImgsToSlide(studContainer, 'stud', 6); 102 // запÑÑÑиÑÑ ÑкÑипÑÑ Ñлайд-ÑÐ¾Ñ 103 setInterval('slideSomething("'+abitContainer+'")', 5000); 104 setInterval('slideSomething("'+studContainer+'")', 5000); 105 106 // до 1 апÑÐµÐ»Ñ Ð¸Ð½Ð¾Ð³Ð´Ð° менÑÑÑ ÑÑÑÐ»ÐºÑ 107 var ddd = new Date(); 108 if (ddd.getMonth() < 4 && ddd.getSeconds() % 2 == 0) {$('#press-inter .tbl-row a').last().attr('href','/events/reports/winter-session2013.php').text('Ðак ÑÑаÑÑ Ð¾ÑлиÑником');} 109 } 110 111 /* ÐаÑÑÑÐµÐ»Ñ Ð½Ð° главной */
112 if($.fn.jcarousel) { 113 $('.jcarousel').jcarousel({ 114 wrap: 'circular' 115 }); 116 117 $('.jcarousel-control-prev') 118 .on('jcarouselcontrol:active', function() { 119 $(this).removeClass('inactive'); 120 }) 121 .on('jcarouselcontrol:inactive', function() { 122 $(this).addClass('inactive'); 123 $(this).addClass('hidden'); // temp 124 }) 125 .jcarouselControl({ 126 target: '-=1' 127 }); 128 129 $('.jcarousel-control-next') 130 .on('jcarouselcontrol:active', function() { 131 $(this).removeClass('inactive'); 132 }) 133 .on('jcarouselcontrol:inactive', function() { 134 $(this).addClass('inactive'); 135 $(this).addClass('hidden'); // temp 136 }) 137 .jcarouselControl({ 138 target: '+=1' 139 }); 140 141 $('.jcarousel').jcarouselAutoscroll({ 142 interval: 5000 143 }); 144 } 145 /* ÐÐ¾Ð½ÐµÑ ÐºÐ°ÑÑÑели на главной */ 146 147 /* Смена новоÑÑей ÐÑÑÑего баллп */ 148 $(".news_year a").click(function(e){ 149 e.preventDefault(); 150 // ÑÑÐ¸Ð»Ñ Ð½Ð¾Ð²Ð¾ÑÑей 151 var year = $(this).text(); 152 $("#news .news_post:not(.hidden)").addClass('hidden'); // ÑкÑÑÑÑ Ð²Ñе 153 $("#news .news_post").each(function() { 154 // показаÑÑ Ð¸Ð· вÑбÑанного года 155 if(this.getAttribute("data-year")==year) $(this).removeClass('hidden'); 156 }); 157 // ÑÑÐ¸Ð»Ñ ÑелекÑоÑа годов 158 $(".news_year .selected").removeClass('selected'); 159 $(this).addClass('selected'); 160 161 }); 162 163 /* for new faculty page (beta) */ 164 $('.caption-fade').hover( 165 function(){ 166 $(this).find('.caption').fadeIn(250); 167 }, 168 function(){ 169 $(this).find('.caption').fadeOut(250); 170 } 171 ); 172 173 $('#extraordinary_all').click(function(){ 174 $('.tab-pane').addClass('active'); 175 }); 176 177 //$('.extraordinar__menu').scrollspy(); 178 179 180 181 $(".fancybox").fancybox(); 182 183// ФоÑоалÑÐ±Ð¾Ð¼Ñ 184 if($(".news-album").length) 185 { 186 $(".news-album a").fancybox({ 187 nextClick : true, 188 helpers : { 189 title : { 190 type : 'inside' 191 } 192 } 193 /*'transitionIn' : 'elastic', 194 'transitionOut' : 'elastic', 195 'titlePosition' : 'inside', 196 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { 197 return '<span id="fancybox-title-over">ФоÑогÑаÑÐ¸Ñ ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>'; 198 }*/ 199 }); 200 } 201 202 if($(".news-detail__column").length) 203 { 204 $(".news-detail__column a").fancybox({ 205 nextClick : true, 206 helpers : { 207 title : { 208 type : 'inside' 209 } 210 } 211 /*'transitionIn' : 'elastic', 212 'transitionOut' : 'elastic', 213 'titlePosition' : 'inside', 214 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { 215 return '<span id="fancybox-title-over">ФоÑогÑаÑÐ¸Ñ ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>'; 216 }*/ 217 }); 218 } 219 220 if($(".page-album").length) 221 { 222 $(".page-album a[rel=photo]").fancybox({ 223 nextClick : true, 224 helpers : { 225 title : { 226 type : 'inside' 227 } 228 } 229 /*'transitionIn' : 'elastic', 230 'transitionOut' : 'elastic', 231 'titlePosition' : 'inside', 232 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { 233 return '<span id="fancybox-title-over">ФоÑогÑаÑÐ¸Ñ ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>'; 234 }*/ 235 }); 236 } 237 238 /* ÐваÑÐ°Ñ ÑекÑоÑа ÑÑдом Ñ ÑообÑениÑми */ 239 if($(".faq-data").length) 240 { 241 var prev_has_img = false; 242 $(".faq-data").each(function() { 243 console.log('!!!!!'); 244 if ($(".rector-avatar", this).length) { 245 console.log('rector avatar process...'); 246 if (prev_has_img == true) { 247 $("<div class='clear'></div>").insertBefore($(this)); 248 } 249 $(".faq-left", this).append($(".rector-avatar", this)).addClass('with-avatar'); 250 prev_has_img = true; 251 } 252 else { 253 prev_has_img = false; 254 } 255 256 var textAreaWidth = $(this).find('.faq-right').width(); 257 $(this).find('.answer img').each(function () { 258 if( this.complete ) { 259 forumAnswerImageLoaded.call( this ); 260 } else { 261 $(this).one('load', forumAnswerImageLoaded); 262 } 263 264 function forumAnswerImageLoaded() { 265 if ($(this).width() < (textAreaWidth / 2 + 100)) 266 $(this).addClass('answer-img-half'); 267 else 268 $(this).addClass('answer-img-full'); 269 } 270 }) 271 }); 272 } 273 274 /* блоки, коÑоÑÑе нÑжно показÑваÑÑ-ÑкÑÑваÑÑ */ 275 if ($(".to-hide").length) 276 { 277 var toHide = $(".to-hide"); 278 toHide.delay(500).fadeIn(500); 279 var delayHide = 2000; 280 var animFunctionHide = ''; 281 282 var classNamesHide = toHide.attr('class').split(' '); 283 $.each (classNamesHide,function(i,str) { 284 if (str.indexOf('sec') > 0) { 285 delayHide = parseFloat(str) * 1000; 286 } 287 if (str.indexOf('anim-') == 0) { 288 animFunctionHide = str.split('-')[1]; 289 } 290 }); 291 292 if (toHide.hasClass("resize")) 293 { 294 toHide.delay(delayHide).animate({width: "200px", height: "150px"}); 295 } 296 else if (animFunctionHide == '') { 297 toHide.delay(delayHide).slideUp(500); 298 } 299 else { 300 toHide.delay(delayHide)[animFunctionHide](500); 301 } 302 } 303 if ($(".to-show").length) 304 { 305 var toShow = $('.to-show'); 306 var delayShow = 2000; 307 var animFunctionShow = ''; 308 309 var classNamesShow = toShow.attr('class').split(' '); 310 $.each (classNamesShow,function(i,str) { 311 if (str.indexOf('sec') > 0) { 312 delayShow = parseFloat(str) * 1000; 313 } 314 if (str.indexOf('anim-') == 0) { 315 animFunctionShow = str.split('-')[1]; 316 } 317 }); 318 319 if (animFunctionShow == '') {toShow.delay(delayShow+1000).slideDown(500);} 320 else {toShow.delay(delayShow+1500)[animFunctionShow](500);} 321 } 322 323});
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.