
	$.fx.speeds._default = 750;
	$(function() {
		$('div.dialog').dialog({
			autoOpen: false,
			show: 'blind',
			hide: 'fold',
			width: 500
		});
		
		$('a.opener').click(function() {
			$('#dialog_' + $(this).attr("rel")).dialog('open');
			return false;
		});
	});
	
	function gimme_current_scriptname() {
		var uri=window.location.href;
		uri=uri.split("/");
		if(uri[uri.length-1]!='') {
			var page=uri[uri.length-1].split(".");
			return page[0];
		}
		else 
			return 'index';
	}
	
	
$(document).ready(function() { 
	var current_page=gimme_current_scriptname();
	
	$('#nav > ul > li > a').css('background', function() { $(this).html('');var hallo=$(this).attr("title");return "url(global/images/menu/"+hallo+".png)";	});
	$('#nav > ul > li > a').css("backgroundRepeat","no-repeat");
	$('#nav > ul > li > a[title!="'+current_page+'"]').css("backgroundPosition","top center");
	$('#nav > ul > li > a[title="'+current_page+'"]').css("backgroundPosition","bottom center");
});


$('select[name="anwen"]').live("change", function() {
	$("#"+ $(this).val()).css("display","block");
	$("#"+ $(this).val()).siblings().css("display","none");
});


/*submenukram*/

$('a.sub').live("mouseover",function() {
	$(this).siblings().css("display","block");
	$(this).siblings().bind("mouseover",function() {
		$(this).css("display","block");
		$(this).siblings().css("backgroundPosition","bottom center");
	});
	
	$(this).siblings().bind("mouseout",function() {
		$(this).css("display","none");
		$(this).siblings().css("backgroundPosition","top center");
	});
});

$('a.sub').live("mouseout",function() {
	$(this).siblings().css("display","none");
});