JS for opening options