// nikf.org global js file
// version 1.2 - 20091002

// redirects users of the digg toolbar to the actual unframed page (1.1)
// code by faruk ates - http://icanhaz.com/deaddiggbar
if (top !== self && document.referrer.match(/digg\.com\/\w{1,8}/)) {
  top.location.replace(self.location.href);
}

// provides pretty urls in google analytics when you click on links that aren't pretty urls around the site (1.0)
window.onload = function () {
    document.getElementById("contact-link").onclick = function () {
        pageTracker._trackPageview('/contact');
    };
    document.getElementById("twitter-link").onclick = function () {
        pageTracker._trackPageview('/twitter');
    };
    document.getElementById("flickr-link").onclick = function () {
        pageTracker._trackPageview('/flickr');
    };
    document.getElementById("dopplr-link").onclick = function () {
        pageTracker._trackPageview('/dopplr');
    };
    document.getElementById("upcoming-link").onclick = function () {
        pageTracker._trackPageview('/upcoming');
    };
    document.getElementById("ember-link").onclick = function () {
        pageTracker._trackPageview('/ember');
    };
	document.getElementById("feed-link").onclick = function () {
        pageTracker._trackPageview('/rss');
    };
}