$(document).ready(function(){
	$('ul#accordion').accordion({
		active: ".selected",
		autoHeight: false,
		header: ".opener",
		collapsible: true,
		event: "click"
	});
});

$(function(){
	var _wrapper = $('#wrapper');
	var _header = $('#header');
	var _footer = $('#footer');
	var _main = $('#main');
	var _hardCode = -115;
	_main.find('.main-holder').css({height:'auto',zoom:1});

	function fixLayout() {
		_main.height('auto');
		_main.css({height:_wrapper.height()-_header.height()+_hardCode});
	}

	//this hooks the fixlayout callback up to the resize event
	$(window).resize(fixLayout);
	
	//this makes it execute once to start
	fixLayout();
	
	//this makes it execute every 100ms
	setInterval(fixLayout,100)
});
