<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<!--<![endif]-->
<head>
<link rel="canonical" href="http://www.20script.ir" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content= "<?php echo $keywords; ?>" />
<?php } ?>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<?php
    global $config, $url, $loader, $registry;

    $store_id = $config->get('config_store_id');
$lang = $config->get('config_language_id');

$loader->model('custom/general');
$model = $registry->get('model_custom_general');


$text_option_1 = 'canon';
    $text_option_2 = 'apple';
    $text_choose = '';
    $blog_item_topmenu = 'Blog';
    $text_choose_category = 'Select category...';

    $link_welcome_dresscode = $url->link('account/login', '', 'SSL');
    $blog_url = $url->link('simple_blog/article', '', 'SSL');
    $link_logged_dresscode = $url->link('account/logout', '', 'SSL');

    $buyshop_general = $config->get('buyshop_general');

    if (isset($buyshop_general['bgpattern'][$store_id])) {
        $bgpattern = $buyshop_general['bgpattern'][$store_id];
    } else {
        $bgpattern = '';
    }
    if (isset($buyshop_general['themecolor'][$store_id])) {
        $themecolor = $buyshop_general['themecolor'][$store_id];
    } else {
        $themecolor = '';
    }
    if (isset($buyshop_general['contentbgcolor'][$store_id])) {
        $contentbgcolor = $buyshop_general['contentbgcolor'][$store_id];
    } else {
        $contentbgcolor = '';
    }
    if (isset($buyshop_general['fontcolor'][$store_id])) {
        $fontcolor = $buyshop_general['fontcolor'][$store_id];
    } else {
        $fontcolor = '';
    }
    if (isset($buyshop_general['productrollover'][$store_id])) {
        $productrollover = $buyshop_general['productrollover'][$store_id];
    } else {
        $productrollover = '';
    }
    if (isset($buyshop_general['ajaxcart'][$store_id])) {
        $ajaxcart = $buyshop_general['ajaxcart'][$store_id];
    } else {
        $ajaxcart = '';
    }
    if (isset($buyshop_general['response'][$store_id])) {
        $response = $buyshop_general['response'][$store_id];
    } else {
        $response = 1;
    }
    if (isset($buyshop_general['blog_link'][$store_id])) {
        $blog_link = $buyshop_general['blog_link'][$store_id];
    } else {
        $blog_link = '';
    }




?>

<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,400i,300,700" rel="stylesheet" type="text/css" />
<link href="catalog/view/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />

<?php foreach ($styles as $style) { ?>
<link href="<?php echo $style['href']; ?>" type="text/css" rel="<?php echo $style['rel']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>



<!-- Responsibility switching -->
<?php if ($response == 0) { ?>
<link href="catalog/view/theme/<?php echo $config->get('config_template'); ?>/stylesheet/common_styles_response_off.css" rel="stylesheet">
<?php } else { ?>
<link href="catalog/view/theme/<?php echo $config->get('config_template'); ?>/stylesheet/common_styles.css" rel="stylesheet">
<?php } ?>
<!-- Responsibility switching -->

<!--custom css changes-->
<link type="text/css" href="catalog/view/theme/<?php echo $config->get('config_template'); ?>/stylesheet/custom.css" rel="stylesheet" />

    <!--[if !IE]><!-->
    <script>if(/*@cc_on!@*/false){document.documentElement.className+='ie10';}</script>
    <!--<![endif]-->



    <link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>

    <?php
        if (isset($buyshop_general['font'][$store_id]) && $buyshop_general['font'][$store_id] != '' && $buyshop_general['font'][$store_id] != '-') {
        $font = $buyshop_general['font'][$store_id];
        ?>

<link href='//fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $font); ?>:200,300,400,500,600,700,800' rel='stylesheet' type='text/css'>


<?php
    } else {
        $font = '';
    }

    ?>



<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $config->get('config_template'); ?>/stylesheet/ie8.css" />
<![endif]-->
<!--[if IE 9]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $config->get('config_template'); ?>/stylesheet/ie9.css" />
<![endif]-->


<!-- changing options from admin panel  -->

<style type="text/css">

       /* font family */
<?php if (isset($font) && !is_array($font)) : ?>
        h1, h2, h3, h4, h5, h6,
        .phone,
        #slogan li a,
        .tabs div a, .box .box-heading,
        .product-list .name a,
        .product-info .price-bottom-box .regular-price,
        .product-info .price-bottom-box .special-price-box{
            font-family: <?php echo $font; ?>
        }
<?php endif; ?>
       /* body bg pattern */
<?php if ( !empty($bgpattern) && ($bgpattern !== '0') ) : ?>
        body{
           background-image: url("catalog/view/theme/<?php echo $config->get('config_template'); ?>/image/dresscode_images/bg-patterns/<?php echo $bgpattern; ?>");
         }
<?php endif; ?>

        /* theme color */
<?php if ( !empty($themecolor)) : ?>
    #header .button-search,
    #footer_button,
    .newsletter_footer a.button,
    .es-nav span,
    #header #cart .content .checkout a,
    #menu > ul > li:hover > a,
    #footer input[type=button]{
       background-color: <?php echo $themecolor; ?>
    }

    #menu > ul > li > div{
        border-top: 3px solid <?php echo $themecolor; ?>;
    }
    input.button, a.button, .product-list .listing_cart input{
        background-color: <?php echo $themecolor; ?>
    }
    input.button:hover, a.button:hover, .product-list .listing_cart input:hover{
        background: <?php echo $themecolor; ?>
    }

    <?php endif; ?>

        /* content bg color */
