Main .js for dropdown functionality