Hmm, still seems kinda messy to rely on CSS.
Next thought, maybe you can override Google's open method with something like this: http://jsfiddle.net/Z3Ysq/
They may have been able to prevent this with a closure, but I think you could workaround everything. Watch out for scope issues, but I think there's a way to make this completely generalizable.
That being said, I agree that at some point, it might get too messy figuring this all out that your existing solution is best. Kudos for the clever concept.