var url = window.location.href;
var urlPart = url.split("/");
var domain = urlPart[2];
var sportid = urlPart[3];
var d = new Date();
var rnd = d.getTime();
/**
document.write("<div id='nav-dividor'></div>");
document.write("<div id='videoplayer' style='float:right;margin:0'></div>");
var s2 = new SWFObject("http://www.nwcraiders.com/swf/flvplayer2.swf","playlist","190","190","7");
	s2.addParam("allowfullscreen","true");
	s2.addVariable("file","http://www.nwcraiders.com/xml/playlist.aspx?sportid=" + sportid + "&r=" + rnd);
	s2.addVariable("displayheight","126");
	s2.addVariable("backcolor", "0x680000");
	s2.addVariable("frontcolor","0xffffff");
	s2.addVariable("lightcolor","0xfca000");
	s2.addVariable("width","190");
	s2.addVariable("height","190");
	s2.addVariable("allowdomain", "www.nwcraiders.com");
	s2.addVariable("wmode","transparent");
	s2.write("videoplayer");
document.write("<br/><a href='#' onclick='openVideoLibrary();'><img width='190' height='25' alt='Open video library' border='0'  src='http://www.nwcraiders.com/images/more_videos.gif'/></a>");
**/
if (url.indexOf('videos') > 0){
	
}else{
var playerId = 'flv-sport';
	var player;
	function playerReady(obj) {
		player =$('#' + playerId + '-object').get(0);
		$('#' + playerId + '-playlist').load('http://www.nwcraiders.com/xml/playlist2.aspx?sportid=' + sportid + '&r=' + rnd, function(){																			
			$(this).find('li').each(function(i){
				if (i==0){
					 if (player){
						$(this).addClass('active');
						player.sendEvent("LOAD", {file:$(this).attr('base') + $(this).attr('id') + '.'+$(this).attr('format'),image:$(this).attr('base')+$(this).attr('id')+'.jpg'});
						player.sendEvent("PLAY","false");	 
					 }	
				}
				$(this).click(function(i){
					 if (player){
						$(this).parent().find('.active').removeClass('active');
						$(this).addClass('active');
						player.sendEvent("LOAD", {file:$(this).attr('base') + $(this).attr('id') + '.'+$(this).attr('format'),image:$(this).attr('base')+$(this).attr('id')+'.jpg'});
						player.sendEvent("PLAY","false");	 
						if (typeof(clicky) != 'undefined'){
							clicky.log($(this).attr('base') + $(this).attr('id') + '.'+$(this).attr('format'),'Video: ' + $(this).text(), 'pageview');
						}
					 }
				});
			});
		});
	};
	
	document.write('<div id="nav-dividor"></div><div class="player-canvas"><div id="' + playerId + '-canvas">Loading...</div><div id="' + playerId + '-playlist" class="playlist"></div><div onclick="openVideoLibrary();"><img width="190" height="25" alt="Open video library" border="0" src="http://www.nwcraiders.com/images/more_videos.gif"/></div></div>');
  	var swfObject = new SWFObject('http://www.nwcraiders.com/swf/player.swf',playerId + '-object','190','159','9','#ffffff');
  	swfObject.addParam('allowfullscreen','true');
  	swfObject.addParam('type','video');
  	swfObject.addParam('allowscriptaccess','always');
  	swfObject.addParam('wmode','opaque');
   	swfObject.addParam('allowdomain','nwcraiders.com');
  	//swfObject.addVariable('skin','http://www.nwcraiders.com/swf/nwcraiders.swf?v=1.2.1');
  	swfObject.addVariable('stretching', 'uniform');
  	swfObject.addVariable('backcolor', '#580000');
  	swfObject.addVariable('frontcolor', '#ffffff');
  	swfObject.addVariable('lightcolor', '#aa0000');
  	swfObject.addVariable('displayclick', 'fullscreen');
  	swfObject.write(playerId + '-canvas');
}