	function nav1(obj) {
		if (!obj.length) return;
		$(obj).mouseover(function(e) { $(this).addClass("current") });		
		$(obj).mouseout(function() { $(this).removeClass("current") });		
	}
	$(document).ready(function(){
		nav1($("#nav1 ul li"));
		// Feed-Hoehe
		var feed_height = 0;
		$('#feed div').each(function(e) {
			h = $(this).height();
			if(typeof(h) != "undefined") {
				if(h > feed_height) feed_height = h;
			}
		});
		if(feed_height > 0) $('#feed').height(feed_height+25);
		// Content-Hoehe
		$('#content').height(772);
	});
		// Hintergrundbild Metall
(function($) {
	$.fn.fullBg = function(){
		var bgImg = $(this);
		
		bgImg.addClass('fullBg');
		
		function resizeImg() {
			var imgwidth = bgImg.width();
			var imgheight = bgImg.height();
			
			var winwidth = $(window).width();
			var winheight = $(window).height();
			
			var widthratio = winwidth / imgwidth;
			var heightratio = winheight / imgheight;
			
			var widthdiff = heightratio * imgwidth;
			var heightdiff = widthratio * imgheight;
		
			if(heightdiff>winheight) {
				bgImg.css({
					width: winwidth+'px',
					height: heightdiff+'px'
				});
			} else {
				bgImg.css({
					width: widthdiff+'px',
					height: winheight+'px'
				});		
			}
		} 
		resizeImg();
		$(window).resize(function() {
			resizeImg();
		}); 
	};
})(jQuery)

jQuery(function($) {
	$("#background").fullBg();
});

