/*
Checks user agent to see if user is on a mobile device
Returns true for mobileChecker.isMobile
States which type is used with mobileChecker.whichMobile
*/
var mobileChecker = {
	isMobile: false,
	whichMobile: '',
	init: function() {
		mobileChecker.checkIfMobile();
	},
	checkIfMobile: function(){
		var userBrowser = navigator.userAgent;
		var mobileTypes = new Array("webos","palm","iphone","ipad","itouch","android","blackberry","windows phone");
		for(var i in mobileTypes){
			if(userBrowser.toLowerCase().indexOf(mobileTypes[i]) != -1){
				mobileChecker.isMobile = true;
				mobileChecker.whichMobile = mobileTypes[i];
				break;
			}
		}
	}
}
mobileChecker.init();  //run immediately instead of waiting for DOM
