<ul class="accordion no-bullet">
{% for link in linklists.[settings.side-links].links %}
    {% capture child_list_handle %}{{ link.title | handleize }}{% endcapture %}
        {% if linklists[child_list_handle] and linklists[child_list_handle].links.size > 0 %}
            <li class="ac">{{ link.title | link_to: link.url }}
                <ul class="sub-menu">
                    {% for l in linklists[child_list_handle].links %}
                        <li><a href="{{ l.url }}">{{ l.title }}</a></li>
                    {% endfor %}
                </ul>
            </li>
            {% else %}
            <li class="no-drop">{{ link.title | link_to: link.url }}</li>
        {% endif %}
{% endfor %}
<li>{% include 'filter' %}</li>
</ul>
        
        
<script type="text/javascript">
$(document).ready(function() {
// Store variables			
var accordion_head = $('.accordion > li.ac > a'),
	accordion_body = $('.accordion li > .sub-menu');
// Click function
accordion_head.on('click', function(event) {
	// Disable header links				
	event.preventDefault();
	// Show and hide the tabs on click
	if ($(this).attr('class') != 'active'){
		accordion_body.slideUp('normal');
		$(this).next().stop(true,true).slideToggle('normal');
		accordion_head.removeClass('active');
		$(this).addClass('active');
    } else {
        accordion_body.slideUp('normal');
        accordion_head.removeClass('active');
	}
});
});
</script>