$(document).ready(function(){

	var url = window.location.href;
	var filename = url.split("/");
		url_length = filename.length;
		filename = "/"+filename[url_length-1];
	
	if(filename.length > 1){
		active = $("#col_left ul li a[href$="+filename+"]")
		active.parent().parent().show();
		active.addClass("active");
	}


	$(".showsub").click(function(){
		
		$(".showsub").parent().find("ul").hide("slow");
		$(this).parent().find("ul").toggle("slow");

	});


	$('#head_gemeindeleben').mouseover(function(){
		
		$(this).attr('src','http://server/gemeinde-eppendorf_210130/html/layout/head_gemeindeleben_hover.jpg')

	});

	$('#head_gemeindeleben').mouseout(function(){
		
		$(this).attr('src','http://server/gemeinde-eppendorf_210130/html/layout/head_gemeindeleben.jpg')

	});

	$('#head_kommunalpolitik').mouseover(function(){
		
		$(this).attr('src','http://server/gemeinde-eppendorf_210130/html/layout/head_kommunalpolitik_hover.jpg')

	});

	$('#head_kommunalpolitik').mouseout(function(){
		
		$(this).attr('src','http://server/gemeinde-eppendorf_210130/html/layout/head_kommunalpolitik.jpg')

	});

	$('#head_wirtschaft').mouseover(function(){
		
		$(this).attr('src','http://server/gemeinde-eppendorf_210130/html/layout/head_wirtschaft_hover.jpg')

	});

	$('#head_wirtschaft').mouseout(function(){
		
		$(this).attr('src','http://server/gemeinde-eppendorf_210130/html/layout/head_wirtschaft.jpg')

	});


});
