I'm so sorry, I went through the same exact thing for 3 years with my 15 year old son. However, this is the first year in a while that he is making an effort. He came too close for his own comfort when he had to go to summer school last year. Not that it was his first time at summer work, but the year prior it was all done on his own via mail. Last year though, I refused to pay the extra money for him to do it at home, the book alone cost $88 and the fee was $140. Since I refused to pay it again, in order not to fail, he had to get up and walk or ride his bike to summer school. Let me tell you, his lazy butt straightened up, and that's all it's been- laziness. I used to tell him that if one more of his teachers told me how intelligent he was, but that he was simply lazy and unwilling, that we were jumping off a bridge together, because I couldn't handle it any longer. I used to spend many, many hours worrying and crying about it, and all that worrying, crying, begging didn't help a thing. He had to be willing to do it on his own.
Wish I had more words of encouragement, but until your son sees for himself that nobody else can do it for him, he will never change. The sad thing is that it may take him failing or coming extremely close to wake up and realize.
As for the smart mouth, you're actually lucky that it has just started, most kids these days are starting that much earlier. I know it's still hard to handle, but showing him that it bothers you will only keep it going. So when he gets smart, act like you don't even hear him, or hear the attitude in his voice.
Good Luck!