Fix subPanels() in forum_fn.js

Fix subPanels() code
Use HTML5 data attributes instead of including JS

This PR also makes it possible to use several sets of panels on same page because code for each set is now isolated instead of using global JS variables.

http://tracker.phpbb.com/browse/PHPBB3-11563