Put them in the sun to dry and hope that the detergent didn't do any damage. Water will evaporate, usually without causing any damage as long as you let them dry out before using them. If the headphones have a standard jack, you can get a cheap replacement. The only concern is that there may be a loss of some functions if the phone recognizes the difference (some phones do and some don't). I would not buy any replacement headphones until Miss curly has tried them after they have dried.