{% if (theme_options.get( 'fixed_header' ) == 1) %} 
<!-- HEADER
	================================================== -->
<div class="fixed-header-1 sticky-header">
	<div class="background-header"></div>
	<div class="slider-header">
		<!-- Top of pages -->
		<div id="top" class="{% if (theme_options.get( 'header_layout' ) == 1) %} {{ 'full-width' }} {% elseif (theme_options.get( 'header_layout' ) == 4) %} {{ 'fixed3 fixed2' }} {% elseif (theme_options.get( 'header_layout' ) == 3) %} {{ 'fixed2' }} {% else %} {{ 'fixed' }} {% endif %}">
			<div class="background-top"></div>
			<div class="background">
				<div class="shadow"></div>
				<div class="pattern">
					{% if (theme_options.get( 'megamenu_type' ) == 4 or theme_options.get( 'megamenu_type' ) == 5 or theme_options.get( 'megamenu_type' ) == 6 or theme_options.get( 'megamenu_type' ) == 9 or theme_options.get( 'megamenu_type' ) == 14 or theme_options.get( 'megamenu_type' ) == 19 or theme_options.get( 'megamenu_type' ) == 29) %} 
					<div class="container container-megamenu2">
					{% endif %} 
					
					{% set menu9 = theme_options.getModules('menu') %}
					{% if ( menu9|length > 0 ) %} 
					     <div class="megamenu-background">
					          <div class="">
					               <div class="overflow-megamenu container">
			 						{% if (menu9|length > 1) %} {{ '<div class="row mega-menu-modules">' }}{% endif %}
			 						{% set i = 0 %}
			 						 
			 						{% for module in menu9 %} 
			 						 {% if (i == 0 and menu9|length > 1) %} {{ '<div class="col-md-3">' }}{% endif %}
			 						 {% if (i == 1 and menu9|length > 1) %} {{ '<div class="col-md-9">' }}{% endif %}
			 							 {{ module }}
			 							{% if (menu9|length > 1 and (i == 0 or i == 1)) %} {{ '</div>' }}{% endif %}
			 							{% if (menu9|length > 1 and i == 1) %} {{ '</div>' }}{% endif %}
			 							{% set i = i + 1 %}
			 						{% endfor %} 
               					</div>
               				</div>
               			</div>
					{% else %} 
						{{ menu }}
					{% endif %}
					
					{% if (theme_options.get( 'megamenu_type' ) == 4 or theme_options.get( 'megamenu_type' ) == 5 or theme_options.get( 'megamenu_type' ) == 6 or theme_options.get( 'megamenu_type' ) == 9 or theme_options.get( 'megamenu_type' ) == 14 or theme_options.get( 'megamenu_type' ) == 19 or theme_options.get( 'megamenu_type' ) == 29) %} 
					</div>
					{% endif %} 
					
					
					{% set menu92 = theme_options.getModules('menu2') %}
					{% if ( menu92|length > 0 ) %} 
					 {{ '<div class="overflow-menu2">' }}
						{% for module in menu92 %} 
							{{ module }}
						{% endfor %}
						{{ '</div>' }}
					{% endif %} 
				</div>
			</div>
		</div>
	</div>
</div>
{% endif %} 

<!-- HEADER
	================================================== -->
