// JavaScript Document
 
  $(document).ready(function(){
				
		   $(".youtube").each(function() {
			   var height = $(this).attr("height");
			   var width = $(this).attr("width"); 
			   var src = 'http://www.youtube.com/v/'+$(this).attr("alt")+'&amp;hl=en&amp;fs=1&amp;rel=0';
			   $(this).replaceWith(
				"<div style='text-align:center'>"
			   + "<object data='"+src+"' "
			   + "type='application/x-shockwave-flash' "
			   + "width='"+ width+ "' height='"+ height + "'>"
			   +"<param name='src' value='"+ src+"' />"
			   +"<param name='allowFullScreen' value='true' />"
			   +"<param name='wmode' value='transparent' />"
			   +"</object></div>");
		   });

			$(".qik").each(function() {
			   var height = $(this).attr("height");
			   var width = $(this).attr("width"); 
			   var src = 'http://qik.com/swfs/qikPlayer4.swf';
				$(this).replaceWith(
				"<div style='text-align:center'>"
			   + "<object data='"+src+"' "
			   + "type='application/x-shockwave-flash' "
			   + "width='"+ width+ "' height='"+ height + "'>"
			   +"<param name='src' value='"+ src+"' />"
			   +"<param name='allowFullScreen' value='true' />"
			   +"<param name='allowScriptAccess' value='always' />"
			   +"<param name='quality' value='high' />"
			   +"<param name='bgcolor' value='#333333' />"
			   +"<param name='wmode' value='transparent' />"
			   +"<param name='FlashVars' value='rssURL=http://qik.com/video/"+ $(this).attr("alt")+".rss&autoPlay=false&polling=false' />"
			   +"</object></div>");
		   });
			
			$(".vimeo").each(function() {
			   var height = $(this).attr("height");
			   var width = $(this).attr("width"); 
			   var src = 'http://vimeo.com/moogaloop.swf?clip_id='+$(this).attr("alt")+'&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=ff0179&fullscreen=1';
			   
			$(this).replaceWith(
				"<div style='text-align:center'>"
			   + "<object data='"+src+"' "
			   + "type='application/x-shockwave-flash' "
			   + "width='"+ width+ "' height='"+ height + "'>"
			   +"<param name='src' value='"+ src+"' />"
			   +"<param name='allowFullScreen' value='true' />"
			   +"<param name='allowScriptAccess' value='always' />"
			   +"<param name='wmode' value='transparent' />"
			   +"</object></div>");
		   });
			
	});