This is an old question, but things have moved on since it was asked so in case people are still reading this, I'll chip in with an alternative solution that works well:
For all browsers in current use except IE8 and earlier, the simplest solution for rotating an element is the standard CSS syntax transform:rotate(45deg)
.
For IE6/7/8, the best option is the CSS Sandpaper javascript library.
CSS Sandpaper implements standard the CSS rotation syntax, along with several other CSS features. This means you can use standard CSS syntax in all browsers.
The good thing about this is that it means that although you're using javascript for IE, you don't need to involve any JS code for other browsers, which should be good for performance. It's also good to be using the web standards on browsers that support them.