Thread:Project:Support desk/Help collapsing sections of a huge table

Hello, On Wikisimpsons (simpsonswiki.com), we have several huge tables which take up a lot of space. I'm looking into collapsing the section headers "Permanent", "Temporary" and "Krustyland" to save space, but leaving the top bit of the table always visible. However, I can not get this to work properly. The original table is here.

I have attempted (and almost made work) a system here using this template. However, as you can see from the page, it's messed up the rest of the page too.

Oh, and I already came across jQuery.makeCollapsible however it broke my whole template and left it as the default Table templates without anything else.

Could anyone either a) come up with a fix for my attempt or b) come up with another method of making the sections collapsible.

Technical details: MediaWiki: 1.21.1 PHP: 5.3.8 (apache2handler) MySQL: 5.0.96

Thank you in advance