var Chirp=function(opts){var api={user:"http://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&count={{count}}&include_rts={{retweets}}&exclude_replies={{!replies}}&screen_name={{user}}",list:"http://api.twitter.com/1/{{user}}/lists/{{list}}/statuses.json?include_entities=true",search:"http://search.twitter.com/search.json?include_entities=true&q={{search}}"},options={retweets:!0,replies:!1,user:"mikemcalister",list:null,search:null,target:null,count:100,max:20,cacheExpire:12e4,success:function(){},error:function(){},templates:{base:'
{{tweets}}
',tweet:'

{{html}}

— via {{user.name}}'}},ext=function(e,t){for(var n in t)n in e&&(e[n]&&e[n].constructor==Object?ext(e[n],t[n]):e[n]=t[n])},ago=function(e){var t=new Date((e||"").replace(/(\d{1,2}[:]\d{2}[:]\d{2}) (.*)/,"$2 $1").replace(/(\+\S+) (.*)/,"$2 $1").replace(/-/g,"/")),n=((new Date).getTime()-t.getTime())/1e3,r=Math.floor(n/86400);if(isNaN(r)||r<0||r>=31)return;return r==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||r==1&&"Yesterday"||r<7&&r+" days ago"||r<31&&Math.ceil(r/7)+" weeks ago"},htmlify=function(e,t){var n=[],r=e,i={urls:function(e){return''+e.display_url+""},hashtags:function(e){return'#'+e.text+""},user_mentions:function(e){return'@'+e.screen_name+""},media:function(e){return''+e.display_url+""}};for(var s in t){u=t[s];if(t[s].length>0)for(var o=0,u;u=t[s][o];++o)n[u.indices[0]]={start:u.indices[0],end:u.indices[1],link:i[s](u)}}for(var o=n.length-1;o>=0;--o)n[o]!=undefined&&(r=r.substr(0,n[o].start)+n[o].link+r.substr(n[o].end,r.length-1));return r},toHTML=function(e){var t="",n=0;for(twt in e){e[twt].index=++n;e[twt].html=htmlify(e[twt].text,e[twt].entities);e[twt].time_ago=ago(e[twt].created_at);t+=render(options.templates.tweet,e[twt]);if(n==options.max)break}return render(options.templates.base,{tweets:t})},render=function(tpl,data){var output=tpl,dotData=function(d,dotKey){var invert="";if(dotKey.indexOf("!")>-1){dotKey=dotKey.replace(/!/ig,"");invert="!"}try{val=eval(invert+"d['"+dotKey.split(".").join("']['")+"']")}catch(e){val=""}return val},matches=tpl.match(/{{[^}}]*}}/igm);for(var i=0;i