There are two things that can be done here. The first is preventative, and may seem extreme, but it worked for us. We cut out TV during the week and limited it to two hours (videos only) on weekends. I realized that most of the attitude I was seeing came from Disney and Nick shows. If you really look, you will see what bad attitudes even the 'good' kids have on these shows. Back talk, dramatic sighing, rolling eyes, sarcastic/disrespectful comments, etc. is the norm. As is 'doing dumb stuff' without any real consequences. When we did start allowing real TV again (not animated videos), we went in gradually and I sat with them to watch. That way I could point out bad attitudes (every little thing) so they could learn to identify it. I also, didn't hesitate to nicely call their friends on it. 'I'm sorry Megan, but we don't allow kids to roll their eyes at adults in this house.' or whatever. I really watched the girl's behavior after play dates as well. I quickly noticed that playing with some kids produced less than desirable behavior/attitudes in my girls, so I pointed it out. 'If you come home from Abby's house with this attitude again, you will not be able to have play dates over there for a month.'
The second is the need to address the attitude when it appears. We call it Cinderella Therapy. I sat the girls down to tell/remind them of the story of Cinderella. We talked about what a horrible life of thankless drudgery she had (fun side conversation about the word drudgery!), but what a fabulous attitude she had. She had to scrub the floors on her knees, do all the cooking and cleaning with no please or thank you, feed the animals, etc., but she still wakes up singing, she sings while scrubbing that floor, she even finds time to help her friends with a smile! I explained that this shows that thankless drudgery equals fabulous attitude, so if their attitudes were less than fabulous, I was not providing them with enough thankless drudgery, and I would be fixing that with Cinderella Therapy. 'If you roll your eyes, or whatever, you will be given work to do until your attitude improves.’ I started with a one warning (since this was a new thing) ' One more word from you and you'll be getting Cinderella Therapy.' I gave them two rotten jobs to start with. Scrubbing the kitchen and bathroom floors with a small bucket of hot soapy water and a scrubby sponge. Then dry with a towel. (no stand up mop, or 'swiffer'). They had to come back to me when they were done 'I finished the floors. Is there anything else I can do for you?' without attitude. If I felt they had learned the lesson, I would say ' that is all for now.' No thank you, no good job the floor looks great. Just 'that is all'. If they were still giving me sarcasm, or complaining that I was 'so mean' or anything, I would give another job (windows, weeds, sweep the patio,) until they fixed their attitudes. It took a weekend of this therapy for them to really catch on, but it was an amazing transformation. We had to re-apply this technique every few months to reinforce the fact that bad attitudes are not accepted in this family. Within a year we only had to say 'oh, I think maybe someone needs some Cinderella Therapy' and they'd get an instant smile on their face and apologize. They are now 13 1/2 and 16 years old and the mere threat of Cinderella Therapy fixes them up immediately!
I hope this helps. Be brave!