function twitterify(text) 
{
	text = text.replace(/(http:\/\/[\w\.\/\?=\:]+)/, 	"<a href=\"$1\" target=\"_blank\">$1</a>");
	text = text.replace(/(^|\s)@(\w+)/g, 				"$1@<a href=\"http://www.twitter.com/$2\" target=\"_blank\">$2</a>");
	return text.replace(/(^|\s)#(\w+)/g, 				"$1#<a href=\"http://search.twitter.com/search?q=%23$2\" target=\"_blank\">$2</a>")
}
jQuery(document).ready(function()
{

	if(screen.width>=1900) 		{ $("link[href='./design/screen1900.css']").attr({href:"./design/screen1900.css"}); }
	else if(screen.width>=1600)	{ $("link[href='./design/screen1900.css']").attr({href:"./design/screen1600.css"}); }
	else if(screen.width>=1280)	{ $("link[href='./design/screen1900.css']").attr({href:"./design/screen1280.css"}); }
	else						{ $("link[href='./design/screen1900.css']").attr({href:"./design/screen1024.css"}); }

	$(".art").fadeIn(900);

	var username	= 'baptistethiry'; 	//-- set user name
	var format		= 'json';		 	//-- set format, you really don't have an option on this one
	var url			= 'http://api.twitter.com/1/statuses/user_timeline/'+username+'.'+format+'?callback=?'; //-- make the url

	$.getJSON(url, function(tweet)
	{//-- get the last 10 tweets
		var html = "<ul>";
		
		//-- set how many tweet you want
		for(var t = 0; t < 3; t++)
		{
			html += "<li>"+ twitterify(tweet[t].text) +"</li>";
		}
		html += "</ul>";
		
		$("#tweets").html(html); //-- place tweets inside the div
	});
});