<?php if ( !empty($contentbgcolor)) : ?>
    body{
      background-color: <?php echo $contentbgcolor; ?>
    }
<?php endif; ?>

       /* font color */
<?php if ( !empty($fontcolor)) : ?>
    h1, h2, h3, h4, h5, h6, .phone, #nav_first .nav_block_dropdown a, .shopping_cart span.cart_link, .shopping_cart span em, #select_top .sbOptions a:link, #select_top .sbOptions a:visited, #slogan li a, .tabs div a, #footer h3, #footer_higher h3, #footer li a, #powered, #footer_higher_content #deal, #footer_higher_content #contact, #footer_higher_content #twitter, #footer_higher_content #facebook, #footer_higher_content #contact a, #header input[type="text"], #menu > ul > li > div > ul > li > a, .breadcrumb a, #content h1, h1.listing_title, .category-info, .box-category > ul > li > a, .box .box-content a, .category-list ul li a, .product-filter, .product-filter a, .pagination .results, .htabs a, .htabs a.selected, .product-page-content .left_info, .product-info .add-to-links a, .product-info .price-bottom-box .regular-price, .product-page-content .dresscode_product_custom_block_subtitle, .custom_block_items .custom_block_item, .product-info .gallery_note, .product-page-content .sixteen.columns.alpha > div, .product-info .review .review-stars p.no-rating a, .tab-content, .tags, .tags a, .attribute thead td, .attribute thead tr td:first-child, .attribute tr td:first-child, .attribute td{
       color: <?php echo $fontcolor; ?>
}
<?php endif; ?>


       /* product rollover disable */
<?php if ( $productrollover == 0) : ?>
    .roll_over_img{
        display: none!important;
}
<?php endif; ?>

</style>
<!-- changing options from admin panel  -->

<?php echo $google_analytics; ?>
</head>
<body class="<?php echo $class; ?>">
<script src="//code.jquery.com/jquery-latest.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.js"></script>





<script type="text/javascript" src="catalog/view/theme/<?php echo $config->get('config_template'); ?>/js/jquery-ui.min.js"></script>

<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript" src="catalog/view/javascript/common.js"></script>

<script type="text/javascript" src="catalog/view/theme/<?php echo $config->get('config_template'); ?>/js/common_scripts.js"></script>

<!-- Responsibility switching -->
<?php if ($response == 0) { ?>
<script type="text/javascript" src="catalog/view/theme/<?php echo $config->get('config_template'); ?>/js/banner_scripts_off.js"></script>
<?php } else { ?>
<script type="text/javascript" src="catalog/view/theme/<?php echo $config->get('config_template'); ?>/js/banner_scripts.js"></script>
<?php } ?>
<!-- Responsibility switching -->






<?php foreach ($scripts as $script) { ?>
<script src="<?php echo $script; ?>" type="text/javascript"></script>
<?php } ?>


<?php if(!empty($this->request->get['route']) && $this->request->get['route'] != 'common/home') { ?>
 <div class="main_page">
<?php } ?>

