/*
 * Ad: an individual ad package to be displayed.  Includes all co-ad elements.
 */
function Ad( pPrerollFormat, pAfterFunction )
{
	this.PrerollVideo = null; // a Video object
	this.BigBox = ""; // the URL of the ad javascript that will serve a Big Box ad unit
	this.StartImageTracker = ""; // the URL of an image to serve when the preroll video starts
	this.EndImageTracker = ""; // the URL of an image to serve when the preroll video ends
	this.PrerollFormat = pPrerollFormat; // the format of the PrerollVideo
	
	this.AfterFunction = pAfterFunction; // the function to call after an ad is loaded
	this.IsLoaded = false;
	this.IsDestroyed = false;
	
	this.LastAdCall = "";
	this.LoaderTag = null;
	
	this.AdIndex = Ad.SetInstance( this );
	return this.AdIndex;
	
}
Ad.DARTSite = "video.ctv";

Ad.GetInstance = function( i )
{
	if( ! Ad.__instance )
	{
		throw "Trying to get an instance of the Ad before it has been initialized";
		return;
	}
	else if( i != null && i >= 0 )
	{	
		return Ad.__instance[i];
	}
	else
	{
		return Ad.__instance[ Ad.__instance.length - 1 ];
	}
}
Ad.SetInstance = function( pAd )
{
	if( ! Ad.__instance )
	{
		Ad.__instance = new Array();
	}
	
	Ad.__instance.push( pAd );
	
	return Ad.__instance.length - 1;
}

Ad.DARTVideoTag = function( pVideo )
{
    if( ! pVideo.SiteMap )
    {
        return "default;permalink=;clip=" + pVideo.ClipId;
    }
    else
    {
        var AdCall = "";
        for( var i = pVideo.SiteMap.length - 1; i >= 0; i-- )
        {
            if( AdCall == "" )
            {
                AdCall += pVideo.SiteMap[i][0].replace( /[^a-zA-Z0-9]/ig, "" ) + ";permalink=";
            }
            
            AdCall += "/" + pVideo.SiteMap[i][0].replace( /[^a-zA-Z0-9]/ig, "" );
        }
        
        AdCall += "/ClipId" + pVideo.ClipId; 
        
        AdCall += ";clip=" + pVideo.ClipId;
        

        return AdCall;
    }
}


Ad.GetPreroll = function (pFormat, pAfterFunction, ord, tile) {
    var NewAd = new Ad(pFormat, pAfterFunction);
    var AdIndex = Ad.SetInstance(NewAd);

    // Load the Javascript on the page

    var full = Player.Fullscreen;

    var AdCall = "http://ad.doubleclick.net/pfadx/" + Ad.DARTSite + "/";

     if (full == "true" || full==true) {
        AdCall += "f/";
    }

    var UpcomingVideo = Playlist.GetInstance().FindNext();

    AdCall += Ad.DARTVideoTag(UpcomingVideo);

    AdCall += ";sz=1x1";

    if (ord == null) {
        ord = Ad.GenerateOrd();
    }

    AdCall += ";ord=" + ord;

    if (tile != null) {
        AdCall += ";tile=" + tile;
    }

    // AdCall += ";fullScreen=" + full;
    //demographics
    //AdCall = "http://ad.doubleclick.net/pfadx/ctv.ctvwatch.ca/billsdesk;kw=bill;sz=1x1;ord=6365884;format=flv";

    //canvas test
    //AdCall = "http://ad.doubleclick.net/pfadx/ctv.ctvwatch.ca/RobsonArms;permalink=/RobsonArms/Season3/Ep312quotMyBrothersKeeperquot/ClipId49744;clip=49744;sz=1x1;ord=6243214;format=flv";

    //AdCall = "http://ad.doubleclick.net/pfadx/ctv.ctvwatch.ca/billsdesk;permalink=/TheDailyShowwithJonStewart/FullEpisodes/June282010/ClipId319520;clip=319520;sz=1x1;ord=2650393;fullScreen=true;format=flv";

    // Javascript will call back to Ad.Load(...)
    //********DEBUG*********//
    if (pFormat == Format.FlashVideo) {
        var AdScript = document.createElement("script");
        AdScript.src = AdCall + ";format=flv";
        Log("Getting an ad from " + AdScript.src);
        AdScript.type = "text/javascript";

        document.getElementsByTagName("head")[0].appendChild(AdScript);

        NewAd.LoaderTag = AdScript;

        NewAd.LastAdCall = AdScript.src;
    }
    else {

        var AdScript = document.createElement("script");
        AdScript.src = AdCall + ";format=wmv";
        Log("Getting an ad from " + AdScript.src);
        AdScript.type = "text/javascript";
        document.getElementsByTagName("head")[0].appendChild(AdScript);

        NewAd.LoaderTag = AdScript;

        NewAd.LastAdCall = AdScript.src;
    }
    //********DEBUG*********//

    setTimeout("Ad.GetInstance(" + AdIndex + ").CheckForLoadFailure()", 4000);

    return NewAd;

}
Ad.Load = function( pAdInfo )
{
	var _Ad = Ad.GetInstance();
	
	if( ! pAdInfo.Preroll )
	{
		Log( "Ad.Load was called with invalid parameters.  A standard big box ad will be served." );
		
		if( Interface.SetBigBoxAd ) { Interface.SetBigBoxAd(); }
		
		return;
	}
	
	if( ! _Ad.IsDestroyed )
	{
		_Ad.PrerollVideo = new Video( { Url:pAdInfo.Preroll, Format:_Ad.PrerollFormat, IsAd:true, Duration:pAdInfo.PrerollDuration, Permalink:pAdInfo.CoAdLink } );
		_Ad.BigBox = pAdInfo.CoAdCode;
		_Ad.StartImageTracker = pAdInfo.StartPlayImage;
		_Ad.EndImageTracker = pAdInfo.EndPlayImage;

		if( Interface.SetBigBoxAd ) { Interface.SetBigBoxAd( _Ad.BigBox ); }
		
		_Ad.PrerollVideo.OnStart = function()
		{
			Log( "Started playing the ad" );
			if( _Ad.StartImageTracker ) ( new Image() ).src = _Ad.StartImageTracker;
			
			//if( Interface.SetBigBoxAd ) { Interface.SetBigBoxAd( _Ad.BigBox ); }
		}
		
		_Ad.PrerollVideo.OnEnd = function()
		{
			Log( "Ended playing the ad" );
			if( _Ad.EndImageTracker ) ( new Image() ).src = _Ad.EndImageTracker;
		}
		
		
		_Ad.IsLoaded = true;
		
		setTimeout( function() { _Ad.AfterFunction( _Ad.PrerollVideo ) }, 350 );
	}
}

Ad.prototype.BigBoxImage = function()
{
	if( Interface && Interface.GetInstance && Interface.GetInstance() )
	{
		var _Interface	= Interface.GetInstance();
		var iFrameDoc	= _Interface.BigBoxHolder.contentDocument ? _Interface.BigBoxHolder.contentDocument : ( _Interface.BigBoxHolder.contentWindow ? _Interface.BigBoxHolder.contentWindow.document : document.frames[ 0 ] );
		var images		= iFrameDoc.getElementsByTagName("img");
		
		if( images && images.length > 0 )
		{
			return images[ 0 ].src;	
		}
	}
	
	return "";
}

Ad.prototype.BigBoxSWF = function()
{
	if( Interface && Interface.GetInstance && Interface.GetInstance() )
	{
		var _Interface	= Interface.GetInstance();
		var iFrameDoc	= _Interface.BigBoxHolder.contentDocument ? _Interface.BigBoxHolder.contentDocument : ( _Interface.BigBoxHolder.contentWindow ? _Interface.BigBoxHolder.contentWindow.document : document.frames[ 0 ] );
		
		var flashObject = iFrameDoc.getElementsByTagName( "object" );
		var embed		= iFrameDoc.getElementsByTagName( "embed" );
		
		if( flashObject &&  flashObject.length > 0 )
		{
			flashObject = flashObject[ 0 ];
			
			var params	= flashObject.getElementsByTagName( "param" );
			
			for( i=0; i< params.length; i++ )
			{
				if( params[ i ].name.toLowerCase() == "movie" || params[ i ].value.toLowerCase().indexOf(".swf") > -1 )
				{
					if( params[ i ].value )
					{
						return params[ i ].value;
					}
				}
			}
		}

		if( embed &&  embed.length > 0 )
		{
			if( embed[ 0 ].src )
			{
				return embed[ 0 ].src;
			}
		}
		
	}
	
	return "";
}

Ad.prototype.BigBoxTargetURL = function()
{
	if( Interface && Interface.GetInstance && Interface.GetInstance() )
	{
		var _Interface	= Interface.GetInstance();
		var iFrameDoc	= _Interface.BigBoxHolder.contentDocument ? _Interface.BigBoxHolder.contentDocument : ( _Interface.BigBoxHolder.contentWindow ? _Interface.BigBoxHolder.contentWindow.document : document.frames[ 0 ] );
		
		var anchors		= iFrameDoc.getElementsByTagName("a");
		if( anchors && anchors.length > 0 )
		{
			return anchors[ 0 ].href;	
		}
	}
	
	return "";
}

Ad.prototype.CheckForLoadFailure = function() 
{
	if( ! this.IsLoaded )
	{
		this.Destroy();
		Playlist.GetInstance().Next( true ); // continue with the playlist without loading the ad
		//throw "Failed to load Ad with '" + this.PrerollFormat + "' format." /*+ "The ad was " + this.LastAdCall*/;
	}
	else
	{
		this.IsVerified = true;
	}
	
	this.LastAdCall = "";
}

Ad.prototype.Destroy = function()
{
	this.IsDestroyed = true;
	
	try
	{
		this.LoaderTag.parentNode.removeChild( this.LoaderTag ); 
	}
	catch( Error )
	{}
	
	Log( "Destroyed Ad " + this.AdIndex );
	
	Ad.__instance[ this.AdIndex ] = null;

}

Ad.GenerateOrd = function () {
    return Math.round(10000000 * Math.random());
}
if(typeof COMSCORE=="undefined"){var COMSCORE={}}if(typeof _comscore!="object"){var _comscore=[]}COMSCORE.beacon=function(k){try{if(!k){return}var i=1.8,l=k.options||{},j=l.doc||document,b=l.nav||navigator,g=j.location,f=512,d=function(e,m){if(e==null){return""}e=(encodeURIComponent||escape)(e);if(m){e=e.substr(0,m)}return e},a=[(g.protocol=="https:"?"https://sb":"http://b"),".scorecardresearch.com/b?","c1=",d(k.c1),"&c2=",d(k.c2),"&rn=",Math.random(),"&c7=",d(g.href,f),"&c3=",d(k.c3),"&c4=",d(k.c4,f),"&c5=",d(k.c5),"&c6=",d(k.c6),"&c10=",d(k.c10),"&c15=",d(k.c15),"&c16=",d(k.c16),"&c8=",d(j.title),"&c9=",d(j.referrer,f),"&cv=",i,k.r?"&r="+d(k.r,f):""].join("");a=a.length>2080?a.substr(0,2075)+"&ct=1":a;if(!/BlackBerry.*?\/([1-3]\.|4\.[0-5])/.test(b.userAgent)){var c=new Image();c.onload=function(){};c.src=a}else{a=a.replace(/\/b\?/,"/p?");j.write("<img src='"+a+"' />")}return a}catch(h){}};COMSCORE.purge=function(a){try{var c=[],f,b;a=a||_comscore;for(b=a.length-1;b>=0;b--){f=COMSCORE.beacon(a[b]);a.splice(b,1);if(f){c.push(f)}}return c}catch(d){}};COMSCORE.purge();



/**
 * SWFObject v1.5.1: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept={};}if(typeof deconcept.util=="undefined"){deconcept.util={};}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={};}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={};this.variables={};this.attributes=[];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){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(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=[];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(!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;


/*
 * FlashController: controls a Flash video player
 */
function FlashController( pTheme, pPrePlayImageUrl )
{
    this.thePlayerID = null;
    this.theHTMLwrapperID = null;
	
	this.Format = Format.FlashVideo;
	this.Theme = "http://watch.thecomedynetwork.ca/themes/Comedy/player/theme.aspx";
	
	FlashController.__instance = this;
	FlashController.IsOneClipPlayer = false;

	if( pTheme )
	{
	    this.Theme = pTheme;
	    FlashController.IsOneClipPlayer = true;
	}

	if( pPrePlayImageUrl )
	{
	    this.Instantiate( Interface.GetInstance().PlayerViewer.id, "__FlashPlayer", "http://watch.thecomedynetwork.ca/Flash/player.swf", this.Theme, "", "", false, "", "", pPrePlayImageUrl );
	}
}

FlashController.GetInstance = function()
{
	if( ! FlashController.__instance )
	{
		FlashController.__instance = new FlashController();
	}
	
	return FlashController.__instance;
}
FlashController.prototype.Wait = function()
{
	if( this.thePlayerID && document.getElementById( this.thePlayerID ) )
	{
		document.getElementById( this.thePlayerID ).Wait();
	}
}
FlashController.prototype.Loading = function()
{
	if( this.thePlayerID && document.getElementById( this.thePlayerID ) && document.getElementById( this.thePlayerID ).Loading )
	{
		document.getElementById( this.thePlayerID ).Loading();
	}
}

FlashController.prototype.Destroy = function()
{
	try
	{
		 document.getElementById( this.theHTMLwrapperID ).innerHTML = "";
	}
	catch(e) {}
}

FlashController.prototype.Play = function( pVideo )
{
	Log( "Loading into Flash player: " + pVideo.Url );
	
	var permalinkToPass = "";
	
	if( 
	    pVideo.IsAd 
	    || FlashController.IsOneClipPlayer	    
	)
	{
	    permalinkToPass = pVideo.Permalink;
	}
	
	if( this.thePlayerID && document.getElementById( this.thePlayerID ) && document.getElementById( this.thePlayerID ).PlayUrl )
	{
	    document.getElementById( this.thePlayerID ).PlayUrl( pVideo.Url, pVideo.IsAd, pVideo.BugUrl, pVideo.Title, permalinkToPass );
	}
	else
	{
	    this.Instantiate( Interface.GetInstance().PlayerViewer.id, "__FlashPlayer", "http://watch.thecomedynetwork.ca/Flash/player.swf", this.Theme, pVideo.Url, pVideo.BugUrl , pVideo.IsAd, pVideo.Title, permalinkToPass, null );
	}
}

FlashController.prototype.getTimelinePosition = function(  )
{

    if( this.thePlayerID && document.getElementById( this.thePlayerID ) )
	{
		var _player = document.getElementById( this.thePlayerID );
		return _player.getTimelinePosition();
	}else
	{
	    return -1;
	}
}

FlashController.prototype.Instantiate = function( htmlID, flashID, swfURL, themeURL, videoURL, bugURL, isAd, Title, Permalink, pPrePlayImageUrl )
{

	this.thePlayerID = flashID;	
	this.theHTMLwrapperID = htmlID;

	var alreadyExists = document.getElementById(this.thePlayerID) && document.getElementById(this.thePlayerID).PlayUrl ;
	if( alreadyExists )
	{
	    document.getElementById( this.thePlayerID ).PlayUrl( videoURL, isAd, bugURL, Title, Permalink );
		return;	
	}

	// if less than 6.0.65, express install won't be able to upgrade them.
	// we should just show a message with a link to go get the player, I guess?

	var fpVersion = deconcept.SWFObjectUtil.getPlayerVersion();
	var goodForExpressInstall = false;
	
	if (fpVersion['major'] > 6) 
	{
		goodForExpressInstall = true;
	}
	
	if (fpVersion['major'] == 6) 
	{
		// we need to check the minor and revision numbers
		
		if (fpVersion['minor'] > 0) 
		{
			goodForExpressInstall = true;
		} 
		else if (fpVersion['minor'] == 0) 
		{
			if (fpVersion['rev'] >= 65) 
			{
				goodForExpressInstall = true;
			}
		}
		
	}

	if ( goodForExpressInstall ) 
	{
		//var isOneClipPlayer = false;
		
		var so = new SWFObject(swfURL+"?themeURL="+themeURL, flashID, "100%", "100%", "8", "#000000");
		so.addParam("allowScriptAccess", "always");
		
		var isSafeForTransparent = FlashController.BrowserCanDoTransparentFlashPlugin();
		
		if( isSafeForTransparent )
		{
			so.addParam("wmode", "transparent");		
		}
	
        if (FlashController.IsOneClipPlayer == true)
        {
            so.addVariable("OverlayConfig","initDisabled");
        }

		so.addParam("allowFullScreen", "true");
        so.addVariable("TokenServiceURL", "http://hdtoken.ctvdigital.net/tokengen.aspx?video=");

		
		if( pPrePlayImageUrl )
		{
		    so.addVariable("PrePlayImageUrl", pPrePlayImageUrl);
		}
		else
		{
		    // ROSSMAN: Bug #5481: I added the ESCAPE below, because it was breaking the player without it...?
		    so.addVariable("videoURL", escape( videoURL ) );
		}
		so.addVariable("bugURL", bugURL);
		so.addVariable("isAd", isAd);
		so.addVariable("nowPlaying", Title);
		
		if( true || FlashController.IsOneClipPlayer )
		{
			so.addVariable("permalinkURL", Permalink);
		}
	
		so.useExpressInstall('http://watch.thecomedynetwork.ca/Flash/expressinstall.swf');
		so.write(htmlID);

		/* NT added this for flash compliance with IE on 3/19/08 */
		window.__FlashPlayer = document.getElementById("__FlashPlayer");
	}
	else 
	{
		if( Interface.DisplayFlashNeedsToBeManuallyUpgradedMessage )
		{
			Interface.DisplayFlashNeedsToBeManuallyUpgradedMessage();
			Log("The users flash player plugin is older than v6.0.65 - user will need to manually upgrade.");
		}
		else
		{
			Player.Error( "No Flash Player detected" );
		}	
	}
}

FlashController.BrowserCanDoTransparentFlashPlugin = function()
{
	//always doing true now
	return true;
}



/*
 * SilverlightController: controls a Silverlight video player
 */
function SilverlightController( pTheme )
{
	this.Format = Format.WindowsMediaVideo;
	
	this.includeCounter		= 1;
	this.internalController = null;
	this.hasStartedJSInstantation	= false;
	this.JSisInstantiated	= false;
	
	this.theme				= "http://watch.thecomedynetwork.ca/themes/Comedy/player/theme.aspx";

	SilverlightController.IsCrossDomainLoad = pTheme!=null && pTheme != 'undefined' && ( ( SilverlightController.DetermineDomain( pTheme ) != SilverlightController.DetermineDomain( this.theme ) ) || ( SilverlightController.DetermineDomain( this.theme ) != SilverlightController.DetermineDomain( document.location ) ) ); 
	
	if( pTheme )
	{
		this.theme = pTheme;
	}
	
	SilverlightController.__instance = this;
	
	
	this.LoadHtml( );
}

SilverlightController.DetermineDomain = function( url )
{
	return parseUri( url ).host;
}

SilverlightController.GetInstance = function()
{
	if( ! SilverlightController.__instance )
	{
		SilverlightController.__instance = new SilverlightController();
	}
	
	return SilverlightController.__instance;
}

SilverlightController.prototype.Destroy = function()
{
   this.internalController = null;
}


SilverlightController.prototype.Play = function( pVideo )
{
	var permalinkToPass = ( pVideo.IsAd || FlashController.IsOneClipPlayer ) ? pVideo.Permalink : "";
	var shouldWait = ! this.JSisInstantiated;

	if(	this.internalController == null )
	{
		var Me = this;

		if( shouldWait )
		{
			if(! this.hasStartedJSInstantation )
			{
				this.LoadHtml();
			}
		}
		else
		{
			shouldWait = SilverlightController.IsCrossDomainLoad && document.getElementById( "xamlContent" ) == null;
		}
		
		if( shouldWait )
		{
			Log("Silverlight Player is not yet instantiated, sleeping 100 milliseconds.");
			
			setTimeout( function() { Me.Play( pVideo ); }, 100 );
			return;
		}
		else
		{
			Log("Silverlight Player is ready to play");
		}
		
		var parentElement		= Interface.GetInstance().PlayerViewer;
		parentElement.innerHTML = "";
		
		var SceneFile = "http://watch.thecomedynetwork.ca/SilverlightPlayer/Scene.xml";

		
		try
		{
			this.internalController = new SilverlightPlayer( parentElement, SceneFile, this.theme, pVideo.Url, pVideo.IsAd, pVideo.BugUrl, pVideo.Title, permalinkToPass, null);
		}
		catch(e)
		{ 
			try
			{
				setTimeout( function() { Me.internalController = new SilverlightPlayer( parentElement, SceneFile, this.theme, pVideo.Url, pVideo.IsAd, pVideo.BugUrl, pVideo.Title, permalinkToPass, null); }, 350  ); 
			}
			catch(ee)
			{
				setTimeout( function() { Me.internalController = new SilverlightPlayer( parentElement, SceneFile, this.theme, pVideo.Url, pVideo.IsAd, pVideo.BugUrl, pVideo.Title, permalinkToPass, null ); }, 1000  ); 
			}
		}
	}
	else
	{
		this.internalController.PlayUrl( pVideo.Url, pVideo.IsAd, pVideo.BugUrl, pVideo.Title, permalinkToPass, null );
	}
}

SilverlightController.prototype.Wait = function()
{
	if( this.internalController )
	{
		this.internalController.Wait()
	}
}

SilverlightController.prototype.getTimelinePosition = function(  )
{

    var ob = this.internalController.GetTimelinePosition();

    return ob;

}

SilverlightController.prototype.Loading = function()
{
	if( this.internalController )
	{
		this.internalController.Loading();
	}
}

SilverlightController.IsInstalled = function()
{
	return Silverlight.isInstalled( SilverlightPlayer.SilverlightVersion );
}

SilverlightController.prototype.LoadHtml = function()
{
	this.hasStartedJSInstantation = true;
	
	var includes = [ "createSilverlight.js",
					 "HttpRequest.js",
					 "Scene.xaml.js",
					 "MovieSlider.js",
					 "VolumeSlider.js",
					 "XAMLfactory.aspx",
					 "XAMLdata.js",
					 "ConfigXamlMapper.js",
					 "VideoPlayer.js"
					];
	

	if( SilverlightController.IsCrossDomainLoad )
	{
		this.AddFirstSceneFile();
	}
	
	this.AddJSIncludes( includes );	
}

SilverlightController.prototype.AddFirstSceneFile = function()
{
	var sceneId		= "xamlContent";
	
	if( ! document.getElementById( sceneId ) )
	{
		var body		= document.getElementsByTagName("body")[0];
		var newScript	= document.createElement("script");
		
		newScript.id	= sceneId;
		newScript.type	= "text/xaml";
		
		
		newScript.text = '<Canvas   xmlns="http://schemas.microsoft.com/client/2007"   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   Loaded="canvas_loaded"><Canvas.Resources><Storyboard Name="BufferingAnimation" Storyboard.TargetProperty="Angle" ><DoubleAnimation  From="0" To="360" Duration="0:0:2.16" RepeatBehavior="Forever" /></Storyboard><Storyboard Name="TextScrollAnimation" BeginTime="0:0:00" Storyboard.TargetProperty="(Canvas.Left)" ><DoubleAnimation Storyboard.TargetName="ScrollingText"   /><DoubleAnimation Storyboard.TargetName="ScrollingText2"  /><DoubleAnimation Storyboard.TargetName="ScrollingTextShadow"   /><DoubleAnimation Storyboard.TargetName="ScrollingText2Shadow"  /></Storyboard></Canvas.Resources><Canvas Name="PreloadImages" Opacity="0"></Canvas></Canvas>';

		body.appendChild( newScript );
		
		Log("Added the initial Silverlight scene to the page");
	}
	else
	{
		Log("Silverlight scene is already on the page");
	}
}

SilverlightController.prototype.AddJSIncludes = function( filePaths )
{
	this.includeCounter = filePaths.length;
	
	for( var i=0; i < filePaths.length; i++ )
	{
		var newID			= "SilverlightScript" + (i+1);
		
		var Me				= this;
		var fileName		= filePaths[ i ];
		var handlerFunction	= new function() { Me.JSisInstantiated = ( --Me.includeCounter <= 0 );  Log("INCLUDE ADDED:" + fileName + "  " + Me.includeCounter + " left"); };
			
		if( ! document.getElementById( newID ) )
		{
			var head		= document.getElementsByTagName("head")[0];
			var newScript	= document.createElement("script");
			
			newScript.type	= "text/javascript";
			newScript.src	= "http://watch.thecomedynetwork.ca/SilverlightPlayer/" + filePaths[ i ];
			newScript.id	= newID;
			
			newScript.onload = handlerFunction;
			if( newScript.onload == handlerFunction )
			{
				// DO NOTHING
			}
			else if( newScript.addEventListener )
			{
				newScript.addEventListener( "load", handlerFunction, false );
			}
			else if( newScript.attachEvent ) 
			{
				newScript.attachEvent( "onload", handlerFunction );
			}
			
			head.appendChild( newScript );
		}
		else
		{
			Log( fileName + " is already on the page." );
			this.JSisInstantiated = ( --this.includeCounter <= 0 );
		}
	}
}


