When the click event occurs you can set the z-index of the panel container…You would need to make sure that each button would change the z-index for both panels so one does not always stay on top but that is accomplished like so:
I messed around with this to make the panel come to the front when it was already open but the coding just got really messy – trying to take into account that other panels were open then making the active one come to the front.
I ended up just closing all non-active panels. Oh and it is not recommended to start out an ID with a number, so I added a “p” in front. Here is a demo of what I got working, and the code I used:
var nav = $('ul#nav li a');
var target = $($(this).attr('href') + '-page');