$(function(){
    var url = window.location.href;
    $("#login-link").click(function() {
        // the login template is static html so we define came_from
        // here as there is no TAL available
        $('#came-from-input').val(url);
        $("#login-popup").slideToggle();
        return false;
    });
});
