if(!window.OPENLIKE)window.OPENLIKE={assetHost:"http://openlike.org",util:{update:function(){for(var b=arguments[0],a=1,f=arguments.length,d;a<f;a++)for(d in arguments[a])b[d]=arguments[a][d];return b},escape:function(b){return(b==null?"":b).toString().replace(/[<>"&\\]/g,function(a){switch(a){case "<":return"&lt;";case ">":return"&gt;";case '"':return'"';case "&":return"&amp;";case "\\":return"\\\\";default:return a}})},notundef:function(b,a){return typeof b=="undefined"?a:b}}};
if(!OPENLIKE.Widget){OPENLIKE.Widget=function(b){var a,f,d,h,i,e,c;b=OPENLIKE.util.update({s:["facebook","hunch","digg","reddit","stumbleupon"],url:window.location.href,title:document.title,header:"Like this:",css:OPENLIKE.assetHost+"/v1/openlike.css",category:""},b);if(!OPENLIKE.Widget._initialized){OPENLIKE.Widget._initialized=true;if(b.css){d=document.createElement("LINK");d.rel="stylesheet";d.type="text/css";d.href=b.css;(document.getElementsByTagName("HEAD")[0]||document.body).appendChild(d)}}var g=
document.getElementsByTagName("SCRIPT");g=g[g.length-1];d=document.createElement("DIV");d.className="openlike";if(b.header){a=document.createElement("P");a.innerHTML=OPENLIKE.util.escape(b.header);d.appendChild(a)}h=document.createElement("UL");a=0;for(f=b.s.length;a<f;a++)if(c=OPENLIKE.Sources[b.s[a]]){c=OPENLIKE.prepSource(b.s[a],c);i=document.createElement("LI");if(c.html)e=c.html(b);else{e=document.createElement("A");e.className=c.klass;e.href="#";e.innerHTML=OPENLIKE.util.escape(c.name);if(c.title)e.title=
c.title;if(c.like)e.onclick=c.like(b);if(c.basicLink){e.href=c.basicLink(e,b);if(c.popup)e.onclick=function(j,k,l){return function(){window.open(j,k,l);return false}}(e.href,c.popup.target,c.popup.attrs);e.target=c.target}}i.appendChild(e);h.appendChild(i)}d.appendChild(h);g.parentNode.insertBefore(d,g);d=a=h=i=g=c=null};OPENLIKE.prepSource=function(b,a){a=OPENLIKE.util.update({},a);a.name=b;a.target=OPENLIKE.util.notundef(a.target,"_blank");a.klass="openlike-"+OPENLIKE.util.escape(b);if(a.popup){if(typeof a.popup!=
"object")a.popup={};a.popup.target=OPENLIKE.util.notundef(a.popup.target,"_blank");a.popup.attrs=OPENLIKE.util.notundef(a.popup.attrs,"width=360,height=360")}return a};OPENLIKE.Sources={digg:{url:"http://digg.com/",basicLink:function(b,a){b=encodeURIComponent(a.url);a=encodeURIComponent(a.title);return"http://digg.com/submit?phase=2&url="+b+"&title="+a},title:"Like this on Digg"},facebook:{html:function(b){var a=document.createElement("IFRAME");a.src="http://www.facebook.com/plugins/like.php?href="+
encodeURIComponent(b.url)+"&amp;layout=button_count&amp;show_faces=false&amp;width=53&amp;action=like&amp;colorscheme=light";OPENLIKE.util.update(a,{scrolling:"no",frameBorder:"0",allowTransparency:"true"});OPENLIKE.util.update(a.style,{border:"none",overflow:"hidden",width:"53px",height:"24px",padding:"1px 0 0 0"});return a},url:"http://facebook.com",basicLink:function(b,a){b=encodeURIComponent(a.url);a=encodeURIComponent(a.title);return"http://www.facebook.com/sharer.php?u="+b+"&t="+a}},google:{url:"http://google.com",
basicLink:function(b,a){b=encodeURIComponent(a.url);return"http://www.google.com/buzz/post?message="+encodeURIComponent("I like this... "+a.title)+"&url="+b},title:"Like this on Google Buzz"},hunch:{url:"http://hunch.com",basicLink:function(b,a){b=encodeURIComponent(a.url);var f=encodeURIComponent(a.title);a=a.type?"&category="+encodeURIComponent(a.type):"";return"http://hunch.com/openlike/?url="+b+"&title="+f+a},popup:{target:"_blank",attrs:"width=610,height=600"},title:"Add this to your Hunch taste profile"},
reddit:{url:"http://reddit.com/",basicLink:function(b,a){b=encodeURIComponent(a.url);a=encodeURIComponent(a.title);return"http://www.reddit.com/submit?url="+b+"&title="+a},title:"Like this on Reddit"},stumbleupon:{url:"http://www.stumbleupon.com/",basicLink:function(b,a){return"http://www.stumbleupon.com/submit?url="+encodeURIComponent(a.url)},title:"Like this on StumbleUpon"},twitter:{url:"http://twitter.com",basicLink:function(b,a){return"http://twitter.com/home?status="+encodeURIComponent("I like this: "+
a.url+" #openlike")},title:"Tweet this like"}}};
