title: Error Message: Unable to get value of the property 'replace': object is null or undefined in IE9
body: <p>I have written some jQuery to take the alt description of an image then strip out spaces and replace &amp;'s with "and" and also replace "/" with "-'s". The below works fine in firefox and chrome but ie IE9 I am getting this:
  Error Message: Unable to get value of the property 'replace': object is null or undefined</p>
  
  <pre><code>$(".cruiseline").bind("click", function () {
      var altTag = $(this).children("img").attr("alt");
      var logosrc = altTag;
      var logosrc = logosrc.replace(/ /g, '').replace(/\//g, '-').replace("&amp;", "and").toLowerCase();
      $("#cloudfive").html("&lt;img src=\"/logos\/" + logosrc + ".jpg\" /&gt;");
  });
  </code></pre>
  
  <p>I realise that logosrc is seen as undefined, but it shouldn't be. Have I misused the .replace function?</p>
  
  <p>Cheers</p>