Index: fathom.js
===================================================================
--- fathom.js	(Revision 151)
+++ fathom.js	(Arbeitskopie)
@@ -180,7 +180,28 @@
 
 		_setupEvents: function() {
 			var self = this;
-			
+			window.onhashchange = function() {
+                if(location.hash.length < 2)
+                    return;
+                var stripped = location.hash.substr(1);
+                if(stripped.search(/^\d+$/) != -1) {
+                    self.gotoSlide($(self.$slides[parseInt(stripped)-1]));
+                    return;
+                }
+
+                var targetEl = $("a[name="+stripped+"]").add("#"+stripped).get(0);
+                while(targetEl)
+                {
+                    if($(targetEl).hasClass("slide"))
+                    {
+                        var slideNo = parseInt($(targetEl).attr('id'))-1;
+                        self.gotoSlide($(self.$slides[slideNo]));
+                        return;
+                    }
+                    targetEl = targetEl.parentNode;
+                }
+
+            };
 			$document.keydown(function(event) {
 				var key = event.which;
 				
