converted detectmobile from jQuery to plain Javascript

jQuery requires a transitional library.  The Javascript version is
therefore more usable.