+function blink(c) {
+ var $c = $(c);
+
+ $c.fadeOut("slow").queue(function(next) {
+ this.style.color = "red";
+ next();
+ }).fadeIn("fast").fadeOut("fast").queue(function(next) {
+ this.style.color = "";
+ next();
+ }).fadeIn("slow");
+}
+
+function hashchange() {
+ if (location.hash.length > 1) {
+ var hash = location.hash.substring(1);
+ var name = is_variable(hash) ? ".var" : ".constant";
+ var scrolled = false;
+
+ $(name).each(hash.substring(hash.length-1) === "_" ? function(i, c) {
+ if (c.textContent.substring(0, hash.length) === hash) {
+ if (!scrolled) {
+ $(window).scrollTop($(c).offset().top - 100);
+ scrolled = true;
+ }
+ blink(c);
+ }
+ } : function(i, c) {
+ if (c.textContent === hash) {
+ $(window).scrollTop($(c).offset().top - 100);
+ blink(c);
+ return false;
+ }
+ });
+ }
+}
+
+$(function() {