(function(b){b.fn.Touchable=function(c){return this.each(function(){var d=b(this).data.Touchable=new a(this,c);return d})};b.fn.newHover=function(e,d,c){return this.each(function(){b(this).bind("newHoverIn",e).bind("newHoverOut",d)})};b.fn.newHover2=function(d,c){return this.each(function(){b(this).bind("newHoverIn2",d).bind("newHoverOut2",c)})};b.Touchable=a;function a(d,i){this.logging=false;var f=function(l){if(k.logging&&(typeof console!=="undefined")){console.log(Array.prototype.slice.call(arguments))}};this.elem=d;this.$elem=b(d);this.is_doubleTap=false;this.is_currentlyTouching=false;this.isOneFingerGesture=false;this.startTouch={x:0,y:0};this.currentTouch={x:0,y:0};this.previousTouch={x:0,y:0};this.currentDelta={x:0,y:0};this.currentStartDelta={x:0,y:0};this.currentPosition={x:0,y:0};this.doubleTapTimer=null,this.longTapTimer=null;var k=this;if(typeof i!=="undefined"){if(typeof i.logging!=="undefined"){this.logging=i.logging}}var e=d.addEventListener||d.attachEvent;var c=d.removeEventListener||d.detachEvent;e.call(d,"touchstart",function(){k.$elem.trigger("touchstart")},true);e.call(d,"touchend",function(){k.$elem.trigger("touchend")},false);e.call(d,"touchmove",function(){k.$elem.trigger("touchmove")},false);e.call(d,"touchstart",h,false);this.$elem.mousedown(h);function h(m){if(typeof m.touches!=="undefined"){f("Touchable Touchstart touches length "+m.touches.length);if(m.touches.length!==1&&m.touches.length!==2){return false}if(k.isCurrentlyTouching){return false}k.isCurrentlyTouching=true;if(m.touches.length==1){k.isOneFingerGesture=true;k.startTouch.x=k.previousTouch.x=m.touches[0].clientX;k.startTouch.y=k.previousTouch.y=m.touches[0].clientY}else{if(m.touches.length==2){k.isOneFingerGesture=false;if(m.touches[0].clientY>m.touches[1].clientY){k.startTouch.x=k.previousTouch.x=m.touches[0].clientX;k.startTouch.y=k.previousTouch.y=m.touches[0].clientY}else{k.startTouch.x=k.previousTouch.x=k.touches[1].clientX;k.startTouch.y=k.previousTouch.y=k.touches[1].clientY}}}e.call(document,"touchmove",g,false);e.call(document,"touchend",j,false)}else{f("Touchable Touchstart touches length "+m.pageX+" "+m.pageY);k.startTouch.x=k.previousTouch.x=m.pageX;k.startTouch.y=k.previousTouch.y=m.pageY;b(document).mousemove(g);b(document).mouseup(j)}k.target=m.target;k.currentTarget=m.currentTarget;var l=k.startTouch.x;var n=k.startTouch.y;k.hitTarget=(document.elementFromPoint)?(document.elementFromPoint(l,n)):"";m.preventDefault();if(!k.inDoubleTap){k.inDoubleTap=true;k.doubleTapTimer=setTimeout(function(){k.inDoubleTap=false},500)}else{f("Touchable doubleTap");k.$elem.trigger("doubleTap",k);clearTimeout(k.doubleTapTimer);k.inDoubleTap=false}k.longTapTimer=setTimeout(function(){f("Touchable longTap");b(k.elem).trigger("longTap",k)},1000);f("Touchable Tap");b(k.elem).trigger("tap",k);b(k.elem).trigger("touchablestart",k)}function g(m){if(typeof m.touches!=="undefined"){f("Touchable Touchsmove touches length "+m.touches.length);if(m.touches.length!==1&&m.touches.length!==2){return false}if(m.touches.length==1||k.isOneFingerGesture){k.currentTouch.x=m.touches[0].clientX;k.currentTouch.y=m.touches[0].clientY}else{if(k.touches.length==2&&!k.isOneFingerGesture){if(m.touches[0].clientY>m.touches[1].clientY){k.currentTouch.x=m.touches[0].clientX;k.currentTouch.y=m.touches[0].clientY}else{k.currentTouch.x=m.touches[1].clientX;k.currentTouch.y=m.touches[1].clientY}}}}else{k.currentTouch.x=m.pageX;k.currentTouch.y=m.pageY}b(k.elem).removeClass("webkitAnimate");k.currentDelta.x=(k.currentTouch.x-k.previousTouch.x);k.currentDelta.y=(k.currentTouch.y-k.previousTouch.y);k.currentStartDelta.x=(k.currentTouch.x-k.startTouch.x);k.currentStartDelta.y=(k.currentTouch.y-k.startTouch.y);k.currentPosition.x=k.currentPosition.x+k.currentDelta.x;k.currentPosition.y=k.currentPosition.y+k.currentDelta.y;k.previousTouch.x=k.currentTouch.x;k.previousTouch.y=k.currentTouch.y;f("Touchable Touchablemove self e.target"+m.target+"e.currentTarget "+m.currentTarget+" x:"+k.currentStartDelta.x);k.target=m.target;k.currentTarget=m.currentTarget;var l=k.currentTouch.x;var n=k.currentTouch.y;k.hitTarget=(document.elementFromPoint)?(document.elementFromPoint(l,n)):"";b(k.elem).trigger("touchablemove",k);if(k.longTapTimer){clearTimeout(k.longTapTimer)}}function j(l){if(typeof l.touches!=="undefined"){if(l.targetTouches.length>0){return false}c.call(k.elem,"touchmove",g,true);c.call(k.elem,"touchend",j,true)}else{b(document).unbind("mousemove",g);b(document).unbind("mouseup",j)}k.isCurrentlyTouching=false;if(k.longTapTimer){clearTimeout(k.longTapTimer)}f("Touchable Touchend self "+k.currentStartDelta.x);b(k.elem).trigger("touchableend",k);f("Touchable: touchableend");b(k.hitTarget).trigger("click",k);f("Touchable: Hittarget click")}}})(jQuery);
/* Html5播放器插件 */
(function(c){function a(g){}function f(r,h){var E={onPlay:function(){},onPause:function(){},onSeek:function(){},onFullScreen:function(){},onRateChange:function(){}};if(h){$.extend(E,h)}var u=$(r);var q=u.find(".btnPlay");var w=u.find(".timeBar"),m=u.find(".timeline");var x=u.find(".btnNormal");var D=u.find(".btnHigh");var B=u.find(".btnFull");q.click(function(F){if(q.hasClass("pause")){s("play");h.onPause()}else{s("pause");h.onPlay()}});B.click(function(F){h.onFullScreen()});x.click(function(F){if(x.hasClass("disabled")){return false}if(x.hasClass("selected")){return false}x.addClass("selected");D.removeClass("selected");E.onRateChange("normal")});D.click(function(F){if(D.hasClass("disabled")){return false}if(D.hasClass("selected")){return false}D.addClass("selected");x.removeClass("selected");E.onRateChange("high")});var j=0,l=false;var n=0;m.find(".played>span").Touchable({logging:false}).bind("touchablestart",function(F){l=true;j=parseFloat(m.find(".played").width())}).bind("touchablemove",function(G){if(l){var I=$(this).data.Touchable.currentStartDelta;var F=j+I.x;var H=parseFloat(m.width());if(F<0){F=0}if(F>H){F=H}m.find(".played").css({width:F})}}).bind("touchableend",function(H){if(l){l=false;var J=$(this).data.Touchable.currentStartDelta;var F=j+J.x;var I=parseFloat(m.width());if(F<0){F=0}if(F>I){F=I}m.find(".played").css({width:F});var G=n*F/I;h.onSeek(G,n)}});function z(G){var F=Math.floor(G/60);F=(F<10)?("0"+F):F.toString();var H=Math.floor(G%60);H=(H<10)?("0"+H):H.toString();return F+":"+H}function s(F){if(F==="play"){q.removeClass("pause").addClass("play")}else{if(F==="pause"){q.removeClass("play").addClass("pause")}else{}}}function k(F){if(F.normal){x.removeClass("disabled")}else{x.addClass("disabled")}if(F.high){D.removeClass("disabled")}else{D.addClass("disabled")}}function i(F){if(F==="normal"){x.addClass("selected");D.removeClass("selected")}else{if(F==="high"){x.removeClass("selected");D.addClass("selected")}}}function g(F){n=F;$(".controls-ui").css({height:40})}function p(F,H){var I=F*parseFloat(m.width())/n;var G=H*parseFloat(m.width())/n;m.find(".point.begin").css({left:I-2}).show();m.find(".point.end").css({left:G-2}).show()}function C(G){w.find(".time").html(z(G)+" / "+z(n));if(!l){var F=G*parseFloat(m.width())/n;m.find(".played").css({width:F})}}function y(G){var F=G*parseFloat(m.width())/n;m.find(".buffered").css({width:F})}function t(I){var F=u.find(".video_loading");if(I==="show"){var H=(u.width()-F.innerWidth())/2;var G=(u.height()-F.innerHeight())/2;F.css({left:H,top:G-25});F.show()}else{F.hide()}}function o(I,G){var H=u.parent("div");var F=parseFloat(H.width()),J=parseFloat(H.height());u.css({width:I,height:G+40});if(F>I){u.css({marginLeft:(F-I)/2})}u.find(".video").css({width:I,height:G});u.find(".controls-ui").css({top:G});u.find(".timeBar").css({width:I-170})}var A=null;function v(F){clearTimeout(A);A=setTimeout(function(){var G=u.find(".tipsBar");G.show().find("span").html(F);clearTimeout(A);A=setTimeout(function(){G.hide()},5000)},1000)}return{updateTimeline:C,updateBuffline:y,setTotalTime:g,setPlayState:s,setRateState:k,setBeginAndEnd:p,setPlayRate:i,loading:t,resize:o,showTips:v}}function d(m,j,i){var m=m;var g=false;var l=null;$.getJSON("http://hot.vrs.letv.com/json?callback=?",{vid:i.vid},function(n){if(n&&n.hot&&n.hot.length>0){l=n.hot[0];j.setBeginAndEnd(l.t,l.f);a("跳过片头尾插件：片头点["+l.t+"];片尾点["+l.f+"]");g=true}});var k=function(){};function h(){if(!g){return}if(!l.tflag&&m.currentTime<l.t){l.tflag=true;m.currentTime=l.t;j.showTips("已自动为你跳过片头");a("跳过片头尾插件：跳过片头")}if(!l.fflag&&m.currentTime>l.f){l.fflag=true;m.currentTime=m.duration-10;j.showTips("已自动为你跳过片尾");a("跳过片头尾插件：跳过片尾")}}(function(){var n=/\?((?:\d*\.)?\d+)/.exec(window.location.href);if(n&&n.length>0){var o=parseFloat(n[1]);if(o<=0){k=function(){}}else{if(o>m.duration-10){o=m.duration-10}k=function(){m.currentTime=o;j.showTips("已自动为你续播");k=function(){};a("跳过片头尾插件：已为您续播到["+n[1]+"]")}}}else{k=h}})();return{detect:function(){if(!m.seeking){k()}}}}function b(l,k){var j=null;function h(){try{pushHistory({pid:k.pid,vid:k.vid,from:1,vtype:(k.vtype||1),htime:l.currentTime,vtime:l.duration,isend:0,title:k.title})}catch(m){}}function g(){clearInterval(j);j=setInterval(h,1000*60*2)}function i(){clearInterval(j)}return{manualPush:h,autoPush:g,autoPushStop:i}}function e(j,s){var i={width:640,height:480,bgcolor:"#000000",source:{},videoInfo:{}};if(s){$.extend(i,s)}var n=[];n.push('<div id="html5-video-container">');n.push('	<video class="video" x-webkit-airplay="allow" preload autoplay controls></video>');n.push('	<div class="video_loading">');n.push('		<img src="http://i2.letvimg.com/img/201112/23/videoplayer_loading.gif">');n.push("	</div>");n.push('	<div id="html5-controls-ui" class="controls-ui">');n.push('		<div class="btnPlay"></div>');n.push('		<div class="timeBar">');n.push('			<div class="timeline">');n.push('				<div class="buffered"></div>');n.push('				<div class="played"><span></span></div>');n.push('				<i class="point begin"></i>');n.push('				<i class="point end"></i>');n.push("			</div>");n.push('			<div class="time">00:00 / 00:00</div>');n.push("		</div>");n.push('		<div class="optionBar">');n.push('			<button type="button" class="optBtn disabled btnNormal">标清</button>');n.push('			<button type="button" class="optBtn disabled btnHigh">高清</button>');n.push('			<button type="button" class="optBtn btnFull">全屏</button>');n.push("		</div>");n.push('		<div class="tipsBar">');n.push('			<div class="mask"></div>');n.push('			<div class="maskcont">');n.push("				<i></i><span></span>");n.push("			</div>");n.push("		</div>");n.push("	</div>");n.push("</div>");var r=$(n.join("")).appendTo(j);var h=r.find(".video")[0];var o={};var g={controls:true};var p=f("#html5-video-container",{onPlay:function(){h.play()},onPause:function(){h.pause()},onSeek:function(t){if(t<0){t=0}if(t>h.duration-10){t=h.duration-10}h.currentTime=t},onFullScreen:function(){h.webkitEnterFullscreen()},onRateChange:function(t){if(h.duration>0&&h.currentTime>0){o.isGood=true;o.flag=t;o.curtime=h.currentTime}q(t)}});p.resize(i.width,i.height);p.setRateState(i.source);var k=[];var l=b(h,i.videoInfo);function q(t){var u=s.source[t];if(u&&u.length>0){h.src=u+"?_r"+Math.random();p.setPlayRate(t);a("播放URL:"+h.src)}else{a("播放URL:无效")}}function m(){k=[];k.push(d(h,p,i.videoInfo));m=function(){}}h.addEventListener("loadedmetadata",function(t){p.setTotalTime(h.duration);p.setPlayState(h.paused?"play":"pause");m();a("获取完媒介资源的时长和尺寸")},false);h.addEventListener("loadeddata",function(t){a("已加载当前播放位置的媒介数据")},false);h.addEventListener("waiting",function(t){a("等待数据")},false);h.addEventListener("play",function(t){h.controls=false;g.controls=false;l.autoPush();a("开始播放")},false);h.addEventListener("pause",function(t){l.autoPushStop();l.manualPush();a("暂停播放")},false);h.addEventListener("ended",function(t){if(window.nextVideoSrc!="undefind"&&window.nextVideoSrc.length>1){window.location.href=window.nextVideoSrc}a("结束播放")},false);h.addEventListener("seeking",function(t){a("寻找中")},false);h.addEventListener("seeked",function(t){a("寻找完毕")},false);h.addEventListener("loadstart",function(t){a("开始加载媒介资源")},false);h.addEventListener("progress",function(t){a("正在获取媒介")},false);h.addEventListener("error",function(t){a("获取媒介数据出错")},false);h.addEventListener("stalled",function(t){a("获取媒介数据异常")},false);setInterval(function(){try{if(!h.seeking&&o&&o.isGood){if(o.curtime>h.duration-10){o.curtime=h.duration-10}h.currentTime=o.curtime;p.showTips("已为你切换到"+(o.flag=="high"?"高清":"标清"));o.isGood=false}if(h.paused){p.setPlayState("play")}else{p.setPlayState("pause");p.updateTimeline(h.currentTime)}p.updateBuffline(h.buffered.end());if(h.readyState<4&&g.controls==false){p.loading("show")}else{p.loading("hide")}for(var t=0,u;u=k[t];t++){u.detect()}}catch(v){}},500);(function(){var t=navigator.userAgent.toLowerCase();if(/ipad/i.test(t)){if(s.source.high){q("high")}else{if(s.source.normal){q("normal")}else{p.showTips("片源不存在")}}}else{if(s.source.normal){q("normal")}else{p.showTips("片源不存在")}}})()}c.VideoPlayer=e})(LETV.using("Plugin"));(function(){var a=null;window.ADSeq=function(){if(a==null){var d=Math.round(Math.random()*(__INFO__.adseed||1000)).toString();var c=[0,0,0,0];for(var b=0;b<d.length;b++){c[4-d.length+b]=d.slice(b,b+1)}a=c.join("")}return a}})();if(typeof LELib=="undefined"){var LELib=new Object()}if(typeof LELib.Revive=="undefined"){LELib.Revive=new Object()}if(typeof LELib.FlashVars=="undefined"){LELib.FlashVars=new Object()}$.extend(LELib.FlashVars,{ControlVersion:function(){var a,b,c;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(c){}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");a="WIN 2,0,0,11"}catch(c){a=-1}}return a},GetSwfVer:function(){var g=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var f=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var a=navigator.plugins["Shockwave Flash"+f].description;var e=a.split(" ");var c=e[2].split(".");var h=c[0];var b=c[1];var d=e[3];if(d==""){d=e[4]}if(d[0]=="d"){d=d.substring(1)}else{if(d[0]=="r"){d=d.substring(1);if(d.indexOf("d")>0){d=d.substring(0,d.indexOf("d"))}}}var g=h+"."+b+"."+d}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){g=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){g=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){g=2}else{if($.browser.msie&&$.browser.atwin&&!$.browser.opera){g=this.ControlVersion()}}}}}return g},DetectFlashVer:function(f,d,c){versionStr=this.GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if($.browser.msie&&$.browser.atwin&&!$.browser.opera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var e=versionArray[0];var a=versionArray[1];var b=versionArray[2];if(e>parseFloat(f)){return true}else{if(e==parseFloat(f)){if(a>parseFloat(d)){return true}else{if(a==parseFloat(d)){if(b>=parseFloat(c)){return true}}}}}return false}}},AC_AddExtension:function(b,a){if(b.indexOf("?")!=-1){return b.replace(/\?/,a+"?")}else{return b+a}},AC_Generateobj:function(d,c,a){var e=new Array();if($.browser.msie&&$.browser.atwin&&!$.browser.opera){e.push("<object ");for(var b in d){e.push(b+'="'+d[b]+'" ')}e.push(">");for(var b in c){e.push('<param name="'+b+'" value="'+c[b]+'" /> ')}e.push("</object>")}else{e.push("<embed ");for(var b in a){e.push(b+'="'+a[b]+'" ')}e.push("> </embed>")}return e.join("")},AC_FL_RunContent:function(){var a=this.AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");return this.AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)},AC_SW_RunContent:function(){var a=this.AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);return this.AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)},AC_GetArgs:function(b,e,g,d,h){var a=new Object();a.embedAttrs=new Object();a.params=new Object();a.objAttrs=new Object();for(var c=0;c<b.length;c=c+2){var f=b[c].toLowerCase();switch(f){case"classid":break;case"pluginspage":a.embedAttrs[b[c]]=b[c+1];break;case"src":case"movie":b[c+1]=this.AC_AddExtension(b[c+1],e);a.embedAttrs.src=b[c+1];a.params[g]=b[c+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblclick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":a.objAttrs[b[c]]=b[c+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":a.embedAttrs[b[c]]=a.objAttrs[b[c]]=b[c+1];break;default:a.embedAttrs[b[c]]=a.params[b[c]]=b[c+1]}}a.objAttrs.classid=d;if(h){a.embedAttrs.type=h}return a}});var LETVBox={setting:{bgId:"TB_bg",boxId:"TB_box",cId:"closeId",content:"loading...",boxOpen:false,pagewidth:"940",ajax:null,fade:true,clsbtn:"<p><a role='closebutton' href='javascript:void(0);' class='closeBtn'>关闭</a></p>",bgConfig:{position:($.browser.msie)?"absolute":"fixed",zIndex:2000,width:"100%",height:"100%",top:"0px",left:"0px",backgroundColor:"#000",opacity:"0.15",display:"none"},boxConfig:{position:($.browser.msie)?"absolute":"fixed",zIndex:2002,width:"50%",marginLeft:"-25%",height:"120px",top:"50%",left:"50%",display:"none"},closeConfig:{"float":"right",width:"20px",height:"20px",zIndex:2002,borderColor:"#999",borderStyle:"solid",borderWidth:"1px",cursor:"pointer"}},getPageW:function(){var b=LETVBox.setting;var a=$(window).width()>b.pagewidth?$(window).width():b.pagewidth;return $.browser.msie?(a+"px"):"100%"},showBox:function(h,c,a){var b=this.setting;var i=$.browser.msie;a=a||100;if($("#"+b.bgId).is(":visible")){$("#"+b.bgId).stop().remove();$("#"+b.boxId).remove()}$("<div>",{id:b.bgId}).css(b.bgConfig).appendTo("body").width(this.getPageW()).height(i?($(document).height()+"px"):"100%");$("<div></div>").attr("id",b.boxId).css(b.boxConfig).appendTo("body").css({width:b.pagewidth/2+"px","margin-left":"-"+b.pagewidth/4+"px","margin-top":"-"+$("#"+b.boxId).height()/2*3+"px"}).append("<table class='lightbox'><tr><td class='box_tl'></td><td class='box_tc'></td><td class='box_tr'></td></tr> <tr><td class='box_ml'></td><td id='table'></td><td class='box_mr'></td></tr> <tr><td class='box_bl'></td><td class='box_bc'></td><td class='box_br'></td></tr></table>");if(i){$("div#"+b.boxId).css("top",parseInt(document.documentElement.scrollTop)+($(window).height()/2)+"px")}var d=c||null;if(d!=null&&typeof d=="function"){try{d()}catch(g){}}if(b.fade){$("#"+b.bgId).fadeIn(a,function(){$("div#"+b.boxId).fadeIn(200)})}else{$("#"+b.bgId).show().parent().find("#"+b.boxId).show()}h.appendTo("#table");if(i){$(window).bind({"scroll.letvbox":function(){$("#"+b.bgId).width(LETVBox.getPageW());$("#"+b.boxId).css("top",parseInt(document.documentElement.scrollTop)+($(window).height()/2)+"px")},"resize.letvbox":function(){$("#"+b.bgId).width(LETVBox.getPageW())}})}},closeBox:function(a,b,k){var j=this.setting;var g=j.boxId,d=j.bgId;var c=b||true;k=k||100;if(j.fade&&c){$("#"+d).fadeOut(k,function(){$("#"+g).fadeOut(200,function(){});$("#"+g).remove();$("#"+d).remove()})}else{$("#"+g+",#"+d).hide();$("#"+g).remove();$("#"+d).remove()}var h=a||null;if(a&&typeof a=="function"){try{a()}catch(i){}}$(window).unbind("scroll.letvbox");$(window).unbind("resize.letvbox")}};LETVBox.video={show:function(){var a="<div class='vbtn' onclick='closeVideo()'><a href='javascript:;' title='开灯'></a></div>";$("#fla_box").addClass("fla_area").css({zIndex:2003}).append(a);$("#TB_bg").css("opacity","1");if($.browser.msie){$("#TB_bg").width(LETVBox.getPageW())}$(window).bind({"resize.letvbox":function(){$("#TB_bg").width(LETVBox.getPageW())}})},close:function(){setTimeout(function(){$("#fla_box").find("div").remove(".vbtn")},100);setTimeout(function(){$("#fla_box").css({zIndex:"0"})},800);if($.browser.msie){$("#TB_bg").width(LETVBox.getPageW())}}};var isFlashClick=true;function setBigPlayWindow(){isFlashClick=false;LETVBox.showBox($(""),LETVBox.video.show,500);setTimeout(function(){isFlashClick=true},500)}function removeBigPlayWindow(){isFlashClick=false;LETVBox.closeBox(LETVBox.video.close,true,800);setTimeout(function(){isFlashClick=true},800)}function getBigPlayStatue(){return isFlashClick}function video(a){if(!$.browser.msie){return window[a]}else{return document[a]}}var player=function(){return document.getElementsByName("www_player")[0]};function closeVideo(){removeBigPlayWindow();player().turnOnLightHandler()}function playerReady(){player().addModelListener("STATE","completeHandler");if($.isFunction(window.FlashCompletedHandler)){window.FlashCompletedHandler(player())}return 1}var nextVideoSrc="";var nextVideoEnable=true;function flashNextHandler(a){nextVideoEnable=a}function flashGetDocumentReferrer(){var a=document.referrer;if(a&&a.length>0){return a}else{return"-"}}function flashGetUserInfo(){var a=LETV.cookie("m");if(a&&a.length>0){return a}else{return""}}function completeHandler(a){if(a.newstate=="COMPLETED"){if(nextVideoEnable&&nextVideo()){window.location.href=nextVideo()}}}function nextVideo(){if(nextVideoSrc!="undefind"&&nextVideoSrc.length>1){return nextVideoSrc.toString()}return 0}var FlashVars=LELib.FlashVars;LELib.Revive.SWFObject=function(g,i,a,d){i=i||{w:540,h:450};var n=window.location.href;var c=/.*[\?\&]q([0-9]+).*/;var e="";if(c.test(n)){e="&marking=ptv_player&channel="+(100+parseInt(n.replace(c,"$1")))}var l="http://img1.c0.letv.com/ptv/player/eplayer20110812";var r=10,j=0,p=0;if(FlashVars.AC_FL_RunContent=="undefind"||FlashVars.DetectFlashVer=="undefind"){alert("flash版本库没加载，请刷新后再试!")}else{var f=FlashVars.DetectFlashVer(r,j,p);var k="";if(f){var h=d||l;var b=i.bg||"#000000";var q=i.wmode||"window";var o=i.id||"www_player";k=FlashVars.AC_FL_RunContent("codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0","width",i.w,"height",i.h,"src",h,"quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","align","middle","play","true","loop","true","scale","noscale","wmode",q,"devicefont","false","id",o,"bgcolor",b,"name",o,"menu","true","allowScriptAccess","always","allowFullScreen","true","salign","TL","movie",h,"flashvars",a+e)}else{var m=($.browser.msie)?"http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_10_active_x.exe":"http://get.adobe.com/cn/flashplayer/";var k='<div style="width:'+i.w+'px;margin:auto; background:#000;overflow:hide;"><div style="height:'+i.h+'px;text-align:center; color:#aaa; line-height:32px; font-size:12px;"><br/><br/><br/>您没有安装flash播放器或者flash播放器版本低于'+r+'.0<br />为了能够正常观看视频，请您点此。<a href="'+m+'" style="color:#ff9900; text-decoration:underline;" target="_blank">下载最新版本</a></div></div>'}if(g&&g.length>0){$("#"+g).html(k)}else{document.write(k)}}};LELib.Revive.Video=function(a,c,b){this.video;this.videoBox=a;this.urlList=b.v||["undefind"];this.initpic=b.p||"";this.timer=null;this.duration=0;this.option=c||{w:540,h:450};this.config={height:this.option.h,width:this.option.w,controls:"controls",preload:"preload",poster:this.initpic,autoplay:""};this.getcurrent=function(){var d=this.video.currentTime;return d};this.initVideo=function(){var f=this;var e=LETV.Base64.decode(this.urlList[0]);var h=0;var d=function(i){$("#"+f.videoBox).html("<div style='background:#111;color:#fff;line-height:"+f.option.h+"px;height:"+f.option.h+"px'>"+i+"</div>")};if(this.urlList[0]=="(none)"||this.urlList[0]=="undefind"||this.urlList[0]==""){d("您观看的视频不支持此设备播放!");return false}var g=function(){h++;var i=$("<video>").attr(f.config).css({background:"#000"});$("#"+f.videoBox).html(i);var j=i.get(0);j.src=e+"&_rand="+Math.random();j.onerror=function(){if(h>9){d("视频加载失败，请重试。");return}g()};j.load();f.video=j};g()};this.initVideo()};LELib.Revive.SimplePlayer=function(a,c,b){this.videoBox=a;this.urlList=b.v||["undefind"];this.initpic=b.p||"";this.option=c||{w:540,h:450};this.config={height:this.option.h,width:this.option.w};this.initVideo=function(){var d=$("#"+this.videoBox);var e=parseInt(this.config.width)/2-100;var g=LETV.Base64.decode(this.urlList[0]);g=g.replace(/m3u8/ig,"mp4");if(g){var f=[];f.push("<a href='"+g+"' style='background:url(http://img1.c0.letv.com/ptv/images/xplay/btn-play.png) no-repeat center center;width:"+this.config.width+"px;height:"+this.config.height+"px;display:block;margin:auto;'>");f.push("</a>");$(f.join("")).appendTo(d)}};this.initVideo()};LELib.Revive.Player=function(c,k,l,g,j,h){if(/android.+GT-I9000/i.test(navigator.userAgent)){var b=new LELib.Revive.SimplePlayer(c,k,l)}else{if($.browser.iPad&&!$.browser.atwin){var f=LETV.using("Plugin");if($.isFunction(f.VideoPlayer)){var a={};if(l&&l.v){for(var e=0,d;d=l.v[e];e++){if(d.length>10){if(e==0){a.normal=LETV.Base64.decode(d)}else{if(e==1){a.high=LETV.Base64.decode(d)}}}}}f.VideoPlayer("#"+c,{width:k.w,height:k.h,source:a,videoInfo:(__INFO__||h)})}else{var b=new LELib.Revive.Video(c,k,l)}}else{LELib.Revive.SWFObject(null,k,g,j)}}};
