Show Posts in Vertical Tabs with Scrollbar

You should run WP Query twice. Once for the li elements and the other for the div elements. You do not seem to be doing this? If you want to use jQuery tabs or accordion you may have to run the wp query twice or save the query results in an array and use a for/while loop. The later is better as it has less impact on the database.