Mod_rewrite pick up variables

Mod_rewrite pick up variables

I want to crate nicer url´s on my Jquery Mobile page.

Now I have Ex. store.html?supplier=apple&product=laptops

My code to capture the variables.
  1. var supplier = getUrlVars()["supplier"];
  2. var product = getUrlVars()["product"];

  3. function getUrlVars() {
  4.     var vars = [], hash;
  5.     var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
  6.     for(var i = 0; i < hashes.length; i++)
  7.     {
  8.         hash = hashes[i].split('=');
  9.         vars.push(hash[0]);
  10.         vars[hash[0]] = hash[1];
  11.     }
  12.     return vars;
  13. }

But now I want to create a little nicer urls.
apple/laptops

But how will I manage to capture the variables, apple and laptops in my javascript?

Many thanks in advance!