js refactor:thumbs, imagebox, tree all working;media box some work needed