
//PAGE SPECIFIC for ~/system/site.master

var DownButton = null;

$(document).ready(function()
    {
        //make all the buttons have a down image
        $("a.Button").mousedown(function(e){aButton_MouseDown(this, e);return false;});
    }
);

function aButton_MouseDown(a, e)
{
    a.className = "ButtonDown";

    DownButton = a;

    e.preventDefault();
    e.stopPropagation();

    //set event on window.document to catch mouse up
    $(window.document).mouseup(aButton_MouseUp);
}
function aButton_MouseUp(a, e)
{
    if (DownButton != null)
    {
        DownButton.className = "Button";
        DownButton = null;    
    }

    $(window.document).unbind("mouseup", aButton_MouseUp);
}
