In the clip with Brendan Fraser's ghost, JD was there..behind Dr. Cox and saw him talking to the air. And obviously, he must've picked up on the fact Cox was still going through denial over the death of his best friend.
For Cox being bald, in the episode when he's first bald it's mentioned a few times. Like Kelso comparing him to Lex Luthor.
Also, I agree the 'animal parts' scene was pretty lame, but as you pointed out- this episode was just a time-filler apparently.