title: Replace local characters and compare it to a variable
body: <p>I want to show all <code>.item</code> which first letter is equal to a variable.  </p>
  
  <p>Problem - if the first letter is a local character and I'm trying to replace them - <code>č-ć-đ-š-ž</code> replace with <code>c-c-d-s-z</code> respectively.  </p>
  
  <p>I'm expecting item <code>Ćao</code> (for example) becomes visible after this code but it doesn't work. </p>
  
  <pre><code>var a = 'c';
  $('.item').each(function(){
      var b = $(this).text().charAt(0);
      var mapObj = {č:"c", ć:"c", đ:"d", š:"s", ž:"z"};
      b = b.replace(/č|ć|đ|š|ž/i, function(matched){
          return mapObj[matched];
      });
      if (b == a) {$(this).show();}
  });
  </code></pre>