///////////////////////////////////////////////////////////////////////////////
//
//  Silverlight.js   			version 2.0.30523.6
//
//  This file is provided by Microsoft as a helper file for websites that
//  incorporate Silverlight Objects. This file is provided under the Microsoft
//  Public License available at 
//  http://code.msdn.microsoft.com/silverlightjs/Project/License.aspx.  
//  You may not use or distribute this file or the code in this file except as 
//  expressly permitted under that license.
// 
//  Copyright (c) Microsoft Corporation. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////

if (!window.Silverlight)
{
    window.Silverlight = { };
}

//////////////////////////////////////////////////////////////////
//
// _silverlightCount:
//
// Counter of globalized event handlers
//
//////////////////////////////////////////////////////////////////
Silverlight._silverlightCount = 0;

//////////////////////////////////////////////////////////////////
//
// fwlinkRoot:
//
// Prefix for fwlink URL's
//
//////////////////////////////////////////////////////////////////
Silverlight.fwlinkRoot='http://go2.microsoft.com/fwlink/?LinkID=';

//////////////////////////////////////////////////////////////////
//  
// onGetSilverlight:
//
// Called by Silverlight.GetSilverlight to notify the page that a user
// has requested the Silverlight installer
//
//////////////////////////////////////////////////////////////////
Silverlight.onGetSilverlight = null;

//////////////////////////////////////////////////////////////////
//
// onSilverlightInstalled:
//
// Called by Silverlight.WaitForInstallCompletion when the page detects
// that Silverlight has been installed. The event handler is not called
// in upgrade scenarios.
//
//////////////////////////////////////////////////////////////////
Silverlight.onSilverlightInstalled = function () {window.location.reload(false);};

//////////////////////////////////////////////////////////////////
//
// isInstalled:
//
// Checks to see if the correct version is installed
//
//////////////////////////////////////////////////////////////////
Silverlight.isInstalled = function(version)
{
    var isVersionSupported=false;
    var container = null;
    
    try 
    {
        var control = null;
        
        try
        {
            control = new ActiveXObject('AgControl.AgControl');
            if ( version == null )
            {
                isVersionSupported = true;
            }
            else if ( control.IsVersionSupported(version) )
            {
                isVersionSupported = true;
            }
            control = null;
        }
        catch (e)
        {
            var plugin = navigator.plugins["Silverlight Plug-In"] ;
            if ( plugin )
            {
                if ( version === null )
                {
                    isVersionSupported = true;
                }
                else
                {
                    var actualVer = plugin.description;
                    if ( actualVer === "1.0.30226.2")
                        actualVer = "2.0.30226.2";
                    var actualVerArray =actualVer.split(".");
                    while ( actualVerArray.length > 3)
                    {
                        actualVerArray.pop();
                    }
                    while ( actualVerArray.length < 4)
                    {
                        actualVerArray.push(0);
                    }
                    var reqVerArray = version.split(".");
                    while ( reqVerArray.length > 4)
                    {
                        reqVerArray.pop();
                    }
                    
                    var requiredVersionPart ;
                    var actualVersionPart
                    var index = 0;
                    
                    
                    do
                    {
                        requiredVersionPart = parseInt(reqVerArray[index]);
                        actualVersionPart = parseInt(actualVerArray[index]);
                        index++;
                    }
                    while (index < reqVerArray.length && requiredVersionPart === actualVersionPart);
                    
                    if ( requiredVersionPart <= actualVersionPart && !isNaN(requiredVersionPart) )
                    {
                        isVersionSupported = true;
                    }
                }
            }
        }
    }
    catch (e) 
    {
        isVersionSupported = false;
    }
    if (container) 
    {
        document.body.removeChild(container);
    }
    
    return isVersionSupported;
}
//////////////////////////////////////////////////////////////////
//
// WaitForInstallCompletion:
//
// Occasionally checks for Silverlight installation status. If it
// detects that Silverlight has been installed then it calls
// Silverlight.onSilverlightInstalled();. This is only supported
// if Silverlight was not previously installed on this computer.
//
//////////////////////////////////////////////////////////////////
Silverlight.WaitForInstallCompletion = function()
{
    if ( ! Silverlight.isBrowserRestartRequired && Silverlight.onSilverlightInstalled )
    {
        try
        {
            navigator.plugins.refresh();
        }
        catch(e)
        {
        }
        if ( Silverlight.isInstalled(null) )
        {
            Silverlight.onSilverlightInstalled();
        }
        else
        {
              setTimeout(Silverlight.WaitForInstallCompletion, 3000);
        }    
    }
}
//////////////////////////////////////////////////////////////////
//
// __startup:
//
// Performs startup tasks
//////////////////////////////////////////////////////////////////
Silverlight.__startup = function()
{
    Silverlight.isBrowserRestartRequired = Silverlight.isInstalled(null);
    if ( !Silverlight.isBrowserRestartRequired)
    {
        Silverlight.WaitForInstallCompletion();
    }
    if (window.removeEventListener) { 
       window.removeEventListener('load', Silverlight.__startup , false);
    }
    else { 
        window.detachEvent('onload', Silverlight.__startup );
    }
}

if (window.addEventListener) 
{
    window.addEventListener('load', Silverlight.__startup , false);
}
else 
{
    window.attachEvent('onload', Silverlight.__startup );
}

///////////////////////////////////////////////////////////////////////////////
// createObject:
//
// Inserts a Silverlight <object> tag or installation experience into the HTML
// DOM based on the current installed state of Silverlight. 
//
/////////////////////////////////////////////////////////////////////////////////

Silverlight.createObject = function(source, parentElement, id, properties, events, initParams, userContext)
{
    var slPluginHelper = new Object();
    var slProperties = properties;
    var slEvents = events;
    
    slPluginHelper.version = slProperties.version;
    slProperties.source = source;    
    slPluginHelper.alt = slProperties.alt;
    
    //rename properties to their tag property names. For bacwards compatibility
    //with Silverlight.js version 1.0
    if ( initParams )
        slProperties.initParams = initParams;
    if ( slProperties.isWindowless && !slProperties.windowless)
        slProperties.windowless = slProperties.isWindowless;
    if ( slProperties.framerate && !slProperties.maxFramerate)
        slProperties.maxFramerate = slProperties.framerate;
    if ( id && !slProperties.id)
        slProperties.id = id;
    
    // remove elements which are not to be added to the instantiation tag
    delete slProperties.ignoreBrowserVer;
    delete slProperties.inplaceInstallPrompt;
    delete slProperties.version;
    delete slProperties.isWindowless;
    delete slProperties.framerate;
    delete slProperties.data;
    delete slProperties.src;
    delete slProperties.alt;


    // detect that the correct version of Silverlight is installed, else display install

    if (Silverlight.isInstalled(slPluginHelper.version))
    {
        //move unknown events to the slProperties array
        for (var name in slEvents)
        {
            if ( slEvents[name])
            {
                if ( name == "onLoad" && typeof slEvents[name] == "function" && slEvents[name].length != 1 )
                {
                    var onLoadHandler = slEvents[name];
                    slEvents[name]=function (sender){ return onLoadHandler(document.getElementById(id), userContext, sender)};
                }
                var handlerName = Silverlight.__getHandlerName(slEvents[name]);
                if ( handlerName != null )
                {
                    slProperties[name] = handlerName;
                    slEvents[name] = null;
                }
                else
                {
                    throw "typeof events."+name+" must be 'function' or 'string'";
                }
            }
        }
        slPluginHTML = Silverlight.buildHTML(slProperties);
    }
    //The control could not be instantiated. Show the installation prompt
    else 
    {
        slPluginHTML = Silverlight.buildPromptHTML(slPluginHelper);
    }

    // insert or return the HTML
    if(parentElement)
    {
        parentElement.innerHTML = slPluginHTML;
    }
    else
    {
        return slPluginHTML;
    }

}

///////////////////////////////////////////////////////////////////////////////
//
//  buildHTML:
//
//  create HTML that instantiates the control
//
///////////////////////////////////////////////////////////////////////////////
Silverlight.buildHTML = function( slProperties)
{
    var htmlBuilder = [];

    htmlBuilder.push('<object type=\"application/x-silverlight\" data="data:application/x-silverlight,"');
    if ( slProperties.id != null )
    {
        htmlBuilder.push(' id="' + slProperties.id + '"');
    }
    if ( slProperties.width != null )
    {
        htmlBuilder.push(' width="' + slProperties.width+ '"');
    }
    if ( slProperties.height != null )
    {
        htmlBuilder.push(' height="' + slProperties.height + '"');
    }
    htmlBuilder.push(' >');
    
    delete slProperties.id;
    delete slProperties.width;
    delete slProperties.height;
    
    for (var name in slProperties)
    {
        if (slProperties[name])
        {
            htmlBuilder.push('<param name="'+Silverlight.HtmlAttributeEncode(name)+'" value="'+Silverlight.HtmlAttributeEncode(slProperties[name])+'" />');
        }
    }
    htmlBuilder.push('<\/object>');
    return htmlBuilder.join('');
}



//////////////////////////////////////////////////////////////////
//
// createObjectEx:
//
// takes a single parameter of all createObject 
// parameters enclosed in {}
//
//////////////////////////////////////////////////////////////////

Silverlight.createObjectEx = function(params)
{
    var parameters = params;
    var html = Silverlight.createObject(parameters.source, parameters.parentElement, parameters.id, parameters.properties, parameters.events, parameters.initParams, parameters.context);
    if (parameters.parentElement == null)
    {
        return html;
    }
}

///////////////////////////////////////////////////////////////////////////////////////////////
//
// buildPromptHTML
//
// Builds the HTML to prompt the user to download and install Silverlight
//
///////////////////////////////////////////////////////////////////////////////////////////////
Silverlight.buildPromptHTML = function(slPluginHelper)
{
    var slPluginHTML = "";
    var urlRoot = Silverlight.fwlinkRoot;
    var shortVer = slPluginHelper.version ;
    if ( slPluginHelper.alt )
    {
        slPluginHTML = slPluginHelper.alt;
    }
    else
    {
        if (! shortVer )
        {
            shortVer="";
        }
        slPluginHTML = "<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";
        slPluginHTML = slPluginHTML.replace('{1}', shortVer );
        slPluginHTML = slPluginHTML.replace('{2}', urlRoot + '108181');
    }
    
    return slPluginHTML;
}

///////////////////////////////////////////////////////////////////////////////////////////////
//
// getSilverlight:
//
// Navigates the browser to the appropriate Silverlight installer
//
///////////////////////////////////////////////////////////////////////////////////////////////
Silverlight.getSilverlight = function(version)
{
    if (Silverlight.onGetSilverlight )
    {
        Silverlight.onGetSilverlight();
    }
    
    var shortVer = "";
    var reqVerArray = String(version).split(".");
    if (reqVerArray.length > 1)
    {
        var majorNum = parseInt(reqVerArray[0] );
        if ( isNaN(majorNum) || majorNum < 2 )
        {
            shortVer = "1.0";
        }
        else
        {
            shortVer = reqVerArray[0]+'.'+reqVerArray[1];
        }
    }
    
    var verArg = "";
    
    if (shortVer.match(/^\d+\056\d+$/) )
    {
        verArg = "&v="+shortVer;
    }
    
    Silverlight.followFWLink("114576" + verArg);
}


///////////////////////////////////////////////////////////////////////////////////////////////
//
// followFWLink:
//
// Navigates to a url based on fwlinkid
//
///////////////////////////////////////////////////////////////////////////////////////////////
Silverlight.followFWLink = function(linkid)
{
    top.location=Silverlight.fwlinkRoot+String(linkid);
}

///////////////////////////////////////////////////////////////////////////////////////////////
//
// HtmlAttributeEncode:
//
// Encodes special characters in input strings as charcodes
//
///////////////////////////////////////////////////////////////////////////////////////////////
Silverlight.HtmlAttributeEncode = function( strInput )
{
      var c;
      var retVal = '';

    if(strInput == null)
      {
          return null;
    }
      
      for(var cnt = 0; cnt < strInput.length; cnt++)
      {
            c = strInput.charCodeAt(cnt);

            if (( ( c > 96 ) && ( c < 123 ) ) ||
                  ( ( c > 64 ) && ( c < 91 ) ) ||
                  ( ( c > 43 ) && ( c < 58 ) && (c!=47)) ||
                  ( c == 95 ))
            {
                  retVal = retVal + String.fromCharCode(c);
            }
            else
            {
                  retVal = retVal + '&#' + c + ';';
            }
      }
      
      return retVal;
}
///////////////////////////////////////////////////////////////////////////////
//
//  default_error_handler:
//
//  Default error handling function 
//
///////////////////////////////////////////////////////////////////////////////

Silverlight.default_error_handler = function (sender, args)
{
    var iErrorCode;
    var errorType = args.ErrorType;

    iErrorCode = args.ErrorCode;

    var errMsg = "\nSilverlight error message     \n" ;

    errMsg += "ErrorCode: "+ iErrorCode + "\n";


    errMsg += "ErrorType: " + errorType + "       \n";
    errMsg += "Message: " + args.ErrorMessage + "     \n";

    if (errorType == "ParserError")
    {
        errMsg += "XamlFile: " + args.xamlFile + "     \n";
        errMsg += "Line: " + args.lineNumber + "     \n";
        errMsg += "Position: " + args.charPosition + "     \n";
    }
    else if (errorType == "RuntimeError")
    {
        if (args.lineNumber != 0)
        {
            errMsg += "Line: " + args.lineNumber + "     \n";
            errMsg += "Position: " +  args.charPosition + "     \n";
        }
        errMsg += "MethodName: " + args.methodName + "     \n";
    }
    alert (errMsg);
}

///////////////////////////////////////////////////////////////////////////////////////////////
//
// __cleanup:
//
// Releases event handler resources when the page is unloaded
//
///////////////////////////////////////////////////////////////////////////////////////////////
Silverlight.__cleanup = function ()
{
    for (var i = Silverlight._silverlightCount - 1; i >= 0; i--) {
        window['__slEvent' + i] = null;
    }
    Silverlight._silverlightCount = 0;
    if (window.removeEventListener) { 
       window.removeEventListener('unload', Silverlight.__cleanup , false);
    }
    else { 
        window.detachEvent('onunload', Silverlight.__cleanup );
    }
}

///////////////////////////////////////////////////////////////////////////////////////////////
//
// __getHandlerName:
//
// Generates named event handlers for delegates.
//
///////////////////////////////////////////////////////////////////////////////////////////////
Silverlight.__getHandlerName = function (handler)
{
    var handlerName = "";
    if ( typeof handler == "string")
    {
        handlerName = handler;
    }
    else if ( typeof handler == "function" )
    {
        if (Silverlight._silverlightCount == 0)
        {
            if (window.addEventListener) 
            {
                window.addEventListener('onunload', Silverlight.__cleanup , false);
            }
            else 
            {
                window.attachEvent('onunload', Silverlight.__cleanup );
            }
        }
        var count = Silverlight._silverlightCount++;
        handlerName = "__slEvent"+count;
        
        window[handlerName]=handler;
    }
    else
    {
        handlerName = null;
    }
    return handlerName;
}







/*
	parseUri 1.2.1
	(c) 2007 Steven Levithan <stevenlevithan.com>
	MIT License
*/

function parseUri (str) {
	var	o   = parseUri.options,
		m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
		uri = {},
		i   = 14;

	while (i--) uri[o.key[i]] = m[i] || "";

	uri[o.q.name] = {};
	uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
		if ($1) uri[o.q.name][$1] = $2;
	});

	return uri;
};

parseUri.options = {
	strictMode: false,
	key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
	q:   {
		name:   "queryKey",
		parser: /(?:^|&)([^&=]*)=?([^&]*)/g
	},
	parser: {
		strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
		loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
	}
};
/*
 * Metrics: tracks the user within the player via a metrics package
 */


// pProject: the Omniture project id
function Metrics( pAccountId, pProject )
{
    this.AccountId = pAccountId;
	this.Project = pProject;
	
	this.CurrentClip = null;
	this.CurrentLocation = -1;
	
	this.LastTrackedLocation = 0;
	this.LastTrackedIntervalLocation = 0;
	
	this.KeyInterval = [ 20 ]; //an array of "key times" to track. This case will track at 20 seconds.
	this.KeyIntervalPercentage = [ 80 ]; //an array of "key times" to track as a percentage of video duration. This case will track at 80% complete.
	
	this.KeyPoints = new Array();
	
	this.trackingIntervalToken = null;

	this.TRACKING_INTERVAL = 120; //in seconds
	this.REACHED_CLIP_POINT_INTERVAL = 10; //in seconds
	
	this.IsTrackingVideo = false;
	this.HasSentVideoStart = false;
	
	this.ShouldUseParallelTracking = false;
	
	this.HasReachedEightyPercent = false;
	
	Metrics.__instance = this;
}

Metrics.UseMetricsOverridePlayName = false;
Metrics.VIDEO_LABEL = "CustomLinkForVideoTracking";
Metrics.VIDEOPLAYER_SITESECTION = "VideoPlayer";


Metrics.StopClip = function(){

}

Metrics.StartClip = function(){

} 
Metrics.GetInstance = function()
{
	if( ! Metrics.__instance )
	{
		Metrics.__instance = new Metrics( "chumtvthecomedynetwork", "The Comedy Network Video Player" ); 
		return Metrics.__instance;
	}
	else
	{
		return Metrics.__instance;
	}
}

Metrics.GetVideoTitle = function( pVideo )
{
    if( pVideo.Title != undefined && pVideo.Title != "undefined" && pVideo.Title != null )
    {
        return Metrics.TrimLabel( pVideo.Title );
    }
    
     return Metrics.TrimLabel( pVideo.Permalink );
}

Metrics.GetVideoDuration = function( pVideo )
{
	if( pVideo.Duration != undefined && pVideo.Duration != "undefined" && pVideo.Duration != null && pVideo.Duration > 0 )
    {
        try
        {
			return parseInt( "" + pVideo.Duration );  
		}
		catch(e) {}
    }
    
     return 0;
}

Metrics.GetVideoId = function( pVideo )
{
    if( pVideo.ClipId != undefined && pVideo.ClipId != "undefined" && pVideo.ClipId != null )
    {
        return pVideo.ClipId;
    }
    
    return -1;
}

Metrics.GetVideoPath = function( pVideo )
{
    if( ! pVideo.SiteMap )
    {
        if( pVideo.Permalink )
        {
			return Metrics.TrimLabel( pVideo.Permalink );
		}
		
		return Metrics.TrimLabel( pVideo.Title );
    }
    else
    {
        var Label = "";
        for( var i = pVideo.SiteMap.length - 1; i >= 0; i-- )
        {
            if( Label != "" )
            {
                Label += "|";
            }
            Label += pVideo.SiteMap[i][0].replace( /[|]/ig, "" );
            try
            {
                Label += "[" + /[0-9]+$/i.exec( pVideo.SiteMap[i][1] ) + "]";
            }
            catch( err )
            {}
        }
        Label += "|Clip[" + pVideo.ClipId + "]"; 

        return Metrics.TrimLabel( Label );
    }
}


Metrics.TrimLabel = function( pLabel )
{
	if( pLabel.length > 100 )
	{
		return pLabel.substring( 0, 99 );
	}
	
	return pLabel;	 
}

Metrics.StartedClip = function( pVideo )
{
	var CurrentClip = pVideo;
	
	if( ! CurrentClip )
	{
	    CurrentClip = Playlist.GetInstance().Current;
	}
	
	if( ! CurrentClip.IsAd )
	{
	    


	    if( CurrentClip != Metrics.GetInstance().CurrentClip )
	    {
	        Metrics.GetInstance().CurrentClip = CurrentClip;

	        Metrics.GetInstance().LastTrackedLocation = 0;
			Metrics.GetInstance().LastTrackedIntervalLocation = 0;
			Metrics.GetInstance().IsTrackingVideo = true;
			Metrics.GetInstance().HasReachedEightyPercent = false;
			Metrics.GetInstance().HasSentVideoStart = false;
			
	        if( CurrentClip.Duration > 0 )
	        {
				Metrics.SendStartedClip( CurrentClip );	
				Metrics.InitializeKeyPoints( CurrentClip );
				
				Metrics.GetInstance().HasSentVideoStart = true;
			}
			/*else
			{
				//sometimes the clips don't have a duration immediately, so give it awhile...
				setTimeout( function() { Metrics.SendStartedClip( CurrentClip );Metrics.InitializeKeyPoints( CurrentClip ); }, 2500 );
			}*/
		
			if( Metrics.GetInstance().trackingIntervalToken != null )
			{
				clearInterval( Metrics.GetInstance().trackingIntervalToken );
				Metrics.GetInstance().trackingIntervalToken = null;
			}
			var _Metrics = Metrics.GetInstance();
			_Metrics.trackingIntervalToken = setInterval(	function() 
															{ 
																_Metrics.LastTrackedIntervalLocation  += _Metrics.TRACKING_INTERVAL;
																Metrics.OnIntervalClipTime	( CurrentClip,
																							 _Metrics.LastTrackedIntervalLocation 
																							);
															}, ( _Metrics.TRACKING_INTERVAL * 1000 ) );
	    }
    }
    
    
}

Metrics.InitializeKeyPoints = function ( pVideo )
{
	var CurrentClip = pVideo; 
	
	if( ! CurrentClip )
	{
	    CurrentClip = Playlist.GetInstance().Current;
	}
	
	Metrics.GetInstance().KeyPoints = new Array();
	
	for( i=0; i< Metrics.GetInstance().KeyInterval.length; i++ )
	{
		var keyPoint =  parseInt( Metrics.GetInstance().KeyInterval[ i ] );
		Metrics.GetInstance().KeyPoints.push( keyPoint );
	}
	
	if( CurrentClip.Duration > 0 )
	{
		for( i=0; i< Metrics.GetInstance().KeyIntervalPercentage.length; i++ )
		{
			var keyPoint = parseInt( ( Metrics.GetInstance().KeyIntervalPercentage[ i ] / 100 ) * CurrentClip.Duration );
			Metrics.GetInstance().KeyPoints.push( keyPoint );
		}
	}
}

Metrics.EndedClip = function( pVideo )
{
	var CurrentClip = Playlist.GetInstance().Current;
	
	if( ! CurrentClip )
	{
	    CurrentClip = pVideo;
	}

	if( ! CurrentClip.IsAd )
	{
		if( Metrics.GetInstance().IsTrackingVideo )
		{
			var VideoProbablyEndedNaturally = Metrics.GetInstance().HasReachedEightyPercent && ( CurrentClip.Duration - Metrics.GetInstance().LastTrackedLocation ) < Metrics.GetInstance().TRACKING_INTERVAL;
			
			if( VideoProbablyEndedNaturally ) // we need to let them know that the video was watched until the end
			{
				Metrics.SendEndedClip( CurrentClip,  Metrics.GetVideoDuration( CurrentClip ) );
			}
			
			Metrics.GetInstance().IsTrackingVideo = false;
			Metrics.GetInstance().HasReachedEightyPercent = false;
		}
    }
}

Metrics.TrackSearch = function( pSearchTerm, pNumberOfResults )
{
	var s = Metrics.GetTrackingInstance( null );		
	
	var searchResults = parseInt( pNumberOfResults ) > 0 ? ("" + pNumberOfResults ) : "zero";
	
	s.linkTrackVars		= "prop1,eVar1,prop2,events";
	s.linkTrackEvents	= "event1";

	s.prop1= s.eVar1 = pSearchTerm.toLowerCase();
	s.prop2= searchResults;
	s.events = "event1";
	
	var label = Metrics.TrimLabel( "Search for " + pSearchTerm  + " had " + pNumberOfResults + " results." );
	Metrics.TrackLink( s, true, "o", Metrics.VIDEO_LABEL );
}

