//<![CDATA[
	$(document).ready(function(){
		// Local copy of jQuery selectors, for performance.
		var	my_jPlayer = $("#jquery_jplayer"),
			my_playState = $("#jp_container .play-state"),
			my_extraPlayInfo = $("#jp_container .extra-play-info"),
			my_bar = $("#jp_container #position_bar");
		var	opt_play_first = false, 
			opt_auto_play = true;
		// A flag to capture the first track
		var first_track = true;
		// Change the time format
		$.jPlayer.timeFormat.padMin = true;
		$.jPlayer.timeFormat.padSec = true;
		$.jPlayer.timeFormat.sepMin = ":";
		$.jPlayer.timeFormat.sepSec = "";
		// Initialize the play state text
		// Instance jPlayer
		my_jPlayer.jPlayer({
			ready: function () {
				$("#jp_container .track-default").click();
			},
			timeupdate: function(event) {
				my_bar.css ('padding-left',(parseInt(event.jPlayer.status.currentPercentAbsolute* 1.8, 10) ) + "px");
			},
			play: function(event) {
			},
			pause: function(event) {
			},
			ended: function(event) {
			},
			swfPath: "/js",
			cssSelectorAncestor: "#jp_container",
			supplied: "mp3",
			wmode: "window"
		});
	
		$(function() {
			$("#jp_container .jp-play img")
				.mouseover(function() { 
           			var src = $(this).attr("src").replace("play-on.gif","play-off.gif");
            		$(this).attr("src", src);
       			})
		        .mouseout(function() {
        			var src = $(this).attr("src").replace("play-off.gif", "play-on.gif");
					$(this).attr("src", src);
        		});
			$("#jp_container .jp-pause img")
				.mouseover(function() { 
           			var src = $(this).attr("src").replace("pause-on.gif","pause-off.gif");
            		$(this).attr("src", src);
       			})
		        .mouseout(function() {
        			var src = $(this).attr("src").replace("pause-off.gif", "pause-on.gif");
					$(this).attr("src", src);
        		});
			$("#jp_container .jp-stop img")
				.mouseover(function() { 
           			var src = $(this).attr("src").replace("rewind-on.gif","rewind-off.gif");
            		$(this).attr("src", src);
       			})
		        .mouseout(function() {
        			var src = $(this).attr("src").replace("rewind-off.gif", "rewind-on.gif");
					$(this).attr("src", src);
        		});
		});
		// Create click handlers for the different tracks
		$("#jp_container .track").click(function(e) {
			my_jPlayer.jPlayer("setMedia", {
				mp3: $(this).attr("href")
			});
			if((opt_play_first && first_track) || (opt_auto_play && !first_track)) {
				my_jPlayer.jPlayer("play");
			}
			first_track = false;
			$(this).blur();
			return false;
		});
	});
	//]]>
