jpegs added, js adapted