Not sure why overloading the existing CSS class definitions provided in the HTML isn't workable, but at the very worst you can dynamically inject HTML content including CSS class attributes as appropriate. jQuery is great at this, but any framework that allows CSS3 selectors should make it very easy to modify your HTML with a few simple lines of script. Once you modify/inject your HTML, you can write your appropriate CSS or leverage existing written CSS (say if you wanted to use a UI CSS framework like jQUeryUI Themes)
Of course this will be much slower than having the appropriate HTML already written.