/* Js for , Version=1775793369 */
 v.lang = {"confirmDelete":"\u60a8\u786e\u5b9a\u8981\u6267\u884c\u5220\u9664\u64cd\u4f5c\u5417\uff1f","deleteing":"\u5220\u9664\u4e2d","doing":"\u5904\u7406\u4e2d","loading":"\u52a0\u8f7d\u4e2d","updating":"\u66f4\u65b0\u4e2d...","timeout":"\u7f51\u7edc\u8d85\u65f6,\u8bf7\u91cd\u8bd5","errorThrown":"<h4>\u6267\u884c\u51fa\u9519\uff1a<\/h4>","continueShopping":"\u7ee7\u7eed\u8d2d\u7269","required":"\u5fc5\u586b","back":"\u8fd4\u56de","continue":"\u7ee7\u7eed","importTip":"\u53ea\u5bfc\u5165\u4e3b\u9898\u7684\u98ce\u683c\u548c\u6837\u5f0f","fullImportTip":"\u5c06\u4f1a\u5bfc\u5165\u6d4b\u8bd5\u6570\u636e\u4ee5\u53ca\u66ff\u6362\u7ad9\u70b9\u6587\u7ae0\u3001\u4ea7\u54c1\u7b49\u6570\u636e"};;var html = '<ol class="carousel-indicators">'+
    '<li data-slide-to="0" class="active"></li>'+
    '<li  data-slide-to="1"></li>'+
    '<li  data-slide-to="2"></li>'+
    '<li  data-slide-to="3"></li>'+
'</ol>';
$('#slide5-1').append(html);;v.articleTypeId = "block270";;

var currentBlockID = 270;

