(function(){var c=this,g=c.JUI,f=c.$,b=1,e="_JUI_"+(+new Date),d=JUI=c.JUI=c.$=function(h,i){if(h==c){return d.Window?new d.Window(h):c}if(d.Element){return d.Element(h,false)}if(d.Selector){return h.indexOf("#")===0?document.getElementById(tag.replace("#","")):d.Selector(h)}return d.type(h)==="string"?document.getElementById(h.replace(/^#/,"")):h};var a={initialize:function(m){m=m||{};var i=m.initialize;var h=m.legacy;var l=m.name||JUI.name;var k=i||h;var j=m.protect;var n=m.afterImplement||function(){};k.constructor=this.initialize;k.$family={name:l.toLowerCase()};if(h&&i){k.prototype=h.prototype}k.prototype.constructor=k;k.prototype.$family=k.$family;var o=function(r,p,s,q){if(!j||q||!r.prototype[p]){r.prototype[p]=s}n.call(r,p,s);return r};k.alias=function(r,p,s){if(typeof r=="string"){if((r=this.prototype[r])){return o(this,p,r,s)}}for(var q in r){this.alias(q,r[q],p)}return this};k.genericize=function(q,p){if(typeof q=="string"){if((!p||!this[q])&&typeof this.prototype[q]=="function"){this[q]=function(){var s=Array.prototype.slice.call(arguments);return this.prototype[q].apply(s.shift(),s)}}return}for(var r=0;r<q.length;r++){this.genericize(q[r],p)}return this};k.implement=function(r,q,t){if(typeof r=="string"){return o(this,r,q,t)}for(var s in r){o(this,s,r[s],q)}return this}},genericize:function(h,i){h&&h.genericize(i)},implement:function(j,i){var h=j.length;while(h--){j[h].implement(i)}}};d.Native=a;(function(){var h={Array:Array,Boolean:Boolean,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String,JUI:d};for(var m in h){a.initialize({name:m,initialize:h[m],protect:true})}var l={Array:["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf"],String:["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]};for(var k in l){for(var j=l[k].length;j--;){a.genericize(c[k],l[k])}}})();d.name="jui";d.version="1.0.2.0";d.type=function(h){if(h==undefined){return false}if(h.$family){return(h.$family.name=="number"&&!isFinite(h))?false:h.$family.name}if(h.nodeName){switch(h.nodeType){case 1:return"element";case 3:return(/\S/).test(h.nodeValue)?"textnode":"whitespace"}}else{if(typeof h.length=="number"){if(h.callee){return"arguments"}else{if(h.item){return"collection"}}}}return typeof h};d.empty=function(){};d.noConfilict=function(h){c.$=f;h&&(c.JUI=g);return this};d.extend=function(l,j){if(!j){throw"Failed! Inherit from a null object"}var h=j.prototype,k=function(){};k.prototype=h;var i=new k();l.prototype=i;i.constructor=l;l.superclass=h;if(j!=Object&&h.constructor==Object.prototype.constructor){h.constructor=j}return l};d.now=function(){return +new Date};d.getUid=(c.ActiveXObject)?function(h){return(h[e]||(h[e]=[b++]))[0]}:function(h){return h[e]||(h[e]=b++)}})();(function(e){var g={},a,c=1,b="jui_cb_";var f=function(h){a=h;return this};e.Native.initialize({name:"Loader",initialize:f,protect:true});function d(r){r=r||a||{};var h,j,o="js",q=e.empty,k,n,i;h=r.url;o=r.type;j=r.charset;q=r.callback;n=r.bind;k=r.param;i=r.cache;cbStr=r.cbStr;if(!h||h==""){return}try{if(k&&q){var p=cbStr||b+c;e.Loader[p]=function(){q.apply(n,arguments)};if(h.indexOf("?")>-1){h=h+"&cb=JUI.Loader."+p}else{h=h+"?cb=JUI.Loader."+p}if(!i){h=h+"&r="+Math.random()}if(!cbStr){c++}}var l;if(o=="css"){l=document.createElement("link");l.rel="stylesheet";l.type="text/css";l.href=h}else{l=document.createElement("script");l.src=h;l.type="text/javascript"}j&&(l.charset=j);if(!k&&q){l.onload=function(){q.apply(n,[h,true])};l.onerror=function(){q.apply(n,[h,false])};l.onreadystatechange=function(){if(l.readyState=="loaded"){q.apply(n,[h,true])}}}g[h]=l;document.getElementsByTagName("head")[0].appendChild(l)}catch(m){q(h,false)}}f.implement({load:function(k){if(!k){k=[a]}else{if(e.type(k)!="array"){k=Array.prototype.slice.call(arguments,0)}}var h=0,j;while(j=k[h++]){d(j)}return this},chain:function(j){if(e.type(j)!="array"){j=Array.prototype.slice.call(arguments,0)}if(!j||j.length==0){return}var i=j.shift(),h=this;cb=function(k,m){m.callback(m.url);h.chain(k)};this.load({url:i.url,type:i.type,callback:cb(j,i)})},cancel:function(h){if(!g[h]){return}document.removeChild(g[h]);delete g[h]}});e.Loader=f})(JUI);function log(a){try{if(console&&console.log){console.log(a)}}catch(b){}}var PPLiveActiveX=function(e){var q=false,f=false,a=false;var g="100%",B="100%";var d=null,b="",u="";function k(){}var o=e.ready?e.ready:k;var l=e.boot?e.boot:k;var i=e.installing?e.installing:k;var w=e.notSupport?e.notSupport:k;var j=e.checkInterval?e.checkInterval:3000;var m=e.readyInterval?e.readyInterval:200;var t=e.checkVersion?e.checkVersion:k;var A=e.notInstall?e.notInstall:k;var y=function(){this.initSettings={};this.set=function(p,D){this.initSettings[p]=D;return this};this.setProperties=function(D){for(var E in D){this.set(E,D[E])}};this.get=function(D){var p=this.initSettings[D];return p}};var r=new y();r.setProperties({id:"PPLivePlayerActiveX",width:"1px",height:"1px",codebase:"http://download.pplive.com/config/pplite/pluginsetup.cab"});var n=new y();n.setProperties({logourl:"http://static1.pplive.cn/v2/logo.jpg",logoposition:"center",dbclicktofullscreen:"true",showcontextmenu:"true",showstateinfo:"true",showchannelname:"true",showplayerbuffer:"true",showdownloadbuffer:"true",showdownloadrate:"true",showplaycontroller:"true",showplayprogress:"true",showloadingad:"false",showadcountdown:"false",adcfgurl:"",enableupdate:"true",enableupdatetip:"true",updateurl:"",forceversion:"1.0.0.51",skinpath:"skins\\Default",type:"1"});if(e!=null){var c=e.properties;for(var s in c){switch(s.toLowerCase()){case"id":r.set("id",c[s]);break;case"width":g=c[s];break;case"height":B=c[s];break;case"codebase":r.set("codebase",c[s]);break;default:s=s.toLowerCase();n.set(s,c[s]);break}}var z=e.params;for(var s in z){n.set(s.toLowerCase(),z[s])}n.get("id")}this.setAttribute=function(p,D){r.set(p.toLowerCase(),D);return this};this.setAttributes=function(D){for(var p in D){r.set(p.toLowerCase(),D[p])}return this};this.setParam=function(p,D){n.set(p.toLowerCase(),D);return this};this.setParams=function(E){for(var D in E){n.set(D.toLowerCase(),E[D])}return this};function C(){var E=['<object classid="CLSID:ef0d1a14-1033-41a2-a589-240c01edc078"'];for(var D in r.initSettings){E.push([" ",D,'="',r.get(D),'"'].join(""))}E.push(">");for(var F in n.initSettings){E.push(['<param name="',F,'" value="',n.get(F),'">'].join(""))}E.push("</object>");return E.join("")}this.write=function(p){if(typeof(p)=="string"){d=document.getElementById(p)}else{d=p}if(navigator.userAgent.search("MSIE")<=0){d.innerHTML="";w();return}u=d.innerHTML;b=C();d.innerHTML=b;v();return this};this.getPlayer=function(){return _player};function v(){_player=document.getElementById(r.get("id"));if((_player||0).IsReady!=undefined){this.installed=true;while(d.children.length>1){var p=d.removeChild(d.children[0]);delete p}_player.style.width=g;_player.style.height=B;t(_player.version);h()}else{if(!f){d.innerHTML=u+b;f=true;A()}setTimeout(v,j)}}function h(){if(_player.IsReady){try{_player.onFrameInstall=null}catch(p){}o(_player)}else{if(_player.IsReady!=undefined&&!a){_player.onFrameInstall=x;a=true;l(_player);setTimeout(h,m)}else{setTimeout(h,m)}}}function x(p,D){try{i(p,D)}catch(E){}}return this};var IkanPlayer=(function(){function n(B,A){for(var z in B){A[z]=B[z]}return A}function v(A,z){if(A.style.opacity!=undefined){A.style.opacity=z/100}else{A.style.filter="alpha(opacity="+z+")"}}function r(A,B,z){B=B||20;z=z||95;A.style.display="block";v(A,0);var C=0;(function(){v(A,C);C+=5;if(C<=z){setTimeout(arguments.callee,B)}})()}function a(A,B,z){B=B||20;z=z||0;var C=100;(function(){v(A,C);C-=5;if(C>=z){setTimeout(arguments.callee,B)}else{if(C<0){A.style.display="none"}}})()}function o(){var D=document.documentElement,B=D.clientHeight,z=D.scrollHeight,C=D.offsetHeight,A=B>z?(B>C?B:C):(z>C?z:C);return{w:D.clientWidth,h:A}}var s=document.createElement("div"),i="id"+ +new Date();s.id=i;s.style.display="none";s.style.zIndex="60";s.style.position="absolute";s.style.top=0;s.style.left=0;s.style.background="#101010";document.body.appendChild(s);var l;var y={open:function(){a(s);clearInverval(l)},close:function(){function z(){var A=o();s.style.width=A.w+"px";s.style.height=A.h+"px"}z();r(s);l=setInterval(z,500)}};var e="obj_"+ +new Date(),b="callBack"+ +new Date(),j=false,t=null,c=2,f=-1,h=function(z){return document.getElementById(z)},d=function d(z){return(typeof z).toLowerCase()},m=function(z){return window[z]?window[z]:document[z]},x={list:[],defaultPlay:0,byteValue:100000,playbox:h("playbox"),playerPath:"http://player.pplive.cn/live/",playerVersion:"2.0.1.2",swf:"",pluginPath:"http://player.pplive.cn/plugin/",pluginVersion:"1.0.0.13",pluginSwf:"",defaultOutsite:null,fixvars:{id:"",name:"",pic:"",playlink:"",flashvars:{}},flashvars:{}},k=function(D){var C=n(D,{vurl:"http://web-play.pptv.com/webplay3",guid:"",epg:"http://api.v.pptv.com/api/openapi/liveepg2.json?id=123",afp:x.pluginPath+x.pluginVersion+"/PPLivePlugin.swf",acb:x.hasAd?"http://iafp.pptv.com/ikandelivery/ikanac":"",xmlurl:x.playerPath+x.playerVersion+"/structure.xml",chid:0,clid:0,aw:1000,ah:420,vw:560,vh:420,vr:1,cb:b});if(!C.outsite){try{if(SiteFrom.getFormStr()&&SiteFrom.getFormStr()!="null"){C.outsite=SiteFrom.getFormStr()}}catch(B){if(x.defaultOutsite){C.outsite=x.defaultOutsite}}}var z=[];for(var A in C){z.push(A+"="+C[A])}return z.join("&")},g=function(A){var B=x.swf||(x.playerPath+x.playerVersion+"/player4live2.swf");var z='<object id="'+e+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="100%" height="100%" align="middle">';if(typeof navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){z='<object id="'+e+'" name="'+e+'" type="application/x-shockwave-flash" data="'+B+'" width="100%" height="100%" align="middle">'}return z+'<param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="movie" value="'+B+'" /><param name="quality" value="high" /><param name="wmode" value="opaque" /> <param name="bgcolor " value="#000" /> <param name="flashvars" value="'+k(A)+'" /><p style="text-align:center;color:#999;padding-top:160px;line-height:2;">您没有安装FlashPlayer或者FlashPlayer版本过低， <a target="_blank" href="http://get.adobe.com/cn/flashplayer/" style="color:#ff0;">请点击此处去下载安装最新的FlashPlayer</a><br />安装时请关闭浏览器，待安装完成后再启动浏览器。</p></object>'};window[b]=function(B){var z=-1;for(var A=0;A<B.length;A++){if((""+B[A]).split("|")[0]>x.byteValue){z=A;break}}if(z<0){t=null;q(1)}return z};function q(A){if(A==2){c=2}else{c=1;function z(){if(t&&t.url){t.url=x.fixvars.playlink;return}var C=new PPLiveActiveX({ready:function(D){t=D;D.url=x.fixvars.playlink}});C.write(x.playbox)}var B=new ActivexInstallViewer({live:true,onReady:function(){z()},onSuccess:function(){}});if(B.controller.hasInstalled(1)){z()}else{B.init()}}}function w(B,A,z){if(B.addEventListener){B.addEventListener(A,z,false)}else{B.attachEvent("on"+A,z)}}var u=function(z){this.events=[];this.name=z;this.fire=function(){var B=[];for(var C=0;C<arguments.length;C++){B.push(arguments[C])}for(var C=0,A=this.events.length;C<A;C++){var D=this.events[C];D[0].call(D[1],B)}};this.add=this.subscribe=function(B,A){this.events.push([B,A])};this.clear=function(){this.events=[]}};var p={create:function(z){x=n(z,x);x.fixvars=x.list[x.defaultPlay];f=x.defaultPlay;x.fixvars.flashvars=n(x.flashvars,x.fixvars.flashvars);x.playbox.innerHTML=g(x.fixvars.flashvars);var A=this;w(window,"beforeunload",function(){A.sendLog()})},play:function(A){if(!x.list[A]||f==A||!t){return}x.fixvars=x.list[A];x.fixvars.flashvars=n(x.flashvars,x.fixvars.flashvars);f=A;if(c==2){try{var z={chid:x.fixvars.flashvars.chid,name:x.fixvars.flashvars.name,clid:x.fixvars.flashvars.clid||0,vurl:"http://web-play.pptv.com/webplay3",epg:x.fixvars.flashvars.epg};t.editConfig(z);t.startPlay()}catch(B){}}else{if(t&&t.url){t.url=x.fixvars.playlink}else{q(2)}}},getPlayer:function(){return t}};return n({showTips:function(){},ready:function(){t=m(e);this.onReady.fire()},onReady:new u("onAdvEnd"),switchMode:function(z){if(z&&z.length>0){y.close()}else{y.open()}},triggerPlugin:function(){},advEnd:function(){this.onAdvEnd.fire()},sendLog:function(){try{t.sendlog()}catch(z){}},onAdvEnd:new u("onAdvEnd")},p)})();function Station(){}function Program(){}window.live=window.live||{};window.live.sources=window.live.sources||[];window.live.sources.push("pptv");window.live.pptv=(function(){var a={};var d="http://topic.pptv.com/partner/baiduapp/live/main/api_tvlist.php";var g="http://api.v.pptv.com/api/openapi/tvepg.js";var c,b,h;var f=new PPLiveActiveX({width:"100%",height:"100%",ready:function(j){c=j},notSupport:function(){}});function i(l,k){for(var j in k){l[j]=k[j]}return l}var e=(function(){var m=[];function j(q){var r=[],p;for(var o=0,n=q.length;o<n;o++){p=r[o];r.push({source:"pptv",name:p.name,beginTime:name.time,endTime:"",playback:function(){}})}return r}function l(o,n){new $.Loader({url:g+"?id="+o,type:"js",callback:function(p){n(p)},param:true}).load()}function k(r){var s=[],q;for(var p=0,n=r.length;p<n;p++){q=r[p];var o=i({source:"pptv",programs:[],getPrograms:function(u){var t=this;if(t.programs.length>0){u(this.programs)}else{l(t.id,function(v){u(v);t.programs=v})}},getCurrentProgram:function(){},play:function(){},flashvars:{chid:q.chid,epg:"http://api.v.pptv.com/api/openapi/liveepg2.json?id="+q.id}},q);s.push(o)}return s}return{get:function(q){var n=m.length,p;for(var o=0;o<n;o++){p=m[o];if(p.id==q){return p}}},getIndex:function(q){var n=m.length,p;for(var o=0;o<n;o++){p=m[o];if(p.id==q){return o}}return -1},index:function(n){return m[n]},all:function(){return m},push:function(n){if(n){m.push(n)}},hasData:function(){return m.length>0},loadData:function(n){new $.Loader({url:d,type:"js",callback:function(o){m=k(o);n(m)},param:true}).load()}}})();return{getPlayer:function(){return c},source:"pptv",create:function(l,k){var j=l||document.getElementById("player");a={playbox:j,hasAd:false,defaultPlay:0,flashvars:{xmlurl:"http://static1.pplive.cn/public/live/hao123/flashlive/ui.xml",aw:j.clientWidth,ah:j.clientHeight,vw:j.clientWidth,vh:j.clientHeight}};this.getStations(function(m){a.list=m;IkanPlayer.create(a);h=a.list[0].id;if(k){IkanPlayer.onReady.add(function(){k.call(m)})}})},play:function(k){var j=e.getIndex(k);if(j>-1){try{IkanPlayer.play(j);h=k}catch(l){}}},playback:function(l,j,k){},destroy:function(){if(b){b.innerHTML=""}},getStations:function(j){j=j||function(){};if(e.hasData()){j(e.all());return e.all()}else{e.loadData(j)}},getStationList:function(){return e},getCurrent:function(){if(h){return{station:h,systemTime:""}}},getCurrentStation:function(){return e.get(h)}}})();if(window.live.ready&&typeof(window.live.ready)=="function"){window.live.ready(window.live.pptv)};
