var w=$(window).width();if(navigator.userAgent.indexOf("MSIE 10.0")>0||w>1200){var t=true;function index_up(){$(".head").stop(true,false).animate({"top":"-160px"},300);$(".index").stop(true,false).animate({"top":0},700,function(){$(".head").addClass("on");$(".head").stop(true,false).animate({"top":"0"},300);$(".index").css("position","static");$(".banner").css({"position":"fixed","z-index":"-1"})});t=false;return false;}
function index_down(){if($(window).scrollTop()<=0){$(".index").css("position","fixed");$(".banner").css({"position":"static","z-index":"1"})
$(".head").stop(true,false).animate({"top":"-160px"},300,function(){$(".head").removeClass("on");});$(".index").stop(true,false).animate({"top":$('.banner').height()},700,function(){$(".head").stop(true,false).animate({"top":"0"},300);});t=true;return false;};}
$(document).keydown(function(event){if(event.keyCode==40){if(t){index_up();}}else if(event.keyCode==38){if(!t){index_down()}}})
$('.banner').on('mousewheel',function(e){var delta=e.originalEvent.wheelDelta||e.originalEvent.detail;if(delta<0){index_up()}})
$('.index').on('mousewheel',function(e){var delta=e.originalEvent.wheelDelta||e.originalEvent.detail;if(delta>0){index_down()}});document.querySelector('.banner').addEventListener('DOMMouseScroll',function(e){var delta=e.detail;if(delta>0){index_up();}});document.querySelector('.index').addEventListener('DOMMouseScroll',function(e){var delta=e.detail;if(delta<0){index_down()}});}else{$("body").addClass('m');};$(function(){$(".banner-nav-btn").click(function(){if($(this).hasClass("on")){$(this).removeClass("on");$(".banner-nav").stop(false,true).fadeOut(500)
$(".banner-right,.nav").stop(false,true).fadeIn(500);}else{$(this).addClass("on");$(".banner-nav").stop(false,true).fadeIn(500);$(".banner-right,.nav").stop(false,true).fadeOut(500);}})
$('.banner .slick').slick({autoplay:true,dots:true,arrows:true,accessibility:true,customPaging:function(slider,i){return'';}});$('.s1-banner>ul').slick({slidesToShow:3,autoplay:true,dots:false,arrows:false,responsive:[{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:3,}},{breakpoint:768,settings:{slidesToShow:2,slidesToScroll:2,}},{breakpoint:640,settings:{slidesToShow:1,slidesToScroll:1}}]});$('.s2-tit>b').hover(function(){$(this).stop().addClass('on').siblings('b').removeClass('on');var index=$(this).index();$('.s2-list>ul').eq(index).stop().fadeIn().siblings('ul').hide();})});