
// ----------------------------------------------------------
// ------------ launch quicktime movie ----------------------
// ----------------------------------------------------------
function launchPlayer(id) {
	//alert('launching ' + id);
	var movie;
	var w = movies[id].width;
	var h = movies[id].height;
	var url = movies[id].url;

	var video    = "moore407g5.shaps.hawaii.edu:80/qtmedia/Media/";
	var qtclsid  = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
	var plugin   = "http://www.apple.com/quicktime/download/";
	var cabversion = "6,0,2,0";
	var code     = "http://www.apple.com/qtactivex/qtplugin.cab#" + cabversion;

	var mp='<object classid="' + qtclsid + '" width="' + w + '" ' +
		'height="' + h + '" codebase="' + code + '">' +
		'<param name="SRC" value="http://' + video + url + '">' +
		'<param name="QTSRC" value="rtsp://' + video + url + '">' +
		'<param name="TYPE" value="video/quicktime">' +
		'<param name="AUTOPLAY" value="true">' +
		'<param name="CONTROLLER" value="true">' +
		'<embed src="http://' + video + url + '" ' +
        'qtsrc="rtsp://' + video + url + '" ' +
        'type="video/quicktime" ' +
        'width="' + w + '" ' +
        'height="' + h + '" ' +
        'autoplay="true" ' +
        'controller="true" ' +
        'pluginspage="' + plugin + '">' +
		'</embed></object>';

	// write the movie object to the picture window
	$('#movie').html(mp);
	//alert(mp);

	$("#pres_name").html(movies[id].person);
	$("#pres_affil").html(movies[id].affiliation);
	$("#pres_topic").html(movies[id].topic);
	$("#pres_duration").html(movies[id].duration);
}

$(document).ready(function(){
   // Your code here
		$("img").click(function(event) {
		//alert("this id is " + this.id);
			  launchPlayer(this.id)
			  event.preventDefault(); });

 });
