﻿$(function descriptionShower() {
    // for js users they get to see the little red text that activates the slide
    // and we gotta hide all the descriptions by default except the presidents
    $("div#two_col").removeClass("height_match");
    var teamMembers = $("div.team_member div.description:not(:first)");
        teamMembers.addClass("withJS");
    $("div.team_member div.columnB a.slideAction").show();
    
    // here is the event handler for the slide
    // we first check to see which arrow class is on the slider action to change it right or down facing.
     $("div.team_member div.columnB a.slideAction").toggle(
            function() {
            $(this).removeClass("arrow-red_right").addClass("arrow-red_down");
            var descriptionHeight = $(this).next(".description")[0].scrollHeight;
            var description = $(this).next(".description");
            description.animate(
            {height:descriptionHeight}, 
            400)
    },
            function(){
                $(this).removeClass("arrow-red_down").addClass("arrow-red_right");
                var description = $(this).next(".description");
                description.animate({
	                height: 0
                }, 400)
            }
    );	
})
