$( document ).ready(

	function()
	{
	
			
		$( '.openid-providers a' ).click(
		
			function()
			{
			
				$( '#optional-step' ).hide()
				$( '#openid-form' ).hide()
																			
				switch ( $( this ).attr( 'class' ) )
				{
				
					case 'google':
						$( '#openid-form .step-number' ).text( '2.' )
						$( '#openid' ).val( 'https://www.google.com/accounts/o8/id' )
						$( '#submit' ).val( 'verify Google account' )
						$( '#openid-form' ).show()
						break
			
					case 'yahoo':
						$( '#openid-form .step-number' ).text( '2.' )
						$( '#openid' ).val( 'https://www.yahoo.com/' )
						$( '#submit' ).val( 'verify Yahoo account' )
						$( '#openid-form' ).show()
						break
				
					case 'aol':
						$( '#optional-step .step-number' ).text( '2.' )
						$( '#optional-step .prompt' ).text( ' Enter your AOL username: ' )
						$( '#optional-step input' )
							.val( '' )
							.unbind( 'keyup' )
							.keyup(
						
								function()
								{
								
									var username = $( this ).val()
								
									if ( username.length > 0 )
									{
								
										$( '#openid' ).val( 'http://openid.aol.com/' + username )
										$( '#openid-form' ).show()
									
									} // if
									else
										$( '#openid-form' ).hide()										
								
								} // function
							
							) // $.keyup						
						
						$( '#openid-form .step-number' ).text( '3.' )
						$( '#submit' ).val( 'verify AOL account' )
						$( '#optional-step' ).show()
						$( '#optional-step input' ).focus()
						break
					
					case 'myopenid':
						$( '#optional-step .step-number' ).text( '2.' )
						$( '#optional-step .prompt' ).text( ' Enter your myOpenID username: ' )
						$( '#optional-step input' )
							.val( '' )
							.unbind( 'keyup' )
							.keyup(
						
								function()
								{
								
									var username = $( this ).val()
								
									if ( username.length > 0 )
									{
								
										$( '#openid' ).val( 'http://' + username + '.myopenid.com/' )
										$( '#openid-form' ).show()
									
									} // if
									else
										$( '#openid-form' ).hide()										
								
								} // function
							
							) // $.keyup						
						
						$( '#openid-form .step-number' ).text( '3.' )
						$( '#submit' ).val( 'verify myOpenID account' )
						$( '#optional-step' ).show()
						$( '#optional-step input' ).focus()
						break
						
					case 'other':
						$( '#optional-step .step-number' ).text( '2.' )
						$( '#optional-step .prompt' ).text( ' Enter your OpenID URL: ' )
						$( '#optional-step input' )
							.val( 'http://' )
							.unbind( 'keyup' )
							.keyup(
						
								function()
								{
								
									var url = $( this ).val()
								
									if ( url.length > 0 )
									{
								
										$( '#openid' ).val( url )
										$( '#openid-form' ).show()
									
									} // if
									else
										$( '#openid-form' ).hide()										
								
								} // function
							
							) // $.keyup						
						
						$( '#openid-form .step-number' ).text( '3.' )
						$( '#submit' ).val( 'verify OpenID account' )
						$( '#optional-step' ).show()
						$( '#optional-step input' ).focus()
						break
						
						// http://username.myopenid.com/

				
				} // switch

				return false
			
			} // function
		
		) // $.click
	
	} // function

) // $.ready
