function program_code_collapse(n) {
	n.children("div.program_code_open").css("display") != "none" ? (n.children("div.program_code_open").css("display", "none"), n.children("img.code_img_opened").css("display", "none"), n.children("img.code_img_closed").css("display", "inline")) : (n.children("div.program_code_open").css("display", "block"), n.children("img.code_img_opened").css("display", "inline"), n.children("img.code_img_closed").css("display", "none"))
}
function program_code_show(n) {
	var t = $("#program_code_open_" + n);
	t.css("display") == "none" && (t.parent().find("span.program_code_collapse").hide(), t.show(), $("#code_img_opened_" + n).show(), $("#code_img_closed_" + n).hide(), $(t).find("span.program_code_copy").length || showCopyCode(t))
}
function program_code_hide(n, t) {
	if ($("#program_code_open_" + n).css("display") != "none") {
		var i = $("#program_code_open_" + n);
		i.hide();
		$("#code_img_opened_" + n).hide();
		$("#code_img_closed_" + n).show();
		i.parent().find("span.program_code_collapse").show();
		t.stopPropagation ? t.stopPropagation() : window.event && (window.event.cancelBubble = !0)
	}
}
function IsCodeCollapseNode(n, t) {
	return n.indexOf(t) >= 0
}
function code_collapse_toggle(n) {
	$(n).toggle();
	var t = n.id;
	IsCodeCollapseNode(t, "_Open_Image") ? ($("#" + t.replace("_Open_", "_Closed_")).toggle(), $("#" + t.replace("_Open_Image", "_Open_Text")).toggle(), $("#" + t.replace("_Open_Image", "_Closed_Text")).toggle()) : IsCodeCollapseNode(t, "_Closed_Image") && ($("#" + t.replace("_Closed_", "_Open_")).toggle(), $("#" + t.replace("_Closed_Image", "_Open_Text")).toggle(), $("#" + t.replace("_Closed_Image", "_Closed_Text")).toggle())
}
function loadEncoderJs() {
	var n = document.createElement("script"),
		t;
	n.type = "text/javascript";
	n.src = saxue_skin_server + "/code/encoder.js";
	t = document.getElementsByTagName("script")[0];
	t.parentNode.insertBefore(n, t)
}
function showCopyCode(n) {
	if ($(n).height() > 120) {
		var t = '<div class="program_code_toolbar"><span class="program_code_copy"><a href="javascript:void(0);" onclick="copyProgramCode(this)" title="复制代码"><img src="' + saxue_skin_server + '/code/copycode.gif" alt="复制代码"/><\/a><\/span><\/div>';
		$(n).prepend(t).append(t)
	}
}
function copyProgramCode(n) {
	var i = getProgramCodeContainer(n),
		o = i.html(),
		u = getProgramCodeText(i),
		t = document.createElement("textarea"),
		r;
	$(t).val(u);
	$(t).css("width", $(i).width());
	r = $(i).height() * .8;
	r > 600 && (r = 600);
	$(t).css("height", r);
	$(t).css("font-family", "Courier New");
	$(t).css("font-size", "12px");
	$(t).css("line-height", "1.5");
	$(i).html(t);
	$(t).select();
	$("<div><a class='program_code_toggle_show' href='javascript:;'>View code<\/a>&nbsp;&nbsp;按 Ctrl+C 复制代码<\/div>").insertBefore($(t));
	$("<div><a class='program_code_toggle_show' href='javascript:;'>View code<\/a>&nbsp;&nbsp;按 Ctrl+C 复制代码<\/div>").insertAfter($(t)), $(".program_code_toggle_show").bind('click', function() {
		$(i).html(o);
	});
}
function getProgramCodeContainer(n) {
	var t = $(n).closest("pre");
	return t.length == 0 && (t = $(n).closest("div.program_code")), t
}
function getProgramCodeText(n) {
	var t = "\n" + $(n).html().replace(/&nbsp;/g, " ").replace(/<br\s*\/?>\s*\n/g, "\n").replace(/<br\s*\/?>/ig, "\n").replace(/<[^>]*>/g, "");
	return t = t.replace(/\n(\s*\d+\s)/ig, "\n"), t = t.replace(/\r\n/g, "\n"), t = t.replace(/\nView Code/g, ""), typeof Encoder != undefined && (t = Encoder.htmlDecode(t)), $.trim(t)
}
function buildCategory() {
    var hs = $('#article_content').find('h1,h2,h3,h4,h5,h6');
    if (hs.length < 2)
        return;
    var s = '';
    s += '<div style="clear:both"></div>';
    s += '<div class="navCategory">';
    s += '<p style="text-align:right;margin:0;"><span style="float:left;">目录<a href="#" title="系统根据文章中H1到H6标签自动生成文章目录">(?)</a></span><a href="#" onclick="javascript:return openct(this);" title="展开">[+]</a></p>';
    s += '<ol style="display:none;line-height:160%;">';
    var old_h = 0, ol_cnt = 0;
    for (var i = 0; i < hs.length; i++) {
        var h = parseInt(hs[i].tagName.substr(1), 10);
        if (!old_h)
            old_h = h;
        if (h > old_h) {
            s += '<ol>';
            ol_cnt++;
        }
        else if (h < old_h && ol_cnt > 0) {
            s += '</ol>';
            ol_cnt--;
        }
        if (h == 1) {
            while (ol_cnt > 0) {
                s += '</ol>';
                ol_cnt--;
            }
        }
        old_h = h;
        var tit = hs.eq(i).text().replace(/^\d+[.、\s]+/g, '');
        tit = tit.replace(/[^a-zA-Z0-9_\-\s\u4e00-\u9fa5]+/g, '').trim();

        if (tit.length < 100) {
            s += '<li><a href="#t' + i + '">' + tit + '</a></li>';
            hs.eq(i).html('<a name="t' + i + '"></a>' + hs.eq(i).html());
        }
    }
    while (ol_cnt > 0) {
        s += '</ol>';
        ol_cnt--;
    }
    s += '</ol></div>';
    s += '<div style="clear:both"></div>';
	$($("#article_content")[0]).prepend(s)
}
function openct(e) {
    if (e.innerHTML == '[+]') {
        $(e).attr('title', '收起').html('[-]').parent().next().show();
    } else {
        $(e).attr('title', '展开').html('[+]').parent().next().hide();
    }
    e.blur();
    return false;
}
function getCodeBodyContainer(id) {
	return $("#"+id)
}
function doCopy(id){
	var i = getCodeBodyContainer(id),
		o = i.html(),
		p = $(i).prev(),
		u = getProgramCodeText(i),
		t = document.createElement("textarea"),
		r;
	$(t).val(u);
	$(t).css("width", $(i).width());
	r = $(i).height() * .8;
	r > 600 && (r = 600);
	$(t).css("height", r);
	$(t).css("font-family", "Courier New");
	$(t).css("font-size", "12px");
	$(t).css("line-height", "1.5");
	$(p).hide(), $(i).html(t), $(t).select();
	$("<div><a class='program_code_toggle_show' href='javascript:;'>View code<\/a>&nbsp;&nbsp;按 Ctrl+C 复制代码<\/div>").insertBefore($(t));
	$("<div><a class='program_code_toggle_show' href='javascript:;'>View code<\/a>&nbsp;&nbsp;按 Ctrl+C 复制代码<\/div>").insertAfter($(t)), $(".program_code_toggle_show").bind('click', function() {
		$(i).html(o), $(p).show()
	})
}
function setCopyBtn() {
    $('.CopyToClipboard').each(function() {
        var clip = new ZeroClipboard.Client();
        clip.setHandCursor(true);
        clip.addEventListener('load', function(client) {
        });
        clip.addEventListener('mouseOver', function(client) {
			var _c_ode = getProgramCodeText(client.movie.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling);
            client.setText(_c_ode);
        });
        clip.addEventListener('complete', function(client, text) {
            alert("代码已经复制到你的剪贴板。");
        });
        clip.glue(this, this.parentNode);
    });
}
/*encoder.js*/
Encoder={EncodeType:"entity",isEmpty:function(a){return a?a===null||a.length==0||/^\s+$/.test(a):true},arr1:["&nbsp;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&shy;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&quot;","&amp;","&lt;","&gt;","&OElig;","&oelig;","&Scaron;","&scaron;","&Yuml;","&circ;","&tilde;","&ensp;","&emsp;","&thinsp;","&zwnj;","&zwj;","&lrm;","&rlm;","&ndash;","&mdash;","&lsquo;","&rsquo;","&sbquo;","&ldquo;","&rdquo;","&bdquo;","&dagger;","&Dagger;","&permil;","&lsaquo;","&rsaquo;","&euro;","&fnof;","&Alpha;","&Beta;","&Gamma;","&Delta;","&Epsilon;","&Zeta;","&Eta;","&Theta;","&Iota;","&Kappa;","&Lambda;","&Mu;","&Nu;","&Xi;","&Omicron;","&Pi;","&Rho;","&Sigma;","&Tau;","&Upsilon;","&Phi;","&Chi;","&Psi;","&Omega;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigmaf;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&thetasym;","&upsih;","&piv;","&bull;","&hellip;","&prime;","&Prime;","&oline;","&frasl;","&weierp;","&image;","&real;","&trade;","&alefsym;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&crarr;","&lArr;","&uArr;","&rArr;","&dArr;","&hArr;","&forall;","&part;","&exist;","&empty;","&nabla;","&isin;","&notin;","&ni;","&prod;","&sum;","&minus;","&lowast;","&radic;","&prop;","&infin;","&ang;","&and;","&or;","&cap;","&cup;","&int;","&there4;","&sim;","&cong;","&asymp;","&ne;","&equiv;","&le;","&ge;","&sub;","&sup;","&nsub;","&sube;","&supe;","&oplus;","&otimes;","&perp;","&sdot;","&lceil;","&rceil;","&lfloor;","&rfloor;","&lang;","&rang;","&loz;","&spades;","&clubs;","&hearts;","&diams;"],arr2:["&#160;","&#161;","&#162;","&#163;","&#164;","&#165;","&#166;","&#167;","&#168;","&#169;","&#170;","&#171;","&#172;","&#173;","&#174;","&#175;","&#176;","&#177;","&#178;","&#179;","&#180;","&#181;","&#182;","&#183;","&#184;","&#185;","&#186;","&#187;","&#188;","&#189;","&#190;","&#191;","&#192;","&#193;","&#194;","&#195;","&#196;","&#197;","&#198;","&#199;","&#200;","&#201;","&#202;","&#203;","&#204;","&#205;","&#206;","&#207;","&#208;","&#209;","&#210;","&#211;","&#212;","&#213;","&#214;","&#215;","&#216;","&#217;","&#218;","&#219;","&#220;","&#221;","&#222;","&#223;","&#224;","&#225;","&#226;","&#227;","&#228;","&#229;","&#230;","&#231;","&#232;","&#233;","&#234;","&#235;","&#236;","&#237;","&#238;","&#239;","&#240;","&#241;","&#242;","&#243;","&#244;","&#245;","&#246;","&#247;","&#248;","&#249;","&#250;","&#251;","&#252;","&#253;","&#254;","&#255;","&#34;","&#38;","&#60;","&#62;","&#338;","&#339;","&#352;","&#353;","&#376;","&#710;","&#732;","&#8194;","&#8195;","&#8201;","&#8204;","&#8205;","&#8206;","&#8207;","&#8211;","&#8212;","&#8216;","&#8217;","&#8218;","&#8220;","&#8221;","&#8222;","&#8224;","&#8225;","&#8240;","&#8249;","&#8250;","&#8364;","&#402;","&#913;","&#914;","&#915;","&#916;","&#917;","&#918;","&#919;","&#920;","&#921;","&#922;","&#923;","&#924;","&#925;","&#926;","&#927;","&#928;","&#929;","&#931;","&#932;","&#933;","&#934;","&#935;","&#936;","&#937;","&#945;","&#946;","&#947;","&#948;","&#949;","&#950;","&#951;","&#952;","&#953;","&#954;","&#955;","&#956;","&#957;","&#958;","&#959;","&#960;","&#961;","&#962;","&#963;","&#964;","&#965;","&#966;","&#967;","&#968;","&#969;","&#977;","&#978;","&#982;","&#8226;","&#8230;","&#8242;","&#8243;","&#8254;","&#8260;","&#8472;","&#8465;","&#8476;","&#8482;","&#8501;","&#8592;","&#8593;","&#8594;","&#8595;","&#8596;","&#8629;","&#8656;","&#8657;","&#8658;","&#8659;","&#8660;","&#8704;","&#8706;","&#8707;","&#8709;","&#8711;","&#8712;","&#8713;","&#8715;","&#8719;","&#8721;","&#8722;","&#8727;","&#8730;","&#8733;","&#8734;","&#8736;","&#8743;","&#8744;","&#8745;","&#8746;","&#8747;","&#8756;","&#8764;","&#8773;","&#8776;","&#8800;","&#8801;","&#8804;","&#8805;","&#8834;","&#8835;","&#8836;","&#8838;","&#8839;","&#8853;","&#8855;","&#8869;","&#8901;","&#8968;","&#8969;","&#8970;","&#8971;","&#9001;","&#9002;","&#9674;","&#9824;","&#9827;","&#9829;","&#9830;"],HTML2Numerical:function(a){return this.swapArrayVals(a,this.arr1,this.arr2)},NumericalToHTML:function(a){return this.swapArrayVals(a,this.arr2,this.arr1)},numEncode:function(c){if(this.isEmpty(c))return"";for(var d="",b=0;b<c.length;b++){var a=c.charAt(b);if(a<" "||a>"~")a="&#"+a.charCodeAt()+";";d+=a}return d},htmlDecode:function(e){var c,b,a=e;if(this.isEmpty(a))return"";a=this.HTML2Numerical(a);arr=a.match(/&#[0-9]{1,5};/g);if(arr!=null)for(var d=0;d<arr.length;d++){b=arr[d];c=b.substring(2,b.length-1);if(c>=-32768&&c<=65535)a=a.replace(b,String.fromCharCode(c));else a=a.replace(b,"")}return a},htmlEncode:function(a,b){if(this.isEmpty(a))return"";b=b||false;if(b)if(this.EncodeType=="numerical")a=a.replace(/&/g,"&#38;");else a=a.replace(/&/g,"&amp;");a=this.XSSEncode(a,false);if(this.EncodeType=="numerical"||!b)a=this.HTML2Numerical(a);a=this.numEncode(a);if(!b){a=a.replace(/&#/g,"##AMPHASH##");if(this.EncodeType=="numerical")a=a.replace(/&/g,"&#38;");else a=a.replace(/&/g,"&amp;");a=a.replace(/##AMPHASH##/g,"&#")}a=a.replace(/&#\d*([^\d;]|$)/g,"$1");if(!b)a=this.correctEncoding(a);if(this.EncodeType=="entity")a=this.NumericalToHTML(a);return a},XSSEncode:function(a,b){if(!this.isEmpty(a)){b=b||true;if(b){a=a.replace(/\'/g,"&#39;");a=a.replace(/\"/g,"&quot;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;")}else{a=a.replace(/\'/g,"&#39;");a=a.replace(/\"/g,"&#34;");a=a.replace(/</g,"&#60;");a=a.replace(/>/g,"&#62;")}return a}else return""},hasEncoded:function(a){return/&#[0-9]{1,5};/g.test(a)?true:/&[A-Z]{2,6};/gi.test(a)?true:false},stripUnicode:function(a){return a.replace(/[^\x20-\x7E]/g,"")},correctEncoding:function(a){return a.replace(/(&amp;)(amp;)+/,"$1")},swapArrayVals:function(b,a,d){if(this.isEmpty(b))return"";var e;if(a&&d)if(a.length==d.length)for(var c=0,f=a.length;c<f;c++){e=new RegExp(a[c],"g");b=b.replace(e,d[c])}return b},inArray:function(c,b){for(var a=0,d=b.length;a<d;a++)if(b[a]===c)return a;return-1}}
/*highlight.pack.js*/
var hljs=new function(){function k(v){return v.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\n/g,""):w.nodeValue}if(t(w)=="br"){return"\n"}return d(w)}).join("")}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^language-/,"")});return v.filter(function(x){return j(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset<y[0].offset)?w:y}return y[0].event=="start"?w:y}function A(H){function G(I){return" "+I.nodeName+'="'+k(I.value)+'"'}F+="<"+t(H)+Array.prototype.map.call(H.attributes,G).join("")+">"}function E(G){F+="</"+t(G)+">"}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=k(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+k(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};function E(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})}if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b=D.bK.split(" ").join("|")}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?\\b("+F.b+")\\b\\.?":F.b}).concat([D.tE]).concat([D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T<V.c.length;T++){if(i(V.c[T].bR,U)){return V.c[T]}}}function z(U,T){if(i(U.eR,T)){return U}if(U.eW){return z(U.parent,T)}}function A(T,U){return !J&&i(U.iR,T)}function E(V,T){var U=M.cI?T[0].toLowerCase():T[0];return V.k.hasOwnProperty(U)&&V.k[U]}function w(Z,X,W,V){var T=V?"":b.classPrefix,U='<span class="'+T,Y=W?"":"</span>";U+=Z+'">';return U+X+Y}function N(){var U=k(C);if(!I.k){return U}var T="";var X=0;I.lR.lastIndex=0;var V=I.lR.exec(U);while(V){T+=U.substr(X,V.index-X);var W=E(I,V);if(W){H+=W[1];T+=w(W[0],V[0])}else{T+=V[0]}X=I.lR.lastIndex;V=I.lR.exec(U)}return T+U.substr(X)}function F(){if(I.sL&&!f[I.sL]){return k(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):g(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=k(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+="</span>"}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=k(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"<unnamed>")+'"')}C+=X;return X.length||1}var M=j(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+="</span>"}}return{r:H,value:D,language:S,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:k(L)}}else{throw O}}}function g(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:k(y)};var w=v;x.forEach(function(z){if(!j(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function h(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"<br>")}return v}function p(z){var y=d(z);var A=r(z);if(typeof(A)=="undefined"||A=="no-highlight"){return}var v=A?c(A,y,true):g(y);var w=u(z);if(w.length){var x=document.createElementNS("http://www.w3.org/1999/xhtml","pre");x.innerHTML=v.value;v.value=q(w,u(x),y)}v.value=h(v.value);z.innerHTML=v.value;z.className+=" hljs "+(!A&&v.language||"");z.result={language:v.language,re:v.r};if(v.second_best){z.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function e(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function j(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=g;this.fixMarkup=h;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=e;this.getLanguage=j;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("bash",function(b){var a={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]};var d={cN:"string",b:/"/,e:/"/,c:[b.BE,a,{cN:"variable",b:/\$\(/,e:/\)/,c:[b.BE]}]};var c={cN:"string",b:/'/,e:/'/};return{l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[b.inherit(b.TM,{b:/\w[\w\d_]*/})],r:0},b.HCM,b.NM,d,c,a]}});hljs.registerLanguage("cs",function(b){var a="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield";return{k:a,c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",b:"///|<!--|-->"},{cN:"xmlDocTag",b:"</?",e:">"}]},b.CLCM,b.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},b.ASM,b.QSM,b.CNM,{bK:"protected public private internal",e:/[{;=]/,k:a,c:[{bK:"class namespace interface",starts:{c:[b.TM]}},{b:b.IR+"\\s*\\(",rB:true,c:[b.TM]}]}]}});hljs.registerLanguage("ruby",function(e){var h="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var g="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor";var a={cN:"yardoctag",b:"@[A-Za-z]+"};var i={cN:"comment",v:[{b:"#",e:"$",c:[a]},{b:"^\\=begin",e:"^\\=end",c:[a],r:10},{b:"^__END__",e:"\\n$"}]};var c={cN:"subst",b:"#\\{",e:"}",k:g};var d={cN:"string",c:[e.BE,c],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:"%[qw]?\\(",e:"\\)"},{b:"%[qw]?\\[",e:"\\]"},{b:"%[qw]?{",e:"}"},{b:"%[qw]?<",e:">",r:10},{b:"%[qw]?/",e:"/",r:10},{b:"%[qw]?%",e:"%",r:10},{b:"%[qw]?-",e:"-",r:10},{b:"%[qw]?\\|",e:"\\|",r:10},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]};var b={cN:"params",b:"\\(",e:"\\)",k:g};var f=[d,i,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]},i]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:h}),b,i]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[d,{b:h}],r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[i,{cN:"regexp",c:[e.BE,c],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];c.c=f;b.c=f;return{k:g,c:f}});hljs.registerLanguage("diff",function(a){return{c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("javascript",function(a){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+a.IR,r:0}]}});hljs.registerLanguage("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/</,r:0,c:[d,{cN:"attribute",b:c,r:0},{b:"=",r:0,c:[{cN:"value",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html"],cI:true,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},d,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("markdown",function(a){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:true,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:true,rE:true,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:true,eE:true},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:true,eE:true,}],r:10},{b:"^\\[.+\\]:",e:"$",rB:true,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:true,eE:true},{cN:"link_url",b:"\\s",e:"$"}]}]}});hljs.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("http",function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}});hljs.registerLanguage("java",function(b){var a="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";return{k:a,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},b.CLCM,b.CBLCLM,b.ASM,b.QSM,{bK:"protected public private",e:/[{;=]/,k:a,c:[{cN:"class",bK:"class interface",eW:true,i:/[:"<>]/,c:[{bK:"extends implements",r:10},b.UTM]},{b:b.UIR+"\\s*\\(",rB:true,c:[b.UTM]}]},b.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("php",function(b){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var a={cN:"preprocessor",b:/<\?(php)?|\?>/};var c={cN:"string",c:[b.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},b.inherit(b.ASM,{i:null}),b.inherit(b.QSM,{i:null})]};var d={v:[b.BNM,b.CNM]};return{cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[b.CLCM,b.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},a]},{cN:"comment",b:"__halt_compiler.+?;",eW:true,k:"__halt_compiler",l:b.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[b.BE]},a,e,{cN:"function",bK:"function",e:/[;{]/,i:"\\$|\\[|%",c:[b.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",e,b.CBLCLM,c,d]}]},{cN:"class",bK:"class interface",e:"{",i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},b.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[b.UTM]},{bK:"use",e:";",c:[b.UTM]},{b:"=>"},c,d]}});hljs.registerLanguage("python",function(a){var f={cN:"prompt",b:/^(>>>|\.\.\.) /};var b={cN:"string",c:[a.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[f],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[f],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/,},{b:/(b|br)"/,e:/"/,},a.ASM,a.QSM]};var d={cN:"number",r:0,v:[{b:a.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:a.CNR+"[lLjJ]?"}]};var e={cN:"params",b:/\(/,e:/\)/,c:["self",f,d,b]};var c={e:/:/,i:/[${=;\n]/,c:[a.UTM,e]};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[f,d,b,a.HCM,a.inherit(c,{cN:"function",bK:"def",r:10}),a.inherit(c,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("sql",function(a){return{cI:true,i:/[<>]/,c:[{cN:"operator",b:"\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)",e:";",eW:true,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row merge matched database",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:"comment",b:"--",e:"$"}]}});hljs.registerLanguage("ini",function(a){return{cI:true,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM],r:0}]}]}});hljs.registerLanguage("perl",function(c){var d="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var f={cN:"subst",b:"[$@]\\{",e:"\\}",k:d};var g={b:"->{",e:"}"};var a={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@\*][^\s\w{]/,r:0}]};var e={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var h=[c.BE,f,a];var b=[a,c.HCM,e,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:true},g,{cN:"string",c:h,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[c.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[c.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+c.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[c.HCM,e,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[c.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];f.c=b;g.c=b;return{k:d,c:b}});hljs.registerLanguage("objectivec",function(a){var d={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign self synchronized id nonatomic super unichar IBOutlet IBAction strong weak @private @protected @public @try @property @end @throw @catch @finally @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"};var c=/[a-zA-Z@][a-zA-Z0-9_]*/;var b="@interface @class @protocol @implementation";return{k:d,l:c,i:"</",c:[a.CLCM,a.CBLCLM,a.CNM,a.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"preprocessor",b:"#import",e:"$",c:[{cN:"title",b:'"',e:'"'},{cN:"title",b:"<",e:">"}]},{cN:"preprocessor",b:"#",e:"$"},{cN:"class",b:"("+b.split(" ").join("|")+")\\b",e:"({|$)",k:b,l:c,c:[a.UTM]},{cN:"variable",b:"\\."+a.UIR,r:0}]}});hljs.registerLanguage("coffeescript",function(c){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"};var a="[A-Za-z$_][0-9A-Za-z$_]*";var f=c.inherit(c.TM,{b:a});var e={cN:"subst",b:/#\{/,e:/}/,k:b};var d=[c.BNM,c.inherit(c.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[c.BE]},{b:/'/,e:/'/,c:[c.BE]},{b:/"""/,e:/"""/,c:[c.BE,e]},{b:/"/,e:/"/,c:[c.BE,e]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[e,c.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+a},{b:"`",e:"`",eB:true,eE:true,sL:"javascript"}];e.c=d;return{k:b,c:d.concat([{cN:"comment",b:"###",e:"###"},c.HCM,{cN:"function",b:"("+a+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:true,c:[f,{cN:"params",b:"\\(",rB:true,c:[{b:/\(/,e:/\)/,k:b,c:["self"].concat(d)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:true,i:/[:="\[\]]/,c:[f]},f]},{cN:"attribute",b:a+":",e:":",rB:true,eE:true,r:0}])}});hljs.registerLanguage("nginx",function(c){var b={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+c.UIR}]};var a={eW:true,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[c.HCM,{cN:"string",c:[c.BE,b],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:true,eE:true},{cN:"regexp",c:[c.BE,b],v:[{b:"\\s\\^",e:"\\s|{|;",rE:true},{b:"~\\*?\\s+",e:"\\s|{|;",rE:true},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},b]};return{c:[c.HCM,{b:c.UIR+"\\s",e:";|{",rB:true,c:[c.inherit(c.UTM,{starts:a})],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("json",function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}});hljs.registerLanguage("apache",function(a){var b={cN:"number",b:"[\\$%]\\d+"};return{cI:true,c:[a.HCM,{cN:"tag",b:"</?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",b]},b,a.QSM]}}],i:/\S/}});hljs.registerLanguage("cpp",function(a){var b={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c"],k:b,i:"</",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},a.CNM,{cN:"preprocessor",b:"#",e:"$",c:[{b:"include\\s*<",e:">",i:"\\n"},a.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b,r:10,c:["self"]}]}});hljs.registerLanguage("makefile",function(a){var b={cN:"variable",b:/\$\(/,e:/\)/,c:[a.BE]};return{c:[a.HCM,{b:/^\w+\s*\W*=/,rB:true,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:true,starts:{e:/$/,r:0,c:[b],}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[a.QSM,b]}]}});
/*ZeroClipboard.js*/
var ZeroClipboard={version:"1.0.7",clients:{},moviePath:saxue_skin_server+'/code/ZeroClipboard.swf',nextId:1,$:function(thingy){if(typeof(thingy)=='string')thingy=document.getElementById(thingy);if(true||!thingy.addClass){thingy.hide=function(){this.style.display='none'};thingy.show=function(){this.style.display='block'};thingy.addClass=function(name){this.removeClass(name);this.className+=' '+name};thingy.removeClass=function(name){var classes=this.className.split(/\s+/);var idx=-1;for(var k=0;k<classes.length;k++){if(classes[k]==name){idx=k;k=classes.length}}if(idx>-1){classes.splice(idx,1);this.className=classes.join(' ')}return this};thingy.hasClass=function(name){return!!this.className.match(new RegExp("\\s*"+name+"\\s*"))}}return thingy},setMoviePath:function(path){this.moviePath=path},dispatch:function(id,eventName,args){var client=this.clients[id];if(client){client.receiveEvent(eventName,args)}},register:function(id,client){this.clients[id]=client},getDOMObjectPosition:function(obj,stopObj){var info={left:0,top:0,width:obj.width?obj.width:obj.offsetWidth,height:obj.height?obj.height:obj.offsetHeight};while(obj&&(obj!=stopObj)){info.left+=obj.offsetLeft;info.top+=obj.offsetTop;obj=obj.offsetParent}return info},Client:function(elem){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId='ZeroClipboardMovie_'+this.id;ZeroClipboard.register(this.id,this);if(elem)this.glue(elem)}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:'',handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(elem,appendElem,stylesToAdd){this.domElement=ZeroClipboard.$(elem);var zIndex=99;if(this.domElement.style.zIndex){zIndex=parseInt(this.domElement.style.zIndex,10)+1}if(typeof(appendElem)=='string'){appendElem=ZeroClipboard.$(appendElem)}else if(typeof(appendElem)=='undefined'){appendElem=document.getElementsByTagName('body')[0]}var box=ZeroClipboard.getDOMObjectPosition(this.domElement,appendElem);this.div=document.createElement('div');var style=this.div.style;style.position='absolute';style.left=''+box.left+'px';style.top=''+box.top+'px';style.width=''+box.width+'px';style.height=''+box.height+'px';style.zIndex=zIndex;if(typeof(stylesToAdd)=='object'){for(addedStyle in stylesToAdd){style[addedStyle]=stylesToAdd[addedStyle]}}appendElem.appendChild(this.div);this.div.innerHTML=this.getHTML(box.width,box.height)},getHTML:function(width,height){var html='';var flashvars='id='+this.id+'&width='+width+'&height='+height;if(navigator.userAgent.match(/MSIE/)){var protocol=location.href.match(/^https/i)?'https://':'http://';html+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>'}else{html+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />'}return html},hide:function(){if(this.div){this.div.style.left='-2000px'}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML='';var body=document.getElementsByTagName('body')[0];try{body.removeChild(this.div)}catch(e){}this.domElement=null;this.div=null}},reposition:function(elem){if(elem){this.domElement=ZeroClipboard.$(elem);if(!this.domElement)this.hide()}if(this.domElement&&this.div){var box=ZeroClipboard.getDOMObjectPosition(this.domElement);var style=this.div.style;style.left=''+box.left+'px';style.top=''+box.top+'px'}},setText:function(newText){this.clipText=newText;if(this.ready)this.movie.setText(newText)},addEventListener:function(eventName,func){eventName=eventName.toString().toLowerCase().replace(/^on/,'');if(!this.handlers[eventName])this.handlers[eventName]=[];this.handlers[eventName].push(func)},setHandCursor:function(enabled){this.handCursorEnabled=enabled;if(this.ready)this.movie.setHandCursor(enabled)},setCSSEffects:function(enabled){this.cssEffects=!!enabled},receiveEvent:function(eventName,args){eventName=eventName.toString().toLowerCase().replace(/^on/,'');switch(eventName){case'load':this.movie=document.getElementById(this.movieId);if(!this.movie){var self=this;setTimeout(function(){self.receiveEvent('load',null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var self=this;setTimeout(function(){self.receiveEvent('load',null)},100);this.ready=true;return}this.ready=true;this.movie.setText(this.clipText);this.movie.setHandCursor(this.handCursorEnabled);break;case'mouseover':if(this.domElement&&this.cssEffects){this.domElement.addClass('hover');if(this.recoverActive)this.domElement.addClass('active')}break;case'mouseout':if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass('active')){this.domElement.removeClass('active');this.recoverActive=true}this.domElement.removeClass('hover')}break;case'mousedown':if(this.domElement&&this.cssEffects){this.domElement.addClass('active')}break;case'mouseup':if(this.domElement&&this.cssEffects){this.domElement.removeClass('active');this.recoverActive=false}break}if(this.handlers[eventName]){for(var idx=0,len=this.handlers[eventName].length;idx<len;idx++){var func=this.handlers[eventName][idx];if(typeof(func)=='function'){func(this,args)}else if((typeof(func)=='object')&&(func.length==2)){func[0][func[1]](this,args)}else if(typeof(func)=='string'){window[func](this,args)}}}}};
/*SyntaxHighlighter.js*/
var a, dp = {sh: {Toolbar: {},Utils: {},RegexLib: {},Brushes: {},Strings: {AboutDialog: '<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a></p>&copy;2004-2007 Alex Gorbatchev.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>'},ClipboardSwf: saxue_skin_server + '/code/ZeroClipboard.swf',Version: "1.5.1"}};
dp.SyntaxHighlighter = dp.sh;
dp.sh.Toolbar.Commands = {
    ExpandSource: {label: "+ expand source",check: function(b) {
            return b.collapse
        },func: function(b, c) {
			b.parentNode.removeChild(b);
			c.div.className = c.div.className.replace("collapsed", "");
		}
    },
    ViewSource: {label: "view plain",func: function(b, c) {
        b = dp.sh.Utils.FixForBlogger(c.originalCode).replace(/</g, "&lt;");
        c = window.open("", "_blank", "width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");
        c.document.write('<textarea style="width:99%;height:99%">' + b + "</textarea>");
        c.document.close();
    }},
    CopyToClipboard: {
        label: "copy",check: function() {
            return window.clipboardData != null || dp.sh.ClipboardSwf != null
        },
        func: function(b, c) {
            b = dp.sh.Utils.FixForBlogger(c.originalCode).replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
            if (window.clipboardData)
                window.clipboardData.setData("text", b);
            else if (dp.sh.ClipboardSwf != null) {
				/*
                var d = c.flashCopier;
                if (d == null) {
                    d = document.createElement("div");
                    c.flashCopier = d;
                    c.div.appendChild(d);
                }
                d.innerHTML = '<embed src="' + dp.sh.ClipboardSwf + '" FlashVars="clipboard=' + encodeURIComponent(b) + '" width="0" height="0" type="application/x-shockwave-flash"></embed>';
				*/
            }
            alert("代码已经复制到你的剪贴板");
        }
    },
    PrintSource:{
        label: "print",func: function(b, c) {
            b = document.createElement("IFRAME");
            var d = null;
            b.style.cssText = "position:absolute;width:0px;height:0px;left:-500px;top:-500px;";
            document.body.appendChild(b);
            d = b.contentWindow.document;
            dp.sh.Utils.CopyStyles(d, window.document);
            d.write('<div class="' + c.div.className.replace("collapsed", "") + ' printing">' + c.div.innerHTML + "</div>");
            d.close();
            b.contentWindow.focus();
            b.contentWindow.print();
            alert("Printing...");
            document.body.removeChild(b);
        }
    },
    About: {label: "?",func: function() {
        var b = window.open("", "_blank", "dialog,width=300,height=150,scrollbars=0"), c = b.document;
        dp.sh.Utils.CopyStyles(c, window.document);
        c.write(dp.sh.Strings.AboutDialog.replace("{V}", dp.sh.Version));
        c.close();
        b.focus()
    }}
};
dp.sh.Toolbar.Create = function(b) {
    var _code = b.source.className;
    var c = document.createElement("DIV");
    c.className = "tools";
    c.innerHTML = '<b>[' + _code + ']</b> ';
    for (var d in dp.sh.Toolbar.Commands) {
        var f = dp.sh.Toolbar.Commands[d];
        //   f.check != null && !f.check(b) || (c.innerHTML += '<a href="#" class="' + d + '" title="' + f.label + '" onclick="dp.sh.Toolbar.Command(\'' + d + "',this);return false;\">" + f.label + "</a>")
        if (f.label == "print") {
            f.check != null && !f.check(b) || (c.innerHTML += '<span data-mod="popu_169"> <a href="#" class="' + d + '" title="' + f.label + '" onclick="dp.sh.Toolbar.Command(\'' + d + "',this);return false;\">" + f.label + "</a></span>")
        }
        else if (f.label == "copy") {
            f.check != null && !f.check(b) || (c.innerHTML += '<span data-mod="popu_168"> <a href="#" class="' + d + '" title="' + f.label + '" onclick="dp.sh.Toolbar.Command(\'' + d + "',this);return false;\">" + f.label + "</a></span>")
        }
        else {
            f.check != null && !f.check(b) || (c.innerHTML += '<a href="#" class="' + d + '" title="' + f.label + '" onclick="dp.sh.Toolbar.Command(\'' + d + "',this);return false;\">" + f.label + "</a>")
        }
    }
    return c;
};
dp.sh.Toolbar.Command = function(b, c) {
    for (var d = c; d != null && d.className.indexOf("dp-highlighter") == -1; )
        d = d.parentNode;
    d != null && dp.sh.Toolbar.Commands[b].func(c, d.highlighter)
    //console.log(dp.sh.Toolbar.Commands[b]);
};
//dp.sh.Toolbar.Command('CopyToClipboard','');
dp.sh.Utils.CopyStyles = function(b, c) {
    c = c.getElementsByTagName("link");
    for (var d = 0; d < c.length; d++)
        c[d].rel.toLowerCase() == "stylesheet" && b.write('<link type="text/css" rel="stylesheet" href="' + c[d].href + '"></link>')
};
dp.sh.Utils.FixForBlogger = function(b) {
    return dp.sh.isBloggerMode == true ? b.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi, "\n") : b
};
dp.sh.RegexLib = {MultiLineCComments: new RegExp("/\\*[\\s\\S]*?\\*/", "gm"),SingleLineCComments: new RegExp("//.*$", "gm"),SingleLinePerlComments: new RegExp("#.*$", "gm"),DoubleQuotedString: new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"', "g"),SingleQuotedString: new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'", "g")};
dp.sh.Match = function(b, c, d) {
    this.value = b;
    this.index = c;
    this.length = b.length;
    this.css = d
};
dp.sh.Highlighter = function() {
    this.noGutter = false;
    this.addControls = true;
    this.collapse = false;
    this.tabsToSpaces = true;
    this.wrapColumn = 80;
    this.showColumns = true
};
dp.sh.Highlighter.SortCallback = function(b, c) {
    if (b.index < c.index)
        return -1;
    else if (b.index > c.index)
        return 1;
    else if (b.length < c.length)
        return -1;
    else if (b.length > c.length)
        return 1;
    return 0
};
a = dp.sh.Highlighter.prototype;
a.CreateElement = function(b) {
    b = document.createElement(b);
    b.highlighter = this;
    return b
};
a.GetMatches = function(b, c) {
    for (var d = null; (d = b.exec(this.code)) != null; )
        this.matches[this.matches.length] = new dp.sh.Match(d[0], d.index, c)
};
a.AddBit = function(b, c) {
    if (!(b == null || b.length == 0)) {
        var d = this.CreateElement("SPAN");
        b = b.replace(/ /g, "&nbsp;");
        b = b.replace(/</g, "&lt;");
        b = b.replace(/(\r?\n)|(\[BR\])/gm, "&nbsp;<br>");
        if (c != null)
            if (/br/gi.test(b)) {
                b = b.split("&nbsp;<br>");
                for (var f = 0; f < b.length; f++) {
                    d = this.CreateElement("SPAN");
                    d.className = c;
                    d.innerHTML = b[f];
                    this.div.appendChild(d);
                    f + 1 < b.length && this.div.appendChild(this.CreateElement("BR"))
                }
            } else {
                d.className = c;
                d.innerHTML = b;
                this.div.appendChild(d)
            }
        else {
            d.innerHTML = b;
            this.div.appendChild(d)
        }
    }
};
a.IsInside = function(b) {
    if (b == null || b.length == 0)
        return false;
    for (var c = 0; c < this.matches.length; c++) {
        var d = this.matches[c];
        if (d != null)
            if (b.index > d.index && b.index < d.index + d.length)
                return true
    }
    return false
};
a.ProcessRegexList = function() {
    for (var b = 0; b < this.regexList.length; b++)
        this.GetMatches(this.regexList[b].regex, this.regexList[b].css)
};
a.ProcessSmartTabs = function(b) {
    function c(h, e, l) {
        var m = h.substr(0, e);
        h = h.substr(e + 1, h.length);
        e = "";
        for (var i = 0; i < l; i++)
            e += " ";
        return m + e + h
    }
    function d(h, e) {
        if (h.indexOf(p) == -1)
            return h;
        for (var l = 0; (l = h.indexOf(p)) != -1; )
            h = c(h, l, e - l % e);
        return h
    }
    b = b.split("\n");
    for (var f = "", p = "\t", q = 0; q < b.length; q++)
        f += d(b[q], 4) + "\n";
    return f
};
a.SwitchToList = function() {
    var b = this.div.innerHTML.replace(/<(br)\/?>/gi, "\n").split("\n");
    this.addControls == true && this.bar.appendChild(dp.sh.Toolbar.Create(this));
    if (this.showColumns) {
        for (var c = this.CreateElement("div"), d = this.CreateElement("div"), f = 1; f <= 150; )
            if (f % 10 == 0) {
                c.innerHTML += f;
                f += (f + "").length
            } else {
                c.innerHTML += "&middot;";
                f++
            }
        d.className = "columns";
        d.appendChild(c);
        this.bar.appendChild(d)
    }
    f = 0;
    for (c = this.firstLine; f < b.length - 1; f++, c++) {
        d = this.CreateElement("LI");
        var p = this.CreateElement("SPAN");
        d.className = f % 2 == 0 ? "alt" : "";
        p.innerHTML = b[f] + "&nbsp;";
        d.appendChild(p);
        this.ol.appendChild(d)
    }
    this.div.innerHTML = "";
};
a.Highlight = function(b) {
    function c(e) {
        return e.replace(/^\s*(.*?)[\s\n]*$/g, "$1")
    }
    function d(e) {
        return e.replace(/\n*$/, "").replace(/^\n*/, "")
    }
    function f(e) {
        e = dp.sh.Utils.FixForBlogger(e).split("\n");
        for (var l = new RegExp("^\\s*", "g"), m = 1E3, i = 0; i < e.length && m > 0; i++)
            if (c(e[i]).length != 0) {
                var g = l.exec(e[i]);
                if (g != null && g.length > 0)
                    m = Math.min(g[0].length, m)
            }
        if (m > 0)
            for (i = 0; i < e.length; i++)
                e[i] = e[i].substr(m);
        return e.join("\n");
    }
    function p(e, l, m) {
        return e.substr(l, m - l)
    }
    var q = 0;
    if (b == null)
        b = "";
    this.originalCode = b;
    this.code = d(f(b));
    this.div = this.CreateElement("DIV");
    this.bar = this.CreateElement("DIV");
    this.ol = this.CreateElement("OL");
    this.matches = [];
    this.div.className = "dp-highlighter";
    this.div.highlighter = this;
    this.bar.className = "bar";
    this.ol.start = this.firstLine;
    if (this.CssClass != null)
        this.ol.className = this.CssClass;
    if (this.collapse)
        this.div.className += " collapsed";
    if (this.noGutter)
        this.div.className += " nogutter";
    if (this.tabsToSpaces == true)
        this.code = this.ProcessSmartTabs(this.code);
    this.ProcessRegexList();
    if (this.matches.length == 0)
        this.AddBit(this.code, null);
    else {
        this.matches = this.matches.sort(dp.sh.Highlighter.SortCallback);
        for (b = 0; b < this.matches.length; b++)
            if (this.IsInside(this.matches[b]))
                this.matches[b] = null;
        for (b = 0; b < this.matches.length; b++) {
            var h = this.matches[b];
            if (!(h == null || h.length == 0)) {
                this.AddBit(p(this.code, q, h.index), null);
                this.AddBit(h.value, h.css);
                q = h.index + h.length
            }
        }
        this.AddBit(this.code.substr(q), null)
    }
    this.SwitchToList();
    this.div.appendChild(this.bar);
    this.div.appendChild(this.ol)
};
a.GetKeywords = function(b) {
    return "\\b" + b.replace(/ /g, "\\b|\\b") + "\\b"
};
dp.sh.BloggerMode = function() {
    dp.sh.isBloggerMode = true
};
dp.sh.HighlightAll = function(b, c, d, f, p, q) {
    function h() {
        for (var k = arguments, j = 0; j < k.length; j++)
            if (k[j] != null) {
                if (typeof k[j] == "string" && k[j] != "")
                    return k[j] + "";
                if (typeof k[j] == "object" && k[j].value != "")
                    return k[j].value + ""
            }
        return null
    }
    function e(k, j) {
        for (var o = 0; o < j.length; o++)
            if (j[o] == k)
                return true;
        return false
    }
    function l(k, j, o) {
        k = new RegExp("^" + k + "\\[(\\w+)\\]$", "gi");
        for (var s = null, u = 0; u < j.length; u++)
            if ((s = k.exec(j[u])) != null)
                return s[1];
        return o
    }
    function m(k, j, o) {
        o = document.getElementsByTagName(o);
        for (var s = 0; s < o.length; s++) {
            o[s].getAttribute("name") == j && k.push(o[s]);
        }
    }
    var i = [], g = null, v = {};
    m(i, b, "pre");
    m(i, b, "textarea");
    if (i.length != 0) {
        for (var n in dp.sh.Brushes) {
            g = dp.sh.Brushes[n].Aliases;
            if (g != null)
                for (b = 0; b < g.length; b++)
                    v[g[b]] = n
        }
        for (b = 0; b < i.length; b++) {
            n = i[b];
            var r = h(n.attributes["class"], n.className, n.attributes.language, n.language);
            g = "";
            if (r != null) {
                r = r.split(":");
                g = r[0].toLowerCase();
                if (v[g] != null) {
                    g = new dp.sh.Brushes[v[g]];
                    n.style.display = "none";
                    g.noGutter = c == null ? e("nogutter", r) : !c;
                    g.addControls = d == null ? !e("nocontrols", r) : d;
                    g.collapse = f == null ? e("collapse", r) : f;
                    g.showColumns = q == null ? e("showcolumns", r) : q;
                    var w = document.getElementsByTagName("head")[0];
                    if (g.Style && w) {
                        var t = document.createElement("style");
                        t.setAttribute("type", "text/css");
                        if (t.styleSheet)
                            t.styleSheet.cssText = g.Style;
                        else {
                            var x = document.createTextNode(g.Style);
                            t.appendChild(x)
                        }
                        w.appendChild(t);
                    }
                    g.firstLine = p == null ? parseInt(l("firstline", r, 1)) : p;
                    g.source = n;
                    g.Highlight(n.innerHTML);
                    g.div.className += " bg_" + n.className;
                    n.parentNode.insertBefore(g.div, n);
                }
            }
        }
    }
};
dp.sh.Brushes.Xml = function() {
    this.CssClass = "dp-xml";
    this.Style = ""
};
dp.sh.Brushes.Xml.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Xml.Aliases = ["xml", "xhtml", "xslt", "html", "xhtml"];
dp.sh.Brushes.Xml.prototype.ProcessRegexList = function() {
    function c(d, e) {
        d[d.length] = e
    }
    var a = null, b = null;
    this.GetMatches(new RegExp("(&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](&gt;|>)", "gm"), "cdata");
    this.GetMatches(new RegExp("(&lt;|<)!--\\s*.*?\\s*--(&gt;|>)", "gm"), "comments");
    for (b = new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)", "gm"); (a = b.exec(this.code)) != null; )
        if (a[1] != null) {
            c(this.matches, new dp.sh.Match(a[1], a.index, "attribute"));
            a[2] != undefined && c(this.matches, new dp.sh.Match(a[2], a.index + a[1].length + a[0].substr(a[1].length).indexOf(a[2]), "attribute-value"))
        }
    this.GetMatches(new RegExp("(&lt;|<)/*\\?*(?!\\!)|/*\\?*(&gt;|>)", "gm"), "tag");
    for (b = new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)", "gm"); (a = b.exec(this.code)) != null; )
        c(this.matches, new dp.sh.Match(a[1], a.index + a[0].indexOf(a[1]), "tag-name"))
};
dp.sh.Brushes.Vb = function() {
    this.regexList = [{regex: new RegExp("'.*$", "gm"),css: "comment"}, {regex: dp.sh.RegexLib.DoubleQuotedString,css: "string"}, {regex: new RegExp("^\\s*#.*", "gm"),css: "preprocessor"}, {regex: new RegExp(this.GetKeywords("AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End Enum Erase Error Event Exit False Finally For Friend Function Get GetType GoSub GoTo Handles If Implements Imports In Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing NotInheritable NotOverridable Object On Option Optional Or OrElse Overloads Overridable Overrides ParamArray Preserve Private Property Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume Return Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until Variant When While With WithEvents WriteOnly Xor"), "gm"),css: "keyword"}];
    this.CssClass = "dp-vb"
};
dp.sh.Brushes.Vb.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Vb.Aliases = ["vb", "vb.net"];
dp.sh.Brushes.Sql = function() {
    this.regexList = [{regex: new RegExp("--(.*)$", "gm"),css: "comment"}, {regex: dp.sh.RegexLib.DoubleQuotedString,css: "string"}, {regex: dp.sh.RegexLib.SingleQuotedString,css: "string"}, {regex: new RegExp(this.GetKeywords("abs avg case cast coalesce convert count current_timestamp current_user day isnull left lower month nullif replace right session_user space substring sum system_user upper user year"), "gmi"),css: "func"}, {regex: new RegExp(this.GetKeywords("all and any between cross in join like not null or outer some"), "gmi"),css: "op"}, {regex: new RegExp(this.GetKeywords("absolute action add after alter as asc at authorization begin bigint binary bit by cascade char character check checkpoint close collate column commit committed connect connection constraint contains continue create cube current current_date current_time cursor database date deallocate dec decimal declare default delete desc distinct double drop dynamic else end end-exec escape except exec execute false fetch first float for force foreign forward free from full function global goto grant group grouping having hour ignore index inner insensitive insert instead int integer intersect into is isolation key last level load local max min minute modify move name national nchar next no numeric of off on only open option order out output partial password precision prepare primary prior privileges procedure public read real references relative repeatable restrict return returns revoke rollback rollup rows rule schema scroll second section select sequence serializable set size smallint static statistics table temp temporary then time timestamp to top transaction translation trigger true truncate uncommitted union unique update values varchar varying view when where with work"), "gmi"),css: "keyword"}];
    this.CssClass = "dp-sql";
    this.Style = ""
};
dp.sh.Brushes.Sql.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Sql.Aliases = ["sql"];
dp.sh.Brushes.Ruby = function() {
    this.regexList = [{regex: dp.sh.RegexLib.SingleLinePerlComments,css: "comment"}, {regex: dp.sh.RegexLib.DoubleQuotedString,css: "string"}, {regex: dp.sh.RegexLib.SingleQuotedString,css: "string"}, {regex: new RegExp(":[a-z][A-Za-z0-9_]*", "g"),css: "symbol"}, {regex: new RegExp("(\\$|@@|@)\\w+", "g"),css: "variable"}, {regex: new RegExp(this.GetKeywords("alias and BEGIN begin break case class def define_method defined do each else elsif END end ensure false for if in module new next nil not or raise redo rescue retry return self super then throw true undef unless until when while yield"), "gm"),css: "keyword"}, {regex: new RegExp(this.GetKeywords("Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ThreadGroup Thread Time TrueClass"), "gm"),css: "builtin"}];
    this.CssClass = "dp-rb";
    this.Style = ""
};
dp.sh.Brushes.Ruby.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Ruby.Aliases = ["ruby", "rails", "ror"];
dp.sh.Brushes.Python = function() {
    this.regexList = [{regex: dp.sh.RegexLib.SingleLinePerlComments,css: "comment"}, {regex: new RegExp("^\\s*@\\w+", "gm"),css: "decorator"}, {regex: new RegExp("(['\"]{3})([^\\1])*?\\1", "gm"),css: "comment"}, {regex: new RegExp('"(?!")(?:\\.|\\\\\\"|[^\\""\\n\\r])*"', "gm"),css: "string"}, {regex: new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'", "gm"),css: "string"}, {regex: new RegExp("\\b\\d+\\.?\\w*", "g"),css: "number"}, {regex: new RegExp(this.GetKeywords("and assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try yield while"), "gm"),css: "keyword"}, {regex: new RegExp(this.GetKeywords("None True False self cls class_"), "gm"),css: "special"}];
    this.CssClass = "dp-py";
    this.Style = ""
};
dp.sh.Brushes.Python.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Python.Aliases = ["py", "python"];
dp.sh.Brushes.Plain = function() {
    this.regexList = []
};
dp.sh.Brushes.Plain.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Plain.Aliases = ["plain", "text", "txt"];
dp.sh.Brushes.Php = function() {
    this.regexList = [{regex: dp.sh.RegexLib.SingleLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.MultiLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.DoubleQuotedString,css: "string"}, {regex: dp.sh.RegexLib.SingleQuotedString,css: "string"}, {regex: new RegExp("\\$\\w+", "g"),css: "vars"}, {regex: new RegExp(this.GetKeywords("abs acos acosh addcslashes addslashes array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill array_filter array_flip array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists closedir closelog copy cos cosh count count_chars date decbin dechex decoct deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime strtoupper strtr strval substr substr_compare"), "gmi"),css: "func"}, {regex: new RegExp(this.GetKeywords("and or xor __FILE__ __LINE__ array as break case cfunction class const continue declare default die do else elseif enddeclare endfor endforeach endif endswitch endwhile extends for foreach function include include_once global if new old_function return static switch use require require_once var while __FUNCTION__ __CLASS__ __METHOD__ abstract interface public implements extends private protected throw"), "gm"),css: "keyword"}];
    this.CssClass = "dp-c"
};
dp.sh.Brushes.Php.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Php.Aliases = ["php"];
dp.sh.Brushes.JScript = function() {
    this.regexList = [{regex: dp.sh.RegexLib.SingleLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.MultiLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.DoubleQuotedString,css: "string"}, {regex: dp.sh.RegexLib.SingleQuotedString,css: "string"}, {regex: new RegExp("^\\s*#.*", "gm"),css: "preprocessor"}, {regex: new RegExp(this.GetKeywords("abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with"), "gm"),css: "keyword"}];
    this.CssClass = "dp-c"
};
dp.sh.Brushes.JScript.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.JScript.Aliases = ["js", "jscript", "javascript"];
dp.sh.Brushes.Java = function() {
    this.regexList = [{regex: dp.sh.RegexLib.SingleLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.MultiLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.DoubleQuotedString,css: "string"}, {regex: dp.sh.RegexLib.SingleQuotedString,css: "string"}, {regex: new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b", "gi"),css: "number"}, {regex: new RegExp("(?!\\@interface\\b)\\@[\\$\\w]+\\b", "g"),css: "annotation"}, {regex: new RegExp("\\@interface\\b", "g"),css: "keyword"}, {regex: new RegExp(this.GetKeywords("abstract assert boolean break byte case catch char class const continue default do double else enum extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws true transient try void volatile while"), "gm"),css: "keyword"}];
    this.CssClass = "dp-j";
    this.Style = ""
};
dp.sh.Brushes.Java.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Java.Aliases = ["java"];
dp.sh.Brushes.Delphi = function() {
    this.regexList = [{regex: new RegExp("\\(\\*[\\s\\S]*?\\*\\)", "gm"),css: "comment"}, {regex: new RegExp("{(?!\\$)[\\s\\S]*?}", "gm"),css: "comment"}, {regex: dp.sh.RegexLib.SingleLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.SingleQuotedString,css: "string"}, {regex: new RegExp("\\{\\$[a-zA-Z]+ .+\\}", "g"),css: "directive"}, {regex: new RegExp("\\b[\\d\\.]+\\b", "g"),css: "number"}, {regex: new RegExp("\\$[a-zA-Z0-9]+\\b", "g"),css: "number"}, {regex: new RegExp(this.GetKeywords("abs addr and ansichar ansistring array as asm begin boolean byte cardinal case char class comp const constructor currency destructor div do double downto else end except exports extended false file finalization finally for function goto if implementation in inherited int64 initialization integer interface is label library longint longword mod nil not object of on or packed pansichar pansistring pchar pcurrency pdatetime pextended pint64 pointer private procedure program property pshortstring pstring pvariant pwidechar pwidestring protected public published raise real real48 record repeat set shl shortint shortstring shr single smallint string then threadvar to true try type unit until uses val var varirnt while widechar widestring with word write writeln xor"), "gm"),css: "keyword"}];
    this.CssClass = "dp-delphi";
    this.Style = ""
};
dp.sh.Brushes.Delphi.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Delphi.Aliases = ["delphi", "pascal"];
dp.sh.Brushes.CSS = function() {
    this.regexList = [{regex: dp.sh.RegexLib.MultiLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.DoubleQuotedString,css: "string"}, {regex: dp.sh.RegexLib.SingleQuotedString,css: "string"}, {regex: new RegExp("\\#[a-zA-Z0-9]{3,6}", "g"),css: "value"}, {regex: new RegExp("(-?\\d+)(.\\d+)?(px|em|pt|:|%|)", "g"),css: "value"}, {regex: new RegExp("!important", "g"),css: "important"}, {regex: new RegExp(this.GetKeywordsCSS("ascent azimuth background-attachment background-color background-image background-position background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index"), "gm"),css: "keyword"}, {regex: new RegExp(this.GetValuesCSS("above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow"), "g"),css: "value"}, {regex: new RegExp(this.GetValuesCSS("[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif"), "g"),css: "value"}];
    this.CssClass = "dp-css";
    this.Style = ""
};
dp.sh.Highlighter.prototype.GetKeywordsCSS = function(a) {
    return "\\b([a-z_]|)" + a.replace(/ /g, "(?=:)\\b|\\b([a-z_\\*]|\\*|)") + "(?=:)\\b"
};
dp.sh.Highlighter.prototype.GetValuesCSS = function(a) {
    return "\\b" + a.replace(/ /g, "(?!-)(?!:)\\b|\\b()") + ":\\b"
};
dp.sh.Brushes.CSS.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.CSS.Aliases = ["css"];
dp.sh.Brushes.CSharp = function() {
    this.regexList = [{regex: dp.sh.RegexLib.SingleLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.MultiLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.DoubleQuotedString,css: "string"}, {regex: dp.sh.RegexLib.SingleQuotedString,css: "string"}, {regex: new RegExp("^\\s*#.*", "gm"),css: "preprocessor"}, {regex: new RegExp(this.GetKeywords("abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach get goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed set short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual void while"), "gm"),css: "keyword"}];
    this.CssClass = "dp-c";
    this.Style = ""
};
dp.sh.Brushes.CSharp.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.CSharp.Aliases = ["c#", "c-sharp", "csharp"];
dp.sh.Brushes.Cpp = function() {
    this.regexList = [{regex: dp.sh.RegexLib.SingleLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.MultiLineCComments,css: "comment"}, {regex: dp.sh.RegexLib.DoubleQuotedString,css: "string"}, {regex: dp.sh.RegexLib.SingleQuotedString,css: "string"}, {regex: new RegExp("^ *#.*", "gm"),css: "preprocessor"}, {regex: new RegExp(this.GetKeywords("ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t __wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler sig_atomic_t size_t _stat __stat64 _stati64 terminate_function time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf va_list wchar_t wctrans_t wctype_t wint_t signed"), "gm"),css: "datatypes"}, {regex: new RegExp(this.GetKeywords("break case catch class const __finally __exception __try const_cast continue private public protected __declspec default delete deprecated dllexport dllimport do dynamic_cast else enum explicit extern if for friend goto inline mutable naked namespace new noinline noreturn nothrow register reinterpret_cast return selectany sizeof static static_cast struct switch template this thread throw true false try typedef typeid typename union using uuid virtual void volatile whcar_t while"), "gm"),css: "keyword"}];
    this.CssClass = "dp-cpp";
    this.Style = ""
};
dp.sh.Brushes.Cpp.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Cpp.Aliases = ["cpp", "c", "c++"];
dp.sh.Brushes.Objc = function() {
    var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
        'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
        'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
        'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
        'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
        'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
        'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
        'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
        'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
        'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
        'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
        'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
        'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
        'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
        'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
        'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
        'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
        'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
        'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
        '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t id ' +
        'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
        'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
        'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
        'va_list wchar_t wctrans_t wctype_t wint_t signed';
    var keywords = 'break case catch class copy const __finally __exception __try ' +
        'const_cast continue private public protected __declspec ' +
        'default delete deprecated dllexport dllimport do dynamic_cast ' +
        'else enum explicit extern if for friend getter goto inline ' +
        'mutable naked namespace new nil NO noinline nonatomic noreturn nothrow NULL ' +
        'readonly readwrite register reinterpret_cast retain strong return SEL selectany self ' +
        'setter sizeof static static_cast struct super switch template ' +
        'thread throw true false try typedef typeid typename union ' +
        'using uuid virtual void volatile whcar_t while YES';
    //顺序很重要
    this.regexList = [
        {regex: new RegExp(this.GetKeywords(datatypes), 'gm'),css: 'keyword'},  // primitive data types
        {regex: new RegExp(this.GetKeywords(keywords), 'gm'),css: 'keyword'},  // keywords
        {regex: new RegExp('@\\w+\\b', 'g'),css: 'keyword'},  // @-keywords
        {regex: new RegExp('[: ]nil', 'g'),css: 'keyword'},  // nil-workaround
        {regex: new RegExp('\\.\\w+', 'g'),css: 'xcodeconstants'},  // accessors
        {regex: new RegExp(' \\w+(?=[:\\]])', 'g'),css: 'vars'},  // messages
        {regex: dp.sh.RegexLib.SingleLineCComments,css: 'comment'},  // comments
        {regex: dp.sh.RegexLib.MultiLineCComments,css: 'comment'},  // comments
        {regex: dp.sh.RegexLib.DoubleQuotedString,css: 'string'},  // strings
        {regex: dp.sh.RegexLib.SingleQuotedString,css: 'string'},  // strings
        {regex: new RegExp('@"[^"]*"', 'gm'),css: 'string'},  // strings
        {regex: new RegExp('\\d', 'gm'),css: 'xcodenumber'},  // numeric values
        {regex: new RegExp('^ *#.*', 'gm'),css: 'xcodepreprocessor'},  // preprocessor
        {regex: new RegExp('\\w+(?= \\*)', 'g'),css: 'keyword'} // object types - variable declaration
        /*{ regex: new RegExp('\\b[A-Z]\\w+\\b(?=[ ,;])', 'gm'),  css: 'xcodekeyword' },*/ // object types - protocol
    ];
    this.CssClass = 'dp-objc';
    this.Style = '.dp-objc .vars { color: #d00; }';
}
dp.sh.Brushes.Objc.prototype = new dp.sh.Highlighter;
dp.sh.Brushes.Objc.Aliases = ['objc'];
$(function(){
	// 创建阅读目录
	buildCategory();
	// 代码段添加赋值按钮
	var n = $("#program_post_body div.program_code"),
		i = /^\s*1/gi,
		t = /<br\s*\/?>/gi;
	n.length && ($.each(n, function() {
		if (i.test($(this).text())) {
			var n = $(this).html();
			$.browser.msie && n.indexOf("<pre>") > -1 && t.test(n) && (n = n.replace(t, "\r\n"), $(this).html(n))
		}
		showCopyCode(this)
	}));
	// SyntaxHighlighter格式化
    $("#article_content pre").each(function() {
        var $this = $(this);
        if ($this.attr("class") != undefined) {
            if ($this.attr("class").indexOf("brush:") != -1) {
                var lang = $this.attr("class").split(';')[0].split(':')[1];
                $this.attr('name', 'code');
                $this.attr('class', lang);
            }
            if ($this.attr("class")) {
                $this.attr('name', 'code');
            }
        }
    });
    $('#article_content textarea[name=code]').each(function() {
        var $this = $(this);
        if ($this.attr("class").indexOf(":") != -1) {
            $this.attr("class", $this.attr("class").split(':')[0]);
        }
    });
    dp.SyntaxHighlighter.HighlightAll('code');
    $('.highlighter').addClass('dp-highlighter');
	// SyntaxHighlighter复制操作
    if (!window.clipboardData) {
        setTimeout("setCopyBtn()", 500);
    }
	// highlight.js格式化
	hljs.configure({ tabReplace: '    ' });
	hljs.initHighlightingOnLoad();
	// prettyprint格式化
	$('pre.prettyprint code').each(function () {
		var lines = $(this).text().split('\n').length;
		var $numbering = $('<ul/>').addClass('pre-numbering').hide();
		$(this).addClass('has-numbering').parent().append($numbering);
		for (i = 1; i <= lines; i++) {
			$numbering.append($('<li/>').text(i));
		};
		$numbering.fadeIn(1700);
	});
	// 显示隐藏代码段
	$('.toggle-code-link').click(function () {
		var $precode = $(this).parent().next();
		if ($precode.css('display') == 'none') {
			$precode.show();
			$(this).find('img').eq(0).attr('src', saxue_skin_server + '/code/collapse_blue.png');
			$(this).find('span').eq(0).text('隐藏代码');
		} else {
			$precode.hide();
			$(this).find('img').eq(0).attr('src', saxue_skin_server + '/code/expand_blue.png');
			$(this).find('span').eq(0).text('显示代码');
		}
	});
	// 操作绑定
	$('#J_Fav').bind('click', SAXUE.doFav), $('#J_Top').bind('click', SAXUE.doTop), $('#J_Down').bind('click', SAXUE.doDown), $(".j-top").bind('click', function(e) {
		e && e.preventDefault();
		var aid = $(this).attr('data-id');
		SAXUE.doTop(e,aid)
	}), $(".j-follow").bind('click', function(e) {
		e && e.preventDefault();
		var uid = $(this).attr('data-id');
		SAXUE.doFollow(e,uid)
	}), $(".j-message").bind('click', function(e) {
		e && e.preventDefault();
		var uid = $(this).attr('data-id');
		SAXUE.Message.showMessage(uid)
	}), $("#J_Report").bind('click', function(e) {
		e && e.preventDefault();
		SAXUE.Report.showReport(aid,window.location.href)
	});
	// 百度分享
	if (s_thumb.indexOf("http://")!=0){
		s_thumb = saxue_url + s_thumb
	}
	window._bd_share_config={"common":{"bdSnsKey":{},"bdText":s_intro,"bdUrl":s_url,"bdPic":s_thumb,"bdMini":"2","bdMiniList":false,"bdStyle":"1","bdSize":"24"},"share":{"bdSize":24}};
	with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
});