<!DOCTYPE html>
<html dir="@direction">
<head>
    @if( (favicon+'' != '')) {<link href="@favicon" rel="icon" type="image/x-icon" />}
    @includeHead("/")
    @includeHead("../body")
    @additionalHead
    <?php echo $this->getChildHtml("head") ?>
    <?php
        $_helper = Mage::registry('templateHelper');

        $_preview = Mage::app()->getRequest()->getParam('preview');
        $_baseCss = file_exists(Mage::getDesign()->getSkinBaseDir() . DS . 'style.min.css') ? 'style.min.css' : 'style.css';

        $_style = $this->getSkinUrl($_preview ? 'style.preview.php' : $_baseCss);
        $_script = $this->getSkinUrl('script.js');

        $_version = '?version=' . ($_helper ? $_helper->getThemeVersion() : '');
        $_style .= $_version;
        $_script .= $_version;

        if ($_preview) {
            $_style .= '&template=' . ($_helper ? $_helper->getThemeName() : '');
        }
    ?>
    <link rel="stylesheet" type="text/css" href="<?php echo $_style ?>" />
    <script src="<?php echo $_script ?>"></script>

    <!--[if lte IE 9]>
    <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('style.ie.css') ?>" />
    <script type="text/javascript" src="<?php echo $this->getSkinUrl('script.ie.js') ?>"></script>
    <![endif]-->
</head>
@include("../body")
</html>
