$('document').ready(function(){
    options = {
        url: "/netcat/add.php",
        type: "post"
    }

    $('#adminForm').submit(function(){        var errors = false;

        $('.ofContainer input').each(function()
        {            if($(this).val().replace(/\s/, '') == '')
                errors = true;
        })

        if(!errors)
        {
            $(this).ajaxSubmit(options);
            $('#response').html('<p style="color:#689520">Ваш заказ принят!<br />Мы свяжемся с Вами<br />в ближайшее время.</p>');
            time = setTimeout(function(){$('#online-form').animate({'left':-279},300); clearTimeout(time)}, 3000);
        }
        else
            $('#response').html('<p style="color:#ff5400">Заполните все поля!</p>');



        $('#response').fadeIn('slow');
        timer = setTimeout(function(){$('#response').fadeOut('slow'); clearTimeout(timer)}, 2000);
        return false;
    })
})
