// JavaScript Document

$(document).ready(init);

var player = null;

function init()
{
	// Fish
	var flashvars = {};
	var params = {
		wmode: "transparent",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		// xml files must be relative to the HTML file that the JW Player is embedded in
		flashvars: "file=http://streaming.osu.edu/mediawww/digitalunion/tellastory/Fish_DougDangler.flv&fullscreen=false",
		};
	var attributes = {
		id: "fish",
		name: "fish",
		};

	swfobject.embedSWF("../../mediaplayer/player.swf", "fish", "320", "20", "9.0.0", "", flashvars, params, attributes);
	
	// Time and the River
	var flashvars = {};
	var params = {
		wmode: "transparent",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		// xml files must be relative to the HTML file that the JW Player is embedded in
		flashvars: "file=http://streaming.osu.edu/mediawww/digitalunion/tellastory/TimeandtheRiver_Julia_Applegate.flv&fullscreen=false",
		};
	var attributes = {
		id: "timeandtheriver",
		name: "timeandtheriver",
		};

	swfobject.embedSWF("../../mediaplayer/player.swf", "timeandtheriver", "320", "20", "9.0.0", "", flashvars, params, attributes);
	
	// Untitled
	var flashvars = {};
	var params = {
		wmode: "transparent",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		// xml files must be relative to the HTML file that the JW Player is embedded in
		flashvars: "file=http://streaming.osu.edu/mediawww/digitalunion/tellastory/Untitled_LaurenAngelone.flv&fullscreen=true",
		};
	var attributes = {
		id: "untitled",
		name: "untitled",
		};

	swfobject.embedSWF("../../mediaplayer/player.swf", "untitled", "320", "240", "9.0.0", "", flashvars, params, attributes);
	
	// Bob and Obama
	var flashvars = {};
	var params = {
		wmode: "transparent",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		// xml files must be relative to the HTML file that the JW Player is embedded in
		flashvars: "file=http://streaming.osu.edu/mediawww/digitalunion/tellastory/Bob%26Obama_Bob Eckhardt.flv&fullscreen=true",
		};
	var attributes = {
		id: "bobandobama",
		name: "bobandobama",
		};

	swfobject.embedSWF("../../mediaplayer/player.swf", "bobandobama", "320", "240", "9.0.0", "", flashvars, params, attributes);
	
	// Diamond in the Rain
	var flashvars = {};
	var params = {
		wmode: "transparent",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		// xml files must be relative to the HTML file that the JW Player is embedded in
		flashvars: "file=http://streaming.osu.edu/mediawww/digitalunion/tellastory/DiamondintheRain_Bill Keating.flv&fullscreen=false",
		};
	var attributes = {
		id: "diamondintherain",
		name: "diamondintherain",
		};

	swfobject.embedSWF("../../mediaplayer/player.swf", "diamondintherain", "320", "20", "9.0.0", "", flashvars, params, attributes);
	
	// Dutch Harbor
	var flashvars = {};
	var params = {
		wmode: "transparent",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		// xml files must be relative to the HTML file that the JW Player is embedded in
		flashvars: "file=http://streaming.osu.edu/mediawww/digitalunion/tellastory/DutchHarbor_KarinHooks.flv&fullscreen=true",
		};
	var attributes = {
		id: "dutchharbor",
		name: "dutchharbor",
		};

	swfobject.embedSWF("../../mediaplayer/player.swf", "dutchharbor", "320", "240", "9.0.0", "", flashvars, params, attributes);
	
	// Johnny Appleseed
	var flashvars = {};
	var params = {
		wmode: "transparent",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		// xml files must be relative to the HTML file that the JW Player is embedded in
		flashvars: "file=http://streaming.osu.edu/mediawww/digitalunion/tellastory/JohnnyAppleseed.flv&fullscreen=true",
		};
	var attributes = {
		id: "johnnyappleseed",
		name: "johnnyappleseed",
		};

	swfobject.embedSWF("../../mediaplayer/player.swf", "johnnyappleseed", "320", "240", "9.0.0", "", flashvars, params, attributes);
	
	// My Name is River
	var flashvars = {};
	var params = {
		wmode: "transparent",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		// xml files must be relative to the HTML file that the JW Player is embedded in
		flashvars: "file=http://streaming.osu.edu/mediawww/digitalunion/tellastory/MyNameisRiver_RayCalabrese.flv&fullscreen=true",
		};
	var attributes = {
		id: "mynameisriver",
		name: "mynameisriver",
		};

	swfobject.embedSWF("../../mediaplayer/player.swf", "mynameisriver", "320", "240", "9.0.0", "", flashvars, params, attributes);
}

function playerReady(obj) {
	// this function is called after the JW Player instantiates.
	// obj['id'] is the id given to the player's attributes
}