anchor.diff:    padding-right: 5px;
     color: #cc4c39 !important;
   }
  +#relation_details .tab-content-loading{
  +  position:relative;
  +  top:0;
  +  right:0;
  +  background-image: none;
  +}
  +li.collapsible_list_header::before{
  +  display: none !important;
  +}
   </style>
  -<%= javascript_include_tag('collapsible_list/CollapsibleLists') %>
  +<%= javascript_include_tag('collapsible_list/jquery.collapsibleList') %>
  
positive.code:           <p>
            <strong><%= feature_label %></strong> has <strong class="relatedCountContainer"><%#= relation_counts %></strong> other subjects directly related to it, which are presented here. See the relationships tab if you instead prefer to browse  all subordinate and superordinate categories for <%= feature_label %>.
            </p>
            <h5> <span class="collapsible_all_btn collapsible_expand_all">Expand all</span> / <span class="collapsible_all_btn collapsible_collapse_all">Collapse all</span> </h5>
          <div class="subjects-in-subjects kmaps-list-columns related-features has-ajax-pagination has-hash-feature-links">
          </div> <!-- END  subjects-in-subjects -->
          <br />
            <h5> <span class="collapsible_all_btn collapsible_expand_all">Expand all</span> / <span class="collapsible_all_btn collapsible_collapse_all">Collapse all</span> </h5>
          <br />
          </div> <!-- END panel-body -->
        </section> <!-- END panel -->
  
