if you are using foundation 5 change this line into this
return '<li class="current"><a href="javascript:void(0)">'.$text.'</a></li>';