Changed isMobile function to check using window width instead of using user agent (so that it works on desktop size with small width).