function addTweets(tw) {
	var n = document.getElementById("tweets");
	n.innerHTML = "";
	for(var i=0; i<tw.length; i++) {
		var txt = tw[i].text;
		//http://link
		txt = txt.replace(/(^|\s)(https?:\/\/([-\w\.]+)+(\/([\w/_\.-]*(\?\S+)?(#\S+)?)?)?)/g, "$1<a href='$2'>$2</a>");
		//@user
		txt = txt.replace(/(^|\s)@(\w+)/g, "$1<a href='http://www.twitter.com/$2'>@$2</a>");
		//#hash
		txt = txt.replace(/(^|\s)#(\w+)/g, "$1<a href='http://search.twitter.com/search?q=%23$2'>#$2</a>");

		var d = document.createElement("li");
		d.innerHTML = txt;
		n.appendChild(d);
	}

}

//call twitter
(function(){
	var d = document;
	d.getElementById("tweets").style.display="";
	var s = d.createElement("script");
	s.setAttribute("src","http://twitter.com/status/user_timeline/jnegre_org.json?count=8&callback=addTweets");
	d.getElementsByTagName("head")[0].appendChild(s);
})();


