function updateAltMediaLinks() {
	$('videoiframe').className = 'video';				

	// grab all links within the alternate medias container to set behavior
	var mediaLinks = $$('a[class^=alt-media]');

	// find which video is currently being played (and only act if it is a vid and not an img)
	var curVid = $('videoiframe').src;
	
	// CASE: user has selected a video
	if (curVid.indexOf('html') != -1) {	
		for (var i = 0; i < mediaLinks.length; i++) {
			mediaLinks[i].onclick = function() {
				$('videoiframe').src = this.href;
				mediaLinks.each(function(el){el.className = 'alt-media' }); // un-highlight all
				this.className = 'alt-media-here'; // highlight current

				// allow for setting of height for  win media
				var linkParent = this.getParent();
				if (linkParent.getProperty('id') == 'wmp') {
					$('video').className = 'win-med';
				} else {
					$('video').className = '';
				}
				
				return false;
			};
		}
	} 
}

window.addEvent('domready', updateAltMediaLinks);

















