/**
 /**
 * @version    CMS V8
 * @copyright  Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later.
 * @Author:    lyf78062919@gmail.com
 */

//浏览器检查
function checkBrowser(){
    var ua = navigator.userAgent.toLowerCase(), sys = null, s;
    (s = ua.match(/rv:([\d.]+)\) like gecko/)) ? sys = {type:'ie',version:s[1]} :
        (s = ua.match(/msie ([\d.]+)/)) ? sys = {type:'ie',version:s[1]}:
            (s = ua.match(/firefox\/([\d.]+)/)) ? sys = {type:'firefox',version:s[1]} :
                (s = ua.match(/chrome\/([\d.]+)/)) ? sys = {type:'chrome',version:s[1]} :
                    (s = ua.match(/opera.([\d.]+)/)) ? sys = {type:'opera',version:s[1]} :
                        (s = ua.match(/version\/([\d.]+).*safari/)) ? sys = {type:'safari',version:s[1]} : 0;
    sys.isMobile = !!ua.match(/AppleWebKit.*Mobile.*/) || !!ua.match(/(iPhone|iPod|Android|ios|iPad)/i);
    return sys;
}


//解决IE没有调试工具问题
if ( !window.console ){
    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
    window.console = {};
    for (var i = 0; i < names.length; ++i)
        window.console[names[i]] = function() {}
}

//刷新函数
function refresh(){

  location.href = location.href;

}

//监测方法存在否
function function_exists(fname,object){

    object = !object||typeof object!=='object'?window:object;

    return typeof object[fname] === 'function';
}



//后台界面UI参数
var AdminLTEOptions = {
    //Add slimscroll to navbar menus
    //This requires you to load the slimscroll plugin
    //in every page before app.js
    navbarMenuSlimscroll: false,
    navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar
    navbarMenuHeight: "200px", //The height of the inner menu
    //General animation speed for JS animated elements such as box collapse/expand and
    //sidebar treeview slide up/down. This options accepts an integer as milliseconds,
    //'fast', 'normal', or 'slow'
    animationSpeed: 'fast',
    //Sidebar push menu toggle button selector
    sidebarToggleSelector: "[data-toggle='offcanvas']",
    //Activate sidebar push menu
    sidebarPushMenu: true,
    //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)
    sidebarSlimScroll: false,
    //Enable sidebar expand on hover effect for sidebar mini
    //This option is forced to true if both the fixed layout and sidebar mini
    //are used together
    sidebarExpandOnHover: false,
    //BoxRefresh Plugin
    enableBoxRefresh: false,
    //Bootstrap.js tooltip
    enableBSToppltip: false,
    BSTooltipSelector: "[data-toggle='tooltip']",
    //Enable Fast Click. Fastclick.js creates a more
    //native touch experience with touch devices. If you
    //choose to enable the plugin, make sure you load the script
    //before AdminLTE's app.js
    enableFastclick: true,
    //Control Sidebar Options
    enableControlSidebar: true,
    controlSidebarOptions: {
    //Which button should trigger the open/close event
    toggleBtnSelector: "[data-toggle='control-sidebar']",
    //The sidebar selector
    selector: ".control-sidebar",
    //Enable slide over content
    slide: false
    },
//Box Widget Plugin. Enable this plugin
//to allow boxes to be collapsed and/or removed
enableBoxWidget: false,
//Box Widget plugin options
boxWidgetOptions: {
    boxWidgetIcons: {
    //Collapse icon
    collapse: 'fa-minus',
    //Open icon
    open: 'fa-plus',
    //Remove icon
    remove: 'fa-times'
    },
boxWidgetSelectors: {
    //Remove button selector
    remove: '[data-widget="remove"]',
    //Collapse button selector
    collapse: '[data-widget="collapse"]'
    }
},
//Direct Chat plugin options
directChat: {
    //Enable direct chat by default
    enable: false,
    //The button to open and close the chat contacts pane
    contactToggleSelector: '[data-widget="chat-pane-toggle"]'
    },
//Define the set of colors to use globally around the website
colors: {
    lightBlue: "#3c8dbc",
    red: "#f56954",
    green: "#00a65a",
    aqua: "#00c0ef",
    yellow: "#f39c12",
    blue: "#0073b7",
    navy: "#001F3F",
    teal: "#39CCCC",
    olive: "#3D9970",
    lime: "#01FF70",
    orange: "#FF851B",
    fuchsia: "#F012BE",
    purple: "#8E24AA",
    maroon: "#D81B60",
    black: "#222222",
    gray: "#d2d6de"
    },
//The standard screen sizes that bootstrap uses.
//If you change these in the variables.less file, change
//them here too.
screenSizes: {
    xs: 480,
    sm: 768,
    md: 992,
    lg: 1200
    }
};
