Added JavaScript to toggle widget options