Metrics.ReachedClipKeyPoint = function( pSeconds )
{
	var CurrentClip = Metrics.GetInstance().CurrentClip;
	
	if( CurrentClip )
	{
		if( ! Metrics.GetInstance().HasSentVideoStart )
		{
			Metrics.SendStartedClip( CurrentClip );	

            /*var playerNameToRecord = Metrics.GetInstance().Project;*/

            var playerNameToRecord = "One Clip Player";

            var dartId = "ctv.thecomedynetworkwatch.ca";
            var comscoreID= "8016415";
			Metrics.InitializeKeyPoints( CurrentClip );
					
			Metrics.GetInstance().HasSentVideoStart = true;

            COMSCORE.beacon({
                c1: 1,
                c2: "3005664",
                c3: "",
                c4: comscoreID,
                c5: CurrentClip.ClipId,
                c6: CurrentClip.Title
            });
		}
		
		for( i=0; i < Metrics.GetInstance().KeyPoints.length; i++ )
		{
			if( ( Metrics.GetInstance().KeyPoints[ i ] - pSeconds ) < Metrics.GetInstance().REACHED_CLIP_POINT_INTERVAL )
			{
				Metrics.OnKeyPointClipTime( CurrentClip, Metrics.NonZero(  Metrics.GetInstance().KeyPoints[ i ] ) );
				Metrics.GetInstance().KeyPoints.splice( i, 1 );
				i--;
			}
		}
	}
}

Metrics.GetVideoLabel = function( pVideo )
{
    if( ! pVideo.SiteMap )
    {
        return pVideo.Permalink;
    }
    else
    {
        var Label = "";
        for( var i = pVideo.SiteMap.length - 1; i >= 0; i-- )
        {
            if( Label != "" )
            {
                Label += "|";
            }
            Label += pVideo.SiteMap[i][0].replace( /[|]/ig, "" );
            try
            {
                Label += "[" + /[0-9]+$/i.exec( pVideo.SiteMap[i][1] ) + "]";
            }
            catch( err )
            {}
        }
        Label += "|Clip[" + pVideo.ClipId + "]"; 
        return Label;
    }
}

Metrics.ApplyKnownSections = function( sInstance, pVideo )
{
	//change to support newstyle self serve metrics and the oneclip player.
	if (sInstance.trackingServerSecure == "" || sInstance.trackingServerSecure == null){
		sInstance.trackingServerSecure = s.trackingServerSecure;
		sInstance.trackingServer = s.trackingServer;
		s_siteSection = s.eVar6;
		s_siteCategory = s.eVar23;
		s_siteName = s.eVar22;
		sInstance.un = s.un;
	}
	
	var hasSSiteSection = typeof( s_siteSection ) != undefined && typeof( s_siteSection ) != "undefined" && typeof( s_siteSection ) != null;
	var hasSSubSection1 = typeof( s_subSection1 ) != undefined && typeof( s_subSection1 ) != "undefined" && typeof( s_subSection1 ) != null;
	var hasSSiteCategory= typeof( s_siteCategory ) != undefined && typeof( s_siteCategory ) != "undefined" && typeof( s_siteCategory ) != null;
	var hasSSiteName	= typeof( s_siteName ) != undefined && typeof( s_siteName ) != "undefined" && typeof( s_siteName ) != null;
	
	var prefix = "";

	if( hasSSiteSection && s_siteSection != ""  )
	{
		sInstance.linkTrackVars += prefix + "prop6,eVar6";
		sInstance.prop6 = sInstance.eVar6 = sInstance.channel = sInstance.hier1 = s_siteSection;
	}
	else
	{
		sInstance.linkTrackVars += prefix + "prop6,eVar6";
		sInstance.prop6 = sInstance.eVar6 = sInstance.channel = sInstance.hier1 = Metrics.VIDEOPLAYER_SITESECTION;
	}
	
	prefix = sInstance.linkTrackVars == "" ? "" : ( ( sInstance.linkTrackVars.length > 0 && sInstance.linkTrackVars.substring( sInstance.linkTrackVars - 1 ) == "," ) ? "" : "," );

	if( hasSSubSection1 && s_subSection1 != ""  )
	{
		sInstance.linkTrackVars += prefix + "prop7,eVar7"
		sInstance.prop7 = sInstance.eVar7 = s_subSection1;
		
		sInstance.hier1 += prefix + s_subSection1;
	}
	
	prefix = sInstance.linkTrackVars == "" ? "" : ( ( sInstance.linkTrackVars.length > 0 && sInstance.linkTrackVars.substring( sInstance.linkTrackVars - 1 ) == "," ) ? "" : "," );

	
	if( hasSSiteCategory && s_siteCategory != "" && hasSSiteName && s_siteName != "" )
	{
		sInstance.linkTrackVars += prefix + "prop22,eVar22,prop23,eVar23,prop24,eVar24"
		
		sInstance.prop22 = sInstance.eVar22 = s_siteName;
		sInstance.prop23 = sInstance.eVar23 = s_siteCategory;
		sInstance.prop24 = sInstance.eVar24 = s_siteCategory + ":Video";
		
	}

	prefix = sInstance.linkTrackVars == "" ? "" : ( ( sInstance.linkTrackVars.length > 0 && sInstance.linkTrackVars.substring( sInstance.linkTrackVars - 1 ) == "," ) ? "" : "," );
	
	s.linkTrackVars		+= prefix + "prop5,prop11,eVar11,prop12,eVar12,prop13,eVar13,prop16,eVar16,prop17,eVar17,prop18,eVar18,prop20,eVar20,prop21,eVar21,hier1";
	
	sInstance.linkTrackVars = s.linkTrackVars;
	sInstance.prop16	= sInstance.eVar16 = Metrics.GetVideoTitle( pVideo );
	sInstance.prop17	= sInstance.eVar17 = Metrics.GetVideoId ( pVideo );
	sInstance.prop20	= sInstance.eVar20 = Metrics.GetVideoPath( pVideo );
	sInstance.prop21	= sInstance.eVar21 = Metrics.GetVideoDuration( pVideo );
	
	sInstance.prop5		= sInstance.eVar5 = "Video";
	
	sInstance.prop18	= sInstance.eVar18 ="One Clip Player";
	
    if (this.UseMetricsOverridePlayName){
	    var playerNameToRecord = Metrics.GetInstance().Project;
	
	    if (playerNameToRecord == "")
	    {
	        playerNameToRecord = "One Clip Player";
	    }
        
        sInstance.prop18	= sInstance.eVar18 = playerNameToRecord;
    }
	
	
}

Metrics.GetTrackingInstance = function( pVideo )
{
	var hasSAccount		= typeof( s_account ) != undefined && typeof( s_account ) != "undefined" && typeof( s_account ) != null;
	
	var accountName		= hasSAccount ? s_account : Metrics.GetInstance().AccountId;
	var s = null;
	
	s = s_gi( accountName );
	s.linkTrackVars = "";
	s.linkTrackEvents = "None";
	
	s.prop1 = s.eVar1 = "";
	s.prop2 = s.eVar2 = "";
	s.prop5 = s.eVar5 = "";
	s.prop6 = s.eVar6 = "";
	s.prop7 = s.eVar7 = "";
	s.prop8 = s.eVar8 = "";
	s.prop16 = s.eVar16 =  "";
	s.prop17 = s.eVar17 = "";
	s.prop20 = s.eVar20 = "";
	s.prop18 = s.eVar18 = "";
	s.prop20 = s.eVar20 = "";
	s.prop21 = s.eVar21 = "";
	
	s.hier1 = "";
	s.events= "";
	s.products= "";
	
	if( pVideo )
	{
		Metrics.ApplyKnownSections( s, pVideo );
	}
	
	return s;
}

Metrics.SendStartedClip = function( pVideo )
{
    
    Utility.Log("SendStartedClip");
	var CurrentClip = pVideo; 
	
	if( ! CurrentClip )
	{
	    CurrentClip = Playlist.GetInstance().Current;
	}
	var full = Player.Fullscreen;
	var s = Metrics.GetTrackingInstance( pVideo );
		
		
	s.linkTrackVars	  += ",products,events";
	s.linkTrackEvents = "event5,event7";
	
	s.events="event5,event7"; 
	s.products=";;;;event7=0";
	
	var label =  Metrics.TrimLabel( "[ClipId=" + Metrics.GetVideoId( pVideo ) + "] started"  );
	
	Metrics.TrackLink(s, true, "o", Metrics.VIDEO_LABEL );
}


Metrics.SendEndedClip = function( pVideo, pSeconds )
{
	var CurrentClip = pVideo; 
	
	if( ! CurrentClip )
	{
	    CurrentClip = Playlist.GetInstance().Current;
	}
	
	var timeDelta = pSeconds - Metrics.GetInstance().LastTrackedLocation;
	
	var s = Metrics.GetTrackingInstance( pVideo );
	
	s.linkTrackVars	  += ",products,events";
	s.linkTrackEvents ="event6,event7";
	
	Utility.Log("SendEndedClip");
	s.events="event6,event7";
	s.products=";;;;event7=" + timeDelta ;

	var label = Metrics.TrimLabel( "[ClipId=" + Metrics.GetVideoId( pVideo ) + "] ended" );
	Metrics.TrackLink( s, true, "o", Metrics.VIDEO_LABEL );
	
	s.Media.stop(CurrentClip.Title,pSeconds);
}

Metrics.OnIntervalClipTime = function( pVideo, pSeconds )
{
	var timeDelta = pSeconds - Metrics.GetInstance().LastTrackedLocation;
		
	Metrics.GetInstance().LastTrackedLocation = pSeconds;
	
	Utility.Log("SendClipTime:"+timeDelta);
	Metrics.SendClipTime( pVideo, timeDelta );
}
Metrics.OnKeyPointClipTime = function( pVideo, pSeconds )
{
	var timeDelta = pSeconds - Metrics.GetInstance().LastTrackedLocation;	
	Metrics.GetInstance().LastTrackedLocation = pSeconds;
	
	var s = Metrics.GetTrackingInstance( pVideo );
	var full = Player.Fullscreen;
	
	//console.log("Fullscreen is " + Player.Fullscreen);
	
	if( pSeconds == 20 )
	{	   
		s.linkTrackVars +=",events,products";
			
		if (full == true || full == "true")
		{
		    s.linkTrackEvents="event7,event9,event21";
		    s.events="event7,event9,event21";    	
		    s.products=";;;;event7=" + timeDelta+";event21="+full;
		    Utility.Log("OnKeyPointClipTime:event7=" + timeDelta+";event21="+full);
		}
		else
		{
		    s.linkTrackEvents="event7,event9";
		    s.events="event7,event9";
		    s.products=";;;;event7=" + timeDelta;
		    Utility.Log("OnKeyPointClipTime:event7=" + timeDelta);
		}
		
		var label = Metrics.TrimLabel( "[ClipId=" + Metrics.GetVideoId( pVideo ) + "] reached " +  pSeconds + " seconds" );
		Metrics.TrackLink( s, true, "o", Metrics.VIDEO_LABEL );
	}
	else 
	{
		s.linkTrackVars +=",events,products";
	
	    if (full == true || full == "true")
		{
		    s.linkTrackEvents ="event7,event10,event22";
		    s.events="event7,event10,event22";
		    s.products=";;;;event7=" + timeDelta+";event22="+full;
		    Utility.Log("OnKeyPointClipTime:event10,event7=" + timeDelta+";event22="+full);
		}
		else
		{
            s.linkTrackEvents ="event7,event10";
		    s.events="event7,event10";
		    s.products=";;;;event7=" + timeDelta;
		    Utility.Log("OnKeyPointClipTime:event10,event7=" + timeDelta);
		}
		
		Metrics.GetInstance().HasReachedEightyPercent = true;
		
		var label = Metrics.TrimLabel( "[ClipId=" + Metrics.GetVideoId( pVideo ) + "] reached " +  pSeconds + " seconds" );
		Metrics.TrackLink( s, true, "o", Metrics.VIDEO_LABEL );
	}
}
Metrics.SendClipTime = function( pVideo, pSeconds )
{
	if( pSeconds > 0 )
	{
	    var full = Player.Fullscreen;
		var s= Metrics.GetTrackingInstance( pVideo );
		
		s.linkTrackVars +=",events,products";
		s.linkTrackEvents="event7";
		
		s.events="event7";
		s.products=";;;;event7=" + pSeconds;
        Utility.Log("OnKeyPointClipTime:event7=" + pSeconds);
		var elapsedTime = Metrics.GetInstance().LastTrackedLocation;
		var label = Metrics.TrimLabel( "[ClipId=" + Metrics.GetVideoId( pVideo ) + "] reached " +  elapsedTime + " seconds" );
		
		Metrics.TrackLink( s, true, "o", Metrics.VIDEO_LABEL );
	}
}

Metrics.TrackLink = function( sInstance, param1, param2, param3 )
{
	if( ! Metrics.CanTrack )
	{
		Metrics.CanTrack = ( typeof( s_gi ) == "function" ); //the h code is already on the page if s_gi is a function
	}
	
	if( Metrics.CanTrack )
	{
		sInstance.IsTrackLink = true;
		sInstance.tl( param1,param2,param3 );
		sInstance.IsTrackLink = false;
	}
}

// The user navigated to pLocation in the library interface
Metrics.NavigatedTo = function( pLocation )
{
	var s= Metrics.GetTrackingInstance();
	
	s.linkTrackEvents = "None";
	s.linkTrackVars = "None";
	
	s.prop5 = s.eVar5 = "AJAX Web Page";
	//try
	//{
		Metrics.TrackLink( s, true, "o", pLocation );
	//}
	//catch(e)
	//{}
}

// There was the error pError loading the video pVideo.
Metrics.ErrorPlayingClip = function( pVideo, pError )
{
    var s= Metrics.GetTrackingInstance();
    
    s.linkTrackEvents = "None";
	s.linkTrackVars = "None";
    
    s.prop5 = s.eVar5 = "AJAX Error Page";
    
    try
    {
        Metrics.TrackLink( s, true, "o", "Error_" + pError + "_" + Metrics.GetVideoPath( pVideo ) );
    }
    catch( err )
    {
        Metrics.TrackLink( s, this, "o", "Error_" + pError );
    }
    
    if( Metrics.GetInstance().trackingIntervalToken != null )
	{
		clearInterval( Metrics.GetInstance().trackingIntervalToken );
		Metrics.GetInstance().trackingIntervalToken = null;
	}
}



Metrics.InteractedWithElement = function( pElementName )
{
	var s= Metrics.GetTrackingInstance();
	
	s.linkTrackEvents = "None";
	s.linkTrackVars = "None";
	
	s.prop5 = s.eVar5 = "Web Page Element Interaction";
	
	 Metrics.TrackLink( s, this, "o", pElementName );
}

Metrics.NonZero = function( pNumber )
{
    if( pNumber == -1 )
    {
        return 1;
    }
    else
    {
        return Math.abs( pNumber );
    }
}


	Metrics.CanTrack = ( typeof( s_gi ) == "function" ); //the h code is already on the page if s_gi is a function
	var autoTrackDNE = typeof( _AUTO_TRACK ) == undefined || typeof( _AUTO_TRACK ) == "undefined";
	var oldAutoTrack = false;
	
	if( ( ! autoTrackDNE ) && ( ! Metrics.CanTrack ) )
	{
		oldAutoTrack = _AUTO_TRACK;
	}
	
	var _AUTO_TRACK = oldAutoTrack;
		
	if( !  Metrics.CanTrack )
	{
		var handlerFunction	= function() { Metrics.CanTrack = true; };
		var head			= document.getElementsByTagName("body")[0];
		var newScript		= document.createElement("script");
		
		newScript.type		= "text/javascript";
		newScript.src		= "http://metrics.ctvdigital.net/global/GlobalPageTracking.js";
		
		newScript.onload = handlerFunction;
		if( newScript.onload == handlerFunction )
		{
			// DO NOTHING
		}
		else if( newScript.addEventListener )
		{
			newScript.addEventListener( "load", handlerFunction, false );
		}
		else if( newScript.attachEvent ) 
		{
			newScript.attachEvent( "onload", handlerFunction );
		}

		var isIE = navigator && navigator.appName && navigator.appName.indexOf("Explorer") > -1;
		if( isIE )
		{
			var oldOnLoad = window.onload;
			
			var onloadFunction = function() { head.appendChild( newScript ); if( oldOnLoad ) { oldOnLoad(); } };
			
			window.onload = onloadFunction;
		}
		else
		{
			head.appendChild( newScript );
		}
	}


/*
 * Video: an individual video that can be played
 */
function Video( pVideoInfo )
{
	this.Title = "";
	this.Description = "";
	this.Thumbnail = "";
	this.EpisodeThumbnail = "";
	this.Format = null;
	this.Rating = TVRating.ParentalGuidance;
	this.IsAd = false;  // Is this Video an Ad?
	this.Url = null;  // URL of the Video stream or file (for progressive downloading)
	this.BugUrl = "";  // URL of the video bug (image in the bottom-right corner)
	this.ClipId = null;  // The unique PIPE Clip Id of the video
	this.EpisodeId = null;  // The unique PIPE Episode Id of the video
	this.Duration = -1;  // The duration of the video
	this.Permalink = null;
	this.EpisodePermalink = null;
	this.IsCanadaOnly = false;
	
	this.Artist = "";
	
	this.MetaData = null;
	this.SiteMap = null;
	
	this.IgnoreSibling = false;
	
	this.SetInfo( pVideoInfo );
	
	this.OnStart = null;  // Function that is called when the Video is played
	this.OnEnd = null;  // Function that is called when the Video is stopped
	this.AfterRemoteLoad = null;  // Function that is called when the Video has finished loading remotely
	
	this.IsInErrorState = false;  // Is this Video object in an error state?
	
}

Video.prototype.SetInfo = function( pVideoInfo )
{
    if( pVideoInfo.Title )
    {
        this.Title = pVideoInfo.Title;
    }
    
    if ( pVideoInfo.Artist )
    {
        this.Artist = pVideoInfo.Artist;
    }
        
    if( pVideoInfo.Description )
    {
        this.Description = pVideoInfo.Description;
    }
    
    if( pVideoInfo.Url )
    {
        this.Url = pVideoInfo.Url;
    }
    else if( pVideoInfo.url )
    {
        this.Url = pVideoInfo.url;
    }
    
    if( pVideoInfo.Format )
    {
        this.Format = pVideoInfo.Format;
    }
    
    if( pVideoInfo.ClipId )
    {
        this.ClipId = pVideoInfo.ClipId;
    }
    
    if( pVideoInfo.EpisodeId )
    {
        this.EpisodeId = pVideoInfo.EpisodeId;
    }
    
    if( pVideoInfo.IsAd )
    {
        this.IsAd = pVideoInfo.IsAd;
    }
    
    if( pVideoInfo.Duration )
    {
        this.Duration = pVideoInfo.Duration;
    }
    
    if( pVideoInfo.Thumbnail )
    {
        this.Thumbnail = pVideoInfo.Thumbnail;
    }
    
    if( pVideoInfo.EpisodeThumbnail )
    {
        this.EpisodeThumbnail = pVideoInfo.EpisodeThumbnail;
    }
    
    if( pVideoInfo.Rating )
    {
        this.Rating = pVideoInfo.Rating;
    }
    
    if( pVideoInfo.BugUrl )
    {
        this.BugUrl = pVideoInfo.BugUrl;
    }
    
    if( pVideoInfo.IgnoreSibling )
    {
        this.IgnoreSibling = pVideoInfo.IgnoreSibling;
    }
    
    if( pVideoInfo.Permalink )
    {
        this.Permalink = pVideoInfo.Permalink;
    }
    else if( this.ClipId != null && FlashController.IsOneClipPlayer )
    {
		this.Permalink = Video.DeterminePermalink( this.ClipId );
    }
    
    if( pVideoInfo.EpisodePermalink )
    {
        this.EpisodePermalink = pVideoInfo.EpisodePermalink;
    }
    
    if( pVideoInfo.IsCanadaOnly )
    {
		this.IsCanadaOnly = pVideoInfo.IsCanadaOnly == 1;
    }
    
    if( pVideoInfo.SiteMap )
    {
		this.SiteMap = new Array();
		
		var maps = pVideoInfo.SiteMap.split( "||" );
		
		for( i = 0; i < maps.length; i++ )
		{
			var arr =  new Array( maps[i], maps[++i] );
			
			this.SiteMap.push( arr );
		}
    }
    
    if( pVideoInfo.MetaData )
    {
		this.MetaData = new Array();
		
		var meta = pVideoInfo.MetaData.split( "||" );
		
		for( i = 0; i < meta.length; i++ )
		{
			var innerMeta = meta[ i ].split( ": " );
			var arr =  new Array( innerMeta[0], innerMeta[1] );
			
			this.MetaData.push( arr );
		}
    }
}


Video.GetInstance = function( i )
{
	if( Video.__instance && Video.__instance[i] )
	{
		return Video.__instance[i];
	}
	else
	{
		throw "Could not find an instance of Video with index " + i;
	}
}

Video.SetInstance = function( pVideo )
{
	if( ! Video.__instance )
	{
		Video.__instance = new Array();
	}
	
	Video.__instance.push( pVideo );
	return Video.__instance.length - 1;
}

// Get information about the Video by calling pUrlToPassClipId appended with the ClipId
Video.prototype.GetRemoteUrl = function( pUrlToPassClipId )
{
    // Set this Video as the current Video being loaded remotely.
	Video.LoadingVideo = this;
	
	if( ! pUrlToPassClipId )
	{
	    
		
		pUrlToPassClipId = "http://cls.ctvdigital.net/cliplookup.aspx?id={0}".replace("{0}",this.ClipId);
	}
	
	var TimezoneOffset = ( new Date() ).getTimezoneOffset() / 60 * -1; // as a negative int, from UTC

    // Call the remote URL via a SCRIPT element in the header of the page.
	var VideoRemoteUrlScript = document.createElement("script");
	VideoRemoteUrlScript.src = pUrlToPassClipId + "&timeZone=" + TimezoneOffset + "&random=" + Math.round( 10000000 * Math.random() );
	VideoRemoteUrlScript.type = "text/javascript";
	document.getElementsByTagName("head")[0].appendChild( VideoRemoteUrlScript );
	
	VideoIndex = Video.SetInstance( this );
	
	// Check after 4 seconds if the Video has loaded successfully.
	setTimeout( "Video.GetInstance(" + VideoIndex + ").CheckForLoadFailure()", 4000 );
}

// Called from a JS call from the remotely-loaded URL (via Video.prototype.GetRemoteUrl)
// pVideoLoadInfo: all the information about a Video clip in JSON format
Video.Load = function( pVideoLoadInfo )
{
	Log( "Loaded video " + pVideoLoadInfo.url );
	
	var _Video = Video.LoadingVideo;
	
	_Video.SetInfo( pVideoLoadInfo );
	
	// If we were not passed back a URL for the clip stream...
	if( ! _Video.Url )
	{
	    // If we don't have a URL of the video, we are really in trouble.  So throw an error and stop.
		throw "Error loading video " + _Video.ClipId + ": Could not find a URL to play";
		return;
	}
	
	// Check if we received an error from the server code while trying to grab the Clip information.
	// These errors can be things like "clip expired" and "geo-fenced".
	if( pVideoLoadInfo.err && pVideoLoadInfo.err != "" )
	{
		_Video.OnLoadFailure( pVideoLoadInfo.err );
	}
	else
	{
		if( _Video.AfterRemoteLoad )
		{
			_Video.AfterRemoteLoad( _Video );
		}
	}
	
}

Video.DeterminePermalink = function( clipId )
{
	return "http://watch.thecomedynetwork.ca/Redirect/Default.aspx?ClipId=" + clipId;	
}

// There was an error loading the Video.
// pError: a message describing the error.
Video.prototype.OnLoadFailure = function( pError )
{
	this.IsInErrorState = true;
	
	if( pError.match( "blocked" ) != null )
	{
        if( Interface.DisplayPlayerControllerError )
        {
            Interface.DisplayPlayerControllerError( "Not available in your region", "Sorry, the video you are trying to watch is <a href='http://blog.ctvdigital.net/index.php/video-player/video-player-faq/#OutsideCanada' target='_blank'>not available in your region</a>." );
        }
        else
        {
            alert( "Canada only" );
        }
        Metrics.NavigatedTo( "Canada_Only" );
    }
    else if( pError.match( "expired" ) != null )
    {
        if( Interface.DisplayPlayerControllerError )
        {
            Interface.DisplayPlayerControllerError( "Clip expired", "The clip you are trying to watch is <a href='http://blog.ctvdigital.net/index.php/video-player/video-player-faq/#Expired' target='_blank'>no longer available</a>." );
        }
        else
        {
            alert( "Clip expired" );
        }
         Metrics.NavigatedTo( "Clip_Expired" );
    }
    else
    {
	    if( Interface.DisplayPlayerControllerError )
	    {
	        Interface.DisplayPlayerControllerError( "Sorry, there was an error", pError );
        }
        else
        {
            alert( "Sorry, there was an error" );
        }
	    //Metrics.NavigatedTo( "Error_Generic" );
	}
	
	Metrics.ErrorPlayingClip( this, pError );
}
	
