(function($){$.fn.youtubeEmbed=function(options){var opts=$.extend({},$.fn.youtubeEmbed.defaults,options);return this.each(function(){var $container=$(this);var youtubeLink='http://www.youtube.com/v/'+opts.youtubeId+'&hl=en';if(opts.fullscreen){youtubeLink=youtubeLink+'&fs=1';}else{youtubeLink=youtubeLink+'&fs=0';}
if(opts.related){youtubeLink=youtubeLink+'&rel=1';}else{youtubeLink=youtubeLink+'&rel=0';}
var markup='<object width="'+opts.width+'" height="'+opts.height+'">'
+'<param name="movie" value="'+youtubeLink+'"></param>'
+'<param name="allowFullScreen" value="true"></param>'
+'<param name="allowscriptaccess" value="always"></param>'
+'<embed src="'+youtubeLink+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+opts.width+'" height="'+opts.height+'"></embed>'
+'</object>';$container.empty().append(markup);});};$.fn.youtubeEmbed.defaults={fullscreen:true,height:262,related:false,width:320};})(jQuery);