function fixedSidebarInButton(){var h="left";isCorporate&&(h="right");var a=$("main");if(window.location.pathname.indexOf("/column/info/")>0){a=$("#column");var h="left"}window.csdn.fixedSidebar({targetBox:$(".persion_article"),mainBox:a,sidebar:$("aside"),direction:h,position:"fixed",bottom:0,zIndex:99,sidebarRightMargin:8,sidebarLeftMargin:15})}function addLoadEvent(h){var a=window.onload;"function"!=typeof window.onload?window.onload=h:window.onload=function(){a(),h()}}$(function(){var h=$("div.box-box-default"),a=$("div.box-box-large");boxAways=$("div.box-box-aways"),h.find("a.btn-remove").click(function(){h.remove()}),a.find("a.btn-remove").click(function(){a.remove()}),boxAways.find("a.btn-remove").click(function(){boxAways.remove()})}),window.addLoadEvent=window.addLoadEvent?window.addLoadEvent:function(h){var a=window.onload;"function"!=typeof window.onload?window.onload=h:window.onload=function(){a(),h()}},$(function(){function h(){}function a(h){$(h).text("点开这里查看关注").fadeIn(),setTimeout(function(){$(h).fadeOut()},3e3)}h.prototype.animation=function(){if(!currentUserName)return!1;var h=$(this).offset(),l=$(".loginCenter").offset().top,c=$(".loginCenter").offset().left+20,v=h.left+80,z=h.top+20,m=$("#pointDivs .point-pre").first().removeClass("point-pre").css({left:v+"px",top:z+"px"}),t=m.find(".point-inner");setTimeout(function(){m[0].style.webkitTransform="translate3d(0,"+(l-z)+"px,0)",t[0].style.webkitTransform="translate3d("+(c-v)+"px,0,0)",setTimeout(function(){m.removeAttr("style").addClass("point-pre"),t.removeAttr("style"),a(".guo_tip_box")},800)},1)},h.prototype.animationInit=function(){for(var h=$('
').appendTo("body"),a=0;a<5;a++)$('').appendTo(h)},window.CSDNAnimation=h}),!function(h){var a,l='',c=(a=document.getElementsByTagName("script"))[a.length-1].getAttribute("data-injectcss");
if(c&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}!function(a){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(a,0);else{var l=function(){document.removeEventListener("DOMContentLoaded",l,!1),a()};document.addEventListener("DOMContentLoaded",l,!1)}else document.attachEvent&&(c=a,v=h.document,z=!1,m=function(){z||(z=!0,c())},(t=function(){try{v.documentElement.doScroll("left")}catch(h){return void setTimeout(t,50)}m()})(),v.onreadystatechange=function(){"complete"==v.readyState&&(v.onreadystatechange=null,m())});var c,v,z,m,t}(function(){var h,a,c,v,z,m;(h=document.createElement("div")).innerHTML=l,l=null,(a=h.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",c=a,(v=document.body).firstChild?(z=c,(m=v.firstChild).parentNode.insertBefore(z,m)):v.appendChild(c))})}(window),(isCorporate||"undefined"==typeof articleId||$(window).width()<1537)&&addLoadEvent(fixedSidebarInButton),window.leftFixedSide?window.leftFixedSide:window.leftFixedSide={},window.leftFixedSide.fixedSidebarInButton=fixedSidebarInButton,$(function(){function h(){var h=document.cookie.match(new RegExp("(^| )UserName=([^;]*)(;|$)"));return h?h[2]:""}function a(h){$("#fan").text().indexOf("+")<0?$("#fan").text(parseInt($("#fan").text())+h):$("#fanBox").attr("title",parseInt($("#fanBox").attr("title"))+h)}function l(h){var l="//my.csdn.net/index.php/follow/check_is_followed/"+encodeURIComponent(h)+"/"+encodeURIComponent(username)+"?jsonpcallback=?";$.getJSON(l,{},function(h){1==h.succ&&1==h.info&&($("#btnAttent").addClass("attented").text("已关注").removeClass("btn-red-hollow").addClass("btn-gray-hollow"),a(1))},"json")}function c(h){var a=h.hasClass("attented");a?z(h):v(h)}function v(h){var l="//my.csdn.net/index.php/follow/do_follow";$.ajax({type:"POST",url:l,data:{username:username},xhrFields:{withCredentials:!0},success:function(l){if(l="object"!=typeof l?JSON.parse(l):l,101==l.succ)h.addClass("attented").text("已关注").removeClass("btn-red-hollow").addClass("btn-gray-hollow attented"),a(1);else{if(102==l.succ)return window.csdn.loginBox.show(),!1;1==l.succ?(h.addClass("attented").text("已关注").removeClass("btn-red-hollow").addClass("btn-gray-hollow attented"),a(1),m.animation.call(h)):alert(l.msg)}}})}function z(h){var l="//my.csdn.net/index.php/follow/do_unfollow?jsonpcallback=?";$.getJSON(l,{username:username},function(l){1==l.succ?(h.text("关注").addClass("btn-red-hollow").removeClass("btn-gray-hollow attented"),a(-1)):console.error(l.msg)})}var m=new window.CSDNAnimation;m.animationInit(),$("#btnAttent").click(function(h){c($(this))}),l(h())}),function(){function h(h){var a=document.createElement("div");void 0!=a.textContent?a.textContent=h:a.innerText=h;var l=a.innerHTML;return a=null,l}function a(h){var a="";return 0==h.length?"":(a=h.replace(//g,">"))}window.csdn?window.csdn:window.csdn={},window.csdn.htmlEncode_inner=h,window.csdn.htmlEncode_Escape=a}(),$(function(){$("#csdnc-memberhead").fadeIn(500)});