(function(b,a){a.block["b-head-pulse"]=function(){var c=b("tr[class^=r]",this);var d=function(){c.removeClass("last").filter(":not(.hidden)").slice(-1).addClass("last").end().eq(0).find(".minus").attr("disabled",false).end().filter(".last").find(".minus").attr("disabled",true);c.find("input[name^=query], input[name^=alias]").attr("disabled",false).end().filter(".hidden").find("input[name^=query], input[name^=alias]").val("").attr("disabled",true)};b("input.minus",this).click(function(){var e=b(this.parentNode.parentNode);var f=e.add(e.nextAll("tr[class^=r]:not(.hidden)"));f.each(function(g){if(g<f.length-1){b("input[name^=query]",this).val(b("input[name^=query]",f[g+1]).val());b("input[name^=alias]",this).val(b("input[name^=alias]",f[g+1]).val())}else{b(this).prev().andSelf().addClass("hidden")}});d()});b("input.plus",this).click(function(){b(this.parentNode.parentNode).removeClass("last").next().removeClass("hidden").next().addClass("last").removeClass("hidden");d()})}})(jQuery,window.Lego);(function(b,a){a.block.pulse=function(e){var d=b(this);var c="9.0.28";swfobject.embedSWF(e.flash,"flash-graph",e.width,e.height,c,"http://img.yandex.net/i/expressinstall.swf");if(e.trends){b.getJSON(e.trends,function(f){if(f.html_error){return}b("div.b-trends-stat").html(f.html_trends);if(!swfobject.hasFlashPlayerVersion(c)){d.append(f.html_baloons)}})}}})(jQuery,window.Lego);