1jQuery.fn.exists = function() { 2 return $(this).length; 3} 4 5$(document).ready ( function () { 6 7 $('.scroll-pane').jScrollPane({ autoReinitialise: true }); 8 9 // ÑобÑÑÐ¸Ñ Ð²ÑоÑого ÑÑÐ¾Ð²Ð½Ñ Ð¼ÐµÐ½Ñ 10 var limouseover = function () { 11 var li = $(this) 12 var ul = li.children('ul:first') 13 var mwidth = li.width() 14 if ( ul.exists() ) { 15 ul.css( 'left', mwidth+'px' ) 16 } else return; 17 ul.css ( 'visibility', 'visible' ) 18 } 19 var limouseout = function () { 20 var li = $(this) 21 var ul = li.children('ul:first') 22 ul.css ( 'visibility', 'hidden' ) 23 } 24 $('.tmpl-leftmenu ul > li').bind ( 'mouseover', limouseover ) 25 $('.tmpl-leftmenu ul > li').bind ( 'mouseout', limouseout ) 26 27 set_dropdown() 28 set_responsive() 29 $(window).resize(function(){ 30 set_dropdown() 31 set_responsive() 32 }); 33 34 //ÐдапÑивноÑÑÑ Ð¸Ð·Ð¾Ð±Ñажений 35 $('.tmpl-item, .tmpl-contentblock').find('img').addClass('img-responsive'); 36 37 //ÐаÑа 38 var now = new Date(), days = ['вÑ','пн','вÑ','ÑÑ','ÑÑ','пÑ','Ñб'], months = ['ÑнваÑÑ','ÑевÑалÑ','маÑÑа','апÑелÑ','маÑ','иÑнÑ','иÑлÑ','авгÑÑÑа','ÑенÑÑбÑÑ','окÑÑбÑÑ','ноÑбÑÑ','декабÑÑ'] 39 if (now.getDate()<10) { day = '0'+now.getDate() }else{ day = now.getDate() } 40 if ((now.getMonth()+1)<10) { month = '0'+(now.getMonth()+1) }else{ month = (now.getMonth()+1) } 41 $('.Day').html('<span>'+day+'.'+month+'.'+now.getFullYear()+'</span>') 42 43 $('.tmpl-saveus').bind('click', function () { saveus() } ) 44 45 /* ÐеÑÑÐ¸Ñ Ð´Ð»Ñ ÑлабовидÑÑÐ¸Ñ */ 46 $('#check-look').bind('click', function() { 47 if ($.cookie('disabled-people')){ $.cookie('disabled-people', null, {path:'/'}); } else { $.cookie('disabled-people', true, {expires: 7, path:'/'}); } 48 location.reload(true); 49 }) 50 51 // ÐÑпадаÑÑее поле поиÑка 52 $('.tmpl-mainmenu .tmpl-search').bind( 'click', function(){ 53 var block_width = $('.tmpl-mainmenu').width()-$('.tmpl-search').width() 54 if ( $(this).hasClass('active') ) { 55 $(this).next('#search').hide(); 56 $(this).removeClass('active'); 57 $(this).next('#search').css({width: "0", opacity: 0}); 58 } else { 59 $(this).next('#search').show(); 60 $(this).addClass('active'); 61 $(this).next('#search').animate({width: block_width, opacity: 1}, 300); 62 $(this).next('#search').find('input[name="text"]').css('width', block_width + 'px' ) 63 } 64 }) 65 66 // Ðакладки -------------------------- 67 $('.tabs .tab').hide(); 68 $('.tab-1').show(); 69 $('.tabs > ul > li > a').bind('click', function() { 70 tabs = $(this).parents('.tabs:first'); 71 var tab = $(this).attr('rel'); 72 $(tabs).find('.tab').hide(); 73 $(tabs).find(tab).show(); 74 $(tabs).find('ul > li > a').removeClass('active'); 75 $(this).addClass('active'); 76 }) 77 78 digitalClock(); 79 80} ) 81 82// адапÑивноÑÑÑ ÑоÑо Ð³Ð»Ð°Ð²Ñ ÑолÑко на ÑкÑÐ°Ð½Ð°Ñ Ð±Ð¾Ð»ÑÑе планÑеÑа 83function set_responsive() { 84 if ( $(window).width() < 959 ) { 85 $('.tmpl-glava-photo').find('img').removeClass('img-responsive'); 86 } else { 87 $('.tmpl-glava-photo').find('img').addClass('img-responsive'); 88 } 89} 90 91 92function set_dropdown() { 93 if ( $(window).width() < 801 ) { 94 $("li.dropdown").each(function(){ 95 if ( $(this).find("ul").exists() ) $(this).find('a:first').attr('data-toggle','dropdown'); 96 }); 97 98 } else { 99 $("li.dropdown").each(function(){ 100 if ( $(this).find("ul").exists() ) $(this).find('a:first').removeAttr('data-toggle'); 101 $(this).removeClass('open') 102 }); 103 $('.tmpl-glava-photo').find('img').removeClass('img-responsive'); 104 } 105} 106 107 108//ЧаÑÑ 109function digitalClock() { 110 var tag = 'div.Time'; 111 var shwh = true; //ÐÑобÑажаÑÑ ÑаÑÑ 112 var shwm = true; //ÐÑобÑажаÑÑ Ð¼Ð¸Ð½ÑÑÑ 113 var shws = false; //ÐÑобÑажаÑÑ ÑекÑÐ½Ð´Ñ 114 var devider = ':'; //РазделиÑÐµÐ»Ñ 115 116 var classdevider = '<span class="devider">'+devider+'</span>'; 117 118 if (shwh){ $(tag).append('<span class="hours"></span>') } 119 if (shwm){ 120 if (shwh){ $(tag).append( classdevider ) } 121 $(tag).append( '<span class="minutes"></span>') 122 } 123 if (shws){ 124 if (shwh || shwm){ $(tag).append( classdevider ) } 125 $(tag).append( '<span class="seconds"></span>' ) 126 } 127 128 function time() { 129 var date = new Date(); 130 var hou = date.getHours().toString(); 131 var min = date.getMinutes().toString(); 132 var sec = date.getSeconds().toString(); 133 hou = (hou<10)?0+hou:hou;
134 min = (min<10)?0+min:min; 135 sec = (sec<10)?0+sec:sec; 136 137 $( tag+' .devider').css({opacity: 1}).each(function() { 138 $(this).delay(400).animate({opacity: 0},250); 139 }) 140 141 if (shwh) $( tag+' .hours').html(hou); 142 if (shwm)$( tag+' .minutes').html(min); 143 if (shws)$( tag+' .seconds').html(sec); 144 setTimeout(time,1000); 145 } 146 time(); 147}
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.