$(function() {
	/* Instantiate the form validation when the DOM is loaded and ready */
	if (RI.forms) {
  	RI.forms.validate.init("#join-form", {
  		url: "/users/validate.json",
  		fieldPrefix: "user_",
  		recaptchaID: "recaptcha_response_field",
  		recaptchaURL: "/recaptcha.json"
  	});	
  }

});



/*
* Toggle between openid and normal join and signin methods
*/
// CWG: When David added RPX, this link no longer toggles a new view, it just opens a lightbox window
// $(function() {
//  $('.toggle-signup-method').click(function() {
//      $('.panel').each(function() {
//          var me = $(this).toggleClass('hide');
//          if (!me.hasClass('hide')) {
//              me.find(':input:text:first').select();
//          }
//      });
//      return false;
//  });
// });