The problem of Core/index in IE7

The problem of Core/index in IE7


Please view the code as below:
//jquery-1.2.6.min.js
//ui.tabs.js
//ui.tabs.css
$(document).ready(function(){
$('#container-1 ul').tabs({add:addEventHandler});
});
function addEventHandler(lnk){
var li = $(lnk).parent();
$('<img src="close-off.gif" class="ui-tabs-button" />')
.appendTo(li)
.hover(function(){
var img = $(this);
img.attr('src','close-over.gif');
},
function(){
var img = $(this);
img.attr('src','close-off.gif');
}
)
.click(closeEventHandler);
}
function closeEventHandler(){
var index = $('#container-1 li').index($(this).parent());
alert(index); //I can't get the INDEX, always show me -1 in IE7!
But it is normal in Firefox
}