{include file=$localizer->getPath("part/header.tpl")}
<div id="flash" class="{$Page->flash.class}">{$Page->flash.text}</div>
<div id="search" class="no-responsive">
    {if $smarty.get.d eq 'thoughts'}

    {elseif $smarty.get.d eq 'articles'}
        <form id="search" name="internalsearch" method="get" action="{$Page->convertUri2Url('search')}"
              ENCTYPE="application/x-www-form-urlencoded">
            <input name="q" id="prosvetaquery" placeholder="{$Page->translate('Chercher un article ...')}"
                   type="text" value="{$Page->raw($smarty.get.q)}"/>
            <input type="hidden" name="d" value="articles"/>
            <input type="hidden" name="sort" value="0">
            <input type="hidden" name="bypage" value="50">
            <input type="hidden" name="prefered" id="prefered" value="{if isset($smarty.get.prefered) && $smarty.get.prefered}1{else}0{/if}">
            <button id="btnsearch_bandeau" class="button_search" type="submit"><i class="fa-search"></i></button>
            <a href="#" id="button-prefered" class="button-prefered{if isset($smarty.get.prefered) && $smarty.get.prefered} selected{/if}">{$Page->translate('Posts préférés')}</a>
        </form>
    {else}
        <form id="search" name="internalsearch" method="get" action="{$Page->convertUri2Url('search')}"
              ENCTYPE="application/x-www-form-urlencoded">
            <input name="q" id="prosvetaquery"
                   placeholder="{$Page->translate('Chercher un livre, un CD, un DVD ...')}"
                   type="text" value="{$Page->raw($smarty.get.q)}"/>
            <input type="hidden" name="d" value="books+medias+miscellaneous"/>
            <input type="hidden" name="productlanguage" value={$Language.catalogid}>
            <input type="hidden" name="sort" value="0">
            <input type="hidden" name="bypage" value="50">
            <input type="hidden" name="prefered" id="prefered" value="{if isset($smarty.get.prefered) && $smarty.get.prefered}1{else}0{/if}">
            <button id="btnsearch_bandeau" class="button_search" type="submit"><i class="fa-search"></i></button>
            <a href="#" id="button-prefered" class="button-prefered{if isset($smarty.get.prefered) && $smarty.get.prefered} selected{/if}">{$Page->translate('Votre liste')}</a>
        </form>
    {/if}
</div>


