	var gTimerCount = 0;
	var gTimer = '';
	
jQuery(document).ready(function(){

	w = 1000 / $j('#menu ul li').not('ul ul li').length - 1;
	$j('#menu ul li,#menu ul ul').not('ul ul li').width(w);
//	$j('#menu ul ul ul').css('margin-left',w + 'px');
	$j('#menu ul li:first').css('border','none');
	$j('#menu ul li a').not('ul ul li a').each(function(){
		$j(this).html('<img src="images/menu/' + $j(this).text() + '.png" border="0" alt="" />');
	});
	var zIndex = 2;
	$j("#menu ul li").hover(
		function(){
			if($j(this).children('ul:eq(0)').is(':hidden')){
				$j(this).children('ul:eq(0)').css('z-index',zIndex++).slideDown('fast');
			}
		},
		function(){
			if($j(this).children('ul:eq(0)').is(':visible')){
				$j(this).children('ul:eq(0)').slideUp('fast');
			}
		}
	);
	
	// set random header image:
	var imgCount = gHeaderImages.length;
	var rand = parseInt(Math.random() * imgCount);
	var headerImage = gHeaderImages[rand];
	$('header').setStyle('background-image:url(../'+headerImage+');')
	var year = new Date();
	year = year.getFullYear();
	$('jsYear').update(year + " ");
});

	waiter = function(){}
	unWaiter = function(){}
	
	resizeTimer = function(){
		if (gTimerCount > 5) {
			clearTimeout(gTimer);
			return;
		}
		resize();
		gTimerCount++;
		setTimeout(resize, 750);
		
	}

	resize = function(){
		if (  jQuery(document).height() > ($j('#page').height() + $j('#header').outerHeight()) ){
			$j('#page').height(jQuery(document).height() - jQuery('#header').outerHeight() -130 );
		}
	}
