<?php

/* @particles/onepage-menu.html.twig */
class __TwigTemplate_042888c1b867256d26437169fed346f06c94012d8cb6e4454657d6fe8db3c833 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("@nucleus/partials/particle.html.twig", "@particles/onepage-menu.html.twig", 1);
        $this->blocks = array(
            'particle' => array($this, 'block_particle'),
            'javascript_footer' => array($this, 'block_javascript_footer'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "@nucleus/partials/particle.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 3
        $context["attr_extra"] = "";
        // line 4
        if ($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "extra", array())) {
            // line 5
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "extra", array()));
            foreach ($context['_seq'] as $context["_key"] => $context["attributes"]) {
                // line 6
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable($context["attributes"]);
                foreach ($context['_seq'] as $context["key"] => $context["value"]) {
                    // line 7
                    $context["attr_extra"] = ((((((isset($context["attr_extra"]) ? $context["attr_extra"] : null) . " ") . twig_escape_filter($this->env, $context["key"])) . "=\"") . twig_escape_filter($this->env, $context["value"], "html_attr")) . "\"");
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['key'], $context['value'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attributes'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
        }
        // line 1
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 12
    public function block_particle($context, array $blocks = array())
    {
        // line 13
        echo "    
    <div class=\"g-onepage-menu";
        // line 14
        if ($this->getAttribute($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "css", array()), "class", array())) {
            echo " ";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "css", array()), "class", array()));
        }
        echo "\" ";
        if ($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "extra", array())) {
            echo (isset($context["attr_extra"]) ? $context["attr_extra"] : null);
        }
        echo ">
        <ul data-uk-scrollspy-nav=\"{closest:'li', smoothscroll: {offset: ";
        // line 15
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "smoothscrolloffset", array()));
        echo "}}\" data-uk-sticky=\"{media:768, top:";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "stickyoffset", array()));
        echo ", boundary: '";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "boundary", array()));
        echo "'}\">
        ";
        // line 16
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "items", array()));
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 17
            echo "        \t";
            $context["attr_extra_item"] = "";
            // line 18
            echo "\t\t\t";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["item"], "extra", array()));
            foreach ($context['_seq'] as $context["_key"] => $context["extra"]) {
                // line 19
                echo "\t\t\t\t";
                $context["attr_extra_item"] = ((((((isset($context["attr_extra_item"]) ? $context["attr_extra_item"] : null) . " ") . twig_escape_filter($this->env, twig_first($this->env, twig_get_array_keys_filter($context["extra"])))) . "=\"") . twig_escape_filter($this->env, twig_first($this->env, $this->env->getExtension('Gantry\Component\Twig\TwigExtension')->valuesFilter($context["extra"])), "html_attr")) . "\"");
                // line 20
                echo "\t\t\t";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['extra'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 21
            echo "        \t<li class=\"g-onepage-menu-item";
            if ($this->getAttribute($context["item"], "class", array())) {
                echo " ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "class", array()));
            }
            echo "\" ";
            if ($this->getAttribute($context["item"], "extra", array())) {
                echo (isset($context["attr_extra_item"]) ? $context["attr_extra_item"] : null);
            }
            echo ">
                <a href=\"";
            // line 22
            if ($this->getAttribute($context["item"], "link", array())) {
                echo "#";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "link", array()));
            }
            echo "\">";
            // line 23
            if ($this->getAttribute($context["item"], "icon", array())) {
                // line 24
                echo "<i class=\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "icon", array()));
                echo "\"></i>";
            }
            // line 26
            echo $this->getAttribute($context["item"], "title", array());
            // line 27
            echo "</a>
                ";
            // line 28
            if ((((($this->getAttribute($context["item"], "subtitle1", array()) || $this->getAttribute($context["item"], "subtitle2", array())) || $this->getAttribute($context["item"], "subtitle3", array())) || $this->getAttribute($context["item"], "subtitle4", array())) || $this->getAttribute($context["item"], "subtitle5", array()))) {
                // line 29
                echo "                    <ul class=\"submenu\">
                        ";
                // line 30
                if ($this->getAttribute($context["item"], "subtitle1", array())) {
                    // line 31
                    echo "                            <li>
                                <a href=\"";
                    // line 32
                    if ($this->getAttribute($context["item"], "sublink1", array())) {
                        echo "#";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "sublink1", array()));
                    }
                    echo "\">";
                    // line 33
                    if ($this->getAttribute($context["item"], "subicon1", array())) {
                        // line 34
                        echo "<i class=\"";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "subicon1", array()));
                        echo "\"></i>";
                    }
                    // line 36
                    echo $this->getAttribute($context["item"], "subtitle1", array());
                    // line 37
                    echo "</a>
                            </li>
                        ";
                }
                // line 40
                echo "
                        ";
                // line 41
                if ($this->getAttribute($context["item"], "subtitle2", array())) {
                    // line 42
                    echo "                            <li>
                                <a href=\"";
                    // line 43
                    if ($this->getAttribute($context["item"], "sublink2", array())) {
                        echo "#";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "sublink2", array()));
                    }
                    echo "\">";
                    // line 44
                    if ($this->getAttribute($context["item"], "subicon2", array())) {
                        // line 45
                        echo "<i class=\"";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "subicon2", array()));
                        echo "\"></i>";
                    }
                    // line 47
                    echo $this->getAttribute($context["item"], "subtitle2", array());
                    // line 48
                    echo "</a>
                            </li>
                        ";
                }
                // line 51
                echo "
                        ";
                // line 52
                if ($this->getAttribute($context["item"], "subtitle3", array())) {
                    // line 53
                    echo "                            <li>
                                <a href=\"";
                    // line 54
                    if ($this->getAttribute($context["item"], "sublink3", array())) {
                        echo "#";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "sublink3", array()));
                    }
                    echo "\">";
                    // line 55
                    if ($this->getAttribute($context["item"], "subicon3", array())) {
                        // line 56
                        echo "<i class=\"";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "subicon3", array()));
                        echo "\"></i>";
                    }
                    // line 58
                    echo $this->getAttribute($context["item"], "subtitle3", array());
                    // line 59
                    echo "</a>
                            </li>
                        ";
                }
                // line 62
                echo "
                        ";
                // line 63
                if ($this->getAttribute($context["item"], "subtitle4", array())) {
                    // line 64
                    echo "                            <li>
                                <a href=\"";
                    // line 65
                    if ($this->getAttribute($context["item"], "sublink4", array())) {
                        echo "#";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "sublink4", array()));
                    }
                    echo "\">";
                    // line 66
                    if ($this->getAttribute($context["item"], "subicon4", array())) {
                        // line 67
                        echo "<i class=\"";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "subicon4", array()));
                        echo "\"></i>";
                    }
                    // line 69
                    echo $this->getAttribute($context["item"], "subtitle4", array());
                    // line 70
                    echo "</a>
                            </li>
                        ";
                }
                // line 73
                echo "
                        ";
                // line 74
                if ($this->getAttribute($context["item"], "subtitle5", array())) {
                    // line 75
                    echo "                            <li>
                                <a href=\"";
                    // line 76
                    if ($this->getAttribute($context["item"], "sublink5", array())) {
                        echo "#";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "sublink5", array()));
                    }
                    echo "\">";
                    // line 77
                    if ($this->getAttribute($context["item"], "subicon5", array())) {
                        // line 78
                        echo "<i class=\"";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "subicon5", array()));
                        echo "\"></i>";
                    }
                    // line 80
                    echo $this->getAttribute($context["item"], "subtitle5", array());
                    // line 81
                    echo "</a>
                            </li>
                        ";
                }
                // line 84
                echo "                    </ul>
                ";
            }
            // line 86
            echo "            </li>
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 88
        echo "        </ul>
    </div>
