function enviaForm(){
		tb_show('Aviso', 'popup/form.php?&nombre='+$("#nombre").val()+'&email='+$("#email").val()+'&keepThis=true&TB_iframe=true&height=385&width=585', null);
}
$(document).ready(function(){
var userAgent = navigator.userAgent.toLowerCase();
jQuery.browser = {
	version: (userAgent.match( /.+(?:rv|it|ra|ie|me)[\/: ]([\d.]+)/ ) || [])[1],
	chrome: /chrome/.test( userAgent ),
	safari: /webkit/.test( userAgent ) && !/chrome/.test( userAgent ),
	opera: /opera/.test( userAgent ),
	msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
	mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
};
tb_show('Aviso', 'popup/bienvenido.htm?keepThis=true&TB_iframe=true&height=385&width=585', null);
	var posicion=0;
	$("#boton").click(function(){
		alert ("alalala");
	});
	$("#submitForm").submit(function(){
		alert("norl");
		tb_show('Aviso', 'popup/form.php?&nombre='+$("#nombre").val()+'&email='+$("#email").val()+'&keepThis=true&TB_iframe=true&height=385&width=585', null);
		return(false);
	});

	$(".alrededor").click(function(){
	if ($(this).attr("class")=="alrededor")
	{
		var id = $(this).attr("id");
		var yo = $(this);
		$.ajax({
			type: "POST",
			url: "frase.php",
			data: ({posicion: posicion, parte: id}),
			success: function(msg){

		     		if (msg!=""){
		     			$("#frase").html(msg);
		     			var newId=id.split("_a").join("_f");
		     			$("#"+newId).hide();
		     			//$("#"+newId+" .letra").hide();
		     			$("#"+newId).fadeIn(300, function() {
						   if(jQuery.browser.msie){
						   	this.style.removeAttribute('filter');
						   }

					    	if($(".alrededorOn").size()==10){
				     			//tb_show('Convocatoria', 'popup/ok.htm?keepThis=true&TB_iframe=true&height=385&width=585', null);
				     			alert("ˇCombinación correcta!. Pulsa Aceptar para continuar...");


				     			$(".alrededorOn").each(function(i,val){
				     				$(this).fadeOut(i*75);
				     			});
				     			$("#abajo").fadeOut(600).attr("class","container_16");
				     			$("#principal").fadeOut(600
				     				,function(){
				     					$(this).html('<div class="container_16"><p class="web"><a href="http://www.antonioorozco.com">www.antonioorozco.com</a></p><p id="fecha">29/09/2009</p><p id="frase" class="center">qu&eacute; grande es no saber lo que uno hace</p></div>  ');
										$(this).attr("class", "renovatio");
				     					$(this).fadeIn(600);
				     					$("#abajo").html('	<div id="reproductor" class="prefix_1 grid_7"><span>escucha el nuevo single</span> de orozco en primicia<!-- inicio reproductor --><div id="jquery_jplayer"></div><div id="player_container"><ul id="player_controls"><li id="player_play">play</li><li id="player_pause">pause</li><li id="player_stop">stop</li><li id="player_volume_min">min volume</li><li id="player_volume_max">max volume</li></ul><div id="player_progress"><div id="player_progress_load_bar"><div id="player_progress_play_bar"></div></div></div><div id="player_volume_bar"><div id="player_volume_bar_value"></div></div><div id="player_playlist_message"><div id="song_title">Qu&eacute; me queda</div><div id="play_time"></div>					<div id="total_time"></div></div></div><div id="jplayer_info"></div><!-- fin reproductor --></div>	<div id="single" class="grid_3">		<span>&nbsp;</span></div>	<div id="newsletter" class="grid_4 sufix_1">		<span>newsletter</span> para mantenerte informado/a				<label for="nombre">tu nombre <span class="obligatorio" title="Obligatorio">*</span></label>			<input type="text" id="nombre"/>			<label for="email">tu email <span class="obligatorio" title="Obligatorio">*</span></label>			<input type="text" id="email"/><a href="#" onclick="javascript:enviaForm();return false;" id="boton"  class="boton" >enviar</a>	</div>');
				     					$("#abajo").fadeIn(600);
				     					//reproductor

				     						$("#jquery_jplayer").jPlayer({
												ready: function () {
													$(this).setFile("audio.php").play();
													demoInstanceInfo($(this), $("#jplayer_info"));
												},
												cssPrefix: "different_prefix_example",
												volume: 50,
												oggSupport: false
											})
											.jPlayerId("play", "player_play")
											.jPlayerId("pause", "player_pause")
											.jPlayerId("stop", "player_stop")
											.jPlayerId("loadBar", "player_progress_load_bar")
											.jPlayerId("playBar", "player_progress_play_bar")
											.jPlayerId("volumeMin", "player_volume_min")
											.jPlayerId("volumeMax", "player_volume_max")
											.jPlayerId("volumeBar", "player_volume_bar")
											.jPlayerId("volumeBarValue", "player_volume_bar_value")
											.onProgressChange( function(loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime) {
												var myPlayedTime = new Date(playedTime);
												var ptMin = (myPlayedTime.getUTCMinutes() < 10) ? "0" + myPlayedTime.getUTCMinutes() : myPlayedTime.getUTCMinutes();
												var ptSec = (myPlayedTime.getUTCSeconds() < 10) ? "0" + myPlayedTime.getUTCSeconds() : myPlayedTime.getUTCSeconds();
												$("#play_time").text(ptMin+":"+ptSec);

												var myTotalTime = new Date(totalTime);
												var ttMin = (myTotalTime.getUTCMinutes() < 10) ? "0" + myTotalTime.getUTCMinutes() : myTotalTime.getUTCMinutes();
												var ttSec = (myTotalTime.getUTCSeconds() < 10) ? "0" + myTotalTime.getUTCSeconds() : myTotalTime.getUTCSeconds();
												$("#total_time").text(ttMin+":"+ttSec);
											})
											.onSoundComplete( function() {
												$(this).play();
											});

				     					//fin reproductor
				     					//$(this).fadeIn(600);
				     				});
						        $(".renovatio").show("slow");

				     			/*	.html('<p class="web"><a href="http://www.antonioorozco.com">www.antonioorozco.com</a></p><p id="fecha">29/09/2009</p>')
				     				.slideDown(300);
				     			*/
				     		}
						});
		     			posicion++;
		     			//desactivar valida
		     			yo.attr("class","alrededorOn");
		     			//comprobamos que no queda ninguno por clicar.
		     		}
		     		else{
		     			tb_show('Convocatoria', 'popup/error.htm?keepThis=true&TB_iframe=true&height=385&width=585', null);
		     			$("#frase").html(msg);
		     			//avisar del error.
		     			//activar todas
		     			$(".alrededorOn").attr("class","alrededor");
		     			posicion=0;
		     		}
	   		}
	 });

	}
	})
})

