		$(document).ready(function (){
			$(".btn_ver_todos_comentarios").click(function (){
				$("#cont_ficha_datos").hide();
				$("#cont_ficha_comentarios").show();
				return false;
			});
			$(".btn_ver_datos_ficha").click(function (){
				$("#cont_ficha_comentarios").hide();
				$("#cont_ficha_datos").show();
				return false;
			});
			$("#btn_add_favorites").click(function (){
//					$("#buble_texto").html("V&iacute;deo a&ntilde;adido a favoritos");
					$.get("includes/ajax/add_favoritos.php",  { id: $(this).attr("ref") } , function(){
//						$("#buble").css({"top": $("#btn_add_favorites").position().top - 75, "left": $("#btn_add_favorites").position().left }, 500);
//						$("#buble").fadeIn("slow", function (){
							$("#btn_add_favorites").hide();
							$("#btn_del_favorites").show();
//							setInterval(function() { 
//					        $("#buble").fadeOut("slow");
//					    }, 2000); 
//							});
					});
				return false;
			});
			$("#btn_del_favorites").click(function (){
//					$("#buble_texto").html("V&iacute;deo eliminado de favoritos");
					$.get("includes/ajax/del_favoritos.php",  { id: $(this).attr("ref") } , function(){
//						$("#buble").css({"top": $("#btn_del_favorites").position().top - 75, "left": $("#btn_del_favorites").position().left }, 500);
//						$("#buble").fadeIn("slow", function (){
							$("#btn_del_favorites").hide();
							$("#btn_add_favorites").show();
//							setInterval(function() { 
//					        $("#buble").fadeOut("slow");
//					    }, 2000); 
//							});
					});
				return false;
			});
		});	


	function checkMail(email)
	{
		var x = email
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) return true;
		else return false;
	}
