function updateTitle(){
	document.title = "enjoyNZ - The Best of New Zealand in the Netherlands";
}

var aImgs = [];
var aTexts = [];


function wireUpEvents(){

	aImgs['food'] = document.getElementById('food_img');
	aImgs['wine'] = document.getElementById('wine_img');
	aImgs['beauty'] = document.getElementById('beauty_img');
	aImgs['travel'] = document.getElementById('travel_img');
	aImgs['fashion'] = document.getElementById('fashion_img');
	aImgs['outdoor'] = document.getElementById('outdoor_img');
	
	aTexts['food'] = document.getElementById('food_text');
	aTexts['wine'] = document.getElementById('wine_text');
	aTexts['beauty'] = document.getElementById('beauty_text');
	aTexts['travel'] = document.getElementById('travel_text');
	aTexts['fashion'] = document.getElementById('fashion_text');
	aTexts['outdoor'] = document.getElementById('outdoor_text');
	
	for(var prop in aImgs){
		wireUpSingleEvent(prop);	
	}
}

function wireUpSingleEvent(sType){
	if(aImgs[sType]){
		aImgs[sType].onmouseover = function(){
			doMouseOver(sType);	
		}
		aImgs[sType].onmouseout = function(){
			doMouseOut(sType);	
		}
	}

	aTexts[sType].onmouseover = function(){
		doMouseOver(sType);	
	}
	aTexts[sType].onmouseout = function(){
		doMouseOut(sType);	
	}
}


function doMouseOver(sType){
	if(aImgs[sType]){
		aImgs[sType].style.backgroundImage = "url('/image/" + sType + "_on.jpg')";	
	}
	aTexts[sType].style.backgroundImage = "url('/image/" + sType + "_text_on.gif')";	
}

function doMouseOut(sType){
	if(aImgs[sType]){
		aImgs[sType].style.backgroundImage = "url('/image/" + sType + "_off.jpg')";	
	}
	aTexts[sType].style.backgroundImage = "url('/image/" + sType + "_text_off.gif')";	
}




