Object.extend(String.prototype, (function() {
  function toQueryParamsToLowerKeys(separator){
    new_string=this.replace(/\&amp\;/gi,'&');
    new_string.split('&').inject({},function(hash,pair){new_string+=pair.split('=')[0].toLowerCase()+'='+pair.split('=')[1]+'&'})
    return new_string.toQueryParams(separator);
  }
  
  return {
    toQueryParamsToLowerKeys:  toQueryParamsToLowerKeys
  };  
})());

Array.prototype.shuffle = function() {
  return this.sortBy(Math.random);
};
