var SHR4P_init=function(){SHR4P.debug("SHR4P_init called");if(SHR4P.init)SHR4P.debug("SHR4P_init returning because already loaded");else{SHR4P.init=true;SHR4P.jQuery=jQuery.noConflict(true);(function(b){SHR4P.debug("initializing shareaholic_publishers plugin");b.fn.shareaholic_publishers=function(c){var a=b.extend({v:1,src:"http://www.shareaholic.com",mode:"inject",service:"",apikey:"",link:"",title:"",notes:"",expand:true,duration:400,rel:"nofollow",target:"_blank",twitter_template:"${title} - ${short_link} via @Shareaholic",
showShareCount:true,tags:"",allowExternalTags:true,category:"",ctype:"",short_link:"",shortener:"google",shortener_key:"",custom_link:{},bgimg:"",bgimg_padding:"0 0 0 0",center:false,spaced:false,iframe_src:"/publishers",spriteimg:"",share_src:"http://www.shareaholic.com",localize:false,li_margin:0,"margin-top":20,"margin-bottom":20,"margin-left":0,"bgimg-padding-top":0,"bgimg-padding-left":0,"icon-width":60,"icon-height":29,"icon-margin-top":3,"promo-height":c.shrlink?18:0,shrlink:false},c);SHR4P.debug("$.fn.shareaholic_publishers called");
SHR4P.debug(a);if(b.browser.msie&&b.browser.version<"7.0")a["icon-height"]+=4;if(!a.link)a.link=document.location.href;if(a.bgimg!=null){c=b.trim(a.bgimg_padding).split(" ");a["bgimg-padding-top"]=c[0]?Number(c[0].replace(/[a-zA-Z]+/,"")):0;a["bgimg-padding-left"]=c[3]?Number(c[3].replace(/[a-zA-Z]+/,"")):0;a["margin-left"]=10}if(a.localize)a.iframe_src="/publishers.html";var j=function(){var e=0;if(!b.isEmptyObject(a.custom_link))e=b(a.custom_link).length;return a.service.split(",").length+e},n=
function(){return a["margin-left"]+a["bgimg-padding-left"]},m=function(e){return Math.ceil(j()/Math.floor((e-n())/a["icon-width"]))},i=function(e){return a.expand?a["margin-top"]+a["bgimg-padding-top"]+a["icon-height"]+a["icon-margin-top"]+(m(e)==1?a["promo-height"]:0):l(e)},l=function(e){return a["margin-top"]+a["bgimg-padding-top"]+(a["icon-height"]+a["icon-margin-top"])*m(e)+a["promo-height"]},d=function(e){SHR4P.debug("centering");var f=0;if(m(e)==1){SHR4P.debug("one row! do centering");f=(e-
n()-j()*a["icon-width"])/2;SHR4P.debug("returning "+f+" margin")}return f},g=function(e){SHR4P.debug("spacing");SHR4P.debug("rows: "+m(e));var f=0;if(m(e)==1){SHR4P.debug("one row! spacing icons");f=Math.floor((e-n()-a["icon-width"]*j())/j());SHR4P.debug("returning "+f+" margin")}return f};this.each(function(){if(a.spaced)a.li_margin=g(b(this).width());var e={src:a.src,service:a.service,apikey:a.apikey,link:a.link,title:a.title,notes:a.notes,bgimg:a.bgimg,bgimg_padding:a.bgimg_padding,rel:a.rel,target:a.target,
twitter_template:a.twitter_template,localize:a.localize,share_src:a.share_src,spriteimg:a.spriteimg,tags:a.tags,allowExternalTags:a.allowExternalTags,category:a.category,ctype:a.ctype,custom_link:a.custom_link,li_margin:a.li_margin,short_link:a.short_link,shortener:a.shortener,shortener_key:a.shortener_key,shrlink:a.shrlink,expand:a.expand,showShareCount:a.showShareCount};a.center&&b(this).css({"margin-left":d(b(this).width())});a.mode=="inject"?b(this).shareaholic(e):b(this).append(b('<iframe frameborder="0"/>').attr({src:[a.src+
a.iframe_src,b.param(e)].join("?"),height:i(b(this).width()),width:b(this).width(),scrolling:"no","class":"share-iframe"}).css({height:l(b(this).width())}));if(a.expand){b(this).css({overflow:"hidden",height:i(b(this).width())});b(this).hover(function(){b(this).animate({height:l(b(this).width())},{duration:a.duration,queue:false})},function(){b(this).animate({height:i(b(this).width())},{duration:a.duration,queue:false})})}});return this};var h=function(c,a){var j=function(){SHR4P.debug("bitly javascript loaded");
var l=c.link;BitlyCB.mycallback=function(d){SHR4P.debug("bit.ly calls back with");SHR4P.debug(d);if(d.errorCode==0){SHR4P.debug("successfully shortened, calling callback with: ");d=d.results[l].shortUrl;SHR4P.debug("short_link: "+d);SHR4P.debug("type: "+typeof d);a(d)}};BitlyClient.call("shorten",{longUrl:l},"BitlyCB.mycallback")};if(typeof BitlyClient=="undefined"){SHR4P.debug("loading bit.ly");var n=document.getElementsByTagName("head")[0];if(typeof n!="undefined"){var m=c.shortener_key.split("|"),
i=document.createElement("script");i.src="http://bit.ly/javascript-api.js?version=latest&login="+m[0]+"&apiKey="+m[1];i.type="text/javascript";i.charset="utf-8";n.appendChild(i);i.onreadystatechange=function(){if(this.readyState=="complete"||this.readyState=="loaded"){SHR4P.debug("bit.ly loaded with onreadystatechange, init'ing");j()}};i.onload=j}}else{SHR4P.debug("bit.ly already loaded.  init'ing");j()}};SHR4P.debug("initializing shareaholic plugin");b.fn.shareaholic=function(c){var a=b.extend({service:"",
rel:"nofollow",target:"_blank",poller_timeout:200,link:"",title:"",notes:"",bgimg:"",bgimg_padding:"",twitter_template:"${title} - ${short_link}",tags:"",category:"",ctype:"",localize:false,custom_link:{},li_margin:0,share_src:"http://www.shareaholic.com",src:"http://www.shareaholic.com",api:{share:{v:"1",url:"/api/share/",apitype:"1",source:"Shareaholic-Publishers"},sprite:{v:"2",url:"/api/sprite/"}},short_link:"",shortener:"google",shortener_key:"",shortener_services:{"bit.ly":function(d,g){h(d,
g)}}},c);SHR4P.debug("$.fn.shareaholic called");SHR4P.debug(a);b(this).addClass("shareaholic-show-on-load");if(a.localize==true||a.localize=="true")a.localize=true;var j=function(d,g){return[d,b.param(g)].join("?")},n=function(d){for(var g=[],e=d.length,f=0;f<e;f++){for(var k=f+1;k<e;k++)if(d[f]===d[k])k=++f;g.push(d[f])}return g},m=function(d,g,e){var f=e.custom_link[d+"_"+g];SHR4P.debug("adding link "+d+" "+g);return b("<li/>").addClass(f.li_class).append(b("<a/>").attr({href:f.link,title:f.tooltip,
rel:e.rel,target:e.target,"class":"external"})).attr("style",f.style+";margin-left:"+e.li_margin+"px !important;")};c=a.localize?a.src+"/api/sprite.css":j(a.src+a.api.sprite.url,{v:a.api.sprite.v,apikey:a.apikey,service:n(a.service.split(",")).sort().join(",")});b("#shareaholic-publisher-css").length==0&&b("head").append(b('<link rel="stylesheet" media="screen" id="shareaholic-publisher-css" href="'+c+'"/>'));var i=b("<div/>").addClass("shr-bookmarks").append(b("<ul/>").addClass("shr-socials"));if(a.shrlink){c=
b.getBrowser();if(c!=""){i.append(b('<div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div>'));i.find(".shr-getshr a").text("Get Shareaholic for "+c);b(this).hover(function(){i.find(".shr-getshr").css("visibility","visible")},function(){i.find(".shr-getshr").css("visibility","hidden")})}}a.bgimg!="undefined"&&a.bgimg!=""&&i.addClass("shr-bookmarks-bg-shr").css({"margin-left":"10px",
height:"100%","overflow-x":"hidden","overflow-y":"hidden",display:"block",padding:a.bgimg_padding,background:"transparent url("+a.bgimg+") no-repeat"});var l=i.find(".shr-socials");b(a.service.split(",")).each(function(d,g){var e="";if(g=="7")e=a.twitter_template;a.custom_link["before_"+d]&&m("before",d,a).appendTo(l);b("<li/>").addClass("shr-"+g).addClass("shareaholic").append(b("<a/>").attr({href:j(a.share_src+a.api.share.url,{title:a.title,link:a.link,notes:a.notes,short_link:a.short_link,shortener:a.shortener,
shortener_key:a.shortener_key,v:a.api.share.v,apitype:a.api.share.apitype,apikey:a.apikey,source:a.api.share.source,template:e,service:g,ctype:a.ctype}),rel:a.rel,title:SHR4P.tooltips[g],target:a.target,"class":"external"})).attr("style","margin-left:"+a.li_margin+"px !important;").appendTo(l);if(a.showShareCount&&(g==5||g==7||g==2)){e=function(f){f=f.count;if(f>0){for(var k=b("<div/>").addClass("shr-count").appendTo(l.find(".shr-"+g)),o=0;o<9;o+=1)o!=4&&k.append(b("<div>"+f+"</div>").addClass("shr-count-outline").css({left:10+
o%3-1+"px",top:"-"+(11+parseInt(o/3)-1)+"px"}));k.append(b("<div>"+f+"</div>").addClass("shr-count-center").css({left:"10px",top:"-11px"}))}};if(g==5)SHR4P.utils.getFbShrCnt(a.link,e);else if(g==7)SHR4P.utils.getTwitShrCnt(a.link,e);else g==2&&SHR4P.utils.getDeliciousShrCnt(a.link,e)}a.custom_link["after_"+d]&&m("after",d,a).appendTo(l)});c=function(d){b(l).find("li a").each(function(){this.href=this.href+"&tags="+d})};a.allowExternalTags?SHR4P.utils.getTags(a.link,a.tags,c):c(a.tags);c=function(d){if(d.spriteimg!=
"")return d.spriteimg;else if(d.localize)return d.src+"/api/sprite.png";else{var g=function(k,o){return k-o},e=n(d.service.split(",")).sort(g);SHR4P.debug("checking services: ");SHR4P.debug(e);var f=[];b(SHR4P.img_group).each(function(){var k=this;SHR4P.debug("checking img_group: ");SHR4P.debug(k);b(e).each(function(){SHR4P.debug("checking service: "+this);if(b.inArray(Number(this),k)>-1){SHR4P.debug("found! adding img_group");b.merge(f,k);return false}});SHR4P.debug("req_services so far: ");SHR4P.debug(f)});
SHR4P.debug("final req_services: ");f=f.sort(g);SHR4P.debug(f.join(","));return j(d.src+d.api.sprite.url,{v:d.api.sprite.v,apikey:d.apikey,apitype:"png",service:f.join(",")})}}(a);i.append(b('<style type="text/css">ul.shr-socials li.shareaholic{background-image:url('+c+") !important;}</style>"));i.appendTo(this);return this};b.extend({getBrowser:function(){var c=navigator.userAgent,a="";if(c.indexOf("MSIE")!=-1)a="Internet Explorer";else if(c.indexOf("Firefox")!=-1)a="Firefox";else if(c.indexOf("Flock")!=
-1)a="Flock";else if(c.indexOf("Chrome")!=-1)a="Google Chrome";else if(c.indexOf("Safari")!=-1)a="Safari";else if(c.indexOf("Opera")!=-1)a="Opera";else if(c.indexOf("Songbird")!=-1)a="Songbird";return a}})})(SHR4P.jQuery);SHR4P.ready=true;typeof SHR4P.onready!="undefined"&&SHR4P.onready()}};if(typeof SHR4P=="undefined")SHR4P={};SHR4P.ready=false;SHR4P.init=false;
SHR4P.params=function(){var b={},h=document.location.href.split("?");if(h.length==2){h=h[1].split("&");for(var c=0;c<h.length;c++){var a=h[c].split("=");if(a.length==2)b[unescape(a[0])]=unescape(a[1])}}return b};SHR4P.debug=function(b){if(SHR4P.debug_enabled)typeof console!="undefined"&&console?console.log(b):alert(b)};
SHR4P.load=function(){SHR4P.debug("loading jquery");var b=document.getElementsByTagName("head")[0];if(typeof b!="undefined"){SHR4P.params();var h=document.createElement("script");h.src=SHR4P.debug_enabled?"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js":"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js";h.type="text/javascript";b.appendChild(h);h.onreadystatechange=function(){if(this.readyState=="complete"||this.readyState=="loaded"){SHR4P.debug("jQuery loaded with onreadystatechange, init'ing");
SHR4P_init()}};h.onload=SHR4P_init}};
SHR4P.tooltips={1:"Send with Buzzster!",2:"Post to Delicious",3:"Post to Digg",4:"Post to Mixx",5:"Post to Facebook",6:"Add to Mister-Wong",7:"Post to Twitter",8:"Add to Netlog",9:"Add to Pownce",10:"Add to Technorati Favorites",11:"Add to Furl",12:"Add to Shoutwire",13:"Add to CiteULike",14:"Post to Jumptags",15:"Add to Windows Live Spaces",16:"Add to Hemidemi",17:"Add to FunP",18:"Add to Instapaper",19:"Add to PhoneFavs",20:"Add to Xerpi",21:"Add to Netvouz",22:"Add to Wink",23:"Add to Ma.gnolia",
24:"Add to Diigo",25:"Add to BibSonomy",26:"Add to Taggly",27:"Post to BlogMarks",28:"Add to Tailrank",29:"Add to StartAid",30:"Add to Kledy",31:"Add to Khabbr",32:"Add to Yahoo My Web",33:"Add to Meneame",34:"Add to Yoolink",35:"Add to Bookmarks.fr",36:"Add to Technotizie",37:"Add to Windows Live Favorites",38:"Post to StumbleUpon",39:"Add to MySpace",40:"Add to Reddit",41:"Add to NewsVine",42:"Add to Multiply",43:"Add to FriendFeed",44:"Add to Plaxo Pulse",45:"Add to Ping",46:"Add to Squidoo",47:"Add to Protopage Bookmarks",
48:"Add to Blinklist",49:"Add to Faves",50:"Add to AIM",51:"Add to E-mail program",52:"Add to Gmail",53:"Add to Hotmail",54:"Add to Yahoo Mail",55:"Add to AOL Mail",56:"Add to YiGG",57:"Add to Webnews",58:"Add to Segnalo",59:"Add to Pusha",60:"Add to YouMob",61:"Post to Slashdot",62:"Add to Fark",63:"Add to Allvoices",64:"Add to Jamespot",65:"Add to Imera Brazil",66:"Add to Twiddla",67:"Add to LinkaGoGo",68:"Add to MindBodyGreen",69:"Add to Feedmarker Bookmarks",70:"Add to unalog",71:"Add to Hugg",
72:"Add to Diglog",73:"Add to Yahoo Buzz",74:"Add to Google Bookmarks",75:"Add to NowPublic",76:"Add to Yahoo Bookmarks",77:"Add to Propeller",78:"Add to Tumblr",79:"Add to LiveJournal",80:"Add to Current",81:"Add to HelloTxt",82:"Add to Spurl",83:"Add to Yample",84:"Add to Oneview",85:"Add to Linkatopia",86:"Add to Simpy",87:"Add to Yahoo Messenger",88:"Add to LinkedIn",89:"Add to Global Grind",90:"Add to BuddyMarks",91:"Add to Ask.com MyStuff",92:"Add to Viadeo",93:"Add to Maple",94:"Add to Wists",
95:"Add to Gravee",96:"Add to Connotea",97:"Add to Backflip",98:"Add to MyLinkVault",99:"Add to SiteJot",100:"Add to Sphinn",101:"Add to Health Ranker",102:"Add to DZone",103:"Add to Symbaloo Feeds",104:"Add to Care2 News",105:"Add to Hyves",106:"Add to Design Float",107:"Add to Sphere",108:"Add to Bitty Browser",109:"Add to My Yahoo",110:"Add to Google",111:"Add to Excite MIX",112:"Add to iTunes",113:"Add to Zune",114:"Add to FeedM8",115:"Add to PodNova",116:"Add to WINKsite",117:"Add to NewsGator",
118:"Add to Hubdog",119:"Add to BUZmob",120:"Add to NewsIsFree",121:"Add to KlipFolio",122:"Add to NETime Channel",123:"Add to Feed Mailer",124:"Add to Symbaloo Bookmarks",125:"Add to Rocket RSS Reader",126:"Add to Blogger",127:"Add to Flurry",128:"Add to FireAnt",129:"Add to Sofomo",130:"Add to Netomat HUB",131:"Add to FeedMarker",132:"Add to FeedBucket",133:"Add to SendMeRSS",134:"Add to Bloglines",135:"Add to Windows Live",136:"Add to Protopage News Feeds",137:"Add to My AOL",138:"Add to The Free Library",
139:"Add to The Free Dictionary",140:"Add to Wikio",141:"Add to BlogRovR",142:"Add to Webwag",143:"Add to Daily Rotation",144:"Add to Outlook",145:"Add to Google Toolbar",146:"Add to Bitty Browser Preview",147:"Add to RSS 2 PDF",148:"Add to LiteFeeds",149:"Add to Gritwire",150:"Add to FeedLounge",151:"Add to FeedReader",152:"Add to FeedOnSite",153:"Add to i metaRSS",154:"Add to RssFwd",155:"Add to SimplyHeadlines",156:"Add to Zhua Xia",157:"Add to Xian Guo",158:"Add to mobilerss",159:"Add to Netvibes",
160:"Add to Pageflakes",161:"Add to My MSN",162:"Add to Odeo",163:"Add to AideRSS",164:"Add to Fwicki",165:"Add to RapidFeeds",166:"Add to Miro",167:"Add to Shyftr",168:"Add to ZapTXT",169:"Add to Newgie",170:"Add to NewsAlloy",171:"Add to Plusmo",172:"Add to Yourminis",173:"Add to Eskobo",174:"Add to Alesti",175:"Add to Rasasa",176:"Add to AvantGo",177:"Add to FeedShow",178:"Add to Xanga",179:"Add to MySpace Profile",180:"Add to Friendster",181:"Add to Hi5",182:"Add to FeedBlitz",183:"Add to Gabbr",
184:"Bookmark on MSDN",185:"Bookmark on Microsoft TechNet",186:"Bookmark on Microsoft Expression",187:"Post to Tagza",188:"Submit to Tip'd",189:"Add to Agregator",190:"Add to Strands",191:"Add to Evernote",192:"Add to Stumpedia",193:"Post to Foxiewire",194:"Add to Arto",195:"Share on Netvibes",196:"Add to Bebo",197:"Add to Folkd",198:"Add to VodPod",199:"Add to NewsTrust",200:"Add to Amazon (US) Wish List",201:"Send via E-mail program",202:"Post to YC Hacker News",203:"Post to Truemors",204:"Techmeme Tip",
205:"Post to Identi.ca",206:"Post to SmakNews",207:"Share in Google Reader",208:"Shorten URL with Bit.ly",209:"Post to Kaboodle",210:"Post to Posterous",211:"Post to TipJoy",212:"Post to I Heart It",213:"Post to Google Notebook",214:"Shorten URL with Tr.im",215:"Post to Streakr",216:"Post to Twine",217:"Post to Soup",218:"Post to Plurk",219:"Post to Blogger",220:"Post to TypePad",221:"Post to AttentionMeter",222:"Post to Smush.it",223:"Shorten URL with TinyURL",224:"Shorten URL with Digg",225:"Post to BzzScapes",
226:"Post with Tweetie",227:"Post to Diigo",228:"Shorten URL with Is.gd",229:"Post to vi.sualize.us",230:"Press This",231:"Post to Mozillaca",232:"Shorten URL with Su.pr",233:"Post to TBUZZ",234:"Shorten URL with Hub.tm",235:"Post to Followup.cc",236:"Print with PrintFriendly",237:"",238:"NUjij",239:"Read It Later",240:"Add to Box.net",241:"Add to Balatarin",242:"Favoriten",243:"Oknotizie",244:"diHITT",245:"Svejo",246:"Post to Hatena",247:"Orkut",248:"Shorten URL with Clicky",249:"Shorten URL with j.mp",
250:"ReadWriteWeb",251:"Dwellicious",252:"Google Translate",253:"Post to Yammer",254:"Add to Yahoo Buzz India",255:"Add to Boxee",256:"Add to Pinboard",257:"Post on Google Buzz",258:"Readability",259:"Post to Social.com",260:"Add to Google Apps Email",261:"Post to HootSuite",262:"Wave This",263:"Post to iZeby",264:"Post to Ning",265:"Post to SpringPad",266:"Post to BobrDobr",267:"Post to Yandex",268:"Post to Moemesto",269:"Post to Memori.ru",270:"Add to Amazon (UK) Wish List",271:"Add to Amazon (CA) Wish List",
272:"Add to Amazon (DE) Wish List",273:"Add to Amazon (FR) Wish List",274:"Add to Amazon (JP) Wish List",275:"Contribute with Sidewiki",276:"Marginize",277:"Post to Twittley",278:"Post to Script & Style",279:"Post to PFBuzz",280:"Post to Fwisp",281:"Post to 100 bookmarks",282:"Bump this on Design Bump",283:"Post to eKudos",284:"Blend this!",285:"Post to Wykop",286:"Post to BlogEngage",287:"Post to FAQpal",288:"Post to Bitacoras",289:"Post to N4G",290:"Post to Kaevur",291:"Post to Virb",292:"Post to BonzoBox",
293:"Post to Zabox",294:"Suggest this article to ToMuse?"};SHR4P.img_group=[];SHR4P.img_group[0]=[2,3,4,5,6,7,10,24,38,39,40,52,54,74,88,201,219,257];SHR4P.img_group[1]=[27,33,41,43,45,46,53,73,78,195,196,205,207,210,236,247,264];SHR4P.img_group[2]=[44,48,61,77,80,100,105,140,191,202,218,238,240,266,269,280,289];SHR4P.img_group[3]=[1,14,21,89,98,102,106,243,267,268,277,278,283,284,285,286,288];SHR4P.img_group[4]=[20,59,92,188,190,192,204,246,263,265,279,281,282,287,290,291,292,293,294];
SHR4P.wants_shortlink=[7];
SHR4P.utils={getFbShrCnt:function(b,h){b="http://api.ak.facebook.com/restserver.php?v=1.0&method=links.getStats&format=json&urls="+encodeURIComponent(b);SHR4P.jQuery.getJSON(b+"&callback=?",function(c){var a=0;if(c.length>0){a=c[0].total_count;if(a!=0)if(a>1E3)a=Math.floor(a/1E3)+"K"}h({count:a})})},getTwitShrCnt:function(b,h){b="http://urls.api.twitter.com/1/urls/count.json?url="+encodeURIComponent(b);SHR4P.jQuery.getJSON(b+"&callback=?",function(c){c=c.count;if(c!=0)if(c>1E3)c=Math.floor(c/1E3)+
"K";h({count:c})})},getDeliciousShrCnt:function(b,h){b="http://feeds.delicious.com/v2/json/urlinfo/data?url="+encodeURIComponent(b);SHR4P.jQuery.getJSON(b+"&callback=?",function(c){var a=0;if(c.length>0){a=c[0].total_posts;if(a!=0)if(a>1E3)a=Math.floor(a/1E3)+"K"}h({count:a})})},getTags:function(b,h,c){var a=1;SHR4P.utils.getDeliciousTag(b,function(j){h+=j;--a==0&&c(h)})},getDeliciousTag:function(b,h){b="http://feeds.delicious.com/v2/json/urlinfo/data?url="+encodeURIComponent(b);SHR4P.jQuery.getJSON(b+
"&callback=?",function(c){if(c.length>0){top_tags=c[0].top_tags;del_tags="";SHR4P.jQuery.each(top_tags,function(a,j){del_tags+=encodeURIComponent(a)+"|"+j+"|delicious,"});if(del_tags!="")del_tags=del_tags.substr(0,del_tags.length-1);h(del_tags)}})}};SHR4P.load();

