var _gaq=_gaq||[];if(typeof TBZZ==="undefined"){var TBZZ={windows:{},jsc:(new Date).getTime(),encodeQueryData:function(b){var a=[];for(var c in b){a.push(encodeURIComponent(c)+"="+encodeURIComponent(b[c]))}return a.join("&")},fixTwitterProfileImage:function(a,b){a.src="http://api.twitter.com/1/users/profile_image/"+b+".js"},jsonP:function(c,a,e){var d=document.getElementsByTagName("head")[0]||document.documentElement;var b=document.createElement("script");var f=a;if(Object.prototype.toString.call(a)==="[object Function]"){f="tbzz"+TBZZ.jsc++;window[f]=window[f]||function(g){data=g;a.call(e||document,data);window[f]=undefined;try{delete window[f]}catch(h){}if(d){d.removeChild(b)}}}b.src=c+"&callback="+f;d.insertBefore(b,d.firstChild)},replaceHTML:function(a,c){try{a.innerHTML=c}catch(d){var b=document.createElement("div");b.innerHTML=c;a.innerHTML="";a.appendChild(b.firstChild);b=null}},getElementsByClassName:function(b,a,c){c=c||document;if(c.getElementsByClassName){getElementsByClassName=function(j,m,h){var d=h.getElementsByClassName(j),l=(m)?new RegExp("\\b"+m+"\\b","i"):null,e=[],g;for(var f=0,k=d.length;f<k;f+=1){g=d[f];if(!l||l.test(g.nodeName)){e.push(g)}}return e}}else{if(document.evaluate){getElementsByClassName=function(o,r,n){r=r||"*";var g=o.split(" "),p="",l="http://www.w3.org/1999/xhtml",q=(document.documentElement.namespaceURI===l)?l:null,h=[],d,f;for(var i=0,k=g.length;i<k;i+=1){p+="[contains(concat(' ', @class, ' '), ' "+g[i]+" ')]"}try{d=document.evaluate(".//"+r+p,n,q,0,null)}catch(m){d=document.evaluate(".//"+r+p,n,null,0,null)}while((f=d.iterateNext())){h.push(f)}return h}}else{getElementsByClassName=function(r,u,q){u=u||"*";var h=r.split(" "),t=[],d=(u==="*"&&q.all)?q.all:q.getElementsByTagName(u),p,j=[],o;for(var i=0,e=h.length;i<e;i+=1){t.push(new RegExp("(^|\\s)"+h[i]+"(\\s|$)"))}for(var g=0,s=d.length;g<s;g+=1){p=d[g];o=false;for(var f=0,n=t.length;f<n;f+=1){o=t[f].test(p.className);if(!o){break}}if(o){j.push(p)}}return j}}}return getElementsByClassName(b,a,c)}};TBZZ.Window=function(d){var g=this;if(typeof d==="string"){return TBZZ.windows[d]}if(typeof d.divId==="undefined"){return}var e,l,n,m=3,c,b,i=[],k=d.divId,a=document.getElementById(k),f='.tbbuzz_embed {  width: 290px;  height: 200px;  overflow: hidden;  background-color: #319BB3;  padding: 0px;  margin: 0px;  color: #a0a0a0;  text-decoration: none;  text-align: left;  font-family: Arial, sans-serif;  font-size: 8pt;  -moz-border-radius: 5px;   -webkit-border-radius: 5px;  position: relative;}.tbbuzz_embed a {  text-decoration:none;  color: #FB4F14;  display: inline;}.tbbuzz_embed img {  border:none;  padding:0px;  margin:0px;  display: inline;}.tbbuzz_header {  height: 16px;  margin: 3px;  color: white;  font-size: 9pt;  overflow: hidden;  font-weight: bold;}.tbbuzz_footer {  height: 16px;  margin: 4px;  font-size: 6pt;}.tbbuzz_social_buttons {  float:left;}.tbbuzz_footer_logo {  background-color:white;  -moz-border-radius: 3px;   -webkit-border-radius: 3px;  padding-left: 3px;  padding-right: 3px;  float: right;  height:16px;}.tbbuzz_score {  float: right;}.tbbuzzs {  height: 155px;  background-color: #ffffff;  overflow: hidden;  margin: 1px;  position: relative;}.tbbuzz {  border-bottom: 1px dotted #f0f0f0;  padding: 10px;  overflow: hidden;  position: relative;}.tbbuzz_profile {  width: 40px;  height: 40px;  margin: 5px;  float: left;}.tbbuzz_profile_image {  border:none;}.tbbuzz_message {  margin-left: 50px;  position: relative;}.tbbuzz_source {   position: relative;  top:-9px;  left:-5px;}',j='<div class="tbbuzz_embed" style="visibility:hidden">  <div class="tbbuzz_header"></div>  <div class="tbbuzzs"></div>  <div class="tbbuzz_footer">    <div class="tbbuzz_social_buttons">      <a href="" class="tbbuzz_tweet_this" target="_blank"><img alt="Twitter" src="http://thingbuzz.s3.amazonaws.com/images/icons/twitter.png" /></a>      <a href="" class="tbbuzz_fb_this" target="_blank"><img alt="Facebook" src="http://thingbuzz.s3.amazonaws.com/images/icons/facebook.png" /></a>    </div>    <div class="tbbuzz_footer_logo">      <a href="" class="tbbuzz_footer_logo_link" target="_blank"><img alt="Thingbuzz_logo_tiny" src="http://thingbuzz.com/images/thingbuzz_logo_tiny.png" /></a>    </div>    <div class="clear:both"></div>  </div></div>';this.opt=d;this.abt=null;this.abu=null;TBZZ.windows[k]=this;this.getCss=function(){var r=document.getElementsByTagName("head")[0];var o=document.createElement("style");o.setAttribute("title","tbBuzzStyles");o.setAttribute("type","text/css");if(o.styleSheet){o.styleSheet.cssText=f}else{o.appendChild(document.createTextNode(f))}r.appendChild(o);for(var q=0;q<document.styleSheets.length;q++){var p=document.styleSheets[q];if(p.title=="tbBuzzStyles"){e=p}}};this.getHtml=function(){if(a){TBZZ.replaceHTML(a,j)}};this.fadeIn=function(){if(l){clearTimeout(l)}var p=parseFloat(c.style.opacity);if(p<1){p=p+0.1;c.style.opacity=p;var o=Math.round(b*p);o=(o>b)?b:o;c.style.height=o+"px";c.style.filter="alpha(opacity = "+(p*100)+")";l=setTimeout(function(){g.fadeIn()},100)}else{n=setTimeout(function(){g.updateDisplay()},m*1000)}};this.loadDataHandler=function(t){var o=TBZZ.getElementsByClassName("tbbuzz_tweet_this",null,a)[0];o.href=g.tweetLink(t.link_url);var q=TBZZ.getElementsByClassName("tbbuzz_fb_this",null,a)[0];q.href=g.fbLink(t.link_url);var s=TBZZ.getElementsByClassName("tbbuzz_footer_logo",null,a)[0];TBZZ.replaceHTML(s,s.innerHTML+t.ga);var r=TBZZ.getElementsByClassName("tbbuzz_footer_logo_link",null,a)[0];r.href=t.logo_url;var u=TBZZ.getElementsByClassName("tbbuzz_embed",null,a)[0];u.onclick=new Function("window.location='"+t.logo_url+"'");if(!t.buzzes.length){return}for(var p=0;p<t.buzzes.length;p++){i.unshift(g.divFromBuzzData(t.buzzes[p]))}g.updateDisplay()};this.clearBuzzes=function(){var o=TBZZ.getElementsByClassName("tbbuzzs",null,a)[0];while(o.hasChildNodes()){o.removeChild(o.lastChild)}i=[]};this.loadData=function(){g.clearBuzzes();var o="http://thingbuzz.com/embed/buzz_data.js?";o=o+TBZZ.encodeQueryData(g.opt);TBZZ.jsonP(o,g.loadDataHandler,g)};this.divFromBuzzData=function(o){var p=document.createElement("div");p.setAttribute("class","tbbuzz");p.innerHTML=o.html;p.style.opacity="0.0";p.style.padding="10px";return p};this.updateDisplay=function(){if(n){clearTimeout(n)}var o=TBZZ.getElementsByClassName("tbbuzzs",null,a)[0];var q=o.firstChild;c=i.pop();if(!c){var p=o.lastChild;if(p==q){if(n){clearTimeout(n)}return}c=o.removeChild(p);c.style.opacity="0.0"}if(q){o.insertBefore(c,q)}else{o.appendChild(c)}b=c.offsetHeight-21;g.fadeIn()};this.tweetLink=function(o){if(o==""){o=window.location.href}return"http://twitter.com/home?status="+escape(o+" via @thingbuzz")};this.fbLink=function(o){if(o==""){o=window.location.href}return"http://www.facebook.com/sharer.php?u="+escape(o)};this.loadCustomizations=function(p){p=p||g.opt;var t=TBZZ.getElementsByClassName("tbbuzz_embed",null,a)[0];if(typeof p.width!="undefined"){if(p.width=="auto"){t.style.width="auto"}else{t.style.width=p.width+"px"}}if(typeof p.height!="undefined"){t.style.height=p.height+"px";var r=TBZZ.getElementsByClassName("tbbuzzs",null,a)[0];r.style.height=(t.offsetHeight-48)+"px"}if(typeof p.borderColor!="undefined"){t.style.backgroundColor=p.borderColor}if(typeof p.fontColor!="undefined"){t.style.color=p.fontColor}var o=TBZZ.getElementsByClassName("tbbuzzs",null,a)[0];if(typeof p.backgroundColor!="undefined"){o.style.backgroundColor=p.backgroundColor}if(typeof p.pause!="undefined"){m=p.pause}var s=TBZZ.getElementsByClassName("tbbuzz_header",null,a)[0];if(typeof p.title!="undefined"){TBZZ.replaceHTML(s,p.title)}if(typeof p.titleColor!="undefined"){s.style.color=p.titleColor}if(typeof p.linkColor!="undefined"){var q="#"+k+" .tbbuzz_embed a";if(e.insertRule){e.deleteRule(0);e.insertRule(q+" { text-decoration:none; color: "+p.linkColor+"; }",0)}else{if(e.addRule){e.removeRule(0);e.addRule(q,"text-decoration:none; color: "+p.linkColor+";",0)}}}};this.attachAbListener=function(){if(document.body.addEventListener){document.body.addEventListener("click",g.trackConversion,false)}else{if(document.body.attachEvent){document.body.attachEvent("onclick",g.trackConversion)}}};this.trackConversion=function(q){var o,p=new RegExp("(^|\\s)"+g.opt.abg+"(\\s|$)");if(!q){var q=window.event}o=q.target||q.srcElement;if(o.nodeType==3){o=o.parentNode}while(o){if(p.test(o.className)){g.trackPageview(g.abu+"/convert");o=null}else{o=o.parentNode}}};this.trackPageview=function(o){if(g.opt.abg){o=o+"?"+TBZZ.encodeQueryData({u:window.location});_gaq.push([g.opt.divId+"._trackPageview",o],["_trackPageview",o])}};this.visible=function(){if(!g.opt.abg){return true}var o=g.abt._getVisitorCustomVar(3);if(typeof o==="undefined"){o=Math.round(Math.random())?"visible":"hidden";_gaq.push([g.opt.divId+"._setCustomVar",3,g.opt.divId,o,1])}return o=="visible"};this.show=function(){TBZZ.getElementsByClassName("tbbuzz_embed",null,a)[0].style.visibility=""};if(document.getElementById&&document.createTextNode){this.getCss();this.getHtml();var h="#"+k+" .tbbuzz_embed a";if(e.insertRule){e.insertRule(h+" { text-decoration:none; color: "+d.linkColor+";}",0)}else{if(e.addRule){e.addRule(h,"text-decoration:none; color: "+d.linkColor+";",0)}}if(g.opt.abg){_gaq.push([g.opt.divId+"._setAccount",'UA-10579921-4'],function(){g.abt=_gat._getTrackerByName(g.opt.divId);g.loadCustomizations();if(g.visible()){g.loadData();g.show()}g.abu="/tbzz/"+g.opt.widgetId+"/"+g.abt._getVisitorCustomVar(3);g.attachAbListener();g.trackPageview(g.abu)})}else{this.loadCustomizations();this.loadData();this.show()}}}}if(typeof THINGBUZZ==="undefined"){var THINGBUZZ={Widget:{Init:function(a){if(typeof a.divId!="undefined"){a.thingId=a.divId.split("-")[1];if(!a.thingId){delete a.thingId}}return new TBZZ.Window(a)}}}};