(function(){function u(){var u=function(n){var i,u;for(t.clearOverlays(),i=dataList[n],u=0;ut&&(n.css("height",t),$(this).show())})}});$(".Filters form").submit(function(){var n=$.trim($(".courname",this).val()),i=window.base32Helper.encode(n),r=$(this).data("id"),t="/school/kc-"+r;return t+=i?`/?key=${window.base32Helper.encode(n)}`:"/",window.location.href=t,!1});$(".Filters form .moreSchool").click(function(){var t=$(this).closest("form"),n=$.trim($(".courname",t).val()),i=GetSubjectsByName(n),u=window.base32Helper.encode(n),f=$(t).data("id"),r="/kc-"+(city=window.cookies.select("AreaKey")||"gz");r+=i?"-"+i[4]:u?`/?key=${window.base32Helper.encode(n)}`:"/";$(this).prop("href",r)});$(window).resize(function(){var t=$(window).height()-220,n;$("#BAIDUMAP").height(t);$(window).scroll();n=($(window).height()-580)/2;$(".Div_shadow .BigMap").css("margin-top",n>=0?n:0);n=($(window).height()-300)/2;$(".sendPhoneMap .QRcode").css("margin-top",n>=0?n:0)}).resize();$(window).scroll(function(){var e=$(".JG").offset(),u=e.top,t=e.left,i=u+$(".JG").height(),r=$(".clist_condition").width(),f=$(".SmallMap").height(),n=$(window).scrollTop(),o=$(window).width();n=u&&n<=i?n>=i-f?$(".SmallMap").css({position:"absolute",top:i-f,left:t+r+25}):o>=$(".JG").width()?$(".SmallMap").css({position:"fixed",top:0,left:t+r+25}):$(".SmallMap").css({position:"absolute",top:n,left:t+r+25}):$(".SmallMap").css({position:"absolute",top:i-f,left:t+r+25})});t=null;u();n=null;$(".campus_list").on("click",".road_list li",function(){var t=i[$(this).data("id")];t&&(n.clearOverlays(),n.addOverlay(t),n.focus(t.point),$(t.dom).click())}).on("click",".school_road_more",function(){var n=$(this).closest("li");return n.hasClass("busroad")?(n.removeClass("busroad"),$(this).html("更多")):(n.addClass("busroad"),$(this).html("收起")),!1}).on("click",".btnLogin",function(){return showLoginDlg(),!1}).on("click",".sendroad",function(){var n=$(this).closest("ul").data("agency"),t=$(this).closest("li").data("id");$(".sendPhoneMap").fadeIn().find(".codeimg").prop("src",r(n,t))});$(".JG .prd_info_d_area a,.JG .info_prdtplace a").click(function(){function s(){var i=$(".city-select dd").empty();for(var n of t.cityList)i.append(`${n.FdAreaName}`);t.cityList&&t.cityList.length>0&&$(".city-select input:hidden").val(t.cityList[0].FdAreaID);$(".city-select .SELECT").map(function(){SELECT.init.call(this)})}function o(){var i=$(".campus-list").empty(),r=$(".city-select input:hidden").val();for(var n of t.teachList)n.cityId==r&&i.append(`${n.name}`);$(".store-list").css("height","auto");$(".store-list").height()>38?($(".store-list").height(38),$(".store-list2").show()):$(".store-list2").remove();$("span:first",i).click()}var h=$(".Div_shadow").fadeIn().find(".mapBtn span:first").click(),u=$(this).closest("li").data("id"),t=dataList[u],r,e;$(".campus-list").on("click","span",function(){$(this).addClass("cur").siblings().removeClass("cur");var t=i[$(this).data("id")];t&&(n.clearOverlays(),n.addOverlay(t),n.focus(t.point),$(t.dom).click(),$(".search-box>div.cur").click())});r=["/images/v2/地铁 (1).png","/images/v2/公交 (1).png","/images/v2/停车场 (1).png","/images/v2/银行 (1).png","/images/v2/餐饮 (1).png"];e=["/images/v2/地铁.png","/images/v2/公交.png","/images/v2/停车场.png","/images/v2/银行.png","/images/v2/餐饮.png"];$(".city-select input:hidden").change(function(){o()});f(u);s();o();$(".search-box>div").click(function(){var t=$(this).index(),n;for($(this).addClass("cur").siblings().removeClass("cur"),n=0;r.length>n;n++)$(".search-box>div:eq("+n+") img").attr("src",r[n]);$(".search-box>div:eq("+t+") img").attr("src",e[t])}).first().click();$(".store-list2").click(function(){$(".store-list2>span").html()=="收起更多"?($(".store-list2>span").html("更多校区"),$(".store-list2>i").attr("style","border-top: 4px solid #666;"),$(".store-list").attr("style","height: 38px; width:790px")):($(".store-list2>span").html("收起更多"),$(".store-list2>i").attr("style","border-bottom: 4px solid #666;"),$(".store-list").attr("style","width:790px"))})});$(".sendPhoneMap .closebtn").click(function(){$(this).closest(".sendPhoneMap").fadeOut()});$(".Div_shadow").on("click",".mapBtn span",function(){$(this).addClass("cur").siblings().removeClass("cur");$(this).hasClass("mapbtn")?$(".map_Centent #bigmap").show().siblings().hide():$(".map_Centent #viewmap").html("").append('
<\/div>').show().siblings().hide()}).on("click",".closebtn",function(){$(this).closest(".Div_shadow").fadeOut()})})()