It sounds like you really want to just disconnect the first navigation link from work. If this is the case, you just want to:
$("#navigation a:first").click(function () { return false; });
how returning falsefrom the event handler prevents the default browser action (following the link).
Although, if the link is not intended for clickability, do not make it a link, turn it into <span>:
var link = $("#navigation a:first");
$("<span>").text(link.text()).attr("class", link.attr("class"))
.insertBefore(link);
link.remove();
(, ).
, , , :
$('#navigation a').bind('click', onClick);
function onClick(e) {
var $this = $(this);
var prev = current;
current = $this.parent().index() + 1;
if (current == 1){
$("#navigation a:eq(1)").unbind("click");
} else {
$("#navigation a:eq(1)").bind("click", onClick);
}
}