Fix jQuery usage bugs ...

... simplify html and reformat code
Merge pull request #151 from ddrury/Sidebar_Descendancy_bugs

jQuery usage bugs & simplify HTML