﻿/*
custom.js
Special javascript for IM site.
*/

$(function () {
    if (typeof (init) == "function")
        init();

    // last-child for footer le sigh :(
    $('#footer-left span:last-child').css('border', 'none');
});

// From http://stackoverflow.com/questions/1930927/how-can-i-detect-an-address-bar-change-with-javascript
function initAddressListener(proc) {
    if (!$.isFunction(proc))
        return false;

    window.location.changed = function (e) { };

    var __loc = window.location.href;
    setInterval(function () {
        if (__loc != window.location.href) {
            __loc = window.location.href;
            window.location.changed(__loc);
        }
    }, 50);

    window.location.changed = function (e) {
        proc(window.location.hash);
    }

    return true;
}

// EOF

