/* Js for , Version=1795163138 */
 var config={"webRoot":"\/","cookieLife":30,"cookiePath":"\/","requestType":"PATH_INFO","requestFix":"-","moduleVar":"m","methodVar":"f","viewVar":"t","defaultView":"html","themeRoot":"\/theme\/","currentModule":"message","currentMethod":"index","clientLang":"en","requiredFields":"","save":"Save","router":"\/index.php","runMode":"front","langCode":""}
;if(typeof(v) != "object") v = {};v.theme = {"template":"default","theme":"wide","device":"desktop"};;v.lang = {"confirmDelete":"Do you want to delete it?","deleteing":"Deleting","doing":"Doing","loading":"Loading","updating":"Updating","timeout":"Timeout. Please try it again.","errorThrown":"<h4> Error <\/h4>","continueShopping":"Continue shopping","required":"Required","back":"Back","continue":"Continue","bindWechatTip":"Posting sets the limit for binding WeChat. Please bind WeChat user first.","importTip":"Old layout data will be replaced","fullImportTip":"Old article, product, layout data will be replaced and import test data"};;v.showDetail = "Show all";;v.hideDetail = "Hide";;$(document).ready(function()
{
    $('.nav-system-message').addClass('active');
    $.setAjaxForm('#commentForm', function(response)
    {
        if(response.result == 'success')
        {
            setTimeout(function(){location.reload();}, 3000);   
        }
        else
        {
            if(response.reason == 'needChecking')
            {
                $('#captchaBox').html(Base64.decode(response.captcha)).show();
            }
            else
            {
                bootbox.alert(response.info);
            }
        }
    });

    /* Process contents. */
    $('.content-detail').each(function()
    {
        var obj = $(this);
        if(obj.height() > 100)
        {
            var buttons = "<a href='javascript:void(0)' onclick='showDetail(this)' class='showDetail'> ... " + v.showDetail + "</a>";
            buttons    += "<a href='javascript:void(0)' onclick='hideDetail(this)' class='hideDetail'> " + v.hideDetail + "</a>";
            obj.parent().append(buttons);
            obj.parent().find('.hideDetail').hide();
            obj.addClass('content-abstract');
        }
    });
});

function showDetail(obj)
{
    var tdContent = $(obj).parents('.td-content');
    tdContent.find('.content-detail').removeClass('content-abstract');
    tdContent.find('.showDetail').hide();
    tdContent.find('.hideDetail').show();
}

function hideDetail(obj)
{
    var tdContent = $(obj).parents('.td-content');
    tdContent.find('.content-detail').addClass('content-abstract');
    tdContent.find('.showDetail').show();
    tdContent.find('.hideDetail').hide();
}
var url = config.webRoot+'file.php?f=source/default/wide/';
var url_s = '.jpg&t=jpg&o=source&s=&v=1648134235';
if(v.categoryID == '7' ){
    var image = url + '15' + url_s;
    var alt = 'News';
    printPic(image,alt);
}else if( v.categoryID == '8'){
    var image = url + '9' + url_s;
    var alt = 'Cases';
    printPic(image,alt);
}else if( v.categoryID == '1'){
    var image = url + '18' + url_s;
    var alt = 'Beeswax';
    printPic(image,alt);
}else if(config.currentModule == 'message' && config.currentMethod == 'index'){
    var image = url +'/beekeeping.cn-contact-banner-2560x200.jpg&t=jpg&o=source&s=&v=1795162936';
    var alt = '在线询价';
    printPic(image,alt);
}else if(config.currentModule == 'company' && config.currentMethod == 'index'){
    var image = url + '12' + url_s;
    var alt = 'About Us';
    printPic(image,alt);
}

function printPic(img,alt){
    var html ='';
    html += "<div class='Beehive_Category'>";
    html += "<img src='"+image+"' alt='"+alt+"'>";
    html += "</div>";
    if(config.currentModule == 'blog'){
        $('#blogNav').after(html);
    }else{
        $('.page-wrapper').before(html);
    }
}(function () {
  var nav = document.querySelector('.col-md-3.col-side .nav');
  if (nav) {
    nav.remove();            // 连 .nav 一起删掉
    // nav.innerHTML = '';          // 或只清空里面溢出的长文案
  }
})();
;
var hash = window.location.hash.substring(1);
var browserLanguage = navigator.language || navigator.userLanguage; 
var resolution      = screen.availWidth + ' X ' + screen.availHeight;
$.get(createLink('log', 'record', "hash=" + hash), {browserLanguage:browserLanguage, resolution:resolution});
