(function(c,u){var n={},r={},a={},t={autoLoad:false,timeout:6000,coreLib:["http://t.douban.com/js/jquery.min.js"],mods:{}},o=(function(){var d=u.getElementsByTagName("script");return d[d.length-1]})(),e=[],h,j=[],m=false,b={},s={},k=function(d){return d.constructor===Array},i=function(w){var v=t.mods,d;if(typeof w==="string"){d=(v[w])?v[w]:{path:w}}else{d=w}return d},g=function(d,B,w,x){var A,v,C,z,y=function(){n[d]=1;x&&x(d);x=null;c.clearTimeout(A)};if(!d){return}if(n[d]){a[d]=false;if(x){x(d)}return}if(a[d]){setTimeout(function(){g(d,B,w,x)},10);return}a[d]=true;A=c.setTimeout(function(){if(t.timeoutCallback){try{t.timeoutCallback(d)}catch(D){}}},t.timeout);C=B||d.toLowerCase().substring(d.lastIndexOf(".")+1);if(C==="js"){v=u.createElement("script");v.setAttribute("type","text/javascript");v.setAttribute("src",d);v.setAttribute("async",true)}else{if(C==="css"){v=u.createElement("link");v.setAttribute("type","text/css");v.setAttribute("rel","stylesheet");v.setAttribute("href",d)}}if(w){v.charset=w}if(C==="css"){z=new Image();z.onerror=function(){y();z.onerror=null;z=null};z.src=d}else{v.onerror=function(){y();v.onerror=null};v.onload=v.onreadystatechange=function(){var D;if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){y();v.onload=v.onreadystatechange=null}}}o.parentNode.insertBefore(v,o)},l=function(B,w){var C=t.mods,d,v,z,x=0,y;d=B.join("");y=B.length;if(r[d]){w();return}function A(){if(!--y){r[d]=1;w()}}for(;v=B[x++];){z=i(v);if(z.requires){l(z.requires,(function(D){return function(){g(D.path,D.type,D.charset,A)}})(z))}else{g(z.path,z.type,z.charset,A)}}}
/*!
   * contentloaded.js
   *
   * Author: Diego Perini (diego.perini at gmail.com)
   * Summary: cross-browser wrapper for DOMContentLoaded
   * Updated: 20101020
   * License: MIT
   * Version: 1.2
   *
   * URL:
   * http://javascript.nwbox.com/ContentLoaded/
   * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
   *
   */
,q=function(z){var v=false,y=true,B=c.document,A=B.documentElement,E=B.addEventListener?"addEventListener":"attachEvent",C=B.addEventListener?"removeEventListener":"detachEvent",d=B.addEventListener?"":"on",D=function(F){if(F.type=="readystatechange"&&B.readyState!="complete"){return}(F.type=="load"?c:B)[C](d+F.type,D,false);if(!v&&(v=true)){z.call(c,F.type||F)}},x=function(){try{A.doScroll("left")}catch(F){setTimeout(x,50);return}D("poll")};if(B.readyState=="complete"){z.call(c,"lazy")}else{if(B.createEventObject&&A.doScroll){try{y=!c.frameElement}catch(w){}if(y){x()}}B[E](d+"DOMContentLoaded",D,false);B[E](d+"readystatechange",D,false);c[E](d+"load",D,false)}},f=function(){var d=0,v;if(j.length){for(;v=j[d++];){p.apply(this,v)}}},p=function(){var d=[].slice.call(arguments),v,w;if(t.autoLoad&&!r[t.coreLib.join("")]){l(t.coreLib,function(){p.apply(null,d)});return}if(e.length>0&&!r[e.join("")]){l(e,function(){p.apply(null,d)});return}if(typeof d[d.length-1]==="function"){v=d.pop()}w=d.join("");if((d.length===0||r[w])&&v){v();return}l(d,function(){r[w]=1;v&&v()})};p.add=function(v,d){if(!v||!d||!d.path){return}t.mods[v]=d};p.delay=function(){var v=[].slice.call(arguments),d=v.shift();c.setTimeout(function(){p.apply(this,v)},d)};p.global=function(){var d=k(arguments[0])?arguments[0]:[].slice.call(arguments);e=e.concat(d)};p.ready=function(){var d=[].slice.call(arguments);if(m){return p.apply(this,d)}j.push(d)};p.css=function(v){var d=u.getElementById("do-inline-css");if(!d){d=u.createElement("style");d.type="text/css";d.id="do-inline-css";o.parentNode.insertBefore(d,o)}if(d.styleSheet){d.styleSheet.cssText=d.styleSheet.cssText+v}else{d.appendChild(u.createTextNode(v))}};p.setData=p.setPublicData=function(w,v){var d=s[w];b[w]=v;if(!d){return}while(d.length>0){(d.pop()).call(this,v)}};p.getData=p.getPublicData=function(v,d){if(b[v]){d(b[v]);return}if(!s[v]){s[v]=[]}s[v].push(function(w){d(w)})};p.setConfig=function(w,d){t[w]=d;return p};p.getConfig=function(d){return t[d]};c.Do=p;q(function(){m=true;f()});h=o.getAttribute("data-cfg-autoload");if(h){t.autoLoad=(h.toLowerCase()==="true")?true:false}h=o.getAttribute("data-cfg-corelib");if(h){t.coreLib=h.split(",")}})(window,document);
