Add mobile detect function