How can I make functions available to other javascript files?
<p>I have the following code:</p>

<p>$(document).ready(function () {</p>

<pre><code>function loginLinkClick(e) {
    e.preventDefault();
    $('#loginLink').unbind('click', loginLinkClick);
    dialog(this);
}
function registerLinkClick(e) {
    e.preventDefault();
    $('#registerLink').unbind('click', registerLinkClick);
    dialog(this);
}

$('#loginLink')
    .bind('click', loginLinkClick);
$('#registerLink')
    .bind('click', registerLinkClick);
$('#logoutLink')
    .click(function (e) {
        window.location = $(this).attr('data-href')
    });
</code></pre>

<p>});</p>

<p>I want to have my loginLinkClick and registerLinkClick functions available to other javascript files. Is there a way that I can do this? I'm using jQuery so should I put them into the jQuery namespace or something like that?</p>

<p>One more question. From a performance point of view or for maintainability should I have functions like these outside of the $(document)</p>
