function register_object(){

	this.readyForm = function(){
		$('#login_button').click(function(){
			//alert('here');
			$('#linkedin_connect_form').submit();
		});
		$('#logout_button').click(function(){
			//alert('here');
			$('#linkedin_revoke_form').submit();
		});	
		
		//$('.error').show();
			
		$('#complete_register').click(function() {
			if(verifyEmail($('#user_email').val())){
				$('#email_form').submit();
			}
			else{
				$('.error').show();
				return false;  
			}
	 
	    });					
		

		//alert('here');
	}
	function verifyEmail(email){
		 var status = false;     
		 var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
	     if (email.search(emailRegEx) == -1) {
	          //alert("Please enter a valid email address.");
	     }
	     else {
	          //alert("Woohoo!  The email address is in the correct format and they are the same.");
	          status = true;
	     }
	     return status;
	}	

};


