Read the tutorial on
Rotating a div's background color with jQuery
on
joshtucker.com.au