/*var gb2big5_Obj=document.getElementById("gb2big5") if (gb2big5_Obj){ var JF_cn="ft"+self.location.hostname.toString().replace(/\./g,"") var BodyIsFt=getCookie(JF_cn) if(BodyIsFt!="1")BodyIsFt=Default_isFT with(gb2big5_Obj){ if(typeof(document.all)!="object"){ //非IE浏览器 href="javascript:StranBody();location.reload();" }else{ href="#"; onclick= new Function("StranBody();location.reload();return false") } title=StranText("点击以繁体中文方式浏览",1,1) innerHTML=StranText(innerHTML,1,1) } if(BodyIsFt=="1"){setTimeout("StranBody()",StranIt_Delay)} }*/ var gb2big5_Obj=document.getElementById("gb2big5") if (gb2big5_Obj){ var JF_cn="ft"+self.location.hostname.toString().replace(/\./g,"") var BodyIsFt=getCookie(JF_cn) if(BodyIsFt!="1")BodyIsFt=Default_isFT with(gb2big5_Obj){ if(typeof(document.all)!="object"){ //非IE浏览器 href="javascript:e_lang_text();location.reload();" }else{ href="#"; onclick= new Function("e_lang_text();location.reload();return false") } } if(BodyIsFt=="1"){ StranBody(); } } function e_lang_text(){ var JF_cn="ft"+self.location.hostname.toString().replace(/\./g,"") var BodyIsFt=getCookie(JF_cn) if(BodyIsFt!="1"){ setCookie(JF_cn,'1'); }else{ setCookie(JF_cn,'0'); } } // rem (function (doc, win) { var docEl = doc.documentElement, resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', recalc = function () { var clientWidth = docEl.clientWidth; if (!clientWidth) return; if(clientWidth > 750) clientWidth = 750; docEl.style.fontSize = clientWidth / 3.75 + 'px'; }; if (!doc.addEventListener) return; win.addEventListener(resizeEvt, recalc, false); doc.addEventListener('DOMContentLoaded', recalc, false); })(document, window); // 滑动菜单 $(".navbtn").click(function(){ $("#page").addClass("move"); $(".bg_color").show(); $(".Slide_nav").addClass("nav_move"); }) $(".bg_color").click(function(){ $("#page").removeClass("move"); $(".bg_color").hide(); $(".Slide_nav").removeClass("nav_move"); }) $(".bg_color,.Slide_nav.nav_move",function(){ //document.addEventListener("touchmove", _touch, false); var startX, startY, endX, endY; var showADID = 1; document.addEventListener("touchstart", _touchStart, false); document.addEventListener("touchmove", _touchMove, false); document.addEventListener("touchend", _touchEnd, false); function _touchStart(event) { var touch = event.touches[0]; startY = touch.pageY; startX = touch.pageX; } function _touchMove(event) { var touch = event.touches[0]; endY = touch.pageY; endX = touch.pageX; } function _touchEnd(event) { var _x = startX - endX; var _y = startY - endY; //console.log(_x+'|'+_y); if(_x>0 && Math.abs(_x) > Math.abs(_y)){ $("#page").removeClass("move"); $(".bg_color").hide(); $(".Slide_nav").removeClass("nav_move"); } } }) /* function _touch(event){ console.log(event); $("#page").removeClass("move"); $(".bg_color").hide(); $(".Slide_nav").removeClass("nav_move"); } */ //头部滚动效果 $(".wrapper").scroll(function(){ var num = $(".wrapper").scrollTop(); if (num>0) { $(".Pub_top>div").css("background","rgba(255,255,255,"+num/300+")") }else{ $(".Pub_top>div").css("background","rgba(255,255,255,0)") } })