if(window.location.href.split("/")[2].search("kankan.com")>0)document.domain="kankan.com";var G_DAPCTRL=null,G_DAPCTRL_VER=0,G_CORE_CONTROL=null,kkCore={};function $(a){return document.getElementById(a)}var isIE=navigator.appName.indexOf("Microsoft")!=-1;
if(window.Event&&!isIE){var SearchEvent=function(){for(var a=SearchEvent.caller;a!=null;){var b=a.arguments[0];if(b)if(String(b.constructor).indexOf("Event")>-1)return b;a=a.caller}return null};navigator.userAgent.indexOf("afari")==-1&&navigator.userAgent.indexOf("Opera")==-1&&window.constructor.prototype.__defineGetter__("event",function(){return SearchEvent()});Event.prototype.__defineSetter__("returnValue",function(a){a||this.preventDefault();return a});Event.prototype.__defineSetter__("cancelBubble",
function(a){a&&this.stopPropagation();return a});Event.prototype.__defineGetter__("clientX",function(){return this.pageX});Event.prototype.__defineGetter__("clientY",function(){return this.pageY});Event.prototype.__defineGetter__("keyCode",function(){return this.which});Event.prototype.__defineGetter__("button",function(){return this.which});Event.prototype.__defineGetter__("srcElement",function(){for(var a=this.target;a.nodeType!=1;)a=a.parentNode;return a});Event.prototype.__defineGetter__("offsetX",
function(){return this.layerX});Event.prototype.__defineGetter__("offsetY",function(){return this.layerY});Event.prototype.attachEvent=function(a,b){this.addEventListener(a.substring(2),b,true)};Event.prototype.detachEvent=function(a,b){this.removeEventListener(a.substring(2),b,true)};window.constructor.prototype.attachEvent=function(a,b){this.addEventListener(a.substring(2),b,true)};window.constructor.prototype.detachEvent=function(a,b){this.removeEventListener(a.substring(2),b,true)};document.constructor.prototype.attachEvent=
function(a,b){this.addEventListener(a.substring(2),b,true)};document.constructor.prototype.detachEvent=function(a,b){this.removeEventListener(a.substring(2),b,true)};Element.prototype.attachEvent=function(a,b){this.addEventListener(a.substring(2),b,true)};Element.prototype.detachEvent=function(a,b){this.removeEventListener(a.substring(2),b,true)};HTMLElement.prototype.attachEvent=function(a,b){this.addEventListener(a.substring(2),b,true)};HTMLElement.prototype.detachEvent=function(a,b){this.removeEventListener(a.substring(2),
b,true)}}
var KankanCoreObj=KankanEventObj.extend({init:function(){this._super();this.pageTitle="";var a=this.getParameter("id"),b=this.getParameter("u");a&&this.setCookie("qs_id",a);b&&this.setCookie("qs_u",b);b=navigator.userAgent.toLowerCase();this.sourceId=a||this.getCookie("qs_id")||3;this.isx64=/x64/.test(b);this.ismac=/mac/.test(b)||/opera/.test(b);this.isIOS=/ipad/.test(b)||/iphone/.test(b)||/ipod/.test(b);this.isIOS7=/7_.*_.*/.test(b);this.isIphone=/iphone/.test(b);this.isAndroid=/android/.test(b);this.isOpera=
/oupeng/.test(b);this.isQQ=/mqqbrowser/.test(b);this.isChrome=/chrome/.test(b);this.isUc=/uc/.test(b);this.isNocpr=window.location.href.split("/")[3]==="a";try{this.mdata=G_MOVIE_INFO}catch(c){}this.date=(new Date).getFullYear()+this.formatDate((new Date).getTime())},setTitle:function(a){this.pageTitle=a;document.title=a},string2Array:function(a,b){return a.split(b)},array2String:function(a,b){return a.join(b)},getGCID:function(a){return a.split("/").length>4?a.split("/")[4].toUpperCase():""},getCID:function(a){return a.split("/").length>
5?a.split("/")[5].toUpperCase():""},getPeerID:function(){return null},compareVersions:function(a,b){for(i=0;i<a.length;++i){var c=new Number(a[i]),d=new Number(b[i]);if(c<d)return-1;if(c>d)return 1}return 0},loadJSData:function(a,b,c,d,e){var f=document.getElementsByTagName("head")[0],h=this.$C("script"),g="dynamic_script_"+(new Date).getTime()+"_"+Math.random(),j=undefined!==h.onreadystatechange&&undefined!==h.readyState?"onreadystatechange":"onload";h.language="javascript";h.type="text/javascript";
if(typeof e!="undefined")h.charset=e;h.src=a;h.id=g;if(!isIE)try{h.addEventListener("error",function(){if(typeof b=="string")setTimeout(function(){eval(b).apply(null,c)},50);else typeof b=="function"&&setTimeout(function(){b.apply(null,c)},50)})}catch(k){}h.attachEvent(j,function(){var m=h.readyState||"loaded";if("loaded"==m||"complete"==m){if(typeof b=="string")setTimeout(function(){eval(b).apply(null,c)},50);else typeof b=="function"&&setTimeout(function(){b.apply(null,c)},50);d&&$R(h,f);h=f=null}});
this.$P(h,f)},loadJSDataByTimeslice:function(a,b,c,d,e,f){var h=document.getElementsByTagName("head")[0],g=$C("script"),j=null,k=false,m="dynamic_script_"+(new Date).getTime()+"_"+Math.random(),l=undefined!==g.onreadystatechange&&undefined!==g.readyState?"onreadystatechange":"onload";g.language="javascript";g.type="text/javascript";if(typeof f!="undefined")g.charset=f;g.src=a;g.id=m;g.attachEvent(l,function(){var n=g.readyState||"loaded";if("loaded"==n||"complete"==n){if(null!=j){clearTimeout(j);
j=null}if(!k){k=true;c.unshift(false);if(typeof b=="string")setTimeout(function(){try{eval(b).apply(null,c)}catch(o){}},50);else typeof b=="function"&&setTimeout(function(){b.apply(null,c)},50)}d&&$R(g,h);g=h=null}});$P(g,h);j=setTimeout(function(){clearTimeout(j);j=null;if(!k){k=true;c.unshift(true);if(typeof b=="string")setTimeout(function(){try{eval(b).apply(null,c)}catch(n){}},50);else typeof b=="function"&&setTimeout(function(){try{b.apply(null,c)}catch(n){}},50)}},e)},loadJSONDataByTimeslice:function(a,
b,c,d,e,f,h){var g=$C("iframe"),j="dynamic_iframe_"+(new Date).getTime()+"_"+Math.random(),k=false,m=null;g.style.cssText="display:none";g.width=1;g.height=1;g.src=a;g.id=j;g.name=j;g.attachEvent("onload",function(){if(null!=m){clearTimeout(m);m=null}if(k){if(e)$R(g,f||null);g=null}else{k=true;try{if(typeof d=="object")for(var l=0;l<d.length;l++){var n=g.contentWindow[d[l]];c.unshift(n)}else{n=g.contentWindow[d];c.unshift(n)}}catch(o){c.unshift(null)}finally{if(typeof b=="string")setTimeout(function(){eval(b).apply(null,
c)},50);else typeof b=="function"&&setTimeout(function(){b.apply(null,c)},50);if(e)$R(g,f||null);g=null}}});$P(g,f||null);m=setTimeout(function(){clearTimeout(m);m=null;if(!k){k=true;c.unshift(null);if(typeof b=="string")setTimeout(function(){eval(b).apply(null,c)},50);else typeof b=="function"&&setTimeout(function(){b.apply(null,c)},50)}},h)},loadJSONData:function(a,b,c,d,e,f){var h=$C("iframe"),g="dynamic_iframe_"+(new Date).getTime()+"_"+Math.random();h.style.cssText="display:none";h.width=1;h.height=
1;h.src=a;h.id=g;h.name=g;h.attachEvent("onload",function(){try{if(typeof d=="object")for(var j=0;j<d.length;j++){var k=h.contentWindow[d[j]];c.unshift(k)}else{k=h.contentWindow[d];c.unshift(k)}}catch(m){c.unshift(null)}finally{if(typeof b=="string")setTimeout(function(){eval(b).apply(null,c)},50);else typeof b=="function"&&setTimeout(function(){b.apply(null,c)},50);if(e)$R(h,f||null);h=null}});$P(h,f||null)},setCookie:function(a,b,c){if(arguments.length>2){var d=new Date((new Date).getTime()+c*36E5);
document.cookie=a+"="+encodeURIComponent(b)+"; path=/; domain="+document.domain+"; expires="+d.toGMTString()}else document.cookie=a+"="+encodeURIComponent(b)+"; path=/; domain="+document.domain+""},setCookieWithDomain:function(a,b,c,d){var e="; path=/";if(c!=null){e=new Date((new Date).getTime()+c*36E5);e="; expires="+e.toGMTString()+"; path=/"}document.cookie=a+"="+escape(b)+";domain="+d+";"+e},formatDate:function(a){a=new Date(parseInt(a));return(a.getMonth()+1<10?"0"+(a.getMonth()+1):a.getMonth()+
1)+""+(a.getDate()<10?"0"+a.getDate():a.getDate())},loadMediajs:function(a){var b=(new Date).getYear()+this.formatDate();a=a.replace("http://biz5","http://"+b+".biz5");setTimeout(function(){this.loadJSData(a,null,[],true)},0)}}),kkCoreInit=KankanCoreObj.extend({init:function(){this._super();window.kkarea!="1"?this.getOsInfo():this.init2();return true},getOsInfo:function(){this.loadJSData("http://ip.kankan.xunlei.com/tbl/get_status.php?id="+G_MOVIEID,this.getOsInfoHandler,[],false)},getOsInfoHandler:function(){if(typeof window.G_MOVIE_OVERSEA!=
"undefined"&&!window.G_MOVIE_OVERSEA)G_CORE_INIT.init2os();else{G_CORE_INIT.init2();var a=typeof window.G_MOVIE_OVERSEA=="undefined"?"http://kkpgv2.xunlei.com/?u=vodact&u1=oversea_wap&u2=fail&rd="+(new Date).getTime():"http://kkpgv2.xunlei.com/?u=vodact&u1=oversea_wap&u2=enabled&rd="+(new Date).getTime();G_CORE_INIT.mStatSend(a)}},init2os:function(){var a="";a+='<p class="p_1">很抱歉，由于影片授权地区限制，您当前所在地区我们不能为您提供本影片在线点播服务。</p>';a+='<p class="p_2">欢迎您继续选择观看其他影片，谢谢。</p>';a+='<p class="p_3">如果您在中国内地无法观看，请进入 <a href="http://helpbbs.xunlei.com/thread.php?fid=166" target="_blank">客服论坛反馈</a> 我们会尽快处理。</p>';
a+='<p class="p_3">您的IP地址是：['+window.G_IP+"] </p>";a+='<p class="p_4">Sorry, we can\'t provide on-line service for this video due to its copyright restriction.<br/>You can choose other videos. Thanks for your understanding.</br>If you\'re inside Mainland China, please  enter <a href="http://helpbbs.xunlei.com/thread.php?fid=166" target="_blank">the BBS to feedback</a>,<br/>we will handle this as soon as possible.</br>Your IP address:['+window.G_IP+"]</br></p>";document.getElementById("PlayerWarm").innerHTML=
a;document.getElementById("PlayerWarm").style.display="block";document.getElementById("PlayerLoading").style.display="none";hide_kk_player();_G=function(){};G_CORE_CONTROL.play=function(){};this.mStatSend("http://kkpgv2.xunlei.com/?u=vodact&u1=oversea_wap&u2=disabled&rd="+(new Date).getTime())},init2:function(){G_CORE_CONTROL.init2.delayCall(0,G_CORE_CONTROL);this.installPlay(false)},f_onload:function(){if(this.isNoComponent&&window.is3d)return false;if(!this.isNoComponent||this.ismac||isIE||this.isESource)this.checkAndPlay()},
checkAndPlay:function(){if(this.playerLoaded)return false;this.setComScoreVal();this.playerLoaded=true;this.playerLoadedTick=this.time();this.start()},start:function(){G_CORE_CONTROL.processEvent();G_CORE_CONTROL.initFirstPlay();G_CORE_CONTROL.fireEvent("onStart")},setWideScreen:function(){var a="small";if(G_MOVIE_TYPE=="documentary"){a="big";try{G_PLAYER_INSTANCE.flvExternalCommand("scrollCmd",a)}catch(b){}}},reInit:function(){if(!G_PLAYER_INSTANCE.dapctrl)try{G_PLAYER_INSTANCE.dapctrl=new ActiveXObject("DapCtrl.DapCtrl");
G_PLAYER_INSTANCE.dapctrl.onState=G_PLAYER_INSTANCE.dapCtrlHandler;this.isNoComponent=false}catch(a){}},installPlay:function(){if(G_PLAYER_INIT.playerLoaded){this.isNoComponent=true;G_CORE_CONTROL.showPlayer(true);this.checkAndPlay.delayCall(0,this)}else this.installPlay.delayCall(50,this)},setComScoreVal:function(){}}),kkCoreControl=KankanCoreObj.extend({init:function(){this._super();this.$video=document.getElementsByTagName("video")[0];this.currentIndex=0;this.currentQuality=-1;this.qualitystr=
"000";this.playLock=false;this.statChannel="kk_mp4";this.progressCount=this.hideLevel=this.vcut=0;this.isLastPlaying=this.isSeeked=false;this.playMode=1;this.isFullscreen=this.isServer=false;this.isServerPlay=true;this.fixServerPlay=false;this.lastPosition=0;this.lastError=null;this.hisMovNoticeShow=-1;this.hisMovNoticeTxt="";this.hisMovTiming=-1;this.isFocus=true;this.videoStatus=this.serverGCID=this.serverIP="";this.firstSetPos=false;this.QQseekedTimes=this.QQseekingTimes=this.operaPlayTime=this.operaDurationchangeTime=
0;this.QQfirstPlay=true;if(this.isIE){document.onfocusin=function(){G_CORE_CONTROL.isFocus=true};document.onfocusout=function(){G_CORE_CONTROL.isFocus=false}}else{window.onblur=function(){G_CORE_CONTROL.isFocus=false};window.onfocus=function(){G_CORE_CONTROL.isFocus=true}}},init2:function(){this.currentIndex=this.getInitIndex()},processEvent:function(){var a=G_PLAYER_INSTANCE;a.attachEvent(this,"loadstart",this.f_onLoadstart);a.attachEvent(this,"error",this.f_onError);a.attachEvent(this,"waiting",
this.f_onWaiting);a.attachEvent(this,"stalled",this.f_onStalled);a.attachEvent(this,"timeupdate",this.f_onTimeupdate);a.attachEvent(this,"progress",this.f_onProgress);a.attachEvent(this,"suspend",this.f_onSuspend);a.attachEvent(this,"abort",this.f_onAbort);a.attachEvent(this,"emptied",this.f_onEmptied);a.attachEvent(this,"playing",this.f_onPlaying);a.attachEvent(this,"canplay",this.f_onCanPlay);a.attachEvent(this,"ended",this.f_onEnd);a.attachEvent(this,"seeking",this.f_onSeeking);a.attachEvent(this,
"seeked",this.f_onSeeked);a.attachEvent(this,"loadeddata",this.f_onLoadedData);a.attachEvent(this,"durationchange",this.f_onDurationChange);a.attachEvent(this,"onsetPlayUrl",this.f_onSetPlayUrl);a.attachEvent(this,"onstartplay",this.f_onStartPlay);document.getElementsByTagName("video")[0].addEventListener("pause",this.f_onPause);document.getElementsByTagName("video")[0].addEventListener("play",this.f_onPlay)},f_onStartPlay:function(){this.seekStatus=this.videoStatus=""},f_onError:function(){var a=
document.getElementsByTagName("video")[0].error.code,b;if(a){switch(a){case 1:b="抱歉，视频发生意外终止！";break;case 2:b="抱歉，网络错误！";break;case 3:b="抱歉，解码错误！";break;case 4:b="抱歉，不支持该媒体格式！"}if(b)b=[b]}this.fireEvent("onError_stat");this.fireEvent("error");G_PLAYER_ERROR.showPlayerWarm("");this.mStatSend("http://kkpgv2.xunlei.com/?u=vodact&u1=vod_wap&u2=error&u3="+G_MOVIE_INFO.id+"&u4="+b.toString()+"&rd="+(new Date).getTime())},f_onWaiting:function(){var a=this;if(this.iphoneFirstWaiting)this.iphoneFirstWaiting&&
/iphone.*os 6_.*/i.test(navigator.userAgent)&&this.$video.readyState==0&&setTimeout(function(){a.$video.src=a.$video.src+"&"+Math.random();a.$video.pause();G_PLAYER_ERROR.playerLoadingDisplay(0,"waiting")},300);else{this.iphoneFirstWaiting=true;G_PLAYER_ERROR.playerLoadingDisplay(1,"waiting")}},f_onLoadstart:function(){if(!G_CORE_STATIC.isFirstPlay2&&this.isAndroid&&this.isQQ)return false;G_PLAYER_ERROR.playerLoadingDisplay(1,"loadstart");this.fireEvent("loadstart")},f_onLoadedData:function(){this.fireEvent("loadeddata");
this.isOpera&&G_PLAYER_ERROR.playerLoadingDisplay(0,"LoadedData");this.isAndroid&&this.isQQ&&!G_CORE_STATIC.isFirstPlay2&&G_PLAYER_INSTANCE.play()},f_onCanPlay:function(){if(this.isOpera)return false;this.$("PlayerLoading").style.background="rgba(0,0,0,0.5)";G_PLAYER_ERROR.playerLoadingDisplay(0,"canplay_kill");this.videoStatus="canplay";this.fireEvent("canplay")},f_onPause:function(){G_PLAYER_ERROR.playerLoadingDisplay(0,"pause_kill");if(G_CORE_CONTROL.isQQ&&G_CORE_CONTROL.QQfirstPlay)return G_CORE_CONTROL.QQfirstPlay=
false;G_CORE_CONTROL.fireEvent("pause_stat")},f_onStalled:function(){this.videoStatus=this.videoStatus=="playing"?"playing":"stalled"},f_onDurationChange:function(){if(this.isOpera){this.operaDurationchangeTime++;if(this.operaDurationchangeTime>=2){this.$("PlayerLoading").style.background="rgba(0,0,0,0.5)";G_PLAYER_ERROR.playerLoadingDisplay(0,"DurationChange")}}this.QQseekedTimes=this.QQseekingTimes=0;this.QQfirstPlay=false},f_onAbort:function(){G_PLAYER_ERROR.playerLoadingDisplay(0,"abort_kill")},
f_onEmptied:function(){G_PLAYER_ERROR.playerLoadingDisplay(0,"emptied_kill")},f_onTimeupdate:function(){if(this.isOpera)return false;if(this.seekStatus){G_PLAYER_ERROR.playerLoadingDisplay(0,"timeupdate_kill");this.seekStatus=false;this.fireEvent("onSeeked_stat")}if(this.videoStatus=="playing"){G_PLAYER_ERROR.playerLoadingDisplay(0,"timeupdate_kill1");this.videoStatus=""}this.fireEvent("timeupdate_stat")},f_onProgress:function(){},f_onSuspend:function(){this.isIOS&&G_PLAYER_ERROR.playerLoadingDisplay(0,
"suspend_kill")},f_onSetPlayUrl:function(){this.fireEvent("onsetPlayUrl")},f_onSeeking:function(){if(this.isOpera)return false;if(this.isAndroid&&!this.isQQ&&!this.isChrome&&!this.isUc&&!this.isOpera)document.getElementsByTagName("video")[0].paused&&G_PLAYER_ERROR.playerLoadingDisplay(0,"seeking_loading");else G_PLAYER_ERROR.playerLoadingDisplay(1,"seeking_loading");if(this.isAndroid&&this.isQQ&&!this.QQseekingTimes){this.QQseekingTimes=1;return false}this.fireEvent("onSeeking_stat")},f_onSeeked:function(){if(this.isAndroid&&
this.isQQ&&this.QQseekedTimes<=1){this.QQseekedTimes++;return false}this.seekStatus=true;if(this.isChrome){G_PLAYER_ERROR.playerLoadingDisplay(0,"suspend_kill");this.fireEvent("timeupdate_stat")}},f_onEnd:function(){this.fireEvent("onEnd");this.playNext.delayCall(50,this)},f_onPlay:function(){G_CORE_CONTROL.fireEvent("play_stat");if(G_CORE_CONTROL.isOpera){if(G_CORE_CONTROL.operaFirsEvent=="play"){G_PLAYER_ERROR.playerLoadingDisplay(1,"oprea_play");return false}G_CORE_CONTROL.operaPlayTime++;G_CORE_CONTROL.operaPlayTime<
1&&G_PLAYER_ERROR.playerLoadingDisplay(1,"oprea_play")}},f_onPlaying:function(){G_CORE_CONTROL.isOpera&&G_PLAYER_ERROR.playerLoadingDisplay(0,"oprea_play");if(this.videoStatus=="stalled"||this.videoStatus=="canplay")G_PLAYER_ERROR.playerLoadingDisplay(1,"playing_loading");this.videoStatus="playing";if(!this.isLastPlaying){this.isLastPlaying=true;G_CORE_STATIC.setnStat("movie_start_tick",null,true)}this.fireEvent("onCommonPlaying_stat")},setPlayPosition:function(){},setSubStyle:function(){},setLock:function(){this.playLock=
true;setTimeout(function(){G_CORE_CONTROL.playLock=false},1E3)},play:function(a){this.setLock();if(typeof G_PLAYER_INSTANCE=="undefined"||!G_PLAYER_INSTANCE)return false;if(typeof G_SUBMOVIE_DATA[a]=="undefined"||typeof G_SUBMOVIE_DATA[a].submovieid=="undefined"){G_CORE_SUBMOVIECTR.getSubData(a,G_CORE_CONTROL.play);return false}G_PLAYER_INSTANCE.trace("play:"+a);G_CORE_TAB=new kkCoreTab;G_CORE_TAB.init2.delayCall(0,G_CORE_TAB,a);this.currentIndex=a;this.currentQuality=this.getQuality(a);this.currentIndex!=
-1&&G_PLAYER_INSTANCE.close();this.playMovie(a);this.lastError=null;var b=G_CORE_STATIC.triggerTypeLast,c=0;if(b==1)c=1;else if(b==3)c=2;else if(b==4)c=3;this.fireEvent("onstartplay",a,c)},playMovie:function(a,b){var c=G_SUBMOVIE_DATA;if(typeof c[a]=="undefined"||typeof c[a].submovieid=="undefined"){G_CORE_SUBMOVIECTR.getSubData(a,G_CORE_CONTROL.playMovie);return false}this.serverGCID=this.serverIP="";this.currentQuality=this.getQuality(a);if(c[a].msurls&&c[a].msurls.join("").trim()){this._serverPlay(c[a].msurls,
this.currentQuality,a,b);this.playUrl=c[a].msurls[this.currentQuality];G_PLAYER_INIT.playerstatus=1}else{G_PLAYER_INIT.playerstatus=0;G_PLAYER_ERROR.dump("002");G_PLAYER_ERROR.showPlayerWarm("002")}},getQuality:function(a,b){var c=typeof b=="undefined"?G_SUBMOVIE_DATA[a].type:b,d=1;if(parseInt(this.defaultQuality)>=0&&parseInt(this.defaultQuality)<=3)d=this.defaultQuality;if(typeof G_CORE_INIT!="undefined"&&(G_CORE_INIT.isNoComponent||G_CORE_CONTROL.isServerPlay||G_CORE_CONTROL.fixServerPlay))d=0;
c=c.split("");d=parseInt(d);if(typeof c[d]!="undefined"&&c[d]=="1")return d;else for(var e=1;e<=3;e++){var f=d+e;if(typeof c[f]!="undefined"&&c[f]=="1")return f;f=d-e;if(typeof c[f]!="undefined"&&c[f]=="1")return f}},_serverPlay:function(a,b,c,d){G_PLAYER_INSTANCE.close();b=G_CORE_CONTROL;this.vcut=0;d>0&&G_PLAYER_INSTANCE.setPlayPosition(d);d="";for(c=0;c<a.length;c++)if(typeof a[c]!="undefined"&&a[c]!=""){d=a[c];break}a=this.getGCID(d);G_CORE_SERVER.hasCdnRes=true;c=G_CORE_SERVER.cdnurl+a;b.playMode=
1;b.showPlayer(true);b.serverGCID=a;b.serverCorePlay(c);this.playUrl=d},setPlayerInfo:function(a,b){var c=G_PLAYER_INSTANCE,d=G_CORE_CONTROL.currentIndex,e=G_CORE_CONTROL.currentQuality;c.sid=G_SUBMOVIE_DATA[d].sids[e];c.title=G_MOVIE_TITLE+G_MOVIE_DATA.subnames[d];c.subname=G_MOVIE_DATA.subnames[d];c.vlength=G_SUBMOVIE_DATA[d].length;c.submovieid=G_SUBMOVIE_DATA[d].submovieid;c.movieid=G_MOVIEID;c.poster=typeof G_MOVIE!="undefined"&&G_MOVIE.poster?G_MOVIE.poster:"";G_CORE_STATIC.setnStat("play_type",
1,false);G_CORE_STATIC.setnStat("movie_id",parseInt(G_HALLID),false);G_CORE_STATIC.setnStat("sub_id",G_MOVIE_DATA.subids[d],false);G_CORE_STATIC.setnStat("movie_definition",parseInt(e)+1,false);G_CORE_STATIC.setnStat("movie_type",1);G_CORE_STATIC.setnStat("vod_url",b,false);G_CORE_STATIC.setnStat("playcode_id",this.isNocpr?5:4);G_CORE_STATIC.setStat("movie_id",G_MOVIE_INFO.id,false);G_CORE_STATIC.setStat("sub_id",G_MOVIE_DATA.subids[d],false)},serverCorePlay:function(a,b){this.setPlayerInfo(true);
var c=G_PLAYER_INSTANCE,d=G_CORE_STATIC,e=G_CORE_CONTROL.currentIndex,f=G_CORE_CONTROL.currentQuality;this.isServer=true;d.isServer=true;c.playMode="VOD";c.bufferStart=10;c.isFinal=typeof G_MOVIE_DATA.subids[G_CORE_CONTROL.getNextIndex()]!="undefined"&&this.isTabSame()?0:1;try{c.totalByte=G_SUBMOVIE_DATA[e].size[f];c.totalTime=G_SUBMOVIE_DATA[e].length_r[f];c.sourceUrl=G_SUBMOVIE_DATA[e].msurls[f];c.quality=f;c.qualitystr=G_CORE_CONTROL.qualitystr}catch(h){}d.xoliStatic("xmpinstall_playstart_wap",
this.sourceId);c.flashopen(a,true,b,1)},getIndexBySubid:function(a){for(var b=0;b<G_MOVIE_DATA.subids.length;b++)if(G_MOVIE_DATA.subids[b]==a)return b;return-1},_getInitIndex:function(){var a=0,b=G_MOVIE_DATA.subnames,c=G_MOVIE_DATA.subnames.length,d=G_MOVIE_DATA.subtype;if(typeof d!="undefined")for(var e=G_MOVIE_DATA.subnames.length-1;e>=0;e--)if(d[e]==1){c=e+1;break}e=/(更新至)([0-9]+)(集|话)/;var f=/([\d]{4}\-[\d]{1,2}\-[\d]{1,2})(期)/;try{if(e.test(G_OTHER_DESC)||f.test(G_OTHER_DESC))a=this._getLatestSub(b,
c,d)}catch(h){}return a},_getLatestSub:function(a,b,c){var d=/\d+/gmi,e=b-1,f="",h="";f=parseInt(a[b-1].match(d).join(""),10);b=false;var g=0;for(e=e;e>=0;e--){h=parseInt(a[e].match(d).join(""),10);if(h!=f)if(typeof c!="undefined"&&c[e]>1){b=true;if(g==0)g=e+1}else return e+1}if(b)return g;return 0},isTabSame:function(){var a=G_CORE_CONTROL.currentIndex,b=G_CORE_CONTROL.getNextIndex(),c=G_MOVIE_DATA.subtype[a],d=G_MOVIE_DATA.subtype[b],e={1:1,2:1,3:2,4:2,5:2,6:2,7:2,8:1};if(G_MOVIE_TYPE=="movie")e=
{1:1,2:1,3:1,4:1,5:1,6:1,7:1,8:1};var f=true;if(G_MOVIE_TYPE=="tv"||G_MOVIE_TYPE=="fashion")f=!(e[c]>1)||G_MOVIE_DATA.dateonshow[a]==G_MOVIE_DATA.dateonshow[b];return e[c]==e[d]&&f},initFirstPlay:function(){G_CORE_CONTROL.firstSetPos=true;var a=0;a=this.getInitIndex();G_CORE_STATIC.triggerType=1;_G(a)},getInitIndex:function(){var a=0;a=this.getParameter("subid");a=parseInt(a)>0?this.getIndexBySubid(a):parseInt(G_SUBMOVIEID)>0?this.getIndexBySubid(G_SUBMOVIEID):this._getInitIndex();if(a==-1)a=0;return a},
getNextIndex:function(){return G_CORE_CONTROL.currentIndex+1},playNext:function(){var a=this.getNextIndex(),b=G_MOVIE_DATA.subtype[G_CORE_CONTROL.currentIndex];if(typeof G_MOVIE_DATA.subids[a]!="undefined"&&typeof b!="undefined"&&this.isTabSame()){G_CORE_STATIC.triggerType=3;_G(a,1)}else G_CORE_CONTROL.setSubStyle(-1);if(window.SVOD_PLAY_LIST){a=SVOD_PLAY_CURRENT_INDEX+1;if(a<SVOD_PLAY_LIST.length)if(G_ISTRAILER){b=SVOD_PLAY_LIST[SVOD_PLAY_CURRENT_INDEX].chaptertype;if(b==2&&b===SVOD_PLAY_LIST[a].chaptertype)window.location.href=
SVOD_PLAY_LIST[a].href;else if(b!=2)if(SVOD_PLAY_LIST[a].chaptertype==2)for(a=a+1;a<SVOD_PLAY_LIST.length;a++){if(SVOD_PLAY_LIST[a].chaptertype!=2){console.log(SVOD_PLAY_LIST[a].href);window.location.href=SVOD_PLAY_LIST[a].href;break}}else window.location.href=SVOD_PLAY_LIST[a].href}else window.location.href=SVOD_PLAY_LIST[a]}},hidePlayer:function(){if(this.hideLevel==0){G_PLAYER_INSTANCE.pause();this.hidePlaying=true;G_PLAYER_INSTANCE.playerDisplay(0)}this.hideLevel++},showPlayer:function(a){this.hideLevel!=
0&&this.hideLevel--;if(this.hideLevel==0||a){if(typeof G_PLAYER_ERROR!="undefined"&&G_PLAYER_ERROR.clearPlayerWarm)G_PLAYER_ERROR.clearPlayerWarm();else{this.$("PlayerWarm").innerHTML="";this.$("PlayerWarm").style.display="none"}G_PLAYER_INSTANCE.playerDisplay(1);this.hideLevel=0;G_PLAYER_INSTANCE.play();this.hidePlaying=false;G_CORE_CONTROL.fireEvent("onPlayerShow")}},getUStatus:function(){var a=getCookie("userid");a||(a=getCookie("luserid"));if(parseInt(getCookie("isvip"))>0||parseInt(getCookie("vod_vip"))>
0&&getCookie("vod_vip")==a)return true;return false},formatTimeBySecond:function(a){var b="",c=parseInt(a/3600),d=parseInt(a/60-c*60);a=a%60;b+=c>0?(c<10?"0"+c:c)+":":"";b+=(d<10?"0"+d:d)+":";b+=a<10?"0"+a:a;return b}}),kkCoreServer=KankanCoreObj.extend({init:function(){this.retryTimes=0;this.hasCdnRes=null;this._super();this.url="http://mp4.cl.kankan.com/getCdnresource_flv?gcid=";this.cdnurl="http://gdl.mp4.cl.kankan.com/"},getCdnResource:function(a){G_CORE_STATIC.setStat("req_play_tick",null,true);
if(this.getParameter("url")){G_PLAYER_INSTANCE.flashopen(this.getParameter("url"));return false}if(this.getParameter("gcid"))a=this.getParameter("gcid");this.hasCdnRes=null;this.loadJSONDataByTimeslice(this.url+a,G_CORE_SERVER.getCdnResourceHandler,[a],["jsonObj","jsCheckOutObj"],true,null,15E3)},getCdnResourceHandler:function(){var a=G_CORE_CONTROL,b=arguments,c=b[1],d=b[0],e=b[2];if(null!=c&&d!=null&&c.cdnlist1.length>0){G_CORE_SERVER.hasCdnRes=true;b={ip:"",port:0,path:"",param1:0,param2:0};c=
c.cdnlist1;b.ip=c[0].ip;b.port=c[0].port;b.path=c[0].path;b.param1=d.param1;b.param2=d.param2;a.serverIP=b.ip;a.playMode=1;a.showPlayer(true);a.serverCorePlay("",b);G_CORE_STATIC.xoliStatic("xmpinstall_showplayer_wap",G_CORE_STATIC.sourceId);G_CORE_CONTROL.serverIP=b.ip;G_CORE_CONTROL.serverGCID=e}else{G_CORE_SERVER.hasCdnRes=false;typeof c!="object"||c==null||!c?G_CORE_STATIC.xoliStatic("xmpinstall_cdn_error_wap_"+G_CORE_SERVER.retryTimes,G_CORE_STATIC.sourceId):G_CORE_STATIC.xoliStatic("xmpinstall_cdn_empty_wap",
e);if(a.isServerPlay){if(typeof b[1]=="string"&&!e)e=b[1];if(G_CORE_SERVER.retryTimes<3&&e){G_CORE_SERVER.retryTimes++;setTimeout(function(){G_CORE_SERVER.getCdnResource(e)},1E3);return false}a.showPlayer(true);G_PLAYER_INIT.playerstatus=0;G_PLAYER_ERROR.dump("003");G_PLAYER_ERROR.showPlayerWarm("003");return false}if(a.isServerPlay&&a.lastError){G_PLAYER_ERROR.dump(a.lastError);G_PLAYER_INIT.playerstatus=0;G_PLAYER_ERROR.showPlayerWarm("003");a.lastError=null;return false}a.playMode=0;hide_kk_player()}}}),
kkCoreTab=KankanCoreObj.extend({init:function(){this.initSvodTabTimes=0;window.SVOD_PLAY_LIST=[];this.loadSvodSubDataTime=window.SVOD_PLAY_CURRENT_INDEX=0;this._super()},init2:function(a){if(window.G_ISTRAILER||G_MOVIE_TYPE=="video"||G_MOVIE_TYPE=="MTV")this.initSvodTab();else{this.initLvodTab(a);this.initLvodTitle(a)}},initSvodTab:function(){var a,b=getParameter("rid");if(G_MOVIE_TYPE=="video"){a="http://api.pad.kankan.com/api.php?type=video&mod=relate&perpage=20&os=wap&jsobj=RELATE_MOVIES&movieid=";
b?this.loadJSData(a+b,this.svodPrintTab,[],false):this.loadJSData(a+G_MOVIEID,this.svodPrintTab,[],false)}else if(G_MOVIE_TYPE=="MTV"){a="http://api.pad.kankan.com/api.php?type=music&mod=relate&perpage=20&os=wap&jsobj=RELATE_MOVIES&movieid=";b?this.loadJSData(a+b,this.svodPrintTab,[],false):this.loadJSData(a+G_MOVIEID,this.svodPrintTab,[],false)}else{a="http://api.pad.kankan.com/api.php?type=movie&mod=subdetail&os=wap&jsobj=SUB_MOVIES&movieid=";this.loadJSData(a+G_MOVIEID,this.svodPrintTab,[],false)}},
svodPrintTab:function(){var a=G_CORE_TAB;a.trailerNormalContainer=$("trailerNormal");a.trailerDemoContainer=$("trailerDemo");a.playTimesContainer=$("playTimes");a.initSvodTabTimes++;if(!a.trailerNormalContainer&&!a.trailerDemoContainer&&a.initSvodTabTimes<=20){setTimeout(a.initSvodTab(),100);return false}if(typeof RELATE_MOVIES!="undefined"||typeof SUB_MOVIES!="undefined")G_MOVIE_TYPE=="video"||G_MOVIE_TYPE=="MTV"?a.svodVideoPrintTab(RELATE_MOVIES):a.svodTrailerPrintTab(SUB_MOVIES);else{if(a.loadSvodSubDataTime>=
5)return false;a.loadSvodSubDataTime++;setTimeout(a.initSvodTab(),50)}},svodTrailerPrintTab:function(a){if(a.total_number==0)return false;for(var b=a.episodes.length,c='<li class="on"><a href="'+location.href+'"><span>'+G_MOVIE_DATA.subnames[0]+"</span></a></li>",d,e,f,h=false,g=[],j=[],k=0;k<b;k++)if(a.episodes[k].chaptertype!=1){var m=a.episodes[k].parts[0].id;d="http://m.kankan.com/v/"+Math.floor(G_MOVIEID/1E3)+"/"+G_MOVIEID+"/"+m+".shtml";e=a.episodes[k].title;f="<li><a href="+d+"><span>"+e+"</span></a></li>";
if(G_SUBMOVIEID==m){h=true;SVOD_PLAY_CURRENT_INDEX=k;f='<li class="on"><a href='+d+"><span>"+e+"</span></a></li>"}SVOD_PLAY_LIST.push({href:d,chaptertype:a.episodes[k].chaptertype});if(a.episodes[k].chaptertype!=2)g.push(f);else a.episodes[k].chaptertype==2&&j.push(f)}if(!h){G_MOVIE_DATA.subtype[G_CORE_CONTROL.currentIndex]==2?j.unshift(c):g.unshift(c);SVOD_PLAY_LIST.unshift({href:d,chaptertype:G_MOVIE_DATA.subtype[G_CORE_CONTROL.currentIndex]});SVOD_PLAY_CURRENT_INDEX=0}if(g.length){$("trailerNormalBtn").style.display=
"inline-block";G_CORE_TAB.trailerNormalContainer.innerHTML=g.join("")}else $("trailerNormalBtn").style.display="none";if(j.length){$("trailerDemoBtn").style.display="inline-block";G_CORE_TAB.trailerDemoContainer.innerHTML=j.join("")}else $("trailerDemoBtn").style.display="none";if(a.episodes[SVOD_PLAY_CURRENT_INDEX].playtimes){G_CORE_TAB.playTimesContainer.innerHTML=a.episodes[SVOD_PLAY_CURRENT_INDEX].playtimes;G_CORE_TAB.playTimesContainer.style.display="block"}$("trailerDemoBtn").addEventListener("click",
function(){$("trailerDemoBtn").setAttribute("class","on");$("trailerNormalBtn").setAttribute("class","");$("trailerDemo").style.display="block";$("trailerNormal").style.display="none"},false);$("trailerNormalBtn").addEventListener("click",function(){$("trailerNormalBtn").setAttribute("class","on");$("trailerDemoBtn").setAttribute("class","");$("trailerNormal").style.display="block";$("trailerDemo").style.display="none"},false);try{kk_click_pv_rebind()}catch(l){setTimeout(function(){window.kk_click_pv_rebind&&
kk_click_pv_rebind()},3E3)}},svodVideoPrintTab:function(a){if(!window.RELATE_MOVIES||!window.RELATE_MOVIES.total_count){$("trailerNormal").style.display="block";return false}var b=[],c=a.flvs.length,d=location.href,e="",f=getParameter("rid"),h=parseInt(d.split("/")[5]);e=G_MOVIE_TYPE=="MTV"?"http://m.kankan.com/yinyue/":"http://m.kankan.com/vod/";if(f)for(var g=0;g<c;g++){var j=a.flvs[g].movie_id,k=e+Math.floor(j/1E3)+"/"+j+".shtml?rid="+f,m=a.flvs[g].episode_title;if(f&&h==j){b.push('<li class="on"><a href='+
k+"><span>"+m+"</span></a></li>");SVOD_PLAY_CURRENT_INDEX=g}else b.push("<li><a href="+k+"><span>"+m+"</span></a></li>");SVOD_PLAY_LIST.push(k)}else for(g=0;g<c;g++){j=a.flvs[g].movie_id;k=e+Math.floor(j/1E3)+"/"+j+".shtml?rid="+parseInt(d.split("/")[5]);m=a.flvs[g].episode_title;if(g==0){b.push('<li class="on"><a href='+k+"><span>"+m+"</span></a></li>");SVOD_PLAY_CURRENT_INDEX=g}else b.push("<li><a href="+k+"><span>"+m+"</span></a></li>");SVOD_PLAY_LIST.push(k)}G_CORE_TAB.trailerNormalContainer.innerHTML=
b.join("");G_CORE_TAB.trailerNormalContainer.style.display="block";if(a.flvs[SVOD_PLAY_CURRENT_INDEX].playtimes){G_CORE_TAB.playTimesContainer.innerHTML=a.flvs[SVOD_PLAY_CURRENT_INDEX].playtimes;G_CORE_TAB.playTimesContainer.style.display="block"}try{kk_click_pv_rebind()}catch(l){setTimeout(function(){window.kk_click_pv_rebind&&kk_click_pv_rebind()},3E3)}},initLvodTab:function(a){var b=this.getTabIndexBySubmovieid(G_MOVIE_DATA.subids[a]);a=this.getsubIndexBySubmovieid(G_MOVIE_DATA.subids[a]);this.printTab(b);
this.switchTab(b,a)},getTabIndexBySubmovieid:function(a){for(var b=0;b<G_TAB_DATA.length;b++)for(var c=0;c<G_TAB_DATA[b].subid.length;c++)if(G_TAB_DATA[b].subid[c]==a)return b},getsubIndexBySubmovieid:function(a){for(var b=0;b<G_TAB_DATA.length;b++)for(var c=0;c<G_TAB_DATA[b].subid.length;c++)if(G_TAB_DATA[b].subid[c]==a)return c},printTab:function(a){if(this.isNocpr&&G_MOVIE_INFO.type!="tv"||G_TAB_DATA.length==0)return false;for(var b="",c=0;c<G_TAB_DATA.length;c++)b+="<li><a href='javascript:;' title='"+
G_TAB_DATA[c].title+"' onclick='G_CORE_TAB.switchTab("+c+");return false;'>"+G_TAB_DATA[c].title+"</a></li>";var d=this,e=setInterval(function(){if(d.$("scrollTapWrapper")){clearInterval(e);d.$("scrollTapWrapper").getElementsByTagName("ul")[0].innerHTML=b;d.highlightTab("scrollTapWrapper",a)}},50)},switchTab:function(a,b){this.isNocpr?this.switchTabNocpr(a,b):this.switchTabWap(a,b)},switchTabWap:function(a,b){if(b!=undefined)if(this.tableIndex===undefined)this.tableIndex=a;else if(this.tableIndex===
a){this.highlightTab("sublist",b);return false}var c=G_MOVIE_DATA,d=G_MOVIE_INFO.type=="tv",e=G_MOVIE_INFO.type=="teleplay",f=G_MOVIE_INFO.type=="anime",h=G_MOVIE_INFO.type=="documentary"&&c.subnames[0].match(/^\d{4}-\d{1,2}-\d{1,2}/),g="";if(d)if(G_TAB_DATA.length==0)for(d=0;d<c.subids.length;d++){var j=G_CORE_CONTROL.currentIndex==d?'class="on"':"",k=c.subnames[d].match(/^\d{4}-\d{1,2}-\d{1,2}/)?c.subnames[d].match(/^\d{4}-\d{1,2}-\d{1,2}/)[0]:"",m=c.subnames[d].replace(k,"");g+='<li id="subli_'+
d+'"'+j+'><a id="subhref_'+d+'"onclick="_G('+d+');return false;" href="javascript:;"><span>'+m+"</span><span>"+k+"</span></a></li>"}else for(d=G_TAB_DATA[a].subid.length-1;d>=0;d--){j=G_TAB_DATA[a].subid[d];var l=G_CORE_CONTROL.getIndexBySubid(j);j=l==G_CORE_CONTROL.currentIndex?'class="on"':"";k=c.subnames[l].match(/^\d{4}-\d{1,2}-\d{1,2}/)[0];m=c.subnames[l].replace(k,"");g+='<li id="subli_'+l+'"'+j+'><a id="subhref_'+l+'"onclick="_G('+l+');return false;" href="javascript:;"><span>'+m+"</span><span>"+
k+"</span></a></li>"}else for(d=0;d<G_TAB_DATA[a].subid.length;d++){j=G_TAB_DATA[a].subid[d];l=G_CORE_CONTROL.getIndexBySubid(j);j=l==G_CORE_CONTROL.currentIndex?'class="on"':"";if(h){k=c.subnames[l].match(/^\d{4}-\d{1,2}-\d{1,2}/)[0];m=c.subnames[l].replace(k,"");g+='<li id="subli_'+l+'"'+j+'><a id="subhref_'+l+'"onclick="_G('+l+');return false;" href="javascript:;"><span>'+m+"</span><span>"+k+"</span></a></li>"}else if(e||f){k=c.subnames[l].match(/\d+/)?c.subnames[l].match(/\d+/)[0]:c.subnames[l];
g+='<li id="subli_'+l+'"'+j+'><a id="subhref_'+l+'"onclick="_G('+l+');return false;" href="javascript:;">'+k+"</a></li>"}else g+='<li id="subli_'+l+'"'+j+'><a id="subhref_'+l+'"onclick="_G('+l+');return false;" href="javascript:;"><span>'+c.subnames[l]+"</span></a></li>"}var n=setInterval(function(){var o=this.$("sublist");if(o){clearInterval(n);G_TAB_DATA.length==0&&$("sublist").setAttribute("class","list_name");o.getElementsByTagName("ul")[0].innerHTML=g;try{kk_click_pv_rebind()}catch(p){setTimeout(function(){window.kk_click_pv_rebind&&
kk_click_pv_rebind()},3E3)}}},50)},switchTabNocpr:function(a,b){if(b!=undefined)if(this.tableIndex===undefined)this.tableIndex=a;else if(this.tableIndex===a){this.highlightTab("sublist",b);return false}var c=G_MOVIE_INFO.type=="tv"?'blockid="10000"':"",d=G_MOVIE_DATA,e="";if(G_MOVIE_INFO.type=="tv")for(var f=0;f<G_TAB_DATA[a].subid.length;f++){var h=G_TAB_DATA[a].subid[f];h=G_CORE_CONTROL.getIndexBySubid(h);var g=h==G_CORE_CONTROL.currentIndex?'class="on"':"",j=d.subnames[h].match(/^\d{4}-\d{1,2}-\d{1,2}/)[0],
k=d.subnames[h].replace(j,"");e+='<li id="subli_'+h+'"'+g+'><a id="subhref_'+h+'"'+c+' onclick="_G('+h+');return false;">'+j+" "+k+"</a></li>";this.highlightTab("scrollTapWrapper",a)}else for(j=0;j<G_TAB_DATA.length;j++)for(f=0;f<G_TAB_DATA[j].subid.length;f++){h=G_TAB_DATA[j].subid[f];h=G_CORE_CONTROL.getIndexBySubid(h);g=h==G_CORE_CONTROL.currentIndex?'class="on"':"";e+='<li id="subli_'+h+'"'+g+'><a id="subhref_'+h+'"'+c+' onclick="_G('+h+');return false;">'+d.subnames[h]+"</a></li>"}var m=this,
l=setInterval(function(){if($("sublist")){clearInterval(l);m.$("sublist").getElementsByTagName("ul")[0].innerHTML=e;m.fireEvent("onswitchtab");try{kk_click_pv_rebind()}catch(n){setTimeout(function(){window.kk_click_pv_rebind&&kk_click_pv_rebind()},3E3)}}},50)},highlightTab:function(a,b){for(var c=this.$(a).getElementsByTagName("li"),d=c.length,e=0;e<d;e++)if(c[e].className=="on")c[e].className="";c[b].className="on"},initLvodTitle:function(a){var b=G_MOVIE_INFO.type=="documentary"&&G_MOVIE_DATA.subnames[0].match(/^\d{4}-\d{1,2}-\d{1,2}/);
if(G_MOVIE_TYPE=="tv"||b){if(a=G_MOVIE_DATA.subnames[a].match(/^\d{4}-\d{1,2}-\d{1,2}/)?G_MOVIE_DATA.subnames[a].match(/^\d{4}-\d{1,2}-\d{1,2}/)[0]:"")$("title").innerHTML=G_MOVIE_TITLE+"&nbsp;"+a+"期"}else{$("title").innerHTML=G_MOVIE_TITLE+"&nbsp;"+G_MOVIE_DATA.subnames[a];if(window.G_IS_ALBUM)$("title").innerHTML=G_MOVIE_DATA.subnames[a]}a=this.getParameter("title")||"";if(b=this.getParameter("topic")||""){b={volvo:"沃尔沃汽车推荐大片《%%》,分享朋友圈,轻松赢取号外彩票!"}[b]||b;b=b.replace(/%%/g,G_MOVIE_TITLE)}if(a||b)document.title=
b+" "+a}}),KKCoreStatic=KankanCoreObj.extend({init:function(){this._super();this.triggerTypeLast=this.triggerType=4;this.staticData={session_id:0};this.isServer=true;this.initTick=(new Date).getTime();this.userStatus=1;this.userid=0;this.isFirstPlay=false;this.pageOpenTick=0;this.processEvent.delayCall(0,this);this.isFirstPlay2=true;this.triggerType2=1},processEvent:function(){var a=G_CORE_CONTROL;window.attachEvent("onload",G_CORE_STATIC.f_pload);window.attachEvent("onunload",G_CORE_STATIC.f_unload);
a.attachEvent(this,"loadstart",this.f_loadStartStat);a.attachEvent(this,"loadeddata",this.f_loadedDataStat);a.attachEvent(this,"onPause",this.f_onPause);a.attachEvent(this,"onCommonPlaying_stat",this.f_onplaying);a.attachEvent(this,"onEnd",this.f_onEnd);a.attachEvent(this,"onBuffering",this.f_onbuffering);a.attachEvent(this,"onSeek",this.f_onseek);a.attachEvent(this,"onStop",this.f_onstop);a.attachEvent(this,"onFirstPlaying",this.f_onfirstplay);a.attachEvent(this,"onDragSeekEnd",this.f_onDragSeekEnd);
a.attachEvent(this,"onsetPlayUrl",this.f_onsetPlayUrl);a.attachEvent(this,"onSeeking_stat",this.f_seeking);a.attachEvent(this,"onSeeked_stat",this.f_seeked);a.attachEvent(this,"onError_stat",this.f_error);a.attachEvent(this,"timeupdate_stat",this.f_timeupdate);a.attachEvent(this,"pause_stat",this.f_pause);a.attachEvent(this,"play_stat",this.f_play);G_CORE_STATIC.sendkkpgv("vod_wap","referre",this.getCookie("WEB_REF"),this.getCookie("WAP_REF"))},f_pload:function(){G_CORE_STATIC.setnStat("page_loaded_tick",
null,true)},f_loadStartStat:function(){this.setnStat("f_loadStartStat",window.location.href,true);this.setStat("req_data_tick",null,true)},f_loadedDataStat:function(){this.setnStat("f_loadStartStat",window.location.href,true)},f_onDragSeekEnd:function(){if(G_CORE_STATIC.dragCalc){G_CORE_STATIC.dragTimeSum+=Math.max(G_CORE_STATIC.time()-G_CORE_STATIC.dragTimePoint,0);G_CORE_STATIC.setnStat("drag_time",G_CORE_STATIC.dragTimeSum,false);G_CORE_STATIC.dragCalc=false;G_CORE_STATIC.dragTimePoint=0}},f_onPause:function(){this.pause++;
this.setnStat("pause_times",this.pause,false);this.setnStat("pause_tick",null,true);this.pauseCalc=true;this.pauseTimePoint=this.time();this.player_last_event="onpause";this.setStatusEnd("onpause")},f_onsetPlayUrl:function(){this.sendnStat()},f_onplaying:function(){if(!this.subMovieStartTag){this.subMovieStartTag=true;this.setStat("movie_start_tick",null,true);this.playAllTimeStamp=this.time();this.playSubTimeStamp=this.time()}this.setnStat("play_session_id",this.getCookie("KANKANWEBUID"));this.player_last_event=
"onplaying";this.setStatusEnd("onplaying");this.bufferData={position:-1,tick:-1,bufferSpeed:[-1],dataStart:-1,sendposS:-1}},f_onbuffering:function(){this.setnStat("play_interrupt_times",G_PLAYER_INSTANCE.bufferTimes,false);this.bufPos=parseInt(G_PLAYER_INSTANCE.getPlayPosition());if(this.seekCalc)this.player_last_event="onbuffering_seek";else if(this.isBufferCalc){this.setnStat("play_interrupt_tick",null,true);this.player_last_event="onbuffering_interrupt"}else this.player_last_event="onbuffering";
this.setStatusEnd("onbuffering")},f_onseek:function(){var a=G_PLAYER_INSTANCE.getPlayPosition(true)*100;if(G_PLAYER_INSTANCE.downPos.lastDrag>0&&a>G_PLAYER_INSTANCE.downPos.lastDrag+200){this.bufSeekObj.lastTime!=0&&this.bufSeekObj.num++;this.bufSeekObj.calc=true;this.bufSeekObj.startTick=this.time();this.bufSeekObj.lastTime=0}G_PLAYER_INSTANCE.downPos.lastDrag=0;this.seek++;this.setnStat("drag_times",this.seek,false);this.seekCalc=true;this.seekTimePoint=this.time();this.player_last_event="onseek";
this.setStatusEnd("onseek");this.setnStat("drag_buffer_tick",null,true)},f_seeking:function(){this.seekTimes++;this.seekStarTime=this.time();this.setStat("drag_times",this.seekTimes,false)},f_seeked:function(){this.seekTime+=this.time()-this.seekStarTime;this.setStat("drag_buffer_time",this.seekTime)},f_error:function(){this.setStat("erro_code",document.getElementsByTagName("video")[0].error.code)},f_timeupdate:function(){var a=this.time(),b=this.playAllTimeStamp?this.playAllTimeStamp:this.time();
b=a-b;if(b>8E3||document.getElementsByTagName("video")[0].paused)return false;this.playAllTime+=b;this.playAllTimeStamp=a;b=this.playSubTimeStamp?this.playSubTimeStamp:this.time();this.playSubTime+=a-b;this.playSubTimeStamp=a;this.setStat("play_all_time",this.playAllTime);this.setStat("play_sub_time",this.playSubTime)},f_pause:function(){if(this.subMovieStartTag){this.isPause=true;this.pauseTimes++;this.setStat("pause_times",this.pauseTimes);this.pauseTimeStamp=this.pauseTimeStamp?this.pauseTimeStamp:
this.time()}},f_play:function(){if(this.subMovieStartTag&&this.isPause){this.isPause=false;var a=this.pauseTimeStamp;this.pauseTime+=this.time()-a;this.setStat("pause_time",this.pauseTime)}},f_onstop:function(){this.setnStat("movie_stop_tick",null,true);if(this.player_last_event!="onerr"||this.player_last_event!="onend")this.player_last_event="onstop";this.setStatusEnd("onstop")},f_coreplay:function(){this.setChannelId()},f_onfirstplay:function(){this.isFirstPlay=true;this.mStatSend("http://kkpgv2.xunlei.com/?u=vodstart&u2=vod_wap&u2=play&u3="+
G_CORE_STATIC.staticData.peerid+"&u4="+G_CORE_STATIC.staticData.session_id+"&u5="+this.getGCID(G_SUBMOVIE_DATA[G_CORE_CONTROL.currentIndex].msurls[G_CORE_CONTROL.currentQuality])+"&rd="+(new Date).getTime())},f_onEnd:function(){location.href.indexOf("end")!=-1&&G_PLAYER_INIT.debugInfo("影片自然结束,发movd   ");G_CORE_STATIC.sendStat(10);G_CORE_STATIC.autoPlay=true;G_CORE_STATIC.triggerType2=3},setStatusEnd:function(a){if(this.pauseCalc&&a!="onpause"){this.pauseTimeSum+=Math.max(this.time()-this.pauseTimePoint,
0);this.setnStat("pause_time",this.pauseTimeSum,false);this.pauseCalc=false;this.pauseTimePoint=0;this.setnStat("pause_tick",0,false)}if(G_PLAYER_INSTANCE.isBufferCalc&&a!="onbuffering"){var b=Math.max(this.time()-G_PLAYER_INSTANCE.bufferBeginTime,0);G_PLAYER_INSTANCE.isBufferCalc=false;this.bufTime+=b;this.setnStat("play_interrupt_time",this.bufTime,false);this.setnStat("play_interrupt_tick",0,false);if(this.player_last_event=="onplaying"){if(this.isFirstPlay){this.setnStat("fisrt_interrupt_tick",
G_PLAYER_INSTANCE.bufferBeginTime,false);this.setnStat("first_interrupt_playpos",this.bufPos,false);this.setnStat("first_interrupt_buf_time",b,false);this.isFirstPlay=false}this.setnStat("last_interrupt_tick",G_PLAYER_INSTANCE.bufferBeginTime,false);this.setnStat("last_interrupt_playpos",this.bufPos,false);this.setnStat("last_interrupt_buf_time",b,false)}G_PLAYER_INSTANCE.bufferBeginTime=0}if(this.seekCalc&&a!="onbuffering"&&a!="onseek"){this.seekTimeSum+=Math.max(this.time()-this.seekTimePoint,0);
this.setnStat("drag_buffer_time",G_CORE_STATIC.seekTimeSum,false);this.seekCalc=false;this.seekTimePoint=0;this.setnStat("drag_buffer_tick",0,false);if(this.bufSeekObj.calc){this.bufSeekObj.bufferTime+=this.time()-this.bufSeekObj.startTick;this.bufSeekObj.lastTime=this.time()-this.bufSeekObj.startTick;this.bufSeekObj.calc=false;this.bufSeekObj.startTick=0}this.fireEvent("onSeekEnd")}},isEmptyObject:function(a){for(var b in a)return false;return true},time:function(){return(new Date).getTime()},send:function(a){this.mStatSend(a)},
sendkkpgv:function(){var a=arguments;this.send("http://kkpgv2.xunlei.com/?u=vodact&u1="+a[0]+"&u2="+(a[1]||"")+"&u3="+(a[2]||"")+"&u4="+(a[3]||"")+"&rd="+this.time())},jsSend:function(a){var b=$C("script");b.type="text/javascript";b.language="javascript";b.lang="zh-cn";b.src=a;$P(b,document.getElementsByTagName("head")[0]||null);b.attachEvent("onreadystatechange",function(){var c=b.readyState;if("loaded"==c||"complete"==c){try{$R(b,document.getElementsByTagName("head")[0]||null)}catch(d){}b=null}})},
sendKkpgvStrict:function(a){this.jsSend("http://kkpgv.xunlei.com/?u=kankan_4_0_"+a+"_51&rd="+this.time())},xoliStatic:function(){var a="http://kkpgv2.xunlei.com/?u=xoli",b=arguments,c="",d=1,e;for(e in b){if(b[e])c+="&u"+d+"="+b[e].toString();d++}a+=c;a+="&rd="+Math.random();G_CORE_STATIC.jsSend(a)},setWebuid:function(){var a=typeof hex_md5=="function"?(new Date+(navigator.appName+"_"+navigator.appVersion+"_"+navigator.userAgent+"_"+navigator.appCodeName+"_"+navigator.platform)+Math.random()).hex_md5():
"cc007"+this.time()+this.rand(1E6,9999999)+this.rand(1E6,9999999);setCookie("KANKANWEBUID",a,87600)},setPlayuid:function(){return typeof hex_md5=="function"?(new Date+(navigator.appName+"_"+navigator.appVersion+"_"+navigator.userAgent+"_"+navigator.appCodeName+"_"+navigator.platform)+Math.random()+ +G_MOVIEID).hex_md5():"cc001"+this.time()+this.rand(1E6,9999999)+this.rand(1E6,9999999)+G_MOVIEID},startnStat:function(){this.seek=this.bufTime=0;this.seekCalc=false;this.pause=this.seekTimeSum=this.seekTimePoint=
0;this.pauseCalc=false;this.pauseTimeSum=this.pauseTimePoint=0;this.dragCalc=false;this.dragTimeSum=this.dragTimePoint=0;this.staticData={session_id:0,req_start_tick:"0",ad_start_tick:"0",ad_stop_tick:"0",movie_start_tick:"0",movie_stop_tick:"0",buff_end_tick:"0",fullscreen_time:"0",full_to_nor_times:"0",nor_to_full_times:"0",play_interrupt_times:"0",play_interrupt_time:"0",drag_times:"0",drag_time:"0",drag_buffer_time:"0",pause_times:"0",pause_time:"0",movie_id:"null",sub_id:"0",moviesource_id:"0",
player_type:"0",channel_id:"0",trigger_type:"0",play_type:"0",movie_format:"0",movie_definition:"0",flashplayer_ver:"null",web_url:"null",ref_url:"null",peerid:"null",svr_type:"null",buildver:"null",thunderup_begin_tick:"null",thunderup_end_tick:"null",req_data_tick:"null",stream_ver:"null",req_play_tick:0,req_data_tick:0,first_refer:"null",peerid:"null",svr_type:"null",buildver:"null",thunderup_begin_tick:0,thunderup_end_tick:0,stream_ver:"null",vod_url:"null",ad_url:"null",ad_play_times:0,movie_length:0,
user_status:0,page_open_tick:0,player_loaded_tick:0,page_loaded_tick:0,userid:0,acc_status:0,acc_status1:0,acc_status2:0,acc_status_times:0,acc_error:"null",acc_bytes_p2s:0,acc_bytes_p2p:0,ad_play_timeout:0,play_session_id:""};this.isServer=true;this.player_last_event="init";this.isFirstPlay=false;this.bufPos=0;this.bufSeekObj={num:0,bufferTime:0,calc:false,startTick:0};this.statFvodDataArr="play_type,channel_type,channel_id,session_id,flash_session_id,peer_id,userid,user_status,movie_id,sub_id,moviesource_id,movie_definition,trigger_type,playcode_id,is_success,play_session_id,file_id,part_id,movie_type".split(",");
this.getCookie("KANKANWEBUID")||this.setWebuid();this.setnStat("session_id",this.getCookie("KANKANWEBUID"));this.setnStat("channel_type",1);this.setnStat("userid",0);this.setnStat("user_status",1);var a=this.getParameter("id")||getCookie("qs_id")||3;if(window.location.href.split("/")[2].search("mewifi.mobi")>0)a=771001;this.setnStat("moviesource_id",a);this.getCookie("f_refer")&&this.setnStat("first_refer",this.getCookie("f_refer"));if(!this.isEmptyObject(this.statBuffer)){this.isBufferSend=true;
for(var b in this.statBuffer)if(typeof this.statBuffer[b]=="string"||typeof this.statBuffer[b]=="number")this.setnStat(b,this.statBuffer[b]);this.statBuffer={}}this.setnStat("req_start_tick",null,true);this.setnStat("player_type",2);this.setnStat("movie_format",2);this.setnStat("web_url",window.location.href);if(G_CORE_INIT.playerLoadedTick&&G_CORE_INIT.playerLoadedTick>0){G_CORE_STATIC.setnStat("player_loaded_tick",G_CORE_INIT.playerLoadedTick);G_CORE_INIT.playerLoadedTick=0}document.referrer&&this.setnStat("ref_url",
document.referrer);this.setnStat("trigger_type",this.triggerType);this.triggerTypeLast=this.triggerType;this.triggerType=4;this.setnStat("page_open_tick",this.pageOpenTick)},startStat:function(){this.subMovieStartTag=false;this.seekTime=this.seekTimes=0;this.playAllTime=this.playAllTime?this.playAllTime:0;this.pauseTime=this.pauseTimes=this.playSubTimeStamp=this.playAllTimeStamp=this.playSubTime=0;this.isPause=false;this.pauseTimeStamp=0;this.staticWapData={session_id:0,req_start_tick:"0",movie_start_tick:"0",
movie_stop_tick:"0",play_interrupt_times:0,play_interrupt_time:0,drag_times:"0",drag_buffer_time:"0",pause_times:"0",pause_time:"0",movie_id:0,sub_id:0,moviesource_id:0,channel_id:0,trigger_type:0,req_play_tick:0,req_data_tick:0,player_last_event:0,play_session_id:0,play_type:0,movie_type:0,erro_code:0,play_all_time:"0",play_sub_time:"0",useragent:0};this.statWapDataArr="session_id,req_start_tick,movie_start_tick,movie_stop_tick,play_interrupt_times,play_interrupt_time,drag_times,drag_buffer_time,pause_times,pause_time,movie_id,sub_id,moviesource_id,channel_id,trigger_type,req_play_tick,req_data_tick,player_last_event,play_session_id,play_type,movie_type,erro_code,play_all_time,play_sub_time,useragent".split(",");
this.getCookie("KANKANWEBUID")||this.setWebuid();this.setStat("session_id",this.getCookie("KANKANWEBUID"));this.setStat("req_start_tick",null,true);this.setStat("moviesource_id",this.getParameter("id")||getCookie("qs_id")||3);this.setStat("trigger_type",G_CORE_STATIC.triggerType2);this.isNocpr?this.setStat("play_type","102"):this.setStat("play_type","101");this.setStat("movie_type","101");this.setStat("useragent",encodeURIComponent(navigator.userAgent))},setnStat:function(a,b,c){c=c?c:false;if(this.staticData.movie_start_tick==
0&&a=="movie_stop_tick")return false;if(a=="userid")b*=1;if(typeof G_PLAYER_INSTANCE!="undefined"&&G_PLAYER_INSTANCE)G_PLAYER_INSTANCE.setnStat(a,c?this.time():b);this.staticData[a]=c?this.time():b;this.getCookie("KANKANWEBUID")||this.setWebuid()},setStat:function(a,b,c){if(!this.staticWapData)return false;if(a=="movie_stop_tick"&&this.staticWapData.movie_start_tick==0)return false;this.staticWapData[a]=c?this.time():b},sendnStat:function(){G_CORE_STATIC.setChannelId();G_CORE_STATIC.sendFvodStat()},
sendStat:function(a){if(this.staticWapData.session_id==0)return false;this.setStat("movie_stop_tick",null,true);this.setChannelId();var b=this.statWapDataArr.length,c="http://kkpgv2.xunlei.com/?u=mvod";try{a==20&&this.setStat("player_last_event","0");if(a==10){var d=this.staticWapData.pause_times-1;d=d?d:"0";this.staticWapData.pause_times=d}this.pauseTime||this.setStat("pause_time","0");parseInt(this.staticWapData.movie_start_tick)&&this.setStat("play_session_id",this.setPlayuid());for(a=0;a<b;a++){var e=
this.staticWapData[this.statWapDataArr[a]];c+="&u"+(a+1)+"="+(e?e:"")}c+="&rd="+this.time();this.send(c);if(location.href.indexOf("end")!=-1){G_PLAYER_INIT.debugInfo(" ###开始发送mvod!");for(a=0;a<this.statWapDataArr.length;a++){e=this.staticWapData[this.statWapDataArr[a]];G_PLAYER_INIT.debugInfo(this.statWapDataArr[a]+": "+e)}G_PLAYER_INIT.debugInfo("成功发送mvod!###  ")}this.setStat("session_id",0);G_CORE_STATIC.autoPlay=false}catch(f){}},f_unload:function(){G_CORE_STATIC.sendStat(20)},sendFvodStat:function(){for(var a=
this.statFvodDataArr.length,b="http://kkpgv2.xunlei.com/?u=fvod",c=0;c<a;c++){var d=this.staticData[this.statFvodDataArr[c]];b+="&u"+(c+1)+"="+(d?d:"")}b+="&rd="+this.time();this.send(b)},setChannelId:function(){var a=0;if(G_MOVIE_TYPE=="movie")a=1;else if(G_MOVIE_TYPE=="teleplay")a=2;else if(G_MOVIE_TYPE=="tv")a=3;else if(G_MOVIE_TYPE=="anime")a=4;else if(G_MOVIE_TYPE=="documentary")a=6;else if(G_MOVIE_TYPE=="push")a=7;else if(G_MOVIE_TYPE=="lesson")a=8;else if(G_MOVIE_TYPE=="vmovie")a=9;if(typeof G_MOVIE_DATA.subtype!=
"undefined"&&G_MOVIE_DATA.subtype[G_CORE_CONTROL.currentIndex]!=1)a=5;if(typeof G_CHANNEL_ID!="undefined")a=G_CHANNEL_ID;this.setnStat("channel_id",a,false);this.setStat("channel_id",a,false)}}),KKCoreSubmovieCtr=KankanCoreObj.extend({init:function(){this._super();this.preDownloadIndex=this.preDownloadFaild=0;this.pathURL="http://kankan.xunlei.com/vod/mp4/";this.dataURL="http://api.movie.kankan.com/vodjs/subdata/";this.moviedataURL="http://api.movie.kankan.com/vodjs/moviedata/";this.targetIndex=0},
getSubData:function(a,b){this.trace("getSubData :"+a);this.loadJSDataByTimeslice(this.dataURL+Math.floor(parseInt(G_MOVIEID)/1E3)+"/"+G_MOVIEID+"/"+G_MOVIE_DATA.subids[a]+".js",G_CORE_SUBMOVIECTR.getSubDataSuccess,[b,a],true,4E3)},getSubDataSuccess:function(a,b,c){G_CORE_SUBMOVIECTR.targetIndex=typeof c!="undefined"&&c>=0?c:G_CORE_CONTROL.currentIndex;a="if(typeof submoviedata_"+G_MOVIE_DATA.subids[G_CORE_SUBMOVIECTR.targetIndex]+"!= 'undefined')";a+="G_SUBMOVIE_DATA[G_CORE_SUBMOVIECTR.targetIndex]=submoviedata_"+
G_MOVIE_DATA.subids[G_CORE_SUBMOVIECTR.targetIndex];eval(a);if(typeof G_SUBMOVIE_DATA[G_CORE_SUBMOVIECTR.targetIndex].submovieid!="undefined"){if(typeof b=="function")if(b==G_CORE_CONTROL.play){G_CORE_CONTROL.play(G_CORE_SUBMOVIECTR.targetIndex);G_CORE_SUBMOVIECTR.trace("getSubDataSuccess : play "+G_CORE_SUBMOVIECTR.targetIndex);return true}else if(b==G_CORE_CONTROL.playMovie){G_CORE_CONTROL.playMovie(G_CORE_SUBMOVIECTR.targetIndex);G_CORE_SUBMOVIECTR.trace("getSubDataSuccess : playMovie "+G_CORE_SUBMOVIECTR.targetIndex);
return true}_G(G_CORE_SUBMOVIECTR.targetIndex);G_CORE_SUBMOVIECTR.trace("getSubDataSuccess : G "+G_CORE_SUBMOVIECTR.targetIndex)}else{G_CORE_SUBMOVIECTR.trace("getSubDataSuccess:SubDataEmpty");window.location.href="http://m.kankan.com/v/"+Math.floor(parseInt(G_MOVIEID)/1E3)+"/"+G_MOVIEID+"/"+G_MOVIE_DATA.subids[G_CORE_SUBMOVIECTR.targetIndex]+".shtml?stopre=1"}},loadMovieData:function(a,b){this.loadJSData(this.moviedataURL+"/"+Math.floor(a/1E3)+"/"+a+".js",b,arguments,false)},loadSubData:function(a,
b,c){var d=arguments;this.loadJSData(this.dataURL+Math.floor(parseInt(G_MOVIEID)/1E3)+"/"+G_MOVIEID+"/"+c+".js",G_CORE_SUBMOVIECTR.loadSubDataHandler,d,false)},loadSubDataHandler:function(){var a=arguments,b=a[1],c=a[2];if(a[0]){var d="if(typeof submoviedata_"+c+"!= 'undefined')";d+="G_SUBMOVIE_DATA["+b+"]=submoviedata_"+c}else{d="if(typeof submoviedata_"+c+"!= 'undefined')";d+="G_CORE_PREDOWNLOAD.predownSubData.subdata["+b+"]=submoviedata_"+c}eval(d);a[3].apply(null,[a[4],a[5],a[6]])}}),KKCoreHistory=
KankanCoreObj.extend({init:function(){this._super();this.processEvent();this.localStorageCheck();this.itemChar="@@";this.groupChar="|"},localStorageCheck:function(){this.use_cookie=false;try{localStorage.setItem("localStorageStatus",1)}catch(a){this.use_cookie=true}},ioWriter:function(a,b,c){c=c||720;if(this.use_cookie)this.setCookie(a,b,c);else{b=b+"～"+((new Date).getTime()+c*36E5);localStorage.setItem(a,b)}},ioReader:function(a){return this.use_cookie?this.getCookie(a):localStorage.getItem(a)},
setLatestHistory:function(a,b,c){this.writeHistory(a.movieId==""?"":a.movieId+this.itemChar+(new Date).getTime()+this.itemChar+encodeURI(a.movieName)+this.itemChar+a.cp+this.itemChar+a.ext+this.itemChar+a.type+this.itemChar+a.subId+this.itemChar+encodeURI(a.subName)+this.itemChar+a.nextSubId+this.itemChar+encodeURI(a.nextSubName)+this.itemChar+a.newmovieid+this.itemChar+a.movietype+this.itemChar+a.oldSubLength+this.itemChar+b+this.itemChar+a.subLength+this.itemChar+a.oldSubId+this.itemChar+G_MOVIE_DATA.subids[G_MOVIE_DATA.subids.length-
1]+this.itemChar+a.subtype+this.itemChar+a.nextsubtype+this.itemChar+a.quality,a.newmovieid,c)},writeHistory:function(a,b,c){var d=this.ioReader("view_history"),e=[];if(d){d=d.split("～")[0];d=this.string2Array(d,this.groupChar);e=null;for(var f=0;f<d.length;f++)if(this.string2Array(d[f],this.itemChar)[10]==b)if(c&&f==0)e=d.splice(f,1);else d.splice(f,1);if(c&&e){b=this.string2Array(e[0],this.itemChar);a=this.string2Array(a,this.itemChar);c=parseInt(b[13]);b=parseInt(b[1]);b=parseInt(a[1])-b+c;a[13]=
b>6E3||this.isIphone?parseInt(G_PLAYER_INSTANCE.$video.currentTime*1E3):b;a=this.array2String(a,this.itemChar)}d.unshift(a);e=d}else e.push(a);this.ioWriter("view_history",this.array2String(e.slice(0,5),this.groupChar))},readHistory:function(){var a=this.ioReader("view_history");if(a){this.string2Array(a,this.groupChar);a=decodeURI(a);var b="读取时间："+this.string2Array(this.string2Array(a,this.groupChar)[0],this.itemChar)[13]+"ms   影片名："+this.string2Array(this.string2Array(a,this.groupChar)[0],this.itemChar)[2],
c="   记录长度："+this.string2Array(a,this.groupChar).length;document.getElementsByTagName("h2")[1].style.fontSize="8px";document.getElementsByTagName("h2")[1].style.width="100%";document.getElementsByTagName("h2")[1].style.wordBreak="break-all";document.getElementsByTagName("h2")[1].innerHTML=b+c+"<p>history:"+a+"</p>";if(document.getElementById("sec_info_intro_all")){document.getElementById("sec_info_intro_all").style.width="100%";document.getElementById("sec_info_intro_all").style.wordBreak="break-all";
document.getElementById("sec_info_intro_all").innerHTML=a}}},processEvent:function(){this.isIphone&&this.isQQ&&this.isIOS7?G_CORE_CONTROL.attachEvent(this,"loadstart",this.f_onplaying):G_CORE_CONTROL.attachEvent(this,"onCommonPlaying_stat",this.f_onplaying)},f_onplaying:function(){var a=G_CORE_HISTORY.getLatestHistoryObject();G_CORE_HISTORY.setLatestHistory(a,0);location.href.indexOf("history")!=-1&&G_CORE_HISTORY.readHistory();window.HISTORY_TIMMER=setInterval(function(){G_CORE_HISTORY.intervalWriteHistory();
location.href.indexOf("history")!=-1&&G_CORE_HISTORY.readHistory()},2E3)},getLatestHistoryObject:function(){var a={};a.movieId=G_HALLID;a.subId=G_MOVIE_DATA.subids[G_CORE_CONTROL.currentIndex];if(G_MOVIE_TYPE=="MTV"){a.movieName=G_MOVIE_INFO.artistName?G_MOVIE_INFO.artistName:"";a.subName="《"+G_MOVIE_DATA.subnames[G_CORE_CONTROL.currentIndex]+"》"}else if(G_MOVIE_TYPE=="video"){a.movieName=G_MOVIE_TITLE;a.subName=""}else{a.movieName=G_MOVIE_TITLE;a.subName=G_MOVIE_DATA.subnames[G_CORE_CONTROL.currentIndex]}a.cp=
typeof G_CP_DATA=="undefined"?"NO":G_CP_DATA.cp_mul;a.ext="mp4";a.type=G_MOVIE_INFO.type;a.nextSubId=G_MOVIE_DATA.subids[G_CORE_CONTROL.currentIndex+1]||"NO";a.newmovieid=G_MOVIE_INFO.id;a.movietype=G_MOVIE_TYPE;a.subLength=G_MOVIE_DATA.subids.length;a.subtype=G_MOVIE_DATA.subtype[G_CORE_CONTROL.currentIndex];a.nextsubtype=G_MOVIE_DATA.subtype[G_CORE_CONTROL.currentIndex+1]||"NO";a.nextSubName=G_MOVIE_DATA.subnames[G_CORE_CONTROL.currentIndex+1]||"NO";a.quality=G_CORE_CONTROL.currentQuality;return a},
intervalWriteHistory:function(){if(!this.$("PlayerCtrl").paused){var a=G_CORE_HISTORY.getLatestHistoryObject();G_CORE_HISTORY.setLatestHistory(a,0,true)}}});
function _G(a){G_PLAYER_ERROR.clearPlayerWarm();if(!G_CORE_CONTROL.playLock){if(window.G_IS_ALBUM){G_MOVIE_INFO.id=G_MOVIEID=_ol_movie_id=G_MOVIE_DATA.movieids[a];G_MOVIE_INFO.hid=G_HALLID=G_MOVIE_DATA.hallids[a];window.wap_kkCommunity&&wap_kkCommunity.init()}if(typeof G_SUBMOVIE_DATA[a].submovieid!="undefined"){try{G_CORE_STATIC.startnStat(false);if(G_CORE_STATIC.isFirstPlay2){G_CORE_STATIC.startStat();G_CORE_STATIC.isFirstPlay2=false}else{G_CORE_STATIC.sendStat();if(!G_CORE_STATIC.autoPlay){G_CORE_STATIC.triggerType2=
4;G_CORE_STATIC.autoPlay=false}G_CORE_STATIC.startStat()}}catch(b){}G_CORE_CONTROL.currentIndex=a;G_CORE_CONTROL.play(a)}else{G_CORE_CONTROL.currentIndex=a;G_CORE_SUBMOVIECTR.getSubData(a)}}}function show_kk_player(){G_CORE_CONTROL.showPlayer()}function hide_kk_player(){G_CORE_CONTROL.hidePlayer()}var G_CORE_SUBMOVIECTR=new KKCoreSubmovieCtr;G_CORE_CONTROL=new kkCoreControl;var G_CORE_STATIC=new KKCoreStatic,G_CORE_COMMON=G_CORE_CONTROL,G_CORE_SERVER=new kkCoreServer,G_CORE_HISTORY=new KKCoreHistory;
G_LOAD_COMPLETE=1;function $C(a){return G_CORE_CONTROL.$C(a)}function $P(a,b){return G_CORE_CONTROL.$P(a,b)}function $R(a,b){return G_CORE_CONTROL.$R(a,b)}function loadJSData(a,b,c,d,e){return KankanCoreObj.prototype.loadJSData(a,b,c,d,e)}function loadJSDataByTimeslice(a,b,c,d,e){return KankanCoreObj.prototype.loadJSDataByTimeslice(a,b,c,d,e)}function loadJSONDataByTimeslice(a,b,c,d,e,f,h){return KankanCoreObj.prototype.loadJSONDataByTimeslice(a,b,c,d,e,f,h)}
function loadJSONData(a,b,c,d,e,f){return KankanCoreObj.prototype.loadJSONData(a,b,c,d,e,f)}function getParameter(a){return KankanCoreObj.prototype.getParameter(a)}function getCookie(a){return G_CORE_CONTROL.getCookie(a)}function setCookie(a,b,c){return G_CORE_CONTROL.setCookie(a,b,c)}function setCookieWithDomain(a,b,c,d){return G_CORE_CONTROL.setCookieWithDomain(a,b,c,d)}kkCore.Init=kkCoreInit;
if(!/android/.test(navigator.userAgent.toLowerCase())){document.getElementById("m_down").setAttribute("class","down_android down_ios");document.getElementById("open_app").style.display="none"};