L
Looking for fuses…Sounds like the wire colors for your power tongue jack don't match the wire colors for the rest of your trailer. Given how close the tongue jack is to the battery, you should be able to determine which wires are for the tongue jack, which means the remaining wires are for the trailer. My trailer wiring is red to positive, black to negative, white to ground.
With all that sparking, there's a good chance you may have blown a fuse, so you'll likely need to replace the fuse as well.