jQuery.wordStats={unsortedWords:null,sortedWords:null,topWords:null,topWeights:null,_computed:false,addWords:function(a,b){if(a&&a.length>1){var w=this.splitWords(a.toLowerCase());for(var x=0,y=w.length;x<y;x++){word=w[x];if(word.length>1&&!this.stopWords[word]){word="_"+word;if(this.unsortedWords[word]){this.unsortedWords[word]+=b}else{this.unsortedWords[word]=b}}}}},addWordsFromTextNodes:function(a,b){var c=a.childNodes;for(var i=0,j=c.length;i<j;i++){if(c[i].nodeType==3){this.addWords(c[i].nodeValue,b)}}},testChar:function(c){return((c>=97&&c<=122)||(c>=128&&c<=151)||(c>=160&&c<=164)||(c>=48&&c<=57)||(c>=224&&c<=246)||(c>=249&&c<=255))},splitWords:function(a){var w=new Array(),str="";for(var i=0,j=a.length;i<j;i++){c=a.charCodeAt(i);if(this.testChar(c)){str+=a.substring(i,i+1)}else{w.push(str);str=""}}if(str.length>0){w.push(str)}return(w)},computeWords:function(a){if(!a){a=window.document}this.unsortedWords=new Array();this.addWords($("title",a).text(),20);wordstats=this;$("h1",a).each(function(){wordstats.addWordsFromTextNodes($(this).get(0),15)});$("h2",a).each(function(){wordstats.addWordsFromTextNodes($(this).get(0),10)});$("h3, h4, h5, h6",a).each(function(){wordstats.addWordsFromTextNodes($(this).get(0),5)});$("strong, b, em, i",a).each(function(){wordstats.addWordsFromTextNodes($(this).get(0),3)});$("p, div, th, td, li, a, span",a).each(function(){wordstats.addWordsFromTextNodes($(this).get(0),2)});$("img",a).each(function(){wordstats.addWords($(this).attr("alt"),1);wordstats.addWords($(this).attr("title"),1)});this._computed=true},computeTopWords:function(a,b){if(!this._computed){this.computeWords(b)}this.topWords=new Array();this.topWeights=new Array();this.topWeights.push(0);for(word in this.unsortedWords){for(var i=0;i<a;i++){if(this.unsortedWords[word]>this.topWeights[i]){this.topWeights.splice(i,0,this.unsortedWords[word]);this.topWords.splice(i,0,word);break}}}},sortWords:function(){this.sortedWords=new Array();i=0;for(word in this.unsortedWords){this.sortedWords[i]=word;i++}this.sortedWords.sort(function(a,b){return wordstats.unsortedWords[b]-wordstats.unsortedWords[a]})},clear:function(){this.unsortedWords=this.sortedWords=this.topWords=this.topWeights=null;this._computed=false}};jQuery.wordStats.stopWords={"CNET":true,"2009":true,"get":true,"why":true,"internet":true,"new":true,"google":true,"how":true,"news":true,"about":true,"after":true,"ago":true,"all":true,"also":true,"an":true,"and":true,"any":true,"are":true,"as":true,"at":true,"be":true,"been":true,"before":true,"both":true,"but":true,"by":true,"can":true,"did":true,"do":true,"does":true,"www":true,"up":true,"done":true,"pneumonoultramicroscopicsilicovolcanoconiosis":true,"edit":true,"even":true,"every":true,"for":true,"from":true,"had":true,"has":true,"have":true,"he":true,"here":true,"him":true,"his":true,"however":true,"if":true,"in":true,"into":true,"is":true,"it":true,"its":true,"less":true,"many":true,"may":true,"more":true,"most":true,"much":true,"my":true,"no":true,"not":true,"often":true,"quote":true,"of":true,"on":true,"one":true,"only":true,"or":true,"other":true,"our":true,"out":true,"com":true,"re":true,"says":true,"she":true,"so":true,"some":true,"soon":true,"such":true,"than":true,"that":true,"the":true,"their":true,"them":true,"then":true,"there":true,"these":true,"they":true,"this":true,"those":true,"though":true,"through":true,"to":true,"under":true,"use":true,"using":true,"ve":true,"was":true,"we":true,"were":true,"what":true,"where":true,"when":true,"whether":true,"which":true,"while":true,"who":true,"whom":true,"with":true,"within":true,"you":true,"your":true};