1. Try Reset PRAM.
2. Try Reset SMC.
Choose the method for:
"Resetting SMC on portables with a battery you should not remove on your own".
Hope it helps.
When you pull out the headphones and the internal speakers won't function, look in the audio output port and see if a red light is showing. If so, the switch is stuck.
Insert the headphone jack a few times to trip the switch. Failing that, insert a thin instrument, like a tooth pick, and jiggle it a few times. Failing that, if the reboot works, do so. If not, to the Apple store.