<?php include $this->_script('_error.phtml'); ?>
<div class="am-login-form-wrapper" <?php if(array_key_exists('sendpass', $_GET)): ?>style="display:none;"<?php endif;?>>
    <?php echo $this->blocks('login/form/before') ?>
    <div class="am-form am-auth-form am-login-form">
        <?php echo $content ?>
    </div>
    <?php echo $this->blocks('login/form/after') ?>
</div>
<div class="am-sendpass-form-wrapper" <?php if(array_key_exists('sendpass', $_GET)): ?>style="display:block;"<?php endif;?>>
    <div class="am-form am-auth-form am-sendpass-form">
        <form name="sendpass" method="post" action="<?php echo $this->url('sendpass') ?>" id="am-sendpass-form">
            <fieldset>
                <legend><?php __e('Lost password?') ?></legend>
                <?php if ($showRecaptcha) : ?>
                <div class="am-row am-row-wide row-sendpass-recaptcha" id="recaptcha-sendpass-row" data-recaptcha-theme="<?php echo $di->config->get('recaptcha-theme','light');?>" data-recaptcha-size="<?php echo $di->config->get('recaptcha-size','normal');?>">
                    <div class="am-element am-element-recaptcha" id="sendpass-recaptcha-element"></div>
                </div>
                <?php endif; ?>
                <div class="am-row am-row-sendpass-email">
                    <div class="am-element-title">
                        <label for="sendpass"><?php __e('Username/Email') ?></label>
                    </div>
                    <div class="am-element"><input type="text" name="login" id="sendpass" size="15" placeholder="<?php __e('Username/Email') ?>" /></div>
                </div>
                <div class="am-row am-row-buttons">
                    <div class="am-element">
                        <input type="submit" value="<?php __e('Get Password') ?>" />
                        <a href="<?php echo $this->url('login') ?>" class="local-link am-form-login-switch"><?php __e('Log In') ?></a>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
</div>
<script type="text/javascript">
jQuery('.am-form-login-switch').click(function(){
    jQuery('.am-login-form-wrapper, .am-sendpass-form-wrapper').toggle();
    jQuery('.am-login-form-wrapper .errors, .am-sendpass-form-wrapper .errors, .am-body-content .am-errors').remove();
    return false;
});
jQuery('.am-login-form-wrapper form, .am-sendpass-form-wrapper form').submit(function(){
    jQuery('.am-body-content .am-errors').remove();
});
<?php if ($showRecaptcha) : ?>
if (typeof grecaptcha == "undefined")
{
    window.onLoadGrecaptcha = function(){
        jQuery('#sendpass-recaptcha-element, #recaptcha-element').each(function(){
           jQuery(this).closest('form').data('recaptcha', grecaptcha.render(jQuery(this).attr('id'), {
                sitekey: '<?php p($di->recaptcha->getPublicKey()) ?>',
                theme: jQuery(this).closest('.am-row').data('recaptcha-theme')
            }));
        });
    }
    jQuery.getScript('//www.google.com/recaptcha/api.js?onload=onLoadGrecaptcha&render=explicit');
}
<?php endif; ?>
</script>