why is this not working?

why is this not working?

I have a page with 4 anchors and I would like start a different animation at each anchor so I am trying to see what anchor is currently beign viewed and then start the animation but I'm not having any results. I'm using this plugin jquery.url.js to get anchor from the URL and I'm using jquery 1.3.1 (if that makes any difference). So far not even the alerts I want is showing. What am I doing wrong?

  1. $(document).ready(function(){

        var anchor = jQuery.url.attr('anchor');
       
        if(anchor == 'first') {
           
            alert("you are now at the first anchor");
            $("div.home").addClass('home-first');
        } else {
            alert("this is not the first anchor");
            $("div.home").hide();
        }
    });