title: "undefined" when changing URL
body: <p>I wrote this code, but I am not sure why I get "undefined".
  I get(after clicking the link) "<a href="http://magiccards.info/query?q=" rel="nofollow">http://magiccards.info/query?q=</a><strong>undefined</strong>air elemental", but it should be "<a href="http://magiccards.info/query?q=air" rel="nofollow">http://magiccards.info/query?q=air</a> elemental", so without the word "undefined" and I tried replacing the "undefined" in the string but it did not help.</p>
  
  <pre><code>$(".englishMtg").click(function () {
      var currentHref = $(this).attr("href");
      if (currentHref.indexOf("http") == -1) {
          var changedLink = currentHref.replace("/TestPictures/").replace(".jpg");
          // # /TestPictures/air elemental , luftelementar.jpg
          var englishSearchString = "http://magiccards.info/query?q=" + changedLink.split(',')[0];
          $(this).attr("href", englishSearchString);
          alert($(this).attr("href"));
      }
  
      });
  </code></pre>
  
  <p>Need some help ....</p>