Fully working Javascript sidebar