$(document).ready(function(){
  
  /* Animate the menu
  ****************/
	$('ul#catlist li a:not(ul#catlist li.current_page_item a, ul#catlist li.current-cat a)').hover(function() {

		$(this).animate({
		height: "105px"

		},{queue:false, duration:90});

		}, function() {

		$(this).stop().animate({
		height: "65px"
		
		},{queue:false, duration:90});
	});

  /* Fix the position of nav when it is about to be scrolled off-screen - not in smelly IE6 tho - borrowed from K2 theme
	*********************************/
	if ( !( $.browser.msie && parseInt(jQuery.browser.version, 10) < 7 ) && $('aside').length>0  )
		{
			var nav_pos = $('aside').offset().top;

			$(window).scroll(function(e)
			{
				// Detect if content is being scroll offscreen.
				if ( (document.documentElement.scrollTop || document.body.scrollTop) >= nav_pos)
				{
					$('body').addClass('smartposition');
				}
				else $('body').removeClass('smartposition');
			});
			
			$(window).scroll(); // trigger onload
		}
});
