$(function(){

	$("form#member_login").submit(function(){

		switch ($("select[name=\"area\"]").val()) {

			case "cont":

				$(this)
					.attr("action", "http://control.maxfrag.net/index.php")
					.find("input[type=\"text\"]")
						.attr("name", "account_email")
						.end()
					.find("input[type=\"password\"]")
						.attr("name", "account_password")
						.end();

				break;

			default:

				$(this)
					.attr("action", "http://billing.maxfrag.net/index.php?fuse=admin&action=Login")
					.find("input[type=\"text\"]")
						.attr("name", "email")
						.end()
					.find("input[type=\"password\"]")
						.attr("name", "passed_password");

				break;

		}

	});

	$("form#member_login input[type=\"text\"]").focus(function(){
		if ($(this).val() == "Username") {
			$(this).val("");
		}
	});

	$("form#member_login input[type=\"password\"]").focus(function(){
		if ($(this).val() == "Password") {
			$(this).val("");
		}
	});

	$("form#member_login input[type=\"text\"]").blur(function(){
		if ($(this).val() == "") {
			$(this).val("Username");
		}
	});

	$("form#member_login input[type=\"password\"]").blur(function(){
		if ($(this).val() == "") {
			$(this).val("Password");
		}
	});

});