{"version":3,"sources":["webpack:///index.1.1.1.js","webpack:///webpack/bootstrap ed0bece5a6e6c298600d","webpack:///./src/index.js","webpack:///./src/component/backtotop.js","webpack:///./src/component/bi.js","webpack:///./src/component/hao.js","webpack:///./src/component/morenews.js","webpack:///./src/component/rank.js","webpack:///./src/component/search.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","$backToTopEle","$","click","animate","scrollTop","window","bind","st","document","css","statistics","adskey","_jc_ping","push","getIndex","parents","a","index","find","each","i","this","item","attr","on","data","length","_this","$tab","slick","dots","autoplay","arrows","addClass","siblings","removeClass","slickGoTo","show","escapeHtml","string","str","match","matchHtmlRegExp","exec","escape","html","lastIndex","charCodeAt","substring","render","tpl","replace","w","key","ue","Focus","getGameCode","$dom","code","split","pop","getGameInfo","$el","cache","codes","$gamecodes","target","gamecode","gameInfoCache","getGameData","gameCode","renderGameTag","callback","ajax","url","gameCodes","join","dataType","done","nameMap","Object","prototype","toString","giftUrl","dt","indexfocus","concat","channelUrl","downloadUrl","gameOfficialUrl","giftList","setTimeout","hide","currentObj","mouseenter","initSearch","_keyword","setStyle","isEmp","keyword","preValue","val","focus","blur"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,UAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,UAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMM,SAAUI,EAAQD,EAASH,GE5CjCA,EAAA,GACAA,EAAA,GACAA,EAAA,GACAA,EAAA,GACAA,EAAA,GACAA,EAAA,IFkDM,SAAUI,EAAQD,GGpDxB,GAAAQ,GAAAC,EAAA,YAAAC,MAAA,W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A,eAJA,GAAAC,GAAAlG,EAAA,yBACAmG,EAAAJ,CAKAG,GAAAE,IAAAL,GACAC,MACAE,EAAAG,MAAA,WACAF,GAAAD,EAAAE,QACAF,EAAAE,IAAA,IACAJ,SAGAE,EAAAI,KAAA,WACA,IAAAJ,EAAAE,QACAF,EAAAE,IAAAD,GACAH,SASAhG,EAAAwE,MACAC,IAAA,6CACAG,SAAA,QACApD,MACAiD,IAAA,sDAECI,KAAA,SAAArD,GACD,GAAA0E,GAAAlG,EAAAwB,GAAAP,KAAA,uBAAAmF,KACAN,GAAAI","file":"index.1.1.1.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(6);\n\t__webpack_require__(4);\n\t__webpack_require__(2);\n\t__webpack_require__(3);\n\t__webpack_require__(5);\n\t__webpack_require__(1);\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * [回到顶部]\n\t */\n\tvar $backToTopEle = $('.btn-top').click(function() {\n\t    $('html, body').animate({\n\t        scrollTop: 0\n\t    }, 120);\n\t});\n\t\n\t$(window).bind('scroll', function() {\n\t    var st = $(document).scrollTop();\n\t    if (st > 0) {\n\t        $backToTopEle.css('display', 'block');\n\t    } else {\n\t        $backToTopEle.css('display', 'none');\n\t    }\n\t});\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * [搜索]\n\t */\n\t\n\tfunction statistics(adskey) {\n\t    window._jc_ping = window._jc_ping || [];\n\t    _jc_ping.push([\n\t        '_trackBlockClick',\n\t        adskey\n\t    ]);\n\t}\n\t\n\tfunction getIndex(parents, a) {\n\t    var index = '';\n\t    parents.find('a').each(function(i) {\n\t        if (this == a) {\n\t            index = i;\n\t            return false;\n\t        }\n\t    });\n\t    return index;\n\t}\n\t\n\t$.each([\n\t    ['#header', 'eyARze'],\n\t    ['#mainList', 'AJZvYv'],\n\t    ['.side .focus-in', 'NBzQje'], //焦点图\n\t    ['.rec-reading', 'fyeYri'], //推荐阅读\n\t    ['.hao-welfare', 'byANBj'], //发号福利\n\t    ['.game-test', 'yUJvMn'],\n\t    ['.bi-waiting-list', '6jmMfq'],\n\t    ['.bi-game-list', 'vEFVN3']\n\t], function(i, item) {\n\t    $(item[0]).attr('data-bi', item[1]);\n\t});\n\t\n\t$('body').on('mousedown', '[data-bi] a', function() {\n\t    var a = $(this);\n\t    var parents = a.parents('[data-bi]');\n\t    var adskey = parents.data('bi');\n\t    var index = getIndex(parents, a[0]);\n\t    if (adskey) {\n\t        statistics(adskey + '|' + index);\n\t    }\n\t});\n\t\n\t$('.search-form').on('submit', function() {\n\t    statistics('eyARze|15');\n\t});\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * [发号福利 标签切换]\n\t */\n\tif ($('.js-tab').length) {\n\t    $('.js-tab').each(function() {\n\t        var _this = $(this);\n\t        var $tab = _this.find('.tab-pn').slick({\n\t            dots: false,\n\t            autoplay: false,\n\t            arrows: false\n\t        });\n\t        _this.find('.tab li:eq(0)').addClass('current');\n\t        _this.find('.tab li').click(function() {\n\t            var i = $(this).index();\n\t            $(this).addClass('current').siblings().removeClass('current');\n\t            $tab.slickGoTo(i);\n\t        });\n\t        $('.hao-welfare .slick-slide').show();\n\t    });\n\t}\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * [加载更多]\n\t */\n\tvar matchHtmlRegExp = /[\"'&<>]/\n\t\n\tfunction escapeHtml(string) {\n\t  var str = '' + string\n\t  var match = matchHtmlRegExp.exec(str)\n\t  if (!match) {\n\t    return str\n\t  }\n\t  var escape\n\t  var html = ''\n\t  var index = 0\n\t  var lastIndex = 0\n\t\n\t  for (index = match.index; index < str.length; index++) {\n\t    switch (str.charCodeAt(index)) {\n\t      case 34: // \"\n\t        escape = '&quot;'\n\t        break\n\t      case 38: // &\n\t        escape = '&amp;'\n\t        break\n\t      case 39: // '\n\t        escape = '&#39;'\n\t        break\n\t      case 60: // <\n\t        escape = '&lt;'\n\t        break\n\t      case 62: // >\n\t        escape = '&gt;'\n\t        break\n\t      default:\n\t        continue\n\t    }\n\t    if (lastIndex !== index) {\n\t      html += str.substring(lastIndex, index)\n\t    }\n\t    lastIndex = index + 1\n\t    html += escape\n\t  }\n\t  return lastIndex !== index ? html + str.substring(lastIndex, index) : html\n\t}\n\t\n\tvar tpl =\n\t  '' +\n\t  '<li>' +\n\t  '<a href=\"{{url}}\" target=\"_blank\" class=\"con\">' +\n\t  '<span class=\"type\">{{type}}</span>' +\n\t  '<strong class=\"tit\">{{title}}</strong>' +\n\t  '<strong class=\"tit-sub\">{{subTitle}}</strong>' +\n\t  '<img src=\"{{img}}\" alt=\"\" width=\"365\" height=\"475\" />' +\n\t  '<b class=\"line\"></b>' +\n\t  '</a>' +\n\t  '</li>'\n\t\n\tfunction render(data) {\n\t  var html = ''\n\t  $.each(data, function (i, item) {\n\t    html += tpl.replace(/\\{\\{(\\w+)\\}\\}/gim, function (w, key) {\n\t      return escapeHtml(item[key])\n\t    })\n\t  })\n\t  $('.focus-list').html(html)\n\t  new ue.Focus($('.focus'))\n\t}\n\t\n\t$.ajax({\n\t  url: 'http://interface.17173.com/focus/indexList_2018.jsonp',\n\t  data: {\n\t    url: 'http://www.17173.com/2018/focus/inc-focus.shtml',\n\t  },\n\t  dataType: 'jsonp',\n\t}).done(function (data) {\n\t  var dt = data.data\n\t  if (window.indexfocus && window.indexfocus.length>0) {\n\t    dt = window.indexfocus.concat(dt)\n\t  }\n\t  render(dt)\n\t})\n\t\n\t//对游戏进行缓存\n\tvar gameInfoCache = {}\n\t\n\tfunction getGameCode($dom) {\n\t  var code = $dom.data('gamecodes') || ''\n\t  code = (code + '').split(',')\n\t  return code.pop()\n\t}\n\t\n\tfunction getGameInfo($el) {\n\t  var cache = {}\n\t  var codes = []\n\t  var $gamecodes = $el.find('[data-gamecodes]')\n\t  $gamecodes.each(function () {\n\t    var target = $(this)\n\t    var gamecode = getGameCode(target)\n\t    if (!gameInfoCache[gamecode] && !cache[gamecode] && gamecode) {\n\t      codes.push(gamecode)\n\t      cache[gamecode] = true\n\t    }\n\t  })\n\t  getGameData(codes, function (data) {\n\t    $.each(data, function (i, item) {\n\t      gameInfoCache[item.gameCode] = item\n\t    })\n\t    $gamecodes.each(function () {\n\t      var target = $(this)\n\t      var code = getGameCode(target)\n\t      if (code) {\n\t        target.html(renderGameTag(gameInfoCache[code]))\n\t      }\n\t    })\n\t  })\n\t}\n\t\n\tfunction getGameData(codes, callback) {\n\t  if (!codes || codes.length < 1) {\n\t    callback([])\n\t    return\n\t  }\n\t  $.ajax({\n\t    url: '//interface.17173.com/game/infoByCode.jsonp',\n\t    data: {\n\t      gameCodes: codes.join(','),\n\t    },\n\t    dataType: 'jsonp',\n\t  }).done(function (data) {\n\t    callback(data.data)\n\t  })\n\t}\n\tvar nameMap = {\n\t  channelUrl: '专区',\n\t  downloadUrl: '下载',\n\t  gameOfficialUrl: '官网',\n\t  giftList: '礼包',\n\t}\n\t\n\tfunction renderGameTag(item) {\n\t  var html = ''\n\t  var url\n\t  for (var key in item) {\n\t    if (nameMap[key] && item[key]) {\n\t      url =\n\t        Object.prototype.toString.call(item[key]) == '[object Array]'\n\t          ? item[key][0].giftUrl\n\t          : item[key]\n\t      html +=\n\t        '<a href=\"' +\n\t        escapeHtml(url) +\n\t        '\" target=\"_blank\" class=\"tag\"> ' +\n\t        nameMap[key] +\n\t        ' </a>'\n\t    }\n\t  }\n\t  return html\n\t}\n\t\n\tsetTimeout(function () {\n\t  $('.pagination').hide()\n\t}, 300)\n\t\n\tgetGameInfo($('#mainList'))\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * [新游期待榜、热门游戏榜]\n\t */\n\tif ($('.js-rank').length) {\n\t    $('.js-rank').each(function() {\n\t        var currentObj, _this = $(this);\n\t        for (var i = 0; i < $('li', _this).length; i++) {\n\t            currentObj = $('li:eq(' + i + ')', _this);\n\t            currentObj.mouseenter(function() {\n\t                $(this).addClass('active').siblings().removeClass('active');\n\t            }).find('.c1 em').html(i + 1);\n\t        }\n\t        $('li:eq(0)', _this).addClass('active');\n\t    });\n\t}\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * [initSearch 搜索]\n\t * @param  {[String]} _keyword [关键词]\n\t */\n\tfunction initSearch(_keyword) {\n\t    var keyword = $('.search-form .keyword');\n\t    var preValue = _keyword;\n\t\n\t    function setStyle(isEmp) {\n\t        keyword.css('color', isEmp ? '#999' : '#333');\n\t    }\n\t    keyword.val(_keyword);\n\t    setStyle(true);\n\t    keyword.focus(function() {\n\t        if (preValue == keyword.val()) {\n\t            keyword.val('');\n\t            setStyle(false);\n\t        }\n\t    });\n\t    keyword.blur(function() {\n\t        if (keyword.val() == '') {\n\t            keyword.val(preValue);\n\t            setStyle(true);\n\t        }\n\t    });\n\t}\n\t\n\t/**\n\t * 与首页搜索框关键词内容保持同步\n\t */\n\t\n\t$.ajax({\n\t    url: '//interface.17173.com/inc/getContent.jsonp',\n\t    dataType: 'jsonp',\n\t    data: {\n\t        url: 'http://www.17173.com/2016v2/inc/inc-search.shtml'\n\t    }\n\t}).done(function(data) {\n\t    var keyword = $(data).find('input[name=keyword]').val();\n\t    initSearch(keyword);\n\t});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// index.1.1.1.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ed0bece5a6e6c298600d","require('./component/search');\nrequire('./component/morenews');\nrequire('./component/bi');\nrequire('./component/hao');\nrequire('./component/rank');\nrequire('./component/backtotop');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 0\n// module chunks = 0","/**\n * [回到顶部]\n */\nvar $backToTopEle = $('.btn-top').click(function() {\n    $('html, body').animate({\n        scrollTop: 0\n    }, 120);\n});\n\n$(window).bind('scroll', function() {\n    var st = $(document).scrollTop();\n    if (st > 0) {\n        $backToTopEle.css('display', 'block');\n    } else {\n        $backToTopEle.css('display', 'none');\n    }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/component/backtotop.js\n// module id = 1\n// module chunks = 0","/**\n * [搜索]\n */\n\nfunction statistics(adskey) {\n    window._jc_ping = window._jc_ping || [];\n    _jc_ping.push([\n        '_trackBlockClick',\n        adskey\n    ]);\n}\n\nfunction getIndex(parents, a) {\n    var index = '';\n    parents.find('a').each(function(i) {\n        if (this == a) {\n            index = i;\n            return false;\n        }\n    });\n    return index;\n}\n\n$.each([\n    ['#header', 'eyARze'],\n    ['#mainList', 'AJZvYv'],\n    ['.side .focus-in', 'NBzQje'], //焦点图\n    ['.rec-reading', 'fyeYri'], //推荐阅读\n    ['.hao-welfare', 'byANBj'], //发号福利\n    ['.game-test', 'yUJvMn'],\n    ['.bi-waiting-list', '6jmMfq'],\n    ['.bi-game-list', 'vEFVN3']\n], function(i, item) {\n    $(item[0]).attr('data-bi', item[1]);\n});\n\n$('body').on('mousedown', '[data-bi] a', function() {\n    var a = $(this);\n    var parents = a.parents('[data-bi]');\n    var adskey = parents.data('bi');\n    var index = getIndex(parents, a[0]);\n    if (adskey) {\n        statistics(adskey + '|' + index);\n    }\n});\n\n$('.search-form').on('submit', function() {\n    statistics('eyARze|15');\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/component/bi.js\n// module id = 2\n// module chunks = 0","/**\n * [发号福利 标签切换]\n */\nif ($('.js-tab').length) {\n    $('.js-tab').each(function() {\n        var _this = $(this);\n        var $tab = _this.find('.tab-pn').slick({\n            dots: false,\n            autoplay: false,\n            arrows: false\n        });\n        _this.find('.tab li:eq(0)').addClass('current');\n        _this.find('.tab li').click(function() {\n            var i = $(this).index();\n            $(this).addClass('current').siblings().removeClass('current');\n            $tab.slickGoTo(i);\n        });\n        $('.hao-welfare .slick-slide').show();\n    });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/component/hao.js\n// module id = 3\n// module chunks = 0","/**\n * [加载更多]\n */\nvar matchHtmlRegExp = /[\"'&<>]/\n\nfunction escapeHtml(string) {\n  var str = '' + string\n  var match = matchHtmlRegExp.exec(str)\n  if (!match) {\n    return str\n  }\n  var escape\n  var html = ''\n  var index = 0\n  var lastIndex = 0\n\n  for (index = match.index; index < str.length; index++) {\n    switch (str.charCodeAt(index)) {\n      case 34: // \"\n        escape = '&quot;'\n        break\n      case 38: // &\n        escape = '&amp;'\n        break\n      case 39: // '\n        escape = '&#39;'\n        break\n      case 60: // <\n        escape = '&lt;'\n        break\n      case 62: // >\n        escape = '&gt;'\n        break\n      default:\n        continue\n    }\n    if (lastIndex !== index) {\n      html += str.substring(lastIndex, index)\n    }\n    lastIndex = index + 1\n    html += escape\n  }\n  return lastIndex !== index ? html + str.substring(lastIndex, index) : html\n}\n\nvar tpl =\n  '' +\n  '<li>' +\n  '<a href=\"{{url}}\" target=\"_blank\" class=\"con\">' +\n  '<span class=\"type\">{{type}}</span>' +\n  '<strong class=\"tit\">{{title}}</strong>' +\n  '<strong class=\"tit-sub\">{{subTitle}}</strong>' +\n  '<img src=\"{{img}}\" alt=\"\" width=\"365\" height=\"475\" />' +\n  '<b class=\"line\"></b>' +\n  '</a>' +\n  '</li>'\n\nfunction render(data) {\n  var html = ''\n  $.each(data, function (i, item) {\n    html += tpl.replace(/\\{\\{(\\w+)\\}\\}/gim, function (w, key) {\n      return escapeHtml(item[key])\n    })\n  })\n  $('.focus-list').html(html)\n  new ue.Focus($('.focus'))\n}\n\n$.ajax({\n  url: 'http://interface.17173.com/focus/indexList_2018.jsonp',\n  data: {\n    url: 'http://www.17173.com/2018/focus/inc-focus.shtml',\n  },\n  dataType: 'jsonp',\n}).done(function (data) {\n  var dt = data.data\n  if (window.indexfocus && window.indexfocus.length>0) {\n    dt = window.indexfocus.concat(dt)\n  }\n  render(dt)\n})\n\n//对游戏进行缓存\nvar gameInfoCache = {}\n\nfunction getGameCode($dom) {\n  var code = $dom.data('gamecodes') || ''\n  code = (code + '').split(',')\n  return code.pop()\n}\n\nfunction getGameInfo($el) {\n  var cache = {}\n  var codes = []\n  var $gamecodes = $el.find('[data-gamecodes]')\n  $gamecodes.each(function () {\n    var target = $(this)\n    var gamecode = getGameCode(target)\n    if (!gameInfoCache[gamecode] && !cache[gamecode] && gamecode) {\n      codes.push(gamecode)\n      cache[gamecode] = true\n    }\n  })\n  getGameData(codes, function (data) {\n    $.each(data, function (i, item) {\n      gameInfoCache[item.gameCode] = item\n    })\n    $gamecodes.each(function () {\n      var target = $(this)\n      var code = getGameCode(target)\n      if (code) {\n        target.html(renderGameTag(gameInfoCache[code]))\n      }\n    })\n  })\n}\n\nfunction getGameData(codes, callback) {\n  if (!codes || codes.length < 1) {\n    callback([])\n    return\n  }\n  $.ajax({\n    url: '//interface.17173.com/game/infoByCode.jsonp',\n    data: {\n      gameCodes: codes.join(','),\n    },\n    dataType: 'jsonp',\n  }).done(function (data) {\n    callback(data.data)\n  })\n}\nvar nameMap = {\n  channelUrl: '专区',\n  downloadUrl: '下载',\n  gameOfficialUrl: '官网',\n  giftList: '礼包',\n}\n\nfunction renderGameTag(item) {\n  var html = ''\n  var url\n  for (var key in item) {\n    if (nameMap[key] && item[key]) {\n      url =\n        Object.prototype.toString.call(item[key]) == '[object Array]'\n          ? item[key][0].giftUrl\n          : item[key]\n      html +=\n        '<a href=\"' +\n        escapeHtml(url) +\n        '\" target=\"_blank\" class=\"tag\"> ' +\n        nameMap[key] +\n        ' </a>'\n    }\n  }\n  return html\n}\n\nsetTimeout(function () {\n  $('.pagination').hide()\n}, 300)\n\ngetGameInfo($('#mainList'))\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/component/morenews.js\n// module id = 4\n// module chunks = 0","/**\n * [新游期待榜、热门游戏榜]\n */\nif ($('.js-rank').length) {\n    $('.js-rank').each(function() {\n        var currentObj, _this = $(this);\n        for (var i = 0; i < $('li', _this).length; i++) {\n            currentObj = $('li:eq(' + i + ')', _this);\n            currentObj.mouseenter(function() {\n                $(this).addClass('active').siblings().removeClass('active');\n            }).find('.c1 em').html(i + 1);\n        }\n        $('li:eq(0)', _this).addClass('active');\n    });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/component/rank.js\n// module id = 5\n// module chunks = 0","/**\n * [initSearch 搜索]\n * @param  {[String]} _keyword [关键词]\n */\nfunction initSearch(_keyword) {\n    var keyword = $('.search-form .keyword');\n    var preValue = _keyword;\n\n    function setStyle(isEmp) {\n        keyword.css('color', isEmp ? '#999' : '#333');\n    }\n    keyword.val(_keyword);\n    setStyle(true);\n    keyword.focus(function() {\n        if (preValue == keyword.val()) {\n            keyword.val('');\n            setStyle(false);\n        }\n    });\n    keyword.blur(function() {\n        if (keyword.val() == '') {\n            keyword.val(preValue);\n            setStyle(true);\n        }\n    });\n}\n\n/**\n * 与首页搜索框关键词内容保持同步\n */\n\n$.ajax({\n    url: '//interface.17173.com/inc/getContent.jsonp',\n    dataType: 'jsonp',\n    data: {\n        url: 'http://www.17173.com/2016v2/inc/inc-search.shtml'\n    }\n}).done(function(data) {\n    var keyword = $(data).find('input[name=keyword]').val();\n    initSearch(keyword);\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/component/search.js\n// module id = 6\n// module chunks = 0"],"sourceRoot":""}