﻿$(document).ready(function() {
    // hide content
    $(".toggle-content").hide();
    
    // show link - toggle the component with class
    $(".toggle-content-show").click(function()
    {
        // hide summary if there is one
        $(this).prev(".toggle-content-summary").slideToggle(600);
        // show content
        $(this).next(".toggle-content").slideToggle(600);
        // hide show link
        $(this).hide();
    });
    
    // hide link
    $(".toggle-content-hide").click(function()
    {
        // hide content
        $(this).parent().slideToggle(600);
        // display show link
        $(this).parent().parent().find(".toggle-content-show").show();
        // display summary if there is one
        $(this).parent().parent().find(".toggle-content-summary").slideToggle(600);
    });
});
