$(document).ready(function() {
$("#send").click(function() {
	$("#error").slideUp();
	$("#working").show();
	$.post(base_url+"status/status_now",$("form").serialize(), send_result);
	});

$("#email").click(function() { $('#email').removeClass("input_error").addClass("input")  });
$("#ordernumber").click(function() { $('#ordernumber').removeClass("input_error").addClass("input")  });


});


function send_result(data)
	{
	
	//alert(data);
	temp = data.split('||');
	if(temp[0] == true)
		{
		$("#status").show();
		$("#status_text").html(temp[1]);
		}
		else
		{
		$("#status").hide();
		$("#status_text").html(temp[1]);
		}
	
	if(temp[2] != '')
		{
		$("#error_text").html(temp[2]);
		$("#error").slideDown();
		}
	
	if(temp[3] != '')
		$('#ordernumber').removeClass("input").addClass("input_error");
		else
		$('#ordernumber').removeClass("input_error").addClass("input");
	
	if(temp[4] != '')
		$('#email').removeClass("input").addClass("input_error");
		else
		$('#email').removeClass("input_error").addClass("input");
			
	$("#working").hide();
	}
