move js parts of articles tree and videos tree to seperated files