﻿/// <reference path="libs/jquery-1.3.1-vsdoc.js" />


$(document).ready(function() {

	// remove youtube link
	$('.video-box a').attr('href', '#video2');
	$('.video-box a').click(function() {
	
		//changeComments($(this).attr('rel'));
		changeVideo($(this).attr('rel'));
		
		// high light actual video
		$(".video-box a img").css("border", "solid 1px #000000");
		$("img", $(this)).css("border", "solid 1px #C1D731");
	});
	
	function changeVideo(value) {
		var params = { wmode: "transparent" };
		swfobject.embedSWF("http://www.youtube.com/v/" + value + "&hl=en&fs=1&ap=%2526fmt%3D18", "youtube-video", "701", "400", "7", "/_Resources/flash/expressInstall.swf", false, params, false);
	}

/*
	function changeComments(id) {
		var loadingImage = '<img src="/_Resources/img/ajax-loader.gif" alt="loading" />';
		$('.videoCommentBanner').html(loadingImage);

		$.ajax({
			type: "GET",
			url: "/video/comments.aspx?id=" + id,
			dataType: "html",
			success: function(msg) {
				$('.videoCommentBanner').html(msg + '<br clear="all"/>');
			}
		});
	}

	if($('.video-box a:first').attr('rel'))
		changeComments($('.video-box a:first').attr('rel'));
*/	
});
