!function ($) {
    "use strict";
    // TABCOLLAPSE CLASS DEFINITION
    // ======================
    var TabCollapse = function (el, options) {
        this.options   = options;
        this.$tabs  = $(el);
        this._accordionVisible = false; //content is attached to tabs at first
        this._initAccordion();
        this._checkStateOnResize();
        // checkState() has gone to setTimeout for making it possible to attach listeners to
        // shown-accordion.bs.tabcollapse event on page load.
        // See https://github.com/flatlogic/bootstrap-tabcollapse/issues/23
        var that = this;
        setTimeout(function() {
          that.checkState();
        }, 0);
    };
    TabCollapse.DEFAULTS = {
        accordionClass: 'visible-xs',
        tabsClass: 'hidden-xs',
        accordionTemplate: function(heading, groupId, parentId, active) {
            return  '
' +
                    '   
' +
                    '      
' +
                    '      
' +
                    '   ' +
                    '   
' +
                    '