
function JWGeckoBubble(){this.showBubble=function(options){if(!options){var options={};}
if(!options.color){options.color='purple';}
if(!options.username){options.username='jwgecko';}
switch(options.color){case'purple':options.bgcolor=options.bgcolor?options.bgcolor:'ebe7f2';break;case'green':options.bgcolor=options.bgcolor?options.bgcolor:'f1f7eb';break;case'orange':options.bgcolor=options.bgcolor?options.bgcolor:'f3f3e7';break;case'grey':options.bgcolor=options.bgcolor?options.bgcolor:'f0f1f1';break;}
options.bordercolor=options.bordercolor?options.bordercolor:'c5c6c8';if(typeof jQuery=='undefined'){this.writeJS("http://jwgecko.com/app/templates/default/js/jquery-1.3.2.min.js");}
this.writeJS("http://jwgecko.com/app/templates/default/js/curvycorners.js");this.writeJS("http://jwgecko.com/app/templates/default/js/jquery.twitter.min.js");this.loadCSSInline('div.bubble{width:auto; font:0.8em Lucida,Verdana,sans-serif; margin-bottom:24px}div.bubble blockquote{margin:0px; padding:0px; border:1px solid #c9c2c1; background-color:#FFF}div.bubble blockquote p, div.bubble blockquote h2{margin:10px; padding:0px; font-family:Lucida,Verdana,sans-serif}div.bubble cite{position:relative; margin:0px; padding:7px 0px 0px 15px; top:6px; background:transparent url(http://jwgecko.com/bubble/tip-'+options.color+'.gif) no-repeat 20px 0; font-style:normal}div.bubble div.rounded{border:3px solid #'+options.bordercolor+'; background-color:#'+options.bgcolor+'}div.bubble div.rounded blockquote{border:0; background-color:transparent}div.bubble div.rounded blockquote p{margin:5px 10px}div.bubble cite.round{position:relative; display:block; margin:-3px 0 0 0; padding:20px 0 0 25px; top:0; background:transparent url(http://jwgecko.com/bubble/tip-'+options.color+'.gif) no-repeat 15px 0}');document.write('<div id="twitterBubble"><div class="bubble"><div class="rounded"><blockquote id="twitter"></blockquote></div><cite class="round"><a href="http://www.jwgecko.com/index.cfm#what-is-search-engine-optimization"><img src="http://jwgecko.com/bubble/gecko-'+options.color+'.png" height="42" width="111" alt="" border="0" /></a></cite></div></div>');if(window.addEventListener){window.addEventListener('load',this.renderBubble,false);}
else{window.attachEvent('onload',this.renderBubble);}}
this.renderBubble=function(){roundCorners=function(){settings={tl:{radius:10},tr:{radius:10},bl:{radius:10},br:{radius:10},antiAlias:true,autoPad:true}
new curvyCorners(settings,"rounded").applyCornersToAll();}
$("#twitter").getTwitter({userName:"jwgecko",numTweets:5,loaderText:"Loading tweets...",slideIn:true,showHeading:true,headingText:"Latest Tweets",showProfileLink:true,callback:roundCorners});}
this.loadCSSInline=function(styles){var styleCSS=document.createTextNode(styles);var styleSheet=document.createElement("style");styleSheet.type='text/css';if(styleSheet.styleSheet){styleSheet.styleSheet.cssText=styleCSS.nodeValue;}
else{styleSheet.appendChild(styleCSS);}
document.getElementsByTagName("head")[0].appendChild(styleSheet);}
this.writeJS=function(path){var scripts=document.getElementsByTagName("script");var bubbleScript=scripts[scripts.length-1];var addScript=document.createElement('script');addScript.src=path;bubbleScript.parentNode.appendChild(addScript);}}