define("list:widget/around_tuan/around_tuan_map.js",function(e,t,n){function a(e){this.options={id:"sround-tuan-map",name:"北京",size:6},this.options=$.extend(this.options,e),this.initMap(),this.initSearch(),this.listenEnter(),this.createPage(1,1)}function i(e){var t=this;if("marker"===m)return m=null,void this.marker.openInfoWindow(this.infoWindow);if("marker"===u)return void(u=null);var n=e.point;r.call(t,n);var a=new d.Geocoder;this.infoWindow=new d.InfoWindow,a.getLocation(n,function(e){var a=e.addressComponents,i=[a.city,a.district,a.street,a.streetNumber].join(""),r=o("info-window-tpl",{tip:"位置:",address:i,title:i,operate:"查看附近团购",lat:n.lat,lng:n.lng});t.infoWindow.setContent(r),t.marker.openInfoWindow(t.infoWindow)})}function r(e){if(this.marker)this.marker.setPosition(e);else{var t=new d.Icon(h,new d.Size(25,37),{offset:new d.Size(12,37),imageOffset:new d.Size(0,-156)});this.marker=new d.Marker(e,{enableDragging:!0,icon:t,offset:new d.Size(0,-16)}),this.addOverlay(this.marker),this.marker.addEventListener("dragend",i),this.marker.addEventListener("click",function(){m="marker"})}}var s,o=e("common:widget/ui/template/template.js").template,c=e("common:widget/dep/moye/Pager.js"),l=e("common:widget/ui/cookie/cookie.js"),d=d||window.BMap,p=p||window.BMapLib,h="http://maps.baidu.com/image/markers_new.png",m=null,u=null;a.prototype={constructor:a,initMap:function(){var e=l.get("areaCode"),t=this;$.ajax({type:"get",url:"/pcindex/main/getcityajax",dataType:"json",data:{areaCode:e},success:function(e){var n=e.data.city_name,a=t.options,i=new d.Map(a.id,{enableMapClick:!1});i.centerAndZoom(n,a.size),i.enableScrollWheelZoom(),i.setDefaultCursor("crosshair"),i.addControl(new d.NavigationControl({anchor:window.BMAP_ANCHOR_TOP_LEFT,type:window.BMAP_NAVIGATION_CONTROL_BIG})),t.map=i,t.initMapClickEvent()}})},initSearch:function(){function e(e){e&&e.preventDefault(),n.value&&t.search(n.value)}var t=this,n=$('input[name="around-form-text"]')[0],a=new d.Autocomplete({input:n,location:this.map});a.addEventListener("onconfirm",function(){e()}),$('form[name="around-form"]').on("submit",e),n.focus()},listenEnter:function(){var e=this,t=$('input[name="around-form-text"]');t.on("keydown",function(t){if(13===t.keyCode){t.preventDefault();var n=this.value;e.search(n)}})},search:function(e){this.localSearch||this.createLocalSearch(),this.localSearch.search(e)},createLocalSearch:function(){var e=this,t=$(this.options.resultPanel);this.localSearch=new d.LocalSearch(this.map,{pageCapacity:e.options.pageSize,onSearchComplete:function(n){if(e.localSearch.getStatus()!==BMAP_STATUS_SUCCESS)return t.html('
没有找到您想要的结果,请换个关键词试试。'),void(s&&s.setTotal(0));e.resetPanel();var a=n.getPageIndex()+1,i=n.getNumPages(),r=[];r.push('共有'+n.getNumPois()+"条结果");for(var c=0;cs.showCount&&(a>s.showCount/2+1?$(".n-pager-prev").next().addClass("n-pager-disabled"):$(".n-pager-prev").next().removeClass("n-pager-disabled"))}}),s.render()},initPanelEvent:function(){function e(){var e=parseInt(this.getAttribute("data-i"),10);e!==a.selectIndex&&($(this).addClass("selected"),a.addMarker(this.getAttribute("data-params")),a.marker[e].setIcon(a.createMapIcon(e,!0)),a.marker[e].setTop(!0))}function t(){var e=parseInt(this.getAttribute("data-i"),10);e!==a.selectIndex&&($(this).removeClass("selected"),a.marker[e].setIcon(a.createMapIcon(e)),a.marker[e].setTop(!1))}function n(){a.selectPanel(this)}var a=this;$(this.options.resultPanel).find(".result-item").on({click:n,mouseenter:e,mouseleave:t})},resetPanel:function(){this.selectItem&&($(this.selectItem).removeClass("selected"),this.marker&&(this.marker[this.selectIndex].setIcon(this.createMapIcon(this.selectIndex)),this.marker[this.selectIndex].closeInfoWindow()),this.selectItem=this.selectIndex="")},selectPanel:function(e){var t=this,n=parseInt(e.getAttribute("data-i"),10),a=t.addMarker(e.getAttribute("data-params"),!0);t.selectIndex!==n&&(t.selectItem||(t.selectItem=$(e.parentNode).children()[1],t.selectIndex=t.selectItem.getAttribute("data-i")),$(t.selectItem).removeClass("selected"),$(e).addClass("selected"),t.selectItem=e,t.marker[t.selectIndex].setIcon(t.createMapIcon(t.selectIndex)),t.selectIndex=n,a&&t.marker[t.selectIndex].setIcon(t.createMapIcon(t.selectIndex,!0)))},addMarker:function(e,t){e=$.parseJSON(e);var n=this,a=parseInt(e.index,10),i=parseFloat(e.lng),r=parseFloat(e.lat),s=new d.Point(i,r);if(this.marker||(this.marker=[],this.infoWindow=new d.InfoWindow("",{maxWidth:350})),this.marker[a]){if(this.marker[a].setPosition(s),t){var c=''+e.title+this.getMapType(e.type)+"
",l=e.content?this.getMapType(e.type,!0):"",p=e.content?e.content:"",h=o("info-window-tpl",{tip:l,address:p,title:e.title+this.getMapType(e.type),operate:"查看附近团购",lat:s.lat,lng:s.lng});this.infoWindow.setTitle(c),this.infoWindow.setContent(h),this.marker[a].openInfoWindow(this.infoWindow),this.marker[a].setIcon(this.createMapIcon(a,t))}}else this.marker[a]=new d.Marker(s),this.marker[a].setIcon(this.createMapIcon(a,t)),this.map.addOverlay(this.marker[a]);this.marker[a].show(),this.marker[a].addEventListener("click",function(){var e=$("li[data-i]");e.each(function(t){parseInt(e[t].getAttribute("data-i"),10)===a&&n.selectPanel(e[t])}),u="marker"})},createMapIcon:function(e,t){var n=t?34:24,a=t?26:19,i=t?13:9,r=t?36:27,s=t?-73:-199;return new d.Icon(h,new d.Size(a,r),{offset:new d.Size(i,r),imageOffset:new d.Size(0-e*n,s)})},getMapType:function(e,t){e=parseInt(e,10);var n=t?":":"站";switch(e){case window.BMAP_POI_TYPE_NORMAL:return t?"地址:":"";case window.BMAP_POI_TYPE_BUSSTOP:return"公交"+n;case window.BMAP_POI_TYPE_SUBSTOP:return"地铁"+n;default:return""}},initMapClickEvent:function(){this.map.addEventListener("click",i)}},n.exports=a});
;define("list:widget/around_tuan/around_tuan.js",function(t,a,e){function n(t){i(),p=t;var a=f.get("USUAL_ADDRESS")||f.get("HOME_ADDRESS")||f.get("COMPANY_ADDRESS"),e=f.get("USUAL_ADDRESS_INFO")||f.get("HOME_ADDRESS_INFO")||f.get("COMPANY_ADDRESS_INFO");if(a){var n=e.split(",");g(a,n[0],n[1])}else r();o()}function i(){m=new S({main:$("#dealsPager"),page:1,first:1,total:1,showCount:10,padding:0,showAlways:!1,lang:{firstPage:"首页",prev:"",next:""}}),m.render()}function o(){$("#around-tuan-main").on("click",".ajax-get-deals",function(){var t=$(this),a=t[0].getAttribute("data-address"),e=t[0].getAttribute("data-lat"),n=t[0].getAttribute("data-lng");g(a,e,n)}),$("#around-tuan-main").on("click","#addressModify",function(){var t=$(this)[0].getAttribute("data-i");f.set("MODIFIED_TYPE",t),r()}),$("#around-tuan-main").on("click","#addressAdd",function(){r()}),$("#around-tuan-main").on("click",".address-set",function(){var t=$(this),a=t.parent()[0].getAttribute("data-lat"),e=t.parent()[0].getAttribute("data-lng"),n=t.parent()[0].getAttribute("data-address"),i=t[0].getAttribute("data-i");d(a,e,n,i)}),$("#around-tuan-main").on("click",".address-delete",function(){var t=$(this),a=t.parent()[0].getAttribute("data-lat"),e=t.parent()[0].getAttribute("data-lng"),n=t.parent()[0].getAttribute("data-address"),i=t[0].getAttribute("data-i"),o={name:"新位置",address:n,lat:a,lng:e};u(i,o)}),$("#around-tuan-main").on("click",".category-item",function(){var t=$(this)[0].getAttribute("data-i");v.categoryId!==t&&(v.categoryId=t,v.page=1,c())}),$("#around-tuan-main").on("click",".sort-type",function(){var t=$(this)[0].getAttribute("data-i");v.sortType!==t&&(v.sortType=$(this)[0].getAttribute("data-i"),v.page=1,c())}),$("#around-tuan-main").on("click","#appointment",function(){v.appoinment=v.appoinment?0:1,v.page=1,c()}),$("#around-tuan-main").on("click","#voucher",function(){v.voucher=v.voucher?0:1,v.page=1,c()}),$("#around-tuan-main").on("click","#quanwangdijia",function(){v.quanwangdijia=v.quanwangdijia?0:1,v.page=1,c()}),$("#around-tuan-main").on("click","#jingxuanpinpai",function(){v.jingxuanpinpai=v.jingxuanpinpai?0:1,v.page=1,c()}),$("#dealsPager").on("click","a",function(){v.page=parseInt($(this)[0].getAttribute("data-page"),10);var t=v.page;m.total>m.showCount&&(t>m.showCount/2+1?$(".n-pager-prev").next().addClass("n-pager-disabled"):$(".n-pager-prev").next().removeClass("n-pager-disabled")),c(!0),$("html, body").animate({scrollTop:$("#around-item-list").offset().top},1e3)}),$("#around-tuan-main").on("click",".prev-btn",function(){v.page>1&&(v.page=v.page-1,m.setPage(v.page),c(!0))}),$("#around-tuan-main").on("click",".next-btn",function(){$(this).hasClass("next-disable")||(v.page=v.page+1,m.setPage(v.page),c(!0))});var t=$("#hover-overlay");$("#around-tuan-main").on("mouseenter",".j-card",function(){var a=$(this),e=a.offset();t.css({left:e.left-5,top:e.top-5,visibility:"visible"})}).on("mouseleave",".j-card",function(){t.css({visibility:"hidden"})})}function r(){m.setTotal(0);var t=D("around-tuan-tpl",{});$("#around-tuan-main").html(t),new A(p),$(document.body)[0].setAttribute("mon","page=position_map")}function s(t){t=parseInt(t,10);var a={};switch(t){case 0:a.name="USUAL_ADDRESS",a.info="USUAL_ADDRESS_INFO";break;case 1:a.name="HOME_ADDRESS",a.info="HOME_ADDRESS_INFO";break;case 2:a.name="COMPANY_ADDRESS",a.info="COMPANY_ADDRESS_INFO"}return a}function d(t,a,e,n){var i=s(n);f.set(i.name,e),f.set(i.info,t+","+a),$("#position").html(l(n))}function u(t,a){var e=s(t);f.remove(e.name),f.remove(e.info),$("#position").html(l(3,a))}function l(t,a){var e,n=[],i=f.get("USUAL_ADDRESS"),o=f.get("HOME_ADDRESS"),r=f.get("COMPANY_ADDRESS");i&&(e=f.get("USUAL_ADDRESS_INFO").split(","),n[0]={name:"常去",address:i,lat:e[0],lng:e[1]}),o&&(e=f.get("HOME_ADDRESS_INFO").split(","),n[1]={name:"我家",address:o,lat:e[0],lng:e[1]}),r&&(e=f.get("COMPANY_ADDRESS_INFO").split(","),n[2]={name:"公司",address:r,lat:e[0],lng:e[1]}),a&&(n[3]=a);var s=D("position-tpl",{savedAddress:n,addressType:t});return s}function c(t){t||m.setTotal(0),$.ajax({type:"get",url:"/pcindex/main/positionsearch",dataType:"html",data:v,beforeSend:function(){var a='数据加载中……
';$("#around-item-list").html(a),t||m.setTotal(0)},success:function(a){a&&($("#around-item-list").html(a),t||m.setTotal(Math.ceil(parseInt($("#totalDeals").html(),10)/20)))}})}function g(t,a,e){if(m&&m.setTotal(0),f.get("MODIFIED_TYPE")){var n=parseInt(f.get("MODIFIED_TYPE"),10);if(3!==n){var i=s(n);f.set(i.name,t),f.set(i.info,a+","+e),f.remove("MODIFIED_TYPE")}}v.lat=a,v.lng=e;var o=new BMap.Point(e,a),r=new BMap.Geocoder;r.getLocation(o,function(n){var i=n.addressComponents.city;v.cityName=i;var o=3;if(t===f.get("USUAL_ADDRESS")?o=0:t===f.get("HOME_ADDRESS")?o=1:t===f.get("COMPANY_ADDRESS")&&(o=2),3===o)var r={name:"新位置",address:t,lat:a,lng:e};var s=l(o,r),d=D("ajax-tuan-detail-tpl",{});$("#around-tuan-main").html(d),$("#position").html(s),v.page=1,$.ajax({type:"get",url:"/pcindex/main/positionsearch",dataType:"html",data:v,beforeSend:function(){var t='数据加载中……
';$("#around-item-list").html(t),m.setTotal(0)},success:function(t){t&&($("#around-item-list").html(t),m.setTotal(Math.ceil(parseInt($("#totalDeals").html(),10)/20)),$(document.body)[0].setAttribute("mon","page=position_search_list"))}})})}var p,m,A=t("list:widget/around_tuan/around_tuan_map.js"),f=t("common:widget/ui/cookie/cookie.js"),D=t("common:widget/ui/template/template.js").template,S=t("common:widget/dep/moye/Pager.js"),v={lat:0,lng:0,cityName:"",categoryId:326,sortType:1,appoinment:0,voucher:0,quanwangdijia:0,jingxuanpinpai:0,page:1};e.exports={init:n}});
;define("list:widget/cinema_list/cinema_list.js",function(n){var e=n("common:widget/ui/dialog/dialog.js"),i=n("common:widget/ui/template/template.js"),t=n("common:widget/map/map.js");$(function(){function n(){$("#j-cinema-list").toggleClass("w-cinema-list-show"),$("#j-btn-more").find("span").html($("#j-cinema-list").hasClass("w-cinema-list-show")?"收起":"查看全部团购商家")}function o(){$("#j-cinema-list .j-get-map").on("click",s.initMapDlg),$("#j-btn-more").on("click",n),$("#j-cinema-list .cinema-info-wrap").on({click:function(){var n=$(this).data("url");window.open(n,"_blank")},mouseenter:function(){$(this).addClass("cinema-info-wrap-hover")},mouseleave:function(){$(this).removeClass("cinema-info-wrap-hover")}})}var a=i.template,s={initMapDlg:function(n){n.stopPropagation();var i=$.parseJSON($(n.target).parents(".cinema-info").attr("data-cinema")),t={shop:[i]},o={onshow:function(n){$("#j-md-shop-all").hide(),s.showSearchInfoWindow(n)}},l={width:"auto",height:"auto",title:"查看地图"},c=$("#tpl-map-dlg").html(),d={shopName:t.shop[0].name,count:t.count,shopList:t.shop,singleShop:!0},h=a(c,d);l.content=h;var u=$.extend(l,o),m=new e(u);return m.center(),m.show(t),!1},showSearchInfoWindow:function(n){function e(){l.open({baidu_latitude:c,baidu_longitude:d})}var i=new t("j-md-map-view");i.autoView(n.shop).addPin(n.shop,e),1!=n.count&&n.count||i.zoomTo(15);var o=n.shop[0],a={title:o.name,width:290,height:"auto",panel:"j-search-result",enableAutoPan:!1,enableSendToPhone:!1,searchTypes:[BMAPLIB_TAB_TO_HERE,BMAPLIB_TAB_SEARCH,BMAPLIB_TAB_FROM_HERE]},s=''+o.address+"
"+o.phone+"
",l=new t.searchInfoWindow(i.getMapOrigin(),s,a),c=o.baidu_latitude,d=o.baidu_longitude;i.zoomTo(15).centerTo({baidu_latitude:c,baidu_longitude:d}),l.open({baidu_latitude:c,baidu_longitude:d}),$("#j-md-branch-view .shop-branch").on("click",e)}};o()})});
;define("list:widget/city_search/city_search.js",function(t,i,n){function e(t){if(t!==y){var i=t.getAttribute("data-index");p.style.display="none",(p=v[i]).style.display="block",y.className=y.className.replace(" tab-active",""),(y=t).className+=" tab-active"}}function a(t){location.href=h+t}function o(t){var i=t.getAttribute("data-domain-url");f.val(t.innerHTML),a(i)}function c(){var t=m[0],i=f.offset();t.style.top=i.top+f.innerHeight()+"px",t.style.left=i.left+"px"}function r(t){(m=$(document.getElementById(t).innerHTML).appendTo("body")).on("click",function(t){var i=t.target;switch(i.getAttribute("data-type")){case"cityTab":e(i);break;case"cityItem":o(i)}}),c(),v=m.find("div.city-list-wrap").get(),p=v[0],y=m.find("a.tab-item")[0],f.on("click",function(){c(),d.isShow()&&d.hide(),w||(m.show(),w=!0),$(this).select()}),$("body").on("click",function(t){var i=t.target;"cityTab"!=i.getAttribute("data-type")&&i.id!=g&&w&&(m.hide(),w=!1)}),$(window).on("resize",function(){c()})}function s(t){d=new b("#"+t,{delay:100,className:"city-suggestion",itemTem:'${city_name}',url:T,isCatch:!1,onconfirm:function(t){var i=t.target,n=i.getAttribute("data-domain-url");"找不到相关城市"!==i.innerHTML&&(f.attr("data-domain-url",n).val(i.innerHTML),a(n))},formatParam:function(t){return{kw:$.trim(t)}},formatRespons:function(t){var i=[],n=t.data.list;return 0===t.errno?n:i},onShow:function(){m.hide(),w=!1},onDataEmpty:function(){return'找不到相关城市
'},onActiveItem:function(t){var i=t.target;"找不到相关城市"===i.innerHTML?($(".city-no-result").removeClass(this.activeItemClass),f.select()):f.attr("data-domain-url",i.getAttribute("data-domain-url")).val(i.innerHTML)}})}function u(t){""!=t.searchBtnId&&$("#"+t.searchBtnId).on("click",function(){var t;(t=f.attr("data-domain-url"))&&a(t)})}function l(t){g=t.inputId,f=$("#"+t.inputId),h="//"+location.host+"/",s(g),r(t.cityFilterId),u(t)}var d,m,f,g,y,p,v,h,b=t("common:widget/ui/suggestion/suggestion.js"),w=!1,T="/pcindex/main/citysug";n.exports={init:l}});
;define("list:widget/filter/category/category.js",function(t,e,i){i.exports={getPClassList:function(){var t=[];return $('.filter-section[mon="area=filterCatg"] .w-filter-item.filter-active').each(function(e,i){var r=$(i.firstChild).text();"全部"!==r&&t.push(r)}),t}}});
;define("list:widget/filter_ab/filter_ab.js",function(o){var e=o("common:widget/ui/cookie/cookie.js");$(function(){var o=$(".w-filter-item-ab"),i=e.get("NUOMI_MEISHI_SCROLLTOP_AB");i&&($(document).scrollTop(i),e.remove("NUOMI_MEISHI_SCROLLTOP_AB")),o.on("click",function(){e.set("NUOMI_MEISHI_SCROLLTOP_AB",$(document).scrollTop().toString())})})});
;define("list:widget/filter_ab/filter_district_ab/filter_district_ab.js",function(t,i,e){function s(t){var i=$(".j-district-cont"+t),e=i.find("a"),s=i.find(".filter-active-ab"),a=!1;return e.each(function(t,i){i===s.parent()[0]&&t>11&&(a=!0)}),a}function a(t,i){for(var e=l.parent(),a=e.length,n=0;a>n;n++)if("none"===$(l[n]).css("display")){var r=e[n];b[n]=$(r).height(),$(r).height()>t&&($(l[n]).show(),s(i)?$(l[n]).removeClass("district-ab-button-more").addClass("district-ab-button-less"):$(r).height(t))}}function n(t){l.each(function(i,e){$(e).on("click",function(){$(e).hasClass("district-ab-button-more")?($(e).parent().height(b[i]),$(e).removeClass("district-ab-button-more").addClass("district-ab-button-less")):($(e).parent().height(t),$(e).removeClass("district-ab-button-less").addClass("district-ab-button-more"))})})}function r(t){c.on({click:u.tabLiClickHandler});var i=d.get("NUOMI_MEISHI_DISTRICT_AB");i?$(".j-district-tab-li"+i).trigger("click"):a(60,t),n(60)}var c=$(".j-district-tab-li"),o=$(".j-district-cont"),d=t("common:widget/ui/cookie/cookie.js"),l=$(".district-ab-button"),b=[],u={tabLiClickHandler:function(){var t=$(this).attr("index"),i=$(".j-district-cont"+t);c.removeClass("selected"),$(this).addClass("selected"),o.removeClass("selected"),i.addClass("selected"),d.set("NUOMI_MEISHI_DISTRICT_AB",t),a(60,t)}};e.exports={init:r}});
;define("list:widget/filter_ab/filter_normal_ab/filter_normal_ab.js",function(e,t,o){function i(){a.height()=n.height()&&a.height(n.height()-10),l.on("click",f.moreButtonClickHandler),h||l.on({mouseenter:f.moreButtonMouseenter,mouseleave:f.moreButtonMouseleave});var e=u.get("NUOMI_MEISHI_MORE_AB");if(e){var t="unfold"==e?!0:!1;t&&!l.hasClass("unfold")?(l.addClass("unfold"),a.height(n.height()-10),s.html("收起")):!t&&l.hasClass("unfold")&&(l.removeClass("unfold"),a.height(50),s.html("更多"))}}var s=$(".j-more-or-less"),a=$(".j-filter-items-wrap-ab").eq(0),n=$(".j-filter-items-ab").eq(0),l=$(".j-more-button").eq(0),r=navigator.userAgent.toLowerCase(),h=r.match(/iPad/i)?!0:!1,u=e("common:widget/ui/cookie/cookie.js"),f={moreButtonClickHandler:function(){$(this).hasClass("unfold")?($(this).removeClass("unfold"),a.height(50),s.html("更多"),u.set("NUOMI_MEISHI_MORE_AB","fold")):($(this).addClass("unfold"),a.height(n.height()-10),s.html("收起"),u.set("NUOMI_MEISHI_MORE_AB","unfold"))},moreButtonMouseenter:function(){$(this).addClass("hover")},moreButtonMouseleave:function(){$(this).removeClass("hover")}};o.exports={init:i,getPClassList:function(){var e=[];return $('.w-filter-normal-ab[mon="area=filterCatg"] .filter-active-ab').each(function(t,o){var i=$(o.firstChild).text();"全部"!==i&&e.push(i)}),e}}});
;define("list:widget/filter_ab/filter_top_nav/filter_top_nav.js",function(){$(function(){function e(){t()}function t(){a?($(document).on({touchstart:function(){this._isMove=!1},touchmove:function(){this._isMove=!0},touchend:c.activePadBodyClickHandler}),i.on("click",c.activePadClickHandler)):n.on({mouseenter:function(){$(this).addClass("hover")},mouseleave:function(){$(this).removeClass("hover")}})}var o=navigator.userAgent.toLowerCase(),a=o.match(/iPad/i)?!0:!1,i=$(".j-active-category"),n=$(".j-category-wrapper"),c={activePadClickHandler:function(){i.toggleClass("clicked"),i.hasClass("clicked")?n.addClass("hover"):n.removeClass("hover")},activePadBodyClickHandler:function(e){this._isMove||0==$(e.target).parents(".j-category-wrapper").length&&(i.removeClass("clicked"),n.removeClass("hover"))}};e()})});
;define("list:widget/hotel_search_bar/hotel_search_bar.js",function(i,n,t){function o(){a.on("click",function(){s||(s=!0,r.show())}),$("body").on("click",function(i){var n=i.target;n.id!=d&&s&&(s=!1,r.hide())}),$("#j-hotel-pop-district").on("click",function(i){var n=i.target;-1!==n.className.indexOf("position-item")&&a.val(n.innerHTML)})}function c(i){e=i,r=$("#"+i.popId),a=$("#"+i.inputId),d=i.inputId,o()}var e,a,r,d,s=!1;t.exports={init:c}});
;define("list:widget/mis/ad1/index.js",function(i,n){"use strict";n.init=function(){}});
;define("list:widget/new_header/bar/bar.js",function(e){var a=(e("common:widget/ui/passport/passport.js"),e("common:widget/ui/account_forbidden/account_forbidden.js")),t=e("common:widget/ui/cookie/cookie.js"),n=e("common:widget/ui/dialog/dialog.js");$(function(){function e(){var e=t.get("CLOSE_CITY_TIP");null===e&&$(".city-tip-area").css("display","inline-block"),o(),r(),s(),f.attr("href",f.attr("href")+"?u="+encodeURIComponent(window.location.href)),v.attr("href",v.attr("href")+"&u="+encodeURIComponent(window.location.href))}function o(){A?($("body").on({touchstart:function(){this._isMove=!1},touchmove:function(){this._isMove=!0},touchend:function(e){this._isMove||setTimeout(function(){y.ucAreaBodyClickHandler(e)},200)}}),l.on({click:y.ucAreaPadClickHandler})):(c.on({mouseenter:y.ucAreaEnterHandler,mouseleave:y.ucAreaLeaveHandler}),d.on({mouseenter:y.cityDropEnterHandler,mouseleave:y.cityDropLeaveHandler}),u.on({mouseenter:y.noticeAreaEnterHandler,mouseleave:y.noticeAreaLeaveHandler})),g.click(y.closeCityTip),p.click(y.logOutHandler)}function r(){var e=F.context("baid_uss_url");$.ajax(e,{dataType:"jsonp",success:function(){$.getJSON(C,{page:H},y.getUserHandler)},error:function(){$.getJSON(C,{page:H},y.getUserHandler)}})}function s(){var e=F.context("baidu_stoken_url");$.ajax(e,{dataType:"jsonp",jsonpCallback:"cb",success:function(){},error:function(){}})}var i=$("#j-ucLoginList"),c=$("#j-ucArea"),d=$("#j-cityDrop"),u=$("#j-noticeArea"),l=$("#j-uc-link-wrap"),f=$("#j-barLoginBtn"),p=$("#j-logout"),v=$("#j-barRegBtn"),h=$("#j-welcomeTag"),m=$("#j-ucOrderStatus"),g=$("#j-bubble-close"),C="/pclogin/main/userinfo",j="/uc/order/orderstatuscount",_=navigator.userAgent.toLowerCase(),A=_.match(/iPad/i)?!0:!1,H=F.context("page_name"),S=F.context("nuomi_base"),y={closeCityTip:function(){t.set("CLOSE_CITY_TIP","1","week"),$(".city-tip-area").css("display","none")},ucAreaEnterHandler:function(){$(this).addClass("hover")},ucAreaLeaveHandler:function(){$(this).removeClass("hover")},noticeAreaEnterHandler:function(){$(this).addClass("hover")},noticeAreaLeaveHandler:function(){$(this).removeClass("hover")},cityDropEnterHandler:function(){$(this).addClass("active-city")},cityDropLeaveHandler:function(){$(this).removeClass("active-city")},ucAreaPadClickHandler:function(e){$(this).toggleClass("clicked");var a=$(this).hasClass("clicked");a?(c.addClass("hover"),e.preventDefault()):(c.removeClass("hover"),e.preventDefault())},ucAreaBodyClickHandler:function(e){$(e.target).parents("#j-ucArea").length||(l.hasClass("clicked")&&l.removeClass("clicked"),c.removeClass("hover"))},getUserHandler:function(e){if(0==e.errno&&e.data.userInfo)if(i.addClass("has-login"),2==e.data.userInfo.status)a.init();else{var o="Hi,";o+=e.data.userInfo.passUname?decodeURIComponent(e.data.userInfo.passUname):e.data.userInfo.passPhone?e.data.userInfo.passPhone.replace(/^(\d{3}).*(\d{4})$/g,"$1****$2"):e.data.userInfo.passEmail,h.html(o);var r=t.get("BAINUO_ORDER_STATUS_CLOSE");(!r||r.indexOf("a")<0)&&($.getJSON(j,y.getOrderStatusHandler),m.find("a").on("click",y.ucOrderStatusItemClickHandler))}else{var s=e.errno,c=e.data,d=c.baiduUserInfo,u=c.otherBaiduUserInfo,l=c.nuomiUserInfo,f="";d&&(f=d.passUname?d.passUname:d.passEmail?d.passEmail:d.passPhone?d.passPhone:"");var p="";u&&(p=u.passUname?u.passUname:u.passEmail?u.passEmail:u.passPhone?u.passPhone:"");var v="";if(l&&(v=l.email?l.email:l.phone?l.phone:""),9600210==s){f&&(f="("+f+")");var g="您的百度帐号已经与其他的糯米账号绑定,下面的糯米账号无法登录。",C=['"],_=600;n.alert({title:"提示",content:C.join(""),width:_}),y.userErrorHandler()}else if(9600208==s){var g="您的糯米账号已与下面的百度账号绑定,请使用该帐号登录!";p||(g="您的糯米账号已与其它的百度账号绑定,请使用该帐号登录!");var C=['"],_=500;n.alert({title:"提示",content:C.join(""),width:_,onok:function(){}}),y.userErrorHandler()}}},getOrderStatusHandler:function(e){if(0==e.errno){for(var a=!1,n=t.get("BAINUO_ORDER_STATUS_CLOSE"),o=["",e.data.soonexpireCount,e.data.uncommentCount,e.data.unpayCount,e.data.merchantReplyCount,e.data.usableHongbaoCount],r="abcdef",s=1;5>=s;s++)(null===n||n.indexOf(r.charAt(s))<0)&&o[s]>0&&(a=!0,m.find("#j-ucStatusLink-"+r.charAt(s)).prev("span").html(o[s]),m.find("#j-ucStatusLink-"+r.charAt(s)).parent().show());a===!0&&m.show()}},ucOrderStatusItemClickHandler:function(e){function a(e){var a=t.get("BAINUO_ORDER_STATUS_CLOSE");t.set("BAINUO_ORDER_STATUS_CLOSE",e+(null===a?"":a),"today")}function n(){if(m.is(":visible")){for(var e=!1,a="abcde",t=1;4>=t;t++)if(m.find("#j-ucStatusLink-"+a.charAt(t)).is(":visible")){e=!0;break}e||m.hide()}}e.target.parentNode.style.display="none",n(),"e"!=e.target.id.charAt(e.target.id.length-1)&&a(e.target.id.charAt(e.target.id.length-1))},logOutHandler:function(){var e=F.context("logout_nuomi");$.ajax(e,{dataType:"json",async:!1,success:function(e){var a=p.attr("href");if(0==e.errno){var t=e.data.BDUSS64;t&&(a+="&sid="+encodeURIComponent(t))}a+="&u="+encodeURIComponent(S),p.attr("href",a)}})},userErrorHandler:function(){var e=F.context("logout_nuomi");$.ajax(e,{dataType:"json",async:!1,success:function(e){var a=F.context("logout_baidu");if(0==e.errno){var t=e.data.BDUSS64;t&&(a+="&sid="+encodeURIComponent(t))}$.ajax(a,{dataType:"jsonp"})}})}};e()})});
;define("list:widget/new_header/header.js",function(e){{var a=e("common:widget/ui/cookie/cookie.js"),i=e("common:widget/header/sug/sug.js"),t=e("common:widget/ui/placeholder/placeholder.js");e("common:widget/ui/dialog/dialog.js")}$(function(){function e(){var e=window.location,a=document.title,i=navigator.userAgent.toLowerCase(),t="您可以尝试通过快捷键Ctrl/Cmd + D 加入到收藏夹~";if(i.indexOf("360se")>-1)alert(t);else if(i.indexOf("msie 8")>-1)window.external.AddToFavoritesBar(e,a);else if(document.all)try{window.external.addFavorite(e,a)}catch(n){alert(t)}else window.sidebar?window.sidebar.addPanel(a,e,""):alert(t)}function n(){s(),i.init(),new t({element:h,selClass:"input-placeholder"})}function s(){y?(o&&(r||f.on({click:M.catgPadClickHandler})),$(document).on({touchstart:function(){this._isMove=!1},touchmove:function(){this._isMove=!0},touchend:function(e){this._isMove||setTimeout(function(){M.catgRowBodyClickHandler(e),r||M.catgBodyClickHandler(e),M.visitedAreaBodyClickHandler(e)},200)}}),k.on("click",M.visitedAreaPadClickhandler)):(p.one({mouseenter:M.visitedAreaEnterhandler}),p.on({mouseleave:M.visitedAreaLeaveHandler}),$("#addFav").on("click",function(a){e(),a.preventDefault()})),p.on("click",".j-clearVisited",M.clearVisitedHandler),c.on("click",M.topSpreadCloseClickHandler),d.on("click",M.searchBtnClickHandler),v.on("submit",M.searchFormClickHandler)}var r=F.context("isIndex"),o=F.context("isHotCity"),l=$("#j-topSpread"),c=$("#j-topSpreadClose"),d=$("#j-searchBtn"),v=$("#j-searchForm"),h=$("#j-searchInput"),u=$("#j-input-hidden"),m=$(".j-catg-row"),g=$("#j-catg"),f=$("#j-catg-header"),C=$("#j-catg-list"),p=($("#j-nav-area"),$("#j-visitedArea")),k=$("#j-visitedArea-title"),w=$("#j-visitedContainer"),j="/pcindex/visited",H="/pcindex/clearvst",_=$.browser.msie&&6==$.browser.version,A=navigator.userAgent.toLowerCase(),y=A.match(/iPad/i)?!0:!1,b="/mis/ad/ad?adarea_id=10,11,12,13,14,15,16,17",x=!1,M={catgRowMouseEnterHandler:function(){var e=this;if($(this).addClass("hover"),$(e).addClass("active"),"page=index"==$("body").attr("mon")&&!x){x=!0;var a={326:"10",345:"11",320:"12",330:"13",316:"14",642:"15",708:"16",955:"17"};$.getJSON(b,function(e){if(0===e.errno)for(var i in a){var t=e.data[a[i]];if(t.length>0){var n=$(".j-catg-row[catg-id='"+i+"']"),s=n.find(".second-level").first();0==s.length&&(s=$(''),n.append(s));for(var r in t){var o=t[r];s.append('')}}}})}},catgRowMouseLeaveHandler:function(){var e=this;$(this).removeClass("hover"),$(e).removeClass("active")},catgRowPadClickHandler:function(){$(this).toggleClass("clicked");var e=$(this).hasClass("clicked");e?(M.catgRowMouseEnterHandler.call(this),$(this).siblings().each(function(e,a){$(a).removeClass("hover"),$(a).removeClass("active"),$(a).removeClass("clicked")})):M.catgRowMouseLeaveHandler.call(this)},catgRowBodyClickHandler:function(e){$(e.target).parents(".j-catg-row").length||(m.hasClass("clicked")&&m.removeClass("clicked"),m.each(function(e,a){var i=a;$(a).removeClass("hover"),$(i).removeClass("active")}))},catgMouseEnterHandler:function(){g.addClass("hover"),C.show()},catgMouseLeaveHandler:function(){C.hide()},catgPadClickHandler:function(){$(this).toggleClass("clicked");var e=$(this).hasClass("clicked");e?M.catgMouseEnterHandler.call(g[0]):C.hide()},catgBodyClickHandler:function(e){$(e.target).parents("#j-catg").length||(f.hasClass("clicked")&&f.removeClass("clicked"),C.hide())},navMouseEnterHandler:function(){g.clearQueue("short")},navMouseLeaveHandler:function(){_?(C.hide(),g.removeClass("hover")):C.hide(function(){g.stop().animate({width:211},{duration:100,queue:"short",complete:function(){C.hide()}}),setTimeout(function(){g.dequeue("short")},500)})},visitedAreaEnterhandler:function(){function e(){a("数据载入中...")}function a(e){var a=['',e,"
"];w.html(a.join(""))}function i(e,a){var i=[],t=0;for(var n in e)if(e.hasOwnProperty(n)){var s=e[n],r="";0==t&&(r+="first"),i.push(['','','','
'+s.min_title+"
",'
','¥'+s.current_price/100+"",'¥'+s.market_price/100+"","
","
",""].join("")),t++}i.push(['"].join("")),w.html(i.join(""))}$(this).addClass("hover"),e(),$.getJSON(j,function(e){if(0==e.errno){var t=e.data.visitedDeal.detail,n=e.data.visitedDeal.s;t?i(t,n):a("暂无浏览记录")}else a(e.msg)})},visitedAreaLeaveHandler:function(){var e=this;$(e).removeClass("hover"),p.one({mouseenter:M.visitedAreaEnterhandler})},visitedAreaPadClickhandler:function(){$(this).toggleClass("clicked");var e=$(this).hasClass("clicked");e?M.visitedAreaEnterhandler.apply(p[0]):p.removeClass("hover")},visitedAreaBodyClickHandler:function(e){function a(){k.hasClass("clicked")&&k.removeClass("clicked"),p.removeClass("hover")}var i=$(e.target).is("#j-visitedArea-title"),t=$(e.target).parents("#j-visitedContainer").length;t?setTimeout(function(){a()},500):i||a()},clearVisitedHandler:function(){function e(e){var a=['',e,"
"];w.html(a.join(""))}$.post(H),e("暂无浏览记录")},topSpreadCloseClickHandler:function(){l.slideUp(400,function(){l.remove()}),a.set("TOP_SPREAD_CLOSED","1","today")},searchBtnClickHandler:function(){var e=$.trim(h.val());e||h.val(h.data("placeholder"))},searchFormClickHandler:function(){h.val()!=h.attr("data-placeholder")&&u.remove()}};n()})});
;define("list:widget/new_list/item.js",function(i,t,e){function n(i){var t=$("#hover-overlay");$(i.element).on("mouseenter",function(){var i=$(this),e=i.offset();t.css({left:e.left-5,top:e.top-5,visibility:"visible"})}).on("mouseleave",function(){t.css({visibility:"hidden"})});var e=setInterval(function(){window.t10JingxuanComplete&&(window.isNoT10JingXuan&&($("#section-floor-1 .floor-header").css("width","964px"),$("#section-floor-1 .itemlist li:nth-child(5)").css("visibility","hidden"),$("#j-fix-right-container").css({height:"378px","border-bottom":"1px solid #dfdfdf"})),clearInterval(e))},100)}e.exports={init:n}});
;define("list:widget/new_sidebar/sidebar.js",function(e,t){function i(){}e("common:widget/ui/template/template.js").template,e("common:widget/dep/moye/sticky.js");t.init=i});
;define("list:widget/qingrenjie/huaban/huaban.js",function(){!function(){function t(t,a){this.$ele=$(t),this.time=a,this.fromY="-10%",this.toY="110%"}function a(){for(var a=0;22>a;a++)r.push($('').appendTo("body"));e.push(new t(r[14].addClass("qrj15-rotate1"),6e3)),e.push(new t(r[15].addClass("qrj15-rotate1"),4500)),e.push(new t(r[16].addClass("qrj15-rotate3"),5e3)),e.push(new t(r[17].addClass("qrj15-rotate4"),2200)),e.push(new t(r[18].addClass("qrj15-rotate4"),3e3)),e.push(new t(r[19].addClass("qrj15-rotate4"),2400)),e.push(new t(r[20].addClass("qrj15-rotate2"),6e3)),e.push(new t(r[21].addClass("qrj15-rotate2"),4500)),e.push(new t(r[1].addClass("qrj15-rotate4"),3e3)),e.push(new t(r[2].addClass("qrj15-rotate2"),3500)),e.push(new t(r[3].addClass("qrj15-rotate2"),3800)),e.push(new t(r[5].addClass("qrj15-rotate2"),5800)),e.push(new t(r[6].addClass("qrj15-rotate3"),4700)),e.push(new t(r[7].addClass("qrj15-rotate4"),2e3)),e.push(new t(r[8].addClass("qrj15-rotate4"),6e3)),e.push(new t(r[9].addClass("qrj15-rotate3"),4800)),e.push(new t(r[10].addClass("qrj15-rotate1"),7e3)),e.push(new t(r[11].addClass("qrj15-rotate1"),8e3)),e.push(new t(r[12].addClass("qrj15-rotate3"),4900)),e.push(new t(r[13].addClass("qrj15-rotate3"),4500)),e.push(new t(r[0].addClass("qrj15-rotate4"),3e3)),e.push(new t(r[4].addClass("qrj15-rotate2"),5800)),$.each(e,function(t,a){setTimeout(function(){a.run()},200*t)})}function s(){$.each(e,function(t,a){a.destroy()}),e=[],r=[]}var e=[],r=[];t.prototype={constructor:t,run:function(){var t=$(window).width(),a=100+Math.floor(Math.random()*(t-200)),s=this,e=-200+Math.floor(400*Math.random());return this.$ele.css({top:this.fromY,left:a}),this.$ele.animate({top:this.toY,left:a+e},this.time,"linear",function(){s.run()}),this},destroy:function(){var t=this;this.$ele.stop().fadeOut("400",function(){t.$ele.remove()})}};var n=window.navigator.userAgent,o=n.match(/iPad/i)?!0:!1,d=n.match(/MSIE (\d+)/i),h=!0;(d&&d[1]<=8||o)&&(h=!1),h&&(a(),setTimeout(s,5e3))}()});
;define("list:widget/related_query/related_query.js",function(e,t,n){var i=e("common:widget/ui/usertrack/usertrack.js"),r=function(){function e(){$(document.body).on("mousedown",".query-list li",function(e){var t=$(this);if(!t.is("a[mon], input[mon], span[mon]")){var n=$(e.target),r=[];do{var o=n.attr("mon");o&&r.push(o),n=n.parent()}while(!n.is("html"));r=r.join("&").split("&");for(var a={},s=0,p=r.length;p>s;s++){var d=r[s].split("=");a[d[0]]=d[1]}var u={da_src:encodeURIComponent($.stringify({page:a.page,area:a.area,element:a.element,position:a.position,src_type:a.src_type,weight:a.weight,exp_id:a.exp_id,rid:a.rid}))};a.element_type&&(u.element_type=a.element_type),i.send(u)}})}return{init:function(){e()}}}();n.exports={init:r.init}});
;define("list:widget/ui/ad/ad.js",function(a,e,i){i.exports={init:function(){$.post("/mis/ad/ad?adarea_id=3",{},function(e){e=$.parseJSON(e);var i=e.data[3];if(i&&i.length>0){$adContainer=$(".p-index-ad"),$adContainer.attr("style","display:block;"),$adTemplate=$(''),$imgContainer=$('');for(var n=i.length>1?'bn_slide="banner&position"':'bn_box="banner&position"',t=0;t');0==t&&l.addClass("hover"),$imgContainer.append(l)}$adTemplate.append($imgContainer);var r=$('Χ');$adTemplate.append(r);var o=$('');1==i.length&&o.attr("style","display:none");for(var t=0;t'+(t+1)+"");0==t&&s.addClass("hover"),o.append(s)}$adTemplate.append(o),$adContainer.append($adTemplate);var p=a("common:widget/ui/sliderbar/sliderbar.js");$imgContainer.size()>0&&new p({container:$imgContainer,pageNumber:$("#j-ad-num li"),direction:"top",interval:3e3,timer:400,exposureLog:!0,callback:function(){$("#j-ad-close").bind("click",function(){$(this).parents(".j-index-ad").hide()})}})}})}}});
;define("list:widget/ui/ajax_get_goods/ajax_get_goods.js",function(a,o,n){n.exports={init:function(a){var o=this;this.goodsWrap=a.goodsWrap,this.itemWrap=a.itemWrap,this.itemName=a.itemName,this.asyncLoadPage=2,this.canAsyncLoad=!0,this.asyncLoadNum=0,this.goodsNum=F.context("goods_num"),this.asyncLoadMaxNum=F.context("goods_total")/this.goodsNum>2?2:1,$(window).on("scroll",function(){var a=$(document).scrollTop()+$(window).height(),n=o.goodsWrap.find(o.itemName).last().offset().top-1504;a>=n&&o.canAsyncLoad&&(o.canAsyncLoad=!1,o.sendRuqest())})},sendRuqest:function(){var a=this,o=F.context("page_base_url"),n=F.context("url_param_suffix");n&&(o+="?"+n);var t;"1"==F.context("quanwang_search_page")&&(t=-1==o.indexOf("?")?"?":"&",o+=t+"quanwangdijia=1"),"1"==F.context("jingxuan_search_page")&&(t=-1==o.indexOf("?")?"?":"&",o+=t+"jingxuanpinpai=1");var s={async_load_page:a.asyncLoadPage};$.get(o,s,function(o){a.goodsWrap.find(a.itemWrap).append(o);var n=$(document).scrollTop()+$(window).height(),t=a.goodsWrap.find(a.itemName).last().offset().top-752;a.asyncLoadNum++,a.asyncLoadPage++,a.asyncLoadNumn&&(a.canAsyncLoad=!0)},"html")}}});
;define("list:widget/ui/scrollspy/scrollspy.js",function(t,s,e){function o(t){$("body").scrollspy({target:t})}+function(t){"use strict";function s(e,o){var i=t.proxy(this.process,this);this.$body=t("body"),this.$scrollElement=t(t(e).is("body")?window:e),this.options=t.extend({},s.DEFAULTS,o),this.selector=(this.options.target||"")+" li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",i),this.refresh(),this.process()}function e(e){return this.each(function(){var o=t(this),i=o.data("bs.scrollspy"),r="object"==typeof e&&e;i||o.data("bs.scrollspy",i=new s(this,r)),"string"==typeof e&&i[e]()})}s.VERSION="3.3.2",s.DEFAULTS={offset:10},s.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},s.prototype.refresh=function(){var s="offset",e=0;t.isWindow(this.$scrollElement[0])||(s="position",e=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var o=this;this.$body.find(this.selector).map(function(){var o=t(this),i=o.data("target")||o.attr("href"),r=/^#./.test(i)&&t(i);return r&&r.length&&r.is(":visible")&&[[r[s]().top+e,i]]||null}).sort(function(t,s){return t[0]-s[0]}).each(function(){o.offsets.push(this[0]),o.targets.push(this[1])})},s.prototype.process=function(){var t,s=this.$scrollElement.scrollTop()+this.options.offset,e=this.getScrollHeight(),o=this.options.offset+e-this.$scrollElement.height(),i=this.offsets,r=this.targets,l=this.activeTarget;if(this.scrollHeight!=e&&this.refresh(),s>=o)return l!=(t=r[r.length-1])&&this.activate(t);if(l&&s=i[t]&&(!i[t+1]||s<=i[t+1])&&this.activate(r[t])},s.prototype.activate=function(s){this.activeTarget=s,this.clear();var e=this.selector+'[data-target="'+s+'"],'+this.selector+'[href="'+s+'"]',o=t(e).addClass("active");o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate.bs.scrollspy")},s.prototype.clear=function(){t(this.selector).removeClass("active")};var o=t.fn.scrollspy;t.fn.scrollspy=e,t.fn.scrollspy.Constructor=s,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=o,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var s=t(this);e.call(s,s.data())})})}(jQuery),e.exports=o});