How to detect mobile devices and present them a specific theme?

How to detect mobile devices and present them a specific theme?