var _gaq=_gaq||[];if(typeof TBZZ==="undefined"){var TBZZ={}}if(typeof TBZZ.noop==="undefined"){var TBZZ={embed_ga_id:TBZZ.embed_ga_id||"UA-10579921-4",growl_root_url:TBZZ.growl_root_url||"http://buzzgrowl.com/",root_url:TBZZ.root_url||"http://thingbuzz.com/",windows:{},jsc:(new Date).getTime(),createCookie:function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString()}else{var expires=""}document.cookie=name+"="+value+expires+"; path=/"},readCookie:function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length)}}return null},eraseCookie:function(name){createCookie(name,"",-1)},encodeQueryData:function(data){var ret=[];for(var d in data){ret.push(encodeURIComponent(d)+"="+encodeURIComponent(data[d]))}return ret.join("&")},fixTwitterProfileImage:function(source,screen_name){source.src="http://api.twitter.com/1/users/profile_image/"+screen_name+".js"},noop:function(){},attachCss:function(title,css){head=document.getElementsByTagName("head")[0];cssStyle=document.createElement("style");cssStyle.setAttribute("type","text/css");if(cssStyle.styleSheet){cssStyle.styleSheet.cssText=css}else{cssStyle.appendChild(document.createTextNode(css))}head.appendChild(cssStyle);return document.styleSheets[document.styleSheets.length-1]},bind:function(target,eventType,handler){if(target.addEventListener){target.addEventListener(eventType,handler,false)}else{if(target.attachEvent){target.attachEvent("on"+eventType,handler)}}},hasClass:function(target,className){var re=new RegExp("\\s"+className+"\\s"),classes=" "+target.className+" ";return !!classes.match(re)},jsonP:function(url,cb,context,cb_name){var head=document.getElementsByTagName("head")[0]||document.documentElement;var script=document.createElement("script");if(Object.prototype.toString.call(cb)==="[object Function]"){cb_name=cb_name||"tbzz"+TBZZ.jsc++;window[cb_name]=window[cb_name]||function(tmp){data=tmp;cb.call(context||document,data);window[cb_name]=undefined;try{delete window[cb_name]}catch(e){}if(head){head.removeChild(script)}}}else{cb_name=cb}cb_param=url.indexOf("?")==-1?"?callback=":"&callback=";script.src=url+cb_param+cb_name;head.insertBefore(script,head.firstChild)},replaceHTML:function(container,content){try{container.innerHTML=content}catch(e){var newDiv=document.createElement("div");newDiv.innerHTML=content;container.innerHTML="";container.appendChild(newDiv.firstChild);newDiv=null}},nextElementSibling:function(start){var i=start.nextSibling;while(i&&i.nodeType!=1){i=i.nextSibling}return i},previousElementSibling:function(start){var i=start.previousSibling;while(i&&i.nodeType!=1){i=i.previousSibling}return i},prettyDate:function(time){var date=new Date((time||"").replace("T"," ").replace("Z"," UTC").replace(/[+-]\d{2}:\d{2}/," $&").replace(/^(\d{4})-(\d{2})-(\d{2})/,"$1/$2/$3")),diff=(((new Date()).getTime()-date.getTime())/1000),day_diff=Math.floor(diff/86400);if(isNaN(day_diff)||day_diff<0||day_diff>=31){return}return day_diff==0&&(diff<60&&"just now"||diff<120&&"1 minute ago"||diff<3600&&Math.floor(diff/60)+" minutes ago"||diff<7200&&"1 hour ago"||diff<86400&&Math.floor(diff/3600)+" hours ago")||day_diff==1&&"Yesterday"||day_diff<7&&day_diff+" days ago"||day_diff==7&&"1 week ago"||day_diff<31&&Math.ceil(day_diff/7)+" weeks ago"},prettifyDates:function(root){var abbrs=TBZZ.getElementsByClassName("pretty_date","abbr",root);for(var i=0;i<abbrs.length;i++){var pretty=TBZZ.prettyDate(abbrs[i].title);if(pretty){TBZZ.replaceHTML(abbrs[i],pretty)}}return root},getElementsByClassName:function(className,tag,elm){elm=elm||document;if(elm.getElementsByClassName){getElementsByClassName=function(className,tag,elm){var elements=elm.getElementsByClassName(className),nodeName=(tag)?new RegExp("\\b"+tag+"\\b","i"):null,returnElements=[],current;for(var i=0,il=elements.length;i<il;i+=1){current=elements[i];if(!nodeName||nodeName.test(current.nodeName)){returnElements.push(current)}}return returnElements}}else{if(document.evaluate){getElementsByClassName=function(className,tag,elm){tag=tag||"*";var classes=className.split(" "),classesToCheck="",xhtmlNamespace="http://www.w3.org/1999/xhtml",namespaceResolver=(document.documentElement.namespaceURI===xhtmlNamespace)?xhtmlNamespace:null,returnElements=[],elements,node;for(var j=0,jl=classes.length;j<jl;j+=1){classesToCheck+="[contains(concat(' ', @class, ' '), ' "+classes[j]+" ')]"}try{elements=document.evaluate(".//"+tag+classesToCheck,elm,namespaceResolver,0,null)}catch(e){elements=document.evaluate(".//"+tag+classesToCheck,elm,null,0,null)}while((node=elements.iterateNext())){returnElements.push(node)}return returnElements}}else{getElementsByClassName=function(className,tag,elm){tag=tag||"*";var classes=className.split(" "),classesToCheck=[],elements=(tag==="*"&&elm.all)?elm.all:elm.getElementsByTagName(tag),current,returnElements=[],match;for(var k=0,kl=classes.length;k<kl;k+=1){classesToCheck.push(new RegExp("(^|\\s)"+classes[k]+"(\\s|$)"))}for(var l=0,ll=elements.length;l<ll;l+=1){current=elements[l];match=false;for(var m=0,ml=classesToCheck.length;m<ml;m+=1){match=classesToCheck[m].test(current.className);if(!match){break}}if(match){returnElements.push(current)}}return returnElements}}}return getElementsByClassName(className,tag,elm)}};TBZZ.Growl=function(opt){var that=this,our_url="http://buzzgrowl.com/",our_tagline="I am using BuzzGrowl to see the buzz around the web. Join me!";_gaq.push(["tbzz_growl._setAccount",TBZZ.embed_ga_id]);if(typeof opt=="undefined"){this.opt={}}else{this.opt=opt}_gaq.push(["tbzz_growl._setCustomVar",1,"Token",this.opt.token||"none",1]);if(!this.opt.domain){this.opt.domain=window.location.hostname}if(!this.opt.animation){this.opt.animation="fly"}if(!this.opt.animateWhen){this.opt.animateWhen="top"}if(!this.opt.theme){this.opt.theme="auto"}if(!this.opt.delay){this.opt.delay=1000}if(!this.opt.view){this.opt.view="show"}this.divFromBuzzData=function(buzz){var newDiv=document.createElement("div");newDiv.setAttribute("class","buzz_growl");TBZZ.replaceHTML(newDiv,buzz.html);TBZZ.prettifyDates(newDiv);return newDiv};this.init=function(){that.trackEvent("init",window.location.href);TBZZ.jsonP(TBZZ.growl_root_url+"buzz_growls.js?"+TBZZ.encodeQueryData(that.opt),function(data){that.opt=data.opt;that.buzz_growl=that.divFromBuzzData(data);TBZZ.bind(that.buzz_growl,"click",that.click);TBZZ.bind(that.buzz_growl,"mouseover",that.hover);TBZZ.bind(that.buzz_growl,"mouseout",that.mouseOut);document.body.appendChild(that.buzz_growl);that.offset=0;that.growls=TBZZ.getElementsByClassName("growl","div",that.buzz_growl);if(that.growls.length){that.offset=parseInt(TBZZ.readCookie("__tbzz_growl")||"0")||0;that.offset=(that.offset+1)%that.growls.length;that.growl=that.growls[that.offset];that.growl.style.display="block";if(that.offset<0){that.hide()}else{that.show()}}if(that.opt.animation!="none"){if(that.opt.animation=="fly"){that.buzz_growl.style.right=-that.buzz_growl.offsetWidth-10+"px"}that.animationTimer=null;TBZZ.bind(window,"scroll",that.scroll);that.scroll()}if(that.opt.theme=="auto"){var color=[];if(document.body.currentStyle){var colorString=document.body.currentStyle.color.substring(1);var clen=colorString.length/3;for(var i=0;i<2;i++){color.push(parseInt(colorString.substr(i*clen,clen),16))}}else{color=document.defaultView.getComputedStyle(document.body,null)["color"].slice(4,-1).split(", ")}that.opt.theme="dark";for(var i=0;i<2;i++){if(parseInt(color[i])<128){that.opt.theme="light"}}}that.buzz_growl.className=that.buzz_growl.className+" tb_"+that.opt.theme},null,"tbzz_handle_growls")};this.scroll=function(){var scrollTop=document.body.scrollTop||document.documentElement.scrollTop;if(that.opt.animateWhen=="bottom"){var windowHeight=document.compatMode==="CSS1Compat"&&document.documentElement.clientHeight||document.body.clientHeight;if(scrollTop>(document.body.offsetHeight-windowHeight-100)){that[that.opt.animation+"In"]()}else{that[that.opt.animation+"Out"]()}}else{if(that.opt.animateWhen=="top"){if(scrollTop>100){that[that.opt.animation+"Out"]()}else{that[that.opt.animation+"In"]()}}}},this.fadeIn=function(){var fade=parseFloat(that.buzz_growl.style.opacity)||0;if(fade<1){clearTimeout(that.animationTimer);fade=fade+0.1;that.buzz_growl.style.opacity=fade.toFixed(1);that.buzz_growl.style.filter="alpha(opacity = "+(fade*100)+")";that.animationTimer=setTimeout(that.fadeIn,100)}else{that.buzz_growl.style.opacity=1;that.buzz_growl.style.filter="alpha(opacity = 100)"}},this.fadeOut=function(){var fade=parseFloat(that.buzz_growl.style.opacity);if(fade>0){clearTimeout(that.animationTimer);fade=fade-0.1;that.buzz_growl.style.opacity=fade.toFixed(1);that.buzz_growl.style.filter="alpha(opacity = "+(fade*100)+")";that.animationTimer=setTimeout(that.fadeOut,100)}else{that.buzz_growl.style.opacity=0;that.buzz_growl.style.filter="alpha(opacity = 0)"}},this.flyIn=function(){var pos=parseInt(that.buzz_growl.style.right);if(pos<0){clearTimeout(that.animationTimer);that.animationTimer=setTimeout(that.flyIn,10);that.buzz_growl.style.right=pos+10+"px"}else{that.buzz_growl.style.right="0px"}},this.flyOut=function(){var pos=parseInt(that.buzz_growl.style.right);if(pos>-that.buzz_growl.offsetWidth-10){clearTimeout(that.animationTimer);that.animationTimer=setTimeout(that.flyOut,10);that.buzz_growl.style.right=pos-10+"px"}else{that.buzz_growl.style.right=-that.buzz_growl.offsetWidth-10+"px"}},this.growlId=function(){return that.growl?that.growl.getAttribute("data-id"):"-"},this.hover=function(){if(that.growls.length>1){that.byClass("tb_next").style.display="block";that.byClass("tb_previous").style.display="block"}};this.mouseOut=function(){if(that.growls.length>1){that.byClass("tb_next").style.display="none";that.byClass("tb_previous").style.display="none"}};this.click=function(event){event=event||window.event;var target=event.target||event.srcElement;that.trackEvent("click",target.className||"unknown");switch(true){case (TBZZ.hasClass(target,"tb_close")):that.hide(event);break;case (TBZZ.hasClass(target,"tb_code")):that.selectCode(event);break;case (TBZZ.hasClass(target,"tb_facebook")):var url="http://www.facebook.com/sharer.php?u="+encodeURIComponent(window.location.href)+"&t="+encodeURIComponent(document.title);window.open(url,"share","width=800,height=600,resizable,scrollbars");break;case (TBZZ.hasClass(target,"tb_twitter")):var url="http://twitter.com/share?text="+encodeURIComponent(document.title)+"&url="+encodeURIComponent(window.location.href)+"&via=buzzgrowl";window.open(url,"share","width=800,height=600,resizable,scrollbars");break;case (TBZZ.hasClass(target,"tb_retweet")):var url="http://twitter.com/home?status="+encodeURIComponent(that.growl.getAttribute("data-retweet"));window.open(url,"share","width=800,height=600,resizable,scrollbars");break;case (TBZZ.hasClass(target,"tb_fb_us")):var url="http://www.facebook.com/sharer.php?u="+encodeURIComponent(our_url)+"&t="+encodeURIComponent(our_tagline);window.open(url,"share","width=800,height=600,resizable,scrollbars");break;case (TBZZ.hasClass(target,"tb_tweet_us")):var url="http://twitter.com/share?text="+encodeURIComponent(our_tagline.replace("BuzzGrowl","@buzzgrowl"))+"&url="+encodeURIComponent(our_url);window.open(url,"share","width=800,height=600,resizable,scrollbars");break;case (TBZZ.hasClass(target,"tb_logo")):if(that.byClass("tb_minimized").style.display=="block"){that.show(event)}else{that.info(event)}break;case (TBZZ.hasClass(target,"tb_next")):that.nextGrowl(event);break;case (TBZZ.hasClass(target,"tb_previous")):that.previousGrowl(event);break;case (TBZZ.hasClass(target,"tb_open")):if(that.growl){that.show(event)}break;case (TBZZ.hasClass(target,"tb_profile_img")):break;default:if(that.offset&&that.offset>0){that.offset-=1;TBZZ.createCookie("__tbzz_growl",that.offset.toString())}window.location=that.growl.getAttribute("data-url");break}return false};this.nextGrowl=function(){var last=that.growl,peek=TBZZ.nextElementSibling(that.growl);if(peek){that.offset++;that.growl=peek;last.style.display="none";that.growl.style.display="block";TBZZ.createCookie("__tbzz_growl",that.offset.toString())}else{TBZZ.jsonP(that.growl.getAttribute("data-next")+"&"+TBZZ.encodeQueryData(that.opt),function(data){var newDiv=document.createElement("div");TBZZ.replaceHTML(newDiv,data.html);TBZZ.prettifyDates(newDiv);var newGrowls=TBZZ.getElementsByClassName("growl","div",newDiv);var growls=that.byClass("growls");for(var i=1;i<newGrowls.length;i++){growls.appendChild(newDiv.removeChild(newGrowls[i]))}if(newGrowls.length>1){that.nextGrowl()}else{that.offset=0;that.growl=TBZZ.getElementsByClassName("growl","div",that.buzz_growl)[that.offset];last.style.display="none";that.growl.style.display="block";TBZZ.createCookie("__tbzz_growl",that.offset.toString())}})}};this.previousGrowl=function(){that.growl.style.display="none";that.growl=TBZZ.previousElementSibling(that.growl);that.offset--;if(!that.growl){var growls=TBZZ.getElementsByClassName("growl","div",that.buzz_growl);that.offset=growls.length-1;that.growl=growls[that.offset]}that.growl.style.display="block";TBZZ.createCookie("__tbzz_growl",that.offset.toString())};this.selectCode=function(){that.trackEvent("selectCode",that.growlId());that.byClass("tb_code").select()};this.info=function(){var infobox=that.byClass("tb_infobox");if(infobox.style.display=="none"){infobox.style.display="block"}else{infobox.style.display="none"}};this.show=function(){that.trackEvent("show",that.growlId());that.byClass("tb_minimized").style.display="none";that.byClass("tb_maximized").style.display="block";TBZZ.createCookie("__tbzz_growl",that.offset.toString())};this.hide=function(){that.trackEvent("hide",that.growlId());that.byClass("tb_maximized").style.display="none";that.byClass("tb_minimized").style.display="block";TBZZ.createCookie("__tbzz_growl","-1")};this.byClass=function(className){return TBZZ.getElementsByClassName(className,null,that.buzz_growl)[0]};this.trackEvent=function(){var data=["tbzz_growl._trackEvent","Growl"];for(var i=0;i<arguments.length;i++){data.push(arguments[i])}_gaq.push(data)};TBZZ.attachCss("tbBuzzGrowlStyles",'.buzz_growl span.tb_fb_us,.buzz_growl span.tb_tweet_us{background:url(http://thingbuzz.s3.amazonaws.com/images/sharing.png);cursor:pointer;text-indent:-999999px;float:right;vertical-align:baseline;margin-right:5px;}.buzz_growl span.tb_fb_us{height:18px;width:59px;margin-top:1px;}.buzz_growl span.tb_tweet_us{background-position:0 -18px;height:20px;width:55px;}.buzz_growl div{width:auto;}.buzz_growl{box-shadow:0 0 10px #383838;-moz-box-shadow:0 0 10px #383838;-webkit-box-shadow:0 0 10px #383838;position:fixed;bottom:0;right:0;padding:5px;z-index:2147483647;text-align:left;font-size:10px;line-height:1.5;opacity:.9;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";filter:alpha(opacity=90);width:auto;}.buzz_growl a{background:none;border:none;color:#0084B4;font-size:10px;padding:0;text-decoration:none;}.buzz_growl.tb_light{background-color:#fff;color:#383838;}.buzz_growl.tb_dark{background-color:#000;color:#838383;}.buzz_growl .tb_maximized{width:280px;}.buzz_growl .tb_title{margin-bottom:5px;font-weight:bold;}.buzz_growl .tb_profile_image{float:left;width:40px;height:40px;padding-left:10px;}.buzz_growl .tb_message{overflow:hidden;word-wrap:break-word;margin-right:7px;margin-bottom:10px;}.buzz_growl .tb_footer,.buzz_growl .tb_footer a,.buzz_growl .tb_infobox{font-family:Arial,sans-serif;letter-spacing:normal;}.buzz_growl .tb_footer{clear:both;}.buzz_growl .tb_close,.buzz_growl .tb_open,.buzz_growl .tb_previous,.buzz_growl .tb_next{font-size:16px;font-family:Arial,sans-serif;line-height:.5;cursor:pointer;}.buzz_growl .tb_previous,.buzz_growl .tb_next{position:absolute;bottom:30px;padding:5px;z-index:10;box-shadow:0 0 10px #383838;-moz-box-shadow:0 0 10px #383838;-webkit-box-shadow:0 0 10px #383838;}.buzz_growl .tb_previous{left:0;}.buzz_growl .tb_next{right:0;}.buzz_growl .tb_close{float:right;}.buzz_growl .tb_open{font-size:12px;vertical-align:middle;}.buzz_growl .tb_by{float:right;font-size:10px;}.buzz_growl .tb_footer img{cursor:pointer;height:16px;width:16px;vertical-align:middle;}.buzz_growl img.tb_logo{width:71px;}.buzz_growl .tb_infobox{border-bottom:1px #c0c0c0 dashed;padding-bottom:10px;margin-bottom:5px;clear:both;width:280px;}.buzz_growl .tb_minimized{text-align:right;}.buzz_growl input.code{border:1px solid #BBB;height:18px;padding:1px;}.buzz_growl img{display:inline;margin:0;float:none;border:none;}');TBZZ.jsonP(TBZZ.growl_root_url+"buzz_growls/ping.js?"+TBZZ.encodeQueryData(that.opt),function(data){document.createElement("img").src=data.src;_gaq.push(["tbzz_growl._setCustomVar",2,"U",data.u,1])},null,"tbzz_handle_ping");setTimeout(that.init,that.opt.delay)};TBZZ.Window=function(opt){var that=this;if(typeof opt==="string"){return TBZZ.windows[opt]}if(typeof opt.divId==="undefined"){return}var sStyleSheet,fadeTimer,updateTimer,pause=3,buzz,buzzHeight,buzzDivs=[],divId=opt.divId,div=document.getElementById(divId),sCss=".tbbuzz_embed{width:290px;height:200px;overflow:hidden;background-color:#319BB3;padding:0;margin:0;color:#a0a0a0;text-decoration:none;text-align:left;font-size:11px;-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:0;margin:0;display:inline;}.tbbuzz_embed .pretty_date{opacity:.5;}.tbbuzz_header{height:16px;margin:3px;color:white;font-size:12px;overflow:hidden;font-weight:bold;}.tbbuzz_footer{height:16px;margin:4px;font-size:8px;}.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:#fff;overflow:hidden;margin:1px;position:relative;-moz-border-radius:4px;-webkit-border-radius:4px;}.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;}",sHtml='<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.s3.amazonaws.com/images/icons/thingbuzz_logo_tiny.png" /></a> </div> <div class="clear:both"></div> </div> </div> ';this.opt=opt;TBZZ.windows[divId]=this;this.getHtml=function(){if(div){TBZZ.replaceHTML(div,sHtml)}};this.fadeIn=function(){if(fadeTimer){clearTimeout(fadeTimer)}var fade=parseFloat(buzz.style.opacity);if(fade<1){fade=fade+0.1;buzz.style.opacity=fade;var h=Math.round(buzzHeight*fade);h=(h>buzzHeight)?buzzHeight:h;buzz.style.height=h+"px";buzz.style.filter="alpha(opacity = "+(fade*100)+")";fadeTimer=setTimeout(function(){that.fadeIn()},100)}else{updateTimer=setTimeout(function(){that.updateDisplay()},pause*1000)}};this.loadDataHandler=function(buzzData){var tweet_this=TBZZ.getElementsByClassName("tbbuzz_tweet_this",null,div)[0];tweet_this.href=that.tweetLink(buzzData.link_url);var fb_this=TBZZ.getElementsByClassName("tbbuzz_fb_this",null,div)[0];fb_this.href=that.fbLink(buzzData.link_url);var logo=TBZZ.getElementsByClassName("tbbuzz_footer_logo",null,div)[0];TBZZ.replaceHTML(logo,logo.innerHTML+buzzData.ga);var logo_link=TBZZ.getElementsByClassName("tbbuzz_footer_logo_link",null,div)[0];logo_link.href=buzzData.logo_url;var embed=TBZZ.getElementsByClassName("tbbuzz_embed",null,div)[0];embed.onclick=new Function("window.location='"+buzzData.logo_url+"'");if(!buzzData.buzzes.length){return}for(var i=0;i<buzzData.buzzes.length;i++){var buzz=that.divFromBuzzData(buzzData.buzzes[i]);buzzDivs.unshift(buzz);TBZZ.prettifyDates(buzz)}that.updateDisplay()};this.clearBuzzes=function(){var buzzs_div=TBZZ.getElementsByClassName("tbbuzzs",null,div)[0];while(buzzs_div.hasChildNodes()){buzzs_div.removeChild(buzzs_div.lastChild)}buzzDivs=[]};this.loadData=function(){that.clearBuzzes();var url=TBZZ.root_url+"embed/buzz_data.js?"+TBZZ.encodeQueryData(that.opt);TBZZ.jsonP(url,that.loadDataHandler,that)};this.divFromBuzzData=function(b){var newDiv=document.createElement("div");newDiv.setAttribute("class","tbbuzz");newDiv.innerHTML=b.html;newDiv.style.opacity="0.0";newDiv.style.padding="10px";return newDiv};this.updateDisplay=function(){if(updateTimer){clearTimeout(updateTimer)}var buzzs_div=TBZZ.getElementsByClassName("tbbuzzs",null,div)[0];var first=buzzs_div.firstChild;buzz=buzzDivs.pop();if(!buzz){var last=buzzs_div.lastChild;if(last==first){if(updateTimer){clearTimeout(updateTimer)}return}buzz=buzzs_div.removeChild(last);buzz.style.opacity="0.0"}if(first){buzzs_div.insertBefore(buzz,first)}else{buzzs_div.appendChild(buzz)}buzzHeight=buzz.offsetHeight-21;that.fadeIn()};this.tweetLink=function(url){if(url==""){url=window.location.href}return"http://twitter.com/home?status="+escape(url+" via @thingbuzz")};this.fbLink=function(url){if(url==""){url=window.location.href}return"http://www.facebook.com/sharer.php?u="+escape(url)};this.loadCustomizations=function(opt){opt=opt||that.opt;var embed=TBZZ.getElementsByClassName("tbbuzz_embed",null,div)[0];if(typeof opt.width!="undefined"){if(opt.width=="auto"){embed.style.width="auto"}else{embed.style.width=opt.width+"px"}}var heightAdjust=48;var header=TBZZ.getElementsByClassName("tbbuzz_header",null,div)[0];if(typeof opt.title!="undefined"&&opt.title.length){TBZZ.replaceHTML(header,opt.title);header.style.display="block"}else{heightAdjust=26;header.style.display="none"}if(typeof opt.height!="undefined"||typeof opt.title=="undefined"||!opt.title.length){if(typeof opt.height!="undefined"){embed.style.height=opt.height+"px"}var buzzs=TBZZ.getElementsByClassName("tbbuzzs",null,div)[0];buzzs.style.height=(embed.offsetHeight-heightAdjust)+"px"}if(typeof opt.borderColor!="undefined"){embed.style.backgroundColor=opt.borderColor}if(typeof opt.fontColor!="undefined"){embed.style.color=opt.fontColor}var buzzs_div=TBZZ.getElementsByClassName("tbbuzzs",null,div)[0];if(typeof opt.backgroundColor!="undefined"){buzzs_div.style.backgroundColor=opt.backgroundColor}if(typeof opt.pause!="undefined"){pause=opt.pause}if(typeof opt.titleColor!="undefined"){header.style.color=opt.titleColor}if(typeof opt.linkColor!="undefined"){var rule="#"+divId+" .tbbuzz_embed a";if(sStyleSheet.insertRule){sStyleSheet.deleteRule(0);sStyleSheet.insertRule(rule+" { text-decoration:none; color: "+opt.linkColor+"; }",0)}else{if(sStyleSheet.addRule){sStyleSheet.removeRule(0);sStyleSheet.addRule(rule,"text-decoration:none; color: "+opt.linkColor+";",0)}}}};this.show=function(){TBZZ.getElementsByClassName("tbbuzz_embed",null,div)[0].style.visibility=""};if(document.getElementById&&document.createTextNode){sStyleSheet=TBZZ.attachCss("tbBuzzStyles",sCss);this.getHtml();var rule="#"+divId+" .tbbuzz_embed a";if(sStyleSheet.insertRule){sStyleSheet.insertRule(rule+" { text-decoration:none; color: "+opt.linkColor+";}",0)}else{if(sStyleSheet.addRule){sStyleSheet.addRule(rule,"text-decoration:none; color: "+opt.linkColor+";",0)}}this.loadCustomizations();this.loadData();this.show()}}}if(typeof THINGBUZZ==="undefined"){var THINGBUZZ={Widget:{Init:function(opt){if(typeof opt.divId!="undefined"){opt.thingId=opt.divId.split("-")[1];if(!opt.thingId){delete opt.thingId}}return new TBZZ.Window(opt)}}}};
