title: IndexOf Internet Explorer to InArray, length fail
body: <p>I got the following error, Unable to get property 'slice'.
  The problem occurs when I changed the code to make it compatible with IE.</p>
  
  <pre><code>            function change_hash(hash) {
                  hash = hash.replace(/^.term/, 'category');
                  window.location.href = '#' + hash;
  
                  $('.pagination a').each(function () {
  
                      var item = $(this),
                          href = item.attr('href'),
                          //end_slice = href.indexOf('#') == -1 ? href.length : href.indexOf('#');
                          end_slice = $.inArray(href, '#') == -1 ? $('href').length : $.inArray(href, '#');
  
                      href = href.slice(0, end_slice); // PROBLEM OCCURS HERE
                      item.attr({ 'href': href + '#' + hash })
                  })
              }
  </code></pre>