<?php
/**
 * Avalanche for Magento 1.8+
 * Designed by Fast Division (http://fastdivision.com)
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file license.txt.
 * It is also available through the world-wide-web at this URL:
 * http://fastdivision.com/legal/license.txt
 *
 * @author     Fast Division
 * @version    1.5.0
 * @copyright  Copyright 2013 Fast Division
 * @license    http://fastdivision.com/legal/license.txt
 */
?>
<div class="multiple-checkout grid_12 white-box">
    <h1><?php echo $this->__('Change Billing Address') ?><div class="call-to-action" style="margin-top: -6px"><button type="button" title="<?php echo $this->__('Add New Address') ?>" class="button" onclick="setLocation('<?php echo $this->getAddNewUrl() ?>')"><span><span><?php echo $this->__('Add New Address') ?></span></span></button></div></h1>
    <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
    <?php $_index=0 ?>
    <div class="white-box-inner">
        <?php foreach ($this->getAddressCollection() as $_address): ?>
            <p class="actions">
                <a href="<?php echo $this->getEditAddressUrl($_address) ?>"><?php echo $this->__('Edit Address') ?></a> <span class="separator">|</span> 
                <a href="<?php echo $this->getSetAddressUrl($_address) ?>"><strong><?php echo $this->__('Select Address') ?></strong></a>
            </p>
            <address>
                <?php echo $_address->format('html') ?>
            </address>
            <?php if($this->isAddressDefaultBilling($_address)): ?>
               <strong><?php echo $this->__('Default Billing') ?></strong>
            <?php endif; ?>
            <?php if($this->isAddressDefaultShipping($_address)): ?>
                <br /><strong><?php echo $this->__('Default Shipping') ?></strong>
            <?php endif; ?>
            <?php $_index++ ?>
            <?php if($_index && $_index%3==0): ?></div><?php endif; ?>
        <?php endforeach; ?>
    </div><br/>
    <div class="box-action box-multishipping clearfix">
        <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Billing Information') ?></a></p>
    </div>
</div>