// Check if the Video loaded remotely without failure (before this function is called).
Video.prototype.CheckForLoadFailure = function() 
{
	if( ! this.IsInErrorState )
	{
		var loaded = false;
		
		if( ! this.Url )
		{
			if( Playlist.GetInstance().Current.ClipId == this.ClipId && this.Url == null )
			{
				this.OnLoadFailure( "We are experiencing temporary difficulties downloading your lineup.  Please wait another few seconds and try again if you're still having problems.<br /><br />  Thanks for your patience." );
				return;
			}
		}
	}
}


/*
 * TV Rating: holds the possible tv ratings of video
 * "Won't somebody think about the children?!"
 */
function TVRating()
{
    this.DiscretionThreshold = TVRating.ParentalGuidance; // the maximum rating to display without advisory.
    
    this.DisplayedAdvisories = new Array();
    
    TVRating.__instance = this;
}
TVRating.GetInstance = function()
{
    if( TVRating.__instance )
    {
        return TVRating.__instance;    
    }
    else
    {
        return new TVRating();
    }
}
TVRating.prototype.MustAdvise = function( pRating )
{
    if( TVRating.Weight( pRating ) > TVRating.Weight( this.DiscretionThreshold ) )
    {
        for( var i = 0; i < this.DisplayedAdvisories.length; i++ )
        {
            if( this.DisplayedAdvisories[i] == pRating )
            {
                return false;
            }
        }
        this.DisplayedAdvisories.push( pRating );
        return true;
    }
    else
    {
        return false;
    }
}

TVRating.Weight = function( pRating ) 
{
    switch( pRating )
    {
        case TVRating.Children:
            return 0;
            break;
        case TVRating.ChildrenOver8:
            return 1;
            break;
        case TVRating.General:
            return 2;
            break;
        case TVRating.ParentalGuidance:
            return 3;
            break;
        case TVRating.Over14:
            return 4;
            break;
        case TVRating.Adults:
            return 5;
            break;
        default:
            return -1;
            break;
    }
}

TVRating.Children = "C";
TVRating.ChildrenOver8 = "C8+";
TVRating.General = "G";
TVRating.ParentalGuidance = "PG";
TVRating.Over14 = "14+";
TVRating.Adults = "18+";


/*
 * Playlist: handles the ordering and managing of the videos that will play in sequence
 */
function Playlist( pPrerollFrequency )
{
    this.AdOrd = 0;
    this.AdTile = 0;
    this.LastMadsPermalink = '';
    this.NumberOfAdsToDisplay = 1;
    this.AdsDisplayed = 0;
	this.History = new Array();  // Videos that you have already watched (does not include ads)
	this.Upcoming = new Array();  // Videos that you have added to your playlist
	
	
	
	this.SiblingVideos = new Array();  // Other clips in the same episode as your Current clip
	this.Current = null; // The Video you are currently watching
	
	this.ClipIdOnAddresBarAtLoadTime = Player.ParseClipIdFromAddress();
	
	// Set the frequency that preroll ads will appear
	// this.PrerollFrequency set to 0 will display no prerolls.
	if( pPrerollFrequency )
	{
	    // TEMPORARY: Watch for the old preroll frequency and make sure it's no less than 30 seconds
	    if( pPrerollFrequency > 0 && pPrerollFrequency < 10 )
	    {
	        this.PrerollFrequency = 300;
	    }
	    else
	    {
		    this.PrerollFrequency = pPrerollFrequency;
		}
	}
	else
	{
         this.NumberOfAdsToDisplay = 0;
		this.PrerollFrequency = 0;
	}
	

    if(Playlist.HasNoAdCookie())
    {
        this.NumberOfAdsToDisplay = 0;
    }

	
	this.FeaturedVideosIndex = 0;  // The index of where you are in the static FeaturedVideos array
	
	Playlist.__instance = this;
}
Playlist.GetInstance = function( )
{
	if( ! Playlist.__instance )
	{
		throw "Trying to get an instance of the Playlist before it has been initialized";
	}
	
	return Playlist.__instance;
}

