<!DOCTYPE html>
{*
	Общий вид страницы
	Этот шаблон отвечает за общий вид страниц без центрального блока.
*}
<html>
<head>
	<base href="{$config->root_url}/"/>
	<title>{$meta_title|escape}</title>
	
	{* Метатеги *}
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="description" content="{$meta_description|escape}" />
	<meta name="keywords"    content="{$meta_keywords|escape}" />
	<meta name="viewport" content="width=1024"/>
	
	{* Стили *}
	<link href="design/{$settings->theme|escape}/css/all.css" rel="stylesheet" type="text/css" media="screen"/>
	<link href="design/{$settings->theme|escape}/css/style.css" rel="stylesheet" type="text/css" media="screen"/>
	<link href="design/{$settings->theme|escape}/images/favicon.ico" rel="icon"          type="image/x-icon"/>
	<link href="design/{$settings->theme|escape}/images/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
	<link href='http://fonts.googleapis.com/css?family=Cuprum&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
	<link href='http://fonts.googleapis.com/css@family=Abel' rel='stylesheet'>
	
	{* JQuery *}
	{* <script src="js/jquery/jquery.js"  type="text/javascript"></script> *}
	{if $module == 'ProductView'}
	<script type="text/javascript" src="design/{$settings->theme|escape}/js/product.js"></script>
	{* elseif $module == 'ProductsView'}
	<script type="text/javascript" src="design/{$settings->theme|escape}/js/products.js"></script> *}	
	{else}
	<script type="text/javascript" src="design/{$settings->theme|escape}/js/main.js"></script>
	{/if}
	
	
	{* Всплывающие подсказки для администратора *}
	{if $smarty.session.admin == 'admin'}
	<script src ="js/admintooltip/admintooltip.js" type="text/javascript"></script>
	<link   href="js/admintooltip/css/admintooltip.css" rel="stylesheet" type="text/css" /> 
	{/if}
	
	
	{* Ctrl-навигация на соседние товары *}
	<script type="text/javascript" src="js/ctrlnavigate.js"></script>           
	
	{* Аяксовая корзина *}
	<script src="design/{$settings->theme}/js/jquery-ui.min.js"></script>
	<script src="design/{$settings->theme}/js/ajax_cart.js"></script>
	
	{* js-проверка форм *}
	<script src="/js/baloon/js/baloon.js" type="text/javascript"></script>
	<link   href="/js/baloon/css/baloon.css" rel="stylesheet" type="text/css" /> 
	
	{* Автозаполнитель поиска *}
	{literal}
	<script src="js/autocomplete/jquery.autocomplete-min.js" type="text/javascript"></script>
	<style>
	.autocomplete-w1 { position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; }
	.autocomplete { border:1px solid #999; background:#FFF; width: 300px; cursor:default; text-align:left; overflow-x:auto;  overflow-y: auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px;  _margin:0; _overflow-x:hidden; }
	.autocomplete .selected { background:#F0F0F0; }
	.autocomplete div { padding:2px 5px; white-space:nowrap; }
	.autocomplete strong { font-weight:normal; color:#3399FF; }
	</style>	
	<script>
	jQuery(function() {
		//  Автозаполнитель поиска
		jQuery(".input_search").autocomplete({
			serviceUrl:'ajax/search_products.php',
			minChars:1,
			noCache: false, 
			onSelect:
				function(value, data){
					 jQuery(".input_search").closest('form').submit();
				},
			fnFormatResult:
				function(value, data, currentValue){
					var reEscape = new RegExp('(\\' + ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'].join('|\\') + ')', 'g');
					var pattern = '(' + currentValue.replace(reEscape, '\\$1') + ')';
	  				return (data.image?"<img align=absmiddle src='"+data.image+"'> ":'') + value.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
				}	
		});
	});
	</script>
	{/literal}
        
     <script type="text/javascript" src="http://userapi.com/js/api/openapi.js?49"></script>

     {literal}  <script type="text/javascript">
            $(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed: 700 })});
            VK.init({apiId: 3032854, onlyWidgets: true});
      </script>
      {/literal}
		
			
