// General content replacing and pitching
jQuery(document).ready(function($){
	$("a > img:first-child").parent().addClass("thumbnail");

	$(window).load(function(){
		if($(window).width()<1107 && $(window).height()<830) {
			$("#background img").width(1107).height(830);
		}
		else {
			if($(window).height()/3 > $(window).width()/4) {$("#background img").height($(window).height()).width($(window).height()/3*4);}			
			else {$("#background img").width($(window).width()).height($(window).width()/4*3);}			
		}
	});
	
	$(window).resize(function(){
		if($(window).width()<1107 && $(window).height()<830) {
			$("#background img").width(1107).height(830);
		}
		else {
			if($(window).height()/3 > $(window).width()/4) {$("#background img").height($(window).height()).width($(window).height()/3*4);}			
			else {$("#background img").width($(window).width()).height($(window).width()/4*3);}			
		}
	});
});

