		$(function() {   
			var theWindow        = $(window),
			    $bg              = $("#bg"),
			    aspectRatio      = $bg.width() / $bg.height();
			function resizeBg() {
				if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
				    $bg.removeClass().addClass('bgheight');
				} else {
				    $bg.removeClass().addClass('bgwidth');
				}
			}
			theWindow.resize(function() {
				resizeBg();
			}).trigger("resize");
		});
		
		//The border-bottom (underline) on the "download" and "vi ved at du ved det" acts a little weird.
		//Hence these two functions...
		function  dlHover () {
			$('#viveddet').css('border-bottom', '1px solid #fff');
		}
		function dlOut() {
			$('#viveddet').css('border-bottom', '0');
		}

