$(document).ready(function(){

   $("#jquery_jplayer").jPlayer({
		ready: function () {
			//playTrack("http://www.gingersnap5.com/audio/tracks/gg.mp3",$("Click on track to play").text());
		},
		customCssIds: true
	})
	.jPlayer("onProgressChange", function(lp,ppr,ppa,pt,tt) {
 		$("#pcent").text(parseInt(ppa)+"%");
	});


	$("#pause").hide();

	function showPauseBtn()
	{
		$("#play").fadeOut(function(){
			$("#pause").fadeIn();
		});
	}

	function showPlayBtn()
	{
		$("#pause").fadeOut(function(){
			$("#play").fadeIn();
		});
	}

	function playTrack(t,n)
	{
		$("#jquery_jplayer").jPlayer("setFile", t).jPlayer("play");

		showPauseBtn();

		$("#trackname").fadeOut(function(){
			$("#trackname").text(n);
			$("#trackname").fadeIn();
		});

		$("#pcent").fadeOut(function(){
			$("#pcent").fadeIn();
		});

		return false;
	}

	$("#sgh").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/tracks/sgh.mp3",$("#sgh").text()));
	});	

	$("#gg").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/tracks/gg.mp3",$("#gg").text()));
	});		
	
	$("#ss").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/tracks/ss.mp3",$("#ss").text()));
	});	

	$("#fmr").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/tracks/fmr.mp3",$("#fmr").text()));
	});	
	
	$("#vc").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/tracks/vc.mp3",$("#vc").text()));
	});

	$("#swwm").click(function() {
		$(this).blur();
 		return(playTrack("http://www.gingersnap5.com/audio/tracks/swwm.mp3",$("#swwm").text()));
	});	
	
	$("#ctmeooy").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/tracks/ctmeooy.mp3",$("#ctmeooy").text()));
	});	




	$("#lifear").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/01lifear.mp3",$("#lifear").text()));
	});		
	
	$("#stdmadidkk").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/02stdmadidkk.mp3",$("#stdmadidkk").text()));
	});		
			
	$("#sitsol").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/02sitsol.mp3",$("#sitsol").text()));
	});		
	
	$("#cdwlrolw").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/04cdwlrolw.mp3",$("#cdwlrolw").text()));
	});		
	
	$("#nnn").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/05nnn.mp3",$("#nnn").text()));
	});		
	
	$("#siabnzvmr").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/06siabnzvmr.mp3",$("#siabnzvmr").text()));
	});		
	
	$("#gmaof").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/07gmaof.mp3",$("#gmaof").text()));
	});		
	
	$("#sic").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/08sic.mp3",$("#sic").text()));
	});		
	
	$("#t3rf").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/09t3rf.mp3",$("#t3rf").text()));
	});		
	
	$("#spp2").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/10spp2.mp3",$("#spp2").text()));
	});		
	
	$("#t3rf2").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/11t3rf2.mp3",$("#t3rf2").text()));
	});		
	
	$("#anmscra").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/12anmscra.mp3",$("#anmscra").text()));
	});		
	
	$("#gmaof2").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/13gmaof2.mp3",$("#gmaof2").text()));
	});		
	
	$("#pok").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/14pok.mp3",$("#pok").text()));
	});		
	
	$("#dvlis").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/15dvlis.mp3",$("#dvlis").text()));
	});		
	
	$("#vfrknstrkt").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/16vfrknstrkt.mp3",$("#vfrknstrkt").text()));
	});		
	
	$("#wcoas").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/07wcoas.mp3",$("#wcoas").text()));
	});		
	
	$("#sltgrtrr").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/18sltgrtrr.mp3",$("#sltgrtrr").text()));
	});		
	
	$("#r4fma11").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/19r4fma11.mp3",$("#r4fma11").text()));
	});		
	
	$("#waoo").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/20waoo.mp3",$("#waoo").text()));
	});		
	
	$("#svbsl").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/21svbsl.mp3",$("#svbsl").text()));
	});		
	
	$("#ktl").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/22ktl.mp3",$("#ktl").text()));
	});		
	
	$("#iscmd").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/23iscmd.mp3",$("#iscmd").text()));
	});		
	
	$("#emptyd").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/24emptyd.mp3",$("#emptyd").text()));
	});		
	
	$("#prozsm").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/25prozsm.mp3",$("#prozsm").text()));
	});		
	
	
	$("#dvph").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/26dvph.mp3",$("#dvph").text()));
	});		
	
	$("#jhf").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes/27jhf.mp3",$("#jhf").text()));
	});		
	
	
	
	$("#swwm_prznoz").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes_other/swwm_prznoz.mp3",$("#swwm_prznoz").text()));
	});		
	
	$("#swwm_zw").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes_other/swwm_zw.mp3",$("#swwm_zw").text()));
	});		

	$("#swwm_veillance").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes_other/swwm_veillance.mp3",$("#swwm_veillance").text()));
	});		

	$("#fmr_ruptor").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes_other/fmr_ruptor.mp3",$("#fmr_ruptor").text()));
	});		
	
	$("#fmr_ap").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes_other/fmr_ap.mp3",$("#fmr_ap").text()));
	});		
	
	$("#fmr_st").click(function() {
		$(this).blur();
		return(playTrack("http://www.gingersnap5.com/audio/remixes_other/fmr_st.mp3",$("#fmr_st").text()));
	});		
	
	
		
	
	
	$("#play").click(function() {
		$("#jquery_jplayer").jPlayer("play");
		showPauseBtn();
		$(this).blur();
		return false;
	});

	$("#pause").click(function() {
		$("#jquery_jplayer").jPlayer("pause");
		showPlayBtn();
		$(this).blur();
		return false;
	});

	$("#stop").click(function() {
		$("#jquery_jplayer").jPlayer("stop");
		showPlayBtn();
		$(this).blur();
		return false;
	});

	$("#vmax").click(function() {
		$("#jquery_jplayer").jPlayer("volume", 100);
		$(this).blur();
		return false;
	});

	$("#vmute").click(function() {
		$("#jquery_jplayer").jPlayer("volume", 0);
		$(this).blur();
		return false;
	});

	$("#vhalf").click(function() {
		$("#jquery_jplayer").jPlayer("volume", 50);
		$(this).blur();
		return false;
	});

});

