added major navigation JS code for sub navigation