// js created and developed by 12bis3.de - zeitgemaess kommunizieren 

jQuery.noConflict();
jQuery(document).ready(function() {


//	var lastwidth =  
	var maxwidth = jQuery('ul#mainnav').innerWidth();
	var sumwidth = 0;
	jQuery('ul#mainnav > li').each(function() {
		if (this.id!='navfill') sumwidth = sumwidth+jQuery(this).outerWidth(true);
	});
	jQuery('li#navfill').css('width',maxwidth-sumwidth-1);	
	
	var sumwidth2 = 0;
	jQuery('ul#mainnav > li').each(function() {
		sumwidth2 = sumwidth2+jQuery(this).outerWidth(true);
	});
	
	jQuery('input#searchterm').focus(function() {
		if (jQuery(this).hasClass('fresh')) {
			jQuery(this).removeClass('fresh').val('');
		}
	});
	
	jQuery('form#language > ul > li:not(:first)').hide();
	/*
	jQuery('form#language > ul > li:not(:first)').click(function () {
		var href = jQuery('a',this).attr('href');
		window.location.href = href;
		return false;
	});
	*/
	jQuery('form#language > ul > li:first').click(function () {
		jQuery('form#language > ul > li:not(:first)').toggle();
	});
	jQuery('form#language > ul > li:first > a').click(function () {
		jQuery('form#language > ul > li:not(:first)').toggle();
		return false;
	});
});
