I'm not sure how much I can add to the already great responses.
From my own experience...I have a 15 yr old w/ severe autism and seizures...I would definitely demand a full physical checkup including a referral to a neurologist and neurodevelopment pediatrician.
IF you are looking at something on the autism spectrum, I would say I would lean towards Aspergers which is a form of autism where the individual is high functioning with social deficits.
I would agree that you need to rule out seizures. Asking your daughter ?'s, determining whether she snaps out of it immediately with an outside stimuli or not and documenting when/how/what is going on will go miles in helping the doctors and your school determine the best course of action in helping your daughter.
She may even be a bit oppositional defiant...meaning that it is in her character to create situations in which she defies social norms.
It may just be a case where she is going to have to grow in emotional maturity. Dealing with situations that are unpleasant require skills; she just may not have those developed yet. I would suggest you also look into play therapy which can help any of the above-mentioned issues.
Whatever you do, try to emphasize to her why it is to her benefit to respond positively socially: alienation, lack of opportunities etc. so that she is aware of how she is hurting herself more than anyone else by her behavior.
I wish you the best of luck!