Cycle before event

Cycle before event

Hi,
I am trying to get the currently displayed item id using the Cycle before event,
Code follows -

$('#slideshow1').cycle(                             {                                 fx: 'curtainX',                                 easing: 'easeOutBack',                                 delay: -4000,                                 next: '#Button1Next',                                 prev: '#Button1Prev',                                 before: getCurrent                             });

function getCurrent(currSlideElement, nextSlideElement, options, forwardFlag) {             currSlideID = currSlideElement.id;             //alert(currSlideElement.id);         }

The getCurrent function works fine for the first item displayed, shows the id before the item is displayed, after the first item cycle, it start showing the previous item id, act like an after event.

How can I get the currently displayed item id ???