(function(c){if(typeof c.KxLoad!="function"){var e=function(){};e.prototype={queues:{js:{},css:{}},load:function(a,b,d){if(!a.css)a.css=[];if(!a.js)a.js=[];d||(d=c);this.queueCSS(a.css,this.bind(function(){this.queueJS(a.js,this.bind(b,d))}))},bind:function(a,b){b=b||this;return function(){a.apply(b,arguments)}},tagExists:function(a,b){var d="script",f="src";if(a=="css"){d="link";f="href"}var h=document.createElement(d);h[f]=b;d=document.getElementsByTagName(d);for(var i=0;i<d.length;i++)if(h[f]===
d[i][f])return true;return false},process:function(a,b){if(this.queues[a][b].status=="init"){this.queues[a][b].status="loading";this["get"+a.toUpperCase()].call(this,b)}else this.queues[a][b].status=="loaded"&&this.finish(a,b)},finish:function(a,b){for(this.queues[a][b].status="loaded";this.queues[a][b].callbacks.length>0;)this.queues[a][b].callbacks.shift()()},queue:function(a,b,d){if(!this.queues[a][b]){this.queues[a][b]={};this.queues[a][b].callbacks=[];this.queues[a][b].status=this.tagExists(a,
b)?"loaded":"init"}this.queues[a][b].callbacks.push(d);this.process(a,b)},queueCSS:function(a,b){var d=a.length;if(d>1)this.queue("css",a.shift(),this.bind(function(){this.queueCSS(a,b)},this));else d==1?this.queue("css",a.shift(),b):b()},queueJS:function(a,b){var d=a.length;if(d>1)this.queue("js",a.shift(),this.bind(function(){this.queueJS(a,b)},this));else d==1?this.queue("js",a.shift(),b):b()},getHead:function(){if(!this.head)this.head=document.getElementsByTagName("head")[0]||document.documentElement;
return this.head},getJS:function(a){this.log("getJS: "+a);jQuery.getScript(a,this.bind(function(){this.finish("js",a)},this))},getCSS:function(a){this.log("getCSS: "+a);var b=document.createElement("link");b.setAttribute("href",a);b.setAttribute("rel","Stylesheet");b.setAttribute("type","text/css");this.getHead().appendChild(b);this.finish("css",a)},log:function(){}};var g=new e;c.KxLoad=function(a,b,d){return g.load(a,b,d)}}})(typeof window=="undefined"?this:window);
var KxRequire=function(c,e,g){var a={js:[],css:[]};if(typeof c=="undefined")c=[];else if(typeof c=="string")c=[c];if(typeof e=="undefined")e=function(){};for(var b=typeof KxVersion=="object",d=0;d<c.length;d++){var f=c[d].split(".");f=f[f.length-1];var h="http://s.kaixin001.com.cn/"+c[d];if(b&&KxVersion[c[d]])h="http://s.kaixin001.com.cn/"+KxVersion[c[d]];if(f=="js")a.js.push(h);else f=="css"&&a.css.push(h)}KxLoad(a,e,g)},KxLazyLoad=function(c,e){if(typeof e!="function")e=function(){};jQuery(function(){KxRequire(c,
e)})},KxDeferredCall=function(c,e,g,a){var b=this;e in KxDeferredCall.called||KxRequire(c,function(){KxDeferredCall.called[e]=1;return b[e].apply(a||this,g)})};KxDeferredCall.called={};
var KxDeferredFunc=function(c,e){var g=_.toArray(arguments).slice(2);return function(){this.args=arguments;this.call_queue=[];for(var a=0,b=g.length;a<b;a++){var d=g[a];this[d]=function(){this.call_queue.push([d,arguments])}}this.run=function(){var f;f=typeof e;if(f=="string")f=window[e].apply(window,this.args);else if(f=="function")f=e.apply(window,this.args);else return;for(_.extend(this,f);this.call_queue.length>0;){call_data=this.call_queue.shift();this[call_data[0]].apply(this,call_data[1])}};
KxLazyLoad(c,_.bind(function(){this.run()},this))}},KxDeferredList=function(c){var e=Array.prototype.slice.call(arguments,1);_.each(e,function(g){if(typeof window[g]==="undefined")window[g]=function(){KxDeferredCall(c,g,arguments)}})};KxDeferredList("js/dialog.js","openWindow","openAlert","openAlertBlue","alertHtml");
KxDeferredList("js/comment.js","getCommentList","app_showComment","app_showComment2","c2_replyComment","c2_delCommentThread","c2_delComment","addCommentSubmit","reply_unfold","c4_replyComment","c6_getCommentList","initZanInfo");KxDeferredList(["js/gift.js","js/giftcommon.js"],"initMagicGift");KxDeferredList("js/addfriend.js","af_editFriend","af_addform","af_addfriend","starfriends_add");KxDeferredList("js/app_friend.js","a_appfriend_show");
KxDeferredList("js/friend_supersuggest.js","fs2_superOnclick","fs2_viewAllfriend","fs2_selectFriend");if(typeof webEditor=="undefined")var webEditor=KxDeferredFunc("js/webeditor/editor.js",function(){var c=arguments;return new webEditor(c[0],c[1],c[2],c[3],c[4],c[5])},"init");
if(typeof SWFObject=="undefined")var SWFObject=KxDeferredFunc("js/swfobject.js",function(){var c=arguments;return new SWFObject(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9])},"addParam","addVariable","getAttribute","getParams","getSWFHTML","getVariable","getVariablePairs","getVariables","setAttribute","write");if(typeof StarIndexGift=="undefined")var StarIndexGift=KxDeferredFunc("js/home.js",function(){var c=arguments;return new StarIndexGift(c[0],c[1],c[2])},"init");
