Menu javascript functionality implemented