<? include 'templates_user/components/detect-language.php'; ?>
<noscript>
  <img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=5686826&fmt=gif" />
</noscript>
<header>
  <div class="container">
    <div class="header__wrapper">
      <div class="header_left">
        <a href="/">
          <img src="/upload/filemanager/Logos/logo-black.svg" alt="">
        </a>
      </div>
      <div class="header_right">
        <nav id="advance_menu">
          <ul class="lvl_1">

            <li>
              <a href="/about-us">About Us</a>
            </li>

            <li>
              <a href="/facades">Façades</a>
            </li>

            <li class="parent">
              <a href="/windows" class="no-click">Windows</a>
              <ul class="lvl_2 static_height">
                <li class="parent">
                  <a href="/aluminium-windows">Aluminium windows</a>
                  <ul class="lvl_3 static_height">
                    <li>
                      <a href="/aluminium-windows#mb-70">MB 70</a>
                    </li>
                    <li>
                      <a href="/aluminium-windows#mb-70-casement">MB 70 CASEMENT</a>
                    </li>
                    <li>
                      <a href="/aluminium-windows#mb-79n">MB 79N</a>
                    </li>
                    <li>
                      <a href="/aluminium-windows#mb-79n-casement">MB 79N CASEMENT</a>
                    </li>
                    <li>
                      <a href="/aluminium-windows#mb-86n">MB 86N</a>
                    </li>
                    <li>
                      <a href="/aluminium-windows#mb-86n-casement">MB 86N CASEMENT</a>
                    </li>
                    <li>
                      <a href="/facades">FAÇADES</a>
                    </li>
                    <li>
                      <a href="/facades#mb-45-mb-expo">INTERNAL WALLS</a>
                    </li>
                  </ul>
                </li>

                <li class="parent">
                  <a href="/wooden-windows">Wooden windows</a>
                  <ul class="lvl_3 static_height">
                    <li>
                      <a href="/wooden-windows#vd-68">VD 68</a>
                    </li>
                    <li>
                      <a href="/wooden-windows#vd-78">VD 78</a>
                    </li>
                    <li>
                      <a href="/wooden-windows#vd-92">VD 92</a>
                    </li>
                  </ul>
                </li>

                <li class="parent">
                  <a href="/wooden-aluminium-windows">Wooden-aluminium windows</a>
                  <ul class="lvl_3 static_height">
                    <li>
                      <a href="/wooden-aluminium-windows#vda-86">VDA 86</a>
                    </li>
                    <li>
                      <a href="/wooden-aluminium-windows#vda-96">VDA 96</a>
                    </li>
                    <li>
                      <a href="/wooden-aluminium-windows#vda-115-passiv">VDA 115 PASSIV</a>
                    </li>
                  </ul>
                </li>

                <li class="parent">
                  <a href="/pvcu-windows">PVCU windows</a>
                  <ul class="lvl_3 static_height">
                    <li>
                      <a href="/pvcu-windows#vp-70">VP 70</a>
                    </li>
                    <li>
                      <a href="/pvcu-windows#vp-76">VP 76</a>
                    </li>
                    <li>
                      <a href="/pvcu-windows#vp-80-platinum">VP 80 PLATINUM</a>
                    </li>
                    <li>
                      <a href="/pvcu-windows#vp-82">VP 82</a>
                    </li>
                  </ul>
                </li>

                <li class="parent">
                  <a href="/pvcu-aluminium-windows">PVCU-aluminium windows</a>
                  <ul class="lvl_3 static_height">
                    <li>
                      <a href="/pvcu-aluminium-windows#vpa-82">VPA 82</a>
                    </li>
                    <li>
                      <a href="/pvcu-aluminium-windows#vpa-94">VPA 94</a>
                    </li>
                  </ul>
                </li>
              </ul>
            </li>

            <li class="parent">
              <a href="/doors" class="no-click">Doors</a>

              <ul class="lvl_2 ">
                <li>
                  <a href="/entrance-doors">Entrance doors</a>
                </li>
                <li>
                  <a href="/sliding-doors">Sliding doors</a>
                </li>
              </ul>
            </li>

            <!-- <li>
                <a href="/shutters">Shutters</a>
              </li> -->

            <li>
              <a href="/details">Details</a>
            </li>

            <li class="parent">
              <a href="/b2b-partners">B2B PARTNER</a>
              <ul class="lvl_2 ">
                <li>
                  <a href="/catalogues">Catalogues</a>
                </li>
                <li>
                  <a href="/documents">Documents</a>
                </li>
              </ul>
            </li>
            <li>
              <a href="/promotion">PROMOTION</a>
            </li>

            <li class="header_big_btn">
              <a href="/contact">Enquiries</a>
            </li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
</header>

<div id="main-menu-btn">
  <i class="fa fa-bars"></i>
</div>

<script class="footer" type="text/javascript">
  var user_agent = navigator.userAgent.toLowerCase();
  var click_event = user_agent.match(/(iphone|ipod|ipad)/) ? "touchend" : "click";

  $(window).resize(function() {
    windowsize = $(window).width();
  });

  $('body').on(click_event, '#main-menu-btn', function() {
    if (windowsize <= 991) {
      if ($(this).hasClass('active')) {
        $(this).removeClass('active');
        $('#advance_menu').removeClass('visible');
        $('#main-menu-btn i').addClass('fa-bars').removeClass('fa-times');
      } else {
        $(this).addClass('active');
        $('#advance_menu').addClass('visible');
        $('#main-menu-btn i').removeClass('fa-bars').addClass('fa-times');
      }
    }
  });

  if (windowsize <= 991) {
    $('body').on(click_event, '#advance_menu a', function(e) {
      if ($(this).parent().hasClass('parent'))
        e.preventDefault();

      if (!$(this).parent().hasClass('active')) {
        $(this).parent().addClass('active');
      } else {
        $(this).parent().removeClass('active');
      }
    });
  } else {
    function customMenuLink(URL) {
      $(`#nav_tabs li a[href="${URL}"]`).trigger("click");
      console.log(URL)
    }

    $(function() {
      let pathHash = $(location).attr('hash');
      customMenuLink(pathHash)
    });

    $('#advance_menu ul li a').on("click", function() {
      let thisUrl = $(this).attr('href').split('#');
      let thisUrlFormat = '#' + thisUrl[1]
      customMenuLink(thisUrlFormat)
    });
  }

  $(window).scroll(function() {
    let scrollPosition = $(window).scrollTop()

    if (scrollPosition > 0) {
      $('header').addClass('fixed')
    } else {
      $('header').removeClass('fixed')
    }
  })
</script>