/**

 * @author ali suarez

 */
$(document).ready(function(){
    $("#quote").validationEngine('attach', {
        onValidationComplete: function(form, status){
            if(status!=false){
                $.post("ajax/solicitud.php", $("#quote").serialize(),function(data){
                    var msg = "";

                    $("#info").hide();

                    if(data==0){
                        $("#success").show();                        
                    } else {
                        $("#error").show();
                    }
                    jQuery.fn.reset = function () {
                        $(this).each (function() {
                            this.reset();
                        });          
                        alert("hell yes");
                        return false;
                    }
            
                });
            }
            $('html, body').animate({
                scrollTop:300
            }, 'slow');        
        }
    });    
});
