$(document).ready(function(){
		// jplayer
		$("#jpId").jPlayer( {
			ready: function () {
			  $(this).setFile("mp3/test.mp3").play(); // Defines the counterpart mp3 and ogg files
			},
			volume: 25
		});
	$("#jpId").jPlayerId('play','player_play')
	$("#jpId").jPlayerId("pause", "player_pause")
	$("#jpId").jPlayerId("stop", "player_stop")
	$("#jpId").jPlayerId("loadBar", "player_progress_load_bar")
	$("#jpId").jPlayerId("playBar", "player_progress_play_bar")
	$("#jpId").jPlayerId("volumeMin", "player_volume_min")
	$("#jpId").jPlayerId("volumeMax", "player_volume_max")
	$("#jpId").jPlayerId("volumeBar", "player_volume_bar")
	$("#jpId").jPlayerId("volumeBarValue", "player_volume_bar_value")
	$("#jpId").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);
	})
	$("#jpId").onSoundComplete( function() {
		$(this).play();
	});
});
	
