/*
 *  Document   : readyRegister.js
 *  Author     : pixelcave
 */
var ReadyRegister=function(){return{init:function(){$("#form-register").validate({errorClass:"help-block animation-slideUp",errorElement:"div",errorPlacement:function(e,r){r.parents(".form-group > div").append(e)},highlight:function(e){$(e).closest(".form-group").removeClass("has-success has-error").addClass("has-error"),$(e).closest(".help-block").remove()},success:function(e){2===e.closest(".form-group").find(".help-block").length?e.closest(".help-block").remove():(e.closest(".form-group").removeClass("has-success has-error"),e.closest(".help-block").remove())},rules:{"register-username":{required:!0,minlength:3},"register-email":{required:!0,email:!0},"register-password":{required:!0,minlength:5},"register-password-verify":{required:!0,equalTo:"#register-password"},"register-terms":{required:!0}},messages:{"register-username":{required:"Please enter a username",minlength:"Please enter a username"},"register-email":"Please enter a valid email address","register-password":{required:"Please provide a password",minlength:"Your password must be at least 5 characters long"},"register-password-verify":{required:"Please provide a password",minlength:"Your password must be at least 5 characters long",equalTo:"Please enter the same password as above"},"register-terms":{required:"Please accept the terms!"}}})}}}();