jQuery(document).ready(function($){

	$("#player_hot_audio").jPlayer({
		ready: function() {
			$('#player_hot .jp-title').css('display', 'block');
			$(this).jPlayer("setMedia", { mp3: "http://bdcast.ic.llnwd.net/stream/bdcast_bstwireless_kcuf-fm-mp3" });
			// $(this).jPlayer('play'); // autoplay
		},
		play: function() { 
			$('#player_thunder_audio').jPlayer('stop'); // Stop the other player 
		},
		cssSelectorAncestor: "#player_hot",
		swfPath: "js/libs",
		supplied: "mp3",
		wmode: "window"
	});
	
	$("#player_thunder_audio").jPlayer({
		ready: function(){ 
			$('#player_thunder .jp-title').css('display', 'block');
			$(this).jPlayer("setMedia", { mp3: "http://bdcast.ic.llnwd.net/stream/bdcast_bstwireless_KTND-FM-MP3" });
		},
		play: function() { 
			$('#player_hot_audio').jPlayer('stop'); // Stop the other player 
		},
		cssSelectorAncestor: "#player_thunder",
		swfPath: "js/libs",
		supplied: "mp3",
		wmode: "window"
	});
	
	// Set logos to act as proxy for players
	$('h2.logo').click(function(){
		$(this).parent().find('div.jp-gui > a:visible').click();
	}).hover(
		function(){
			$(this).parent().find('div.jp-gui > a').addClass('hover');
		},
		function(){
			$(this).parent().find('div.jp-gui > a').removeClass('hover');	
		}
	);
});

