(function(a){a.fn.twitter=function(e){var d={username:"liquidtwofour",count:3,intro_text:null,outro_text:null};if(e){a.extend(d,e);var b=a('<div class="loading" id="twitter_loader">Loading</div>').hide().appendTo(a(".tweet")),c="http://twitter.com/status/user_timeline/"+d.username+".json?count="+d.count+"&callback=?"}a.fn.extend({linkUrl:function(){var f=[],g=/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;this.each(function(){f.push(this.replace(g,'<a href="$1">$1</a>'))});return a(f)},linkUser:function(){var f=[],g=/[\@]+([A-Za-z0-9-_]+)/gi;this.each(function(){f.push(this.replace(g,'<a href="http://twitter.com/$1">@$1</a>'))});return a(f)},linkHash:function(){var f=[],g=/ [\#]+([A-Za-z0-9-_]+)/gi;this.each(function(){f.push(this.replace(g,' <a href="http://search.twitter.com/search?q=&tag=$1&lang=all">#$1</a>'))});return a(f)}});b.fadeIn("fast");a.getJSON(c,function(f){if(f.length>0){a.each(f,function(g,j){var h=a("#tweet_"+g),l=this.id,k=a([this.text]).linkUrl().linkUser().linkHash()[0];h.find("abbr.timeago").hide().attr("title",this.created_at).text(this.created_at).css("cursor","pointer").click(function(){window.open("http://twitter.com/"+d.username+"/status/"+l)});if(a.timeago){}if(a.cuteTime){h.find("abbr.timeago").cuteTime()}h.find(".tweet_text").html(k).hide();b.fadeOut("slow",function(){b.remove();h.find(".tweet_text").fadeIn("slow",function(){h.find("abbr.timeago").css({top:"-30px"}).show().animate({top:0},"1000","swing")})})})}else{error=a('<div class="error">Oops, Nothing to display yet.</div>').hide().appendTo(this);b.fadeOut("slow",function(){b.remove();error.fadeIn("slow")})}})}})(jQuery);
