function isAppleMobileDevice() { return /iphone|ipod|ipad|Macintosh/i.test(navigator.userAgent.toLowerCase()); }