/*
$(document).ready(function(){

	$("#jquery_jplayer").jPlayer({
			ready: function () {
				this.element.jPlayer("../mp3/test.mp3");
			},
			volume: 50,
			oggSupport: false
		})

		.jPlayerId("play", "player_play")
		.jPlayerId("pause", "player_pause")
		.jPlayerId("stop", "player_stop")
		.jPlayerId("loadBar", "player_progress_load_bar")
		.jPlayerId("playBar", "player_progress_play_bar")
		.jPlayerId("volumeMin", "player_volume_min")
		.jPlayerId("volumeMax", "player_volume_max")
		.jPlayerId("volumeBar", "player_volume_bar")
		.jPlayerId("volumeBarValue", "player_volume_bar_value")
		.onProgressChange( function(loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime) {
			var myPlayedTime = new Date(playedTime);
			var ptMin = (myPlayedTime.getUTCMinutes() < 10) ? "0" + myPlayedTime.getUTCMinutes() : myPlayedTime.getUTCMinutes();
			var ptSec = (myPlayedTime.getUTCSeconds() < 10) ? "0" + myPlayedTime.getUTCSeconds() : myPlayedTime.getUTCSeconds();
			$("#play_time").text(ptMin+":"+ptSec);

			var myTotalTime = new Date(totalTime);
			var ttMin = (myTotalTime.getUTCMinutes() < 10) ? "0" + myTotalTime.getUTCMinutes() : myTotalTime.getUTCMinutes();
			var ttSec = (myTotalTime.getUTCSeconds() < 10) ? "0" + myTotalTime.getUTCSeconds() : myTotalTime.getUTCSeconds();
			$("#total_time").text(ttMin+":"+ttSec);
		})
		.onSoundComplete( function() {
			$(this).play();
		});



		
		var settings = $.extend({
			interval: 400
		});


		
		function playUs(){
			$(".robin span").animate({backgroundPosition:'0px 0px'},{duration:0}).delay(settings.interval).animate({backgroundPosition:'-163px 0px'},{duration:0}).delay(settings.interval).animate({backgroundPosition:'-326px 0px'},{duration:0}).delay(settings.interval)
			$(".renee span").animate({backgroundPosition:'0px 0px'},{duration:0}).delay(settings.interval).animate({backgroundPosition:'-119px 0px'},{duration:0}).delay(settings.interval).animate({backgroundPosition:'-238px 0px'},{duration:0}).delay(settings.interval)
			$(".klaas span").animate({backgroundPosition:'0px 0px'},{duration:0}).delay(settings.interval).animate({backgroundPosition:'-197px 0px'},{duration:0}).delay(settings.interval).animate({backgroundPosition:'-394px 0px'},{duration:0}).delay(settings.interval)
			$(".drums span").animate({backgroundPosition:'0px 0px'},{duration:0}).delay(settings.interval).animate({backgroundPosition:'-243px 0px'},{duration:0}).delay(settings.interval).animate({backgroundPosition:'-480px 0px'},{duration:0}).delay(settings.interval)
			.ready(playUs);
		}



		$("#player_play").click(
			function () {
				$(".robin, .renee, .drums, .klaas").css("backgroundPosition","0px 9999px");
				$("<span>").appendTo(".robin, .renee, .drums, .klaas");
				playUs();
		});
			
		$("#player_pause, #player_stop").click(
			function () {
				$(".robin, .renee, .drums, .klaas").css("backgroundPosition","0px 0px");
				$(".robin, .renee, .drums, .klaas").children("span").remove();
		});
		

});
*/





$(document).ready(function(){

	// Local copy of jQuery selectors, for performance.
	var jpPlayTime = $("#jplayer_play_time");
	var jpTotalTime = $("#jplayer_total_time");

	$("#jquery_jplayer").jPlayer({
		ready: function () {
			this.element.jPlayer("setFile", "mp3/test.mp3").jPlayer("pause");
		},
		volume: 50
	})
	.jPlayer("onProgressChange", function(loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime) {
		jpPlayTime.text($.jPlayer.convertTime(playedTime));
		jpTotalTime.text($.jPlayer.convertTime(totalTime));
	})
	.jPlayer("onSoundComplete", function() {
		this.element.jPlayer("play");
	});
});

