Create smartlink.js
Create smartlink.js

use with anchor tags with class "mobilev". place the mobile destination in the rel attribute of the anchor tag. Uses a simple screen size and UA check of "Mobile" for the mobile detection . . . modify to taste. If you don't want to "misuse" the rel attribute, use one of the new HTML 5 data- attributes and modify the script accordingly.
techbrarian/mobile-smartlinks