{* Меню услуг *}
{if $services_tree}
    {function name=services_tree level=0}
        {if $services}
            <ul data-t="y">
                {foreach $services as $s}
                    {if !$s->visible}{continue}{/if}
                    <li{if $page->id==$s->id or in_array($page->id,$s->descendants)} class="active"{/if}>
                        <a href="/{$services_root}{$s->url}/" data-service="{$s->id}">{$s->name|escape}</a>
                        {if $s->children or in_array($page->id,$s->descendants)}
                            {services_tree services=$s->children level=$level+1}
                        {/if}
                    </li>
                {/foreach}
            </ul>
        {/if}
    {/function}

    {if $detect->isMobile()}
        <div class="panel panel-danger collapse-panel services-mobile-menu">
            <div class="panel-heading">
                <div class="panel-title"><a href="/{$services_root}{$root_url}/" class="m_link">Услуги тюнинг центра</a></div>
            </div>
            <div class="panel-body">
                <div class="v-menu">
                    {services_tree services=$services_tree}
                </div>
            </div>
        </div>
    {else}
        <div class="inner menu-service">
            <div class="header"><a href="/{$services_root}">Услуги тюнинг центра</a></div>
            {services_tree services=$services_tree}
        </div>
    {/if}
{/if}