You could use the jQuery library to detect the browser version.
Example:
jQuery.browser.version
However, this only makes sense if you are also using other functions of jQuery. Adding an entire library just to detect the browser seems like overkill to me.
More information:
http://api.jquery.com/jQuery.browser/
(you have to scroll down a bit)