Changed mobile check function

Uses js from here http://detectmobilebrowsers.com