You should use conditional comments for this, quicker, easier, shorter, like this:
<!--[if lt IE 8]>
<style type="text/css">#element { display: none; }</style>
<![endif]-->
This will hide the element on IE7 and below. You don't need any script to go along with this, just remove the display: none
you currently have hiding it initially from your original stylesheet (or in-line).
For the comments concerning Google Pagespeed not liking this...ignore it, if you have to fix an IE7 bug, fix it, the right way. This is faster and simpler...if Pagespeed was able to check that you're using the user agent to do this (which jQuery.browser
does) it would recommend against doing so, it just doesn't have a mechanism to tell you that's a worse approach.