1var gradientWidth = 18; 2var cornerSize = 14; 3 4// УÑÑÐ°Ð½Ð°Ð²Ð»Ð¸Ð²Ð°ÐµÑ Ð±ÐµÐ»Ð¾-зеленÑй гÑÐ°Ð´Ð¸ÐµÐ½Ñ Ð² ÑпиÑÐºÐ°Ñ 5 jQuery.fn.setGreen = function () { 6 $('.green_left, .green_right').remove(); 7 x=1; 8 $('.normalList li:even').each(function() { 9 $(this).css("background","#e6f2e6"); 10 $('body').append('<div class="green_left" id="gl-'+x+'"></div><div class="green_right" id="gr-'+x+'"></div>'); 11 var pos = $(this).position(); 12 var hh = $(this).outerHeight(); 13 var ww = $(this).outerWidth(); 14 $('#gl-'+x).css({ 15 "height" : hh+"px", 16 "top" : pos.top+"px", 17 "left" : pos.left-gradientWidth+"px" 18 }); 19 $('#gr-'+x).css({ 20 "height" : hh+"px", 21 "top" : pos.top+"px", 22 "left" : pos.left+ww+"px" 23 }); 24 x++; 25 }); 26 }; 27// УÑÑÐ°Ð½Ð°Ð²Ð»Ð¸Ð²Ð°ÐµÑ Ñени и ÑÐ³Ð»Ñ Ð´Ð»Ñ Ð±ÐµÐ»ÑÑ ÑекÑÑовÑÑ Ð±Ð»Ð¾ÐºÐ¾Ð² 28 jQuery.fn.setBlocks = function () { 29 30 $('.a11,.a12,.a13,.a15,.a17,.a18,.a19,.a21').remove(); 31 32 blocks = $('.roundBlock'); 33 34 blocks.each(function(x) { 35 $(this).css("border", "0"); 36 $('body').append('<div class="a11" id="a11-'+x+'"></div><div class="a12" id="a12-'+x+'"></div><div class="a13" id="a13-'+x+'"></div><div class="a15" id="a15-'+x+'"></div><div class="a17" id="a17-'+x+'"></div><div class="a18" id="a18-'+x+'"></div><div class="a19" id="a19-'+x+'"></div><div class="a21" id="a21-'+x+'"></div>'); 37 var pos = $(this).position(); 38 $('#a11-'+x).css({ 39 "top" : pos.top-cornerSize+"px", 40 "left" : pos.left-cornerSize+"px" 41 }); 42 $('#a13-'+x).css({ 43 "top" : pos.top-cornerSize+"px", 44 "left" : pos.left+$(this).outerWidth()+"px" 45 }); 46 $('#a17-'+x).css({ 47 "top" : pos.top+$(this).outerHeight()+"px", 48 "left" : pos.left+$(this).outerWidth()+"px" 49 }); 50 $('#a19-'+x).css({ 51 "top" : pos.top+$(this).outerHeight()+"px", 52 "left" : pos.left-cornerSize+"px" 53 }); 54 $('#a12-'+x).css({ 55 "top" : pos.top-cornerSize+"px", 56 "left" : pos.left+"px", 57 "width" : $(this).outerWidth()+"px" 58 }); 59 $('#a18-'+x).css({ 60 "top" : pos.top+$(this).outerHeight()+"px", 61 "left" : pos.left+"px", 62 "width" : $(this).outerWidth()+"px" 63 }); 64 $('#a21-'+x).css({ 65 "top" : pos.top+"px", 66 "left" : pos.left-cornerSize+"px", 67 "height" : $(this).outerHeight()+"px" 68 }); 69 $('#a15-'+x).css({ 70 "top" : pos.top+"px", 71 "left" : pos.left+$(this).outerWidth()+"px", 72 "height" : $(this).outerHeight()+"px" 73 }); 74 x++; 75 }); 76 }; 77 78// УÑÑановка ÑиÑÐ¸Ð½Ñ Ð´Ð»Ñ ÑлеменÑов ÑпиÑка 79jQuery.fn.setLiWidth = function (id) { 80 var menu = $(id); 81 menu.find('li a').each(function () { 82 $(this).parent().width($(this).innerWidth()+15); 83 }); 84 menu.find('li span').each(function () { 85 $(this).parent().width($(this).innerWidth()+15); 86 }); 87 parentWidth = menu.find('ul li').parent().parent().width()-40; 88 menu.find('ul li').each(function () { 89 $(this).width(parentWidth); 90 }); 91}; 92 93// УÑÑановка ÑекÑÑего ÑлеменÑÑ 94jQuery.fn.setActive = function (id) { 95 actLi = $(id); 96 activePos = actLi.position(); 97 if(actLi.find('ul').length>0) 98 { 99 curHeight = actLi.outerHeight()-actLi.find('ul').outerHeight(); 100 } else 101 { 102 curHeight = actLi.outerHeight(); 103 } 104 delta = 250 - curHeight; 105 actLi.css({ 106 "background" : "url('/bitrix/templates/mfc/img/bg.gif') 0 -"+delta+"px" 107 }); 108 if (activePos){ 109 $('.cmTop').css({ 110 "top" : activePos.top+"px", 111 "left" : activePos.left+actLi.outerWidth()-5+"px" 112 }); 113 $('.cmBot').css({ 114 "top" : activePos.top+curHeight-5+"px", 115 "left" : activePos.left+actLi.outerWidth()-5+"px" 116 }); 117 }else{ 118 $(".cmTop").css({"display" : "none"}); 119 $(".cmBot").css({"display" : "none"}); 120 } 121}; 122// Ðиндим Ð´Ð»Ñ mouseover/mouseout 123jQuery.fn.bindMouse = function (id) { 124 menu = $('.menu'); 125 menu.find('li:not(.active)').bind("mouseover", function() { 126 127 if ($(this).parent().parent().find('.menu').length>0) 128 { 129 overPos = $(this).position(); 130 $('#cmTop').css({ 131 "top" : overPos.top+"px", 132 "left" : overPos.left+$(this).outerWidth()-5+"px", 133 "display": "block" 134 }); 135 $('#cmBot').css({ 136 "top" : overPos.top+$(this).outerHeight()-5+"px", 137 "left" : overPos.left+$(this).outerWidth()-5+"px", 138 "display": "block" 139 }); 140 141 142 } 143 }); 144 145 menu.find('li:not(.active)').bind("mouseout", function() { 146 $('#cmTop').css("display", "none"); 147 $('#cmBot').css("display", "none"); 148 149 actLi = $('.active'); 150 151 activePos = actLi.position(); 152 153 154 if(actLi.find('ul').length>0) 155 { 156 curHeight = actLi.outerHeight()-actLi.find('ul').outerHeight(); 157 } else 158 {
159 curHeight = actLi.outerHeight(); 160 } 161 162 delta = 250 - curHeight; 163 164 actLi.css({ 165 "background" : "url('/bitrix/templates/mfc/img/bg.gif') 0 -"+delta+"px", 166 "color" : "#fff" 167 }); 168 169 $('.cmTop:first').css("display", "block"); 170 $('.cmBot:first').css("display", "block"); 171 172 }); 173}; 174 175 176 177$(document).ready(function () { 178 179 jQuery('#newsCarousel').jcarousel({ 180 scroll: 2 181 }); 182 183 $().setBlocks(); 184 $().setGreen(); 185 186 $(window).bind("resize", function () { 187 $().setBlocks(); 188 $().setGreen(); 189 $().setActive('.menu .active'); 190 }); 191 192 193// ================================================================================ 194 195 196 197 menus = $('.menu'); 198 menus.each(function() { 199 $().setLiWidth(this); 200 }); 201 202 $('body').append('<div class="cmTop"></div><div class="cmBot"></div><div class="cmTop" id="cmTop"></div><div class="cmBot" id="cmBot"></div>'); 203 204 menus.each(function() { 205 $().setActive('.menu .active'); 206 }); 207 208 209 $().bindMouse('.menu'); 210 211 212 213 214 215 $('.searchButton').bind("mousedown",function () { 216 $(this).css("top","6px"); 217 }); 218 219 $('.searchButton').bind("mouseup",function () { 220 $(this).css("top","5px"); 221 }); 222 223 $('.searchButton').bind("click",function () { 224 document.search_form.submit(); 225 }); 226 227 228});
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.