$(function(){
	$(".content a em").css("display","block").hide();

		$("#text em").css("opacity",0);

		$(".content").hide();
		$("span a").click(function(){
			if($.browser.msie){
				$(".content", $(this).parent()).toggle();
			}else{
				var esto = $(".content", $(this).parent());
				if(esto.is(":visible")){
					esto.fadeOut()
				}else{
					esto.fadeIn();
				}
			}

		});

		$(".content a:has(em)").hover(function(event){
	  		var $this = $(this);

			if (this == event.target){




				if ($this[0].abierto) {
							return false;
				}else{
					$this[0].abierto = true;
					if($this[0].cerrando){
          	$this[0].cerrando = false;


					}else{
						$("em", $this).show().css({"top": 0, "opacity": 0});
					}
	  	      $("em", $this).animate({"top": -170, "opacity": 1},500);
				}
			}
		},function(){
			var $this = $(this);

			if($this[0].cerrando){
				return false;
		 }else{
		 		$this[0].abierto = false;
		 		$this[0].cerrando = true;
				$("em", $this).animate({"top": -215, "opacity": 0},450,"linear",function(){
					if($this[0].cerrando){
						$(this).hide();
						$this[0].cerrando = false;
					}
			});
    }
	});

});