negative.code:   </div> <!-- Tab Content -->
  </div> <!-- myTabs end -->
  
  <%= javascript_include_tag 'kmaps_engine/kmaps_fancytree' %>
  <%= javascript_on_load do %>
    var summaryLoaded = false;
    var collapsibleApplied = false;
    var popupsSet = false;
    var columnizedApplied = false;
    $('#summary-tab-link[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    //Code for Summary
    if(!summaryLoaded){
      var termIndex = "<%= Feature.config.url %>";
      var assetIndex = "<%= Flare.config.asset_url %>";
      var domain = "<%= Feature.uid_prefix %>";
      var perspective = "<%= current_perspective.code %>";
      var SOLR_ROW_LIMIT = 200;
      var count = 0;
      var featureId =  "<%= Feature.uid_prefix %>-<%= @feature.fid %>";
      var featuresPath = "<%= features_path %>/%%ID%%";
      var fieldList = [
        "header",
        "id",
        "ancestor*",
        "caption_eng",
        "related_"+domain+"_feature_type_s",
        "related_"+domain+"_relation_label_s"
      ].join(",");
      if(domain == "places"){
        fieldList += ",related_subjects_t";
      }
      var url = termIndex + "/select?" +
      "&q=" + "{!child of=block_type:parent}id:" + featureId +
      "&fl=*,uid,related_"+domain+"_id_s,related_"+domain+"_header_s" +","+ fieldList +
      "&rows=" + SOLR_ROW_LIMIT +
      "&indent=true" +
      "&wt=json" +
      "&json.wrf=?" +
      "&sort=related_"+domain+"_header_s+asc";
      $.ajax({
        url: url,
        dataType: 'jsonp',
        jsonp: 'json.wrf',
        beforeSend: function(){
          $("#relation_details .tab-content-loading").show();
        }
      }).done(function(data){
        const response = data.response;
        if(response.numFound > 0){
          const result = response.docs.reduce(function(acc,currentNode,index){
            let node_type = currentNode["related_kmaps_node_type"] ;
            if(node_type === undefined) {
              node_type = "other";
            }
            if(acc[node_type] === undefined){
              acc[node_type] =  [];
            }
            let relation_label = currentNode["related_"+ domain +"_relation_label_s"];
            if(acc[node_type][relation_label] === undefined){
              acc[node_type][relation_label] = [];
            }
            let node_id = currentNode['related_'+domain+'_id_s'];
            acc[node_type][relation_label][node_id] = currentNode;
            return acc;
          }, []);
          var feature_name = $('<%= feature_label %>')[0];
          function addSummaryItems(group_key,data,container){
            for(var key in data[group_key]){ //parent,child, other
              var feature_block = jQuery('<div></div>').addClass('feature-block');
              var header = jQuery('<h6></h6>').append(jQuery('<span class="glyphicon"></span> '));
              header.append(feature_name.innerText +" "+ key);
              var relation_subject_list = jQuery('<ul style="list-stype:none;" class="collapsibleList"></ul>');
              var relation_subject_item = jQuery('<li class="collapsible_list_header"></li>');
              relation_subject_item.append(header);
              var related_subject_list = jQuery('<ul></ul>');
              var feature_count = 0;
              var sortedFeatures = data[group_key][key];
              for(var related_subject_index in sortedFeatures){
                var relation = jQuery('<li></li>');
                  var currNode = sortedFeatures[related_subject_index];
                  var currNodeID = currNode["related_"+domain+"_id_s"].replace(domain+"-","");
                  relation.append("<a href="+featuresPath.replace("%%ID%%",currNodeID)+">"+currNode["related_"+domain+"_header_s"]+"</a>");
                  var pop_container = jQuery('<span class="popover-kmaps" data-id="'+domain+'-'+currNodeID+'"><span class="popover-kmaps-tip"></span><span class="icon shanticon-menu3"></span></span>');
                  relation.append(jQuery(pop_container));
                  related_subject_list.append(relation);
                  feature_count++;
              }
              relation_subject_item.append(related_subject_list);
              relation_subject_list.append(relation_subject_item);
              feature_block.append(relation_subject_list);
              container.append(feature_block);
            }
          }
          function featureSort(features){
            var featuresArr = [];
            for(var key in features){
                var index = 0;
                while(index < featuresArr.length){
                  var curr_feature = featuresArr[index];
                  if(features[key]["related_"+domain+"_header_s"] < curr_feature["related_"+domain+"_header_s"] )
                    break;
                  index++;
                }
                featuresArr.splice(index,0,features[key]);
            }
            return featuresArr;
          }
          addSummaryItems('parent',result,jQuery('.'+domain+'-in-'+domain));
          addSummaryItems('child',result,jQuery('.'+domain+'-in-'+domain));
          //addSummaryItems('other',result,jQuery('.'+domain+'-in-'+domain));
        } else {
         //Empty result set
        }
        // Functionality for columnizer
        // dontsplit = don't break these headers
        $('.subjects-in-subjects').find('.column > h6, .column > ul > li, .column ul').addClass("dontsplit");
        // dontend = don't end column with headers
        $('.subjects-in-subject').find('.column > h6, .column > ul > li').addClass("dontend");
        $('.subjects-in-subjects').find('.feature-block').addClass("dontsplit");
        $('.kmaps-list-columns:not(.places-in-subjects):not(.already_columnized)').addClass('already_columnized').columnize({
          width: 330,
          lastNeverTallest : true,
          buildOnce: true
          });
        if(!collapsibleApplied){
          $('.collapsibleList').kmapsCollapsibleList();
          collapsibleApplied = true;
        }
        if(!popupsSet){
          jQuery('#relation_details .popover-kmaps').kmapsPopup({
            termIndex: "<%= Feature.config.url %>",
            assetIndex: "<%= Flare.config.asset_url %>",
            domain: "<%= Feature.uid_prefix %>",
            perspective: "<%= current_perspective.code %>",
            featureId:  "",
            featuresPath: "<%= features_path %>/%%ID%%"
          });
          popupsSet = true;
         }
          $("#relation_details .tab-content-loading").hide();
          $("#relation_details .collapsible_btns_container").show();
          summaryLoaded = true;
      });
     }
    });
    // END - Functionality for columnizer
    $(".collapsible_expand_all").on("click",function(e){
  