added check for jquery mobile loaded