/*
	jQuery YouTube Player intergration plugin
	
	@author: Angel Kostadinov (angel@develop.bg)
	@copyright: 2009 (c) Toxic Media Ltd. All Rights Reserved
*/
(function($) 
{
	$.fn.tube = function(src)
	{
		var player = null;
		
		var defaults = 
		{
			allowScriptAccess: "always",
			params:
			{
				allowScriptAccess: "always",
				bgcolor: "#000000",
				allowfullscreen: true,
				wmode: "transparent",
				quality: "hight"
			},
			atts: 
			{
				id: "ui-tube-player"
			},
			width: 344,
			height: 253,
			version: 8
		};
		
		var options  = $.extend({}, defaults, options);
		
		return this.each(function()
		{	
		    swfobject.embedSWF("http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid=ytplayer&fs=1", options.atts.id, options.width.toString(), options.height.toString(), options.version.toString(), null, null, options.params, options.atts);
		});
	};
})(jQuery);