function hide(divID){
	document.getElementById(divID).style.display = "none"; 
}
function show(divID){
	document.getElementById(divID).style.display = "block";
}
function changeContent(divID, content){
	$(div).html(content);
}


//OFTA
function visaPartner(i){
	hideAllPartnerDivs();
	partner='partner'+i;
	show(partner);
}
function hideAllPartnerDivs(){
	document.getElementById("dyncontent").style.display = "none"; 
	document.getElementById("partner1").style.display = "none";
	document.getElementById("partner2").style.display = "none";
	document.getElementById("partner3").style.display = "none";
	document.getElementById("partner4").style.display = "none";
	document.getElementById("partner5").style.display = "none";
	document.getElementById("partner6").style.display = "none";
	document.getElementById("partner7").style.display = "none";
	document.getElementById("partner8").style.display = "none";
	document.getElementById("partner9").style.display = "none";
	document.getElementById("partner10").style.display = "none";
}


//UPPLAND
function visaDestination(i){
	hideAllDestinations();
	dest="dest"+i;
	show(dest);
}
function hideAllDestinations(){
	numOfDests = $('body').find('#sections ul li img').length;
	
	for(i=1 ; i<=numOfDests; i++){
		ID = "dest"+i;
		document.getElementById(ID).style.display = "none";
	}
/*	
	document.getElementById("dyncontent").style.display = "none"; 
	document.getElementById("dest01").style.display = "none";
	document.getElementById("dest02").style.display = "none";
	document.getElementById("dest03").style.display = "none";
	document.getElementById("dest04").style.display = "none";*/
}

function resetDestinations(){
	hideAllDestinations();
	if($('body').find('#sections ul li img').length != 0){
		show("dest1");
	}
}




//MENU (CONTENT)
function gotoPage(pagename){
	/*$('#contentholder').empty();*/
	
	$('#content').css("moz-opacity","0.3"); 
	$('#content').css("opacity","0.3");
	$('#content').css("filter","alpha(opacity=30)");
	$('#loadingSpinner').css("display","block");
	$('#loadingSpinner').css("top","250px");
	
	pagename = "/wp-content/themes/default/content/"+pagename;
	
	$('#contentholder').load(pagename+'.php #content', function() {		
		reInit();
		
		/*
		for (i=1 ; i<=6 ; i++){
			$("#menu-item"+i).removeClass().addClass("menu-item"+i);
			$("#footmenu-item"+i).removeClass().addClass("footitem"+i);
		}*/

		//$("body").css('background', '#fdc700 url("wp-content/themes/default/img/common/bg.png") no-repeat top center');
		
		/*if(pagename=="index"){
			num = 1;
		}else if(pagename=="ofta"){
			num = 2;
		}else if(pagename=="uppland"){
			num = 3;
		}else if(pagename=="stadstrafiken"){
			num = 4;
			$("body").css('background', '#97c547 url("img/stadstrafiken/bg.png") no-repeat center top');
		}else if(pagename=="kartan"){
			num = 5;
		}*/
		$('#loadingSpinner').css("display","none");
		$('#loadingSpinner').css("top","0");
		/*
		$("#menu-item"+num).removeClass().addClass("menu-item"+num+"-selected");
		$("#footmenu-item"+num).removeClass().addClass("footitem"+num+"-selected");*/
	});
}


function greenBG(){
	$("body").css('background', '#97c547 url("/wp-content/themes/default/img/stadstrafiken/bg.png") no-repeat top center');
	$(document).ready(function(){
		$("#footlogo3").css('display', 'block');
	})
}