Added pill switching js.