</head>
<body>

    <noscript>
        <div class="global-site-notice noscript">
            <div class="notice-inner">
                <p>
                    <strong>JavaScript seems to be disabled in your browser.</strong><br />
                    You must have JavaScript enabled in your browser to utilize the functionality of this website.                </p>
            </div>
        </div>
    </noscript>
<div id="wrap">
    <div id="right_toolbar" class="hidden-phone hidden-tablet">
    <div><a href="/"><img src="design/{$settings->theme}/images/logo_small.png" width="52" height="142" alt=""></a></div>
    
<div class="shoppingcart" id="shoppingcart">
			{* Обновляемая аяксом корзина должна быть в отдельном файле *}
			{include file='cart_informer.tpl'}
</div>







    <div class="search_wrapper">
    <form class="form-search" action="products">
        <button type="submit" class="btn"><i class="icon-search-2 icon-large"></i></button>
        <input type="text" name="keyword" class="input-medium search-query" value="поиск..." onblur="if {literal}(this.value == '') {this.value = 'поиск...';}" onfocus="if(this.value == 'поиск...') {this.value = '';}{/literal}">
    </form>
</div>    <div id="back-top"> <a href="#top"><i class="icon-up-2"></i></a> </div>
</div>
        <!--TOPLINE v2-->
    <div id="topline" >
        <div class="container">
            <div class="wrapper_w">
                <div class="pull-left hidden-phone hidden-tablet ">
                    <div class="phone">
                    <p><span style="font-size: 16px;"><em class="icon-mobile-alt"></em>&nbsp;+1</span><span style="font-size: 16px; color: #9B9B9B;"> (234) </span><span style="font-size: 18px;">567 89 00</span> &nbsp; &nbsp; &nbsp; &nbsp;
				{foreach $pages as $p}
				{* Выводим только страницы из первого меню *}
				{if $p->menu_id == 1}
				<span {if $page && $page->id == $p->id}class="selected"{/if}>
				<a data-page="{$p->id}" href="{$p->url}">{$p->name|escape}</a>
			 <span style="color: #9B9B9B;">&nbsp; / &nbsp; </span> 
				</span> 
				{/if}
			{/foreach}</p>
					
              </div>
                </div>
                <div class="pull-right">

                    <div class="alignright">

                                <div class="hidden-phone" style="display: inline-block">
			{if $user}
				<span id="username">
					<a href="user">{$user->name}</a>{if $group->discount>0},
					ваша скидка &mdash; {$group->discount}%{/if}
				</span> / 
				<a id="logout" href="user/logout">выйти</a> &nbsp;&nbsp;
			{else}
				<a id="register" href="user/register">Регистрация</a> / 
				<a id="login" href="user/login">Вход</a> &nbsp;&nbsp;
			{/if}                               

                                </div>
			<!-- Выбор валюты -->
			{* Выбор валюты только если их больше одной *}
			{if $currencies|count>1}
                            <span class="link_label">Валюта:</span>
<div class="fadelink"> <span>
					{foreach from=$currencies item=c}
					{if $c->id==$currency->id}{$c->name|escape}
					{/if}
					{/foreach}</span>
    <div class="ul_wrapper">
	  <ul>
					{foreach from=$currencies item=c}
					{if $c->enabled} 
					<li class="{if $c->id==$currency->id}selected{/if}"><a href='{url currency_id=$c->id}'>{$c->name|escape}</a></li>
					{/if}
					{/foreach}	  
			  </ul>
    </div>
</div>
			{/if}
			<!-- Выбор валюты (The End) -->	

                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--TOPLINE v2 EOF-->
    
<!--HEADER-->
<div class="header_wrapper ">
        <div id="header" data-retina="true"  >


        <div class="container">
            <div class="wrapper_w">
                <div id="logo">
                 <a href="./" title="{$settings->site_name|escape}"><img   data-retina="true" src="design/{$settings->theme}/images/logo.png"  alt="{$settings->site_name|escape}"></a> </div>
                <div class="pull-right padding-1">
                    
