y5.Vars.dayNames=i18n.pogoda["js-common"]["day_of_week"]().split(".");y5.Vars.monthShortNames=i18n.pogoda["js-common"]["monthShortNames"]().split(",");y5.Vars.monthNamesPartitive=i18n.pogoda["js-common"]["monthNamesPartitive"]().split(",");y5.Vars.monthNames=i18n.pogoda["js-common"]["monthNames"]().split(",");y5.Vars.dayShortNames=i18n.pogoda["js-common"]["dayShortNames"]().split(",");$.y5Flag=(function(){var c,a=[];function b(){var e,d,f=a.length,j;for(var h=0;h<f;h++){e=jQuery.data(a[h].elem);if(!e.events){continue}e=e&&e.events[a[h].key];d=e.length;for(var g=0;g<d;g++){j=e[g];if(!j.fire){j.fire=true;j.handler.call(a[h].elem,a[h].value)}}}}return function(e,d,f){a.push({elem:e,key:d,value:f});if(!c){c=setInterval(function(){b()},100)}}})();$.fn.y5Flag=function(b,c){for(var a=0;a<this.length;a++){$.y5Flag(this[a],b,c)}};var Weather={currentCountry:"",currentCity:"",currentCityCoords:{},cities:{},CityTemperatures:{},i:"//i.yandex.st/weather/i",InformerHost:"http://info.weather.yandex.net/",isRussia:1};y5.namespace("Weather","weather.js","utf-8");Weather.windowLoaded=false;$(window).load(function(){Weather.windowLoaded=true;$(".b-current-weather .content-info").removeClass("content-info_hidden")});y5.on("dom:loaded",function(){if(Math.floor(Math.random()*10)==7){y5.on("click",function(d){var b=y5.Dom.parent(d.target,"a"),c;if(b&&(c=/js-counter-([a-z]+)/.exec(b.className))&&(c=c[1])){Lego.ch("weather.tabs."+c,b)}},y5.$("tabs"))}var a=y5.$$("span.b-rasp-rotator")[Math.floor(Math.random()*2)];if(a){a.style.visibility="visible"}},y5);function rc(b,c){var d=b.href;c=c.replace(/=8$/,"=0");b.href=c;setTimeout(function(){b.href=d},500)}var i18nDelivery=i18n.pogoda["weather-delivery"];var deliveryData={interestingSteps:{"4":i18nDelivery.interes4(),"-18":i18nDelivery["interes-18"](),"-39":i18nDelivery["interes-39"](),"-40":i18nDelivery["interes-40"]()},specialSteps:{"36.6":i18nDelivery["366"]()},imageForSpecials:{"36.6":"http://yandex.st/weather/i/delivery/ya-36.6.png"},advertismentData:{"eq-50":{linked:["l1"],titles:[{data:i18nDelivery["eq-50-data"](),conditional:";l1;"}],images:[{src:"plain.gif",alt:i18nDelivery["eq-50-img"](),conditional:";l1;"}],text:[{data:'<a href="http://rasp.yandex.ru/"><i style="background-image: url(&quot;http://img.yandex.net/i/rasp-icon.gif&quot;);"></i>'+i18nDelivery["eq-50-text"]()+"</a>",conditional:";l1;"}]},lt0:{linked:["l1","l2"],titles:[{data:i18nDelivery["lt0-title-1"](),conditional:";l1;l2;"},{data:i18nDelivery["lt0-title-2"](),conditional:";l1;l2;"},{data:i18nDelivery["lt0-title-3"](),conditional:";l1;l2;"},{data:i18nDelivery["lt0-title-4"](),conditional:";l1;l2;"}],images:[{src:"fridge.jpg",alt:i18nDelivery["lt0-img-1"](),conditional:";l1;",swim:-1},{src:"air-conditioner.png",alt:i18nDelivery["lt0-img-2"](),conditional:";l2;",swim:-1},{src:"s_pool.gif",alt:i18nDelivery["lt0-img-3"](),conditional:";l1;l2;",swim:1}],text:[{data:'<a href="http://market.yandex.ru/catalogmodels.xml?CAT_ID=107500&amp;hid=90594&amp;clid=515"><i style="background-image: url(&quot;http://img.yandex.net/i/i16-market.gif&quot;);"></i>'+i18nDelivery["lt0-text-1"]()+"</a>",conditional:";l1;",swim:-1},{data:'<a href="http://market.yandex.ru/catalogmodels.xml?CAT_ID=141694&amp;hid=90578"><i style="background-image: url(&quot;http://img.yandex.net/i/i16-market.gif&quot;);"></i>'+i18nDelivery["lt0-text-2"](),conditional:";l2;",swim:-1},{data:'<a href="http://market.yandex.ru/catalogoffers.xml?hid=91615"><i style="background-image: url(&quot;http://img.yandex.net/i/i16-market.gif&quot;);"></i>'+i18nDelivery["lt0-text-3"]()+"</a>",conditional:";l1;l2;",swim:1}]},"lt-41":{linked:["l1"],titles:[{data:"",conditional:";l1;"}],images:[{src:"money_samolet.gif",alt:i18nDelivery["eq-50-img"](),conditional:";l1;"}],text:[{data:i18nDelivery["lt-41-text-1"](),conditional:";l1;"},{data:i18nDelivery["lt-41-text-2"](),conditional:";l1;"},{data:i18nDelivery["lt-41-text-3"](),conditional:";l1;"}]},gt37:{linked:["l1","l2"],titles:[{data:"",conditional:";l1;l2;"}],images:[{src:"money_samolet.gif",alt:i18nDelivery["eq-50-img"](),conditional:";l1;"},{src:"money_umbrella.gif",alt:i18nDelivery["gt37-img"](),conditional:";l2;"}],text:[{data:i18nDelivery["gt37-text-1"](),conditional:";l1;"},{data:i18nDelivery["gt37-text-2"](),conditional:";l1;"},{data:i18nDelivery["gt37-text-3"](),conditional:";l2;"}]},eq50:{linked:["l1"],titles:[{data:i18nDelivery["eq50-title"](),conditional:";l1;"}],images:[{src:"pepper.gif",alt:"",conditional:";l1;"}],text:[{data:"",conditional:";l1;"}]},gt0:{linked:["l1"],titles:[{data:i18nDelivery["gt0-title-1"](),conditional:";l1;"},{data:i18nDelivery["gt0-title-2"](),conditional:";l1;"},{data:i18nDelivery["gt0-title-3"](),conditional:";l1;"},{data:i18nDelivery["gt0-title-4"](),conditional:";l1;"}],images:[{src:"sauna.png",alt:i18nDelivery["gt0-img-1"](),conditional:";l1;",swim:1},{src:"heater.png",alt:i18nDelivery["gt0-img-2"](),conditional:";l1;",swim:-1},{src:"felt-boot.png",alt:i18nDelivery["gt0-img-3"](),conditional:";l1;",swim:-1}],text:[{data:'<a href="http://market.yandex.ru/catalogoffers.xml?hid=91615"><i style="background-image: url(&quot;http://img.yandex.net/i/i16-market.gif&quot;);"></i>'+i18nDelivery["gt0-text-1"]()+"</a>",conditional:";l1;",swim:1},{data:'<a href="http://market.yandex.ru/catalogmodels.xml?CAT_ID=118842&amp;hid=90577"><i style="background-image: url(&quot;http://img.yandex.net/i/i16-market.gif&quot;);"></i>'+i18nDelivery["gt0-text-2"]()+"</a>",conditional:";l1;",swim:-1}]}}};Lego.block["b-delivery"]=function(){var t=$(this).removeClass("g-hidden");var f=deliveryData.specialSteps,q=deliveryData.interestingSteps,m=i18n.pogoda["weather-delivery"];var C=t.find(".l-slider"),i=C.find(".value"),z=C.find(".grab").css("visibility","visible"),c=C.find(".l-slider-r"),y=C.find(".l-slider-l"),D=2,r=[-50,50],v=C.find(".b-slider").width(),A=z.width()/2,j=v/(-r[0]+r[1]),u=false,o,h,e="",B=Weather.temperature;C.find(".scale").click(function(H){var G=H.pageX-$(this).offset().left;B=g(G);E(B);p(B);F();Lego.c("stred/pid=7/cid=1406/path="+B)});c.click(function(){B=parseInt(B);B=Math.min(B+1,r[1]);p(B);E(B);F();Lego.c("stred/pid=7/cid=1406/path="+B)});y.click(function(){B=B<0?parseInt(B-0.9):parseInt(B+0.9);B=Math.max(B-1,r[0]);p(B);E(B);F();Lego.c("stred/pid=7/cid=1406/path="+B)});z.mousedown(function(x){x.preventDefault();u=true;o=x.pageX;h=(parseFloat(z.css("left"))||0)+A;return false});$(document).mousemove(function(G){if(u){var x=o-G.pageX;if(h-x<0){h=0}else{if(h-x>v){h=v}else{h-=x;o=G.pageX}}B=g(h);E(B);p(B);F()}}).mouseup(function(){if(u){Lego.c("stred/pid=7/cid=1406/path="+B)}u=false});function p(I){var G=i.attr("class"),H=i.width();i.attr("class","js_delivery_cval value t"+Math.ceil(I/2)*2);var x=(I==0)?0:(I>0?"+":"−")+Math.abs(I);i.text(x);i.css("left",Math.min(Math.max(D,(I-r[0])*j-H/2),v-D-H-6)-2)}function E(x){z.css("left",(x-r[0])*j-A)}function g(K){var I=K/j+r[0],G=Math.abs(I-Math.ceil(I)),J=Math.abs(I-Math.floor(I));for(var H in f){var x=Math.abs(I-H);if(x==Math.min(x,G,J)){return H}}return G>J?Math.floor(I):Math.ceil(I)}var s=t.find("#slider-swim"),k;s.change(function(){Lego.c("stred/pid=7/cid=2353");F()});function F(){if(f[B]){e='<img src="'+deliveryData.imageForSpecials[B]+'" style="float:left" /> '+i18n.pogoda["js-common"].delivery_false().replace("%1%",B).replace("%2%",f[B]);'<br /><a href="http://pogoda.yandex.ru">'+i18n.pogoda["js-common"].lozung_3()+"</a>";n('<h3 class="title">'+f[B]+'</h3><table><tbody><tr><td class="image"><img alt="'+B+'" src="'+deliveryData.imageForSpecials[B]+'"></td><td style="padding-left: 10px;" class="text"></td></tr></tbody></table>',"no-data");return}k=s.is(":checked");var R=Weather.CityTemperatures[B],T=R[k?1:0][0];R=(R&&R[k?1:0][0]>0&&R[k?1:0][1])||false;if(!R){a();return}var O=[],S=[],K,J,H,G,N,M,P,I,Q=Math.min(3,R.length);for(var L=0;L<Q;L++){K=R[L];H=K[1];J=K[0];G=K[2];N=K[3]<0?K[3].toString().replace("-",String.fromCharCode(8722)):"+"+K[3];M=K[k?4:3];P=K[k?5:4];I=K[k?6:5];O.push('<a href="/'+J+'/">'+H+" ("+G+")</a>"+(k?("&nbsp;&nbsp;"+i18n.pogoda["js-common"].water()+" "+N):""));S.push('&mdash;&nbsp;<a href="http://pogoda.yandex.ru/'+J+'/">'+H+" ("+G+")</a>"+(k?("&nbsp;&nbsp;"+i18n.pogoda["js-common"].water()+" "+N):"")+"<br />")}var x="/delivery/"+(k?"water/":"")+B+"/";O=i18n.pogoda["js-common"].delivery_to().replace("%",('<a href="'+x+'">'+T+" "+i18n.pogoda["js-common"].cities({count:T})+"</a>."))+(T>3?" "+i18n.pogoda["js-common"].among_them()+" ":"")+"<ul><li>"+O.join("</li><li>")+"</li></ul>";e='<table><tr><td><a href="http://pogoda.yandex.ru'+x+'"><img src="'+Weather.i+'/delivery/pogodaman2.png" border="0" alt="'+i18n.pogoda["js-common"].lozung_2()+'"></a></td><td width="10"></td><td valign="top">'+i18n.pogoda["js-common"].delivery_true().replace("%1%",((B>0?"+":"−")+Math.abs(B))).replace("%2%",T+" "+i18n.pogoda["js-common"].cities({count:T})).replace("%3%","/delivery/"+(k?"water/":"")+B+"/")+"</a>."+(T>3?" "+i18n.pogoda["js-common"].among_them()+" ":"")+"<br />"+S.join("")+i18n.pogoda["js-common"].avashu()+'<br /><a href="http://pogoda.yandex.ru">'+i18n.pogoda["js-common"].lozung_3()+"</a></td></tr></table>";n(O,"data b-columns")}function b(I,G){var H=2,x=I%10,J=I%100;if(J<5||J>20){if(x==1){H=0}else{if(x>=2&&x<=4){H=1}}}return G[H]}function n(x,G){t.find("div#slider-data div:first").attr("class",G).html(x).show()}function l(G,x){return Math.floor(Math.random()*(x-G+1)+G)}function w(x,I){var H=[];for(var G=0;G<x.length;G++){if(x[G].conditional.indexOf(";"+I+";")!=-1&&(!x[G].swim||(x[G].swim>0)==k)){H.push(x[G])}}return H[l(0,H.length-1)]}function a(){var K;if(q[B]){e=i18n.pogoda["js-common"].delivery_fact().replace("%1%",((B>0?"+":"−")+Math.abs(B)))+q[B]+'<br /><a href="http://pogoda.yandex.ru">'+i18n.pogoda["js-common"].lozung_1()+"</a>";K='<h3 class="title"><strong>'+(m.fact_title||"")+"</strong></h3><p>"+q[B]+"</p>"}else{var H=deliveryData.advertismentData,P,G,L=100,I;for(P in H){if(P=="eq"+B){G=P;break}if(P.indexOf("eq")!=-1){continue}I=P.split("t");if(L>Math.abs(B-I[1])&&(B>I[1]==(I[0]=="g"))){L=Math.abs(B-I[1]);G=P}}if(!G){return}H=$.extend({},H[G]);var O,J,x,M,N;N=H.linked[l(0,H.linked.length-1)];O=w(H.titles,N);O=O.data;M=w(H.text,N);M=M.data;I=w(H.images,N);J=I.alt;x=I.src;K='<h3 class="title hidden">'+O+'</h3><table><tbody><tr><td class="image"><img alt="'+J+'" src="http://yandex.st/weather/i/delivery/'+x+'"></td><td class="text"><dl><dt>'+M+"</dt><dd></dd></dl></td></tr></tbody></table>";e='<img src="http://yandex.st/weather/i/delivery/'+x+'" style="float:left" /> '+i18n.pogoda["js-common"].delivery_false().replace("%1%",((B>0?"+":"−")+Math.abs(B))).replace("%2%",$.trim((O.length>0?O:M))).replace(/onclick=".*?"|\n|\r/g,"")+'<br /><a href="http://pogoda.yandex.ru">'+i18n.pogoda["js-common"].lozung_3()+"</a>"}n(K,"no-data")}var d;setTimeout(function(){d=$(".Weather-Delivery-popup")},100);t.find(".b-slider-code a").click(function(J,x){var I=$(this),K=I.offset(),H=K.top+I.height()+5,G=K.left;setTimeout(function(){d.css({left:G,top:H}).toggle().find("textarea").val(e)},100);return false});i.text((B>0?"+":"−")+Math.abs(B));E(B);p(B);F()};Lego.block["b-weather-games"]=function(){var b=$(this),a=b.find("li"),d=b.find("div.game"),c=(new Date((new Date()).getTime()+9999999999)).toGMTString();first=true;a.click(function(i){i.preventDefault();var h=$(this);if(!h.hasClass("current")){var g=h.attr("class"),f=d.filter("."+g);if(!first){Lego.c("stred/pid=7/cid=249"+(g==="js-delivery"?"7":"8"))}first=false;d.addClass("g-hidden");a.removeClass("current");y5.fire("Weather:Games:open",f[0]);f.removeClass("g-hidden");h.addClass("current");document.cookie="YNDX_WTHR_GMS="+g+"; expires="+c+"; path=/; domain="+location.hostname+";"}});b.removeClass("g-hidden");setTimeout(function(){var e=document.cookie.match(/(?:^|(?:[\;\s]+))(?:YNDX_WTHR_GMS=)([A-Za-z0-9=\:\-]+)(?:;|$)/);if(e&&e[1]){a.filter("."+e[1]).click()}else{a.filter(":first").click()}},100)};$(document).ready(function(){$("body").append('<div class="y5-w-window-view" style=" position: absolute; width: 100%; height: 0pt; z-index: 999999;"><div style="position: absolute; z-index: 0; display:none;" class="y5-w-window y5-w-popup Weather-Delivery Weather-Delivery-popup y5-w-visible"><div class="y5-w-frame"><div class="y5-w-content"><div class="b-html-code">'+i18n.pogoda["js-common"]["addToBlog_text"]()+'<div class="code"><textarea rows="5" cols="50"></textarea></div></div></div></div><div class="y5-w-shadow"></div><div class="y5-w-shadow y5-w-shadow2"></div><div class="y5-w-fakeframe"><iframe frameborder="0" src="javascript:\'&lt;body style=\\\'background:none\\\'&gt;\'"></iframe></div></div></div>');var a=$(".Weather-Delivery-popup").hide();$(document).click(function(b){if($(b.target).closest(".y5-w-window-view,.b-slider-code").length==0){a.hide()}});a.click(function(b){b.preventDefault();return false})});Lego.block["b-bandit"]=function(){var v=$(this),D=v.find("table.b-bandit__automat"),H=v.find(".js-message"),t=v.find("div.js-arm-code"),a=t.find("textarea"),l=false,d=false,w=0,E=0,m=0,n=-1,j=0,x,r=true;var b,f=i18n.pogoda["weather-bandit"];setTimeout(function(){b=$(".Weather-Delivery-popup")},100);v.find(".b-slider-code a").click(function(M,I){var L=$(this),N=L.offset(),K=N.top+L.height()+5,J=N.left;setTimeout(function(){b.css({left:J,top:K}).toggle().find("textarea").val(a)},100);Lego.c("stred/pid=7/cid=2615");return false});y5.on("Weather:1April:complete",function(N,K){if(x[K]){var J=x[K].push(N);if(J>=resultMaxCnt.cnt){g(K,J)}}else{x[K]=[N];if(1>=resultMaxCnt.cnt){g(K,1)}}if(++n==3){w++;var M,I=-1;if(Scroll.prototype.showAd){l=true;M="ad";new Image().src=Scroll.prototype.ad.counter}else{if(resultMaxCnt.cnt==3){E++;m=0;Lego.c("stred/pid=7/cid=2339");I=resultMaxCnt.num.sort()[0];switch(I){case 0:M="snow";break;case 1:M="rain";break;case 2:M="sun";break;case 3:M="storm";break;case 4:M=++this.cloudCnt>=2?"cloud2":"cloud";break;case 5:M="snowstorm";break;case 6:M="fog";break}}else{var L=++m;Lego.c("stred/pid=7/cid=2338");if(resultMaxCnt.cnt===2&&resultMaxCnt.num[0]==2){M="sun_2"}else{if(resultMaxCnt.num.indexOf(0)!=-1||resultMaxCnt.num.indexOf(1)!=-1){if(w>1&&r){M="bad_weather"}r=false}else{r=true}if(resultMaxCnt.num.indexOf(2)!=-1){noSun=false}else{noSun=true}if(!M){M=k("loose"+L)?"loose"+L:"loose"}}}}o(M);n=-1}},Weather,this);var h=[];v.find(".js-arm").click(function(I){A(I,this)});var p={"b-bandit__weekday__dayname":"font-size:190%;display:block;margin:0;font-weight:normal;","b-bandit__head":"font-size:180%;text-align:center;padding-right:65px;","b-bandit__automat_broken":"width:400px;height:200px;margin:5px 0 0 0;background:url("+Weather.i+"/1april/one_armed_bandit_broken_for_blog.png) no-repeat;border-collapse:collapse;border:0;line-height:normal;","b-bandit__automat":"width:350px;height:200px;margin:5px 0 0 0;background:url("+Weather.i+"/1april/one_armed_bandit_for_blog.png) no-repeat;border-collapse:collapse;border:0;line-height:normal;","b-bandit__fake-th_broken":"background:none;border:0;width:112px","b-bandit__fake-th":"background:none;border:0;width:62px","b-bandit__weekday__wrapper":"padding:0 10px 10px 15px;","b-bandit__weekday":"margin:0;padding:0;background:none;border:0;text-align:left;border-collapse:collapse;font-size:13px;font-weight:normal;width:96px !important;height:76px;vertical-align:bottom;white-space:nowrap;","b-bandit__weekend":"margin:0;padding:0;background:none;border:0;text-align:left;border-collapse:collapse;font-size:13px;font-weight:normal;width:96px !important;height:76px;vertical-align:bottom;white-space:nowrap;color:#FF3300;","b-bandit__precipitation":"text-align:left;border:0;border-collapse:collapse;font-size:11px;height:86px;padding:0 10px 0 15px;vertical-align:top;","b-bandit__temperature__wrapper":"padding:0 10px 8px 15px;","b-bandit__temperature":"background:none;border:0;height: 38px;margin:0;padding:0;vertical-align:bottom;border-collapse:collapse;","b-bandit__light":"font-size:20px;display:block;margin:0;white-space:nowrap;font-weight:normal;","b-bandit__dark":"font-size:100%;display:block;margin:0;white-space:nowrap;color:#71716f;font-weight:normal;","b-bandit__hint":"font-size:120%;margin-top:10px;","b-wea-icon":"display:block;float:none;margin-bottom:0.6em;","b-wea_img":"display:block","b-bandit__arm":"position:absolute;top:4em;left:288px;","b-bandit":"position:relative;width:350px;min-height:250px;"},z=Weather.i+"/1april/ruchka.gif",C=Weather.i+"/1april/ruchka-broken.gif";var q=[2,4,7,8,16,17,18];var i="",u=7,G=20,F={bad_weather:[f.bad_weather_1(),f.bad_weather_2()],broken:f.broken(),cloud:f.cloud(),cloud2:f.cloud2(),fog:[f.fog_1(),f.fog_2(),f.fog_3()],loose:[f.loose_1(),f.loose_2(),f.loose_3(),f.loose_4(),f.loose_5(),f.loose_6(),f.loose_7(),f.loose_8(),f.loose_9(),f.loose_10()],loose3:[f.loose3_1(),f.loose3_2(),f.loose3_3()],loose5:[f.loose5_1(),f.loose5_2()],loose7:[f.loose7_1(),f.loose7_2()],loose10:[f.loose10_1(),f.loose10_2(),f.loose10_3()],rain:[f.rain_1(),f.rain_2()],snow:[f.snow_1(),f.snow_2()],snowstorm:[f.snowstorm_1(),f.snowstorm_2()],storm:[f.loose_1(),f.loose_2(),f.loose_3(),f.loose_4()],sun:[f.sun_1(),f.sun_2(),f.sun_3(),f.sun_4(),f.sun_5()],sun_2:f.sun_2_1()};function c(){return Math.ceil(Math.random()*u)-1}function B(){i='<div class="b-scroll-wrapper b-scroll-wrapper-weather"><div class="scrollable">'+q.map(function(I){return'<div class="cell g-png"><div class="b-bandit__precipitation__wrapper"><i class="b-wea-icon g-png"><img src="'+Weather.i+"/icons/"+I+'.png" alt="" /></i></div></div>'}).join("")+"</div></div>"}function y(){var I=new Array(3);if(Math.ceil(Math.random()*5)===1){I[0]=I[1]=I[2]=c()}else{I[0]=c();I[1]=c();I[2]=c()}Weather.randoms=I}function g(I,J){if(resultMaxCnt.cnt==J){resultMaxCnt.num.push(I)}else{resultMaxCnt.num=[I];resultMaxCnt.cnt=J}}function o(J){var I=J=="ad";if(J=="ad"){J="";if(Scroll.prototype.ad.logo){J+='<a target="_blank" href="'+Scroll.prototype.ad.link+'"><img src="'+Scroll.prototype.ad.logo+'" align="left" style="padding-right:10px;"/></a>'}J+=Scroll.prototype.ad.text;D.addClass("b-bandit__automat_ad")}else{J=F[J];if(J instanceof Array){J=J[Math.ceil(Math.random()*J.length)-1]}}H.css("visibility","visible").html(J);if(!I){a=s();t.css("visibility","visible")}}function k(I){return I in F}function s(){var J=v.clone(true);J.find("div.js-arm-code").empty();J.find("td.js-scrollable").each(function(L,M){var K=q[Weather.randoms[L]];$(M).html('<i class="b-wea-icon"><img class="b-wea_img" alt="" src="'+Weather.i+"/icons/"+K+'.png" /></i>'+Scroll.prototype.texts[K])});J=J.html().replace(/\s*js-\w+\s*|g-hidden|\t|\n|\r|\s{2,}/g,"").replace(/(<h3.*?>)(.*?)(<\/h3>)/i,"$1"+i18n.pogoda["js-common"]["i"]()+'&nbsp;&nbsp;<span style="color:red">'+E+":"+(w-E)+"</span>&nbsp;&nbsp;"+f.yandexpogoda()+"$3").replace(/style="visibility:.*?"/i,"").replace(/<\/th><\/tr>/i,'</th><th rowspan="3" class="b-bandit__fake-th'+(d?"_broken":"")+'"></th></tr>').replace(/<div class=(")?b-bandit__arm.*?<\/div>/i,"").replace(/(<div\s*class="?b-bandit__hint.*?>.*?)(<\/div>)/i,'$1<br /><br /><a href="http://pogoda.yandex.ru/?fromArm">'+f.gameyapogoda()+"</a>$2");if(d){J=J.replace("b-bandit__automat","b-bandit__automat_broken")}for(var I in p){J=J.replace(new RegExp('class=(")?'+I+'(")?',"g"),'style="'+p[I]+'"')}return J}var e=function(){(new Image()).src=z;(new Image()).src=C;(new Image()).src=Weather.i+"/1april/one_armed_bandit_ad.png";var I=86;Scroll.prototype._cellHeight=I;Scroll.prototype._height=I*u;h=v.find(".js-scrollable").map(function(K,L){$(L).html(i);var J=$(L).children(":first").children(":first");var M=c();J.css("top",(-I*M)+"px");return new Scroll(J[0],u,K,M)});e=function(){}};function A(J,I){J.preventDefault();if(n!=-1){return}Lego.c("stred/pid=7/cid=2334/path="+(w+1));x={};resultMaxCnt={num:[],cnt:0};n=0;H.css("visibility","hidden");t.css("visibility","hidden");D.removeClass("b-bandit__automat_ad");if(w>=G){d=true;$(I).attr("src",C).attr("title",f.brokentitle());o("broken")}else{e();y();Scroll.prototype.showAd=false;if(w===1){$.get("/surprise.xml",{},function(L){if(L&&L.counter&&L.img&&L.link&&L.text){var K=new Image();K.onload=function(){if(this.width==270&&this.height==170){Scroll.prototype.ad=L}};K.src=L.img+("?rnd="+Math.random()*10000)}},"json")}else{if(w>=2){Scroll.prototype.showAd=!l&&!!Scroll.prototype.ad}}I.src=z+("?rnd="+Math.random()*10000);window.setTimeout((function(K){return function(){for(var L=0;L<K.length;L++){K[L].start()}}})(h),600)}}B()};var Scroll;y5.require("cssQuery","Fx","Number",function(){Scroll=function(d,c,a,b){this.element=d;this.position=a;this.cellsCount=c;this.firstStep=b;y5.on("fx:complete",this._oncomplete,d,this)};Scroll.prototype=new function(){var b=2,a=[0,1.5,1,1];var c=i18n.pogoda["weather-bandit"].textes().split(".");this.texts=c;this._cellHeight=0;this._height=0;this._getDuration=function(){return a[this._step]};this._animate=function(){var l=this._cellHeight;this._step++;var e=this._getDuration(),i=y5.Fx.Transitions.linear;var f=e/(this._height/this._cellHeight);if(this._step>b){i=y5.Fx.Transitions.sinIn;var h=this.random=Weather.randoms[this.position];this.firstStep=h;l=-h*this._cellHeight;e=(7-h)*f;var g=this.element.childNodes[h];var d=/icons\/(\d+)\.png/.exec(g.innerHTML)[1];if(this.showAd){this._cellHTML=g.innerHTML;g.innerHTML='<a target="_blank" href="'+this.ad.link+'"><div style="background-image:url('+this.ad.img+');" class="b-bandit-banner__item b-bandit-banner__item_type_'+(this.position+1)+'"></div></a>'}else{g.innerHTML=this.dayHTML+g.innerHTML+'<span class="js-weather-text">'+c[d]+"</span>"+this.tempHTML;this._cellHTML=""}var o=$(g);if(o.find(".b-bandit__weekday__wrapper").length>1){o.find(".b-bandit__weekday__wrapper:not(:first)").remove()}}else{if(this._step==1){var n=y5.Dom.parent(this.element,"table");var k=y5.$$("th .b-bandit__weekday__wrapper",n)[this.position].parentNode;var m=y5.$$(".b-bandit__temperature .b-bandit__temperature__wrapper",n)[this.position].parentNode;k.className+=" g-hidden";m.className+=" g-hidden";this.dayHTML=y5.String.trim(k.innerHTML);this.tempHTML=y5.String.trim(m.innerHTML);i=y5.Fx.Transitions.sinOut;e*=(Math.abs(parseInt(this.element.style.top,10))+this._cellHeight)/this._cellHeight*f;if(this._cellHTML){this.cellHTML=this._cellHTML;this._cellHTML=""}else{var j=this.element.childNodes[this.firstStep];this.cellHTML=j.innerHTML.replace(this.dayHTML,"").replace(this.tempHTML,"");this.firstChild=this.dayHTML+this.cellHTML+this.tempHTML}y5.Classes.add(y5.Dom.parent(this.element,"td"),"b-bandit__precipitation_inwork");this.element.style.top=(-this._cellHeight*this.firstStep)+"px"}else{j=this.element.childNodes[this.firstStep];j.innerHTML=this.cellHTML}}y5.Fx.Morph(this.element,{top:l},{start:true,duration:e,fps:15,delay:0,transition:i})};this._oncomplete=function(){if(this._step<=b){this.element.style.top="-"+(this._height-this._cellHeight)+"px";this._animate()}else{y5.fire("Weather:1April:complete",Weather,this.element,this.random)}};this.start=function(){this._cellHeight=170;this._height=170*7;this._step=0;y5.$$(".js-weather-text",this.element).forEach(function(d){y5.Dom.removeChild(d)});this._animate()}}});Lego.block["b-map-region"]=function(e){var b=$(this),d,c=e.defaultRegion,f=b.find("ul.regions");if(!f){return}b.find("ul.regions a").click(function(h){h.preventDefault();var g=$(this);if(!g.hasClass("current")){window.location.hash=window.location.hash.replace(/_[0-9\.]+_[0-9\.]+_[0-9]+$/,"");a(/#(.*)$/.exec(g.attr("href"))[1])}});function a(h){b.find("li.current").removeClass("current");var g=b.find("li.js-"+h);if(!g.length){if(c){b.find(".regions li:first a").click()}return}g.addClass("current");$(document).trigger("selectRegionOnMap",h)}d=/#([^0-9]*?)(?:_(.*)(?:[0-9\.]+_[0-9\.]+_[0-9]+)?)?$/.exec(window.location.hash);if(d){d=d[1]}else{if(!c){return}d=Weather.isRussia?"ru":"eu";window.location.hash=d+"_"+window.location.hash.substr(1)}if(Weather.windowLoaded){setTimeout(function(){a(d)},100)}else{$(window).load(function(){a(d)})}};Lego.block["b-weather-types"]=function(){var b=$(this),d=Weather.MapData,c=/#(.*?)(?:_(.*)(?:[0-9\.]+_[0-9\.]+_[0-9]+)?)?$/.exec(window.location.hash),e;if(c){c=c[2]}else{c=""}$(document).bind("selectRegionOnMap",function(h,g){f(g)});b.find(".g-js ul a").click(function(i){i.preventDefault();var g=$(this).attr("href"),h;if(g.indexOf("current-type")==-1){y5.fire("click",document);h=/#(.*)$/.exec(g)[1];a(h)}return false});function f(i){e=i;var h=d[i],g=i.indexOf("sea")!=-1;b.find(".g-js li:not(:first)").each(function(){var j=this,k=j.className.match(/js-([a-z]+)/)[1],l=!(k in h)&&(k!="weather"||g);$(j).toggleClass("g-hidden",l)});if(!c||(!(c in h)&&(c!="weather"||g))){if(g){for(c in h){break}}else{c="weather"}}a(c)}function a(h){b.find("li.js-"+c).removeClass("g-hidden");c=h;var j=/[0-9\.]+_[0-9\.]+_[0-9]+$/.exec(window.location.hash),k="#"+e+"_"+c+(j?("_"+j[0]):"");window.location.hash=k;var g=b.find("li.js-"+c);b.find(".g-js li.visible span span,span.nochoose").html(g.find("span").html());g.addClass("g-hidden");var i=b.find(".g-js li:not(.g-hidden)").length==1;b.find(".g-js").toggleClass("g-hidden",i);b.find("span.nochoose").toggleClass("g-hidden",!i);$(document).trigger("map_render",c)}};Lego.block["b-weather-player"]=function(){var p=$(this),c=Lego.block["b-weather-player"].prototype;c.playState=false;c.playerTable=p.find("table.b-map-player");c.legend=p.find(".b-map-player__legend");c.playIcon=p.find(".b-map-player-menu .play");c.counter=p.find(".b-map-player-menu .count");c.currentImage=0;c.oldImg=p.find("img.old");c.newImg=p.find("img.new");var d;var h={ru:{center:new YMaps.GeoPoint(105,59),zoom:3},"ru-far-west":{center:new YMaps.GeoPoint(151,60),zoom:4},"ru-byvolga":{center:new YMaps.GeoPoint(54.5,54.5),zoom:6},"ru-north-west":{center:new YMaps.GeoPoint(47,65),zoom:5},"ru-ncaucasus":{center:new YMaps.GeoPoint(45,47.5),zoom:6},"ru-siberia":{center:new YMaps.GeoPoint(96,63),zoom:4},"ru-urals":{center:new YMaps.GeoPoint(65.5,60),zoom:4},"ru-central":{center:new YMaps.GeoPoint(38.268402,56.00099),zoom:6},"ru-south":{center:new YMaps.GeoPoint(45,45),zoom:6},by:{center:new YMaps.GeoPoint(27.916746,53.809025),zoom:6},kz:{center:new YMaps.GeoPoint(66.905283,48.55694),zoom:5},ua:{center:new YMaps.GeoPoint(31.154176,48.533755),zoom:6},eu:{center:new YMaps.GeoPoint(15,52),zoom:4}},j={"3":{lat:25,lng:90},"4":{lat:17,lng:52},"5":{lat:10,lng:28},"6":{lat:5,lng:16},"7":{lat:2.5,lng:8.5},"8":{lat:1.3,lng:4.2},"9":{lat:0.65,lng:2},"10":{lat:0.34,lng:1},"11":{lat:0.16,lng:0.5}};var w,o={},r={},b=0,a=new YMaps.TypeControl([]),k=new YMaps.MapType(YMaps.MapType.MAP.getLayers(),i18n.pogoda["js-common"].map_type_1()),e=new YMaps.MapType(YMaps.MapType.HYBRID.getLayers(),i18n.pogoda["js-common"].map_type_2()),n=new YMaps.ObjectManager({padding:10,trackObjects:false}),m=new YMaps.Style();m.iconStyle=new YMaps.IconStyle(new YMaps.Template('<div class="b-balloon b-balloon_1" onclick="Lego.c(\'stred/pid=7/cid=2519/path=$[id]\');window.location=\'/$[id]/\'"><img src="'+Weather.i+'/balloon/balloon.png" width="70" height="42" alt="" /><div class="g-png ico"><img src="http://img.yandex.net/i/wiz$[image].png" width="24" height="24" alt=""/></div><div class="temp">$[temperature]</div></div>'));m.iconStyle.offset=new YMaps.Point(-22,-40);YMaps.Styles.add("weather#onMap1",m);m=new YMaps.Style();m.iconStyle=new YMaps.IconStyle(new YMaps.Template('<div class="b-balloon b-balloon_2" onclick="Lego.c(\'stred/pid=7/cid=2519/path=$[id]\');window.location=\'/$[id]/\'"><img src="'+Weather.i+'/balloon/balloon2.png" width="94" height="42" alt="" /><div class="g-png ico"><img src="http://img.yandex.net/i/wiz$[image].png" width="48" height="24" alt="" /></div><div class="temp">$[temperature]</div></div>'));m.iconStyle.offset=new YMaps.Point(-22,-40);YMaps.Styles.add("weather#onMap2",m);function l(){w=new YMaps.Map($("#weathermaps").css({width:"750px",height:"500px"}));w.setMinZoom(1);w.setMaxZoom(11);a.addType(k);a.addType(e);w.addControl(a);w.setType(e);w.addControl(new YMaps.Zoom());w.addControl(new YMaps.MiniMap());w.enableScrollZoom();w.addOverlay(n);YMaps.Events.observe(w,w.Events.MoveEnd,c.mapRender,this);YMaps.Events.observe(w,w.Events.Update,function(){var s=w.getZoom();if(s!=b){b=s;c.mapRender()}},this)}c.mapStop=function(){clearInterval(c.timer)};c.mapRender=function(A){if(!h[d]){return}if(b!=w.getZoom()){w.setZoom(h[d].zoom)}var s=w.getCenter();var x=i(),C,y=0,B=x.length,z,D;o={};if(A){n.removeAll();r=[]}for(;y<B;y++){D=x[y].lt+":"+x[y].rb+":"+b+":"+c.currentImage;if(o[D]===true||o[D]===null){continue}C={lt:x[y].lt,rb:x[y].rb,zoom:b,day:c.currentImage};if(o[D]===false){C.rnd=Math.round(Math.random()*1000)}o[D]=null;$.get("/maps-forecast.xml",C,(function(E){var F=E;return function(I,G){if(I&&I.length){o[F]=true;for(var H=0;H<I.length;H++){q(I[H])}}}})(D),"json")}};function i(){var J=w.getZoom(),G=w.getBounds(),x=G.getLeft(),E=G.getTop(),I=G.getRight(),s=G.getBottom();if(x>0&&I<0){I=360+I}if(J==0||J==1||J==2){return[{lt:"-180,90",rb:"180,-90"}]}var F=j[J].lng,C=j[J].lat,y=t(x,I,F),B=t(s,E,C),H=[];for(var A=0,D=y.length;A<D;A++){for(var z=B.length-1;z>=0;z--){H.push({lt:g(y[A])+","+v((B[z]+C)),rb:g((y[A]+F))+","+v(B[z])})}}return H}function v(s){if(s>90){s=90}else{if(s<-90){s=-90}}return s.toFixed(6)}function g(s){if(s>180){s=-360+s}else{if(s<-180){s=360+s}}return s.toFixed(6)}function q(A){var z=/^n/,y=new YMaps.GeoPoint(A.lng,A.lat),s=A.image.replace(z,"");if(r[y.toString()]){return false}r[y.toString()]=true;var x=new YMaps.Placemark(y,{hasBalloon:false,style:"weather#onMap"+(s==1||s==2||(s>=4&&s<=7)||(s>=16&&s<=18)?1:2)});x.name=A.name;x.id=A.id;x.image=A.image;x.temperature=A.temperature>0?("+"+A.temperature):A.temperature;n.add(x,A.zoom);return true}function t(A,y,z){var x=[],s=Math.floor(A/z)*z;while(s<y){x.push(s);s+=z}return x}function f(){$("#weathermaps").show().siblings().hide();var z=window.location.hash;if(!w){l()}if(/_[0-9\.]+_[0-9\.]+_[0-9]+$/.test(z)){var y=z.split("_");d=y[0].substr(1);c.currentImage=0;w.setCenter(new YMaps.GeoPoint(y[3],y[2]));c.ImagesCount=10;b=y[4];w.setZoom(b)}else{d=z.substr(1).match(/(.*)_([^_]+)/)[1];c.currentImage=0;w.setCenter(h[d].center);c.ImagesCount=10;b=h[d].zoom}c.Images=[];for(var x=0;x<10;x++){var s={src:"/i/maps/weather-preview.png",loaded:false};s.tmbl=s.src;s.id=x+1;c.Images.push(s)}c.mapRender()}p.find("a.play, .icon, .b-map-player-menu .play a").click(function(s){if(c.type!="weather"){c.toggleStopPlay(s)}else{s.preventDefault();c.mapPlay()}return false});p.find(".back").click(function(s){s.preventDefault();c.playState=false;if(c.currentImage==0){c.currentImage=c.Images.length-2}else{c.currentImage-=2}if(c.type!="weather"){c.turnOffPlayer();c.play(true)}else{c.currentImage++;c.mapStop();c.updateWeatherCounter(false);c.mapRender(true)}});p.find(".forward").click(function(s){s.preventDefault();c.playState=false;if(c.type!="weather"){c.turnOffPlayer();c.play(true)}else{c.currentImage++;if(c.currentImage>=c.ImagesCount){c.currentImage-=c.ImagesCount}c.mapStop();c.updateWeatherCounter(false);c.mapRender(true)}});p.delegate("li","click",function(s){if(c.type!="weather"){c.change(s,$(this))}else{s.preventDefault();c.playState=false;c.currentImage=/#(\d+)/.exec($(this).children(":first").attr("href"))[1]-1;c.mapStop();c.updateWeatherCounter(false);c.mapRender(true)}return false});$(document).bind("map_render",function(s,x){c.type=x;c.counted=false;c.playerTable.removeClass("b-map-player_on");c.playState=false;c.currentImage=0;p.css("visibility","visible");if(x=="weather"){f();c.updateWeatherCounter(true)}else{u();c.updateCounter(true)}},Weather,this);function u(){window.location.hash=window.location.hash.replace(/_[0-9\.]+_[0-9\.]+_[0-9]+$/,"");c.turnOffPlayer();p.find(".b-map-player-c .player").show().siblings().hide();p.find(".b-map-player-menu").hide().filter(".forimages").show();c.legend.show();var A=window.location.hash.substr(1).split("_");if(A[0]=="sea"){var z=A.pop();A[0]=A.join("_");A[1]=z}c.mapData=Weather.MapData[A[0]][A[1]];var B="/data/animations/"+window.location.hash.substr(1)+"_01."+c.mapData.format;c.oldImg.attr("src",B);c.newImg.attr("src",B);c.Images=[];var y=c.mapData.frames.length;for(var x=0;x<y;x++){var s={src:c.oldImg.attr("src").replace(/(\d+)(\.png|\.jpg)$/,(x+1<10?"0"+(x+1):x+1)+"$2"),loaded:false};s.tmbl=s.src.replace(/animations/,"animations/frames");s.id=x+1;c.Images.push(s)}c.ImagesCount=c.Images.length}};Lego.block["b-weather-player"].prototype=new function(){var a=this,b=500,c=new y5.Template('<li><a href="#${id}"><img src="${tmbl}" alt="" width="31" height="20" /><span class="dis">${id}</span></a></li>');a.toggleStopPlay=function(f){var d=this;f.preventDefault();d.playState=!d.playState;d.turnOffPlayer();if(d.playState){d.play(true)}else{d.toggleImgs()}};a.setPlayIcon=function(){this.playIcon.className=(this.playState?"pause":"play")};a.turnOffPlayer=function(){var d=this;window.clearTimeout(d.timer);if(d.effect){d.effect.stop();d.oldImg.show()}d.setPlayIcon()};a.play=function(g){var f=this;if(!f.counted){Lego.c("stred/pid=7/cid=2378");f.counted=true}f.playerTable.addClass("b-map-player_on");var e=f.Images[++f.currentImage];if(!e){f.currentImage=0;e=f.Images[0]}f.callMorphByPreLoader=false;f.callMorphByTimer=false;if(!e.loaded){var d=new Image();$(d).load(function(){f.morph(this)});d.src=e.src}else{f.callMorphByPreLoader=true}if(f.playState&&!g){f.timer=window.setTimeout(function(h){return function(){h.morph()}}(f),b)}else{f.morph()}};a.oncomplete=function(){var e=this,d=e.oldImg;e.oldImg=e.newImg;e.newImg=d;e.effect=null;if(e.playState&&e.currentImage+1<e.Images.length){e.play()}else{e.playState=false;e.turnOffPlayer()}};a.morph=function(){var d=this;if(arguments.length){d.callMorphByPreLoader=true}else{d.callMorphByTimer=true}if(d.callMorphByTimer&&d.callMorphByPreLoader){d.toggleImgs();d.Images[d.currentImage].loaded=true;d.newImg.attr("src",d.Images[d.currentImage].src);d.effect=d.oldImg.animate({opacity:0},500,function(){d.oncomplete()});d.updateCounter()}};a.toggleImgs=function(){var d=this;d.newImg.css({zIndex:9,opacity:1});d.oldImg.css({zIndex:10})};a.change=function(g,d){g.preventDefault();var f=this;f.playState=false;f.currentImage=/#(\d+)/.exec(d.children(":first").attr("href"))[1]-2;f.turnOffPlayer();f.play(true)};a.updateCounter=function(i){var d=this,g=$(".b-weather-player");if(i){g.find(".thumb").css({width:(d.ImagesCount*35+($.browser.msie?6:2))}).html(c.evaluate(d.Images))}try{var f=d.mapData.frames[d.currentImage].replace("T"," ")+":00";f=y5.String.toDate(f);d.legend.html(y5.Vars.dayNames[(f.getDay()+6)%7]+", "+y5.Date.format(f,"%e %B %Y %H:00"))}catch(h){d.legend.html("")}d.counter.html((d.currentImage+1)+"/"+d.ImagesCount);g.find(".thumb").find(".current").removeClass("current").end().find("li:eq("+d.currentImage+")").addClass("current")};a.mapPlay=function(){if(!a.timer){a.timer=setInterval(function(){a.currentImage++;if(a.currentImage>=a.ImagesCount){a.mapStop();a.currentImage-=a.ImagesCount}a.updateWeatherCounter(false);a.mapRender(true)},b*2)}else{a.mapStop()}};a.updateWeatherCounter=function(k){var d=this,j=$(".b-weather-player");if(k){var g=new y5.Template('<span class="b-pseudo-link day" day="${day}" title="${title}"><span>${text}</span></span> '),f="",h=new Date(),e=0;for(;e<=8;e++){f+='<span class="b-pseudo-link day" day="'+e+'" title="'+y5.Date.format(h,y5.Vars.dayNames[(h.getDay()+6)%7].toLowerCase()+", %e %B")+'"><span>'+(e==0?i18n.pogoda["js-common"]["now"]():y5.Date.format(h,y5.Vars.dayShortNames[(h.getDay()+6)%7].toLowerCase()+", %e"+((e==1||h.getDate()==1)?" %B":"")))+"</span></span> ";h.setDate(h.getDate()+1)}j.find(".b-map-player-menu.formaps").html(f).find(".day").click(function(l){l.preventDefault();var i=$(this);j.find(".b-map-player-menu.formaps span.day:not(.b-pseudo-link)").addClass("b-pseudo-link");i.removeClass("b-pseudo-link");d.currentImage=i.attr("day")||0;d.mapRender(true);return false}).filter(":first").removeClass("b-pseudo-link")}j.find(".b-map-player-menu").hide().filter(".formaps").show();d.legend.hide()}};y5.require(["cssQuery"],function(){var a=' selected="selected" ';Weather.InformerSetup=function(d){this.control=d;this.textarea=y5.$$("div.b-informer-code textarea",d)[0];this.city=window.location.pathname.replace(/\/informer\/.*$/,"").replace(/^\//,"");this.color="";this.size=null;this.language=Weather.language?"."+Weather.language:"";this.imgs=y5.$$("div.b-informer-size img",d);y5.$$('input[type="radio"]',d).forEach(function(e){y5.on("click",this.changeColor,e,this)},this);y5.on("click",function(e){window.clipboardData.setData("Text",y5.String.unescapeHTML(y5.$$("textarea",e.parentNode)[0].value))},y5.$$("div.b-informer-code a.clipboard",d)[0]);y5.$$("div.b-informer-size li",d).forEach(function(e){y5.on("click",this.changeSize,e,this)},this);var c=y5.$$("input.js-suggest",d)[0],b=y5.$$("div.b-notify",d)[0];new Weather.Suggest(c,"/suggest-map.xml");y5.on("y5:Suggest:open",function(){y5.Classes.add(b,"g-hidden")},c);y5.on(["y5:Suggest:select","y5:Suggest:noresult"],function(e){y5.Classes.assign(b,"g-hidden",!(c.value&&!e));if(!e){return}this.changeCity(e)},c,this);this.changeInformer()};Weather.InformerSetup.prototype={changeCity:function(b){this.city=b;this.changeInformer();this.changeCode()},changeInformer:function(){this.imgs.forEach(function(b,c){b.src=Weather.InformerHost+this.city+"/"+(c+1)+""+this.color+this.language+".png"},this)},changeColor:function(c,b){this.color=b.value==1?"_white":"";this.changeInformer();this.changeCode()},changeSize:function(c,b){y5.$$(".b-informer-size .active").forEach(function(d){y5.Classes.remove(d,"active")});y5.Classes.add(b,"active");this.size=b.getAttribute("data-position");this.changeCode()},changeCode:function(){if((this.color!=null)&&(this.size!=null)&&(this.city!=null)){this.textarea.className="code";this.textarea.value=this.generateCode()}else{this.textarea.className="";this.textarea.value=this.textarea.defaultValue}},generateCode:function(){return'<a href="http://clck.yandex.ru/redir/dtype=stred/pid=7/cid=1228/*http://pogoda.yandex.ru/'+this.city+'"><img src="'+Weather.InformerHost+this.city+"/"+this.size+this.color+this.language+'.png" border="0" alt="'+i18n.pogoda["weather-bandit"].yandexpogoda()+'"/><img width="1" height="1" src="http://clck.yandex.ru/click/dtype=stred/pid=7/cid=1227/*http://img.yandex.ru/i/pix.gif" alt="" border="0"/></a>'}};y5.loaded("Weather:InformerSetup")});y5.require("Request.XML","Suggest",function(){Weather.Suggest=function(a,c){try{a.setAttribute("type","search")}catch(f){}var b=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};a.blur();var d=new y5.Suggest(a,{process:function(e){if(!e){y5.fire("y5:Suggest:onData",a,{query:e,elements:[]});return}e=e.toLowerCase();y5.Get.XML(c,{onload:function(g){var h=new RegExp(b(e).toUpperCase(),"gi");try{g=g.json().filter(function(j){if(!j.name&&!j.country){return false}j.value=j.name||j.country;j.html=j.value.replace(h,"<strong>$&</strong>");if(y5.Types.def(j.temperature)){j.html+='<span class="temp">'+(j.temperature>0&&Weather.language!="tr"?"+"+j.temperature:j.temperature.toString().replace("-","&minus;"))+" </span>";j.className="t"+(j.temperature%2==0?j.temperature:j.temperature+1)}return true})}catch(i){d.closeWidget();return}y5.fire("y5:Suggest:onData",a,{query:e,elements:g})}},{query:e,lang:(Weather.language||"")})}},{ci:true})};y5.loaded("Weather:Suggest")});y5.require("cssQuery","Weather:Suggest",function(){Weather.Suggest.Header=function(d,f){var b=y5.$$("input.js-suggest",d)[0],a=y5.$$("div.b-notify",d)[0],c=b.form.action,e;new Weather.Suggest(b,f.url?f.url:"/suggest.xml");f=null;y5.on("y5:Suggest:open",function(){y5.Classes.add(a,"g-hidden")},b);y5.on(["y5:Suggest:select","y5:Suggest:noresult"],function(k,h,j,i){y5.Classes.assign(a,"g-hidden",!(b.value&&!k));if(!k){return}var g=(i.country?"/region":"")+"/"+i.id+"/";if(j){b.value=h;b.form.action=g;e=h}else{window.location=g}},b);y5.on("submit",function(h,g){h.preventDefault();window.location=g.action!=c&&e==g.text.value?g.action:(c+"?text="+g.text.value)},d,true)};y5.loaded("Weather:Suggest.Header")});y5.require("cssQuery","Weather:Suggest",function(){Weather.Suggest.Map=function(c,d){var b=y5.$$("input.js-suggest",c)[0],a=y5.$$("div.b-notify",c)[0];new Weather.Suggest(b,d.url?d.url:"/suggest.xml");d=null;y5.on("y5:Suggest:open",function(){y5.Classes.add(a,"g-hidden")},b);y5.on(["y5:Suggest:select","y5:Suggest:noresult"],function(i,f,h,g){y5.Classes.assign(a,"g-hidden",!(b.value&&!i));if(!i){return}y5.fire("Weather:onMap:go",Weather,g);var e="/maps/#"+g.longitude+"_"+g.latitude+"_"+g.geozoom;h=true;b.value=f;b.form.action=e},b);y5.on("submit",function(h,f){h.preventDefault();var g=/#(.*)/.exec(f.action);if(g){g=g[1].split("_");y5.fire("Weather:onMap:go",Weather,{longitude:g[0],latitude:g[1],geozoom:g[2]})}else{window.location=f.action}},c,true)};y5.loaded("Weather:Suggest.Map")});y5.require("cssQuery",function(){Weather.Tune=function(e){var c=y5.$$("div.b-tune-field",e)[0],b=y5.$$("#tune, #tune-ch")[0],a=y5.$$("input.js-suggest",e)[0],d=y5.$$("div.b-notify",e)[0];y5.$$('input[type="radio"]').forEach(function(g){y5.on("click",f,g)});function f(i,g){var h=!(g.id=="tune"||g.id=="tune-ch");a.disabled=h;y5.Classes.assign(c,"g-hidden",h)}new Weather.Suggest(a,"/suggest-map.xml");y5.on("y5:Suggest:open",function(){y5.Classes.add(d,"g-hidden")},a);y5.on(["y5:Suggest:select","y5:Suggest:noresult"],function(g){y5.Classes.assign(d,"g-hidden",!(a.value&&!g));if(!g){return}b.value=g},a)};y5.loaded("Weather:Tune")});y5.require([],function(){Weather.Mobile=function(a){y5.on("Yandex:Mobile",function(b){if(b){y5.$$("a",a)[0].href="http://mobile.yandex.ru/?weather"}},Weather)};y5.loaded("Weather:Mobile")});