";
    }

    // line 92
    public function block_javascript_footer($context, array $blocks = array())
    {
        // line 93
        echo "    ";
        $this->displayParentBlock("javascript_footer", $context, $blocks);
        echo "
    <script type=\"text/javascript\">
        (function(\$) {
            \$(document).ready(function() {
                if( \$('.g-onepage-menu .submenu').length ) {
                    // select the target node
                    var onepageMenu = document.querySelector('.g-onepage-menu');
                     
                    // create an observer instance
                    var observer = new MutationObserver(function(mutations) {
                        mutations.forEach(function(mutation) {
                            \$('.g-onepage-menu .submenu li').each(function() {
                                if( \$(this).hasClass('uk-active') ) {
                                    \$(this).parent('.submenu').addClass('uk-active');
                                }
                            });

                            \$('.g-onepage-menu .submenu').each(function() {
                                if( !\$(this).children().hasClass('uk-active') ) {
                                    \$(this).removeClass('uk-active');
                                }
                            });
                        });
                    });
                     
                    // configuration of the observer:
                    var config = { attributes: true, childList: true, characterData: true, subtree: true }
                     
                    // pass in the target node, as well as the observer options
                    observer.observe(onepageMenu, config);
                }
            });
        })(jQuery);
    </script>
";
    }

    public function getTemplateName()
    {
        return "@particles/onepage-menu.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  291 => 93,  288 => 92,  282 => 88,  275 => 86,  271 => 84,  266 => 81,  264 => 80,  259 => 78,  257 => 77,  251 => 76,  248 => 75,  246 => 74,  243 => 73,  238 => 70,  236 => 69,  231 => 67,  229 => 66,  223 => 65,  220 => 64,  218 => 63,  215 => 62,  210 => 59,  208 => 58,  203 => 56,  201 => 55,  195 => 54,  192 => 53,  190 => 52,  187 => 51,  182 => 48,  180 => 47,  175 => 45,  173 => 44,  167 => 43,  164 => 42,  162 => 41,  159 => 40,  154 => 37,  152 => 36,  147 => 34,  145 => 33,  139 => 32,  136 => 31,  134 => 30,  131 => 29,  129 => 28,  126 => 27,  124 => 26,  119 => 24,  117 => 23,  111 => 22,  99 => 21,  93 => 20,  90 => 19,  85 => 18,  82 => 17,  78 => 16,  70 => 15,  59 => 14,  56 => 13,  53 => 12,  49 => 1,  38 => 7,  34 => 6,  30 => 5,  28 => 4,  26 => 3,  11 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("", "@particles/onepage-menu.html.twig", "/home/isfmp/public_html/welthaus/templates/it_construction/particles/onepage-menu.html.twig");
    }
}
