if (!"console" in window) {
	window.console = {
		log: function () {}
	}
}
TWTR = window.TWTR || {};
if (!Array.forEach) {
	Array.prototype.forEach = function (a, b) {
		var c = b || window;
		for (var i = 0, j = this.length; i < j; ++i) {
			a.call(c, this[i], i, this)
		}
	};
	Array.prototype.indexOf = function (a, b) {
		var b = b || 0;
		for (var i = 0; i < this.length; ++i) {
			if (this[i] === a) {
				return i
			}
		}
		return - 1
	}
} (function () {
	function Animate(a, b, c) {
		this.el = a;
		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
	};
	Animate.canTransition = function () {
		var a = document.createElement('twitter');
		a.style.cssText = '-webkit-transition: all .5s linear;';
		return !! a.style.webkitTransitionProperty
	} ();
	Animate.prototype._setStyle = function (a) {
		switch (this.prop) {
		case 'opacity':
			this.el.style[this.prop] = a;
			this.el.style.filter = 'alpha(opacity=' + a * 100 + ')';
			break;
		default:
			this.el.style[this.prop] = a + 'px';
			break
		}
	};
	Animate.prototype._animate = function () {
		var a = 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)
	};
	Animate.prototype.start = function () {
		var a = this;
		this.startTime = new Date();
		this.timer = setInterval(function () {
			a._animate.call(a)
		},
		15)
	};
	TWTR.Widget = function (a) {
		this.init(a)
	};
	(function () {
		var l = {};
		var p = {};
		var q = function (c) {
			var a = p[c];
			if (!a) {
				a = new RegExp('(?:^|\\s+)' + c + '(?:\\s+|$)');
				p[c] = a
			}
			return a
		};
		var t = function (c, a, b, d) {
			var a = a || '*';
			var b = b || document;
			var e = [],
			elements = b.getElementsByTagName(a),
			re = q(c);
			for (var i = 0, len = elements.length; i < len; ++i) {
				if (re.test(elements[i].className)) {
					e[e.length] = elements[i];
					if (d) {
						d.call(elements[i], elements[i])
					}
				}
			}
			return e
		};
		var u = function (a) {
			if (typeof a == 'string') {
				return document.getElementById(a)
			}
			return a
		};
		var v = function (a) {
			return a.replace(/^\s+|\s+$/g, '')
		};
		var w = function () {
			var a = self.innerHeight;
			var b = document.compatMode;
			if ((b || K.ie)) {
				a = (b == 'CSS1Compat') ? document.documentElement.clientHeight: document.body.clientHeight
			}
			return a
		};
		var x = function (e, a) {
			var b = e.target || e.srcElement;
			return a(b)
		};
		var y = function (a) {
			if (a && 3 == a.nodeType) {
				return a.parentNode
			} else {
				return a
			}
		};
		var z = function (e) {
			var a = e.relatedTarget;
			if (!a) {
				if (e.type == 'mouseout') {
					a = e.toElement
				} else if (e.type == 'mouseover') {
					a = e.fromElement
				}
			}
			return y(a)
		};
		var A = function (a, b) {
			var idCount = Tweet._tweetCount-1;
			if($("#tweet-id-1").html()==null){
				b.parentNode.insertBefore(a, b.nextSibling)
			} else {
				$("#tweet-id-"+idCount).after(a);
			}
		};
		var B = function (a) {
			try {
				a.parentNode.removeChild(a)
			} catch(ex) {}
		};
		var C = function (a) {
			return a.firstChild
		};
		var D = function (e) {
			var a = z(e);
			while (a && a != this) {
				try {
					a = a.parentNode
				} catch(ex) {
					a = this
				}
			}
			if (a != this) {
				return true
			}
			return false
		};
		var E = {
			has: function (a, c) {
				return new RegExp("(^|\\s)" + c + "(\\s|$)").test(u(a).className)
			},
			add: function (a, c) {
				if (!this.has(a, c)) {
					u(a).className = v(u(a).className) + ' ' + c
				}
			},
			remove: function (a, c) {
				if (this.has(a, c)) {
					u(a).className = u(a).className.replace(new RegExp("(^|\\s)" + c + "(\\s|$)", "g"), "")
				}
			}
		};
		var F = {
			add: function (a, b, c) {
				if (a.addEventListener) {
					a.addEventListener(b, c, false)
				} else {
					a.attachEvent('on' + b, function () {
						c.call(a, window.event)
					})
				}
			}
		};
		var G = {
			bool: function (b) {
				return typeof b === 'boolean'
			},
			def: function (o) {
				return ! (typeof o === 'undefined')
			},
			number: function (n) {
				return typeof n === 'number' && isFinite(n)
			},
			fn: function (f) {
				return typeof f === 'function'
			},
			array: function (a) {
				if (a) {
					return G.number(a.length) && G.fn(a.splice)
				}
				return false
			}
		};
		var H = function (a) {
			var b = new Date();
			var c = new Date(a);
			if (K.ie) {
				c = Date.parse(a.replace(/( \+)/, ' UTC$1'))
			}
			var d = b - c;
			var e = 1000,
			minute = e * 60,
			hour = minute * 60,
			day = hour * 24,
			week = day * 7;
			if (isNaN(d) || d < 0) {
				return ""
			}
			if (d < e * 7) {
				return "right now"
			}
			if (d < minute) {
				return Math.floor(d / e) + " seconds ago"
			}
			if (d < minute * 2) {
				return "about 1 minute ago"
			}
			if (d < hour) {
				return Math.floor(d / minute) + " minutes ago"
			}
			if (d < hour * 2) {
				return "about 1 hour ago"
			}
			if (d < day) {
				return Math.floor(d / hour) + " hours ago"
			}
			if (d > day && d < day * 2) {
				return "yesterday"
			}
			if (d < day * 365) {
				return Math.floor(d / day) + " days ago"
			} else {
				return "over a year ago"
			}
		};
		var I = {
			link: function (d) {
				return d.replace(/\bhttps?\:\/\/\S+/g, function (b) {
					var c = '';
					b = b.replace(/(\.*|\?*|\!*)$/, function (m, a) {
						c = a;
						return ''
					});
					return '<a class="twtr-hyperlink" href="' + b + '">' + ((b.length > 25) ? b.substr(0, 24) + '...': b) + '</a>' + c
				})
			},
			at: function (b) {
				return b.replace(/\B\@([a-zA-Z0-9_]{1,15})/g, function (m, a) {
					return '@<a class="twtr-atreply" href="http://twitter.com/' + a + '">' + a + '</a>'
				})
			},
			hash: function (b) {
				return b.replace(/\B\#([a-zA-Z0-9_]+)/g, function (m, a) {
					return '<a class="twtr-hashtag" href="http://search.twitter.com/search?q=#' + a + '">#' + a + '</a>'
				})
			},
			clean: function (a) {
				return this.hash(this.at(this.link(a)))
			}
		};
		function Occasionally(a, b, c) {
			this.job = a;
			this.decayFn = b;
			this.interval = c;
			this.decayRate = 1;
			this.decayMultiplier = 1.25;
			this.maxDecayTime = 3 * 60 * 1000
		}
		Occasionally.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 a = b.interval * b.decayRate;
					a = (a >= b.maxDecayTime) ? b.maxDecayTime: a;
					a = Math.floor(a);
					b.worker = window.setTimeout(function () {
						b.run.call(b)
					},
					a)
				})
			},
			destroy: function () {
				this.stop();
				this.decayRate = 1;
				return this
			}
		};
		function IntervalJob(a, b, c, d) {
			this.time = b || 6000;
			this.loop = c || false;
			this.repeated = 0;
			this.total = a.length;
			this.callback = d;
			this.haystack = a
		};
		IntervalJob.prototype = {
			start: function (a) {
				var b = this;
				if (a) {
					this.repeated = 0
				}
				this.stop().job();
				this.timer = window.setInterval(function () {
					b.job.call(b)
				},
				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
			}
		};
		var J = function (a, b, c) {
			b[a] = c
		};
		var K = function () {
			var a = navigator.userAgent;
			return {
				ie: a.match(/MSIE\s([^;]*)/)
			}
		} ();
		function Tweet(a) {
			var b = '<div class="twtr-tweet-wrap">         <div class="twtr-avatar">           <div class="twtr-img"><a href="http://twitter.com/' + a.user + '"><img src="' + a.avatar + '"></a></div>         </div>         <div class="twtr-tweet-text">           <p>             <a href="http://twitter.com/' + a.user + '" class="twtr-user">' + a.user + '</a> ' + a.tweet + '             <i>            <a href="http://twitter.com/' + a.user + '/status/' + a.id + '">' + H(a.created_at) + '</a>             <a target="_blank" class="twtr-reply" href="http://twitter.com/?status=@' + a.user + ' &in_reply_to_status_id=' + a.id + '&in_reply_to=' + a.user + '">reply</a>             </i>           </p>         </div>       </div>';
			var c = document.createElement('div');
			c.id = 'tweet-id-' + ++Tweet._tweetCount;
			c.className = 'twtr-tweet';
			c.innerHTML = b;
			this.element = c
		};
		Tweet._tweetCount = 0;
		(function () {
			var d = false;
			l.css = function (a) {
				var b = document.createElement('style');
				b.type = 'text/css';
				if (K.ie) {
					b.styleSheet.cssText = a
				} else {
					var c = document.createDocumentFragment();
					c.appendChild(document.createTextNode(a));
					b.appendChild(c)
				}
				function appendHeadStyle() {
					document.getElementsByTagName('head')[0].appendChild(b)
				}
				if (!K.ie || d) {
					appendHeadStyle()
				} else {
					window.attachEvent('onload', function () {
						d = true;
						appendHeadStyle()
					})
				}
			}
		})();
		TWTR.Widget.isLoaded = false;
		TWTR.Widget.WIDGET_NUMBER = 0;
		TWTR.Widget.jsonP = function (a, b) {
			var c = document.createElement('script');
			c.type = 'text/javascript';
			c.src = a;
			function append() {
				document.getElementsByTagName('body')[0].appendChild(c);
				b(c)
			}
			if (!K.ie || TWTR.Widget.isLoaded) {
				append()
			} else {
				window.attachEvent('onload', function () {
					TWTR.Widget.isLoaded = true;
					append()
				})
			}
			return c
		};
		TWTR.Widget.prototype = function () {
			var g = 'http://search.twitter.com/search.';
			var h = 'http://twitter.com/statuses/user_timeline.';
			var i = 'http://twitter.com/favorites/';
			var j = 20000;
			var k = 'http://widgets.twimg.com/j/1/default.gif';
			return {
				init: function (b) {
					var c = this;
					this._widgetNumber = ++TWTR.Widget.WIDGET_NUMBER;
					TWTR.Widget['receiveCallback_' + this._widgetNumber] = function (a) {
						c._prePlay.call(c, a)
					};
					this.opts = b;
					this.base = g;
					this._isRunning = false;
					this._hasOfficiallyStarted = false;
					this._rendered = false;
					this._isCreator = b.creator || false;
					this._profileImage = false;
					this._isSearchWidget = !!b.search;
					this._isProfileWidget = b.profile || false;
					this._isFavsWidget = b.favs || false;
					this.timesRequested = 0;
					this.runOnce = false;
					this.newResults = false;
					this.results = [];
					this.jsonRequestTime = 0;
					this.jsonMaxRequestTimeOut = 19000;
					this.showedResults = [];
					this.sinceId = 1;
					this.source = 'TWITTERINC_WIDGET';
					this.id = b.id;
					this.loop = G.bool(b.loop) ? b.loop: true;
					this.tweets = 0;
					this.wh = (b.width && b.height) ? [b.width, b.height] : [250, 300];
					this.wh[0] = ((this.wh[0] < 150) ? 150 : this.wh[0]) + 'px';
					this.wh[1] = ((this.wh[1] < 100) ? 100 : this.wh[1]) + 'px';
					this.intervalJobTimer = b.interval || 1000;
					this.format = 'json';
					this.rpp = b.rpp || 50;
					this.subject = b.subject || '';
					this.title = b.title || '';
					this.setSearch(b.search);
					this._setUrl();
					this.theme = b.theme ? b.theme: this._getDefaultTheme();
					this.occasionalJob = new Occasionally(function (a) {
						c.decay = a;
						c._job.call(c)
					},
					function () {
						return c._decayDecider.call(c)
					},
					j);
					this._avatars = true;
					this._isFullScreen = false;
					this._isFlat = false;
					this._isFlatNoScroll = false;
					this.setFeatures(b.features)
				},
				_job: function () {
					this._getResults()
				},
				setFeatures: function (a) {
					if (a) {
						if (G.def(a.fullscreen) && G.bool(a.fullscreen)) {
							if (a.fullscreen) {
								this._isFullScreen = true;
								this.wh[0] = '100%';
								this.wh[1] = (w() - 90) + 'px'
							}
						}
						if (G.def(a.avatars) && G.bool(a.avatars)) {
							if (!a.avatars) {
								l.css('#' + this.id + ' .twtr-avatar, #' + this.id + ' .twtr-user { display: none; } ' + '#' + this.id + ' .twtr-tweet-text { margin-left: 0; }');
								this._avatars = false
							} else {
								var b = (this._isFullScreen) ? '90px': '40px';
								l.css('#' + this.id + ' .twtr-avatar { display: block; } #' + this.id + ' .twtr-user { display: inline; } ' + '#' + this.id + ' .twtr-tweet-text { margin-left: ' + b + '; }');
								this._avatars = true
							}
						} else {
							if (this._isProfileWidget) {
								this.setFeatures({
									avatars: false
								});
								this._avatars = false
							} else {
								this.setFeatures({
									avatars: true
								});
								this._avatars = true
							}
						}
						if (G.def(a.hashtags) && G.bool(a.hashtags)) { (!a.hashtags) ? l.css('#' + this.id + ' a.twtr-hashtag { display: none; }') : ''
						}
						if (G.def(a.timestamp) && G.bool(a.timestamp)) {
							var c = a.timestamp ? 'block': 'none';
							l.css('#' + this.id + ' i { display: ' + c + '; }')
						}
						if (G.def(a.flat) && G.bool(a.flat)) {
							if (a.flat) {
								this._isFlat = true;
								if (G.def(a.scrollbar) && a.scrollbar === false) {
									this._isFlatNoScroll = true
								}
							}
						}
					} else {
						if (this._isProfileWidget) {
							this.setFeatures({
								avatars: false
							});
							this._avatars = false
						}
					}
					return this
				},
				setInterval: function (a) {
					this.interval = a;
					return this
				},
				setBase: function (b) {
					this.base = b;
					return this
				},
				setProfile: function (a, b) {
					this._isProfileWidget = true;
					this.username = a;
					this.realname = b || ' ';
					this.setBase(h + this.format + '?screen_name=' + a);
					this.setSearch(' ');
					return this
				},
				setUser: function (a) {
					this._isFavsWidget = true;
					this.username = a;
					this.setBase(i + a + '.');
					this.setSearch(' ');
					return this
				},
				setProfileImage: function (a) {
					this._profileImage = a;
					this.byClass('twtr-profile-img', 'img').src = a;
					this.byClass('twtr-profile-img-anchor', 'a').href = 'http://twitter.com/' + this.username;
					return this
				},
				setTitle: function (a) {
					this.title = a;
					this.widgetEl.getElementsByTagName('h3')[0].innerHTML = this.title;
					return this
				},
				setCaption: function (a) {
					this.subject = a;
					this.widgetEl.getElementsByTagName('h4')[0].innerHTML = this.subject;
					return this
				},
				setSearch: function (s) {
					s = s || '';
					s = s.replace(' ', '+');
					this.search = escape('-RT ' + s);
					this._setUrl();
					if (this._rendered) {
						var a = this.byClass('twtr-join-conv', 'a');
						if (this._isProfileWidget || this._isFavsWidget) {
							a.href = 'http://twitter.com/'
						} else {
							a.href = 'http://twitter.com/#search?q=' + this.search
						}
					}
					return this
				},
				_setUrl: function () {
					var a = this;
					function showSince() {
						return (a.sinceId == 1) ? '': '&since_id=' + a.sinceId + '&refresh=true'
					}
					if (this._isProfileWidget) {
						this.url = this.base + '&callback=TWTR.Widget.receiveCallback_' + this._widgetNumber + '&count=' + this.rpp + showSince() + '&clientsource=' + this.source
					} else if (this._isFavsWidget) {
						this.url = this.base + this.format + '?callback=TWTR.Widget.receiveCallback_' + this._widgetNumber + showSince() + '&clientsource=' + this.source
					} else {
						this.url = this.base + this.format + '?q=' + this.search + '&callback=TWTR.Widget.receiveCallback_' + this._widgetNumber + '&rpp=' + this.rpp + showSince() + '&clientsource=' + this.source
					}
					return this
				},
				setTheme: function (o, a) {
					var b = this;
					var c = ' !important';
					var d = ((window.location.hostname.match(/twitter\.com/)) && (window.location.pathname.match(/goodies/)));
					if (a || d) {
						c = ''
					}
					this.theme = {
						shell: {
							background: function () {
								return o.shell.background || b._getDefaultTheme().shell.background
							} (),
							color: function () {
								return o.shell.color || b._getDefaultTheme().shell.color
							} ()
						},
						tweets: {
							background: function () {
								return o.tweets.background || b._getDefaultTheme().tweets.background
							} (),
							color: function () {
								return o.tweets.color || b._getDefaultTheme().tweets.color
							} (),
							links: function () {
								return o.tweets.links || b._getDefaultTheme().tweets.links
							} ()
						}
					};
					var e = '#' + this.id + ' .twtr-doc,                      #' + this.id + ' .twtr-hd a {            background: ' + this.theme.shell.background + c + ';            color: ' + this.theme.shell.color + c + ';          }          #' + this.id + ' .twtr-tweet a {            color: ' + this.theme.tweets.links + c + ';          }          #' + this.id + ' .twtr-bd, #' + this.id + ' .twtr-timeline i a {            color: ' + this.theme.tweets.color + c + ';          }          #' + this.id + ' .twtr-new-results,           #' + this.id + ' .twtr-results-inner,           #' + this.id + ' .twtr-timeline {            background: ' + this.theme.tweets.background + c + ';          }';
					if (K.ie) {
						e += '#' + this.id + ' .twtr-tweet { background: ' + this.theme.tweets.background + c + '; }'
					}
					l.css(e);
					return this
				},
				byClass: function (c, a, b) {
					var d = t(c, a, u(this.id));
					return (b) ? d: d[0]
				},
				render: function () {
					var a = this;
					this.setTheme(this.theme, this._isCreator);
					this.widgetEl = u(this.id);
					E.add(this.widgetEl, 'twtr-widget');
					if (this._isProfileWidget) {
						E.add(this.widgetEl, 'twtr-widget-profile')
					}
					if (this._isFlatNoScroll) {
						this.wh[1] = 'auto'
					}
					if (this._isFlat) { (!this._isFlatNoScroll) ? E.add(this.widgetEl, 'twtr-flat') : ''
					}
					this.widgetEl.innerHTML = this._getWidgetHtml();
					this.spinner = this.byClass('twtr-spinner', 'div');
					var b = this.byClass('twtr-timeline', 'div');
					if (!this._isFlat) {
						F.add(b, 'mouseover', function (e) {
							if (D.call(this, e)) {
								a.pause.call(a)
							}
						});
						F.add(b, 'mouseout', function (e) {
							if (D.call(this, e)) {
								a.resume.call(a)
							}
						})
					}
					this._rendered = true;
					return this
				},
				_getDefaultTheme: function () {
					return {
						shell: {
							background: '#3082af',
							color: '#ffffff'
						},
						tweets: {
							background: '#ffffff',
							color: '#444444',
							links: '#1985b5'
						}
					}
				},
				_getWidgetHtml: function () {
					var a = this;
					function getQueryString() {
						if (a._isProfileWidget) {
							return ''
						} else {
							return '#search?q=' + a.search
						}
					}
					function getHeader() {
						if (a._isProfileWidget) {
							return '<a href="http://twitter.com/" class="twtr-profile-img-anchor"><img class="twtr-profile-img" src="' + k + '"></a>                      <h3></h3>                      <h4></h4>'
						} else {
							return '<h3>' + a.title + '</h3><h4>' + a.subject + '</h4>'
						}
					}
					function getLogoHeight() {
						if (!a._isFullScreen) {
							return ' height="15"'
						}
						return ''
					}
					function isFull() {
						return a._isFullScreen ? ' twtr-fullscreen': ''
					}
					var b = '<div class="twtr-doc' + isFull() + '" style="width: ' + this.wh[0] + ';">            <div class="twtr-hd">' + getHeader() + '               <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">              <div><a href="http://twitter.com"><img src="http://widgets.twimg.com/j/1/twitter_logo_s.' + (K.ie ? 'gif': 'png') + '"' + getLogoHeight() + '></a>                <span><a class="twtr-join-conv" style="color:' + this.theme.shell.color + '" href="http://twitter.com/' + getQueryString() + '">Join the conversation</a></span>              </div>            </div>          </div>';
					return b
				},
				_appendTweet: function (a) {
					A(a, this.byClass('twtr-reference-tweet', 'div'));
					return this
				},
				_slide: function (a) {
					var b = this;
					var c = C(a).offsetHeight;
					new Animate(a, 'height', {
						from: 0,
						to: c,
						time: 500,
						callback: function () {
							b._fade.call(b, a)
						}
					}).start();
					return this
				},
				_fade: function (a) {
					var b = this;
					if (Animate.canTransition) {
						a.style.webkitTransition = 'opacity 0.5s ease-out';
						a.style.opacity = 1;
						return this
					}
					new Animate(a, 'opacity', {
						from: 0,
						to: 1,
						time: 500
					}).start();
					return this
				},
				_chop: function () {
					var a = this.byClass('twtr-tweet', 'div', true);
					var b = this.byClass('twtr-new-results', 'div', true);
					if (a.length) {
						var c = a[a.length - 1];
						var d = parseInt(c.offsetTop);
						if (d > parseInt(this.wh[1])) {
							B(c)
						}
						if (b.length > 0) {
							var e = b[b.length - 1];
							var f = parseInt(e.offsetTop);
							if (f > parseInt(this.wh[1])) {
								B(e)
							}
						}
					}
					return this
				},
				_appendSlideFade: function () {
					this._chop()._appendTweet(this.tweet.element)._slide(this.tweet.element);
					return this
				},
				_createTweet: function (o) {
					this.tweet = new Tweet(o);
					if (!this._isFlat) {
						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 b = this;
					this.timesRequested++;
					this.jsonRequestRunning = true;
					this.jsonRequestTimer = window.setTimeout(function () {
						if (b.jsonRequestRunning) {
							clearTimeout(b.jsonRequestTimer);
							E.add(b.spinner, 'twtr-inactive')
						}
						b.jsonRequestRunning = false;
						B(b.scriptElement);
						b.newResults = false;
						b.decay()
					},
					this.jsonMaxRequestTimeOut);
					E.remove(this.spinner, 'twtr-inactive');
					TWTR.Widget.jsonP(b.url, function (a) {
						b.scriptElement = a
					})
				},
				clear: function () {
					var b = this.byClass('twtr-tweet', 'div', true);
					var c = this.byClass('twtr-new-results', 'div', true);
					b = b.concat(c);
					b.forEach(function (a) {
						B(a)
					});
					return this
				},
				_sortByMagic: function (c) {
					if (!this.loop) {
						this.results = c;
						return
					}
					var d = this;
					var e = function () {
						if (K.ie) {
							return function (a) {
								return Date.parse(a.replace(/( \+)/, ' UTC$1'))
							}
						} else {
							return function (a) {
								return new Date(a)
							}
						}
					} ();
					this.results.unshift.apply(this.results, c);
					this.results.forEach(function (a) {
						if (!a.views) {
							a.views = 0
						}
					});
					this.results.sort(function (a, b) {
						if (e(a.created_at) < e(b.created_at)) {
							return 1
						} else if (e(a.created_at) > e(b.created_at)) {
							return - 1
						} else {
							return 0
						}
					});
					this.results = this.results.slice(0, this.rpp);
					if (this._isFlat) {
						this.results.reverse()
					}
					this.results.sort(function (a, b) {
						if (a.views > b.views) {
							return 1
						} else if (a.views < b.views) {
							return - 1
						}
						return 0
					})
				},
				_prePlay: function (a) {
					if (this.jsonRequestTimer) {
						clearTimeout(this.jsonRequestTimer)
					}
					B(this.scriptElement);
					if (a.error) {
						this.newResults = false
					} else if (a.results && a.results.length > 0) {
						this.response = a;
						if (this.intervalJob) {
							this.intervalJob.stop()
						}
						this.newResults = true;
						this.sinceId = a.max_id;
						this._sortByMagic(a.results);
						if (this.isRunning()) {
							this._play()
						}
					} else if ((this._isProfileWidget || this._isFavsWidget) && G.array(a) && a.length > 0) {
						if (this.intervalJob) {
							this.intervalJob.stop()
						}
						this.newResults = true;
						if (!this._profileImage && this._isProfileWidget) {
							var b = a[0].user.screen_name;
							this.setProfileImage(a[0].user.profile_image_url);
							this.setTitle(a[0].user.name);
							this.setCaption('<a href="http://twitter.com/' + b + '">' + b + '</a>')
						}
						this.sinceId = a[0].id;
						this._sortByMagic(a);
						if (this.isRunning()) {
							this._play()
						}
					} else {
						this.newResults = false
					}
					this._setUrl();
					if (!this._isFlat) {
						this.decay()
					}
					E.add(this.spinner, 'twtr-inactive')
				},
				_play: function () {
					var b = this;
					if (this._avatars) {
						this._preloadImages(this.results)
					}
					if (this._isFlat) {
						this.results.forEach(function (a) {
							if (b._isProfileWidget) {
								a.from_user = b.username;
								a.profile_image_url = a.user.profile_image_url
							}
							if (b._isFavsWidget) {
								a.from_user = a.user.screen_name;
								a.profile_image_url = a.user.profile_image_url
							}
							b._createTweet({
								user: a.from_user,
								tweet: I.clean(a.text),
								avatar: a.profile_image_url,
								created_at: a.created_at,
								id: a.id
							})._appendTweet(b.tweet.element)
						});
						return this
					}
					if (this.runOnce && this._isSearchWidget) {
						var c = this.response.total > this.rpp ? this.response.total: this.response.results.length;
						var d = c > 1 ? 's': '';
						var e = (this.response.warning && this.response.warning.match(/adjusted since_id/)) ? 'more than': '';
						var f = document.createElement('div');
						E.add(f, 'twtr-new-results');
						f.innerHTML = '<div class="twtr-results-inner"> &nbsp; </div>' + '<div class="twtr-results-hr"> &nbsp; </div><span>' + e + ' <strong>' + c + '</strong> new tweet' + d + '</span>';
						A(f, this.byClass('twtr-reference-tweet', 'div'))
					}
					this.intervalJob = new IntervalJob(this.results, this.intervalJobTimer, this.loop, function (a) {
						a.views++;
						if (b._isProfileWidget) {
							a.from_user = b.username;
							a.profile_image_url = a.user.profile_image_url
						}
						if (b._isFavsWidget) {
							a.from_user = a.user.screen_name;
							a.profile_image_url = a.user.profile_image_url
						}
						if (b._isFullScreen) {
							a.profile_image_url = a.profile_image_url.replace(/_normal\./, '_bigger.')
						}
						var tweetStr = I.clean(a.text)
						tweetStr = tweetStr.replace('<a', '<a target="_blank" ')
						b._createTweet({
							user: a.from_user,
							tweet: tweetStr,
							avatar: a.profile_image_url,
							created_at: a.created_at,
							id: a.id
						})._appendSlideFade()
					}).start(true);
					return this
				},
				_preloadImages: function (c) {
					if (this._isProfileWidget || this._isFavsWidget) {
						c.forEach(function (a) {
							var b = new Image();
							b.src = a.user.profile_image_url
						})
					} else {
						c.forEach(function (a) { (new Image()).src = a.profile_image_url
						})
					}
				},
				_decayDecider: function () {
					var r = false;
					if (!this.runOnce) {
						this.runOnce = true;
						r = true
					} else if (this.newResults) {
						r = true
					}
					return r
				},
				start: function () {
					if (this._isFlat) {
						this._job()
					} 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()
					}
					if (this._resumeTimer) {
						clearTimeout(this._resumeTimer)
					}
					this._isRunning = false;
					return this
				},
				resume: function () {
					var a = this;
					if (!this.isRunning() && this._hasOfficiallyStarted && this.intervalJob) {
						this._resumeTimer = window.setTimeout(function () {
							a.intervalJob.start();
							a._isRunning = true
						},
						2000)
					}
					return this
				},
				isRunning: function () {
					return this._isRunning
				},
				destroy: function () {
					this.stop();
					this.clear();
					this.runOnce = false;
					this._hasOfficiallyStarted = false;
					this._profileImage = false;
					this._isFlat = false;
					this._isFlatNoScroll = 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-flat');
					return this
				}
			}
		} ()
	})()
})();