'),e_tail_g=$('
'),e_tail_y=$(''),e_val=$(''),e_del=$('');e.attr('data-keyword',s),e_tail_g.click(function(){$.ajax({url:'http://suggestqueries.google.com/complete/search',data:{q:s,client:'firefox'},jsonp:'jsonp',dataType:'jsonp',success:function(data){kws_textarea.val(data[1].join('\n'))}})}),e_tail_y.click(function(){$.ajax({url:'http://suggest.yandex.ru/suggest-ya.cgi',data:{v:3,part:s},jsonp:'callback',dataType:'jsonp',success:function(data){kws_textarea.val(data[1].join('\n'))}})}),e_val.text(s),e_val.click(function(){e.toggleClass('keyword stopword'),count_reset()}),e_del.click(function(){e.remove(),count_reset()}),e.append(e_tail_g).append(e_tail_y).append(e_val).append(e_del),es_div.append(e)}}),kws_textarea.val('').focus(),count_reset()),es_dup.click(),es_sort.click()}),sws_toggle.click(function(){$(this).hasClass('button-disabled')||($(this).hasClass('toggle-hide')?($(this).removeClass('toggle-hide'),es_div.removeClass('stopword-hide')):($(this).addClass('toggle-hide'),es_div.addClass('stopword-hide')))}),sws_reset.click(function(){if(!$(this).hasClass('button-disabled')){var sws=es_div.children('.stopword');sws.length>0&&(sws.each(function(){var sw=$(this),s=sw.attr('data-keyword');sw.removeClass('stopword').addClass('keyword'),sw.children('.element-val').html(s)}),count_reset())}}),sws_del.click(function(){if(!$(this).hasClass('button-disabled')){var sws=es_div.children('.stopword');sws.length<=0||(sws.remove(),es_div.removeClass('stopword-hide'),count_reset())}}),sws_get.click(function(){if(!$(this).hasClass('button-disabled')){var es=es_div.children('.element');if(es.length>0){var ws_a=es.map(function(){return $(this).attr('data-keyword')}).get().join(' ').split(/\s+/),ws_o={};ws_a.length>0&&($.each(ws_a,function(k,v){(/^\d+$/.test(v)||v.length>3)&&(ws_o[v]=(v in ws_o)?ws_o[v]+1:1)}),ws_a=[],$.each(ws_o,function(k,v){v>3&&ws_a.push(k)})),sws_textarea.val(ws_a.length>0?ws_a.sort().join('\n'):'').focus()}}}),sws_export.click(function(){if(!$(this).hasClass('button-disabled')){var sws=es_div.children('.stopword');if(sws.length>0){var s=sws.map(function(i,e){return $(e).attr('data-keyword')}).get().sort().join('\n');sws_textarea.val(s).focus()}}}),sws_filter.click(function(){if(!$(this).hasClass('button-disabled')){var es=es_div.children('.element');if(es.length>0){var sws_a=sws_textarea.val().split("\n").filter(function(s){return s.trim()!=''});sws_a.length>0&&(es.each(function(){var e=$(this),kw_t=e.attr('data-keyword'),kw_s=!1;for(i=0;i