It was a tough call for the offside. The replays show that the legs were on line and Quag was offside only with his chest and his head.
If the ref gave advantage to Quagliarella, the Slovaks would have had very little to complain about. Just like the Italians have very little, actually nothing, to complain about now because technically Quagliarella was indeed offside.
Tough luck for Italy there because that was such a close call that it was a clear 50-50 call in which one team will be the more lucky one. It was the Slovaks this time.