how do I write this 'if' statement?

how do I write this 'if' statement?

Hello,

I need to write an if statement which does something if an image has a specific src attribute.

my Image is represented by:

('img.menuImage').

So basically I want to say:

if ($(img.menuImage).attr('src' == 'images/yes.gif')) {
     //do this
} else {
    // do that



I know this isn't correct but just to give an idea of what I'm trying to do.

Any help is appreciated.

thanks!