$(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"); var img=$(""); // var img2=$($("")); if(i==0){ var buttongroup=$("
"); var btn1=$("了解更多"); var btn2=$("查看业务"); buttongroup.append(btn1).append(btn2); li.append(buttongroup); } if(i==2){ // var img=$(""); var buttongroup=$("
"); var btn1=$("了解更多"); buttongroup.append(btn1) li.append(buttongroup); } li.append(img); ul.append(li); } $(".responsiveimgplay").append(ul); $(".rslides .btngroup .btn1").addclass("btn_blue"); $(".rslides .btngroup a").hover(function(){ $(this).addclass("btn_blue").siblings().removeclass("btn_blue"); }); }, contenthover:function(){ var cover=$("
"); $("article .content li").hover(function(){ $(this).append(cover); $(this).find(".cover").css("display","block"); $(this).find(".content").css("display","inline"); },function(){ $(this).find(".content").css("display","none"); $(this).find(".cover").css("display","none"); }); }, init: function () { this.carouseloption(); this.contenthover(); } }; var footer={ addclick:function(){ if($(window).width()<790){ $("footer .item_tit .item").css("display","none"); } $(window).resize(function(){ if($(this).width()<790){ $("footer .item_tit .item").css("display","none"); }else { $("footer .item_tit .item").css("display","block"); } }); $("footer .item_add").each(function(x){ $(this).click(function(){ $(this).siblings(".item").slidetoggle(); $(this).parent().siblings(".item_tit").find(".item").slideup(); }); }); }, news:function(){ $(".footer-content .newslist .news_word").each(function(){ var span=$(""); span.html("...."); if($(this).width()>295){ $(this).css("width","295px"); $(this).parent().append(span); } }); $(".footer-content .news .news_content .summary .summary_content .con").each(function(){ var span=$(""); span.html("...."); if($(this).width()>295){ $(this).css("width","295px"); $(this).parent().append(span); } }); if($(window).width()<878){ $(".footer-content .news .news_content .summary .summary_content").width($(".footer-content .news .news_content .summary").width()-105); $(".footer-content .newslist .news_word").width($(".footer-content .news .news_content .summary").width()-105); }else{ $(".footer-content .news .news_content .summary .summary_content").width("260px"); $(".footer-content .newslist .news_word").width("295px"); } $(window).resize(function(){ if($(this).width()<878){ $(".footer-content .news .news_content .summary .summary_content").width($(".footer-content .news .news_content .summary").width()-105); $(".footer-content .newslist .news_word").width($(".footer-content .news .news_content .summary").width()-105); }else{ $(".footer-content .news .news_content .summary .summary_content").width("260px"); $(".footer-content .newslist .news_word").width("295px"); } }); }, init:function(){ this.addclick(); this.news(); } };