I am trying to mimic the functionality of the image below. I am working on a wordpress blog and I need to be able to put blog post into a tree structure underneath categories
I only need to go 3 levels deep at most
Category 1
- blog post
- blog post
- SUB-CATEGORY
--- blog post
--- blog post
CATEGORY 2
- SUB-CATEGORY
--- blog post
--- blog post
- SUB-CATEGORY2
--- blog post
--- blog post
- SUB-CATEGORY3
--- blog post
--- blog post
I am lost on where to even begin, can anyone point me in the right direction on where to begin?
Using PHP, MySQL, Javascript. I would like to have the categories and sub-categories be able to be collapsed and expanded which I can do with javascript and when you click an actual blog post it should load it into a frame or window beside the tree

Consider the WordPress plugin http://wordpress.org/extend/plugins/wp-dtree-30/. They have an example site at http://game.hgo.se/cat/projects/3d-games/.