kdayun-compnent-develop/kdayun-compnent-pack/dist/libs/ckplayer/ckplayer.min.js

5 lines
139 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

!function(){var ckplayer,ckplayerPath="";!function(){var c,d,a=document.scripts,b=a[a.length-1].src;for(c=0;c<a.length;c++)d=a[c].getAttribute("name")||a[c].getAttribute("data-name"),d&&"ckplayer"==d&&(b=a[c].src);ckplayerPath=b.substring(0,b.lastIndexOf("/")+1)}(),ckplayer=function(a){this.varsDefault={playerID:"",container:"",variable:"ckplayer",volume:.8,poster:"",autoplay:!1,loop:!1,live:!1,duration:0,forceduration:0,seek:0,drag:"",front:"",next:"",loaded:"",flashplayer:!1,html5m3u8:!1,track:null,cktrack:null,cktrackdelay:0,preview:null,prompt:null,video:null,config:"",type:"",crossorigin:"",crossdomain:"",unescape:!1,mobileCkControls:!1,mobileAutoFull:!0,playbackrate:1,h5container:"",debug:!1,overspread:!0,language:"",style:"",adfront:"",adfronttime:"",adfrontlink:"",adpause:"",adpausetime:"",adpauselink:"",adinsert:"",adinserttime:"",adinsertlink:"",inserttime:"",adend:"",adendtime:"",adendlink:"",advertisements:""},this.vars={},this.ckConfig={},this.jsonConfig={},this.ckLanguage={},this.jsonLanguage={},this.ckStyle={},this.jsonStyle={},this.contextMenu=[["ckplayer","link","http://www.ckplayer.com","_blank"],["version:X2","default","line"]],this.errorList=[["000","Object does not exist"],["001","Variables type is not a object"],["002","Video object does not exist"],["003","Video object format error"],["004","Video object format error"],["005","Video object format error"],["006","[error] does not exist"],["007","Ajax error"],["008","Ajax error"],["009","Ajax object format error"],["010","Ajax.status:[error]"],["011","[error] File loading failed or error"],["012","[error]"]],this.playbackRateArr=[[.5,"0.5X"],[1,"1X"],[1.25,"1.25X"],[1.5,"1.5X"],[2,"2X"],[4,"4X"]],this.playbackRateTemp=1,this.playbackRateDefault=1,this.subtitlesTemp=-1,this.logo="",this.loaded=!1,this.timerError=null,this.error=!1,this.errorUrl=[],this.timerFull=null,this.full=!1,this.timerTime=null,this.timerBuffer=null,this.isTimeButtonMove=!0,this.isTimeButtonDown=!1,this.timeButtonOver=null,this.buttonHide=!1,this.isClick=!1,this.timerClick=null,this.timerCBar=null,this.needSeek=0,this.volume=0,this.volumeTemp=0,this.time=0,this.isFirst=!0,this.html5Video=!0,this.pdCoor={x:0,y:0},this.playerType="",this.loadTime=0,this.body=document.body||document.documentElement,this.V=null,this.listenerJsArr=[],this.buttonLen=0,this.buttonArr=[],this.elementArr=[],this.elementTempArr=[],this.track=[],this.trackIndex=0,this.nowTrackShow={sn:""},this.trackElement=[],this.timerVCanvas=null,this.animateArray=[],this.animateElementArray=[],this.animatePauseArray=[],this.previewStart=0,this.previewDiv=null,this.previewTop=null,this.previewWidth=120,this.previewTween=null,this.isM3u8=!1,this.promptArr=[],this.promptElement=null,this.conBarShow=!0,this.errorAdd=!1,this.errorSend=!1,this.controlBarIsShow=!0,this.videoScale=1,this.fontFamily='"Microsoft YaHei"; YaHei; "FAE8F6F96C59ED1"; SimHei; "9ED1F53";Arial',this.timeSliderLeftTemp=0,this.durationSendJS=!1,this.adAnalysisEnd=!1,this.advertisements={},this.isFirstTimePlay=!0,this.adType="",this.adI=0,this.videoTemp={src:"",source:"",currentSrc:"",loop:!1},this.adTimeAllTotal=0,this.adTimeTotal=0,this.adCountDownObj=null,this.adPlayStart=!1,this.adPlayerPlay=!1,this.adIsPause=!1,this.adVideoMute=!1,this.adIsVideoTime=!1,this.endAdPlay=!1,this.adPauseShow=!1,this.adReset=!1,this.videoClickXy={x:0,y:0},this.adVideoPlay=!1,this.loadTimeTemp=0,this.hlsAutoPlay=!0,this.loadingShow=!1,this.videoString="",this.customeElement=[],this.cdWH={w:0,h:0},this.CB={},a&&this.embed(a)},ckplayer.prototype={embed:function(a){if("file://"==window.location.href.substr(0,7))return alert("Please use the HTTP protocol to open the page"),void 0;if(this.isUndefined(a))return this.eject(this.errorList[0]),void 0;"object"!=this.varType(a)&&this.eject(this.errorList[1]),this.vars=this.standardization(this.varsDefault,a),!this.vars["mobileCkControls"]&&this.isMobile()&&(this.vars["flashplayer"]=!1,this.conBarShow=!1);var b=this.vars["video"];return b?("string"==this.varType(b)&&("CK:"==b.substr(0,3)||"CE:"==b.substr(0,3)||"CK:"==b.substr(8,3)||"CE:"==b.substr(8,3))&&(this.vars["flashplayer"]=!0),"object"==this.varType(b)&&b.length>1&&("CK:"==b[0][0].substr(0,3)||"CE:"==b[0][0].substr(0,3)||"CK:"==b[0][0].substr(8,3)||"CE:"==b[0][0].substr(8,3))&&(this.vars["flashplayer"]=!0),this.videoString=b,this.checkUpConfig(),void 0):(this.eject(this.errorList[2]),void 0)},checkUpConfig:function(){var isFun,thisTemp=this,configPath="",jsTemp=null;if(this.vars["config"])"website:"!=this.vars["config"].substr(0,8)?(jsTemp=eval(this.vars["config"]+"()"),this.isUndefined(jsTemp)?this.loadConfig(ckplayerPath+this.vars["config"]):(this.ckConfig=this.newObj(jsTemp),this.jsonConfig=this.newObj(jsTemp),this.loadConfig(null))):this.loadConfig(ckplayerPath+this.vars["config"].substr(8));else try{isFun=!1;try{"function"==typeof ckplayerConfig&&(isFun=!0)}catch(e){}isFun?(jsTemp=ckplayerConfig(),jsTemp?(this.ckConfig=this.newObj(jsTemp),this.jsonConfig=this.newObj(jsTemp),this.loadConfig(null)):this.loadConfig(ckplayerPath+"ckplayer.json")):this.loadConfig(ckplayerPath+"ckplayer.json")}catch(e){thisTemp.sysError(thisTemp.errorList[12],e)}},loadConfig:function(a){var b=this;a?this.ajax({url:a,success:function(a){a?(b.ckConfig=a,b.jsonConfig=b.newObj(a),b.isUndefined(a["flashvars"])||(b.vars=b.objectAssign(a["flashvars"],b.vars)),b.checkUpLanguage()):b.sysError(b.errorList[11],"Config")},error:function(a){b.sysError(b.errorList[12],a)}}):this.checkUpLanguage()},checkUpLanguage:function(){var isFun,thisTemp=this,languagePath="",jsTemp=null;if(this.vars["language"]?languagePath=this.vars["language"]:this.ckConfig["languagePath"]&&(languagePath=this.ckConfig["languagePath"]),languagePath)"website:"!=languagePath.substr(0,8)?(jsTemp=eval(languagePath+"()"),jsTemp?(this.ckLanguage=this.newObj(jsTemp),this.jsonLanguage=this.newObj(jsTemp),this.loadLanguage(null)):this.loadLanguage(ckplayerPath+languagePath)):this.loadLanguage(ckplayerPath+languagePath.substr(8));else try{isFun=!1;try{"function"==typeof ckplayerLanguage&&(isFun=!0)}catch(e){}isFun?(jsTemp=ckplayerLanguage(),jsTemp?(this.ckLanguage=this.newObj(jsTemp),this.jsonLanguage=this.newObj(jsTemp),this.loadLanguage(null)):this.loadLanguage(ckplayerPath+"language.json")):this.loadLanguage(ckplayerPath+"language.json")}catch(e){thisTemp.sysError(thisTemp.errorList[12],e)}},loadLanguage:function(a){var b=this;a?this.ajax({url:a,success:function(a){a?(b.ckLanguage=a,b.jsonLanguage=b.newObj(a),b.checkUpStyle()):b.sysError(b.errorList[11],"language.json")},error:function(a){b.sysError(b.errorList[12],a)}}):this.checkUpStyle()},checkUpStyle:function(){var isFun,thisTemp=this,stylePath="",jsTemp=null,configJs=this.newObj(this.ckConfig);if(this.vars["style"]?stylePath=this.vars["style"]:this.ckConfig["stylePath"]&&(stylePath=""+this.ckConfig["stylePath"]),stylePath)"website:"!=stylePath.substr(0,8)?(jsTemp=eval(stylePath+"()"),this.isUndefined(jsTemp)?this.loadStyle(ckplayerPath+stylePath):(this.jsonStyle=this.newObj(jsTemp),this.ckStyle=this.newObj(jsTemp),this.ckStyle["advertisement"]=this.objectAssign(configJs["style"]["advertisement"],this.ckStyle["advertisement"]),this.ckStyle=this.objectAssign(configJs["style"],this.ckStyle),this.loadStyle(null))):this.loadStyle(ckplayerPath+stylePath.substr(8));else try{isFun=!1;try{"function"==typeof ckplayerStyle&&(isFun=!0)}catch(e){isFun=!1}isFun?(jsTemp=ckplayerStyle(),this.isUndefined(jsTemp)?this.loadStyle(ckplayerPath+"style.json"):(this.jsonStyle=this.newObj(jsTemp),this.ckStyle=this.newObj(jsTemp),this.ckStyle["advertisement"]=this.objectAssign(configJs["style"]["advertisement"],this.ckStyle["advertisement"]),this.ckStyle=this.objectAssign(configJs["style"],this.ckStyle),this.loadStyle(null))):this.loadStyle(ckplayerPath+"style.json")}catch(e){}},loadStyle:function(a){var c,b=this;a?(c=this.newObj(this.ckConfig),this.ajax({url:a,success:function(a){a?(b.jsonStyle=b.newObj(a),b.ckStyle=b.newObj(a),b.ckStyle["advertisement"]=b.objectAssign(c["style"]["advertisement"],b.ckStyle["advertisement"]),b.ckStyle=b.objectAssign(c["style"],b.ckStyle),b.loadConfigHandler()):b.sysError(b.errorList[11],"Style")},error:function(a){b.sysError(b.errorList[12],a)}})):this.loadConfigHandler()},loadConfigHandler:function(){!this.supportVideo()&&""!=this.vars["flashplayer"]||this.vars["flashplayer"]&&this.uploadFlash()||!this.isMsie()?(this.html5Video=!1,this.getVideo()):this.videoString?this.analysedVideoUrl(this.videoString):this.eject(this.errorList[2])},analysedVideoUrl:function(a){var e,f,d=this;if(this.VA=[],"string"==this.varType(a))if("website:"!=a.substr(0,8)){switch(this.VA=[[a,"","",0]],e=this.getFileExt(a)){case".mp4":this.VA[0][1]="video/mp4";break;case".ogg":this.VA[0][1]="video/ogg";break;case".webm":this.VA[0][1]="video/webm"}this.getVideo()}else this.html5Video?(f={url:a.substr(8),success:function(b){b?d.analysedUrl(b):(d.eject(d.errorList[5]),this.VA=a,d.getVideo())},error:function(a){d.eject(d.errorList[12],a)}},this.ajax(f)):(this.VA=a,this.getVideo());else"array"==this.varType(a)?("array"==this.varType(a[0])&&(this.VA=a),this.getVideo()):"object"==this.varType(a)?this.isUndefined(a["type"])?this.eject(this.errorList[5]):(this.VA.push([a["file"],a["type"],"",0]),this.getVideo()):this.eject(this.errorList[4])},analysedUrl:function(a){this.vars=this.standardization(this.vars,a),this.isUndefined(a["video"])||(this.vars["video"]=a["video"]),this.analysedVideoUrl(this.vars["video"])},getHtml5Video:function(){var g,h,a=this.VA,b=[],c=this.isMobile(),d=document.createElement("video"),e=function(a){var b="";switch(a){case"video/mp4":b="avc1.4D401E, mp4a.40.2";break;case"video/ogg":b="theora, vorbis";break;case"video/webm":b="vp8.0, vorbis"}return b},f=function(a,b){if(!d.canPlayType)return this.html5Video=!1,void 0;var c=d.canPlayType(a+';codecs="'+b+'"');return""==c?!1:!0};if(this.vars["flashplayer"]||!this.isMsie())return this.html5Video=!1,void 0;for(g=0;g<a.length;g++)h=a[g],h&&(""!=h[1]&&!c&&f(h[1],e(h[1]))&&"rtmp"!=h[0].substr(0,4)&&b.push(h),".m3u8"!=this.getFileExt(h[0])&&"video/m3u8"!=this.vars["type"]&&"m3u8"!=this.vars["type"]&&"video/m3u8"!=h[1]&&"m3u8"!=h[1]||!this.vars["html5m3u8"]||c||(this.isM3u8=!0,b.push(h)));b.length>0?this.VA=b:c||(this.html5Video=!1)},getVideo:function(){var c,d,e,f,g,h,i,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,F,G,H,a=this,b=this.vars;if(!this.adAnalysisEnd&&(""!=b["adfront"]||""!=b["adpause"]||""!=b["adinsert"]||""!=b["adend"]||""!=b["advertisements"]))return this.adAnalysisEnd=!0,this.adAnalysis(),void 0;if(this.V)return this.changeVideo(),void 0;if(this.vars["cktrack"]&&this.loadTrack(),this.supportVideo()&&!this.vars["flashplayer"]&&this.getHtml5Video(),c="",d="",e="",f="",g="",h="",i="",b["video"],k=0,l=this.ckStyle["background"]["backgroundColor"].replace("0x","#"),this.CD=this.getByElement(b["container"]),volume=b["volume"],this.isUndefined(this.CD))return this.eject(this.errorList[6],b["container"]),!1;if(this.V=void 0,m=null,""!=b["h5container"]&&(m=this.getByElement(b["h5container"]),this.isUndefined(m)&&(m=null)),n=null,""!=b["playerID"]&&(n=this.getByElement("#"+b["playerID"]),this.isUndefined(n)&&(n=null)),null!=m&&null!=n?this.PD=m:(o="ckplayer-"+this.randomString(),p=document.createElement("div"),p.className=o,this.CD.innerHTML="",this.CD.appendChild(p),this.PD=p),this.css(this.CD,{backgroundColor:l,overflow:"hidden",position:"relative"}),this.css(this.PD,{backgroundColor:l,width:"100%",height:"100%",fontFamily:this.fontFamily}),this.html5Video){if(this.PD.onselectstart=this.PD.ondrag=function(){return!1},1==this.VA.length)this.videoTemp["src"]=decodeURIComponent(this.VA[0][0]),c=' src="'+this.videoTemp["src"]+'"';else{for(q=this.VA.slice(0),q=this.arrSort(q),k=0;k<q.length;k++)r="",s=q[k],s[1]&&(r=' type="'+s[1]+'"',(' type="video/m3u8"'==r||' type="m3u8"'==r)&&(r="")),d+='<source src="'+decodeURIComponent(s[0])+'"'+r+">";this.videoTemp["source"]=d}if(b["autoplay"]&&(g=' autoplay="autoplay"'),b["poster"]&&(e=' poster="'+b["poster"]+'"'),b["loop"]&&(f=' loop="loop"'),b["seek"]>0&&(this.needSeek=b["seek"]),null!=b["track"]&&null==b["cktrack"])for(t=b["track"],u="",v=!1,k=0;k<t.length;k++)w=t[k],w["default"]&&!v?(u=" default",v=!0):u="",h+='<track kind="'+w["kind"]+'" src="'+w["src"]+'" srclang="'+w["srclang"]+'" label="'+w["label"]+'"'+u+">";b["crossorigin"]&&(i=' crossorigin="'+b["crossorigin"]+'"'),x=this.ckConfig["config"]["autoLoad"],y="",x||(y=' preload="meta"'),z=this.randomString(),A="",B=b["mobileAutoFull"],C="",B||(C=' x-webkit-airplay="true" playsinline webkit-playsinline="true" x5-video-player-type="h5"'),this.isMobile()&&(A=' controls="controls"'),null!=n&&null!=m?(this.V=n,b["poster"]&&(this.V.poster=b["poster"])):(D="",D=this.isM3u8?'<video id="'+z+'" width="100%" height="100%"'+e+f+y+A+C+h+i+"></video>":'<video id="'+z+'"'+c+' width="100%" height="100%"'+g+e+f+y+A+C+h+i+">"+d+"</video>",this.PD.innerHTML=D,this.V=this.getByElement("#"+z));try{this.V.volume=volume,this.playbackRateArr&&this.vars["playbackrate"]>-1&&(this.vars["playbackrate"]<this.playbackRateArr.length&&(this.playbackRateDefault=this.vars["playbackrate"]),this.V.playbackRate=this.playbackRateArr[this.playbackRateDefault][0])}catch(E){}this.css(this.V,{backgroundColor:l,width:"100%",height:"100%"}),this.isM3u8&&(F=function(){a.embedHls(a.VA[0][0],b["autoplay"])},this.loadJs(ckplayerPath+"hls/hls.min.js",F)),this.css(this.V,"backgroundColor",l),this.ckConfig["config"]["videoDrawImage"]&&(G=document.createElement("div"),this.PD.appendChild(G),this.MD=G,this.css(this.MD,{backgroundColor:l,width:"100%",height:"100%",position:"absolute",display:"none",cursor:"pointer",left:"0px",top:"0px",zIndex:"10"}),H="ccanvas"+this.randomString(),this.MD.innerHTML=this.newCanvas(H,this.MD.offsetWidth,this.MD.offsetHeight),this.MDC=this.getByElement(H+"-canvas"),this.MDCX=this.MDC.getContext("2d")),this.playerType="html5video",this.addVEvent(),this.conBarShow&&(this.definition(),!this.vars["live"]&&this.playbackRateArr&&this.vars["playbackrate"]>-1&&this.playbackRate(),b["autoplay"]&&this.loadingStart(!0),this.subtitleSwitch()),this.playerLoad()}else this.embedSWF()},adAnalysis:function(){var e,a=this,b=this.vars,c=[],d=0;if(""!=b["advertisements"]&&"website:"==b["advertisements"].substr(0,8))e={url:b["advertisements"].substr(8),success:function(b){var e,f,g;if(b){e={},f=null;try{if(!(a.isUndefined(b["front"])&&a.isUndefined(b["pause"])&&a.isUndefined(b["end"])&&a.isUndefined(b["insert"])&&a.isUndefined(b["other"]))){if(f=a.arrayDel(b["front"]),a.isUndefined(f)||(e["front"]=f),f=a.arrayDel(b["pause"]),a.isUndefined(f)||(e["pause"]=f),f=a.arrayDel(b["insert"]),!a.isUndefined(f)&&(e["insert"]=f,!a.isUndefined(b["inserttime"]))){for(e["inserttime"]=a.arrayInt(b["inserttime"]),c=[],d=0;d<e["inserttime"].length;d++)c.push(!1);e["insertPlay"]=c}if(f=a.arrayDel(b["end"]),a.isUndefined(f)||(e["end"]=f),f=a.arrayDel(b["other"]),!a.isUndefined(f)){for(e["other"]=f,c=[],g=[],d=0;d<f.length;d++)c.push(!1),g.push(parseInt("0"+f[d]["startTime"]));e["othertime"]=g,e["otherPlay"]=c}}}catch(h){a.log(h)}a.advertisements=e}a.getVideo()},error:function(){}},this.ajax(e);else{if(this.adAnalysisOne("front","adfront","adfronttime","adfrontlink","adfronttype"),this.adAnalysisOne("pause","adpause","adpausetime","adpauselink","adpausetype"),this.adAnalysisOne("insert","adinsert","adinserttime","adinsertlink","adinserttype"),this.adAnalysisOne("end","adend","adendtime","adendlink","adendtype"),this.isUndefined(this.advertisements["insert"])||this.isUndefined(b["inserttime"])||(a.advertisements["inserttime"]=b["inserttime"]),!this.isUndefined(a.advertisements["inserttime"])){for(a.advertisements["inserttime"]=a.arrayInt(a.advertisements["inserttime"]),isInsert=[],d=0;d<a.advertisements["inserttime"].length;d++)isInsert.push(!1);a.advertisements["insertPlay"]=isInsert}a.getVideo()}},arrayDel:function(a){var b,c,d;if(this.isUndefined(a))return a;if(0==a.length)return null;for(b=[],c=0;c<a.length;c++)d=a[c]["type"],("mp4"==d||"mov"==d||this.isStrImage(d))&&b.push(a[c]);return b.length>0?b:null},adAnalysisOne:function(a,b,c,d,e){var g,h,i,j,k,l,m,n,o,p,q,f=this.vars;if(this.isUndefined(f[b])&&(f[b]=""),this.isUndefined(f[c])&&(f[c]=""),this.isUndefined(f[d])&&(f[d]=""),this.isUndefined(f[e])&&(f[e]=""),""!=f[b]&&(g=[],h=f[b].split(","),i=f[c].split(","),j=f[d].split(","),k=f[e].split(","),l=0,h.length>0)){if(m=j.length,n=i.length,""==f[d]&&(m=0,j=[]),""==f[c]&&(n=0,i=[]),m<h.length)for(l=m;l<h.length;l++)j.push("");if(n<h.length)for(l=n;l<h.length;l++)i.push("");if(o=k.length,""==f[e]&&(o=0,k=[]),o<h.length)for(l=o;l<h.length;l++)k.push(this.getFileExt(h[l]).replace(".",""));for(l=0;l<h.length;l++)p=k[l],("mp4"==p||"mov"==p||this.isStrImage(p))&&(q={file:h[l],type:p,time:parseInt(i[l])>0?parseInt(i[l]):this.ckStyle["advertisement"]["time"],link:j[l]},g.push(q));this.isUndefined(this.advertisements)&&(this.advertisements={}),g.length>0&&(this.advertisements[a]=g)}},playerLoad:function(){var a=this;this.isFirst&&(this.isFirst=!1,setTimeout(function(){a.loadedHandler()},1))},addVEvent:function(){var d,e,f,g,h,i,j,k,l,m,a=this,b=0,c=function(b){a.videoClickXy={x:b.clientX,y:b.clientY},a.videoClick()};this.addListenerInside("click",c),this.addListenerInside("click",c,this.MDC),this.timerErrorFun(),d=function(){a.sendJS("loadedmetadata"),"number"==a.varType(a.V.duration)&&a.V.duration>1&&(b=a.V.duration,b||a.vars["duration"]>0&&(b=a.vars["duration"]),a.vars["forceduration"]>0&&(b=a.vars["forceduration"]),a.sendJS("duration",b),a.formatInserttime(b),a.adPlayerPlay&&a.advertisementsTime(b+1),a.durationSendJS=!0),a.conBarShow&&(a.V.controls=null,a.videoCss()),a.judgeIsLive()},e=function(){a.playingHandler(),a.sendJS("play"),a.sendJS("paused",!1),!a.durationSendJS&&"number"==a.varType(a.V.duration)&&a.V.duration>0&&(b=a.V.duration,b||a.vars["duration"]>0&&(b=a.vars["duration"]),a.vars["forceduration"]>0&&(b=a.vars["forceduration"]),a.durationSendJS=!0,a.sendJS("duration",b),a.formatInserttime(b))},this.addListenerInside("playing",e),f=function(){a.pauseHandler(),a.sendJS("pause"),a.sendJS("paused",!0)},this.addListenerInside("pause",f),g=function(){a.endedHandler()},this.addListenerInside("ended",g),h=function(){a.loadingShow&&a.loadingStart(!1),a.time&&(a.adPlayerPlay?a.adPlayerTimeHandler(a.time):(a.sendJS("time",a.time),a.isUndefined(a.advertisements["insert"])||a.checkAdInsert(a.time),a.isUndefined(a.advertisements["other"])||a.checkAdOther(a.time),a.time<3&&a.adReset&&(a.adReset=!1,a.endedAdReset())))},this.addListenerInside("timeupdate",h),i=function(){a.loadingStart(!0)},this.addListenerInside("waiting",i),j=function(){a.sendJS("seek","start")},this.addListenerInside("seeking",j),k=function(){a.seekedHandler(),a.sendJS("seek","ended")},this.addListenerInside("seeked",k),l=function(){try{a.volumechangeHandler(),a.sendJS("volume",a.volume||a.V.volume)}catch(b){}},this.addListenerInside("volumechange",l),m=function(){var c=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;a.sendJS("full",c)},this.addListenerInside("fullscreenchange",m),this.addListenerInside("webkitfullscreenchange",m),this.addListenerInside("mozfullscreenchange",m),this.conBarShow&&this.interFace(),this.addListenerInside("loadedmetadata",d)},resetPlayer:function(){this.timeTextHandler(),this.conBarShow&&(this.timeProgress(0,1),this.changeLoad(0),this.initPlayPause(),this.definition(),this.deletePrompt(),this.deletePreview(),this.trackHide(),this.resetTrack(),this.trackElement=[],this.track=[])},interFace:function(){var a,d,e,f,g,j,k,l,m,n,o,p,q,r,s,t,u,v;this.conBarShow=!0,a=this,d=this.ckStyle,e=d["controlBar"],f=e["button"],g=d["advertisement"],e["definition"],j=this.formatTime(0,this.vars["duration"],this.ckLanguage["vod"]),this.CB={menu:null},k={controlBarBg:null,controlBar:null,pauseCenter:null,errorText:null,promptBg:null,prompt:null,promptTriangle:null,definitionP:null,playbackrateP:null,subtitlesP:null,loading:null,logo:null,adBackground:null,adElement:null,adLink:null,adPauseClose:null,adTime:null,adTimeText:null,adMute:null,adEscMute:null,adSkip:null,adSkipText:null,adSkipButton:null},l="";for(l in k)this.CB[l]=k[l],this.CB[l]=document.createElement("div"),this.PD.appendChild(this.CB[l]);this.CB["menu"]=document.createElement("div"),this.body.appendChild(this.CB["menu"]),this.vars["live"]&&(j=this.formatTime(0,0,this.ckLanguage["live"])),k={play:null,pause:null,mute:null,escMute:null,full:null,escFull:null,definition:null,playbackrate:null,subtitles:null};for(l in k)this.CB[l]=k[l],this.CB[l]=document.createElement("div"),this.isUndefined(this.ckLanguage["buttonOver"][l])||(this.CB[l].dataset.title=this.ckLanguage["buttonOver"][l]),this.CB["controlBar"].appendChild(this.CB[l]);k={timeProgressBg:null,timeBoBg:null,volume:null,timeText:null};for(l in k)this.CB[l]=k[l],this.CB[l]=document.createElement("div"),this.CB["controlBar"].appendChild(this.CB[l]);this.CB["timeText"].innerHTML=j,k={loadProgress:null,timeProgress:null};for(l in k)this.CB[l]=k[l],this.CB[l]=document.createElement("div"),this.CB["timeProgressBg"].appendChild(this.CB[l]);this.CB["timeButton"]=document.createElement("div"),this.CB["timeBoBg"].appendChild(this.CB["timeButton"]),k={volumeBg:null,volumeBO:null};for(l in k)this.CB[l]=k[l],this.CB[l]=document.createElement("div"),this.CB["volume"].appendChild(this.CB[l]);this.CB["volumeUp"]=document.createElement("div"),this.CB["volumeBg"].appendChild(this.CB["volumeUp"]),m=null,n="",n=d["loading"]["file"],this.isUndefined(d["loading"]["fileH5"])||(n=d["loading"]["fileH5"]),n&&(m=document.createElement("img"),m.src=n,m.border=0,this.CB["loading"].appendChild(m)),n=d["logo"]["file"],this.isUndefined(d["logo"]["fileH5"])||(n=d["logo"]["fileH5"]),n&&(m=document.createElement("img"),m.src=n,m.border=0,this.CB["logo"].appendChild(m)),this.ckConfig["config"]["buttonMode"]["player"]&&this.css(this.PD,{cursor:"pointer"}),this.controlBar(),o=null,p=d["prompt"],o=this.getEleCss(p,{overflow:"hidden",zIndex:900,display:"none"}),this.css(this.CB["promptBg"],o),this.css(this.CB["promptBg"],"padding","0px"),o["backgroundColor"]="",o["border"]="",o["borderRadius"]="",o["whiteSpace"]="nowrap",this.css(this.CB["prompt"],o),o={width:0,height:0,borderLeft:.5*p["triangleWidth"]+"px solid transparent",borderRight:.5*p["triangleWidth"]+"px solid transparent",borderTop:p["triangleHeight"]+"px solid "+p["triangleBackgroundColor"].replace("0x","#"),overflow:"hidden",opacity:p["triangleAlpha"],filter:"alpha(opacity:"+p["triangleAlpha"]+")",position:"absolute",left:"0px",top:"0px",zIndex:900,display:"none"},this.css(this.CB["promptTriangle"],o),this.elementCoordinate(),this.css([this.CB["pauseCenter"],this.CB["loading"],this.CB["errorText"]],"display","none"),this.carbarButton(),this.playerCustom(),this.carbarCustom(),this.timeProgressDefault(),this.videoCss(),this.initPlayPause(),this.vars["volume"]>0?this.css(this.CB["escMute"],"display","none"):this.css(this.CB["mute"],"display","none"),!this.ckConfig["config"]["mobileVolumeBarShow"]&&this.isMobile()&&this.css([this.CB["mute"],this.CB["escMute"],this.CB["volume"]],{display:"none"}),this.css(this.CB["escFull"],"display","none"),q={align:"top",vAlign:"left",width:"100%",height:"100%",offsetX:0,offsetY:0,zIndex:910,display:"none"},o=this.getEleCss(g["background"],q),this.css(this.CB["adBackground"],o),this.css(this.CB["adElement"],{position:"absolute",overflow:"hidden",top:"0px",zIndex:911,"float":"center",display:"none"}),this.advertisementStyle(),this.css([this.CB["adTime"],this.CB["adTimeText"],this.CB["adMute"],this.CB["adEscMute"],this.CB["adSkip"],this.CB["adSkipText"],this.CB["adSkipButton"],this.CB["adLink"],this.CB["adPauseClose"]],"display","none"),r=function(){a.timeProgressMouseOut()},this.addListenerInside("mouseout",r,this.CB["timeBoBg"]),s=function(){a.timeProgressDefault()},this.addListenerInside("mouseover",s,this.CB["controlBar"]),this.buttonEventFun(this.CB["play"],f["play"]),this.buttonEventFun(this.CB["pause"],f["pause"]),this.buttonEventFun(this.CB["mute"],f["mute"]),this.buttonEventFun(this.CB["escMute"],f["escMute"]),this.buttonEventFun(this.CB["full"],f["full"]),this.buttonEventFun(this.CB["escFull"],f["escFull"]),this.buttonEventFun(this.CB["adMute"],g["muteButton"]),this.buttonEventFun(this.CB["adEscMute"],g["escMuteButton"]),this.buttonEventFun(this.CB["adSkipButton"],g["skipAdButton"]),this.buttonEventFun(this.CB["adLink"],g["adLinkButton"]),this.buttonEventFun(this.CB["adPauseClose"],g["closeButton"]),this.buttonEventFun(this.CB["pauseCenter"],d["centerPlay"]),this.buttonEventFun(this.CB["volumeBO"],e["volumeSchedule"]["button"]),this.buttonEventFun(this.CB["timeButton"],e["timeSchedule"]["button"]),this.addButtonEvent(),this.controlBarHide(),this.newMenu(),this.keypress(),this.changeVolume(this.vars["volume"]),setTimeout(function(){a.elementCoordinate()},100),this.checkBarWidth(),t=function(){a.log("window.resize"),a.playerResize()},u=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,v=new u(function(){a.log("video.resize");var b=parseInt(a.css(a.CD,"width")),c=parseInt(a.css(a.CD,"height"));(b!=a.cdWH["w"]||c!=a.cdWH["h"])&&(a.cdWH={w:b,h:c},a.changeSize(b,c))}),v.observe(this.CD,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0}),this.addListenerInside("resize",t,window)},timeProgressDefault:function(){var a=this.ckStyle["controlBar"]["timeSchedule"],b=this.newObj(a["default"]),c=b["loadProgressImg"],d=b["playProgressImg"],e=null;this.css(this.CB["timeBoBg"],"display","block"),e=this.getEleCss(this.newObj(b),{overflow:"hidden",zIndex:2},this.CB["controlBarBg"]),this.css(this.CB["timeProgressBg"],e),b={align:"left",vAlign:"top",width:1,height:b["height"],backgroundImg:c},this.CB["loadProgress"].offsetWidth>1&&(b["width"]=this.CB["loadProgress"].offsetWidth),e=this.getEleCss(this.newObj(b),{overflow:"hidden",zIndex:1},this.CB["timeProgressBg"]),this.css(this.CB["loadProgress"],e),b["width"]=0,this.CB["timeProgress"].offsetWidth>1&&parseInt(this.css(this.CB["timeButton"],"left"))>0&&(b["width"]=this.CB["timeProgress"].offsetWidth),b["backgroundImg"]=d,e=this.getEleCss(b,{overflow:"hidden",zIndex:2}),this.css(this.CB["timeProgress"],e),e=this.getEleCss(a["buttonContainer"],{position:"absolute",overflow:"hidden",zIndex:3},this.CB["controlBar"]),this.ckConfig["config"]["buttonMode"]["timeSchedule"]&&(e["cursor"]="pointer"),this.css(this.CB["timeBoBg"],e),e=this.getEleCss(a["button"],{cursor:"pointer",overflow:"hidden",zIndex:4},this.CB["timeBoBg"]),this.css(this.CB["timeButton"],e)},timeProgressMouseOut:function(){var a=this.ckStyle["controlBar"]["timeSchedule"],b=this.newObj(a["mouseOut"]),c=b["loadProgressImg"],d=b["playProgressImg"],e=null;this.css(this.CB["timeBoBg"],"display","block"),e=this.getEleCss(this.newObj(b),{overflow:"hidden",zIndex:2},this.CB["controlBarBg"]),this.css(this.CB["timeProgressBg"],e),b={align:"left",vAlign:"top",width:1,height:b["height"],backgroundImg:c},this.CB["loadProgress"].offsetWidth>1&&(b["width"]=this.CB["loadProgress"].offsetWidth),e=this.getEleCss(this.newObj(b),{overflow:"hidden",zIndex:1},this.CB["timeProgressBg"]),this.css(this.CB["loadProgress"],e),b["width"]=1,this.CB["timeProgress"].offsetWidth>1&&parseInt(this.css(this.CB["timeButton"],"left"))>0&&(b["width"]=this.CB["timeProgress"].offsetWidth,b["backgroundImg"]=d),e=this.getEleCss(b,{overflow:"hidden",zIndex:2}),this.css(this.CB["timeProgress"],e),this.css(this.CB["timeBoBg"],"display","none")},buttonEventFun:function(a,b){var f,c=this,d=function(){c.css(a,{backgroundImage:"url("+b["mouseOver"]+")"}),c.promptShow(a)},e=function(){c.css(a,{backgroundImage:"url("+b["mouseOut"]+")"}),c.promptShow(!1)};e(),this.addListenerInside("mouseover",d,a),this.addListenerInside("mouseout",e,a),this.isUndefined(b["clickEvent"])||(f=function(){c.runFunction(b["clickEvent"])},this.addListenerInside("click",f,a))},formatNumPx:function(a,b){return a?a.toString().indexOf("%")>-1?this.isUndefined(b)?a:.01*parseInt(a)*b+"px":a+"px":0},formatZToNum:function(a,b){return a?a.toString().indexOf("%")>-1?this.isUndefined(b)?a:.01*parseInt(a)*b:a:0},newObj:function(a){var c,d;if(this.isUndefined(a))return a;if(c={},"object"!=this.varType(a))return a;for(d in a)c[d]=this.isUndefined(a[d])?a[d]:"object"==this.varType(a[d])?this.newObj(a[d]):a[d];return c},loadImgBg:function(a,b){this.css(this.getByElement(a),{backgroundImage:"url("+b+")"})},getEleCss:function(a,b,c){var g,h,i,j,k,l,m,n,o,d=null,e=this.PD.offsetWidth,f=this.PD.offsetHeight;if(c&&(e=c.offsetWidth,f=c.offsetHeight),this.isUndefined(a))return null;if(d=this.newObj(a),g={},this.isUndefined(d["width"])||(g["width"]=this.formatZToNum(d["width"],e)+"px"),this.isUndefined(d["height"])||(g["height"]=this.formatZToNum(d["height"],f)+"px"),this.isUndefined(d["background"])||(h=d["background"],this.isUndefined(h["backgroundColor"])||(g["backgroundColor"]=h["backgroundColor"].replace("0x","#")),this.isUndefined(h["backgroundImg"])||(g["backgroundImage"]="url("+h["backgroundImg"]+")"),this.isUndefined(h["alpha"])||(g["filter"]="alpha(opacity:"+h["alpha"]+")",g["opacity"]=h["alpha"])),this.isUndefined(d["backgroundColor"])||(g["backgroundColor"]=d["backgroundColor"].replace("0x","#")),this.isUndefined(d["backgroundImg"])||(g["backgroundImage"]="url("+d["backgroundImg"]+")"),this.isUndefined(d["color"])||(g["color"]=d["color"].replace("0x","#")),this.isUndefined(d["font"])||(g["fontFamily"]=d["font"]),this.isUndefined(d["size"])||(g["fontSize"]=d["size"]+"px"),this.isUndefined(d["alpha"])||(g["filter"]="alpha(opacity:"+d["alpha"]+")",g["opacity"]=d["alpha"]),this.isUndefined(d["lineHeight"])||(g["lineHeight"]=d["lineHeight"]+"px"),this.isUndefined(d["textAlign"])||(g["textAlign"]=d["textAlign"]),this.isUndefined(d["borderRadius"])||(g["borderRadius"]=d["borderRadius"]+"px"),this.isUndefined(d["radius"])||(g["borderRadius"]=d["radius"]+"px"),this.isUndefined(d["padding"])||(g["padding"]=d["padding"]+"px"),this.isUndefined(d["paddingLeft"])||(g["paddingLeft"]=d["paddingLeft"]+"px"),this.isUndefined(d["paddingRight"])||(g["paddingRight"]=d["paddingRight"]+"px"),this.isUndefined(d["paddingTop"])||(g["paddingTop"]=d["paddingTop"]+"px"),this.isUndefined(d["paddingBottom"])||(g["paddingBottom"]=d["paddingBottom"]+"px"),this.isUndefined(d["margin"])||(g["margin"]=d["margin"]+"px"),this.isUndefined(d["marginLeft"])||(g["marginLeft"]=d["marginLeft"]+"px"),this.isUndefined(d["marginRight"])||(g["marginRight"]=d["marginRight"]+"px"),this.isUndefined(d["marginTop"])||(g["marginTop"]=d["marginTop"]+"px"),this.isUndefined(d["marginBottom"])||(g["marginBottom"]=d["marginBottom"]+"px"),this.isUndefined(d["border"])||this.isUndefined(d["borderColor"])||(g["border"]=d["border"]+"px solid "+d["borderColor"].replace("0x","#")),this.isUndefined(d["borderLeft"])||this.isUndefined(d["borderLeftColor"])||(g["borderLeft"]=d["borderLeft"]+"px solid "+d["borderLeftColor"].replace("0x","#")),this.isUndefined(d["borderRight"])||this.isUndefined(d["borderRightColor"])||(g["borderRight"]=d["borderRight"]+"px solid "+d["borderRightColor"].replace("0x","#")),this.isUndefined(d["borderTop"])||this.isUndefined(d["borderTopColor"])||(g["borderTop"]=d["borderTop"]+"px solid "+d["borderTopColor"].replace("0x","#")),this.isUndefined(d["borderBottom"])||this.isUndefined(d["borderBottomColor"])||(g["borderBottom"]=d["borderBottom"]+"px solid "+d["borderBottomColor"].replace("0x","#")),!this.isUndefined(b))for(i in b)g[i]=b[i];if(g["position"]="absolute",j=-1e4,k=-1e4,l=-1e4,m=-1e4,n=0,o=0,this.isUndefined(d["offsetX"])||(n=d["offsetX"]),this.isUndefined(d["marginX"])||(n=d["marginX"]),this.isUndefined(d["offsetY"])||(o=d["offsetY"]),this.isUndefined(d["marginY"])||(o=d["marginY"]),n=this.formatZToNum(n,e),o=this.formatZToNum(o,f),!this.isUndefined(d["align"]))switch(j=0,d["align"]){case"left":j=n;break;case"center":j=.5*e+n;break;case"right":j=e+n;break;case"right2":j=-1e4,l=n}if(!this.isUndefined(d["vAlign"]))switch(k=0,d["vAlign"]){case"top":k=o;
break;case"middle":k=.5*f+o;break;case"bottom":k=f+o;break;case"bottom2":k=-1e4,m=o}return j>-1e4&&(g["left"]=j+"px"),l>-1e4&&(g["right"]=l+"px"),k>-1e4&&(g["top"]=k+"px"),m>-1e4&&(g["bottom"]=m+"px"),g},newCanvas:function(a,b,c){return'<canvas class="'+a+'-canvas" width="'+b+'" height="'+c+'"></canvas>'},addButtonEvent:function(){var d,e,f,g,h,i,a=this,b=function(){a.promptShow(!1)},c=function(){a.promptShow(a.CB["definition"])};this.addListenerInside("mouseover",c,this.CB["definition"]),this.addListenerInside("mouseout",b,this.CB["definition"]),d=function(){a.promptShow(a.CB["playbackrate"])},this.addListenerInside("mouseover",d,this.CB["playbackrate"]),this.addListenerInside("mouseout",b,this.CB["playbackrate"]),e=function(){a.promptShow(a.CB["subtitles"])},this.addListenerInside("mouseover",e,this.CB["subtitles"]),this.addListenerInside("mouseout",b,this.CB["subtitles"]),f=function(b){var c=a.getCoor(a.CB["volumeBO"]),d={title:a.ckLanguage["volumeSliderOver"].replace("[$volume]",b),x:c["x"]+.5*a.CB["volumeBO"].offsetWidth,y:c["y"]};a.promptShow(!1,d)},g={slider:this.CB["volumeBO"],follow:this.CB["volumeUp"],refer:this.CB["volumeBg"],grossValue:"volume",pd:!0,startFun:function(){},monitorFun:function(b){a.changeVolume(.01*b,!1,!1),f(b)},endFun:function(){},overFun:function(a){f(a)}},this.slider(g),h={refer:this.CB["volumeBg"],grossValue:"volume",fun:function(b){a.changeVolume(.01*b,!0,!0)}},this.progressClick(h),this.timeButtonMouseDown(),i=function(b){var c=a.getCoor(a.CB["volumeBg"]),d=a.client(b)["x"],e=parseInt(100*(d-c["x"])/a.CB["volumeBg"].offsetWidth),f={title:a.ckLanguage["volumeSliderOver"].replace("[$volume]",e),x:d,y:c["y"]};a.promptShow(!1,f)},this.addListenerInside("mousemove",i,this.CB["volumeBg"]),this.addListenerInside("mouseout",b,this.CB["volumeBg"]),this.addListenerInside("mouseout",b,this.CB["volumeBO"]),this.addDefListener(),this.addPlaybackrate(),this.addSubtitles()},videoClick:function(){var a=this,b=function(){null!=a.timerClick&&(a.timerClick.runing&&a.timerClick.stop(),a.timerClick=null)},c=function(){if(b(),a.isClick=!1,a.sendJS("videoClick",a.videoClickXy),a.adPlayerPlay){var c=a.getNowAdvertisements();try{""!=c["link"]&&window.open(c["link"]),a.ajaxSuccessNull(c["clickMonitor"])}catch(d){}}else a.ckConfig["config"]["click"]&&a.playOrPause()};b(),this.isClick?(this.isClick=!1,a.sendJS("videoDoubleClick",a.videoClickXy),a.ckConfig["config"]["doubleClick"]&&(this.full?a.quitFullScreen():a.fullScreen())):(this.isClick=!0,this.timerClick=new this.timer(300,c,1))},timeButtonMouseDown:function(){var a=this,b=function(b){var c,d;isNaN(b)&&(b=0),c=a.getCoor(a.CB["timeButton"]),d={title:a.formatTime(b,0,a.ckLanguage["timeSliderOver"]),x:c["x"]-a.pdCoor["x"]+.5*a.CB["timeButton"].offsetWidth,y:c["y"]-a.pdCoor["y"]},a.promptShow(!1,d)},c={slider:this.CB["timeButton"],follow:this.CB["timeProgress"],refer:this.CB["timeBoBg"],grossValue:"time",pd:!1,startFun:function(){a.isTimeButtonMove=!1},monitorFun:function(){},endFun:function(b){a.V&&a.V.duration>0&&(a.needSeek=0,a.videoSeek(parseInt(b)))},overFun:function(a){b(a)}},d={refer:this.CB["timeBoBg"],grossValue:"time",fun:function(b){a.V&&a.V.duration>0&&(a.needSeek=0,a.videoSeek(parseInt(b)))}},e=function(b){var f,g,h,c=a.getCoor(a.CB["timeBoBg"]),d=a.client(b)["x"],e=a.V.duration;(isNaN(e)||parseInt(e)<.2)&&(e=a.vars["duration"]),a.vars["forceduration"]>0&&(e=a.vars["forceduration"]),f=parseInt((d-c["x"])*e/a.CB["timeBoBg"].offsetWidth),g={title:a.formatTime(f,0,a.ckLanguage["timeSliderOver"]),x:d,y:c["y"]},a.promptShow(!1,g),h=!1,a.isUndefined(a.CB["definitionP"])||"block"!=a.css(a.CB["definitionP"],"display")&&(h=!0),null!=a.vars["preview"]&&h&&(g["time"]=f,a.preview(g))},f=function(){a.promptShow(!1),null!=a.previewDiv&&a.css([a.previewDiv,a.previewTop],"display","none")};this.vars["live"]?(this.isTimeButtonDown=!1,c["removeListenerInside"]=!0,d["removeListenerInside"]=!0):(this.isTimeButtonDown=!0,this.addListenerInside("mousemove",e,this.CB["timeBoBg"]),this.addListenerInside("mouseout",f,this.CB["timeBoBg"])),this.slider(c),this.progressClick(d)},progressClick:function(a){var b=this,c=function(c){var g,h,i,d=b.client(c)["x"]-b.getCoor(a["refer"])["x"],e=a["refer"].offsetWidth,f=0;if("volume"==a["grossValue"]?f=100:b.V&&(f=b.V.duration,(isNaN(f)||parseInt(f)<.2)&&(f=b.vars["duration"]),b.vars["forceduration"]>0&&(f=b.vars["forceduration"])),g=parseInt(d*f/e),a["fun"]){if("time"===a["grossValue"]){if(h=b.getCoor(b.CB["timeButton"]),sliderLeft=h["x"],!b.checkSlideLeft(d,sliderLeft,e))return;i=.5*b.CB["timeButton"].offsetWidth,b.css(b.CB["timeButton"],"left",d-i+"px"),b.css(b.CB["timeProgress"],"width",d+"px")}a["fun"](g)}};this.isUndefined(a["removeListenerInside"])?this.addListenerInside("click",c,a["refer"]):this.removeListenerInside("click",c,a["refer"])},slider:function(a){var b=this,c=0,d=0,e=0,f=0,h=function(){var c=parseInt(b.css(a["slider"],"left")),d=a["refer"].offsetWidth-a["slider"].offsetWidth,e=0;return(b.isUndefined(c)||isNaN(c))&&(c=0),"volume"==a["grossValue"]?e=100:b.V&&(e=b.V.duration),parseInt(c*e/d)},i=function(g){var i,l;b.addListenerInside("mousemove",j,document),b.addListenerInside("mouseup",k,document),i=b.getCoor(a["refer"]),l=b.getCoor(a["slider"]),c=b.client(g)["x"],f=i["x"],e=l["x"],d=c-e,a["startFun"]&&a["startFun"](h())},j=function(g){var i,j;c=b.client(g)["x"],i=c-d-f,0>i&&(i=0),i>a["refer"].offsetWidth-a["slider"].offsetWidth&&(i=a["refer"].offsetWidth-a["slider"].offsetWidth),(a["slider"]!==b.CB["timeButton"]||b.checkSlideLeft(i,e,a["refer"].offsetWidth))&&(b.css(a["slider"],"left",i+"px"),b.css(a["follow"],"width",i+.5*a["slider"].offsetWidth+"px"),j=h(),a["monitorFun"]&&a["monitorFun"](j))},k=function(){b.removeListenerInside("mousemove",j,document),b.removeListenerInside("mouseup",k,document),a["endFun"]&&a["endFun"](h())},l=function(){a["overFun"]&&a["overFun"](h())};this.isUndefined(a["removeListenerInside"])?(this.addListenerInside("mousedown",i,a["slider"]),this.addListenerInside("mouseover",l,a["slider"])):(this.removeListenerInside("mousedown",i,a["slider"]),this.removeListenerInside("mouseover",l,a["slider"]))},checkSlideLeft:function(a,b,c){var e,d=this.ckConfig["config"]["timeScheduleAdjust"];switch(d){case 0:return!1;case 2:if(b>a)return!1;break;case 3:if(a>b)return!1;break;case 4:if(this.timeSliderLeftTemp||(this.timeSliderLeftTemp=b/c),a<this.timeSliderLeftTemp*c)return!1;break;case 5:if(this.timeSliderLeftTemp?(e=b/c,e>this.timeSliderLeftTemp&&(this.timeSliderLeftTemp=e)):this.timeSliderLeftTemp=b/c,a>this.timeSliderLeftTemp*c)return!1;break;default:return!0}return!0},loadingStart:function(a){var b=this;this.isUndefined(a)&&(a=!0),this.conBarShow&&(this.css(b.CB["loading"],"display","none"),this.loadingShow=!1),a?this.conBarShow&&(this.css(b.CB["loading"],"display","block"),this.loadingShow=!0):b.sendJS("buffer",100)},promptShow:function(a,b){var c,d,e,f,g,h,i,j;this.conBarShow&&(c={},d="",this.isUndefined(a)||(d=this.getDataset(a,"title"),this.isUndefined(d)&&(a=null)),a||b?(this.isUndefined(b)?(e=this.getCoor(a),c={title:d,x:e["x"]+.5*a.offsetWidth,y:e["y"]}):c=b,this.CB["prompt"].innerHTML=c["title"],this.css(this.CB["prompt"],"display","block"),f=this.ckStyle["prompt"],g=this.CB["prompt"].offsetWidth,h=this.CB["prompt"].offsetHeight,this.css(this.CB["promptBg"],{width:g+"px",height:h+"px"}),i=c["x"]-.5*g,j=c["y"]-this.CB["prompt"].offsetHeight-f["marginBottom"]-f["triangleHeight"],0>i&&(i=0),i>this.PD.offsetWidth-g&&(i=this.PD.offsetWidth-g),this.css([this.CB["promptBg"],this.CB["prompt"]],{display:"block",left:i+"px",top:j+"px"}),this.css(this.CB["promptTriangle"],{display:"block",left:i+.5*(g-f["triangleWidth"])+parseInt(f["triangleDeviationX"])+"px",top:j+h+"px"})):this.css([this.CB["promptBg"],this.CB["prompt"],this.CB["promptTriangle"]],{display:"none"}))},timerErrorFun:function(){var b,c,d,e,a=this;this.errorSend=!1,b=function(){null!=a.timerError&&(a.timerError.runing&&a.timerError.stop(),a.timerError=null)},c=function(){b(),a.error=!0,a.errorUrl=a.getVideoUrl(),a.errorSend||(a.errorSend=!0,a.sendJS("error")),a.conBarShow&&(a.CB["errorText"].innerHTML=a.ckLanguage["error"]["streamNotFound"],a.css(a.CB["errorText"],"display","block"),a.css([a.CB["pauseCenter"],a.CB["loading"]],"display","none")),a.V.removeAttribute("poster"),a.resetPlayer()},d=function(b){setTimeout(function(){isNaN(a.V.duration)&&c(b)},500)},this.errorAdd||(this.errorAdd=!0,this.addListenerInside("error",d)),b(),e=function(){a.V&&3==parseInt(a.V.networkState)&&c()},this.timerError=new this.timer(this.ckConfig["config"]["errorTime"],e)},judgeFullScreen:function(){var b,a=this;null!=this.timerFull&&(this.timerFull.runing&&this.timerFull.stop(),this.timerFull=null),b=function(){a.isFullScreen()},this.timerFull=new this.timer(20,b)},isFullScreen:function(){if(this.conBarShow){var a=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement;a&&!this.full&&(this.full=!0,this.sendJS("full",!0),this.elementCoordinate(),this.carbarButton(),this.customCoor(),this.css(this.CB["full"],"display","none"),this.css(this.CB["escFull"],"display","block"),0==this.vars["live"]&&this.timeUpdateHandler(),this.PD.appendChild(this.CB["menu"])),!a&&this.full&&(this.full=!1,this.sendJS("full",!1),this.elementCoordinate(),this.carbarButton(),this.customCoor(),this.css(this.CB["full"],"display","block"),this.css(this.CB["escFull"],"display","none"),null!=this.timerFull&&(this.timerFull.runing&&this.timerFull.stop(),this.timerFull=null),0==this.vars["live"]&&this.timeUpdateHandler(),this.body.appendChild(this.CB["menu"]))}},newMenu:function(){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,a=this,b=0;if(this.css(this.CB["menu"],{backgroundColor:"#FFFFFF",padding:"5px",position:"absolute",left:"10px",top:"20px",display:"none",zIndex:"999",color:"#A1A9BE",boxShadow:"2px 2px 3px #AAAAAA"}),c=this.contextMenu,d=this.ckConfig["menu"],d["name"]&&(c[0]=d["link"]?[d["name"],"link",d["link"]]:[d["name"],"default"]),d["version"]&&(c[1]=[d["version"],"default","line"]),d["more"]&&"array"==this.varType(d["more"])&&d["more"].length>0)for(e=d["more"],b=0;b<e.length;b++)f=e[b],g=[],f["name"]&&g.push(f["name"]),f["clickEvent"]&&"none"!=f["clickEvent"]&&(h=this.clickEvent(f["clickEvent"]),g.push(h["type"]),h["fun"]&&g.push(h["fun"]),h["link"]&&g.push(h["link"]),h["target"]&&g.push(' target="'+h["target"]+'"')),f["separatorBefore"]&&g.push("line"),c.push(g);for(i="",b=0;b<c.length;b++)switch(j=c[b],j[1]){case"default":i+="<p>"+j[0]+"</p>";break;case"link":j[3]&&(j[3]='target="'+j[3]+'"'),i+='<p><a href="'+j[2]+'"'+j[3]+">"+j[0]+"</a></p>";break;case"javaScript":i+='<p><a href="javascript:'+j[2]+'">'+j[0]+"</a></p>";break;case"actionScript":i+='<p><a href="javascript:'+this.vars["variable"]+j[2].replace("thisTemp","")+'">'+j[0]+"</a></p>"}for(this.CB["menu"].innerHTML=i,k=this.CB["menu"].childNodes,b=0;b<k.length;b++)for(this.css(k[b],{height:"30px",lineHeight:"30px",margin:"0px",fontFamily:this.fontFamily,fontSize:"12px",paddingLeft:"10px",paddingRight:"30px"}),"line"==c[b][c[b].length-1]&&this.css(k[b],"borderBottom","1px solid #e9e9e9"),l=k[b].childNodes,m=0;m<l.length;m++)"a"==l[m].localName&&this.css(l[m],{color:"#000000",textDecoration:"none"});this.PD.oncontextmenu=function(b){var e,f,c=b||window.event,d=a.client(b);return 2==c.button?(c.returnvalue=!1,e=d["x"]+a.pdCoor["x"]-2,f=d["y"]+a.pdCoor["y"]-2,a.css(a.CB["menu"],{display:"none",left:e+"px",top:f+"px"}),!1):!0},n=function(){o&&(window.clearTimeout(o),o=null)},o=null,p=function(){n(),o=setTimeout(function(){a.css(a.CB["menu"],"display","none")},500)},this.addListenerInside("mouseout",p,a.CB["menu"]),q=function(){n()},this.addListenerInside("mouseover",q,a.CB["menu"])},controlBarHide:function(a){var j,b=this,c={x:0,y:0},d={x:0,y:0},e=!0,f=!1,h=function(a){if(a&&!e&&b.controlBarIsShow)e=!0,b.sendJS("controlBar",!0),b.css(b.CB["controlBarBg"],"display","block"),b.css(b.CB["controlBar"],"display","block"),b.timeProgressDefault(),b.changeVolume(b.volume),b.changeLoad(),b.timerBuffer||b.bufferEdHandler();else if(e){e=!1;var c=b.getMetaDate()["paused"];f&&(c=!1),c||(b.sendJS("controlBar",!1),b.css(b.CB["controlBarBg"],"display","none"),b.css(b.CB["controlBar"],"display","none"),b.promptShow(!1))}b.videoCss()},i=function(){if(c["x"]==d["x"]&&c["y"]==d["y"]){var f=parseInt(b.CD.offsetHeight);(c["y"]<f-50||c["y"]>f-2)&&e&&!b.getMetaDate()["paused"]&&h(!1)}else e||h(!0);d={x:c["x"],y:c["y"]}};this.timerCBar=new this.timer(2e3,i),j=function(a){var d=b.client(a);c["x"]=d["x"],c["y"]=d["y"],e||h(!0),b.sendJS("mouse",c)},this.addListenerInside("mousemove",j,b.CD),this.addListenerInside("ended",j),this.addListenerInside("resize",j,window),a===!0&&(e=!0,f=!0,h(!1)),a===!1&&(e=!1,f=!0,h(!0))},keypress:function(){var a=this,b=function(b){var c=b.keyCode||b.which;if(!a.adPlayerPlay)switch(c){case 32:a.playOrPause();break;case 37:a.fastBack();break;case 39:a.fastNext();break;case 38:now=a.volume+a.ckConfig["config"]["volumeJump"],a.changeVolume(now>1?1:now);break;case 40:now=a.volume-a.ckConfig["config"]["volumeJump"],a.changeVolume(0>now?0:now)}};this.addListenerInside("keydown",b,window||document)},playbackRate:function(){var a,b,c,d,e,g,h,i,j,k,l,m,n,o,p;if(this.conBarShow&&this.ckConfig["config"]["playbackRate"])if(a=this.ckStyle["controlBar"]["playbackrate"],b={overflow:"hidden",display:"none",zIndex:995},c={overflow:"hidden",align:"top",vAlign:"left",offsetX:0,offsetY:0,zIndex:1},d=this,e=this.playbackRateArr,g="",h=0,i=0,g=e[this.playbackRateDefault][1],i=this.playbackRateDefault,this.removeChildAll(this.CB["playbackrateP"]),e.length>1){for(this.CB["playbackratePB"]=document.createElement("div"),this.CB["playbackratePC"]=document.createElement("div"),this.CB["playbackrateP"].appendChild(this.CB["playbackratePB"]),this.CB["playbackrateP"].appendChild(this.CB["playbackratePC"]),j=this.newObj(a["background"]),j["backgroundColor"]="",n=this.getEleCss(j,c),this.css(this.CB["playbackratePC"],n),j["padding"]=0,j["paddingLeft"]=0,j["paddingTop"]=0,j["paddingRight"]=0,j["paddingBottom"]=0,n=this.getEleCss(this.objectAssign(j,a["backgroundCoorH5"]),b),this.css(this.CB["playbackrateP"],n),j=this.newObj(a["background"]),j["alpha"]=j["backgroundAlpha"],j["padding"]=0,j["paddingLeft"]=0,j["paddingTop"]=0,j["paddingRight"]=0,j["paddingBottom"]=0,n=this.getEleCss(j,c),this.css(this.CB["playbackratePB"],n),h=0;h<e.length;h++)k=document.createElement("div"),k.dataset.title=e[h][1],i!=h?this.textButton(k,a["button"],null,this.CB["playbackrateP"],e[h][1],""):this.textButton(k,a["buttonHighlight"],null,this.CB["playbackrateP"],e[h][1],""),this.css(k,"position","static"),this.CB["playbackratePC"].appendChild(k),h<e.length-1&&(l=a["separate"],l["borderTop"]=l["border"],l["borderTopColor"]=l["color"],m=document.createElement("div"),this.CB["playbackratePC"].appendChild(m),n=this.getEleCss(l,{width:"100%"}),n["position"]="static",this.css(m,n)),o=function(){var a=d.getDataset(this,"title");g!=a&&(d.css(d.CB["playbackrateP"],"display","none"),d.newPlaybackrate(a))},this.addListenerInside("click",o,k);this.CB["playbackrateTriangle"]=document.createElement("div"),this.CB["playbackrateP"].appendChild(this.CB["playbackrateTriangle"]),p=a["background"],n={width:0,height:0,borderLeft:.5*p["triangleWidth"]+"px solid transparent",borderRight:.5*p["triangleWidth"]+"px solid transparent",borderTop:p["triangleHeight"]+"px solid "+p["triangleBackgroundColor"].replace("0x","#"),overflow:"hidden",opacity:p["triangleAlpha"],filter:"alpha(opacity:"+p["triangleAlpha"]+")",position:"absolute",left:"0px",top:"0px",zIndex:2},this.css(this.CB["playbackrateTriangle"],n),this.CB["playbackrateButtonText"].innerHTML=g}else this.CB["playbackrateButtonText"].innerHTML=this.ckLanguage["playbackrate"]},addPlaybackrate:function(){var d,e,a=this,b=null,c=function(){var c,d,e,g,h,i;"block"==a.css(a.CB["playbackrateP"],"display")||a.isUndefined(a.CB["playbackratePC"])?a.css(a.CB["playbackrateP"],"display","none"):(a.css(a.CB["playbackrateP"],"display","block"),c=a.ckStyle["controlBar"]["playbackrate"]["background"],a.css(a.CB["playbackratePB"],{width:a.CB["playbackratePC"].offsetWidth+"px",height:a.CB["playbackratePC"].offsetHeight+"px"}),a.css(a.CB["playbackrateP"],{width:a.CB["playbackratePC"].offsetWidth+c["triangleDeviationX"]+c["triangleWidth"]+"px",height:a.CB["playbackratePC"].offsetHeight+c["triangleDeviationY"]+c["triangleHeight"]+"px"}),a.promptShow(!1),d=a.CB["playbackratePB"],e=d.offsetWidth,d.offsetHeight,g=.5*(e-c["triangleWidth"])+c["triangleDeviationX"],h=d.offsetHeight+c["triangleDeviationY"],i={left:g+"px",top:h+"px"},a.css(a.CB["playbackrateTriangle"],i))};this.addListenerInside("click",c,this.CB["playbackrate"]),d=function(){b&&(window.clearTimeout(b),b=null),b=setTimeout(function(){a.css(a.CB["playbackrateP"],"display","none")},500)},this.addListenerInside("mouseout",d,a.CB["playbackrateP"]),e=function(){b&&(a.buttonHide=!1,window.clearTimeout(b),b=null)},this.addListenerInside("mouseover",e,a.CB["playbackrateP"])},newPlaybackrate:function(a){var e,b=this.playbackRateArr,d=0;for(d=0;d<b.length;d++)e=b[d],e[1]==a&&(this.playbackRateDefault=d,this.V.playbackRate=e[0],this.conBarShow&&(this.CB["playbackrateButtonText"].innerHTML=e[1],this.playbackRate()),this.sendJS("playbackRate",e),this.playbackRateTemp=e[0])},subtitleSwitch:function(){var a,b,c,d,e,g,h,i,j,k,l,m,n,o,p;if(this.conBarShow&&this.ckConfig["config"]["subtitle"]&&(a=this,b=this.vars["cktrack"],"array"==this.varType(b)&&""!=b[0][1])){for(c=this.ckStyle["controlBar"]["subtitle"],d={overflow:"hidden",display:"none",zIndex:995},e={overflow:"hidden",align:"top",vAlign:"left",offsetX:0,offsetY:0,zIndex:1},g="",h=0,i=0,-1==this.subtitlesTemp&&b.length>0&&(this.subtitlesTemp=b.length-1),h=0;h<b.length;h++)this.subtitlesTemp==h&&(g=b[h][1],i=h);if(g||(g=b[0][1]),this.removeChildAll(this.CB["subtitlesP"]),b.length>1){for(this.CB["subtitlesPB"]=document.createElement("div"),this.CB["subtitlesPC"]=document.createElement("div"),this.CB["subtitlesP"].appendChild(this.CB["subtitlesPB"]),this.CB["subtitlesP"].appendChild(this.CB["subtitlesPC"]),j=this.newObj(c["background"]),j["backgroundColor"]="",n=this.getEleCss(j,e),this.css(this.CB["subtitlesPC"],n),j["padding"]=0,j["paddingLeft"]=0,j["paddingTop"]=0,j["paddingRight"]=0,j["paddingBottom"]=0,n=this.getEleCss(this.objectAssign(j,c["backgroundCoorH5"]),d),this.css(this.CB["subtitlesP"],n),j=this.newObj(c["background"]),j["alpha"]=j["backgroundAlpha"],j["padding"]=0,j["paddingLeft"]=0,j["paddingTop"]=0,j["paddingRight"]=0,j["paddingBottom"]=0,n=this.getEleCss(j,e),this.css(this.CB["subtitlesPB"],n),h=0;h<b.length;h++)k=document.createElement("div"),k.dataset.title=b[h][1],i!=h?this.textButton(k,c["button"],null,this.CB["subtitlesP"],b[h][1],""):this.textButton(k,c["buttonHighlight"],null,this.CB["subtitlesP"],b[h][1],""),this.css(k,"position","static"),this.CB["subtitlesPC"].appendChild(k),h<b.length-1&&(l=c["separate"],l["borderTop"]=l["border"],l["borderTopColor"]=l["color"],m=document.createElement("div"),this.CB["subtitlesPC"].appendChild(m),n=this.getEleCss(l,{width:"100%"}),n["position"]="static",this.css(m,n)),o=function(){var b=a.getDataset(this,"title");g!=b&&(a.css(a.CB["subtitlesP"],"display","none"),a.newSubtitles(b))},this.addListenerInside("click",o,k);this.CB["subtitlesTriangle"]=document.createElement("div"),this.CB["subtitlesP"].appendChild(this.CB["subtitlesTriangle"]),p=c["background"],n={width:0,height:0,borderLeft:.5*p["triangleWidth"]+"px solid transparent",borderRight:.5*p["triangleWidth"]+"px solid transparent",borderTop:p["triangleHeight"]+"px solid "+p["triangleBackgroundColor"].replace("0x","#"),overflow:"hidden",opacity:p["triangleAlpha"],filter:"alpha(opacity:"+p["triangleAlpha"]+")",position:"absolute",left:"0px",top:"0px",zIndex:2},this.css(this.CB["subtitlesTriangle"],n),this.CB["subtitleButtonText"].innerHTML=g}else this.CB["subtitleButtonText"].innerHTML=this.ckLanguage["subtitle"]}},addSubtitles:function(){var d,e,a=this,b=null,c=function(){var c,d,e,g,h,i;"block"==a.css(a.CB["subtitlesP"],"display")||a.isUndefined(a.CB["subtitlesPC"])?a.css(a.CB["subtitlesP"],"display","none"):(c=a.ckStyle["controlBar"]["subtitle"]["background"],a.css(a.CB["subtitlesP"],"display","block"),a.css(a.CB["subtitlesPB"],{width:a.CB["subtitlesPC"].offsetWidth+"px",height:a.CB["subtitlesPC"].offsetHeight+"px"}),a.css(a.CB["subtitlesP"],{width:a.CB["subtitlesPC"].offsetWidth+c["triangleDeviationX"]+c["triangleWidth"]+"px",height:a.CB["subtitlesPC"].offsetHeight+c["triangleDeviationY"]+c["triangleHeight"]+"px"}),a.promptShow(!1),d=a.CB["subtitlesPB"],e=d.offsetWidth,d.offsetHeight,g=.5*(e-c["triangleWidth"])+c["triangleDeviationX"],h=d.offsetHeight+c["triangleDeviationY"],i={left:g+"px",top:h+"px"},a.css(a.CB["subtitlesTriangle"],i))};this.addListenerInside("click",c,this.CB["subtitles"]),d=function(){b&&(window.clearTimeout(b),b=null),b=setTimeout(function(){a.css(a.CB["subtitlesP"],"display","none")},500)},this.addListenerInside("mouseout",d,a.CB["subtitlesP"]),e=function(){a.buttonHide=!1,b&&(window.clearTimeout(b),b=null)},this.addListenerInside("mouseover",e,a.CB["subtitlesP"])},changeSubtitles:function(a){var b,c,d;if(this.loaded&&!(0>a)&&(b=this.vars["cktrack"],"array"==this.varType(b)))return"flashplayer"==this.playerType?(this.V.changeSubtitles(a),void 0):(b.length>a&&(c=b[a],c.length>2&&(d=c[1],d&&this.newSubtitles(d))),void 0)},changeSubtitlesSize:function(a,b){if(this.loaded&&!(0>a)){if("flashplayer"==this.playerType)return this.V.changeSubtitlesSize(a,b),void 0;this.ckStyle["cktrack"]["size"]=a,this.isUndefined(b)||(this.ckStyle["cktrack"]["leading"]=b),this.trackShowAgain()}},newSubtitles:function(a){var d,b=this.vars["cktrack"],c=0;for(c=0;c<b.length;c++)d=b[c],d[1]==a&&(this.subtitlesTemp=c,this.conBarShow&&(this.CB["subtitleButtonText"].innerHTML=d[1],this.subtitleSwitch(),this.loadTrack(c)),this.sendJS("subtitles",d))},definition:function(){var a,b,c,d,e,f,h,i,j,k,l,m,n,o,p,q,r;if(this.conBarShow&&this.ckConfig["config"]["definition"]){for(a=this.ckStyle["controlBar"]["definition"],b={overflow:"hidden",display:"none",zIndex:995},c={overflow:"hidden",align:"top",vAlign:"left",offsetX:0,offsetY:0,zIndex:1},d=this,e=this.VA,f=[],h="",i=0,j=0,i=0;i<e.length;i++)k=e[i][2],-1==f.indexOf(k)&&f.push(k),this.V&&e[i][0]==this.V.currentSrc&&(h=k,j=i);if(h||(h=f[0]),this.removeChildAll(this.CB["definitionP"]),f.length>1){for(this.CB["definitionPB"]=document.createElement("div"),this.CB["definitionPC"]=document.createElement("div"),this.CB["definitionP"].appendChild(this.CB["definitionPB"]),this.CB["definitionP"].appendChild(this.CB["definitionPC"]),l=this.newObj(a["background"]),l["backgroundColor"]="",p=this.getEleCss(l,c),this.css(this.CB["definitionPC"],p),l["padding"]=0,l["paddingLeft"]=0,l["paddingTop"]=0,l["paddingRight"]=0,l["paddingBottom"]=0,p=this.getEleCss(this.objectAssign(l,a["backgroundCoorH5"]),b),this.css(this.CB["definitionP"],p),l=this.newObj(a["background"]),l["alpha"]=l["backgroundAlpha"],l["padding"]=0,l["paddingLeft"]=0,l["paddingTop"]=0,l["paddingRight"]=0,l["paddingBottom"]=0,p=this.getEleCss(l,c),this.css(this.CB["definitionPB"],p),i=0;i<f.length;i++)m=document.createElement("div"),m.dataset.title=f[i],j!=i?this.textButton(m,a["button"],null,this.CB["definitionP"],f[i],""):this.textButton(m,a["buttonHighlight"],null,this.CB["definitionP"],f[i],""),this.css(m,"position","static"),this.CB["definitionPC"].appendChild(m),i<f.length-1&&(n=a["separate"],n["borderTop"]=n["border"],n["borderTopColor"]=n["color"],o=document.createElement("div"),this.CB["definitionPC"].appendChild(o),p=this.getEleCss(n,{width:"100%"}),p["position"]="static",this.css(o,p)),q=function(){var a=d.getDataset(this,"title");h!=a&&(d.css(d.CB["definitionP"],"display","none"),d.newDefinition(a))},this.addListenerInside("click",q,m);this.CB["definitionTriangle"]=document.createElement("div"),this.CB["definitionP"].appendChild(this.CB["definitionTriangle"]),r=a["background"],p={width:0,height:0,borderLeft:.5*r["triangleWidth"]+"px solid transparent",borderRight:.5*r["triangleWidth"]+"px solid transparent",borderTop:r["triangleHeight"]+"px solid "+r["triangleBackgroundColor"].replace("0x","#"),overflow:"hidden",opacity:r["triangleAlpha"],filter:"alpha(opacity:"+r["triangleAlpha"]+")",position:"absolute",left:"0px",top:"0px",zIndex:2},this.css(this.CB["definitionTriangle"],p),this.CB["defaultButtonText"].innerHTML=h,this.css(this.CB["definition"],"display","block")}else this.CB["defaultButtonText"].innerHTML=this.ckLanguage["definition"]}},removeChildAll:function(a){var b,c;for(b=a.childNodes.length-1;b>=0;b--)c=a.childNodes[b],a.removeChild(c)},addDefListener:function(){var d,e,a=this,b=null,c=function(){var c,d,e,g,h,i;"block"==a.css(a.CB["definitionP"],"display")||a.isUndefined(a.CB["definitionPC"])?a.css(a.CB["definitionP"],"display","none"):(a.css(a.CB["definitionP"],"display","block"),c=a.ckStyle["controlBar"]["definition"]["background"],a.css(a.CB["definitionPB"],{width:a.CB["definitionPC"].offsetWidth+"px",height:a.CB["definitionPC"].offsetHeight+"px"}),a.css(a.CB["definitionP"],{width:a.CB["definitionPC"].offsetWidth+c["triangleDeviationX"]+c["triangleWidth"]+"px",height:a.CB["definitionPC"].offsetHeight+c["triangleDeviationY"]+c["triangleHeight"]+"px"}),a.promptShow(!1),d=a.CB["definitionPB"],e=d.offsetWidth,d.offsetHeight,g=.5*(e-c["triangleWidth"])+c["triangleDeviationX"],h=d.offsetHeight+c["triangleDeviationY"],i={left:g+"px",top:h+"px"},a.css(a.CB["definitionTriangle"],i))};this.addListenerInside("click",c,this.CB["definition"]),d=function(){b&&(window.clearTimeout(b),b=null),b=setTimeout(function(){a.css(a.CB["definitionP"],"display","none")},500)},this.addListenerInside("mouseout",d,a.CB["definitionP"]),e=function(){a.buttonHide=!1,b&&(window.clearTimeout(b),b=null)},this.addListenerInside("mouseover",e,a.CB["definitionP"])},changeDefinition:function(a){var b,c;if(this.loaded&&!(0>a))return"flashplayer"==this.playerType?(this.V.changeDefinition(a),void 0):(this.VA.length>a&&(b=this.VA[a],b.length>3&&(c=b[2],c&&this.newDefinition(c))),void 0)},newDefinition:function(a){var e,f,g,h,b=this.VA,c=[],d=0;for(d=0;d<b.length;d++)e=b[d],e[2]==a&&(c.push(e),this.sendJS("definitionChange",d+""));if(!(c.length<1)){if(null!=this.V&&0==this.needSeek&&(this.needSeek=this.V.currentTime),".m3u8"!=this.getFileExt(c[0][0])&&(this.isM3u8=!1),this.isM3u8)this.embedHls(b[0][0],this.vars["autoplay"]);else if(1==c.length)this.V.innerHTML="",this.V.src=c[0][0],this.V.currentSrc=c[0][0];else{for(f="",c=this.arrSort(c),d=0;d<c.length;d++)g="",h=c[d],h[1]&&(g=' type="'+h[1]+'"'),f+='<source src="'+h[0]+'"'+g+">";this.V.removeAttribute("src"),this.V.innerHTML=f,this.V.currentSrc=c[0][0]}this.V.autoplay="autoplay",this.V.load(),1!=this.playbackRateTemp&&(this.V.playbackRate=this.playbackRateTemp),this.timerErrorFun()}},embedHls:function(a,b){var d,c=this;c.hlsAutoPlay=b,Hls.isSupported()&&(d=new Hls,d.loadSource(a),d.attachMedia(this.V),d.on(Hls.Events.MANIFEST_PARSED,function(){c.playerLoad(),b&&c.videoPlay()}))},prompt:function(){var a,b,c,d,e,f,g,h,i,j,k,m;if(this.conBarShow&&(a=this,b=this.vars["promptSpot"],!(null==b||this.promptArr.length>0))){for(c=function(){var c,d,e,f,g,h;null==a.promptElement&&(c="prompte-"+a.randomString(5),d=document.createElement("div"),d.className=c,a.PD.appendChild(d),a.promptElement=a.getByElement(c),a.css(a.promptElement,{overflowX:"hidden",lineHeight:a.ckStyle["previewPrompt"]["lineHeight"]+"px",fontFamily:a.ckStyle["previewPrompt"]["font"],fontSize:a.ckStyle["previewPrompt"]["size"]+"px",color:a.ckStyle["previewPrompt"]["color"].replace("0x","#"),position:"absolute",display:"block",zIndex:"90"})),e=a.getPromptTest(),f=e["pW"],g=e["pT"],h=parseInt(a.css(this,"left"))-parseInt(.5*f),e["pL"]>10&&(h=e["pL"]),0>h&&(h=0),a.css(a.promptElement,{width:f+"px",left:-f-10+"px",display:"block"}),a.promptElement.innerHTML=a.getDataset(this,"words"),a.css(a.promptElement,{left:h+"px",top:g-a.promptElement.offsetHeight-a.ckStyle["previewPrompt"]["marginBottom"]+"px"})},d=function(){null!=a.promptElement&&a.css(a.promptElement,{display:"none"})},e=0,e=0;e<b.length;e++){f=b[e],g=f["words"],h=f["time"],i="prompttitle-"+this.randomString(5),j=document.createElement("div"),j.className=i,this.CB["timeBoBg"].appendChild(j),k=this.getByElement(i);try{k.setAttribute("data-time",h),this.ckConfig["config"]["promptSpotTime"]&&(g=this.formatTime(h,0,this.ckLanguage["timeSliderOver"])+" "+g),k.setAttribute("data-words",g)}catch(l){}m=this.getEleCss(this.ckStyle["promptSpotH5"],{marginY:-1e4,zIndex:1});try{this.css(k,m)}catch(l){}this.addListenerInside("mouseover",c,k),this.addListenerInside("mouseout",d,k),this.promptArr.push(k)}this.changePrompt()}},getPromptTest:function(){var a=this.previewWidth,b=this.getCoor(this.CB["timeProgressBg"])["y"],c=0;return null!=this.previewTop?(b=parseInt(this.css(this.previewTop,"top")),c=parseInt(this.css(this.previewTop,"left"))):b-=35,c+=2,0>c&&(c=0),c>this.PD.offsetWidth-a&&(c=this.PD.offsetWidth-a),{pW:a,pT:b,pL:c}},deletePrompt:function(){var b,a=this.promptArr;if(a.length>0)for(b=0;b<a.length;b++)a[b]&&this.deleteChild(a[b]);this.promptArr=[]},changePrompt:function(){var a,b,c,d,e,f;if(0!=this.promptArr.length)for(a=this.promptArr,b=this.getMetaDate()["duration"],c=this.CB["timeBoBg"].offsetWidth,d=0;d<a.length;d++)e=parseInt(this.getDataset(a[d],"time")),f=parseInt(e*c/b)-parseInt(.5*a[d].offsetWidth),0>f&&(f=0),f>c-parseInt(.5*a[d].offsetWidth)&&(f=c-parseInt(.5*a[d].offsetWidth)),this.css(a[d],{left:f+"px",display:"block"})},preview:function(a){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,b=this,c={file:null,scale:0};if(c=this.standardization(c,this.vars["preview"]),!(null==c["file"]||c["scale"]<=0)){if(d=c["file"],0==this.previewStart)return this.previewStart=1,d.length>0&&(e=0,f=0,g=0,h="preview-"+b.randomString(10),i=0,j=function(a){var c,e;d[a]=b.getNewUrl(d[a]),c=0,e=new Image,e.src=d[a],e.className=h+a,e.onload=function(){var l,m,n,o,p,q,r,s,t,u,v;if(i++,null==b.previewDiv){for(f=e.width,g=e.height,b.previewWidth=parseInt(.1*f),l=document.createElement("div"),l.className=h,b.PD.appendChild(l),b.previewDiv=b.getByElement(h),m=0,m=b.PD.offsetHeight-b.ckStyle["preview"]["bottom"],b.css(b.previewDiv,{width:10*d.length*f+"px",height:parseInt(.1*g)+"px",backgroundColor:"#000000",position:"absolute",left:"0px",top:m+"px",display:"none",zIndex:"80"}),l.setAttribute("data-x","0"),l.setAttribute("data-y",m),n=document.createElement("div"),n.className=h+"d2",b.PD.appendChild(n),b.previewTop=b.getByElement(n.className),b.css(b.previewTop,{width:parseInt(.1*f)+"px",height:parseInt(.1*g)+"px",position:"absolute",border:b.ckStyle["preview"]["border"]+"px solid "+b.ckStyle["preview"]["borderColor"].replace("0x","#"),left:"0px",top:m+"px",display:"none",zIndex:"81"}),o="",c=0;c<d.length;c++)o+=b.newCanvas(h+c,10*f,parseInt(.1*g));b.previewDiv.innerHTML=o}for(b.previewDiv.appendChild(e),p=b.getByElement(e.className),q=b.getByElement(e.className+"-canvas"),r=q.getContext("2d"),s=0,t=0,u=0,v=parseInt(.1*g),c=0;100>c;c++)u=parseInt(.1*c*f),r.drawImage(p,s,t,parseInt(.1*f),v,u,0,parseInt(.1*f),v),s+=parseInt(.1*f),s>=f&&(s=0,t+=v),b.css(p,"display","none");i==d.length?b.previewStart=2:(a++,j(a))}}),j(e),void 0;if(2==this.previewStart){if(k=!0,l=parseInt(a["time"]/this.vars["preview"]["scale"]),m=parseInt(b.getMetaDate()["duration"]/this.vars["preview"]["scale"]),"none"==b.css(b.previewDiv,"display")&&(k=!1),b.css(b.previewDiv,"display","block"),n=.01*b.previewDiv.offsetWidth/d.length,o=n*l-a["x"]+parseInt(.5*n),p=b.PD.offsetHeight-b.previewDiv.offsetHeight-b.ckStyle["preview"]["bottom"],b.css(b.previewDiv,"top",p+2+"px"),q=a["x"]-parseInt(.5*n),r=0,0>q&&(q=0,r=a["x"]-q-.5*n),q>b.PD.offsetWidth-n&&(q=b.PD.offsetWidth-n,r=a["x"]-q-.5*n),0>o&&(o=0),o>m*n-b.PD.offsetWidth&&(o=m*n-b.PD.offsetWidth),b.css(b.previewTop,{left:q+"px",top:p+2+"px",display:"block"}),b.previewTop.offsetHeight>b.previewDiv.offsetHeight&&b.css(b.previewTop,{height:b.previewDiv.offsetHeight-(b.previewTop.offsetHeight-b.previewDiv.offsetHeight)+"px"}),null!=this.previewTween&&(this.animatePause(this.previewTween),this.previewTween=null),s=parseInt(b.css(b.previewDiv,"left")),s==-(o+r))return;
k?(a={element:b.previewDiv,start:null,end:-(o+r),speed:.3},this.previewTween=this.animate(a)):b.css(b.previewDiv,"left",-(o+r)+"px")}}},deletePreview:function(){null!=this.previewDiv&&(this.deleteChild(this.previewDiv),this.previewDiv=null,this.previewStart=0)},changeVideo:function(){var a,b,c,d,e,f;if(!this.html5Video)return this.getVarsObject(),this.V.newVideo(this.vars),void 0;if(a=this.VA,b=this.vars,c=0,!(a.length<1)){if(null!=this.V&&0==this.needSeek&&(this.needSeek=this.V.currentTime),b["poster"]?this.V.poster=b["poster"]:this.V.removeAttribute("poster"),b["loop"]?this.V.loop="loop":this.V.removeAttribute("loop"),this.needSeek=b["seek"]>0?b["seek"]:0,".m3u8"!=this.getFileExt(a[0][0])&&(this.isM3u8=!1),this.isM3u8)this.embedHls(a[0][0],b["autoplay"]);else{if(1==a.length)this.V.innerHTML="",this.V.src=a[0][0];else{for(d="",a=this.arrSort(a),c=0;c<a.length;c++)e="",f=a[c],f[1]&&(e=' type="'+f[1]+'"'),d+='<source src="'+f[0]+'"'+e+">";this.V.removeAttribute("src"),this.V.innerHTML=d}b["autoplay"]?this.V.autoplay="autoplay":this.V.removeAttribute("autoplay"),this.V.load()}this.isUndefined(b["volume"])||this.changeVolume(b["volume"]),this.resetPlayer(),this.timerErrorFun(),this.vars["cktrack"]&&this.loadTrack()}},elementCoordinate:function(){this.pdCoor=this.getXY(this.PD);var a=null;try{a=this.getEleCss(this.ckStyle["centerPlay"],{cursor:"pointer"}),this.css(this.CB["pauseCenter"],a)}catch(b){this.log(b)}try{a=this.getEleCss(this.ckStyle["loading"]),this.css(this.CB["loading"],a)}catch(b){this.log(b)}try{a=this.getEleCss(this.ckStyle["error"]),this.css(this.CB["errorText"],a)}catch(b){this.log(b)}try{a=this.getEleCss(this.ckStyle["logo"])}catch(b){this.log(b)}this.checkBarWidth()},carbarButton:function(){var g,a=this.ckStyle["controlBar"],b=a["button"],c=null,d={overflow:"hidden",cursor:"pointer",zIndex:1},e={overflow:"hidden",cursor:"default",zIndex:1},f={overflow:"hidden",cursor:"pointer",display:"none",zIndex:995};c=this.getEleCss(b["play"],d,this.CB["controlBarBg"]),this.css(this.CB["play"],c),c=this.getEleCss(b["pause"],d,this.CB["controlBarBg"]),this.css(this.CB["pause"],c),c=this.getEleCss(b["mute"],d,this.CB["controlBarBg"]),this.css(this.CB["mute"],c),c=this.getEleCss(b["escMute"],d,this.CB["controlBarBg"]),this.css(this.CB["escMute"],c),c=this.getEleCss(b["full"],d,this.CB["controlBarBg"]),this.css(this.CB["full"],c),c=this.getEleCss(b["escFull"],d,this.CB["controlBarBg"]),this.css(this.CB["escFull"],c),c=this.getEleCss(a["timeText"]["vod"],e,this.CB["controlBarBg"]),this.css(this.CB["timeText"],c),g=this.newObj(a["volumeSchedule"]),g["backgroundImg"]="",c=this.getEleCss(g,e,this.CB["controlBarBg"]),this.css(this.CB["volume"],c),c={width:c["width"],height:a["volumeSchedule"]["backgroundHeight"]+"px",overflow:"hidden",backgroundRepeat:"no-repeat",backgroundPosition:"left center"},this.ckConfig["config"]["buttonMode"]["volumeSchedule"]&&(c["cursor"]="pointer"),this.css(this.CB["volumeBg"],c),this.css(this.CB["volumeBg"],{position:"absolute"}),c["width"]=.5*this.CB["volumeBO"].offsetWidth+parseInt(this.css(this.CB["volumeBO"],"left"))+"px",this.css(this.CB["volumeUp"],c),this.css(this.CB["volumeBg"],"backgroundImage","url("+a["volumeSchedule"]["backgroundImg"]+")"),this.css(this.CB["volumeUp"],"backgroundImage","url("+a["volumeSchedule"]["maskImg"]+")"),c=this.getEleCss(a["volumeSchedule"]["button"],{overflow:"hidden",cursor:"pointer",backgroundRepeat:"no-repeat",backgroundPosition:"left center"}),this.css(this.CB["volumeBO"],c),this.ckConfig["config"]["playbackRate"]&&(this.CB["playbackrateButtonText"]||this.textButton(this.CB["playbackrate"],a["playbackrate"]["defaultButton"],this.objectAssign({overflow:"hidden",cursor:"pointer",zIndex:1},a["playbackrate"]["defaultButtonCoor"]),this.CB["controlBarBg"],this.ckLanguage["playbackrate"],"playbackrateButtonText"),c=this.getEleCss(a["playbackrate"]["defaultButtonCoor"],d,this.CB["controlBarBg"]),this.css(this.CB["playbackrate"],{left:c["left"],top:c["top"]}),this.css(this.CB["playbackrateP"],"display","none"),c=this.getEleCss(a["playbackrate"]["backgroundCoorH5"],f),this.css(this.CB["playbackrateP"],c)),this.ckConfig["config"]["definition"]&&(this.CB["defaultButtonText"]||this.textButton(this.CB["definition"],a["definition"]["defaultButton"],this.objectAssign({overflow:"hidden",cursor:"pointer",zIndex:1},a["definition"]["defaultButtonCoor"]),this.CB["controlBarBg"],this.ckLanguage["definition"],"defaultButtonText"),c=this.getEleCss(a["definition"]["defaultButtonCoor"],d,this.CB["controlBarBg"]),this.css(this.CB["definition"],{left:c["left"],top:c["top"]}),this.css(this.CB["definitionP"],"display","none"),c=this.getEleCss(a["definition"]["backgroundCoorH5"],f),this.css(this.CB["definitionP"],c)),this.ckConfig["config"]["subtitle"]&&(this.CB["subtitleButtonText"]||this.textButton(this.CB["subtitles"],a["subtitle"]["defaultButton"],this.objectAssign({overflow:"hidden",cursor:"pointer",zIndex:1},a["subtitle"]["defaultButtonCoor"]),this.CB["controlBarBg"],this.ckLanguage["subtitle"],"subtitleButtonText"),c=this.getEleCss(a["subtitle"]["defaultButtonCoor"],d,this.CB["controlBarBg"]),this.css(this.CB["subtitles"],{left:c["left"],top:c["top"]}),this.css(this.CB["subtitlesP"],"display","none"),c=this.getEleCss(a["subtitle"]["backgroundCoorH5"],f),this.css(this.CB["subtitlesP"],c))},textButton:function(a,b,c,d,e,f){var i,j,k,l,m,n,o,p,q,g=this,h={width:b["width"],height:b["height"]};c&&(h={width:b["width"],height:b["height"],align:c["align"],vAlign:c["vAlign"],marginX:c["marginX"],marginY:c["marginY"],offsetX:c["offsetX"],offsetY:c["offsetY"],zIndex:2}),m=this.getEleCss(h,null,d),g.css(a,m),i=this.newObj(b),j=this.newObj(b),k=this.newObj(b),l=this.newObj(b),m=null,i["alpha"]=b["backgroundAlpha"],j["backgroundColor"]=b["overBackgroundColor"],j["alpha"]=b["backgroundAlpha"],k["color"]=b["textColor"],l["color"]=b["overTextColor"],k["textAlign"]=b["align"],l["textAlign"]=b["align"],k["backgroundColor"]=l["backgroundColor"]="",n=document.createElement("div"),this.removeChildAll(a),a.appendChild(n),f?(this.CB[f]=document.createElement("div"),a.appendChild(this.CB[f]),this.CB[f].innerHTML=e):(o=document.createElement("div"),a.appendChild(o),o.innerHTML=e),p=function(){m=g.getEleCss(i,{cursor:"pointer",zIndex:1},n),m["left"]="",m["top"]="",g.css(n,m),m=g.getEleCss(k,{cursor:"pointer",zIndex:2},n),m["left"]="",m["top"]="",f?g.css(g.CB[f],m,n):g.css(o,m,n),g.buttonHide=!0,g.timeButtonOver&&(window.clearTimeout(g.timeButtonOver),g.timeButtonOver=null),g.timeButtonOver=window.setTimeout(function(){g.buttonListHide()},1e3)},q=function(){m=g.getEleCss(j,{zIndex:1},n),m["left"]="",m["top"]="",g.css(n,m),m=g.getEleCss(l,{zIndex:2},n),m["left"]="",m["top"]="",f?g.css(g.CB[f],m):g.css(o,m)},p(),this.addListenerInside("mouseout",p,a),this.addListenerInside("mouseover",q,a)},buttonListHide:function(){this.buttonHide&&this.css([this.CB["definitionP"],this.CB["subtitlesP"],this.CB["playbackrateP"]],"display","none"),this.timeButtonOver&&(window.clearTimeout(this.timeButtonOver),this.timeButtonOver=null),this.buttonHide=!1},videoCss:function(){var b,c,d,e,f,a={};a="none"==this.css(this.CB["controlBar"],"display")?this.ckStyle["video"]["controlBarHideReserve"]:this.ckStyle["video"]["reserve"],b=a["spacingBottom"],this.V.controls&&this.isMobile()&&(b-=40),c=this.PD.offsetWidth,d=this.PD.offsetHeight,e=c-a["spacingLeft"]-a["spacingRight"],f=d-a["spacingTop"]-b,this.MD?this.css([this.MD,this.MDC],{width:e+"px",height:f+"px",marginLeft:a["spacingLeft"]+"px",marginTop:a["spacingTop"]+"px"}):this.css(this.V,{width:e+"px",height:f+"px",marginLeft:a["spacingLeft"]+"px",marginTop:a["spacingTop"]+"px"})},playerCustom:function(){var i,k,a=this.ckStyle["custom"],b=a["button"],c=a["images"],d=null,e=null,f="",h={},j=0;for(f in b)h=b[f],e={overflow:"hidden",cursor:"pointer",zIndex:1},d=this.getEleCss(h,e),i=document.createElement("div"),this.css(i,d),this.customeElement.push({ele:i,css:h,cssSup:e,type:"player-button",name:f}),this.PD.appendChild(i),this.isUndefined(this.ckLanguage["buttonOver"][f])||(i.dataset.title=this.ckLanguage["buttonOver"][f]),j++,this.buttonEventFun(i,h);for(f in c)h=c[f],e={overflow:"hidden",zIndex:1},d=this.getEleCss(h,e),i=document.createElement("div"),this.css(i,d),this.customeElement.push({ele:i,css:h,cssSup:e,type:"player-images",name:f}),this.PD.appendChild(i),k=new Image,k.src=c[f]["img"],i.appendChild(k),j++},carbarCustom:function(){var i,k,a=this.ckStyle["controlBar"]["custom"],b=a["button"],c=a["images"],d=null,e=null,f="",h={},j=0;for(f in b)h=b[f],e={overflow:"hidden",cursor:"pointer",zIndex:1},d=this.getEleCss(h,e,this.CB["controlBarBg"]),i=document.createElement("div"),this.css(i,d),this.customeElement.push({ele:i,css:h,cssSup:e,type:"controlBar-button",name:f}),this.CB["controlBar"].appendChild(i),this.isUndefined(this.ckLanguage["buttonOver"][f])||(i.dataset.title=this.ckLanguage["buttonOver"][f]),j++,this.buttonEventFun(i,h);for(f in c)h=c[f],e={overflow:"hidden",zIndex:1},d=this.getEleCss(h,e,this.CB["controlBarBg"]),i=document.createElement("div"),this.css(i,d),this.customeElement.push({ele:i,css:h,cssSup:e,type:"controlBar-images",name:f}),this.CB["controlBar"].appendChild(i),k=new Image,k.src=c[f]["img"],i.appendChild(k),j++},customCoor:function(){var b,a=null;if(this.customeElement.length>0)for(b=0;b<this.customeElement.length;b++)a="controlBar"==this.customeElement[b]["type"]?this.getEleCss(this.customeElement[b]["css"],this.customeElement[b]["cssSup"],this.CB["controlBarBg"]):this.getEleCss(this.customeElement[b]["css"],this.customeElement[b]["cssSup"]),this.css(this.customeElement[b]["ele"],a)},customShow:function(a){if(this.customeElement.length>0)for(var b=0;b<this.customeElement.length;b++)"player"==this.customeElement[b]["type"]&&this.css(this.customeElement[b]["ele"],"display",a?"block":"none")},advertisementStyle:function(){var c,d,e,a=["muteButton","escMuteButton","adLinkButton","closeButton","skipAdButton","countDown","countDownText","skipDelay","skipDelayText"],b=["adMute","adEscMute","adLink","adPauseClose","adSkipButton","adTime","adTimeText","adSkip","adSkipText"];for(c=0;c<b.length;c++)d={overflow:"hidden",zIndex:999},5>c&&(d["cursor"]="pointer"),e=this.getEleCss(this.ckStyle["advertisement"][a[c]],d),this.css(this.CB[b[c]],e)},checkBarWidth:function(){!this.conBarShow},initPlayPause:function(){this.conBarShow&&(this.vars["autoplay"]?(this.css([this.CB["play"],this.CB["pauseCenter"]],"display","none"),this.css(this.CB["pause"],"display","block")):(this.css(this.CB["play"],"display","block"),"none"==this.css(this.CB["errorText"],"display")&&this.css(this.CB["pauseCenter"],"display","block"),this.css(this.CB["pause"],"display","none")))},loadedHandler:function(){if(this.loaded=!0,""!=this.vars["loaded"])try{eval(this.vars["loaded"]+"('"+this.vars["variable"]+"')")}catch(event){this.log(event)}},playingHandler:function(){return this.playShow(!0),this.isFirstTimePlay&&!this.isUndefined(this.advertisements["front"])?(this.isFirstTimePlay=!1,this.adI=0,this.adType="front",this.adMuteInto(),this.adIsVideoTime=!0,this.adPlayStart=!0,this.adVideoPlay=!1,this.videoPause(),this.advertisementsTime(),this.advertisementsPlay(),this.adSkipButtonShow(),void 0):(this.adPlayerPlay||(this.needSeek>0&&(this.videoSeek(this.needSeek),this.needSeek=0),this.animatePauseArray.length>0&&this.animateResume("pause"),"html5video"==this.playerType&&null!=this.V&&this.ckConfig["config"]["videoDrawImage"]&&this.sendVCanvas(),this.isUndefined(this.advertisements["pause"])||this.adPlayStart||this.closePauseAd()),void 0)},adPausePlayer:function(){this.adI=0,this.adType="pause",this.adPauseShow=!0,this.loadAdPause(),this.sendJS("pauseAd","play")},loadAdPause:function(){var f,g,h,a=this.getNowAdvertisements(),b=a["type"],c=this;this.PD.offsetWidth,this.PD.offsetHeight,this.isStrImage(b)&&this.adPauseShow&&(this.css(this.CB["adElement"],"display","block"),f="adimg"+this.randomString(10),g='<img src="'+a["file"]+'" class="'+f+'">',a["link"]&&(g='<a href="'+a["link"]+'" target="_blank">'+g+"</a>"),this.CB["adElement"].innerHTML=g,this.addListenerInside("load",function(){var d,b=new Image;b.src=this.src,d=c.adjustmentWH(b.width,b.height),c.css([c.getByElement(f),c.CB["adElement"]],{width:d["width"]+"px",height:d["height"]+"px",border:"0px"}),c.ckStyle["advertisement"]["closeButtonShow"]&&c.adPauseShow&&c.css(c.CB["adPauseClose"],{display:"block"}),c.ajaxSuccessNull(a["exhibitionMonitor"]),c.adPauseCoor()},this.getByElement(f)),this.addListenerInside("click",function(){c.ajaxSuccessNull(a["clickMonitor"])},this.CB["adElement"]),h=this.adI,this.adI<this.advertisements["pause"].length-1?h++:h=0,a["time"]>0&&setTimeout(function(){c.adPauseShow&&(c.adI=h,c.loadAdPause())},1e3*a["time"]))},adPauseCoor:function(){var a,b,c,d,e,f;"block"==this.css(this.CB["adElement"],"display")&&(a=this.CB["adElement"].offsetWidth,b=this.CB["adElement"].offsetHeight,c=this.PD.offsetWidth,d=this.PD.offsetHeight,this.css(this.CB["adElement"],{top:.5*(d-b)+"px",left:.5*(c-a)+"px"}),"block"==this.css(this.CB["adPauseClose"],"display")&&(e=this.ckStyle["advertisement"]["closeButton"],f=this.getPosition(e,this.CB["adElement"]),this.css(this.CB["adPauseClose"],{top:f["y"]+"px",left:f["x"]+"px"})))},closePauseAd:function(){this.CB["adElement"].innerHTML="",this.css([this.CB["adElement"],this.CB["adPauseClose"]],"display","none"),this.adPauseShow=!1,this.sendJS("pauseAd","ended")},advertisementsTime:function(a){var b,c;for(this.isUndefined(a)&&(a=0),b=this.advertisements[this.adType],a>0&&(b[this.adI]["time"]=Math.ceil(a)),this.adTimeAllTotal=0,c=this.adI;c<b.length;c++)this.isUndefined(b[c]["time"])||(this.adTimeAllTotal+=Math.ceil(b[c]["time"]));this.adTimeAllTotal>0&&(this.CB["adTimeText"].innerHTML=this.ckLanguage["adCountdown"].replace("[$second]",this.adTimeAllTotal).replace("[$Second]",this.adTimeAllTotal>9?this.adTimeAllTotal:"0"+this.adTimeAllTotal)),this.adPauseShow&&this.closePauseAd(),this.adOtherCloseAll(),this.adTimeTotal=-1},adSkipButtonShow:function(){var a=this,b=this.ckStyle["advertisement"],c=b[this.adType+"SkipButtonDelay"],d=function(){c>=0?(a.CB["adSkipText"].innerHTML=a.ckLanguage["skipDelay"].replace("[$second]",c).replace("[$Second]",c>9?c:"0"+c),a.css([a.CB["adSkip"],a.CB["adSkipText"]],"display","block"),a.css(a.CB["adSkipButton"],"display","none"),setTimeout(d,1e3)):(a.css([a.CB["adSkip"],a.CB["adSkipText"]],"display","none"),"block"==a.css(a.CB["adTime"],"display")&&a.css(a.CB["adSkipButton"],"display","block")),c--};b["skipButtonShow"]&&(b[this.adType+"SkipButtonDelay"]>0&&this.isUndefined(this.adSkipButtonTime)?(a.css([a.CB["adSkip"],a.CB["adSkipText"]],"display","block"),d()):(a.css([a.CB["adSkip"],a.CB["adSkipText"]],"display","none"),a.css(a.CB["adSkipButton"],"display","block")))},advertisementsPlay:function(){this.css([this.CB["adBackground"],this.CB["adElement"],this.CB["adTime"],this.CB["adTimeText"],this.CB["adSkip"],this.CB["adSkipText"],this.CB["adSkipButton"],this.CB["adLink"]],"display","none"),this.adPlayerPlay=!1;var a=this.advertisements[this.adType];0!=this.adI||"front"!=this.adType&&"insert"!=this.adType&&"end"!=this.adType||(this.sendJS("process",this.adType+" ad play"),this.sendJS(this.adType+"Ad","play")),this.trackHide(),this.adI<a.length?(this.isUndefined(a[this.adI]["time"])||(this.adTimeTotal=parseInt(a[this.adI]["time"])),this.loadAdvertisements()):this.adEnded()},eliminateAd:function(){if(this.adType){var a=this.advertisements[this.adType];this.adI=a.length,this.advertisementsPlay()}},adEnded:function(){this.adPlayStart=!1,"front"==this.adType&&(this.time=0),this.adPlayerPlay=!1,this.adVideoPlay?(""!=this.videoTemp["src"]?this.V.src=this.videoTemp["src"]:this.V.src&&this.V.removeAttribute("src"),""!=this.videoTemp["source"]&&(this.V.innerHTML=this.videoTemp["source"]),""!=this.videoTemp["currentSrc"]&&(this.V.src=this.videoTemp["currentSrc"],this.V.currentSrc=this.videoTemp["currentSrc"]),this.videoTemp["loop"]&&(this.V.loop=!0,this.videoTemp["loop"]=!1),"end"==this.adType?this.endedHandler():this.videoPlay()):this.videoPlay(),this.changeVolume(this.vars["volume"]),this.sendJS("process",this.adType+" ad ended"),this.sendJS(this.adType+"Ad","ended"),this.changeControlBarShow(!0),this.css(this.CB["logo"],"display","none"),this.customShow(!0),this.css([this.CB["adBackground"],this.CB["adElement"],this.CB["adTime"],this.CB["adTimeText"],this.CB["adSkip"],this.CB["adSkipText"],this.CB["adSkipButton"],this.CB["adLink"],this.CB["adMute"],this.CB["adEscMute"]],"display","none")},loadAdvertisements:function(){var f,g,h,i,a=this.getNowAdvertisements(),b=a["type"],c=this,d=this.PD.offsetWidth,e=this.PD.offsetHeight;this.changeControlBarShow(!1),this.adPlayerPlay=!0,this.css(this.CB["logo"],"display","none"),this.customShow(!1),this.isStrImage(b)?(this.css([this.CB["adBackground"],this.CB["adElement"],this.CB["adTime"],this.CB["adTimeText"]],"display","block"),this.css([this.CB["adMute"],this.CB["adEscMute"]],"display","none"),f="adimg"+this.randomString(10),g='<img src="'+a["file"]+'" class="'+f+'">',a["link"]&&(g='<a href="'+a["link"]+'" target="_blank">'+g+"</a>"),this.CB["adElement"].innerHTML=g,this.addListenerInside("load",function(){var g,b=new Image;b.src=this.src,g=c.adjustmentWH(b.width,b.height),c.css(c.getByElement(f),{width:g["width"]+"px",height:g["height"]+"px",border:"0px"}),c.css(c.CB["adElement"],{width:g["width"]+"px",height:g["height"]+"px",top:.5*(e-g["height"])+"px",left:.5*(d-g["width"])+"px"}),c.ajaxSuccessNull(a["exhibitionMonitor"])},this.getByElement(f)),this.addListenerInside("click",function(){c.ajaxSuccessNull(a["clickMonitor"])},this.CB["adElement"]),this.isUndefined(a["time"])||this.adCountDown()):(this.css([this.CB["adTime"],this.CB["adTimeText"]],"display","block"),this.adVideoMute?(this.css(this.CB["adEscMute"],"display","block"),this.css(this.CB["adMute"],"display","none")):(this.css(this.CB["adEscMute"],"display","none"),this.css(this.CB["adMute"],"display","block")),this.CB["adElement"].innerHTML="",""==this.videoTemp["currentSrc"]&&(this.videoTemp["currentSrc"]=this.getCurrentSrc()),this.V.loop&&(this.videoTemp["loop"]=!0,this.V.loop=!1),null!=this.V&&this.V.currentTime>0&&this.adIsVideoTime&&"front"!=this.adType&&(this.adIsVideoTime=!1,this.needSeek=this.V.currentTime),this.V.src=a["file"],this.V.currentSrc=a["file"],this.V.innerHTML="",this.V.play(),this.adVideoPlay=!0,this.ajaxSuccessNull(a["exhibitionMonitor"]),this.adVideoMute||this.escAdMute()),a["link"]?(this.css(this.CB["adLink"],"display","block"),h=function(){c.sendJS("clickEvent","javaScript->adLinkClick")},this.addListenerInside("click",h,this.CB["adLink"]),this.adLinkTemp=a["link"],i='<a href="'+a["link"]+'" target="_blank" class="ckadmorelink"><img src="'+this.ckStyle["png-1-1"]+'" width="'+this.ckStyle["advertisement"]["adLinkButton"]["width"]+'" height="'+this.ckStyle["advertisement"]["adLinkButton"]["height"]+'"></a>',this.CB["adLink"].innerHTML=i,this.css(this.getByElement("ckadmorelink"),{color:"#FFFFFF",textDecoration:"none"}),this.addListenerInside("click",function(){c.ajaxSuccessNull(a["clickMonitor"])},this.CB["adLink"])):this.css(this.CB["adLink"],"display","none")},adCountDown:function(){var a=this;this.adTimeTotal>0?this.adIsPause||(this.adTimeTotal--,this.showAdTime(),this.adCountDownObj=null,this.adCountDownObj=setTimeout(function(){a.adCountDown()},1e3)):(this.adI++,this.advertisementsPlay())},adPlayerTimeHandler:function(a){var b=this.getNowAdvertisements(),c=b["type"];this.isStrImage(c)||this.adTimeTotal!=parseInt(a)&&(this.adTimeTotal=parseInt(a),this.showAdTime())},showAdTime:function(){this.adTimeAllTotal--;var a=this.adTimeAllTotal;0>a&&(a=0),this.CB["adTimeText"].innerHTML=this.ckLanguage["adCountdown"].replace("[$second]",a).replace("[$Second]",10>a?"0"+a:a)},checkAdOther:function(a){var b,c,d;if(!this.adPlayerPlay)for(b=this.advertisements["othertime"],c=this.advertisements["otherPlay"],d=0;d<b.length;d++)a>=b[d]&&!c[d]&&(c[d]=!0,this.newAdOther(d))},newAdOther:function(a){var f,g,h,i,j,k,l,b=this,c=this.advertisements["other"][a],d=this.randomString(10),e="adother"+d;imgClassName="adimgother"+d,f=document.createElement("div"),f.className=e,this.PD.appendChild(f),c["div"]=e,c["element"]=imgClassName,g='<img src="'+c["file"]+'" class="'+imgClassName+'">',c["link"]&&(g='<a href="'+c["link"]+'" target="blank">'+g+"</a>"),this.getByElement(e).innerHTML=g,this.css(e,{position:"absolute",overflow:"hidden",zIndex:"996",top:"-600px",left:"-600px",cursor:"pointer"}),this.ckStyle["advertisement"]["closeOtherButtonShow"]&&(h="adotherclose-"+d,i=document.createElement("div"),i.className=h,this.PD.appendChild(i),c["closeDiv"]=h,c["close"]=!1,j=this.getEleCss(this.ckStyle["advertisement"]["closeOtherButton"],{offsetX:-1e4,offsetY:-1e4,cursor:"pointer",zIndex:997}),this.css(h,j),k=function(){b.loadImgBg(h,b.ckStyle["advertisement"]["closeOtherButton"]["mouseOver"])},l=function(){b.loadImgBg(h,b.ckStyle["advertisement"]["closeOtherButton"]["mouseOut"])},l(),this.addListenerInside("mouseover",k,this.getByElement(h)),this.addListenerInside("mouseout",l,this.getByElement(h))),this.addListenerInside("load",function(){var f,d=new Image;d.src=this.src,f=b.adjustmentWH(d.width,d.height),b.css([b.getByElement(imgClassName),b.getByElement(e)],{width:f["width"]+"px",height:f["height"]+"px",border:"0px"}),b.advertisements["other"][a]=c,b.ajaxSuccessNull(c["exhibitionMonitor"]),b.adOtherCoor()},this.getByElement(imgClassName)),this.addListenerInside("click",function(){b.adOtherClose(a)},this.getByElement(h)),this.addListenerInside("click",function(){b.ajaxSuccessNull(c["clickMonitor"])},this.getByElement(imgClassName)),c["time"]>0&&setTimeout(function(){b.adOtherClose(a)},1e3*c["time"])},adOtherClose:function(a){var b=this.advertisements["other"][a];this.isUndefined(b["close"])||b["close"]||(b["close"]=!0,this.PD.removeChild(this.getByElement(b["div"])),this.PD.removeChild(this.getByElement(b["closeDiv"])))},adOtherCloseAll:function(){var a,b;if(!this.isUndefined(this.advertisements["other"]))for(a=this.advertisements["other"],b=0;b<a.length;b++)this.adOtherClose(b)},adOtherCoor:function(){var a,b,c,d,e,f,g,h;if(!this.isUndefined(this.advertisements["other"]))for(a=this.advertisements["other"],b=0;b<a.length;b++)c=a[b],this.isUndefined(c["close"])||c["close"]||(d=this.ckStyle["advertisement"]["closeOtherButton"],e=this.getPosition(c),f=e["x"],g=e["y"],this.css(this.getByElement(c["div"]),{left:f+"px",top:g+"px"}),h=this.getPosition(d,this.getByElement(c["div"])),this.isUndefined(c["closeDiv"])||this.css(this.getByElement(c["closeDiv"]),{left:h["x"]+"px",top:h["y"]+"px"}))},checkAdInsert:function(a){var b,c,d,e,f;if(!this.adPlayerPlay)for(b=this.advertisements["inserttime"],c=this.advertisements["insertPlay"],d=this.getMetaDate()["duration"],e=b.length-1;e>-1;e--)if(a>=b[e]&&d-2>a&&a>1&&!c[e]){for(this.adI=0,this.adType="insert",this.adMuteInto(),this.adIsVideoTime=!0,this.adPlayStart=!0,this.adVideoPlay=!1,this.videoPause(),this.advertisementsTime(),this.advertisementsPlay(),this.adSkipButtonShow(),c[e]=!0,f=0;e+1>f;f++)c[f]=!0;break}},formatInserttime:function(a){var b,c,d;if(!this.isUndefined(this.advertisements["inserttime"])){for(b=this.advertisements["inserttime"],c=[],d=0;d<b.length;d++)"%"==b[d].toString().substr(-1)?c.push(parseInt(.01*a*parseInt(b[d]))):c.push(parseInt(b[d]));this.advertisements["inserttime"]=c}},getNowAdvertisements:function(){return-1==this.adI?{file:"",time:0,link:""}:this.advertisements[this.adType][this.adI]},adjustmentWH:function(a,b){var c=this.PD.offsetWidth,d=this.PD.offsetHeight,e=0,f=0;return a>=c||b>=d?c/a>d/b?(f=d-20,e=a*f/b):(e=c-20,f=b*e/a):(e=a,f=b),{width:e,height:f}},ajaxSuccessNull:function(a){if(!this.isUndefined(a)){var b={url:a,success:function(){}};this.ajax(b)}},runFunction:function(s){try{var arr=s.split("->");if(2==arr.length)switch(arr[0]){case"javaScript":"[flashvars]"!=arr[1].substr(0,11)?eval(arr[1]+"()"):eval(this.vars[arr[1].substr(11)]+"()");break;case"actionScript":eval("this."+arr[1]+"()")}this.sendJS("clickEvent",s)}catch(event){}},sendVCanvas:function(){var a,b;null==this.timerVCanvas&&(this.css(this.V,"display","none"),this.css(this.MD,"display","block"),a=this,b=function(){a.MDCX.width!=a.MD.offsetWidth&&(a.MDC.width=a.MD.offsetWidth),a.MDCX.height!=a.MD.offsetHeight&&(a.MDC.height=a.MD.offsetHeight),a.MDCX.clearRect(0,0,a.MDCX.width,a.MDCX.height);var b=a.getProportionCoor(a.PD.offsetWidth,a.PD.offsetHeight,a.V.videoWidth,a.V.videoHeight);a.MDCX.drawImage(a.V,0,0,a.V.videoWidth,a.V.videoHeight,b["x"],b["y"],b["width"],b["height"])},this.timerVCanvas=new this.timer(0,b))},pauseHandler:function(){var a=this;this.playShow(!1),this.animatePauseArray.length>0&&this.animatePause("pause"),"html5video"==this.playerType&&null!=this.V&&this.ckConfig["config"]["videoDrawImage"]&&this.stopVCanvas(),this.isUndefined(this.advertisements["pause"])||this.adPlayStart||this.adPauseShow||setTimeout(function(){!a.isUndefined(a.advertisements["pause"])&&!a.adPlayStart&&!a.adPauseShow&&a.time>1&&a.adPausePlayer()},300)},stopVCanvas:function(){null!=this.timerVCanvas&&(this.css(this.V,"display","block"),this.css(this.MD,"display","none"),this.timerVCanvas.runing&&this.timerVCanvas.stop(),this.timerVCanvas=null)},playShow:function(a){this.conBarShow&&(a?(this.css(this.CB["play"],"display","none"),this.css(this.CB["pauseCenter"],"display","none"),this.css(this.CB["pause"],"display","block")):(this.css(this.CB["play"],"display","block"),"none"==this.css(this.CB["errorText"],"display")?this.adPlayerPlay||this.css(this.CB["pauseCenter"],"display","block"):this.css(this.CB["pauseCenter"],"display","none"),this.css(this.CB["pause"],"display","none")))},seekedHandler:function(){this.resetTrack(),this.isTimeButtonMove=!0,this.V.paused&&(this.hlsAutoPlay?this.videoPlay():this.hlsAutoPlay=!0)},endedHandler:function(){return this.sendJS("ended"),this.adPlayerPlay?(this.adI++,this.advertisementsPlay(),void 0):this.endAdPlay||this.isUndefined(this.advertisements["end"])?(this.endedAdReset(),this.vars["loop"]&&this.videoSeek(0),void 0):(this.endAdPlay=!0,this.adI=0,this.adType="end",this.adMuteInto(),this.adIsVideoTime=!0,this.adPlayStart=!0,this.adVideoPlay=!1,this.videoPause(),this.advertisementsTime(),this.advertisementsPlay(),this.adSkipButtonShow(),this.adReset=!0,void 0)},endedAdReset:function(){var a=[],b=0;if(!this.isUndefined(this.advertisements["insertPlay"]))for(a=this.advertisements["insertPlay"],b=0;b<a.length;b++)this.advertisements["insertPlay"][b]=!1;if(!this.isUndefined(this.advertisements["otherPlay"]))for(a=this.advertisements["otherPlay"],b=0;b<a.length;b++)this.advertisements["otherPlay"][b]=!1},volumechangeHandler:function(){if(this.conBarShow&&(this.ckConfig["config"]["mobileVolumeBarShow"]||!this.isMobile())&&"none"!=this.css(this.CB["volume"],"display"))try{var a=this.volume||this.V.volume;a>0?(this.css(this.CB["mute"],"display","block"),this.css(this.CB["escMute"],"display","none")):(this.css(this.CB["mute"],"display","none"),this.css(this.CB["escMute"],"display","block"))}catch(b){}},timeUpdateHandler:function(){var a=0;if("html5video"==this.playerType)try{a=this.V.duration}catch(b){}(isNaN(a)||parseInt(a)<.2)&&(a=this.vars["duration"]),this.vars["forceduration"]>0&&(a=this.vars["forceduration"]),a>0&&(this.time=this.V.currentTime,this.timeTextHandler(),this.trackShowHandler(),this.isTimeButtonMove&&this.timeProgress(this.time,a))},controlBar:function(){var a=this.ckStyle["controlBar"],b={align:a["align"],vAlign:a["vAlign"],width:a["width"],height:a["height"],offsetX:a["offsetX"],offsetY:a["offsetY"]},c={backgroundColor:a["background"]["backgroundColor"],backgroundImg:a["background"]["backgroundImg"],alpha:a["background"]["alpha"]},d=this.getEleCss(this.objectAssign(b,c),{zIndex:888});this.css(this.CB["controlBarBg"],d),d=this.getEleCss(b,{zIndex:889}),this.css(this.CB["controlBar"],d)},timeProgress:function(a,b){var c,d;this.conBarShow&&(c=this.CB["timeProgressBg"].offsetWidth,d=parseInt(a*c/b-.5*this.CB["timeButton"].offsetWidth),d>c-this.CB["timeButton"].offsetWidth&&(d=c-this.CB["timeButton"].offsetWidth),0>d&&(d=0),this.css(this.CB["timeProgress"],"width",d+"px"),this.css(this.CB["timeButton"],"left",parseInt(d)+"px"))},timeTextHandler:function(){var a,b;this.conBarShow&&(a=this.V.duration,b=this.V.currentTime,(isNaN(a)||parseInt(a)<.2)&&(a=this.vars["duration"]),this.vars["forceduration"]>0&&(a=this.vars["forceduration"]),this.CB["timeText"].innerHTML=this.formatTime(b,a,this.ckLanguage["vod"]))},bufferEdHandler:function(){var a,b,c;this.conBarShow&&"flashplayer"!=this.playerType&&(a=this,b=function(){null!=a.timerBuffer&&(a.timerBuffer.runing&&(a.sendJS("buffer",100),a.timerBuffer.stop()),a.timerBuffer=null)},b(),c=function(){var c,d,e,f,g,h,i,j;!a.isUndefined(a.V)&&a.V.buffered.length>0&&(c=a.V.duration,d=a.V.buffered.length,e=a.V.buffered.start(d-1),f=a.V.buffered.end(d-1),g=e+f,h=a.CB["timeProgressBg"].offsetWidth,i=a.CB["timeButton"].offsetWidth,j=parseInt(g*h/c+i),j>=h&&(j=h,b()),a.changeLoad(g))},this.timerBuffer=new this.timer(200,c))},changeLoad:function(a){var b,c,d,e;null!=this.V&&this.conBarShow&&(b=this.CB["timeProgressBg"].offsetWidth,c=this.CB["timeButton"].offsetWidth,d=this.V.duration,(isNaN(d)||parseInt(d)<.2)&&(d=this.vars["duration"]),this.vars["forceduration"]>0&&(d=this.vars["forceduration"]),this.isUndefined(a)?a=this.loadTime:this.loadTime=a,e=parseInt(a*b/d+c),this.css(this.CB["loadProgress"],"width",e+"px"),this.sendJS("loadTime",a),this.loadTimeTemp=a)},judgeIsLive:function(){var b,c,a=this;null!=this.timerError&&(this.timerError.runing&&this.timerError.stop(),this.timerError=null),this.error=!1,this.conBarShow&&this.css(this.CB["errorText"],"display","none"),b=function(){a.timeUpdateHandler()},this.vars["live"]?(this.removeListenerInside("timeupdate",b),null!=this.timerTime&&(window.clearInterval(this.timerTime),timerTime=null),null!=this.timerTime&&(this.timerTime.runing&&this.timerTime.stop(),this.timerTime=null),c=function(){null!=a.V&&!a.V.paused&&a.conBarShow&&(a.CB["timeText"].innerHTML=a.formatTime(0,0,a.ckLanguage["live"]))},this.timerTime=new this.timer(1e3,c)):null!=this.V&&"html5video"==this.playerType&&(this.addListenerInside("timeupdate",b),a.timeTextHandler(),a.prompt(),setTimeout(function(){a.bufferEdHandler()},200)),this.definition()},loadTrack:function(a){var b,c,d,e,f,g,h,i,j;if("flashplayer"!=this.playerType&&1!=this.vars["flashplayer"]){if(this.isUndefined(a)&&(a=-1),b=this.vars["cktrack"],c="",d=this.varType(b),e=this,"array"==d){if(-1==a)for(f=0,g=0,h=0;h<b.length;h++)i=b[h],3==i.length&&i[2]>g&&(g=i[2],f=h);else f=a;c=b[f][0]}else c=b;j={method:"get",dataType:"text",url:c,charset:"utf-8",success:function(a){a&&(e.track=e.parseSrtSubtitles(a),e.trackIndex=0,e.nowTrackShow={sn:""})}},this.ajax(j)}},resetTrack:function(){this.trackIndex=0,this.nowTrackShow={sn:""}},trackShowHandler:function(){var a,b;this.conBarShow&&!this.adPlayerPlay&&(this.track.length<1||(this.trackIndex>=this.track.length&&(this.trackIndex=0),a=this.track[this.trackIndex],this.time>=a["startTime"]&&this.time<=a["endTime"]?(b=this.nowTrackShow,b["sn"]!=a["sn"]&&(this.trackHide(),this.trackShow(a),this.nowTrackTemp=a)):(this.trackHide(),this.checkTrack())))},trackShowAgain:function(){this.trackHide(),this.trackShow(this.nowTrackTemp)},trackShow:function(a){var b,c,d,e;for(this.nowTrackShow=a,b=a["content"],c=0;c<b.length;c++)d={list:[{type:"text",text:b[c],color:this.ckStyle["cktrack"]["color"],size:this.ckStyle["cktrack"]["size"],fontFamily:this.ckStyle["cktrack"]["font"],lineHeight:this.ckStyle["cktrack"]["leading"]+"px"}],position:[1,2,null,-(b.length-c)*this.ckStyle["cktrack"]["leading"]-this.ckStyle["cktrack"]["marginBottom"]]},e=this.addElement(d),this.trackElement.push(e)},trackHide:function(){for(var a=0;a<this.trackElement.length;a++)this.deleteElement(this.trackElement[a]);this.trackElement=[]},checkTrack:function(){var a=this.trackIndex,b=this.track,c=0;
for(c=a;c<b.length;c++)if(this.time>=b[c]["startTime"]&&this.time<=b[c]["endTime"]){this.trackIndex=c;break}},playOrPause:function(){return this.loaded&&null!=this.V?"flashplayer"==this.playerType?(this.V.playOrPause(),void 0):(this.V.paused?this.videoPlay():this.videoPause(),void 0):void 0},videoPlay:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoPlay(),void 0;if(this.adPlayerPlay)return this.eliminateAd(),void 0;try{this.V.currentSrc&&this.V.play()}catch(a){}}},videoPause:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoPause(),void 0;try{this.V.pause()}catch(a){}}},videoSeek:function(a){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoSeek(a),void 0;var b=this.V.duration>.2?this.V.duration:this.getMetaDate()["duration"];b>0&&a>b&&(this.vars["forceduration"]>0?(a=0,this.sendJS("ended")):a=b-.1),a>=0&&(this.V.currentTime=a,this.sendJS("seekTime",a))}},changeVolume:function(a,b,c){var f,g;if(this.loaded&&"flashplayer"==this.playerType)return this.V.changeVolume(a),void 0;if((isNaN(a)||this.isUndefined(a))&&(a=0),this.loaded||(this.vars["volume"]=a),!this.html5Video)return this.V.changeVolume(a),void 0;try{this.isUndefined(b)&&(b=!0)}catch(d){}try{this.isUndefined(c)&&(c=!0)}catch(d){}a||(a=0),0>a&&(a=0),a>1&&(a=1);try{this.V.volume=a}catch(e){}this.volume=a,b&&this.conBarShow&&(f=a*this.CB["volumeBg"].offsetWidth,0>f&&(f=0),f>this.CB["volumeBg"].offsetWidth&&(f=this.CB["volumeBg"].offsetWidth),this.css(this.CB["volumeUp"],"width",f+"px")),c&&this.conBarShow&&(g=parseInt(this.CB["volumeUp"].offsetWidth-.5*this.CB["volumeBO"].offsetWidth),g>this.CB["volumeBg"].offsetWidth-this.CB["volumeBO"].offsetWidth&&(g=this.CB["volumeBg"].offsetWidth-this.CB["volumeBO"].offsetWidth),0>g&&(g=0),this.css(this.CB["volumeBO"],"left",g+"px"))},videoMute:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoMute(),void 0;this.volumeTemp=this.V?this.V.volume>0?this.V.volume:this.vars["volume"]:this.vars["volume"],this.changeVolume(0)}},videoEscMute:function(){return this.loaded?"flashplayer"==this.playerType?(this.V.videoEscMute(),void 0):(this.changeVolume(this.volumeTemp>0?this.volumeTemp:this.vars["volume"]),void 0):void 0},adMute:function(){this.loaded&&(this.changeVolume(0),this.adVideoMute=!0,this.css(this.CB["adEscMute"],"display","block"),this.css(this.CB["adMute"],"display","none"))},escAdMute:function(){if(this.loaded){var a=this.ckStyle["advertisement"]["videoVolume"];this.changeVolume(a),this.adMuteInto()}},adMuteInto:function(){this.adVideoMute=!1,this.css(this.CB["adEscMute"],"display","none"),this.css(this.CB["adMute"],"display","block")},fastBack:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.fastBack(),void 0;var a=this.time-this.ckConfig["config"]["timeJump"];0>a&&(a=0),this.videoSeek(a)}},fastNext:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.fastNext(),void 0;var a=this.time+this.ckConfig["config"]["timeJump"];a>this.V.duration&&(a=this.V.duration),this.videoSeek(a)}},getCurrentSrc:function(){return this.loaded?"flashplayer"==this.playerType?this.V.getCurrentSrc():this.V.currentSrc:void 0},switchFull:function(){this.full?this.quitFullScreen():this.fullScreen()},fullScreen:function(){if(this.html5Video&&"html5video"==this.playerType){var a=this.PD;a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen?a.webkitRequestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.oRequestFullscreen&&a.oRequestFullscreen(),this.judgeFullScreen()}},quitFullScreen:function(){this.html5Video&&"html5video"==this.playerType&&(document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.oRequestFullscreen?document.oCancelFullScreen():document.requestFullscreen?document.requestFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():(this.css(document.documentElement,"cssText",""),this.css(document.document.body,"cssText",""),this.css(this.PD,"cssText","")),this.judgeFullScreen())},videoRotation:function(a){var b,c,d,e,f,g,h,i,j,k;if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoRotation(a),void 0;this.isUndefined(a)&&(a=0),b=this.css(this.V,"transform"),this.isUndefined(b)&&!b&&(b="rotate(0deg)"),c=b.match(/rotate\([^)]+\)/),c=c?c[0].replace("rotate(","").replace("deg)",""):"",c=""==c?0:parseInt(c),-1==a?c-=90:1==a?c+=90:c=90!=a&&180!=a&&270!=a&&-90!=a&&-180!=a&&-270!=a?0:a,a=c,d=a%90,e=a%180,f=a%270,g=!1,0==d&&90==e&&90==f&&(g=!0),0==d&&90==e&&0==f&&(g=!0),d==-0&&-90==e&&-90==f&&(g=!0),d==-0&&-90==e&&f==-0&&(g=!0),b=b.replace(/rotate\([^)]+\)/,"").replace(/scale\([^)]+\)/,"")+" rotate("+a+"deg)",h=this.CD.offsetWidth,i=this.CD.offsetHeight,j=this.V.videoWidth,k=this.V.videoHeight,j>0&&k>0?g?(h/i>k/j?(nH=i,nW=k*nH/j):(nW=h,nH=j*nW/k),this.css(this.V,"transform","rotate(0deg)"),this.css(this.V,"transform","scale("+nH/h+","+nW/i+")"+b)):this.css(this.V,"transform",b):this.css(this.V,"transform",b)}},videoBrightness:function(a){return this.loaded?"flashplayer"==this.playerType?(this.V.videoBrightness(a),void 0):void 0:void 0},videoContrast:function(a){return this.loaded?"flashplayer"==this.playerType?(this.V.videoContrast(a),void 0):void 0:void 0},videoSaturation:function(a){return this.loaded?"flashplayer"==this.playerType?(this.V.videoSaturation(a),void 0):void 0:void 0},videoHue:function(a){return this.loaded?"flashplayer"==this.playerType?(this.V.videoHue(a),void 0):void 0:void 0},videoZoom:function(a){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoZoom(a),void 0;this.isUndefined(a)&&(a=1),0>a&&(a=0),a>2&&(a=2);var b=this.css(this.V,"transform");b=b.replace(/scale\([^)]+\)/,"")+" scale("+a+")",this.videoScale=a,this.css(this.V,"transform",b)}},videoProportion:function(a,b){return this.loaded?"flashplayer"==this.playerType?(this.V.videoProportion(a,b),void 0):void 0:void 0},adPlay:function(){var a,b;if(this.loaded)return"flashplayer"==this.playerType?(this.V.adPlay(),void 0):(this.adPlayerPlay&&(this.adIsPause=!1,a=this.getNowAdvertisements(),b=a["type"],this.isStrImage(b)?this.adCountDown():this.V.play()),void 0)},adPause:function(){var a,b;if(this.loaded)return"flashplayer"==this.playerType?(this.V.adPause(),void 0):(this.adPlayerPlay&&(this.adIsPause=!0,a=this.getNowAdvertisements(),b=a["type"],"jpg"!=b&&"jpeg"!=b&&"png"!=b&&"svg"!=b&&"gif"!=b&&this.videoPause()),void 0)},videoError:function(a){return this.loaded?"flashplayer"==this.playerType?(this.V.videoError(a),void 0):void 0:void 0},changeConfig:function(){var a,b,c,d,e;if(this.loaded)if("flashplayer"!=this.playerType){for(b=this.ckConfig,c=arguments,d=0;d<c.length-1;d++){if(!b.hasOwnProperty(c[d]))return;b=b[c[d]]}switch(e=c[c.length-1],c.length){case 2:this.ckConfig[c[0]]=e;break;case 3:this.ckConfig[c[0]][c[1]]=e;break;case 4:this.ckConfig[c[0]][c[1]][c[2]]=e;break;case 5:this.ckConfig[c[0]][c[1]][c[2]][c[3]]=e;break;case 6:this.ckConfig[c[0]][c[1]][c[2]][c[3]][c[4]]=e;break;case 7:this.ckConfig[c[0]][c[1]][c[2]][c[3]][c[4]][c[5]]=e;break;case 8:this.ckConfig[c[0]][c[1]][c[2]][c[3]][c[4]][c[5]][c[6]]=e;break;case 9:this.ckConfig[c[0]][c[1]][c[2]][c[3]][c[4]][c[5]][c[6]][c[7]]=e;break;case 10:this.ckConfig[c[0]][c[1]][c[2]][c[3]][c[4]][c[5]][c[6]][c[7]][c[8]]=e}this.sendJS("configChange",this.ckConfig)}else switch(a=Array.prototype.slice.call(arguments),a.length){case 1:this.V.changeConfig(a[0]);break;case 2:this.V.changeConfig(a[0],a[1]);break;case 3:this.V.changeConfig(a[0],a[1],a[2]);break;case 4:this.V.changeConfig(a[0],a[1],a[2],a[3]);break;case 5:this.V.changeConfig(a[0],a[1],a[2],a[3],a[4]);break;case 6:this.V.changeConfig(a[0],a[1],a[2],a[3],a[4],a[5]);break;case 7:this.V.changeConfig(a[0],a[1],a[2],a[3],a[4],a[5],a[6]);break;case 8:this.V.changeConfig(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);break;case 8:this.V.changeConfig(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8])}},custom:function(){var a,b,c,d,e;if(this.loaded){if("flashplayer"==this.playerType)return this.V.custom(arguments),void 0;if(!this.isUndefined(arguments)){if(a="",b="",c="",4==arguments.length)a="controlBar-"+arguments[1],b=arguments[2],c=arguments[3]?"block":"none";else{if(3!=arguments.length)return;a="player-"+arguments[0],b=arguments[1],c=arguments[2]?"block":"none"}for(d in this.customeElement)e=this.customeElement[d],e["type"]==a&&e["name"]==b&&this.css(e["ele"],"display",c)}}},getConfig:function(){var a,b;if(!this.loaded)return null;if("flashplayer"==this.playerType)return this.V.getConfig(arguments);a=this.ckConfig;for(b in arguments)try{a=a[arguments[b]]}catch(c){a=null}return a},openUrl:function(a){return this.loaded?"flashplayer"==this.playerType?(this.V.openUrl(a),void 0):void 0:void 0},videoClear:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoClear(),void 0;this.V.innerHTML="",this.V.src=""}},newVideo:function(a){return"flashplayer"==this.playerType?(this.V.newVideo(a),void 0):(this.embed(a),void 0)},screenshot:function(a,b,c){var e,f;if(this.loaded)if("flashplayer"!=this.playerType){if("video"==a){e=document.createElement("canvas"),e.width=this.V.videoWidth,e.height=this.V.videoHeight,e.getContext("2d").drawImage(this.V,0,0,this.V.videoWidth,this.V.videoHeight);try{f=e.toDataURL("image/jpeg"),this.sendJS("screenshot",{object:a,save:b,name:c,base64:f})}catch(d){this.log(d)}}}else try{this.V.screenshot(a,b,c)}catch(d){this.log(d)}},changeSize:function(a,b){this.isUndefined(a)&&(a=0),this.isUndefined(b)&&(b=0),a>0&&this.css(this.CD,"width",a+"px"),b>0&&this.css(this.CD,"height",b+"px"),this.html5Video&&this.playerResize()},playerResize:function(){this.controlBar(),this.elementCoordinate(),this.carbarButton(),this.customCoor(),this.timeProgressDefault(),this.videoCss(),this.timeUpdateHandler(),this.changeElementCoor(),this.changePrompt(),this.advertisementStyle(),this.adPauseCoor(),this.adOtherCoor(),this.changeLoad(),this.sendJS("resize")},changePlaybackRate:function(a){if(this.html5Video){var b=this.playbackRateArr;a=parseInt(a),a<b.length&&this.newPlaybackrate(b[a][1])}},changeControlBarShow:function(a){return this.loaded?"flashplayer"==this.playerType?(this.V.changeControlBarShow(a),void 0):(a?(this.controlBarIsShow=!0,this.controlBarHide(!1)):(this.controlBarIsShow=!1,this.controlBarHide(!0)),void 0):void 0},embedSWF:function(){var a="ckplayer-"+this.randomString(),b=this.getFlashVars(),c=this.getFlashplayerParam(),d="http://www.macromedia.com/go/getflashplayer",e="",f=ckplayerPath+"ckplayer.swf";id='id="'+a+'" name="'+a+'" ',e+='<object pluginspage="'+d+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=11,3,0,0" width="100%" height="100%" '+id+' align="middle" wmode="transparent">',e+=c["v"],e+='<param name="movie" value="'+f+'">',e+='<param name="flashvars" value="'+b+'">',e+='<param name="wmode" value="transparent">',e+='<embed wmode="transparent" '+c["w"]+' src="'+f+'" flashvars="'+b+'" width="100%" height="100%" '+id+' align="middle" type="application/x-shockwave-flash" pluginspage="'+d+'" />',e+="</object>",this.PD.innerHTML=e,this.V=this.getObjectById(a),this.playerType="flashplayer"},checkShockwaveFlash:function(){var a;if(window.ActiveXObject)try{if(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return!0}catch(b){}else try{if(a=navigator.plugins["Shockwave Flash"])return!0}catch(b){}return!1},getFlashVars:function(){var a,b,c;this.getVarsObject(),a=this.vars,b="";for(k in a)"flashplayer"!=k&&"container"!=k&&""!=a[k]&&(""!=b&&(b+="&"),c=a[k],1==c&&(c=1),0==c&&(c=0),b+=k+"="+c);return a.hasOwnProperty("volume")&&a["volume"]||(""!=b&&(b+="&"),b+="volume=0"),b},isStrImage:function(a){return"jpg"==a||"jpeg"==a||"png"==a||"svg"==a||"gif"==a?!0:!1},getVarsObject:function(){var i,j,k,a=this.vars,b="",c="",d="",e=this.VA,f=a["promptSpot"],g=0,h=this.vars["video"];if("array"==this.varType(h))for(e=h,g=0;g<e.length;g++)i=e[g],i&&(""!=b&&(b+=this.ckConfig["config"]["split"],c+=",",d+=",",a["type"]+=this.ckConfig["config"]["split"]),b+=encodeURIComponent(decodeURIComponent(i[0])),c+=i[2],d+=i[3],a["type"]+=i[1].replace("video/",""));else"object"==this.varType(h)?(b=encodeURIComponent(decodeURIComponent(h["file"])),this.isUndefined(h["type"])||(a["type"]=h["type"]),c="",d=""):b=encodeURIComponent(decodeURIComponent(h));if(null!=a["preview"]&&(a["previewscale"]=a["preview"]["scale"],a["preview"]=a["preview"]["file"].join(",")),null!=f)for(a["promptspot"]="",a["promptspottime"]="",g=0;g<f.length;g++)""!=a["promptspot"]&&(a["promptspot"]+=",",a["promptspottime"]+=","),a["promptspot"]+=f[g]["words"],a["promptspottime"]+=f[g]["time"];""!=b&&(a["video"]=b,a["definition"]=c,a["weight"]=d),a["volume"]||(a["volume"]=0),j={};for(k in a)null!=a[k]&&(j[k]=a[k]),"type"==k&&(j[k]=a[k].replace("video/m3u8","m3u8"));this.vars=j},getFlashplayerParam:function(){var d,a="",b="",c={allowScriptAccess:"always",allowFullScreen:!0,quality:"high",bgcolor:"#000"};for(d in c)a+=d+'="'+c[d]+'" ',b+='<param name="'+d+'" value="'+c[d]+'" />';return a=a.replace("movie=","src="),{w:a,v:b}},getMetaDate:function(){var a,c;if(!this.loaded||null==this.V)return!1;if("html5video"==this.playerType){a=0;try{a=isNaN(this.V.duration)?0:this.V.duration,(isNaN(a)||parseInt(a)<.2)&&this.vars["duration"]>0&&(a=this.vars["duration"]),this.vars["forceduration"]>0&&(a=this.vars["forceduration"])}catch(b){this.log(b)}return c={duration:a,volume:this.V.volume,playbackRate:this.V.playbackRate,width:this.PD.offsetWidth||this.V.offsetWidth||this.V.width,height:this.PD.offsetHeight||this.V.offsetHeight||this.V.height,streamWidth:this.V.videoWidth,streamHeight:this.V.videoHeight,videoWidth:this.V.offsetWidth,videoHeight:this.V.offsetHeight,paused:this.V.paused,loadTime:this.loadTimeTemp}}try{return this.V.getMetaDate()}catch(b){this.log(b)}return!1},getVideoUrl:function(){var a,b,c;if("flashplayer"==this.playerType)return this.V.getVideoUrl();if(a=[],this.V.src)a.push(this.V.src);else for(b=this.V.childNodes,c=0;c<b.length;c++)a.push(b[c].src);return a},clickEvent:function(a){var b,c,d,e,f,g,h,i,j,k,l;if("none"==a||""==a||null==a)return{type:"none"};if(b=a.split("->"),c="",d="",e="",f="",2==b.length){if(g=b[0],h=b[1],!h)return{type:"none"};switch(i="",j=[],c=g,g){case"actionScript":h.indexOf("(")>-1&&(j=h.split("("),h=j[0],i=j[1].replace(")","")),d=""==i?"thisTemp."+h+"()":"thisTemp."+h+"("+i+")";break;case"javaScript":if("[flashvars]"==h.substr(0,11)){if(h=h.substr(11),!this.vars.hasOwnProperty(h))break;h=this.vars[h]}h.indexOf("(")>-1&&(j=h.split("("),h=j[0],i=j[1].replace(")","")),d=""==i?h+"()":h+"("+i+")";break;case"link":if(k=(h+",").split(","),"[flashvars]"==k[0].substr(0,11)){if(l=k[0].replace("[flashvars]",""),!this.vars.hasOwnProperty(l))break;k[0]=this.vars[l]}k[1]||(k[1]="_blank"),e=k[0],f=k[1]}}return{type:c,fun:d,link:e,target:f}},getPosition:function(a,b){var c=this.PD.offsetWidth,d=this.PD.offsetHeight,e=0,f=0,g=0,h=0,i=0,j=0;switch(this.isUndefined(b)||(g=parseInt(this.css(b,"left")),h=parseInt(this.css(b,"top")),i=b.offsetWidth,j=b.offsetHeight),a["align"]){case"left":e=a["offsetX"]+g;break;case"center":e=.5*c+a["offsetX"],g&&(e-=.5*c-.5*i-g);break;case"right":e=c+a["offsetX"],g&&(e-=c-g-i)}switch(a["vAlign"]){case"top":f=a["offsetY"]+h;break;case"middle":f=.5*d+a["offsetY"]-h-.5*j,h&&(e-=.5*d-.5*j-h);break;case"bottom":f=d+a["offsetY"],h&&(f-=d-h-j)}return{x:e,y:f}},addElement:function(attribute){var i,obj,list,id,ele,bgid,bgAlpha,bgColor,html,idArr,clickArr,textObj,returnObj,clickEvent,newEleid,objClickEvent,objClickHandler,clk,clickHandler,eidCoor,thisTemp=this;if("flashplayer"==this.playerType)return this.V.addElement(attribute);if(i=0,obj={list:null,x:"100%",y:"50%",position:null,alpha:1,backgroundColor:"",backAlpha:1,backRadius:0,clickEvent:""},obj=this.standardization(obj,attribute),list=obj["list"],null==list)return"";if(id="element-"+this.randomString(10),ele=document.createElement("div"),ele.className=id,obj["x"]&&ele.setAttribute("data-x",obj["x"]),obj["y"]&&ele.setAttribute("data-y",obj["y"]),null!=obj["position"]&&ele.setAttribute("data-position",obj["position"].join(",")),this.PD.appendChild(ele),this.css(ele,{position:"absolute",filter:"alpha(opacity:"+obj["alpha"]+")",opacity:obj["alpha"].toString(),width:"800px",zIndex:"20"}),bgid="elementbg"+this.randomString(10),bgAlpha=obj["alpha"].toString(),bgColor=obj["backgroundColor"].replace("0x","#"),html="",idArr=[],clickArr=[],!this.isUndefined(list)&&list.length>0)for(i=0;i<list.length;i++){switch(newEleid="elementnew"+this.randomString(10),list[i]["type"]){case"image":case"png":case"jpg":case"jpeg":case"gif":textObj={type:"image",file:"",radius:0,width:30,height:30,alpha:1,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginRight:0,marginTop:0,marginBottom:0,backgroundColor:"",clickEvent:""},list[i]=this.standardization(textObj,list[i]),clickEvent=this.clickEvent(list[i]["clickEvent"]),clickArr.push(clickEvent),html+="link"==clickEvent["type"]?'<div class="'+newEleid+'" data-i="'+i+'"><a href="'+clickEvent["link"]+'" target="'+clickEvent["target"]+'"><img class="'+newEleid+'_image" src="'+list[i]["file"]+'" style="border:0;"></a></div>':'<div class="'+newEleid+'" data-i="'+i+'"><img class="'+newEleid+'_image" src="'+list[i]["file"]+'" style="border:0;"></div>';break;case"text":textObj={type:"text",text:"",color:"0xFFFFFF",size:14,fontFamily:this.fontFamily,leading:0,alpha:1,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginRight:0,marginTop:0,marginBottom:0,backgroundColor:"",backAlpha:1,backRadius:0,clickEvent:""},list[i]=this.standardization(textObj,list[i]),clickEvent=this.clickEvent(list[i]["clickEvent"]),clickArr.push(clickEvent),html+="link"==clickEvent["type"]?'<div class="'+newEleid+'" data-i="'+i+'"><div class="'+newEleid+'_bg"></div><div class="'+newEleid+'_text"><a href="'+clickEvent["link"]+'" target="'+clickEvent["target"]+'">'+list[i]["text"]+"</a></div></div>":'<div class="'+newEleid+'" data-i="'+i+'"><div class="'+newEleid+'_bg"></div><div class="'+newEleid+'_text">'+list[i]["text"]+"</div></div>"}idArr.push(newEleid)}for(objClickEvent=this.clickEvent(obj["clickEvent"]),ele.innerHTML='<div class="'+bgid+'"></div><div class="'+bgid+'_c">'+html+"</div>",("javaScript"==objClickEvent["type"]||"actionScript"==objClickEvent["type"])&&(objClickHandler=function(){eval(objClickEvent["fun"]),thisTemp.sendJS("clickEvent",clk["type"]+"->"+clk["fun"].replace("thisTemp.","").replace("()",""))},this.addListenerInside("click",objClickHandler,this.getByElement(bgid+"_c"))),this.css(bgid+"_c",{position:"absolute",zIndex:"2"}),i=0;i<idArr.length;i++)switch(clk=clickArr[i],("javaScript"==clk["type"]||"actionScript"==clk["type"])&&(clickHandler=function(){clk=clickArr[thisTemp.getDataset(this,"i")],eval(clk["fun"]),thisTemp.sendJS("clickEvent",clk["type"]+"->"+clk["fun"].replace("thisTemp.","").replace("()",""))},this.addListenerInside("click",clickHandler,this.getByElement(idArr[i]))),list[i]["type"]){case"image":case"png":case"jpg":case"jpeg":case"gif":this.css(idArr[i],{"float":"left",width:list[i]["width"]+"px",height:list[i]["height"]+"px",filter:"alpha(opacity:"+list[i]["alpha"]+")",opacity:list[i]["alpha"].toString(),marginLeft:list[i]["marginLeft"]+"px",marginRight:list[i]["marginRight"]+"px",marginTop:list[i]["marginTop"]+"px",marginBottom:list[i]["marginBottom"]+"px",borderRadius:list[i]["radius"]+"px",cursor:"pointer"}),this.css(idArr[i]+"_image",{width:list[i]["width"]+"px",height:list[i]["height"]+"px",borderRadius:list[i]["radius"]+"px"});break;case"text":this.css(idArr[i]+"_text",{filter:"alpha(opacity:"+list[i]["alpha"]+")",opacity:list[i]["alpha"].toString(),borderRadius:list[i]["radius"]+"px",fontFamily:list[i]["font"],fontSize:list[i]["size"]+"px",color:list[i]["color"].replace("0x","#"),lineHeight:list[i]["leading"]>0?list[i]["leading"]+"px":"",paddingLeft:list[i]["paddingLeft"]+"px",paddingRight:list[i]["paddingRight"]+"px",paddingTop:list[i]["paddingTop"]+"px",paddingBottom:list[i]["paddingBottom"]+"px",whiteSpace:"nowrap",position:"absolute",zIndex:"3",cursor:"pointer"}),this.css(idArr[i],{"float":"left",width:this.getByElement(idArr[i]+"_text").offsetWidth+"px",height:this.getByElement(idArr[i]+"_text").offsetHeight+"px",marginLeft:list[i]["marginLeft"]+"px",marginRight:list[i]["marginRight"]+"px",marginTop:list[i]["marginTop"]+"px",marginBottom:list[i]["marginBottom"]+"px"}),this.css(idArr[i]+"_bg",{width:this.getByElement(idArr[i]+"_text").offsetWidth+"px",height:this.getByElement(idArr[i]+"_text").offsetHeight+"px",filter:"alpha(opacity:"+list[i]["backAlpha"]+")",opacity:list[i]["backAlpha"].toString(),borderRadius:list[i]["backRadius"]+"px",backgroundColor:list[i]["backgroundColor"].replace("0x","#"),position:"absolute",zIndex:"2"})}return this.css(bgid,{width:this.getByElement(bgid+"_c").offsetWidth+"px",height:this.getByElement(bgid+"_c").offsetHeight+"px",position:"absolute",filter:"alpha(opacity:"+bgAlpha+")",opacity:bgAlpha,backgroundColor:bgColor.replace("0x","#"),borderRadius:obj["backRadius"]+"px",zIndex:"1"}),this.css(ele,{width:this.getByElement(bgid).offsetWidth+"px",height:this.getByElement(bgid).offsetHeight+"px"}),eidCoor=this.calculationCoor(ele),this.css(ele,{left:eidCoor["x"]+"px",top:eidCoor["y"]+"px"}),this.elementArr.push(ele.className),ele},getElement:function(a){var b,c;return"flashplayer"==this.playerType?this.V.getElement(a):(b=a,"string"==this.varType(a)&&(b=this.getByElement(a)),c=this.getCoor(b),{x:c["x"],y:c["y"],width:b.offsetWidth,height:b.offsetHeight,alpha:this.isUndefined(this.css(b,"opacity"))?1:parseFloat(this.css(b,"opacity")),show:"none"==this.css(b,"display")?!1:!0})},elementShow:function(a,b){var c,d;if("flashplayer"==this.playerType)return this.V.elementShow(a,b),void 0;if("string"==this.varType(a))if(a)this.css(ele,"display",1==b?"block":"none");else for(c=this.elementTempArr,d=0;d<c.length;d++)this.css(c[d],"display",1==b?"block":"none")},calculationCoor:function(a){var b,c,d,e,f,g,h,j;if("flashplayer"==this.playerType)return this.V.calculationCoor(a);if(!this.isUndefined(a)&&a!=[]){if(d=[],e=this.PD.offsetWidth,f=this.PD.offsetHeight,g=a.offsetWidth,h=a.offsetHeight,this.isUndefined(this.getDataset(a,"x"))||(b=this.getDataset(a,"x")),this.isUndefined(this.getDataset(a,"y"))||(c=this.getDataset(a,"y")),!this.isUndefined(this.getDataset(a,"position")))try{d=this.getDataset(a,"position").toString().split(",")}catch(i){}if(d.length>0){for(d.push(null,null,null,null),j=0,j=0;j<d.length;j++)d[j]=this.isUndefined(d[j])||null==d[j]||"null"==d[j]||""==d[j]?null:parseFloat(d[j]);if(null==d[2])switch(d[0]){case 0:b=0;break;case 1:b=parseInt(.5*(e-g));break;default:b=e-g}else switch(d[0]){case 0:b=d[2];break;case 1:b=parseInt(.5*e)+d[2];break;default:b=e+d[2]}if(null==d[3])switch(d[1]){case 0:c=0;break;case 1:c=parseInt(.5*(f-h));break;default:c=f-h}else switch(d[1]){case 0:c=d[3];break;case 1:c=parseInt(.5*f)+d[3];break;default:c=f+d[3]}}else"%"==b.substring(b.length-1,b.length)&&(b=Math.floor(.01*parseInt(b.substring(0,b.length-1))*e)),"%"==c.substring(c.length-1,c.length)&&(c=Math.floor(.01*parseInt(c.substring(0,c.length-1))*f));return{x:b,y:c}}},changeElementCoor:function(){var a,b;for(a=0;a<this.elementArr.length;a++)this.isUndefined(this.getByElement(this.elementArr[a]))||this.getByElement(this.elementArr[a])!=[]&&(b=this.calculationCoor(this.getByElement(this.elementArr[a])),b["x"]&&b["y"]&&this.css(this.elementArr[a],{top:b["y"]+"px",left:b["x"]+"px"}))},tween:function(){var a={None:{easeIn:function(a,b,c,d){return c*a/d+b},easeOut:function(a,b,c,d){return c*a/d+b},easeInOut:function(a,b,c,d){return c*a/d+b}},Quadratic:{easeIn:function(a,b,c,d){return c*(a/=d)*a+b},easeOut:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOut:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}},Cubic:{easeIn:function(a,b,c,d){return c*(a/=d)*a*a+b},easeOut:function(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},easeInOut:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b}},Quartic:{easeIn:function(a,b,c,d){return c*(a/=d)*a*a*a+b},easeOut:function(a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b},easeInOut:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b}},Quintic:{easeIn:function(a,b,c,d){return c*(a/=d)*a*a*a*a+b},easeOut:function(a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},easeInOut:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b}},Sine:{easeIn:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},easeOut:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},easeInOut:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b}},Exponential:{easeIn:function(a,b,c,d){return 0==a?b:c*Math.pow(2,10*(a/d-1))+b},easeOut:function(a,b,c,d){return a==d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b},easeInOut:function(a,b,c,d){return 0==a?b:a==d?b+c:(a/=d/2)<1?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b}},Circular:{easeIn:function(a,b,c,d){return-c*(Math.sqrt(1-(a/=d)*a)-1)+b},easeOut:function(a,b,c,d){return c*Math.sqrt(1-(a=a/d-1)*a)+b},easeInOut:function(a,b,c,d){return(a/=d/2)<1?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b}},Elastic:{easeIn:function(a,b,c,d,e,f){var g;return 0==a?b:1==(a/=d)?b+c:(f||(f=.3*d),!e||e<Math.abs(c)?(e=c,g=f/4):g=f/(2*Math.PI)*Math.asin(c/e),-(e*Math.pow(2,10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f))+b)},easeOut:function(a,b,c,d,e,f){var g;return 0==a?b:1==(a/=d)?b+c:(f||(f=.3*d),!e||e<Math.abs(c)?(e=c,g=f/4):g=f/(2*Math.PI)*Math.asin(c/e),e*Math.pow(2,-10*a)*Math.sin((a*d-g)*2*Math.PI/f)+c+b)},easeInOut:function(a,b,c,d,e,f){var g;return 0==a?b:2==(a/=d/2)?b+c:(f||(f=d*.3*1.5),!e||e<Math.abs(c)?(e=c,g=f/4):g=f/(2*Math.PI)*Math.asin(c/e),1>a?-.5*e*Math.pow(2,10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f)+b:.5*e*Math.pow(2,-10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f)+c+b)}},Back:{easeIn:function(a,b,c,d,e){return void 0==e&&(e=1.70158),c*(a/=d)*a*((e+1)*a-e)+b},easeOut:function(a,b,c,d,e){return void 0==e&&(e=1.70158),c*((a=a/d-1)*a*((e+1)*a+e)+1)+b},easeInOut:function(a,b,c,d,e){return void 0==e&&(e=1.70158),(a/=d/2)<1?c/2*a*a*(((e*=1.525)+1)*a-e)+b:c/2*((a-=2)*a*(((e*=1.525)+1)*a+e)+2)+b}},Bounce:{easeIn:function(b,c,d,e){return d-a.Bounce.easeOut(e-b,0,d,e)+c},easeOut:function(a,b,c,d){return(a/=d)<1/2.75?c*7.5625*a*a+b:2/2.75>a?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:2.5/2.75>a?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},easeInOut:function(b,c,d,e){return e/2>b?.5*a.Bounce.easeIn(2*b,0,d,e)+c:.5*a.Bounce.easeOut(2*b-e,0,d,e)+.5*d+c}}};return a},animate:function(attribute){var thisTemp,animateId,obj,w,h,effArr,tweenFun,eleCoor,def,css,pm,t,b,c,d,timerTween,tweenObj,start,end,callBack,stopTween,tweenX,tweenY,tweenAlpha,mouseOver,mouseOut;if("flashplayer"==this.playerType)return this.V.animate(attribute);if(thisTemp=this,animateId="animate_"+this.randomString(),obj={element:null,parameter:"x","static":!1,effect:"None.easeIn",start:null,end:null,speed:0,overStop:!1,pauseStop:!1,callBack:null},obj=this.standardization(obj,attribute),null==obj["element"]||0==obj["speed"])return!1;if(w=this.PD.offsetWidth,h=this.PD.offsetHeight,effArr=(obj["effect"]+".").split("."),tweenFun=this.tween()[effArr[0]][effArr[1]],eleCoor={x:0,y:0},this.isUndefined(tweenFun))return!1;switch(def=this.arrIndexOf(this.elementArr,obj["element"].className),def>-1&&(this.elementTempArr.push(obj["element"].className),this.elementArr.splice(def,1)),css={},pm=this.getElement(obj["element"]),t=0,b=0,c=0,d=1e3*obj["speed"],timerTween=null,tweenObj=null,start=null==obj["start"]?"":obj["start"].toString(),end=null==obj["end"]?"":obj["end"].toString(),obj["parameter"]){case"x":b=null==obj["start"]?pm["x"]:"%"==start.substring(start.length-1,start.length)?.01*parseInt(start)*w:parseInt(start),c=null==obj["end"]?pm["x"]-b:"%"==end.substring(end.length-1,end.length)?.01*parseInt(end)*w-b:"-"==end.substring(0,1)||"+"==end.substring(0,1)?"number"==this.varType(obj["end"])?parseInt(obj["end"])-b:parseInt(end):parseInt(end)-b;break;case"y":b=null==obj["start"]?pm["y"]:"%"==start.substring(start.length-1,start.length)?.01*parseInt(start)*h:parseInt(start),c=null==obj["end"]?pm["y"]-b:"%"==end.substring(end.length-1,end.length)?.01*parseInt(end)*h-b:"-"==end.substring(0,1)||"+"==end.substring(0,1)?"number"==this.varType(obj["end"])?parseInt(obj["end"])-b:parseInt(end):parseInt(end)-b;break;case"alpha":b=null==obj["start"]?100*pm["alpha"]:"%"==start.substring(start.length-1,start.length)?parseInt(obj["start"]):parseInt(100*obj["start"]),c=null==obj["end"]?100*pm["alpha"]-b:"%"==end.substring(end.length-1,end.length)?parseInt(end)-b:"-"==end.substring(0,1)||"+"==end.substring(0,1)?"number"==this.varType(obj["end"])?100*parseInt(obj["end"])-b:100*parseInt(obj["end"]):100*parseInt(obj["end"])-b}switch(callBack=function(){var cb,index=thisTemp.arrIndexOf(thisTemp.animateElementArray,animateId);index>-1&&(thisTemp.animateArray.splice(index,1),thisTemp.animateElementArray.splice(index,1)),index=thisTemp.arrIndexOf(thisTemp.animatePauseArray,animateId),index>-1&&thisTemp.animatePauseArray.splice(index,1),null!=obj["callBack"]&&obj["element"]&&"callBack"!=obj["callBack"]&&"tweenX"!=obj["callBack"]&&"callBack"!=obj["tweenY"]&&"tweenAlpha"!=obj["callBack"]&&(cb=eval(obj["callBack"]),cb(obj["element"]),obj["callBack"]=null)},stopTween=function(){null!=timerTween&&(timerTween.runing&&timerTween.stop(),timerTween=null)},tweenX=function(){if(d>t)t+=10,css={left:Math.ceil(tweenFun(t,b,c,d))+"px"},obj["static"]&&(eleCoor=thisTemp.calculationCoor(obj["element"]),css["top"]=eleCoor["y"]+"px"),thisTemp.css(obj["element"],css);else{stopTween();try{var a=this.arrIndexOf(this.elementTempArr,obj["element"].className);a>-1&&this.elementTempArr.splice(a,1)}catch(e){}thisTemp.elementArr.push(obj["element"].className),callBack()}},tweenY=function(){if(d>t)t+=10,css={top:Math.ceil(tweenFun(t,b,c,d))+"px"},obj["static"]&&(eleCoor=thisTemp.calculationCoor(obj["element"]),css["left"]=eleCoor["x"]+"px"),thisTemp.css(obj["element"],css);else{stopTween();try{var a=this.arrIndexOf(this.elementTempArr,obj["element"].className);a>-1&&this.elementTempArr.splice(a,1)}catch(e){}thisTemp.elementArr.push(obj["element"].className),callBack()}},tweenAlpha=function(){var a,e;if(d>t)t+=10,eleCoor=thisTemp.calculationCoor(obj["element"]),a=.01*Math.ceil(tweenFun(t,b,c,d)),css={filter:"alpha(opacity:"+a+")",opacity:a.toString()},obj["static"]&&(eleCoor=thisTemp.calculationCoor(obj["element"]),css["top"]=eleCoor["y"]+"px",css["left"]=eleCoor["x"]+"px"),thisTemp.css(obj["element"],css);else{stopTween();try{e=this.arrIndexOf(this.elementTempArr,obj["element"].className),e>-1&&this.elementTempArr.splice(e,1)}catch(f){}thisTemp.elementArr.push(obj["element"].className),callBack()}},obj["parameter"]){case"x":tweenObj=tweenX;break;case"y":tweenObj=tweenY;break;case"alpha":tweenObj=tweenAlpha}return timerTween=new thisTemp.timer(10,tweenObj),timerTween.callBackFunction=callBack,obj["overStop"]&&(mouseOver=function(){null!=timerTween&&timerTween.runing&&timerTween.stop()},this.addListenerInside("mouseover",mouseOver,obj["element"]),mouseOut=function(){var a=!0;obj["pauseStop"]&&thisTemp.getMetaDate()["paused"]&&(a=!1),null!=timerTween&&!timerTween.runing&&a&&timerTween.start()},this.addListenerInside("mouseout",mouseOut,obj["element"])),this.animateArray.push(timerTween),this.animateElementArray.push(animateId),obj["pauseStop"]&&this.animatePauseArray.push(animateId),animateId},animateResume:function(a){var b,c,d;if("flashplayer"==this.playerType)return this.V.animateResume(this.isUndefined(a)?"":a),void 0;for(b=[],""==a||this.isUndefined(a)||"pause"==a?b="pause"===a?this.animatePauseArray:this.animateElementArray:b.push(a),c=0;c<b.length;c++)d=this.arrIndexOf(this.animateElementArray,b[c]),d>-1&&this.animateArray[d].start()
},animatePause:function(a){var b,c,d;if("flashplayer"==this.playerType)return this.V.animatePause(this.isUndefined(a)?"":a),void 0;for(b=[],""==a||this.isUndefined(a)||"pause"==a?b="pause"===a?this.animatePauseArray:this.animateElementArray:b.push(a),c=0;c<b.length;c++)d=this.arrIndexOf(this.animateElementArray,b[c]),d>-1&&this.animateArray[d].stop()},deleteAnimate:function(a){if("flashplayer"==this.playerType&&this.V)try{this.V.deleteAnimate(a)}catch(b){this.log(b)}else{var c=this.arrIndexOf(this.animateElementArray,a);c>-1&&(this.animateArray[c].callBackFunction(),this.animateArray.splice(c,1),this.animateElementArray.splice(c,1))}},deleteElement:function(a){if("flashplayer"==this.playerType&&this.V)try{this.V.deleteElement(a)}catch(b){}else{var c=this.arrIndexOf(this.elementArr,a.className);c>-1&&this.elementArr.splice(c,1);try{c=this.arrIndexOf(this.elementTempArr,a.className),c>-1&&this.elementTempArr.splice(c,1)}catch(b){}this.deleteAnimate(a.className),this.deleteChild(a)}},getByElement:function(a,b){var c,d,e,f,g;if(this.isUndefined(b)&&(b=document),c=a.substr(0,1),d=[],"#"!=c){if("."==c&&(a=a.substr(1,a.length)),b.getElementsByClassName){if(d=b.getElementsByClassName(a),!d.length)return null}else for(e=new RegExp(" "+a+" ","i"),f=b.getElementsByTagName("*"),g=0;g<f.length;g++)e.test(" "+f[g].className+" ")&&d.push(f[g]);d=d.length>0?d[0]:null}else{"#"==c&&(a=a.substr(1,a.length));try{d=document.getElementById(a)}catch(h){d=null}}return d},css:function(a,b,c){var f,d=0,e="";if("array"!=this.varType(a))if("string"==this.varType(a)&&(a=this.getByElement(a)),"object"!=this.varType(b)){if(this.isUndefined(c))return this.isUndefined(this.getStyle(a,b))?!1:this.getStyle(a,b);a.style[b]=c}else for(e in b)this.isUndefined(b[e])||(a.style[e]=b[e]);else for(d=0;d<a.length;d++)if(f="string"==typeof a[d]?this.getByElement(a[d]):a[d],"object"!=typeof b)this.isUndefined(c)||(f.style[b]=c);else for(e in b)if(!this.isUndefined(b[e]))try{f.style[e]=b[e]}catch(g){this.log(g)}},getStyle:function(a,b){return this.isUndefined(a.style[b])?a.currentStyle?a.currentStyle[b]:getComputedStyle(a,!1)[b]:a.style[b]},isUndefined:function(a){try{if("undefined"===a||void 0===a||null===a||"NaN"===a||0/0===a)return!0}catch(b){return this.log(b),!0}return!1},addListener:function(a,b){var c,d,e,f;if(a&&b){if("flashplayer"==this.playerType)return c="","function"==this.varType(b)&&(c=this.getParameterNames(b)),this.V.addListener(a,c),void 0;for(d=!1,e=0;e<this.listenerJsArr.length;e++)if(f=this.listenerJsArr[e],f[0]==a&&f[1]==b){d=!0;break}d||this.listenerJsArr.push([a,b])}},removeListener:function(a,b){var c,d,e;if(a&&b){if("flashplayer"==this.playerType)return c="","function"==this.varType(b)&&(c=this.getParameterNames(b)),this.V.removeListener(a,c),void 0;for(d=0;d<this.listenerJsArr.length;d++)if(e=this.listenerJsArr[d],e[0]==a&&e[1]==b){this.listenerJsArr.splice(d,1);break}}},addListenerInside:function(a,b,c,d){this.isUndefined(d)&&(d=!1);var e=this.V;if(this.isUndefined(c)||(e=c),e.addEventListener)try{e.addEventListener(a,b,d)}catch(f){this.log(f)}else if(e.attachEvent)try{e.attachEvent("on"+a,b)}catch(f){this.log(f)}else e["on"+a]=b},removeListenerInside:function(a,b,c,d){this.isUndefined(d)&&(d=!1);var e=this.V;if(this.isUndefined(c)||(e=c),e.removeEventListener)try{this.addNum--,e.removeEventListener(a,b,d)}catch(a){}else if(e.detachEvent)try{e.detachEvent("on"+a,b)}catch(a){}else e["on"+a]=null},sendJS:function(a,b){var c,d,e,f;if(!(this.adPlayerPlay&&"Ad"!=a.substr(-2)||this.isUndefined(a)))for(c=this.listenerJsArr,d=this.vars["variable"],this.vars["debug"]&&this.log(a+":"+b),e=0;e<c.length;e++)if(f=c[e],f[0]==a)if(this.isUndefined(b))f[1](d);else switch(f[1].length){case 1:f[1](b);break;case 2:f[1](b,d);break;default:f[1]()}},getParameterNames:function(a){var b,c,d;return"function"!==this.varType(a)?!1:(b=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,c=a.toString().replace(b,""),d=c.slice(c.indexOf(" ")+1,c.indexOf("(")),null===d?!1:d)},replaceTime:function(a,b){for(var c in b)a=a.replace("[$"+c+"]",b[c]);return a},formatTime:function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;(this.isUndefined(a)||isNaN(a))&&(seconds=0),(this.isUndefined(b)||isNaN(b))&&(b=0),d=Math.floor(a/60),e=d,f=Math.floor(a/3600),g=a%60,d>=60&&(e=Math.floor(d%60)),h=Math.floor(b/60),i=h,j=Math.floor(b/3600),k=b%60,h>=60&&(i=Math.floor(h%60)),l=new Date,m={timeh:f,timei:e,timeI:d,times:g,timeS:a,durationh:j,durationi:i,durationI:h,durations:k,durationS:b,liveTimey:l.getYear(),liveTimeY:l.getFullYear(),liveTimem:l.getMonth()+1,liveTimed:l.getDate(),liveTimeh:l.getHours(),liveTimei:l.getMinutes(),liveTimes:l.getSeconds()};for(n in m)m[n]=m[n]<10?"0"+Math.floor(m[n]):Math.floor(m[n]).toString();return this.replaceTime(c,m)},randomString:function(a){var b,c,d;for(a=a||16,b="abcdefghijklmnopqrstuvwxyz",c=b.length,d="",i=0;a>i;i++)d+=b.charAt(Math.floor(Math.random()*c));return"ch"+d},getStringLen:function(a){var b,c;if(this.isUndefined(a))return 0;for(b=0,c=0;c<a.length;c++)a.charCodeAt(c)>127||94==a.charCodeAt(c)?b+=2:b++;return b},createXHR:function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){this.eject(this.errorList[7])}}else this.eject(this.errorList[8])},ajax:function(cObj){var xhr,oHead,oScript,callbackName,params,thisTemp=this,callback=null,obj={method:"get",dataType:"json",charset:"utf-8",async:!1,url:"",data:null,success:null,error:null};if("object"!=this.varType(cObj))return this.eject(this.errorList[9]),void 0;if(obj=this.standardization(obj,cObj),"json"===obj.dataType||"text"===obj.dataType||"html"===obj.dataType||"xml"===obj.dataType){if(xhr=this.createXHR(),callback=function(){if(200==xhr.status){if(thisTemp.isUndefined(obj.success))return;if("json"===obj.dataType)try{obj.success(eval("("+xhr.responseText+")"))}catch(event){thisTemp.isUndefined(obj["error"])||obj.error(event)}else obj.success(xhr.responseText)}else obj.success(null),thisTemp.eject(thisTemp.errorList[10],"Ajax.status:"+xhr.status)},obj.url=-1==obj.url.indexOf("?")?obj.url+"?rand="+this.randomString(6):obj.url,obj.data=this.formatParams(obj.data),"get"!==obj.method||this.isUndefined(obj.data)||""!=obj.data&&(obj.url+=-1==obj.url.indexOf("?")?"?"+obj.data:"&"+obj.data),obj.async===!0&&(xhr.onreadystatechange=function(){4==xhr.readyState&&null!=callback&&callback()}),xhr.open(obj.method,obj.url,obj.async),"post"===obj.method)try{xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xhr.setRequestHeader("charset",obj["charset"]),xhr.send(obj.data)}catch(event){callback()}else try{xhr.send(null)}catch(event){callback()}obj.async===!1&&callback()}else"jsonp"===obj.dataType&&(oHead=document.getElementsByTagName("head")[0],oScript=document.createElement("script"),callbackName="callback"+(new Date).getTime(),params=this.formatParams(obj.data)+"&callback="+callbackName,callback=obj.success,oScript.src=obj.url.split("?")+"?"+params,oHead.insertBefore(oScript,oHead.firstChild),window[callbackName]=function(a){callback(a),oHead.removeChild(oScript)})},loadJs:function(a,b){var c=document.getElementsByTagName("HEAD").item(0),d=document.createElement("script");d.type="text/javascript",d.src=this.getNewUrl(a),c.appendChild(d),d.onload=function(){b()}},isMsie:function(){var a=navigator.appName,b=navigator.appVersion,c=b.split(";"),d="";return c.length>1&&(d=c[1].replace(/[ ]/g,"")),"Microsoft Internet Explorer"!=a||"MSIE6.0"!=d&&"MSIE7.0"!=d&&"MSIE8.0"!=d&&"MSIE9.0"!=d&&"MSIE10.0"!=d?!0:!1},uploadFlash:function(){var a;if(navigator.userAgent.indexOf("MSIE")>0)try{return a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),!0}catch(b){return!1}return navigator.userAgent.indexOf("Firefox")>0?(a=navigator.plugins["Shockwave Flash"],a?!0:!1):!0},supportVideo:function(){var a,b,d;if(!this.isMsie())return!1;if(document.createElement("video").canPlayType){a=document.createElement("video");try{b=a.canPlayType('video/ogg; codecs="theora, vorbis"')}catch(c){b=!1}if(b)return"probably"==b?!0:!1;try{d=a.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')}catch(c){d=!1}return d?"probably"==d?!0:!1:!1}return!1},getDataset:function(a,b){try{return a.dataset[b]}catch(c){try{return a.getAttribute("data-"+b)}catch(c){return!1}}},getObjectById:function(a){var e,b=null,c=this.getByElement("#"+a),d="embed";return c&&"OBJECT"==c.nodeName&&("undefined"!=this.varType(c.SetVariable)?b=c:(e=c.getElementsByTagName(d)[0],e&&(b=e))),b},formatParams:function(a){var c,b=[];for(c in a)b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")},arrSort:function(a){var c,d,b=[];for(c=0;c<a.length;c++)for(d=0;d<a.length-c;d++)!this.isUndefined(a[d+1])&&a[d][3]<a[d+1][3]&&(b=a[d+1],a[d+1]=a[d],a[d]=b);return a},getFileName:function(a){return a?a.replace(/(.*\/)*([^.]+).*/gi,"$2"):""},getFileExt:function(a){if(""!=a&&!this.isUndefined(a)){a.indexOf("?")>-1&&(a=a.split("?")[0]);var b="."+a.replace(/.+\./,"");return b.toLowerCase()}return""},isMobile:function(){return navigator.userAgent.toLowerCase().match(/(iphone|ipad|ipod|android|ios|midp|windows mobile|windows ce|rv:1.2.3.4|ucweb)/i)?!0:!1},isContains:function(a,b){return a.indexOf(b)>-1},getNewUrl:function(a){return a+=this.isContains(a,"?")?"&"+this.randomString(8)+"="+this.randomString(8):"?"+this.randomString(8)+"="+this.randomString(8)},client:function(a){var b=a||window.event;return this.isUndefined(b)&&(b={clientX:0,clientY:0}),{x:b.clientX+(document.documentElement.scrollLeft||this.body.scrollLeft)-this.pdCoor["x"],y:b.clientY+(document.documentElement.scrollTop||this.body.scrollTop)-this.pdCoor["y"]}},getCoor:function(a){var b=this.getXY(a);return{x:b["x"]-this.pdCoor["x"],y:b["y"]-this.pdCoor["y"]}},getXY:function(a){for(var b=a,c=a.offsetLeft,d=a.offsetTop;b=b.offsetParent;)c+=b.offsetLeft,d+=b.offsetTop;return{x:c,y:d}},removeChild:function(){var a,b,c;if("html5video"==this.playerType){for(a=0,b=[this.timerError,this.timerFull,this.timerTime,this.timerBuffer,this.timerClick,this.timerCBar,this.timerVCanvas],a=0;a<b.length;a++)null!=b[a]&&(b[a].runing&&b[a].stop(),b[a]=null);for(c=this.listenerJsArr,a=0;a<c.length;a++)this.removeListener(c[a][0],c[a][1])}""==this.playerType,this.V=null,this.conBarShow&&this.deleteChild(this.CB["menu"]),this.deleteChild(this.PD),this.CD.innerHTML=""},canvasFill:function(a,b){var c,d;for(a.beginPath(),c=0;c<b.length;c++)d=b[c],c>0?a.lineTo(d[0],d[1]):a.moveTo(d[0],d[1]);a.closePath(),a.fill()},canvasFillRect:function(a,b){var c,d;for(c=0;c<b.length;c++)d=b[c],a.fillRect(d[0],d[1],d[2],d[3])},deleteChild:function(a){var c,d,b=this.arrIndexOf(this.elementArr,a.className);for(b>-1&&this.elementArr.splice(b,1),c=a.childNodes,d=c.length-1;d>=0;d--)a.removeChild(c[d]);if(a&&null!=a&&a.parentNode)try{a.parentNode&&a.parentNode.removeChild(a)}catch(e){}},getProportionCoor:function(a,b,c,d){var e=0,f=0,g=0,h=0;return c/d>a/b?(e=a,f=e*d/c):(f=b,e=f*c/d),g=.5*(a-e),h=.5*(b-f),{width:parseInt(e),height:parseInt(f),x:parseInt(g),y:parseInt(h)}},parseSrtSubtitles:function(a){var h,i,j,k,l,m,n,o,b=[],c=[],d=0,e=a.split("\n"),f=[],g=function(a){return a.replace(/<[^>]+>/g,"")};for(d=0;d<e.length;d++)e[d].replace(/\s/g,"").length>0?f.push(e[d]):(f.length>0&&c.push(f),f=[]);for(d=0;d<c.length;++d)if(h=c[d],h.length>=2){if(i=h[0],j=this.toSeconds(this.trim(h[1].split(" --> ")[0])),k=this.toSeconds(this.trim(h[1].split(" --> ")[1])),l=[g(h[2])],m=this.vars["cktrackdelay"],0!=m&&(j+=m,k+=m),h.length>2)for(n=3;n<h.length;n++)l.push(g(h[n]));o={sn:i,startTime:j,endTime:k,content:l},b.push(o)}return b},timer:function(a,b,c){var d=this;this.time=10,this.fun=null,this.timeObj=null,this.number=0,this.numberTotal=null,this.runing=!1,this.startFun=function(){d.number++,d.fun(),null!=d.numberTotal&&d.number>=d.numberTotal&&d.stop()},this.start=function(){d.runing||(d.runing=!0,d.timeObj=window.setInterval(d.startFun,a))},this.stop=function(){d.runing&&(d.runing=!1,window.clearInterval(d.timeObj),d.timeObj=null)},a&&(this.time=a),b&&(this.fun=b),c&&(this.numberTotal=c),this.start()},toSeconds:function(a){var c,b=0;if(a)for(c=a.split(":"),i=0;i<c.length;i++)b=60*b+parseFloat(c[i].replace(",","."));return b},arrayInt:function(a){var d,b=a.split(","),c=[];for(d=0;d<b.length;d++)this.isUndefined(b[d])&&(b[d]=0),"%"!=b[d].substr(-1)&&(b[d]=parseInt(b[d])),c.push(b[d]);return c},standardization:function(a,b){var d,e,c={};for(d in a)c[d]=a[d];for(d in b)switch(e="",c[d]&&(e=this.varType(c[d])),e){case"number":c[d]=parseFloat(b[d]);break;default:c[d]=b[d]}return c},objectAssign:function(a,b){var c,d,e;if("object"!=this.varType(a)||"object"!=this.varType(b))return null;c=this.newObj(a),d=this.newObj(b);for(e in d)"object"==this.varType(d[e])?("object"!=this.varType(c[e])&&(c[e]={}),c[e]=this.objectAssign(c[e],d[e])):c[e]=d[e];return c},arrIndexOf:function(a,b){if(this.isUndefined(a)||this.isUndefined(b))return-1;var c=new RegExp(b,[""]);return a.toString().replace(c,"┢").replace(/[^,┢]/g,"").indexOf("┢")},trim:function(a){return""!=a?a.replace(/(^\s*)|(\s*$)/g,""):""},log:function(a){try{console.log(a)}catch(b){}},eject:function(a,b){var c,d;if(this.vars["debug"]){c=a[1],this.isUndefined(b)||(c=c.replace("[error]",b)),d="error "+a[0]+":"+c;try{this.log(d)}catch(e){}}},sysError:function(a,b){var e,c=this.getByElement(this.vars["container"]),d=a[1];this.isUndefined(b)||(d=d.replace("[error]",b)),e="error "+a[0]+":"+d,c.innerHTML=e,this.css(c,{backgroundColor:"#000",color:"#FFF",textAlign:"center",lineHeight:c.offsetHeight+"px"})},varType:function(a){if(null===a)return"string";var b=typeof a;switch(b){case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"function";case"symbol":return"symbol";case"object":return this.isUndefined(typeof a.length)?"object":"array";case"undefined":return"undefined";default:return typeof a}},getConfigObject:function(){return this.jsonConfig},getStyleObject:function(){return this.jsonStyle},getLanguageObject:function(){return this.jsongLanguage}},window.ckplayer=ckplayer}();