Contextual select menu using jquery and javascript