! function(a) { "use strict"; var b = function(a, c) { var d = /[^\w\-\.:]/.test(a) ? new Function(b.arg + ",tmpl", "var _e=tmpl.encode" + b.helper + ",_s='" + a.replace(b.regexp, b.func) + "';return _s;") : b.cache[a] = b.cache[a] || b(b.load(a)); return c ? d(c, b) : function(a) { return d(a, b) } }; b.cache = {}, b.load = function(a) { return document.getElementById(a).innerHTML }, b.regexp = /([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g, b.func = function(a, b, c, d, e, f) { return b ? { "\n": "\\n", "\r": "\\r", " ": "\\t", " ": " " } [b] || "\\" + b : c ? "=" === c ? "'+_e(" + d + ")+'" : "'+(" + d + "==null?'':" + d + ")+'" : e ? "';" : f ? "_s+='" : void 0 }, b.encReg = /[<>&"'\x00]/g, b.encMap = { "<": "<", ">": ">", "&": "&", '"': """, "'": "'" }, b.encode = function(a) { return (null == a ? "" : "" + a).replace(b.encReg, function(a) { return b.encMap[a] || "" }) }, b.arg = "o", b.helper = ",print=function(s,e){_s+=e?(s==null?'':s):_e(s);},include=function(s,d){_s+=tmpl(s,d);}", "function" == typeof define && define.amd ? define(function() { return b }) : a.tmpl = b }(this); (function($) { var o = $({}); $.subscribe = function() { o.on.apply(o, arguments); }; $.unsubscribe = function() { o.off.apply(o, arguments); }; $.publish = function() { o.trigger.apply(o, arguments); }; }($)); $(function() { 'use strict'; var win = window; win.GLOBAL = win.GLOBAL || {}; win.hr = win.hr || {}; win.hr.version = '1.6.11'; win.hr.page = win.hr.page || {}; win.hr.component = win.hr.component || {}; win.hr.regComponent = function(name, obj) { if (typeof name == 'string' && name !== '') { win.hr.util._createNamespace(name.split('.'), obj, win.hr.component); } }; win.hr.regPage = function(name, obj) { if (typeof name == 'string' && name !== '') { win.hr.util._createNamespace(name.split('.'), obj, win.hr.page); } }; win.hr.util = { renderTmpl: function(opt) { var strTargetTmpl = opt.tmpl || ''; var jsonData = opt.data || {}; var $target = opt.to; var method = opt.method || 'append'; var $insertTo = opt.insertTo || null; if ($target) { var tmpled = tmpl(strTargetTmpl, jsonData); switch (method) { case 'replace': $target.html(tmpled); break; case 'append': if ($insertTo) { $(tmpled).insertAfter($insertTo); } else { $target.append(tmpled); } break; case 'prepend': if ($insertTo) { $(tmpled).insertBefore($insertTo); } else { $target.prepend(tmpled); } break; default: break; } } $.isFunction(opt.callbackFn) && opt.callbackFn(); }, getUrlParam: function(str) { var s = location.search; var tmp = []; var value = ''; if (s) { tmp = s.substr(1).split('&'); } for (var i = 0; i < tmp.length; i++) { if (tmp[i].substring(0, tmp[i].indexOf('=')) === str) { value = tmp[i].substr(tmp[i].indexOf('=') + 1); break; } } return value; }, resizePage: function(baseWidth) { var baseW = baseWidth || 750; var docEl = document.documentElement, resizeEvt = 'orientationchange' in win ? 'orientationchange' : 'resize', recalc = function() { var clientWidth = docEl.clientWidth; if (!clientWidth) { return; } if (clientWidth > baseW) { clientWidth = baseW; } docEl.style.fontSize = 100 * (clientWidth / baseW) + 'px'; }; if (!document.addEventListener) { return; } win.addEventListener(resizeEvt, recalc, false); recalc(); }, resizeNAV: function() { var resizeEvt = 'orientationchange' in win ? 'orientationchange' : 'resize'; var time = 0; win.addEventListener(resizeEvt, function(params) { if ($(window).width() <= 1199) { if (new Date() - time > 50000000) { hr.util.nav(); time = new Date(); } } }, false); }, _createNamespace: function(parts, obj, parent) { var obj = obj || { init: function() {} }; var i = 0; if (parts[0] === 'hr') { parts = parts.slice(1); } for (i = 0; i < parts.length; i++) { if (typeof parent[parts[i]] == 'undefined') { parent[parts[i]] = obj; obj.init(); } parent = parent[parts[i]]; } }, searchBox: function() { $('body').on('click', '.js-search', function(e) { $('.search-box').fadeIn(200) }).on('click', '.search-mask,.search-close', function(e) { $('.search-box').fadeOut(200) }) }, freeTrial: function() { $('body').on('click', '.js-trial', function() { $('#freeTrial').fadeIn(200) }).on('click', '.pop-close', function() { $(this).parents('.m-pop').fadeOut(200) }) }, nav: function() { var $body = $('body') if ($(window).width() <= 1199) { if(!win.bindmenu) { $body.on('click', '.menu', function() { $(this).toggleClass('open') $('.hd-r').stop().slideToggle(200) }) $body.on('click', '.nav-tit', function() { $('.nav-child2').stop().slideUp(200) $(this).toggleClass('on').parents('.nav-item').siblings().find('.nav-tit').removeClass('on') $(this).siblings('.nav-child2').stop().slideToggle(200) }) $body.on('click', '.nav-c2-tit', function() { $('.nav-child3').stop().slideUp(200) $(this).siblings('.nav-child3').stop().slideToggle(200) }) win.bindmenu=true } } }, slideJs: function(){ $(".g-select span").unbind('click').bind('click',function() { $(this).siblings("ul").stop().slideToggle(); $(this).toggleClass("active"); }) $(".g-select li").unbind('click').bind('click',function() { var word = $(this).find("a").text(); $(this).parent("ul").siblings("span").text(word).removeClass("active"); $(this).addClass("active").siblings("li").removeClass("active"); $(".g-select ul").slideUp(); }) $(".m-aside dt").unbind('click').bind('click',function() { $(this).toggleClass("active").parent("dl").toggleClass("active"); }) $(".m-aside dd span").unbind('click').bind('click',function() { $(this).parent("dd").toggleClass("active").siblings("ul").slideToggle(); }) $(".resource-center .table .lang3 span").unbind('click').bind('click',function() { $(this).toggleClass("active").siblings(".link").slideToggle(); $(this).parents("tr").siblings("tr").find(".link").hide() }) $(".person-L1 li").unbind('click').bind('click',function() { $(this).toggleClass("active"); }) }, hideSideNav: function() { $('body').on('click', '.sideNav-close', function() { $('.sideNav').fadeOut(200) }) } }; win.hr.init = function() { hr.util.searchBox() hr.util.freeTrial() hr.util.nav() hr.util.resizeNAV() hr.util.hideSideNav() hr.util.slideJs() new WOW().init() }; win.hr.init(); });