function panels(options, data) {
    var rootClass = "panelcontainer";
    var childElement = "li";
    var initialIndex = 0;

    //change default rootClass
    if (options.rootClass != null && options.rootClass != undefined && options.rootClass != "") {
        rootClass = options.rootClass;
    }

    //change default childElement
    if (options.childElement != null && options.childElement != undefined && options.childElement != "") {
        childElement = options.childElement;
    }

    //change default initialIndex
    if (options.initialIndex != null && options.initialIndex != undefined && options.initialIndex != "") {
        initialIndex = options.initialIndex;
    }

    panels.InitPanels(rootClass, childElement, initialIndex)
}

panels.InitPanels = function(rootClass, childClass, initialIndex) {
    $("." + rootClass + " > " + childClass).hide();
    $("." + rootClass + " > " + childClass + " .previous").bind("click", panels.ShowPrev);
    $("." + rootClass + " > " + childClass + " .next").bind("click", panels.ShowNext);
    $("." + rootClass + " > " + childClass).eq(initialIndex).show();
}

panels.ShowNext = function() {
    $(this).parents("li").hide();
    $(this).parents("li").next().show();
    return false;
}

panels.ShowPrev = function() {
    $(this).parents("li").hide();
    $(this).parents("li").prev().show();
    return false;
}