var MP = MP ? MP : {
	mp3file:"content/audio/KeepOnJumping.mp3",
	autoplay:false
};


$(function(){

	$("#jquery_jplayer").jPlayer({
		ready: function () {
			<!---//this.element.jPlayer("setFile", "http://www.miaowmusic.com/audio/mp3/Miaow-07-Bubble.mp3", "http://www.miaowmusic.com/audio/ogg/Miaow-07-Bubble.ogg").jPlayer("play");--->
			if(MP.autoplay) $("#musicplayer .play").click();
		},
		volume: 75,
		oggSupport: false,
		preload: 'auto'
	})	
	.jPlayer("onSoundComplete", function() {
		this.element.jPlayer("play");
	});
	
		
	$("#musicplayer .play").click(function(){
	
		$("#jquery_jplayer").jPlayer("setFile", MP.mp3file/*, oggfile*/).jPlayer("play");		
		
		$("#musicplayer .play").hide();		
		$("#musicplayer .stop").show();		
		
		//inform session
		$.post("music.session.cfm" , { "play":true });
	});
	
	$("#musicplayer .stop").click(function(){
		$("#jquery_jplayer").jPlayer("stop");		
		$("#musicplayer .stop").hide();		
		$("#musicplayer .play").show();	
		
		//inform session
		$.post("music.session.cfm" , { "play":false });
	});
	
	$("#musicplayer .stop").hide();
	$("#musicplayer .prev").hide();
	$("#musicplayer .next").hide();
	
	$("#musicplayer .tickerWrap").SetScroller({	velocity: 	 60,
											direction: 	 'horizontal',
											startfrom: 	 'right',
											loop:		 'infinite',
											movetype: 	 'linear',
											onmouseover: 'play',
											onmouseout:  'play',
											onstartup: 	 'play',
											cursor: 	 'pointer'
										});

});


/*
$("#jp_album").jPlayer({volume: 50,oggSupport: true,preload: 'none'});	
$("#jp_album").jPlayer("setFile", data.a, data.b).jPlayer("play");				


*/
