One of the black wire's is the switch live wire and should have some red tape on it.
so...
All yellow greens together
All reds together
2 black together and to black/blue of light
1 black with red tape to red/brown on light
You need to work out which black should have the red tape on it so try one at a time
Mr Handy Andy
May 2008