Background = function() {
	this.init();
}

Background.prototype = {
	init: function() {
		this.bg = $('#bg');
		this.layout = $('#layout');
		
		var that = this;
			
		this.resize_bg();

		Reflow.addListener('reflow', function(){
			that.resize_bg();
		});
		
		this.balls_hover();
	},
	
	resize_bg: function() {
		this.bg[0].style.height = this.layout[0].offsetHeight + 'px';
	},
	
	balls_hover: function(){
		var
			header = $('#content .drawings h2'),
			links = header.find('a');
		
		links.hover(
			function(){
				$(this).parents('h2').addClass('hover');
			},
			function(){
				$(this).parents('h2').removeClass('hover');
			}
		);
	}
}

$(function() {
	new Background();
});
