<?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
 */
?>
<script type="text/javascript">
//<![CDATA[
    var payment = new Payment('co-payment-form', '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>');
//]]>
</script>
<form action="" id="co-payment-form">
    <fieldset id="checkout-payment-method-load">
        <?php echo $this->getChildHtml('methods') ?>
    </fieldset>
</form>

<div id="payment-tool-tip" class="white-box white-lightbox" style="display:none">
	<h2><?php echo $this->__('Card Verification Number') ?></h2>
	<div class="white-box-inner" style="padding:0 20px 20px 20px">
    	<div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div>
	</div>
	<a id="close_x" class="close" href="#"><?php echo $this->__('Close') ?></a>
</div>

<div class="buttons-set" id="payment-buttons-container">
    <button type="button" class="button" onclick="payment.save()"><?php echo $this->__('Continue &raquo;') ?></button>
    <span class="please-wait" id="payment-please-wait" style="display:none;">
        <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
    </span>
</div>

<script type="text/javascript">
//<![CDATA[
    function toggleToolTip(event){
        if($('payment-tool-tip')){
			$jQ('#payment-tool-tip').lightbox_me({
				centered: true
			});
            /*$('payment-tool-tip').setStyle({
                top: (Event.pointerY(event)-560)+'px'//,
                //left: (Event.pointerX(event)+100)+'px'
            })
            $('payment-tool-tip').toggle();*/
        }
        Event.stop(event);
    }
    if($('payment-tool-tip-close')){
        Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
    }
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
    payment.currentMethod = "<?php echo $this->getChild('methods')->getSelectedMethodCode() ?>";
//]]>
</script>
