(function(){this._ycssjs||(this._ycssjs=function(a,b){return !(a in _ycssjs||_ycssjs[a]++)})})();if(_ycssjs("VyXMomgkm7u31G5Mtfq7GaPDfOM")){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("53shlyGdl/dZsU+qw4tnCPVfpWI")){(function(a){if(!a){a=window.Lego={}}a.c=function(c,b,i){var g=(i&&i.host)||"clck.yandex.ru",d=function(k,m,l,j){return m.indexOf("/dtype=")>-1?m:location.protocol+"//"+g+"/"+l+"/dtype="+k+"/rnd="+((new Date()).getTime()+Math.round(Math.random()*100))+(j?"/*"+(m.match(/^http/)?m:location.protocol+"//"+location.host+(m.match("^/")?m:"/"+m)):"/*data="+encodeURIComponent("url="+encodeURIComponent((m.match(/^http/)?m:location.protocol+"//"+location.host+(m.match("^/")?m:"/"+m)))))},f=function(){var j=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];var h=document.createElement("script");h.setAttribute("src",d(c,location.href,"jclck"));j.insertBefore(h,j.firstChild)};if(b){if(b.className.match(/b-pseudo-link/)||(b.href&&b.href.match(/^mailto:/))||(i&&i.noRedirect===true)){f()}else{if(b.href){var e=b.href;b.href=d(c,e,"redir");setTimeout(function(){b.href=e},500)}else{if(b.form){if(b.type.match(/submit|button|image/)){var e=b.form.action;b.form.action=d(c,e,"redir",true);setTimeout(function(){b.form.action=e},500)}else{f()}}else{if(b.action){b.action=d(c,b.action,"redir",true)}else{throw"counter.js: not link and not form!"}}}}}else{f()}}})(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)}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("FVnF68IoF75bxISATSBsOux4ubI")){(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,s,m){if(typeof o=="string"){if(d.isFunction(j)){s=p;p=j;j=undefined}var f=c(p,s),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,r={fn:p,data:j,ctx:s||this,special:m};if(n.last){n.last.next=r;r.prev=n.last}else{n.first=r}q.ids[f]=n.last=r}}}else{var k=this;d.each(o,function(t,i){k.on(t,i,j,m)})}return this},onFirst:function(i,h,g,f){return this.on(i,h,g,f,{one:true})},un:function(p,q,t){if(typeof p=="string"||typeof p=="undefined"){var n=this[a];if(n){if(p){var h=p.split(" "),k=0,r;while(p=h[k++]){p=this.buildEventName(p);if(r=n[p]){if(q){var g=c(q,t),f=r.ids;if(g in f){var o=r.list,s=f[g],j=s.prev,l=s.next;if(j){j.next=l}else{if(s===o.first){o.first=l}}if(l){l.prev=j}else{if(s===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(u,i){m.un(u,i,t)})}return this},trigger:function(k,i){var l=this[a],j;typeof k==="string"?k=d.Event(this.buildEventName(j=k)):k.type=this.buildEventName(j=k.type);if(l&&(l=l[k.type])){var h=l.list.first,f,g;while(h){k.data=h.data;f=h.fn.call(h.ctx,k,i);if(typeof f!=="undefined"){k.result=f;if(f===false){k.preventDefault();k.stopPropagation()}}g=h.next;h.special&&h.special.one&&this.un(j,h.fn,h.ctx);h=g}}return this}};d.observable=d.inherit(b,b)})(jQuery)}if(_ycssjs("y4ukqUkTEHEK0tu/oK4Uh7+LbE0")){(function(f,h){var e=[],g={},b={},a={};function d(k,j,i){return(k?"__elem_"+k:"")+"__mod"+(j?"_"+j:"")+(i?"_"+i:"")}function c(j,i,k){f.isFunction(j)?(i[d(k,"*","*")]=j):f.each(j,function(m,l){f.isFunction(l)?(i[d(k,m,"*")]=l):f.each(l,function(n,o){i[d(k,m,n)]=o})})}this.BEM=f.inherit(f.observable,{__constructor:function(j,k,i){var l=this;l._modCache=j||{};l._processingMods={};l.params=f.extend(l.getDefaultParams(),k);l._uniqId=l.params.uniqId||f.identify(l);b[l._uniqId]=l;i!==false?l._init():l.afterCurrentEvent(l._init)},_init:function(){var i=this;if("_uniqId" in i&&!i.hasMod("js","inited")){i.setMod("js","inited").trigger("init")}return i},changeThis:function(j,i){var k=this;return function(){return j.apply(i||k,arguments)}},afterCurrentEvent:function(j,i){this.__self.afterCurrentEvent(this.changeThis(j,i))},trigger:function(j,i){this.__base(j=this.buildEvent(j),i).__self.trigger(j,i);return this},buildEvent:function(i){typeof i=="string"&&(i=f.Event(i));i.block=this;return i},hasMod:function(j,k,i){if(arguments.length==2){i=k;k=j;j=h}return this.getMod(j,k)===i},getMod:function(k,l){var i=typeof k;if(i==="string"||i==="undefined"){l=k||l;var j=this._modCache;return l in j?j[l]:j[l]=this._extractModVal(l)}return this._getElemMod(l,k)},_getElemMod:function(k,i,j){return this._extractModVal(k,i,j)},getMods:function(l){var j=l&&typeof l!="string",m=this,i=[].slice.call(arguments,j?1:0),k=m._extractMods(i,j?l:h);if(!j){i.length?f.each(i,function(o,n){m._modCache[n]=k[n]}):m._modCache=k}return k},setMod:function(l,p,q){if(typeof q=="undefined"){q=p;p=l;l=h}var m=this;if(!l||l[0]){var n=(l&&l[0]?f.identify(l[0]):"")+"_"+p;if(this._processingMods[n]){return m}var k,j=l?m._getElemMod(p,l,k=m.__self._extractElemNameFrom(l)):m.getMod(p);if(j===q){return m}this._processingMods[n]=true;var i=true,o=[p,q,j];l&&o.unshift(l);f.each([["*","*"],[p,"*"],[p,q]],function(){i=m._callModFn(k,this[0],this[1],o)!==false&&i});!l&&i&&(m._modCache[p]=q);i&&m._afterSetMod(p,q,l,k);delete this._processingMods[n]}return m},_afterSetMod:function(k,i,j){},toggleMod:function(k,l,j,n,m){if(typeof k=="string"){m=n;n=j;j=l;l=k;k=h}if(typeof n=="undefined"){n=""}else{if(typeof n=="boolean"){m=n;n=""}}var i=this.getMod(k,l);(i==j||i==n)&&this.setMod(k,l,typeof m==="boolean"?(m?j:n):this.hasMod(k,l,j)?n:j);return this},delMod:function(i,j){if(!j){j=i;i=h}return this.setMod(i,j,"")},_callModFn:function(l,k,i,j){var m=d(l,k,i);return this[m]?this[m].apply(this,j):h},_extractModVal:function(j,i){return""},_extractMods:function(i,j){return{}},channel:function(j,i){return this.__self.channel(j,i)},getDefaultParams:function(){return{}},del:function(j){var i=[].slice.call(arguments);typeof j=="string"&&i.unshift(this);this.__self.del.apply(this.__self,i);return this},destruct:function(){delete b[this.un()._uniqId];delete this._uniqId}},{_name:"i-bem",blocks:g,_uniqIdToBlock:b,getBlockByUniqId:function(i){return b[i]},decl:function(i,j,l){if(typeof i=="string"){i={block:i}}else{if(i.name){i.block=i.name}}if(i.baseBlock&&!g[i.baseBlock]){throw ('baseBlock "'+i.baseBlock+'" for "'+i.block+'" is undefined')}if(j.onSetMod){c(j.onSetMod,j);delete j.onSetMod}if(j.onElemSetMod){f.each(j.onElemSetMod,function(o,n){c(n,j,o)});delete j.onElemSetMod}var k=g[i.baseBlock||i.block]||this;if(i.modName){f.each(j,function(n,o){f.isFunction(o)&&(j[n]=function(){var q;if(this.hasMod(i.modName,i.modVal)){q=o}else{var p=k.prototype[n];p&&p!==j[n]&&(q=this.__base)}return q?q.apply(this,arguments):h})})}var m;i.block==k._name?(m=f.inheritSelf(k,j,l))._processLive(true):(m=g[i.block]=f.inherit(k,j,l))._name=i.block;return m},_processLive:function(i){return false},create:function(j,i){typeof j=="string"&&(j={block:j});return new g[j.block](j.mods,i)},getName:function(){return this._name},_extractElemNameFrom:function(i){},afterCurrentEvent:function(j,i){e.push({fn:j,ctx:i})==1&&setTimeout(function(){var k,l=e.splice(0,e.length);while(k=l.shift()){k.fn.call(k.ctx||this)}},0)},changeThis:function(j,i){return function(){return j.apply(i||this,arguments)}},del:function(m){var l=typeof m=="string",k=l?0:1,j=arguments.length;l&&(m=this);while(k<j){delete m[arguments[k++]]}return this},channel:function(j,i){if(typeof j=="boolean"){i=j;j=h}j||(j="default");if(i){if(a[j]){a[j].un();delete a[j]}return}return a[j]||(a[j]=new f.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("KgVAb2UqUssctq0SqrefGzIOJiM")){(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"}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("MjWIh068tdyonrnXsnnaSJ/uZyo")){(function(k,d,c){var g=k.INTERNAL,f=g.ELEM_DELIM,h={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},i=g.buildClasses,j={};function e(l,m,n){(l[m]||(l[m]=[])).unshift(n)}function b(l,m){return m.modName?function(n){(n._currBlock.mods||{})[m.modName]===m.modVal&&l(n)}:l}function a(m,l){var o=d.isArray(l),n;d.isArray(m)?o?n=m.concat(l):(n=m).push(l):o?(n=l).unshift(m):n=[m,l];return n}k.HTML={decl:function(n,m){typeof n=="string"&&(n={name:n});var l=j[n.name]||(j[n.name]={});m.onBlock&&e(l,"_block",b(m.onBlock,n));if(m.onElem){d.isFunction(m.onElem)?e(l,"_elem",b(m.onElem,n)):d.each(m.onElem,function(p,o){e(l,"_elem"+(p==="*"?"":f+p),b(o,n))})}},build:function(m){var l=new this.Ctx(m);l._buildAll();return l._flush()},Ctx:d.inherit({__constructor:function(l){this._buffer=[];this._params=l;this._tParams=null;this._tParamsChanges=null;this._currBlock=c},pos:function(){return this._params._pos},isFirst:function(){return this._params._pos===1},isLast:function(){var l=this._params;return l._pos===l._siblingsCount},params:function(l){var m=this;if(typeof l=="undefined"){return m._params}m._params=l;return m},param:function(l,o,m,q){var p=this,n=p._params;if(typeof o=="undefined"){return n[l]}if(m||!(l in n)){n[l]=o}else{if(q){n[l]=d.extend(o,n[l])}}return p},attrs:function(m,l){return this.param("attrs",m,l,true)},attr:function(m,o,n){var p=this;if(typeof o=="undefined"){return(p._params.attrs||{})[m]}var l=p._params.attrs;l?(n||!(m in l))&&(l[m]=o):(p._params.attrs={})[m]=o;return p},tag:function(m,l){return this.param("tag",m,l)},cls:function(m,l){return this.param("cls",m,l)},mods:function(m,l){return this.param("mods",m,l,true)},mod:function(l,o,n){var p=this;if(typeof o=="undefined"){return(p._params.mods||{})[l]}var m=p._params.mods;m?(n||!(l in m))&&(m[l]=o):(p._params.mods={})[l]=o;return p},mix:function(n,l){var o=this,m=o._params;if(typeof n=="undefined"){return m.mix}if(l||!("mix" in m)){m.mix=n}else{m.mix=m.mix.concat(n)}return o},js:function(l){return this.param("js",l)},content:function(m,l){return this.param("content",m,l)},wrapContent:function(l){var n=this,m=n._params;l.content=m.content;m.content=l;return n},beforeContent:function(l){var n=this,m=n._params;m.content=a(l,m.content);return n},afterContent:function(l){var n=this,m=n._params;m.content=a(m.content,l);return n},wrap:function(l){var n=this,m=n._params;l.block||(l._currBlock=n._currBlock);l.content=m._wrapper?m._wrapper:m;m._wrapper=l;return n},tParam:function(l,o){var p=this,n=p._tParams||(p._tParams={});if(typeof o=="undefined"){return n[l]}var m=p._tParamsChanges||(p._tParamsChanges={});l in m||(m[l]=n[l]);n[l]=o;return p},generateId:function(){return d.identify()},_buildAll:function(){var s=this,m=s._buffer,r=s._params,p=typeof r;if(p=="string"||p=="number"){m.push(r)}else{if(d.isArray(r)){var o=0,l=r.length,n,q;while(o<l){s._params=n=r[o++];q=typeof n;if(q=="string"||q=="number"){m.push(n)}else{if(n){n._pos=o;n._siblingsCount=l;s._buildByDecl()}}}}else{if(r){s._params._pos=s._params._siblingsCount=1;s._buildByDecl()}}}},_build:function(){var q=this,m=q._buffer,p=q._params,l=p.tag||"div",o,n=p.block||p.elem;p.js&&((o={})[p.block]=p.js===true?{}:p.js);m.push("<",l);if(n||p.cls){m.push(' class="');if(n){i(p.block||q._currBlock.block,p.elem,p.mods,m);p.mix&&d.each(p.mix,function(r,s){if(s){m.push(" ");i(s.block,s.elem,s.mods,m);s.js&&((o||(o={}))[s.block]=s.js===true?{}:s.js)}})}p.cls&&m.push(n?" ":"",p.cls);o&&m.push(" i-bem");m.push('"')}o&&m.push(' onclick="return ',d.stringify(o).replace(/'/g,"\\'").replace(/"/g,"'"),'"');p.attrs&&d.each(p.attrs,function(r,s){typeof s!="undefined"&&s!==null&&s!==false&&m.push(" ",r,'="',s.toString().replace(/"/g,"&quot;"),'"')});if(h[l]){m.push("/>")}else{m.push(">");if(typeof p.content!="undefined"){q._params=p.content;q._buildAll()}m.push("</",l,">")}},_flush:function(){var l=this._buffer.join("");delete this._buffer;return l},_buildByDecl:function(){var o=this,r=o._currBlock,l=o._params;l._currBlock&&(o._currBlock=l._currBlock);l.block&&(o._currBlock=l);if(!l._wrapper){if(l.block||l.elem){var q=j[o._currBlock.block];if(q){var s;if(l.elem){s=q["_elem"+f+l.elem];q._elem&&(s=(s?s.concat(q._elem):q._elem))}else{s=q._block}if(s){var m=0,p;while(p=s[m++]){p(o)}}}}if(l._wrapper){l._currBlock=o._currBlock;o._params=l._wrapper;return o._buildAll()}}var t=o._tParamsChanges;o._tParamsChanges=null;o._build();o._currBlock=r;if(t){var n=o._tParams;d.each(t,function(u,v){typeof v=="undefined"?delete n[u]:n[u]=v})}}})}})(BEM,jQuery)}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("mIsKlmDAXCEUeLSIwL669QNBMQY")){(function(i,e,h){var d=e(window),x=e(document),m={},z={},f={},p={},u=i.blocks,v=i._uniqIdToBlock,b=i.INTERNAL,k=b.NAME_PATTERN,o=b.MOD_DELIM,j=b.ELEM_DELIM,y=b.buildModPostfix,s=b.buildClass;function q(C,A){var B=C[0];e.each(r(B),function(D,F){c(F,B,D,A);var E=v[F.uniqId];if(E){E.domElem=E.domElem.add(C);e.extend(E.params,F)}else{a(D,C,F)}})}function a(H,D,C,A,I){if(typeof C=="boolean"){I=A;A=C;C=h}var E=D[0];C=c(C||r(E)[H],E,H);var G=C.uniqId;if(v[G]){return v[G]._init()}m[G]=m[G]?m[G].add(D):D;var F=u[H]||t.decl(H,{},{live:true});if(!(F._liveInitable=!!F._processLive())||A||C.live===false){var B=new F(m[G],C,!!A);delete m[G];I&&I.apply(B,Array.prototype.slice.call(arguments,4));return B}}function c(F,C,B,A){(F||(F={})).uniqId||(F.uniqId=(F.id?B+"-id-"+F.id:e.identify())+(A||e.identify()));var E=e.identify(C),D=z[E]||(z[E]={});D[B]||(D[B]=F);return F}function w(B,A,D){var C=B.find(A);return D?C:C.add(B.filter(A))}function r(A){var B=e.identify(A);return z[B]||(z[B]=g(A))}function g(C){var B=C.onclick||C.ondblclick;if(!B&&C.tagName.toLowerCase()=="body"){var D=e(C),A=D.attr("onclick")||D.attr("ondblclick");A&&(B=Function(A))}return B?B():{}}function l(A){delete z[e.identify(A)]}function n(){return x[0][e.support.boxModel?"documentElement":"body"]}e.fn.bem=function(A,B){return a(A,this,B,true)};var t=i.DOM=i.decl("i-bem__dom",{__constructor:function(B,C,A){this.domElem=B;this._eventNameCache={};this._elemCache={};this._needSpecialUnbind=false;this.__base(null,C,A)},_removeDomElem:function(A){!(this.domElem=this.domElem.not(A))[0]&&this.destruct()},findBlocksInside:function(A,B){return this._doBlocksMethod(this._buildFindBlocksParams("find",A,B))},findBlockInside:function(A,B){return this._doBlocksMethod(this._buildFindBlocksParams("find",A,B,true))},findBlocksOutside:function(A,B){return this._doBlocksMethod(this._buildFindBlocksParams("parents",A,B))},findBlockOutside:function(A,B){return this._doBlocksMethod(this._buildFindBlocksParams("closest",A,B))[0]},findBlocksOn:function(A,B){return this._doBlocksMethod(this._buildFindBlocksParams("",A,B))},findBlockOn:function(A,B){return this._doBlocksMethod(this._buildFindBlocksParams("",A,B,true))},_buildFindBlocksParams:function(A,B,D,C){return{select:A,elem:D?B:h,block:D||B,onlyFirst:C}},doBlocksMethodInside:function(B,C,D,A){return this._doBlocksMethod(this._buildDoBlocksMethodParams("find",B,C,D,A))},doBlocksMethodOutside:function(B,C,D,A){return this._doBlocksMethod(this._buildDoBlocksMethodParams("closest",B,C,D,A))},doBlocksMethodOn:function(B,C,D,A){return this._doBlocksMethod(this._buildDoBlocksMethodParams("",B,C,D,A))},doBlocksMethod:function(B,C,A){return this._doBlocksMethod({blocks:B,method:C,args:A})},_buildDoBlocksMethodParams:function(A,D,E,F,C){var B=typeof F=="string";return{select:A,elem:B?D:h,block:B?E:D,method:B?F:E,args:B?C:F}},_doBlocksMethod:function(B){var E=this;if(B.blocks){return e.map(B.blocks,function(J){return E._doBlockMethod(J,B.method,B.args)})}var D=B.elem?(typeof B.elem=="string"?this.findElem(B.elem):B.elem):this.domElem,C=typeof B.block=="string",I=C?B.block:B.block.blockName,A="."+(C?s(I):s(I,B.block.modName,B.block.modVal))+(B.onlyFirst?":first":""),F=D.filter(A);B.select&&(F=F.add(D[B.select](A)));if(B.onlyFirst){return F[0]?this._doBlockMethod(a(I,F.eq(0),true),B.method,B.args):null}if(B.method){return e.map(F,function(J){return E._doBlockMethod(a(I,e(J),true),B.method,B.args)})}var H=[],G={};e.each(F,function(J,K){var L=a(I,e(K),true);if(!G[L._uniqId]){G[L._uniqId]=true;H.push(L)}});return H},_doBlockMethod:function(B,C,A){return C?B[C].apply(B,A||[]):B},bindToDomElem:function(B,C,A){var D=this;A?B.bind(D._buildEventName(C),function(E){(E.data||(E.data={})).domElem=e(this);return A.apply(D,arguments)}):e.each(C,function(F,E){D.bindToDomElem(B,F,E)});return D},bindToDoc:function(B,A){this._needSpecialUnbind=true;return this.bindToDomElem(x,B,A)},bindToWin:function(B,A){this._needSpecialUnbind=true;return this.bindToDomElem(d,B,A)},bindTo:function(C,B,A){if(!B||e.isFunction(B)){A=B;B=C;C=this.domElem}else{if(typeof C=="string"){C=this.elem(C)}}return this.bindToDomElem(C,B,A)},unbindFromDomElem:function(A,B){A.unbind(this._buildEventName(B));return this},unbindFromDoc:function(A){return this.unbindFromDomElem(x,A)},unbindFromWin:function(A){return this.unbindFromDomElem(d,A)},unbindFrom:function(B,A){if(!A){A=B;B=this.domElem}else{if(typeof B=="string"){B=this.elem(B)}}return this.unbindFromDomElem(B,A)},_buildEventName:function(A){var B=this;return A.indexOf(" ")>1?e.map(A.split(" "),function(C){return B._buildOneEventName(C)}).join(" "):B._buildOneEventName(A)},_buildOneEventName:function(C){var E=this,A=E._eventNameCache;if(C in A){return A[C]}var D="."+E._uniqId;if(C.indexOf(".")<0){return A[C]=C+D}var B=".bem_"+E.__self._name;return A[C]=e.map(C.split("."),function(G,F){return F==0?G+B:B+"_"+G}).join("")+D},trigger:function(B,A){this.__base(B=this.buildEvent(B),A).domElem&&this._ctxTrigger(B,A);return this},_ctxTrigger:function(B,A){var E=this,D=f[E.__self._buildCtxEventName(B.type)],C={};D&&E.domElem.each(function(){var G=this,F=D.counter;while(G&&F){var I=e.identify(G,true);if(I){if(C[I]){break}var H=D.ctxs[I];if(H){e.each(H,function(K,J){J.fn.call(J.ctx||E,B,A)});F--}C[I]=true}G=G.parentNode}})},setMod:function(B,C,A){if(B&&typeof A!="undefined"&&B.length>1){var D=this;B.each(function(){D.setMod(e(this),C,A)});return D}return this.__base(B,C,A)},_extractModVal:function(E,B,D){var A=(B||this.domElem)[0],C;A&&(C=A.className.match(this.__self._buildModValRE(E,D||B)));return C?C[2]:""},_extractMods:function(A,E){var D={},B=!A.length,C=0;e.each((E||this.domElem)[0].className.match(this.__self._buildModValRE("("+(B?k:A.join("|"))+")",E,"g"))||[],function(F,G){var I=(G=e.trim(G)).lastIndexOf(o),H=G.substr(0,I-1).lastIndexOf(o);D[G.substr(H+1,I-H-1)]=G.substr(I+1);++C});C<A.length&&e.each(A,function(F,G){G in D||(D[G]="")});return D},_afterSetMod:function(G,C,E,F){var B=this.__self,A=B._buildModClassPrefix(G,F),D=B._buildModValRE(G,F),H=C==="";(E||this.domElem).each(function(){var I=this.className;I.indexOf(A)>-1?this.className=I.replace(D,(H?"":"$1"+A+C)+"$3"):H||e(this).addClass(A+C)});F&&this.dropElemCache(F,G,C)},findElem:function(D,F,E,C){if(arguments.length%2){C=E;E=F;F=D;D=this.domElem}else{if(typeof D=="string"){D=this.findElem(D)}}var B=this.__self,A="."+e.map(F.split(" "),function(G){return s(B._name,G,E,C)}).join(",.");return w(D,A)},_elem:function(B,D,A){var C=B+y(D,A);return this._elemCache[C]||(this._elemCache[C]=this.findElem(B,D,A))},elem:function(D,C,A){if(D.indexOf(" ")<0){return this._elem(D,C,A)}var B=e([]),E=this;e.each(D.split(" "),function(){B=B.add(E._elem(this,C,A))});return B},dropElemCache:function(D,C,A){if(D){var E=this,B=y(C,A);D.indexOf(" ")<0?delete E._elemCache[D+B]:e.each(D.split(" "),function(G,F){delete E._elemCache[F+B]})}else{this._elemCache={}}return this},containsDomElem:function(A){return A.parents().andSelf().index(this.domElem)>-1},buildSelector:function(B,C,A){return this.__self.buildSelector(B,C,A)},destruct:function(B){var C=this,A=C.__self;C._needSpecialUnbind&&A.doc.add(A.win).unbind("."+C._uniqId);C.__base();C.dropElemCache().domElem.each(function(D,E){e.each(r(E),function(F,G){var H=v[G.uniqId];H&&H._removeDomElem(E)});l(E)});B||C.domElem.remove();delete C.domElem;delete C._elemCache}},{doc:x,win:d,_processLive:function(B){var D=this,C=D._liveInitable;if("live" in D){var A=typeof C=="undefined";if(A^B){if(e.isFunction(D.live)){C=D.live()!==false;D.live=function(){}}else{C=D.live}}}return C},init:function(B,D,C){if(!B||e.isFunction(B)){C=D;D=B;B=x}var A=e.identify();w(B,".i-bem").each(function(){q(e(this),A)});D&&this.afterCurrentEvent(function(){D.call(C||this,B)})},destruct:function(B,A,C){if(typeof B!="boolean"){C=A;A=B;B=h}w(A,".i-bem",C).each(function(){e.each(r(this),function(D,E){if(E.uniqId){var F=v[E.uniqId];F&&F.destruct(true)}});l(this)});B||(C?A.empty():A.remove())},update:function(A,B,D,C){this.destruct(A,true);this.init(A.html(B),D,C)},_buildCtxEventName:function(A){return this._name+":"+A},_liveClassBind:function(C,D,H,A){var G=this;if(D.indexOf(" ")>-1){e.each(D.split(" "),function(I,J){G._liveClassBind(C,J,H,A)})}else{var B=G._buildCtxEventName(D),F=p[B],E=e.identify(H);if(!F){F=p[B]={};x.bind(D,G.changeThis(G._liveClassTrigger,G))}F=F[C]||(F[C]={uniqIds:{},fns:[]});if(!(E in F.uniqIds)){F.fns.push({uniqId:E,fn:G._buildLiveEventFn(H,A)});F.uniqIds[E]=F.fns.length-1}}return this},_liveClassUnbind:function(D,E,H){var C=this._buildCtxEventName(E),G=p[C];if(G){if(H){if(G=G[D]){var F=e.identify(H);if(F in G.uniqIds){var B=G.uniqIds[F],A=G.fns.length-1;G.fns.splice(B,1);while(B<A){G.uniqIds[G.fns[B++].uniqId]=B-1}delete G.uniqIds[F]}}}else{delete G[D]}}return this},_liveClassTrigger:function(G){var F=p[this._buildCtxEventName(G.type)];if(F){var C=G.target,A=[];for(var H in F){F.hasOwnProperty(H)&&A.push(H)}do{var B=" "+C.className+" ",E=0;while(H=A[E++]){if(B.indexOf(" "+H+" ")>-1){var D=0,J=F[H].fns,I;while(I=J[D++]){I.fn.call(e(C),G)}if(G.isPropagationStopped()){return}A.splice(--E,1)}}}while(A.length&&(C=C.parentNode))}},_buildLiveEventFn:function(C,A){var B=this;return function(E){var D=[B._name,((E.data||(E.data={})).domElem=e(this)).closest(B.buildSelector()),true],F=a.apply(null,A?D.concat([C,E]):D);F&&(A||C.apply(F,arguments))}},liveInitOnEvent:function(B,A,C){return this.liveBindTo(B,A,C,true)},liveBindTo:function(E,B,D,A){if(!D){D=B;B=E;E=h}if(!E||typeof E=="string"){E={elemName:E}}var C=this;if(E.elemName&&E.elemName.indexOf(" ")>1){e.each(E.elemName.split(" "),function(F,G){C._liveClassBind(s(C._name,G,E.modName,E.modVal),B,D,A)});return C}return C._liveClassBind(s(C._name,E.elemName,E.modName,E.modVal),B,D,A)},liveUnbindFrom:function(B,A,D){var C=this;if(B.indexOf(" ")>1){e.each(B.split(" "),function(E,F){C._liveClassUnbind(s(C._name,F),A,D)});return C}return C._liveClassUnbind(s(C._name,B),A,D)},_liveInitOnBlockInit:function(B,D,C){var A=this._name;u[B].on("init",function(E){var F=E.block[C](A);D&&e.each(F,function(){D.call(this)})});return this},liveInitOnBlockInit:function(A,B){return this._liveInitOnBlockInit(A,B,"findBlocksOn")},liveInitOnBlockInsideInit:function(A,B){return this._liveInitOnBlockInit(A,B,"findBlocksOutside")},on:function(A,E,D,C,B){return A.jquery?this._liveCtxBind(A,E,D,C,B):this.__base(A,E,D,C)},un:function(A,D,C,B){return A.jquery?this._liveCtxUnbind(A,D,C,B):this.__base(A,D,C)},liveCtxBind:function(A,E,D,C,B){return this._liveCtxBind(A,E,D,C,B)},_liveCtxBind:function(A,F,E,D,C){if(e.isFunction(E)){C=D;D=E;E=h}var H=this;if(F.indexOf(" ")>-1){e.each(F.split(" "),function(I,J){H._liveCtxBind(A,J,E,D,C)})}else{var B=H._buildCtxEventName(F),G=f[B]||(f[B]={counter:0,ctxs:{}});A.each(function(){var J=e.identify(this),I=G.ctxs[J];if(!I){I=G.ctxs[J]={};++G.counter}I[e.identify(D)+(C?e.identify(C):"")]={fn:D,data:E,ctx:C}})}return H},liveCtxUnbind:function(A,D,C,B){return this._liveCtxBind(A,D,C,B)},_liveCtxUnbind:function(A,D,C,B){var F=this,E=f[D=F.buildEventName(D)];if(E){A.each(function(){var H=e.identify(this,true),G;if(H&&(G=E.ctxs[H])){C&&delete G[e.identify(C)+(B?e.identify(B):"")];if(!C||e.isEmptyObject(G)){E.counter--;delete E.ctxs[H]}}});E.counter||delete f[D]}return F},_extractElemNameFrom:function(A){var B=A[0].className.match(this._buildElemNameRE());return B?B[1]:h},extractParams:g,_buildModClassPrefix:function(B,A){return s(this._name)+(A?j+(typeof A==="string"?A:this._extractElemNameFrom(A)):"")+o+B+o},_buildModValRE:function(B,A,C){return new RegExp("(\\s?)"+this._buildModClassPrefix(B,A)+"("+k+")(\\s|$)",C)},_buildElemNameRE:function(){return new RegExp(this._name+j+"("+k+")(?:\\s|$)")},buildSelector:function(B,C,A){return"."+s(this._name,B,C,A)},getWindowSize:function(){var A=d[0];if(typeof A.innerWidth!="undefined"){return{width:A.innerWidth,height:A.innerHeight}}var B=n();return{width:B.clientWidth,height:B.clientHeight}}})})(BEM,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("7o5n7wDJiMuwfoA4tzJ/kJVdLRc")){(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).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"))}}})})()}if(_ycssjs("xaBzAdbZ9Ogs0Pie2YEgK+sJlec")){(function(d,a){var c=!((d.browser.safari||d.browser.webkit)&&navigator.userAgent.toLowerCase().indexOf("mobile")>-1),b=a.block["b-suggest"]=function(F){var z=d(this),K=d('<div class="b-suggest-popup"><i class="b-suggest__opera-gap"></i><div class="b-suggest-list">'+(c?('<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(),H=K.find(".b-suggest-items"),D=z.closest("form").find('input[name="'+(F["for"]||"text")+'"]'),E=D.closest("form"),q=F.url||(F.host||"")+(F.path||""),r=F.openInNewWindow=typeof F.openInNewWindow=="undefined"?true:F.openInNewWindow,l=!!F.permanent,w=(function(){var L={};L["*"+q]=["",[]];return L})(),o=F.timeout||700,I={suggestType:F.suggestType||((F.id=="serp")?"serp_ru":F.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},k="",v=F.getData?b.getDataFns[F.getData]:(function(){var N={"1.4.2":"-1-4-2","1.4.4":"-1-4-4","1.5.2":"-1-5-2","1.6.2":"-1-6-2"},S=(q.match(/^[^\/]*\/\/[^\/]+\//)||[location.protocol+"//"+location.host])[0]+"jquery"+(N[d.fn.jquery]||"")+".crossframeajax.html",M=d('<iframe style="display:none" src="'+S+'"></iframe>').appendTo("body")[0],O=document.domain,Q=document.domain.match(/([^.]+\.)?[^.]+$/)[0],L=10,T;try{document.domain!=Q&&(document.domain=Q)}catch(R){}(function P(){if(L){try{T=M.contentWindow.$.crossframeAjax;if(T){v=T}else{throw true}}catch(U){L--;setTimeout(P,42)}}else{try{document.domain!=O&&(document.domain=O)}catch(U){}}})();return d.ajax})(),t=function(L){var M=L.length&&L[0].onclick?L[0].onclick():{};return M.value||L.text()},x=function(P){var N=0;if(typeof(P.selectionEnd)=="number"){N=P.selectionEnd}else{var O=document.selection.createRange();if(O&&O.parentElement()==P){var M=P.value.length,L=P.createTextRange();L.moveToBookmark(O.getBookmark());var Q=P.createTextRange();Q.collapse(false);N=L.compareEndPoints("EndToEnd",Q)>-1?M:-L.moveEnd("character",-M)}}return N},G=(function(){function O(R){return d.isArray(R)&&b.buildItemHtmlFns[R[0]]?b.buildItemHtmlFns[R[0]](R,{stats:I,params:F}):'<li><span class="b-suggest-elem b-suggest-elem-link"><span class="content">'+R+"</span></span></li>"}function N(S){I.region=S[S.length-1]["r"];var R=S[1];if(!(j=R?R.length:0)){return s()}if(I.usageType!="edit"){I.usageType="not_used"}var T=S[2]||[];H.html(d.map(R,function(V,U){return O(!!T[U]?["href",V,T[U]]:V)}).join("")).find(".b-suggest-elem").filter(":not(.b-suggest__elem_selectable_no)").bind("mouseenter mouseleave",function(U){d(this)[U.type=="mouseenter"?"addClass":"removeClass"]("b-suggest-elem_state_hover")});B=R.length-H.find(".b-suggest__elem_selectable_no").length;K.find(".b-suggest-close").hide();if(K.find(".b-suggest-nah").find(".b-suggest-nah__link").length==0){switch(S[S.length-1].n){case 1:K.find(".b-suggest-list").addClass("b-suggest-list-nah_enabled").end().find(".b-suggest-nah").addClass("b-suggest-nah_enabled").html(b.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:K.find(".b-suggest-list").addClass("b-suggest-list-nah_disabled").end().find(".b-suggest-nah").addClass("b-suggest-nah_disabled").html(b.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:K.find(".b-suggest-close").show().end().find(".b-suggest-nah").hide();break}K.find(".b-suggest-nah__link").bind("mousedown click",function(){window.location=this.href})}K.show();if(C===false&&I._keydownTriggered===true){I.usageType="edit";I._keydownTriggered=false}C=false}var P=0,Q=z.hasClass("b-suggest_reaction_changing"),M,L;return function(U){if(h){return}if(Q){typeof L=="string"||(L=U);L==U||(M=true);if(!M){return}M=false;L=U}A(0,U);var T=w[U+"*"+q];if(T){N(T)}else{var X=setTimeout(s,o);P+=1;var S=new Date();var W=document.getElementsByName("lr"),R;try{R=window.location.toString().match(/lr=(.*?)(&|$)/)}catch(V){R=""}if(W.length>0){k=W[0].value}else{if(R&&R.length>0){k=R[1]}else{k=""}}v({url:q,data:d.extend({part:D.val(),lr:k},a.params.yandexuid?{yu:a.params.yandexuid}:null),dataType:"json",type:"GET",timeout:o,success:(function(Z,Y){return function(aa){if(!aa){return}w[U+"*"+Y]=aa;clearTimeout(X);if(Z==P){N(aa)}I.queryTimes.push(new Date()-S)}})(P,q)})}}})(),u=function(L){m();window.setTimeout(function(){d('<form style="display:none" action="'+L+'" method="get"'+(r?' target="_blank"':"")+"/>").appendTo(d("body")).submit().remove()},500)},h=false,C=true,f=false,s=(function(){if(C){return}K.hide();A(0,D.val());C=true}),j=0,B=0,A=(function(){var L=0,M=D.val();return function(P,S){if(S!=undefined){M=S}L=P?L+P:0;if(L<0){L=B}if(L>B){L=0}if(L>0){I.position="p"+L}var R=H.find(".b-suggest-elem").filter(":not(.b-suggest__elem_selectable_no)").removeClass("b-suggest-elem_selected").eq(L?L-1:1000).addClass("b-suggest-elem_selected"),T=t(R),Q=R.is(".b-suggest-elem_nav")?e:(T||M),O=R.attr("href"),N=T&&O?O:"";D.val()!=Q&&D.val(Q);D.data("href",N)}})();var n=D.data("lego:focused");if(n){D.blur()}D.attr("autocomplete","off");if(n){D.focus()}if(F.text){D.val(F.text)}z.append(K);var p=false;d(document).bind("popupsClose.lego",s).keydown(function(L){if(L.metaKey||L.ctrlKey||L.altKey||L.shiftKey){f=true}}).keyup(function(L){f=false}).mouseup(function(){p=false});E.find(":submit").click(function(){I.buttonByMouse="button_by_mouse"});H.mousedown(function(O){p=true;var N=d(O.target);if(N.is("li *")){i=N.closest(".b-suggest-elem");if(i.hasClass("b-suggest-elem_nav")){m()}else{if(!i.hasClass("b-suggest__elem_selectable_no")){A(0,t(i));D.data("href",i.attr("href"));var M=N.parents("ul"),L=O.target.className;if(L&&L.split(" ").length>0){M.find("."+L.split(" ")[0]).each(function(P){if(this==O.target){I.position="p"+(P+1);N.hasClass("b-suggest-elem_nah")&&(I.nah="nah_used")}})}I.usageType="mouse";if(!l){h=true}if(i.get(0).tagName.toLowerCase()!="a"){setTimeout(function(){E.submit()},0)}else{y()}}}}return false}).click(function(){if(l){s()}else{d.browser.msie?s():D.focus()}});var e="",i,g=false;E.submit(function(M){if(F.preventSubmit){s();h=true;y();setTimeout(function(){h=false},100);return false}if(g){return g=false}var L=D.data("href")||I.followAfterSubmit;if(l){D.blur()}if(!I.submitted){M.preventDefault();if(L){I.followAfterSubmit=L}I.user_input=e;I.text=D.val();I.ratio.userValue=e.length;I.ratio.finalValue=I.text.length;y();window.setTimeout(function(){E.submit()},500)}else{if(L&&!l){M.preventDefault();location.href=L}else{if(L&&l){M.preventDefault();u(L)}}}});function J(){A(0);s();p=false}D.blur(function(L){if(L.originalEvent&&!L.originalEvent.preventDefault){setTimeout(function(){if(!p&&D[0]!=document.activeElement){s()}},84)}else{if(!p){s()}}}).click(function(){if(!C&&!D.val()){e="";s()}I.pos=x(D[0])}).keydown(function(L){switch(L.keyCode){case 38:case 40:L.preventDefault();I._keydownTriggered=true;if(C){h=false;G(D.val())}else{I.usageType="keyboard";A(L.keyCode-39)}break;case 13:break;case 27:p=true;break}setTimeout(function(){e!=D.val()&&I.ratio.userActions++},1)}).keypress(function(M){switch(M.keyCode){case 13:p=true;var L=H.find(".b-suggest-elem_selected");if(L.hasClass("b-suggest-elem_nav")){g=true;u(L.attr("href"));l&&s()}else{L.hasClass("b-suggest-elem_nah")&&(I.nah="nah_used");l||(h=true);E.submit();s()}return false;case 27:return false}}).keyup(function(L){I.pos=x(D[0]);switch(L.keyCode){case 38:case 40:break;case 27:J();break;default:if(e!=D.val()){e=D.val();clearInterval(M);var M=setTimeout(function(){G(D.val())},1)}break}});setTimeout(function(){D.focus(function(L){if(d(L.target).data("b-suggest")!==false){p=false;G(D.val())}})},42);if(l){setInterval(function(){w={"":[]}},30*60*1000)}z.bind("updateParams.lego",function(M,N){if(!N){return}var L=(q.match(/^[^\/]*\/\/[^\/]+\//)||[""])[0]+(N.path||"");if(L){q=L}if("closed" in N){h=N.closed}});function y(){a.params["show-counters"]&&a.cp(0,2873,[[I.suggestType,I.usageType,I.position,I.nah,I.buttonByMouse].join("."),"session="+I.session,"region="+I.region,"times="+I.queryTimes.join("."),"pos="+I.pos,"text="+I.text,"user_input="+I.user_input,"ratio="+I.ratio.userValue+"."+I.ratio.finalValue+"."+I.ratio.userActions].join("/"));l||(I.submitted=true)}function m(){a.params["show-counters"]&&a.cp(0,70833,I.suggestType+"/session="+I.session)}};b.getDataFns={};b.buildItemHtmlFns={href:function(f,e){if(f[3]&&f[3].nah&&f[3].nah==1){e.stats.nah=="nah_not_shown"&&(e.stats.nah="nah_not_used");return'<li><span class="b-suggest-elem b-suggest-elem_nah">'+f[1]+"</span></li>"}return'<li><a class="b-suggest-elem b-suggest-elem-link" href="'+f[2]+'"><span class="content">'+f[1]+"</span></a></li>"},nav:function(f,e){return'<li><a class="b-suggest-elem b-suggest-elem-link b-suggest-elem_nav"'+(e.params.openInNewWindow?' target="_blank"':"")+' href="http://'+f[2]+'"><span class="content"><span class="link">'+f[2]+'</span><span class="info">&nbsp;&mdash; '+f[1]+"</span></span></a></li>"},html:function(f,e){return'<li><span class="b-suggest-elem b-suggest-elem-link">'+f[1]+"</span></li>"}};b.buildHtmlMessageFns={nahLink:(function(){var f=/\(\(([^\)]+)\)\)/g,e={};return function(g,i,h){if(!e[g]){e[g]=i.replace(f,'<a class="b-suggest-nah__link" href="'+h+'">$1</a>')}return e[g]}})()}})(jQuery,window.Lego)}if(_ycssjs("BhLLmDY36vwEH5wYLr9eOlcK2t0")){BEM.DOM.decl("b-form-button",{onSetMod:{js:function(){(this._href=this.domElem.attr("href"))&&this.isDisabled()&&this.domElem.removeAttr("href")},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.domElem.attr("aria-disabled",b);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(a){if(a.keyCode==13&&!this._keyDowned){this._keyDowned=true;this.setMod("pressed","yes").bindTo("keyup",function(){this.delMod("pressed").unbindFrom("keyup");delete this._keyDowned})}},_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").attr("target",a.param("target")||false).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)}})})()}};
