if(typeof(BitlyApi)=='undefined')var BitlyApi={};if(typeof(BitlyCB)=='undefined')var BitlyCB={};BitlyApi.loadScript=function(_src){var e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('type','text/javascript');e.setAttribute('src',_src);document.body.appendChild(e);};BitlyApi.loadCss=function(u){var e=document.createElement('link');e.setAttribute('type','text/css');e.setAttribute('href',u);e.setAttribute('rel','stylesheet');e.setAttribute('media','screen');try{document.getElementsByTagName('head')[0].appendChild(e);}catch(z){document.body.appendChild(e);}};BitlyApi.call=function(method,params,callback_method_name){var s="http://api.bit.ly/"+method;var url_args=[];if(callback_method_name)url_args.push("callback="+callback_method_name);for(var name in params){url_args.push(name+"="+encodeURIComponent(params[name]));};s+="?"+url_args.join("&");BitlyApi.loadScript(s);};var BitlyApiClient=function(login,apiKey,version){this.login=login||"stinkybeaumont";this.apiKey=apiKey||"R_d82290e6997145e81dbf10b495f5dffe";this.version=version||"2.0.1";};BitlyApiClient.prototype.googleVisRequired="This method requires the google visualization api. Please include javascript from: http://www.google.com/jsapi. More info: http://code.google.com/apis/visualization/documentation/index.html";BitlyApiClient.prototype.availableModules=['stats'];BitlyApiClient.prototype.loadingModules={};BitlyApiClient.prototype.moduleLoaded=function(module_name,callback_method_name){BitlyApiClient.prototype.loadingModules[module_name]=true;for(var mod in BitlyApiClient.prototype.loadingModules){if(!BitlyApiClient.prototype.loadingModules[mod]){return false;}};eval(callback_method_name+"();");};BitlyApiClient.prototype.loadModules=function(module_names,callback_method_name){for(var i=0;i<module_names.length;i++){BitlyApiClient.prototype.loadingModules[module_names[i]]=false;};for(var i=0;i<module_names.length;i++){var name=module_names[i];var callback_name="module_"+name+"_loaded";BitlyCB[callback_name]=function(){BitlyApiClient.prototype.moduleLoaded(name,callback_method_name);};var s="http://bit.ly/app/modules/"+name+".js?callback=BitlyCB."+callback_name;try{BitlyApi.loadScript(s);}catch(e){BitlyClient.addPageLoadEvent(function(){BitlyApi.loadScript(s);});}};try{BitlyApi.loadCss("http://bit.ly/static/css/javascript-modules.css");}catch(e){BitlyClient.addPageLoadEvent(function(){BitlyApi.loadCss("http://bit.ly/static/css/javascript-modules.css");});}};BitlyApiClient.prototype.addPageLoadEvent=function(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();};}};BitlyApiClient.prototype.extractBitlyHash=function(bitly_url_or_hash){if(bitly_url_or_hash==null){return null;}else{var m=bitly_url_or_hash.match(/\/([^\/]+)$/);if(m){return m[1];}else{return bitly_url_or_hash;}}};BitlyApiClient.prototype.createElement=function(element_type,attrs){var el=document.createElement(element_type);for(var k in attrs){if(k=="text"){el.appendChild(document.createTextNode(attrs[k]));}else{this.setAttribute(el,k,attrs[k]);}};return el;};BitlyApiClient.prototype.setAttribute=function(element,attribute_name,attribute_value){if(attribute_name=="class"){element.setAttribute("className",attribute_value);}return element.setAttribute(attribute_name,attribute_value);};BitlyApiClient.prototype.listen=function(elem,evnt,func){if(elem.addEventListener)elem.addEventListener(evnt,func,false);else if(elem.attachEvent){var r=elem.attachEvent("on"+evnt,func);return r;}};BitlyApiClient.prototype.targ=function(e){var targ;if(!e)var e=window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ;};BitlyApiClient.prototype.toggle=function(el){var e;if(typeof(el)=='string'){e=document.getElementById(el);if(typeof(e)==undefined){throw"toggle: No DOM element with id: "+el;return;}}else{e=el;}if(e.style.display=='none'){e.style.display='';}else{e.style.display='none';}};BitlyApiClient.prototype.call=function(method,params,callback_method_name){params['version']=this.version;params['login']=this.login;params['apiKey']=this.apiKey;return BitlyApi.call(method,params,callback_method_name);};BitlyApiClient.prototype.shorten=function(longUrl,callback_method_name){return this.call('shorten',{'longUrl':longUrl},callback_method_name);};BitlyApiClient.prototype.expand=function(shortUrl,callback_method_name){return this.call('expand',{'shortUrl':shortUrl},callback_method_name);};BitlyApiClient.prototype.info=function(bitly_hash,callback_method_name){var arr=bitly_hash.split(',');var hashes=[];for(var i=0;i<arr.length&&i<1;i++){hashes.push(this.extractBitlyHash(arr[i]));};return this.call('info',{'hash':hashes.join(',')},callback_method_name);};BitlyApiClient.prototype.stats=function(bitly_hash_or_url,callback_method_name){bitly_hash_or_url=this.extractBitlyHash(bitly_hash_or_url);return this.call('stats',{'hash':bitly_hash_or_url},callback_method_name);};var BitlyClient=new BitlyApiClient();(function(){window.RetweetJS={bitly_user:"stinkybeaumont",bitly_key:"R_d82290e6997145e81dbf10b495f5dffe",link_text:"<em>&#9851;</em>Retweet",count_type:"clicks",prefix:"RT @lizardoid "};var loadCount=1;if(typeof BitlyClient==="undefined"){var head=document.getElementsByTagName("head")[0]||document.documentElement;var script=document.createElement("script");script.src="http://bit.ly/javascript-api.js?version=latest&login="+RetweetJS.bitly_user+"&apiKey="+RetweetJS.bitly_key;script.charSet="utf-8";head.appendChild(script);var check=setInterval(function(){if(typeof BitlyCB!=="undefined"){clearInterval(check);head.removeChild(script);loaded();}},10);loadCount=0;}if(document.addEventListener){document.addEventListener("DOMContentLoaded",loaded,false);}else if(window.attachEvent){window.attachEvent("onload",loaded);}function loaded(){if(++loadCount<2){return;}var elems=[],urlElem={},hashURL={};BitlyCB.shortenResponse=function(data){for(var url in data.results){var hash=data.results[url].userHash;hashURL[hash]=url;var elems=urlElem[url];for(var i=0;i<elems.length;i++){elems[i].href+=hash;}if(RetweetJS.count_type==="clicks"){BitlyClient.stats(hash,'BitlyCB.statsResponse');}}};BitlyCB.statsResponse=function(data){var clicks=data.results.clicks,hash=data.results.userHash;var url=hashURL[hash],elems=urlElem[url];if(clicks>0){for(var i=0;i<elems.length;i++){var strong=document.createElement("strong");strong.appendChild(document.createTextNode(clicks+" "));elems[i].insertBefore(strong,elems[i].firstChild);if(/(^|\s)vert(\s|$)/.test(elems[i].className)){elems[i].firstChild.className=elems[i].lastChild.className="vert";}}}hashURL[hash]=urlElem[url]=null;};if(document.getElementsByClassName){elems=document.getElementsByClassName("retweet");}else{var tmp=document.getElementsByTagName("a");for(var i=0;i<tmp.length;i++){if(/(^|\s)retweet(\s|$)/.test(tmp[i].className)){elems.push(tmp[i]);}}}if(elems.length&&RetweetJS.styling){var style=document.createElement("style");style.type="text/css";try{style.appendChild(document.createTextNode(RetweetJS.styling));}catch(e){if(style.styleSheet){style.styleSheet.cssText=RetweetJS.styling;}}document.body.appendChild(style);}for(var i=0;i<elems.length;i++){var elem=elems[i];if(/(^|\s)self(\s|$)/.test(elem.className)){elem.href=window.location;elem.title=document.title;}var origText=elem.title||elem.textContent||elem.innerText,href=elem.href;elem.innerHTML="<span>"+RetweetJS.link_text+"</span>";elem.title="";elem.href="http://twitter.com/home?status="+encodeURIComponent(RetweetJS.prefix+origText+" http://bit.ly/");if(urlElem[href]){urlElem[href].push(elem);}else{urlElem[href]=[elem];BitlyClient.shorten(href,'BitlyCB.shortenResponse');}}}})();