function play_list_video(pos)
{
	document.getElementById("video-container-video-play-list").innerHTML = '<div id="play-list">a</div>';
	video_swfobject(videos[pos], false);
	return false;
}


function video_swfobject(vo, draw_container) {
	if (typeof(draw_container) == "undefined") draw_container = true;

  var isIpad = (/iPhone|iPod|iPad/i).test(navigator.userAgent);


  if (isIpad && vo.html5) {
    var isIphone = (/iPhone/i).test(navigator.userAgent);
    if (isIphone) {vo['html5']['src'] = vo['html5']['src'].replace(/-wifi/g, "-3g");}
    var video_tag = '<video width="'+vo.w+'" height="'+vo.h+'" controls="controls" poster="'+vo['html5']['poster']+'" src="'+vo['html5']['src']+'">'
      + '</video>';
    $("#" + vo.cid).html(video_tag);
    return;
  }

	if (draw_container) {
		document.write("<div class='video-player' id='video-container-video-"+vo.cid+"'><div id='"+vo.cid+"'></div></div>");
	}

	var videoParams = {allowFullScreen: 'true', menu: 'false',wmode:'transparent'};
	var attributes = {id: 'myPlayer', name: 'myPlayer'};
	var host = (vo.host == undefined) ? '' : vo.host;

	var publication = (vo.publication == undefined) ? 'hello' : vo.publication;
	var vurl = 'http://rdv.hola.com/'+publication+'/v/' + vo.vid;
	vurl += (host != '') ? ('/' + host) : '';

	if (vo.autostart) vurl += "/autostart";
	//alert(vurl);

	swfobject.embedSWF(vurl, vo.cid, vo.w, vo.h, '10.0.0', '/media/expressInstall.swf', {skip_title:vo.st,preview:vo.preview}, videoParams, attributes);
}


/** POR DEFECTO SE INICIA UN VIDEO */
if (typeof(draw_container) == "undefined") var draw_container = true;
video_swfobject(vo, draw_container);

