diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js
index ddf6b7b9acc71ab02361454c91816bec783de7c6..30677829e9ff0372a2b27b3f8b3a080cf937455c 100644
--- a/docs/assets/js/application.js
+++ b/docs/assets/js/application.js
@@ -1,23 +1,16 @@
 $(document).ready(function(){
 
   // Google code prettify
-  // ================
-
-  // cache $(window), as it is used in scroll spy logic later on
-  var $window = $(window);
+  // ====================
 
-  $window.load(function() {
-    // prettyPrint cannot be set as the event handler to load directly; see
-    // http://google-code-prettify.googlecode.com/svn/trunk/README.html
-    prettyPrint();
-  });
-  
+  prettyPrint();
 
   // scroll spy logic
   // ================
 
   var activeTarget,
       position = {},
+      $window = $(window),
       nav = $('body > .topbar li a'),
       targets = nav.map(function () {
         return $(this).attr('href');