﻿
$(document).ready(function() {
    bindToggle();
});


function bindToggle() {

    //toggle the componenet with class expander-body, when header is clicked
    $(".expander-head").click(function() {
        var header = $(this);
        $(this).next(".expander-body").slideToggle(150, function() {
        var message = header.find('.expander-message');
            if ($(this).is(':hidden'))
            { message.text('(Show Details...)'); }
            else
            { message.text('(Hide Details...)'); }
        });
    });
    if (typeof(callee)=='function') {
        callee();    
     }
}
