footer link to a page with hash changed content ready
You need to add your jquery to document.ready as well as click, that way when a user goes to the page it will load the proper tab for you.

Something like this:

jQuery(document).ready(
    function()
    {
        //bind click event
        jQuery("#tab1").click(show_tab);

        //handle document load
        show_tab();
    }
);

function show_tab()
{
    ...
}