<?php
/**
 * @copyright   Copyright (C) aikon CMS, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
?>

<!-- the floating trigger script -->
<script>
    jQuery(document).ready(function(){
        jQuery('.aikonsearch-trigger').click(function(){
            jQuery('.aikon-search').addClass('openit');

        });
    });


    jQuery(document).ready(function(){
        jQuery('.aikon-search .closeit').click(function(){
            jQuery('.aikon-search').removeClass('openit');

        });
    });


</script>

<!-- begin aikonsearch responsiveness -->
<style>
@media screen and (max-width: 740px) {
	
.aikon-search form {
	width: 90%;
	margin-left: 5%;
	margin-right: 5%;
}
	
.aikon-search input.aikon-searchbox {
	width: 82%;
}

}
	
@media screen and (max-width: 570px) {
	
.aikon-search input.aikon-searchbox {
	width: 76%;;
}
	
}
	
@media screen and (max-width: 430px) {
	
.aikon-search input.aikon-searchbox {
	width: 67%;
}
	
}
	
</style>

<!-- begin aikonsearch trigger -->
<div class="aikonsearch-trigger aikon-search-dir-<?php echo $params->get('searchIconPosition');?>"><i class="fa fa-search"></i><br>Recherche</div>
<!-- end aikon search trigger -->

<!-- start aikonsearch modal-->
<div class="aikon-search <?php echo $moduleclass_sfx ?> aikon-search-dir-<?php echo $params->get('searchIconPosition');?> ">
	
	<div class="formcontainer">
        <div class="closeit">X</div>
            <p><?php echo $introText;?></p>

        <form action="<?php echo JRoute::_('index.php');?>" method="post">
            <button class="aikon-searchbtn" onclick="this.form.searchword.focus();"><i class="fa fa-paper-plane-o"></i></button>
            <input name="searchword" class="aikon-searchbox" type="text" placeholder="<?php echo $searchBoxText;?>" />
            <input type="hidden" name="task" value="search" />
            <input type="hidden" name="option" value="com_search" />
        <?php if ($itemId !== '') :?>
            <input type="hidden" name="Itemid" value="<?php echo $itemId; ?>" />
        <?php endif; ?>
        </form>
	</div>
</div>
<!-- end aikonsearch modal-->
