$(function(){
	
	// Remove the no-js class
	$('html').removeClass('no-js');

    // Font replacement
    Cufon.replace('h1, h2, h3, h4, h5, h6, .cufon, #menu-nav > li > a');
	
	// Open all .external links in new window
	$('a.external').attr({target: "_blank"});

// Page Slide, courtesy of http://www.learningjquery.com/2007/09/animated-scrolling-with-jquery-12
	$('a[href*=#top]').click(function(){if(location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname){var $target=$(this.hash);$target=$target.length&&$target||$('[name='+this.hash.slice(1)+']');if($target.length){var targetOffset=$target.offset().top;$('html,body').animate({scrollTop:targetOffset},1000);return false}}});
	
    // Round Corners
	// $('.round').corner( '10px' );
	$('.round-bottom').corner( 'bottom 10px' );
	
	// Glow the #quick-links
	$('.nice #quick-links a').css('opacity', .9);
	$('.nice #quick-links a').hover(function(){
		$(this).stop().animate({'opacity':1}, 200);	
	}, function(){
		$(this).stop().animate({'opacity':.9}, 200);
	});
	
	// Show dropdown list on-hover
	$('#nav li').hover(function(){
		$(this).find('.sub-menu').show();
	}, function(){
		$(this).find('.sub-menu').hide();
	});
	
	//	that sidebar needs fixing
	var meat = $('#meat').height();
	var side = $('#sidebar').height();
	if(meat > side){
		$('#sidebar').height(meat);
	}
	
});
