// Reveal and conceal blocks of text...

// try to add hide/show effect from jquery with unobtrusive js
// http://www.dtelepathy.com/blog/telepathy/unobtrusive-javascript-saves-you-time-money-keeps-your-website-agile/
//
// In the html, create a link with class="hiddenStuff" and an href set to 
// # + the id of the div you want to show or hide. The hidden div should have 
// the class "conceal" so we can start off with it hidden iff JavaScript is turned on

$(document).ready(function(){
    preHideByClass();
    $('a.showToggle').click(function(e){
        e.preventDefault();
        var reveal = $(this)[0].href.split('#')[1];
        if($('#'+reveal).css('display') == 'none'){
            $('#'+reveal).show();
        }else{
            $('#'+reveal).hide();
        }
        return false;
    });
});

/* We only want the concealed stuff to start out hidden if the user has JavaScript turned on  */
var preHideByClass = function(){
    var divs = $("div.conceal");
    divs.css('display', 'none');
};