<div id="container">
    <div id="header">
        <div class="container">
                <?php if ($logo) { ?>
                    <div id="logo" class="five columns alpha"><a href="<?php echo $home; ?>"><img class="scale-with-grid" src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
                <?php } ?>

                <div id="top_link" class="eleven columns">

                <div class="row padding-2">
                    <div class="phone"><a href="<?php echo $contact; ?>"><i class="fa fa-phone"></i></a><?php echo $telephone; ?></div>
                    <?php echo $language; ?>
                    <?php echo $currency; ?>
                    <?php echo $cart; ?>

                </div>
                <div class="row">

                    <div id="nav_first">
                        <div id="nav_block_head">
                            <div class="nav_block_head_field"><?php echo $text_account; ?></div>
                            <span class="nav_block_head_button"> </span>
                            <div class="clear"></div>
                        </div>
                        <div class="nav_block_dropdown">
                            <ul class="links">
                                <li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
                                <li><a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a></li>
                                <li><a href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?></a></li>
                                <li><a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></li>
                                <li class="last">
                                    <?php if (!$logged) { ?>
                                        <?php echo '<a href="'.$link_welcome_dresscode.'">'.$text_login.'</a>'; ?>
                                    <?php } else { ?>
                                        <?php echo '<a href="'.$link_logged_dresscode.'">'.$text_logout.'</a>'; ?>
                                    <?php } ?>
                                </li>
                            </ul>

                        </div>
                    </div>
                    <div id="select_top" class="select_wrapper">
                        <select name="select1" id="select1" tabindex="1">
                            <option value="<?php echo $text_option_1; ?>"><?php echo $text_option_1; ?></option>
                            <option value="<?php echo $text_option_2; ?>"><?php echo $text_option_2; ?></option>
                        </select>
                        <?php echo $search; ?>
                    </div>

                </div>


        </div>

    </div>


<?php if ($categories) { ?>
   <div class="nav-container">
       <div class="container">

                <div id="menu_block_head">
                    <div class="nav_block_head_field"><?php echo $text_choose_category; ?></div>
                    <span class="menu_block_head_button"> </span>
                    <div class="clear"></div>
                </div>

                <div class="menu_block_dropdown">

                        <div id="menu">
                            <ul id="nav">
                                <li class="img_link_wrapper"><a class="image-link" href="<?php echo $home; ?>"></a></li>
                                <?php foreach ($categories as $category) { ?>

                                    <li>
                                        <a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
                                        <?php
                                        $subcategory_id = $category['href'];
                                            $category_option = $model->getCategoryOptionByHref($subcategory_id, 'html_top');
                                        ?>
                                        <?php if ($category['children']) { ?>
                                        <div class="<?php echo (isset($category_option) && $category_option != '<p><br></p>' ? 'with_descr' : 'none_descr'); ?> width-<?php echo $category['column']; ?>">
                                            <?php for ($i = 0; $i < count($category['children']);) { ?>
                                            <ul class="<?php echo (($category['column']>1) ? 'list' : 'grid'); ?>">
                                            <?php
                                                    if ($category_option) {
                                                        $j = $i + ceil(count($category['children']) / 1);
                                                    } else {
                                                        $j = $i + ceil(count($category['children']) / $category['column']);
                                                    }
                                                  ?>
                                                  <?php for (; $i < $j; $i++) { ?>
                                                  <?php if (isset($category['children'][$i])) { ?>
                                                  <li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
                                                  <?php } ?>
                                                  <?php } ?>
                                                </ul>
                                            <?php } ?>

                                            <?php if (isset($category_option) && $category_option != '<p><br></p>') { ?>
                                                <div class="category_description_block">
                                                    <?php echo $category_option; ?>
                                                </div>
                                            <?php } ?>
                                        </div>
                                        <?php } ?>
                                    </li>
                                <?php } ?>

                                <!-- menu custom block -->
                                <?php echo $loader->controller('common/custom_menu'); ?>
                                <!-- menu custom block -->

                                <?php if (isset($blog_link) && $blog_link != 0) : ?>
                                <li class="blog_link"><a href="<?php echo $blog_url; ?>"><?php echo $blog_item_topmenu; ?></a></li>
                                <?php endif; ?>

                            </ul>
                        </div>
                </div>
       </div>
   </div>


<?php } ?>
</div>

    <div class="container">
        <div class="sixteen columns">
            <div id="notification"></div>
        </div>
    </div>

    <div class="<?php echo (!empty($this->request->get['route']) && $this->request->get['route'] != 'common/home') ? 'container all_pages' : 'base_page'; ?>">
