var twitterLinks = function(cssSelector) {
	$(".tweetsHolder li p").each(function(){
		if (!$(this).find("a").length) {
		    $(this).html( 
		      $(this).html().
		      replace(/http:\/\/\S+/g,  '<a href="$&" target="_blank">$&</a>').
		      replace(/\s(@)(\w+)/g,    ' @<a href="http://twitter.com/$2" target="_blank">$2</a>').
		      replace(/\s(#)(\w+)/g,    ' #<a href="http://www.twitter.com/search?q=$2" target="_blank">$2</a>').
		      replace(/^\w+/,           '<a href="http://twitter.com/$&" target="_blank">$&</a>') 
		    );
		}
	});
}

$(document).ready(function(){
	if ($(".tweetsHolder").length)twitterLinks(".tweetsHolder > p");
});
