//<![CDATA[
$(document).ready(function(){

	$("#jquery_jplayer_1").jPlayer({
		ready: function () {
			$(this).jPlayer("setMedia", {
		        m4a: "http://www.sdrecordings.com/audio/voice_overs/josh.m4a",
				oga: "http://www.sdrecordings.com/audio/voice_overs/josh.ogg"

		
			}).jPlayer("stop");
		},
		ended: function (event) {
			$("#jquery_jplayer_2").jPlayer("play", 0);
		},
		swfPath: "js",
		supplied: "oga, m4a"
	})
	.bind($.jPlayer.event.play, function() { // Using a jPlayer event to avoid both jPlayers playing together.
			$(this).jPlayer("pauseOthers");
	});

	$("#jquery_jplayer_2").jPlayer({
		ready: function () {
			$(this).jPlayer("setMedia", {
	            m4a: "http://www.sdrecordings.com/audio/voice_overs/rachel-ashley.m4a",
				oga: "http://www.sdrecordings.com/audio/voice_overs/rachel-ashley.ogg"
			});
		},
		ended: function (event) {
			$("#jquery_jplayer_1").jPlayer("play", 0);
		},
		swfPath: "js",
		supplied: "oga, m4a",
		cssSelectorAncestor: "#jp_interface_2"
	})
	.bind($.jPlayer.event.play, function() { // Using a jPlayer event to avoid both jPlayers playing together.
			$(this).jPlayer("pauseOthers");
	});

	$("#jquery_jplayer_3").jPlayer({
		ready: function () {
			$(this).jPlayer("setMedia", {
		        m4a: "http://www.sdrecordings.com/audio/voice_overs/phil-sayer.m4a",
				oga: "http://www.sdrecordings.com/audio/voice_overs/phil-sayer.ogg"
			});
		},
		ended: function (event) {
			$(this).jPlayer("play");
		},
		swfPath: "js",
		supplied: "oga, m4a",
		cssSelectorAncestor: "#jp_interface_3"
	})
	.bind($.jPlayer.event.play, function() { // Using a jPlayer event to avoid both jPlayers playing together.
			$(this).jPlayer("pauseOthers");
	});
	
	$("#jquery_jplayer_4").jPlayer({
		ready: function () {
			$(this).jPlayer("setMedia", {
		        m4a: "http://www.sdrecordings.com/audio/voice_overs/kate-whelan.m4a",
				oga: "http://www.sdrecordings.com/audio/voice_overs/kate-whelan.ogg"
			});
		},
		ended: function (event) {
			$(this).jPlayer("play");
		},
		swfPath: "js",
		supplied: "oga, m4a",
		cssSelectorAncestor: "#jp_interface_4"
	})
	.bind($.jPlayer.event.play, function() { // Using a jPlayer event to avoid both jPlayers playing together.
			$(this).jPlayer("pauseOthers");
	});

	$("#jplayer_inspector_1").jPlayerInspector({jPlayer:$("#jquery_jplayer_1")});
	$("#jplayer_inspector_2").jPlayerInspector({jPlayer:$("#jquery_jplayer_2")});
	$("#jplayer_inspector_3").jPlayerInspector({jPlayer:$("#jquery_jplayer_3")});
});
//]]>
