// Declare variable for array of video player information on the story pages.
var players = [];

var CVP_PAGES = {
	/***** Start - Road to the TOUR Championship *************************************************************/
	rttc: [{
		urlMatchStatement: (window.location.pathname.match('^/rttc/[0-9]{4}/.*/?')) ? true : false,
		player: 'main',
		playerInstanceName: 'tourCVPRttc',
		videoContainerId: 'tourRTCVideoPlayer',
		contextOverride: '',
		autostartOverride: '',
		
		/* Content Callbacks */
		onPlayerReady: function(){
			this.setAdSection('pgatour.com_pgatour_promotions_rttc');
			RTTCInit();
		},
		
		onContentPlay: function(playerId, contentId){
			var jsonText = this.getContentEntry(contentId);
			throwawayVideoObj = jsonText.evalJSON();	//create a video object
			playlist.each(function(s){
				testUrl = s.url;
				if (testUrl == throwawayVideoObj.id){
					if(s.shortDescription){
						$('tourRTCVideoTitle').innerHTML = s.shortDescription;
					}
					else{
						$('tourRTCVideoTitle').innerHTML = s.title;
					}
					$('tourRTCVideoDescription').innerHTML = s.description;
					throw $break;
				}
			});
			/* omniture video start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
		
		onAdPrerollUrl: function(playerId, contentId){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			return false;
		},
		
		onAdPlay: function(playerId, token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdEnd: function(playerId, token){
			isAdPlaying = false;
		},
		
		onContentComplete: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onContentPause: function(playerId, contentId, paused){
			/* omniture video pause */
			tourCVP.omniture.onContentPause();
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - Road to the TOUR Championship *****************************************************************/
	
	/***** Start - Leaderboard Popup Video Page (aka. Praxis) **************************************************/
	praxis: [{
		urlMatchStatement: (window.location.pathname.match('^/video/praxis/')) ? true : false,
		player: 'main',
		playerInstanceName: 'tourCVPMain',
		videoContainerId: 'tourCVP',
		contextOverride: '',
		autostartOverride: '',
		
		/* Content Callbacks */
		onPlayerReady: function(){
			onPraxisReady();
		},
	
		onContentPlay: function(playerId, contentId){
			cvp_updateVideoHeadlineDescription(contentId);
			/* omniture video start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
	
		onAdPlay: function(playerId, token){
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onContentComplete: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onContentPause: function(playerId, contentId, paused){
			/* omniture video pause */
			tourCVP.omniture.onContentPause();
		},
	
		onAdEnd: function(playerId, token) {
			isAdPlaying = false;
		},
	
		onTrackingAdCountdown: function(playerId, dataObj){
			var secondWord = (dataObj.secs == "1")?"second":"seconds";
			$('video_headline').innerHTML = '';
			$('video_description').innerHTML = '';
			//$('tourVidDetailBlurb').innerHTML = '<h4>Next video will start in  ' + dataObj.secs + ' ' + secondWord + '</h4>';
		},
		
		onAdPrerollUrl: function(playerId, contentId){
			var videoSkinDiv = $('tourFullTop');	//set skin back to default
			var videoSkinClick = $('tourVideoAd');
			
			document.getElementById('video_headline').innerHTML = '';
			document.getElementById('video_description').innerHTML = '';
			
			if(videoSkinDiv != null){
				videoSkinDiv.style.backgroundImage = 'url(http://i.cdn.turner.com/pgatour/.element/img/5.0/sect/video/r/rBGShadow.jpg)';
			}

			if(videoSkinClick != null){
				videoSkinClick.innerHTML = '';
			}
		},
		
		onContentBegin: function(playerId, contentId){
			videoPlaylistNumber++;
			if((videoPlaylistNumber > 0) && (stopAutoPlaylist == false)){
				Element.toggle('tourLeaderboardVideoSpan'+videoPlaylistNumber);
				$('tourLeaderboardVideos'+videoPlaylistNumber).className = 'tourVideoLatestOn clearfix';
				Element.toggle('tourLeaderboardVideoSpan'+(videoPlaylistNumber-1));
				$('tourLeaderboardVideos'+(videoPlaylistNumber-1)).className = 'tourVideoLatestOff clearfix';
				videoNowPlaying = videoPlaylistNumber;
			}
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - Leaderboard Popup Video Page ***********************************************************************************/
	
	/***** Start - Main Video Pages *********************************************************************************************/
	mainVideo: [{
		urlMatchStatement: (window.location.pathname.match('^/video/([rsh]/)?')) ? true : false,
		player: 'cheechako',
		playerInstanceName: 'tourCVPMain',
		videoContainerId: 'tourCVP',
		contextOverride: '',
		autostartOverride: '',
		
		/* Content Callbacks */
		onPlayerReady: function(){
			initialize_video_page();
		},
	
		onContentPlay: function(playerId, contentId){
			cvp_getRelatedUrl(contentId);
			cvp_updateVideoHeadlineDescription(contentId);
			/* omniture video start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
	
		onAdPlay: function(playerId, token){
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onContentComplete: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onContentPause: function(playerId, contentId, paused){
			/* omniture video pause */
			tourCVP.omniture.onContentPause();
		},
	
		onAdEnd: function(playerId, token){
			isAdPlaying = false;
		},
	
		onTrackingAdCountdown: function(playerId, dataObj){
			var secondWord = (dataObj.secs == "1")?"second":"seconds";
			$('video_headline').innerHTML = '';
			$('video_description').innerHTML = '';
			//$('tourVidDetailBlurb').innerHTML = '<h4>Next video will start in  ' + dataObj.secs + ' ' + secondWord + '</h4>';
		},
		
		onAdPrerollUrl: function(playerId, contentId){
			var videoSkinDiv = $('tourFullTop');	//set skin back to default
			var videoSkinClick = $('tourVideoAd');
			
			document.getElementById('video_headline').innerHTML = '';
			document.getElementById('video_description').innerHTML = '';
			
			if(videoSkinDiv != null){
				var videoTourType = window.location.pathname.match('/[sh]/');
				if(videoTourType == null){
					videoTourType = '/r/';
				}
				videoSkinDiv.style.backgroundImage = 'url(http://i.cdn.turner.com/pgatour/.element/img/5.0/sect/video/'+videoTourType.charAt(1)+'/'+videoTourType.charAt(1)+'BGShadow.jpg)';
			}
			if(videoSkinDiv.style.backgroundImage && oVideoChannel.title.match('More Driven')){
					$('video_section_title').style.visibility= 'hidden';
			}
			
			if(videoSkinClick != null){
				videoSkinClick.innerHTML = '';
			}
		},
		
		onContentBegin: function(playerId, contentId){
			socialMedia.video.reloadIframeSources(contentId);
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - Main Video Pages *****************************************************************************************************/
	
	/***** Start - WGC Video Pages ****************************************************************************************************/
	wgc: [{
		urlMatchStatement: (window.location.pathname.match('^/tournaments/(r470|r473|r476|r489)/video/')) ? true : false,
		player: 'main',
		playerInstanceName: 'tourCVPMain',
		videoContainerId: 'tourCVP',
		contextOverride: '',
		autostartOverride: '',
				
		/* Content Callbacks */	
		onPlayerReady: function(){
			var siteSection = 'wgc.com_';
			var location = window.location.href;	//get url so we can tell which wgc event we're in
			
			if(location.indexOf('r470') != -1){
				siteSection += 'matchplaychamp';
			}
			else if(location.indexOf('r473') != -1){
				siteSection += 'cachamp';
			}
			else if(location.indexOf('r476') != -1){
				siteSection += 'bridgestoneinvitational';
			}
			else if(location.indexOf('r489') != -1){
				siteSection += 'hsbcchamp';
			}
			
			this.setAdSection(siteSection);
			cvp_initWGCPage();
		},
	
		onContentPlay: function(playerId, contentId){
			cvp_updateVideoHeadlineDescription(contentId);
			/* omniture video start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
	
		onAdPlay: function(playerId, token) {
			$('tourVidDetailBlurb').innerHTML = '';	//clear title and description during ad playback
			$('tourVidDetailURL').innerHTML = '';
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onContentComplete: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onContentPause: function(playerId, contentId, paused){
			/* omniture video pause */
			tourCVP.omniture.onContentPause();
		},
	
		onAdEnd: function(playerId, token){
			isAdPlaying = false;
		},
	
		onTrackingAdCountdown: function(playerId, dataObj){
			var secondWord = (dataObj.secs == "1")?"second":"seconds";
			//$('tourVidDetailBlurb').innerHTML = '<h4>Next video will start in  ' + dataObj.secs + ' ' + secondWord + '</h4>';
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - WGC Video Pages ***************************************************************************************************/
	
	/***** Start - Home Page Video *************************************************************************************************/
	homepage: [{
		urlMatchStatement: (window.location.pathname.match('^/(index.html)?$')) ? true : false,
		player: 'main',
		playerInstanceName: 'tourCVPHomepage',
		videoContainerId: 'tourHPT1VideoPlayer',
		contextOverride: '',
		autostartOverride: '',
		
		/* Content Callbacks */
		onPlayerReady: function(){
			tourT1PlayerReady = true;
			sectionTest = window.location.pathname.match(/\/[srh]\//);
			switch(sectionTest){
				case '/s/':
					this.setAdSection('pgatour.com_champions_homepage');
					break;
				case '/h/':
					this.setAdSection('pgatour.com_nationwide_homepage');
					break;
				case '/r/': // Fall Through
				default:
					this.setAdSection('pgatour.com_pgatour_homepage');
					break;
			}
		},
		
		onAdPlay: function(playerId, token){
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onContentPlay: function(playerId, contentId){
			/* Omniture Video Start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
		
		onContentComplete: function(playerId, contentId){
			/* Omniture Video Complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onContentPause: function(playerId, contentId, paused){
			/* Omniture Video Pause */
			tourCVP.omniture.onContentPause();
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - Home Page Video *****************************************************************************************/
	
	/***** Start - Euphony Video Pages ***********************************************************************************/
	euphony: [{
		urlMatchStatement: (window.location.pathname.match('^/tournaments/(r027|r028|r060|r505|r011|presidentscup)/video/')) ? true : false,
		player: 'main',
		playerInstanceName: 'tourCVPMain',
		videoContainerId: 'tourCVP',
		contextOverride: '',
		autostartOverride: '',
		
		/* Content Callbacks */
		onPlayerReady: function(){
			var siteSection = 'pgatour.com_pgatour_tournaments_';
			
			if(tourn_id){
				siteSection += tourn_id;
				siteSection += (tourn_id != 'r011')? '_video_main' : '';
			}
	
			this.setAdSection(siteSection);
			cvp_initEuphonyPage();
		},
		
		onContentPlay: function(playerId, contentId){
			cvp_updateVideoHeadlineDescription(contentId);
			/* omniture ad pre-roll */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
		
		onContentComplete: function(playerId, contentId){
			/* Omniture Video Complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onAdPlay: function(playerId, token){
			$('tourVidDetailBlurb').innerHTML = '';	//clear title and description during ad playback
			$('tourVidDetailURL').innerHTML = '';
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdEnd: function(playerId, token) {
			isAdPlaying = false;
		},
		
		onTrackingAdCountdown: function(playerId, dataObj) {
			var secondWord = (dataObj.secs == "1")?"second":"seconds";
			$('tourVidDetailBlurb').innerHTML = '<h4>Next video will start in  ' + dataObj.secs + ' ' + secondWord + '</h4>';
		},
		
		onContentPause: function(playerId, contentId, paused){
			/* Omniture Video Pause */
			tourCVP.omniture.onContentPause();
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - Euphony Video Pages ****************************************************************************************/
	
	/***** Start - Story Video Pages ***********************************************************************************/
	story: [{
		urlMatchStatement: (window.location.pathname.match('^/[0-9]{4}/.*/?')) ? true : false,
		createArrayOfObjects: function(){
			// "players" is an array created on the page from the CMS containing the player's playlist, player used, and video container ID.
			var len = players.length;
	
			// Start - Loop over players array to create the array of story objects
			for(var i=0; i<=len-1; i++){
				tourCVP.pages.story[i] = {
					urlMatchStatement: (window.location.pathname.match('^/[0-9]{4}/.*/?')) ? true : false,
					player: players[i].player,
					playerInstanceName: 'tourCVPStory' + i,
					videoContainerId: players[i].divId,
					contextOverride: '',
					autostartOverride: '',
					flashVars: {
						contentId: players[i].playlist[0].url
					},
					
					/* Content Callbacks */
					onPlayerReady: function(){
						var storyAdSection = (tourFreeWheelBaseSiteSection != '')?tourFreeWheelBaseSiteSection : 'pgatour.com_pgatour_news';	//default to pgatour.com_pgatour_news if empty string		
				
						if(this.getWidth() == '640'){	//hate this hack.  should check player instance, but it seems to always be 'inline' if there is a T1 and an inline in the page at the same time
							storyAdSection += '_t1';
						}
						else{
							storyAdSection += '_inpage';
						}
					
						this.setAdSection(storyAdSection);
					},
					
					onContentPlay: function(playerId, contentId){
						/* omniture video start */
						tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
					},
					
					onAdPlay: function(playerId, token){
						/* omniture ad pre-roll */
						tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
					},
					
					onContentComplete: function(playerId, contentId){ 
						/* omniture video complete */
						tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
					},
					
					onContentPause: function(playerId, contentId, paused){
						/* omniture video pause */
						tourCVP.omniture.onContentPause();
					},
		
					/* Start - Content Callbacks for HTML5 */
					onAdStarted: function(token){
						$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
						isAdPlaying = true;
						/* omniture ad pre-roll */
						tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
					},
					
					onAdFinished: function(token){
						isAdPlaying = false;
					},
					
					onContentCompleted: function(playerId, contentId){
						/* omniture video complete */
						tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
					}
					/* End - Content Callbacks for HTML5 */
				}
				
				$(players[i].divId+'Headline').update(players[i].playlist[0].headline);
				$(players[i].divId+'Desc').update(players[i].playlist[0].description);
			} // End - Loop over players array to create the array of story objects
		}
	}],
	/***** End - Story Video Pages ****************************************************************************************/
	
	/***** Start - Leaderboard Inline Video ****************************************************************************************/
	leaderboard: [{
		urlMatchStatement: (window.location.pathname.match('^/r/leaderboard/')) ? true : false,
		player: 'inline',
		playerInstanceName: 'tourCVPRR',
		videoContainerId: 'cvpRRDiv',
		contextOverride: '',
		autostartOverride: '',
		
		/* Content Callbacks */
		onPlayerReady: function(){
			if(!isRefresh){	//on page load
				fetchPlaylist();
			}
			else{	//playlist auto-refresh
				this.play(rrPlaylist[0].url);
			}
			
			this.setAdSection('pgatour.com_embed_rightrail');
		},
		
		onContentPlay: function(playerId, contentId){
			/* clearInterval(plRefreshId);	//when a video starts, cancel the playlist refresh
			plRefreshId = setInterval(refreshPlaylist, 600000);	//then reset the refresh */
			/* omniture video start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
		
		onAdPlay: function(playerId, token){
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdEnd: function(playerId, token){
			isAdPlaying = false;
		},
		
		onContentComplete: function(playerId, contentId){ 
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onContentPause: function(playerId, contentId, paused){
			/* omniture video pause */
			tourCVP.omniture.onContentPause();
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - Leaderboard Inline Video ****************************************************************************************/
	
	/***** Start - Livepresser ****************************************************************************************/
	livepresser: [{
		urlMatchStatement: (window.location.pathname.match('^/livepresser/')) ? true : false,
		player: 'main',
		playerInstanceName: 'tourCVPPresser',
		videoContainerId: 'tourCVP',
		contextOverride: '',
		autostartOverride: '',
		contentId: '/video/video/live/live_presser',
		
		/* Content Callbacks */
		onContentPlay: function(playerId, contentId){
			/* omniture video start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - Livepresser ****************************************************************************************/
	
	/***** Start - Tournaments index page video ****************************************************************************************/
	tournaments: [{
		urlMatchStatement: (window.location.pathname.match('^/tournaments/[rsh][0-9]{3}/') && (!window.location.pathname.match('^/tournaments/r(027|028|505|060)/'))) ? true : false,
		player: 'main',
		playerInstanceName: 'tourCVPMain',
		videoContainerId: 'tourCVP',
		contextOverride: '',
		autostartOverride: '',
		
		/* Content Callbacks */
		onPlayerReady: function(){
			var siteSection = 'pgatour.com_';
			
			if(tourn_id.indexOf('r') != -1) {	//pgatour
				siteSection += 'pgatour_tournaments_'+tourn_id;
			} else if(tourn_id.indexOf('h') != -1) {	//nationwide
				siteSection += 'nationwide_tournaments_'+tourn_id;
			} else if(tourn_id.indexOf('s') != -1) {	//champions
				siteSection += 'champions_tournaments_'+tourn_id;
			} else {	//default
				siteSection += 'pgatour_tournaments';
			}
			
			this.setAdSection(siteSection);
			cvp_playerReady();
		},
		
		onContentPlay: function(playerId, contentId){
			cvp_updateVideoHeadlineDescription(contentId);
			/* omniture video start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
		
		onAdPlay: function(playerId, token){
			$('tourVidDetailBlurb').innerHTML = '';	//clear title and description during ad playback
			$('tourVidDetailURL').innerHTML = '';
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onContentComplete: function(playerId, contentId){ 
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onContentPause: function(playerId, videoId, paused){
			/* omniture video pause */
		 	tourCVP.omniture.onContentPause();
		},
		
		onAdEnd: function(playerId, token){
			isAdPlaying = false;
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - Tournaments index page video ****************************************************************************************/
	
	/***** Start - Players index page video ****************************************************************************************/
	players: [{
		urlMatchStatement: (window.location.pathname.match('^/players/[0-9]{2}/[0-9]{2}/[0-9]{2}/')) ? true : false,
		player: 'main',
		playerInstanceName: 'tourCVPMain',
		videoContainerId: 'tourCVP',
		contextOverride: '',
		autostartOverride: '',
		
		/* Content Callbacks */
		onPlayerReady: function() {
			if(full_name == 'Tiger Woods') {	//some players get specific site sections
				this.setAdSection('pgatour.com_players_tigerwoods');
			} else if(full_name == 'Phil Mickelson') {
				this.setAdSection('pgatour.com_players_philmickelson');
			} else if(full_name == 'Jim Furyk') {
				this.setAdSection('pgatour.com_players_jimfuryk');
			} else if(full_name == 'Vijay Singh') {
				this.setAdSection('pgatour.com_players_vijaysingh');
			} else {
				this.setAdSection('pgatour.com_players');	//generic player section
			}
			cvp_playerReady();
		},
		
		onContentPlay: function(playerId, contentId){
			cvp_updateVideoHeadlineDescription(contentId);
			/* omniture video start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
		
		onAdPlay: function(playerId, token){
			$('tourVidDetailBlurb').innerHTML = '';	//clear title and description during ad playback
			$('tourVidDetailURL').innerHTML = '';
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onContentComplete: function(playerId, contentId){ 
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onContentPause : function(playerId, contentId, paused) {
			/* omniture video pause */
			tourCVP.omniture.onContentPause();
		},
		
		onAdEnd: function(playerId, token) {
			isAdPlaying = false;
		},
		
		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('tourRTCVideoDescription').innerHTML = '';	//clear title and description during ad playback
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}],
	/***** End - Players index page video ****************************************************************************************/
	
	/***** Start - Fantasy video ****************************************************************************************/
	fantasy: [{
		urlMatchStatement: (window.location.pathname.match('^/fantasy/')) ? true : false,
		player: 'inline',
		playerInstanceName: 'tourCVPFantasy',
		videoContainerId: 'tourCVP',
		contextOverride: '',
		autostartOverride: 'false',
		
		/* Content Callbacks */
		onPlayerReady: function() {
			this.setAdSection('pgatour.com_pgatour_fantasy'); // TODO: need to find out if SAS will want to create a new site section for this 
			cvp_playerReady();
			this.mute();	//default the player to muted
		},
		
		onContentPlay: function(playerId, contentId) {
			var jsonText = this.getContentEntry(contentId);
			var vObj = jsonText.evalJSON();	//create a video object
			document.getElementById('cvpFantasyHeadline').innerHTML = vObj.headline;
			document.getElementById('cvpFantasyDescrip').innerHTML = vObj.description;
			/* omniture video start */
			tourCVP.omniture.onContentPlay(contentId, this.options.playerInstanceName);
		},
		onAdPlay: function(playerId, token) {
			$('cvpFantasyHeadline').innerHTML = '';	//clear title and description during ad playback
			$('cvpFantasyDescrip').innerHTML = '';
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
			$('cvpFantasyHeadline').innerHTML = '';	//clear title and description during ad playback
			$('cvpFantasyDescrip').innerHTML = '';
			isAdPlaying = true;
		},
		onContentComplete: function(playerId, contentId) { 
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		},
		
		onContentPause: function(playerId, contentId, paused) {
			/* omniture video pause */
			tourCVP.omniture.onContentPause();
		},
	
		onAdEnd: function(playerId, token) {
			isAdPlaying = false;
		},
	
		onTrackingAdCountdown: function(playerId, dataObj) {
			var secondWord = (dataObj.secs == "1")?"second":"seconds";
		
			$('cvpFantasyHeadline').innerHTML = 'Next video will start in  ' + dataObj.secs + ' ' + secondWord + '';
		},

		/* Start - Content Callbacks for HTML5 */
		onAdStarted: function(token){
			$('cvpFantasyHeadline').innerHTML = '';	//clear title and description during ad playback
			$('cvpFantasyDescrip').innerHTML = '';
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
			$('cvpFantasyHeadline').innerHTML = '';	//clear title and description during ad playback
			$('cvpFantasyDescrip').innerHTML = '';
			isAdPlaying = true;
			/* omniture ad pre-roll */
			tourCVP.omniture.onAdPlay(this.options.playerInstanceName);
		},
		
		onAdFinished: function(token){
			isAdPlaying = false;
		},
		
		onContentCompleted: function(playerId, contentId){
			/* omniture video complete */
			tourCVP.omniture.onContentComplete(contentId, this.options.playerInstanceName);
		}
		/* End - Content Callbacks for HTML5 */
	}]
	/***** End - Fantasy video ****************************************************************************************/
};
