﻿$(function()
{
    $(".tab-content li").first().fadeIn("slow");
    var contentHeight = $(".tab-content .current").css("height");
    $(".tab-content").css("height", contentHeight);

    $(".tab-title li").click(function()
    {
        if (!$(".tab-content").is(":animated"))
        {
            $(this).addClass("current").siblings(".tab-title li").removeClass("current");
            var _index = $(this).index();
            $(".tab-content li").eq(_index).fadeIn("slow").siblings(".tab-content li").fadeOut("slow");
            var contentHeight = $(".tab-content li").eq(_index).css("height");
            $(".tab-content").animate({
                height: contentHeight
            }, 1000)
        }
    })
})              
