(function(){var a=function(){var b=document.documentElement.style;return typeof b.borderRadius==="string"||typeof b.WebkitBorderRadius==="string"||typeof b.KhtmlBorderRadius==="string"||typeof b.MozBorderRadius==="string"};document.documentElement.className+=a()?" m-border-radius":" m-no-border-radius"}());(function(b){if(!b){b=window.Lego={}}function a(c){return c.replace(/^(?:https?:)?\/\//,"")}b.c=function(d,c,j){var i=a((j&&j.host)||b.params["click-host"]||"clck.yandex.ru"),e=function(l,n,m,k){return n.indexOf("/dtype=")>-1?n:location.protocol+"//"+i+"/"+m+"/dtype="+l+"/rnd="+((new Date()).getTime()+Math.round(Math.random()*100))+(k?"/*"+(n.match(/^http/)?n:location.protocol+"//"+location.host+(n.match("^/")?n:"/"+n)):"/*data="+encodeURIComponent("url="+encodeURIComponent((n.match(/^http/)?n:location.protocol+"//"+location.host+(n.match("^/")?n:"/"+n)))))},g=function(){var k=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];var h=document.createElement("script");h.setAttribute("src",e(d,location.href,"jclck"));k.insertBefore(h,k.firstChild)};if(c){if(c.className.match(/b-pseudo-link/)||(c.href&&c.href.match(/^mailto:/))||(j&&j.noRedirect===true)){g()}else{if(c.href){var f=c.href;c.href=e(d,f,"redir");setTimeout(function(){c.href=f},500)}else{if(c.form){if(c.type.match(/submit|button|image/)){var f=c.form.action;c.form.action=e(d,f,"redir",true);setTimeout(function(){c.form.action=f},500)}else{g()}}else{if(c.action){c.action=e(d,c.action,"redir",true)}else{throw"counter.js: not link and not form!"}}}}}else{g()}}})(window.Lego);(function(a){if(!a){a=window.Lego={}}a.cp=function(f,c,e,b,d){a.c("stred/pid="+f+"/cid="+c+(e?"/path="+e:""),b,d)}})(window.Lego);(function(a){if(!a){a=window.Lego={}}a.ch=function(c,b){if(a.params["show-counters"]){a.cp(0,2219,c,b)}}})(window.Lego);(function(a){if(!a){a=window.Lego={}}a.getCookie=function(h){var g=document.cookie;if(g.length<1){return false}var d=g.indexOf(h+"=");if(d==-1){return false}d+=(h.length+1);var f=g.indexOf(";",d);return decodeURIComponent((f==-1)?g.substring(d):g.substring(d,f))}})(window.Lego);(function(a){if(!a){a=window.Lego={}}a.isSessionValid=function(){return !!a.getCookie("yandex_login")}})(window.Lego);(function(b,a){if(!a){a=window.Lego={}}a.init||(a.init=function(c){(c=a.params=b.extend({id:"",login:a.isSessionValid()?a.getCookie("yandex_login")||"":"",yandexuid:a.getCookie("yandexuid"),locale:"ru",retpath:window.location.toString(),"passport-host":"//passport.yandex.ru","pass-host":"//pass.yandex.ru","passport-msg":c.id,"social-host":"//social.yandex.ru","lego-path":"/lego","show-counters-percent":100},c,a.params))["show-counters"]=Math.round(Math.random()*100)<=c["show-counters-percent"];b(function(){c.oframebust&&a.oframebust(c.oframebust)});return c});a.block||(a.block={});a.blockInit||(a.blockInit=function(c,d){c=c||document;d=d||".g-js";b(c).find(d).each(function(){var h=b(this),g=this.onclick?this.onclick():{},e=g.name||"",f=a.block[e];if(f&&!h.data(e)){f.call(h,g);h.data(e,true).addClass(e+"_js_inited")}})});a.blockInitBinded||(a.blockInitBinded=!!b(document).ready(function(){a.blockInit()}))})(jQuery,window.Lego);
