function twitterManager(){

	$.fn.tweetify = function() {

		this.each(function() {

		    $(this).html(

		        $(this).html()
		            .replace(/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi,'<a target="_blank" href="$1">$1</a>')
		            .replace(/(^|\s)#(\w+)/g,'$1<a target="_blank" href="http://search.twitter.com/search?q=%23$2">#$2</a>')
		            .replace(/(^|\s)@(\w+)/g,'$1<a target="_blank" href="http://twitter.com/$2">@$2</a>')

		    );

		});

		return $(this);

	}			
	
	var twittertUsername = "tonyverdult";		
	var url 			 = "http://twitter.com/status/user_timeline/"+twittertUsername+".json?count=5&callback=?";

	$.getJSON(url, function(data){
	
		var htmlString = '';
		
	    $.each(data, function(i, item) {
	    
	    	var tweetDate 		= item.created_at.substring(0,10);
	    	var tweetContent	= item.text;
	    	var tweetID			= item.id_str;
	    
	    	htmlString += '<div class="tweet">';
	    	htmlString += '<div class="tweet_content"><p><span>'+tweetDate+'</span>&nbsp;'+tweetContent+'</p></div>';
	    	htmlString += '</div>';

	    });
	    
	    $(".twitter_container").html(htmlString);	    				
		$(".tweet_content p").tweetify();
		$(".twitter_container .tweet:last").css("margin-bottom","0");

	});	

}

$(function(){

	twitterManager();

});	
