
var Track = {
	Play: function(id,h,title){
	soundManager.stopAll();
	$('.player').remove();
	$('img.track').attr('src','/design/img/play.png');
	$('a.track').attr('onclick','Track.Play(this.id,this.href,this.title); return false');
	$('img#'+id).attr('src','/design/img/pause.png');
	$('a#'+id).attr('onclick','Track.Stop(this.id); return false');
	$('#box_player').html('<div class="player"><div class="block2" style="text-align:right;padding:6px 10px 6px 6px;"><a href="" onclick="Track.Close(); return false"><img width="10px" src="/design/img/del.png"/></a></div><div class="response"></div><a style="text-decoration:none;" href="/audio/refresh_playlist.php?id='+id+'" onclick="Track.AddTrack(this.href); return false"><div class="block"><b></b></div></a><object style="padding:6px;" type="application/x-shockwave-flash" data="/jscript/player.swf" width="200" height="20"><param name="movie" value="/jscript/player.swf" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="mp3='+h+'&autoplay=1&showloading=never&showvolume=1&bgcolor=F8F8F8&bgcolor1=F8F8F8&bgcolor2=F8F8F8&slidercolor1=80A65D&slidercolor2=80A65D&sliderovercolor=80A65D&buttoncolor=80A65D&buttonovercolor=80A65D" /></object></div>');
	$('.player .block b').html(title);
	},
	Stop: function(id){
		$('img#'+id).attr('src','/design/img/play.png');
		$('a#'+id).attr('onclick','Track.Play(this.id,this.href,this.title); return false');
		$('.player').remove();
	},
	AddTrack: function(h){
		$.get(h, function(data){
			$('.player .response').html(data);
		});
	},
	Close: function(){
		$('.player').remove();
		$('img.track').attr('src','/design/img/play.png');
		$('a.track').attr('onclick','Track.Play(this.id,this.href,this.title); return false');
	}
}
