(function(a){a.fn.tweetable=function(b){var c={limit:5,username:"philipbeel",time:false,replies:false};var b=a.extend(c,b);return this.each(function(e){var d=a(this);var f="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=";var g="&count=";a.getJSON(f+c.username+g+c.limit+"&callback=?",d,function(h){a(d).html("");a.each(h,function(j,k){if(j==0){a(d).prepend('<ul class="tweetList">')}if(c.replies===false){if(k.in_reply_to_status_id===null){a(".tweetList").append('<li class="tweet_content_'+j+'"><span class="tweet_link_'+j+'">'+k.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2'));if(c.time==true){a(".tweet_content_"+j).append("<small> "+k.created_at.substr(0,20)+"</small>")}}}else{a(".tweetList").append('<li class="tweet_content_'+j+'"><span class="tweet_link_'+j+'">'+k.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2'));if(c.time==true){a(".tweet_content_"+j).append("<small> "+k.created_at.substr(0,20)+"</small>")}}})})})}})(jQuery);
