	var player_url='http://cbc.ca/radio/newplayer_mp3.swf';
	var player_width=200;
	var player_height=20;



	
	jQuery(function() {
			jQuery('div.MainBody a').each(function() {
				var mp3=jQuery(this).attr('href');

if (mp3.substr(mp3.length-3).toLowerCase()=='mp3') {
					jQuery(this).replaceWith(addPlayer(mp3));
				}
			});
			
	});



	function addPlayer(mp3) {
		var html = '	<div class="audioplayer">';
			html += '		<object type="application/x-shockwave-flash" data="'+player_url+'" width="'+player_width+'" height="'+player_height+'">';
			html +='			<param name="movie" value="'+player_url+'" />';
			html +='			<param name="bgcolor" value="#ffffff" />';
			html +='			<param name="FlashVars" value="mp3='+mp3+'&amp;bgcolor1=e1eded&amp;bgcolor2=e1eded&amp;buttoncolor=1b457f&amp;buttonovercolor=000000&amp;slidercolor1=ffffff&amp;slidercolor2=ffffff&amp;showvolume=1&amp;sliderovercolor=1b457f" />';
			html +='		</object>';
			html +='	</div>';

		return html;
	}