<div class="shoppingcart" id="cart_informer">
			{* Обновляемая аяксом корзина должна быть в отдельном файле *}
			{include file='cart_informer.tpl'}
</div>






                </div>
                <div class="pull-right padding-1">
                    <div id="search_mini_form"  class="form-search-wrapper"  data-retina="true" >
    <form class="form-search" id="form-search" action="products">
        <input id="search" name="keyword" type="text" class="input_search search-query" value="введите слова для поиска..." onblur="if {literal}(this.value == '') {this.value = 'введите слова для поиска...';}" onfocus="if(this.value == 'введите слова для поиска...') {this.value = '';}{/literal}">
        <button type="submit" class="btn" onClick="document.getElementById('form-search').submit()"><i class="icon-search-2 icon-large"></i></button>
    </form>

</div>




                </div>
            </div>
            <div class="row">
                <div class="span12">
                    <ul class="nav nav-list">
    <li class="nav-header"> <a href="#level1" title="" data-toggle="collapse"><i class="icon-th"></i>&nbsp;&nbsp;
        Меню        <i class="icon-down pull-right"></i> </a>

			{function name=categories_tree2}
			{if $categories}
			<ul class="collapse in" id="{if $level !=0}level{$c->id}{else}level1{/if}" >
			{foreach $categories as $c}
				{* Показываем только видимые категории *}
				{if $c->visible}
					<li>
						{if $c->image}<img src="{$config->categories_images_dir}{$c->image}" alt="{$c->name}">{/if}
						<a {if $category->id == $c->id}class="selected"{/if} href="catalog/{$c->url}" data-category="{$c->id}">{$c->name}</a>
						{if $c->subcategories}
		<a class="icon-collapse" href="#level{$c->id}" title="" data-toggle="collapse" >
    <i class="icon-down pull-right"></i></a>
    					{/if}
						{categories_tree2 categories=$c->subcategories  level= $level+1}
					</li>
				{/if}
			{/foreach}
			</ul>
			{/if}
			{/function}
			{categories_tree2 categories=$categories level=0}
</li>
</ul>			        
                    <nav>
                      <ul id="nav">
  <li> 
  <a href="./">
    <i class="icon-home"></i></a> 
  </li> 
  			{function name=categories_tree}
			{if $categories}						
			{foreach $categories as $c}			
			{if $level == 0}
				{* Показываем только видимые категории *}
				{if $c->visible}												
					<li class="level{$level}">						
						<a {if $category->id == $c->id}class="selected"{/if} href="catalog/{$c->url}" data-category="{$c->id}">{$c->name}</a>
						{if $c->subcategories}						
						<ul class="level{$level}">
      <li class='list_column'>
        <ul class='list_in_column'>						
				{categories_tree categories=$c->subcategories level=$level+1}
				
			</ul>
			</li>			
		</ul>
						{/if}
					</li>
						
				{/if}			
			{else}
				{* Показываем только видимые категории *}
				{if $c->visible}								
					<li class="level{$level}">						
						<a {if $category->id == $c->id}class="selected"{/if} href="catalog/{$c->url}" data-category="{$c->id}">{$c->name}</a>
						{if $c->subcategories}
						<ul class="level{$level}">{categories_tree categories=$c->subcategories level=$level+1}</ul>
						{/if}
					</li>	
		{if $level == 1 && ($c@iteration%3 == 0 && !$c@last)}
        </ul>
      </li>
      <li class='list_column'>
        <ul class='list_in_column'>		
		{/if}									
				{/if}
			{/if}	
			{/foreach}			
			{/if}
			{/function}
			{categories_tree categories=$categories level = 0}       
 
    </ul>

                    </nav>
                </div>
            </div>
        </div>
    </div>
</div>

<!--HEADER EOF-->    
{if $module == 'MainView'}
{include file='slider.tpl'}
{/if}
    <section id="content" class="container" >
 {if $module == 'MainView'}
 {$content}
 {else}   
    <div class="container-top" >
  {if $module == 'CartView' || $module == 'ProductView'}  
{$content}
	{else}
                    <div class="row">
                <div  class="span9" id="column_right">
                {$content}
                </div>
                <div class="span3" id="column_left">
                {include file='sidebar.tpl'}
                </div>
                </div>	
	
	{/if}
	</div>
{/if}	
    </section>
