(function(a){a.fn.qvod=function(n){var d=true;var j=false;var k;var l=true;var e;var f={type:"default",width:"500",height:"400",AutoPlay:"true",FullScreen:"false",PlayerArea:"",QvodUrl:"",NextWebPage:"",NextQvod:"",ShowControl:"1",AdUrl:"http://buffer-ad.qvod.com/"};var n=a.extend(f,n);if(n.AutoPlay=="true"){n.AutoPlay="1"}else{n.AutoPlay="0"}this.each(function(){if(n.type=="default"){b(n.QvodUrl)}if(l){if(n.FullScreen=="true"&&a.cookie("qvodplayerautofull")==null){i()}if(a.cookie("qvodplayerautofull")=="true"){i()}setTimeout(function(){g()},1000*10);setTimeout(function(){c()},1000*20);l=false}h();setInterval(function(){m()},1000)});function g(){e=setInterval(function(){var o=true;o=k.Full;if(o){a.cookie("qvodplayerautofull",true)}},300)}function c(){setInterval(function(){var o=true;o=k.Full;if(!o){a.cookie("qvodplayerautofull",false)}},1000)}function m(){var o=n.NextQvod;var p=k.Duration;if(p>0){if(k.get_CurTaskProcess()==1000&&j==false&&typeof(o)!="undefined"){k.StartNextDown(o);j=true}}}function i(){setTimeout(function(){k.Full=true},500)}function b(p){if(n.PlayerArea==""){alert("\u8bf7\u8bbe\u7f6e\u64ad\u653e\u5668\u63d2\u5165\u4f4d\u7f6e\u7684\u6807\u7b7e\u0049\u0044");return}var o='<iframe id="iframe_down" name="iframe_down" scrolling="no" frameborder="0" style="margin: 0; width: 100%; height: 100%; display: none;" src=""></iframe><div id="qvod2011"><div class="playerarea" style="width:730px; heigth:570px; margin:auto;"><object classid="clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF" width="'+n.width+'" height="'+n.height+"\" id=\"QvodPlayer\" name=\"QvodPlayer\" onError=\"document.getElementById('QvodPlayer').style.display='none';document.getElementById('iframe_down').style.display='';document.getElementById('iframe_down').src='http://error2.qvod.com/error4.htm';document.getElementById('qvod2011').style.display='none';\"><param name=\"URL\" value=\""+p+'" /><param name="Showcontrol" value="'+n.ShowControl+'" /><param name="NextWebPage" value="'+n.NextWebPage+'" /><param name="Autoplay" value="'+n.AutoPlay+'" /><param name="QvodAdUrl" value="'+n.AdUrl+'" /><embed id="QvodPlayer2" name="QvodPlayer2" width="'+n.width+'" height="'+n.height+'" URL="'+p+'" type="application/qvod-plugin" Autoplay="'+n.AutoPlay+'" QvodAdUrl="'+n.AdUrl+'" nextwebpage="'+n.NextWebPage+'" Showcontrol="'+n.ShowControl+'" /></object></div>';a("#"+n.PlayerArea).html(o)}function h(){var q={};if(window.ActiveXObject){q.ie="yes";k=document.getElementById("QvodPlayer")}else{d=false;q.firefox="yes";k=document.getElementById("QvodPlayer2");var o=function(){var r=o.caller;while(r.caller){r=r.caller}return r.arguments[0]};__defineGetter__("event",o)}try{k.CallFunction("ab")}catch(p){if(!d){k.style.display="none";document.getElementById("iframe_down").style.display="";document.getElementById("qvod2011").style.display="none";document.getElementById("iframe_down").src="http://error2.qvod.com/error4.htm"}return}}}})(jQuery);jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+m.path:"";var g=m.domain?"; domain="+m.domain:"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};
