Javascript added for toggle functionality