(function(){this._ycssjs||(this._ycssjs=function(a,b){return !(a in _ycssjs||_ycssjs[a]++)})})();if(_ycssjs("56p3ZKChOk4YzsQ4h4Yi3WR1Hu0")){if(_ycssjs("rc8za4c5JC6qZqe9F2/oITh9RlU")){(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"}())}if(_ycssjs("sB8Ufwdf2USNYgDhbYGLxUphZvA")){(function(b){if(!b){b=window.Lego={}}!b.params&&(b.params={});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.params&&(a.params={});a.ch=function(c,b){if(a.params["show-counters"]){a.cp(0,2219,c,b)}}})(window.Lego)}if(_ycssjs("cXnDO14Y5A+NxW1rFFI6qOjFo1E")){(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)}if(_ycssjs("aIsupGFtZhGfKbXxiPQIrAPBfBk")){(function(a){if(!a){a=window.Lego={}}a.isSessionValid=function(){return !!a.getCookie("yandex_login")}})(window.Lego)}if(_ycssjs("+IoN5Ztbl/A8THYownGkak1R/mU")){(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)}if(_ycssjs("oBxXkftuvFSxIodWbtoM8GzKW3g")){(function(a){if(!a){a=window.Lego={}}a.messages=a.messages||{};a.message=function(c,b){return a.params.locale=="ru"?b:(a.messages[c]||b)}})(window.Lego)}if(_ycssjs("ShgATzASB+ROJtabxwGoPQHpFf4")){(function(a){a=a||{};a.oframebustMatchDomain=function(g,h){g=Object.prototype.toString.call(g)==="[object Array]"?g:(function(){var d=[];for(var e in g){g.hasOwnProperty(e)&&d.push(e)}return d}());for(var c=0,b=g.length;c<b;c++){var k=g[c];if(typeof(k)=="string"){if(/(\?|\*)/.test(k)){var f=k.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\?/g,".{1}");if((new RegExp("^"+f+"$")).test(h)){return true}}else{if(h==k){return true}}}else{try{if(k.test(h)){return true}}catch(j){}}}}})(window.Lego)}if(_ycssjs("BHkEtHOnTK1SBJzP2TCTJ1N9VPM")){(function(a){if(!a){a=window.Lego={}}a.oframebust=function(c){if(location==top.location){return}var d=(location.search.match(/[&?]oframebust=([^&;]+)/)||[])[1];if(!d){top.location=location}if(a.oframebustMatchDomain(c,d)){var b=document.createElement("iframe");b.style.position="absolute";b.style.left="-999px";b.style.width="1px";b.src="//"+d+"/oframebust.html?"+encodeURIComponent(location.href);(function(){if(document.body&&document.body.firstChild){document.body.insertBefore(b,document.body.firstChild)}else{setTimeout(arguments.callee,0)}})();return}top.location=location}})(window.Lego)}if(_ycssjs("RodIztVGat7t60ysl61NYZhp+d4")){(function(e){var b=(function(){_}).toString().indexOf("_")>-1,a=e.browser.msie,c=a?["toString","valueOf"]:null,f=function(){};function d(h,g,i){var k=false;if(a){var j=[];e.each(c,function(){i.hasOwnProperty(this)&&(k=true)&&j.push({name:this,val:i[this]})});if(k){e.each(i,function(l){j.push({name:l,val:this})});i=j}}e.each(i,function(m,n){if(k){m=n.name;n=n.val}if(e.isFunction(n)&&(!b||n.toString().indexOf(".__base")>-1)){var l=h[m]||function(){};g[m]=function(){var p=this.__base;this.__base=l;var o=n.apply(this,arguments);this.__base=p;return o}}else{g[m]=n}})}e.inherit=function(){var h=e.isFunction(arguments[0]),n=h?arguments[0]:f,j=arguments[h?1:0]||{},l=arguments[h?2:1],g=j.__constructor||(h&&n.prototype.__constructor)?function(){this.__constructor.apply(this,arguments)}:function(){};if(!h){g.prototype=j;g.prototype.__self=g.prototype.constructor=g;return e.extend(g,l)}e.extend(g,n);var k=function(){},i=k.prototype=n.prototype,m=g.prototype=new k();m.__self=m.constructor=g;d(i,m,j);l&&d(n,g,l);return g};e.inheritSelf=function(j,h,i){var g=j.prototype;d(g,g,h);i&&d(j,j,i);return j}})(jQuery)}if(_ycssjs("me/0OccXjp6tpD2MvHOgRzlwjoE")){(function(c){var a=0,d="__"+(+new Date),b=function(){return"uniq"+ ++a};c.identify=function(g,f){if(!g){return b()}var e="uniqueID" in g?"uniqueID":d;return f||e in g?g[e]:g[e]=b()}})(jQuery)}if(_ycssjs("gOR9FuNtxxFTRUHpBJCppIiGQD8")){(function(a){a.isEmptyObject||(a.isEmptyObject=function(c){for(var b in c){return false}return true})})(jQuery)}if(_ycssjs("AW47RAjsjOlefg/2L/CsT2aXktI")){(function(a){a.extend({debounce:function(c,d,e,b){if(arguments.length==3&&typeof e!="boolean"){b=e;e=false}var f;return function(){var g=arguments;b=b||this;e&&!f&&c.apply(b,g);clearTimeout(f);f=setTimeout(function(){e||c.apply(b,g);f=null},d)}},throttle:function(e,f,b){var g,d,c;return function(){d=arguments;c=true;b=b||this;g||(function(){if(c){e.apply(b,d);c=false;g=setTimeout(arguments.callee,f)}else{g=null}})()}}})})(jQuery)}if(_ycssjs("YB77wAPEhrLyKHXtnaxlOgv3K4A")){(function(d){var a="__"+ +new Date+"storage",c=function(f,e){return d.identify(f)+(e?d.identify(e):"")},b={buildEventName:function(f){return f},on:function(o,j,p,t,m){if(typeof o=="string"){if(d.isFunction(j)){t=p;p=j;j=undefined}var f=c(p,t),l=this[a]||(this[a]={}),g=o.split(" "),h=0,q;while(o=g[h++]){o=this.buildEventName(o);q=l[o]||(l[o]={ids:{},list:{}});if(!(f in q.ids)){var n=q.list,s={fn:p,data:j,ctx:t,special:m};if(n.last){n.last.next=s;s.prev=n.last}else{n.first=s}q.ids[f]=n.last=s}}}else{var k=this;d.each(o,function(u,i){k.on(u,i,j,m)})}return this},onFirst:function(i,h,g,f){return this.on(i,h,g,f,{one:true})},un:function(p,q,u){if(typeof p=="string"||typeof p=="undefined"){var n=this[a];if(n){if(p){var h=p.split(" "),k=0,s;while(p=h[k++]){p=this.buildEventName(p);if(s=n[p]){if(q){var g=c(q,u),f=s.ids;if(g in f){var o=s.list,t=f[g],j=t.prev,l=t.next;if(j){j.next=l}else{if(t===o.first){o.first=l}}if(l){l.prev=j}else{if(t===o.last){o.last=j}}delete f[g]}}else{delete this[a][p]}}}}else{delete this[a]}}}else{var m=this;d.each(p,function(v,i){m.un(v,i,u)})}return this},trigger:function(j,h){var l=this,k=l[a],i;typeof j==="string"?j=d.Event(l.buildEventName(i=j)):j.type=l.buildEventName(i=j.type);if(k&&(k=k[j.type])){var g=k.list.first,f;while(g){j.data=g.data;f=g.fn.call(g.ctx||l,j,h);if(typeof f!=="undefined"){j.result=f;if(f===false){j.preventDefault();j.stopPropagation()}}g.special&&g.special.one&&l.un(i,g.fn,g.ctx);g=g.next}}return this}};d.observable=d.inherit(b,b)})(jQuery)}if(_ycssjs("u3V7IoGAjdFS7mdZKbu77U0yloc")){(function(e,g){var d=[],f={},a={};function c(j,i,h){return(j?"__elem_"+j:"")+"__mod"+(i?"_"+i:"")+(h?"_"+h:"")}function b(i,h,j){e.isFunction(i)?(h[c(j,"*","*")]=i):e.each(i,function(l,k){e.isFunction(k)?(h[c(j,l,"*")]=k):e.each(k,function(m,n){h[c(j,l,m)]=n})})}this.BEM=e.inherit(e.observable,{__constructor:function(i,j,h){var k=this;k._modCache=i||{};k._processingMods={};k.params=e.extend(k.getDefaultParams(),j);h!==false?k._init():k.afterCurrentEvent(k._init)},_init:function(){var h=this;if("_modCache" in h&&!h.hasMod("js","inited")){h.setMod("js","inited").trigger("init")}return h},changeThis:function(i,h){var j=this;return function(){return i.apply(h||j,arguments)}},afterCurrentEvent:function(i,h){this.__self.afterCurrentEvent(this.changeThis(i,h))},trigger:function(i,h){this.__base(i=this.buildEvent(i),h).__self.trigger(i,h);return this},buildEvent:function(h){typeof h=="string"&&(h=e.Event(h));h.block=this;return h},hasMod:function(k,l,i){var h=arguments.length,m=false;if(h==1){i="";l=k;k=g;m=true}else{if(h==2){if(typeof k=="string"){i=l;l=k;k=g}else{i="";m=true}}}var j=this.getMod(k,l)===i;return m?!j:j},getMod:function(j,k){var h=typeof j;if(h==="string"||h==="undefined"){k=j||k;var i=this._modCache;return k in i?i[k]:i[k]=this._extractModVal(k)}return this._getElemMod(k,j)},_getElemMod:function(j,h,i){return this._extractModVal(j,h,i)},getMods:function(k){var i=k&&typeof k!="string",l=this,h=[].slice.call(arguments,i?1:0),j=l._extractMods(h,i?k:g);if(!i){h.length?e.each(h,function(n,m){l._modCache[m]=j[m]}):l._modCache=j}return j},setMod:function(k,o,p){if(typeof p=="undefined"){p=o;o=k;k=g}var l=this;if(!k||k[0]){var m=(k&&k[0]?e.identify(k[0]):"")+"_"+o;if(this._processingMods[m]){return l}var j,i=k?l._getElemMod(o,k,j=l.__self._extractElemNameFrom(k)):l.getMod(o);if(i===p){return l}this._processingMods[m]=true;var h=true,n=[o,p,i];k&&n.unshift(k);e.each([["*","*"],[o,"*"],[o,p]],function(){h=l._callModFn(j,this[0],this[1],n)!==false&&h});!k&&h&&(l._modCache[o]=p);h&&l._afterSetMod(o,p,k,j);delete this._processingMods[m]}return l},_afterSetMod:function(j,h,i){},toggleMod:function(j,k,i,m,l){if(typeof j=="string"){l=m;m=i;i=k;k=j;j=g}if(typeof m=="undefined"){m=""}else{if(typeof m=="boolean"){l=m;m=""}}var h=this.getMod(j,k);(h==i||h==m)&&this.setMod(j,k,typeof l==="boolean"?(l?i:m):this.hasMod(j,k,i)?m:i);return this},delMod:function(h,i){if(!i){i=h;h=g}return this.setMod(h,i,"")},_callModFn:function(k,j,h,i){var l=c(k,j,h);return this[l]?this[l].apply(this,i):g},_extractModVal:function(i,h){return""},_extractMods:function(h,i){return{}},channel:function(i,h){return this.__self.channel(i,h)},getDefaultParams:function(){return{}},del:function(i){var h=[].slice.call(arguments);typeof i=="string"&&h.unshift(this);this.__self.del.apply(this.__self,h);return this},destruct:function(){delete this._modCache}},{_name:"i-bem",blocks:f,decl:function(h,i,k){if(typeof h=="string"){h={block:h}}else{if(h.name){h.block=h.name}}if(h.baseBlock&&!f[h.baseBlock]){throw ('baseBlock "'+h.baseBlock+'" for "'+h.block+'" is undefined')}if(i.onSetMod){b(i.onSetMod,i);delete i.onSetMod}if(i.onElemSetMod){e.each(i.onElemSetMod,function(n,m){b(m,i,n)});delete i.onElemSetMod}var j=f[h.baseBlock||h.block]||this;if(h.modName){e.each(i,function(m,n){e.isFunction(n)&&(i[m]=function(){var p;if(this.hasMod(h.modName,h.modVal)){p=n}else{var o=j.prototype[m];o&&o!==i[m]&&(p=this.__base)}return p?p.apply(this,arguments):g})})}var l;h.block==j._name?(l=e.inheritSelf(j,i,k))._processLive(true):(l=f[h.block]=e.inherit(j,i,k))._name=h.block;return l},_processLive:function(h){return false},create:function(i,h){typeof i=="string"&&(i={block:i});return new f[i.block](i.mods,h)},getName:function(){return this._name},_extractElemNameFrom:function(h){},afterCurrentEvent:function(i,h){d.push({fn:i,ctx:h})==1&&setTimeout(function(){var j,k=d.splice(0,d.length);while(j=k.shift()){j.fn.call(j.ctx||this)}},0)},changeThis:function(i,h){return function(){return i.apply(h||this,arguments)}},del:function(l){var k=typeof l=="string",j=k?0:1,h=arguments.length;k&&(l=this);while(j<h){delete l[arguments[j++]]}return this},channel:function(i,h){if(typeof i=="boolean"){h=i;i=g}i||(i="default");if(h){if(a[i]){a[i].un();delete a[i]}return}return a[i]||(a[i]=new e.observable())}})})(jQuery)}if(_ycssjs("MTlVEeNzLvgreRn2v0jtqXJR/2c")){(function(i,b,a){var g="_",c="__",d="[a-zA-Z0-9-]+";function e(l,j,k){k.push(g,l,g,j)}function f(l,m,j,k){k.push(l);j&&e(m,j,k)}function h(n,l,m,j,k){f(n,a,a,k);k.push(c,l);j&&e(m,j,k)}i.INTERNAL={NAME_PATTERN:d,MOD_DELIM:g,ELEM_DELIM:c,buildModPostfix:function(m,j,k){var l=k||[];e(m,j,l);return k?l:l.join("")},buildClass:function(p,n,o,j,k){var m=typeof o;if(m=="string"){if(typeof j!="string"){k=j;j=o;o=n;n=a}}else{if(m!="undefined"){k=o;o=a}else{if(n&&typeof n!="string"){k=n;n=a}}}if(!(n||o||k)){return p}var l=k||[];n?h(p,n,o,j,l):f(p,o,j,l);return k?l:l.join("")},buildClasses:function(n,m,l,j){var k=j||[];m?h(n,m,a,a,k):f(n,a,a,k);l&&b.each(l,function(p,o){if(o){k.push(" ");m?h(n,m,p,o,k):f(n,p,o,k)}});return j?k:k.join("")}}})(BEM,jQuery)}if(_ycssjs("DvoRZovxguSW2moxWkLcWrZjXOQ")){(function(a,d){if(typeof JSON!="undefined"){return a.stringify=JSON.stringify}var c=Object.prototype.toString,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,b={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};a.stringify=function(l){if(l===null){return"null"}if(typeof l==="undefined"){return d}switch(c.call(l)){case"[object String]":return'"'+(e.test(l)?l.replace(e,function(i){var m=b[i];return typeof m==="string"?m:"\\u"+("0000"+i.charCodeAt(0).toString(16)).slice(-4)}):l)+'"';case"[object Number]":case"[object Boolean]":return""+l;case"[object Array]":var k="[",j=0,f=l.length,h;while(j<f){h=a.stringify(l[j]);k+=(j++?",":"")+(typeof h=="undefined"?"null":h)}return k+"]";case"[object Object]":var k="{",j=0,h;for(var g in l){if(l.hasOwnProperty(g)){h=a.stringify(l[g]);typeof h!="undefined"&&(k+=(j++?",":"")+'"'+g+'":'+h)}}return k+"}";default:return d}}})(jQuery)}if(_ycssjs("Aa0BmP6kHrXc44zAPbLKgxZFif0")){(function(l,e,c){var h=l.INTERNAL,g=h.ELEM_DELIM,i={area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,wbr:1},d=h.buildClass,j=h.buildClasses,k={};function f(m,n,o){(m[n]||(m[n]=[])).unshift(o)}function b(m,n){return n.modName?function(o){(o._curBlock.mods||{})[n.modName]===n.modVal&&m(o)}:m}function a(n,m){var p=e.isArray(m),o;e.isArray(n)?p?o=n.concat(m):(o=n).push(m):p?(o=m).unshift(n):o=[n,m];return o}l.HTML={decl:function(o,n){typeof o=="string"&&(o={name:o});var m=k[o.name]||(k[o.name]={});n.onBlock&&f(m,"_block",b(n.onBlock,o));if(n.onElem){e.isFunction(n.onElem)?f(m,"_elem",b(n.onElem,o)):e.each(n.onElem,function(q,p){f(m,"_elem"+(q==="*"?"":g+q),b(p,o))})}},build:function(n){var m=new this.Ctx(n);m._buildAll();return m._flush()},Ctx:e.inherit({__constructor:function(m){this._buffer=[];this._params=m;this._tParams=null;this._tParamsChanges=null;this._curBlock=c},pos:function(){return this._params._pos},isFirst:function(){return this._params._pos===1},isLast:function(){var m=this._params;return m._pos===m._siblingsCount},params:function(m){var n=this;if(typeof m=="undefined"){return n._params}n._params=m;return n},param:function(m,p,n,s){var q=this,o=q._params;if(typeof p=="undefined"){return o[m]}if(n||!(m in o)){o[m]=p}else{if(s){o[m]=e.extend(p,o[m])}}return q},attrs:function(n,m){return this.param("attrs",n,m,true)},attr:function(n,p,o){var q=this;if(typeof p=="undefined"){return(q._params.attrs||{})[n]}var m=q._params.attrs;m?(o||!(n in m))&&(m[n]=p):(q._params.attrs={})[n]=p;return q},tag:function(n,m){return this.param("tag",n,m)},cls:function(n,m){return this.param("cls",n,m)},mods:function(n,m){return this.param("mods",n,m,true)},mod:function(m,p,o){var q=this;if(typeof p=="undefined"){return(q._params.mods||{})[m]}var n=q._params.mods;n?(o||!(m in n))&&(n[m]=p):(q._params.mods={})[m]=p;return q},mix:function(o,m){var p=this,n=p._params;if(typeof o=="undefined"){return n.mix}if(m||!("mix" in n)){n.mix=o}else{n.mix=n.mix.concat(o)}return p},js:function(m){return this.param("js",m)},content:function(n,m){return this.param("content",n,m)},wrapContent:function(m){var o=this,n=o._params;m.content=n.content;n.content=m;return o},beforeContent:function(m){var o=this,n=o._params;n.content=a(m,n.content);return o},afterContent:function(m){var o=this,n=o._params;n.content=a(n.content,m);return o},wrap:function(m){var o=this,n=o._params;m.block||(m._curBlock=o._curBlock);m.content=n._wrapper?n._wrapper:n;n._wrapper=m;return o},tParam:function(m,p){var q=this,o=q._tParams||(q._tParams={});if(typeof p=="undefined"){return o[m]}var n=q._tParamsChanges||(q._tParamsChanges={});m in n||(n[m]=o[m]);o[m]=p;return q},generateId:function(){return e.identify()},stop:function(){this._params._isStopped=true},_buildAll:function(){var u=this,n=u._buffer,t=u._params,q=typeof t;if(q=="string"||q=="number"){n.push(t)}else{if(e.isArray(t)){var p=0,m=t.length,o,s;while(p<m){u._params=o=t[p++];s=typeof o;if(s=="string"||s=="number"){n.push(o)}else{if(o){o._pos=p;o._siblingsCount=m;u._buildByDecl()}}}}else{if(t){u._params._pos=u._params._siblingsCount=1;u._buildByDecl()}}}},_build:function(){var u=this,o=u._buffer,s=u._params,m=s.tag||"div",q,p=s.block||s.elem,t=p&&(s.block||u._curBlock.block),n=false;if(s.js){(q={})[d(t,s.elem)]=s.js===true?{}:s.js;n=!s.elem}o.push("<",m);if(p||s.cls){o.push(' class="');if(p){j(t,s.elem,s.mods,o);s.mix&&e.each(s.mix,function(v,x){if(x){o.push(" ");j(x.block,x.elem,x.mods,o);if(x.js){(q||(q={}))[d(x.block,x.elem)]=x.js===true?{}:x.js;n||(n=!x.elem)}}})}s.cls&&o.push(p?" ":"",s.cls);n&&o.push(" i-bem");o.push('"')}q&&o.push(' onclick="return ',e.stringify(q).replace(/'/g,"\\'").replace(/"/g,"'"),'"');s.attrs&&e.each(s.attrs,function(v,x){typeof x!="undefined"&&x!==null&&x!==false&&o.push(" ",v,'="',x.toString().replace(/"/g,"&quot;"),'"')});if(i[m]){o.push("/>")}else{o.push(">");if(typeof s.content!="undefined"){u._params=s.content;u._buildAll()}o.push("</",m,">")}},_flush:function(){var m=this._buffer.join("");delete this._buffer;return m},_buildByDecl:function(){var p=this,t=p._curBlock,m=p._params;m._curBlock&&(p._curBlock=m._curBlock);m.block&&(p._curBlock=m);if(!m._wrapper){if(m.block||m.elem){var s=k[p._curBlock.block];if(s){var u;if(m.elem){u=s["_elem"+g+m.elem];s._elem&&(u=(u?u.concat(s._elem):s._elem))}else{u=s._block}if(u){var n=0,q;while(q=u[n++]){q(p);if(m._isStopped){break}}}}}if(m._wrapper){m._curBlock=p._curBlock;p._params=m._wrapper;return p._buildAll()}}var v=p._tParamsChanges;p._tParamsChanges=null;p._build();p._curBlock=t;if(v){var o=p._tParams;e.each(v,function(x,y){typeof y=="undefined"?delete o[x]:o[x]=y})}}})}})(BEM,jQuery)}if(_ycssjs("8vPGg7BMHWtwsEioslxtiviQ93o")){(function(i,e,h){var d=e(window),z=e(document),m={},x={},B={},f={},p={},v=i.blocks,b=i.INTERNAL,k=b.NAME_PATTERN,o=b.MOD_DELIM,j=b.ELEM_DELIM,A=b.buildModPostfix,t=b.buildClass;function q(E,C){var D=E[0];e.each(s(D),function(F,H){c(H,D,F,C);var G=x[H.uniqId];if(G){G.domElem=G.domElem.add(E);e.extend(G.params,H)}else{a(F,E,H)}})}function a(J,F,E,C,K){if(typeof E=="boolean"){K=C;C=E;E=h}var G=F[0];E=c(E||s(G)[J],G,J);var I=E.uniqId;if(x[I]){return x[I]._init()}m[I]=m[I]?m[I].add(F):F;var H=v[J]||u.decl(J,{},{live:true});if(!(H._liveInitable=!!H._processLive())||C||E.live===false){var D=new H(m[I],E,!!C);delete m[I];K&&K.apply(D,Array.prototype.slice.call(arguments,4));return D}}function c(H,E,D,C){(H||(H={})).uniqId||(H.uniqId=(H.id?D+"-id-"+H.id:e.identify())+(C||e.identify()));var G=e.identify(E),F=B[G]||(B[G]={});F[D]||(F[D]=H);return H}function y(D,C,F){var E=D.find(C);return F?E:E.add(D.filter(C))}function s(C){var D=e.identify(C);return B[D]||(B[D]=g(C))}function g(E){var D=E.onclick||E.ondblclick;if(!D&&E.tagName.toLowerCase()=="body"){var F=e(E),C=F.attr("onclick")||F.attr("ondblclick");C&&(D=Function(C))}return D?D():{}}function l(C){delete B[e.identify(C)]}function n(){return z[0][e.support.boxModel?"documentElement":"body"]}e.fn.bem=function(C,D){return a(C,this,D,true)};var u=i.DOM=i.decl("i-bem__dom",{__constructor:function(D,E,C){var F=this;F.domElem=D;F._eventNameCache={};F._elemCache={};x[F._uniqId=E.uniqId||e.identify(F)]=F;F._needSpecialUnbind=false;F.__base(null,E,C)},findBlocksInside:function(C,D){return this._doBlocksMethod(this._buildFindBlocksParams("find",C,D))},findBlockInside:function(C,D){return this._doBlocksMethod(this._buildFindBlocksParams("find",C,D,true))},findBlocksOutside:function(C,D){return this._doBlocksMethod(this._buildFindBlocksParams("parents",C,D))},findBlockOutside:function(C,D){return this._doBlocksMethod(this._buildFindBlocksParams("closest",C,D))[0]},findBlocksOn:function(C,D){return this._doBlocksMethod(this._buildFindBlocksParams("",C,D))},findBlockOn:function(C,D){return this._doBlocksMethod(this._buildFindBlocksParams("",C,D,true))},_buildFindBlocksParams:function(C,D,F,E){return{select:C,elem:F?D:h,block:F||D,onlyFirst:E}},doBlocksMethodInside:function(D,E,F,C){return this._doBlocksMethod(this._buildDoBlocksMethodParams("find",D,E,F,C))},doBlocksMethodOutside:function(D,E,F,C){return this._doBlocksMethod(this._buildDoBlocksMethodParams("closest",D,E,F,C))},doBlocksMethodOn:function(D,E,F,C){return this._doBlocksMethod(this._buildDoBlocksMethodParams("",D,E,F,C))},doBlocksMethod:function(D,E,C){return this._doBlocksMethod({blocks:D,method:E,args:C})},_buildDoBlocksMethodParams:function(C,F,G,H,E){var D=typeof H=="string";return{select:C,elem:D?F:h,block:D?G:F,method:D?H:G,args:D?E:H}},_doBlocksMethod:function(D){var G=this;if(D.blocks){return e.map(D.blocks,function(L){return G._doBlockMethod(L,D.method,D.args)})}var F=D.elem?(typeof D.elem=="string"?this.findElem(D.elem):D.elem):this.domElem,E=typeof D.block=="string",K=E?D.block:D.block.blockName,C="."+(E?t(K):t(K,D.block.modName,D.block.modVal))+(D.onlyFirst?":first":""),H=F.filter(C);D.select&&(H=H.add(F[D.select](C)));if(D.onlyFirst){return H[0]?this._doBlockMethod(a(K,H.eq(0),true),D.method,D.args):null}if(D.method){return e.map(H,function(L){return G._doBlockMethod(a(K,e(L),true),D.method,D.args)})}var J=[],I={};e.each(H,function(L,M){var N=a(K,e(M),true);if(!I[N._uniqId]){I[N._uniqId]=true;J.push(N)}});return J},_doBlockMethod:function(D,E,C){return E?D[E].apply(D,C||[]):D},bindToDomElem:function(D,E,C){var F=this;C?D.bind(F._buildEventName(E),function(G){(G.data||(G.data={})).domElem=e(this);return C.apply(F,arguments)}):e.each(E,function(H,G){F.bindToDomElem(D,H,G)});return F},bindToDoc:function(D,C){this._needSpecialUnbind=true;return this.bindToDomElem(z,D,C)},bindToWin:function(D,C){this._needSpecialUnbind=true;return this.bindToDomElem(d,D,C)},bindTo:function(E,D,C){if(!D||e.isFunction(D)){C=D;D=E;E=this.domElem}else{if(typeof E=="string"){E=this.elem(E)}}return this.bindToDomElem(E,D,C)},unbindFromDomElem:function(C,D){C.unbind(this._buildEventName(D));return this},unbindFromDoc:function(C){return this.unbindFromDomElem(z,C)},unbindFromWin:function(C){return this.unbindFromDomElem(d,C)},unbindFrom:function(D,C){if(!C){C=D;D=this.domElem}else{if(typeof D=="string"){D=this.elem(D)}}return this.unbindFromDomElem(D,C)},_buildEventName:function(C){var D=this;return C.indexOf(" ")>1?e.map(C.split(" "),function(E){return D._buildOneEventName(E)}).join(" "):D._buildOneEventName(C)},_buildOneEventName:function(E){var G=this,C=G._eventNameCache;if(E in C){return C[E]}var F="."+G._uniqId;if(E.indexOf(".")<0){return C[E]=E+F}var D=".bem_"+G.__self._name;return C[E]=e.map(E.split("."),function(I,H){return H==0?I+D:D+"_"+I}).join("")+F},trigger:function(D,C){this.__base(D=this.buildEvent(D),C).domElem&&this._ctxTrigger(D,C);return this},_ctxTrigger:function(D,C){var G=this,F=f[G.__self._buildCtxEventName(D.type)],E={};F&&G.domElem.each(function(){var I=this,H=F.counter;while(I&&H){var K=e.identify(I,true);if(K){if(E[K]){break}var J=F.ctxs[K];if(J){e.each(J,function(M,L){L.fn.call(L.ctx||G,D,C)});H--}E[K]=true}I=I.parentNode}})},setMod:function(D,E,C){if(D&&typeof C!="undefined"&&D.length>1){var F=this;D.each(function(){F.setMod(e(this),E,C)});return F}return this.__base(D,E,C)},_extractModVal:function(G,D,F){var C=(D||this.domElem)[0],E;C&&(E=C.className.match(this.__self._buildModValRE(G,F||D)));return E?E[2]:""},_extractMods:function(C,G){var F={},D=!C.length,E=0;e.each((G||this.domElem)[0].className.match(this.__self._buildModValRE("("+(D?k:C.join("|"))+")",G,"g"))||[],function(H,I){var K=(I=e.trim(I)).lastIndexOf(o),J=I.substr(0,K-1).lastIndexOf(o);F[I.substr(J+1,K-J-1)]=I.substr(K+1);++E});E<C.length&&e.each(C,function(H,I){I in F||(F[I]="")});return F},_afterSetMod:function(I,E,G,H){var D=this.__self,C=D._buildModClassPrefix(I,H),F=D._buildModValRE(I,H),J=E==="";(G||this.domElem).each(function(){var K=this.className;K.indexOf(C)>-1?this.className=K.replace(F,(J?"":"$1"+C+E)+"$3"):J||e(this).addClass(C+E)});H&&this.dropElemCache(H,I,E)},findElem:function(F,H,G,E){if(arguments.length%2){E=G;G=H;H=F;F=this.domElem}else{if(typeof F=="string"){F=this.findElem(F)}}var D=this.__self,C="."+e.map(H.split(" "),function(I){return t(D._name,I,G,E)}).join(",.");return y(F,C)},_elem:function(D,F,C){var E=D+A(F,C);return this._elemCache[E]||(this._elemCache[E]=this.findElem(D,F,C))},elem:function(F,E,C){if(F.indexOf(" ")<0){return this._elem(F,E,C)}var D=e([]),G=this;e.each(F.split(" "),function(){D=D.add(G._elem(this,E,C))});return D},dropElemCache:function(F,E,C){if(F){var G=this,D=A(E,C);F.indexOf(" ")<0?delete G._elemCache[F+D]:e.each(F.split(" "),function(I,H){delete G._elemCache[H+D]})}else{this._elemCache={}}return this},elemParams:function(C){var D;if(typeof C=="string"){D=C;C=this.elem(C)}else{D=this.__self._extractElemNameFrom(C)}return g(C[0])[t(this.__self.getName(),D)]||{}},containsDomElem:function(C){return C.parents().andSelf().index(this.domElem)>-1},buildSelector:function(D,E,C){return this.__self.buildSelector(D,E,C)},destruct:function(D){var E=this,C=E.__self;E._isDestructing=true;E._needSpecialUnbind&&C.doc.add(C.win).unbind("."+E._uniqId);E.dropElemCache().domElem.each(function(F,G){e.each(s(G),function(H,I){var J=x[I.uniqId];J&&!J._isDestructing&&J.destruct()});l(G)});D||E.domElem.remove();delete x[E.un()._uniqId];delete E.domElem;delete E._elemCache;E.__base()}},{doc:z,win:d,_processLive:function(D){var F=this,E=F._liveInitable;if("live" in F){var C=typeof E=="undefined";if(C^D){if(e.isFunction(F.live)){E=F.live()!==false;F.live=function(){}}else{E=F.live}}}return E},init:function(D,F,E){if(!D||e.isFunction(D)){E=F;F=D;D=z}var C=e.identify();y(D,".i-bem").each(function(){q(e(this),C)});F&&this.afterCurrentEvent(function(){F.call(E||this,D)})},destruct:function(D,C,E){if(typeof D!="boolean"){E=C;C=D;D=h}y(C,".i-bem",E).each(function(){e.each(s(this),function(F,G){if(G.uniqId){var H=x[G.uniqId];H&&H.destruct(true)}});l(this)});D||(E?C.empty():C.remove())},update:function(C,D,F,E){this.destruct(C,true);this.init(C.html(D),F,E)},_buildCtxEventName:function(C){return this._name+":"+C},_liveClassBind:function(E,F,J,C){var I=this;if(F.indexOf(" ")>-1){e.each(F.split(" "),function(K,L){I._liveClassBind(E,L,J,C)})}else{var D=I._buildCtxEventName(F),H=p[D],G=e.identify(J);if(!H){H=p[D]={};z.bind(F,I.changeThis(I._liveClassTrigger,I))}H=H[E]||(H[E]={uniqIds:{},fns:[]});if(!(G in H.uniqIds)){H.fns.push({uniqId:G,fn:I._buildLiveEventFn(J,C)});H.uniqIds[G]=H.fns.length-1}}return this},_liveClassUnbind:function(F,G,J){var E=this._buildCtxEventName(G),I=p[E];if(I){if(J){if(I=I[F]){var H=e.identify(J);if(H in I.uniqIds){var D=I.uniqIds[H],C=I.fns.length-1;I.fns.splice(D,1);while(D<C){I.uniqIds[I.fns[D++].uniqId]=D-1}delete I.uniqIds[H]}}}else{delete I[F]}}return this},_liveClassTrigger:function(I){var H=p[this._buildCtxEventName(I.type)];if(H){var E=I.target,C=[];for(var J in H){H.hasOwnProperty(J)&&C.push(J)}do{var D=" "+E.className+" ",G=0;while(J=C[G++]){if(D.indexOf(" "+J+" ")>-1){var F=0,L=H[J].fns,K;while(K=L[F++]){K.fn.call(e(E),I)}if(I.isPropagationStopped()){return}C.splice(--G,1)}}}while(C.length&&(E=E.parentNode))}},_buildLiveEventFn:function(E,C){var D=this;return function(G){var F=[D._name,((G.data||(G.data={})).domElem=e(this)).closest(D.buildSelector()),true],H=a.apply(null,C?F.concat([E,G]):F);H&&(C||E.apply(H,arguments))}},liveInitOnEvent:function(D,C,E){return this.liveBindTo(D,C,E,true)},liveBindTo:function(G,D,F,C){if(!F){F=D;D=G;G=h}if(!G||typeof G=="string"){G={elemName:G}}var E=this;if(G.elemName&&G.elemName.indexOf(" ")>1){e.each(G.elemName.split(" "),function(H,I){E._liveClassBind(t(E._name,I,G.modName,G.modVal),D,F,C)});return E}return E._liveClassBind(t(E._name,G.elemName,G.modName,G.modVal),D,F,C)},liveUnbindFrom:function(D,C,F){var E=this;if(D.indexOf(" ")>1){e.each(D.split(" "),function(G,H){E._liveClassUnbind(t(E._name,H),C,F)});return E}return E._liveClassUnbind(t(E._name,D),C,F)},_liveInitOnBlockInit:function(D,F,E){var C=this._name;v[D].on("init",function(G){var H=G.block[E](C);F&&e.each(H,function(){F.call(this)})});return this},liveInitOnBlockInit:function(C,D){return this._liveInitOnBlockInit(C,D,"findBlocksOn")},liveInitOnBlockInsideInit:function(C,D){return this._liveInitOnBlockInit(C,D,"findBlocksOutside")},on:function(C,G,F,E,D){return C.jquery?this._liveCtxBind(C,G,F,E,D):this.__base(C,G,F,E)},un:function(C,F,E,D){return C.jquery?this._liveCtxUnbind(C,F,E,D):this.__base(C,F,E)},liveCtxBind:function(C,G,F,E,D){return this._liveCtxBind(C,G,F,E,D)},_liveCtxBind:function(C,H,G,F,E){if(e.isFunction(G)){E=F;F=G;G=h}var J=this;if(H.indexOf(" ")>-1){e.each(H.split(" "),function(K,L){J._liveCtxBind(C,L,G,F,E)})}else{var D=J._buildCtxEventName(H),I=f[D]||(f[D]={counter:0,ctxs:{}});C.each(function(){var L=e.identify(this),K=I.ctxs[L];if(!K){K=I.ctxs[L]={};++I.counter}K[e.identify(F)+(E?e.identify(E):"")]={fn:F,data:G,ctx:E}})}return J},liveCtxUnbind:function(C,F,E,D){return this._liveCtxBind(C,F,E,D)},_liveCtxUnbind:function(C,F,E,D){var H=this,G=f[F=H.buildEventName(F)];if(G){C.each(function(){var J=e.identify(this,true),I;if(J&&(I=G.ctxs[J])){E&&delete I[e.identify(E)+(D?e.identify(D):"")];if(!E||e.isEmptyObject(I)){G.counter--;delete G.ctxs[J]}}});G.counter||delete f[F]}return H},_extractElemNameFrom:function(C){var D=C[0].className.match(this._buildElemNameRE());return D?D[1]:h},extractParams:g,_buildModClassPrefix:function(D,C){return t(this._name)+(C?j+(typeof C==="string"?C:this._extractElemNameFrom(C)):"")+o+D+o},_buildModValRE:function(D,C,E){return new RegExp("(\\s?)"+this._buildModClassPrefix(D,C)+"("+k+")(\\s|$)",E)},_buildElemNameRE:function(){return new RegExp(this._name+j+"("+k+")(?:\\s|$)")},buildSelector:function(D,E,C){return"."+t(this._name,D,E,C)},getBlockByUniqId:function(C){return x[C]},getWindowSize:function(){var C=d[0];if(typeof C.innerWidth!="undefined"){return{width:C.innerWidth,height:C.innerHeight}}var D=n();return{width:D.clientWidth,height:D.clientHeight}}})})(BEM,jQuery)}if(_ycssjs("+TdS4jafy63XFqw+rGn6ubNJuqg")){(function(a){a=a||{};a.oframebust=function(c){if(window.top.location!=window.location){var b=document.referrer.match(/^https?:\/\/([^:\/\s]+)\/?.*/);if(!b){return}!a.oframebustMatchDomain(c,b[1])&&(window.top.location=window.location)}}})(window.Lego)}if(_ycssjs("/x7IndzjhAtGwjOUtq3o73VzR8g")){function r(c,b){var e=+new Date(),d=(c&&c.href)?c.href:"http://yandex.ru/";document.createElement("IMG").src="http://"+TT.clckHost+"/click/dtype="+b+"/u="+e+"/reqid="+TT.reqid+"/*"+d}function w(b,e,g,f){var d=(b&&b.href)?b.href:"http://yandex.ru/";document.createElement("IMG").src=(f||TT.clck)+"/path="+e+(g?"/vars="+g:"")+"/*"+d}function rc(b,c){var d=b.href;c=c.replace(/=8$/,"=0");try{if(Lego){Lego.block["i-mcounter"]&&(c+="&mc="+escape(Lego.block["i-mcounter"].get()));c+="&i="+((Lego.params&&Lego.params.shownResult)||TT.shownResult)}}catch(f){}b.href=c;setTimeout(function(){b.href=d},500)}window.Lego||(window.Lego={});Lego.ch=function(){}}if(_ycssjs("k4NgYOr6coyvx7OcSENN2/ncpTQ")){(function(){var a=(function(d,i,f){function e(n,l){var m=n.className||n.getAttribute("class");return(" "+(m)+" ").indexOf(" "+l+" ")>-1}function b(m,l){while(m&&m.ownerDocument){if(e(m,l)){return m}m=m.parentNode}}function g(o,l,q){var s,m,n,p=[];s=o.getElementsByTagName("*");for(m=0,n=s.length;m<n;m++){if(e(s[m],l)){if(q){p.push(s[m])}else{return s[m]}}}if(q){return p}}function k(q,o){var s,n,m,p,l;l=[];n=q.childNodes;for(m=0,p=n.length;m<p;m++){s=n[m];if(s.nodeType!==8){l.push(s.nodeType===1?k(s,o):(o?s.nodeValue.replace(/(^\s+)|(\s+$)/g,""):s.nodeValue))}}return l.join("")}function c(n){var m,l=[];for(m in n){if(n[m]){l.push(i(m)+"="+i(n[m]))}}return l.join("&")}function j(l,m){var n=d?new d("Microsoft.XMLHTTP"):new XMLHttpRequest();n.open("post",l,true);n[f]("Content-Type","application/x-www-form-urlencoded");n[f]("Accept","*/*");n.send(c(m));n=null}function h(p){var o=document.cookie;if(o.length<1){return false}var l=o.indexOf(p+"=");if(l==-1){return false}l+=(p.length+1);var m=o.indexOf(";",l);return decodeURIComponent((m==-1)?o.substring(l):o.substring(l,m))}return{closest:b,find:g,post:j,text:k,getCookie:h}})(window.ActiveXObject,encodeURIComponent,"setRequestHeader");ts=function(f,j){var c,k,l,d,h,g;d={request:TT.rtext,request_time:TT.rtime,ajax:1,snippet:""};l=a.closest(f,"b-serp-item");g=a.find(l,"b-serp-item__title-link")||f;d.header=g.innerHTML;d.url=g.href;c=a.find(l,"b-hotel");if(c){d.snippet="<p>"+a.text(c)+"</p>"}c=a.find(l,"b-serp-item__text");k=a.find(l,"b-video__info-text");h=c&&c.innerHTML||k&&k.innerHTML;if(h){d.snippet+="<p>"+h+"</p>"}c=a.find(l,"b-video-preview__image");d.exsnp_img=c&&c.src;c=a.find(l,"b-hotel__stars");k=a.find(l,"b-hotel__starstext");d.exsnp_stars=c&&c.title||k&&k.title;c=a.find(l,"b-address__text");if(c&&a.text(c)){d.snippet+="<p>"+a.text(c)+"</p>"}c=a.find(l,"b-moikrug");if(c){d.snippet="<p>"+a.text(c,true)+"</p>";k=a.find(c,"b-moikrug");d.exsnp_img=k&&k.src}c=a.find(l,"b-wikifacts");h=c&&c.innerHTML;if(h){d.snippet="<p>"+h+"</p>"+d.snippet}c=a.find(l,"z-developer__info");h=c&&c.innerHTML;if(h){d.snippet+="<p>"+h+"</p>"}c=a.find(l,"b-serp-item__layout_snippet_vkontakte");if(c){k=a.find(c,"b-serp-item__line",true);for(var e=0,b=k.length;e<b;e++){d.snippet+="<p>"+k[e].innerHTML+"</p>"}k=c.getElementsByTagName("img")[0];d.exsnp_img=k&&k.src}if(j){d.sl_title=j.title;d.sl_url=j.url;d.sl_pos=j.pos}d.yandexuid=a.getCookie("yandexuid");a.post("/storeclick",d)};tsl=function(b,d){var c=a.find(a.closest(b,"b-serp-item"),"b-serp-item__title-link");ts(c,{title:b.innerHTML,url:b.getAttribute("href"),pos:d})}}())}if(_ycssjs("8Ma0rDEpyy8Uxn9A1vh2aoFSQTs")){BEM.DOM.decl("b-moo-init",{onSetMod:{js:function(){function a(b){Widget=function(c){var d=this;$.extend(this,{layer:$('<div class="b-moo__widget"></div>'),id:"moo-base",child:{}},c);$((this.parent&&this.parent.layer)||document.body).prepend(this.layer.attr("id",this.id).click(function(f){f.stopPropagation()}));if(this.control){this.parent.layer.prepend(this.control.click(function(){d.active?d.hide():d.show()}).addClass("b-moo__button").children().addClass("b-moo__button__link").end())}this.init.call(this)};Widget.prototype.add=function(c){c.parent=this;c.base=this.base;this.child[c.id]=new Widget(c);this.layer.trigger({type:"add",child:this.child[c.id]})};Widget.prototype.hide=function(){if(this.active&&this.parent){this.layer.hide().trigger("off")&&this.control&&this.control.removeClass("b-moo__button_active")}this.active=false;$.each(this.child,function(d,c){c.hide()})};Widget.prototype.show=function(){this.base.hide();this.active=true&&this.layer.show().trigger("on")&&this.control&&this.control.addClass("b-moo__button_active");if(this.layer.height()>this.base.maxHeight){this.layer.height(this.base.maxHeight)}};Widget.prototype.setCookie=function(c,d,e){$.cookie(c,d,$.extend({domain:document.domain,expires:365},e))};$(function(){var c=new Widget({layer:$('<div class="b-moo"></div>'),maxHeight:$(window).height()-30,isFullScreen:false,multiParams:["test-bit"],init:function(){var h=this;this.base=this;this.url=window.location.href.split("#")[0];this.queryUrl=window.location.href.split("?")[0];this.queryParams={};var f=window.location.toString().split("#")[0].split("?")[1].split("&");for(var e in f){var d=f[e].split("=")[0],g=f[e].split("=")[1];if(g&&d!="text"){this.queryParams[d]=this.addParam(this.queryParams,d,$.decodeURIComponent(g))}}this.queryParams.text=$(".b-form-input__input").val();this.layer.prepend(h.collapse=$('<div class="b-moo__button__bug"></div>').click(function(){h.isFullScreen?h.min():h.max()})).bind("add",function(i){if(i.child.control){i.child.control.hide()}});this.layer.css("width","30px");$(document).click(function(){h.hide()})},addParam:function(f,d,e){if(!e){return}e=e.toString();if($.inArray(d,this.multiParams)!=-1){if(f[d]){if($.isArray(f[d])){if($.inArray(e,f[d])==-1){f[d]=[].concat(f[d]);f[d].push(e)}return f[d]}else{if(f[d]==0){return e}return[f[d],e]}}}return e},serialize:function(e){var d=[];$.each(e,function(g){if($.isArray(e[g])){for(var f in e[g]){d.push(g+"="+encodeURIComponent(e[g][f]))}}else{d.push(g+"="+encodeURIComponent(e[g]))}});return d.join("&")},remQuery:function(d){delete this.queryParams[d];var e=$.extend({},this.queryParams);return this.queryUrl+"?"+this.serialize(e)},setQuery:function(e,d){var f=$.extend({},this.queryParams);f[e]=this.addParam(f,e,d);f.tt2=this.addParam(f,"tt2","1");return this.queryUrl+"?"+this.serialize(f)},min:function(){$.each(this.child,function(e,d){d.hide();d.control.hide()});this.collapse.removeClass("b-moo__button__bug_max");this.layer.animate({width:"30px"},"fast");this.isFullScreen=false},max:function(){this.collapse.addClass("b-moo__button__bug_max");this.layer.animate({width:"100%"},"fast");$.each(this.child,function(e,d){d.control.show()});this.isFullScreen=true;r(null,"stred/pid=143/cid=2945");if(this.child["moo-test"]&&this.child["moo-test"].autoExperiment){this.child["moo-test"].show()}}});if(b&&b.param&&b.param.length){c.add({id:"moo-custom",control:$("<div><a>"+b.i18n.params+"</a></div>"),data:b.param,init:function(){var d=this;this.layer.one("on",function(){for(var f=0,e=d.data.length,g="";f<e;f++){if(typeof d.data[f]=="object"){g+='<li class="b-moo__list__item"><label '+(d.base.queryParams[d.data[f].tag]==d.data[f].val?'style="font-weight:bold"':"")+'><input  class="b-moo__checkbox" type="checkbox" value="'+d.data[f].tag+'" rel="'+d.data[f].val+'"'+(d.base.queryParams[d.data[f].tag]==d.data[f].val?' checked="checked"':"")+"/>"+d.data[f].text+"</label></li>"}else{g+=d.data[f]}}d.layer.html('<ul class="b-moo__list">'+g+"</ul>").find("label").click(function(i){d.target=$(this);var j=d.target.val(),h=d.target.attr("rel");if(d.base.queryParams[j]){if(d.target.attr("checked")){document.location.href=d.base.setQuery(j,h)}else{document.location.href=d.base.remQuery(j)}}else{document.location.href=d.base.setQuery(j,h)}})})}})}if(b&&b.exp.tag&&b.exp.tag.length){c.add({id:"moo-test",control:$("<div><a>"+b.i18n.exp.tag+"</a></div>"),formParam:"test-tag",data:b.exp.tag,init:function(){var g=this,d="",f=this.control.find("a"),e="https://jira.yandex-team.ru/browse/";this.TAG=this.base.queryParams[this.formParam];if(b.btt&&!this.TAG){this.TAG=b.btt;this.autoExperiment=true}this.layer.one("on",function(){$.each(g.data,function(i,h){if(h.num!=g.TAG){d+='<li class="b-moo__list__item">'+h.num+'. <a class="b-moo__list__item__link" href="'+g.base.setQuery(g.formParam,h.num)+'">'+h.desc+"</a>"+(h.jira!=""?' <a target="_blank" class="b-moo__list__item_i_sublink" href="'+e+h.jira+'">['+h.jira+"]</a>":"")+"</li>"}else{g.TAG=h}});if(g.TAG&&!g.autoExperiment){d+='<li class="b-moo__list__item"><a href="'+g.base.remQuery(g.formParam)+'">[x] '+g.TAG.desc+"</a>"+(g.TAG.jira?' <a target="_blank" href="'+e+g.TAG.jira+'">['+g.TAG.jira+"]</a>":"")+"</li>";g.base.setQuery(g.formParam,g.TAG.num)}else{if(g.autoExperiment){d+='<li class="b-moo__list__item" style="padding:5px 0px 3px;"><span style="background-color:#ffae46; padding:4px 5px;"><a href="">'+g.TAG.desc+"</a>"+(g.TAG.jira?' <a target="_blank" href="'+e+g.TAG.jira+'">['+g.TAG.jira+"]</a>":"")+"</span></li>"}else{g.base.remQuery(g.formParam)}}g.layer.html('<ul class="b-moo__list">'+d+"</ul>")});if(this.TAG){f.text(f.text()+" №"+this.TAG)}}})}if(b&&b.exp.bit&&b.exp.bit.length){c.add({id:"moo-bit",control:$("<div><a>"+b.i18n.exp.bit+"</a></div>"),formParam:"test-bit",data:b.exp.bit,init:function(){var g=this,d="",f=this.control.find("a"),e="https://jira.yandex-team.ru/browse/";this.TAG=this.base.queryParams[this.formParam];if(b&&b.autoexperiment.bit&&b.autoexperiment.bit.length&&!this.TAG){this.TAG=b.autoexperiment.bit;this.autoExperiment=true}this.layer.one("on",function(){$.each(g.data,function(j,i){d+='<li class="b-moo__list__item">'+i.num+'. <a class="b-moo__list__item__link" href="'+g.base.setQuery(g.formParam,i.num)+'">'+i.desc+"</a>"+(i.jira!=""?' <a target="_blank" class="b-moo__list__item_i_sublink" href="'+e+i.jira+'">['+i.jira+"]</a>":"")+"</li>"});if(g.autoExperiment){d+='<li class="b-moo__list__item" style="padding:5px 0px 3px;"><span style="background-color:#ffae46; padding:4px 5px;"><a href="">Эксперименты № '+g.TAG.join(", ")+"</a></span></li>"}var h=g.base.remQuery(g.formParam);h=g.base.setQuery(g.formParam,0);d+='<li class="b-moo__list__item"><a href="'+h+'">[x] '+b.i18n.exp.check+"</a></li>";g.layer.html('<ul class="b-moo__list">'+d+"</ul>")});if(this.TAG){f.text(f.text()+" №"+this.TAG)}}})}c.add({id:"moo-geo",control:$("<div><a>"+b.i18n.changeRegion+"</a></div>"),data:b.geo,tune:"http://tune.yandex.ru/region/save2.xml?sk="+b.sk,maxHeight:$(window).height()-190,init:function(){var d=this;this.tuneUri=this.tune+"&retpath="+encodeURIComponent(this.base.url)+"&region_id=";this.layer.one("on",function(){$.getScript("http://export.yandex.ru/geoselectorData.xml",function(){var e=geoselectorData.replace(/<o v="(\d+)">([^>]+)<\/o>/g,function(i,h,j){return"<li alt='"+j.toLowerCase()+"'><a href='"+d.tuneUri+h+"'>"+j+"</a></li>"});var f='<ul class="b-moo__geolist">',g="";$.each(d.data.default_cities,function(i,h){f+="<li alt='"+h.name.toLowerCase()+"'><a href='"+d.tuneUri+h.code+"'>"+h.name+"</a></li>";if(h.code==d.data.regionId){g=i}});f+="</ul>";e='<ul style="display:none" class="b-moo__geolist">'+e+"</ul>"+f+'<input type="text" /><p>';$.each(d.data.quick,function(i,h){e+='<a href="'+d.tuneUri+h.code+'"'+(h.code==d.data.regionId?'class="b-moo__on" ':"")+">"+h.name+"</a>"+(d.data.quick.length>i+1?", ":"")});e+="</p>";if(d.data.regionByIp){e+='<p class="b-moo__on">по умолчанию — на основе ip</p>'}else{e+='<p><a href="'+d.tuneUri+'&regions_auto">по умолчанию — на основе ip</a></p>'}d.layer.html('<div class="b-moo__list">'+e+"</div>");d.default_cities_ul=d.layer.find(".b-moo__geolist:eq(1)");d.all_cities_ul=d.layer.find(".b-moo__geolist:eq(0)");d.target(d.default_cities_ul.find("li:eq("+g+")"));d.layer.find("input").focus()})}).bind("on",function(){d.layer.find("input").focus()}).keyup(function(g){var f=d.layer.find("input");if(f.val()){d.default_cities_ul.hide();d.all_cities_ul.find("li").hide();d.all_cities_ul.find("li[alt^="+f.val().toLowerCase()+"]").show();d.all_cities_ul.show().css("height",d.maxHeight+"px")}else{d.default_cities_ul.show();d.all_cities_ul.hide()}switch(g.keyCode){case (13):document.location.href=d.Target.find("a").attr("href");break;case (40):d.target(d.Target.next());break;case (38):d.target(d.Target.prev());break;default:d.target()}})},target:function(d){this.Target&&this.Target.css("background","");this.Target=d||this.layer.find("li:visible:first");this.Target.css("background","#ccc")}});if(!$.browser.msie||$.browser.version>6){c.add({id:"moo-brak",control:$("<div><a>"+b.i18n.reportBug+"</a></div>"),data:{geocontext:b.geo.regionId,desc:"Что вы хотели найти?\n"},url:"http://brak.yandex-team.ru/api/ticket/",init:function(){var d=this;this.control.addClass("b-moo__button_left");this.layer.one("on",function(){d.initIssue.call(d)}).bind("on",function(){$("ol li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).click(function(){var f=$(this);if(f.hasClass("in")){return false}f.addClass("in");d.textarea.val(d.textarea.val()+"\n"+f.find("b:first").text()+d.getText(f.find("a:first"))+"["+f.find("a:first").attr("href")+"]");return false});var e=function(f){w(this,f.join(","))};b&&b.counters&&b.counters.reportMessage&&e(b.counters.reportMessage)||(b.counters.reportMessage=null);d.textarea.focus()}).bind("off",function(){$("ol li").unbind().removeClass("hover")}).bind("send",function(){d.data.desc="["+$("option:selected",d.layer).text()+"]\n"+$("textarea",d.layer).val()+"\n"+document.location;d.data.title=$("input[name=text]").val();$("ol li").unbind().removeClass("hover");$.getJSON(d.url+"?jsoncallback=?",d.data,function(f,e){d.message('Спасибо, запись в BRAK: <a href="'+f.url+'">'+f.title+"</a> добавлена.")})})},message:function(d){this.layer.empty().prepend($('<div class="b-moo__brak">'+d+"</div>"))},getText:function(d){return d.text().replace(/\s+/g," ").replace(/[^А-Яа-яA-Za-z0-9-  &\?·\/,\\.]+/g,"")},initIssue:function(){var h=this,d="",e,g=b.i18n.reasonList,f=g.length;for(e=0;e<f;e++){d+="<option>"+g[e]+"</option>"}this.layer.empty().prepend('<div class="b-moo__brak"><select>'+d+"</select><textarea>"+this.data.desc+'</textarea><input type="submit" id="moo-brak-submit" value="'+b.i18n.send+'" /></div>');this.textarea=$("textarea",this.layer);$("#moo-brak-submit",this.layer).click(function(){h.layer.trigger("send")})}})}})}a(this.params)}}})}if(_ycssjs("fdkRHyG6iLVfsGleiDU1LHhjlGE")){(function(b){function a(d){var c={"%D0":"%D0%A0","%C0":"%D0%90","%C1":"%D0%91","%C2":"%D0%92","%C3":"%D0%93","%C4":"%D0%94","%C5":"%D0%95","%A8":"%D0%81","%C6":"%D0%96","%C7":"%D0%97","%C8":"%D0%98","%C9":"%D0%99","%CA":"%D0%9A","%CB":"%D0%9B","%CC":"%D0%9C","%CD":"%D0%9D","%CE":"%D0%9E","%CF":"%D0%9F","%D1":"%D0%A1","%D2":"%D0%A2","%D3":"%D0%A3","%D4":"%D0%A4","%D5":"%D0%A5","%D6":"%D0%A6","%D7":"%D0%A7","%D8":"%D0%A8","%D9":"%D0%A9","%DA":"%D0%AA","%DB":"%D0%AB","%DC":"%D0%AC","%DD":"%D0%AD","%DE":"%D0%AE","%DF":"%D0%AF","%E0":"%D0%B0","%E1":"%D0%B1","%E2":"%D0%B2","%E3":"%D0%B3","%E4":"%D0%B4","%E5":"%D0%B5","%B8":"%D1%91","%E6":"%D0%B6","%E7":"%D0%B7","%E8":"%D0%B8","%E9":"%D0%B9","%EA":"%D0%BA","%EB":"%D0%BB","%EC":"%D0%BC","%ED":"%D0%BD","%EE":"%D0%BE","%EF":"%D0%BF","%F0":"%D1%80","%F1":"%D1%81","%F2":"%D1%82","%F3":"%D1%83","%F4":"%D1%84","%F5":"%D1%85","%F6":"%D1%86","%F7":"%D1%87","%F8":"%D1%88","%F9":"%D1%89","%FA":"%D1%8A","%FB":"%D1%8B","%FC":"%D1%8C","%FD":"%D1%8D","%FE":"%D1%8E","%FF":"%D1%8F"};d=d.toUpperCase().replace(/%.{2}/g,function(e){return c[e]});return d}b.extend({decodeURIComponent:function(f){var c="";try{c=decodeURIComponent(f)}catch(d){c=decodeURIComponent(a(f))}return c}})})(jQuery)}if(_ycssjs("a1FkHdQrnZs1yxHv+/yjQHpi3v8")){(function(c,b){var d;function a(e){e[0]&&!!e.attr("href")&&(window.location.href=e.attr("href"))}b.block["b-pager"]=function(e){if(d){return e.override&&(d=c(this))}d=c(this);if(e.keydownReaction){c(document).keydown(function(f){if(!f.ctrlKey||c(f.target).is("input, textarea")){return}if(f.keyCode==37){a(d.find(".b-pager__prev"))}else{if(f.keyCode==39){a(d.find(".b-pager__next"))}}})}}})(jQuery,window.Lego)}if(_ycssjs("+X2f+4NCE97fyQyR29pNg7C9cp0")){(function(a){var b=a.event.special.leftclick={setup:function(){a(this).bind("click",b.handler)},teardown:function(){a(this).unbind("click",b.handler)},handler:function(c){if(!c.button){c.type="leftclick";a.event.handle.apply(this,arguments);c.type="click"}}}})(jQuery)}if(_ycssjs("eRpp7IVMuj+kBGQLeckT10TuVF8")){$(function(){BEM.DOM.init()})}if(_ycssjs("HNC+Si8gZl+yTKbRX8iWy928Ztg")){(function(b,a){a.block["b-search__input"]=function(e){var f=b(this);var c=b.extend({focus:false,shortcut:false},e);if(c.focus||f.data("lego:focused")){if(!f.data("lego:focused")){var d=document.activeElement;(d&&"input textarea".indexOf(d.tagName.toLowerCase())>-1)||setTimeout(function(){f.focus();if(f[0].createTextRange){var h=f[0].createTextRange(),g=f.val().length;h.collapse();h.moveStart("character",g);h.moveEnd("character",g);h.select()}f.data("lego:focused",true)},0)}if(!!window.history.length&&!b.trim(f.val())){f.bind("keydown",function(g){if(g.keyCode==8){if(!b.trim(f.val())){return window.history.back()}}f.unbind("keydown",arguments.callee)})}f.blur(function(){f.data("lego:focused",false)}).focus(function(){f.data("lego:focused",true)})}if(c.shortcut){b(document).keydown(function(g){if(!g.ctrlKey||b(g.target).is("input, textarea")){return}if(g.keyCode==38){f.focus().select()}})}}})(jQuery,window.Lego)}if(_ycssjs("Z/2AsDqoOKDPn3Mim9QrGSOsDyc")){(function(){var f,a=0,c=false,e=0,d=BEM.channel("sys"),b=50;BEM.decl("i-system",{},{start:function(){$(document).bind("mousemove keydown",function(){e=0;if(c){c=false;d.trigger("wakeup")}});this._tick()},_tick:function(){var g=this;d.trigger("tick",{counter:a++});if(!c&&(e+=b)>3000){c=true;d.trigger("idle")}f=setTimeout(function(){g._tick()},b)}}).start()})()}if(_ycssjs("g+4hCC3N1ZEUYIIvrcN2bg2+yOU")){(function(){var b,a;function c(){var d,e=0;while(d=b[e++]){d.val(d.elem("input").val())}}BEM.DOM.decl("b-form-input",{onSetMod:{js:function(){var f=this,d=f.elem("input"),e=f.__self.doc[0].activeElement;f._val=d.val();f._focused=e===d[0];if(!a){b=[];a=f.channel("sys").on({tick:c,idle:function(){a.un("tick",c)},wakeup:function(){a.on("tick",c)}})}f._focused&&f.setMod("focused","yes");if(f.params.autoFocus&&!f._focused&&!(e&&"input textarea".indexOf(e.tagName.toLowerCase())>-1)){f.setMod("focused","yes")._focused=true}f._instanceIndex=b.push(f.bindTo(d,{focus:f._onFocus,blur:f._onBlur}))-1;f.params.shortcut&&f.bindToDoc("keydown",function(g){if(g.ctrlKey&&g.keyCode==38&&!$(g.target).is("input, textarea")){f.setMod("focused","yes")}})},disabled:function(e,d){this.elem("input").attr("disabled",d=="yes")},focused:function(e,d){if(this.hasMod("disabled","yes")){return false}var f=d=="yes";f?this._focused||this._focus():this._focused&&this._blur();this.afterCurrentEvent(function(){this.trigger(f?"focus":"blur")})}},onElemSetMod:{message:{visibility:function(g,h,d){var i=this,f=i.getMod(g,"type");if(f){var e=true;d||i.elem("message","type",f).each(function(){this!=g[0]&&i.hasMod($(this),"visibility","visible")&&(e=false)});e&&i.toggleMod("message-"+f,"yes","",d==="visible")}f=="error"&&g.attr("aria-hidden",d!=="visible")}}},val:function(f,e){if(typeof f=="undefined"){return this._val}if(this._val!=f){var d=this.elem("input");d.val()!=f&&d.val(f);this._val=f;this.trigger("change",e)}return this},name:function(d){return this.elem("input").attr("name")},_onFocus:function(){this._focused=true;return this.setMod("focused","yes")},_onBlur:function(){this._focused=false;return this.delMod("focused")},_focus:function(){var e=this.elem("input")[0];if(e.createTextRange&&!e.selectionStart){var d=e.createTextRange();d.move("character",e.value.length);d.select()}else{e.focus()}},_blur:function(){this.elem("input").blur()},destruct:function(){this.__base.apply(this,arguments);this.params.shortcut&&this.unbindFromDoc("keydown");b.splice(this._instanceIndex,1);var e=this._instanceIndex,d;while(d=b[e++]){--d._instanceIndex}}});BEM.HTML.decl("b-form-input",{onBlock:function(d){var e=d.param("id")||d.generateId();d.tag("span").tParam("id",e).tParam("has-clear",d.mod("has-clear")==="yes").afterContent({elem:"box",tag:"span",content:{elem:"input",tag:d.mod("type")||"input",attrs:{value:d.param("value"),name:d.param("name"),id:e}}}).js(true)},onElem:{label:function(d){d.tag("label").attr("for",d.tParam("id"))},box:function(d){if(d.tParam("has-clear")){d.afterContent({elem:"clear",tag:"span"})}},hint:function(d){d.tag("label").attr("for",d.tParam("id"))}}})})()}if(_ycssjs("mNddFlgm7DjviUWHpxa4swUY/t4")){(function(e,a){var d=!((e.browser.safari||e.browser.webkit)&&navigator.userAgent.toLowerCase().indexOf("mobile")>-1),c=a.block["b-suggest"]=function(I){var C=e(this),N=e('<div class="b-suggest-popup"><i class="b-suggest__opera-gap"></i><div class="b-suggest-list">'+(d?('<iframe class="b-suggest__iframe" frameborder="0" src="javascript:\'<body style=\\\'background:none;overflow:hidden\\\'>\'"></iframe>'):'<div class="b-suggest__iframe"/>')+'<ul class="b-suggest-items"></ul><div class="b-suggest-nah"></div></div></div>').hide(),K=N.find(".b-suggest-items"),G=C.closest("form").find('input[name="'+(I["for"]||"text")+'"]'),H=G.closest("form"),s=I.url||(I.host||"")+(I.path||""),t=I.openInNewWindow=typeof I.openInNewWindow=="undefined"?true:I.openInNewWindow,m=!!I.permanent,z=(function(){var O={};O["*"+s]=["",[]];return O})(),p=I.timeout||700,L={suggestType:I.suggestType||((I.id=="serp")?"serp_ru":I.id),usageType:"not_shown",region:"",nah:"nah_not_shown",buttonByMouse:"",position:"p0",session:(new Date().getTime()+Math.round(Math.random()*10000)),queryTimes:[],ratio:{userValue:0,finalValue:0,userActions:0},text:"",user_input:"",pos:"",_keydownTriggered:false},l="",y=I.getData?c.getDataFns[I.getData]:(function(){var Q={"1.4.2":"-1-4-2","1.4.4":"-1-4-4","1.5.2":"-1-5-2","1.6.2":"-1-6-2"},V=(s.match(/^[^\/]*\/\/[^\/]+\//)||[location.protocol+"//"+location.host+"/"])[0]+"jquery"+(Q[e.fn.jquery]||"")+".crossframeajax.html",P=e('<iframe style="display:none" src="'+V+'"></iframe>').appendTo("body")[0],R=document.domain,T=document.domain.match(/([^.]+\.)?[^.]+$/)[0],O=10,W;try{document.domain!=T&&(document.domain=T)}catch(U){}(function S(){if(O){try{W=P.contentWindow.$.crossframeAjax;if(W){y=W}else{throw true}}catch(X){O--;setTimeout(S,42)}}else{try{document.domain!=R&&(document.domain=R)}catch(X){}}})();return e.ajax})(),v=function(O){var P=O.length&&O[0].onclick?O[0].onclick():{};return P.value||O.find(".content").text()||O.text()},A=function(S){var Q=0;if(typeof(S.selectionEnd)=="number"){Q=S.selectionEnd}else{var R=document.selection.createRange();if(R&&R.parentElement()==S){var P=S.value.length,O=S.createTextRange();O.moveToBookmark(R.getBookmark());var T=S.createTextRange();T.collapse(false);Q=O.compareEndPoints("EndToEnd",T)>-1?P:-O.moveEnd("character",-P)}}return Q},J=(function(){function R(U){return e.isArray(U)&&c.buildItemHtmlFns[U[0]]?c.buildItemHtmlFns[U[0]](U,{stats:L,params:I}):'<li><span class="b-suggest-elem b-suggest-elem-link"><span class="content">'+b(U)+"</span></span></li>"}function Q(V){L.region=V[V.length-1].r;L.exprt=V[V.length-1].exprt;var U=V[1];if(!(k=U?U.length:0)){return u()}if(L.usageType!="edit"){L.usageType="not_used"}var W=V[2]||[];K.html(e.map(U,function(Y,X){return R(!!W[X]?["href",Y,W[X]]:Y)}).join("")).find(".b-suggest-elem").filter(":not(.b-suggest__elem_selectable_no)").bind("mouseenter mouseleave",function(X){e(this)[X.type=="mouseenter"?"addClass":"removeClass"]("b-suggest-elem_state_hover")});E=U.length-K.find(".b-suggest__elem_selectable_no").length;N.find(".b-suggest-close").hide();if(N.find(".b-suggest-nah").find(".b-suggest-nah__link").length==0){switch(V[V.length-1].n){case 1:N.find(".b-suggest-list").addClass("b-suggest-list-nah_enabled").end().find(".b-suggest-nah").addClass("b-suggest-nah_enabled").html(c.buildHtmlMessageFns.nahLink("b-suggest.hah:on",a.message("b-suggest.hah:on","Мои запросы ((включены))"),a.message("b-suggest.hah:linkHref","http://tune.yandex.ru/suggest/"))).show();break;case 2:N.find(".b-suggest-list").addClass("b-suggest-list-nah_disabled").end().find(".b-suggest-nah").addClass("b-suggest-nah_disabled").html(c.buildHtmlMessageFns.nahLink("b-suggest.hah:off",a.message("b-suggest.hah:off","Мои запросы ((отключены))"),a.message("b-suggest.hah:linkHref","http://tune.yandex.ru/suggest/"))).show();break;default:N.find(".b-suggest-close").show().end().find(".b-suggest-nah").hide();break}N.find(".b-suggest-nah__link").bind("mousedown click",function(){window.location=this.href})}N.show();if(F===false&&L._keydownTriggered===true){L.usageType="edit";L._keydownTriggered=false}F=false}var S=0,T=C.hasClass("b-suggest_reaction_changing"),P,O;return function(X){if(i){return}if(T){typeof O=="string"||(O=X);O==X||(P=true);if(!P){return}P=false;O=X}D(0,X);var W=z[X+"*"+s];if(W){Q(W)}else{var aa=setTimeout(u,p);S+=1;var V=new Date();var Z=document.getElementsByName("lr"),U;try{U=window.location.toString().match(/lr=(.*?)(&|$)/)}catch(Y){U=""}if(Z.length>0){l=Z[0].value}else{if(U&&U.length>0){l=U[1]}else{l=""}}y({url:s,data:e.extend({part:G.val(),pos:A(G[0]),lr:l},a.params.yandexuid?{yu:a.params.yandexuid}:null),dataType:"json",type:"GET",timeout:p,success:(function(ac,ab){return function(ad){if(!ad){return}z[X+"*"+ab]=ad;clearTimeout(aa);if(ac==S){Q(ad)}L.queryTimes.push(new Date()-V)}})(S,s)})}}})(),x=function(O){n();window.setTimeout(function(){e('<form style="display:none" action="'+O+'" method="get"'+(t?' target="_blank"':"")+"/>").appendTo(e("body")).submit().remove()},500)},i=false,F=true,g=false,u=(function(){if(F){return}N.hide();D(0,G.val());F=true}),k=0,E=0,D=(function(){var O=0,P=G.val();return function(S,V){if(V!=undefined){P=V}O=S?O+S:0;if(O<0){O=E}if(O>E){O=0}if(O>0){L.position="p"+O}var U=K.find(".b-suggest-elem").filter(":not(.b-suggest__elem_selectable_no)").removeClass("b-suggest-elem_selected").eq(O?O-1:1000).addClass("b-suggest-elem_selected"),W=v(U),T=U.is(".b-suggest-elem_nav")?f:(W||P),R=U.attr("href"),Q=W&&R?R:"";G.val()!=T&&G.val(T);G.data("href",Q)}})();var o=G.data("lego:focused");if(o){G.blur()}G.attr("autocomplete","off");if(o){G.focus()}if(I.text){G.val(I.text)}C.append(N);var q=false;e(document).bind("popupsClose.lego",u).keydown(function(O){if(O.metaKey||O.ctrlKey||O.altKey||O.shiftKey){g=true}}).keyup(function(O){g=false}).mouseup(function(){q=false});H.find(":submit").click(function(){L.buttonByMouse="button_by_mouse"});K.mousedown(function(R){q=true;var Q=e(R.target);if(Q.is("li *")){j=Q.closest(".b-suggest-elem");if(j.hasClass("b-suggest-elem_nav")){n()}else{if(!j.hasClass("b-suggest__elem_selectable_no")){D(0,v(j));G.data("href",j.attr("href"));var P=Q.parents("ul"),O=R.target.className;if(O&&O.split(" ").length>0){P.find("."+O.split(" ")[0]).each(function(S){if(this==R.target){L.position="p"+(S+1);Q.hasClass("b-suggest-elem_nah")&&(L.nah="nah_used")}})}L.usageType="mouse";if(!m){i=true}if(j.get(0).tagName.toLowerCase()!="a"){setTimeout(function(){H.submit()},0)}else{B()}}}}return false}).click(function(){if(m){u()}else{e.browser.msie?u():G.focus()}});var f="",j,h=false;H.submit(function(P){if(I.preventSubmit){u();i=true;B();setTimeout(function(){i=false},100);return false}if(h){return h=false}var O=G.data("href")||L.followAfterSubmit;if(m){G.blur()}if(!L.submitted){P.preventDefault();if(O){L.followAfterSubmit=O}L.user_input=f;L.text=G.val();L.ratio.userValue=f.length;L.ratio.finalValue=L.text.length;B();window.setTimeout(function(){H.submit()},500)}else{if(O&&!m){P.preventDefault();location.href=O}else{if(O&&m){P.preventDefault();x(O)}}}});function M(){D(0);u();q=false}G.blur(function(O){if(O.originalEvent&&!O.originalEvent.preventDefault){setTimeout(function(){if(!q&&G[0]!=document.activeElement){u()}},84)}else{if(!q){u()}}}).click(function(){if(!F&&!G.val()){f="";u()}L.pos=A(G[0])}).keydown(function(O){switch(O.keyCode){case 38:case 40:O.preventDefault();L._keydownTriggered=true;if(F){i=false;J(G.val())}else{L.usageType="keyboard";D(O.keyCode-39)}break;case 13:break;case 27:q=true;break}setTimeout(function(){f!=G.val()&&L.ratio.userActions++},1)}).keypress(function(P){switch(P.keyCode){case 13:q=true;var O=K.find(".b-suggest-elem_selected");if(O.hasClass("b-suggest-elem_nav")){h=true;x(O.attr("href"));m&&u()}else{O.hasClass("b-suggest-elem_nah")&&(L.nah="nah_used");m||(i=true);H.submit();u()}return false;case 27:return false}}).keyup(function(O){L.pos=A(G[0]);switch(O.keyCode){case 38:case 40:break;case 27:M();break;default:if(f!=G.val()){L.endTime=new Date().getTime();L.startTime||(L.startTime=L.endTime);f=G.val();clearInterval(P);var P=setTimeout(function(){J(G.val())},1)}break}});setTimeout(function(){G.focus(function(O){if(e(O.target).data("b-suggest")!==false){q=false;J(G.val())}})},42);if(m){setInterval(function(){z={"":[]}},30*60*1000)}C.bind("updateParams.lego",function(P,Q){if(!Q){return}var O=(s.match(/^[^\/]*\/\/[^\/]+\//)||[""])[0]+(Q.path||"");if(O){s=O}if("closed" in Q){i=Q.closed}});function B(){if(a.params["show-counters"]){var P=[[L.suggestType,L.usageType,L.position,L.nah,L.buttonByMouse].join("."),"session="+L.session,"region="+L.region,"times="+L.queryTimes.join("."),"pos="+L.pos,"text="+L.text,"user_input="+L.user_input,"ratio="+L.ratio.userValue+"."+L.ratio.finalValue+"."+L.ratio.userActions];var O=new Date().getTime();L.startTime&&P.push("since_first_change="+(O-L.startTime));L.endTime&&P.push("since_last_change="+(O-L.endTime));L.exprt&&P.push("exprt="+L.exprt);a.cp(0,2873,P.join("/"))}m||(L.submitted=true)}function n(){a.params["show-counters"]&&a.cp(0,70833,L.suggestType+"/session="+L.session)}};function b(f){return f[0]=="hl"?e.map(f.slice(1),function(g){return e.isArray(g)?'<span class="b-suggest__highlight">'+g[0]+"</span>":g}).join(""):f}c.getDataFns={};c.buildItemHtmlFns={href:function(g,f){if(g[3]&&g[3].nah&&g[3].nah==1){f.stats.nah=="nah_not_shown"&&(f.stats.nah="nah_not_used");return'<li><span class="b-suggest-elem b-suggest-elem_nah">'+b(g[1])+"</span></li>"}return'<li><a class="b-suggest-elem b-suggest-elem-link" href="'+g[2]+'"><span class="content">'+b(g[1])+"</span></a></li>"},nav:function(g,f){return'<li><a class="b-suggest-elem b-suggest-elem-link b-suggest-elem_nav"'+(f.params.openInNewWindow?' target="_blank"':"")+' href="http://'+(g[3]||g[2])+'"><span class="content"><span class="link">'+g[2]+'</span><span class="info">&nbsp;&mdash; '+g[1]+"</span></span></a></li>"},html:function(g,f){return'<li><span class="b-suggest-elem b-suggest-elem-link">'+g[1]+"</span></li>"},fact:function(g,f){return'<li><span class="b-suggest-elem b-suggest-elem-link b-suggest-elem-fact"><span class="content">'+g[1]+'</span><span class="b-suggest__fact"> &mdash; '+g[2]+"</span></span></li>"}};c.buildHtmlMessageFns={nahLink:(function(){var g=/\(\(([^\)]+)\)\)/g,f={};return function(h,j,i){if(!f[h]){f[h]=j.replace(g,'<a class="b-suggest-nah__link" href="'+i+'">$1</a>')}return f[h]}})()}})(jQuery,window.Lego)}if(_ycssjs("o+bz1WqVgpnuHgfFGE/cCueNmu4")){BEM.DOM.decl("b-form-button",{onSetMod:{js:function(){var a=this.isDisabled();(this._href=this.domElem.attr("href"))&&a&&this.domElem.removeAttr("href");this.elem("input").attr("disabled",a)},focused:{yes:function(){if(this.isDisabled()){return false}this.bindTo("keydown",this._onKeyDown).elem("input").focus()},"":function(){this.unbindFrom("keydown").elem("input").blur()}},disabled:function(c,a){var b=a=="yes";this.elem("input").attr("disabled",b);this._href&&(b?this.domElem.removeAttr("href"):this.domElem.attr("href",this._href));b&&this.domElem.keyup()},pressed:function(b,a){this.isDisabled()||this.trigger(a=="yes"?"press":"release")},hovered:{"":function(){this.delMod("pressed")}},"*":function(a){if(this.isDisabled()&&"hovered pressed".indexOf(a)>-1){return false}}},isDisabled:function(){return this.hasMod("disabled","yes")},url:function(a){if(typeof a=="undefined"){return this._href}else{this._href=a;this.isDisabled()||this.domElem.attr("href",a);return this}},_onKeyDown:function(b){var a=b.keyCode;if((a==13||a==32)&&!this._keyDowned){this._keyDowned=true;this.setMod("pressed","yes").bindTo("keyup",function(){this.delMod("pressed").unbindFrom("keyup");delete this._keyDowned;if(a==32&&this.domElem.attr("href")){document.location=this.domElem.attr("href")}})}},_onClick:function(a){this.isDisabled()?a.preventDefault():this.afterCurrentEvent(function(){this.trigger("click")})}},{live:function(){var a={mouseover:{name:"hovered",val:"yes"},mouseout:{name:"hovered"},mousedown:{name:"pressed",val:"yes"},mouseup:{name:"pressed"},focusin:{name:"focused",val:"yes"},focusout:{name:"focused"}};this.liveBindTo("leftclick",function(b){this._onClick(b)}).liveBindTo("mouseover mouseout mouseup focusin focusout",function(c){var b=a[c.type];this.setMod(b.name,b.val||"")}).liveBindTo("mousedown",function(c){var b=a[c.type];c.which==1&&this.setMod(b.name,b.val||"")})}});BEM.HTML.decl("b-form-button",{onBlock:function(a){a.tag(a.param("url")?"a":"span").attrs({href:a.param("url"),target:a.param("target")}).mods({theme:a.mod("theme")||"grey-19",height:a.mod("height")||19}).content([{elem:"left",tag:"i"},{elem:"content",tag:"span",content:{elem:"text",content:a.content(),tag:"span"}},((a.param("type")=="button"||a.param("type")=="submit")&&{elem:"input",tag:"input",attrs:{type:a.param("type"),disabled:a.param("disabled"),value:""}}),a.param("url")&&{elem:"click",tag:"i"}],true).js(true)}})}if(_ycssjs("nnE/uLGyTZporjLPaNYhgsT8IXA")){(function(){function c(g){try{document.domain=g}catch(f){}}var b=document.domain,a=b.match(/[^.]+\.[^.]+$/)[0];c(a);$(function(){$.crossframeAjax=function(d){c(b);setTimeout(function(){try{$.ajax(d)}catch(f){}},0);c(a)}})})()}};
