var currentChoice = "none";

function selectCountry(choice)
	{
		if (choice == currentChoice)return;
		currentChoice = choice;
		switch(choice)
		{
			case "goteborg":
			{	
				$(".bullseye").animate({
					opacity: 1,
					left: 27-11,
					top:589-11
				},{queue: false, duration: 'slow'});
				
			}break;
			case "halmstad":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 52-11,
					top:643-11
				},{queue: false, duration: 'slow'});
			}break;
			case "hoor":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 69-11,
					top:686-11
				},{queue: false, duration: 'slow'});
			}break;
			case "kiruna":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 221-11,
					top:62-11
				},{queue: false, duration: 'slow'});
			}break;
			case "lulea":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 273-11,
					top:176-11
				},{queue: false, duration: 'slow'});
			}break;
			case "malmo":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 53-11,
					top:700-11
				},{queue: false, duration: 'slow'});
			}break;
			case "norrkoping":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 147-11,
					top:545-11
				},{queue: false, duration: 'slow'});
			}break;
			case "linkoping":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 130-11,
					top:556-11
				},{queue: false, duration: 'slow'});
			}break;
			case "nykoping":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 167-11,
					top:536-11
				},{queue: false, duration: 'slow'});
			}break;
			case "pitea":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 261-11,
					top:187-11
				},{queue: false, duration: 'slow'});
			}break;
			case "stockholm":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 197-11,
					top:508-11
				},{queue: false, duration: 'slow'});
			}break;
			case "uppsala":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 184-11,
					top:479-11
				},{queue: false, duration: 'slow'});
			}break;
			case "angelholm":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 51-11,
					top:667-11
				},{queue: false, duration: 'slow'});
			}break;
			case "ornskoldsvik":
			{
				$(".bullseye").animate({
					opacity: 1,
					left: 204-11,
					top:302-11
				},{queue: false, duration: 'slow'});
			}break;
			default:
			{
			}break;
		}
		$("*").removeClass("selected");
		$("#"+choice).addClass("selected");
		$(".bullseye").attr("href",$("#"+choice+"Poly").attr("href"));
	}

$(document).ready(function() {

	$('.bullseye').css('opacity', 0);
	$('.bullseye').show();

	$("#goteborg").mouseover(function(event) {selectCountry('goteborg');});
	$("#halmstad").mouseover(function(event) {selectCountry('halmstad');});
	$("#hoor").mouseover(function(event) {selectCountry('hoor');});
	$("#kiruna").mouseover(function(event) {selectCountry('kiruna');});
	$("#lulea").mouseover(function(event) {selectCountry('lulea');});
	$("#malmo").mouseover(function(event) {selectCountry('malmo');});
	$("#norrkoping").mouseover(function(event) {selectCountry('norrkoping');});
	$("#linkoping").mouseover(function(event) {selectCountry('linkoping');});
	$("#nykoping").mouseover(function(event) {selectCountry('nykoping');});
	$("#pitea").mouseover(function(event) {selectCountry('pitea');});
	$("#stockholm").mouseover(function(event) {selectCountry('stockholm');});
	$("#uppsala").mouseover(function(event) {selectCountry('uppsala');});
	$("#angelholm").mouseover(function(event) {selectCountry('angelholm');});
	$("#ornskoldsvik").mouseover(function(event) {selectCountry('ornskoldsvik');});
});
