var _login = function(){
	var pars = $("input").serialize();
   $.ajax({ type: "POST", 
   		url: "/login/", 
   		data: pars, 
   		success: function(message){
   			if (message != "0"){
   				$('#js_login').hide();
   				$('#js_options').hide();
				$.get("/about/version/"+message, function(version){
					if (version == "1.5"){
						$('#login_form').attr('action', 'https://www.pdpworks.com/source/scripts/users/userLogin.php');
					}
   				$('#login_failed').hide();
   				var welcome = "<center style='margin-top: 30px;'><img src='/images/languages/en/indicators/bar.gif' /><br />Logging In...<br /><b>If this is the first time you have logged into PDPworks 2.0</b><br />It may take a few moments to log you in as it configures your account.<br /> Please allow it to finish.</center>";
   				$('#js_login').after(welcome);
   				document.letmein.submit();
				});

   			}else{
   				$('#login_failed').show();
   			} 
   		} 
   });
}

var hide_fail = function(){
	$('#login_failed').hide();
}