adjustments to jquery script for dropdowns