
$(document).ready(function() {
    $("#tabs ul.tabber").css("display","inline");
    $("#tabs div.tab-item div.top").removeClass("top").addClass("top-sharp-left");
    $("#tabs div.tab-item div.horizontal h2").hide();
    // Find the maximum height of the tab items
    var maxHeight = 0;
    $("#tabs div.tab-item div.horizontal").each(function() {
        var height = $(this).height();
        if (height > maxHeight)
            maxHeight = height;
    });
    $("#tabs div.tab-item div.horizontal").css("height", maxHeight);
    $("#tabs div.tab-item").hide();
    $("#tabs div.tab-item:first").show();
    $("#tabs ul.tabber li").addClass("inactive");
    $("#tabs ul.tabber li:first").removeClass("inactive").addClass("active");

    $("#tabs ul.tabber li a").click(function() {
        if ($(this).parent().hasClass("inactive")) {
            $("#tabs ul.tabber li").removeClass("active");
            $("#tabs ul.tabber li").addClass("inactive");
            $(this).parent().addClass("active");
        }
        var currentTab = $(this).attr("href");
        $("#tabs div.tab-item").hide();
        $(currentTab).show();
        return false;
    });
});

