Changed all javascript to jQuery