updated js function for nav css "current" styling