Я думаю, что вы можете сделать это довольно просто, запустив существующие обработчики кликов:
$('#map-previous').click(function(){
var currentAreaIndex = $('area.current').index();
var prevAreaIndex = currentAreaIndex - 1;
// If .eq() gets -1 as a parameter it retrieves the last item
// You could disable the link if you didn't like that behavior
$('area').eq(prevAreaIndex).click();
});
$('#map-next').click(function(){
var currentAreaIndex = $('area.current').index();
var nextAreaIndex = currentAreaIndex + 1;
var $areas = $('area');
// Here you'll need to manually handle the wrap-around case
if (nextAreaIndex > $areas.length){
nextAreaIndex = 0;
}
$('area').eq(nextAreaIndex).click();
});
Вы можете контролировать порядок областей, изменяя порядок HTML ...