title: this.call is not a function
body: <p>For the life of me, I can't see what I'm missing.  I had hard-coded the value for selectedIcon in the drawmenu function.  It was working perfectly until I changed it to a parameter.  I'm getting the following error:</p>
  
  <blockquote>
    <p>Error: this.call is not a function</p>
    
    <p>Source File:
    <a href="http://localhost:9090/tests/jquery-1.3.2.min.js" rel="nofollow noreferrer">http://localhost:9090/tests/jquery-1.3.2.min.js</a></p>
    
    <p>Line: 19</p>
  </blockquote>
  
  <p>The routine is drawing a menu, while dynamically adjusting spacing between images.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
  &lt;head&gt;
      &lt;meta name="generator" content="HTML Tidy for Windows (vers 14 February 2006), see www.w3.org" /&gt;
      &lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8" /&gt;
      &lt;title&gt;
          Test image overlay
      &lt;/title&gt;
      &lt;script type="text/javascript" src="jquery-1.3.2.min.js"&gt;
      &lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          //&lt;![CDATA[
  
          function drawmenu (selectedIcon) {
  
              var offset = 0;
              for (x in icons) {
                  // Add the gap at the top of the image
                  if (selectedIcon-1 == x) {
                      offset += icons[x].topBig;
                      $("#"+icons[x].divid).toggleClass("active");
                      $("#"+icons[x].imgid).toggleClass("rollit");
                  } else {
                      offset += icons[x].topSmall;
                  }
  
                  // Set the location of the image
                  $("#"+icons[x].divid).css("top",-offset);
  
                  // Add the gap at the bottom of the image
                  if (selectedIcon-1 == x) {
                      offset += icons[x].bottomBig;
                  } else {
                      offset += icons[x].bottomSmall;
                  }
                  $("#"+icons[x].imgid).attr("src",icons[x].image);
              }
          }
  
          var icons = [
              {
                  "divid"       : 'icon1', // Home
                  "imgid"       : 'imgicon1',
                  "image"       : 'home.png',
                  "topSmall"        : 5,
                  "topBig"          : 5,
                  "bottomSmall" : 5,
                  "bottomBig"   : 7
              },{
                  "divid"       : 'icon2', // Alert
                  "imgid"       : 'imgicon2',
                  "image"       : 'alert.png',
                  "topSmall"    : 7,
                  "topBig"      : 13,
                  "bottomSmall" : 0,
                  "bottomBig"   : 0
              },{
                  "divid"       : 'icon3', // Question
                  "imgid"       : 'imgicon3',
                  "image"       : 'question.png',
                  "topSmall"    : 4,
                  "topBig"      : 8,
                  "bottomSmall" : 5,
                  "bottomBig"   : 7
              },{
                  "divid"       : 'icon4', // Lightbulb
                  "imgid"       : 'imgicon4',
                  "image"       : 'lightbulb.png',
                  "topSmall"        : 3,
                  "topBig"          : 7,
                  "bottomSmall" : 5,
                  "bottomBig"   : 7
              },{
                  "divid"       : 'icon5', // Blog
                  "imgid"       : 'imgicon5',
                  "image"       : 'blog.png',
                  "topSmall"        : 3,
                  "topBig"          : 6,
                  "bottomSmall" : 1,
                  "bottomBig"   : 4
              },{
                  "divid"       : 'icon6', // Defect
                  "imgid"       : 'imgicon6',
                  "image"       : 'defect.png',
                  "topSmall"        : 7,
                  "topBig"          : 10,
                  "bottomSmall" : 0,
                  "bottomBig"   : 0
              }]
  
          $(document).ready(drawmenu(6));
          //]]&gt;
      &lt;/script&gt;
      &lt;style type="text/css"&gt;
          /*&lt;![CDATA[*/
          #iconstack {
              position: absolute;
              top:30px;left:100px;
          }
          .icondiv { z-index:1; position: relative;}
  
          .active { height:80px; }
  
          .rollit {
              height:50px;
          }
  
          .rollit:hover {
              background-image:url('highlight.png');
              background-color:red;
  
          }
  
          /*]]&gt;*/
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="iconstack"&gt;
      &lt;div id="icon1" class="icondiv"&gt;
          &lt;img id="imgicon1" class="rollit" src="" alt="" /&gt;
      &lt;/div&gt;
      &lt;div id="icon2" class="icondiv"&gt;
          &lt;img id="imgicon2" class="rollit" src="" alt="" /&gt;
      &lt;/div&gt;
      &lt;div id="icon3" class="icondiv"&gt;
          &lt;img id="imgicon3" class="rollit" src="" alt="" /&gt;
      &lt;/div&gt;
      &lt;div id="icon4" class="icondiv"&gt;
          &lt;img id="imgicon4" class="rollit" src="" alt="" /&gt;
      &lt;/div&gt;
      &lt;div id="icon5" class="icondiv"&gt;
          &lt;img id="imgicon5" class="rollit" src="" alt="" /&gt;
      &lt;/div&gt;
      &lt;div id="icon6" class="icondiv"&gt;
          &lt;img id="imgicon6" class="rollit" src="" alt="" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>