(function(){if(window.$addfeed&&window.$$addfeed){return false}var $={byId:function(a){return document.getElementById(a)},byName:function(a){return $.toArray(document.getElementsByName(a))},byTag:function(a,b){b=b||document;return $.toArray(b.getElementsByTagName(a))},byClass:function(a,b){b=b||document;var c=new RegExp("(^|\\s+)"+$.addSlashRegExp(a)+"(\\s+|$)");var d=[],arr=b.getElementsByTagName('*');for(var i=0;i<arr.length;i++){if(c.test(arr[i].className)){d[d.length]=arr[i]}}return d},toArray:function(a){var b=[];for(var i=0;i<a.length;i++){b[i]=a[i]}return b},attr:function(a,b){var c=a[b]?a[b]:a.getAttribute(b);return!c?"":c},create:function(a){return document.createElement(a)},next:function(a,b){var c=a;while(c=c.nextSibling){if(b||c.nodeType==1){break}}return c},prev:function(a,b){var c=a;while(c=c.previousSibling){if(b||c.nodeType==1){break}}return c},parent:function(a){return a.parentNode||a.parentElement},before:function(a,b){return a.parentNode.insertBefore(b,a)},after:function(a,b){var c,next=$.next(a);if(next){c=$.before(next,b)}else{c=$.append(a.parentNode,b)}next=null;return c},prepend:function(a,b){var c;if(a.hasChildNodes()){c=$.before(a.childNodes[0],b)}else{c=$.append(a,b)}return c},append:function(a,b){return a.appendChild(b)},bind:function(a,b,c){var d=[];if(a.constructor==Array){d=a}else{d[d.length]=a}for(var i=0;i<d.length;i++){if(d[i].addEventListener){d[i].addEventListener(b,c,0)}else if(a.attachEvent){d[i].attachEvent("on"+b,c)}else{d[i]["on"+b]=c}}},addClass:function(a,b){a.className=$.trim(a.className+" "+b)},removeClass:function(a,b){var c=new RegExp("(^|\\s+)"+$.addSlashRegExp(b)+"(\\s+|$)","g");a.className=$.trim(a.className.replace(c," "))},addSlashRegExp:function(a){return a.replace(/([\^\$\*\+\?\(\)\[\]\{\}\,\.\:\=\!\|\-\\])/g,"\\$1")},trim:function(a){return a.replace(/(^[\r\n\s]+|[\r\n\s]+$)/g,"")},curCss:function(c,d){var e,style=c.style;if(d.match(/float/i))d="styleFloat";if(document.defaultView&&document.defaultView.getComputedStyle){if(d.match(/float/i))d="float";d=d.replace(/([A-Z])/g,"-$1").toLowerCase();var f=document.defaultView.getComputedStyle(c,null);if(f)e=f.getPropertyValue(d)}else if(c.currentStyle){var g=d.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()});e=c.currentStyle[d]||c.currentStyle[g];if(!/^\d+(px)?$/i.test(e)&&/^\d/.test(e)){var h=style.left,rsLeft=c.runtimeStyle.left;c.runtimeStyle.left=c.currentStyle.left;style.left=e||0;e=style.pixelLeft+"px";style.left=h;c.runtimeStyle.left=rsLeft}}else if(style&&style[d])e=style[d];return e},getOffset:function(a){var b={width:0,height:0,left:0,top:0,right:0,bottom:0};if(a=="visible"){if(window.innerWidth&&window.innerWidth.constructor==Number){b.width=window.innerWidth;b.height=window.innerHeight;b.left=window.pageXOffset;b.top=window.pageYOffset}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){b.width=document.documentElement.clientWidth;b.height=document.documentElement.clientHeight;b.left=document.documentElement.scrollLeft;b.top=document.documentElement.scrollTop}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){b.width=document.body.clientWidth;b.height=document.body.clientHeight;b.left=document.body.scrollLeft;b.top=document.body.scrollTop}}else{b.width=a.offsetWidth+(!$.boxModel?a.clientLeft:0);b.height=a.offsetHeight+(!$.boxModel?a.clientTop:0);while(a){b.left+=a.offsetLeft;b.top+=a.offsetTop;if($.browser.msie&&$.boxModel&&a.offsetParent&&!/^t(able|d|h)$/i.test(a.tagName)){b.left+=a.clientLeft;b.top+=a.clientTop}if($.browser.mozilla){b.left+=(parseInt($.curCss(a,"borderLeftWidth"))||0);b.top+=(parseInt($.curCss(a,"borderTopWidth"))||0);c=null}a=a.offsetParent}if($.browser.mozilla){var c=document.body;b.left+=c.clientLeft;b.top+=c.clientTop;var d=document.documentElement;b.left-=parseInt($.curCss(d,"borderLeftWidth"));b.top-=parseInt($.curCss(d,"borderTopWidth"));c=d=null}}b.right=b.left+b.width;b.bottom=b.top+b.height;return b},cancelEvent:function(a){if(a.preventDefault){a.preventDefault()}a.returnValue=false},boxModel:false,boxModelTest:function(){var a=document.createElement("div");a.style.width=a.style.paddingLeft="1px";document.body.appendChild(a);$.boxModel=a.offsetWidth===2;document.body.removeChild(a).style.display='none';a=null},ready:function(a){$.domReadyBind();if($.domReady){a.call(document,$)}else{$.domReadyList.push(a)}},domReady:false,domReadyList:[],domReadyBound:false,domReadyBind:function(){if($.domReadyBound)return;$.domReadyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);$.domReadyDone()},false)}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);$.domReadyDone()}});if(document.documentElement.doScroll&&window==window.top)(function(){if($.domReady)return;try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}$.domReadyDone()})()}$.bind(window,"load",$.domReadyDone)},domReadyDone:function(){if(!$.domReady){$.domReady=true;if($.domReadyList){for(var i=0;i<$.domReadyList.length;i++){$.domReadyList[i].call(document,$)}$.domReadyList=null}}},fixIeBgBug:function(){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}},loadCssFile:function(a){try{var b=$.create("link");b.rel=b.rev="stylesheet";b.type="text/css";b.href=a;b.media="all";$.append($.byTag("head")[0],b);b=null}catch(e){}},browser:{version:(navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/:]([\d.]+)/)||[0,'0'])[1],safari:/webkit/.test(navigator.userAgent.toLowerCase()),opera:/opera/.test(navigator.userAgent.toLowerCase()),msie:/msie/.test(navigator.userAgent.toLowerCase())&&!/opera/.test(navigator.userAgent.toLowerCase()),mozilla:/mozilla/.test(navigator.userAgent.toLowerCase())&&!/(compatible|webkit)/.test(navigator.userAgent.toLowerCase())},isMouseLeaveOrEnter:function(e,a){if(e.type!='mouseout'&&e.type!='mouseover')return false;var b=e.relatedTarget?e.relatedTarget:e.type=='mouseout'?e.toElement:e.fromElement;while(b&&b!=a)b=b.parentNode;return(b!=a)}};var m={css:"http://china-addthis.googlecode.com/svn/trunk/addfeed.css",gourl:"http://addfeed.cn/go/?act=feed",timeDelayout:500,feeds:{"rss":{id:0,name:"Rss源"},"google":{id:1,name:"谷歌阅览器"},"douban":{id:16,name:"九点"},"youdao":{id:9,name:"有道"},"xianguo":{id:3,name:"鲜果"},"zhuaxia":{id:2,name:"抓虾"},"qq":{id:4,name:"QQ邮箱"},"live":{id:6,name:"微软Live"},"yahoo":{id:5,name:"雅虎"},"inezha":{id:7,name:"哪吒"},"Email":{id:8,name:"邮天下"},"hexun":{id:15,name:"和讯"},"feige":{id:10,name:"飞鸽"},"netvibes":{id:11,name:"netvibes"}},e:encodeURIComponent,gotourl:function(a){open(m.gourl+a,'addfeed');return false},showposition:function(a,b,c,d){if(!$.boxModel){b.style.width=(b.clientWidth+parseInt($.curCss(b,"paddingLeft"))+parseInt($.curCss(b,"paddingRight"))+(parseInt($.curCss(b,"borderLeftWidth"))?parseInt($.curCss(b,"borderLeftWidth")):0)+(parseInt($.curCss(b,"borderRightWidth"))?parseInt($.curCss(b,"borderRightWidth")):0))+"px"}a.style.width=c.style.width=b.offsetWidth+"px";a.style.height=c.style.height=b.offsetHeight+"px";var e=$.getOffset(d);var f=$.getOffset("visible");var g=$.getOffset(a);var h=0,top=0;if(d.bar=="left"&&d.barShow=="hidden"){d.barShow="loop";$.parent(a).style.height=g.height+"px";a.style.visibility="visible";m.showMoveTo($.byClass("addfeed_sideBar")[0],d,"show",e.top,0,e.width+g.width,25)}else if(d.bar=="right"&&d.barShow=="hidden"){d.barShow="loop";$.parent(a).style.height=g.height+"px";a.style.visibility="visible";m.showMoveTo($.byClass("addfeed_sideBar")[0],d,"show",e.top,e.left-g.width,e.width+g.width,25)}else if(d.bar!="left"&&d.bar!="right"){if(f.right>=e.left+g.width||f.right-(e.left+g.width)>=(e.right-g.width)-f.left){h=e.left}else{h=e.right-g.width}if(f.bottom>=e.bottom+g.height||f.bottom-(e.bottom+g.height)>=(e.top-g.height)-f.top){top=e.bottom}else{top=e.top-g.height}a.style.left=(h)+"px";a.style.top=(top)+"px";a.style.visibility="visible";d.barShow="show"}e=f=g=h=top=null},showMoveTo:function(a,b,c,d,e,f,g){var h=$.getOffset(a);var i=h.top;var j=h.left;var k=h.width;if(i<=d){i=(i+g<=d)?i+g:d}else{i=(i-g>=d)?i-g:d}if(j<=e){j=(j+g<=e)?j+g:e}else{j=(j-g>=e)?j-g:e}if(k<=f){k=(k+g<=f)?k+g:f}else{k=(k-g>=f)?k-g:f}a.style.left=j+"px";a.style.top=i+"px";a.style.width=k+"px";if(i!=d||j!=e||k!=f){setTimeout(function(){m.showMoveTo(a,b,c,d,e,f,g)},5)}else if(c){b.barShow=c;if(c=="hidden")$.parent(b).style.height=$.getOffset(b).height+"px"}i=j=k=null},reMoveTo:function(a,b,c){var d=$.byClass("addfeed_sideBar")[0];var e=30;var f=$.getOffset("visible").top;if(a.barShow!="loop"){f=f-$.getOffset(d).top+b;f=$.getOffset(d).top+f/5;if(f<b)f=b;if(f!=c){d.style.top=f+"px";e=30}c=f}if($.byClass("addfeed_box",d).length<=0){d.style.height=$.getOffset(a).height+"px"}if($.byClass("addfeed_box",d).length<=0){d.style.width=$.getOffset(a).width+"px"}var g=setTimeout(function(){m.reMoveTo(a,b,c)},e);d=e=f=null},showThisItem:function(a){var b=$.byClass("addfeed_box");for(var c=0;c<b.length;c++){b[c].style.display="none"}if(a)a.style.display="block";b=c=null},initBtn:function(k){k.mouse_over=function(b,e){if(b.locked){if((b.bar!="left"&&b.bar!="right")||b.barShow=="hidden"){b.addbox.style.display="block";m.showposition(b.addbox,$.byClass("addshow",b.addbox)[0],$.byClass("bgfrm",b.addbox)[0],b)}clearTimeout(b.timeOut);return false}b.locked=true;b.bar=$.attr(b,"side");b.barShow="hidden";var c=$.attr(b,"i")?"|"+$.attr(b,"i")+"|":"";if($.attr(b,"href")&&$.attr(b,"href")!=document.location+"#"&&$.attr(b,"href")!=document.location&&$.attr(b,"href")!="#"){b.u=$.attr(b,"href")}else{var d=$.byTag("link");for(var l=0;l<d.length;l++){if($.attr(d[l],"type")=="application/rss+xml"||$.attr(d[l],"type")=="application/atom+xml"){b.u=$.attr(d[l],"href");break}}d=null}b.e=$.attr(b,"e")?$.attr(b,"e"):"mouseover";b.argStr="&u="+m.e(b.u);b.addthis=$.parent(b);var f=$.create("div");b.addbox=f;$.addClass(f,"addfeed_box");$.after(b,f);if(b.bar=="left"||b.bar=="right"){$.append($.byClass("addfeed_sideBar")[0],f);if(b.bar=="left"){f.style.right=$.getOffset(b).width+"px"}else if(b.bar=="right"){f.style.left=$.getOffset(b).width+"px"}}else{$.append($.byTag("body")[0],f)}var g="";g+='<iframe class="bgfrm" frameborder="0" tabindex="-1" src="javascript:;"></iframe>';g+='<div class="addshow"><div class="addh"><div class="addt">订阅到你喜欢的阅读器:</div></div><div class="addbody"><div class="flist">';for(var h in m.feeds){if(!c||(c&&c.indexOf("|"+m.feeds[h].id+"|")>=0)){g+='<div class="li"><a class="feed_'+m.feeds[h].id+'" item="'+m.feeds[h].id+'" href="#"><img src="http://addfeed.cn/images/feed/'+m.feeds[h].id+'.gif" alt="'+m.feeds[h].name+'" /></a></div>'}}g+='</div><div style="clear:both;line-height:0"></div></div>';g+='<div class="addbottom"><a href="http://ololi.com" target="_blank">≮ 蒼炎異域 ≯ ololi.com</a></div>';g+='</div>';f.innerHTML=g;if($.attr(b,"abordercolor"))f.style.borderColor=$.attr(b,"abordercolor");if($.attr(b,"aheadbgcolor")){$.byClass("addh",f)[0].style.backgroundColor=$.attr(b,"aheadbgcolor");$.byClass("addbottom",f)[0].style.backgroundColor=$.attr(b,"aheadbgcolor")}m.showposition(f,$.byClass("addshow",f)[0],$.byClass("bgfrm",f)[0],b);var i=$.byClass("flist",f)[0];var j=$.byTag("a",i);$.bind(j,"click",b.listclick);$.bind(b,"mouseout",function(a){b.timeOut=setTimeout(b.boxmouseout,m.timeDelayout)});$.bind(b.addbox,"mouseover",function(a){if(b.e=="click"){clearTimeout(b.timeOut)}else if(b.e=="mouseover"){b.boxmouseover(a);clearTimeout(b.timeOut)}});$.bind(b.addbox,"mouseout",function(a){b.timeOut=setTimeout(b.boxmouseout,m.timeDelayout)});c=btn_t=btn_u=btn_d=addboxs=f=g=i=j=null};k.listclick=function(a){if($.attr(this,"item")){if(Number($.attr(this,"item"))==0){open(k.u,'addfeed')}else{m.gotourl('&id='+$.attr(this,"item")+k.argStr)}$.cancelEvent(a||event);return false}};k.boxmouseover=function(a){m.showposition(k.addbox,$.byClass("addshow",k.addbox)[0],$.byClass("bgfrm",k.addbox)[0],k);k.addbox.style.display="block"};k.boxmouseout=function(a){if(k.bar=="left"){m.showMoveTo($.byClass("addfeed_sideBar")[0],k,"hidden",$.getOffset(k).top,0,$.getOffset(k).width,38)}else if(k.bar=="right"){m.showMoveTo($.byClass("addfeed_sideBar")[0],k,"hidden",$.getOffset(k).top,$.getOffset(k).left+$.getOffset(k.addbox).width,$.getOffset(k).width,38);k.addbox.style.display="none"}else{k.addbox.style.display="none";k.barShow="hidden"}};if($.attr(k,"e")=="click"){$.bind(k,"click",function(a){k.mouse_over(k,a);$.cancelEvent(a||event)})}else{$.bind(k,"click",function(a){$.cancelEvent(a||event)});$.bind(k,"mouseover",function(a){k.mouse_over(k,a)})}},init:function(){$.fixIeBgBug();$.loadCssFile(m.css);$.ready(function(){m.rebind()})},rebind:function(){var a=$.byClass("www_ololi_com");var b="";for(var i=0;i<a.length;i++){if($.byTag("a",a[i])[0]){var c=$.attr($.byTag("a",a[i])[0],"side");var d=$.attr($.byTag("a",a[i])[0],"top");var e;if(c=="left"||c=="right"){e=$.byTag("a",a[i])[0];$.addClass(a[i],"addfeed_sideBar");e.style.position="absolute";a[i].style.display="block";a[i].style.width=$.getOffset(e).width+"px";a[i].style.height=$.getOffset(e).height+"px";var f=Math.floor($.getOffset("visible").height*2/5)-92;if(f<0)f=2;var g=$.getOffset("visible").height-250;if(!d)d=f<g?f:(g>=0?g:0);a[i].style.top=d+"px";if(c=="left"){a[i].style.left="0px";e.style.right="0px"}else if(c=="right"){a[i].style.right="0px";e.style.left="0px"}var h=Number(d);var j=h;m.reMoveTo(e,h,j)}e=d=c=null;m.initBtn($.byTag("a",a[i])[0]);if($.attr($.byTag("a",a[i])[0],"css")&&!b)b=$.attr($.byTag("a",a[i])[0],"css")}}a=b=null}};$.ready($.boxModelTest);window.$addfeed=$;window.$$addfeed=m})();$$addfeed.init();
