Simple jQuery syntax help, don't know where I've gone wrong
<p>I'm having trouble with a jQuery code at the moment, I know WHERE the problem lies, but I don't know what the problem is exactly. Probably very basic, but I'm new to this.</p>

<p>You can see a (non)working fiddle here: <a href="http://www.jsfiddle.net/CvZeQ/" rel="nofollow">http://www.jsfiddle.net/CvZeQ/</a></p>

<p>Basically I want to set different .click function based on whatever is selected (I have 5 image maps, each with a different #mapname, and want each to pertain to a different variable (answer1, answer2, answer3...) so as to store the selected 'answer' for each map.)</p>

<p>Here is the code I'm using for one of the maps:</p>

<pre><code>  $(window).load(function(){
        //Get cookies when page loaded
        var useranswers=$.cookie('survery');
        useranswers= JSON.parse (useranswers);

        // do something with previous answers


        //#shape functions
        $('#shape area').hover(
            function(e){
                $('#'+ this.alt).addClass('hover');
            },
            function(e){
                $('#'+ this.alt).removeClass('hover');
            }
        ).click(
            function(e){
                $('img.selected-region').removeClass('selected-region');
            },
            function(e){
                $('#'+ this.alt).addClass('selected-region');
            },

            function(e){    
                var answer1 = $(this).attr("class");
            });

    });
</code></pre>

<p>I know the problem lies somewhere with the .click function, but I'm not entirely sure what I've done wrong. Any help would be greatly appreciated.</p>
