Вам нужно пройтись по другим областям и отключить всегда, чтобы последний щелчок не отображался при новом щелчке. Попробуйте что-то вроде этого:
//map clicks
$(".tabs area").click(function(){
//AREAS LOOP:
$(".tabs area").each(function(){
var d = $(this).data('maphilight') || {};
if(d.alwaysOn == true){
d.alwaysOn = false;
}
});
//DISPLAY CURRENT LI FUNCTION:
$('.tabs area').mouseover(function(){
var thisTarget = $(this).attr("href");
if(thisTarget){
$('#test').innerHTML = thisTarget;
}
$(this).parents(".tabs").find('area.current').removeClass('current');
$(this).addClass('current');
$(this).parents(".tabs").nextAll(".tab-content").children(":visible").fadeOut(1, function() {
$(thisTarget).fadeIn("fast");
});
});
//This block is what creates highlighting by trigger the "alwaysOn",
var data = $(this).data('maphilight') || {};
data.alwaysOn = true; //NOTICE I MADE THIS ALWAYS TRUE
$(this).data('maphilight', data).trigger('alwaysOn.maphilight');
//there is also "neverOn" in the docs, but not sure how to get it to work
if ($(this).hasClass("current") == false)
{
var thisTarget = $(this).attr("href");
$(this).parents(".tabs").find('area.current').removeClass('current');
$(this).addClass('current');
$(this).parents(".tabs").nextAll(".tab-content").children(":visible").fadeOut(1, function() {
$(thisTarget).fadeIn("fast");
});
}
return false;
});