<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<?php $fbclone_footer = Zend_Registry::isRegistered('fbclone_footer') ? Zend_Registry::get('fbclone_footer') : null; ?>
<header class="fbclone_header <?php if(empty($this->viewer->getIdentity())){ ?>fbclone_header_guest<?php } ?>">
	<div class="container fbclone_header_inner">
    	<div class="header_left">
        <?php if(engine_in_array('logo',$this->options)){ ?>
          <div class="header_logo">
            <?php echo $this->content()->renderWidget("core.menu-logo",array("logo"=>$this->logo)); ?>
          </div>
          <?php if($this->accessibility_option){ ?>
             <div class="header_logo_contrast">
               <?php echo $this->content()->renderWidget("core.menu-logo",array("logo"=>$this->logocontrast)); ?> 
            </div>
          <?php } ?>    
        <?php } ?>

        <?php if($fbclone_footer && engine_in_array('search',$this->options)){ ?>
          <div class="header_search">
            <?php echo $this->content()->renderWidget("core.search-mini"); ?>
          </div>
        <?php } ?>
      </div>
      <div class="header_middle">
        <?php if(engine_in_array('mainMenu',$this->options)){ ?>
          <div class="fbclone_main_menu">
            <?php include APPLICATION_PATH . '/application/modules/Fbclone/widgets/header/_mainmenu.tpl'; ?>
            <?php include APPLICATION_PATH . '/application/modules/Fbclone/widgets/header/_mainmenumobile.tpl'; ?>
          </div>
        <?php } ?>
      </div>      
      <div class="header_right">
        <?php if($fbclone_footer && engine_in_array('miniMenu',$this->options)){ ?>
          <div class="header_menu_mini">
            <?php echo $this->content()->renderWidget("core.menu-mini"); ?>
          </div>
        <?php } ?>
      </div>
   </div> 
 </header>
<script type="text/javascript">
  // Header Spacing
  en4.core.runonce.add(function() {
  var height = scriptJquery(".layout_page_header").height();
  if(document.getElementById("global_wrapper")) {
      scriptJquery("#global_wrapper").css("margin-top", height+"px");
  }
  });

  setTimeout(function () {
    scriptJquery('.layout_core_search_mini form input').on('focus blur', function (e) {
        scriptJquery(this).parents('#global_search_form').toggleClass('focused', (e.type === 'focus' || this.value.length > 0));
    }).trigger('blur');
  }, 2000);
</script>
