1function togglePersonalize() { 2 $(".weather-personalize").css({ "visibility": $(".weather-personalize").css("visibility") == "hidden" ? "visible" : "hidden" }); 3 return false; 4} 5 6function doPersonalize(prefix) { 7 var today = new Date(); 8 var expires = new Date(today.getTime() + 1000 * 3600 * 24 * 365 * 5); 9 10 document.cookie = "city=" + escape($("form.personalizeform select").val()) + "; path=/; expires=" + expires.toGMTString(); 11 $(".weather-personalize").css({ "visibility": "hidden" }); 12 13 //alert( prefix ); 14 15 location.href = prefix; 16 17 return false; 18} 19 20 21function doPersonalizeTemperature(prefix) { 22 var today = new Date(); 23 var expires = new Date(today.getTime() + 1000 * 3600 * 24 * 365 * 5); 24 25 if( $("#temperature li.cur").find('span').html() == '°F' ){ 26 document.cookie = "temperature=degC; path=/; expires=" + expires.toGMTString(); 27 } else { 28 document.cookie = "temperature=degF; path=/; expires=" + expires.toGMTString(); 29 } 30 31 location.href = prefix; 32 33 return false; 34} 35 36 37function doPersonalizeSpeed(prefix) { 38 var today = new Date(); 39 var expires = new Date(today.getTime() + 1000 * 3600 * 24 * 365 * 5); 40 41 if( $("#speed li.cur").find('span').html() == 'Km/h' ){ 42 document.cookie = "speed=mile/h; path=/; expires=" + expires.toGMTString(); 43 } else { 44 document.cookie = "speed=km/h; path=/; expires=" + expires.toGMTString(); 45 } 46 47 location.href = prefix; 48 49 return false; 50} 51 52 53function doPersonalizePressure(prefix) { 54 var today = new Date(); 55 var expires = new Date(today.getTime() + 1000 * 3600 * 24 * 365 * 5); 56 57 if( $("#pressure li.cur").find('span').html() == 'mm' ){ 58 document.cookie = "pressure=mbar; path=/; expires=" + expires.toGMTString(); 59 } else { 60 document.cookie = "pressure=mm_hg; path=/; expires=" + expires.toGMTString(); 61 } 62 63 location.href = prefix; 64 65 return false; 66} 67 68 69$(window).load(function(){ 70 71 var time_delay = 10; // Çàäåðæêà â ñåêóíäàõ 72 var timeOut = null; 73 74 $('.but_night, .but_day').click(function(e,simulated){ 75 76 // Ïàðàìåòð simulated óñòàíàâëèâàåòñÿ ìåòîäîì trigger 77 if(!simulated){ 78 79 // Ïðîèçîøëî ðåàëüíîå ñîáûòèå click. Ñáðàñûâàåì òàéìåð. 80 clearTimeout(timeOut); 81 } 82 }); 83 84 // Ïðè çàãðóçêå êàðòû ìû ñðàçó íå ìåíÿåì å¸ íà ïðîòèâîïîëîæíóþ 85 var run = 0; 86 87 // Ñàìîâûïîëíÿþùàÿñÿ ôóíêöèÿ: 88 (function autoAdvance(){ 89 if( run ){ 90 if( $(".map").hasClass('night') ) { 91 // Èìèòàöèÿ ñîáûòèÿ click íà êíîïêå "ñëåäóþùèé". 92 $('.but_day').trigger('click',[true]); 93 94 } else { 95 $('.but_night').trigger('click',[true]); 96 } // if 97 } // if 98 99 run = 1; 100 101 // Óñòàíàâëèâàåì òàéìåð íà time_delay ñåêóíä. 102 timeOut = setTimeout(autoAdvance, time_delay * 1000); 103 104 })(); 105 106}); 107 108 109function doRetro(url, form) { 110 location.href = url + '/retro/' + form.year.value + '-' + form.month.value + '-' + form.day.value + '/'; 111 112 return false; 113} 114 115$(function () { 116 $.browser.msie && $('#id table').click(function() { document.location.href = $(this).parent().attr('href'); }); 117 $.browser.opera && $('.textmode ul').addClass('opera'); 118 119 120 121 $("#temperature li").click(function(){ 122 if( $(this).find('A') ) { 123 var curent_tab = $("#temperature li.cur").attr("id"); 124 if( curent_tab == 't_left' ){ 125 $("#temperature").find('.cur').html('<i></i><a href="javascript:void 0;">'+ $("#temperature li.cur").find('span').html() +'</a>'); 126 } else { 127 $("#temperature").find('.cur').html('<a class="wb" href="javascript:void 0;">'+ $("#temperature li.cur").find('span').html() +'</a><b></b>'); 128 } 129 130 $("#temperature").find('.cur').removeClass('cur'); 131 $(this).addClass('cur'); 132 133 if( curent_tab == 't_left' ){ 134 $(this).html('<span>'+ $(this).find('A').html() +'</span><b></b>'); 135 } else { 136 $(this).html('<span>'+ $(this).find('A').html() +'</span><i></i>'); 137 } 138 } 139 return false 140 }) 141 142 $("#speed li").click(function(){ 143 if( $(this).find('A') ) { 144 var curent_tab = $("#speed li.cur").attr("id"); 145 if( curent_tab == 's_left' ){ 146 $("#speed").find('.cur').html('<i></i><a href="javascript:void 0;">'+ $("#speed li.cur").find('span').html() +'</a>'); 147 } else { 148 $("#speed").find('.cur').html('<a class="wb" href="javascript:void 0;">'+ $("#speed li.cur").find('span').html() +'</a><b></b>'); 149 } 150 151 $("#speed").find('.cur').removeClass('cur'); 152 $(this).addClass('cur'); 153 154 if( curent_tab == 's_left' ){ 155 $(this).html('<span>'+ $(this).find('A').html() +'</span><b></b>'); 156 } else { 157 $(this).html('<span>'+ $(this).find('A').html() +'</span><i></i>'); 158 } 159 } 160 return false 161 }) 162 163 164 $("#pressure li").click(function(){ 165 if( $(this).find('A') ) { 166 var curent_tab = $("#pressure li.cur").attr("id"); 167 if( curent_tab == 'p_left' ){ 168 $("#pressure").find('.cur').html('<i></i><a href="javascript:void 0;">'+ $("#pressure li.cur").find('span').html() +'</a>'); 169 } else { 170 $("#pressure").find('.cur').html('<a class="wb" href="javascript:void 0;">'+ $("#pressure li.cur").find('span').html() +'</a><b></b>'); 171 } 172 173 $("#pressure").find('.cur').removeClass('cur'); 174 $(this).addClass('cur'); 175 176 if( curent_tab == 'p_left' ){ 177 $(this).html('<span>'+ $(this).find('A').html() +'</span><b></b>'); 178 } else { 179 $(this).html('<span>'+ $(this).find('A').html() +'</span><i></i>'); 180 } 181 } 182 return false 183 }) 184 185 186 $("#d_left, #d_right").click(function(){ 187 if( $(this).find('A') ) { 188 189 var curent_tab = $("#day_forecast li.cur").attr("id"); 190 191 if( curent_tab == 'd_left' ){ 192 $("#day_forecast").find('.cur').html('<i></i><a href="javascript:void 0;">'+ $("#day_forecast li.cur").find('span').html() +'</a>'); 193 194 } else { 195 $("#day_forecast").find('.cur').html('<a class="wb" href="javascript:void 0;">'+ $("#day_forecast li.cur").find('span').html() +'</a>'); 196 197 } 198 199 $("#day_forecast").find('.cur').removeClass('cur'); 200 $(this).addClass('cur'); 201 $(this).html('<span>'+ $(this).find('A').html() +'</span>'); 202 203 204 if( curent_tab != $("#day_forecast").find('.cur').attr("id") ){ 205 if( document.getElementById('weather_10_day').style.display ){ 206 document.getElementById('weather_10_day').style.display = ''; 207 } else { 208 document.getElementById('weather_10_day').style.display = 'none'; 209 } 210 } 211 212 213 } 214 return false 215 }) 216 217 // Íàæèìàåì êíîïêó "Äåíü" 218 $(".but_day").click(function(){ 219 220 var is_night_map = $(".map").hasClass('night'); 221 var is_real_night = $("#map_day").val(); 222 223 224 225 if( is_night_map ){ 226 $(".map").removeClass('night'); 227 $(".but_night").removeClass('cur'); 228 $(this).addClass('cur'); 229 230 if( is_real_night ){ 231 $(".t_next_day").show(); 232 $(".t_night").hide(); 233 $(".t_curent").hide(); 234 } else { 235 $(".t_next_day").hide(); 236 $(".t_night").hide(); 237 $(".t_curent").show(); 238 } 239 240 241 } else { 242 $(".but_night").removeClass('cur'); 243 $(this).addClass('cur'); 244 245 if( is_real_night ){ 246 $(".t_curent").hide(); 247 $(".t_next_day").show(); 248 $(".t_night").hide(); 249 } else { 250 $(".t_curent").show(); 251 $(".t_next_day").hide(); 252 $(".t_night").hide(); 253 } 254 255 } 256 257 return false 258 }) 259 260 261 // Íàæèìàåì êíîïêó "Íî÷" 262 $(".but_night").click(function(){ 263 264 var is_night_map = $(".map").hasClass('night'); 265 var is_real_night = $("#map_day").val(); 266 267 if( is_night_map ){ 268 269 $(".but_day").removeClass('cur'); 270 $(this).addClass('cur'); 271 272 if( is_real_night ){ 273 $(".t_curent").show(); 274 $(".t_next_day").hide(); 275 $(".t_night").hide(); 276 } else { 277 $(".t_curent").hide(); 278 $(".t_next_day").hide(); 279 $(".t_night").show(); 280 } 281 282 } else { 283 $(".map").addClass('night'); 284 $(".but_day").removeClass('cur'); 285 $(this).addClass('cur'); 286 287 if( is_real_night ){ 288 $(".t_curent").show(); 289 $(".t_next_day").hide(); 290 $(".t_night").hide(); 291 } else { 292 $(".t_curent").hide(); 293 $(".t_next_day").hide(); 294 $(".t_night").show(); 295 } 296 297 } 298 299 return false 300 }) 301 302 303});
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.