(function(b,a){if(!a){a=window.Lego={}}a.messages=a.messages||{};a.message=function(d,c){return a.params.locale=="ru"?c:(a.messages[d]||c)}})(jQuery,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(c.hasOwnProperty(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 k=false;if(a){var j=[];e.each(c,function(){i.hasOwnProperty(this)&&(k=true)&&j.push({name:this,val:i[this]})});if(k){e.each(i,function(l){j.push({name:l,val:this})});i=j}}e.each(i,function(m,n){if(k){m=n.name;n=n.val}if(e.isFunction(n)&&(!b||n.toString().indexOf(".__base")>-1)){var l=h[m]||function(){};g[m]=function(){var p=this.__base;this.__base=l;var o=n.apply(this,arguments);this.__base=p;return o}}else{g[m]=n}})}e.inherit=function(){var h=e.isFunction(arguments[0]),n=h?arguments[0]:f,j=arguments[h?1:0]||{},l=arguments[h?2:1],g=j.__constructor||(h&&n.prototype.__constructor)?function(){this.__constructor.apply(this,arguments)}:function(){};if(!h){g.prototype=j;g.prototype.__self=g.prototype.constructor=g;return e.extend(g,l)}e.extend(g,n);var k=function(){},i=k.prototype=n.prototype,m=g.prototype=new k();m.__self=m.constructor=g;d(i,m,j);l&&d(n,g,l);return g};e.inheritSelf=function(j,h,i){var g=j.prototype;d(g,g,h);i&&d(j,j,i);return j}})(jQuery);(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(o,j,p,s,m){if(typeof o=="string"){if(d.isFunction(j)){s=p;p=j;j=undefined}var f=c(p,s),l=this[a]||(this[a]={}),g=o.split(" "),h=0,q;while(o=g[h++]){o=this.buildEventName(o);q=l[o]||(l[o]={ids:{},list:{}});if(!(f in q.ids)){var n=q.list,r={fn:p,data:j,ctx:s||this,special:m};if(n.last){n.last.next=r;r.prev=n.last}else{n.first=r}q.ids[f]=n.last=r}}}else{var k=this;d.each(o,function(t,i){k.on(t,i,j,m)})}return this},onFirst:function(i,h,g,f){return this.on(i,h,g,f,{one:true})},un:function(p,q,t){if(typeof p=="string"||typeof p=="undefined"){var n=this[a];if(n){if(p){var h=p.split(" "),k=0,r;while(p=h[k++]){p=this.buildEventName(p);if(r=n[p]){if(q){var g=c(q,t),f=r.ids;if(g in f){var o=r.list,s=f[g],j=s.prev,l=s.next;if(j){j.next=l}else{if(s===o.first){o.first=l}}if(l){l.prev=j}else{if(s===o.last){o.last=j}}delete f[g]}}else{delete this[a][p]}}}}else{delete this[a]}}}else{var m=this;d.each(p,function(u,i){m.un(u,i,t)})}return this},trigger:function(j,i){typeof j==="string"?j=d.Event(this.buildEventName(j)):j.type=this.buildEventName(j.type);var k=this[a];if(k&&(k=k[j.type])){var h=k.list.first,f,g;while(h){j.data=h.data;f=h.fn.call(h.ctx,j,i);if(typeof f!=="undefined"){j.result=f;if(f===false){j.preventDefault();j.stopPropagation()}}g=h.next;h.special&&h.special.one&&this.un(j.type,h.fn,h.ctx);h=g}}return this}};d.observable=d.inherit(b,b)})(jQuery);(function(f,h){var e=[],c={},g={},a={};function d(k,j,i){return(k?"__elem_"+k:"")+"__mod"+(j?"_"+j:"")+(i?"_"+i:"")}function b(j,i,k){f.isFunction(j)?(i[d(k,"*","*")]=j):f.each(j,function(m,l){f.isFunction(l)?(i[d(k,m,"*")]=l):f.each(l,function(n,o){i[d(k,m,n)]=o})})}this.BEM=f.inherit(f.observable,{__constructor:function(j,i){var k=this;k._modCache={};k._processingMods={};k.params=f.extend(k.getDefaultParams(),j);k._uniqId=k.params.uniqId||f.identify(k);a[k._uniqId]=k;i!==false?k._init():k.afterCurrentEvent(k._init)},_init:function(){this.setMod("js","inited").trigger("init")},changeThis:function(j,i){var k=this;return function(){return j.apply(i||k,arguments)}},afterCurrentEvent:function(j,i){this.__self.afterCurrentEvent(this.changeThis(j,i))},bind:function(k,l,j,i){return this.on(k,l,j,i)},bindOne:function(k,l,j,i){return this.onFirst(k,l,j,i)},unbind:function(j,i){return this.un(j,i)},trigger:function(j,i){this.__base(j=this.buildEvent(j),i).__self.trigger(j,i);return this},buildEvent:function(i){typeof i=="string"&&(i=f.Event(i));i.block=this;return i},hasMod:function(j,k,i){if(arguments.length==2){i=k;k=j;j=h}return this.getMod(j,k)===i},getMod:function(k,l){var i=typeof k;if(i==="string"||i==="undefined"){l=k||l;var j=this._modCache;return l in j?j[l]:j[l]=this._extractModVal(l)}return this._getElemMod(l,k)},_getElemMod:function(k,i,j){return this._extractModVal(k,i,j)},getMods:function(l){var j=l&&typeof l!="string",m=this,i=[].slice.call(arguments,j?1:0),k=m._extractMods(i,j?l:h);if(!j){i.length?f.each(i,function(o,n){m._modCache[n]=k[n]}):m._modCache=k}return k},setMod:function(l,p,q){if(typeof q=="undefined"){q=p;p=l;l=h}var m=this;if(!l||l[0]){var n=(l&&l[0]?f.identify(l[0]):"")+"_"+p;if(this._processingMods[n]){return m}var k,j=l?m._getElemMod(p,l,k=m.__self._extractElemNameFrom(l)):m.getMod(p);if(j===q){return m}this._processingMods[n]=true;var i=true,o=[p,q,j];l&&o.unshift(l);f.each([["*","*"],[p,"*"],[p,q]],function(){i=m._callModFn(k,this[0],this[1],o)!==false&&i});!l&&i&&(m._modCache[p]=q);i&&m._afterSetMod(p,q,l,k);delete this._processingMods[n]}return m},_afterSetMod:function(k,i,j){},toggleMod:function(k,l,j,n,m){if(typeof k=="string"){m=n;n=j;j=l;l=k;k=h}if(typeof n=="undefined"){n=""}else{if(typeof n=="boolean"){m=n;n=""}}var i=this.getMod(k,l);(i==j||i==n)&&this.setMod(k,l,typeof m==="boolean"?(m?j:n):this.hasMod(k,l,j)?n:j);return this},delMod:function(i,j){if(!j){j=i;i=h}return this.setMod(i,j,"")},_callModFn:function(l,k,i,j){var m=d(l,k,i);return this[m]?this[m].apply(this,j):h},_extractModVal:function(j,i){return""},_extractMods:function(i,j){return{}},getDefaultParams:function(){return{}},del:function(j){var i=[].slice.call(arguments);typeof j=="string"&&i.unshift(this);this.__self.del.apply(this.__self,i);return this},destruct:function(){delete a[this._uniqId]}},{blocks:g,_uniqIdToBlock:a,getBlockByUniqId:function(i){return a[i]},decl:function(i,j,l){typeof i=="string"&&(i={name:i});if(j.onSetMod){b(j.onSetMod,j);delete j.onSetMod}if(j.onElemSetMod){f.each(j.onElemSetMod,function(o,n){b(n,j,o)});delete j.onElemSetMod}var k=g[i.baseBlock||i.name]||this;if(i.modName){f.each(j,function(n,o){f.isFunction(o)&&(j[n]=function(){var q;if(this.hasMod(i.modName,i.modVal)){q=o}else{var p=k.prototype[n];p&&p!==j[n]&&(q=this.__base)}return q?q.apply(this,arguments):h})})}var m;i.name==k._name?(m=f.inheritSelf(k,j,l))._processLive(true):(m=g[i.name]=f.inherit(k,j,l))._name=i.name;return m},_processLive:function(i){return false},create:function(i,j){return new g[i](j)},getName:function(){return this._name},_extractElemNameFrom:function(i){},buildEventName:function(j){var i=j+":"+this._name;return i in c?c[i]:c[i]=j.replace(/ |^/g,"$&"+this._name+":")},afterCurrentEvent:function(j,i){e.push({fn:j,ctx:i})==1&&setTimeout(function(){var k,l=e.splice(0,e.length);while(k=l.shift()){k.fn.call(k.ctx||this)}},0)},changeThis:function(j,i){return function(){return j.apply(i||this,arguments)}},del:function(m){var l=typeof m=="string",k=l?0:1,j=arguments.length;l&&(m=this);while(k<j){delete m[arguments[k++]]}return this}})})(jQuery);(function(g,h){var d="_",b="__",f="[a-zA-Z0-9-]+";function a(k,i,j){j.push(d,k,d,i)}function e(k,l,i,j){j.push(k);i&&a(l,i,j)}function c(m,k,l,i,j){e(m,h,h,j);j.push(b,k);i&&a(l,i,j)}g.INTERNAL={NAME_PATTERN:f,MOD_DELIM:d,ELEM_DELIM:b,buildModPostfix:function(l,i,j){var k=j||[];a(l,i,k);return j?k:k.join("")},buildClass:function(o,m,n,i,j){var l=typeof n;if(l=="string"){if(typeof i!="string"){j=i;i=n;n=m;m=h}}else{if(l!="undefined"){j=n;n=h}else{if(m&&typeof m!="string"){j=m;m=h}}}if(!(m||n||j)){return o}var k=j||[];m?c(o,m,n,i,k):e(o,n,i,k);return j?k:k.join("")},buildClasses:function(m,l,k,i){var j=i||[];l?c(m,l,h,h,j):e(m,h,h,j);k&&$.each(k,function(o,n){if(n){j.push(" ");l?c(m,l,o,n,j):e(m,o,n,j)}});return i?j:j.join("")}}})(BEM);(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-head-tabs"]=function(r){var c=b(this),u=b(".b-head-search"),t=u.find(".b-search .b-input input:first"),q=u.find(".b-search__advanced"),l=a.params.id,h=n(document.location.search),g={www:505,search:521,images:526}[l]||527,d=(function(){return{market:{cvredirect:"1",clid:g}}})(),j=(function(){return{news:{rpt:"nnews",grhow:"clutop"},yaca:{rpt:"rs2"},market:{cvredirect:"1",clid:g},blogs:{ft:"blog"}}})(),o=(function(){var v={www:["noreask"]};v.news=v.yaca=v.market=v.blogs=v.maps=v.adresa=v.video=v.fotki=v.slovari=v.auto=v.images=v.music=v.www;return v})(),p=b.grep(b.map(c.find(":not(strong)>a.b-head-tabs__link:not([href$=yandex.ru/all])"),function(x){var w=x.host.split(".")[0],z=n(b(x).attr("search"))["clid"]||"",v=s(e(w,z)),y=b(x);return{node:y,clid:z,toServiceId:w,path:a.block["b-head-tabs"].getHostToUrlMap()[w],host:y[0].host,searchHost:a.block["b-head-tabs"].getHostMap()[w],noSearchParamsUrl:v?"?"+v:"",searchParams:m(w,z)}}),function(v){return typeof v.path!="undefined"}),k;if(q.length){var f=n(q.attr("search")),i=q[0].pathname.replace(/^\/?(.*)/,"$1");f.text="";p.push({node:q,clid:f.clid,toServiceId:l,path:i,host:q[0].host,noSearchParamsUrl:i+"?"+s(f),searchParams:f})}setInterval((function(){var v=encodeURIComponent(b.trim(t.val())||r["default"]);if(k===v){return arguments.callee}k=v;b.each(p,function(){if(!!v){this.searchParams[a.block["b-head-tabs"].getSearchParamName(this.toServiceId)]=v}var w=!!v?(this.path+"?"+s(this.searchParams)):this.noSearchParamsUrl,y=this.node[0],x=(!!v&&this.searchHost)?this.searchHost:this.host;y.href=y.protocol+"//"+x+"/"+w});return arguments.callee})(),200);function e(v,w){var x=d[v]||{};if(!x.clid&&!!w){x.clid=w}return x}function m(v,w){var y=j[v]||{},x=[].concat(o[v]);if((v=="images"&&l=="www")||(v=="www"&&l=="images")){x.push("site")}b.each(x,function(z,A){if(h[A]){y[A]=h[A]}});if(!y.clid&&!!w&&v!="www"){y.clid=w}return y}function s(w){var v=[];b.each(w,function(x){if(b.isArray(w[x])){b.each(w[x],function(y){v.push(x+"="+w[x][y])})}else{v.push(x+"="+w[x])}});return v.join("&")}function n(v){var y={},w,x;b.map(v.substr(1).split("&"),function(z){var A=z.split("=");if(A[0]){x=A[1];w=A[0];if(y[w]){if(b.isArray(y[w])){if(b.inArray(x,y[w])==-1){y[w].push(x)}}else{y[w]=[y[w],x]}}else{y[w]=x}}});return y}};a.block["b-head-tabs"].getHostToUrlMap=function(){var c={www:"yandsearch",market:"search.xml",maps:"",music:"#/search"};c.blogs=c.adresa=c.video=c.fotki=c.slovari=c.auto=c.market;c.news=c.yaca=c.images=c.www;return c};a.block["b-head-tabs"].getHostMap=function(){var c={};return c};a.block["b-head-tabs"].getSearchParamName=function(c){return"text"}})(jQuery,window.Lego);(function(b,a){a.block["b-dropdown"]=function(e){var d=b(this),c,i,g,j,h=false,l=false,k=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(m){if(m.keyCode==27&&!(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)){f()}}).click(function(m){if(!b(m.target).is(".b-dropdown *")){f()}}).bind("popupsClose.lego",f);l=true},f=(function(){if(h){return}i.css("visibility","hidden").before(c).hide();j.hide();h=true});d.find(".b-dropdown__or").click(function(n){n.preventDefault();if(!l){k()}if(d.hasClass("b-dropdown_state_disabled")){d.trigger("popupDisabled.lego");return}if(h){b(document).trigger("popupsClose.lego",{source:d[0]});var o=b.Event("popupOpen.lego");d.trigger(o);if(!o.isDefaultPrevented()){j.css("display","");i.append(c).css("visibility","");if(e.direction=="up"||d.hasClass("b-dropdown_direction_up")){var m=i.height()-j.height();i.css("margin-top",-(m-(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(d,a){var c=!((d.browser.safari||d.browser.webkit)&&navigator.userAgent.toLowerCase().indexOf("mobile")>-1),b=a.block["b-suggest"]=function(F){var z=d(this),K=d('<div class="b-suggest-popup"><i class="b-suggest__opera-gap"></i><div class="b-suggest-list">'+(c?('<iframe class="b-suggest__iframe" frameborder="0" src="javascript:\'<body style=\\\'background:none;overflow:hidden\\\'>\'"></iframe>'):'<div class="b-suggest__iframe"/>')+'<ul class="b-suggest-items"></ul>'+(F.close?'<div class="b-suggest-close"><a class="b-pseudo-link" href="javascript:void(0)">Закрыть</a></div>':"")+'<div class="b-suggest-nah">Включены <a class="b-suggest-nah__link" href="http://nahodki.yandex.ru/about_suggest.xml">мои запросы</a></div></div></div>').hide(),H=K.find(".b-suggest-items"),D=z.closest("form").find('input[name="'+(F["for"]||"text")+'"]'),E=D.closest("form"),q=F.url||(F.host||"")+(F.path||""),r=F.openInNewWindow=typeof F.openInNewWindow=="undefined"?true:F.openInNewWindow,l=!!F.permanent,w=(function(){var L={};L["*"+q]=["",[]];return L})(),o=F.timeout||700,I={suggestType:F.suggestType||((F.id=="serp")?"serp_ru":F.id),usageType:"not_shown",region:"",nah:"nah_not_shown",buttonByMouse:"",position:"p0",session:(new Date().getTime()+Math.round(Math.random()*10000)),queryTimes:[],ratio:{userValue:0,finalValue:0,userActions:0},pos:"",_keydownTriggered:false},k="",v=F.getData?b.getDataFns[F.getData]:(function(){var O=(q.match(/^[^\/]*\/\/[^\/]+\//)||[location.protocol+"//"+location.host])[0]+"jquery"+(d.fn.jquery=="1.4.2"?"-1-4-2":"")+".crossframeajax.html",R=d('<iframe style="display:none" src="'+O+'"></iframe>').appendTo("body")[0],N=document.domain,M=document.domain.match(/([^.]+\.)?[^.]+$/)[0],L=10,S;try{document.domain!=M&&(document.domain=M)}catch(Q){}(function P(){if(L){try{S=R.contentWindow.$.crossframeAjax;if(S){v=S}else{throw true}}catch(T){L--;setTimeout(P,42)}}else{try{document.domain!=N&&(document.domain=N)}catch(T){}}})();return d.ajax})(),t=function(L){var M=L.length&&L[0].onclick?L[0].onclick():{};return M.value||L.text()},x=function(P){var N=0;if(typeof(P.selectionEnd)=="number"){N=P.selectionEnd}else{var O=document.selection.createRange();if(O&&O.parentElement()==P){var M=P.value.length,L=P.createTextRange();L.moveToBookmark(O.getBookmark());var Q=P.createTextRange();Q.collapse(false);N=L.compareEndPoints("EndToEnd",Q)>-1?M:-L.moveEnd("character",-M)}}return N},G=(function(){function M(O){return d.isArray(O)&&b.buildItemHtmlFns[O[0]]?b.buildItemHtmlFns[O[0]](O,{stats:I,params:F}):'<li><span class="b-suggest-elem b-suggest-elem-link"><span class="content">'+O+"</span></span></li>"}function L(P){I.region=P[P.length-1]["r"];var O=P[1];if(!(j=O?O.length:0)){return s()}if(I.usageType!="edit"){I.usageType="not_used"}var Q=P[2]||[];H.html(d.map(O,function(S,R){return M(!!Q[R]?["href",S,Q[R]]:S)}).join("")).find(".b-suggest-elem").filter(":not(.b-suggest__elem_selectable_no)").bind("mouseenter mouseleave",function(R){d(this)[R.type=="mouseenter"?"addClass":"removeClass"]("b-suggest-elem_state_hover")});B=O.length-H.find(".b-suggest__elem_selectable_no").length;P[P.length-1].n?K.find(".b-suggest-close").hide().end().find(".b-suggest-nah").show():K.find(".b-suggest-close").show().end().find(".b-suggest-nah").hide();K.show();if(C===false&&I._keydownTriggered===true){I.usageType="edit";I._keydownTriggered=false}C=false}var N=0;return function(R){if(h){return}A(0,R);var Q=w[R+"*"+q];if(Q){L(Q)}else{var U=setTimeout(s,o);N+=1;var P=new Date();var T=document.getElementsByName("lr"),O;try{O=window.location.toString().match(/lr=(.*?)(&|$)/)}catch(S){O=""}if(T.length>0){k=T[0].value}else{if(O&&O.length>0){k=O[1]}else{k=""}}v({url:q,data:d.extend({part:D.val(),lr:k},a.params.yandexuid?{yu:a.params.yandexuid}:null),dataType:"json",type:"GET",timeout:o,success:(function(W,V){return function(X){if(!X){return}w[R+"*"+V]=X;clearTimeout(U);if(W==N){L(X)}I.queryTimes.push(new Date()-P)}})(N,q)})}}})(),u=function(L){m();window.setTimeout(function(){d('<form style="display:none" action="'+L+'" method="get"'+(r?' target="_blank"':"")+"/>").appendTo(d("body")).submit().remove()},500)},h=false,C=true,f=false,s=(function(){if(C){return}K.hide();A(0,D.val());C=true}),j=0,B=0,A=(function(){var L=0,M=D.val();return function(P,S){if(S!=undefined){M=S}L=P?L+P:0;if(L<0){L=B}if(L>B){L=0}if(L>0){I.position="p"+L}var R=H.find(".b-suggest-elem").filter(":not(.b-suggest__elem_selectable_no)").removeClass("b-suggest-elem_selected").eq(L?L-1:1000).addClass("b-suggest-elem_selected"),T=t(R),Q=R.is(".b-suggest-elem_nav")?e:(T||M),O=R.attr("href"),N=T&&O?O:"";D.val()!=Q&&D.val(Q);D.data("href",N)}})();var n=D.data("lego:focused");if(n){D.blur()}D.attr("autocomplete","off");if(n){D.focus()}if(F.text){D.val(F.text)}z.append(K);var p=false;K.find(".b-suggest-close").mousedown(function(){p=true}).mouseup(function(){p=false}).click(function(){A(0);s();h=true;D.focus()});K.find(".b-suggest-nah__link").mousedown(function(){window.location=this.href});d(document).bind("popupsClose.lego",s).keydown(function(L){if(L.metaKey||L.ctrlKey||L.altKey||L.shiftKey){f=true}}).keyup(function(L){f=false}).mouseup(function(){p=false});E.find(":submit").click(function(){I.buttonByMouse="button_by_mouse"});H.mousedown(function(O){p=true;var N=d(O.target);if(N.is("li *")){i=N.closest(".b-suggest-elem");if(i.hasClass("b-suggest-elem_nav")){m()}else{if(!i.hasClass("b-suggest__elem_selectable_no")){A(0,t(i));D.data("href",i.attr("href"));var M=N.parents("ul"),L=O.target.className;if(L&&L.split(" ").length>0){M.find("."+L.split(" ")[0]).each(function(P){if(this==O.target){I.position="p"+(P+1);N.hasClass("b-suggest-elem_nah")&&(I.nah="nah_used")}})}I.usageType="mouse";if(!l){h=true}if(i.get(0).tagName.toLowerCase()!="a"){setTimeout(function(){E.submit()},0)}else{y()}}}}return false}).click(function(){if(l){s()}else{d.browser.msie?s():D.focus()}});var e="",i,g=false;E.submit(function(M){if(F.preventSubmit){s();h=true;y();setTimeout(function(){h=false},100);return false}if(g){return g=false}var L=D.data("href")||I.followAfterSubmit;if(l){D.blur()}if(!I.submitted){M.preventDefault();if(L){I.followAfterSubmit=L}I.ratio.userValue=e.length;I.ratio.finalValue=D.val().length;y();window.setTimeout(function(){E.submit()},500)}else{if(L&&!l){M.preventDefault();location.href=L}else{if(L&&l){M.preventDefault();u(L)}}}});function J(){A(0);s();p=false}D.blur(function(L){if(L.originalEvent&&!L.originalEvent.preventDefault){setTimeout(function(){if(!p&&D[0]!=document.activeElement){s()}},84)}else{if(!p){s()}}}).click(function(){if(!C&&!D.val()){e="";s()}I.pos=x(D[0])}).keydown(function(L){switch(L.keyCode){case 38:case 40:L.preventDefault();I._keydownTriggered=true;if(C){h=false;G(D.val())}else{I.usageType="keyboard";A(L.keyCode-39)}break;case 13:break;case 27:p=true;break}setTimeout(function(){e!=D.val()&&I.ratio.userActions++},1)}).keypress(function(M){switch(M.keyCode){case 13:p=true;var L=H.find(".b-suggest-elem_selected");if(L.hasClass("b-suggest-elem_nav")){g=true;u(L.attr("href"));l&&s()}else{L.hasClass("b-suggest-elem_nah")&&(I.nah="nah_used");l||(h=true);E.submit();s()}return false;case 27:return false}}).keyup(function(L){I.pos=x(D[0]);switch(L.keyCode){case 38:case 40:break;case 27:J();break;default:if(e!=D.val()){e=D.val();clearInterval(M);var M=setTimeout(function(){G(D.val())},1)}break}});setTimeout(function(){D.focus(function(L){if(d(L.target).data("b-suggest")!==false){p=false;G(D.val())}})},42);if(l){setInterval(function(){w={"":[]}},30*60*1000)}z.bind("updateParams.lego",function(M,N){if(!N){return}var L=(q.match(/^[^\/]*\/\/[^\/]+\//)||[""])[0]+(N.path||"");if(L){q=L}if("closed" in N){h=N.closed}});function y(){a.params["show-counters"]&&a.cp(0,2873,[[I.suggestType,I.usageType,I.position,I.nah,I.buttonByMouse].join("."),"session="+I.session,"region="+I.region,"times="+I.queryTimes.join("."),"pos="+I.pos,"ratio="+I.ratio.userValue+"."+I.ratio.finalValue+"."+I.ratio.userActions].join("/"));l||(I.submitted=true)}function m(){a.params["show-counters"]&&a.cp(0,70833,I.suggestType+"/session="+I.session)}};b.getDataFns={};b.buildItemHtmlFns={href:function(f,e){if(f[3]&&f[3].nah&&f[3].nah==1){e.stats.nah=="nah_not_shown"&&(e.stats.nah="nah_not_used");return'<li><span class="b-suggest-elem b-suggest-elem_nah">'+f[1]+"</span></li>"}return'<li><a class="b-suggest-elem b-suggest-elem-link" href="'+f[2]+'"><span class="content">'+f[1]+"</span></a></li>"},nav:function(f,e){return'<li><a class="b-suggest-elem b-suggest-elem-link b-suggest-elem_nav"'+(e.params.openInNewWindow?' target="_blank"':"")+' href="http://'+f[2]+'"><span class="content"><span class="link">'+f[2]+'</span><span class="info">&nbsp;&mdash; '+f[1]+"</span></span></a></li>"},html:function(f,e){return'<li><span class="b-suggest-elem b-suggest-elem-link">'+f[1]+"</span></li>"}}})(jQuery,window.Lego);
