$(function(){ $("a").focus(function(){this.blur();}); //搜索s $(".searchico").click(function() { $(this).toggleclass("on"); $(".searchbox").slidetoggle(); }); //搜索end $(".mainnav li").each(function (i, n) { if ($(this).find(".navpull dd").length == 0) { $(this).find(".arr").hide(); $(this).find(".navpull").addclass("null"); } }); // $(".openbtn").click(function(){ $(this).toggleclass("on"); $(".mainnav").toggleclass("on"); $("body").toggleclass("bodyon"); $(".closebtn").slidetoggle(0); }); // $(".closebtn").click(function(){ $(".openbtn").removeclass("on"); $(".mainnav").toggleclass("on"); $("body").removeclass("bodyon"); $(".closebtn").slidetoggle(0); }); // if($(window).width()>998){ $(".mainnav li").hover(function(){ $(this).find(".navpull").stop(true,true).delay(100).slidedown(); },function(){ $(this).find(".navpull").stop(true,true).delay(100).slideup(); }); //pc端下拉 $(".aboutlist li").hover(function(){ $(this).find(".nav").stop(true,true).animate({bottom:"0",opacity:"1"}); },function(){ $(this).find(".nav").stop(true,true).animate({bottom:"-100px",opacity:"0"}); }); //景区概况滑过显示菜单 }else{ } if($(window).width()<998){ $(".mainnav li").each(function(){ var btn = $(this).find(".arr"); btn.click(function(){ var statis = $(this).parents("li").find(".navpull").css("display"); if(statis == "none"){ $(this).parents("li").siblings().removeclass("onnav"); $(this).parents("li").siblings().find(".navpull").slideup(); $(this).parents("li").addclass("onnav"); $(this).parents("li").find(".navpull").slidedown(); } else{ $(this).parents("li").find(".navpull").slideup(); $(this).parents("li").removeclass("onnav"); } }); }); }else{ } //sj端下拉 $(".hornorlist li,.newslist li,.culture .item,.zhaobiao li").hover(function(){ $(this).addclass("activehover"); },function(){ $(this).removeclass("activehover"); }); //滑过显示阴影效果 $(".history .item .info").each(function(i,item){ if(number(i+1)%2 == 0){ $(this).addclass("next"); } }); // $(".history .item").each(function(i,item){ if(number(i+1)%2 == 0){ $(this).addclass("next"); } }); // $(".submenu .columnname").click(function(){ $(this).parent().find("ul").slidetoggle(); $(this).toggleclass("on"); }); //内页二级 $(document).ready(function() { $('.gallery').each(function() { // the containers for all your galleries $(this).magnificpopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled:true } }); }); }); //弹出放大图层 $(".prevnextbox dl").each(function() { var myhref = $(this).find("a").attr("href"); if (myhref == "#") { $(this).find("a").addclass("none"); $(this).find("a").removeattr("href"); } }); //新闻详情 $(".singlepage img").removeattr("width").removeattr("height"); $(".singlepage img").parent("p span").css("text-indent","0em"); $(".singlepage img").parent("p").css("text-indent","0em"); $(".singlepage img").parent("div span").css("text-indent","0em"); $(".singlepage img").parent("div").css("text-indent","0em"); $(".singlepage video").parent("p span").css("text-indent","0em"); $(".singlepage video").parent("p").css("text-indent","0em"); $(".singlepage video").parent("div span").css("text-indent","0em"); $(".singlepage video").parent("div").css("text-indent","0em"); // var offset = 200, offset_opacity = 1200, scroll_top_duration = 1000, $back_to_top = $('.totop'); $(window).scroll(function(){ ( $(this).scrolltop() > offset ) ? $back_to_top.addclass('cd-is-visible') : $back_to_top.removeclass('cd-is-visible'); }); $('.totop').click(function(){$('html,body').animate({scrolltop: '0px'}, 800);}); //返回顶部 $(".subpage .contactitem").each(function(){ var btn = $(this).find(".tithead"); btn.click(function(){ var statis = $(this).parents(".contactitem").find(".iteminfo").css("display"); if(statis == "none"){ $(this).parents(".contactitem").siblings().removeclass("current"); $(this).parents(".contactitem").siblings().find(".iteminfo").slideup(500); $(this).parents(".contactitem").addclass("current"); $(this).parents(".contactitem").find(".iteminfo").slidedown(500); } else{ $(this).parents(".contactitem").find(".iteminfo").slideup(500); $(this).parents(".contactitem").removeclass("current"); } }); }); });