(function(b){b.fn.tweetable=function(f){var a={limit:5,username:"philipbeel",time:!1,replies:!1,position:"append",listClass:"tweets-widget",loaded:function(){}};f=b.extend(a,f);return this.each(function(){var h=b(this),j,e="",f="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");b.getJSON("http://api.twitter.com/1/statuses/user_timeline.json?screen_name="+a.username+"&count="+a.limit+"&callback=?",h,function(k){b.each(k,function(d,c){0==d&&(j=b('<ul class="'+a.listClass+'">')[a.position.toLowerCase()+
    "To"](h));!1===a.replies?null===c.in_reply_to_status_id&&j.append('<li class="tweet_content_'+d+'"><p class="tweet_link_'+d+'">'+c.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')+"</p></li>"):j.append('<li class="tweet_content_'+d+'"><p class="tweet_link_'+d+'">'+c.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')+"</p></li>");if(!0==a.time){for(var g=0;12>=g;g++)f[g]==c.created_at.substr(4,3)&&(e=g+1,10>e&&(e="0"+e));b(".tweet_link_"+d).append('<p class="meta"> @'+c.created_at.substr(8,2)+"/"+e+"/"+c.created_at.substr(26,4)+" "+c.created_at.substr(11,8)+"</p>")}});a.loaded();h.trigger("tweetable_loaded")})})}})(jQuery);
