function loadLogin() {
	var u = $('#user').val();
	var p = $('#password').val();
	
	$.getJSON('servlet?user=' + u + '&password='  + p,
		function(obj) {
		switch(obj.estado) {
		case 1:
			location.href = 'sites.jsp';
			break;
		case 401:
			location.href = 'confirmacion.jsp';
			break;
		case 402:
			alert('Registrese para entrar a la aplicacion.');
			break;
		case 404:
			alert('Registrese para entrar a la aplicacion.');
			break;
		default:
			alert('Registrese para entrar a la aplicacion.');
			
		}
	});
}
var l;
$(document).ready(function() {
	
	
	
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});	

});
