Index: wp-content/themes/twentythirteen/js/functions.js
===================================================================
--- wp-content/themes/twentythirteen/js/functions.js	(revision 23923)
+++ wp-content/themes/twentythirteen/js/functions.js	(working copy)
@@ -51,7 +51,7 @@
 		if ( navbarOffset < 0 )
 			navbarOffset = navbar.offset().top - toolbarOffset;
 
-		if ( window.scrollY >= navbarOffset && 644 < window.innerWidth )
+		if ( $( this ).scrollTop() >= navbarOffset && 644 < window.innerWidth )
 			html.addClass( 'navbar-fixed' );
 		else
 			html.removeClass( 'navbar-fixed' );