</div>

<!--FOOTER-->
<div  id="footer">

        <div id="footer_line">
    
                <div id="footer_popup" class="footer_bg allowHover ">
            <div class="container">
                <div class="row">
                    <div class="span6">
                        <div class="row">
                            <div class="span3">
                                <h3>Меню</h3>
                                
 			{foreach $pages as $p}
				{* Выводим только страницы из первого меню *}
				{if $p->menu_id == 1}
				<p {if $page && $page->id == $p->id}class="selected"{/if}>
					<a data-page="{$p->id}" href="{$p->url}">{$p->name|escape}</a>
				</p>
				{/if}
			{/foreach}                
                 
                                         </div>
                            <div class="span3">
                                <h3>Меню2</h3>
                                
                 
                    {foreach $pages as $p}
				{* Выводим только страницы из первого меню *}
				{if $p->menu_id == 2}
				<p {if $page && $page->id == $p->id}class="selected"{/if}>
					<a data-page="{$p->id}" href="{$p->url}">{$p->name|escape}</a>
				</p>
				{/if}
			{/foreach}    
                                         </div>
                        </div>
                    </div>
                    <div class="span6">
                        <div class="row">
                            <div class="span3">
                                                                <h3>Меню3</h3>
                                
                 
                        <p><a href="#">Ссылка</a></p>
						<p><a href="#">Ссылка</a></p>
						<p><a href="#">Ссылка</a></p>
						<p><a href="#">Ссылка</a></p>
                       
                 
                                                                         </div>
                            <div class="span3">
                                <h4>ПОДПИСАТЬСЯ НА РАССЫЛКУ</h4>
<form class="form-mail" action="" method="post"  id="newsletter-validate-detail">
    <input type="text" name="email" class="input-medium" value="ваш e-mail..." onblur="if {literal}(this.value == '') {this.value = 'ваш e-mail...';}" onfocus="if(this.value == 'ваш e-mail...') {this.value = '';}{/literal}">
    <button type="submit" class="btn"><i class="icon-email"></i></button>
</form>
                           </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
                <div id="footer_button"><i class="icon-up"></i></div>
            
    

        <div class="container" id="footer_bottom">
            <div class="row">
                <div class="span12">
                    <div class="pull-left noHover">
                        <span class="hidden-phone payment_icons">
                            
                 
                     <img data-retina="true" src="design/{$settings->theme}/images/payment1.png" alt="">
                     <img data-retina="true" src="design/{$settings->theme}/images/payment2.png" alt="" height="26">
                     <img data-retina="true" src="design/{$settings->theme}/images/payment3.png" alt="">
                     <img data-retina="true" src="design/{$settings->theme}/images/webmoney.png" alt="">
                     <img data-retina="true" src="design/{$settings->theme}/images/qiwi.gif" alt="">
                 
                                     </span>
                        <span class="text">
                 
                 &copy; 2013 <a href="./"><span class="custom_color">BUY</span>SHOP</a>. Все права защищены.
                 
             </span>
                    </div>
                    <div class="pull-right noHover">
                        
                 
                        <a href="#"><i class="icon-facebook"></i></a> &nbsp;
                        <a href="#"><i class="icon-twitter-bird"></i></a> &nbsp;&nbsp;&nbsp;
                        <a href="#"><i class="icon-linkedin"></i></a> &nbsp;
                        <a href="#"><i class="icon-pinterest"></i></a> &nbsp;
                        <a href="#"><i class="icon-gplus"></i></a>
                 
                                 </div>
                </div>
            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript" src="design/{$settings->theme}/js/etheme/buyshop/layerslider.kreaturamedia.jquery.js"></script><script type="text/javascript" >
   jQuery('section#content .container.top').removeClass('top');
</script>
{/literal}

	
</body>
</html>