<?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
 */
?>
<!DOCTYPE html> 
<!--[if lt IE 7 ]> <html lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" class="ie ie6 no-js" itemscope itemtype="http://schema.org/Product"> <![endif]--> 
<!--[if IE 7 ]>    <html lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" class="ie ie7 no-js" itemscope itemtype="http://schema.org/Product"> <![endif]--> 
<!--[if IE 8 ]>    <html lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" class="ie ie8 no-js" itemscope itemtype="http://schema.org/Product"> <![endif]--> 
<!--[if IE 9 ]>    <html lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" class="ie ie9 no-js" itemscope itemtype="http://schema.org/Product"> <![endif]--> 
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="<?php echo $this->getLang() ?>" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" class="no-js" itemscope itemtype="http://schema.org/Product"> <!--<![endif]--> 
<head>
	<?php echo $this->getChildHtml('head') ?>
	<?php if(Mage::getStoreConfig('avalanche_social/facebook/facebook_enabled') == 1): ?>
		<?php $_helper = $this->helper('catalog/output'); ?>
		<?php $_product = Mage::registry('current_product'); ?>
		<meta property="og:title" itemprop="name" content="<?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>"/>
	    <meta property="og:type" content="product"/>
	    <meta property="og:url" itemprop="url" content="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>"/>
	    <meta property="og:image" itemprop="image" content="<?php echo $this->helper('catalog/image')->init($_product, 'image'); ?>"/>
	    <meta property="og:site_name" content="<?php echo Mage::getStoreConfig('avalanche_social/facebook/facebook_og_sitename'); ?>"/>
	    <meta property="fb:admins" content="<?php echo Mage::getStoreConfig('avalanche_social/facebook/facebook_og_admins'); ?>"/>
	    <meta property="og:description" itemprop="description" content="<?php echo trim(strip_tags($_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description'))) ?>"/>
    <?php else: ?>
		<meta itemprop="name" content="<?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>">
		<meta itemprop="description" content="<?php echo trim(strip_tags($_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description'))) ?>">
		<meta itemprop="image" content="<?php echo $this->helper('catalog/image')->init($_product, 'image'); ?>">
		<meta itemprop="url" content="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>">
	<?php endif; ?>
</head>

<body class="<?php echo $this->getBodyClass() ? trim($this->getBodyClass()) : '' ?> <?php echo Mage::helper('themeconfig')->getStoreClass(); ?>">
<?php echo $this->getChildHtml('after_body_start') ?>
<?php echo $this->getChildHtml('global_notices') ?>

<div id="wrapper">
	<div id="container" class="container_12">
		<?php echo $this->getChildHtml('header') ?>
		
		<div id="main" role="main" class="clearfix">
		    <?php echo $this->getChildHtml('breadcrumbs') ?>
			<div class="global-messages">
	        	<?php echo $this->getChildHtml('global_messages') ?>
			</div>
			<div id="content" class="clearfix">
				<?php if(Mage::getStoreConfig('avalanche_config/avalanche_product_details/avalanche_detailsbreadcrumbs') == 1): ?>
				<div class="grid_12" style="margin-top: 0">
					<div class="toolbar clearfix" style="margin-top: 0">
						<?php echo $this->getLayout()->getBlock('breadcrumbs')->toHtml(); ?>
					</div>
				</div>
				<?php endif; ?>
				<div id="product-content" class="grid_7">
					<?php echo $this->getChildHtml('content') ?>
				</div>
				<div id="product-info" class="grid_5 omega">
					<?php echo $this->getChildHtml('right') ?>
				</div>
			</div>
		</div>
		
	    <?php echo $this->getChildHtml('footer') ?>
	</div>
</div>

<?php echo $this->getChildHtml('before_body_end') ?>
<?php echo $this->getAbsoluteFooter() ?>
<?php echo $this->getChildHtml('foot'); /* Load JS in Footer */ ?>

</body>
</html>
