﻿// Positioniert den Footer am unteren Rand des Fensters
/*
$(document).ready(function() {
	$(window).resize(setFooter).scroll(setFooter);
	setFooter();
});

function setFooter(){

	var height = $("#footer").height() + 10;

	$("#footer").css({position: "absolute",top:($(window).scrollTop()+$(window).height()-height)+"px"})
}
*/

// Hintergrundbild prozentual skalieren

$(window).load(function() {
	setBackground();
});

$(window).resize(function() {
  setBackground();
});

function setBackground(){

	var winHeight = $(window).height();
	
	var imgHeight = $('#background img').height();
	var imgWidth = $('#background img').width();
	
	var ratio = imgWidth/imgHeight;
	
	var newWidth = winHeight * ratio;
	
	$('#background img').css({'height':winHeight + "px", 'width': newWidth + "px"});
}
