$(function(){ $('#gnavi li:has(div)').hover(function(){ $(this).children('div').stop().slidedown(); },function(){ $(this).children('div').stop().slideup(); }); $('#header .search').hover(function(){ $(this).parent().toggleclass('active'); $('#gnavi').toggleclass('active'); }); $('#header .menu a').click(function(){ $('.menubox').fadein(); return false; }); $('.menubox .close a').click(function(){ $('.menubox').fadeout(); return false; }); $("#main .o2o04 .box .abtn span").on('click', function() { $(this).stop(true,false).addclass('act').siblings().stop(true,false).removeclass('act'); $("#main .o2o04 .box .ul1 li").eq($(this).index()).stop(true,false).show().siblings().stop(true,false).hide(); }); $("#main .ma2 .box .mlt span").on('click', function() { $(this).stop(true,false).addclass('act').siblings().stop(true,false).removeclass('act'); $("#main .ma2 .box .mrt li").eq($(this).index()).stop(true,false).show().siblings().stop(true,false).hide(); }); $("#main .net4 .abtn span").on('click', function() { $(this).stop(true,false).addclass('act').siblings().stop(true,false).removeclass('act'); $("#main .net4 .ul1 li").eq($(this).index()).stop(true,false).show().siblings().stop(true,false).hide(); }); $("#main .ma5 .box .ul1 li").hover(function() { $(this).stop(true,false).addclass('act').siblings().stop(true,false).removeclass('act'); }); //$(".nec1 .box .nert .abtn>span").hover(function() { // $(this).find('.sbox').stop(true,false).slidedown(); //}, function() { // $(this).find('.sbox').stop(true,false).slideup(); //}); settimeout("$('.tanchuang').fadeout()",1000); settimeout("$('#gnavi').addclass('act')",100); $("body").on('click','.a_top', function(){ $("html,body").stop(true,false).animate({scrolltop:0}, 1000); }) $(".btmbox .ul2").hide(); $("#main .abtn a.a_pinguo").hide(); if ($(window).width()<1200) { $(".btmbox .ul2").show(); $(".btmbox .ul1").remove(); $('#side').remove(); } $(window).resize(function() { $(".menubox").hide(); }); /* $(window).scroll(function(){ if($(window).width() > 1200){ if($(window).scrolltop() > 40){ $('#header').addclass('active'); }else{ $('#header').removeclass('active'); } } }); $(window).resize(function(){ if($(window).width() > 1200){ if($(window).scrolltop() > 40){ $('#header').addclass('active'); }else{ $('#header').removeclass('active'); } }else{ $('#header').removeclass('active'); } }); */});