
(function(window){if(typeof(window.KxLoad)=="function")return;var j=window.jQuery;var doc=window.document;var Loader={queues:{js:{},css:{}},load:function(data,callback,context){if(!data.css)data.css=[];if(!data.js)data.js=[];if(!context)context=window;this.queueCSS(data.css,this.bind(function(){this.queueJS(data.js,this.bind(callback,context));}));},bind:function(func,context){context=context||this;return function(){func.apply(context,arguments);}},tagExists:function(type,src){var tagName="script";var attName="src";if(type=="css"){var tagName="link";var attName="href";}
var tags=doc.getElementsByTagName(tagName);var len=tags.length;for(var i=0;i<len;i++){if(src===tags[i][attName]){return true;}}
return false;},process:function(type,src){var queue=this.queues[type][src];if(queue["status"]=="init"){queue["status"]="loading";this["get"+type.toUpperCase()].call(this,src);}
else if(queue["status"]=="loaded")
{this.finish(type,src);}},finish:function(type,src){var queue=this.queues[type][src];queue["status"]="loaded";var callbacks=queue["callbacks"];while(callbacks.length>0){(callbacks.shift())();}},queue:function(type,src,callback){var queue=this.queues[type][src]||{};if(!this.queues[type][src]){this.queues[type][src]=queue;queue["callbacks"]=[];if(this.tagExists(type,src))queue["status"]="loaded";else queue["status"]="init";}
queue["callbacks"].push(callback);this.process(type,src);},queueCSS:function(css_list,callback){var len=css_list.length;if(len>1){this.queue("css",css_list.shift(),this.bind(function(){this.queueCSS(css_list,callback);},this));}
else if(len==1){this.queue("css",css_list.shift(),callback);}
else
{callback();}},queueJS:function(js_list,callback){var len=js_list.length;if(len>1){this.queue("js",js_list.shift(),this.bind(function(){this.queueJS(js_list,callback);},this));}
else if(len==1){this.queue("js",js_list.shift(),callback);}
else
{callback();}},getHead:function(){if(!this.head){this.head=doc.getElementsByTagName("head")[0]||doc.documentElement;}
return this.head;},getJS:function(src){this.log("getJS: "+src);j.ajax({type:'GET',cache:true,url:src,dataType:'script',success:this.bind(function(){this.finish("js",src);},this)});},getCSS:function(src){this.log("getCSS: "+src);var link=doc.createElement('link');link.setAttribute("href",src);link.setAttribute("rel","Stylesheet");link.setAttribute("type","text/css");this.getHead().appendChild(link);this.finish("css",src);},log:function(msg){}};window.KxLoad=function(data,callback,context){return Loader.load(data,callback,context);};})(window);(function(window){var mapJsCss=function(name){var map=window.KxVersion||{};if(name in map){return"http://s.kaixin001.com.cn/"+map[name];}else{if(name.charAt(0)==='/')name=name.substring(1);return"http://s.kaixin001.com.cn/"+name;}};window.Kx.Lib.Util.mapJsCss=mapJsCss;})(window);var KxRequire=function(data,callback,scope){if(typeof(data)=="undefined"){data=[];}else if(typeof(data)=="string"){data=[data];}
if(typeof(callback)!=="function"){callback=function(){};}
var js=[],css=[];var mapJsCss=Kx.Lib.Util.mapJsCss;for(var i=0,len=data.length;i<len;i++){var parts=data[i].split(".");var type=parts[parts.length-1];var dst=mapJsCss(data[i]);if(type=="js"){if(js.length==0&&typeof(Prototype)=="undefined"){}
js.push(dst);}
else if(type=="css"){css.push(dst);}}
KxLoad({js:js,css:css},callback,scope);};var KxLazyLoad=function(data,func){if(typeof(func)!="function"){func=function(){};}
jQuery(function(){KxRequire(data,func);});};var KxDeferredCall=function(data,funcname,args,context){var that=this;if(funcname in KxDeferredCall.called)
{return;}
KxRequire(data,function(){KxDeferredCall.called[funcname]=1;return that[funcname].apply(context||this,args);});};KxDeferredCall.called={};var KxDeferredFunc=function(resouces,init_callback){var methods=Array.prototype.slice.call(arguments,2);return function(){this.args=arguments;this.call_queue=[];for(var i=0,j=methods.length;i<j;i++){var method=methods[i];this[method]=function(){this.call_queue.push([method,arguments]);};}
this.run=function(){var wrapper;var callback_type=typeof(init_callback);if(callback_type=="string"){wrapper=window[init_callback].apply(window,this.args);}else if(callback_type=="function"){wrapper=init_callback.apply(window,this.args);}else{return;}
j.extend(this,wrapper);while(this.call_queue.length>0){call_data=this.call_queue.shift();var method=call_data[0];var args=call_data[1];this[method].apply(this,args);}};KxLazyLoad(resources,j.proxy(function(){this.run();},this));};};var KxDeferredList=function(resources){var funcnames=Array.prototype.slice.call(arguments,1);$j.each(funcnames,function(i,funcname){if(typeof(window[funcname])==="undefined"){window[funcname]=function(){KxDeferredCall(resources,funcname,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","initMagicGiftShow");KxDeferredList("js/addfriend.js","af_editFriend","af_addform","af_addfriend","starfriends_add");KxDeferredList("js/app_friend.js","a_appfriend_show");KxDeferredList("js/music.js","ordermusic");KxDeferredList("js/friend_supersuggest.js","fs2_superOnclick","fs2_viewAllfriend","fs2_selectFriend");if(typeof(SWFObject)=="undefined"){var SWFObject=KxDeferredFunc("js/swfobject.js",function(){var a=arguments;return new SWFObject(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},"addParam","addVariable","getAttribute","getParams","getSWFHTML","getVariable","getVariablePairs","getVariables","setAttribute","write");}
if(typeof(StarIndexGift)=="undefined"){var StarIndexGift=KxDeferredFunc("js/home.js",function(){var a=arguments;return new StarIndexGift(a[0],a[1],a[2]);},"init");}
