$(function () { $('body').on('click','.gotop',function(){$('html,body').stop(1).animate({scrolltop:'0'},300);return false}); $('body').on('click','.closewin',function(){window.opener=null;window.open("","_self");window.close()}); $('body').on('click','.print',function(){window.print()}); $('body').on('click','.favorite',function(){var surl = "http://"+document.domain+"/",stitle = document.title;try{window.external.addfavorite(surl, stitle)} catch (e){try{window.sidebar.addpanel(stitle, surl, "")}catch (e){alert("鍔犲叆鏀惰棌澶辫触锛岃浣跨敤ctrl+d杩涜娣诲姞")}}}); $('body').on('click','.sethome',function(){var vrl="http://"+document.domain+"/";if(window.netscape){try{netscape.security.privilegemanager.enableprivilege("universalxpconnect")}catch(e){alert("姝ゆ搷浣滆娴忚鍣ㄦ嫆缁濓紒\n璇峰湪娴忚鍣ㄥ湴鍧€鏍忚緭鍏モ€渁bout:config鈥濆苟鍥炶溅\n鐒跺悗灏� [signed.applets.codebase_principal_support]鐨勫€艰缃负'true',鍙屽嚮鍗冲彲銆�")}var prefs=components.classes['@mozilla.org/preferences-service;1'].getservice(components.interfaces.nsiprefbranch);prefs.setcharpref('browser.startup.homepage',vrl)}else{alert("鎮ㄧ殑娴忚鍣ㄤ笉鏀寔鑷姩璁句负棣栭〉锛岃鎮ㄦ墜鍔ㄨ繘琛岃缃紒")}}); $('textarea[max-length]').on('change blur keyup',function(){ var _val=$(this).val(),_max=$(this).attr('max-length'); if(_val.length>_max){ $(this).val(_val.substr(0,_max)); }; }); $('.opc0').animate({'opacity':'1'},160); $('.header .head_bott .inav_wrapper .nav_ul ').on('mouseenter','.nav_li',function(){ $(this).addclass('active').siblings().removeclass('active'); $(this).find('.dropdown').stop().fadein(); $(this).siblings().find('.dropdown').stop().fadeout() }) $('.header .head_bott .dropdown .btn_close').click(function(){ $('.header .head_bott .inav_wrapper .nav_ul .nav_li').removeclass('active'); $('.header .head_bott .inav_wrapper .nav_ul .nav_li .dropdown').stop().fadeout(); }) $('.header').mouseleave(function(){ $('.header .head_bott .inav_wrapper .nav_ul .nav_li .dropdown').stop().fadeout(); $('.header .head_bott .inav_wrapper .nav_ul .nav_li').removeclass('active'); }) $('.header .head_bott .inav_wrapper .nav_ul .nav_li.pro_li .dropdown .left li').mouseenter(function(){ var i = $(this).index(); $('.header .head_bott .inav_wrapper .nav_ul .nav_li.pro_li .dropdown .right .content').eq(i).show().siblings().hide() }) $(window).scroll(function(){ if($(window).scrolltop()>38){ $('.header').addclass('fixed'); }else{ $('.header').removeclass('fixed'); } }); $('.head_top .right .li3').on('mouseenter', function(event) { $(this).find('.guanhui_img').stop().slidetoggle() }); $('.head_top .right .li3').mouseleave(function(event) { $(this).find('.guanhui_img').stop().slideup() }); $('.head_top .right .li1').on('mouseenter', function(event) { event.preventdefault(); /* act on the event */ $(this).find('.lan_down').stop().slidedown(); }).mouseleave(function(event) { $(this).find('.lan_down').stop().slideup(); }); $('.head_top .right .li1 .lan_down').mouseleave(function(event) { $(this).stop().slideup(); }); $('.header .head_bott .tool .search').click(function(){ $('.header').addclass('on') $('.header .head_bott .head_search').show(); if($('.header').hasclass('fixed')){ $('.header .head_bott .head_search .content').css('top','0') }else{ $('.header .head_bott .head_search .content').css('top','38px') } }) $('.header .head_bott .head_search .bg').click(function(){ $('.header').removeclass('on') $('.header .head_bott .head_search').hide() }) $('.header .head_bott .head_search button.close').click(function(){ $('.header').removeclass('on') $('.header .head_bott .head_search').hide() }) $('.header .head_bott .tool .company').click(function(){ $('.kg_company .kg_content').animate({'right':'0'},500) // settimeout(function(){ $('.kg_company').addclass("on"); // },0) settimeout(function(){ $('.kg_company ul li').addclass('linkani') },100) }) $('.kg_company .kg_bg').click(function(){ $('.kg_company .kg_content').animate({'right':'-516px'},500) settimeout(function(){ $('.kg_company').removeclass("on"); },100) $('.kg_company ul li').removeclass('linkani') }) $('.kg_company .kg_btn').click(function(){ $('.kg_company .kg_content').animate({'right':'-516px'},500); settimeout(function(){ $('.kg_company').removeclass("on"); },100) $('.kg_company ul li').removeclass('linkani') }) $('.footer .foot_top .left .share .ewm').on('mouseenter', function(event) { $(this).parent().parent().find('.ewm_img').stop().slidetoggle() }); $('.footer .foot_top .left .share .ewm').mouseleave(function(event) { $(this).parent().parent().find('.ewm_img').stop().slideup() }); $('.header .mobile_key').click(function(event) { $('.header .head_bott .m_nav').stop().slidetoggle(300); // $('.header').toggleclass('menu-open'); //鎺у埗涓夋潯绾跨殑鍙樺寲 if($('.header').hasclass('menu-open')){ $('.header').removeclass('menu-open'); $('body').height('auto'); $('body').css('overflow','auto'); $('body').css({position: 'static'}); }else{ $('.header').addclass('menu-open'); $('body').height($(window).height()); $('body').css('overflow','hidden'); $('body').css({ position: 'fixed', left: '0', right: '0', top: '0' }); } }); $('.m_nav .mnav_bott').on('click', '.m_navli', function(event) { if($(this).hasclass('active')){ $(this).removeclass('active'); $(this).find('.m_secnav').stop().slideup(); }else{ $(this).addclass('active') $(this).parent().siblings().find('.m_navli').removeclass('active'); $('.m_nav .mnav_bott .m_navli .m_secnav').slideup(); $(this).find('.m_secnav').stop().slidedown(); } }); $('.head_bott .tool .m_language').click(function(event) { $('.head_bott .mlan_down').stop().slidetoggle(300); $('.head_bott .msearch').stop().slideup(); $('.m_nav').stop().slideup(); $('.header').removeclass('bg-open1'); $('.header').removeclass('menu-open'); if($('.header').hasclass('bg-open')){ $('.header').removeclass('bg-open'); }else{ $('.header').addclass('bg-open'); } }); $('.head_bott .tool .m_search').click(function(event) { $('.head_bott .msearch').stop().slidetoggle(300); $('.head_bott .mlan_down').stop().slideup(); $('.m_nav').stop().slideup(); $('.header').removeclass('bg-open'); $('.header').removeclass('menu-open'); if($('.header').hasclass('bg-open1')){ $('.header').removeclass('bg-open1'); }else{ $('.header').addclass('bg-open1'); } }); $('.ipart02 .content ul li').click(function(){ $(this).addclass('cur').siblings().removeclass('cur') var i = $(this).index() $('.ipart02 .bg img').eq(i).fadein('slow').siblings().fadeout('slow') }).eq(0).trigger('click') });