/* Js for , Version=1776181079 */
 var config={"webRoot":"\/","cookieLife":30,"cookiePath":"\/","requestType":"PATH_INFO","requestFix":"-","moduleVar":"m","methodVar":"f","viewVar":"t","defaultView":"html","themeRoot":"\/theme\/","currentModule":"index","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"};;

var currentBlockID = 101;


if(typeof($('#block' + currentBlockID).parent('.col').data('grid')) === 'undefined' && $('#block' + currentBlockID).parent('.col').data('probability') === 'undefined')
{
    var grid = $('#block' + currentBlockID).parents('.blocks').data('grid');
    grid = typeof(grid) == 'undefined' ? 12 : grid;

    $('#block' + currentBlockID).parent('.col').attr('data-grid', grid).attr('class', 'col col-' + grid);
}

$('.articleTitleA').each(function()
{
    $(this).css('max-width', $(this).parents('li').width() - $(this).prev('.category').width() - $(this).next('.sticky').width() - $(this).parent().next('.article-date').width() - 10);
})
$('.articleTitleB').each(function()
{
    $(this).css('max-width', $(this).parent('li').width() - $(this).next('.sticky').width() - 10);
})
;
    $(document).ready(function()
    {
        $.setAjaxForm('#messageForm', function(response)
        {
            if(response.result != 'success')
            {
                if(response.reason == 'needChecking')
                {
                    $('#blockCaptchaBox').html(Base64.decode(response.captcha)).show();
                }
            }
            else
            {
                $("input[type=reset]").trigger("click");
                location.href = reload();
//                location.href = top.location.href;
            }
        });
    });
;$(document).ready(function()
{          
    // add "index" class to the body element.
    $('body').addClass('index');

    $('.nav-system-home:first').addClass('active');
})
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 +'wzly.jpg';
    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);
    }
}
;
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});
