//throw a youtube player in
	function youtubeplay(id,_autoPlay)
	{
	   
	   var options = {
		holderId: 'ytvideo',
		playerHeight: '380',
		playerWidth: '625',
		addThumbs: false,
		thumbSize: 'small',
		showInline: false,
		autoPlay: true,
		showRelated: true,
		allowFullScreen: false
	  };
	    var html  = '';
		var autoPlay = "";
		var showRelated = "&rel=0";
		var fullScreen = "";
		if( _autoPlay == '' ){
			autoPlay = "&autoplay=0"; 
		}else{
			autoPlay = "&autoplay=1"; 
		}
		if(options.showRelated) showRelated = "&rel=1"; 
		if(options.allowFullScreen) fullScreen = "&fs=1";
		
		var selector_youtube_id = $('.youtube_'+id);
		var title_youtubeid = selector_youtube_id.attr('title');
		
	   html += '<object height="'+options.playerHeight+'" width="'+options.playerWidth+'">';
	   html += '<param name="movie" value="http://www.youtube.com/v/'+youtubeid(title_youtubeid)+autoPlay+showRelated+fullScreen+'"> </param>';
	   html += '<param name="wmode" value="transparent"> </param>';
	   if(options.allowFullScreen) { 
			html += '<param name="allowfullscreen" value="true"> </param>'; 
	   }
	   html += '<embed src="http://www.youtube.com/v/'+youtubeid(title_youtubeid)+autoPlay+showRelated+fullScreen+'"';
	   if(options.allowFullScreen) { 
			html += ' allowfullscreen="true" '; 
		}
	   html += 'type="application/x-shockwave-flash" wmode="transparent"  height="'+options.playerHeight+'" width="'+options.playerWidth+'"></embed>';
	   html += '</object>';
		
	 $('#playvideo').html(html);
	   
	};
	
	
	//grab a youtube id from a (clean, no querystring) url (thanks to http://jquery-howto.blogspot.com/2009/05/jyoutube-jquery-youtube-thumbnail.html)
	function youtubeid(url) {
		var ytid = url.match("[\\?&]v=([^&#]*)");
		ytid = ytid[1];
		return ytid;
	};
