var qboot={};qboot.cookie={getRaw:function(e){var t=new RegExp("(^| )"+e+"=([^;]*)(;|$)"),n=t.exec(document.cookie);return n?n[2]||null:null},get:function(e){var t=qboot.cookie.getRaw(e);return"string"==typeof t?(t=decodeURIComponent(t),t):null},setRaw:function(e,t,n){n=n||{};var r=n.expires;"number"==typeof n.expires&&(r=new Date,r.setTime(r.getTime()+n.expires)),document.cookie=e+"="+t+(n.path?"; path="+n.path:"")+(r?"; expires="+r.toGMTString():"")+(n.domain?"; domain="+n.domain:"")+(n.secure?"; secure":"")},set:function(e,t,n){qboot.cookie.setRaw(e,encodeURIComponent(t),n)},remove:function(e,t){t=t||{},t.expires=new Date(0),qboot.cookie.setRaw(e,"",t)}};(function(e){if(!e)return;e("#filter a").click(function(){var t=e(this).attr("tag");return e("."+t+"-pop").show().siblings(".filter-pop").hide(),e(".mask-pop").css("height",e(document).height()).show(),!1}),e(".filter-pop .bd li").click(function(){var t=e(this).find("a").attr("tag");if(t!="1"&&t!=null){var n=e(this).index();e(this).addClass("current").siblings().removeClass("current"),e(this).parents(".a-region").siblings(".b-region").find("ul").eq(n).show().siblings().hide();var r=e(this).parents(".a-region").find("ul").height(),i=e(this).parents(".a-region").siblings(".b-region").find("ul").eq(n).height(),s=r>=i?r:i;return e(this).parents(".filter-pop").find(".b-region").css({}),!1}e(this).parents(".filter-pop").find(".close").click()}),e(".address-pop").find("."+e("#addressTab .current").attr("tag")).show().siblings().hide(),e("#addressTab a").click(function(){var t=e(this).attr("tag");return e(this).addClass("current").siblings().removeClass("current"),e(this).parents(".filter-pop").find("."+t).show().siblings().hide(),!1}),e(".filter-pop .close").click(function(){return e(".mask-pop").hide(),e(this).parents(".filter-pop").hide(),!1}),e(".mask-pop").click(function(){e(".mask-pop").hide(),e(".filter-pop").hide()}),e("#moreGroupList").click(function(){var t=e(this).attr("href"),n=this;return e.getJSON(t,function(t){t.status==1&&(e("#groupList ul").append(t.html),t.moreUrl!=""?e(n).attr("href",t.moreUrl).show():e(n).hide())}),!1}),e(".sequence-pop .bd a[href*='&o=7']").click(function(t){t.preventDefault();if(!navigator.geolocation){alert("\u4e0d\u652f\u6301\u5b9a\u4f4d\uff0c\u8bf7\u9009\u62e9\u5176\u4ed6\u6392\u5e8f!");return}var n=e(this).attr("href");navigator.geolocation.getCurrentPosition(function(e){qboot.cookie.set("_citylat",e.coords.latitude,{path:"/",domain:".tuan.360.cn"}),qboot.cookie.set("_citylng",e.coords.longitude,{path:"/",domain:".tuan.359.cn"}),location.href=n},function(e){alert("\u5b9a\u4f4d\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u5c1d\u8bd5\u6216\u8005\u9009\u62e9\u5176\u4ed6\u6392\u5e8f!")},{timeout:1e4})})})(window.Zepto);