$(function(){ navbaroption.init(); //carousel.init(); footer.init(); }); //导航条内容加载 var navbaroption={ menutoggleclick:function(){ var flag=true; $(".nav_header .menu_toggle").click(function(){ var width=$(window).width(); var height=$(window).height(); if(width>399){ if(flag){ $(".menu_toggle_dropdown_con").css({"height":height+"px"}); $("body").animate({"right":"200px"},600); $(".menu_toggle_dropdown_con").show(); flag=false; }else{ $("body").animate({"right":"0px"},600,function(){$("header .nav_header .menu_toggle_dropdown_con").hide()}); flag=true; } }else{ if(flag){ $(".menu_toggle_dropdown_con").css({"right":-width+"px","height":height-67+"px"}).animate({"right":0},600); $(".menu_toggle_dropdown_con").show(); flag=false; }else{ $(".menu_toggle_dropdown_con").animate({"right":-width+"px"},600,function(){$(".menu_toggle_dropdown_con").hide();}); flag=true; } } }); $(".menu_toggle_dropdown_con .navitemtoggle").each(function(x){ if(x==0 || x==4 || x==5 || x==10){} else{ if($(this).find("span").html()==$(".main .breadmenu .bread2").html()){ $(this).find(".menu_toggle_dropdown_con_menu").show(); $($(this).find(".menu_toggle_dropdown_con_menu li")).each(function(){ // if($(this).find("a").html()==$(".main .breadmenu .bread3").html().replace(/[\s]+/g,"")){ // $(this).find("a").css("color","#2c95db"); // } }); } $(this).click(function(){ $(this).find(".menu_toggle_dropdown_con_menu").stop().slidetoggle(); $(this).siblings().find(".menu_toggle_dropdown_con_menu").stop().slideup(); }); } }); $(".li_globel").hover(function(){ $("header .head_top_right .arr").show(); $("header .head_top_right .globel").show(); },function(){ $("header .head_top_right .arr").hide(); $("header .head_top_right .globel").hide(); }); }, menuhover:function(){ $("header .nav_header ul.menu>li").each(function(x){ if(x==0 || x==8){ $(this).hover(function(){ $(this).siblings(".lihover").removeclass(); $(".drophover").remove(); $(this).addclass("lihover"); $(this).find("a").css("color","white"); },function(){ $(this).removeclass(); $(".drophover").remove(); $(this).find("a").css("color","#4c4c4c"); }) }else{ $(this).hover(function(){ $(this).siblings(".lihover").removeclass(); $(".drophover").remove(); $(this).addclass("lihover"); var drophover=$(""); $(this).append(drophover); drophover.fadein(function(){$(this).animate({"top":"52px"})}); $(this).find(".menu_menu").css("display","block"); },function(){ $(this).removeclass(); $(".drophover").remove(); $(this).find(".menu_menu").css("display","none"); }); $(this).find(".menu_menu").mouseover(function(){ return false; }) } }); }, init:function(){ this.menutoggleclick(); this.menuhover(); } }; var carousel= { bianliang: {"src": [ "assets/images/lunboimg/c1.png","assets/images/lunboimg/c3.png","assets/images/lunboimg/c2.png"]}, carouseloption:function(){ var ul=$("
"); for(var i=0;i