<!--
$(document).ready(function(){
 
	var playItem = 0;
 
	var myPlayList = [

{name:"Varuna",mp3:"features/trow/1.mp3",ogg:"features/trow/1.ogg"},
{name:"Woolen Blankets",mp3:"features/trow/2.mp3",ogg:"features/trow/2.ogg"},
{name:"Sea Smoke",mp3:"features/trow/3.mp3",ogg:"features/trow/3.ogg"},
{name:"Oarsman",mp3:"features/trow/4.mp3",ogg:"features/trow/4.ogg"},
{name:"Pitch and Resin",mp3:"features/trow/5.mp3",ogg:"features/trow/5.ogg"},
{name:"Monologues",mp3:"features/trow/6.mp3",ogg:"features/trow/6.ogg"},
{name:"Tuez Le Tous, Dieu Reconnaitra Les Siens",mp3:"features/trow/7.mp3",ogg:"features/trow/7.ogg"},
{name:"Greek Fire",mp3:"features/trow/8.mp3",ogg:"features/trow/8.ogg"},
{name:"The Attic",mp3:"features/trow/9.mp3",ogg:"features/trow/9.ogg"},
{name:"You Missed The Point",mp3:"features/trow/10.mp3",ogg:"features/trow/10.ogg"},
{name:"Grounded, I Am Traveling Light",mp3:"features/trow/11.mp3",ogg:"features/trow/11.ogg"},
{name:"Tanzih",mp3:"features/trow/12.mp3",ogg:"features/trow/12.ogg"},
{name:"Tashbih",mp3:"features/trow/13.mp3",ogg:"features/trow/13.ogg"}
	];
 
	// Local copy of jQuery selectors, for performance.
	var jpPlayTime = $("#jplayer_play_time");
	var jpTotalTime = $("#jplayer_total_time");
	var jpStatus = $("#demo_status"); // For displaying information about jPlayer's status in the demo page
 
	$("#jquery_jplayer").jPlayer({
		ready: function() {
			displayPlayList();
			playListInit(false); // Parameter is a boolean for autoplay.
			demoInstanceInfo(this.element, $("#demo_info")); // This displays information about jPlayer's configuration in the demo page
		},
		oggSupport: true
	})
	.jPlayer("onProgressChange", function(loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime) {
		jpPlayTime.text($.jPlayer.convertTime(playedTime));
		jpTotalTime.text($.jPlayer.convertTime(totalTime));
 
		
	})
	.jPlayer("onSoundComplete", function() {
		playListNext();
	});
 
	$("#jplayer_previous").click( function() {
		playListPrev();
		return false;
	});
 
	$("#jplayer_next").click( function() {
		playListNext();
		return false;
	});
 
	function displayPlayList() {
		$("#jplayer_playlist ul").empty();
		for (i=0; i < myPlayList.length; i++) {
			var listItem = (i == myPlayList.length-1) ? "<li class='jplayer_playlist_item_last'>" : "<li>";
			listItem += "<a href='#' id='jplayer_playlist_item_"+i+"' tabindex='1'>"+ myPlayList[i].name +"</a></li>";
			$("#jplayer_playlist ul").append(listItem);
			$("#jplayer_playlist_item_"+i).data( "index", i ).click( function() {
				var index = $(this).data("index");
				if (playItem != index) {
					playListChange( index );
				} else {
					$("#jquery_jplayer").jPlayer("play");
				}
				$(this).blur();
				return false;
			});
		}
	}
 
	function playListInit(autoplay) {
		if(autoplay) {
			playListChange( playItem );
		} else {
			playListConfig( playItem );
		}
	}
 
	function playListConfig( index ) {
		$("#jplayer_playlist_item_"+playItem).removeClass("jplayer_playlist_current").parent().removeClass("jplayer_playlist_current");
		$("#jplayer_playlist_item_"+index).addClass("jplayer_playlist_current").parent().addClass("jplayer_playlist_current");
		playItem = index;
		$("#jquery_jplayer").jPlayer("setFile", myPlayList[playItem].mp3, myPlayList[playItem].ogg);
	}
 
	function playListChange( index ) {
		playListConfig( index );
		$("#jquery_jplayer").jPlayer("play");
	}
 
	function playListNext() {
		var index = (playItem+1 < myPlayList.length) ? playItem+1 : 0;
		playListChange( index );
	}
 
	function playListPrev() {
		var index = (playItem-1 >= 0) ? playItem-1 : myPlayList.length-1;
		playListChange( index );
	}
});
-->
