window.addEvent('load', function() {
	var currentVideo = 0;
	var videos = 0;
	$$('.video-link').each(function(link){
		videos++;
		link.id = "video"+videos;
//		if(videos != currentVideo)
//		{
			link.style.color = "#231F20";
			link.style.background = "none";
			link.style.paddingRight = "0px";
//		}
//		var video = link.getAttribute('rel').replace(".swf","");
		link.addEvent('click',function(e){
			if($('video'+currentVideo))
			{
				$('video'+currentVideo).style.fontSize = "12px";
				$('video'+currentVideo).style.fontWeight = "normal";
				$('video'+currentVideo).style.color = "#231F20";
				$('video'+currentVideo).style.background = "none";
				$('video'+currentVideo).style.paddingRight = "0px";
			}
			currentVideo = link.id.replace("video","");
			$('video'+currentVideo).style.fontSize = "13px";
			$('video'+currentVideo).style.fontWeight = "bold";
			$('video'+currentVideo).style.color = "#589199";
			$('video'+currentVideo).style.background = "url(images/blue-arrow.jpg) no-repeat right -4px";
			$('video'+currentVideo).style.paddingRight = "14px";
//			$('video-player').innerHTML = "<embed height='331' width='383' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' salign='lt' name='FLVPlayer' scale='noscale' quality='high' flashvars='&amp;MM_ComponentVersion=1&amp;skinName=Halo_Skin_3&amp;streamName=video/"+video+"&amp;autoPlay=true&amp;autoRewind=false' src='FLVPlayer_Progressive.swf'/>";
		});
		link.addEvent('mouseenter',function(e){
			link.style.color = "#589199";
			link.style.background = "url(images/blue-arrow.jpg) no-repeat right -4px";
			link.style.paddingRight = "14px";
		});
		link.addEvent('mouseleave',function(e){
			if(currentVideo != link.id.replace("video",""))
			{
				link.style.color = "#231F20";
				link.style.background = "none";
				link.style.paddingRight = "0px";
			}
		});
	});
});
