// stickyNav.js
// author: Drew Dahlman (www.drewdahlman.com)

$(window).scroll(function(e){ 
	$el = $('#workNav'); // element you want to scroll
	$scrolling = 105; // Position you want element to assume during scroll
	$bounds = 0; // boundary of when to change element to fixed and scroll
	
	if ($(this).scrollTop() > $bounds && $el.css('position') != 'fixed'){ 
		$($el).css({'position': 'fixed', 'top': $scrolling}); 
	} 
	if ($(this).scrollTop() < $bounds && $el.css('position') != 'absolute'){ 
		$($el).css({'position': 'absolute', 'top': '0px'}); 
	} 
	
	$el = $('#info'); // element you want to scroll
	$scrolling = 105; // Position you want element to assume during scroll
	$bounds = 0; // boundary of when to change element to fixed and scroll
	
	if ($(this).scrollTop() > $bounds && $el.css('position') != 'fixed'){ 
		$($el).css({'position': 'fixed', 'top': $scrolling}); 
	} 
	if ($(this).scrollTop() < $bounds && $el.css('position') != 'absolute'){ 
		$($el).css({'position': 'absolute', 'top': '0px'}); 
	} 
	
});

