//=========== input,select focus==================== function _initInputs(){ //鍒濆鍖 input,select focus浜嬩欢 $("input,select").focus( function(){ $(this).addClass("inputFocus"); } ); $("input,select").blur( function(){ $(this).removeClass("inputFocus"); } ); } function _initSelect(){ //鍒濆鍖 input,select focus浜嬩欢 $(".select").focus( function(){ $(this).addClass("selectFocus"); } ); $(".select").blur( function(){ $(this).removeClass("selectFocus"); } ); } function _datePicker(){ //鍒濆鍖 input,select focus浜嬩欢 $(".date_picker").focus( function(){ $(this).addClass("date_pickerFocus"); } ); $(".date_picker").blur( function(){ $(this).removeClass("date_pickerFocus"); } ); } /* $(function(){ var $w=$('.activity_banner img').width(); var $m=-$w/2+'px'; $('.activity_banner').css({"width":$w+"px","margin-left":$m}); }) */ function _inittextarea(){ //鍒濆鍖 input,select focus,textarea(浜嬩欢 $(".lytex").focus( function(){ $(this).addClass("inputFocus"); } ); $(".lytex").blur( function(){ $(this).removeClass("inputFocus"); } ); } $(function(){ _initInputs(); _datePicker(); _initSelect(); swtichTool(".productBox .tabsList .item","active",".content","click"); swtichTool(".gaiKuobtnList .tabsList li","active",".contentBox","click"); swtichTool(".warp .loginBox_content .tabTitle li","active",".tabCont","click"); //rollToolVertical(".notice_mb .noticeList ul",".notice_mb .noticeList li",2,50,true,4000,400); containerCenter(); /*浜岀淮鐮?/ $("#block-erweima").hover(function(){ /*$(this).find(".phone").stop().fadeIn(500);*/ $(this).find(".phone").css({"display":"block"}); },function(){ /*$(this).find(".phone").stop().fadeOut(500);*/ $(this).find(".phone").css({"display":"none"}); }) /*鐢佃瘽*/ $("#block-phone-num").hover(function(){ /*$(this).find(".block-phone-num").stop().animate({ 'width' : '180px', 'opacity' : "1" },200);*/ $(this).find(".block-phone-num").css({"display":"block","width":180+"px","opacity":1}); },function(){ /*$(this).find(".block-phone-num").stop().animate({ 'width' : '0', 'opacity' : "0" },200);*/ $(this).find(".block-phone-num").css({"display":"none"}); }); /*$(".hd_fxgd").click(function(){ $(".hd_fx").addClass("hd_auto"); });*/ moreBoxOpen(".hd_fxgd",".hd_fx",".hd_fxgd i",".hd_fxgd p") moreBoxOpen(".hd_fxgd2",".hd_fx1",".hd_fxgd2 i",".hd_fxgd2 p") function moreBoxOpen(obj,content,btnIocn,txt){ var fal=false; $(obj).on("click",function(){ if(fal){ $(content).css("height",""); //$(content).slideUp() $(txt).html("鏌ョ湅鏇村") $(btnIocn).removeClass("icon-arrow_down-copy") fal=false; }else{ $(content).css("height","auto"); fal=true; $(btnIocn).addClass("icon-arrow_down-copy") $(txt).html("鐐瑰嚮缂╄捣") } //$(".txtContent").animate({height:"auto"},400) }) }; /*绔嬪嵆棰勭害寮圭獥寮€濮?/ $(".zhlc_yuebtn").click(function(){ $(".zhlc_tc").show(); }); $(".zhlc_yuetitle i").click(function(){ $(".zhlc_tc").hide(); }); $(".zhlc_bdtj span.qx").click(function(){ $(".zhlc_tc").hide(); }); var box1 = $(".yd_qh"); box1.each(function() { var dh = $(this).find(".yd_lct li"); var nr = $(this).find(".yd_bz .yd_bznr"); dh.on("click",function(){ var nrindex = $(this).index();//瀹氫箟褰撳墠index $(".yd_lct li").addClass("gao"); $(this).addClass("hot").siblings().removeClass("hot"); nr.eq(nrindex).show().siblings().hide(); }); }); $(".fw_jysub li").last().css("border-right","none"); var box2 = $(".fw_qhbox"); box2.each(function() { var dh1 = $(this).find(".fw_jysub li"); var nr1 = $(this).find(".fw_qhnr .fw_listnr"); dh1.on("click",function(){ var nrindex1 = $(this).index();//瀹氫箟褰撳墠index $(this).addClass("hot").siblings().removeClass("hot"); nr1.eq(nrindex1).show().siblings().hide(); }); }); /*绔嬪嵆棰勭害寮圭獥缁撴潫*/ lastborder(".zixunContent .list1 li"); lastborder(".zixunContent .list2 li"); function lastborder(obj){ $(obj).last().css("border-bottom","none"); } var i =0; var clone = $(".hd_jlnr .img li").first().clone(); $(".hd_jlnr .img").append(clone); var size = $(".hd_jlnr .img li").size() /*瀹氭椂鍣ㄦ瘡闅?绉?/ var t=setInterval(Lleft,5000); $(".hd_jlnr").hover(function(){ clearInterval(t); },function(){ t=setInterval(Lleft,5000); }); /*鐐瑰嚮宸﹁竟*/ $(".hd_jlglleft").click(function(){ Lleft() }); function Lleft(){ i++ if(i==size){ $(".hd_jlnr .img").css({left:0}); i=1; } $(".hd_jlnr .img").stop().animate({left:-i*920},500); } /*鐐瑰嚮宸﹁竟*/ $(".hd_jlglright").click(function(){ Rright() }); function Rright(){ i-- if(i==-1){ $(".hd_jlnr .img").css({left:-(size-1)*920}); i=size-2; } $(".hd_jlnr .img").stop().animate({left:-i*920},500); } $(".ab_job li .ab_jobtitle").click(function(){ $(this).parent().toggleClass("hot"); }); $(".fw_wtnr li .fw_wtnrtop").click(function(){ $(this).parent().toggleClass("hot"); }); /*杩斿洖椤堕儴*/ $('#return_top').click(function() { //鏀瑰厓绱犵偣鍑荤殑鏃跺€ $('html,body').animate({ scrollTop: 0 }, 600); //璁 body 鐨 scroolTop 璁句负 0 }); _initWapNav(); var initTop=40 $(window).bind("scroll", function(event){ if($(window).scrollTop()>initTop){ $(".pc_header .top").css({"display":"none"}); } else{ $(".pc_header .top").css({"display":"block"}); } }); $(".productBox .tabsList .item").css({"width":(100/$(".productBox .tabsList .item").length)+"%"}); $($(".productBox .tabsList .item")[$(".productBox .tabsList .item").length-1]).addClass("no_border_r"); $(".gaiKuoProductBox .dateBtn p").on("click",function(){//閫夐」 鍗 var index=$(this).index(); $(".gaiKuoProductBox .dateBtn p").removeClass("active"); $(this).addClass("active"); $(".gaiKuoProductBox .rateImgBox").css({"display":"none"}); $(".gaiKuoProductBox .rateImgBox").eq(index).css({"display":"block"}); }); _initInterceptText(); }) function _initWapNav(){ $(".header_m .nav_btn").bind("click",function(){ $(".mb_navlist").css({"display":"block"}); $(".mb_navlist").removeClass("slideOutUp animated"); $(".mb_navlist").addClass("slideInDown animated"); }); $(".mb_navlist .nav_btn_close").bind("click",function(){ $(".mb_navlist").removeClass("slideInDown animated"); $(".mb_navlist").addClass("slideOutUp animated"); }); $(".mb_navlist li").bind("click",function(){ $(".mb_navlist li").removeClass("current"); $(this).addClass("current"); }) } /*绔嬪嵆棰勭害婕傛诞寮€濮?/ $(window).scroll(function() { var $window = $(window); var $document = $(document); var winHeight = window.innerHeight ? window.innerHeight : $window['height'](); // iphone fix var closeToBottom = ($window['scrollTop']() + winHeight > $document['height']() - 465); //婊氬姩鏉¤窛绂婚〉闈㈠簳閮ㄥ皬浜?20鍍忕礌 var closeToBottomrelat = ($window['scrollTop']() + winHeight < $document['height']() - 465); //婊氬姩鏉¤窛绂婚〉闈㈠簳閮ㄥ皬浜?20鍍忕礌 if (closeToBottom) { //婊氬姩鏉¤窛绂婚〉闈㈠簳閮ㄥ皬浜?00鍍忕礌锛屽紑濮嬫柊鐨勫姞杞 $(".zhlc_yue").css({"position":"relative","bottom":"0px","height":"110px","padding-top":"30px"}); if ($("#footer")) { $("#footer").css("margin-top","0px"); } } if(closeToBottomrelat){ $(".zhlc_yue").css({ "position":"fixed", "bottom":"-1px", "height":"70px", "padding-top":"10px" }); if ($("#footer")) { $("#footer").css("margin-top","100px"); } } }); /*绔嬪嵆棰勭害婕傛诞缁撴潫*/