/* js for package: media_object */

$(document).ready(function() {

$.fn.media.defaults.flvPlayer = 'resources/jquery/jquery.media-plugin/jw_player.swf';
$.fn.media.defaults.mp3Player = 'resources/jquery/jquery.media-plugin/jw_player.swf';
$.fn.media.defaults.bgColor = 'transparent';



	$('.audio_player').media( { width: 400, height: 24, autoplay: false} ); 
	
	$('.flash_player').each(function() {
		var w = $(this).attr("width");
		var h = $(this).attr("height");
		var img = $(this).find("img").attr("src");

		$(this).media( { width: w, height: h, autoplay: false, 
			flashvars:{
				image: img,
				controlbar: 'bottom'
			}
		} ); 
	});
	
	$('.video_player').each(function() {
		var w = $(this).attr("width");
		var h = $(this).attr("height");
		$(this).media( { width: w, height: h, autoplay: true} ); 
	});
	
	/*
	$('audio,video').each(function() {
		$(this).mediaelementplayer({});
	});
	*/


}); 

