code: function (trans, val) {
  		var key,
  			tmpArr = {},
  			isArr = $.isArray(trans);
  		for (key in trans) {
  			if (isArr || trans.hasOwnProperty(key)) {
  				tmpArr[trans[key]] = val || key;
  			}
  		}
  		return tmpArr;
  	}
docs: Flip key and value of array or object
  
  @param  Array | Object  { a: 1, b: 1, c: 2 }
  @param  Mixed           Static value
  @return Object          { 1: "b", 2: "c" }