//---------------------------------------------------------------------------------------
//Funcion load_video() - Donat un player i un video carrega el video a la pàgina
//---------------------------------------------------------------------------------------

function load_video(Video, flash) {
	var s1 = new SWFObject(flash, "player", "100%", "100%", "9", "#ffffff");
	s1.addParam("allowfullscreen", "true");
	s1.addParam("allowscriptaccess", "always");
	s1.addParam("wmode", "opaque");
	s1.addParam("flashvars", "file=" + Video);
	s1.write("myplayer");
}

(function($) {

	load_video = function(classContainer, classVideo, idPlayer, player, url,
			preview, width, height, allowfullscreen, allowscriptaccess, wmode,
			seamlesstabbing, stretching, captionFile, version, background,
			plugins) {

		if (String(jQuery("." + classContainer).get(0)) != "undefined") {
			$("." + classVideo).css("background-color", background);
			var s1 = new SWFObject(player, 'player', width, height, version);
			s1.addParam("allowfullscreen", allowfullscreen);
			s1.addParam("allowscriptaccess", allowscriptaccess);
			s1.addParam("wmode", wmode);
			s1.addParam("seamlesstabbing", seamlesstabbing);
			s1.addParam('flashvars', 'file=' + url + '&amp;captions.file='
					+ captionFile + '&amp;stretching=' + stretching
					+ '&amp;plugins=' + plugins + '&amp;image=' + preview);
			s1.write(idPlayer);
		}
	};
	load_video = function(classContainer, classVideo, idPlayer, player, url,
			preview, width, height, allowfullscreen, allowscriptaccess, wmode,
			seamlesstabbing, stretching, captionFile, version, background,
			plugins, streamer) {

		if (String(jQuery("." + classContainer).get(0)) != "undefined") {
			$("." + classVideo).css("background-color", background);
			var s1 = new SWFObject(player, 'player', width, height, version);
			s1.addParam("allowfullscreen", allowfullscreen);
			s1.addParam("allowscriptaccess", allowscriptaccess);
			s1.addParam("wmode", wmode);
			s1.addParam("seamlesstabbing", seamlesstabbing);
			s1.addParam('flashvars', 'file=' + url + '&amp;streamer='
					+ streamer + '&amp;captions.file=' + captionFile
					+ '&amp;stretching=' + stretching + '&amp;plugins='
					+ plugins + '&amp;image=' + preview);
			s1.write(idPlayer);
		}
	};

})(jQuery);

$(document).ready(function() {

	/* No puede estar vacio el campo palabra clave */
	$("#M-002-a_submit2").click(function() {
		if ($("#M-002-a_paraula").val() == "") {
			return false;
		} else {
			return true;
		}
	});
});
