var ebpImgpath = new Array();
ebpImgpath["newengland"] ="/annuity/internet/en/files/newengland_tcm934-231457.jpg";
ebpImgpath["newyork"] ="/annuity/internet/en/files/newyork_tcm934-231458.jpg";
ebpImgpath["pennsylvania"] ="/annuity/internet/en/files/pennsylvania_tcm934-231467.jpg";
ebpImgpath["midatlantic"] ="/annuity/internet/en/files/midatlantic_tcm934-231455.jpg";
ebpImgpath["eastcentral1"] ="/annuity/internet/en/files/eastcentral_tcm934-231417.jpg";
ebpImgpath["eastcentral"] ="/annuity/internet/en/files/eastcentral_tcm934-231417.jpg";
ebpImgpath["centralvalley"] ="/annuity/internet/en/files/centralvalley_tcm934-231413.jpg";
ebpImgpath["greatlakes"] ="/annuity/internet/en/files/greatlakes_tcm934-231426.jpg";
ebpImgpath["greatlakesmi"] ="/annuity/internet/en/files/greatlakes_tcm934-231426.jpg";
ebpImgpath["seflorida"] ="/annuity/internet/en/files/seflorida_tcm934-231474.jpg";
ebpImgpath["ssegulf"] ="/annuity/internet/en/files/ssegulf_tcm934-231479.jpg";
ebpImgpath["ssegulf1"] ="/annuity/internet/en/files/ssegulf_tcm934-231479.jpg";
ebpImgpath["greatplains"] ="/annuity/internet/en/files/greatplains_tcm934-231428.jpg";
ebpImgpath["midwest"] ="/annuity/internet/en/files/midwest_tcm934-231456.jpg";
ebpImgpath["rockymountain"] ="/annuity/internet/en/files/rockymountain_tcm934-231469.jpg";
ebpImgpath["sandiego"] ="/annuity/internet/en/files/sandiego_tcm934-231471.jpg";
ebpImgpath["losangeles"] ="/annuity/internet/en/files/losangeles_tcm934-231445.jpg";
ebpImgpath["northwest"] ="/annuity/internet/en/files/northwest_tcm934-231462.jpg";
ebpImgpath["northernca"] ="/annuity/internet/en/files/northernca_tcm934-231461.jpg";

$(document).ready(function() {
	$("div.mapArea map area").each(function(){
		$(this).mouseover(function(e){
			$("div.mapTextArea div#fsainternal").hide();
			var area_id = $(this).attr('id').replace('area_','');
			var imgPath = ebpImgpath[area_id];
			$('img#mapImage').attr('src',imgPath);
			$('#'+area_id).show();			
		});
		$(this).mouseout(function(e){			
			var area_id = $(this).attr('id').replace('area_','');
			$('img#mapImage').attr('src','/annuity/internet/en/files/wnl_map_tcm934-231487.jpg');
			$('#'+area_id).hide();			
			$("div.mapTextArea div#fsainternal").show();
		});
	});
});

function loadImages() {
	if(document.images) {
		var img1 = new Image();
		var img2 = new Image();
		var img3 = new Image();
		var img4 = new Image();
		var img5 = new Image();
		var img6 = new Image();
		var img7 = new Image();
		var img8 = new Image();
		var img9 = new Image();
		var img10 = new Image();
		var img11 = new Image();
		var img12 = new Image();
		var img13 = new Image();
		var img14 = new Image();
		var img15 = new Image();
		var img16 = new Image();
		
		img1.src = "/annuity/internet/en/files/newengland_tcm934-231457.jpg";
		img2.src = "/annuity/internet/en/files/newyork_tcm934-231458.jpg";
		img3.src = "/annuity/internet/en/files/pennsylvania_tcm934-231467.jpg";
		img4.src = "/annuity/internet/en/files/midatlantic_tcm934-231455.jpg";
		img5.src = "/annuity/internet/en/files/eastcentral_tcm934-231417.jpg";
		img6.src = "/annuity/internet/en/files/centralvalley_tcm934-231413.jpg";
		img7.src = "/annuity/internet/en/files/greatlakes_tcm934-231426.jpg";
		img8.src = "/annuity/internet/en/files/seflorida_tcm934-231474.jpg";
		img9.src = "/annuity/internet/en/files/ssegulf_tcm934-231479.jpg";
		img10.src = "/annuity/internet/en/files/greatplains_tcm934-231428.jpg";
		img11.src = "/annuity/internet/en/files/midwest_tcm934-231456.jpg";
		img12.src = "/annuity/internet/en/files/rockymountain_tcm934-231469.jpg";
		img13.src = "/annuity/internet/en/files/sandiego_tcm934-231471.jpg";
		img14.src = "/annuity/internet/en/files/losangeles_tcm934-231445.jpg";
		img15.src = "/annuity/internet/en/files/northwest_tcm934-231462.jpg";
		img16.src = "/annuity/internet/en/files/northernca_tcm934-231461.jpg";
	}
}
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}
addLoadEvent(loadImages);