well, this in not really a development question except for the last part...
The first part - all you need is for the mobile device to be on the same network as the sharepoint site (if the site is open to the internet then yes, you will need the device to be connected). then, just access the site (on the condition that the site url
is registered on the DNS server that the device is using to resolve addresses). To know more about this, post in the administration forum.
The second part - there are several ways to do this in code, from a httpmodule to a custom control in the master page. However, did you consider this solution?