
		$(document).ready(function(){
			SetHeights();
			
			$('.tm').hover(
				function(){
					var top = 0-($(this).find(".submenu").height()/2)-1;
					if(typeof $(this).find(".submenu").height() === "number")
					$(this).find(".submenu").css("top",top);
				},
				function(){
					//console.log('out');
				}
			);
			
			if($.cycle)$('.slideshow').cycle({
				fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
				speed:  1000,
				timeout:  3000,
				pager:  '#nav',
				pagerAnchorBuilder: function(idx, slide) { 
				  return '<a href="#"></a>'; 
				 } ,  
				pagerEvent: 'click', 
				pauseOnPagerHover: true
			});
		
		});
		
		function SetHeights() {
			var ContainerHeight = $("#right").height() >= 530?$("#right").height():530;
			ContainerHeight = $("#left").height() >= ContainerHeight?$("#left").height():ContainerHeight;
			
			$("#site").height(ContainerHeight);
			$("#left").height(ContainerHeight);
			$("#right").height(ContainerHeight);
			if(ContainerHeight >= 530) {
				$(".body0-bg").height(ContainerHeight-530);
			}
			else
				$(".body0-bg").height(ContainerHeight-530);
		}
