var Instalar={
	
	validar:function(form){
		if($Form.validate(form)){
			this.configurar(form);
		}
		return false;		
	},
	
	configurar:function(form){
		$j.alert({type:'loading', html:'aguarde', modal:true, hide:false});
		$j.ajax({
			url:'acoes.php?configurar', type:'post', data:$j(form).serialize(),
			success:function(response){
				if(response==""){
					$j.alert({
						type:'success', html:'Sistema configurado com sucesso!', timeout:5000, 
						out:function(){
							location = "index.php";		
						}
					});
					
				}else{
					$j.alert({type:'error', html:'Não foi possivel efetuar a configuração. <br /> Tente novamente ou entre em contato com o administrador'});
				}
			}			
		});
	}
}

