(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);(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 m=g[c];if(typeof(m)=="string"){if(/(\?|\*)/.test(m)){var f=m.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\?/g,".{1}");if((new RegExp("^"+f+"$")).test(h)){return true}}else{if(h==m){return true}}}else{try{if(m.test(h)){return true}}catch(j){}}}}})(window.Lego);(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);(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 l=false;if(a){var j=[];e.each(c,function(){i.hasOwnProperty(this)&&(l=true)&&j.push({name:this,val:i[this]})});if(l){e.each(i,function(m){j.push({name:m,val:this})});i=j}}e.each(i,function(n,o){if(l){n=o.name;o=o.val}if(e.isFunction(o)&&(!b||o.toString().indexOf(".__base")>-1)){var m=h[n]||function(){};g[n]=function(){var s=this.__base;this.__base=m;var r=o.apply(this,arguments);this.__base=s;return r}}else{g[n]=o}})}e.inherit=function(){var h=e.isFunction(arguments[0]),o=h?arguments[0]:f,j=arguments[h?1:0]||{},m=arguments[h?2:1],g=j.__constructor||(h&&o.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,m)}e.extend(g,o);var l=function(){},i=l.prototype=o.prototype,n=g.prototype=new l();n.__self=n.constructor=g;d(i,n,j);m&&d(o,g,m);return g};e.inheritSelf=function(j,h,i){var g=j.prototype;d(g,g,h);i&&d(j,j,i);return j}})(jQuery);(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);(function(a){a.isEmptyObject||(a.isEmptyObject=function(c){for(var b in c){return false}return true})})(jQuery);(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(r,j,s,v,n){if(typeof r=="string"){if(d.isFunction(j)){v=s;s=j;j=undefined}var f=c(s,v),m=this[a]||(this[a]={}),g=r.split(" "),h=0,t;while(r=g[h++]){r=this.buildEventName(r);t=m[r]||(m[r]={ids:{},list:{}});if(!(f in t.ids)){var o=t.list,u={fn:s,data:j,ctx:v||this,special:n};if(o.last){o.last.next=u;u.prev=o.last}else{o.first=u}t.ids[f]=o.last=u}}}else{var l=this;d.each(r,function(w,i){l.on(w,i,j,n)})}return this},onFirst:function(i,h,g,f){return this.on(i,h,g,f,{one:true})},un:function(s,t,w){if(typeof s=="string"||typeof s=="undefined"){var o=this[a];if(o){if(s){var h=s.split(" "),l=0,u;while(s=h[l++]){s=this.buildEventName(s);if(u=o[s]){if(t){var g=c(t,w),f=u.ids;if(g in f){var r=u.list,v=f[g],j=v.prev,m=v.next;if(j){j.next=m}else{if(v===r.first){r.first=m}}if(m){m.prev=j}else{if(v===r.last){r.last=j}}delete f[g]}}else{delete this[a][s]}}}}else{delete this[a]}}}else{var n=this;d.each(s,function(x,i){n.un(x,i,w)})}return this},trigger:function(l,i){var m=this[a],j;typeof l==="string"?l=d.Event(this.buildEventName(j=l)):l.type=this.buildEventName(j=l.type);if(m&&(m=m[l.type])){var h=m.list.first,f,g;while(h){l.data=h.data;f=h.fn.call(h.ctx,l,i);if(typeof f!=="undefined"){l.result=f;if(f===false){l.preventDefault();l.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);(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(m,l){e.isFunction(l)?(h[c(j,m,"*")]=l):e.each(l,function(n,o){h[c(j,m,n)]=o})})}this.BEM=e.inherit(e.observable,{__constructor:function(i,h){var j=this;j._modCache={};j._processingMods={};j.params=e.extend(j.getDefaultParams(),i);j._uniqId=j.params.uniqId||e.identify(j);a[j._uniqId]=j;h!==false?j._init():j.afterCurrentEvent(j._init)},_init:function(){var h=this;if("_uniqId" 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))},bind:function(j,l,i,h){return this.on(j,l,i,h)},bindOne:function(j,l,i,h){return this.onFirst(j,l,i,h)},unbind:function(i,h){return this.un(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(i,j,h){if(arguments.length==2){h=j;j=i;i=g}return this.getMod(i,j)===h},getMod:function(j,l){var h=typeof j;if(h==="string"||h==="undefined"){l=j||l;var i=this._modCache;return l in i?i[l]:i[l]=this._extractModVal(l)}return this._getElemMod(l,j)},_getElemMod:function(j,h,i){return this._extractModVal(j,h,i)},getMods:function(l){var i=l&&typeof l!="string",m=this,h=[].slice.call(arguments,i?1:0),j=m._extractMods(h,i?l:g);if(!i){h.length?e.each(h,function(o,n){m._modCache[n]=j[n]}):m._modCache=j}return j},setMod:function(l,r,s){if(typeof s=="undefined"){s=r;r=l;l=g}var m=this;if(!l||l[0]){var n=(l&&l[0]?e.identify(l[0]):"")+"_"+r;if(this._processingMods[n]){return m}var j,i=l?m._getElemMod(r,l,j=m.__self._extractElemNameFrom(l)):m.getMod(r);if(i===s){return m}this._processingMods[n]=true;var h=true,o=[r,s,i];l&&o.unshift(l);e.each([["*","*"],[r,"*"],[r,s]],function(){h=m._callModFn(j,this[0],this[1],o)!==false&&h});!l&&h&&(m._modCache[r]=s);h&&m._afterSetMod(r,s,l,j);delete this._processingMods[n]}return m},_afterSetMod:function(j,h,i){},toggleMod:function(j,l,i,n,m){if(typeof j=="string"){m=n;n=i;i=l;l=j;j=g}if(typeof n=="undefined"){n=""}else{if(typeof n=="boolean"){m=n;n=""}}var h=this.getMod(j,l);(h==i||h==n)&&this.setMod(j,l,typeof m==="boolean"?(m?i:n):this.hasMod(j,l,i)?n:i);return this},delMod:function(h,i){if(!i){i=h;h=g}return this.setMod(h,i,"")},_callModFn:function(l,j,h,i){var m=c(l,j,h);return this[m]?this[m].apply(this,i):g},_extractModVal:function(i,h){return""},_extractMods:function(h,i){return{}},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 a[this.un()._uniqId];delete this._uniqId}},{_name:"i-bem",blocks:f,_uniqIdToBlock:a,getBlockByUniqId:function(h){return a[h]},decl:function(h,i,l){if(typeof h=="string"){h={block:h}}else{if(h.name){h.block=h.name}}if(i.onSetMod){b(i.onSetMod,i);delete i.onSetMod}if(i.onElemSetMod){e.each(i.onElemSetMod,function(o,n){b(n,i,o)});delete i.onElemSetMod}var j=f[h.baseBlock||h.block]||this;if(h.modName){e.each(i,function(n,o){e.isFunction(o)&&(i[n]=function(){var s;if(this.hasMod(h.modName,h.modVal)){s=o}else{var r=j.prototype[n];r&&r!==i[n]&&(s=this.__base)}return s?s.apply(this,arguments):g})})}var m;h.block==j._name?(m=e.inheritSelf(j,i,l))._processLive(true):(m=f[h.block]=e.inherit(j,i,l))._name=h.block;return m},_processLive:function(h){return false},create:function(h,i){return new f[h](i)},getName:function(){return this._name},_extractElemNameFrom:function(h){},afterCurrentEvent:function(i,h){d.push({fn:i,ctx:h})==1&&setTimeout(function(){var j,l=d.splice(0,d.length);while(j=l.shift()){j.fn.call(j.ctx||this)}},0)},changeThis:function(i,h){return function(){return i.apply(h||this,arguments)}},del:function(m){var l=typeof m=="string",j=l?0:1,h=arguments.length;l&&(m=this);while(j<h){delete m[arguments[j++]]}return this}})})(jQuery);(function(i,b,a){var g="_",c="__",d="[a-zA-Z0-9-]+";function e(m,j,l){l.push(g,m,g,j)}function f(m,n,j,l){l.push(m);j&&e(n,j,l)}function h(o,m,n,j,l){f(o,a,a,l);l.push(c,m);j&&e(n,j,l)}i.INTERNAL={NAME_PATTERN:d,MOD_DELIM:g,ELEM_DELIM:c,buildModPostfix:function(n,j,l){var m=l||[];e(n,j,m);return l?m:m.join("")},buildClass:function(s,o,r,j,l){var n=typeof r;if(n=="string"){if(typeof j!="string"){l=j;j=r;r=o;o=a}}else{if(n!="undefined"){l=r;r=a}else{if(o&&typeof o!="string"){l=o;o=a}}}if(!(o||r||l)){return s}var m=l||[];o?h(s,o,r,j,m):f(s,r,j,m);return l?m:m.join("")},buildClasses:function(o,n,m,j){var l=j||[];n?h(o,n,a,a,l):f(o,a,a,l);m&&b.each(m,function(s,r){if(r){l.push(" ");n?h(o,n,s,r,l):f(o,s,r,l)}});return j?l:l.join("")}}})(BEM,jQuery);(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);(function(a,c){if(typeof JSON!="undefined"){return a.stringify=JSON.stringify}var b=Object.prototype.toString;a.stringify=function(h){if(h===null){return"null"}switch(b.call(h)){case"[object String]":return'"'+h.replace(/"/g,'\\"')+'"';case"[object Number]":case"[object Boolean]":return""+h;case"[object Array]":var g="[",f=0,d=h.length,j;while(f<d){j=a.stringify(h[f]);g+=(f++>0?",":"")+(typeof j=="undefined"?"null":j)}return g+"]";case"[object Object]":var g="{",f=0,j;for(var e in h){if(h.hasOwnProperty(e)){j=a.stringify(h[e]);typeof j!="undefined"&&(g+=(f++>0?",":"")+'"'+e+'":'+j)}}return g+"}";default:return c}}})(jQuery);(function(l,d,c){var g=l.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(m,n,o){(m[n]||(m[n]=[])).unshift(o)}function b(m,n){return n.modName?function(o){(o._currBlock.mods||{})[n.modName]===n.modVal&&m(o)}:m}function a(n,m){var r=d.isArray(m),o;d.isArray(n)?r?o=n.concat(m):(o=n).push(m):r?(o=m).unshift(n):o=[n,m];return o}l.HTML={decl:function(o,n){typeof o=="string"&&(o={name:o});var m=j[o.name]||(j[o.name]={});n.onBlock&&e(m,"_block",b(n.onBlock,o));if(n.onElem){d.isFunction(n.onElem)?e(m,"_elem",b(n.onElem,o)):d.each(n.onElem,function(s,r){e(m,"_elem"+(s==="*"?"":f+s),b(r,o))})}},build:function(n){var m=new this.Ctx(n);m._buildAll();return m._flush()},Ctx:d.inherit({__constructor:function(m){this._buffer=[];this._params=m;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 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,r,n,t){var s=this,o=s._params;if(typeof r=="undefined"){return o[m]}if(n||!(m in o)){o[m]=r}else{if(t){o[m]=d.extend(r,o[m])}}return s},attrs:function(n,m){return this.param("attrs",n,m,true)},attr:function(n,r,o){var s=this;if(typeof r=="undefined"){return(s._params.attrs||{})[n]}var m=s._params.attrs;m?(o||!(n in m))&&(m[n]=r):(s._params.attrs={})[n]=r;return s},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,r,o){var s=this;if(typeof r=="undefined"){return(s._params.mods||{})[m]}var n=s._params.mods;n?(o||!(m in n))&&(n[m]=r):(s._params.mods={})[m]=r;return s},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._currBlock=o._currBlock);m.content=n._wrapper?n._wrapper:n;n._wrapper=m;return o},tParam:function(m,r){var s=this,o=s._tParams||(s._tParams={});if(typeof r=="undefined"){return o[m]}var n=s._tParamsChanges||(s._tParamsChanges={});m in n||(n[m]=o[m]);o[m]=r;return s},_buildAll:function(){var v=this,n=v._buffer,u=v._params,s=typeof u;if(s=="string"||s=="number"){n.push(u)}else{if(d.isArray(u)){var r=0,m=u.length,o,t;while(r<m){v._params=o=u[r++];t=typeof o;if(t=="string"||t=="number"){n.push(o)}else{if(o){o._pos=r;o._siblingsCount=m;v._buildByDecl()}}}}else{if(u){v._params._pos=v._params._siblingsCount=1;v._buildByDecl()}}}},_build:function(){var t=this,n=t._buffer,s=t._params,m=s.tag||"div",r,o=s.block||s.elem;s.js&&((r={})[s.block]=s.js===true?{}:s.js);n.push("<",m);if(o||s.cls){n.push(' class="');if(o){i(s.block||t._currBlock.block,s.elem,s.mods,n);s.mix&&d.each(s.mix,function(u,v){n.push(" ");i(v.block,v.elem,v.mods,n);v.js&&((r||(r={}))[v.block]=v.js===true?{}:v.js)})}s.cls&&n.push(o?" ":"",s.cls);r&&n.push(" i-bem");n.push('"')}r&&n.push(' onclick="return ',d.stringify(r).replace(/'/g,"\\'").replace(/"/g,"'"),'"');s.attrs&&d.each(s.attrs,function(u,v){v!==false&&n.push(" ",u,'="',typeof v!="undefined"&&v!==null?v.toString().replace(/"/g,"&quot;"):"",'"')});if(h[m]){n.push("/>")}else{n.push(">");if(typeof s.content!="undefined"){t._params=s.content;t._buildAll()}n.push("</",m,">")}},_flush:function(){var m=this._buffer.join("");delete this._buffer;return m},_buildByDecl:function(){var r=this,u=r._currBlock,m=r._params;m._currBlock&&(r._currBlock=m._currBlock);m.block&&(r._currBlock=m);if(!m._wrapper){if(m.block||m.elem){var t=j[r._currBlock.block];if(t){var v;if(m.elem){v=t["_elem"+f+m.elem];t._elem&&(v=(v?v.concat(t._elem):t._elem))}else{v=t._block}if(v){var n=0,s;while(s=v[n++]){s(r)}}}}if(m._wrapper){m._currBlock=r._currBlock;r._params=m._wrapper;return r._buildAll()}}var w=r._tParamsChanges;r._tParamsChanges=null;r._build();r._currBlock=u;if(w){var o=r._tParams;d.each(w,function(x,y){typeof y=="undefined"?delete o[x]:o[x]=y})}}})}})(BEM,jQuery);(function(i,e,h){var d=e(window),A=e(document),n={},C={},f={},s={},x=i.blocks,y=i._uniqIdToBlock,b=i.INTERNAL,l=b.NAME_PATTERN,r=b.MOD_DELIM,j=b.ELEM_DELIM,B=b.buildModPostfix,v=b.buildClass;function t(F,D){var E=F[0];e.each(u(E),function(G,I){c(I,E,G,D);var H=y[I.uniqId];H?H._addDomElem(F):a(G,F,I)})}function a(K,G,F,D,L){if(typeof F=="boolean"){L=D;D=F;F=h}var H=G[0];F=c(F||u(H)[K],H,K);var J=F.uniqId;if(y[J]){return y[J]._init()}n[J]=n[J]?n[J].add(G):G;var I=x[K]||w.decl(K,{},{live:true});if(D||!(I._liveInitable=!!I._processLive())){var E=new I(n[J],F,!!D);delete n[J];L&&L.apply(E,Array.prototype.slice.call(arguments,4));return E}}function c(I,F,E,D){(I||(I={})).uniqId||(I.uniqId=(I.id?E+"-id-"+I.id:e.identify())+(D||e.identify()));var H=e.identify(F),G=C[H]||(C[H]={});G[E]||(G[E]=I);return I}function z(E,D,G){var F=E.find(D);return G?F:F.add(E.filter(D))}function u(D){var E=e.identify(D);return C[E]||(C[E]=g(D))}function g(F){var E=F.onclick;if(!E&&F.tagName.toLowerCase()=="body"){var D=e(F).attr("onclick");D&&(E=Function(D))}return E?E():{}}function m(D){delete C[e.identify(D)]}function o(){return A[0][e.support.boxModel?"documentElement":"body"]}e.fn.bem=function(D,E){return a(D,this,E,true)};var w=i.DOM=i.decl("i-bem__dom",{__constructor:function(E,F,D){this.domElem=E;this._eventNameCache={};this._elemCache={};this._needSpecialUnbind=false;this.__base(F,D)},_addDomElem:function(D){this.domElem=this.domElem.add(D)},_removeDomElem:function(D){!(this.domElem=this.domElem.not(D))[0]&&this.destruct()},findBlocksInside:function(D,E){return this._doBlocksMethod(this._buildFindBlocksParams("find",D,E))},findBlockInside:function(D,E){return this._doBlocksMethod(this._buildFindBlocksParams("find",D,E,true))},findBlocksOutside:function(D,E){return this._doBlocksMethod(this._buildFindBlocksParams("parents",D,E))},findBlockOutside:function(D,E){return this._doBlocksMethod(this._buildFindBlocksParams("closest",D,E))[0]},findBlocksOn:function(D,E){return this._doBlocksMethod(this._buildFindBlocksParams("",D,E))},findBlockOn:function(D,E){return this._doBlocksMethod(this._buildFindBlocksParams("",D,E,true))},_buildFindBlocksParams:function(D,E,G,F){return{select:D,elem:G?E:h,block:G||E,onlyFirst:F}},doBlocksMethodInside:function(E,F,G,D){return this._doBlocksMethod(this._buildDoBlocksMethodParams("find",E,F,G,D))},doBlocksMethodOutside:function(E,F,G,D){return this._doBlocksMethod(this._buildDoBlocksMethodParams("closest",E,F,G,D))},doBlocksMethodOn:function(E,F,G,D){return this._doBlocksMethod(this._buildDoBlocksMethodParams("",E,F,G,D))},doBlocksMethod:function(E,F,D){return this._doBlocksMethod({blocks:E,method:F,args:D})},_buildDoBlocksMethodParams:function(D,G,H,I,F){var E=typeof I=="string";return{select:D,elem:E?G:h,block:E?H:G,method:E?I:H,args:E?F:I}},_doBlocksMethod:function(E){var H=this;if(E.blocks){return e.map(E.blocks,function(M){return H._doBlockMethod(M,E.method,E.args)})}var G=E.elem?(typeof E.elem=="string"?this.findElem(E.elem):E.elem):this.domElem,F=typeof E.block=="string",L=F?E.block:E.block.blockName,D="."+(F?v(L):v(L,E.block.modName,E.block.modVal))+(E.onlyFirst?":first":""),I=G.filter(D);E.select&&(I=I.add(G[E.select](D)));if(E.onlyFirst){return I[0]?this._doBlockMethod(a(L,I.eq(0),true),E.method,E.args):null}if(E.method){return e.map(I,function(M){return H._doBlockMethod(a(L,e(M),true),E.method,E.args)})}var K=[],J={};e.each(I,function(M,N){var O=a(L,e(N),true);if(!J[O._uniqId]){J[O._uniqId]=true;K.push(O)}});return K},_doBlockMethod:function(E,F,D){return F?E[F].apply(E,D||[]):E},bindToDomElem:function(E,F,D){var G=this;D?E.bind(G._buildEventName(F),function(H){(H.data||(H.data={})).domElem=e(this);return D.apply(G,arguments)}):e.each(F,function(I,H){G.bindToDomElem(E,I,H)});return G},bindToDoc:function(E,D){this._needSpecialUnbind=true;return this.bindToDomElem(A,E,D)},bindToWin:function(E,D){this._needSpecialUnbind=true;return this.bindToDomElem(d,E,D)},bindToBlock:function(E,D){return this.bindToDomElem(this.domElem,E,D)},bindToElem:function(F,E,D){return this.bindToDomElem(typeof F=="string"?this.findElem(F):F,E,D)},bindTo:function(F,E,D){if(!E||e.isFunction(E)){D=E;E=F;F=this.domElem}else{if(typeof F=="string"){F=this.elem(F)}}return this.bindToDomElem(F,E,D)},unbindFromDomElem:function(D,E){D.unbind(this._buildEventName(E));return this},unbindFromDoc:function(D){return this.unbindFromDomElem(A,D)},unbindFromWin:function(D){return this.unbindFromDomElem(d,D)},unbindFromBlock:function(D){return this.unbindFromDomElem(this.domElem,D)},unbindFromElem:function(E,D){return this.unbindFromDomElem(typeof E=="string"?this.findElem(E):E,D)},unbindFrom:function(E,D){if(!D){D=E;E=this.domElem}else{if(typeof E=="string"){E=this.elem(E)}}return this.unbindFromDomElem(E,D)},_buildEventName:function(D){var E=this;return D.indexOf(" ")>1?e.map(D.split(" "),function(F){return E._buildOneEventName(F)}).join(" "):E._buildOneEventName(D)},_buildOneEventName:function(F){var H=this,D=H._eventNameCache;if(F in D){return D[F]}var G="."+H._uniqId;if(F.indexOf(".")<0){return D[F]=F+G}var E=".bem_"+H.__self._name;return D[F]=e.map(F.split("."),function(J,I){return I==0?J+E:E+"_"+J}).join("")+G},trigger:function(E,D){this.__base(E=this.buildEvent(E),D)._ctxTrigger(E,D);return this},_ctxTrigger:function(E,D){var H=this,G=f[H.__self._buildCtxEventName(E.type)],F={};G&&H.domElem.each(function(){var J=this,I=G.counter;while(J&&I){var L=e.identify(J,true);if(L){if(F[L]){break}var K=G.ctxs[L];if(K){e.each(K,function(N,M){M.fn.call(M.ctx||H,E,D)});I--}F[L]=true}J=J.parentNode}})},setMod:function(E,F,D){if(E&&typeof D!="undefined"&&E.length>1){var G=this;E.each(function(){G.setMod(e(this),F,D)});return G}return this.__base(E,F,D)},_extractModVal:function(H,E,G){var D=(E||this.domElem)[0],F;D&&(F=D.className.match(this.__self._buildModValRE(H,G||E)));return F?F[2]:""},_extractMods:function(D,H){var G={},E=!D.length,F=0;e.each((H||this.domElem)[0].className.match(this.__self._buildModValRE("("+(E?l:D.join("|"))+")",H,"g"))||[],function(I,J){var L=(J=e.trim(J)).lastIndexOf(r),K=J.substr(0,L-1).lastIndexOf(r);G[J.substr(K+1,L-K-1)]=J.substr(L+1);++F});F<D.length&&e.each(D,function(I,J){J in G||(G[J]="")});return G},_afterSetMod:function(J,F,H,I){var E=this.__self,D=E._buildModClassPrefix(J,I),G=E._buildModValRE(J,I),K=F==="";(H||this.domElem).each(function(){var L=this.className;L.indexOf(D)>-1?this.className=L.replace(G,(K?"":"$1"+D+F)+"$3"):K||e(this).addClass(D+F)});I&&this.dropElemCache(I,J,F)},findElem:function(G,I,H,F){if(arguments.length%2){F=H;H=I;I=G;G=this.domElem}else{if(typeof G=="string"){G=this.findElem(G)}}var E=this.__self,D="."+e.map(I.split(" "),function(J){return v(E._name,J,H,F)}).join(",.");return z(G,D)},_elem:function(E,G,D){var F=E+B(G,D);return this._elemCache[F]||(this._elemCache[F]=this.findElem(E,G,D))},elem:function(G,F,D){if(G.indexOf(" ")<0){return this._elem(G,F,D)}var E=e([]),H=this;e.each(G.split(" "),function(){E=E.add(H._elem(this,F,D))});return E},dropElemCache:function(G,F,D){if(G){var H=this,E=B(F,D);G.indexOf(" ")<0?delete H._elemCache[G+E]:e.each(G.split(" "),function(J,I){delete H._elemCache[I+E]})}else{this._elemCache={}}return this},containsDomElem:function(D){return D.parents().andSelf().index(this.domElem)>-1},buildSelector:function(E,F,D){return this.__self.buildSelector(E,F,D)},destruct:function(E){var F=this,D=F.__self;F._needSpecialUnbind&&D.doc.add(D.win).unbind("."+F._uniqId);F.__base();F.dropElemCache().domElem.each(function(G,H){e.each(u(H),function(I,J){var K=y[J.uniqId];K&&K._removeDomElem(H)});m(H)});E||F.domElem.remove();delete F.domElem;delete F._elemCache}},{doc:A,win:d,_processLive:function(E){var G=this,F=G._liveInitable;if("live" in G){var D=typeof F=="undefined";if(D^E){if(e.isFunction(G.live)){F=G.live()!==false;G.live=function(){}}else{F=G.live}}}return F},init:function(E,G,F){if(!E||e.isFunction(E)){F=G;G=E;E=A}var D=e.identify();z(E,".i-bem").each(function(){t(e(this),D)});G&&this.afterCurrentEvent(G,F)},destruct:function(E,D,F){if(typeof E!="boolean"){F=D;D=E;E=h}z(D,".i-bem",F).each(function(){e.each(u(this),function(G,H){if(H.uniqId){var I=y[H.uniqId];I&&I.destruct(true)}});m(this)});E||(F?D.empty():D.remove())},update:function(D,E,G,F){this.destruct(D,true);this.init(D.html(E),G,F)},_buildCtxEventName:function(D){return this._name+":"+D},_liveClassBind:function(F,G,K,D){var J=this;if(G.indexOf(" ")>-1){e.each(G.split(" "),function(L,M){J._liveClassBind(F,M,K,D)})}else{var E=J._buildCtxEventName(G),I=s[E],H=e.identify(K);if(!I){I=s[E]={};A.bind(G,J.changeThis(J._liveClassTrigger,J))}I=I[F]||(I[F]={uniqIds:{},fns:[]});if(!(H in I.uniqIds)){I.fns.push({uniqId:H,fn:J._buildLiveEventFn(K,D)});I.uniqIds[H]=I.fns.length-1}}return this},_liveClassUnbind:function(G,H,K){var F=this._buildCtxEventName(H),J=s[F];if(J){if(K){if(J=J[G]){var I=e.identify(K);if(I in J.uniqIds){var E=J.uniqIds[I],D=J.fns.length-1;J.fns.splice(E,1);while(E<D){J.uniqIds[J.fns[E++].uniqId]=E-1}delete J.uniqIds[I]}}}else{delete J[G]}}return this},_liveClassTrigger:function(J){var I=s[this._buildCtxEventName(J.type)];if(I){var F=J.target,D=[];for(var K in I){I.hasOwnProperty(K)&&D.push(K)}do{var E=" "+F.className+" ",H=0;while(K=D[H++]){if(E.indexOf(" "+K+" ")>-1){var G=0,M=I[K].fns,L;while(L=M[G++]){L.fn.call(e(F),J)}D.splice(--H,1)}}}while(D.length&&(F=F.parentNode))}},_buildLiveEventFn:function(F,D){var E=this;return function(H){var G=[E._name,((H.data||(H.data={})).domElem=e(this)).closest(E.buildSelector()),true],I=a.apply(null,D?G.concat([F,H]):G);I&&(D||F.apply(I,arguments))}},liveInitOnEvent:function(E,D,F){return this.liveBindTo(E,D,F,true)},liveBindTo:function(H,E,G,D){if(!G){G=E;E=H;H=h}if(!H||typeof H=="string"){H={elemName:H}}var F=this;if(H.elemName&&H.elemName.indexOf(" ")>1){e.each(H.elemName.split(" "),function(I,J){F._liveClassBind(v(F._name,J,H.modName,H.modVal),E,G,D)});return F}return F._liveClassBind(v(F._name,H.elemName,H.modName,H.modVal),E,G,D)},liveUnbindFrom:function(E,D,G){var F=this;if(E.indexOf(" ")>1){e.each(E.split(" "),function(H,I){F._liveClassUnbind(v(F._name,I),D,G)});return F}return F._liveClassUnbind(v(F._name,E),D,G)},_liveInitOnBlockInit:function(E,G,F){var D=this._name;x[E].on("init",function(H){var I=H.block[F](D);G&&e.each(I,function(){G.call(this)})});return this},liveInitOnBlockInit:function(D,E){return this._liveInitOnBlockInit(D,E,"findBlocksOn")},liveInitOnBlockInsideInit:function(D,E){return this._liveInitOnBlockInit(D,E,"findBlocksOutside")},on:function(D,H,G,F,E){return D.jquery?this._liveCtxBind(D,H,G,F,E):this.__base(D,H,G,F)},un:function(D,G,F,E){return D.jquery?this._liveCtxUnbind(D,G,F,E):this.__base(D,G,F)},liveCtxBind:function(D,H,G,F,E){return this._liveCtxBind(D,H,G,F,E)},_liveCtxBind:function(D,I,H,G,F){if(e.isFunction(H)){F=G;G=H;H=h}var K=this;if(I.indexOf(" ")>-1){e.each(I.split(" "),function(L,M){K._liveCtxBind(D,M,H,G,F)})}else{var E=K._buildCtxEventName(I),J=f[E]||(f[E]={counter:0,ctxs:{}});D.each(function(){var M=e.identify(this),L=J.ctxs[M];if(!L){L=J.ctxs[M]={};++J.counter}L[e.identify(G)+(F?e.identify(F):"")]={fn:G,data:H,ctx:F}})}return K},liveCtxUnbind:function(D,G,F,E){return this._liveCtxBind(D,G,F,E)},_liveCtxUnbind:function(D,G,F,E){var I=this,H=f[G=I.buildEventName(G)];if(H){D.each(function(){var K=e.identify(this,true),J;if(K&&(J=H.ctxs[K])){F&&delete J[e.identify(F)+(E?e.identify(E):"")];if(!F||e.isEmptyObject(J)){H.counter--;delete H.ctxs[K]}}});H.counter||delete f[G]}return I},_extractElemNameFrom:function(D){var E=D[0].className.match(this._buildElemNameRE());return E?E[1]:h},extractParams:g,_buildModClassPrefix:function(E,D){return v(this._name)+(D?j+(typeof D==="string"?D:this._extractElemNameFrom(D)):"")+r+E+r},_buildModValRE:function(E,D,F){return new RegExp("(\\s?)"+this._buildModClassPrefix(E,D)+"("+l+")(\\s|$)",F)},_buildElemNameRE:function(){return new RegExp(this._name+j+"("+l+")(?:\\s|$)")},buildSelector:function(E,F,D){return"."+v(this._name,E,F,D)},getWindowSize:function(){var D=d[0];if(typeof D.innerWidth!="undefined"){return{width:D.innerWidth,height:D.innerHeight}}var E=o();return{width:E.clientWidth,height:E.clientHeight}},buildClass:function(F,D){var E={};D?E[F]=D:E=F;return b.buildClasses(this._name,null,E)},buildElemClass:function(E,G,D){var F={};D?F[G]=D:F=G;return b.buildClasses(this._name,E,F)},buildHtml:function(H){H=H||{};var E=H.tag||"div",I=this,D=["<",E,' class="'],G={};e.each([{name:H.name,elem:H.elem,mods:H.mods,params:H.params}].concat(H.mix||[]),function(J,L){var K=L.name?i.blocks[L.name]:I;J&&D.push(" ");D.push(L.elem?K.buildElemClass(L.elem,L.mods):K.buildClass(L.mods));L.elem||(G[K.getName()]=L.params||{})});var F=!e.isEmptyObject(G);D.push(F?" i-bem":"",'"');F&&D.push(' onclick="return ',e.stringify(G).replace(/"/g,"'"),'"');D.push(">",this.buildHtmls(H.content),"</",E,">");return D.join("")},buildHtmls:function(D){if(!e.isArray(D)){return D||""}var E=this;return e.map(D,function(F){return E.buildHtml(F)}).join("")}})})(BEM,jQuery);$(function(){BEM.DOM.init()});(function(b,a){a.block["b-dropdown"]=function(e){var d=b(this),c,i,g,j,h=false,m=false,l=function(){c=d.find(".b-dropdown__list");i=b('<div class="b-dropdown__popup"/>');g=b('<iframe class="b-dropdown__iframe" frameborder="0" src="javascript:\'<body style=\\\'background:none;overflow:hidden\\\'>\'"/>');j=c.clone(true).addClass("b-dropdown__list_clone").hide();c.before(i);i.after(j);f();b(document).keydown(function(n){if(n.keyCode==27&&!(n.metaKey||n.ctrlKey||n.altKey||n.shiftKey)){f()}}).click(function(n){if(!b(n.target).is(".b-dropdown *")){f()}}).bind("popupsClose.lego",f);m=true},f=(function(){if(h){return}i.css("visibility","hidden").before(c).hide();j.hide();h=true});d.find(".b-dropdown__or").click(function(o){o.preventDefault();if(!m){l()}if(d.hasClass("b-dropdown_state_disabled")){d.trigger("popupDisabled.lego");return}if(h){b(document).trigger("popupsClose.lego",{source:d[0]});var r=b.Event("popupOpen.lego");d.trigger(r);if(!r.isDefaultPrevented()){j.css("display","");i.append(c).css("visibility","");if(e.direction=="up"||d.hasClass("b-dropdown_direction_up")){var n=i.height()-j.height();i.css("margin-top",-(n-(parseInt(c.css("padding-bottom"),10)+parseInt(b(this).closest(".b-dropdown__item").css("padding-bottom"),10))))}i.prepend(g).css("display","");h=false}}else{f()}})}})(jQuery,window.Lego);(function(){var a;BEM.DOM.decl("b-form-input",{onSetMod:{js:function(){var d=this,b=d.elem("input"),c=d.__self.doc[0].activeElement;d._val=b.val();d._focused=c===b[0];if(!a){a=[];(function(){var e,f=0;while(e=a[f++]){e.val(e.elem("input").val())}setTimeout(arguments.callee,50)})()}d._focused&&d.setMod("focused","yes");if(d.params.autoFocus&&!d._focused&&!(c&&"input textarea".indexOf(c.tagName.toLowerCase())>-1)){d.setMod("focused","yes")._focused=true}d._instanceIndex=a.push(d.bindTo(b,{focus:d._onFocus,blur:d._onBlur}))-1;d.params.shortcut&&this.bindToDoc("keydown",function(f){if(f.ctrlKey&&f.keyCode==38&&!$(f.target).is("input, textarea")){this.setMod("focused","yes")}})},disabled:function(c,b){this.elem("input").attr("disabled",b=="yes")},focused:function(c,b){if(this.hasMod("disabled","yes")){return false}var d=b=="yes";d?this._focused||this._focus():this._focused&&this._blur();this.afterCurrentEvent(function(){this.trigger(d?"focus":"blur")})}},onElemSetMod:{message:{visibility:function(e,f,b){var g=this,d=g.getMod(e,"type");if(d){var c=true;b||g.elem("message","type",d).each(function(){this!=e[0]&&g.hasMod($(this),"visibility","visible")&&(c=false)});c&&g.toggleMod("message-"+d,"yes","",b==="visible")}d=="error"&&e.attr("aria-hidden",b!=="visible")}}},val:function(d,c){if(typeof d=="undefined"){return this._val}if(this._val!=d){var b=this.elem("input");b.val()!=d&&b.val(d);this._val=d;this.trigger("change",c)}return this},_onFocus:function(){this._focused=true;return this.setMod("focused","yes")},_onBlur:function(){this._focused=false;return this.delMod("focused")},_focus:function(){var c=this.elem("input")[0];if(c.createTextRange&&!c.selectionStart){var b=c.createTextRange();b.move("character",c.value.length);b.select()}else{c.focus()}},_blur:function(){this.elem("input").blur()},destruct:function(){this.__base.apply(this,arguments);this.params.shortcut&&this.unbindFromDoc("keydown");a.splice(this._instanceIndex,1);var c=this._instanceIndex,b;while(b=a[c++]){--b._instanceIndex}}})})();(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);(function(b,a){a.block["b-vmenu"]=function(){b(">.item>.switcher>.b-pseudo-link , >.item>.switcher>.switcher-icon",this).click(function(){var c=b(this).parents(".switcher:first");c.toggleClass("switcher-on");c.find("img").attr("alt",c.hasClass("switcher-on")?"-":"+");b(".b-vmenu:first",b(this).parents(".item:first")).toggleClass("g-hidden")})}})(jQuery,window.Lego);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")},"*":function(b,a){if(this.isDisabled()&&"hovered pressed".indexOf(b)>-1){return false}"hovered focused".indexOf(b)>-1&&a==""&&this.delMod("pressed")}},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.DOM.decl("b-form-checkbox",{onSetMod:{js:function(){var b=this,a=b.elem("checkbox");b.setMod("checked",a.attr("checked")?"yes":"");b.__self.doc[0].activeElement===a[0]&&b.setMod("focused","yes")},focused:{yes:function(){if(this.isDisabled()){return false}this.elem("checkbox").focus()},"":function(){this.elem("checkbox").blur()}},checked:function(b,a){this.elem("checkbox").attr("checked",a=="yes");this.afterCurrentEvent(function(){this.trigger("change")})},disabled:function(b,a){this.elem("checkbox").attr("disabled",a=="yes")}},isDisabled:function(){return this.hasMod("disabled","yes")},isChecked:function(){return this.hasMod("checked","yes")},toggle:function(){this.toggleMod("checked","yes","")},val:function(b){var a=this.elem("checkbox");return b==undefined?a.val():a.val(b)},_onClick:function(a){if(a.button!==0){return}this.isDisabled()||this.setMod("focused","yes").toggle()}},{live:function(){this.liveBindTo("checkbox","click",function(a){this._onClick(a)}).liveBindTo("checkbox","focusin focusout",function(a){this.setMod("focused",a.type=="focusin"?"yes":"")});return false}});BEM.DOM.decl("b-form-radio",{onSetMod:{js:function(){var b=this,a=b.__self.doc[0].activeElement;b._val=this.findElem(this.elem("button","checked","yes"),"radio").val()||"";b.elem("radio").each(function(){var d=[];a===this&&(d.push("focused"));this.checked&&(d.push("checked"));if(d[0]){var c=b.__self._getButtonByElem($(this));$.each(d,function(e,f){b.setMod(c,f,"yes")})}})}},onElemSetMod:{button:{focused:{yes:function(a){this.delMod(this.elem("button","focused","yes"),"focused").findElem(a,"radio").focus()}},checked:{yes:function(b){this.setMod(b.next(),"next-for-checked","yes");this._val=this.findElem(b,"radio").attr("checked",true).val();var a=this.elem("button","checked","yes");this.delMod(a,"checked");this.afterCurrentEvent(function(){this.trigger("change",{current:b,prev:a})})},"":function(a){this.delMod(a.next(),"next-for-checked")}},"next-for-checked":{yes:function(){this.delMod(this.elem("button","next-for-checked","yes"),"next-for-checked")}},disabled:function(b,c,a){b.find(this.buildSelector("radio")).attr("disabled",a=="yes")}}},val:function(a){if(typeof a=="undefined"){return this._val}else{var b=this;this.elem("radio").each(function(){if(this.value==a){b.setMod(b.__self._getButtonByElem($(this)),"checked","yes");return false}});return b}}},{live:function(){this.liveBindTo("radio","leftclick",function(b){if(!b.target.disabled){var a=this.__self._getButtonByElem(b.data.domElem);this.setMod(a,"focused","yes").setMod(a,"checked","yes")}}).liveBindTo("radio","focusin focusout",function(a){this.setMod(this.__self._getButtonByElem(a.data.domElem),"focused",a.type=="focusin"?"yes":"")});return false},_getButtonByElem:function(a){return a.closest(this.buildSelector("button"))}});(function(c,b){var a=b.block["i-metrika"]=function(d){d.counter&&a.newCounter(d.counter)};a.counters=[];a.newCounter=function(d){a.counters.push(d)};a.callback=function(d){return function(){a.newCounter=function(g){var f=window["yaCounter"+g]=new Ya.Metrika({id:g,ut:"noindex"});f.clickmap();f.trackLinks({external:true})};var e;while(e=a.counters.shift()){a.newCounter(e)}d&&d()}};!(window.Ya&&Ya.Metrika)&&c(function(){var f=document,e=f.createElement("script");e.type="text/javascript";e.src="//mc.yandex.ru/metrika/watch.js";e.setAttribute("async","true");window.yandex_metrika_callback=a.callback(window.yandex_metrika_callback);f.documentElement.firstChild.appendChild(e)})})(jQuery,window.Lego);(function(){var a=Lego.block["i-flashcookie"],b=function(e){var c=this,d=arguments.callee.load=function(){location.protocol.indexOf("https")<0&&c.replaceWith($('<iframe src="http://kiks.yandex'+location.host.match(/.*([.].*?):?\d{0,}$/)[1]+'/su/" class="'+c.attr("class")+'"/>'))};c.hasClass("i-flashcookie_autoload_no")||d()};Lego.block["i-flashcookie"]=function(d){var c=this.hasClass("i-flashcookie_type_iframe")?b:a;c&&c.call(this,d)}})();(function(c,a){var b=a.block["b-head-tabs"]=function(x){var e=c(this),g=c.decodeURIComponent?c.decodeURIComponent:function(C){var B="";try{B=decodeURIComponent(C)}catch(D){B=C}return B},A=c(".b-head-search"),z=A.find(".b-search .b-form-input input:first"),r=a.params.id,l=t(document.location.search),j={www:505,search:521,images:526}[r]||527,f={market:{cvredirect:1,clid:j}},n={news:{rpt:"nnews",grhow:"clutop"},haber:{rpt:"nnews2",grhow:"clutop"},yaca:{rpt:"rs2"},market:{cvredirect:1,clid:j},blogs:{ft:"blog"}},y=(function(){var B={};c.each(["news","yaca","market","blogs","maps","adresa","video","fotki","slovari","auto","images","music","www","aile","yandex","haber","gorsel"],function(){B[this]=["family"]});return B})(),u=(function(){var B={};c.each(["news","yaca","market","blogs","maps","adresa","video","fotki","slovari","auto","images","music","www","aile","yandex","haber","gorsel"],function(){B[this]=["noreask","family"]});return B})(),v=e.find(':not(strong)>a.b-head-tabs__link:not([href$="/all"])').map(function(){var C=this.host.split(".")[0],D=t(this.search),E=D.clid,B=c.param(c.extend(D,h(C,E)),true);return{node:this,clid:E,toServiceId:C,path:b.getHostToUrlMap()[C],host:this.host,searchHost:b.getHostMap()[C],noSearchParamsUrl:B?"?"+B:"",searchParams:c.extend(D,s(C,E))}}).filter(function(){return typeof this.path!=="undefined"}),o,w=A.find(".b-search__advanced")[0];if(w){var i=t(w.search),m=w.pathname.replace(/^\/?(.*)/,"$1");i.text="";v.push({node:w,clid:i.clid,toServiceId:r,path:m,host:w.host,noSearchParamsUrl:m+"?"+c.param(i,true),searchParams:i})}(function(){var B=c.trim(z.val())||x["default"];if(o!=B){o=B;c.each(v,function(){B&&(this.searchParams[b.getSearchParamName(this.toServiceId)]=B);this.node.href=[this.node.protocol+"/",B&&this.searchHost?this.searchHost:this.host,B?this.path+"?"+c.param(this.searchParams,true):this.noSearchParamsUrl].join("/")})}setTimeout(arguments.callee,200)})();function h(B,C){var D=f[B]||{};!D.clid&&C&&(D.clid=C);c.each(y[B]||[],function(){l[this]&&(D[this]=l[this])});return D}function s(C,D){var F=[].concat(u[C]),B=C+r;(B=="imageswww"||B=="wwwimages")&&F.push("site");var E=n[C]||{};c.each(F,function(){l[this]&&(E[this]=l[this])});!E.clid&&D&&C!=="www"&&(E.clid=D);return E}function t(B){var C={};c.each(B.substr(1).split("&"),function(G){var H=this.split("="),D=H[0],F=H[1];if(D){if(C.hasOwnProperty(D)){var E=C[D];c.isArray(E)?E.push(F):C[D]=[E,F]}else{C[D]=F}}});return d(C)}function d(C){var B=["site"];c.each(C,function(D,E){if(c.inArray(D,B)>-1){C[D]=c.isArray(E)?E.map(function(F){return g(F)}):g(E)}});return C}};c.extend(b,{getHostToUrlMap:function(){var d={www:"yandsearch",market:"search.xml",maps:"",music:"#/search",video:"#search"};d.harita=d.maps;d.blogs=d.adresa=d.fotki=d.slovari=d.auto=d.market;d.news=d.yaca=d.images=d.gorsel=d.haber=d.aile=d.yandex=d.www;return d},getHostMap:function(){return{}},getSearchParamName:function(d){return"text"}})})(jQuery,window.Lego);(function(a){BEM.DOM.decl("b-dropdowna",{onSetMod:{js:function(){this._getSwitcher().on("click",this._toggle,this)},disabled:function(c,b){this._getSwitcher().setMod(c,b);b=="yes"&&this.getPopup().hide()}},_getSwitcher:function(){return this._switcher||(this._switcher=this.findBlockInside("b-"+(this.getMod(this.elem("switcher"),"type")||"pseudo-link")))},_toggle:function(){this.getPopup().toggle(this.elem("switcher"))},getPopup:function(){return this._popup||(this._popup=this.findBlockInside("b-popupa")).on("outside-click",function(c,b){this._getSwitcher().containsDomElem(a(b.domEvent.target))&&c.preventDefault()},this)},destruct:function(){var b=this._popup;b&&b.destruct.apply(b,arguments);this.__base.apply(this,arguments)}},{live:function(){this.liveInitOnEvent("switcher","leftclick",function(){})}})})(jQuery);BEM.DOM.decl({name:"b-pseudo-link",modName:"isBEM",modVal:"yes"},{_onClick:function(a){a.preventDefault();this.hasMod("disabled","yes")||this.afterCurrentEvent(function(){this.trigger("click")})}},{live:function(){this.liveBindTo({modName:"isBEM",modVal:"yes"},"leftclick",function(a){this._onClick(a)})}});BEM.HTML.decl("b-pseudo-link",{onBlock:function(a){var b=a.param("url");a.tag(b?"a":"span").js(true);b&&a.attr("href",b)}});(function(d){var c,g=[],a=d.browser;function f(){return g.length?g.shift():c?c.clone():c=b()}function e(h){g.push(h)}function b(){return d((a.safari||a.webkit)&&navigator.userAgent.toLowerCase().indexOf("mobile")>-1?"<div/>":"<iframe"+(a.msie&&a.version<9?' frameborder="0"':"")+"/>")}BEM.DOM.decl("i-popup",{onSetMod:{visibility:{visible:function(){var h=this._getUnder(),i=h.parent();this.hasMod(h,"type","paranja")?i.is("body")||h.appendTo("body"):(i[0]!==this.domElem[0])&&h.prependTo(this.domElem);this._inBody||(this._inBody=!!this.domElem.appendTo("body"));this.trigger("show")},"":function(){var h=this._getUnder();this.hasMod(h,"type","paranja")&&h.remove();this._putUnder();this.trigger("hide")}}},_getUnder:function(){return this._under||(this._under=f().attr("class",this._underClass||(this._underClass=this.findElem("under").remove().attr("class"))))},_putUnder:function(){e(this._under);delete this._under},show:function(h){h&&this.domElem.css(h);return this.setMod("visibility","visible")},hide:function(){return this.delMod("visibility")}},{live:true})})(jQuery);BEM.HTML.decl("i-popup",{onBlock:function(a){a.mod("autoclosable","yes").js(true).wrapContent({elem:"content"}).afterContent({elem:"under",mods:a.param("underMods"),mix:a.param("underMix")}).param("zIndex")&&a.attr("style","z-index:"+(32700+a.param("zIndex")))}});(function(a){BEM.DOM.decl({name:"i-popup",modName:"autoclosable",modVal:"yes"},{onSetMod:{visibility:{visible:function(){var b=a.browser.opera?"keypress":"keydown";this.afterCurrentEvent(function(){this.bindToDoc("leftclick",function(c){this.containsDomElem(a(c.target))||this._onOutClick(c)}).bindToDoc(b,function(c){c.keyCode==27&&this.hide()})});this.__base.apply(this,arguments)},"":function(){return this.unbindFromDoc("leftclick keypress").__base.apply(this,arguments)}}},_onOutClick:function(b){var c=a.Event("outside-click");this.trigger(c,{domEvent:b});c.isDefaultPrevented()||this.hide()}})})(jQuery);(function(d){BEM.DOM.decl("b-popupa",{onSetMod:{js:function(){this._owner=null;this._isShowed=false;this._direction=this.getMod("direction")||"down"}},show:function(l){if(!this._isShowed||this._owner!==l){this._getUnder().show({left:-10000,top:-10000});this._owner=l;this.pos()}return this},hide:function(){this._isShowed&&this._getUnder().hide();return this},toggle:function(l){return this.isShowed()?this.hide():this.show(l)},pos:function(){var l=this._calcParams(this._owner);this.elem("tail").css(l.tailOffsets);this.setMod("direction",l.direction)._getUnder().show(l.offsets);return this},isShowed:function(){return this._isShowed},setDirection:function(l){if(this._direction!=l){this._direction=l;this.isShowed()&&this.pos()}},setContent:function(l,n,m){BEM.DOM.update(this.elem("content"),l,n,m);return this.isShowed()?this.pos():this},_calcDimensions:function(r){var m=this._under.domElem,w=this.__self.doc,x=!!r.jquery,u=x?r.offset():r,n=x?r.outerWidth():e,o=x?r.outerHeight():e,t=w.scrollLeft(),s=w.scrollTop(),v=this.__self.getWindowSize(),l=parseInt(this.elem("content").css("border-top-width"),10);return{ownerLeft:u.left,ownerTop:u.top,ownerRight:u.left+n,ownerBottom:u.top+o,ownerMiddle:u.left+n/2,underWidth:m.outerWidth(),underHeight:m.outerHeight(),borderWidth:isNaN(l)?0:l,windowLeft:t,windowRight:t+v.width,windowTop:s,windowBottom:s+v.height}},_calcParams:function(l){var t=this._calcDimensions(l);if(this.hasMod("adjustable","no")){return f(this._direction,t)}var m={},o=d.inArray(this._direction,a),n=o,s,r;do{s=a[o];r=m[s]=f(s,t);if(!r.factor){return r}++o==a.length&&(o=0)}while(o!==n);return m["down-right"]},destruct:function(){var l=this._under;l&&l.destruct.apply(l.hide(),arguments);this.__base.apply(this,arguments)},_getUnder:function(){var m=this;if(!m._under){var l=d(BEM.HTML.build({block:"i-popup",zIndex:this.params.zIndex,mods:{autoclosable:m.getMod("autoclosable")||"yes",fixed:m.hasMod("direction","fixed")&&"yes"},underMods:m.params.underMods,underMix:[{block:"b-popupa",elem:"under"}]}));(m._under=m.findBlockOn(l,"i-popup")).on({show:function(){m._isShowed=true;m.hasMod("adjustable","no")||m.bindToWin("resize",function(){m.isShowed()&&m.pos()});m.trigger("show")},hide:function(){m._isShowed=false;m.hasMod("adjustable","no")||m.unbindFromWin("resize");m.trigger("hide")},"outside-click":function(){m.trigger.apply(m,arguments)}},m).elem("content").append(m.domElem)}return m._under}},{live:function(){this.liveBindTo("close","leftclick",function(){this.hide()})}});var e=19,b=7,i=15,g=15,h=7,j=8,a=["up","up-right","up-left","down","down-right","down-left","right","right-up","left","left-up"];function f(r,s){var m,n,l,o;switch(r){case"down":case"up":m=c(n={left:s.ownerMiddle-s.underWidth/2,top:r=="down"?s.ownerBottom+h:s.ownerTop-s.underHeight-h},s);l={marginLeft:(s.ownerRight-s.ownerLeft)/2+s.ownerLeft-n.left-i/2,marginTop:(r=="down"?-h+s.borderWidth:-s.borderWidth)};break;case"down-right":case"down-left":case"up-right":case"up-left":o=r=="down-right"||r=="down-left"?"down":"up";m=c(n={left:(r=="down-right"||r=="up-right"?s.ownerLeft:s.ownerRight-s.underWidth),top:o=="down"?s.ownerBottom+h:s.ownerTop-s.underHeight-h},s);l={marginLeft:(s.ownerRight-s.ownerLeft)/2+s.ownerLeft-n.left-i/2,marginTop:(o=="down"?-h+s.borderWidth:-s.borderWidth)};break;case"left":case"right":m=c(n={left:(r=="left"?s.ownerLeft-s.underWidth-b:s.ownerRight+b),top:s.ownerTop-e+g/2},s);l={marginLeft:r=="left"?-s.borderWidth:-b+s.borderWidth,marginTop:e-g/2};break;case"left-up":case"right-up":m=c(n={left:(r=="left-up"?s.ownerLeft-s.underWidth-b:s.ownerRight+b),top:s.ownerTop+g/2+e-s.underHeight},s);o=r=="left-up"?"left":"right";l={marginLeft:o=="left"?-s.borderWidth:-b+s.borderWidth,marginTop:s.ownerTop-n.top+j-g/2}}return{direction:o||r,factor:m,offsets:n,tailOffsets:l}}function c(n,m){var l=0;m.windowTop>n.top&&(l+=m.windowTop-n.top);n.top+m.underHeight>m.windowBottom&&(l+=n.top+m.underHeight-m.windowBottom);m.windowLeft>n.left&&(l+=m.windowLeft-n.left);n.left+m.underWidth>m.windowRight&&(l+=n.left+m.underWidth-m.windowRight);return l}BEM.HTML.decl("b-popupa",{onBlock:function(l){var m=false;d.each(l.param("content"),function(n,o){return !(m=o.elem=="close")});l.mods({theme:"ffffff",direction:"down","has-close":m&&"yes"}).js(true).afterContent({elem:"shadow"})},onElem:{content:function(l){l.wrap({elem:"wrap-cell",tag:"td"}).wrap({tag:"tr"}).wrap({elem:"wrap",tag:"table"})},close:function(l){l.tag("i")},shadow:function(l){l.tag("i")},tail:function(l){l.tag("i").wrapContent({elem:"tail-i",tag:"i"})}}})})(jQuery);(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);(function(b,a){a.block["b-search__sample"]=function(g){var f=b(this),e=f.closest("form"),d=e.find("input[name='"+(g["for"]||"text")+"']"),c;f.find(".b-pseudo-link").click(function(h){d.data("b-suggest",false).focus().attr("value",g.text||b(h.target).text());c=e.find("input[name='nl']");if(g.nl&&!c.length){c=b('<input type="hidden" name="nl" value="1"/>').insertAfter(d)}b(document).trigger("popupsClose.lego");setTimeout(function(){d.removeData("b-suggest")},0);h.preventDefault()})}})(jQuery,window.Lego);(function(d,a){var c=!((d.browser.safari||d.browser.webkit)&&navigator.userAgent.toLowerCase().indexOf("mobile")>-1),b=a.block["b-suggest"]=function(I){var C=d(this),N=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>'+(I.close?'<div class="b-suggest-close"><a class="b-pseudo-link" href="javascript:void(0)">'+a.message("b-suggest:close","Закрыть")+"</a></div>":"")+'<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"),t=I.url||(I.host||"")+(I.path||""),u=I.openInNewWindow=typeof I.openInNewWindow=="undefined"?true:I.openInNewWindow,m=!!I.permanent,z=(function(){var O={};O["*"+t]=["",[]];return O})(),r=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?b.getDataFns[I.getData]:(function(){var R=(t.match(/^[^\/]*\/\/[^\/]+\//)||[location.protocol+"//"+location.host])[0]+"jquery"+(d.fn.jquery=="1.4.2"?"-1-4-2":"")+".crossframeajax.html",U=d('<iframe style="display:none" src="'+R+'"></iframe>').appendTo("body")[0],Q=document.domain,P=document.domain.match(/[^.]+\.(?:[^.]{2,3}\.)?[^.]+$/)[0],O=10,V;try{document.domain!=P&&(document.domain=P)}catch(T){}(function S(){if(O){try{V=U.contentWindow.$.crossframeAjax;if(V){y=V}else{throw true}}catch(W){O--;setTimeout(S,42)}}else{try{document.domain!=Q&&(document.domain=Q)}catch(W){}}})();return d.ajax})(),w=function(O){var P=O.length&&O[0].onclick?O[0].onclick():{};return P.value||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 d.isArray(U)&&b.buildItemHtmlFns[U[0]]?b.buildItemHtmlFns[U[0]](U,{stats:L,params:I}):'<li><span class="b-suggest-elem b-suggest-elem-link"><span class="content">'+U+"</span></span></li>"}function Q(V){L.region=V[V.length-1]["r"];var U=V[1];if(!(j=U?U.length:0)){return v()}if(L.usageType!="edit"){L.usageType="not_used"}var W=V[2]||[];K.html(d.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){d(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(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:N.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: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(h){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+"*"+t];if(W){Q(W)}else{var aa=setTimeout(v,r);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:t,data:d.extend({part:G.val(),lr:l},a.params.yandexuid?{yu:a.params.yandexuid}:null),dataType:"json",type:"GET",timeout:r,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,t)})}}})(),x=function(O){n();window.setTimeout(function(){d('<form style="display:none" action="'+O+'" method="get"'+(u?' target="_blank"':"")+"/>").appendTo(d("body")).submit().remove()},500)},h=false,F=true,f=false,v=(function(){if(F){return}N.hide();D(0,G.val());F=true}),j=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=w(U),T=U.is(".b-suggest-elem_nav")?e:(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 s=false;N.find(".b-suggest-close").mousedown(function(){s=true}).mouseup(function(){s=false}).click(function(){D(0);v();h=true;G.focus()});d(document).bind("popupsClose.lego",v).keydown(function(O){if(O.metaKey||O.ctrlKey||O.altKey||O.shiftKey){f=true}}).keyup(function(O){f=false}).mouseup(function(){s=false});H.find(":submit").click(function(){L.buttonByMouse="button_by_mouse"});K.mousedown(function(R){s=true;var Q=d(R.target);if(Q.is("li *")){i=Q.closest(".b-suggest-elem");if(i.hasClass("b-suggest-elem_nav")){n()}else{if(!i.hasClass("b-suggest__elem_selectable_no")){D(0,w(i));G.data("href",i.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){h=true}if(i.get(0).tagName.toLowerCase()!="a"){setTimeout(function(){H.submit()},0)}else{B()}}}}return false}).click(function(){if(m){v()}else{d.browser.msie?v():G.focus()}});var e="",i,g=false;H.submit(function(P){if(I.preventSubmit){v();h=true;B();setTimeout(function(){h=false},100);return false}if(g){return g=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=e;L.text=G.val();L.ratio.userValue=e.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);v();s=false}G.blur(function(O){if(O.originalEvent&&!O.originalEvent.preventDefault){setTimeout(function(){if(!s&&G[0]!=document.activeElement){v()}},84)}else{if(!s){v()}}}).click(function(){if(!F&&!G.val()){e="";v()}L.pos=A(G[0])}).keydown(function(O){switch(O.keyCode){case 38:case 40:O.preventDefault();L._keydownTriggered=true;if(F){h=false;J(G.val())}else{L.usageType="keyboard";D(O.keyCode-39)}break;case 13:break;case 27:s=true;break}setTimeout(function(){e!=G.val()&&L.ratio.userActions++},1)}).keypress(function(P){switch(P.keyCode){case 13:s=true;var O=K.find(".b-suggest-elem_selected");if(O.hasClass("b-suggest-elem_nav")){g=true;x(O.attr("href"));m&&v()}else{O.hasClass("b-suggest-elem_nah")&&(L.nah="nah_used");m||(h=true);H.submit();v()}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(e!=G.val()){e=G.val();clearInterval(P);var P=setTimeout(function(){J(G.val())},1)}break}});setTimeout(function(){G.focus(function(O){if(d(O.target).data("b-suggest")!==false){s=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=(t.match(/^[^\/]*\/\/[^\/]+\//)||[""])[0]+(Q.path||"");if(O){t=O}if("closed" in Q){h=Q.closed}});function B(){a.params["show-counters"]&&a.cp(0,2873,[[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].join("/"));m||(L.submitted=true)}function n(){a.params["show-counters"]&&a.cp(0,70833,L.suggestType+"/session="+L.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);(function(c,a){var b=a.block["b-head-user"]=function(){var d=c(this);if(a.params.login!=""||a.params.displayName){c.getJSON(b.getApiUrl(),{locale:a.params.locale,login:"yes","current-login":a.params.login,yu:a.getCookie("yandexuid")},function(e){b.buildHtml(e,d)})}};b.buildHtml=function(i,f){if(!i||!i.services){return}var j=i.displayName&&i.displayName.social,e=c("<div/>").text(b.getUserLogin(i)).html(),d=j?'<b class="b-user b-user_social_yes"><span class="b-user__provider-ico" style="background:url(http://static.yandex.st/social/current/icons/16/'+j.provider+'.png)"></span>'+e+"</b>":'<b class="b-user"><b class="b-user__first-letter">'+e.substring(0,1)+"</b>"+e.substring(1)+"</b>",h="<a class=\"b-pseudo-link b-pseudo-link_isBEM_yes i-bem\" onclick=\"return {'b-pseudo-link':{name:'b-pseudo-link'}}\""+(!j&&f.hasClass("b-head-user_type_com")?"":' href="'+(j?a.params["social-host"]:"http://i.yandex.ru")+'"')+">"+d+"</a>",g='<div class="b-dropdowna b-dropdowna_isBEM_yes i-bem" onclick="return {\'b-dropdowna\':{name:\'b-dropdowna\'}}"><span class="b-dropdowna__switcher">'+h+'</span><div class="i-popup i-popup_autoclosable_yes i-popup_isBEM_yes i-bem" onclick="return {\'i-popup\':{name:\'i-popup\'}}"><div class="i-popup__content"><div class="i-popup__under b-popupa__under"></div><div class="b-popupa b-popupa_theme_ffffff b-popupa_direction_down b-popupa_isBEM_yes i-bem b-dropdowna__popup" onclick="return {\'b-popupa\':{name:\'b-popupa\'}}"><i class="b-popupa__shadow"></i><i class="b-popupa__tail"><i class="b-popupa__tail-i"></i></i><table cellpadding="0" cellspasing="0" class="b-popupa__wrap"><tr><td class="b-popupa__wrap-cell"><div class="b-popupa__content"><div class="b-menu b-menu_layout_vert b-menu_preset_vmenu"><ul class="b-menu_layout_vert__layout">';j&&f.addClass("b-head-user_social_yes");c.each(i.services,function(l){g+='<li class="b-menu__layout-cell b-menu_layout_vert__layout-cell"><div class="b-menu__item">';if(a.params.id==this.id&&a.params.index){g+="<strong>"+this.title+"</strong>"}else{g+='<a class="b-link b-head-user__link" href="'+this.url+'" onmousedown="Lego.ch(\''+a.params.id+".login.myservices."+this.id+"',this)\">"+this.title+"</a>"}g+="</div></li>"});if(i.services.length){g+='<li class="b-menu_layout_vert__layout-separator"><i class="b-menu__separator"></i></li>'}g+=b.getUserItems(i,f);g+="</ul></div></div></td></tr></table></div></div></div></div>";f.find(".b-user").replaceWith(g);BEM.DOM.init(f)};b.getApiUrl=function(){return a.params["pass-host"]+"/services?callback=?"};b.getUserItems=function(f){var e=f.displayName&&f.displayName.social?[{name:a.message("b-head-userinfo.user:profile","Мои профили"),url:a.params["social-host"]}]:[{name:a.message("b-head-userinfo.user:passport","Паспорт"),url:a.params["passport-host"]},{name:a.message("b-head-userinfo.user:change-password","Сменить пароль"),url:a.params["passport-host"]+"/passport?mode=changepass&retpath="+encodeURIComponent(a.params.retpath)+"/"}];var d="";c.each(e,function(h,g){d+='<li class="b-menu__layout-cell b-menu_layout_vert__layout-cell'+(h==e.length-1?" b-menu_layout_vert__layout-cell_last":"")+'"><div class="b-menu__item"><a class="b-link b-head-user__link" href="'+g.url+'">'+g.name+"</a></div></li>"});return d};b.getUserLogin=function(d){return a.params.displayName&&a.params.displayName.social&&a.params.displayName.name||d.displayName&&d.displayName.name||a.params.login||d.login}})(jQuery,window.Lego);(function(a){window.Lego||(window.Lego={block:{}});Lego.block["i-social"]=function(d){function e(j){var i=this,g={};this.url=j.startUrl+"?";delete j.startUrl;this.popupName=j.popupName;this.yaWindow=null;this.wTimer=null;this.paramsDefault=j;function m(){var n;if(!i.yaWindow){return true}try{n=i.yaWindow.closed}catch(o){n=true}return n}function l(){if(m()){i.wTimer=clearInterval(i.wTimer);i.onFailure({status:"error"})}}function f(x){var A=i.popupName,s=500,B=280,u=Math.round(((window.opera?window.innerWidth:screen.availWidth)-s)/2),y=Math.round(((window.opera?window.innerHeight:screen.availHeight)-B)/2),o="scrollbars=yes, resizable=1, menubar=0, toolbar=0, status=0, location=0, directories=0, left="+u+", top="+y+", width="+s+", height="+B;var t={};for(var w in i.paramsDefault){t[w]=i.paramsDefault[w]}for(var w in x){t[w]=x[w]}var z=["ddom="+(t.ddom||(location.hostname==document.domain?"":document.domain))];t.retpath+=(t.retpath.match("#")?"&":"#")+z.join("&");var n=i.url;var r=[];for(var v in t){r.push(encodeURIComponent(v)+"="+encodeURIComponent(t[v]))}n+=r.join("&");i.yaWindow=window.open(n,A,o);i.yaWindow.focus();if(i.yaWindow){i.wTimer=setInterval(l,500)}}function h(){this.handlers={onSuccess:null,onFailure:null};i.wTimer=clearInterval(i.wTimer);m()||i.yaWindow.close();i.yaWindow=false}this.start=function(o,n,r){h();i.handlers={onSuccess:o,onFailure:n};f(r)};this.onSuccess=function(o){h();var n=i.handlers.onSuccess;n&&n()};this.onFailure=function(o){h();var n=i.handlers.onFailure;n&&n()}}arguments.callee.Broker=e;var c=arguments.callee.defaultParams={startUrl:Lego.params["social-startUrl"]||Lego.params["social-host"]+"/broker/start",retpath:Lego.params["social-retpath"]||location.protocol+"//"+location.host+Lego.params["lego-path"]+"/blocks/i-social/closer/i-social__closer.html",consumer:Lego.params.id||"morda",popupName:"social_"+(Lego.params.id||"morda"),application:"",action_if_anonymous:"authorize",result_location:"fragment"};var b=arguments.callee.broker=new e(a.extend(c,d));return b}})(jQuery);(function(b,a){a.block["b-domik"]=function(C){var d=this,w=d.find(".b-domik__lock"),y=d.find(".b-domik__social"),A=y[0]?y[0].onclick()["size"]:0,m=arguments.callee,r=b('<input type="hidden" name="timestamp"/>'),l=false,z=this.attr("class").match(/\bb-domik_type_(\w+)\b/)[1];if(y.length&&a.params["social-host"]){if(a.params["social-providers"]){D(a.params["social-providers"])}else{b.getJSON(a.params["social-host"]+"/providers2.jsonp?callback=?",function(H){D(H.providers,H.icon_sprites[A])})}var G=new a.block["i-social"];b(".b-domik__social-link").live("click",function(H){j();b(".b-domik__social-popup").each(function(){b(this).bem("b-popupa").hide()});G.start(function(){if(!a.params.retpath||top.location.href==a.params.retpath){top.location.reload()}else{top.location.href=a.params.retpath}},function(){y.removeClass("b-domik__social_loading_yes").css("height","")},{provider:this.onclick()["b-domik"].provider});H.preventDefault()})}function D(J,I){if(!J.length){y.remove();return}y.html(o(J,I));var K=y.find(".b-dropdowna");if(!K.length){return}BEM.DOM.init(K);var L=K.bem("b-dropdowna").getPopup();function H(){L.pos()}L.on("show",function(){b(window).scroll(H)}).on("hide",function(){b(window).unbind("scroll",H)})}function o(K,J){var L=[{block:"b-domik",elem:"social-title",content:a.message("b-domik:enter-with","Войти при помощи")}];K=b.grep(K,function(M){return M.enabled});var I=b.grep(K,function(M){return M.primary});I=b.map(I,function(M){return{block:"b-domik",tag:"a",elem:"social-link",content:{tag:"i",elem:"social-icon",attrs:{style:'background-image:url("'+J+'");background-position: 0px -'+(M.id-1)*32+"px;"}},js:{provider:M.code},attrs:{tabIndex:103}}});[].push.apply(L,I);function H(P){var O=b.map(P,function(R){return{block:"b-domik",tag:"a",elem:"social-link",mods:{},attrs:{tabIndex:103},js:{provider:R.code},content:[{tag:"i",elem:"social-icon",attrs:{style:'background-image:url("'+J+'");background-position: 0px -'+(R.id-1)*32+"px;"}},R.display_name]}});O.length%2&&(O[O.length]="");var N=[],Q;for(var M=0;M<O.length;M++){M%2||N.push(Q={tag:"tr",content:[]});Q.content.push({tag:"td",elem:"provider",content:O[M]})}return N}if(I.length<K.length){L.push({tag:"div",block:"b-dropdowna",js:true,content:[{elem:"switcher",tag:"span",content:{tag:"a",block:"b-pseudo-link",mods:{isBEM:"yes"},js:true,attrs:{href:a.message("b-domik:passport-link","http://passport.yandex.ru/"),tabIndex:103}}},{block:"b-popupa",js:true,tag:"div",mix:[{block:"b-dropdowna",elem:"popup"},{block:"b-domik",elem:"social-popup",mods:{type:z}}],content:[{elem:"tail",tag:"i"},{elem:"content",content:[{elem:"providers",tag:"table",content:H(K)}]}]}]})}L.push({block:"b-spin",mods:{theme:z=="bigform"?"blue-50":"blue-16"}});return BEM.HTML.build(L)}function j(){y.css("height",y.height()).addClass("b-domik__social_loading_yes")}m.isHTTPSSupported=false;d.append(r).submit(function(){r.val(+new Date);a.block["b-domik"].isHTTPSSupported&&d.attr("action",d.attr("action").replace(/^http\:/,"https:"))});var u=d.find("input[name=login]"),v=d.find("input[type=submit]");u.change(function(){var H=u.val();H.indexOf("@")==-1&&/[а-яçğıöşü]/i.test(H)?i(C&&C.err_msg||a.message("b-domik:wrong-keyboard-layout","смените раскладку")):s()});u.change();var h;function i(H){!h&&(h=b('<div class="b-domik__error"/>').insertAfter(d.find(".b-domik__password")));h.text(H).show()}function s(){h&&h.hide()}function F(){var H=a.params["lego-static-host"];if(H){if(H.indexOf("https:")==0){return H}if(H.indexOf("http:")==0){return"https"+H.substr(4)}if(H.indexOf("//")==0){return"https:"+H}else{return"https://"+location.host+H}}else{return"https://"+location.host}}m.enableHTTPS=function(){m.isHTTPSSupported=true;w.addClass("b-domik__lock_visibility_visible")};function c(){if(l){return}l=true;b.ajax({url:F()+"/blocks/b-domik/check-https.js",cache:true,dataType:"script"})}c();m.checkForHTTPS=c;var B=m.getLockBaloonContent||function(){var I=/\(\(([^\)]+)\)\)/g;function H(L,K){return L.replace(I,'<a class="b-link" href="'+K+'">$1</a>')}var J=a.message("b-domik.lock-balloon:content","Логин и пароль будут передаваться в&#160;((безопасном режиме))");return H(J,a.message("b-domik.lock-balloon:linkHref","http://help.yandex.ru/mail/?id=1113446"))},e=b(BEM.HTML.build({block:"b-popupa",mods:{direction:"right",theme:"feffd6"},mix:[{block:"b-domik",elem:"lock-balloon"}],content:[{elem:"tail",tag:"i"},{elem:"content",content:B()}]}));d.append(e);var n=e.bem("b-popupa"),g=300,t;function f(){t=setTimeout(function(){n.hide()},g)}var E;function x(){t&&clearTimeout(t);t=null;n.show(w);if(!E){E=true;e.hover(x,f)}}w.hover(x,f)}})(jQuery,window.Lego);(function(b,a){a.block["b-hint-input"]=function(){var i=b(this),e=b("#"+i.attr("for")),g=function(){i.hide()},d=function(){i.show()},c=function(){h||e.val()?g():d()},h=false;e.bind("focus blur",function(j){h=j.type=="focus";c()}).bind("change mouseover",c);i.click(function(){e.focus()});e.change();var f=e.val();(function(){if(e.val()!=f){b(e).trigger("change");f=e.val()}setTimeout(arguments.callee,200)})()}})(jQuery,window.Lego);(function(b,a){a.block["b-domik_type_popup"]=function(h){var e=b(this),d;b(".b-head-userinfo__entry .b-pseudo-link").click(function(i){i.preventDefault();setTimeout(function(){c()},0)});function c(j){if(!d){g()}if(j){a.params.retpath=j}var i="&from="+a.params["passport-msg"]+"&retpath="+encodeURIComponent(a.params.retpath);e.attr("action",a.params["passport-host"]+"/passport?mode=auth"+i);d.find(".b-domik__register .b-domik__link").attr("href",a.params["passport-host"]+"/passport?mode="+(h.regMode||"register")+i);b(document).bind("keyup.b-domik",function(l){if(l.keyCode==27){f()}}).bind("click.b-domik",function(n){var m=b(n.target),l=m.parents().andSelf();if(m.is("input[type=button]")||l.index(d)==-1&&!l.is(".b-popupa")){f()}});!d.hasClass("b-domik_position_popup-50-50")&&window.scrollTo(0,0);d.show().find("input[name=login]").focus();b(document).trigger("show.b-domik_type_popup")}function f(){b(document).unbind(".b-domik");d.hide()}function g(){d=b('<form class="'+e.attr("class").replace("g-hidden","")+'" method="POST"><i class="b-domik__roof"></i><table class="b-domik__shadow"><tr><td class="b-domik__shadow__lt">&nbsp;</td><td class="b-domik__shadow__t"></td><td class="b-domik__shadow__rt">&nbsp;</td></tr><tr><td class="b-domik__shadow__l">&nbsp;</td><td class="b-domik__shadow__m"><div class="b-domik__form"><div class="b-domik__title">'+(h.title||a.message("b-domik:title","Вход"))+'</div><div class="b-domik__username"><label for="b-domik_popup-username" class="b-hint-input g-js" onclick="return {name:\'b-hint-input\'}">'+a.message("b-domik:login","логин")+'</label><div class="b-input"><input class="b-input__text" id="b-domik_popup-username" name="login" value="'+e.find("input[name=login]").val()+'" tabindex="11"/></div></div><div class="b-domik__password"><label for="b-domik_popup-password" class="b-hint-input g-js" onclick="return {name:\'b-hint-input\'}">'+a.message("b-domik:password","пароль")+'</label><div class="b-domik__lock"></div><div class="b-input"><input class="b-input__text" id="b-domik_popup-password" name="passwd" value="'+e.find("input[name=passwd]").val()+'" type="password" tabindex="11"/></div></div><div class="b-domik__permanent"><input class="b-domik__check" id="b-domik_popup-permanent" name="twoweeks" type="checkbox" value="yes" tabindex="11"/><label for="b-domik_popup-permanent" class="b-domik__permanent-label">'+a.message("b-domik:permanent","запомнить меня")+'</label> <span class="b-domik__help">(<a class="b-domik__link" href="'+a.message("b-domik:help-link","http://help.yandex.ru/passport/?id=922493")+'" tabindex="12">'+a.message("b-domik:help","что&nbsp;это")+'</a>)</span></div><div class="b-domik__button"><input class="b-domik__submit" type="submit" value="'+a.message("b-domik:logon","Войти")+'" tabindex="11"/><input class="b-domik__submit" type="button" value="'+a.message("b-domik:cancel","Отмена")+'" tabindex="11"/></div><div class="b-domik__social" onclick="return { size: 16 }"></div><div class="b-domik__register"><a class="b-domik__link" href="" tabindex="11">'+(h.register||a.message("b-domik:register","Зарегистрироваться"))+'</a></div><div class="b-domik__remember"><a class="b-domik__remind" href="'+a.params["passport-host"]+'/passport?mode=restore" tabindex="11">'+a.message("b-domik:remember","Напомнить пароль")+'</a></div></div></td><td class="b-domik__shadow__r">&nbsp;</td></tr><tr><td class="b-domik__shadow__lb">&nbsp;</td><td class="b-domik__shadow__b"></td><td class="b-domik__shadow__rb">&nbsp;</td></tr></table><iframe class="b-popup-under" frameborder="0"></iframe></form>').submit(function(i){i.preventDefault();e.find("input[name=login]").val(d.find("input[name=login]").change().val()).end().find("input[name=passwd]").val(d.find("input[name=passwd]").change().val()).end().find("input[name=twoweeks]").attr("checked",d.find("input[name=twoweeks]").attr("checked")||false).end().append('<input type="hidden" name="timestamp" value="'+ +new Date+'"/>').attr("action",a.block["b-domik"].isHTTPSSupported?e.attr("action").replace(/^http:/,"https:"):e.attr("action")).submit()});if(a.block["b-domik"]){a.block["b-domik"].call(d)}b("body").append(d);a.blockInit(d)}arguments.callee.login=function(){var i=arguments;setTimeout(function(){c.apply(this,i)},0)}}})(jQuery,window.Lego);BEM.DOM.decl("b-menu",{onElemSetMod:{trigger:{state:function(b,c,a){this.toggleMod(this.findElem(b.closest(this.buildSelector("layout-cell")),"item-content").eq(0),"visibility","visible",a=="opened").trigger("trigger",{domElem:b,state:a})}},item:{state:{current:function(b){var a=this.elem("item","state","current"),c=this;this.findElem(b.parents(this.buildSelector("layout-cell")),"trigger").each(function(){c.setMod($(this),"state","opened")});this.delMod(a,"state").trigger("current",{prev:a,current:b})}}}},onTriggerClick:function(a){a.preventDefault();this.toggleMod(a.data.domElem,"state","opened")},onItemSelectorClick:function(b){var a=this._getItemByEvent(b);this.hasMod(a,"state","disabled")||this.setMod(a,"state","current")},_getItemByEvent:function(a){return a.data.domElem.closest(this.buildSelector("item"))}},{live:function(){this.liveBindTo("trigger","leftclick",function(a){this.onTriggerClick(a)}).liveBindTo("item-selector","leftclick",function(a){this.onItemSelectorClick(a)})}});
/*!jeanny-ignore*/
(function(b,a){a.block["b-keyboard-loader"]=function(g){var i=b(document.body),e=b(window),j=this,m;j.click(function(v){v.preventDefault();var u=b(this),t=(this.className.match(/b-keyboard-loader_lang_(\w+)/)||["",""])[1];switch(t){case"uk":t="ua";break;case"kk":t="kz";break;case"be":t="by";break}var x=u.hasClass("b-keyboard-loader_dropdowna_yes");if(!i.find(".b-keyboard")[0]){var w=a.params["lego-static-host"]+(a.params["lego-static-host"]=="/"?"":"/")+"blocks/",s=(x?[w+"b-keyboard/_keyboard.js"]:[w+"b-keyboard-popup/_b-keyboard-popup.js",w+"b-keyboard/_b-keyboard.js",w+"b-dropdown/_b-dropdown.js"]),r=b.browser.msie&&((!document.documentMode)||(document.documentMode<9))?".ie":"",o=[w+"b-keyboard/_keyboard"+r+".css"];u.append('<i class="b-keyboard-loader__progress"/>');b.xLazyLoader({name:"b-keyboard",js:s,css:o,success:function(){a.block["b-keyboard-popup"]({lang:t,isDropdowna:x});i.append('<div class="b-keyboard'+(x?" b-keyboard-loader_dropdowna_yes":"")+" g-js\" onclick=\"return {name: 'b-keyboard', lang: '"+t+"'};\"></div>");a.blockInit(i,".b-keyboard");u.find(".b-keyboard-loader__progress").remove();e.trigger("keyboardOpened.lego",{afterLoad:true})}})}else{h()}});function h(o){var s=o?"addClass":"toggleClass",r=i.find(".b-keyboard-popup");if(r.length){i.find(".b-keyboard-popup__gap")[s]("g-hidden");if(i.find(".b-keyboard-popup")[s]("g-hidden").hasClass("g-hidden")){e.trigger("keyboardClosed");b(document).trigger("popupsClose.lego")}else{e.trigger("keyboardOpened.lego")}r.data("isHidden",false)}}e.bind("keyboardOpen.lego",function(){j.click()}).bind("keyboardClose.lego",h);g["for"]&&e.bind("keyboardOpened.lego",function(r,o){!(o&&o.afterLoad&&g.autoLoad)&&b(g["for"]).focus()});e.bind("keyboardLangChanged.lego keyboardSetLang.lego",function(r,s){var o=j.find(".b-keyboard-loader__flag");if(o[0]){if(s==="tt"){s="ru"}o.attr("src",o.attr("src").replace(/[a-z]+\.png$/,s+".png"))}});g.storeState=g.storeState!==false;if(g.storeState){e.bind("keyboardOpened.lego",function(){l("keyboard_state","open");var o=c("keyboard_lang");if(o){b(window).trigger("keyboardSetLang.lego",o)}}).bind("keyboardClosed.lego",function(){l("keyboard_state","close")}).bind("keyboardLangChanged.lego",function(o,r){l("keyboard_lang",r)})}(g.autoLoad=g.autoLoad||(g.storeState&&c("keyboard_state")=="open"))&&j.click();var n;function f(){if(n){return}a.cp(0,70873,a.params.id+"."+(g.autoLoad?"auto":"manual"));n=true}e.bind("keyboardOpened.lego",function(){f()});function c(o){return d()[o]}function d(){var o={};b.each(window.name.split("&"),function(){if(this.toString()){var r=this.split("=");o[r[0]]=r[1]}});return o}function l(o,s){var r=d(),t=[];r[o]=s;b.each(r,function(u,v){t.push(u+"="+v)});window.name=t.join("&")}}})(jQuery,window.Lego);(function(b){b.xLazyLoader=function(e,d){if(typeof e=="object"){d=e;e="init"}new c()[e](d)};b.xLazyLoader.defaults={js:[],css:[],img:[],name:null,timeout:20000,success:function(){},error:function(){},complete:function(){},each:function(){}};var a=document.getElementsByTagName("head")[0];function c(){var n=this,r,i=[],l=[],j,d,f,e=[];this.init=function(s){if(!s){return}r=b.extend({},b.xLazyLoader.defaults,s);f={js:r.js,css:r.css,img:r.img};b.each(f,function(t,u){if(typeof u=="string"){u=u.split(",")}e=e.concat(u)});if(!e.length){h("error");return}if(r.timeout){j=setTimeout(function(){var t=i.concat(l);b.each(e,function(v,u){b.inArray(u,t)==-1&&l.push(u)});h("error")},r.timeout)}b.each(f,function(t,u){if(b.isArray(u)){b.each(u,function(w,v){m(t,v)})}else{if(typeof u=="string"){m(t,u)}}})};this.js=function(x,y,u){var w=b('script[src*="'+x+'"]');if(w.length){w.attr("pending")?w.bind("scriptload",y):y();return}var v=document.createElement("script");v.setAttribute("type","text/javascript");v.setAttribute("charset","utf-8");v.setAttribute("src",x);v.setAttribute("pending",1);v.onerror=o;b(v).bind("scriptload",function(){b(this).removeAttr("pending");y();setTimeout(function(){b(v).unbind("scriptload")},10)});var t=false;v.onload=v.onreadystatechange=function(){if(!t&&(!this.readyState||/loaded|complete/.test(this.readyState))){t=true;v.onload=v.onreadystatechange=null;b(v).trigger("scriptload")}};a.appendChild(v)};this.css=function(s,v,t){if(b('link[href*="'+s+'"]').length){v();return}var u=document.createElement("link");u.setAttribute("type","text/css");u.setAttribute("rel","stylesheet");u.setAttribute("href",s);if(b.browser.msie){u.onreadystatechange=function(){/loaded|complete/.test(u.readyState)&&v()}}else{if(b.browser.opera){u.onload=v}else{(function(){if(u&&u.sheet){v()}else{d=setTimeout(arguments.callee,20)}})()}}a.appendChild(u)};this.img=function(t,u){var s=new Image();s.onload=u;s.onerror=o;s.src=t};this.disable=function(s){b("#lazy-loaded-"+s,a).attr("disabled","disabled")};this.enable=function(s){b("#lazy-loaded-"+s,a).removeAttr("disabled")};this.destroy=function(s){b("#lazy-loaded-"+s,a).remove()};function m(t,s){n[t](s,function(u){u=="error"?l.push(s):i.push(s)&&r.each(s);g()},"lazy-loaded-"+(r.name?r.name:new Date().getTime()))}function h(s){r.complete(s,i,l);r[s](s=="error"?l:i);clearTimeout(j);clearTimeout(d)}function g(){if(i.length==e.length){h("success")}else{if(i.length+l.length==e.length){h("error")}}}function o(){l.push(this.src);g()}}})(jQuery);
/*!jeanny-ignore*/
function getBoundsMarket(a){var d=a.offsetLeft;var c=a.offsetTop;for(var b=a.offsetParent;b;b=b.offsetParent){d+=b.offsetLeft;c+=b.offsetTop}return{left:d,top:c,width:a.offsetWidth,height:a.offsetHeight}}function switchElement(a){a.style.display=(a.offsetHeight==0)?"":"none"}function setClass(g,e,b){var d=g.className.split(/\s+/);var a=[];var f=false;var h=b||false;for(var c=0;c<d.length;c++){if(d[c]!=e){a.push(d[c])}else{f=true;if(!h){a.push(d[c])}}}if(!h&&!f){a.push(e)}g.className=a.join(" ")}function switchClass(e,d){var c=e.className.split(/\s+/);var a=[];for(var b=0;b<c.length;b++){if(c[b]!=d){a.push(c[b])}}if(c.length==a.length){e.className+=" "+d}else{e.className=a.join(" ")}}function addEventHandler(c,b,a){if(c.addEventListener){c.addEventListener(b,a,false)}if(c.attachEvent){c.attachEvent("on"+b,a)}return false}function removeEventHandler(c,b,a){if(typeof c.removeEventListener!="undefined"){c.removeEventListener(b,a,false)}else{if(typeof c.detachEvent!="undefined"){c.detachEvent("on"+b,a)}}return false}function containsNode(d,c){if(typeof d.contains!="undefined"){return d.contains(c)}else{while(c.parentNode){if(d==c){return true}c=c.parentNode}return false}}function getAncestor(a,b){while(a.parentNode){if(a.parentNode.nodeName.toUpperCase()==b.toUpperCase()){return a.parentNode}a=a.parentNode}return false}if(typeof String.prototype.ltrim=="undefined"){String.prototype.ltrim=function(){return this.replace(/^[\s\xA0]+/,"")}}if(typeof String.prototype.rtrim=="undefined"){String.prototype.rtrim=function(){return this.replace(/[\s\xA0]+$/,"")}}if(typeof String.prototype.trim=="undefined"){String.prototype.trim=function(){return this.ltrim().rtrim()}}function trim(a){return a?a.trim():""}function isClass(a,b){return a&&a.className&&new RegExp("\\b"+b+"\\b").test(a.className)}function addClass(a,b){modifyClass(a,b,function(c,d){if(c.className&&!/^\s*$/.test(c.className)){if(!isClass(c,d)){c.className=c.className+" "+d}}else{c.className=d}})}function delClass(a,b){modifyClass(a,b,function(c,d){c.className=c.className.replace(new RegExp("\\b"+d+"\\b","g"),"").replace(/^\s|\s$/,"")})}function modifyClass(c,d,b){if(c.length){for(var a=0;a<c.length;a++){b(c[a],d)}}else{b(c,d)}}function getElementsByClassName(g,b,f){var e;if(b=="*"){e=g.all?g.all:g.getElementsByTagName("*")}else{e=g.getElementsByTagName(b)}var c=[];for(var d=0,a=e.length;d<a;d++){if(isClass(e[d],f)){c[c.length]=e[d]}}return c}function switchDetails(d){var a=d.getElementsByTagName("TABLE")[0];var b=(a.offsetHeight==0);a.style.display=b?"":"none"}function gradesDetails(f){var e=f.parentNode.parentNode.getElementsByTagName("div");var a=e.length;for(var d=0;d<a;d++){var c=e[d];if(c.className.indexOf("grades-details-off")+1){var b=c.className.indexOf("grades-details-on")+1;c.className=(b)?c.className.replace(" grades-details-on",""):c.className+" grades-details-on"}}}function showAnswer(a){a.parents(".b-grade__footer:eq(0)").find(".b-grade__answer").toggleClass("b-grade__answer_off");a.parents(".b-grade__toolbar:eq(0)").find(".b-grade__answer-short__text").toggleClass("b-grade__answer_off");return false}(function(d,h,n){var j;var a="~";var u=h.mvcBlocksStorage={};var f=function(z){var y;for(y in z){this[y]=z[y]}return this};var e=n.getElementsByTagName("head").item(0);var m=function(y){var z=n.createElement("link");z.setAttribute("type","text/css");z.setAttribute("rel","stylesheet");z.setAttribute("href",y);e.insertBefore(z,e.firstChild)};var o=function(B,A){var A=A||g.obj("mvc-config").prop("module-timeout-ms");var C=h.setTimeout(function(){y.reject()},A);var y=d.Deferred();var z=n.createElement("script");z.setAttribute("type","text/javascript");z.setAttribute("charset","utf-8");z.onload=z.onreadystatechange=function(){if(!z.readyState||/loaded|complete/.test(z.readyState)){z.onload=z.onreadystatechange=null;if(e&&z.parentNode){e.removeChild(z)}z=undefined;h.clearTimeout(C);y.resolve()}};z.setAttribute("src",B);e.insertBefore(z,e.firstChild);return y.promise()};var w=function(A){var z=("get" in A)?A.get:null;var D=("load" in A)?A.load:null;A.timer=null;var y=d.Deferred();y.done(function(){});y.fail(function(){g.log("module "+this.type+":"+this.id+" load failed m-s="+A.prop("status"));A.prop("status","error")});var C=function(){return y.resolveWith(A)};var B=function(){return y.rejectWith(A)};d(A).bind("mvc:propUpdated:status",function(){if(A.prop("status")=="ready"){return C()}else{if(A.prop("status")=="error"){return B()}}});A.cast=function(){var E=d.Deferred(),G;if(arguments.length){var I=arguments[0];var F=arguments[1]||[];var H=(typeof I=="function")?(function(){return I.apply(A)}):(function(){return A[I](F)});G=function(){A.load().done(function(){return E.resolveWith(A,[H()])}).fail(function(){return E.rejectWith(A)})}}else{G=function(){return E.rejectWith(A)}}h.setTimeout(G,1);return E.promise()};A.load=function(){if(A.timer===null){A.init=null;delete A.init;A.timer=h.setTimeout(function(){if(A.timer!==null&&A.timer!==true){B()}},g.obj("mvc-config").prop(A.type+"-timeout-ms"));D.call(A)}return y.promise()};A.get=function(){var E=1 in arguments[0]?arguments[0][1]:null;if(E&&A.timer!==null&&A.timer!==true){h.clearTimeout(A.timer);A.timer=true;f.call(A,E);var F=("init" in A?A.init():true);if(F===true){C()}else{if(F===false){}else{if("done" in F){F.done(C).fail(B)}}}return A}return d.extend((z?z.call(A,E):A),y.promise())};return A};var t=function(z,y){if(!(j.prop._mvcid(this.mvcid,z) in j.prop.s)){this.prop(z,null)}j.prop.s[j.prop._mvcid(this.mvcid,z)].listeners[y.mvcid]=true};var i={type:"prop",value:null,init:function(){this.listeners={};this.ln=this.id.replace(/-/g,"_")+"Listener"},toString:function(){return this.value},get:function(){if(0 in arguments&&1 in arguments[0]&&arguments[0][1]!==this.value){var B=this;var z=B.value;B.value=arguments[0][1];if(2 in arguments[0]){arguments[0][2][this.id]=arguments[0][1];arguments[0][2].length++}d(this.parent()).trigger("mvc:propUpdate",[B.id]);d(this.parent()).trigger("mvc:propUpdated:"+B.id,[B,z]);for(var y in B.listeners){var A=y.split(a);if(B.ln in j[A[A.length-2]].s[y]){j[A[A.length-2]].s[y][B.ln].apply(B,[z])}else{j[A[A.length-2]].s[y].cast(function(){if(B.ln in this){this[B.ln].apply(B,[z])}else{throw B.ln+"undefined in module"}})}}}return this.value}};var x={listen:t,type:"module",init:function(){w(this)},load:function(){var y=(g.map("mvc-modules").obj(this.id).prop("jsmd5"))?g.obj("mvc-config").prop("static-path")+"/modules/"+this.id+"."+g.map("mvc-modules").obj(this.id).prop("jsmd5")+".js":"/mvc/modules/"+this.id+".js?_=qqq"+Math.random();if(y){o(y)}},prop:function(y){return s.apply(this,[y,j.prop]).get(arguments)}};var r={listen:t,type:"obj",init:function(){var y=this.parent();d(this).bind("mvc:propUpdate",function(B,A){if(y&&!("loadflag" in y)){var z={};z[A]=this.prop(A);d(y).trigger("mvc:objectUpdated",[this.id,z])}})},prop:function(y){return s.apply(this,[y,j.prop]).get(arguments)},get:function(){if(0 in arguments&&1 in arguments[0]){var z=arguments[0][1][0];var A=arguments[0][1][1];var y=arguments[0][1][2]||{};for(var B in z){this.prop(z[B],A[B-(-1)],y)}}return this},html:function(y){return y?h.$("#"+this.id.replace(/%/g,"\\%").replace(/:/g,"\\:")).find("."+y):h.$("#"+this.id.replace(/%/g,"\\%").replace(/:/g,"\\:"))}};var b={type:"map",listen:t,obj:function(y){return s.apply(this,[y,j.obj]).get(arguments)},init:function(){this.prop("length",0);this.index=[]},prop:function(y){return s.apply(this,[y,j.prop]).get(arguments)},del:function(B){if(j.obj.has(this.mvcid,B)){this.obj(B).unblockAll();var A=j.obj._mvcid(this.mvcid,B);j.obj.s[A]=null;delete j.obj.s[A];var y=[];for(var z=0;z<this.index.length;++z){if(this.index[z]!=A){y[y.length]=this.index[z]}}this.index=y;for(p in j.prop.s){if(p.indexOf(B+a+"prop"+a)!=-1){j.prop.s[p]=null;delete j.prop.s[p]}}this.prop("length",y.length);d(this).trigger("mvc:objectDeleted",[B])}},get:function(){if(1 in arguments[0]){this.loadflag=true;var A=arguments[0][1][0].length+1;var z=arguments[0][1][1];for(var B=0;z.length>B+A;B+=A){var y={length:0};this.obj(z[B],[arguments[0][1][0],(z.slice(B,B+A)),y]);if(y.length>0){y.length=null;delete y.length;d(this).trigger("mvc:objectUpdated",[z[B],y])}}delete this.loadflag}return this},each:function(){var z=[];var A=1;for(var y in this.index){if(!("1" in arguments)||(arguments[1]&&arguments[1].call(j.obj.s[this.index[y]]))){z.push(arguments[0].call(j.obj.s[this.index[y]],A++))}}return z},empty:function(){var y=this.each(function(){return this.id});for(var z in y){this.del(y[z])}d(this).trigger("mvc:map:empty")}};var l={removeEventListener:function(){return true},getblock:function(A){if("templateName" in A){var z=A.templateName;var y=g.view(A.viewID)}else{var z="default";var y=A}return y.getblock(this,z)},block:function(A,B){if("templateName" in A){var z=A.templateName;var y=g.view(A.viewID)}else{var z="default";var y=A}this.unblock(A);return y.blockbind(y.databind(this),z,B)},unblock:function(A){if("templateName" in A){var z=A.templateName;var y=g.view(A.viewID)}else{var z="default";var y=A}return y.blockunbind(y.dataunbind(this),z)},unblockAll:function(){if(this.id in u){for(viewName in u[this.id]){for(templateName in u[this.id][viewName].blocks){this.unblock(g.view(viewName).template(templateName))}}}u[this.id]=null;delete u[this.id]}};var v={type:"view",listen:t,init:function(){w(this);this.sockets={}},i18n:function(C){if(C&&C.length){var z=this;var y=function(){var D=0;for(k in C){D+=j.i18n_ks[C[k]]===true?0:1}z.prop("status",(D===0?"ready":(z.prop("status"))))};var B=function(D){d.ajax({url:"/i18n/"+g.obj("mvc-config").prop("lang")+"/"+g.obj("mvc-config").prop("project")+"."+D+".js",dataType:"script",beforeSend:function(){j.i18n_ks[D]=false},success:function(){j.i18n_ks[D]=true;d(j.i18n_ks).trigger("mvc:i18n:loaded",D)}})};for(k in C){var A=C[k];if(!(A in j.i18n_ks)){d(j.i18n_ks).bind("mvc:i18n:loaded",y);B(A)}else{if(j.i18n_ks[A]!==true){d(j.i18n_ks).bind("mvc:i18n:loaded",y)}else{h.setTimeout(y,1)}}}return false}else{return true}},databind:function(y){if(!(y.id in u)){u[y.id]={}}if(!(this.id in u[y.id])){u[y.id][this.id]={blocks:{},blockbind:function(z){if(!(z in this.blocks)){this.blocks[z]={}}return this.blocks[z]},blockunbind:function(z){if(z in this.blocks){return this.blocks[z].unblock()}return false},data:function(){return y}}}return u[y.id][this.id]},getblock:function(z,y){return((z.id in u)?((this.id in u[z.id])?(("blocks" in u[z.id][this.id])&&(y in u[z.id][this.id].blocks)?u[z.id][this.id].blocks[y]:null):null):null)},dataunbind:function(z){var y=((z.id in u)&&(this.id in u[z.id]))?u[z.id][this.id]:null;return y},blockbind:function(C,A,z){var y=this;var B=C.blockbind(A);B.name=A;B.name_s=(A=="default"?"":"_"+A);B.container=z;B.databind=C;B.dataId=C.data().id;B.viewId=y.id;B.node=null;B.childIterator=false;B.removeEventListener=function(){};B._socket=function(E){var D="s-"+y.id+"__"+E;y.sockets[E]="."+D;return'<div class="'+D+'"/>'};B.socket=function(D){if(D in y.sockets){return d(B.container).find(y.sockets[D])}else{throw"no socket("+D+") in view ("+y.id+")"}};B.propbind={};B.i18n=function(E,D){var F=i18n[g.obj("mvc-config").prop("project")][E];return(D in F)?(F[D])():""};B._tdata=function(F,G){switch(F){case"prop":B.propbind[G]=true;var E=C.data().prop(G);return E!==null?E:"";case"b-prop":return(G in this?this[G]:"");case"getter":return B.getter.apply(B,G.split(","));case"i18n":var D=G.split(",");return this.i18n(D[0],D[1]);default:throw"blockbind.data	undefined method"}return""};B.prop=function(D){B.propbind[D]=true;return C.data().prop(D)};B.getter=function(D){if("block_methods" in y&&D in y.block_methods){var E=[];for(var F=1;F<=arguments.length;F++){if(arguments[F]!==undefined){E.push(B.prop(arguments[F]))}}return y.block_methods[D].apply(B,E)}else{return""}};B.updater=function(E,D){if(D in B.propbind){y.cast("render",B)}};B.unblock=function(){d(C.data()).unbind("mvc:propUpdate",B.updater);d(B.node).remove()};B.render=function(){y.cast("render",B)};B.mvcmapcleaner=function(){try{d("#"+B.childIterator.placeholder).empty();if(B.childIterator){y.childBlocks(B)}}catch(D){}};d(C.data()).bind("mvc:propUpdate",B.updater);d(C.data()).bind("mvc:map:empty",B.mvcmapcleaner);h.setTimeout(B.render,1);return B},blockunbind:function(z,y){if(z){}if(z&&y){if(y in z.blocks){return z.blockunbind(y)}else{z.blocks[y]={_STOP_RENDERING_:false,unblock:function(){this._STOP_RENDERING_=true}}}}return false},render:function(z){var y=this;if("renderTimeout" in z){h.clearTimeout(z.renderTimeout)}z.renderTimeout=h.setTimeout(function(){y._render(z)},10)},_render:function(y){try{if(y.node){var A=d(this.apply(y));y.node.replaceWith(A);y.node=A}else{y.node=d(this.apply(y));if("after" in y&&y.after!==null){d(y.after.node).after(y.node)}else{if(("_STOP_RENDERING_" in y)&&y._STOP_RENDERING_){return}else{y.container.append(y.node)}}}var z="initBlock"+y.name_s;if(z in this){this[z](y,y.databind.data().id)}if(y.childIterator){this.childBlocks(y)}d(y).trigger("mvc:view:render")}catch(B){throw B}},template:function(y){var z={templateName:y,viewID:this.id};return z},apply:function(y){if(y.name in this.storage){return this.storage[y.name].call(this,y,y.name)}else{throw"no template ("+y.name+") in storage"}},childBlocks:function(A){var z=this;var y=A.childIterator.templateName;var C=z.template(y);var E=A.childIterator.placeholder;var D=A.databind.data();var B=("child_filter" in A?A.child_filter:function(){return true});A.child_updater=function(){var G=null;var F=D.each(function(I){G.position=I;return G},function(){var I=B.call(this)===true;G={obj:this,block:this.getblock(C)};if(!I&&G.block){this.unblock(C)}return I});var H=null;for(q in F){var G=F[q];if(G.block===null){G.block=G.obj.block(C,d("#"+E));G.block.i=G.position;G.block.parent=A;G.block.after=H}else{G.block.i=G.position;G.block.render()}H=G.block}};d(D).bind("mvc:objectUpdated",function(G,H,F){h.setTimeout(d.proxy(A,"child_updater"),1)});A.child_updater()},itemIterator:function(z,y,A,B){z.childIterator={templateName:y,parentTemplateName:A,placeholder:B};return""},load:function(){var A=g.obj("mvc-config").prop("static-path")+"/views/"+this.id+"/"+this.id+".";var z=A+g.map("mvc-views").obj(this.id).prop("jsmd5")+".js";var y=A+g.map("mvc-views").obj(this.id).prop("cssmd5")+".css";var B=(g.map("mvc-views").obj(this.id).prop("jsmd5")==null);if(g.map("mvc-views").obj(this.id).prop("cssmd5")){m(y)}else{if(B){m("/mvc/views/"+this.id+"/"+this.id+".css?_="+Math.random())}}if(g.map("mvc-views").obj(this.id).prop("jsmd5")){o(z)}else{if(B){o(g.obj("mvc-config").prop("view-builder-path")+"?template="+this.id+"&_="+Math.random())}}},prop:function(y){return s.apply(this,[y,j.prop]).get(arguments)}};function c(y){this.s={};this.c=y;this.c.parent=function(){var z=this.pid.split(a);try{var A=j[z[z.length-2]].s[this.pid]}catch(B){A=null}return A};this._mvcid=function(A,z){return A+a+this.c.type+a+z}}c.prototype.has=function(z,y){return this._mvcid(z,y) in this.s};c.prototype.add=function(A,y){var z=this._mvcid(A,y);this.s[z]=d.extend({mvcid:z,id:y,pid:A},this.c);if("init" in this.c){this.s[z].init()}};c.prototype.get=function(z,y){return this.s[this._mvcid(z,y)]};function s(y,z){if(!y){throw"mvcStorage: empty ID"}if(!z.has(this.mvcid,y)){z.add(this.mvcid,y);if("index" in this){if(z.c.type+y=="proplength"){this.prop("length",0)}else{this.index[this.index.length]=z._mvcid(this.mvcid,y);this.last=y;this.prop("length",this.prop("length")+1)}}}return z.get(this.mvcid,y)}f.call(r,l);f.call(b,l);j=h._mvc={i18n_ks:{},prop:new c(i),module:new c(x),map:new c(b),obj:new c(r),view:new c(v)};var g=h.mvc={mvcid:"mvc",index:[],obj:function(y){return s.apply(this,[y,j.obj]).get(arguments)},map:function(y){return s.apply(this,[y,j.map]).get(arguments)},module:function(y){return s.apply(this,[y,j.module]).get(arguments)},prop:function(y){return s.apply(this,[y,j.prop]).get(arguments)},view:function(y){return s.apply(this,[y,j.view]).get(arguments)},load:function(z){for(var y in z){if(z[y]){g.module(z[y]).load()}}},getScript:o,log:(("console" in h)&&("log" in h.console)&&("firebug" in h.console)?function(){h.console.log.apply(h,arguments)}:function(y){})};g.obj("mvc-config").prop("static-path","/mvc/static");g.obj("mvc-config").prop("view-builder-path","/mvc/tools/mvc.view.xml");g.obj("mvc-config").prop("module-timeout-ms",5000);g.obj("mvc-config").prop("view-timeout-ms",5000)})($,window,document);function Is(){var a=navigator.userAgent.toLowerCase();this.created=true;this.major=parseInt(navigator.appVersion);this.minor=parseFloat(navigator.appVersion);this.nav=((a.indexOf("mozilla")!=-1)&&((a.indexOf("spoofer")==-1)&&(a.indexOf("compatible")==-1)));this.nav2=(this.nav&&(this.major==2));this.nav3=(this.nav&&(this.major==3));this.nav4=(this.nav&&(this.major==4));this.nav5=(this.nav&&(this.major==5));this.nav6=(this.nav&&(this.major==5));this.gecko=(this.nav&&(this.major>=5));this.ie=(a.indexOf("msie")!=-1);this.ie3=(this.ie&&(this.major==3));this.ie4=(this.ie&&(this.major==4));this.ie5=(this.ie&&(this.major==5));this.opera=(a.indexOf("opera")!=-1);this.nav4up=this.nav&&(this.major>=4);this.ie4up=this.ie&&(this.major>=4)}var is=new Is();var loaded=1;function checkall(c){var a=c.all_check.checked;for(var b=0;b<c.length;b++){if(c.elements[b].type=="checkbox"){c.elements[b].checked=a}}}function checkallanddisble(c){var a=c.num.checked;for(var b=0;b<c.length;b++){if(c.elements[b].type=="checkbox"&&c.elements[b].name!="num"){c.elements[b].checked=a;c.elements[b].disabled=a;c.num.value=a}}}function check_all_vendors(c,e){var a=c.num.checked;for(var b=0;b<e.length;b++){var d=document.getElementById(e[b]);if(d){d.checked=a;d.disabled=a}}}(function(b,a){a.block["b-more"]=function(c){b(this).click(function(){b(this).parents(".b-more").toggleClass("b-more-full")})}})(jQuery,window.Lego);$(".passport-login").live("click",function(a){if(a.button==0&&!(a.ctrlKey||a.shiftKey||a.metaKey)){$(".b-head-userinfo__entry .b-pseudo-link").click();return false}return true});var $E={params:{},addParams:function(a){$.extend(this.params,a)},reachGoal:function(b){try{yaCounter160656.reachGoal(b,this.params)}catch(a){}return true},addTargets:function(a){var b=this;$.each(a,function(c,d){$(d).live("click",function(){return b.reachGoal(c)})})}};
