This is the guidance that google provides.
http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35769
Hidden content is also mentioned here:
http://www.google.com/support/webmasters/bin/answer.py?answer=66353
Remember the spiders don't execute your js