$(document).ready(function() {

    $("#contact_container form").ajaxForm({
        target: "#contact_container"
    });
    
    // Setup our variables
    a = new Array();
    z = 0;
    i = 0;
    
    $("#homepage-feature li").each(function() {
        // Store the values in an array for later use
        a.push($(this));
        $(this).addClass("hidden").css("z-index", z);
    });
    
    $("#appbar-apps li").each(function() {
        
        // Set initial values for our list
        $(this).data("num", i);
        i++;
        
        $(this).click(function() {
            v = $("#homepage-feature li:eq(" + $(this).data("num") + ")");
            $(v).fadeIn("slow", function() {
                $("#homepage-feature li").not(v).hide().css("z-index", z);
                z++;
            });
        });
        
    });
    // Reveal the first item in the array
    $(a[0]).removeClass("hidden");


});
