// StockTwits Widget Version 2.0
STWT=window.STWT||{};
(function(){function g(){var a=[];this.add=function(b,c){a.push({name:b,value:c})};this.toString=function(){for(var b=[],c=0;c<a.length;c++)b[c]=encodeURIComponent(a[c].name)+"="+encodeURIComponent(a[c].value);return b.join("&")}}if(!(STWT&&STWT.Widget))STWT.Widget=function(a){a=a||{};var b=document.createElement("iframe"),c=new g;b.setAttribute("allowtranparency","true");b.setAttribute("frameBorder","0");b.setAttribute("border","0");b.setAttribute("style","border: 0");b.setAttribute("scrolling","no");
if(a.width){b.style.width=a.width+"px";c.add("width",a.width)}else{b.style.width="300px";c.add("width",300)}if(a.height){b.style.height=a.height+"px";c.add("height",a.height)}else{b.style.height="300px";c.add("height",300)}var e=["avatars","scrollbars","times","streaming","header","limit","title","partner","symbol","user","canned_stream"],f=["stream_option","message_option","footer_option","border_color","border_color_2","box_color","header_text_color","header_option","divider_color","stream_color",
"username_color","username_hover_color","username_font","username_size","divider_type","link_color","link_hover_color","link_ticker_color","link_ticker_hover_color","font","font_option","font_size","text_color","time_color","time_font_size"],d;if(a){for(d=0;d<e.length;d++)a[e[d]]!==undefined&&c.add(e[d],a[e[d]]);if(a.style)for(d=0;d<f.length;d++)a.style[f[d]]!==undefined&&c.add(f[d],a.style[f[d]])}c.add("domain",document.domain);b.setAttribute("src",(a.ssl?"https://":"http://")+"stocktwits.com/widgets/stream?"+
c.toString());document.getElementById(a.container||"stocktwits-widget").appendChild(b)}})();

