$('#control').ajaxForm({
	dataType: 'json',
	success: function(data)
	{
		$.each(data, function(i, val)
		{
			if(i == 'e')
				bootbox.dialog('<h3 class="red">Ошибка</h3>'+val,
					[{
						"label" : "Продолжить",
					}]
				);

			if(i == 's')
				location.href = home+'control/id/'+data['id'];
		});

		loading(0);
	}
});

function upd_price()
{
	$.get('/services/section/control/limit/'+$('#limit').val()+'/time/'+$('#time').val()+'/get/sum', function(val)
	{
		$('#sum').html(val);
	});
}