var init_height;
set_height = function(){


	var docHeight	= $(document).height();
	var winHeight = $(window).height();
	var contentHeight = $('#header').height() + $('#body').height() + $('#footer').height();
	
	//alert(docHeight+' > '+ winHeight);
	if(docHeight > winHeight){
		var diff = docHeight - contentHeight;
	}else{
		var diff = winHeight - contentHeight;
	}
	var newHeight	= $('#body').height() + diff -1;

	if((diff > 0) || (diff < 0 && newHeight >= init_height)){		
		$('#body, #body .content, #body .shade').css('height',newHeight);
	}
}
set_column_height = function(){
	var h1 = h2 = 0;
	$('#body .column').each(function(){
		h1 = $(this).height();
		if(h1 > h2) h2 = h1
	});
	$('#body .column').height(h2);
}
$(document).ready(function() {
	init_height = $('#body').height();
	set_height();
	set_column_height();
});
$(window).resize(function() {
	set_height();
});

img1=new Image(102,81); 
img1.src="./gfx-final/menu.btn.selected.png";
img2=new Image(200,40); 
img2.src="./gfx-final/bg.submenu.bottom.jpg";
img3=new Image(200,40); 
img3.src="./gfx-final/bg.submenu.hover.jpg";
img4=new Image(200,40); 
img4.src="./gfx-final/bg.submenu.jpg";

$(function(){
	$("ul.buttons li").hover(function(){

		$('ul:first',this).slideDown('fast');

    }, function(){
		$('ul:first',this).slideUp('fast');
    });

    //$("ul.buttons li ul li:has(ul)").find("a:first").append(" &raquo; ");

});
