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:     },
      beforeSend: function () {
      },
  
      success: function (data) {
        var updates = {};
  
        $.each(data.grouped.block_child_type.groups, function (x, y) {
        var block_child_type = y.groupValue;
        var rel_count = y.doclist.numFound;
        updates[block_child_type] = rel_count;
        });
  
        count = updates;
        $(".relatedCountContainer").each(function(){
            $(this).html(count["related_<%= Feature.uid_prefix %>"]);
        });
      }
    });
  <% end %>
  <%= javascript_on_load do %>
    //Code for Summary
    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'
    }).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
      }
    });
  <% end %>
  
negative.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>
            <div class='tab-content-loading' style="display:none">Loading...</div>
            <div class="collapsible_btns_container" style="display:none" >
              <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>
          <div class="subjects-in-subjects kmaps-list-columns related-features has-ajax-pagination has-hash-feature-links"> </div> <!-- END  subjects-in-subjects -->
          <div class="collapsible_btns_container" style="display:none">
            <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>
          <br />
          </div> <!-- END panel-body -->
        </section> <!-- END panel -->
  