//set the default venue to show
var activeElement = 'img-village0-active-div';

	window.addEvent('domready', function()
	{
		//define the scroll variable
		//define the scroll variable
		var scroll = new Fx.Scroll('map-content-container', {
			wait: false,
			duration: 1,
			offset: {'x': 0, 'y': 0},
			transition: Fx.Transitions.Quad.easeInOut
		});
		
		/*activate default venue stuff*/
		$(activeElement).removeClass('hide');
				
		//event listener and function 
		$('main-map').getElements('div').addEvent('mouseenter', function(e)
		{
			e = new Event(e).stop();
			id = this.id;
			
			if(id.match("img-")!=null)
			{
				imageMapRollover(this.id);
			}
			
		});
		
		/*FUNCTIONS*/		
		function imageMapRollover(id)
		{	
			currentImage = id;
			temp = id.split('-');
			activeImage = temp[0]+'-'+temp[1]+'-active-'+temp[2];
			
			currentItem = (id).split('-');
			currentItem = currentItem[1];
			
			if(currentImage.match("-active") == null)
			{
				//to help it not through "is undefined" errors when you hammer it
				if(typeof(activeImage) == "undefined")
				{
					activeImage = activeElement;
				}
				
				/*change images over*/
				$(activeImage).removeClass('hide');
				$(activeElement).addClass('hide');
				
				activeElement = activeImage; //set new active image

				scroll.toElement(currentItem); //scroll the content panel
				
				//change "more information" link
				hiddenLink = $(id).getElement('a').href;
				$('more-info').href = hiddenLink;
			
			}
		}

	});