/*!
 * Adapted from Bootstrap docs JavaScript
 */


!function ($) {

  $(function () {
      
		orderTheLeftNavigations();

    function orderTheLeftNavigations(){
	    $('#navigation .sidenav').html($("#markdown-toc").html());
	    $('#navigation .sidenav ul').addClass("nav");
	    $("#markdown-toc").remove();

      // 添加Bootstrap表格样式 table-hover 
      $(".docs-content table").addClass("table table-hover");
  	}

  	$(window).load(initilizeAfterLoad);

    function initilizeAfterLoad(){
      repairTheImagesWhichCrossTheMaxWidth();
      resetHeadersStyles();
    }

    // 重新计算图片显示大小。
  	function repairTheImagesWhichCrossTheMaxWidth(){
  		var images = $(".docs-content img");
  		if(images != undefined && images.length > 0){
  			for(var i=0; i< images.length;i++){
  				var imgWidth = images[i].width;
  				if( imgWidth >= 757 ){
  					 images[i].width = 757;
  				}
  			}
  		}
  	}

    // 设置标题样式
    function resetHeadersStyles(){
      // resetHeaderItemStyles($(".docs-content h1"));
      // resetHeaderItemStyles($(".docs-content h2"));
    }

    function resetHeaderItemStyles(headers){
      if(headers != undefined && headers.length > 0){
        for(var i=0; i< headers.length;i++){
          
          var header = headers[i];
          $(header).html($(header).html() + '<span class="anchor-target" id="' + header.id + '"></span>' +
            '<a href="#' + header.id + '" name="' + header.id + '" class="anchor glyphicon glyphicon-link"></a>');
          $(header).removeAttr('id');
        }
      }
    }
  })

}(jQuery)

@@ -538,36 +538,8 @@
 ();%0A
-      resetHeadersStyles();%0A
     
@@ -871,649 +871,8 @@
   %09%7D
-%0A%0A    // %E8%AE%BE%E7%BD%AE%E6%A0%87%E9%A2%98%E6%A0%B7%E5%BC%8F%0A    function resetHeadersStyles()%7B%0A      // resetHeaderItemStyles($(%22.docs-content h1%22));%0A      // resetHeaderItemStyles($(%22.docs-content h2%22));%0A    %7D%0A%0A    function resetHeaderItemStyles(headers)%7B%0A      if(headers != undefined && headers.length %3E 0)%7B%0A        for(var i=0; i%3C headers.length;i++)%7B%0A          %0A          var header = headers%5Bi%5D;%0A          $(header).html($(header).html() + '%3Cspan class=%22anchor-target%22 id=%22' + header.id + '%22%3E%3C/span%3E' +%0A            '%3Ca href=%22#' + header.id + '%22 name=%22' + header.id + '%22 class=%22anchor glyphicon glyphicon-link%22%3E%3C/a%3E');%0A          $(header).removeAttr('id');%0A        %7D%0A      %7D%0A    %7D
 %0A  %7D

remove no-used js function