var feedList=null;if(!"console" in window){window.console={log:function(){}}}TWTR=window.TWTR||{};if(!Array.forEach){Array.prototype.forEach=function(c,b){var d=b||window;for(var e=0,a=this.length;e<a;++e){c.call(d,this[e],e,this)}};Array.prototype.filter=function(c,b){var d=b||window;var a=[];for(var e=0,f=this.length;e<f;++e){if(!c.call(d,this[e],e,this)){continue}a.push(this[e])}return a};Array.prototype.indexOf=function(c,b){var b=b||0;for(var a=0;a<this.length;++a){if(this[a]===c){return a}}return -1}}(function(){if(TWTR&&TWTR.Widget){return}function a(d,b,c){this.el=d;this.prop=b;this.from=c.from;this.to=c.to;this.time=c.time;this.callback=c.callback;this.animDiff=this.to-this.from}a.canTransition=function(){var b=document.createElement("twitter");b.style.cssText="-webkit-transition: all .5s linear;";return !!b.style.webkitTransitionProperty}();a.prototype._setStyle=function(b){switch(this.prop){case"opacity":this.el.style[this.prop]=b;this.el.style.filter="alpha(opacity="+b*100+")";break;default:this.el.style[this.prop]=b+"px";break}};a.prototype._animate=function(){var b=this;this.now=new Date();this.diff=this.now-this.startTime;if(this.diff>this.time){this._setStyle(this.to);if(this.callback){this.callback.call(this)}clearInterval(this.timer);return}this.percentage=(Math.floor((this.diff/this.time)*100)/100);this.val=(this.animDiff*this.percentage)+this.from;this._setStyle(this.val)};a.prototype.start=function(){var b=this;this.startTime=new Date();this.timer=setInterval(function(){b._animate.call(b)},15)};TWTR.Widget=function(b){this.init(b)};(function(){var o={};var ab={};var c=function(C){var B=ab[C];if(!B){B=new RegExp("(?:^|\\s+)"+C+"(?:\\s+|$)");ab[C]=B}return B};var z=function(F,B,E,D){var B=B||"*";var E=E||document;var I=[],J=E.getElementsByTagName(B),C=c(F);for(var H=0,G=J.length;H<G;++H){if(C.test(J[H].className)){I[I.length]=J[H];if(D){D.call(J[H],J[H])}}}return I};var b=function(){var B=navigator.userAgent;return{ie:B.match(/MSIE\s([^;]*)/)}}();var v=function(B){if(typeof B=="string"){return document.getElementById(B)}return B};var j=function(B){return B.replace(/^\s+|\s+$/g,"")};var k=function(){var B=self.innerHeight;var C=document.compatMode;if((C||b.ie)){B=(C=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight}return B};var d=function(C,B){var D=C.target||C.srcElement;return B(D)};var m=function(C){try{if(C&&3==C.nodeType){return C.parentNode}else{return C}}catch(B){}};var l=function(C){var B=C.relatedTarget;if(!B){if(C.type=="mouseout"){B=C.toElement}else{if(C.type=="mouseover"){B=C.fromElement}}}return m(B)};var h=function(C,B){B.parentNode.insertBefore(C,B.nextSibling)};var f=function(C){try{C.parentNode.removeChild(C)}catch(B){}};var i=function(B){return B.firstChild};var A=function(C){var D=l(C);while(D&&D!=this){try{D=D.parentNode}catch(B){D=this}}if(D!=this){return true}return false};var w=function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(F,C){var D=null;var E=document.defaultView.getComputedStyle(F,"");if(E){D=E[C]}var B=F.style[C]||D;return B}}else{if(document.documentElement.currentStyle&&b.ie){return function(B,C){var D=B.currentStyle?B.currentStyle[C]:null;return(B.style[C]||D)}}}}();var e={has:function(B,C){return new RegExp("(^|\\s)"+C+"(\\s|$)").test(v(B).className)},add:function(B,C){if(!this.has(B,C)){v(B).className=j(v(B).className)+" "+C}},remove:function(B,C){if(this.has(B,C)){v(B).className=v(B).className.replace(new RegExp("(^|\\s)"+C+"(\\s|$)","g"),"")}}};var y={add:function(C,D,B){if(C.addEventListener){C.addEventListener(D,B,false)}else{C.attachEvent("on"+D,function(){B.call(C,window.event)})}},remove:function(C,D,B){if(C.removeEventListener){C.removeEventListener(D,B,false)}else{C.detachEvent("on"+D,B)}}};var u={bool:function(B){return typeof B==="boolean"},def:function(B){return !(typeof B==="undefined")},number:function(B){return typeof B==="number"&&isFinite(B)},string:function(B){return typeof B==="string"},fn:function(B){return typeof B==="function"},array:function(B){if(B){return u.number(B.length)&&u.fn(B.splice)}return false}};var q=["January","February","March","April","May","June","July","August","September","October","November","December"];var aa=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var n=function(F){var C=new Date(F);if(b.ie){C=Date.parse(F.replace(/( \+)/," UTC$1"))}var H="";var B=function(){var I=C.getHours();if(I>0&&I<13){H="am";return I}else{if(I<1){H="am";return 12}else{H="pm";return I-12}}}();var G=C.getMinutes();var D=C.getSeconds();function E(){var I=new Date();if(I.getDate()!=C.getDate()||I.getYear()!=C.getYear()||I.getMonth()!=C.getMonth()){return" - "+q[C.getMonth()]+" "+C.getDate()+", "+C.getFullYear()}else{return""}}return B+":"+G+H+E()};var g=function(C){try{var D=new Date(C);if(b.ie){D=new Date(Date.parse(C.replace(/( \+)/," UTC$1")))}var I="";var B=function(){var J=D.getHours();if(J>0&&J<13){I="am";return J}else{if(J<1){I="am";return 12}else{I="pm";return J-12}}}();var H=(D.getMinutes()>=10?""+D.getMinutes():"0"+D.getMinutes());var E=D.getSeconds();function G(){return aa[D.getDay()]+" "+q[D.getMonth()]+" "+D.getDate()+", "+D.getFullYear()}}catch(F){alert(F.description)}return G()+" at "+B+":"+H+I};var s=function(D){var B=new Date();var F=new Date(D);if(b.ie){F=Date.parse(D.replace(/( \+)/," UTC$1"))}var C=B-F;var I=1000,H=I*60,G=H*60,E=G*24,J=E*7;if(isNaN(C)||C<0){return""}if(C<I*7){return"right now"}if(C<H){return Math.floor(C/I)+" seconds ago"}if(C<H*2){return"about 1 minute ago"}if(C<G){return Math.floor(C/H)+" minutes ago"}if(C<G*2){return"about 1 hour ago"}if(C<E){return Math.floor(C/G)+" hours ago"}if(C>E&&C<E*2){return"yesterday"}if(C<E*365){return Math.floor(C/E)+" days ago"}else{return"over a year ago"}};var x={link:function(B){return B.replace(/\b(((https*\:\/\/)|www\.).+?)(([!?,.\)]+)?(\s|$))/g,function(C,D,F,G,H){var E=F.match(/w/)?"http://":"";return'<a class="twtr-hyperlink" target="_blank" href="'+E+D+'">'+((D.length>25)?D.substr(0,24)+"...":D)+"</a>"+H})},at:function(B){return B.replace(/\B\@([a-zA-Z0-9_]{1,20})/g,function(D,C){return'@<a target="_blank" class="twtr-atreply" href="http://twitter.com/'+C+'">'+C+"</a>"})},list:function(B){return B.replace(/\B\@([a-zA-Z0-9_]{1,20}\/\w+)/g,function(D,C){return'@<a target="_blank" class="twtr-atreply" href="http://twitter.com/'+C+'">'+C+"</a>"})},hash:function(B){return B.replace(/\B\#(\w+)/gi,function(D,C){return'<a target="_blank" class="twtr-hashtag" href="http://twitter.com/search?q=%23'+C+'">#'+C+"</a>"})},clean:function(B){return this.hash(this.at(this.list(this.link(B))))}};function p(D,C,B){this.job=D;this.decayFn=C;this.interval=B;this.decayRate=1;this.decayMultiplier=1.25;this.maxDecayTime=3*60*1000}p.prototype={start:function(){this.stop().run();return this},stop:function(){if(this.worker){window.clearTimeout(this.worker)}return this},run:function(){var B=this;this.job(function(){B.decayRate=B.decayFn()?Math.max(1,B.decayRate/B.decayMultiplier):B.decayRate*B.decayMultiplier;var C=B.interval*B.decayRate;C=(C>=B.maxDecayTime)?B.maxDecayTime:C;C=Math.floor(C);B.worker=window.setTimeout(function(){B.run.call(B)},C)})},destroy:function(){this.stop();this.decayRate=1;return this}};function t(E,D,B,C){this.time=D||6000;this.loop=B||false;this.repeated=0;this.total=E.length;this.callback=C;this.haystack=E}t.prototype={start:function(B){var C=this;if(B){this.repeated=0}this.stop()._job();this.timer=window.setInterval(function(){C._job.call(C)},this.time);return this},stop:function(){if(this.timer){window.clearInterval(this.timer)}return this},_job:function(){if(this.repeated===this.total){if(this.loop){this.repeated=0}else{this.stop();return}}this.callback(this.haystack[this.repeated]);this.repeated++;return this}};function r(D){var B='<div class="twtr-tweet-wrap">         <div class="twtr-avatar">           <div class="twtr-img"><a target="_blank" href="http://twitter.com/'+D.user+'"><img alt="'+D.user+' profile" src="'+D.avatar+'"></a></div>         </div>         <div class="twtr-tweet-text">           <b>            <a target="_blank" style="color:#000000;" class="twtr-timestamp" time="'+D.timestamp+'" href="http://twitter.com/'+D.user+"/status/"+D.id+'">'+D.created_at+'</a>                          </b><p>             <a target="_blank" href="http://twitter.com/'+D.user+'" class="twtr-user">'+D.user+"</a> "+D.tweet+'         <a target="_blank" class="twtr-reply" href="http://twitter.com/?status=@'+D.user+"%20&in_reply_to_status_id="+D.id+"&in_reply_to="+D.user+'">reply</a>               </p>         </div>       </div>';var C=document.createElement("div");C.id="tweet-id-"+ ++r._tweetCount;C.className="twtr-tweet";C.innerHTML=B;this.element=C}r._tweetCount=0;o.loadStyleSheet=function(D,E){if(!TWTR.Widget.loadingStyleSheet){TWTR.Widget.loadingStyleSheet=true;var B=document.createElement("link");B.href=D;B.rel="stylesheet";B.type="text/css";document.getElementsByTagName("head")[0].appendChild(B);var C=setInterval(function(){var F=w(E,"position");if(F=="relative"){clearInterval(C);TWTR.Widget.hasLoadedStyleSheet=true}},50)}};(function(){var B=false;o.css=function(D){var E=document.createElement("style");E.type="text/css";if(b.ie){E.styleSheet.cssText=D}else{var C=document.createDocumentFragment();C.appendChild(document.createTextNode(D));E.appendChild(C)}function F(){document.getElementsByTagName("head")[0].appendChild(E)}if(!b.ie||B){F()}else{window.attachEvent("onload",function(){B=true;F()})}}})();TWTR.Widget.isLoaded=false;TWTR.Widget.loadingStyleSheet=false;TWTR.Widget.hasLoadedStyleSheet=false;TWTR.Widget.WIDGET_NUMBER=0;TWTR.Widget.matches={mentions:/^@[a-zA-Z0-9_]{1,20}\b/,any_mentions:/\b@[a-zA-Z0-9_]{1,20}\b/};TWTR.Widget.jsonP=function(D,C){var B=document.createElement("script");B.type="text/javascript";B.src=D;document.getElementsByTagName("head")[0].appendChild(B);C(B);return B};TWTR.Widget.prototype=function(){var D="http://search.twitter.com/search.";var C="http://twitter.com/statuses/user_timeline.";var F="http://twitter.com/favorites/";var E="http://twitter.com/";var G=20000;var B="http://widgets.twimg.com/j/1/default.gif";return{init:function(H){var I=this;this._widgetNumber=++TWTR.Widget.WIDGET_NUMBER;TWTR.Widget["receiveCallback_"+this._widgetNumber]=function(K){if(K!=null&&K.length>0){if(feedList==null){feedList=K}else{var O=0;var L=new Array();for(O=0;O<K.length;O++){var J=K[O].id;var N=false;var M=0;for(M=0;M<feedList.length;M++){if(feedList[M].id==J){N=true;break}}if(!N){L.push(K[O]);feedList.push(K[O])}}K=L}}I._prePlay.call(I,K)};this._cb="TWTR.Widget.receiveCallback_"+this._widgetNumber;this.opts=H;this._base=D;this._isRunning=false;this._hasOfficiallyStarted=false;this._rendered=false;this._profileImage=false;this._isCreator=!!H.creator;this._setWidgetType(H.type);this.timesRequested=0;this.runOnce=false;this.newResults=false;this.results=[];this.jsonMaxRequestTimeOut=19000;this.showedResults=[];this.sinceId=1;this.source="TWITTERINC_WIDGET";this.id=H.id||"twtr-widget-"+this._widgetNumber;this.tweets=0;this.setDimensions(H.width,H.height);this.interval=H.interval||6000;this.format="json";this.rpp=H.rpp||50;this.subject=H.subject||"";this.title=H.title||"";this.setFooterText(H.footer);this.setSearch(H.search);this._setUrl();this.theme=H.theme?H.theme:this._getDefaultTheme();if(!H.id){document.write('<div class="twtr-widget" id="'+this.id+'"></div>')}this.widgetEl=v(this.id);if(H.id){e.add(this.widgetEl,"twtr-widget")}if(H.version>=2&&!TWTR.Widget.hasLoadedStyleSheet){o.loadStyleSheet("/common/twitterWidget.css",this.widgetEl)}this.occasionalJob=new p(function(J){I.decay=J;I._getResults.call(I)},function(){return I._decayDecider.call(I)},G);this._ready=u.fn(H.ready)?H.ready:function(){};this._isRelativeTime=true;this._tweetFilter=false;this._avatars=true;this._isFullScreen=false;this._isLive=true;this._isScroll=false;this._loop=true;this._behavior="default";this.setFeatures(this.opts.features);return this},setDimensions:function(I,H){this.wh=(I&&H)?[I,H]:[250,300];if(I=="auto"||I=="100%"){this.wh[0]="100%"}else{this.wh[0]=((this.wh[0]<150)?150:this.wh[0])+"px"}this.wh[1]=((this.wh[1]<100)?100:this.wh[1])+"px";return this},setRpp:function(H){var H=parseInt(H);this.rpp=(u.number(H)&&(H>0&&H<=100))?H:30;return this},_setWidgetType:function(H){this._isSearchWidget=false,this._isProfileWidget=false,this._isFavsWidget=false,this._isListWidget=false;switch(H){case"profile":this._isProfileWidget=true;break;case"search":this._isSearchWidget=true,this.search=this.opts.search;break;case"faves":case"favs":this._isFavsWidget=true;break;case"list":case"lists":this._isListWidget=true;break}return this},setFeatures:function(K){if(K){if(u.def(K.filters)){this._tweetFilter=K.filters}if(u.def(K.dateformat)){this._isRelativeTime=!!(K.dateformat!=="absolute")}if(u.def(K.fullscreen)&&u.bool(K.fullscreen)){if(K.fullscreen){this._isFullScreen=true;this.wh[0]="100%";this.wh[1]=(k()-90)+"px";var J=this;y.add(window,"resize",function(L){J.wh[1]=k();J._fullScreenResize()})}}if(u.def(K.loop)&&u.bool(K.loop)){this._loop=K.loop}if(u.def(K.behavior)&&u.string(K.behavior)){switch(K.behavior){case"all":this._behavior="all";break;default:this._behavior="default";break}}if(u.def(K.avatars)&&u.bool(K.avatars)){if(!K.avatars){o.css("#"+this.id+" .twtr-avatar, #"+this.id+" .twtr-user { display: none; } #"+this.id+" .twtr-tweet-text { margin-left: 0; }");this._avatars=false}else{var I=(this._isFullScreen)?"90px":"40px";o.css("#"+this.id+" .twtr-avatar { display: block; } #"+this.id+" .twtr-user { display: inline; } #"+this.id+" .twtr-tweet-text { margin-left: "+I+"; }");this._avatars=true}}else{if(this._isProfileWidget){this.setFeatures({avatars:false});this._avatars=false}else{this.setFeatures({avatars:true});this._avatars=true}}if(u.def(K.hashtags)&&u.bool(K.hashtags)){(!K.hashtags)?o.css("#"+this.id+" a.twtr-hashtag { display: none; }"):""}if(u.def(K.timestamp)&&u.bool(K.timestamp)){var H=K.timestamp?"block":"none";o.css("#"+this.id+" i { display: "+H+"; }")}if(u.def(K.live)&&u.bool(K.live)){this._isLive=K.live}if(u.def(K.scrollbar)&&u.bool(K.scrollbar)){this._isScroll=K.scrollbar}}else{if(this._isProfileWidget){this.setFeatures({avatars:false});this._avatars=false}if(this._isProfileWidget||this._isFavsWidget){this.setFeatures({behavior:"all"})}}return this},_fullScreenResize:function(){var H=z("twtr-timeline","div",document.body,function(I){I.style.height=(k()-90)+"px"})},setTweetInterval:function(H){this.interval=H;return this},setBase:function(H){this._base=H;return this},setUser:function(H,I){this.username=H;this.realname=I||" ";if(this._isFavsWidget){this.setBase(F+H+".")}else{if(this._isProfileWidget){this.setBase(C+this.format+"?screen_name="+H)}}this.setSearch(" ");return this},setList:function(H,I){this.listslug=I.replace(/ /g,"-").toLowerCase();this.username=H;this.setBase(E+H+"/lists/"+this.listslug+"/statuses.");this.setSearch(" ");return this},setProfileImage:function(H){H="/images/Twitter3232.gif";this._profileImage=H;this.byClass("twtr-profile-img","img").src=H;this.byClass("twtr-profile-img-anchor","a").href="http://twitter.com/"+this.username;return this},setTitle:function(H){this.title=H;this.widgetEl.getElementsByTagName("h3")[0].innerHTML=this.title;return this},setCaption:function(H){H="NV TWEETS";this.subject=H;this.widgetEl.getElementsByTagName("h4")[0].innerHTML=this.subject;return this},setFooterText:function(H){this.footerText=(u.def(H)&&u.string(H))?H:"Join the conversation";if(this._rendered){this.byClass("twtr-join-conv","a").innerHTML=this.footerText}return this},setSearch:function(H){this.searchString=H||"";this.s=this.searchString.replace(" ","+");this.search=escape("-RT "+this.s);this._setUrl();if(this._rendered){var I=this.byClass("twtr-join-conv","a");I.href="http://twitter.com/"+this._getWidgetPath()}return this},_getWidgetPath:function(){if(this._isProfileWidget){return this.username}else{if(this._isFavsWidget){return this.username+"/favorites"}else{if(this._isListWidget){return this.username+"/lists/"+this.listslug}else{return"#search?q="+this.search}}}},_setUrl:function(){var I=this;function H(){return(I.sinceId==1)?"":"&since_id="+I.sinceId+"&refresh=true"}if(this._isProfileWidget){this.url=this._base+"&callback="+this._cb+"&count="+this.rpp+H()+"&clientsource="+this.source}else{if(this._isFavsWidget||this._isListWidget){this.url=this._base+this.format+"?callback="+this._cb+H()+"&clientsource="+this.source}else{this.url=this._base+this.format+"?q="+this.search+"&callback="+this._cb+"&rpp="+this.rpp+H()+"&clientsource="+this.source}}return this},setTheme:function(H,M){var J=this;var L=" !important";var I=((window.location.hostname.match(/twitter\.com/))&&(window.location.pathname.match(/goodies/)));if(M||I){L=""}this.theme={shell:{background:function(){return H.shell.background||J._getDefaultTheme().shell.background}(),color:function(){return H.shell.color||J._getDefaultTheme().shell.color}()},tweets:{background:function(){return H.tweets.background||J._getDefaultTheme().tweets.background}(),color:function(){return H.tweets.color||J._getDefaultTheme().tweets.color}(),links:function(){return H.tweets.links||J._getDefaultTheme().tweets.links}()}};var K="#"+this.id+" .twtr-doc,                      #"+this.id+" .twtr-hd a,                      #"+this.id+" h3,                      #"+this.id+" h4 {            /*background: "+this.theme.shell.background+L+";*/            color: "+this.theme.shell.color+L+";          }          #"+this.id+" .twtr-tweet a {            color: "+this.theme.tweets.links+L+";          }          #"+this.id+" .twtr-bd, #"+this.id+" .twtr-timeline i a,           #"+this.id+" .twtr-bd p {            color: "+this.theme.tweets.color+L+";          }          #"+this.id+" .twtr-new-results,           #"+this.id+" .twtr-results-inner,           #"+this.id+" .twtr-timeline {            background: "+this.theme.tweets.background+L+";          }";if(b.ie){K+="#"+this.id+" .twtr-tweet { background: "+this.theme.tweets.background+L+"; }"}o.css(K);return this},byClass:function(H,K,J){var I=z(H,K,v(this.id));return(J)?I:I[0]},render:function(){var I=this;if(!TWTR.Widget.hasLoadedStyleSheet){window.setTimeout(function(){I.render.call(I)},50);return this}this.setTheme(this.theme,this._isCreator);if(this._isProfileWidget){e.add(this.widgetEl,"twtr-widget-profile")}if(this._isScroll){e.add(this.widgetEl,"twtr-scroll")}if(!this._isLive&&!this._isScroll){this.wh[1]="auto"}if(this._isSearchWidget&&this._isFullScreen){document.title="Twitter search: "+escape(this.searchString)}this.widgetEl.innerHTML=this._getWidgetHtml();this.spinner=this.byClass("twtr-spinner","div");var J=this.byClass("twtr-timeline","div");if(this._isLive&&!this._isFullScreen){var H=function(L){if(A.call(this,L)){I.pause.call(I)}};var K=function(L){if(A.call(this,L)){I.resume.call(I)}};this.removeEvents=function(){y.remove(J,"mouseover",H);y.remove(J,"mouseout",K)};y.add(J,"mouseover",H);y.add(J,"mouseout",K)}this._rendered=true;this._ready();return this},removeEvents:function(){},_getDefaultTheme:function(){return{shell:{background:"#8ec1da",color:"#ffffff"},tweets:{background:"#ffffff",color:"#444444",links:"#1985b5"}}},_getWidgetHtml:function(){var I=this;function H(){if(I._isProfileWidget){return'<table border=0 width="100%"><tr><td width="18"><a target="_blank" href="http://twitter.com/" class="twtr-profile-img-anchor"><img alt="profile" class="twtr-profile-img" src="'+B+'"></a></td> <td style="background-color: #9fad9e; padding-left: 6px"><h3></h3><h4></h4></td></tr></table>'}else{return"<h3>"+I.title+"</h3><h4>"+I.subject+"</h4>"}}function J(){if(!I._isFullScreen){return' height="15"'}return""}function K(){return I._isFullScreen?" twtr-fullscreen":""}var L='<div class="twtr-doc'+K()+'" style="width: '+this.wh[0]+';">            <div class="twtr-hd" style="padding: 5px;">'+H()+'               <div class="twtr-spinner twtr-inactive"></div>            </div>            <div class="twtr-bd">              <div class="twtr-timeline" style="height: '+this.wh[1]+';">                <div class="twtr-tweets">                  <div class="twtr-reference-tweet"></div>                  <!-- tweets show here -->                </div>              </div>            </div>            <div class="twtr-ft" style="display:none;">              <div><a target="_blank" href="http://twitter.com"><img alt="" src="http://widgets.twimg.com/j/1/twitter_logo_s.'+(b.ie?"gif":"png")+'"'+J()+'></a>                <span><a target="_blank" class="twtr-join-conv" style="color:'+this.theme.shell.color+'" href="http://twitter.com/'+this._getWidgetPath()+'">'+this.footerText+"</a></span>              </div>            </div>          </div>";return L},_appendTweet:function(H){h(H,this.byClass("twtr-reference-tweet","div"));return this},_slide:function(I){var H=this;var J=i(I).offsetHeight;if(this.runOnce){new a(I,"height",{from:0,to:J,time:500,callback:function(){H._fade.call(H,I)}}).start()}return this},_fade:function(I){var H=this;if(a.canTransition){I.style.webkitTransition="opacity 0.5s ease-out";I.style.opacity=1;return this}new a(I,"opacity",{from:0,to:1,time:500}).start();return this},_chop:function(){if(this._isScroll){return this}var N=this.byClass("twtr-tweet","div",true);var M=this.byClass("twtr-new-results","div",true);if(N.length){for(var J=N.length-1;J>=0;J--){var H=N[J];var I=parseInt(H.offsetTop);if(I>parseInt(this.wh[1])){f(H)}else{break}}if(M.length>0){var L=M[M.length-1];var K=parseInt(L.offsetTop);if(K>parseInt(this.wh[1])){f(L)}}}return this},_appendSlideFade:function(H){var I=H||this.tweet.element;this._chop()._appendTweet(I)._slide(I);return this},_createTweet:function(H){H.timestamp=H.created_at;H.created_at=this._isRelativeTime?s(H.created_at):g(H.created_at);this.tweet=new r(H);if(this._isLive&&this.runOnce){this.tweet.element.style.opacity=0;this.tweet.element.style.filter="alpha(opacity:0)";this.tweet.element.style.height="0"}return this},_getResults:function(){var H=this;this.timesRequested++;this.jsonRequestRunning=true;this.jsonRequestTimer=window.setTimeout(function(){if(H.jsonRequestRunning){clearTimeout(H.jsonRequestTimer);e.add(H.spinner,"twtr-inactive")}H.jsonRequestRunning=false;f(H.scriptElement);H.newResults=false;H.decay()},this.jsonMaxRequestTimeOut);e.remove(this.spinner,"twtr-inactive");TWTR.Widget.jsonP(H.url,function(I){H.scriptElement=I})},clear:function(){var H=this.byClass("twtr-tweet","div",true);var I=this.byClass("twtr-new-results","div",true);H=H.concat(I);H.forEach(function(J){f(J)});return this},_sortByLatest:function(H){this.results=H;this.results=this.results.slice(0,this.rpp);this.results.reverse();return this},_sortByMagic:function(I){var I=I;var H=this;if(this._tweetFilter){if(this._tweetFilter.negatives){I=I.filter(function(J){if(!H._tweetFilter.negatives.test(J.text)){return J}})}if(this._tweetFilter.positives){I=I.filter(function(J){if(H._tweetFilter.positives.test(J.text)){return J}})}}switch(this._behavior){case"all":this._sortByLatest(I);break;default:this._sortByDefault(I);break}return this},_sortByDefault:function(I){var H=this;var J=function(){if(b.ie){return function(K){return Date.parse(K.replace(/( \+)/," UTC$1"))}}else{return function(K){return new Date(K)}}}();this.results.unshift.apply(this.results,I);this.results.forEach(function(K){if(!K.views){K.views=0}});this.results.sort(function(K,L){if(J(K.created_at)<J(L.created_at)){return 1}else{if(J(K.created_at)>J(L.created_at)){return -1}else{return 0}}});this.results=this.results.slice(0,this.rpp);if(!this._isLive){this.results.reverse()}this.results.sort(function(K,L){if(K.views>L.views){return 1}else{if(K.views<L.views){return -1}}return 0})},_prePlay:function(H){if(this.jsonRequestTimer){clearTimeout(this.jsonRequestTimer)}if(!b.ie){f(this.scriptElement)}if(H.error){this.newResults=false}else{if(H.results&&H.results.length>0){this.response=H;if(this.intervalJob){this.intervalJob.stop()}this.newResults=true;this.sinceId=H.max_id;this._sortByMagic(H.results);if(this.isRunning()){this._play()}}else{if((this._isProfileWidget||this._isFavsWidget||this._isListWidget)&&u.array(H)&&H.length>0){if(this.intervalJob){this.intervalJob.stop()}this.newResults=true;if(!this._profileImage&&this._isProfileWidget){var I=H[0].user.screen_name;this.setProfileImage(H[0].user.profile_image_url);this.setTitle(H[0].user.name);this.setCaption('<a target="_blank" href="http://twitter.com/'+I+'">'+I+"</a>")}this.sinceId=H[0].id;this._sortByMagic(H);if(this.isRunning()){this._play()}}else{this.newResults=false}}}this._setUrl();if(this._isLive){this.decay()}e.add(this.spinner,"twtr-inactive")},_play:function(){var H=this;if(this._avatars){this._preloadImages(this.results)}if(this._isRelativeTime&&this._behavior=="all"){this.byClass("twtr-timestamp","a",true).forEach(function(I){I.innerHTML=s(I.getAttribute("time"))})}if(!this._isLive||this._behavior=="all"){this.results.forEach(function(I){if(H._isProfileWidget){I.from_user=H.username;I.profile_image_url=I.user.profile_image_url}if(H._isFavsWidget||H._isListWidget){I.from_user=I.user.screen_name;I.profile_image_url=I.user.profile_image_url}H._createTweet({id:I.id,user:I.from_user,tweet:x.clean(I.text),avatar:I.profile_image_url,created_at:I.created_at});var J=H.tweet.element;(H._behavior=="all")?H._appendSlideFade(J):H._appendTweet(J)});return this}this._insertNewResultsNumber();this.intervalJob=new t(this.results,this.interval,this._loop,function(I){I.views++;if(H._isProfileWidget){I.from_user=H.username;I.profile_image_url=I.user.profile_image_url}if(H._isFavsWidget||H._isListWidget){I.from_user=I.user.screen_name;I.profile_image_url=I.user.profile_image_url}if(H._isFullScreen){I.profile_image_url=I.profile_image_url.replace(/_normal\./,"_bigger.")}H._createTweet({id:I.id,user:I.from_user,tweet:x.clean(I.text),avatar:I.profile_image_url,created_at:I.created_at})._appendSlideFade()}).start(true);return this},_insertNewResultsNumber:function(){if(this.runOnce&&this._isSearchWidget){var H=this.response.total>this.rpp?this.response.total:this.response.results.length;var K=H>1?"s":"";var I=(this.response.warning&&this.response.warning.match(/adjusted since_id/))?"more than":"";var J=document.createElement("div");e.add(J,"twtr-new-results");J.innerHTML='<div class="twtr-results-inner"> &nbsp; </div><div class="twtr-results-hr"> &nbsp; </div><span>'+I+" <strong>"+H+"</strong> new tweet"+K+"</span>";h(J,this.byClass("twtr-reference-tweet","div"))}},_preloadImages:function(H){if(this._isProfileWidget||this._isFavsWidget||this._isListWidget){H.forEach(function(I){var J=new Image();J.src=I.user.profile_image_url})}else{H.forEach(function(I){(new Image()).src=I.profile_image_url})}},_decayDecider:function(){var H=false;if(!this.runOnce){this.runOnce=true;H=true}else{if(this.newResults){H=true}}return H},start:function(){var H=this;if(!this._rendered){setTimeout(function(){H.start.call(H)},50);return this}if(!this._isLive){this._getResults()}else{this.occasionalJob.start()}this._isRunning=true;this._hasOfficiallyStarted=true;return this},stop:function(){this.occasionalJob.stop();if(this.intervalJob){this.intervalJob.stop()}this._isRunning=false;return this},pause:function(){if(this.isRunning()&&this.intervalJob){this.intervalJob.stop();e.add(this.widgetEl,"twtr-paused");this._isRunning=false}if(this._resumeTimer){clearTimeout(this._resumeTimer)}return this},resume:function(){var H=this;if(!this.isRunning()&&this._hasOfficiallyStarted&&this.intervalJob){this._resumeTimer=window.setTimeout(function(){H.intervalJob.start();H._isRunning=true;e.remove(H.widgetEl,"twtr-paused")},2000)}return this},isRunning:function(){return this._isRunning},destroy:function(){this.stop();this.clear();this.runOnce=false;this._hasOfficiallyStarted=false;this.intervalJob=false;this._profileImage=false;this._isLive=true;this._tweetFilter=false;this._isScroll=false;this.newResults=false;this._isRunning=false;this.sinceId=1;this.results=[];this.showedResults=[];this.occasionalJob.destroy();if(this.jsonRequestRunning){clearTimeout(this.jsonRequestTimer);e.add(this.spinner,"twtr-inactive")}e.remove(this.widgetEl,"twtr-scroll");this.removeEvents();return this}}}()})()})();
