function defaults(obj) {
   $.each(obj, function(el) {
      if (isDefined(el)) {
        if (window[el] == null) {window[el] = obj[el]} 
      } else {
         window[el] = obj[el];
      }
   });
}

function isDefined(obj) {
    return (typeof(window[obj]) != "undefined");
}
