var isiPad = navigator.userAgent.match(/iPad/i) != null; var isiPhone = navigator.userAgent.match(/iPhone/i) != null; var isiPod = navigator.userAgent.match(/iPod/i) != null;