$(document).ready(function() {
	var user = 'vroomhr';
	$.getJSON('http://twitter.com/statuses/user_timeline.json?screen_name=' + user + '&count=1&callback=?', function(data) {
		var tweet = data[0].text;
		var user_image = data[0].user.profile_image_url;
		var created = data[0].created_at;
		
		// format tweet
		tweet = tweet.replace(/(http\:\/\/[A-Za-z0-9\/\.\?\=\-]*)/g,'<a href="$1" target="_blank">$1</a>');
		tweet = tweet.replace(/@([A-Za-z0-9\/_]*)/g,'<a href="http://twitter.com/$1" target="_blank">@$1</a>');
		tweet = tweet.replace(/#([A-Za-z0-9\/\.]*)/g,'<a href="http://twitter.com/search?q=$1" target="_blank">#$1</a>');
		tweet = tweet.replace(/B@([_a-z0-9]+)/ig, function(reply) { return  reply.charAt(0)+'<a href="http://twitter.com/'+reply.substring(1)+'" target="_blank">'+reply.substring(1)+'</a>'; });
	 
		$("#tweet").html(tweet);
	});
});

