// ------------------------------------------------------------------------------------------------
// LOGIN

function default_user_login() {
	var form = $("[name=loginForm]");
	$.post("/default/user/login-ajax", form.serialize(),
		function(data){
			$("#account-area").html(data);
		}, "html");
	if (!$("#product-selection-form").length) {
		shop_index_goToShop();
	}	
}

function logout() {
	$.post("/default/user/logout-ajax" + SID("?"), { },
		function(data){
			$("#account-area").html(data);
		}, "html");
}

function default_user_submitLoginEnter(e) {
	var keycode;
	if (window.event)
		keycode = window.event.keyCode;
	else if (e)
		keycode = e.which;
	else
		return true;

	if (keycode == 13) {
		loginAction();
		return false;
	}
	else
		return true;
}

