!function(t){"use strict";var e=function(n,i){this.$element=t(n),this.options=t.extend({},e.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=t(document).find(this.options.parent)),this.options.toggle&&this.toggle()};e.DEFAULTS={toggle:!0},e.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},e.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e=t.Event("show.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.$parent&&this.$parent.find("> .fusion-panel > .in, > .fusion-panel > .fusion-builder-child-element-content > .in");if(n&&n.length){var i=n.data("bs.collapse");if(i&&i.transitioning)return;n.collapse("hide"),i||n.data("bs.collapse",null)}var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing toggle-fadein")[s](0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing toggle-fadein").addClass("collapse in")[s]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var o=t.camelCase(["scroll",s].join("-"));this.$element.one(t.support.transition.end,t.proxy(a,this)).emulateTransitionEnd(350)[s](this.$element[0][o])}}},e.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing toggle-fadeout").removeClass("collapse").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing toggle-fadeout").addClass("collapse")};if(!t.support.transition)return i.call(this);this.$element[n](0).one(t.support.transition.end,t.proxy(i,this)).emulateTransitionEnd(350)}}},e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=t.fn.collapse;t.fn.collapse=function(n){return this.each(function(){var i=t(this),s=i.data("bs.collapse"),a=t.extend({},e.DEFAULTS,i.data(),"object"==typeof n&&n);!s&&a.toggle&&"show"==n&&(n=!n),s||i.data("bs.collapse",s=new e(this,a)),"string"==typeof n&&s[n]()})},t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(e){if(!jQuery(this).parents(".fusion-accordian").find(".toggle-fadein").length||jQuery(this).parents(".fusion-accordian").find(".toggle-fadein")[0]===jQuery(this).parents(".fusion-panel").find(".panel-collapse")[0]){var n,i=t(this),s=i.attr("data-target")||e.preventDefault()||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),a=t(document).find(s),o=a.data("bs.collapse"),l=o?"toggle":i.data(),r=i.attr("data-parent"),p=r&&t(r);o&&o.transitioning||(p&&p.find('[data-toggle=collapse][data-parent="'+r+'"]').not(i).addClass("collapsed"),i[a.hasClass("in")?"addClass":"removeClass"]("collapsed")),a.collapse(l)}}),jQuery("click.bs.collapse.data-api, [data-toggle=collapse]").each(function(){jQuery(this).attr("data-parent");if(0==jQuery(this).parents(".panel-group").length){var t=Math.floor(10*Math.random()+1),e=jQuery(this).parents(".fusion-panel");jQuery(this).attr("data-parent","accordian-"+t),jQuery(e).wrap('<div class="accordian fusion-accordian fusion-single-accordian"><div class="panel-group" id="accordion-'+t+'"></div></div>')}})}(jQuery);