<script type="text/javascript">

$(function() {
   $(".selectAddress").button();

});

</script>


<?foreach($addresses as $address):?>
<div class="address">
    <span class="address"><?=$address['Address']['address']?></span>
    <span class="city"><?=$address['Address']['city'];?></span>
    <span class="state"><?=$address['State']['name'];?></span>
    <span class="country"><?=$address['Country']['name'];?></span>
    <button class="selectAddress" id="<?=$address['Address']['id']?>">Ship to this Address</button>
</div>
<?endforeach;?>