an "if" needs to return a boolean for true/false
if( $(this).css('color')=='#000' )
However you will run into multiple problems with this.
First, hex color uses 6 digits after "#" and you are using 3. Passing 3 in from css will work, but different browsers will handle this differently and will convert to 6, or convert to RGB.
You would be far wiser using a class change on these elements, and use a css class rule for the color
http://api.jquery.com/toggleClass/