$(function() {
    $("#featured div[id^=section]").css("width", "1000px");
    $("#slider li").click(function() {
        var $dt = $(this).find("dt[class^=slider]"),
        id = $dt.attr("class").replace(/[^0-9]+/, "");
        if ($(this).hasClass("curCol")) {
            return;
        }
        $(this).animate({
            width: 263
        }).addClass("curCol");
        $(this).siblings("li").animate({
            width: 135
        }).removeClass("curCol");
        $("#featured div[id^=section]").hide().children("div").hide();
        $("#featured #section-" + id).show();
        animate_sibling.apply($("#featured #section-" + id).children("div").get(0));
    });
    $("#slider li:first").click();
});
function animate_sibling() {
    $(this).slideDown(500,
    function() {
        if ($(this).siblings("div:hidden").length) {
            animate_sibling.apply($(this).siblings("div:hidden").get(0));
        }
    });
}
