$(document).ready(function(){

	// lightBox
	try{
		$("a.lightbox").lightBox();
	} catch(err) { }
	
	// custom mail address
	try{
		$("span.mail span").each(function(){
			var mailData = $(this).attr('class').split(' ');
			var mailStr = mailData[0]+String.fromCharCode(8*8)+mailData[1];
			$(this).parent("span.mail").before('<a href="mailto:'+mailStr+'">'+mailStr+'</a>').remove();
		});
	} catch(err) { }
	
});

function startList() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
		  	}
  			node.onmouseout=function() {
  				this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

window.onload=startList;

function writeVisual(){
	var flashvars = {
		xmlpath:"/xml/nieuws.php",
		mediapath:"/gfx_content/nieuws/"
	};
	var params = {
		menu: "false",
		wmode: "transparent",
		quality:"high"
	};
	var attributes = {};
	swfobject.embedSWF("/gfx_content/swf/visual.swf", "visual", "264", "400", "10.0.0", "/gfx_content/swf/expressInstall.swf", flashvars, params, attributes);
	//swfobject.embedSWF("gfx_content/swf/header_hkk.swf", "visual", "264", "400", "9.0.0", "gfx_content/swf/expressInstall.swf", flashvars, params, attributes);
}
