
if(typeof deconcept=="undefined")var deconcept=new Object();if(typeof deconcept.util=="undefined")deconcept.util=new Object();if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil=new Object();deconcept.SWFObject=function(swf,id,w,h,ver,c,quality,xiRedirectUrl,redirectUrl,detectKey){if(!document.getElementById){return;}
this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(swf){this.setAttribute('swf',swf);}
if(id){this.setAttribute('id',id);}
if(w){this.setAttribute('width',w);}
if(h){this.setAttribute('height',h);}
if(ver){this.setAttribute('version',new deconcept.PlayerVersion(ver.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}
if(c){this.addParam('bgcolor',c);}
var q=quality?quality:'high';this.addParam('quality',q);this.setAttribute('useExpressInstall',false);this.setAttribute('doExpressInstall',false);var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.setAttribute('xiRedirectUrl',xir);this.setAttribute('redirectUrl','');if(redirectUrl){this.setAttribute('redirectUrl',redirectUrl);}}
deconcept.SWFObject.prototype={useExpressInstall:function(path){this.xiSWFPath=!path?"expressinstall.swf":path;this.setAttribute('useExpressInstall',true);},setAttribute:function(name,value){this.attributes[name]=value;},getAttribute:function(name){return this.attributes[name];},addParam:function(name,value){this.params[name]=value;},getParams:function(){return this.params;},addVariable:function(name,value){this.variables[name]=value;},getVariable:function(name){return this.variables[name];},getVariables:function(){return this.variables;},getVariablePairs:function(){var variablePairs=new Array();var key;var variables=this.getVariables();for(key in variables){variablePairs[variablePairs.length]=key+"="+variables[key];}
return variablePairs;},getSWFHTML:function(){var swfNode="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute('swf',this.xiSWFPath);}
swfNode='<embed type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+this.getAttribute('style')+'"';swfNode+=' id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'" ';var params=this.getParams();for(var key in params){swfNode+=[key]+'="'+params[key]+'" ';}
var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='flashvars="'+pairs+'"';}
swfNode+='/>';}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute('swf',this.xiSWFPath);}
swfNode='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+this.getAttribute('style')+'">';swfNode+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var params=this.getParams();for(var key in params){swfNode+='<param name="'+key+'" value="'+params[key]+'" />';}
var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='<param name="flashvars" value="'+pairs+'" />';}
swfNode+="</object>";}
return swfNode;},write:function(elementId){if(this.getAttribute('useExpressInstall')){var expressInstallReqVer=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(expressInstallReqVer)&&!this.installedVer.versionIsValid(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);this.addVariable("MMredirectURL",escape(this.getAttribute('xiRedirectUrl')));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute('doExpressInstall')||this.installedVer.versionIsValid(this.getAttribute('version'))){var n=(typeof elementId=='string')?document.getElementById(elementId):elementId;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'));}}
return false;}}
deconcept.SWFObjectUtil.getPlayerVersion=function(){var PlayerVersion=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var counter=3;while(axo){try{counter++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+counter);PlayerVersion=new deconcept.PlayerVersion([counter,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");PlayerVersion=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(PlayerVersion.major==6){return PlayerVersion;}}
try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}
if(axo!=null){PlayerVersion=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return PlayerVersion;}
deconcept.PlayerVersion=function(arrVersion){this.major=arrVersion[0]!=null?parseInt(arrVersion[0]):0;this.minor=arrVersion[1]!=null?parseInt(arrVersion[1]):0;this.rev=arrVersion[2]!=null?parseInt(arrVersion[2]):0;}
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major)return false;if(this.major>fv.major)return true;if(this.minor<fv.minor)return false;if(this.minor>fv.minor)return true;if(this.rev<fv.rev)return false;return true;}
deconcept.util={getRequestParameter:function(param){var q=document.location.search||document.location.hash;if(param==null){return q;}
if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1));}}}
return"";}}
deconcept.SWFObjectUtil.cleanupSWFs=function(){var objects=document.getElementsByTagName("OBJECT");for(var i=objects.length-1;i>=0;i--){objects[i].style.display='none';for(var x in objects[i]){if(typeof objects[i][x]=='function'){objects[i][x]=function(){};}}}}
if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);}
window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}
if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];}}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;if(typeof addEvent!='function'){var addEvent=function(o,t,f,l){var d='addEventListener',n='on'+t,rO=o,rT=t,rF=f,rL=l;if(o[d]&&!l)return o[d](t,f,false);if(!o._evts)o._evts={};if(!o._evts[t]){o._evts[t]=o[n]?{b:o[n]}:{};o[n]=new Function('e','var r = true, o = this, a = o._evts["'+t+'"], i; for (i in a) {'+'o._f = a[i]; r = o._f(e||window.event) != false && r; o._f = null;'+'} return r');if(t!='unload')addEvent(window,'unload',function(){removeEvent(rO,rT,rF,rL);});}
if(!f._i)f._i=addEvent._i++;o._evts[t][f._i]=f;};addEvent._i=1;var removeEvent=function(o,t,f,l){var d='removeEventListener';if(o[d]&&!l)return o[d](t,f,false);if(o._evts&&o._evts[t]&&f._i)delete o._evts[t][f._i];};}
function cancelEvent(e,c){e.returnValue=false;if(e.preventDefault)e.preventDefault();if(c){e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();}};function DragResize(myName,config){var props={myName:myName,enabled:true,handles:['tl','tm','tr','ml','mr','bl','bm','br'],isElement:null,isHandle:null,element:null,handle:null,minWidth:10,minHeight:10,minLeft:0,maxLeft:9999,minTop:0,maxTop:9999,zIndex:1,mouseX:0,mouseY:0,lastMouseX:0,lastMouseY:0,mOffX:0,mOffY:0,elmX:0,elmY:0,elmW:0,elmH:0,allowBlur:true,ondragfocus:null,ondragstart:null,ondragmove:null,ondragend:null,ondragblur:null};for(var p in props)
this[p]=(typeof config[p]=='undefined')?props[p]:config[p];};DragResize.prototype.apply=function(node){var obj=this;addEvent(node,'mousedown',function(e){obj.mouseDown(e)});addEvent(node,'mousemove',function(e){obj.mouseMove(e)});addEvent(node,'mouseup',function(e){obj.mouseUp(e)});};DragResize.prototype.select=function(newElement){with(this){if(!document.getElementById||!enabled)return;if(newElement&&(newElement!=element)&&enabled){element=newElement;element.style.zIndex=++zIndex;if(this.resizeHandleSet)this.resizeHandleSet(element,true);elmX=parseInt(element.style.left);elmY=parseInt(element.style.top);elmW=element.offsetWidth;elmH=element.offsetHeight;if(ondragfocus)this.ondragfocus();}}};DragResize.prototype.deselect=function(delHandles){with(this){if(!document.getElementById||!enabled)return;if(delHandles){if(ondragblur)this.ondragblur();if(this.resizeHandleSet)this.resizeHandleSet(element,false);element=null;}
handle=null;mOffX=0;mOffY=0;}};DragResize.prototype.mouseDown=function(e){with(this){if(!document.getElementById||!enabled)return true;var elm=e.target||e.srcElement,newElement=null,newHandle=null,hRE=new RegExp(myName+'-([trmbl]{2})','');while(elm){if(elm.className){if(!newHandle&&(hRE.test(elm.className)||isHandle(elm)))newHandle=elm;if(isElement(elm)){newElement=elm;break}}
elm=elm.parentNode;}
if(element&&(element!=newElement)&&allowBlur)deselect(true);if(newElement&&(!element||(newElement==element))){if(newHandle)cancelEvent(e);select(newElement,newHandle);handle=newHandle;if(handle&&ondragstart)this.ondragstart(hRE.test(handle.className));}}};DragResize.prototype.mouseMove=function(e){with(this){if(!document.getElementById||!enabled)return true;mouseX=e.pageX||e.clientX+document.documentElement.scrollLeft;mouseY=e.pageY||e.clientY+document.documentElement.scrollTop;var diffX=mouseX-lastMouseX+mOffX;var diffY=mouseY-lastMouseY+mOffY;mOffX=mOffY=0;lastMouseX=mouseX;lastMouseY=mouseY;if(!handle)return true;var isResize=false;if(this.resizeHandleDrag&&this.resizeHandleDrag(diffX,diffY)){isResize=true;}
else{var dX=diffX,dY=diffY;if(elmX+dX<minLeft)mOffX=(dX-(diffX=minLeft-elmX));else if(elmX+elmW+dX>maxLeft)mOffX=(dX-(diffX=maxLeft-elmX-elmW));if(elmY+dY<minTop)mOffY=(dY-(diffY=minTop-elmY));else if(elmY+elmH+dY>maxTop)mOffY=(dY-(diffY=maxTop-elmY-elmH));elmX+=diffX;elmY+=diffY;}
with(element.style){left=elmX+'px';width=elmW+'px';top=elmY+'px';height=elmH+'px';}
if(window.opera&&document.documentElement){var oDF=document.getElementById('op-drag-fix');if(!oDF){var oDF=document.createElement('input');oDF.id='op-drag-fix';oDF.style.display='none';document.body.appendChild(oDF);}
oDF.focus();}
if(ondragmove)this.ondragmove(isResize);cancelEvent(e);}};DragResize.prototype.mouseUp=function(e){with(this){if(!document.getElementById||!enabled)return;var hRE=new RegExp(myName+'-([trmbl]{2})','');if(handle&&ondragend)this.ondragend(hRE.test(handle.className));deselect(false);}};DragResize.prototype.resizeHandleSet=function(elm,show){with(this){if(!elm._handle_tr){for(var h=0;h<handles.length;h++){var hDiv=document.createElement('div');hDiv.className=myName+' '+myName+'-'+handles[h];elm['_handle_'+handles[h]]=elm.appendChild(hDiv);}}
for(var h=0;h<handles.length;h++){elm['_handle_'+handles[h]].style.visibility=show?'inherit':'hidden';}}};DragResize.prototype.resizeHandleDrag=function(diffX,diffY){with(this){var hClass=handle&&handle.className&&handle.className.match(new RegExp(myName+'-([tmblr]{2})'))?RegExp.$1:'';var dY=diffY,dX=diffX,processed=false;if(hClass.indexOf('t')>=0){rs=1;if(elmH-dY<minHeight)mOffY=(dY-(diffY=elmH-minHeight));else if(elmY+dY<minTop)mOffY=(dY-(diffY=minTop-elmY));elmY+=diffY;elmH-=diffY;processed=true;}
if(hClass.indexOf('b')>=0){rs=1;if(elmH+dY<minHeight)mOffY=(dY-(diffY=minHeight-elmH));else if(elmY+elmH+dY>maxTop)mOffY=(dY-(diffY=maxTop-elmY-elmH));elmH+=diffY;processed=true;}
if(hClass.indexOf('l')>=0){rs=1;if(elmW-dX<minWidth)mOffX=(dX-(diffX=elmW-minWidth));else if(elmX+dX<minLeft)mOffX=(dX-(diffX=minLeft-elmX));elmX+=diffX;elmW-=diffX;processed=true;}
if(hClass.indexOf('r')>=0){rs=1;if(elmW+dX<minWidth)mOffX=(dX-(diffX=minWidth-elmW));else if(elmX+elmW+dX>maxLeft)mOffX=(dX-(diffX=maxLeft-elmX-elmW));elmW+=diffX;processed=true;}
return processed;}};function Delegate(){}
Delegate.create=function(o,f){var a=new Array();var l=arguments.length;for(var i=2;i<l;i++)a[i-2]=arguments[i];return function(){var aP=[].concat(arguments,a);f.apply(o,aP);}}
Tween=function(obj,prop,func,begin,finish,duration,suffixe){this.init(obj,prop,func,begin,finish,duration,suffixe)}
var t=Tween.prototype;t.obj=new Object();t.prop='';t.func=function(t,b,c,d){return c*t/d+b;};t.begin=0;t.change=0;t.prevTime=0;t.prevPos=0;t.looping=false;t._duration=0;t._time=0;t._pos=0;t._position=0;t._startTime=0;t._finish=0;t.name='';t.suffixe='';t._listeners=new Array();t.setTime=function(t){this.prevTime=this._time;if(t>this.getDuration()){if(this.looping){this.rewind(t-this._duration);this.update();this.broadcastMessage('onMotionLooped',{target:this,type:'onMotionLooped'});}else{this._time=this._duration;this.update();this.stop();this.broadcastMessage('onMotionFinished',{target:this,type:'onMotionFinished'});}}else if(t<0){this.rewind();this.update();}else{this._time=t;this.update();}}
t.getTime=function(){return this._time;}
t.setDuration=function(d){this._duration=(d==null||d<=0)?100000:d;}
t.getDuration=function(){return this._duration;}
t.setPosition=function(p){this.prevPos=this._pos;var a=this.suffixe!=''?this.suffixe:'';this.obj[this.prop]=Math.round(p)+a;this._pos=p;this.broadcastMessage('onMotionChanged',{target:this,type:'onMotionChanged'});}
t.getPosition=function(t){if(t==undefined)t=this._time;return this.func(t,this.begin,this.change,this._duration);};t.setFinish=function(f){this.change=f-this.begin;};t.geFinish=function(){return this.begin+this.change;};t.init=function(obj,prop,func,begin,finish,duration,suffixe){if(!arguments.length)return;this._listeners=new Array();this.addListener(this);if(suffixe)this.suffixe=suffixe;this.obj=obj;this.prop=prop;this.begin=begin;this._pos=begin;this.setDuration(duration);if(func!=null&&func!=''){this.func=func;}
this.setFinish(finish);}
t.start=function(){this.rewind();this.startEnterFrame();this.broadcastMessage('onMotionStarted',{target:this,type:'onMotionStarted'});}
t.rewind=function(t){this.stop();this._time=(t==undefined)?0:t;this.fixTime();this.update();}
t.fforward=function(){this._time=this._duration;this.fixTime();this.update();}
t.update=function(){this.setPosition(this.getPosition(this._time));}
t.startEnterFrame=function(){this.stopEnterFrame();this.isPlaying=true;this.onEnterFrame();}
t.onEnterFrame=function(){if(this.isPlaying){this.nextFrame();setTimeout(Delegate.create(this,this.onEnterFrame),0);}}
t.nextFrame=function(){this.setTime((this.getTimer()-this._startTime)/1000);}
t.stop=function(){this.stopEnterFrame();this.broadcastMessage('onMotionStopped',{target:this,type:'onMotionStopped'});}
t.stopEnterFrame=function(){this.isPlaying=false;}
t.continueTo=function(finish,duration){this.begin=this._pos;this.setFinish(finish);if(this._duration!=undefined)
this.setDuration(duration);this.start();}
t.resume=function(){this.fixTime();this.startEnterFrame();this.broadcastMessage('onMotionResumed',{target:this,type:'onMotionResumed'});}
t.yoyo=function(){this.continueTo(this.begin,this._time);}
t.addListener=function(o){this.removeListener(o);return this._listeners.push(o);}
t.removeListener=function(o){var a=this._listeners;var i=a.length;while(i--){if(a[i]==o){a.splice(i,1);return true;}}
return false;}
t.broadcastMessage=function(){var arr=new Array();for(var i=0;i<arguments.length;i++){arr.push(arguments[i])}
var e=arr.shift();var a=this._listeners;var l=a.length;for(var i=0;i<l;i++){if(a[i][e])
a[i][e].apply(a[i],arr);}}
t.fixTime=function(){this._startTime=this.getTimer()-this._time*1000;}
t.getTimer=function(){return new Date().getTime()-this._time;}
Tween.backEaseIn=function(t,b,c,d,a,p){if(s==undefined)var s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;}
Tween.backEaseOut=function(t,b,c,d,a,p){if(s==undefined)var s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;}
Tween.backEaseInOut=function(t,b,c,d,a,p){if(s==undefined)var s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;}
Tween.elasticEaseIn=function(t,b,c,d,a,p){if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else
var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;}
Tween.elasticEaseOut=function(t,b,c,d,a,p){if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return(a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b);}
Tween.elasticEaseInOut=function(t,b,c,d,a,p){if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)var p=d*(.3*1.5);if(!a||a<Math.abs(c)){var a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;}
Tween.bounceEaseOut=function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}}
Tween.bounceEaseIn=function(t,b,c,d){return c-Tween.bounceEaseOut(d-t,0,c,d)+b;}
Tween.bounceEaseInOut=function(t,b,c,d){if(t<d/2)return Tween.bounceEaseIn(t*2,0,c,d)*.5+b;else return Tween.bounceEaseOut(t*2-d,0,c,d)*.5+c*.5+b;}
Tween.strongEaseInOut=function(t,b,c,d){return c*(t/=d)*t*t*t*t+b;}
Tween.regularEaseIn=function(t,b,c,d){return c*(t/=d)*t+b;}
Tween.regularEaseOut=function(t,b,c,d){return-c*(t/=d)*(t-2)+b;}
Tween.regularEaseInOut=function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;}
Tween.strongEaseIn=function(t,b,c,d){return c*(t/=d)*t*t*t*t+b;}
Tween.strongEaseOut=function(t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;}
Tween.strongEaseInOut=function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;}
function thisMovie(movieName){if(navigator.appName.indexOf("Microsoft")!==-1){var o=window[movieName];if(o===undefined){o=document[movieName];}
return o;}
else{return document[movieName];}}
function parseQueryString(querystring){var qsObj={};var qs=querystring?querystring:window.location.search;if(qs.charAt(0)==='?'){qs=qs.slice(1,qs.length);}
if(qs.length<1){return qsObj;}
qs=qs.replace(/\&amp\;/gi,'&');qs=qs.split('&');for(var i=0;i<qs.length;i++){var pairs=qs[i].split("=");qsObj[pairs[0]]=pairs[1];}
return qsObj;}
function getPartnerId(){if(document.getElementById("HULU_VP_JS")===null){return;}
var scriptSrc=document.getElementById("HULU_VP_JS").src;var qs=parseQueryString(scriptSrc.split('?')[1]);if(qs.partner===undefined||qs.partner===""){return;}
if(qs.partner.toLowerCase()==="hulu"){if(document.location.href.indexOf("hulu.com")===-1){qs.partner="";}}
return qs.partner;}
var playerHostPath="http://www.hulu.com/widget/embed/videopanelplayer";var VideoPlayerComponent={};VideoPlayerComponent.options={partner:"",playerMode:"floating",playerWMode:"window",showMetaData:"true",width:512,height:395,scale:1.0,zIndexSpace:500,videoPanelDisable:true,tweenWidthDur:0.5,tweenHeightDur:0.5,tweenCoverDur:0.3,swfRetryMax:10,swfRetryInterval:400,isFloating:function(){return VideoPlayerComponent.options.playerMode.indexOf("floating")!==-1;},isDraggable:function(){return VideoPlayerComponent.options.playerMode.indexOf("draggable")!==-1;}};VideoPlayerComponent.state={lastOpenCloseTime:(new Date()).getTime(),playerOpen:false,objectId:"videoPlayerComponent_NS",playerId:"videoPlayerComponent",containerId:"huluPlayer",coverId:"videoPlayerCover",handleId:"videoPlayerHandle",swfRetryCount:0,rerooted:false};VideoPlayerComponent.playerWindowPlacement={x:0,y:0,initial:1};VideoPlayerComponent.getOptions=function(){var attributes=document.getElementById(VideoPlayerComponent.state.containerId).attributes;for(var i=0;i<attributes.length;i++){var name=attributes[i].name;if(name.toLowerCase()==="playermode"){VideoPlayerComponent.options.playerMode=attributes[i].value.toLowerCase();}
else if(name.toLowerCase()==="playerscale"){VideoPlayerComponent.options.scale=attributes[i].value;}
else if(name.toLowerCase()==="playerplayvideo"){VideoPlayerComponent.options.playVideo=attributes[i].value;}
else if(name.toLowerCase()==="playercuevideo"){VideoPlayerComponent.options.cueVideo=attributes[i].value;}
else if(name.toLowerCase()==="playerwmode"){if(attributes[i].value.toLowerCase()==="window"||attributes[i].value.toLowerCase()==="transparent"||attributes[i].value.toLowerCase()==="opaque"){VideoPlayerComponent.options.playerWMode=attributes[i].value;}}
else if(name.toLowerCase()==="playershowmetadata"){if(attributes[i].value.toLowerCase()==="false"){VideoPlayerComponent.options.showMetaData="false";}}}};VideoPlayerComponent.initialize=function(){VideoPlayerComponent.getOptions();var innerDivs='<div id="videoPlayerComponent"></div><div id="videoPlayerHandle"></div><div id="videoPlayerCover"></div>';document.getElementById(VideoPlayerComponent.state.containerId).innerHTML=innerDivs;if(!VideoPlayerComponent.options.isFloating()){var containerDiv=document.getElementById(VideoPlayerComponent.state.containerId);var initialX=0;var initialY=0;if(containerDiv.style.left!==""){initialX=parseFloat(containerDiv.style.left);}
if(containerDiv.style.top!==""){initialY=parseFloat(containerDiv.style.top);}
VideoPlayerComponent.playerWindowPlacement.x=initialX+parseFloat(VideoPlayerComponent.options.width)/2;VideoPlayerComponent.playerWindowPlacement.y=initialY+parseFloat(VideoPlayerComponent.options.height)/2;}
VideoPlayerComponent.options.scale=Math.max(Math.min(1.2,VideoPlayerComponent.options.scale),0.8);VideoPlayerComponent.options.width=Math.ceil(VideoPlayerComponent.options.width*VideoPlayerComponent.options.scale);VideoPlayerComponent.options.height=Math.ceil(VideoPlayerComponent.options.height*VideoPlayerComponent.options.scale);if(VideoPlayerComponent.options.isDraggable()){VideoPlayerComponent.options.playerWMode="transparent";}
var swfObjectPlayer=new SWFObject(playerHostPath,VideoPlayerComponent.state.objectId,VideoPlayerComponent.options.width,VideoPlayerComponent.options.height,"8.0.23","",true);swfObjectPlayer.addParam("bgcolor","0x000000");swfObjectPlayer.addParam("allowScriptAccess","always");swfObjectPlayer.addParam("allowFullscreen","true");swfObjectPlayer.addParam("wmode",VideoPlayerComponent.options.playerWMode);swfObjectPlayer.addVariable("partner",VideoPlayerComponent.options.partner);swfObjectPlayer.addVariable("divDisplayType",VideoPlayerComponent.options.playerMode);swfObjectPlayer.addVariable("showMetaDataBar",VideoPlayerComponent.options.showMetaData);swfObjectPlayer.write(VideoPlayerComponent.state.playerId);VideoPlayerComponent.updateInitialDisplay();};VideoPlayerComponent.updateInitialDisplay=function(){try{var playerDiv=document.getElementById(VideoPlayerComponent.state.playerId);var containerDiv=document.getElementById(VideoPlayerComponent.state.containerId);var coverDiv=document.getElementById(VideoPlayerComponent.state.coverId);var handleDiv=document.getElementById(VideoPlayerComponent.state.handleId);playerDiv.style.position="absolute";playerDiv.style.background="";playerDiv.style.width=playerDiv.style.height=1;coverDiv.style.position="absolute";coverDiv.style.backgrond="#000000";handleDiv.style.position="absolute";if(VideoPlayerComponent.options.playerMode==="fixed"||VideoPlayerComponent.options.playerMode==="fixed-open"){if(!containerDiv.style.position||containerDiv.style.position===""){containerDiv.style.position="relative";}
containerDiv.style.width=VideoPlayerComponent.options.width;containerDiv.style.height=VideoPlayerComponent.options.height;if(VideoPlayerComponent.options.playerMode==="fixed"){VideoPlayerComponent.hidePlayer();}
else{VideoPlayerComponent.showPlayer();}}
else{if(containerDiv.className&&containerDiv.className!=="drsElement"){containerDiv.style.display="none";}
containerDiv.style.position="absolute";VideoPlayerComponent.hidePlayer();VideoPlayerComponent.initializeDrag();}}
catch(e){setTimeout("VideoPlayerComponent.updateInitialDisplay()",500);}};VideoPlayerComponent.setInitialContent=function(){try{var panel=thisMovie(VideoPanelComponent.instances[0].objectId);var player=thisMovie(VideoPlayerComponent.state.objectId);var contentId=panel.getInitialContentId();if(contentId===null){setTimeout("VideoPlayerComponent.setInitialContent()",100);return;}
if(VideoPlayerComponent.options.playVideo!==undefined){player.toFlash("playVideo",VideoPlayerComponent.options.playVideo);return;}
else if(VideoPlayerComponent.options.cueVideo!==undefined){player.toFlash("cueVideoById",VideoPlayerComponent.options.cueVideo);return;}
else{if(contentId!==-1){player.toFlash("cueVideoById",contentId);}}}
catch(e){setTimeout("VideoPlayerComponent.setInitialContent()",500);return;}};VideoPlayerComponent.hidePlayer=function(){var player=thisMovie(VideoPlayerComponent.state.objectId);player.style.display="block";player.style.width=player.style.height="1px";VideoPlayerComponent.state.playerOpen=false;};VideoPlayerComponent.showPlayer=function(){var player=thisMovie(VideoPlayerComponent.state.objectId);player.style.display="block";player.style.width=VideoPlayerComponent.options.width;player.style.height=VideoPlayerComponent.options.height;VideoPlayerComponent.state.playerOpen=true;};VideoPlayerComponent.close=function(){var player=thisMovie(VideoPlayerComponent.state.objectId);var playerDiv=document.getElementById(VideoPlayerComponent.state.playerId);var containerDiv=document.getElementById(VideoPlayerComponent.state.containerId);var coverDiv=document.getElementById(VideoPlayerComponent.state.coverId);var handleDiv=document.getElementById(VideoPlayerComponent.state.handleId);if(!player||!containerDiv||!coverDiv||VideoPlayerComponent.queueOverlappingTweens("VideoPlayerComponent.close()")){return;}
try{player.toFlash("stopVideo");}
catch(e){if(++VideoPlayerComponent.state.swfRetryCount<=VideoPlayerComponent.options.swfRetryMax){setTimeout("VideoPlayerComponent.close()",VideoPlayerComponent.options.swfRetryInterval);}
return;}
if(VideoPlayerComponent.options.playerMode!=="fixed-open"&&VideoPlayerComponent.state.playerOpen){if(VideoPlayerComponent.options.isFloating()){VideoPlayerComponent.playerWindowPlacement.x=parseFloat(containerDiv.style.left)+parseFloat(VideoPlayerComponent.options.width)/2;VideoPlayerComponent.playerWindowPlacement.y=parseFloat(containerDiv.style.top)+parseFloat(VideoPlayerComponent.options.height)/2;}
coverDiv.style.top=playerDiv.style.top;coverDiv.style.left=playerDiv.style.left;coverDiv.style.width=playerDiv.style.width;coverDiv.style.height=playerDiv.style.height;coverDiv.style.display="block";playerDiv.style.zIndex=VideoPlayerComponent.options.zIndexSpace+1;coverDiv.style.zIndex=VideoPlayerComponent.options.zIndexSpace+2;if(VideoPlayerComponent.options.isDraggable()){VideoPlayerComponent.setHandle(false);}
var tween1=new Tween(coverDiv.style,"opacity",Tween.regularEaseInOut,0,1,VideoPlayerComponent.options.tweenCoverDur,"");var tween2=new Tween(playerDiv.style,"height",Tween.regularEaseInOut,VideoPlayerComponent.options.height,1,VideoPlayerComponent.options.tweenHeightDur,"px");var tween3=new Tween(playerDiv.style,"width",Tween.regularEaseInOut,VideoPlayerComponent.options.width,1,VideoPlayerComponent.options.tweenWidthDur,"px");tween1.onMotionChanged=function(evt){var v=evt.target._pos;VideoPlayerComponent.setOpacity(coverDiv,v);};tween1.onMotionFinished=function(evt){coverDiv.style.display="none";player.style.width=player.style.height=1+"px";tween2.start();};tween2.onMotionChanged=function(evt){var v=evt.target._pos;playerDiv.style.top=Math.round(VideoPlayerComponent.options.height/2-v/2)+"px";};tween2.onMotionFinished=function(evt){VideoPanelComponent.onPlayerClosed();playerDiv.style.width=VideoPlayerComponent.options.width;tween3.start();};tween3.onMotionChanged=function(evt){var v=evt.target._pos;playerDiv.style.left=Math.round(VideoPlayerComponent.options.width/2-v/2)+"px";};tween3.onMotionFinished=function(evt){playerDiv.style.top=playerDiv.style.left=-1000+"px";};tween1.start();VideoPlayerComponent.state.playerOpen=false;}};VideoPlayerComponent.playVideo=function(id){var player=thisMovie(VideoPlayerComponent.state.objectId);var playerDiv=document.getElementById(VideoPlayerComponent.state.playerId);var containerDiv=document.getElementById(VideoPlayerComponent.state.containerId);var coverDiv=document.getElementById(VideoPlayerComponent.state.coverId);var handleDiv=document.getElementById(VideoPlayerComponent.state.handleId);if(!player||!containerDiv||!coverDiv||VideoPlayerComponent.queueOverlappingTweens("VideoPlayerComponent.playVideo("+id+")")){return;}
try{containerDiv.style.display="block";player.toFlash("playVideo",id);}
catch(e){if(++VideoPlayerComponent.state.swfRetryCount<=VideoPlayerComponent.options.swfRetryMax){setTimeout("VideoPlayerComponent.playVideo("+id+")",VideoPlayerComponent.options.swfRetryInterval);}
return;}
if(VideoPlayerComponent.options.playerMode!=="fixed-open"&&!VideoPlayerComponent.state.playerOpen){if(VideoPlayerComponent.options.isFloating()){if(VideoPlayerComponent.playerWindowPlacement.initial||VideoPlayerComponent.options.playerMode!=="floating-draggable"){VideoPlayerComponent.playerWindowPlacement=VideoPlayerComponent.getWindowCenter();VideoPlayerComponent.playerWindowPlacement.initial=0;}
containerDiv.style.left=Math.round(VideoPlayerComponent.playerWindowPlacement.x-VideoPlayerComponent.options.width/2)+"px";containerDiv.style.top=Math.round(VideoPlayerComponent.playerWindowPlacement.y-VideoPlayerComponent.options.height/2)+"px";}
playerDiv.style.top=Math.round(VideoPlayerComponent.options.height/2)+"px";playerDiv.style.left=Math.round(VideoPlayerComponent.options.width/2)+"px";playerDiv.style.width=playerDiv.style.height="1px";playerDiv.style.background="#000000";playerDiv.style.zIndex=VideoPlayerComponent.options.zIndexSpace+1;coverDiv.style.zIndex=VideoPlayerComponent.options.zIndexSpace+2;coverDiv.style.display="none";var tween1=new Tween(playerDiv.style,"width",Tween.regularEaseInOut,1,VideoPlayerComponent.options.width,VideoPlayerComponent.options.tweenWidthDur,"px");var tween2=new Tween(playerDiv.style,"height",Tween.regularEaseInOut,1,VideoPlayerComponent.options.height,VideoPlayerComponent.options.tweenHeightDur,"px");var tween3=new Tween(coverDiv.style,"opacity",Tween.regularEaseInOut,1,0,VideoPlayerComponent.options.tweenCoverDur,"");tween1.onMotionChanged=function(evt){var v=evt.target._pos;playerDiv.style.left=Math.round(VideoPlayerComponent.options.width/2-v/2)+"px";};tween1.onMotionFinished=function(evt){tween2.start();};tween2.onMotionChanged=function(evt){var v=evt.target._pos;playerDiv.style.top=Math.round(VideoPlayerComponent.options.height/2-v/2)+"px";};tween2.onMotionFinished=function(evt){player.style.width=VideoPlayerComponent.options.width+"px";player.style.height=VideoPlayerComponent.options.height+"px";coverDiv.style.top=coverDiv.style.left=playerDiv.style.top=playerDiv.style.left="0px";coverDiv.style.width=playerDiv.style.width=VideoPlayerComponent.options.width+"px";coverDiv.style.height=playerDiv.style.height=VideoPlayerComponent.options.height+"px";coverDiv.style.display="block";playerDiv.style.display="block";if(VideoPlayerComponent.options.isDraggable()){VideoPlayerComponent.setHandle(true);}
tween3.start();VideoPlayerComponent.state.playerOpen=true;};tween3.onMotionChanged=function(evt){var v=evt.target._pos;VideoPlayerComponent.setOpacity(coverDiv,v);};tween3.onMotionFinished=function(evt){coverDiv.style.width=coverDiv.style.height="0px";};tween1.start();}};VideoPlayerComponent.queueOverlappingTweens=function(retryCallback){var now=(new Date()).getTime();var diff=now-VideoPlayerComponent.state.lastOpenCloseTime;var needed=(VideoPlayerComponent.options.tweenWidthDur+VideoPlayerComponent.options.tweenHeightDur+VideoPlayerComponent.options.tweenCoverDur)*1000;if(diff<needed){setTimeout(retryCallback,needed-diff+100);return true;}
VideoPlayerComponent.state.lastOpenCloseTime=now;return false;};VideoPlayerComponent.setHandle=function(enable){var handleDiv=document.getElementById(VideoPlayerComponent.state.handleId);if(enable&&VideoPlayerComponent.options.isFloating()){handleDiv.style.zIndex=VideoPlayerComponent.options.zIndexSpace+3;handleDiv.className="drsMoveHandle";handleDiv.style.position="absolute";handleDiv.style.left="70px";handleDiv.style.top="0px";handleDiv.style.height="27px";handleDiv.style.width="415px";handleDiv.style.cursor="move";handleDiv.style.background="#333333";VideoPlayerComponent.setOpacity(handleDiv,0);}
else{handleDiv.style.width=handleDiv.style.height=0;}};VideoPlayerComponent.setOpacity=function(target,value){target.style.opacity=value;target.style.MozOpacity=value;target.style.filter="alpha(opacity="+(value*100)+")";};VideoPlayerComponent.getScrollOffset=function(){var offsetX=0;var offsetY=0;try{if(!window.pageYOffset){if(!(document.documentElement.scrollTop===0)){offsetY=document.documentElement.scrollTop;offsetX=document.documentElement.scrollLeft;}
else{offsetY=document.body.scrollTop;offsetX=document.body.scrollLeft;}}
else{offsetX=window.pageXOffset;offsetY=window.pageYOffset;}}
catch(e){}
return{x:offsetX,y:offsetY};};VideoPlayerComponent.getWindowCenter=function(){var windowSize=VideoPlayerComponent.getWindowSize();var scrollOffset=VideoPlayerComponent.getScrollOffset();return{x:windowSize.width/2+scrollOffset.x,y:windowSize.height/2+scrollOffset.y};};VideoPlayerComponent.getWindowSize=function(){var innerWidth=800;var innerHeight=800;try{if(!window.innerWidth){if(!(document.documentElement.clientWidth===0)){innerWidth=document.documentElement.clientWidth;innerHeight=document.documentElement.clientHeight;}
else{innerWidth=document.body.clientWidth;innerHeight=document.body.clientHeight;}}
else{innerWidth=window.innerWidth;innerHeight=window.innerHeight;}}
catch(e){}
return{width:innerWidth,height:innerHeight};};VideoPlayerComponent.initializeDrag=function(){var windowSize=VideoPlayerComponent.getWindowSize();var gutter=10;var dragresize=new DragResize('dragresize',{minLeft:gutter,minTop:gutter,maxLeft:windowSize.width-VideoPlayerComponent.options.width-gutter,maxTop:windowSize.height-VideoPlayerComponent.options.height-gutter,handles:[]});dragresize.isElement=function(elm){if(elm.className&&elm.className.indexOf('drsElement')>-1){return true;}};dragresize.isHandle=function(elm){if(elm.className&&elm.className.indexOf('drsMoveHandle')>-1){return true;}};var containerDiv=document.getElementById(VideoPlayerComponent.state.containerId);if(!containerDiv.className){containerDiv.className="";}
containerDiv.className+=" drsElement";dragresize.apply(document);};var videoPanelHostPath="http://www.hulu.com/widget/embed/videopanel";function VideoPanelComponent(){this.options={partner:"",layout:"vertical",items:3,width:210,height:556,scaleX:1.0,scaleY:1.0};}
VideoPanelComponent.instances=new Array();VideoPanelComponent.updateCurrentPlayingVideo=function(id){thisMovie(VideoPanelComponent.instances[0].objectId).setCurrentPlayingVideo(id,0);};VideoPanelComponent.playVideo=function(id,videoPanelIndex){for(var i=0;i<VideoPanelComponent.instances.length;i++){if(i!==videoPanelIndex){thisMovie(VideoPanelComponent.instances[i].objectId).setCurrentPlayingVideo(id,videoPanelIndex);}}
VideoPanelComponent.currentIndex=videoPanelIndex;if((VideoPlayerComponent.options.isFloating())&&!VideoPlayerComponent.state.rerooted){var containerDiv=document.getElementById(VideoPlayerComponent.state.containerId);var oldParent=containerDiv.parentNode;if(oldParent){oldParent.removeChild(containerDiv);document.body.insertBefore(containerDiv,document.body.lastChild);VideoPlayerComponent.state.rerooted=true;}
VideoPlayerComponent.initialize();}
VideoPlayerComponent.playVideo(id);};VideoPanelComponent.disable=function(){for(var i=0;i<VideoPanelComponent.instances.length;i++){thisMovie(VideoPanelComponent.instances[i].objectId).disable();}};VideoPanelComponent.enable=function(){for(var i=0;i<VideoPanelComponent.instances.length;i++){thisMovie(VideoPanelComponent.instances[i].objectId).enable();}};VideoPanelComponent.onPlayerClosed=function(){for(var i=0;i<VideoPanelComponent.instances.length;i++){thisMovie(VideoPanelComponent.instances[i].objectId).onPlayerClosed();}};VideoPanelComponent.onVideoEnd=function(){if(VideoPanelComponent.instances[VideoPanelComponent.currentIndex].options.autoPlay){thisMovie(VideoPanelComponent.instances[VideoPanelComponent.currentIndex].objectId).playNextVideo();}};VideoPanelComponent.prototype.getOptions=function(targetId){var attributes=document.getElementById(targetId).attributes;for(var i=0;i<attributes.length;i++){var name=attributes[i].name;if(name.toLowerCase()==="panelpartner"){this.options.partner=attributes[i].value;VideoPlayerComponent.options.partner=attributes[i].value;}
else if(name.toLowerCase()==="panellayout"){if(attributes[i].value.toLowerCase()==="horizontal"){this.options.layout="horizontal";}}
else if(name.toLowerCase()==="panelitems"){if(attributes[i].value>0&&attributes[i].value<5){this.options.items=attributes[i].value;}}
else if(name.toLowerCase()==="panelscalex"){this.options.scaleX=attributes[i].value;}
else if(name.toLowerCase()==="panelscaley"){this.options.scaleY=attributes[i].value;}
else if(name.toLowerCase()==="panelautoplay"){this.options.autoPlay=(attributes[i].value.toLowerCase()==="true");}
else if(name.toLowerCase()==="panelbackgroundcolor"){this.options.backgroundColor=attributes[i].value;}
else if(name.toLowerCase()==="panelbordercolor"){this.options.borderColor=attributes[i].value;}
else if(name.toLowerCase()==="panelelementcolor"){this.options.elementColor=attributes[i].value;}
else if(name.toLowerCase()==="panelelementbackgroundcolor"){this.options.elementBackgroundColor=attributes[i].value;}
else if(name.toLowerCase()==="panelelementbackgroundhovercolor"){this.options.elementBackgroundHoverColor=attributes[i].value;}
else if(name.toLowerCase()==="panelelementbordercolor"){this.options.elementBorderColor=attributes[i].value;}
else if(name.toLowerCase()==="panelelementhovercolor"){this.options.elementHoverColor=attributes[i].value;}
else if(name.toLowerCase()==="panelrolloverbackgroundcolor"){this.options.rolloverBackgroundColor=attributes[i].value;}
else if(name.toLowerCase()==="paneltextcolor"){this.options.textColor=attributes[i].value;}
else if(name.toLowerCase()==="panelchannel"){this.options.channel=attributes[i].value;}
else if(name.toLowerCase()==="panelnetwork"){this.options.network=attributes[i].value;}
else if(name.toLowerCase()==="panelmediatype"){this.options.mediaType=attributes[i].value;}
else if(name.toLowerCase()==="panelshow"){this.options.show=attributes[i].value;}
else if(name.toLowerCase()==="panelseason"){this.options.season=attributes[i].value;}
else if(name.toLowerCase()==="panelvideotype"){this.options.videoType=attributes[i].value;}
else if(name.toLowerCase()==="panelkeywords"){this.options.keywords=attributes[i].value;}
else if(name.toLowerCase()==="panelcontentid"){this.options.contentId=attributes[i].value;}
else if(name.toLowerCase()==="panelallowmature"){this.options.allowMature=attributes[i].value;}
else if(name.toLowerCase()==="panelsearchenabled"){this.options.searchEnabled=attributes[i].value;}
else if(name.toLowerCase()==="panelsortenabled"){this.options.sortEnabled=attributes[i].value;}
else if(name.toLowerCase()==="panelsortdefault"){this.options.sortDefault=attributes[i].value;}
else if(name.toLowerCase()==="panelmenu"){this.options.menuIndex=attributes[i].value;}
else if(name.toLowerCase()==="panelcategory"){this.options.categoryIndex=attributes[i].value;}
else if(name.toLowerCase()==="panelautoscroll"){var value=Math.floor(attributes[i].value);if(value>2){this.options.autoScroll=value.toString();}}}};VideoPanelComponent.prototype.initialize=function(panelBaseId,videoPanelIndex){this.options.partner=VideoPlayerComponent.options.partner;this.targetId=panelBaseId;this.objectId=panelBaseId+"_NS";this.getOptions(this.targetId);var layoutName=this.options.layout+this.options.items+"thumbs";if(layoutName==="horizontal4thumbs"){this.options.width=725;this.options.height=210;}
else if(layoutName==="horizontal3thumbs"){this.options.width=558;this.options.height=210;}
else if(layoutName==="horizontal2thumbs"){this.options.width=391;this.options.height=210;}
else if(layoutName==="vertical4thumbs"){this.options.width=210;this.options.height=725;}
else if(layoutName==="vertical3thumbs"){this.options.width=210;this.options.height=589;}
else if(layoutName==="vertical2thumbs"){this.options.width=210;this.options.height=453;}
else if(layoutName==="vertical1thumbs"){this.options.width=210;this.options.height=317;}
this.options.scaleX=Math.max(Math.min(1.1,this.options.scaleX),0.9);this.options.scaleY=Math.max(Math.min(1.1,this.options.scaleY),0.9);if(this.options.scaleX-this.options.scaleY>0.1){this.options.scaleY=parseFloat(this.options.scaleX-0.1);}
else if(this.options.scaleX-this.options.scaleY<-0.1){this.options.scaleY=parseFloat(this.options.scaleX+0.1);}
this.options.width=Math.ceil(this.options.width*this.options.scaleX);this.options.height=Math.ceil(this.options.height*this.options.scaleY);var swfObjectPanel=new SWFObject(videoPanelHostPath,this.objectId,this.options.width,this.options.height,"8.0.23","",true);swfObjectPanel.addParam("bgcolor","0x000000");swfObjectPanel.addParam("allowScriptAccess","always");swfObjectPanel.addParam("wmode","transparent");swfObjectPanel.addVariable("partner",this.options.partner);swfObjectPanel.addVariable("layout",layoutName);swfObjectPanel.addVariable("instanceIndex",videoPanelIndex);if(this.options.scaleX!==undefined){swfObjectPanel.addVariable("scaleX",this.options.scaleX);}
if(this.options.scaleY!==undefined){swfObjectPanel.addVariable("scaleY",this.options.scaleY);}
if(this.options.backgroundColor!==undefined){swfObjectPanel.addVariable("backgroundColor",this.options.backgroundColor);}
if(this.options.borderColor!==undefined){swfObjectPanel.addVariable("borderColor",this.options.borderColor);}
if(this.options.elementColor!==undefined){swfObjectPanel.addVariable("elementColor",this.options.elementColor);}
if(this.options.elementBackgroundColor!==undefined){swfObjectPanel.addVariable("elementBackgroundColor",this.options.elementBackgroundColor);}
if(this.options.elementBackgroundHoverColor!==undefined){swfObjectPanel.addVariable("elementBackgroundHoverColor",this.options.elementBackgroundHoverColor);}
if(this.options.elementBorderColor!==undefined){swfObjectPanel.addVariable("elementBorderColor",this.options.elementBorderColor);}
if(this.options.elementHoverColor!==undefined){swfObjectPanel.addVariable("elementHoverColor",this.options.elementHoverColor);}
if(this.options.textColor!==undefined){swfObjectPanel.addVariable("rolloverBackgroundColor",this.options.rolloverBackgroundColor);}
if(this.options.textColor!==undefined){swfObjectPanel.addVariable("textColor",this.options.textColor);}
if(this.options.channel!==undefined){swfObjectPanel.addVariable("channel",this.options.channel);}
if(this.options.network!==undefined){swfObjectPanel.addVariable("network",this.options.network);}
if(this.options.mediaType!==undefined){swfObjectPanel.addVariable("mediaType",this.options.mediaType);}
if(this.options.show!==undefined){swfObjectPanel.addVariable("show",this.options.show);}
if(this.options.season!==undefined){swfObjectPanel.addVariable("season",this.options.season);}
if(this.options.videoType!==undefined){swfObjectPanel.addVariable("videoType",this.options.videoType);}
if(this.options.keywords!==undefined){swfObjectPanel.addVariable("keywords",this.options.keywords);}
if(this.options.contentId!==undefined){swfObjectPanel.addVariable("contentId",this.options.contentId);}
if(this.options.allowMature!==undefined){swfObjectPanel.addVariable("allowMature",this.options.allowMature);}
if(this.options.searchEnabled!==undefined){swfObjectPanel.addVariable("searchEnabled",this.options.searchEnabled);}
if(this.options.sortEnabled!==undefined){swfObjectPanel.addVariable("sortEnabled",this.options.sortEnabled);}
if(this.options.sortDefault!==undefined){swfObjectPanel.addVariable("sortDefault",this.options.sortDefault);}
if(this.options.autoScroll!==undefined){swfObjectPanel.addVariable("autoScroll",this.options.autoScroll);}
if(this.options.menuIndex!==undefined){swfObjectPanel.addVariable("menuIndex",this.options.menuIndex);}
if(this.options.categoryIndex!==undefined){swfObjectPanel.addVariable("categoryIndex",this.options.categoryIndex);}
swfObjectPanel.write(this.targetId);VideoPanelComponent.instances.push(this);};var NewSite=new Object();NewSite.updateObservers=function(eventType,data){if(eventType==="theEnd"){VideoPanelComponent.onVideoEnd();}};var panelBaseId="huluPanel";var videoPanelIndex=0;var panelDivs=new Array();var divElements=document.getElementsByTagName("div");for(var i=0;i<divElements.length;i++){if(divElements[i].id.indexOf(panelBaseId)!==-1){panelDivs.push(divElements[i].id);}}
var partnerId=getPartnerId();if(partnerId!==undefined&&partnerId!==""){VideoPlayerComponent.options.partner=partnerId;}
if(document.getElementById(VideoPlayerComponent.state.containerId)&&panelDivs.length>0){VideoPlayerComponent.initialize();}
for(var i=0;i<panelDivs.length;i++){var videoPanel=new VideoPanelComponent();videoPanel.initialize(panelDivs[i],i);}
if(VideoPlayerComponent.options.playerMode==="fixed-open"){VideoPlayerComponent.setInitialContent();}