var isMobile = {
Android: function () {
return (/android/i.test(navigator.userAgent.toLowerCase()));
},
BlackBerry: function () {
return (/blackberry/i.test(navigator.userAgent.toLowerCase()));
},
iOS: function () {
return (/iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase()));
},
iPhone: function () {
return (/iphone/i.test(navigator.userAgent.toLowerCase()));
},
iPad: function () {
return (/ipad/i.test(navigator.userAgent.toLowerCase()));
},
iPod: function () {
return (/ipod/i.test(navigator.userAgent.toLowerCase()));
},
Opera: function () {
return (/opera mini/i.test(navigator.userAgent.toLowerCase()));
},
Windows: function () {
return (/iemobile/i.test(navigator.userAgent.toLowerCase()));
},
any: function () {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};