// JavaScript Document
var server = "http://malmoarena.com";

	window.onload = function(){
		if(setonload==1) initialize();
	}
	
function showDiv(divName){
	document.getElementById(divName).style.display = '';
}
function hideDiv(divName){
	document.getElementById(divName).style.display = 'none';
}
function showAllGroup(groupName){

		var cells = document.getElementsByTagName("div"); 
		for (var i = 0; i < cells.length; i++) { 
			var status = cells[i].getAttribute("name"); 
			if (status == groupName) { 
				cells[i].style.display = '';
			}
		}
}
function hideAllGroup(groupName){

		var cells = document.getElementsByTagName("div"); 
		for (var i = 0; i < cells.length; i++) { 
			var status = cells[i].getAttribute("name"); 
			if (status == groupName) { 
				cells[i].style.display = "none";
			}
		}
}	
	function clearfield(thefield){
		document.getElementById(thefield).value = '';	
	}
	
function iconswift(theimg,number)
{
	newimg = theimg+number+".jpg";
	document.getElementById(theimg).src= server+"/img/"+newimg;
}

function bookmarksite(title,url){
	if (window.sidebar){ // firefox
		window.sidebar.addPanel(title, url, "");
	}else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	}else if(document.all){// ie
		window.external.AddFavorite(url, title);
	}else{
		alert("Funktion fungerar tyvärr ej i din webbläsare");	
	}
}

$(document).ready(function(){
	
	//$(".accordion h3:first").addClass("active");
	//$(".accordion p:not(:first)").hide();
 	$(".accordion p").hide();

	$(".accordion h3").click(function(){
		$(this).next("p").slideToggle("slow")
		.siblings("p:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
	});
 
});
