﻿$(document).ready(function() {

var currentHeight = $("#pageContent").height();

$(".contentSectionHeader").click(function() {

    var elm = $(this).parent().find(".contentSection");
          if (elm.css("display") == "none") {
            elm.slideDown();
            $(this).css("background-image","url('Images/arrowDown.png')");
            currentHeight = currentHeight + 100;
            $("#pageContent").css("height", currentHeight)
        } else {
            elm.slideUp();
            $(this).css("background-image","url('Images/arrowRight.png')");
            currentHeight = currentHeight - 100;
            $("#pageContent").css("height", currentHeight)
        }
        
});

});
