Tabs would not work if multiple h2 are present

My modification is to make sure to append the tabs 'ul' to only one element, since h2 elements may reside somewhere else in #contents.

I had some h2 elements on the publish pages due to the wmd_editor extensions, which offers a html preview of the typed markdown.