<script id="ftw-mobile-navigation-template" type="text/x-handlebars-template">

    <div class="mobile-menu mobile-menu-{{name}}">

        {{#if settings.show_tabs}}
        <ul class="topLevelTabs">
            {{#each toplevel}}

                <li class="{{cssclass}}"><a href="{{url}}">{{title}}</a></li>

             {{/each}}

        </ul>
        {{/if}}

        <div class="tabPanes">
            <div class="tabPane">
                <ul class="{{classes}}">
                  {{#if parentNode}}

                  <li class="navParentNode {{#if parentNode.active}}navActiveNode{{/if}}">
                      <a href="{{parentNode.url}}" class="mobileActionNav up"
                         title="{{i18n "label_goto_parent"}} {{parentNode.title}}">
                          <span>{{i18n "label_goto_parent"}} {{parentNode.title}}</span>
                      </a>

                      <a href="{{parentNode.url}}">{{parentNode.title}}</a>
                  </li>

                  {{/if}}

                  {{#if currentNode.visible }}
                  <li class="navCurrentNode {{#if currentNode.active}}navActiveNode{{/if}}">
                      <a href="{{currentNode.url}}">{{currentNode.title}}</a>
                  </li>
                  {{/if}}

                  {{> list}}
                </ul>
            </div>
        </div>

    </div>
</script>


<script id="ftw-mobile-navigation-list-template" type="text/x-handlebars-template">
     {{#each nodes}}
        <li class="node {{#if has_children}}has-children{{else}}has-no-children{{/if}} {{#if active}}navActiveNode{{/if}}">

            <a href="{{url}}"{{#if externallink}} class="external-link"{{/if}}>{{title}}</a>

            <a href="{{url}}" class="mobileActionNav down"
               title="{{i18n "label_goto_children"}} {{title}}">
                <span>{{i18n "label_goto_children"}} {{title}}</span>
            </a>

            {{#if nodes}}
                <ul>
                    {{> list}}
                </ul>
            {{/if}}
        </li>
    {{/each}}
</script>
