var focusField = false;

$(document).ready(function(){
		
	$('fieldset').hover(function(){
		$('#content_area fieldset').removeClass("on");
		$(this).addClass("on")
	}, function(){
		if(!$(this).find('#'+focusField).length){
			
		}
	})
	
	$('#signup input, #signup select').focus(function(){
		//$('#content_area fieldset').removeClass('focused');
		$(this).parents('fieldset').addClass('focused on');
	})
	
	$('#signup input, #signup select').blur(function(){
		focusField = false;
	})
	
	$('input:first')[0].focus()
	
	$('input').focus(function(){
		$(this).addClass('focus')
	})
	$('input').blur(function(){
		$(this).removeClass('focus')
	})

	$('#url').keyup(function(){
		$('#subdomain_preview').html($(this).val()) 		
	})


	//validations


	//validate that the fields are filled out,.  
	// and that the passwords match each other
	//could also validate the phone number is valid
	//, and the email address is valid.

  $('#signUpForm').validate(function(){
  	rules: {
  		confirm_password: {
  			equalTo: "#password"
  		}
  	}
  });

});