var interval=5000;$(document).ready(function(){$.getJSON("http://api.twitter.com/1/statuses/user_timeline/rmaclean.json?count=5&callback=?",gotTweets);var a=$(".flair-badge").length;$.each($(".flair-badge"),function(b,c){setTimeout("BadgeRotate("+b+","+a+")",b*interval)})});function BadgeRotate(a,b){$(".flair-badge:nth("+a+")").fadeIn("slow");setTimeout("BadgeRotateEnd("+a+","+b+")",interval)}function BadgeRotateEnd(a,b){$(".flair-badge:nth("+a+")").hide();setTimeout("BadgeRotate("+a+","+b+")",(b*interval)-interval)}function gotTweets(c){var a=Date.parse(new Date().toUTCString());var b="<ul>";$.each(c,function(e,h){var f=h.created_at.substring(4);var d=Date.parse(f.substring(0,6)+" "+f.substring(22)+" "+f.substring(7,21));var g=a-d;if(g>86400000){f=""+Math.ceil(g/86400000)+" days"}else{if(g>3600000){f=""+Math.ceil(g/3600000)+" hours"}else{f=""+Math.ceil(g/60000)+" mins"}}b+="<li>"+h.text+"&nbsp;<a href='http://twitter.com/rmaclean/statuses/"+h.id+"'> about "+f+" ago</a></li>"});b+="</ul>";$("#twitterBlock").html(b)};
