jquery mobile vs jquery ui

jquery mobile vs jquery ui

I realise that i may need draggability of elements and other strictly ui functionality later on. is switching from jqm to jqui a seamless process or does some code need to be rewritten?

Is jqui also primarily meant for mobile devices?