MagicEdit will do browser detection for you and let you serve up different files to mobile clients. Any files located in the "pages/mobile/" folder (remember, your site files are located in the "pages" folder) will take precedence over their counterparts in the "pages" folder.
The flowchart on the right illustrates how this process works. The server determines if the browser is mobile, and if so it attempts to serve the requested file from the "mobile" folder. If the file does not exist in the "mobile" folder, it looks for the requested file in the parent "pages" folder and serves up that one instead.