{% load static cms_tags sekizai_tags %}
{% addtoblock "js" %}<script src="{% static 'jquery/dist/jquery.js' %}" type="text/javascript"></script>{% endaddtoblock %}
{% addtoblock "js" %}<script src="{% static 'bootstrap/dist/js/bootstrap.js' %}" type="text/javascript"></script>{% endaddtoblock %}
{% spaceless %}
{% with inline_styles=instance.inline_styles %}
<div id="cmsplugin_{{ instance.id }}" class="{{ instance.css_classes }}"{% if inline_styles %} style="{{ inline_styles }}"{% endif %}>
	{% for panel in instance.child_plugin_instances %}
		{% with panel_type=panel.glossary.panel_type heading_size=panel.glossary.heading_size panel_title=panel.glossary.panel_title|safe %}
	<div class="panel {{ panel_type }}">
		<div class="panel-heading">
			{% if heading_size %}<{{ heading_size }} class="panel-title">{% endif %}
				<a data-toggle="collapse" data-parent="#cmsplugin_{{ instance.id }}" href="#cmsplugin_{{ instance.id }}_{{ forloop.counter0 }}">{{ panel_title }}</a>
			{% if heading_size %}</{{ heading_size }}>{% endif %}
		</div>
		<div id="cmsplugin_{{ instance.id }}_{{ forloop.counter0 }}" class="panel-collapse collapse{% if forloop.first  and instance.glossary.first_is_open = "on" %} in{% endif %}">
			{% render_plugin panel %}
		</div>
	</div>
		{% endwith %}
	{% endfor %}
</div>
{% endwith %}{% endspaceless %}
