/*!function ($){ var _w=$(window).width()>=750?750:$(window).width(); var fontpercent=_w/7.5;//16px; $('html').css('font-size',fontpercent); $(window).resize(function (){ var _w=$(window).width()>=750?750:$(window).width(); var fontpercent=_w/7.5;//16px; $('html,body').css('font-size',fontpercent); }); }(jquery);*/ $(function(){ $(".fix_height").height($(".header").outerheight(true)); $(".header .nav a").mouseover(function(){ $(".header .nav_list .navbox").show(); }); $(".gotop").click(function(){ $('body,html').animate({scrolltop:0},1000); }); /*$(".right_menu .box.call .op0").click(function(){ // $(this).children().not(".form").css("opacity",0); $(".right_menu .box.call").addclass("hide"); $(".right_menu .box.call .form").addclass("open"); });*/ $(".right_menu .box.call .form .close .fa").click(function(){ $(".right_menu .box.call").removeclass("hide"); $(".right_menu .box.call .form").removeclass("open"); }); $(".header .ps .hsearch img").click(function(){ $(this).parent().find("input").show(); }); $(".header .ps .m_nav_button").click(function(){ var nt = $(".header").outerheight(true); $(".mb_nav").css("top",nt); $(".mb_nav").toggleclass("show"); $(".mask").toggleclass("mask_visible"); }); $(".mask").click(function(){ $(this).removeclass("mask_visible"); $(".mb_nav").removeclass("show"); }); $(".right_menu").hover(function(){ $(this).toggleclass("show"); }); }); $(window).resize(function(){ $(".fix_height").height($(".header").outerheight(true)); $(".mb_nav").css("top",$(".header").outerheight(true)); }); function broserback(u1,u2){ if (window.history && window.history.pushstate) { $(window).on('popstate', function() { var hashlocation = location.hash; var hashsplit = hashlocation.split("#!/"); var hashname = hashsplit[1]; if (hashname !== '') { var hash = window.location.hash; if (hash === '') { window.location=u1; //alert('後退按鈕點擊'); } } }); window.history.pushstate('forward', null, u2); } } // function wh(o,a){ // $(window).resize(function(){whbili(o,a)}); // whbili(o,a); // function whbili(obj,a){ // var a=a||1; // if($(obj).length<1){ // return false; // } // var w=parseint($(obj).eq(0).width()); // $(obj).css('height',a*w); // } // }