if(typeof($('#block' + currentBlockID).parent('.col').data('grid')) === '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);
})
;
$(function(){
    $('.articleTab .nav').find('li:first-child a').trigger('click');
});
$('.articleTab .nav a').click(function(){
    $('#' + v.articleTypeId + ' .items').hide();
    $('#' + v.articleTypeId + ' .ul-article').hide();
    $($(this).attr('href')).show();
});
;;(function ($, window, document, undefined) {
  var Whirlig = function (elem, options) {
    this.defaults = {curDisplay: 0, autoPlay: false, interval: 0};
    this.opts = $.extend({}, this.defaults, options);

    var self = this;
    this.$whirlig = elem;
    this.$aImg = this.$whirlig.find('img');

    this.imgLen = this.$aImg.length;
    this.curDisplay = this.opts.curDisplay;
    this.autoPlay = this.opts.autoPlay;
    this.viewWidth = $(window).width() / 2;
    this.b_switch = true;
    this.iNow = this.opts.curDisplay;
    this.timer = null;
    this.interval = this.opts.interval;
    // 生成小点点
    var htmlNav = "<ul>";
    for (var i = 0; i < this.imgLen; i++) {
      if(this.curDisplay == i){
        htmlNav += "<li class=on><a>"+ i +"</a></li>";
      }else {
        htmlNav += "<li><a>"+ i +"</a></li>";
      }
    }
    htmlNav += "</ul>";
    this.$whirlig.parent().append('<div id=bannerNav>'+ htmlNav +'</div>');
    this.$aNav = this.$whirlig.siblings('#bannerNav').find('ul li');
  };

  var outerWidth = parseInt($(window).width());
  var middleWidth = 1920;
  var _height = outerWidth >= middleWidth ? 250 : 250;
  var _slideHeight = outerWidth >= middleWidth ? 160 : 160;

  Whirlig.prototype = {
    play: function () {
      if (this.autoPlay) {
        if (this.iNow === this.imgLen - 1) {
          this.iNow = 0;
        } else {
          this.iNow ++;
        }

        this.movingNext(this.iNow);
      }
    },

    movingPrev: function (index) {
      this.curDisplay = index;

      this.initalWhirlig();
    },

    movingNext: function (index) {
      this.curDisplay = index;

      this.initalWhirlig();
    },

    initalWhirlig: function () {
      var self = this;
      var half_imgLen = Math.floor(this.imgLen / 2);
      var leftNum, rightNum;

      var k = 0;
      for (var i = 0; i < half_imgLen; i++) {
        leftNum = this.curDisplay - i - 1;
        if(k == 0){
          this.$aImg.eq(leftNum).css({
            transform: 'translateX('+(-120 * (i + 1))+'px) translateZ(-120px) rotateY(20deg)'
          }).animate({
            height: _slideHeight + 'px',
            marginTop: -_slideHeight/2 + 'px',
            opacity: '0.6'
          }, 500);
          this.$aImg.eq(leftNum).attr('onclick', null);

          rightNum = this.curDisplay + i + 1;
          if (rightNum > this.imgLen - 1) rightNum -= this.imgLen;
          this.$aImg.eq(rightNum).css({
            transform: 'translateX('+(120 * (i + 1))+'px) translateZ(-120px) rotateY(-20deg)'
          }).animate({
            height: _slideHeight + 'px',
            marginTop: -_slideHeight/2 + 'px',
            opacity: '0.6'
          }, 500);
          this.$aImg.eq(rightNum).attr('onclick', null);
          k++;
        }else {
          this.$aImg.eq(leftNum).css({
            transform: 'translateX(0px) translateZ(-1000px) rotateY(30deg)'
          });

          rightNum = this.curDisplay + i + 1;
          if (rightNum > this.imgLen - 1) rightNum -= this.imgLen;
          this.$aImg.eq(rightNum).css({
            transform: 'translateX(0px) translateZ(-1000px) rotateY(-30deg)'
          });
        }
        this.$aImg.removeClass('on');
        this.$aNav.removeClass('on');
      }

      var _href = 'location.href='+"'"+this.$aImg.eq(this.curDisplay).attr('data-url')+"'";
      this.$aImg.eq(this.curDisplay).css({
        transform: 'translateZ(0px)'
      }).animate({
        height: _height + 'px',
        marginTop: -_height/2 + 'px',
        opacity: '1',
      }, 500).addClass('on').attr('onclick', _href);
      this.$aNav.eq(this.curDisplay).addClass('on');

      this.$whirlig.on('webkitTransitionEnd', function () {
        self.b_switch = true;
      });
    },

    inital: function () {
      var self = this;

      this.initalWhirlig();

      this.$aImg.on('click', function (ev) {
        if (self.b_switch && !$(this).hasClass('on')) {
          self.iNow = $(this).index();
          self.b_switch = false;

          var direction = self.viewWidth < ev.clientX ? 'next' : 'prev';
          var index = $(this).index();

          if (direction === 'next') {
            self.movingNext(index);
          } else {
            self.movingPrev(index);
          }
        }
      }).hover(function () {
        clearInterval(self.timer);
      }, function () {
        self.timer = setInterval(function () {
          self.play();
        }, self.interval);
      });
      this.$aNav.on('click', function(ev){
        if (self.b_switch && !$(this).hasClass('on')) {
          self.iNow = $(this).index();
          self.b_switch = false;

          var direction = self.viewWidth < ev.clientX ? 'next' : 'prev';
          var index = $(this).index();

          if (direction === 'next') {
            self.movingNext(index);
          } else {
            self.movingPrev(index);
          }
        }
      }).hover(function () {
        clearInterval(self.timer);
      }, function () {
        self.timer = setInterval(function () {
          self.play();
        }, self.interval);
      });

      this.timer = setInterval(function () {
        self.play();
      }, this.interval);

      this.$whirlig.on('selectstart', function () {
        return false;
      });
    },

    constructor: Whirlig
  };

  $.fn.whirlig = function (options) {
    var whirlig = new Whirlig(this, options);

    return whirlig.inital();
  };

})(jQuery, window, document, undefined);;$().ready(function() { $('#execIcon').tooltip({title:$('#execInfoBar').html(), html:true, placement:'right'}); }); ;$(document).ready(function()
{          
    // add "index" class to the body element.
    $('body').addClass('index');

    $('.nav-system-home:first').addClass('active');
})
$('#words').attr('placeholder','请输入搜索信息');
if(screen.width > 767){
    $('#navbar .nav > li:nth-child(2) a').attr('onclick',"window.open('/product/c0.html','_self')");
    $('#navbar .nav > li:nth-child(3) a').attr('onclick',"window.open('/article/c31.html','_self')");
}
;
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});
