Too little head space in your fermenter. It isn't wrecked. Put in a blowoff tube (google it) so that junk goes into water and keeps it air tight. Problem solved.
ahh yes the magical bubbly goo, I once had it clog the bottom of the airlock bung then enough pressure built to blow all the trub all over the ceiling and not a drop on the floor. I cam in and got mad as I thought some one had taken the airlock out, then I looked up three hours later the ceiling was mostly clean.
The nice thing about a three-piece airlock? The inner plastic tube receives a 3/8" ID hose perfectly....at least I think it's a 3/8" ID. You might double check that, but the point is that you can make a blow off tube by dismantling the air lock, jamming one end of the blow off tube on the outlet and dropping the other end of the tube in a bucket of sanitizer.
The beer will be fine. The goo is shooting out the top because it is under pressure. That same pressure is keeping contaminates from getting into the fermenter. You can continually clean the thing out or replace with a blowoff tube. Anyone who has had their fermenter blow prefers the blowoff tube method.
What temp is that thermometer reading? If the temps get too high, you can get crazy fermentations and some off flavors.