text: /*! We Still Feel Fine Client JS v0.0.1 | Copyright 2013 Lauren Sperber https://github.com/lauren/we-still-feel-fine/blob/master/LICENSE | we-still-feel-fine 2014-02-26 */
  !function(){window.onload=function(){var a=io.connect(),b=[],c="ontouchstart"in window,d=function(){return Math.random()*document.documentElement.clientWidth-100},e=function(){return Math.random()*document.documentElement.clientHeight-100};setInterval(function(){var a=["Feelings are hard to find...","So many feelings...","Feeling painfully slow...","Interpreting feelings...","Feelings take time to grow...","I can't feel it yet...","Twitter rate limits make me feel sad..."];if(d3.select("#load-text").length>0){var b=Math.floor(Math.random()*a.length);d3.select("#load-text").transition().duration(200).text(a[b])}},2e3),a.on("feelingTweet",function(a){d3.select("#loading").length>0&&d3.select("#loading").transition().duration(200).style("opacity",0),b.push(a);var g,h=d3.select("svg"),k=h.selectAll("svg").data(b).enter().append("svg").attr({x:d(),y:e(),"data-feeling":a.feeling,"data-tweet":a.text,"data-user":a.user.screen_name,"data-userimage":a.user.profile_image_url,"data-tweetId":a.id_str,"data-feelingColor":a.feelingColor}).on("mouseenter",function(){c||i(this)}).on("mouseleave",function(){"selected"===this.id||c||f(this)}).on("click",function(){j(this)}),l=k.append("g");b.length>1e3&&(g=b.shift(),h.selectAll("svg").data([g],function(a){return a}).remove()),l.append("circle").attr({cx:100,cy:100,r:0,fill:a.feelingColor,"class":"circle"}).transition().duration(200).attr("r",20)}),setInterval(function(){var a=d3.select("svg").selectAll("svg"),b=Math.floor(Math.random()*a.length),c=a[b][0];if(c){var d=document.createEvent("SVGEvents");d.initEvent("click",!0,!0),c.dispatchEvent(d),h(c)}},4e3);var f=function(a){a=a?d3.select(a):d3.selectAll("g"),a.attr("id",""),a.selectAll("text").remove(),a.select("circle").attr("class","circle").transition().duration(200).attr("r",20)},g=function(){d3.select("#tweet-detail").transition().duration(200).style("display","none")},h=function(a){d3.select(a).append("text").text(a.dataset.feeling).attr({x:100,y:100,"alignment-baseline":"middle","text-anchor":"middle","class":"shadow"}),d3.select(a).append("text").text(a.dataset.feeling).attr({x:100,y:100,"alignment-baseline":"middle","text-anchor":"middle","class":"label"})},i=function(a){a.parentNode.appendChild(a),"selected"!==a.id&&(d3.select(a).select("circle").transition().duration(200).attr("r",60),h(a))},j=function(a){"selected"===a.id?(f(a),g()):(f(document.getElementById("selected")),a.parentNode.appendChild(a),d3.select(a).attr("id","selected"),d3.select(a).select("circle").transition().duration(200).attr("r",100),h(a),d3.select("#user-link").attr("href","http://twitter.com/"+a.dataset.user),d3.select("#user-image").attr("src",a.dataset.userimage),d3.select("#username-link").text(a.dataset.user).attr("href","http://twitter.com/"+a.dataset.user),d3.select("#tweet-text").html(": "+a.dataset.tweet+" "),d3.select("#tweet-link").attr("href","http://twitter.com/"+a.dataset.user+"/status/"+a.dataset.tweetId),d3.select("#tweet-detail").transition().duration(200).style("display","block"))}}}();