jQuery.fn.reverse=Array.prototype.reverse;String.prototype.linkify=function()
{return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/g,function(m)
{return m.link(m);});};String.prototype.linkuser=function()
{return this.replace(/[@]+[A-Za-z0-9-_]+/g,function(u)
{var username=u.replace("@","")
return u.link("http://twitter.com/"+username);});};String.prototype.linktag=function()
{return this.replace(/[#]+[A-Za-z0-9-_]+/,function(t)
{var tag=t.replace("#","")
return t.link("http://twitterpowersearch.com?q="+tag);});};function fetch_tweets(elem)
{elem=$(elem);input=elem.attr('title');lang=elem.attr('lang');if(input!=window.monitter['text-'+input])
{window.monitter['last_id'+input]=0;window.monitter['text-'+input]=input;window.monitter['count-'+input]=12;;}
if(window.monitter['count-'+input]>10)
{elem.prepend('<div class="tweet">real time twitter by: <a href="http://TwitterPowerSearch.com" target="_blank">TwitterPowerSearch.com</a></div>');window.monitter['count-'+input]=0;}
var url="http://search.twitter.com/search.json?q="+input+"&lang="+lang+"&rpp="+rrp+"&since_id="+window.monitter['last_id'+input]+"&callback=?";$.getJSON(url,function(json)
{$('div.tweet:gt('+window.monitter['limit']+')',elem).each(function(){$(this).fadeOut('slow')});$(json.results).reverse().each(function()
{if($('#tw'+this.id,elem).length==0)
{window.monitter['count-'+input]++;
var thedate=new Date(Date.parse(this.created_at));
var thedatestr=thedate.getHours()+':'+thedate.getMinutes();
var divstr='<div id="tw'+this.id+'" class="tweet"><img width="48" height="48" src="'+this.profile_image_url+'" ><p class="text">'+this.text.linkify().linkuser().linktag()+'<br />&nbsp;<b><a href="http://twitter.com/'+this.from_user+'" target="_blank">'+this.from_user+'</a></b> &nbsp;-&nbsp;<b>'+thedatestr+'</b></p></div>';

re = new RegExp("(http://twitpic.com/)([0-9a-zA-Z]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0 || m[2] == "photos" || m[2] == "photo" || m[2] == "tag") {} else {divstr = '<div style=" margin-right:5px;"><a href="http://twitpic.com/' + m[2] + '" target="_blank"><img src="http://twitpic.com/show/thumb/' + m[2] + '" border=0 height=205 width=205></a></div>' + divstr;}	

re = new RegExp("(http://tweetphoto.com/)([0-9a-zA-Z]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0 ) {} else {divstr = '<div style=" margin-right:5px;"><a href="http://tweetphoto.com/' + m[2] + '" target="_blank"><img src="http://tweetphotoapi.com/api/TPAPI.svc/imagefromurl?size=medium&url=http://tweetphoto.com/' + m[2] + '" border=0 height=205 width=205></a></div>' + divstr;}	

re = new RegExp("(http://moby.to/)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style=" margin-right:5px;"><a href="http://moby.to/' + m[2] + '" target="_blank"><img src="http://api.mobypicture.com/?t=http://mobypicture.com/' + m[2] + '&s=small&k=TwPwSeSt3v3n&format=plain" border=0 height=205 width=205></a></div>' + divstr;}

re = new RegExp("(http://tiny12.tv/)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style=" margin-right:5px;"><a href="http://tiny12.tv/' + m[2] + '" target="_blank"><img src="http://twitterpowersearch.com/get12seconds.php?url=' + m[2] +'" border=0 height=205 width=205></a></div>' + divstr;}

re = new RegExp("(http://twitgoo.com/)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style=" margin-right:5px;"><a href="http://twitgoo.com/' + m[2] + '" target="_blank"><img src="http://twitgoo.com/show/thumb/' + m[2] +'" border=0 height=205 width=205></a></div>' + divstr;}

re = new RegExp("(http://twitvid.com/)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style=" margin-right:5px;"><a href="http://twitvid.com/' + m[2] + '" target="_blank"><img src="http://images.twitvid.com/' + m[2] +'.jpg" border=0 height=205 width=205></a></div>' + divstr;}

re = new RegExp("(http://blip.fm/</A>~)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style="margin-right:75px;"><a href="http://blip.fm/~' + m[2] + '" target="_blank"><img src="http://twitterpowersearch.com/img/audio.jpg" border=0 height=24 width=73></a></div>' + divstr;}

re = new RegExp("(http://blip.fm/</a>~)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style="margin-right:75px;"><a href="http://blip.fm/~' + m[2] + '" target="_blank"><img src="http://twitterpowersearch.com/img/audio.jpg" border=0 height=24 width=73></a></div>' + divstr;}

re = new RegExp("(http://twisten.fm/)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style="margin-right:75px;"><a href="http://twisten.fm/' + m[2] + '" target="_blank"><img src="http://twitterpowersearch.com/img/audio.jpg" border=0 height=24 width=73></a></div>' + divstr;}

re = new RegExp("(http://tinysong.com/)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style="margin-right:75px;"><a href="http://tinysong.com/' + m[2] + '" target="_blank"><img src="http://twitterpowersearch.com/img/audio.jpg" border=0 height=24 width=73></a></div>' + divstr;}

re = new RegExp("(http://song.ly/)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style="margin-right:75px;"><a href="http://song.ly/' + m[2] + '" target="_blank"><img src="http://twitterpowersearch.com/img/audio.jpg" border=0 height=24 width=73></a></div>' + divstr;}

re = new RegExp("(http://twiturm.com/)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style="margin-right:75px;"><a href="http://twiturm.com/' + m[2] + '" target="_blank"><img src="http://twitterpowersearch.com/img/audio.jpg" border=0 height=24 width=73></a></div>' + divstr;}

re = new RegExp("(http://twt.fm/)([0-9a-zA-Z?]*)");
var m = re.exec(divstr);
if  (!m || m.length == 0) {} else {divstr = '<div style="margin-right:75px;"><a href="http://twt.fm/' + m[2] + '" target="_blank"><img src="http://twitterpowersearch.com/img/audio.jpg" border=0 height=24 width=73></a></div>' + divstr;}

window.monitter['last_id'+input]=this.id;
elem.prepend(divstr);
//$('#tweets1').jScrollPane();
//$('#tweets2').jScrollPane();
//$('#tweets3').jScrollPane();
//$('#tweets4').jScrollPane();
//$('#tweets5').jScrollPane();
//$('#tweets6').jScrollPane();
$('#tw'+this.id,elem).hide();$('#tw'+this.id+' img',elem).hide();
$('#tw'+this.id+' img',elem).fadeIn(4000);
$('#tw'+this.id,elem).fadeIn('slow');
}});
input=escape(input);rrp=1;setTimeout(function(){fetch_tweets(elem)},4000);});return(false);}
$(document).ready(function(){window.monitter={};$('.monitter').each(function(e){rrp=6;fetch_tweets(this);});});