// A static list of the Featured videos in the current player
Playlist.FeaturedVideos = new Array();


        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-101-series-premiere/', Permalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-101-series-premiere/#clip612172', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_101_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_101_logo.jpg', Rating:'', Description:'', Title:'I Just Want My Pants Back : (Ep. 101) **Series Premiere** : (Ep. 101) Clip 1 of 4', Format:'FLV', ClipId:'612172', BugUrl: '' ,SiteMap:'(Ep. 101) **Series Premiere**||ShowId=13389&SeasonId=2650&EpisodeId=104015||Season 1||ShowId=13389&SeasonId=2650||I Just Want My Pants Back||ShowId=13389', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-101-series-premiere/', Permalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-101-series-premiere/#clip612190', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_101_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_101_logo.jpg', Rating:'', Description:'', Title:'I Just Want My Pants Back : (Ep. 101) **Series Premiere** : (Ep. 101) Clip 2 of 4', Format:'FLV', ClipId:'612190', BugUrl: '' ,SiteMap:'(Ep. 101) **Series Premiere**||ShowId=13389&SeasonId=2650&EpisodeId=104015||Season 1||ShowId=13389&SeasonId=2650||I Just Want My Pants Back||ShowId=13389', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-101-series-premiere/', Permalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-101-series-premiere/#clip612195', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_101_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_101_logo.jpg', Rating:'', Description:'', Title:'I Just Want My Pants Back : (Ep. 101) **Series Premiere** : (Ep. 101) Clip 3 of 4', Format:'FLV', ClipId:'612195', BugUrl: '' ,SiteMap:'(Ep. 101) **Series Premiere**||ShowId=13389&SeasonId=2650&EpisodeId=104015||Season 1||ShowId=13389&SeasonId=2650||I Just Want My Pants Back||ShowId=13389', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-101-series-premiere/', Permalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-101-series-premiere/#clip612196', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_101_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_101_logo.jpg', Rating:'', Description:'', Title:'I Just Want My Pants Back : (Ep. 101) **Series Premiere** : (Ep. 101) Clip 4 of 4', Format:'FLV', ClipId:'612196', BugUrl: '' ,SiteMap:'(Ep. 101) **Series Premiere**||ShowId=13389&SeasonId=2650&EpisodeId=104015||Season 1||ShowId=13389&SeasonId=2650||I Just Want My Pants Back||ShowId=13389', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-102-baby-monkeys/', Permalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-102-baby-monkeys/#clip612199', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_102_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_102_logo.jpg', Rating:'', Description:'', Title:'I Just Want My Pants Back : (Ep. 102) &quot;Baby Monkeys&quot; : (Ep. 102) Clip 1 of 4', Format:'FLV', ClipId:'612199', BugUrl: '' ,SiteMap:'(Ep. 102) &quot;Baby Monkeys&quot;||ShowId=13389&SeasonId=2650&EpisodeId=104019||Season 1||ShowId=13389&SeasonId=2650||I Just Want My Pants Back||ShowId=13389', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-102-baby-monkeys/', Permalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-102-baby-monkeys/#clip612219', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_102_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_102_logo.jpg', Rating:'', Description:'', Title:'I Just Want My Pants Back : (Ep. 102) &quot;Baby Monkeys&quot; : (Ep. 102) Clip 2 of 4', Format:'FLV', ClipId:'612219', BugUrl: '' ,SiteMap:'(Ep. 102) &quot;Baby Monkeys&quot;||ShowId=13389&SeasonId=2650&EpisodeId=104019||Season 1||ShowId=13389&SeasonId=2650||I Just Want My Pants Back||ShowId=13389', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-102-baby-monkeys/', Permalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-102-baby-monkeys/#clip612220', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_102_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_102_logo.jpg', Rating:'', Description:'', Title:'I Just Want My Pants Back : (Ep. 102) &quot;Baby Monkeys&quot; : (Ep. 102) Clip 3 of 4', Format:'FLV', ClipId:'612220', BugUrl: '' ,SiteMap:'(Ep. 102) &quot;Baby Monkeys&quot;||ShowId=13389&SeasonId=2650&EpisodeId=104019||Season 1||ShowId=13389&SeasonId=2650||I Just Want My Pants Back||ShowId=13389', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-102-baby-monkeys/', Permalink:'http://watch.thecomedynetwork.ca/i-just-want-my-pants-back/season-1/i-just-want-my-pants-back-ep-102-baby-monkeys/#clip612221', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_102_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/pantsback_102_logo.jpg', Rating:'', Description:'', Title:'I Just Want My Pants Back : (Ep. 102) &quot;Baby Monkeys&quot; : (Ep. 102) Clip 4 of 4', Format:'FLV', ClipId:'612221', BugUrl: '' ,SiteMap:'(Ep. 102) &quot;Baby Monkeys&quot;||ShowId=13389&SeasonId=2650&EpisodeId=104019||Season 1||ShowId=13389&SeasonId=2650||I Just Want My Pants Back||ShowId=13389', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip175789', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'It\'s important for man to have a ritual.', Title:'Super Bowl Stand-Up : Lewis Black - The Super Bowl', Format:'FLV', ClipId:'175789', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip14174', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/ccp_reep_show2_m1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'What if the ref is just messing with everyone.', Title:'Super Bowl Stand-Up : Jon Reep - The Referee\'s Mic', Format:'FLV', ClipId:'14174', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip161517', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_4_15/caliendo1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'John Madden makes Frank feel smart.', Title:'Super Bowl Stand-Up : Frank Caliendo - John Madden', Format:'FLV', ClipId:'161517', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip231712', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/j_lag_03_0302_08_m1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'In sports video games these days, they make you control every aspect of the stadium.', Title:'Super Bowl Stand-Up : Nate Bargatze - Madden Football', Format:'FLV', ClipId:'231712', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip175790', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis2.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'Halftime has gotten exponentially worse every year.', Title:'Super Bowl Stand-Up : Lewis Black - Super Bowl Halftime', Format:'FLV', ClipId:'175790', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip156948', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_4_2/gregb3.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'Coaches say weird things like, &quot;Are you gonna swallow the olive?&quot;', Title:'Super Bowl Stand-Up : Greg Behrendt - Football Language', Format:'FLV', ClipId:'156948', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip92652', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/200_weeklyevil_7_fantasyfootball_m1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'Our panel of comedians reveals the five reasons fantasy football is evil.', Title:'Super Bowl Stand-Up : Root of All Evil: Weekly Evil - Five Reasons Fantasy Football is Evil', Format:'FLV', ClipId:'92652', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip211054', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_9_8/tammy2.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'For $6 million a year, there is very little that Tammy would not do.', Title:'Super Bowl Stand-Up : Tammy Pescatelli - Terrell Owens', Format:'FLV', ClipId:'211054', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip403998', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/j_ccp_14_1414_02_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'There\'s no door on the men\'s restroom at a stadium, just an invisible yellow stench.', Title:'Super Bowl Stand-Up : Rob Riggle - Worst Place on Earth', Format:'FLV', ClipId:'403998', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip211089', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_9_8/reep4.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'Jon offers impressions of NFL mascots.', Title:'Super Bowl Stand-Up : Jon Reep - See and Say Mascots', Format:'FLV', ClipId:'211089', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip193916', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_7_15/carlos2.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'If cheerleaders affected the outcomes of battles, the Native Americans would still be here today.', Title:'Super Bowl Stand-Up : Carlos Alazraqui - Cheerleaders', Format:'FLV', ClipId:'193916', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip213971', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_9_16/pete1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'Pete\'s nickname on his football team is &quot;Global Warming,&quot; because whenever he\'s on the field, the rest of the team pretends that he doesn\'t exist.', Title:'Super Bowl Stand-Up : Pete Lee - Kicker of the Group', Format:'FLV', ClipId:'213971', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip186793', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_6_25/terrell_400x300.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'Terrell Owens gets all of his apologies for the 2009-2010 football season out of the way now.', Title:'Super Bowl Stand-Up : Tosh.0: Terrell Owens Apologizes', Format:'FLV', ClipId:'186793', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comedians-a-z/k/jo-koy/clip212428#clip212428', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_9_11/jokoy5.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'Football isn\'t tough.', Title:'Comedians A-Z : Jo Koy : Eight Pounds', Format:'FLV', ClipId:'212428', BugUrl: '' ,SiteMap:'Jo Koy||ShowId=901&SeasonId=272&EpisodeId=96649||K||ShowId=901&SeasonId=272||Comedians A-Z||ShowId=901', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip14042', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/may_rusty_m1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'When Rusty came out to play, they all switched to football.', Title:'Super Bowl Stand-Up : Ralphie May - Rusty', Format:'FLV', ClipId:'14042', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/', Permalink:'http://watch.thecomedynetwork.ca/comics-on/comics-on/super-bowl-stand-up/#clip118812', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/cn_108_blackdaddy_web5_m1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_5_25/lewis1.jpg', Rating:'', Description:'You can definitely come between Black Daddy and his football.', Title:'Super Bowl Stand-Up : Chocolate News: You Are My Super Bowl', Format:'FLV', ClipId:'118812', BugUrl: '' ,SiteMap:'Super Bowl Stand-Up||ShowId=7088&SeasonId=2131&EpisodeId=68562||Comics on...||ShowId=7088&SeasonId=2131||Comics on...||ShowId=7088', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/comedy-network-specials/canadas-top-youtube-comedians/comedy-presents-canadas-top-youtube-comedians/clip612796#clip612796', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/rivoli_640.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/rivoli_640.jpg', Rating:'', Description:'On January 31 at The Rivoli in Toronto, Comedy hosted an evening with the best YouTube Comedians Canada has to offer. Featuring Andypandy311, AndyWarski, FluffeeTalks, IISuperwomanII, FuriousPete123, and JusReign. ', Title:'Comedy Network Specials : Comedy Presents Canada\'s Top YouTube Comedians : Comedy Presents Canada\'s Top YouTube Comedians', Format:'FLV', ClipId:'612796', BugUrl: '' ,SiteMap:'Comedy Presents Canada\'s Top YouTube Comedians||ShowId=3286&SeasonId=2684&EpisodeId=104113||Canada\'s Top YouTube Comedians||ShowId=3286&SeasonId=2684||Comedy Network Specials||ShowId=3286', IsCanadaOnly:'0'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/', Permalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/#clip611229', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_wardrobe_reveal_640x360.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_wardrobe_reveal_640x360.jpg', Rating:'', Description:'', Title:'Tosh.0 : (Ep. 401) **Season Premiere** : (Ep. 401) Clip 1 of 4', Format:'FLV', ClipId:'611229', BugUrl: '' ,SiteMap:'(Ep. 401) **Season Premiere**||ShowId=3996&SeasonId=2669&EpisodeId=103877||Season 4||ShowId=3996&SeasonId=2669||Tosh.0||ShowId=3996', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/', Permalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/#clip611419', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_wr_european_men_uncensored_640x360.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_wardrobe_reveal_640x360.jpg', Rating:'', Description:'', Title:'Tosh.0 : (Ep. 401) **Season Premiere** : (Ep. 401) Clip 2 of 4', Format:'FLV', ClipId:'611419', BugUrl: '' ,SiteMap:'(Ep. 401) **Season Premiere**||ShowId=3996&SeasonId=2669&EpisodeId=103877||Season 4||ShowId=3996&SeasonId=2669||Tosh.0||ShowId=3996', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/', Permalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/#clip611420', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_clip3.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_wardrobe_reveal_640x360.jpg', Rating:'', Description:'', Title:'Tosh.0 : (Ep. 401) **Season Premiere** : (Ep. 401) Clip 3 of 4', Format:'FLV', ClipId:'611420', BugUrl: '' ,SiteMap:'(Ep. 401) **Season Premiere**||ShowId=3996&SeasonId=2669&EpisodeId=103877||Season 4||ShowId=3996&SeasonId=2669||Tosh.0||ShowId=3996', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/', Permalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/#clip611421', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_while_we_were_gone_640x360.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_wardrobe_reveal_640x360.jpg', Rating:'', Description:'', Title:'Tosh.0 : (Ep. 401) **Season Premiere** : (Ep. 401) Clip 4 of 4', Format:'FLV', ClipId:'611421', BugUrl: '' ,SiteMap:'(Ep. 401) **Season Premiere**||ShowId=3996&SeasonId=2669&EpisodeId=103877||Season 4||ShowId=3996&SeasonId=2669||Tosh.0||ShowId=3996', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/', Permalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/tosh0-ep-401-season-premiere/#clip611486', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_30/tosh_401_tease_640x360.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_wardrobe_reveal_640x360.jpg', Rating:'', Description:'Daniel tries to find out what the author of The Single Girl\'s Guide to Meeting European Men has learned from her experiences.', Title:'Tosh.0 : (Ep. 401) **Season Premiere** : Extended Interview - How to Get European Men - Uncensored', Format:'FLV', ClipId:'611486', BugUrl: '' ,SiteMap:'(Ep. 401) **Season Premiere**||ShowId=3996&SeasonId=2669&EpisodeId=103877||Season 4||ShowId=3996&SeasonId=2669||Tosh.0||ShowId=3996', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/rock0/', Permalink:'http://watch.thecomedynetwork.ca/tosh0/season-4/rock0/#clip611422', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_clip3.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/tosh_401_clip3.jpg', Rating:'', Description:'From the 4th Season Premiere. There\'s a new sherriff in town at the Tosh.0 studios. ', Title:'Tosh.0 : Rock.0 : Rock.0', Format:'FLV', ClipId:'611422', BugUrl: '' ,SiteMap:'Rock.0||ShowId=3996&SeasonId=2669&EpisodeId=103878||Season 4||ShowId=3996&SeasonId=2669||Tosh.0||ShowId=3996', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/key--peele/season-1/key--peele-ep-101-series-premiere/', Permalink:'http://watch.thecomedynetwork.ca/key--peele/season-1/key--peele-ep-101-series-premiere/#clip609978', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_30/key_peele_translate_mlk_640x360.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_30/key_peele_translate_mlk_640x360.jpg', Rating:'', Description:'', Title:'Key & Peele : (Ep. 101) **Series Premiere** : (Ep. 101) Clip 1 of 4', Format:'FLV', ClipId:'609978', BugUrl: '' ,SiteMap:'(Ep. 101) **Series Premiere**||ShowId=13294&SeasonId=2617&EpisodeId=103596||Season 1||ShowId=13294&SeasonId=2617||Key & Peele||ShowId=13294', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/key--peele/season-1/key--peele-ep-101-series-premiere/', Permalink:'http://watch.thecomedynetwork.ca/key--peele/season-1/key--peele-ep-101-series-premiere/#clip609981', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_30/key_peele_translate_mlk_640x360.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_30/key_peele_translate_mlk_640x360.jpg', Rating:'', Description:'', Title:'Key & Peele : (Ep. 101) **Series Premiere** : (Ep. 101) Clip 2 of 4', Format:'FLV', ClipId:'609981', BugUrl: '' ,SiteMap:'(Ep. 101) **Series Premiere**||ShowId=13294&SeasonId=2617&EpisodeId=103596||Season 1||ShowId=13294&SeasonId=2617||Key & Peele||ShowId=13294', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/key--peele/season-1/key--peele-ep-101-series-premiere/', Permalink:'http://watch.thecomedynetwork.ca/key--peele/season-1/key--peele-ep-101-series-premiere/#clip609983', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_30/key_peele_translate_mlk_640x360.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_30/key_peele_translate_mlk_640x360.jpg', Rating:'', Description:'', Title:'Key & Peele : (Ep. 101) **Series Premiere** : (Ep. 101) Clip 3 of 4', Format:'FLV', ClipId:'609983', BugUrl: '' ,SiteMap:'(Ep. 101) **Series Premiere**||ShowId=13294&SeasonId=2617&EpisodeId=103596||Season 1||ShowId=13294&SeasonId=2617||Key & Peele||ShowId=13294', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/key--peele/season-1/key--peele-ep-101-series-premiere/', Permalink:'http://watch.thecomedynetwork.ca/key--peele/season-1/key--peele-ep-101-series-premiere/#clip609985', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_30/key_peele_translate_mlk_640x360.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_30/key_peele_translate_mlk_640x360.jpg', Rating:'', Description:'', Title:'Key & Peele : (Ep. 101) **Series Premiere** : (Ep. 101) Clip 4 of 4', Format:'FLV', ClipId:'609985', BugUrl: '' ,SiteMap:'(Ep. 101) **Series Premiere**||ShowId=13294&SeasonId=2617&EpisodeId=103596||Season 1||ShowId=13294&SeasonId=2617||Key & Peele||ShowId=13294', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/', Permalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/#clip610675', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', Rating:'', Description:'', Title:'Only In America : with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot; : with Larry the Cable Guy (Ep. 110) Clip 1 of 6', Format:'FLV', ClipId:'610675', BugUrl: '' ,SiteMap:'with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot;||ShowId=12740&SeasonId=2530&EpisodeId=103735||Season 1||ShowId=12740&SeasonId=2530||Only In America||ShowId=12740', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/', Permalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/#clip610691', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', Rating:'', Description:'', Title:'Only In America : with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot; : with Larry the Cable Guy (Ep. 110) Clip 2 of 6', Format:'FLV', ClipId:'610691', BugUrl: '' ,SiteMap:'with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot;||ShowId=12740&SeasonId=2530&EpisodeId=103735||Season 1||ShowId=12740&SeasonId=2530||Only In America||ShowId=12740', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/', Permalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/#clip610692', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', Rating:'', Description:'', Title:'Only In America : with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot; : with Larry the Cable Guy (Ep. 110) Clip 3 of 6', Format:'FLV', ClipId:'610692', BugUrl: '' ,SiteMap:'with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot;||ShowId=12740&SeasonId=2530&EpisodeId=103735||Season 1||ShowId=12740&SeasonId=2530||Only In America||ShowId=12740', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/', Permalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/#clip610694', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', Rating:'', Description:'', Title:'Only In America : with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot; : with Larry the Cable Guy (Ep. 110) Clip 4 of 6', Format:'FLV', ClipId:'610694', BugUrl: '' ,SiteMap:'with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot;||ShowId=12740&SeasonId=2530&EpisodeId=103735||Season 1||ShowId=12740&SeasonId=2530||Only In America||ShowId=12740', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/', Permalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/#clip610695', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', Rating:'', Description:'', Title:'Only In America : with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot; : with Larry the Cable Guy (Ep. 110) Clip 5 of 6', Format:'FLV', ClipId:'610695', BugUrl: '' ,SiteMap:'with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot;||ShowId=12740&SeasonId=2530&EpisodeId=103735||Season 1||ShowId=12740&SeasonId=2530||Only In America||ShowId=12740', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/', Permalink:'http://watch.thecomedynetwork.ca/only-in-america/season-1/only-in-america-with-larry-the-cable-guy-ep-110-larry-in-hillbilly-country/#clip610696', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/cableguy_110_logo.jpg', Rating:'', Description:'', Title:'Only In America : with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot; : with Larry the Cable Guy (Ep. 110) Clip 6 of 6', Format:'FLV', ClipId:'610696', BugUrl: '' ,SiteMap:'with Larry the Cable Guy (Ep. 110) &quot;Larry in Hillbilly Country&quot;||ShowId=12740&SeasonId=2530&EpisodeId=103735||Season 1||ShowId=12740&SeasonId=2530||Only In America||ShowId=12740', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-2-2012/#clip610143', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/ds_17055_01_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/ds_17055_01_16x9.jpg', Rating:'', Description:'', Title:'The Daily Show with Jon Stewart : February 2, 2012 : (02/02/11) Clip 1 of 4', Format:'FLV', ClipId:'610143', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=851&SeasonId=211&EpisodeId=103628||Full Episodes||ShowId=851&SeasonId=211||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-2-2012/#clip610145', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/ds_17055_01_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/ds_17055_01_16x9.jpg', Rating:'', Description:'', Title:'The Daily Show with Jon Stewart : February 2, 2012 : (02/02/11) Clip 2 of 4', Format:'FLV', ClipId:'610145', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=851&SeasonId=211&EpisodeId=103628||Full Episodes||ShowId=851&SeasonId=211||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-2-2012/#clip610147', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/ds_17055_01_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/ds_17055_01_16x9.jpg', Rating:'', Description:'', Title:'The Daily Show with Jon Stewart : February 2, 2012 : (02/02/11) Clip 3 of 4', Format:'FLV', ClipId:'610147', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=851&SeasonId=211&EpisodeId=103628||Full Episodes||ShowId=851&SeasonId=211||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-2-2012/#clip610148', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/ds_17055_01_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/ds_17055_01_16x9.jpg', Rating:'', Description:'', Title:'The Daily Show with Jon Stewart : February 2, 2012 : (02/02/11) Clip 4 of 4', Format:'FLV', ClipId:'610148', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=851&SeasonId=211&EpisodeId=103628||Full Episodes||ShowId=851&SeasonId=211||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-2-2012/#clip610120', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/cr_08055_04_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/cr_08055_04_16x9.jpg', Rating:'', Description:'', Title:'The Colbert Report : February 2, 2012 : (02/02/11) Clip 1 of 4', Format:'FLV', ClipId:'610120', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=855&SeasonId=212&EpisodeId=103614||Full Episodes||ShowId=855&SeasonId=212||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-2-2012/#clip610121', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/cr_08055_04_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/cr_08055_04_16x9.jpg', Rating:'', Description:'', Title:'The Colbert Report : February 2, 2012 : (02/02/11) Clip 2 of 4', Format:'FLV', ClipId:'610121', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=855&SeasonId=212&EpisodeId=103614||Full Episodes||ShowId=855&SeasonId=212||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-2-2012/#clip610122', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/cr_08055_04_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/cr_08055_04_16x9.jpg', Rating:'', Description:'', Title:'The Colbert Report : February 2, 2012 : (02/02/11) Clip 3 of 4', Format:'FLV', ClipId:'610122', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=855&SeasonId=212&EpisodeId=103614||Full Episodes||ShowId=855&SeasonId=212||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-2-2012/#clip610123', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/cr_08055_04_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/cr_08055_04_16x9.jpg', Rating:'', Description:'', Title:'The Colbert Report : February 2, 2012 : (02/02/11) Clip 4 of 4', Format:'FLV', ClipId:'610123', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=855&SeasonId=212&EpisodeId=103614||Full Episodes||ShowId=855&SeasonId=212||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/#clip610166', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', Rating:'', Description:'', Title:'Conan : February 2, 2012 : (02/02/12) Clip 1 of 6', Format:'FLV', ClipId:'610166', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103633||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/#clip610168', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', Rating:'', Description:'', Title:'Conan : February 2, 2012 : (02/02/12) Clip 2 of 6', Format:'FLV', ClipId:'610168', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103633||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/#clip610169', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', Rating:'', Description:'', Title:'Conan : February 2, 2012 : (02/02/12) Clip 3 of 6', Format:'FLV', ClipId:'610169', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103633||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/#clip610170', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', Rating:'', Description:'', Title:'Conan : February 2, 2012 : (02/02/12) Clip 4 of 6', Format:'FLV', ClipId:'610170', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103633||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/#clip610171', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', Rating:'', Description:'', Title:'Conan : February 2, 2012 : (02/02/12) Clip 5 of 6', Format:'FLV', ClipId:'610171', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103633||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-2-2012/#clip610172', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_3/conan_krasinski.jpg', Rating:'', Description:'', Title:'Conan : February 2, 2012 : (02/02/12) Clip 6 of 6', Format:'FLV', ClipId:'610172', BugUrl: '' ,SiteMap:'February 2, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103633||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/picnicface/season-1/picnicface-ep-103-affirmative-action/', Permalink:'http://watch.thecomedynetwork.ca/picnicface/season-1/picnicface-ep-103-affirmative-action/#clip544659', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_5/picnicface_104_clip1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_5/picnicface_104_clip4.jpg', Rating:'', Description:'', Title:'Picnicface : (Ep. 103) &quot;Affirmative Action&quot; : (Ep. 103) Clip 1 of 4', Format:'FLV', ClipId:'544659', BugUrl: '' ,SiteMap:'(Ep. 103) &quot;Affirmative Action&quot;||ShowId=11792&SeasonId=2428&EpisodeId=91442||Season 1||ShowId=11792&SeasonId=2428||Picnicface||ShowId=11792', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/picnicface/season-1/picnicface-ep-103-affirmative-action/', Permalink:'http://watch.thecomedynetwork.ca/picnicface/season-1/picnicface-ep-103-affirmative-action/#clip544660', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_5/picnicface_104_clip2.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_5/picnicface_104_clip4.jpg', Rating:'', Description:'', Title:'Picnicface : (Ep. 103) &quot;Affirmative Action&quot; : (Ep. 103) Clip 2 of 4', Format:'FLV', ClipId:'544660', BugUrl: '' ,SiteMap:'(Ep. 103) &quot;Affirmative Action&quot;||ShowId=11792&SeasonId=2428&EpisodeId=91442||Season 1||ShowId=11792&SeasonId=2428||Picnicface||ShowId=11792', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/picnicface/season-1/picnicface-ep-103-affirmative-action/', Permalink:'http://watch.thecomedynetwork.ca/picnicface/season-1/picnicface-ep-103-affirmative-action/#clip544662', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_5/picnicface_104_clip3.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_5/picnicface_104_clip4.jpg', Rating:'', Description:'', Title:'Picnicface : (Ep. 103) &quot;Affirmative Action&quot; : (Ep. 103) Clip 3 of 4', Format:'FLV', ClipId:'544662', BugUrl: '' ,SiteMap:'(Ep. 103) &quot;Affirmative Action&quot;||ShowId=11792&SeasonId=2428&EpisodeId=91442||Season 1||ShowId=11792&SeasonId=2428||Picnicface||ShowId=11792', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/picnicface/season-1/picnicface-ep-103-affirmative-action/', Permalink:'http://watch.thecomedynetwork.ca/picnicface/season-1/picnicface-ep-103-affirmative-action/#clip544664', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_5/picnicface_104_clip4.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_5/picnicface_104_clip4.jpg', Rating:'', Description:'', Title:'Picnicface : (Ep. 103) &quot;Affirmative Action&quot; : (Ep. 103) Clip 4 of 4', Format:'FLV', ClipId:'544664', BugUrl: '' ,SiteMap:'(Ep. 103) &quot;Affirmative Action&quot;||ShowId=11792&SeasonId=2428&EpisodeId=91442||Season 1||ShowId=11792&SeasonId=2428||Picnicface||ShowId=11792', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-1-2012/#clip610138', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_01_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_01_16x9.jpg', Rating:'', Description:'', Title:'The Daily Show with Jon Stewart : February 1, 2012 : (02/01/11) Clip 1 of 4', Format:'FLV', ClipId:'610138', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=851&SeasonId=211&EpisodeId=103627||Full Episodes||ShowId=851&SeasonId=211||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-1-2012/#clip610139', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_01_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_01_16x9.jpg', Rating:'', Description:'', Title:'The Daily Show with Jon Stewart : February 1, 2012 : (02/01/11) Clip 2 of 4', Format:'FLV', ClipId:'610139', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=851&SeasonId=211&EpisodeId=103627||Full Episodes||ShowId=851&SeasonId=211||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-1-2012/#clip610140', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_01_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_01_16x9.jpg', Rating:'', Description:'', Title:'The Daily Show with Jon Stewart : February 1, 2012 : (02/01/11) Clip 3 of 4', Format:'FLV', ClipId:'610140', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=851&SeasonId=211&EpisodeId=103627||Full Episodes||ShowId=851&SeasonId=211||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---february-1-2012/#clip610142', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_01_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_01_16x9.jpg', Rating:'', Description:'', Title:'The Daily Show with Jon Stewart : February 1, 2012 : (02/01/11) Clip 4 of 4', Format:'FLV', ClipId:'610142', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=851&SeasonId=211&EpisodeId=103627||Full Episodes||ShowId=851&SeasonId=211||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-1-2012/#clip610115', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/cr_08054_04_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/cr_08054_04_16x9.jpg', Rating:'', Description:'', Title:'The Colbert Report : February 1, 2012 : (02/01/11) Clip 1 of 4', Format:'FLV', ClipId:'610115', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=855&SeasonId=212&EpisodeId=103613||Full Episodes||ShowId=855&SeasonId=212||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-1-2012/#clip610116', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/cr_08054_04_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/cr_08054_04_16x9.jpg', Rating:'', Description:'', Title:'The Colbert Report : February 1, 2012 : (02/01/11) Clip 2 of 4', Format:'FLV', ClipId:'610116', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=855&SeasonId=212&EpisodeId=103613||Full Episodes||ShowId=855&SeasonId=212||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-1-2012/#clip610117', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/cr_08054_04_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/cr_08054_04_16x9.jpg', Rating:'', Description:'', Title:'The Colbert Report : February 1, 2012 : (02/01/11) Clip 3 of 4', Format:'FLV', ClipId:'610117', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=855&SeasonId=212&EpisodeId=103613||Full Episodes||ShowId=855&SeasonId=212||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/full-episodes/the-colbert-report---february-1-2012/#clip610119', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/cr_08054_04_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/cr_08054_04_16x9.jpg', Rating:'', Description:'', Title:'The Colbert Report : February 1, 2012 : (02/01/11) Clip 4 of 4', Format:'FLV', ClipId:'610119', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=855&SeasonId=212&EpisodeId=103613||Full Episodes||ShowId=855&SeasonId=212||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---brad-pitt-extended-interview/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---brad-pitt-extended-interview/#clip611851', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_exclusive1_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_exclusive1_16x9.jpg', Rating:'', Description:'In this unedited, extended interview, Brad Pitt recounts the challenges of getting his movie &quot;Moneyball&quot; made and discusses his Academy Award nomination.', Title:'The Daily Show with Jon Stewart : Brad Pitt Extended Interview : Brad Pitt Extended Interview Pt. 1', Format:'FLV', ClipId:'611851', BugUrl: '' ,SiteMap:'Brad Pitt Extended Interview||ShowId=851&SeasonId=1328&EpisodeId=103978||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---brad-pitt-extended-interview/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---brad-pitt-extended-interview/#clip611852', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_exclusive2_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/ds_17054_exclusive1_16x9.jpg', Rating:'', Description:'Brad Pitt discusses his non-profit organization, Make It Right, and its commitment to building sustainable New Orleans homes, in this unedited, extended interview.', Title:'The Daily Show with Jon Stewart : Brad Pitt Extended Interview : Brad Pitt Extended Interview Pt. 2', Format:'FLV', ClipId:'611852', BugUrl: '' ,SiteMap:'Brad Pitt Extended Interview||ShowId=851&SeasonId=1328&EpisodeId=103978||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/#clip610174', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', Rating:'', Description:'', Title:'Conan : February 1, 2012 : (02/01/12) Clip 1 of 6', Format:'FLV', ClipId:'610174', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103632||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/#clip610175', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', Rating:'', Description:'', Title:'Conan : February 1, 2012 : (02/01/12) Clip 2 of 6', Format:'FLV', ClipId:'610175', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103632||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/#clip610177', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', Rating:'', Description:'', Title:'Conan : February 1, 2012 : (02/01/12) Clip 3 of 6', Format:'FLV', ClipId:'610177', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103632||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/#clip610179', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', Rating:'', Description:'', Title:'Conan : February 1, 2012 : (02/01/12) Clip 4 of 6', Format:'FLV', ClipId:'610179', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103632||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/#clip610181', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', Rating:'', Description:'', Title:'Conan : February 1, 2012 : (02/01/12) Clip 5 of 6', Format:'FLV', ClipId:'610181', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103632||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/', Permalink:'http://watch.thecomedynetwork.ca/conan/full-episodes/conan---february-1-2012/#clip610182', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_2/0207_guest_1_pt_1.jpg', Rating:'', Description:'', Title:'Conan : February 1, 2012 : (02/01/12) Clip 6 of 6', Format:'FLV', ClipId:'610182', BugUrl: '' ,SiteMap:'February 1, 2012||ShowId=8481&SeasonId=1909&EpisodeId=103632||Full Episodes||ShowId=8481&SeasonId=1909||Conan||ShowId=8481', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comedy-now/season-14/comedy-now---patrick-maliha/', Permalink:'http://watch.thecomedynetwork.ca/comedians-a-z/m/patrick-maliha/clip503661#clip503661', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', Rating:'', Description:'', Title:'Comedians A-Z : Patrick Maliha : Comedy Now - Patrick Maliha - Clip 1 of 6', Format:'FLV', ClipId:'503661', BugUrl: '' ,SiteMap:'Patrick Maliha||ShowId=901&SeasonId=274&EpisodeId=96626||M||ShowId=901&SeasonId=274||Comedians A-Z||ShowId=901', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comedy-now/season-14/comedy-now---patrick-maliha/', Permalink:'http://watch.thecomedynetwork.ca/comedians-a-z/m/patrick-maliha/clip503663#clip503663', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', Rating:'', Description:'', Title:'Comedians A-Z : Patrick Maliha : Comedy Now - Patrick Maliha - Clip 2 of 6', Format:'FLV', ClipId:'503663', BugUrl: '' ,SiteMap:'Patrick Maliha||ShowId=901&SeasonId=274&EpisodeId=96626||M||ShowId=901&SeasonId=274||Comedians A-Z||ShowId=901', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comedy-now/season-14/comedy-now---patrick-maliha/', Permalink:'http://watch.thecomedynetwork.ca/comedians-a-z/m/patrick-maliha/clip503664#clip503664', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', Rating:'', Description:'', Title:'Comedians A-Z : Patrick Maliha : Comedy Now - Patrick Maliha - Clip 3 of 6', Format:'FLV', ClipId:'503664', BugUrl: '' ,SiteMap:'Patrick Maliha||ShowId=901&SeasonId=274&EpisodeId=96626||M||ShowId=901&SeasonId=274||Comedians A-Z||ShowId=901', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comedy-now/season-14/comedy-now---patrick-maliha/', Permalink:'http://watch.thecomedynetwork.ca/comedians-a-z/m/patrick-maliha/clip503666#clip503666', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', Rating:'', Description:'', Title:'Comedians A-Z : Patrick Maliha : Comedy Now - Patrick Maliha - Clip 4 of 6', Format:'FLV', ClipId:'503666', BugUrl: '' ,SiteMap:'Patrick Maliha||ShowId=901&SeasonId=274&EpisodeId=96626||M||ShowId=901&SeasonId=274||Comedians A-Z||ShowId=901', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comedy-now/season-14/comedy-now---patrick-maliha/', Permalink:'http://watch.thecomedynetwork.ca/comedians-a-z/m/patrick-maliha/clip503667#clip503667', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', Rating:'', Description:'', Title:'Comedians A-Z : Patrick Maliha : Comedy Now - Patrick Maliha - Clip 5 of 6', Format:'FLV', ClipId:'503667', BugUrl: '' ,SiteMap:'Patrick Maliha||ShowId=901&SeasonId=274&EpisodeId=96626||M||ShowId=901&SeasonId=274||Comedians A-Z||ShowId=901', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/comedy-now/season-14/comedy-now---patrick-maliha/', Permalink:'http://watch.thecomedynetwork.ca/comedians-a-z/m/patrick-maliha/clip503669#clip503669', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_7_20/comedynow_patrickmalihai.jpg', Rating:'', Description:'', Title:'Comedians A-Z : Patrick Maliha : Comedy Now - Patrick Maliha - Clip 6 of 6', Format:'FLV', ClipId:'503669', BugUrl: '' ,SiteMap:'Patrick Maliha||ShowId=901&SeasonId=274&EpisodeId=96626||M||ShowId=901&SeasonId=274||Comedians A-Z||ShowId=901', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---ads/clip604477#clip604477', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Besides his t\'s, what else is Stephen Colbert silent about?', Title:'Indecision 2012 : Colbert Super PAC - Ads : Colbert Super PAC Ad - Modern Stage Combat', Format:'FLV', ClipId:'604477', BugUrl: '' ,SiteMap:'Colbert Super PAC - Ads||ShowId=13269&SeasonId=2662&EpisodeId=102974||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---ads/clip603746#clip603746', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_19/cr_exclusive_superpac_gingrich_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Americans for a Better Tomorrow, Tomorrow believes that we all deserve a clean campaign.', Title:'Indecision 2012 : Colbert Super PAC - Ads : Colbert Super PAC Ad - Double Negative', Format:'FLV', ClipId:'603746', BugUrl: '' ,SiteMap:'Colbert Super PAC - Ads||ShowId=13269&SeasonId=2662&EpisodeId=102974||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---ads/clip602982#clip602982', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_18/cr_exclusive_superpac_cain_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'With less than a week left before the Republican primary, which candidate should South Carolina turn to?', Title:'Indecision 2012 : Colbert Super PAC - Ads : Colbert Super PAC Ad - Not Abel', Format:'FLV', ClipId:'602982', BugUrl: '' ,SiteMap:'Colbert Super PAC - Ads||ShowId=13269&SeasonId=2662&EpisodeId=102974||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---ads/clip601501#clip601501', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_16/cr_exclusive_superpac_the_ripper_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'If corporations are people, then Mitt Romney is Mitt the Ripper.', Title:'Indecision 2012 : Colbert Super PAC - Ads : Colbert Super PAC Ad - Attack In B Minor For Strings', Format:'FLV', ClipId:'601501', BugUrl: '' ,SiteMap:'Colbert Super PAC - Ads||ShowId=13269&SeasonId=2662&EpisodeId=102974||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/best-of/the-colbert-report---colbert-super-pac-ads/clip433634#clip433634', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Stephen shows support for Tim Pawlenty\'s courage to stand next to Scott Walker with a patriotic message.', Title:'The Colbert Report : Colbert Super PAC Ads : Colbert PAC Ad', Format:'FLV', ClipId:'433634', BugUrl: '' ,SiteMap:'Colbert Super PAC Ads||ShowId=855&SeasonId=352&EpisodeId=86672||Best Of...||ShowId=855&SeasonId=352||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---origins/clip451150#clip451150', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_24/origin3.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Stephen says goodbye to his dream of starting a Colbert PAC after receiving a letter from Viacom.', Title:'Indecision 2012 : Colbert Super PAC - Origins : Viacom Ruins Stephen\'s PAC Dream', Format:'FLV', ClipId:'451150', BugUrl: '' ,SiteMap:'Colbert Super PAC - Origins||ShowId=13269&SeasonId=2662&EpisodeId=102965||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---origins/clip451149#clip451149', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_24/origin2.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Jay the Intern\'s pony is rested, watered and ready to take Stephen\'s super PAC forms to Washington, D.C.', Title:'Indecision 2012 : Colbert Super PAC - Origins : Colbert Super PAC - Trevor Potter', Format:'FLV', ClipId:'451149', BugUrl: '' ,SiteMap:'Colbert Super PAC - Origins||ShowId=13269&SeasonId=2662&EpisodeId=102965||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---to-the-people/clip476877#clip476877', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_26/ttp1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Stephen addresses 500 white people on the steps of the FEC after dropping off his legal request to form a super PAC.', Title:'Indecision 2012 : Colbert Super PAC - To The People! : Stephen Files Super PAC Request', Format:'FLV', ClipId:'476877', BugUrl: '' ,SiteMap:'Colbert Super PAC - To The People!||ShowId=13269&SeasonId=2662&EpisodeId=102971||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---positions/clip495850#clip495850', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_26/p3.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'If the FEC allows his Super PAC, Stephen promises to make ads that are even less responsible than Turn Right USA\'s racist, misogynistic ads.', Title:'Indecision 2012 : Colbert Super PAC - Positions : Colbert Super PAC - Irresponsible Advertising', Format:'FLV', ClipId:'495850', BugUrl: '' ,SiteMap:'Colbert Super PAC - Positions||ShowId=13269&SeasonId=2662&EpisodeId=102969||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---gaining-momentum/clip505120#clip505120', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_24/gm3.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'After a lengthy hearing, heavily peppered with arcane bureaucratic jargon, the FEC allows Stephen to form his Super PAC.', Title:'Indecision 2012 : Colbert Super PAC - Gaining Momentum : Colbert Super PAC - I Can Haz Super PAC!', Format:'FLV', ClipId:'505120', BugUrl: '' ,SiteMap:'Colbert Super PAC - Gaining Momentum||ShowId=13269&SeasonId=2662&EpisodeId=102968||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---to-the-people/clip505121#clip505121', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_26/ttp2.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'After filing his Super PAC papers, Stephen wades into the crowd with a credit card swiper attached to his iPad like Washington crossing the Delaware to ask it for money.', Title:'Indecision 2012 : Colbert Super PAC - To The People! : Colbert Super PAC - Stephen Addresses Colbert Super Nation', Format:'FLV', ClipId:'505121', BugUrl: '' ,SiteMap:'Colbert Super PAC - To The People!||ShowId=13269&SeasonId=2662&EpisodeId=102971||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---money-money-money/clip505163#clip505163', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_26/mmm3.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'To seduce the prudent, Stephen puts the names of people who have donated to Colbert Super PAC on a cash crawl.', Title:'Indecision 2012 : Colbert Super PAC - Money, Money, Money : Colbert Super PAC - Cash Crawl', Format:'FLV', ClipId:'505163', BugUrl: '' ,SiteMap:'Colbert Super PAC - Money, Money, Money||ShowId=13269&SeasonId=2662&EpisodeId=102970||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---money-money-money/clip505162#clip505162', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_26/mmm2.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Sean Parnell supports Colbert Super PAC\'s plan to buy an elephant, but Sheila Krumholz wants to shine a light on the taint of private money.', Title:'Indecision 2012 : Colbert Super PAC - Money, Money, Money : Colbert Super PAC - Campaign Finance', Format:'FLV', ClipId:'505162', BugUrl: '' ,SiteMap:'Colbert Super PAC - Money, Money, Money||ShowId=13269&SeasonId=2662&EpisodeId=102970||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---positions/clip517504#clip517504', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_26/p4.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Little Charlie and Grace\'s mom won\'t let them have a Colbert Super PAC lemonade stand until Stephen can tell them what his Super PAC stands for.', Title:'Indecision 2012 : Colbert Super PAC - Positions : Colbert Super PAC - For the Children', Format:'FLV', ClipId:'517504', BugUrl: '' ,SiteMap:'Colbert Super PAC - Positions||ShowId=13269&SeasonId=2662&EpisodeId=102969||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---money-money-money/clip517546#clip517546', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_26/mmm4.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Stephen calls on the Colbert Nation to send in more suggestions for the direction of his Super PAC, in addition to more money.', Title:'Indecision 2012 : Colbert Super PAC - Money, Money, Money : Colbert Super PAC - The Heroes Respond', Format:'FLV', ClipId:'517546', BugUrl: '' ,SiteMap:'Colbert Super PAC - Money, Money, Money||ShowId=13269&SeasonId=2662&EpisodeId=102970||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---gaining-momentum/clip517555#clip517555', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_24/gm4.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Stephen already licked the Rick Perry for President donut, so all the other Super PAC bitches better back off.', Title:'Indecision 2012 : Colbert Super PAC - Gaining Momentum : Colbert Super PAC - Rick Perry for President', Format:'FLV', ClipId:'517555', BugUrl: '' ,SiteMap:'Colbert Super PAC - Gaining Momentum||ShowId=13269&SeasonId=2662&EpisodeId=102968||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---ads/clip517573#clip517573', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Americans for a Better Tomorrow, Tomorrow encourage Iowans to write in Rick Parry, in an ad that aired as part of this clip.', Title:'Indecision 2012 : Colbert Super PAC - Ads : Super PAC Ad - Episode IV: A New Hope', Format:'FLV', ClipId:'517573', BugUrl: '' ,SiteMap:'Colbert Super PAC - Ads||ShowId=13269&SeasonId=2662&EpisodeId=102974||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---ads/clip517576#clip517576', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Americans for a Better Tomorrow, Tomorrow gives Iowans the cornography they deserve, in an ad that aired as part of this clip.', Title:'Indecision 2012 : Colbert Super PAC - Ads : Super PAC Ad - Behind The Green Corn', Format:'FLV', ClipId:'517576', BugUrl: '' ,SiteMap:'Colbert Super PAC - Ads||ShowId=13269&SeasonId=2662&EpisodeId=102974||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/best-of/the-colbert-report---colbert-super-pac-ads/clip517577#clip517577', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'The fat cat media elites in Des Moines think they can sit in their ivory corn silos and play puppet master with national politics.', Title:'The Colbert Report : Colbert Super PAC Ads : Colbert Super PAC - Confused by Rick Parry with an &quot;A&quot; for America', Format:'FLV', ClipId:'517577', BugUrl: '' ,SiteMap:'Colbert Super PAC Ads||ShowId=855&SeasonId=352&EpisodeId=86672||Best Of...||ShowId=855&SeasonId=352||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/best-of/the-colbert-report---colbert-super-pac-ads/clip517584#clip517584', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Michele Bachmann gets a commanding 80% of the votes she paid for at the Iowa straw poll, and &quot;Rick Parry&quot; receives at least 718 write-in votes.', Title:'The Colbert Report : Colbert Super PAC Ads : Colbert Super PAC - Iowa Straw Poll Results', Format:'FLV', ClipId:'517584', BugUrl: '' ,SiteMap:'Colbert Super PAC Ads||ShowId=855&SeasonId=352&EpisodeId=86672||Best Of...||ShowId=855&SeasonId=352||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---positions/clip518702#clip518702', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_26/p5.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'In politics, messaging is everything, so Stephen turns to the Persuadulux 6000 to generate a Colbert Nation word cloud from Super PAC donor write-ins.', Title:'Indecision 2012 : Colbert Super PAC - Positions : Colbert Super PAC - Persuadulux 6000', Format:'FLV', ClipId:'518702', BugUrl: '' ,SiteMap:'Colbert Super PAC - Positions||ShowId=13269&SeasonId=2662&EpisodeId=102969||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---gaining-momentum/clip518184#clip518184', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_24/gm5.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Frank Luntz will help Stephen create a Colbert Super PAC ad that works for Democrats and Republicans and scores with the South and the North.', Title:'Indecision 2012 : Colbert Super PAC - Gaining Momentum : Colbert Super PAC - Frank Luntz Commits to the PAC', Format:'FLV', ClipId:'518184', BugUrl: '' ,SiteMap:'Colbert Super PAC - Gaining Momentum||ShowId=13269&SeasonId=2662&EpisodeId=102968||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/indecision-2012/colbert-super-pac/colbert-super-pac---gaining-momentum/clip518709#clip518709', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_24/gm6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Colbert Super PAC beats back wannabe super PACs to become Rick Perry\'s official unofficial, non-connected, independent expenditure, all-you-can-eat money trough.', Title:'Indecision 2012 : Colbert Super PAC - Gaining Momentum : Colbert Super PAC - Rick Perry\'s Treasurer', Format:'FLV', ClipId:'518709', BugUrl: '' ,SiteMap:'Colbert Super PAC - Gaining Momentum||ShowId=13269&SeasonId=2662&EpisodeId=102968||Colbert Super PAC||ShowId=13269&SeasonId=2662||Indecision 2012||ShowId=13269', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/best-of/the-colbert-report---colbert-super-pac-ads/clip519509#clip519509', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'&quot;Rick Parry&quot; might be the only write-in candidate to rank in the top 10 in the Ames straw poll, but the Iowa GOP refuses to release the results for public scrutiny.', Title:'The Colbert Report : Colbert Super PAC Ads : Colbert Super PAC - PARRY-with-an-A-GATE! - Day 6 - We May Have Did It!', Format:'FLV', ClipId:'519509', BugUrl: '' ,SiteMap:'Colbert Super PAC Ads||ShowId=855&SeasonId=352&EpisodeId=86672||Best Of...||ShowId=855&SeasonId=352||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-colbert-report/best-of/the-colbert-report---colbert-super-pac-ads/clip519507#clip519507', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/cr_exclusive_superpac_attack_colbert_v6.jpg', Rating:'', Description:'Stephen goes live via satellite to The Colbert Report\'s local affiliate in Des Moines, WOI, for the latest on the &quot;Rick Parry&quot; write-in scandal.', Title:'The Colbert Report : Colbert Super PAC Ads : Colbert Super PAC - PARRY-with-an-A-GATE! - Day 6 - WOI in Des Moines Reports', Format:'FLV', ClipId:'519507', BugUrl: '' ,SiteMap:'Colbert Super PAC Ads||ShowId=855&SeasonId=352&EpisodeId=86672||Best Of...||ShowId=855&SeasonId=352||The Colbert Report||ShowId=855', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---the-great-chase-exclusive/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/full-episodes/the-daily-show-with-jon-stewart---the-great-chase-exclusive/#clip610418', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/ds_17052_exclusive3_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/ds_17052_exclusive3_16x9.jpg', Rating:'', Description:'Stephen Colbert relentlessly pursues Jon through New York City to get his super PAC back.', Title:'The Daily Show with Jon Stewart : The Great Chase **Exclusive** : Exclusive - Colbert Super PAC - The Great Chase', Format:'FLV', ClipId:'610418', BugUrl: '' ,SiteMap:'The Great Chase **Exclusive**||ShowId=851&SeasonId=211&EpisodeId=103689||Full Episodes||ShowId=851&SeasonId=211||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip582238#clip582238', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'Jonah Hill enjoys disappointing the fans of bigger celebrities and checks into hotels as Tom Hanks just to let the hotel staff down.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Jonah Hill', Format:'FLV', ClipId:'582238', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip578200#clip578200', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'Martin Scorsese talks about his daughter\'s influence on his movies and the effects of leading an isolated life as a young boy.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Martin Scorsese', Format:'FLV', ClipId:'578200', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip476932#clip476932', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'Kristen Wiig co-wrote &quot;Bridesmaids&quot; at her friend\'s house with chips, carrots and a how-to book.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Kristen Wiig', Format:'FLV', ClipId:'476932', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip444724#clip444724', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'Billy Crystal worries about his first tweet and recalls Rob Reiner having an orgasm in front of his mother.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Billy Crystal', Format:'FLV', ClipId:'444724', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip45426#clip45426', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'The director and star of &quot;Leatherheads&quot; contemplates selling out and shares stories of James Carville\'s craziness.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Daily Show: George Clooney', Format:'FLV', ClipId:'45426', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip388588#clip388588', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'Michelle Williams praises Harvey Weinstein\'s full frontal assault on the ratings board and wins an award she\'s never heard of.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Michelle Williams', Format:'FLV', ClipId:'388588', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip19950#clip19950', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'The Academy Award-winning actress introduces one of her latest films, &quot;Lions for Lambs.&quot;', Title:'The Daily Show with Jon Stewart : Oscar Edition : Daily Show: Meryl Streep', Format:'FLV', ClipId:'19950', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip14957#clip14957', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'The handsome bastard talks about his new movie Good Night and Good Luck.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Daily Show: George Clooney', Format:'FLV', ClipId:'14957', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip14801#clip14801', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'George Clooney hasn\'t seen Jon since they were in bed together in Upstate New York.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Daily Show: George Clooney Pt. 1', Format:'FLV', ClipId:'14801', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip14802#clip14802', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'Jon is flattered that George Clooney thinks enough of him to make a gay innuendo.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Daily Show: George Clooney Pt. 2', Format:'FLV', ClipId:'14802', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip313092#clip313092', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'Jonah Hill recalls the awkward joke he made while crammed in a Las Vegas elevator with Diddy and Jermaine Dupri.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Jonah Hill', Format:'FLV', ClipId:'313092', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip275933#clip275933', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'The big moment at the Oscars occurred when Roger Ross Williams was interrupted while accepting his award.', Title:'The Daily Show with Jon Stewart : Oscar Edition : The Oscars Big Moment', Format:'FLV', ClipId:'275933', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/best-of/the-daily-show-with-jon-stewart-oscar-edition/clip144015#clip144015', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/comedy/comedy.ca/ImageNotAvailable.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_1_30/dsho-14016-ep.clip01.jpg', Rating:'', Description:'The Academy Awards give actors the opportunity to do what they do best: compliment each other.', Title:'The Daily Show with Jon Stewart : Oscar Edition : Daily Show: Annual Academy Awards', Format:'FLV', ClipId:'144015', BugUrl: '' ,SiteMap:'Oscar Edition||ShowId=851&SeasonId=463&EpisodeId=103193||Best Of....||ShowId=851&SeasonId=463||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---jonathan-macey-extended-interview/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---jonathan-macey-extended-interview/#clip611140', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/ds_17053_exclusive1_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/ds_17053_exclusive1_16x9.jpg', Rating:'', Description:'In this unedited, extended interview, Jonathan Macey explains why untrained investors should avoid private equity.', Title:'The Daily Show with Jon Stewart : Jonathan Macey Extended Interview : Jonathan Macey Extended Interview Pt. 1', Format:'FLV', ClipId:'611140', BugUrl: '' ,SiteMap:'Jonathan Macey Extended Interview||ShowId=851&SeasonId=1328&EpisodeId=103833||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---jonathan-macey-extended-interview/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---jonathan-macey-extended-interview/#clip611141', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/ds_17053_exclusive2_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/ds_17053_exclusive1_16x9.jpg', Rating:'', Description:'Jonathan Macey claims that the unemployment rate would be worse without private equity firms taking over failing companies, in this unedited, extended interview.', Title:'The Daily Show with Jon Stewart : Jonathan Macey Extended Interview : Jonathan Macey Extended Interview Pt. 2', Format:'FLV', ClipId:'611141', BugUrl: '' ,SiteMap:'Jonathan Macey Extended Interview||ShowId=851&SeasonId=1328&EpisodeId=103833||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---jonathan-macey-extended-interview/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---jonathan-macey-extended-interview/#clip611142', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/ds_17053_exclusive3_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_2_1/ds_17053_exclusive1_16x9.jpg', Rating:'', Description:'In this unedited, extended interview, Jonathan Macey examines the influence of America\'s corrupt political culture on its financial system.', Title:'The Daily Show with Jon Stewart : Jonathan Macey Extended Interview : Jonathan Macey Extended Interview Pt. 3', Format:'FLV', ClipId:'611142', BugUrl: '' ,SiteMap:'Jonathan Macey Extended Interview||ShowId=851&SeasonId=1328&EpisodeId=103833||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/#clip610416', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/ds_17052_exclusive1_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/ds_17052_exclusive1_16x9.jpg', Rating:'', Description:'In this unedited, extended interview, Lou Dobbs relishes the compelling, galvanizing and entertaining nature of the 2012 Republican primary.', Title:'The Daily Show with Jon Stewart : Lou Dobbs Extended Interview II : Lou Dobbs Extended Interview Pt. 1', Format:'FLV', ClipId:'610416', BugUrl: '' ,SiteMap:'Lou Dobbs Extended Interview II||ShowId=851&SeasonId=1328&EpisodeId=103688||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/#clip610417', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/ds_17052_exclusive2_16x9.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/ds_17052_exclusive1_16x9.jpg', Rating:'', Description:'Lou Dobbs questions Occupy Wall Street\'s validity as a movement and discusses electoral redistricting in this unedited, extended interview.', Title:'The Daily Show with Jon Stewart : Lou Dobbs Extended Interview II : Lou Dobbs Extended Interview Pt. 2', Format:'FLV', ClipId:'610417', BugUrl: '' ,SiteMap:'Lou Dobbs Extended Interview II||ShowId=851&SeasonId=1328&EpisodeId=103688||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/#clip237004', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_11_19/loudobbs2.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/ds_17052_exclusive1_16x9.jpg', Rating:'', Description:'Lou Dobbs discusses the mutual decision that was made for him to leave CNN in this complete, unedited interview.', Title:'The Daily Show with Jon Stewart : Lou Dobbs Extended Interview II : Daily Show: Exclusive - Lou Dobbs Extended Interview Pt. 1', Format:'FLV', ClipId:'237004', BugUrl: '' ,SiteMap:'Lou Dobbs Extended Interview II||ShowId=851&SeasonId=1328&EpisodeId=103688||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/#clip237005', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_11_19/loudobbs1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/ds_17052_exclusive1_16x9.jpg', Rating:'', Description:'In this complete, unedited interview, Lou Dobbs wants to motivate Americans in the center who are no longer represented in government.', Title:'The Daily Show with Jon Stewart : Lou Dobbs Extended Interview II : Daily Show: Exclusive - Lou Dobbs Extended Interview Pt. 2', Format:'FLV', ClipId:'237005', BugUrl: '' ,SiteMap:'Lou Dobbs Extended Interview II||ShowId=851&SeasonId=1328&EpisodeId=103688||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/', Permalink:'http://watch.thecomedynetwork.ca/the-daily-show-with-jon-stewart/exclusive-interviews/the-daily-show-with-jon-stewart---lou-dobbs-extended-interview-ii/#clip237006', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2009_11_19/dsho-14149-ep.clip03.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_31/ds_17052_exclusive1_16x9.jpg', Rating:'', Description:'Lou Dobbs believes America is fragile with limited resources in this complete, unedited interview.', Title:'The Daily Show with Jon Stewart : Lou Dobbs Extended Interview II : Daily Show: Exclusive - Lou Dobbs Extended Interview Pt. 3', Format:'FLV', ClipId:'237006', BugUrl: '' ,SiteMap:'Lou Dobbs Extended Interview II||ShowId=851&SeasonId=1328&EpisodeId=103688||Exclusive Interviews||ShowId=851&SeasonId=1328||The Daily Show with Jon Stewart||ShowId=851', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/whitney/season-1/whitney-ep-113-codependance-day/', Permalink:'http://watch.thecomedynetwork.ca/whitney/season-1/whitney-ep-113-codependance-day/#clip608542', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_27/whitney_codependance_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_27/whitney_codependance_logo.jpg', Rating:'', Description:'', Title:'Whitney : (Ep. 113) &quot;Codependance Day&quot; : (Ep. 113) Clip 1 of 4', Format:'FLV', ClipId:'608542', BugUrl: '' ,SiteMap:'(Ep. 113) &quot;Codependance Day&quot;||ShowId=12315&SeasonId=2493&EpisodeId=103324||Season 1||ShowId=12315&SeasonId=2493||Whitney||ShowId=12315', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/whitney/season-1/whitney-ep-113-codependance-day/', Permalink:'http://watch.thecomedynetwork.ca/whitney/season-1/whitney-ep-113-codependance-day/#clip608543', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_27/whitney_codependance_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_27/whitney_codependance_logo.jpg', Rating:'', Description:'', Title:'Whitney : (Ep. 113) &quot;Codependance Day&quot; : (Ep. 113) Clip 2 of 4', Format:'FLV', ClipId:'608543', BugUrl: '' ,SiteMap:'(Ep. 113) &quot;Codependance Day&quot;||ShowId=12315&SeasonId=2493&EpisodeId=103324||Season 1||ShowId=12315&SeasonId=2493||Whitney||ShowId=12315', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/whitney/season-1/whitney-ep-113-codependance-day/', Permalink:'http://watch.thecomedynetwork.ca/whitney/season-1/whitney-ep-113-codependance-day/#clip608544', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_27/whitney_codependance_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_27/whitney_codependance_logo.jpg', Rating:'', Description:'', Title:'Whitney : (Ep. 113) &quot;Codependance Day&quot; : (Ep. 113) Clip 3 of 4', Format:'FLV', ClipId:'608544', BugUrl: '' ,SiteMap:'(Ep. 113) &quot;Codependance Day&quot;||ShowId=12315&SeasonId=2493&EpisodeId=103324||Season 1||ShowId=12315&SeasonId=2493||Whitney||ShowId=12315', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/whitney/season-1/whitney-ep-113-codependance-day/', Permalink:'http://watch.thecomedynetwork.ca/whitney/season-1/whitney-ep-113-codependance-day/#clip608546', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_27/whitney_codependance_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_27/whitney_codependance_logo.jpg', Rating:'', Description:'', Title:'Whitney : (Ep. 113) &quot;Codependance Day&quot; : (Ep. 113) Clip 4 of 4', Format:'FLV', ClipId:'608546', BugUrl: '' ,SiteMap:'(Ep. 113) &quot;Codependance Day&quot;||ShowId=12315&SeasonId=2493&EpisodeId=103324||Season 1||ShowId=12315&SeasonId=2493||Whitney||ShowId=12315', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/up-all-night/season-1/up-all-night-ep-113-rivals/', Permalink:'http://watch.thecomedynetwork.ca/up-all-night/season-1/up-all-night-ep-113-rivals/#clip604500', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/upallnight_rivals.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/upallnight_rivals.jpg', Rating:'', Description:'', Title:'Up All Night : (Ep. 113) &quot;Rivals&quot; : (Ep. 113) Clip 1 of 4', Format:'FLV', ClipId:'604500', BugUrl: '' ,SiteMap:'(Ep. 113) &quot;Rivals&quot;||ShowId=12137&SeasonId=2476&EpisodeId=102591||Season 1||ShowId=12137&SeasonId=2476||Up All Night||ShowId=12137', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/up-all-night/season-1/up-all-night-ep-113-rivals/', Permalink:'http://watch.thecomedynetwork.ca/up-all-night/season-1/up-all-night-ep-113-rivals/#clip604502', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/upallnight_rivals.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/upallnight_rivals.jpg', Rating:'', Description:'', Title:'Up All Night : (Ep. 113) &quot;Rivals&quot; : (Ep. 113) Clip 2 of 4', Format:'FLV', ClipId:'604502', BugUrl: '' ,SiteMap:'(Ep. 113) &quot;Rivals&quot;||ShowId=12137&SeasonId=2476&EpisodeId=102591||Season 1||ShowId=12137&SeasonId=2476||Up All Night||ShowId=12137', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/up-all-night/season-1/up-all-night-ep-113-rivals/', Permalink:'http://watch.thecomedynetwork.ca/up-all-night/season-1/up-all-night-ep-113-rivals/#clip604503', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/upallnight_rivals.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/upallnight_rivals.jpg', Rating:'', Description:'', Title:'Up All Night : (Ep. 113) &quot;Rivals&quot; : (Ep. 113) Clip 3 of 4', Format:'FLV', ClipId:'604503', BugUrl: '' ,SiteMap:'(Ep. 113) &quot;Rivals&quot;||ShowId=12137&SeasonId=2476&EpisodeId=102591||Season 1||ShowId=12137&SeasonId=2476||Up All Night||ShowId=12137', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/up-all-night/season-1/up-all-night-ep-113-rivals/', Permalink:'http://watch.thecomedynetwork.ca/up-all-night/season-1/up-all-night-ep-113-rivals/#clip604509', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/upallnight_rivals.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2012_1_20/upallnight_rivals.jpg', Rating:'', Description:'', Title:'Up All Night : (Ep. 113) &quot;Rivals&quot; : (Ep. 113) Clip 4 of 4', Format:'FLV', ClipId:'604509', BugUrl: '' ,SiteMap:'(Ep. 113) &quot;Rivals&quot;||ShowId=12137&SeasonId=2476&EpisodeId=102591||Season 1||ShowId=12137&SeasonId=2476||Up All Night||ShowId=12137', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-104/', Permalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-104/#clip551971', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_18/cocktales_104_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_18/cocktales_104_logo.jpg', Rating:'', Description:'', Title:'Cocktales : (Ep. 104) : Clip 1 of 3', Format:'FLV', ClipId:'551971', BugUrl: 'http://image01.ctvdigital.com/images/local/media/watermarks/Comedy-Bug-256x144-v2-0.png' ,SiteMap:'(Ep. 104)||ShowId=12263&SeasonId=2491&EpisodeId=92743||Season 1||ShowId=12263&SeasonId=2491||Cocktales||ShowId=12263', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-104/', Permalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-104/#clip551975', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_18/cocktales_104_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_18/cocktales_104_logo.jpg', Rating:'', Description:'', Title:'Cocktales : (Ep. 104) : Clip 2 of 3', Format:'FLV', ClipId:'551975', BugUrl: 'http://image01.ctvdigital.com/images/local/media/watermarks/Comedy-Bug-256x144-v2-0.png' ,SiteMap:'(Ep. 104)||ShowId=12263&SeasonId=2491&EpisodeId=92743||Season 1||ShowId=12263&SeasonId=2491||Cocktales||ShowId=12263', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-104/', Permalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-104/#clip551976', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_18/cocktales_104_logo.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_18/cocktales_104_logo.jpg', Rating:'', Description:'', Title:'Cocktales : (Ep. 104) : Clip 3 of 3', Format:'FLV', ClipId:'551976', BugUrl: 'http://image01.ctvdigital.com/images/local/media/watermarks/Comedy-Bug-256x144-v2-0.png' ,SiteMap:'(Ep. 104)||ShowId=12263&SeasonId=2491&EpisodeId=92743||Season 1||ShowId=12263&SeasonId=2491||Cocktales||ShowId=12263', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-105/', Permalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-105/#clip555733', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_25/cocktales_105.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_25/cocktales_105.jpg', Rating:'', Description:'', Title:'Cocktales : (Ep. 105) : Clip 1 of 3', Format:'FLV', ClipId:'555733', BugUrl: '' ,SiteMap:'(Ep. 105)||ShowId=12263&SeasonId=2491&EpisodeId=93443||Season 1||ShowId=12263&SeasonId=2491||Cocktales||ShowId=12263', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-105/', Permalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-105/#clip555744', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_25/cocktales_105.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_25/cocktales_105.jpg', Rating:'', Description:'', Title:'Cocktales : (Ep. 105) : Clip 2 of 3', Format:'FLV', ClipId:'555744', BugUrl: '' ,SiteMap:'(Ep. 105)||ShowId=12263&SeasonId=2491&EpisodeId=93443||Season 1||ShowId=12263&SeasonId=2491||Cocktales||ShowId=12263', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-105/', Permalink:'http://watch.thecomedynetwork.ca/cocktales/season-1/cocktales-ep-105/#clip555745', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_25/cocktales_105.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_10_25/cocktales_105.jpg', Rating:'', Description:'', Title:'Cocktales : (Ep. 105) : Clip 3 of 3', Format:'FLV', ClipId:'555745', BugUrl: '' ,SiteMap:'(Ep. 105)||ShowId=12263&SeasonId=2491&EpisodeId=93443||Season 1||ShowId=12263&SeasonId=2491||Cocktales||ShowId=12263', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/chappelles-show/season-1/chappelles-show-ep-106/', Permalink:'http://watch.thecomedynetwork.ca/chappelles-show/season-1/chappelles-show-ep-106/#clip493067', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_4_20/106_realworld1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_4_20/106_realworld1.jpg', Rating:'', Description:'', Title:'Chappelle\'s Show : (Ep. 106) : Clip 1 of 4', Format:'FLV', ClipId:'493067', BugUrl: '' ,SiteMap:'(Ep. 106)||ShowId=862&SeasonId=293&EpisodeId=82192||Season 1||ShowId=862&SeasonId=293||Chappelle\'s Show||ShowId=862', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/chappelles-show/season-1/chappelles-show-ep-106/', Permalink:'http://watch.thecomedynetwork.ca/chappelles-show/season-1/chappelles-show-ep-106/#clip493068', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_4_20/106_realworld1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_4_20/106_realworld1.jpg', Rating:'', Description:'', Title:'Chappelle\'s Show : (Ep. 106) : Clip 2 of 4', Format:'FLV', ClipId:'493068', BugUrl: '' ,SiteMap:'(Ep. 106)||ShowId=862&SeasonId=293&EpisodeId=82192||Season 1||ShowId=862&SeasonId=293||Chappelle\'s Show||ShowId=862', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/chappelles-show/season-1/chappelles-show-ep-106/', Permalink:'http://watch.thecomedynetwork.ca/chappelles-show/season-1/chappelles-show-ep-106/#clip493069', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_4_20/106_realworld1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_4_20/106_realworld1.jpg', Rating:'', Description:'', Title:'Chappelle\'s Show : (Ep. 106) : Clip 3 of 4', Format:'FLV', ClipId:'493069', BugUrl: '' ,SiteMap:'(Ep. 106)||ShowId=862&SeasonId=293&EpisodeId=82192||Season 1||ShowId=862&SeasonId=293||Chappelle\'s Show||ShowId=862', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/chappelles-show/season-1/chappelles-show-ep-106/', Permalink:'http://watch.thecomedynetwork.ca/chappelles-show/season-1/chappelles-show-ep-106/#clip493070', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_4_20/106_realworld1.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_4_20/106_realworld1.jpg', Rating:'', Description:'', Title:'Chappelle\'s Show : (Ep. 106) : Clip 4 of 4', Format:'FLV', ClipId:'493070', BugUrl: '' ,SiteMap:'(Ep. 106)||ShowId=862&SeasonId=293&EpisodeId=82192||Season 1||ShowId=862&SeasonId=293||Chappelle\'s Show||ShowId=862', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535562', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight2_seth_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 1 of 10', Format:'FLV', ClipId:'535562', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535563', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight6_walsh_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 2 of 10', Format:'FLV', ClipId:'535563', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535564', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/sheen_roast_highlight03_v6 (1).jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 3 of 10', Format:'FLV', ClipId:'535564', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535565', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight10_tyson_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 4 of 10', Format:'FLV', ClipId:'535565', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535566', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight12_jeselnik_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 5 of 10', Format:'FLV', ClipId:'535566', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535567', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight14_steve-o_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 6 of 10', Format:'FLV', ClipId:'535567', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535568', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/sheen_roast_highlight05_v6 (1).jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 7 of 10', Format:'FLV', ClipId:'535568', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535569', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight17_shatner_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 8 of 10', Format:'FLV', ClipId:'535569', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535570', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight19_oneal_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 9 of 10', Format:'FLV', ClipId:'535570', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
    
        Playlist.FeaturedVideos.push( new Video( {EpisodePermalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/', Permalink:'http://watch.thecomedynetwork.ca/roasts-/roast-of-charlie-sheen/roast-of-charlie-sheen---uncut/#clip535572', IsAd:false, Thumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight21_sheen-_v6.jpg', EpisodeThumbnail:'http://images.ctvdigital.com/images/pub2upload/8/2011_9_20/roast_sheen_highlight22_sheen_v6.jpg', Rating:'', Description:'', Title:'Roasts : Roast of Charlie Sheen - Uncut : Roast of Charlie Sheen - Clip 10 of 10', Format:'FLV', ClipId:'535572', BugUrl: '' ,SiteMap:'Roast of Charlie Sheen - Uncut||ShowId=896&SeasonId=2435&EpisodeId=89782||Roast of Charlie Sheen||ShowId=896&SeasonId=2435||Roasts||ShowId=896', IsCanadaOnly:'1'} ) );
     


// Start working your way through the playlist, starting with the clip id on the address bar
// if you have one.
Playlist.prototype.Start = function( )
{

	var ClipIdOnAddressBar =  this.ClipIdOnAddresBarAtLoadTime;
   
	if( ClipIdOnAddressBar )
	{
	    for( var i = 0; i < this.Upcoming.length; i++ )
	    {
	        if( this.Upcoming[i].ClipId == ClipIdOnAddressBar )
	        {
	            this.Next();
	            return;
	        }
	        else
	        {
	            this.History.push( this.Upcoming.shift() );
	            i--;
	        }
	    }
	    // else
		this.GetEpisode( null, ClipIdOnAddressBar, "Playlist.GetInstance().AddEpisodeClips" );
		//this.Next();
	}
	else
	{
		this.Next();
	}

   
}

Playlist.prototype.AddEpisodeClips = function( AllClips )
{
    var ClipIdOnAddressBar = this.ClipIdOnAddresBarAtLoadTime;

    var FoundClip = false;
        
    this.SiblingVideos.length = 0;

    for( var i = 0; i < AllClips.length; i++ )
    {
        if( FoundClip )
        {
            this.SiblingVideos.push( AllClips[i] ); 
        }
        else if( AllClips[i].ClipId == ClipIdOnAddressBar )
        {       
            if( this.Current && ! this.Current.IsAd )
            {

				this.Play( AllClips[i] );
			}
			else
			{    
				this.AddClip( AllClips[i] );

				Interface.SetUpNext( this.FindNext() );
				Interface.SetNowPlaying( this.FindNext() );
			}
			
            FoundClip = true;
        }
    }
    
    if( FoundClip )
    {
        this.SiblingVideos.push( AllClips[ AllClips.length - 1 ] ); 
    }
    
    this.Next();    
}

Playlist.prototype.AddEpisode = function( pEpisode )
{
    Playlist.LoadingEpisodeId = null;
    
    if( pEpisode.length )
    {
        this.AddClip( pEpisode );
    }
    else
    {
        this.GetEpisode( pEpisode, null, "Playlist.GetInstance().AddEpisode", true );
    }

}

Playlist.prototype.PlayEpisode = function( pEpisode )
{
    var isArray = pEpisode.length && typeof( pEpisode ) == "object";
        
    if( isArray )
    {        
        var shouldPlay = Playlist.PlayEpisodeId == Playlist.LoadingEpisodeId;
        Playlist.LoadingEpisodeId = null;
        
        if( shouldPlay )
        {
			Playlist.PlayEpisodeId = null;
			this.Play( pEpisode );
		}
    }
    else
    {
        Playlist.PlayEpisodeId = pEpisode;
        
        var timeout;
        timeout = setTimeout( function() { if( Playlist.PlayEpisodeId  ) Interface.ShowEpisodeIsLoadingMessage() }, 50 );
        
        this.GetEpisode( pEpisode, null, "Playlist.GetInstance().PlayEpisode" );
    }
}

Playlist.prototype.AddEpisodeClipsAfter = function( pClipId, pEpisodeId )
{
    var isArray = ( typeof( pClipId ) == "object" );
    
    if( ( ! pClipId ) || pClipId <= 0 )
    {
		return;
    }
    
    if( isArray )
    {
        var FoundClip = false;
        
        this.SiblingVideos.length = 0;
    
        for( var i = 0; i < pClipId.length; i++ )
        {
            if( FoundClip )
            {
                this.SiblingVideos.push( pClipId[i] ); 
            }
            else if( pClipId[i].ClipId == Playlist.LoadingEpisodeViaClipId )
            {
                FoundClip = true;
            }
        }
        
        Playlist.LoadingEpisodeViaClipId = null;
        Playlist.LoadingLongEpisodeViaClipId = null;
        
	    Interface.SetUpNext( this.FindNext() );

    }
    else
    {
        Playlist.LoadingEpisodeViaClipId = null;
        Playlist.LoadingLongEpisodeViaClipId = null;
         
        if( pEpisodeId && pEpisodeId < -1 )
        {
			pEpisodeId = null 
		}

		this.GetEpisode( pEpisodeId, pClipId, "Playlist.GetInstance().AddEpisodeClipsAfter" );
    }   
}

Playlist.prototype.LookUpMoreClips = function( pEpisodeId, pClipId, pOffset )
{
	//Playlist.LoadingLongEpisodeViaClipId = pClipId;
	//this.GetEpisode( pEpisodeId, pClipId, "Playlist.GetInstance().AddAdditionalEpisodeClipsAfter", true, null, pOffset );
}

Playlist.prototype.AddAdditionalEpisodeClipsAfter = function( pVideoArr )
{
	//drop stale requests
	if( Playlist.LoadingLongEpisodeViaClipId != Playlist.LoadingEpisodeViaClipId )
	{
		return;
	}

	var FoundClip =  false;
	for( var i = 0; i < pVideoArr.length; i++ )
    {
        if( FoundClip )
        {
            if( pVideoArr[i].ClipId != Playlist.LoadingEpisodeViaClipId )
            {
				this.SiblingVideos.push( pVideoArr[i] ); 
			}
        }
        else if( pVideoArr[i].ClipId == Playlist.LoadingEpisodeViaClipId )
        {
            FoundClip = true;
        }
    }
    
	Playlist.LoadingEpisodeViaClipId = null;
	
	Interface.SetUpNext( this.FindNext() );
}

Playlist.PlayClipFromId = function( pClipId )
{
	Playlist.prototype.GetEpisode( null, pClipId, "Playlist.GetInstance().Play", false );
}

Playlist.CanDetermineEpisodeInfo = function()
{
	return ! FlashController.IsOneClipPlayer;
}

Playlist.prototype.GetEpisode = function( pEpisodeId, pClipId, pCallbackFunctionName, dontPlay, additionalParams, firstResult )
{
    if( ! Playlist.CanDetermineEpisodeInfo() )
    {
		//can't AJAX across domains, we just can't know the sibling clips...maybe we could use JSON?
		return;
    }
    
    dontPlay = dontPlay == true;
    
    if( ! pEpisodeId )
    {
        pEpisodeId = "";
    }
    else
    {
        Playlist.LoadingEpisodeId = pEpisodeId;
    }
    
    if( ! pClipId )
    {
        pClipID = "";
    }
    else
    {
        Playlist.LoadingEpisodeViaClipId = pClipId;
    }

	// Call the remote URL via a SCRIPT element in the header of the page.
	var EpisodeRemoteUrlScript = document.createElement("script");
	
	var scriptUrl = "/AJAX/ClipLookup.aspx?callfunction=" + escape( pCallbackFunctionName ) + "&episodeid=" + pEpisodeId + "&clipid=" + pClipId + "&firstResult=" + firstResult + "&additionalParams=" + additionalParams;
	
	if( pCallbackFunctionName == "Playlist.GetInstance().Play" ) //just want to play one clip
	{
		scriptUrl += "&justPlayClip=true";
	}
	else if( pCallbackFunctionName == "Playlist.GetInstance().AddAdditionalEpisodeClipsAfter" )  
	{
		scriptUrl += "&maxResults=50";
	}
	else if( pCallbackFunctionName == "Playlist.GetInstance().AddEpisodeClipsAfter" )  
	{
		scriptUrl += "&maxResults=15";
	}
	
	EpisodeRemoteUrlScript.src = scriptUrl;
	EpisodeRemoteUrlScript.type = "text/javascript";
		
	if( ! dontPlay )
	{	
		if( this.Current && this.Current.IsAd )
		{
			var CurrentOnEnd = this.Current.OnEnd;
			this.Current.OnEnd = null;
		    	    
			if( ! CurrentOnEnd )
			{
				CurrentOnEnd = function() {}
			}
		    
			this.Current.OnEnd = function() { CurrentOnEnd(); setTimeout( function() { Playlist.CheckForLoadFailure(pEpisodeId); }, 3000 ); }
		    
		}
		else
		{
			setTimeout( "Playlist.CheckForLoadFailure(" + pEpisodeId + ")", 12000 );
			
			var _Controller = Player.GetInstance().Controller;
		
			if( _Controller && _Controller.Loading )
			{
				_Controller.Loading();
			}
		}
		
		if( Interface.Play_Clicked )
		{
			Interface.Play_Clicked();
		}
	}
	
	document.getElementsByTagName("head")[0].appendChild( EpisodeRemoteUrlScript );
}

Playlist.CheckForLoadFailure = function( pEpisodeId ) 
{
    /* Neil changed this Jan 28 @ 3:00PM -- keep an eye that it's not broken */
    
    if( Playlist.PlayEpisodeId && Playlist.PlayEpisodeId == pEpisodeId )
	{
		Interface.DisplayPlayerControllerError( "Please Wait", "It's taking a little while to load your video. It'll be ready to go soon...", "", "" );
	}
	else if( Playlist.LoadingEpisodeViaClipId && Playlist.LoadingEpisodeViaClipId == pEpisodeId )
	{
		Log( "Could not load any sibling clips for Clip Id " + Playlist.LoadingEpisodeViaClipId );
		Playlist.LoadingEpisodeViaClipId = null;
	}
}



// Add a Video or an array of videos to your Playlist
Playlist.prototype.AddClip = function( pVideo, dontSetUpNext )
{
    dontSetUpNext = dontSetUpNext == true;
    this.SiblingVideos.length = 0;

    if( pVideo.length )
    {
        for( var i = 0; i < pVideo.length; i++ )
        {
            this.Upcoming.push( pVideo[i] );    
        }
    }
    else
    {
        this.Upcoming.push( pVideo );
    }	
	
	// If you are already watching a Video...
	if( this.Current )
	{
		// If you are already watching an Ad...
		if( this.Current.IsAd )
		{
			// Display the next videos that will play after the Ad
			Interface.SetNowPlaying( this.FindNext() );
			if( ! dontSetUpNext )
			{
				Interface.SetUpNext( this.FindNext() );
			}
		}
		else
		{
			// Display the next videos that will play
			Interface.SetNowPlaying( this.Current );
			if( ! dontSetUpNext )
			{
				Interface.SetUpNext( this.FindNext() );
			}
		}
	}
	else
	{
		// Display what will be playing next (when the Playlist is started)
		Interface.SetNowPlaying( this.FindNext() );
		if( ! dontSetUpNext )
		{
			Interface.SetUpNext( this.FindNext( 1 ) );
		}
	}
	
	if( Interface.UpdatePlaylist ) { Interface.UpdatePlaylist( this ); }
}

// Play the Video, or array of videos, immediately, disregarding whatever might already be loaded into your
// Upcoming list of videos.
Playlist.prototype.Play = function( pVideo, wasCalledFromUI, clipIsPartOfEpisode )
{    
	wasCalledFromUI = wasCalledFromUI == true;
	
	//dont set up next is the clip is part of an episode, we need to look up the "sibling" clips first
	var dontSetUpNext = clipIsPartOfEpisode == true; 
	
	Playlist.PlayEpisodeId = null; //NT: trying to avoid the false loading error bug	

    this.SiblingVideos.length = 0;

    // If you are already watching a Video...
	if( this.Current )
	{
		var WasPlayingAd = this.Current.IsAd;

		// If you were NOT watching an Ad
		if( ! WasPlayingAd )
		{
		    // Stop the Video you are watching
		    Player.EndClip();
		
		    // Move what you were watching to your History
			this.History.push( this.Current );
			this.Current = null;
		}

	    // Take all the Upcoming videos and move them to your History
		while( this.Upcoming.length > 0 )
		{
			this.History.push( this.Upcoming.shift() );
		}

		// Add pVideo to your Playlist
		this.AddClip( pVideo, dontSetUpNext );

		// If you were not playing an Ad, go on to the next Video immediately
		if( ! WasPlayingAd )
		{
			this.Next( null, null, dontSetUpNext );		
		}
	}
	else
	{
	    // Add pVideo to your Playlist
		this.AddClip( pVideo, dontSetUpNext );
		
		// Go on to the next Video immediately
		this.Next( null, null, dontSetUpNext );
	}
	

        var video = this.Current;

        if (video == null || video.IsAd)
        {
            video = this.FindNext();
        }
    
      Playlist.GetInstance().CallMads(video);

	if( wasCalledFromUI )
	{
		Interface.Play_Clicked();
		return false;
	}

  

}

Playlist.prototype.ClearHistory = function()
{
    this.History = new Array();
    
    if( Interface.UpdatePlaylist ) { Interface.UpdatePlaylist( this ); }
}

Playlist.prototype.ClearUpcoming = function()
{
    this.Upcoming = new Array();
    
    if( Interface.UpdatePlaylist ) { Interface.UpdatePlaylist( this ); }
}


Playlist.prototype.MovePlayhead = function( Offset )
{
    if( Offset == null || Offset == undefined )
    {
	    Offset = 1;
    }
    
    var CurrentIsAd = this.Current.IsAd;
    
    // Moving the playhead back (Offset is negative)
    if( Offset < 0 && ( Offset * -1 ) <= this.History.length )
    {
        var IndexOfOldestVideo = this.History.length + Offset;
        
        if( ! CurrentIsAd )
        {
            Player.EndClip();
            this.Upcoming = ( new Array( this.Current ) ).concat( this.Upcoming );
            this.Current = null;
        }
        
        this.Upcoming = this.History.slice( IndexOfOldestVideo ).concat( this.Upcoming );
        this.History = this.History.slice( 0, IndexOfOldestVideo );
        
        if( ! CurrentIsAd )
        {
            this.Next();
        }
        else
        {
            Interface.SetNowPlaying( this.FindNext() );
	        Interface.SetUpNext( this.FindNext() );
        }
    }
    // Moving the playhead forward (Offset is positive)
    else if( Offset > 0 )
    {
        if( ! CurrentIsAd )
        {
            Player.EndClip();
            this.MovePlaylistForward( Offset - 1 );
            this.Next();
        }
        else
        {
            this.MovePlaylistForward( Offset );

            Interface.SetNowPlaying( this.FindNext() );
	        Interface.SetUpNext( this.FindNext() );
        }        
    }
    
        	
	if( Interface.UpdatePlaylist ) { Interface.UpdatePlaylist( this ); }
}

Playlist.prototype.MovePlaylistForward = function( Offset )
{
    if( Offset == null || Offset == undefined )
    {
	    Offset = 1;
    }

	for( var i = 0; i < Offset; i++ )
	{
	
	    if( this.Upcoming.length > 0 )
	    {
		    this.History.push( this.Upcoming.shift() );
	    }
	    else if( this.SiblingVideos.length > 0 )
	    {
		    this.History.push( this.SiblingVideos.shift() );
	    }
	    else if( Playlist.FeaturedVideos.length > 0 )
	    {
		    if( this.FeaturedVideosIndex < Playlist.FeaturedVideos.length - 1 )
		    {
		        this.FeaturedVideosIndex++;			    
		    }
		    else
		    {
			    this.FeaturedVideosIndex = 0;
		    }
	    }
	}
}

// Go on to the next Video in your Playlist.
// SkipAd (boolean): If true, move on to the next video without watching a preroll ad.
Playlist.prototype.Next = function( SkipAd, AllowWait, DontSetUpNext )
{
    DontSetUpNext	= DontSetUpNext == true;
    SkipAd			= SkipAd == true;
    
    if( Interface.ClearAlertMessages ) { Interface.ClearAlertMessages(); }

    var shouldWaitForEpisodeToLoad =  Playlist.PlayEpisodeId != null && ! isNaN( Playlist.PlayEpisodeId ) && Playlist.PlayEpisodeId  > -1;
    if( shouldWaitForEpisodeToLoad )
    {
        Log("Next() was skipped, waiting for episode to load..");
        return;
    }
	
	if( AllowWait == null )
	{
	    AllowWait = true;
	}
	
	var _Player = Player.GetInstance();
	var JustPlayedAd = false;

	// If you are currently watching a Video
	if( this.Current != null )
	{	
	    // If the video you are watching is not an Ad, move it to your history
		if( ! this.Current.IsAd )
		{
		    
		    Player.EndClip();
			this.History.push( this.Current );
		}
		else
		{
		    // You were just watching an Ad
			JustPlayedAd = true;
		}
		this.Current = null;
	}
	
//	console.log("AD:"+_Player.TimeWatchedSinceAd()+" >= "+this.PrerollFrequency);
	// If it is time to play an Ad...

    var isFirstPlay = _Player.TimeWatchedSinceAd() >= 999999;
    
    var playAd = ! SkipAd && ! JustPlayedAd && this.PrerollFrequency > 0
	    && _Player.TimeWatchedSinceAd() >= this.PrerollFrequency
	    && ( ! Playlist.HasNoAdCookie() );


    if(isFirstPlay)
    {        
        var v = this.FindNext();
        this.CallMads(v)
    }

    if ( this.NumberOfAdsToDisplay == 0)
    {
        playAd = false;
    }
    else if(this.AdsDisplayed < this.NumberOfAdsToDisplay && FlashController.IsOneClipPlayer == false)
    {
        this.AdsDisplayed++;
        playAd = true;
    }else if (this.AdsDisplayed >= this.NumberOfAdsToDisplay)
    {
          this.AdsDisplayed = 0;
          playAd = false;
    }
 
	//debugging, will play an ad every clip
	//playAd = !JustPlayedAd;
	
	
	if( ! playAd && isFirstPlay )
	{
		if( Interface.SetBigBoxAd ) 
		{ 
			Interface.SetBigBoxAd(); 
		}
	}
	
    if (playAd == false){
        this.AdTile = 0;
        this.AdOrd= Ad.GenerateOrd();
    }

	if( playAd )
	{
        this.AdTile++;
		var AdFormat = Format.FlashVideo;
		if( _Player.Controller )
		{
		    // Get the Video format that the current Player Controller is capable of playing
			AdFormat = _Player.Controller.Format;
		}

		// Get a preroll Ad in the same Video format as the video you are watching.
		Ad.GetPreroll( 
			AdFormat, 
			// Play the Ad Video when it's done loading 
			function( pVideo ) 
			{   

				Playlist.GetInstance().Current = pVideo; 

				if( ! DontSetUpNext )
				{
					Interface.SetUpNext(  Playlist.GetInstance().FindNext() );
				}

				Interface.SetNowPlaying( Playlist.GetInstance().FindNext() );

				Player.GetInstance().Play( pVideo ); 
			},
            this.AdOrd,
            this.AdTile

             
		);
	}
	// If there is a Video in the list of Upcoming videos...
	else if( this.Upcoming.length > 0 )
	{
	    // Play the next Upcoming Video
		this.Current = this.Upcoming.shift();
		
		Interface.SetNowPlaying( this.Current );
		_Player.Play( this.Current );
		
		if( this.Upcoming.length == 0 && this.Current.IgnoreSibling != true )
		{
			this.SiblingVideos.length = 0;
			
			if( ! DontSetUpNext )
			{
				Interface.SetUpNext( this.FindNext() );
			}
			
			this.AddEpisodeClipsAfter( this.Current.ClipId, this.Current.EpisodeId );
		}
		else
		{
			 this.SiblingVideos.length = 0;
			 Interface.SetUpNext( this.FindNext() );
		}
	}
	// If there is a Video in the list of Sibling videos...
	else if( this.SiblingVideos.length > 0 )
	{
		this.Current = this.SiblingVideos.shift();

		if( ! DontSetUpNext )
		{
			Interface.SetUpNext( this.FindNext() );
		}
		
		Interface.SetNowPlaying( this.Current );
		_Player.Play( this.Current );
	}
	// If we haven't played all the FeaturedVideos yet...
	else if( Playlist.FeaturedVideos.length > 0 && Playlist.FeaturedVideos.length > this.FeaturedVideosIndex )
	{
	    // Get the next FeaturedVideo
		this.Current = Playlist.FeaturedVideos[ this.FeaturedVideosIndex ];
		
		if( this.FeaturedVideosIndex > Playlist.FeaturedVideos.length )
		{
			this.FeaturedVideosIndex = 0;
		}
		else
		{
			this.FeaturedVideosIndex++;
		}
		if( ! DontSetUpNext )
		{
			Interface.SetUpNext( this.FindNext() );
		}
				
		Interface.SetNowPlaying( this.Current );
		_Player.Play( this.Current );
	}
	else if( !AllowWait && Playlist.FeaturedVideos.length > 0 )
	{
	    // Get the next FeaturedVideo
		this.Current = Playlist.FeaturedVideos[ 0 ];
	    this.FeaturedVideosIndex = 0;
				
		if( ! DontSetUpNext )
		{
			Interface.SetNowPlaying( this.Current );
			Interface.SetUpNext( this.FindNext() );
		}
		
		_Player.Play( this.Current );
	}
	else
	{
	    // Set the player into the STOPPED state
	    _Player.Wait();
	    // Reset the FeaturedVideosIndex so the FeaturedVideos will play again when 
	    // the playlist starts up again.
	    this.FeaturedVideosIndex = 0;
	    Interface.SetNowPlaying( this.FindNext() );
	    Interface.SetUpNext( this.FindNext( 1 ) );
		
	}	
		
     
	
	if( Interface.UpdatePlaylist ) { Interface.UpdatePlaylist( this ); }

}
Playlist.HasNoAdCookie = function()
{
	var NoAdValue = getCookie( "NoAd" );
	
	return NoAdValue != null && NoAdValue != "";
}
// Finds the next content video (not ad) that will play theoretically, without going to that video.
Playlist.prototype.FindNext = function( Offset )
{

	
	var toReturn;
	var hasAlreadyBeenPlayed = false;
	var isFromFeatured		= false;
	var ignoreHistory = ! Playlist.CanDetermineEpisodeInfo(); //one clip player doesnt need this added recursion
	
	if( Offset == null || Offset == undefined )
	{
		Offset = 0;
	}
	
	

	if( this.Upcoming.length > 0 && this.Upcoming.length > Offset )
	{
		toReturn = this.Upcoming[ Offset ];
	}
	else if( 
		this.SiblingVideos.length > 0 
		&& this.SiblingVideos.length > ( Offset - this.Upcoming.length ) 
	)
	{
		toReturn = this.SiblingVideos[ ( Offset - this.Upcoming.length ) ];
	}
	else if( 
		Playlist.FeaturedVideos.length > 0 
		&& Playlist.FeaturedVideos.length > this.FeaturedVideosIndex + ( Offset - this.Upcoming.length - this.SiblingVideos.length ) 
	)
	{
		toReturn = Playlist.FeaturedVideos[ this.FeaturedVideosIndex + ( Offset - this.Upcoming.length - this.SiblingVideos.length ) ];
		isFromFeatured = true;
	}
	else
	{
		toReturn = Playlist.FeaturedVideos[ ( this.FeaturedVideosIndex + ( Offset - this.Upcoming.length - this.SiblingVideos.length ) ) % Playlist.FeaturedVideos.length ];
	}
	
	
	/*if( toReturn.ClipId && isFromFeatured && ! ignoreHistory ) //dont replay videos from the featured bin
	{
		for( i = 0; i < this.History.length; i++ )
		{
			if( this.History[ i ].ClipId == toReturn.ClipId )
			{
				hasAlreadyBeenPlayed = true;
				break;
			}
		}
		
		if(  this.Current && this.Current.ClipId == toReturn.ClipId )
		{
			hasAlreadyBeenPlayed = true;
		}
	}*/

	if( ! hasAlreadyBeenPlayed )
	{
		return toReturn; //exit recursion
	}
	else //recurisive step
	{
		return this.FindNext( Offset+1 );
	}
}

Playlist.DeterminePermalink = function( clipId )
{
	return "http://watch.thecomedynetwork.ca/Redirect/Default.aspx?ClipId=" + clipId;	
}
Playlist.prototype.CallMads = function(video)
{
    


		if (FlashController.IsOneClipPlayer == false && Playlist.HasNoAdCookie() == false)
		{
			if (video != null && video.IsAd == false && this.LastMadsPermalink != video.Permalink){
				this.LastMadsPermalink = video.Permalink;
				this.NumberOfAdsToDisplay = 1;

				if (video.Permalink != null){
					var instance = this;
				  
					var url = "http://watch.thecomedynetwork.ca/Mads.aspx?query=" + video.Permalink;
					var url = url.replace("#","|");

					var xmlhttp;
					if (window.XMLHttpRequest)
					{
						// code for IE7+, Firefox, Chrome, Opera, Safari
						xmlhttp=new XMLHttpRequest();
					}
					else
					{
						// code for IE6, IE5
						xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
					}
	  
					xmlhttp.open("GET",url,false);
					xmlhttp.send();
					if (xmlhttp.readyState==4 && xmlhttp.status==200)
					{
						var data = xmlhttp.responseText;
						var response = eval("(" +data + ")");

						Utility.Log("Mads=" + response.Num);
						instance.NumberOfAdsToDisplay = response.Num;

					}else{
						instance.NumberOfAdsToDisplay = 1;
						
					}
		 
				}		    	
			}
		}
    
}


/*
 * Framework: wrapper class for the whole broadband experience
 */
function Framework( DefaultFormat, AdInterval, OmnitureAccountId, OmniturePlayerName, DartSiteId, Theme, PrePlayImage )
{
	DefaultFormat = DefaultFormat ? DefaultFormat : Format.FlashVideo;
	Framework.__instance = this;

	/*
	var handlerFunction = function( msg, page, line )
		{
			Log( msg );
		}
		
	window.onerror = handlerFunction;
	if( window.onerror == handlerFunction )
	{
		// DO NOTHING
	}
	else if( window.addEventListener )
	{
		window.addEventListener( "error", handlerFunction, false );
	}
	else if( window.attachEvent ) 
	{
		window.attachEvent( "onerror", handlerFunction );
	}
	*/
	Ad.DARTSite = DartSiteId;
	this.DefaultFormat = DefaultFormat;
	
	new Metrics( OmnitureAccountId, OmniturePlayerName );
	

	this.Playlist = new Playlist( AdInterval );

	var _Player = new Player( Theme, PrePlayImage );
    
	if( ! PrePlayImage )
	{   
        this.Playlist.Start( ); // starts the playlist running	
	}
}

Framework.UseMetricsOverridePlayName = false;

Framework.GetInstance = function()
{
	return Framework.__instance;
}


/*
 * Player: handles all the video player interaction (e.g. Play, Pause, etc.)
 */
function Player( pTheme, pPrePlayImage )
{
    
    this.Theme = pTheme;
    
    this.PrePlayImage = pPrePlayImage;

	this.Controller = new FlashController( this.Theme, this.PrePlayImage ); // loads Flash as the default controller
	this.SuccessfulPlays = 0;   // keeps track of how many videos have successfully played
	                            // **DOES NOT INCLUDE ADS**
    this.RejectedSilverlight = false;
    
    this.ClipKeyPointsSinceAd = -1; // keeps track of how many clip key points have been reached since the
                                    // last ad was played.  Set to -1 at Player instantiation.
                                    
    
	

	var OnUnLoad = function() { Player.EndClip(); }
	
	window.onunload = OnUnLoad;
	if( window.onunload == OnUnLoad )
	{
		// DO NOTHING
	}
	else if( window.addEventListener )
	{
		window.addEventListener( "unload", OnUnLoad, false );
	}
	else if( window.attachEvent ) 
	{
		window.attachEvent( "onunload", OnUnLoad );
	}
	
	if( getCookie( "Volume" ) != null && getCookie( "Volume" ) != "" )
	{
	    Player.Volume = getCookie( "Volume" );
	}

	Player.__instance = this;
}

Player.Volume = 50;

Player.GetInstance = function( pTheme, pPrePlayImage )
{
	if( ! Player.__instance )
	{
		Player.__instance = new Player( pTheme, pPrePlayImage );
	}

	
	return Player.__instance;
}

Player.Pause = function(pSeconds) {
    var _Playlist = Playlist.GetInstance();

    if (_Playlist.Current) {
       // console.log("pause:" + pSeconds);
        Metrics.StopClip(_Playlist.Current, pSeconds);
    }
}


Player.Play = function (pSeconds) {

    var _Playlist = Playlist.GetInstance();

    if (_Playlist.Current) {
        // console.log("play:" + pSeconds);
        Metrics.StartClip(_Playlist.Current, pSeconds);
    }
}

Player.prototype.Play = function (pVideo) {

    Metrics.UseMetricsOverridePlayName = Framework.UseMetricsOverridePlayName;

    Utility.Log("Play");

    if (Interface.DisplayViewerDiscretionIsAdvised && TVRating.GetInstance().MustAdvise(pVideo.Rating)) {
        if (this.Controller && this.Controller.Destroy) { this.Controller.Destroy(); }
        Interface.DisplayViewerDiscretionIsAdvised(pVideo);
        this.Controller = null;
        return;
    }

    var IsSilverlightControllerAvailable = true;
    try {
        if (SilverlightController) {
            IsSilverlightControllerAvailable = true;
        }
        else {
            IsSilverlightControllerAvailable = false;
        }
    }
    catch (err) {
        IsSilverlightControllerAvailable = false;
    }

    var IsWindowsMediaControllerAvailable = true;
    try {
        if (WindowsMediaController) {
            IsWindowsMediaControllerAvailable = true;
        }
        else {
            IsWindowsMediaControllerAvailable = false;
        }
    }
    catch (err) {
        IsWindowsMediaControllerAvailable = false;
    }

    if (!this.Controller || this.Controller.Format != pVideo.Format || (BrowserDetect.OS != "Windows" && pVideo.Format == Format.WindowsMediaVideoDRM)) {

        Utility.Log("User agent:" + navigator.userAgent);
        //        if (navigator.userAgent.match(/iPad/i) != null) {
        //            if (this.Controller && this.Controller.Destroy) { this.Controller.Destroy(); }
        //            var NewController = new IDeviceController(this.Theme);
        //            this.Controller = NewController;
        //        }
        //        else 
        if (IsSilverlightControllerAvailable && (pVideo.Format == Format.WindowsMediaVideo || pVideo.Format == Format.LiveStream || pVideo.Format == Format.WindowsMediaAudio)) {
            if (this.Controller && this.Controller.Destroy) { this.Controller.Destroy(); }
            var NewController;
            if (SilverlightController.IsInstalled() || !Interface.DisplaySilverlightChoice) {
                NewController = new SilverlightController(this.Theme);
            }
            else if (!this.RejectedSilverlight && Interface.DisplaySilverlightChoice) {
                if (this.Controller && this.Controller.Destroy) { this.Controller.Destroy(); }
                Interface.DisplaySilverlightChoice();
                this.Controller = null;
                return;
            }
            else {
                NewController = new WindowsMediaController(this.Theme);
            }
            this.Controller = NewController;
        }
        else if (pVideo.Format == Format.FlashVideo || pVideo.Format != Format.MP3) {
            if (this.Controller && this.Controller.Destroy) { this.Controller.Destroy(); }
            var NewController = new FlashController(this.Theme);
            this.Controller = NewController;
        }
        else if (pVideo.Format == Format.MP3) {
            if (this.Controller && this.Controller.Destroy) { this.Controller.Destroy(); }
            var silverlight2Controller = new Silverlight2Controller();
            this.Controller = silverlight2Controller;
        }
        else if (IsWindowsMediaControllerAvailable && pVideo.Format == Format.WindowsMediaVideoDRM) {
            if (BrowserDetect.OS != "Windows") {
                if (this.Controller && this.Controller.Destroy) { this.Controller.Destroy(); }
                Interface.DisplayPlayerControllerError("Windows only", "Sorry, you must be using the Microsoft Windows operating system to view this video.");
                this.Controller = null;

                setTimeout("Playlist.GetInstance().Next( true )", 60000);

                return;
            }
            else {
                if (this.Controller && this.Controller.Destroy) { this.Controller.Destroy(); }
                var NewController = new WindowsMediaController(this.Theme);
                this.Controller = NewController;
            }
        }
        else {
            //this.Controller.Wait();
            throw "No controller available to play format " + pVideo.Format;
            return;
        }
    } else {

        //        Utility.Log("ELSE");
        //        if (navigator.userAgent.match(/iPad/i) != null) {
        //            if (this.Controller && this.Controller.Destroy) { this.Controller.Destroy(); }
        //            var NewController = new IDeviceController(this.Theme);
        //            this.Controller = NewController;
        //        }
    }

    if (pVideo.Url) {
        if (Interface.GetInstance().AllowUrlRewriting) {
            var urlSuffix;
            if (pVideo.IsAd) {
                var _Playlist;
                _Playlist = Playlist.GetInstance();

                var NextVideo = _Playlist.FindNext();

                if (NextVideo && NextVideo.ClipId) {
                    urlSuffix = "#clip" + NextVideo.ClipId;
                }
                else {
                    urlSuffix = "#ad";
                }
            }
            else if (pVideo.ClipId) {
                urlSuffix = "#clip" + pVideo.ClipId;
            }
            else {
                urlSuffix = "#";
            }

            //document.getElementById("Video").name = urlSuffix.substring(1);

            document.location = urlSuffix;
        }

        if (pVideo.OnStart != null) {
            pVideo.OnStart();
        }

        this.Controller.Play(pVideo);
        Metrics.StartedClip(pVideo);

        if (!pVideo.IsAd) {
            this.SuccessfulPlays++;
        }
        else {
            this.ClipKeyPointsSinceAd = 0;
        }
    }
    else {
        var PlayerController = this.Controller;
        var _Player = this;
        pVideo.AfterRemoteLoad = function (pVideo) { Player.GetInstance().Play(pVideo); }
        pVideo.GetRemoteUrl();
    }
}

Player.ParseClipIdFromAddress = function()
{
	var ClipIdRegExp = new RegExp( "#clip([0-9]+)$" );
	
	var Match = ClipIdRegExp.exec( document.location + "" );
	
	if( Match && Match.length > 0 )
	{
		Log( "Found clip " + Match[1] + " on the query string" );
		return Match[1];
	}
	else
	{
		ClipIdRegExp = new RegExp( "\/clip([0-9]+)[\/\?#]?" );	
		Match = ClipIdRegExp.exec( document.location + "" );
		
		if( Match && Match.length > 0 )
		{
			Log( "Found clip " + Match[1] + " on the query string" );
			return Match[1];
		}
	}

	Log( "No clip was passed on the query string" );
	return false;
}

Player.prototype.Wait = function()
{
	if( this.Controller && this.Controller.Wait )
	{
		this.Controller.Wait();
	}
}

Player.EndClip = function() {
    var _Playlist = Playlist.GetInstance();

    if (_Playlist.Current) {

        var timeLinePosition = Player.GetInstance().Controller.getTimelinePosition();
        
        if (Player.GetInstance().Controller && Player.GetInstance().Controller.Loading) {
            Player.GetInstance().Controller.Loading();
        }



        Metrics.EndedClip(_Playlist.Current, timeLinePosition);

        if (_Playlist.Current.OnEnd) {
            _Playlist.Current.OnEnd();
        }

        //  _Playlist.Current = null;
    }
}


Player.Error = function( Message )
{
    if( Playlist.GetInstance().Current && Playlist.GetInstance().Current.IsAd )
    {
        Playlist.GetInstance().Next();
    }
    else
    {
        Metrics.ErrorPlayingClip( Playlist.GetInstance().Current, Message );
        
        /*
        if( Interface.DisplayPlayerControllerError )
        {
            Interface.DisplayPlayerControllerError( "Sorry, there was an error", Message );
        }
        */
    }
	throw "Error from the Player controller: " + Message;
}

// return a result in seconds
Player.prototype.TimeWatchedSinceAd = function()
{
    // If ClipKeyPointsSinceAd is negative, we haven't watched an ad this session yet, so return 
    // a high number corresponding to a long time since the last ad was seen.
    if( this.ClipKeyPointsSinceAd < 0 )
    {
        return 999999;
    }
    else
    {
        return this.ClipKeyPointsSinceAd * 10; // multiply by 10 because keypoints are sent every 10 seconds
    }
}

Player.OnClipKeyPoint = function( KeyPoint, pDuration )
{
    if( pDuration )
    {
        try
        {
            Playlist.GetInstance().Current.Duration = pDuration;
        }
        catch( Error )
        {
            Log( "Error setting Current Video Duration: " + Error );
        }
    }
    
    var _Playlist = Playlist.GetInstance();
    
    if( KeyPoint > 0 && ! _Playlist.Current.IsAd )
    {
        Player.GetInstance().ClipKeyPointsSinceAd++;
    }
    
    if( KeyPoint == 0 && _Playlist.Current )
    {
		if( _Playlist.Current.IsAd )
		{
			Log( "Ad was loaded successfully" );
		}
		else
		{
			Log( "Video " + _Playlist.Current.ClipId + " was loaded successfully" );
		}
    }

	Metrics.ReachedClipKeyPoint( KeyPoint );
}

Player.OnClipEnded = function () {
    Player.EndClip();

    Playlist.GetInstance().CallMads(Playlist.GetInstance().FindNext());

    Playlist.GetInstance().Next();
}

Player.OnNextClicked = function () 
{
    Playlist.GetInstance().Next();
}

Player.OnBigBoxClicked = function()
{
	var url = Ad.GetInstance().BigBoxTargetURL;
	
	if( url && url != "" && url != "undefined"  && url != undefined )
	{
		Player.PermalinkClicked( url );
	}
}

Player.SetVolume = function( pLevel )
{
    if( ( "" + Number(pLevel) ).indexOf("NaN") == -1 )
    {	
		Player.Volume = pLevel;
	    
		setCookie( "Volume", pLevel );    
	}
}
Player.GetVolume = function()
{
    return Player.Volume;
}

Player.GetShowName = function () {
    var _Playlist = Playlist.GetInstance();

    var nextVideo;

    //If there is a Video in the list of Upcoming videos...
    if (_Playlist.Upcoming.length > 0) {
        nextVideo = _Playlist.Upcoming.shift();
    }
    //If there is a Video in the list of Sibling videos...
    else if (_Playlist.SiblingVideos.length > 0) {
        nextVideo = _Playlist.SiblingVideos.shift();
    }
    // If we haven't played all the FeaturedVideos yet...
    else if (Playlist.FeaturedVideos.length > 0 && Playlist.FeaturedVideos.length > _Playlist.FeaturedVideosIndex) {
        // Get the next FeaturedVideo
        nextVideo = Playlist.FeaturedVideos[_Playlist.FeaturedVideosIndex];
    }
    else if (Playlist.FeaturedVideos.length > 0) {
        // Get the next FeaturedVideo
        nextVideo = Playlist.FeaturedVideos[0];
    }
    else {
        return "";
    }

    return Player.GetShowNameFromSiteMap(nextVideo);
}


Player.GetShowNameFromSiteMap = function (nextVideo) {
    if (nextVideo.SiteMap) {
        var showName;
        showName = nextVideo.SiteMap[nextVideo.SiteMap.length - 1][0]

        return escape(showName);
    }
}

Player.GetCurrentShowMetadata = function () {

    var _Playlist = Playlist.GetInstance();

    var nextVideo;

    //If there is a Video in the list of Upcoming videos...
    if (_Playlist.Upcoming.length > 0) {
        nextVideo = _Playlist.Upcoming[0];
    }
    //If there is a Video in the list of Sibling videos...
    else if (_Playlist.SiblingVideos.length > 0) {
        nextVideo = _Playlist.SiblingVideos[0];
    }
    // If we haven't played all the FeaturedVideos yet...
    else if (Playlist.FeaturedVideos.length > 0 && Playlist.FeaturedVideos.length > _Playlist.FeaturedVideosIndex) {
        // Get the next FeaturedVideo
        nextVideo = Playlist.FeaturedVideos[_Playlist.FeaturedVideosIndex];
    }
    else if (Playlist.FeaturedVideos.length > 0) {
        // Get the next FeaturedVideo
        nextVideo = Playlist.FeaturedVideos[0];
    }

    var currentVideoTitle;
    var currentVideoDescription;
    var currentClipID;
    var currentPermalink;
    var currentIsAd;

    if (_Playlist.Current == null) {
        //nothing played yet, likely due to lack of autoplay, use NEXT
        currentVideoTitle = nextVideo.Title;
        currentVideoDescription = nextVideo.Description;
        currentClipID = nextVideo.ClipId;
        currentPermalink = nextVideo.Permalink;
        currentIsAd = nextVideo.IsAd;
    } else {
        currentVideoTitle = _Playlist.Current.Title;
        currentVideoDescription = _Playlist.Current.Description;
        currentClipID = _Playlist.Current.ClipId;
        currentPermalink = _Playlist.Current.Permalink;
        currentIsAd = _Playlist.Current.IsAd;
    }

    var nextVideoTitle = nextVideo.Title;

    var metadata = { currentTitle: currentVideoTitle, currentDescription: currentVideoDescription, nextTitle: nextVideoTitle, clipID: currentClipID, permalink: currentPermalink, isAd: currentIsAd };

    return metadata;
}




Player.Fullscreen = false;
Player.IsFullscreen = function(pIsFullscreen) {

    if (pIsFullscreen != null) {
        Player.Fullscreen = pIsFullscreen;
    }


    return Player.Fullscreen;
}

Player.PermalinkClicked = function( pUrl )
{
    if( Interface.PermalinkClicked )
    {
        Interface.PermalinkClicked( pUrl );
    }
    else
    {
        document.location = pUrl;
    }
}























/*
 * Format: holds the possible formats of video
 */
function Format()
{}
Format.FlashVideo = "FLV";
Format.WindowsMediaVideo = "WMV";
Format.WindowsMediaVideoDRM = "WMV+DRM";
Format.LiveStream = "WMV";
Format.WindowsMediaAudio = "WMA";
Format.MP3 = "MP3";
Format.IDevice = "MP4";



















function Log( pMessage )
{
    if( document.getElementById("ErrorLogs") )
    {
        if( document.getElementById("ErrorLogs").style.display.toLowerCase() != "none" )
        {
			LogToNewWindow( pMessage );
			return;
		}
        
        if( Log.Count && Log.Count < 50 )
	    {   
	        document.getElementById("ErrorLogs").innerHTML += pMessage + "<br/>";
	        Log.Count++;
	    }
	    else
	    {
	        document.getElementById("ErrorLogs").innerHTML += pMessage + "<br/>";
	        Log.Count = 0;
	    }
    }
}

var _OpenWindow;
var _LastWasWhite = false;

function LogToNewWindow( pMessage )
{
	if( ! _OpenWindow )
	{
		_OpenWindow=window.open("", "newwin", "height=800, width=450,resizable=1,toolbar=0,menubar=0,scrollbars=1");
		_OpenWindow.document.write("<html><head><TITLE>Log Window</TITLE></head><body style='font-size:10pt;font-family:verdana;line-spacing:170%' ><div id='innerLogArea'></div></body></html>")		
	}
	
	var toWriteTo = _OpenWindow && _OpenWindow.document ? _OpenWindow.document.getElementById("innerLogArea") : null;
	
	if( toWriteTo )
	{
		var colour = _LastWasWhite ? "#CCCCCC" : "#FFFFFF";
		_LastWasWhite = ! _LastWasWhite;
		
		toWriteTo.innerHTML = '<span style=\'background-color:'+ colour +'\'>' + pMessage + '</span><br />' + toWriteTo.innerHTML;
	}
}





var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};

BrowserDetect.init();

function setCookie(name, value, expires, path, domain, secure)
{
	if( expires == null || expires == 'undefined' )
	{
		expires = new Date();
		
		// 7 days from now
		expires.setTime( expires.getTime() +  (7 * 24 * 60 * 60 * 1000) );
	}
	document.cookie= name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
}

function getCookie(name)
{
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1)
	{
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	}
	else
	{
		begin += 2;
	}
	var end = document.cookie.indexOf(";", begin);
	if (end == -1)
	{
		end = dc.length;
	}
	
	return unescape(dc.substring(begin + prefix.length, end));
}
function SilverlightPlayer( DOMparent, SceneFile, ThemeFile, Url, IsAd, BugUrl,VideoTitle, PermalinkUrl, ImageUrl )
{
	this.url			= Url;
	this.isAd			= IsAd;
	this.bugUrl			= BugUrl;
	this.imageUrl		= ImageUrl;
	this.permalinkUrl	= PermalinkUrl;
	this.videoTitle		= VideoTitle;
	
	_silverlightPlayer	= this;
	
	SilverlightPlayer.ThemeFile = ThemeFile;
	
	if( SilverlightController.IsCrossDomainLoad )
	{
		//give the xaml script time to initialize...
		setTimeout( function() { createMySilverlightPlugin( DOMparent, SceneFile, ThemeFile ); }, 200 );
}	
	else
	{
		//
		createMySilverlightPlugin( DOMparent, SceneFile, ThemeFile );
	}
}

SilverlightPlayer.ThemeFile;
SilverlightPlayer.ThemeNodes;
SilverlightPlayer.SilverlightVersion = '1.0';//'0.90.0';

SilverlightPlayer.prototype.PlayUrl = function( url, isAd, bugUrl,PermalinkUrl, ImageUrl )
{	
	var __Player = getPlayerInstance();
	
	if( __Player )
	{
		__Player.playUrl( url, isAd, bugUrl, PermalinkUrl, ImageUrl  );
	}
}


SilverlightPlayer.prototype.GetTimelinePosition = function () {
    var __Player = getPlayerInstance();
	var val = 0;
	if( __Player )
	{
		val = __Player.GetTimelinePosition();
	}
    return val;
}

SilverlightPlayer.prototype.Wait = function()
{	
	var __Player = getPlayerInstance();
	
	if( __Player )
	{
		__Player.wait();
	}
}

SilverlightPlayer.prototype.Loading = function()
{	
	var __Player = getPlayerInstance();
	
	if( __Player )
	{
		__Player.loading();
	}
}
var _width;
var _height;
var _theme;

function getPlayerHeight()
{
	return _height;
}
function getPlayerWidth()
{
	return _width;
}
function getPlayerTheme()
{
	return _theme;
}

function createMySilverlightPlugin( DOMparent, SceneFile, ThemeFile )
{  
    _width = '' + DOMparent.clientWidth;
    _height = '' + DOMparent.clientHeight;
    _theme  = ThemeFile;
	
     var sceneParameter = SilverlightController.IsCrossDomainLoad ? '#xamlContent' : SceneFile;
	
     Silverlight.createObject(
        sceneParameter,
        DOMparent,                  // DOM reference to hosting DIV tag.
        "SilverlightPlayer",         // Unique plug-in ID value.
        {                               // Per-instance properties.
            width: _width,   // Width of rectangular region of 
                                        // plug-in area in pixels.
            height: _height, // Height of rectangular region of 
                                        // plug-in area in pixels.
            inplaceInstallPrompt:true, // Determines whether to display 
                                        // in-place install prompt if 
                                        // invalid version detected.
            background:'#000000',       // Background color of plug-in.
            isWindowless:'true',       // Determines whether to display plug-in 
                                        // in Windowless mode.
                                        
            framerate:'30',             // MaxFrameRate property value.
            version:SilverlightPlayer.SilverlightVersion // Silverlight version to use.
        },
        {
            onError:_HandleError,        // OnError property value -- 
                                        // event handler function name.
            onLoad:null        // OnLoad property value -- 
                                        // event handler function name.
        },
        null);                          // Context value -- event handler function name.
}

function _HandleError( sender, errorArgs )
{
	 // The error message to display.
    var errorMsg = "Silverlight Player Error: \n\n";
    
    // Error information common to all errors.
    errorMsg += "Error Type:    " + errorArgs.errorType + "\n";
    errorMsg += "Error Message: " + errorArgs.errorMessage + "\n";
    errorMsg += "Error Code:    " + errorArgs.errorCode + "\n";
    
    // Determine the type of error and add specific error information.
    switch(errorArgs.errorType)
    {
        case "RuntimeError":
            // Display properties specific to RuntimeErrorEventArgs.
            if (errorArgs.lineNumber != 0)
            {
                errorMsg += "Line: " + errorArgs.lineNumber + "\n";
                errorMsg += "Position: " +  errorArgs.charPosition + "\n";
            }
            errorMsg += "MethodName: " + errorArgs.methodName + "\n";
            break;
        case "ParserError":
            // Display properties specific to ParserErrorEventArgs.
            errorMsg += "Xaml File:      " + errorArgs.xamlFile      + "\n";
            errorMsg += "Xml Element:    " + errorArgs.xmlElement    + "\n";
            errorMsg += "Xml Attribute:  " + errorArgs.xmlAttribute  + "\n";
            errorMsg += "Line:           " + errorArgs.lineNumber    + "\n";
            errorMsg += "Position:       " + errorArgs.charPosition  + "\n";
            break;
        case "ImageError":
            break;
        default:
            break;
    }

	Player.Error( errorMsg );
}
Utility = function(){

}

Utility.Log = function(message) {
    if (window.console) {
        console.log(message);
    }
}


function Interface()
{
    this.AllowUrlRewriting = false;
}

Interface.GetInstance = function()
{
	if( ! Interface.__instance )
	{
		Interface.__instance = new Interface();
	}
	
	return Interface.__instance;
}

Interface.SetUpNext = function( pVideo ){}
Interface.SetNowPlaying = function( pVideo ){}
