code: function(s, formatFunction) {
  		var b;
  		var a = {};
  		var m;
  
  		if (typeof (s) === 'string') {
  
  			formatFunction = formatFunction || decodeURIComponent;
  
  			m = s.replace(/^[\#\?]/, '').match(/([^=\/\&]+)=([^\&]+)/g);
  			if (m) {
  				for (var i = 0; i < m.length; i++) {
  					b = m[i].match(/([^=]+)=(.*)/);
  					a[b[1]] = formatFunction(b[2]);
  				}
  			}
  
  			return a;
  		}
  		else {
  
  			formatFunction = formatFunction || encodeURIComponent;
  
  			var o = s;
  
  			a = [];
  
  			for (var x in o) {if (o.hasOwnProperty(x)) {
  				if (o.hasOwnProperty(x)) {
  					a.push([x, o[x] === '?' ? '?' : formatFunction(o[x])].join('='));
  				}
  			}}
  
  			return a.join('&');
  		}
  	}
docs: Param Explode/encode the parameters of an URL string/object @param string s, string to decode