Fixed the '$ is not defined' issue and fixed some broken css