﻿
$(document).ready(function () {
    var obj = $(".becool_accordion");
    var themename = obj.attr("theme");
    if (themename == undefined || $.inArray(themename, $.jquery_ui.themes) == -1) {
        $.include("/BeCool/Apps/JQuery-UI/Themes/css/base.css");
    }
    else {
        $.include("/BeCool/Apps/JQuery-UI/Themes/css/" + themename + ".css");
    }
    var options = obj.attr("options");
    if (options == undefined || options=="")
        obj.accordion();
    else {
        var optionobj = $.jbecool.attrToObject(options);
        obj.accordion({
            active: optionobj.active,
            animated: optionobj.animated,
            autoHeight: optionobj.autoHeight,
            clearStyle: optionobj.clearStyle,
            collapsible: optionobj.collapsible,
            event: optionobj.event,
            fillSpace: optionobj.fillSpace,
            header: optionobj.header,
            navigation: optionobj.navigation
        });
    }
});
