(function(){RIGHTMOVE.namespace("RIGHTMOVE.OVERSEAS").mapRegions=function(){var c,f=function(b,a){b.css("visibility",a?"visible":"hidden")},i=function(b,a){var d=$("#"+a.regionId+"Hoverover");b.mouseover(function(){a.selected||f(d,true)});b.mouseout(function(){a.selected||f(d,false)});b.click(function(h){var e;if(!a.linkToAnotherRegion)if(a.selected){$("#searchLocation").val("");e=$("#"+a.regionId+"Hoverover");f(e,false);a.selected=false}else{$("#searchLocation").val(a.name);for(var g=0;g<c.mapRegions.length;g++){e=
c.mapRegions[g];e.selected=false;e=$("#"+e.regionId+"Hoverover");f(e,false)}a.selected=true;f(d,true);h.preventDefault()}})},j=function(){$("#initialOverseasPropertySearch").submit(function(){var b=$("#searchLocation").val();$("#locationIdentifier").val("");$("#previousSearchLocation").val("");for(var a=0;a<c.mapRegions.length;a++){var d=c.mapRegions[a];if(d.name==b){$("#locationIdentifier").val("WORLD_REGION^"+d.regionId);$("#previousSearchLocation").val(d.name)}}})};return{init:function(b){c=b;
for(b=0;b<c.mapRegions.length;b++){var a=c.mapRegions[b];i($(".highlightMapRegion"+a.regionId),a)}j()}}}()})();
