var userThemes = {
  
  applyJS: function(nid) {
    
    //try {
      if (Drupal.settings.user_themes[nid]) {
        // Remove previously applied styles from head. (if any)
        $('link[title=user_theme_stylesheet]').each(function(i) {
          $(this).remove();
        });
        // Add new styles to head.
        $('head').append('<link href="'+Drupal.settings.user_themes[nid]+'" media="all" rel="stylesheet" type="text/css" title="user_theme_stylesheet">');
      }
    //} catch (err) {
      //console.log('Drupal.settings.user_themes error.');
    //}
    
  }
  
}

/*$(document).ready(function() {
  for (var prop in Drupal.settings.user_themes) {
    console.log(prop+':'+Drupal.settings.user_themes[prop]);
  }
});*/