How to handle theme with transparent backgrounds than also use Ajax dialogues

How to handle theme with transparent backgrounds than also use Ajax dialogues

I've built a simple CMS that handles different themes based on the jQuery CSS class structure, and also  uses Ajax dialogs to edit page content. Switching between standard jQuery themes works a treat.
 
But if falls over when a client wants a theme based on transparent background, as the Aiax dialogues based on the ui-widget-content class then also apear transparent; resulting in the user geting very confused.
 
I've fixed the problem by basing the client site theme on non ui-classes, and the Ajax Dialoges on the ui-classes, but this feels like a hack, and also breaks theme switching.
 
Have I missed a jQuerty trick?