refactored some javascript to not use checkMobile as a wrapper for functions, and instead use the proper events as wrappers for only the functions that should be triggered
further refactored the js, making checkMobile a function that returns whether or not we're in mobile mode and does nothing else