jQuery(function( $ ){
	
	
	
	$('#addsclick').click(function (e) {
		//window.location.href	=	serverpath + '/anzeige';
	});
	
	//$('#addsclick').css('cursor', 'pointer');
	
	
	$('ul.sublist').css('opacity', 0.9);

	//
	var links	=	$('a.menu');
	var	timeout;
	
	$('a.menu').mouseover(function(e) {
		
		window.clearTimeout(timeout);	
				
		id		=	this.id.split('-')[2];
		ident	=	'#sublist-' + id;
		
		$('ul.sublist').css('display', 'none');				
		$(ident).css('display', 'block');	
	});
	
	
	for (i = 0; i < links.length; ++i) {
		link	=	links[i];
		
		id		=	link.id.split('-')[2];
		ident	=	'#sublist-' + id;
					
		if ($(ident)) {
			
			$(link).mouseout(function (e) {
				
				id		=	this.id.split('-')[2];
				ident	=	'#sublist-' + id;
				
				timeout	=	window.setTimeout("$('" + ident + "').css('display', 'none');", 100);
			});
			
			$(ident).mouseover(function (e) {
				window.clearTimeout(timeout);	
			});
			
			$(ident).mouseout(function (e) {
				timeout	=	window.setTimeout("$('#" + this.id + "').css('display', 'none');", 100);				
			});
		}	
		
	}
	
	
	if ($('map').length) {
		map.setCenter(new GLatLng(52.435822, 7.071698), 14);
		map.enableScrollWheelZoom();
		map.addControl(new GSmallMapControl());
	}	
});