/*全局自适应高度*/
function autoFlashHeight(){
    var headerHeight = $(".header").height();
    var toolsBar = $(".tools-bar").height();
    var second_header = $(".second_header").height();
    $(".content").height($(window).height()-headerHeight-second_header);
    $(".main-side").height($(window).height()-headerHeight-2);
    $(".main-content").height($(window).height()-headerHeight-2);
    $(".main-data").height($(window).height()-headerHeight-toolsBar-16);
    $(".edit-spread").height($(window).height()-headerHeight-toolsBar-second_header-17);
};
$(window).resize(autoFlashHeight);
/*全局自适应高度结束*/
$(function(){
/*侧滑*/
$(".open-sidebar").click(function(){
    $(".slide-sidebar").animate({width:"800"}).addClass("open");
});
$("body").click(function(event){
        var e = event || window.event; //浏览器兼容性
        if(!$(event.target).is('a')) {
            var elem = event.target || e.srcElement;
            while (elem) { //循环判断至跟节点，防止点击的是div子元素
                if (elem.className == "open-sidebar" || elem.className == 'slide-sidebar open') {
                    return false;
                }
                elem = elem.parentNode;
            }
            $(".slide-sidebar").animate({width:"0"}).removeClass("open")// 关闭处理
        }

    });
/*侧滑*/
/*工具提示*/
$('*[data-toggle=tooltip]').mouseover(function() {
 $(this).tooltip('show');
  });
/*工具提示*/
});
