Cleaned up some JS code by creating variables and added some jQuery animations.