<header class="header-type-12">
	<div class="background-header"></div>
	<div class="slider-header">
		<!-- Top of pages -->
		<div id="top" class="{% if (theme_options.get( 'header_layout' ) == 1) %} {{ 'full-width' }} {% elseif (theme_options.get( 'header_layout' ) == 4) %} {{ 'fixed3 fixed2' }} {% elseif (theme_options.get( 'header_layout' ) == 3) %} {{ 'fixed2' }} {% else %} {{ 'fixed' }} {% endif %}">
			<div class="background-top"></div>
			<div class="background">
				<div class="shadow"></div>
				<div class="pattern">
					<div class="container">
						<div class="row">
							<!-- Header Left -->
							<div class="col-sm-4" id="header-left">
							     {% if (logo) %} 
							     <!-- Logo -->
							     <div class="logo"><a href="{{ home }}"><img src="{{ logo }}" title="{{ name }}" alt="{{ name }}" /></a></div>
							     {% endif %} 
							</div>
							
							<!-- Header Right -->
							<div class="col-sm-8" id="header-right">
							 {% set search_cats = theme_options.getAllCategories() %}
							 {% set category_id = theme_options.getCurrentCategory() %}
							 
							      
							     <div class="search_form">
							          <div class="button-search"></div>
							          
							          <div class="search-cat">
							              <select name="category_id" class="form-control">
							                <option value="0">{{ theme_options.get( 'all_categories_text', config.get( 'config_language_id' ) ) != '' ? theme_options.get( 'all_categories_text', config.get( 'config_language_id' ) ) : 'All categories' }}</option>
							                {% for category_1 in search_cats %} 
							                {% if (category_1['category_id'] == category_id) %} 
							                <option value="{{ category_1['category_id'] }}" selected="selected">{{ category_1['name'] }}</option>
							                {% else %} 
							                <option value="{{ category_1['category_id'] }}">{{ category_1['name'] }}</option>
							                {% endif %} 
							                {% for category_2 in category_1['children'] %} 
							                {% if (category_2['category_id'] == category_id) %} 
							                <option value="{{ category_2['category_id'] }}" selected="selected">&nbsp;&nbsp;{{ category_2['name'] }}</option>
							                {% else %} 
							                <option value="{{ category_2['category_id'] }}">&nbsp;&nbsp;{{ category_2['name'] }}</option>
							                {% endif %} 
							                {% for category_3 in category_2['children'] %} 
							                {% if (category_3['category_id'] == category_id) %} 
							                <option value="{{ category_3['category_id'] }}" selected="selected">&nbsp;&nbsp;&nbsp;&nbsp;{{ category_3['name'] }}</option>
							                {% else %} 
							                <option value="{{ category_3['category_id'] }}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ category_3['name'] }}</option>
							                {% endif %} 
							                {% endfor %} 
							                {% endfor %} 
							                {% endfor %} 
							              </select>
							          </div>
							          							         
							         <div class="overflow-input"><input type="text" class="input-block-level search-query" name="search" placeholder="{{ text_search }}" id="search_query" value="" /></div>
							         {% if (theme_options.get( 'quick_search_autosuggest' ) != '0') %} 
							             <div id="autocomplete-results" class="autocomplete-results"></div>
							      
							             <script type="text/javascript">
							             $(document).ready(function() {
							      
							                 $('#search_query').autocomplete({
							                     delay: 0,
							                     appendTo: "#autocomplete-results",
							                     source: function(request, response) {  
							      
							                         var category_filter = $('header select[name=\'category_id\']').val();
							                         var category_filter_url = '';
							                         if (category_filter) {
							                             category_filter_url = '&filter_category_id=' + encodeURIComponent(category_filter);
							                         }
							                         $.ajax({
							                             url: 'index.php?route=search/autocomplete&filter_name=' +  encodeURIComponent(request.term) + category_filter_url,
							                             dataType: 'json',
							                             success: function(json) {
							                                 response($.map(json, function(item) {
							                                     return {
							                                         label: item.name,
							                                         value: item.product_id,
							                                         href: item.href,
							                                         thumb: item.thumb,
							                                         desc: item.desc,
							                                         price: item.price
							                                     }
							                                 }));
							                             }
							                         });
							                     },
							                     select: function(event, ui) {
							                         document.location.href = ui.item.href;
							      
							                         return false;
							                     },
							                     focus: function(event, ui) {
							                         return false;
							                     },
							                     minLength: 2
							                 })
							                 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
							                   return $( "<li>" )
							                     .append( "<a>" + item.label + "</a>" )
							                     .appendTo( ul );
							                 };
							             });
							             </script>
							         {% endif %} 
							     </div>
							     
							     
							 {% set top_block = theme_options.getModules('top_block') %}
							 {% if ( top_block|length > 0 ) %} 
							 	{% for module in top_block %} 
							 		{{ module }}
							 	{% endfor %}
							 {% endif %} 
							     
							     	{% if (logged) %} 
							     		<div class="my-account-with-logout">
							     			<a href="{{ account }}" onclick="window.location.href = '{{ account }}'" class="my-account" data-hover="dropdown" data-toggle="dropdown"><i class="fa fa-user"></i></a>
							     			<ul class="dropdown-menu">
							     				<li><a href="{{ account }}">{{ text_account }}</a></li>
							     				<li><a href="{{ logout }}">{{ text_logout }}</a></li>
							     			</ul>
							     		</div>
							     	{% else %} 
							     		<a href="{{ account }}" class="my-account"><i class="fa fa-user"></i></a>
							     	{% endif %} 
								{{ cart }} 
							</div>
						</div>
					</div>
					
					{% if (theme_options.get( 'megamenu_type' ) == 4 or theme_options.get( 'megamenu_type' ) == 5 or theme_options.get( 'megamenu_type' ) == 6 or theme_options.get( 'megamenu_type' ) == 9 or theme_options.get( 'megamenu_type' ) == 14 or theme_options.get( 'megamenu_type' ) == 19 or theme_options.get( 'megamenu_type' ) == 29) %} 
					<div class="container container-megamenu2">
					{% endif %} 
					
					{% set menu9 = theme_options.getModules('menu') %}
					{% if ( menu9|length > 0 ) %} 
					     <div class="megamenu-background">
					          <div class="">
					               <div class="overflow-megamenu container">
				 						{% if (menu9|length > 1) %} {{ '<div class="row mega-menu-modules">' }}{% endif %}
				 						{% set i = 0 %}
				 						 
				 						{% for module in menu9 %} 
				 						 {% if (i == 0 and menu9|length > 1) %} {{ '<div class="col-md-3">' }}{% endif %}
				 						 {% if (i == 1 and menu9|length > 1) %} {{ '<div class="col-md-9">' }}{% endif %}
				 							 {{ module }}
				 							{% if (menu9|length > 1 and (i == 0 or i == 1)) %} {{ '</div>' }}{% endif %}
				 							{% if (menu9|length > 1 and i == 1) %} {{ '</div>' }}{% endif %}
				 							{% set i = i + 1 %}
				 						{% endfor %} 
               					</div>
               				</div>
               			</div>
					{% else %} 
						{{ menu }}
					{% endif %}
					
					{% if (theme_options.get( 'megamenu_type' ) == 4 or theme_options.get( 'megamenu_type' ) == 5 or theme_options.get( 'megamenu_type' ) == 6 or theme_options.get( 'megamenu_type' ) == 9 or theme_options.get( 'megamenu_type' ) == 14 or theme_options.get( 'megamenu_type' ) == 19 or theme_options.get( 'megamenu_type' ) == 29) %} 
					</div>
					{% endif %} 
					
					
					{% set menu92 = theme_options.getModules('menu2') %}
					{% if ( menu92|length > 0 ) %} 
					 {{ '<div class="overflow-menu2">' }}
						{% for module in menu92 %} 
							{{ module }}
						{% endfor %}
						{{ '</div>' }}
					{% endif %} 
				</div>
			</div>
		</div>
	</div>
	
	{% set slideshow = theme_options.getModules('slideshow') %} 
	 {% if (slideshow|length > 0) %} 
	<!-- Slider -->
	<div id="slider" class="{% if (theme_options.get( 'slideshow_layout' ) == 1) %} {{ 'full-width' }} {% elseif (theme_options.get( 'slideshow_layout' ) == 4) %} {{ 'fixed3 fixed2' }} {% elseif (theme_options.get( 'slideshow_layout' ) == 3) %} {{ 'fixed2' }} {% else %} {{ 'fixed' }} {% endif %}">
		<div class="background-slider"></div>
		<div class="background">
			<div class="shadow"></div>
			<div class="pattern">
				{% for module in slideshow %} 
				{{ module }} 
				{% endfor %} 
			</div>
		</div>
	</div>
	{% endif %} 
</header>