//from http://www.derekallard.com/blog/post/conditionally-sticky-sidebar
window.onscroll = function()
{
	// Thanks to Johan SundstrÃ¶m (http://ecmanaut.blogspot.com/) and David Lantner (http://lantner.net/david) 
	// for their help getting Safari working as documented at http://www.derekallard.com/blog/post/conditionally-sticky-sidebar
	if( window.XMLHttpRequest ) { // IE 6 doesn't implement position fixed nicely...
		if (document.documentElement.scrollTop > 340 || self.pageYOffset > 340) {
			$('#navigation').css('position', 'fixed');
			$('#navigation').css('top', '0');
		} else if (document.documentElement.scrollTop < 340 || self.pageYOffset < 340) {
			$('#navigation').css('position', 'absolute');
			$('#navigation').css('top', '340px');
		}
	}
}