$(document).ready(function() {

    $('body').addClass("js");

    $('#pagecontent h2').each(function() {

        // Hide DIVs following a H2 directly        
        // and tweak the preceeding H2
        $(this).next("div").each(function() {     
            $(this).hide(); 
            var h2 = $(this).prev("h2");            

            h2.append('<span></span>');         

            // Make the H2 working as trigger for a 'hover' attribute
            // and sliding down the follow-up DIV.
            h2.mouseenter(function(elt) { $(this).toggleClass("hover"); });  
            h2.mouseleave(function(elt) { $(this).toggleClass("hover"); });  
            h2.click(function(elt) {
                $(this).next("div").each(function() { $(this).slideToggle(400); });
            });  
               
        });

        
    });


});

