Can anyone help me to simplify this code please?

Can anyone help me to simplify this code please?

Hi all the gurus!!

Does anyone know why IE doesn't read this code? it returns NULL lol


var imagePath = $(this).parent('div:first').find('img').filter(function (index){return $(this).css('display')=='block';}).attr('src').replace('.jpg', '_bw.jpg');



Thanks heaps!!