function setHeight(){
		ar=document.getElementsByTagName('html');
		//document.getElementById('body').style.height="";
		if (window.innerHeight && window.scrollMaxY) {// Firefox
			height = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
			height = document.body.scrollHeight;
		} else if (ar[0].scrollHeight){
			height = ar[0].scrollHeight;
		} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
			height = document.body.offsetHeight;
		}
		
			
		
		wndh=$(window).height();
		height=parseInt($('#main').outerHeight(true))
			-parseInt($('#pagefoot').css('padding-top'));
		
		if(wndh>height){
			$('#pagefoot').css('padding-top',wndh-height);
			height+=wndh-height;
		}else{
			$('#pagefoot').css('padding-top',0);
		}
		
		document.getElementById('body').style.height=height+"px";
	}
	
$(document).ready(function(){
	$('h2:first').css('background-color','#4d3b2e');
	$('#main .foot:last').css('background-color','#4d3b2e').css('margin-bottom','0px');
	$('#main .foot.closable').prepend('<div class="openclose"></div>');
	$('#main .foot.closable').each(function(){
	/*	el=$(this).prev();
	
		nn=document.createElement('div');
		nn.className="inner";
		alert(el.context.className);
		return(1);
		par=el.parent();
		while(!el.is('h2')){
			$(nn).append(el.clone());
			lel=el;
			el=el.prev();			
			lel.remove();
		}
		$(this).insertBefore(nn);*/
	});
	
	$('#main .openclose').click(function(){
		if($(this).hasClass('active')){
			el=$(this).parent().prev();
			while(!el.is('h2')){
				//el.slideDown("slow");
				el.show();
				el=el.prev();
			}
		}else{
			el=$(this).parent().prev();
			while(!el.is('h2')){
				el.hide();
				el=el.prev();
			}
		}
		$(this).toggleClass('active');
		setHeight();
	});
	$('#main .closed .openclose').click();
	$('.menu .menu').slideDown("slow");
	$('.lightbox').lightBox();
	$(window).bind('resize',function(){
		setHeight();
	});

	setHeight();

});