jQuery - slideToggle, testing if up or down

Hi all

I have a simple slideToggle that slides a sub menu up and down

I also have a .scroll function when the window is scrolled.

If the window is scrolled and the #sub_menu is closed I would like #sub_menu to slide down.

Is there a way of testing if the #sub_menu is open or closed when using slideToggle.

Something like: