/* Metacafe Copyright - http://www.metacafe.com/ */
/* Files included: _CountDown.js _AC_RunActiveContent.js swfobject.js _FaderOverlay.js YouTubeCatalog.js _BillboardPlayer.js _BrandedContainer.js _ItemCatalog2Container.js s2f.js ticker.js AgeGateway.js */

var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion()
{var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}
return version;}
function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}
if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}
var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();}
return flashVer;}
function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision)
{versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}
var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer))
return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision))
return true;}}
return false;}}
function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_Generateobj(objAttrs,params,embedAttrs)
{var str='';if(isIE&&isWin&&!isOpera)
{str+='<object ';for(var i in objAttrs)
{str+=i+'="'+objAttrs[i]+'" ';}
str+='>';for(var i in params)
{str+='<param name="'+i+'" value="'+params[i]+'" /> ';}
str+='</object>';}
else
{str+='<embed ';for(var i in embedAttrs)
{str+=i+'="'+embedAttrs[i]+'" ';}
str+='> </embed>';}
document.write(str);}
function AC_FL_RunContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_SW_RunContent(){var ret=AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+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":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret;}
var AgeGateway=new Class({options:{pageName:'redBand',ageLimit:17,redirect:'/',overlayOpacity:0.9,removeFF:false,perSession:false},initialize:function(options){this.setOptions(options);this.hashCookie=new Hash.Cookie('User',{domain:headerObj.cookieDomain,path:'/',duration:362});this.ageCookieName=this.options.pageName+'_age';this.sessIDCookieName=this.options.pageName+'_sessid';this.boolSessionCookieName=this.options.pageName+'_ok';this.getAgeLimitCookie();},getAgeLimitCookie:function(){this.savedAge=this.hashCookie.get(this.ageCookieName);if(this.options.perSession&&!(this.isSameSession())){this.showAgeGateway();}else if(this.savedAge&&this.savedAge>=this.options.ageLimit){return;}else{this.showAgeGateway();}},isSameSession:function(){return(Cookie.get('PHPSESSID')==this.hashCookie.get(this.sessIDCookieName));},showAgeGateway:function(banned){window.showAgeGateFlg=true;var url='/index.php?pageToLoad=static&displayMode=ageGateway&isFramed=0';if(banned){url+='blocked=1';}
if($("Billboard")){$("Billboard").remove();}
this.mbox=new Moobox({useOverlay:true,bindOpeners:false,addGlobalCloser:false,initialHeight:80,initialWidth:120,zIndex:2000,overlayOpacity:this.options.overlayOpacity,classes:{closer:'Hidden',window:'MbxContainer AgeGateway'}});this.mbox.addEvent('onLoad',this.initAgeGatewayForm.bind(this));this.mbox.open(url);},initAgeGatewayForm:function(){if(this.options.perSession&&!(this.isSameSession())){this.showAgeGatewayForm();}else if(this.savedAge&&this.savedAge.toInt()<this.options.ageLimit){this.toggleUnderageWarning();}else{this.showAgeGatewayForm();}},showAgeGatewayForm:function(){$('AgeGatewayForm').setStyle('visibility','visible');$('VerifyAge').addEvent('click',this.onAgeSubmit.bindWithEvent(this));},onAgeSubmit:function(ev){ev.preventDefault();var d=$('rBDateDay').value,m=$('rBDateMonth').value,y=$('rBDateYear').value;if(d=='DD'||m=='MM'||y=='YYYY'){return;}
var curDate=new Date();var minDate=new Date(curDate.getYear()-this.options.ageLimit,curDate.getMonth(),curDate.getDate(),0,0,0,0);var inputDate=new Date(y,m-1,d,0,0,0,0);var diff=minDate-inputDate;var valid=isNaN(diff)||diff<0?false:true;var age=curDate.getFullYear()-inputDate.getFullYear();if(age==this.options.ageLimit)age-=1;this.hashCookie.set(this.ageCookieName,age);if(this.options.perSession){this.hashCookie.set(this.sessIDCookieName,Cookie.get('PHPSESSID'));}
if(!valid){if(this.options.perSession){this.hashCookie.set(this.boolSessionCookieName,'');}
this.toggleUnderageWarning();}else{if(this.options.perSession){this.hashCookie.set(this.boolSessionCookieName,1);}
if(this.options.removeFF){self.location.href='/f/index.php?inputType=filter&controllerGroup=user&filters=0&prevURL='+self.location.href;}else{this.mbox.close();}}},toggleUnderageWarning:function(){$('AgeGatewayForm').addClass('Hidden');$('UnderageWarning').removeClass('Hidden');this.redirect.delay(5000,this);},redirect:function(){self.location.href=this.options.redirect;}});AgeGateway.implement(new Options);
function drawPlayer(json){var flashvars={'inLCID':json.inLCID,'outLCID':json.outLCID};var attributes={id:'BBPlayer'};var yPos=json.y;var xPos=(json.x-1);if(typeof BBPlayerOfset!=='undefined'){yPos=yPos+BBPlayerOfset.yOffset;xPos=xPos+BBPlayerOfset.xOffset;}
swfobject.embedSWF(json.playerURL,"BBPlayer",json.width,json.height,"9.0.0",headerObj.cdnFlash+"/expressInstall.swf",flashvars,swfobject.defaultParams,attributes);$('BBPlayerPos').removeClass('Hidden').setStyles({'top':yPos+'px','left':(xPos)+'px','border-left':'1px solid black'});}
function hidePlayer(){$('BBPlayerPos').addClass('Hidden');$('BBPlayer').setHTML('');}
var ChannelSubscribe=new Class({initialize:function(subscribed,userPageID){this.subscribed=subscribed?subscribed:false;this.userPageID=userPageID;this.subscribeButton=$('Subscribe')?$('Subscribe'):$('Unsubscribe');var id=!this.subscribed?'Subscribe':'Unsubscribe';this.subscribeButton.setProperty('id',id);this.subscribeButton.addEvent('click',this.onChannelSubscribe.bind(this));},onChannelSubscribe:function(e){new Event(e).preventDefault();var url=this.subscribed?'/index.php?inputType=unsubscribeFromUserPage&pageToLoad=controllerResponse':'/index.php?inputType=subscribeToUserPage&pageToLoad=controllerResponse';var subscribeRequest=new Ajax(url,{method:'post',postBody:"userPageID="+this.userPageID,onSuccess:this.doChannelSubscribe.bind(this)}).request();},doChannelSubscribe:function(response){var ajaxResponse=Json.evaluate(response);switch(ajaxResponse.responseValue.toInt()){case 2:if(confirm('You need to sign in to subscribe to this channel.\nClick "OK" to sign in\nClick "Cancel" to continue without subscribing'))
window.location="/account/login/?action=subscribe";break;case 1:this.subscribed=!this.subscribed;this.updateStatus();break;case 3:alert("The member has blocked you from Subscribing");break;default:alert(ajaxResponse.responseText);break;}},updateStatus:function(){var className=this.subscribed?'IsSubscribed':'IsUnsubscribed';var html=this.subscribed?'Updates will appear on your channel':'Subscription Cancelled';if(!$('SubscriptionStatus')){var span=new Element('span',{'id':'SubscriptionStatus','class':className}).setOpacity(0).setHTML(html).injectAfter($('UtilityLinks'));}else{$('SubscriptionStatus').className=className;$('SubscriptionStatus').setHTML(html);}
this.faderFx=new Fx.Style($('SubscriptionStatus'),'opacity',{onComplete:this.onFxComplete.bind(this)}).start(0,1);},onFxComplete:function(){if($('SubscriptionStatus').getStyle('visibility')=='visible'){var fadeOut=function(){this.faderFx.start(1,0)}.bind(this);fadeOut.delay(3000);}
var id=!this.subscribed?'Subscribe':'Unsubscribe';this.subscribeButton.setProperty('id',id);}});var BrandedContainer=new Class({initialize:function(options){this.options=options;var d=$('Details');if(d!==null){$ES('a.Toggler').addEvent('click',function(e){new Event(e).preventDefault();$('Details').toggleClass('SectionDetails');});}
this.initUtilityBar();this.initChannelSubmit();},initUtilityBar:function(){if($('SendChannel')){var channel=$('ChannelSearchForm').getProperty('action').match(/\/([\w\-_]+)\/tags\//)||null;if(channel){var url="mailto:?subject=You've got to see this&body=http://"+self.location.hostname+"/"+channel[1]+"/";$('SendChannel').setProperty('href',url);}}
if($('Unsubscribe')||$('Subscribe')){this.channelSubscribe=new ChannelSubscribe(this.options.subscribed,this.options.userPageID);}
if($('ChannelSearchForm')){var searchField=$('ChannelSearchField');searchField.addEvent('focus',function(){if(searchField.value==searchField.getProperty('title')){searchField.value='';}});searchField.addEvent('blur',function(){if(searchField.value.trim()==''){searchField.value=searchField.getProperty('title');}});$('ChannelSearchForm').addEvent('submit',function(e){e.preventDefault();top.location.href=this.options.channelURL+'tags/'+createSearchString('ChannelSearchField')+'/';return false;}.bindWithEvent(this));}
if($('UserChannelsCombo')){$E('select','UserChannelsCombo').addEvent('change',function(e){document.location=encodeURI(this.value);});}},injectS2F:function(response){this.div=new Element('div',{'id':'S2FResponse'}).setHTML(response).injectInside(document.body);this.faderObj=new FaderOverlay({targetId:'S2FResponse',openerId:$('SendChannel'),closerId:$ES('.CloseHandler',this.div),initialState:'open',animate:false});this.sendToFriend=new SendToFriend({'userPageID':this.options.userPageID,'wrapper':$('S2FResponse')});iOmnitureMC.hookClickReports();},initChannelSubmit:function(){if(!$('ItemSubmitButton'))return;if($('SectionSelector')){if($('SectionSelector').value==0){$('ItemSubmitButton').disabled=true;$('ItemSubmitButtonWrap').addClass('Disabled');}
$('SectionSelector').addEvent('change',function(e){if(this.value=='0'){$('ItemSubmitButton').disabled=true;if(!$('ItemSubmitButtonWrap').hasClass('Disabled'))$('ItemSubmitButtonWrap').addClass('Disabled');}else{$('ItemSubmitButton').disabled=false;if($('ItemSubmitButtonWrap').hasClass('Disabled'))$('ItemSubmitButtonWrap').removeClass('Disabled');}});}}});
var CountDown=new Class({options:{countUp:false},initialize:function(options){if(!$('DateCounter'))return;this.setOptions(options);this.yOffset=-6;this.targetDate=new Date(this.options.targetDate*1000);this.setDate();},setDate:function(){dateNow=new Date();var tzOffset=(dateNow.getTimezoneOffset()+60)*60000;var dateDiff=this.targetDate.getTime()-(dateNow.getTime()+tzOffset);delete dateNow;dateDiff=Math.floor(dateDiff/1000);var days=Math.floor(dateDiff/86400);if(dateDiff>0||(dateDiff<0&&this.options.countUp)){dateDiff=dateDiff%86400;var hours=Math.floor(dateDiff/3600);dateDiff=dateDiff%3600;var mins=Math.floor(dateDiff/60);dateDiff=dateDiff%60;var secs=Math.floor(dateDiff);var dDays=-(Math.floor(days/10)*30)+this.yOffset;var sDays=-(Math.floor(days%10)*30)+this.yOffset;var dHours=-(Math.floor(hours/10)*30)+this.yOffset;var sHours=-(Math.floor(hours%10)*30)+this.yOffset;var dMins=-(Math.floor(mins/10)*30)+this.yOffset;var sMins=-(Math.floor(mins%10)*30)+this.yOffset;var dSecs=-(Math.floor(secs/10)*30)+this.yOffset;var sSecs=-(Math.floor(secs%10)*30)+this.yOffset;$('dDays').setStyle('background-position','0px '+dDays+'px');$('sDays').setStyle('background-position','0px '+sDays+'px');$('dHours').setStyle('background-position','0px '+dHours+'px');$('sHours').setStyle('background-position','0px '+sHours+'px');$('dMins').setStyle('background-position','0px '+dMins+'px');$('sMins').setStyle('background-position','0px '+sMins+'px');$('dSecs').setStyle('background-position','0px '+dSecs+'px');$('sSecs').setStyle('background-position','0px '+sSecs+'px');this.setDate.bind(this).delay(1000);}else{$('DateCounter').setStyle('display','none');return;}}});CountDown.implement(new Options);
var FaderOverlay=new Class({initialize:function(params){this.visible=false;this.targetId=params.targetId;this.openerId=params.openerId;this.closerId=params.closerId!=undefined?params.closerId:params.targetId;this.fadeAmount=params.fadeAmount!=undefined?params.fadeAmount/100:0.5;this.animate=params.animate!=undefined?params.animate:false;this.initialState=params.initialState!=undefined?params.initialState:false;this.isIE6=navigator.userAgent.indexOf('MSIE 6')!=-1?true:false;if(params.hasBackground!=null)
this.hasBackground=params.hasBackground;else
this.hasBackground=true;if($(this.targetId)){if(!$('fadeOverlay')){this.fadeOverlay=new Element('div',{'id':'fadeOverlay','styles':{'position':'absolute','top':'0px','left':'0px','background':'#000','display':'block','visibility':'hidden','z-index':'999998'}}).injectInside($E('body'));if(navigator.userAgent.indexOf('Firefox')!=-1&&navigator.userAgent.indexOf('Mac')!=-1){this.fadeOverlay.setStyles({'background':'none','background-image':'url(/Images/FaderOverlayBG.png)'});}else{this.fadeOverlay.setOpacity(this.fadeAmount)}
if(!this.hasBackground)
{this.fadeOverlay.setOpacity(0);}}else this.fadeOverlay=$('fadeOverlay');$(this.targetId).setStyles({'position':'absolute','top':'0px','left':'0px','display':'block','visibility':'hidden','z-index':'999999'}).injectAfter(this.fadeOverlay);this.targetElementSize=$(this.targetId).getCoordinates();if(this.animate){this.effects=new Fx.Elements([$(this.targetId),this.fadeOverlay],{duration:500,transition:Fx.Transitions.Sine.easeInOut,onStart:this.onEffectStart.bind(this),onComplete:this.onEffectEnd.bind(this)});this.openerCoords=$(this.openerId).getCoordinates();}
window.addEvent('resize',this.centerOnOverlay.bind(this));if(typeof this.closerId=='string')$(this.closerId).addEvent('click',this.onFaderState.bindWithEvent(this,false));else if(typeof this.closerId=='object'){this.closerId.each(function(id){$(id).addEvent('click',this.onFaderState.bindWithEvent(this,[false]));}.bind(this));}
if(typeof this.openerId.each!='function')$(this.openerId).addEvent('click',this.onFaderState.bindWithEvent(this,true));else if(typeof this.openerId.each=='function'){this.openerId.each(function(id){$(id).addEvent('click',this.onFaderState.bindWithEvent(this,[true]));}.bind(this));}
if(this.initialState=='open'){this.togglePageFader(true,false);}}else{return false;}},getPageSize:function(){var windowSize=window.getSize();this.pageHeight=windowSize.scrollSize.y+$E('body').getStyle('margin-top').toInt();this.pageWidth=windowSize.size.x+$E('body').getStyle('margin-left').toInt();this.absPosLeft=Math.round((windowSize.size.x-this.targetElementSize.width)/2);this.absPosTop=Math.round((windowSize.size.y-this.targetElementSize.height)/2+window.getSize().scroll.y);if(this.absPosTop<0)this.absPosTop=0;if($(this.openerId))this.openerCoords=$(this.openerId).getCoordinates();},centerOnOverlay:function(e,overrideVisibility){if(this.visible||overrideVisibility){this.getPageSize();$(this.targetId).setStyles({top:this.absPosTop+'px',left:this.absPosLeft+'px'});this.fadeOverlay.setStyles({width:this.pageWidth+'px',height:this.pageHeight+35+'px'});}},onFaderState:function(e,state){(new Event(e)).preventDefault();this.togglePageFader(state,this.animate);},togglePageFader:function(state,animate){if(state){this.visible=true;this.centerOnOverlay();if(animate){this.animateTargetIn();}else{this.fadeOverlay.setStyles({'visibility':'visible','display':'block','z-index':'999998'});(function(){$(this.targetId).setStyles({'visibility':'visible','display':'block','z-index':'999999'})}.bind(this)).delay(100);}
if(this.isIE6){$ES('select').setStyle('visibility','hidden');$ES('select',this.targetId).setStyle('visibility','visible');}
$ES('iframe').setStyle('visibility','hidden');}else{this.visible=false;if(animate){this.animateTargetOut();}else{$(this.targetId).setStyles({'visibility':'hidden','display':'none'});(function(){this.fadeOverlay.setStyles({'visibility':'hidden','display':'none','z-index':'-1'})}.bind(this)).delay(100);}
if(this.isIE6)$ES('select').setStyle('visibility','visible');$ES('iframe').setStyle('visibility','visible');}},onEffectStart:function(){if(this.visible){$(this.targetId).setStyles({'visibility':'visible','width':'0px','height':'0px','overflow':'hidden'});this.fadeOverlay.setStyle('visibility','visible');}else{$(this.targetId).setStyle('overflow','hidden');this.fadeOverlay.setStyle('visibility','hidden');}},onEffectEnd:function(){if(!this.visible){$(this.targetId).setStyle('visibility','hidden');}else{$(this.targetId).setStyle('overflow','visible');}},animateTargetIn:function(){this.effects.start({'0':{'width':[0,this.targetElementSize.width],'height':[0,this.targetElementSize.height],'top':[this.openerCoords.top,this.absPosTop],'left':[this.openerCoords.left,this.absPosLeft]}});},animateTargetOut:function(){this.effects.start({'0':{'width':[this.targetElementSize.width,0],'height':[this.targetElementSize.height,0],'top':[this.absPosTop,this.openerCoords.top],'left':[this.absPosLeft,this.openerCoords.left]}});}});
var ItemCatalog2Container=new Class({initialize:function(obj,postAjaxURL,useAjax){this.useAjax=useAjax;this.objID=obj;this.obj=$(obj);this.lasturl=this.url=window.location.pathname;this.postAjaxURL=postAjaxURL;this.hookEvents();},updateCatalog:function(event,el){event.preventDefault();this.url=el.getProperty('href');this.doAjax();},doAjax:function(){if(this.lasturl==this.url)
return;var postBody=''
if(typeof ReportItemsID!="undefined")
postBody='reportID='+ReportItemsID;var myAjax=new Ajax(this.url+this.postAjaxURL,{'method':'post','postBody':postBody,onComplete:this.ajaxCompleted.bind(this)}).request();this.lasturl=this.url;},ajaxCompleted:function(response){var parentNode=this.obj.getParent();this.obj=this.obj.replaceWith(new Element('div').setHTML(response).getFirst());this.obj.setProperty('id',this.objID);if($E('.ItemCatalog',this.obj)){new ItemCatalog2($E('.ItemCatalog',this.obj).getProperty('id'));}else if($E('.Items',this.obj)){new ItemCatalog2($E('.Items',this.obj).getProperty('id'));}
this.hookEvents();var winScroller=new Fx.Scroll(window);winScroller.toElement('Navigation');},hookEvents:function(){if(this.useAjax){var els=$ES('.PageSelector a',this.obj);els.each(function(el){el.addEvent('click',this.updateCatalog.bindWithEvent(this,el));},this);$ES('.PageSelector a',this.obj).merge($ES('.SortBy a',this.obj)).merge($ES('.TimeFrame a',this.obj)).each(function(el){el.addEvent('click',this.updateCatalog.bindWithEvent(this,el));},this);}
$ES('.ComboRefresh').addEvent('change',function(e){var ev=new Event(e);ev.stop();document.location.href=new Element(ev.target).value;});},registerHistory:function(){this.historyKey=this.objID;this.history=HistoryManager.register(this.historyKey,[this.url],this.historyEvent.bind(this),function(values){return[this.historyKey,'(',values[0],')'].join('');}.bind(this),this.historyKey+'\\(([\\w\\/-]*)\\)');HistoryManager.start();},historyEvent:function(values){this.url=values[0];this.doAjax();}});var HistoryManager={options:{observeDelay:100,stateSeparator:';',iframeSrc:'blank.html',onStart:Class.empty,onRegister:Class.empty,onUnregister:Class.empty,onStart:Class.empty,onUpdate:Class.empty,onStateChange:Class.empty,onObserverChange:Class.empty},dataOptions:{skipDefaultMatch:true,defaults:[],regexpParams:''},initialize:function(options){if(this.modules)return this;this.setOptions(options);this.modules=$H({});this.count=history.length;this.states=[];this.states[this.count]=this.getHash();this.state=null;return this;},start:function(){this.observe.periodical(this.options.observeDelay,this);this.started=true;this.observe();this.update();this.fireEvent('onStart',[this.state]);return this;},register:function(key,defaults,onMatch,onGenerate,regexp,options){if(!this.modules)this.initialize();var data=$merge(this.dataOptions,options||{},{defaults:defaults,onMatch:onMatch,onGenerate:onGenerate,regexp:regexp});data.regexp=data.regexp||key+'-([\\w_-]*)';if(typeof data.regexp=='string')data.regexp=new RegExp(data.regexp,data.regexpParams);data.onGenerate=data.onGenerate||function(values){return key+'-'+values[0];};data.values=data.defaults.copy();this.modules.set(key,data);this.fireEvent('onUnregister',[key,data]);return{setValues:function(values){return this.setValues(key,values);}.bind(this),setValue:function(index,value){return this.setValue(key,index,value);}.bind(this),generate:function(values){return this.generate(key,values);}.bind(this),unregister:function(){return this.unregister(key);}.bind(this)};},unregister:function(key){this.fireEvent('onRegister',[key]);this.modules.remove(key);},setValues:function(key,values){var data=this.modules.get(key);if(!data||data.values.isSimilar(values))return this;data.values=values;this.update();return this;},setValue:function(key,index,value){var data=this.modules.get(key);if(!data||data.values[index]==value)return this;data.values[index]=value;this.update();return this;},generate:function(key,values){var data=this.modules.get(key);var current=data.values.copy();data.values=values;var state=this.generateState();data.values=current;return'#'+state;},observe:function(){if(this.timeout)return;var state=this.getState();if(this.state==state)return;if((window.ie||window.webkit419)&&(this.state!==null))this.setState(state,true);else this.state=state;this.modules.each(function(data,key){var bits=state.match(data.regexp);if(bits){bits.splice(0,1);bits.complement(data.defaults);if(!bits.isSimilar(data.defaults))data.values=bits;}else data.values=data.defaults.copy();data.onMatch(data.values,data.defaults);});this.fireEvent('onStateChange',[state]).fireEvent('onObserverChange',[state]);},generateState:function(){var state=[];this.modules.each(function(data,key){if(data.skipDefaultMatch&&data.values.isSimilar(data.defaults))return;state.push(data.onGenerate(data.values));});return state.join(this.options.stateSeparator);},update:function(){if(!this.started)return this;var state=this.generateState();if((!this.state&&!state)||(this.state==state))return this;this.setState(state);this.fireEvent('onStateChange',[state]).fireEvent('onUpdate',[state]);return this;},observeTimeout:function(){if(this.timeout)this.timeout=$clear(this.timeout);else this.timeout=this.observeTimeout.delay(200,this);},getHash:function(){var href=top.location.href;var pos=href.indexOf('#')+1;return(pos)?href.substr(pos):'';},getState:function(){var state=this.getHash();if(this.iframe){var doc=this.iframe.contentWindow.document;if(doc&&doc.body.id=='state'){var istate=doc.body.innerText;if(this.state==state)return istate;this.istateOld=true;}else return this.istate;}
if(window.webkit419&&history.length!=this.count){this.count=history.length;return $pick(this.states[this.count-1],state);}
return state;},setState:function(state,fix){state=$pick(state,'');var empty=(state==='')?[window.getScrollLeft(),window.getScrollTop()]:false;if(window.webkit419){if(!this.form)this.form=new Element('form',{method:'get'}).injectInside(document.body);this.count=history.length;this.states[this.count]=state;this.observeTimeout();this.form.setProperty('action',location.protocol+'//'+location.host+location.pathname+'#'+state).submit();}else top.location.hash=empty?'#':state;if(empty)window.scrollTo(empty[0],empty[1]);if(window.ie&&(!fix||this.istateOld)){if(!this.iframe){this.iframe=new Element('iframe',{src:this.options.iframeSrc,styles:'visibility: hidden;'}).injectInside(document.body);this.istate=this.state;}
try{var doc=this.iframe.contentWindow.document;doc.open();doc.write('<html><body id="state">'+state+'</body></html>');doc.close();this.istateOld=false;}catch(e){};}
this.state=state;},extend:$extend};HistoryManager.extend(Events.prototype);HistoryManager.extend(Options.prototype);Array.extend({isSimilar:function(array){return(this.toString()==array.toString());},complement:function(array){for(var i=0,j=this.length;i<j;i++)this[i]=$pick(this[i],array[i]||null);return this;}});
var YouTubeCatalog=new Class({options:{params:null,orderBy:null,pageNumber:null,category:null,searchText:null,limit:null,noCache:true},initialize:function(options){this.setOptions(options);this.jsonCookie=new Hash.Cookie('User',{domain:headerObj.cookieDomain,path:'/',duration:362});this.isTimeout=true;this.myAjax=null;$('AffYNchk').addEvent('click',this.setCatSettings.bindWithEvent(this));if($('AffYNchk').getProperty('checked'))
this.loadCatalog();},loadCatalog:function(){var passParams=Object.toQueryString({'orderBy':this.options.orderBy,'pageNumber':this.options.pageNumber,'category':this.options.category,'searchText':this.options.searchText,'limit':this.options.limit});url='/index.php?pageToLoad=itemCatalogAffiliate';if(document.location.toString().indexOf("disableCache")!='-1')
url+="&disableCache=1";this.myAjax=new Ajax(url,{method:'post',postBody:passParams,onSuccess:this.onAjaxResponse.bind(this),onRequest:this.onAjaxRequest.bind(this)});this.myAjax.request();},setCatSettings:function(ev){if(ev.target.getProperty('checked')){this.jsonCookie.set('affShow',1);}else{this.jsonCookie.set('affShow',0);}
window.location.reload();},onAjaxRequest:function(request){var Dlyr=location.search.substring(1).split("=");var DlyrTime=Dlyr[3];if(!(DlyrTime)){DlyrTime=15000}
this.timeStart=new Date().getTime();this.checkTimeout.bind(this).delay(DlyrTime);if(!$('ItemCatalog1')){var DummyBox=new Element('div',{id:'ItemCatalog1'}).injectAfter($('CatalogNoItemsFound'));$('CatalogNoItemsFound').remove();}
var preloadBox=new Element('div').injectAfter($('ItemCatalog1'));preloadBox.setHTML('<div id="AffLoading" rel="2"><img src="'+headerObj.cdnImages+'/AjaxLoaders/32X32white.gif" alt="Loading" /><span>Looking For Affiliate Videos...<span></div>');},onAjaxResponse:function(response){this.isTimeout=false;this.myAjax=null;var AffLoading=$('AffLoading');var AffLoadingWrapper=AffLoading.getParent();var html="";if(new Element('div').setHTML(response).getTag('div'))html=response;AffLoadingWrapper.setHTML(html,'')
if(!($('Catalog2'))){var results=-1}
else{var results=$ES('li','Catalog2').length;}
var AffChild=AffLoadingWrapper.getFirst();if((AffChild)&&(AffChild.getProperty('id')=='ItemCatalog2')){new ItemCatalog2('ItemCatalog2');}
iOmnitureMC.saveCookie({'prop48':results});timeEnd=new Date().getTime();timeDelta=timeEnd-this.timeStart;if(typeof kpi!=='undefined'){kpi.addReport({name:'AffiliateLoadTime',value:timeDelta});}},checkTimeout:function(){if(this.isTimeout&&(this.myAjax!=null)&&(omnitureEnv=='metacafeprod')){this.myAjax.cancel();$('AffLoading').remove();}}});YouTubeCatalog.implement(new Options);
var SendToFriend=new Class({options:{'itemID':null,'userPageID':null,'sendCountEver':0},initialize:function(options){this.setOptions(options);this.wrapperID=this.options.wrapper.getProperty('id');this.form=$E('form',this.wrapperID);this.fieldCounter=1;this.sendCount=1;if(isNaN(this.options.sendCountEver))this.options.sendCountEver=1;this.currentMailField=$E('.SendToFriend form span',this.wrapperID);this.firstSend=true;this.recipientField=$E('.RecipientField',this.wrapperID);this.senderField=$E('.SenderEmail',this.wrapperID);this.senderField.addEvent('focus',this.cleanSenderEmailValue.bind(this));this.senderField.addEvent('blur',this.checkSenderEmailValue.bind(this));$E('.SendToFriend a.AddRecipientField',this.wrapperID).addEvent('click',this.addEmailField.bind(this));$E('.AddRecipientField',this.wrapperID).addEvent('mouseover',function(e){$E('.AddRecipientField small',this.wrapperID).setStyle('display','block');}).addEvent('mouseout',function(e){$E('.AddRecipientField small',this.wrapperID).setStyle('display','none');});$E('.SendS2F',this.wrapperID).addEvent('click',this.sendEmail.bind(this));$E('.CancelS2F',this.wrapperID).addEvent('click',this.resetForm.bind(this));$E('.SendToFriend .CloseBoxButton',this.wrapperID).addEvent('click',this.resetForm.bind(this));},addEmailField:function(e){this.options.wrapper.setStyle('height','auto');(new Event(e)).preventDefault();this.fieldCounter++;var label=new Element('label',{'for':'RecipientField'+this.fieldCounter,'class':'Removable'}).setHTML("Friends Email "+this.fieldCounter);var input=new Element('input',{'type':'text','class':'InputField EmailAddress Removable','id':'RecipientField'+this.fieldCounter,'name':'recipients['+this.fieldCounter+'][email]'});label.injectAfter(this.currentMailField);input.injectAfter(label);this.currentMailField=input;},cleanSenderEmailValue:function(){if(this.senderField.value=='Optional')
this.senderField.value='';},checkSenderEmailValue:function(){if(this.senderField.value=='')
this.senderField.value='Optional';},validateForm:function(){$ES('.ErrorMsg').each(function(el){el.remove();});var status=true;var fields=$ES('input',this.wrapperID);fields.each(function(el){if(el.type=='text'){var val=el.value.trim();var label=el.getPrevious();while(label.nodeName!='LABEL'){label=label.getPrevious();}
if(el.hasClass('RecipientField')&&val.length==0){var small=new Element('small',{'class':'ErrorMsg','styles':{'visibility':'hidden'}}).setHTML('Email Address Required').injectInside(label);status=false;}
if(val.length>0&&el.hasClass('EmailAddress')){if((el.hasClass('SenderEmail')&&val!='Optional'&&val.length>0&&!val.match(/^([\w\.\-]+)\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/))||(!el.hasClass('SenderEmail')&&val.length>0&&!val.match(/^([\w\.\-]+)\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/))){var small=new Element('small',{'class':'ErrorMsg','styles':{'visibility':'hidden'}}).setHTML('Invalid Email Address').injectInside(label);status=false;}}else if(val.length==0&&!el.hasClass('EmailAddress')){var small=new Element('small',{'class':'ErrorMsg','styles':{'visibility':'hidden'}}).setHTML('Field Cannot Be Empty').injectInside(label);status=false;}}});$ES('.ErrorMsg').each(function(el){this.fadeMsg(el);}.bind(this));return status;},sendEmail:function(e){(new Event(e)).preventDefault();if(this.validateForm()){var postBody=this.form.toHash();postBody.comment=escape(postBody.comment);if(postBody.senderEmail=='Optional')postBody.senderEmail='';postBody.itemID=this.options.itemID;postBody.userPageID=this.options.userPageID;postBody.count=this.sendCount;postBody.countEver=this.options.sendCountEver;if($E('.SubmitButtons small.SendStatus',this.wrapperID))this.statusEl=$E('.SendStatus',this.wrapperID);this.statusEl=new Element('small',{'class':'SendStatus','styles':{'visibility':'hidden'}}).injectInside($E('.SubmitButtons',this.wrapperID));this.cookiesToSet='senderName,'+postBody.senderName+',senderEmail,'+postBody.senderEmail+',comment,'+postBody.comment+',fwdCounterEver,'+(this.sendCountEver+1);var url=getFullURL("/send_to_friend.php?sid="+sid);var s2fAjax=new Ajax(url,{method:'post',postBody:Object.toQueryString(postBody),onFailure:function(){this.statusEl.addClass('ErrorMsg').setHTML('Message not sent!');this.fadeMsg(this.statusEl);}.bind(this),onComplete:this.onSendEmail.bind(this)}).request();}},onSendEmail:function(response){if(response==''){this.statusEl.removeClass('ErrorMsg').addClass('SuccessMsg').setHTML('Message sent successfully!')
this.fadeMsg(this.statusEl);setCookies(this.cookiesToSet);this.options.sendCountEver++;this.sendCount++;this.reportStats();(function(){this.resetForm('change');}.bind(this)).delay(1500);}else{this.statusEl.addClass('ErrorMsg').setHTML('Message not sent!');this.fadeMsg(this.statusEl);}},fadeMsg:function(el){var fadeIn=new Fx.Styles(el,{duration:1000,wait:false,transition:Fx.Transitions.linear});fadeIn.start({'opacity':[0,1]});},reportStats:function(){iOmnitureMC.report({'events':'event2, event75'},'Item');if(!this.firstSend)iOmnitureMC.report({'events':'More S2F'},'Item');var url=getFullURL('/reportPIR.php?itemID='+this.options.itemID+'&pirID=1'+'&sID='+sid);var reportPIR=new Ajax(url,{method:'get'}).request();if(this.firstSend)this.firstSend=false;},resetForm:function(buttonState){$ES('.Removable',this.wrapperID).each(function(el){el.remove();});$ES('.ErrorMsg',this.wrapperID).each(function(el){el.remove();});this.recipientField.value='';if(buttonState=='change'){$E('.SendS2F span',this.wrapperID).setStyle('background-position','0px -104px');$E('.CancelS2F span',this.wrapperID).setStyle('background-position','0px -338px');}else{$E('.SendS2F span',this.wrapperID).setStyle('background-position','0px -26px');$E('.CancelS2F span',this.wrapperID).setStyle('background-position','0px -234px');$ES('.SuccessMsg',this.wrapperID).each(function(el){el.remove();});}
this.currentMailField=$E('.SendToFriend form span',this.wrapperID);this.fieldCounter=1;}});SendToFriend.implement(new Options);
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(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.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=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!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 _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=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 _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,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");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[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(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[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;
var Ticker=new Class({initialize:function(target,delay){this.target=$(target);this.ticker=this.target.getFirst();this.delay=delay;this.page=this.to=0;this.from=0;this.pause=false;this.timer=false;this.fx=new Fx.Style(this.ticker,'left',{duration:1200,transition:Fx.Transitions.Cubic.easeInOut,onComplete:this.nextStep.bind(this)});this.getTargetSize();this.pagesElements=$ES('.TickerPaginator .TickerPage',this.target.getParent());this.ticker.setStyle('width',this.step*this.pagesElements.length);this.maxStep=-1*(this.step)*this.pagesElements.length;this.target.addEvent('mouseover',this.onRollOver.bind(this));this.target.addEvent('mouseout',this.onRollOut.bind(this));this.target.addEvent('click',this.onClick.bindWithEvent(this));$E('.TickerPaginator',this.target.getParent()).addEvent('click',this.paginatorClick.bindWithEvent(this));this.selectCurrentPage();this.timer=this.start.bind(this).delay(this.delay);},selectCurrentPage:function(){this.pagesElements[this.page].removeClass('Active');this.page=-1*this.to/this.step;this.pagesElements[this.page].addClass('Active');},paginatorClick:function(event){if(!event.target||!event.target.blur)
return false;event.preventDefault();event.target.blur();var el=new Element(event.target);var to=-1;if(el.hasClass('TickerRightArrow'))
to=this.to=(this.from-this.step<=this.maxStep)?0:this.from-this.step;else if(el.hasClass('TickerLeftArrow'))
to=this.to=(this.from+this.step>0)?(this.maxStep+this.step):this.from+this.step;else if(el.getText&&el.getText().toInt())
to=this.to=-1*this.step*(el.getText().toInt()-1);if(to!=-1){if(this.timer)
clearTimeout(this.timer)
this.fx.stop();this.fx.start(this.to);this.from=this.to;this.selectCurrentPage();}},onClick:function(event){for(var el=new Element(event.target);$defined(el.hasClass)&&!el.hasClass('tickerSlide');el=el.getParent());if(el!=window.document)
iOmnitureMC.saveCookie({'prop30':$E('h3',el).getText()},'Today Videos');},getTargetSize:function(){this.step=480;},onRollOver:function(){this.pause=true;},onRollOut:function(){this.pause=false;},start:function(){if(!this.pause){this.to=this.from-this.step;this.from=this.to;if(this.to<=this.maxStep)this.to=0;this.fx.start(this.to);}
else this.nextStep();this.selectCurrentPage();},nextStep:function(){this.timer=this.start.bind(this).delay(this.delay);}});