{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2015 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block search module TOP -->
<div id="search_block_top" class="col-sm-6 col-md-6 clearfix">
	<form id="searchbox" method="get" action="{$link->getPageLink('search', null, null, null, false, null, true)|escape:'html':'UTF-8'}" >
		<input type="hidden" name="controller" value="search" />
		<input type="hidden" name="orderby" value="position" />
		<input type="hidden" name="orderway" value="desc" />
        
		<input class="search_query form-control" type="text" id="search_query_top" name="search_query" placeholder="{l s='Search' mod='blocksearch'}" value="{$search_query|escape:'htmlall':'UTF-8'|stripslashes}" />
		<button type="submit" name="submit_search" class="searchbox_button btn btn-default button-search">
			<span>{l s='Search' mod='blocksearch'}</span>
		</button>
	</form>
</div>

<div class="col-sm-2 col-md-2 clearfix lang-menu">
	<div class="dropdown" style="left: -15px;">
	  <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="border-color: #fff; margin-top: 5px; background-color: transparent;">
	  	{if !strstr($smarty.server['REQUEST_URI'], '/ru') and !strstr($smarty.server['REQUEST_URI'], '/es') and !strstr($smarty.server['REQUEST_URI'], '/fr')}
	  		<img style="width: 20px;" src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/flags/4x3/us.svg">
	  	{/if}
	  	
	  	{if strstr($smarty.server['REQUEST_URI'], '/es')}
	    	<img style="width: 20px;" src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/flags/4x3/es.svg">
	    {/if}
	    
	    {if strstr($smarty.server['REQUEST_URI'], '/fr')}
	    	<img style="width: 20px;" src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/flags/4x3/fr.svg">
	    {/if}

	    {if strstr($smarty.server['REQUEST_URI'], '/ru')}
			<img style="width: 20px;" src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/flags/4x3/ru.svg">
		{/if}

	    <span class="caret"></span>
	  </button>
	  <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
	  	{if strstr($smarty.server['REQUEST_URI'], '/ru') or strstr($smarty.server['REQUEST_URI'], '/es') or strstr($smarty.server['REQUEST_URI'], '/fr')}
	  		<li><a href="/"> <img style="width: 20px;" src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/flags/4x3/us.svg"> English</a></li>
	  	{/if}
	  	
	  	{if !strstr($smarty.server['REQUEST_URI'], '/es')}
	    	<li><a href="/es"> <img style="width: 20px;" src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/flags/4x3/es.svg"> Spanish</a></li>
	    {/if}
	    
	    {if !strstr($smarty.server['REQUEST_URI'], '/fr')}
	    	<li><a href="/fr"> <img style="width: 20px;" src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/flags/4x3/fr.svg"> French</a></li>
	    {/if}

	    {if !strstr($smarty.server['REQUEST_URI'], '/ru')}
			<li><a href="/ru"> <img style="width: 20px;" src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/flags/4x3/ru.svg"> Russian</a></li>
		{/if}
	  </ul>
	</div>
</div>

<style>
@media only screen and (max-width: 770px) {
	.lang-menu {
		display: none;
	}
}
</style>

<!-- /Block search module TOP -->