1function show_loading_bar(){$("div#loading-over").show()}function hide_loading_bar(){$("div#loading-over").hide()}function calculateBirthdayHeight(){if($("#birthday_container").length){window.screen.width>1024?$("#rstr_page_wrap").css("margin-top","214px"):($("#custom-page").css("margin-top","110px"),$("#rstr_page_wrap").css("margin-top","104px"))}}function get_times(e){var t=$("#date-field").val(),l=$("#time-field").val(),a=$("#adults").val(),o=$("#children").val(),s=e+"/"+t+"/"+(l=l.indexOf("Av")?0:l)+"/"+a+"/"+o;if(void 0===cache[s])$.getJSON("/categories/get_times/"+s,function(e){200==e.code?$("#time-field").html(e.data):$("#time-field").html("<option>Not Available</option>"),cache[s]=e});else{var i=cache[s];200==i.code?$("#time-field").html(i.data):$("#time-field").html("<option>Not Available</option>")}}function chope_init_calendar(base_url){show_loading_bar();var evnts=function(){return{event:[],full:[],closed:[]}};$("#calendar-box").Calendar({events:evnts,weekStart:7}).on("changeDay",function(e){show_loading_bar();var t=e.day.valueOf(),l=t+"-"+e.month.valueOf()+"-"+e.year.valueOf(),a="#day_"+t;
1$("#date-field").val(e.day.valueOf()+" "+month_names[e.month.valueOf()-1]+" "+e.year.valueOf()),$("#datepicker_value").val(l),$(".day_selected").removeClass("day_selected").addClass("day"),$(a).addClass("day_selected"),$(".today").removeClass("today").addClass("day");$.trim($("#rid").val()),$("#time-field").val();var o="";0==IsPC()&&($(".time_details_box").remove(),$(a).find("ul li").each(function(){o+=$(this).html()}),$("#calendar-box").after('<div class="time_details_box">'+o+"</div>")),$("#calendar-drop").hide(),chope_get_time(l,base_url)}).on("onEvent",function(e){console.log(11111),$("#calendar-drop").hide()}).on("onNext",function(event){show_loading_bar();var date_arr=$("#datepicker_value").val().split("-"),selected_day=new Number(date_arr[0]),next_month=new Number(date_arr[1])+1;next_month>12?(next_year=new Number(date_arr[2])+1,next_month-=12):next_year=date_arr[2],(4==next_month||6==next_month||9==next_month||11==next_month)&&selected_day>30?selected_day=30:2==next_month&&selected_day>29&&(next_year%4==0&&next_year%100!=0||next_year%400==0)?selected_day=29:2==next_month&&selected_day>28&&(next_year%4!=0||next_year%100==0)&&next_year%400!=0&&(selected_day=28);var current_date=selected_day+"-"+next_month+"-"+next_year;$("#date-field").val(selected_day+" "+month_names[next_month-1]+" "+next_year),$("#datepicker_value").val(current_date);var selected_time=$("#time").val(),selected_id="#day_"+selected_day,d=new Date(next_year,next_month,0),$day_="-"+d.getDate(),rid=$("#rid").val(),adults=$("#adults").val(),children=$("#children").val(),s_date=next_year+"-"+next_month+"-1",e_date=next_year+"-"+next_month+$day_,reservation_id=0,param=rid+"/"+s_date+"/"+e_date+"/"+adults+"/"+children+"/"+reservation_id;console.log(param,1212143),$.getJSON(base_url+"/categories/get_calendar_info/"+param,function(res){"undefined"!=res.data&&(renderEnt(eval("("+res.data+")")),$(".day_selected").removeClass("day_selected").addClass("day"),"day"==$(selected_id).attr("class")&&$(selected_id).addClass("day_selected"),chope_get_time(current_date,base_url))})}).on("onPrev",function(event){show_loading_bar();var date_arr=$("#datepicker_value").val().split("-"),selected_day=new Number(date_arr[0]),prev_month=new Number(date_arr[1])-1;prev_month<1?(prev_year=new Number(date_arr[2])-1,prev_month+=12):prev_year=date_arr[2],selected_day>30&&(4==prev_month||6==prev_month||9==prev_month||11==prev_month)?selected_day=30:2==prev_month&&selected_day>29&&(prev_year%4==0&&prev_year%100!=0||prev_year%400==0)?selected_day=29:2==prev_month&&selected_day>28&&(prev_year%4!=0||prev_year%100==0)&&prev_year%400!=0&&(selected_day=28);var current_date=selected_day+"-"+prev_month+"-"+prev_year;$("#date-field").val(selected_day+" "+month_names[prev_month-1]+" "+prev_year),$("#datepicker_value").val(current_date);var selected_time=$("#time").val(),selected_id="#day_"+selected_day,d=new Date(prev_year,prev_month,0),$day_="-"+d.getDate(),rid=$("#rid").val(),adults=$("#adults").val(),children=$("#children").val(),s_date=prev_year+"-"+prev_month+"-1",e_date=prev_year+"-"+prev_month+$day_,reservation_id=0,param=rid+"/"+s_date+"/"+e_date+"/"+adults+"/"+children+"/"+reservation_id;console.log(param,1212143),$.getJSON(base_url+"/categories/get_calendar_info/"+param,function(res){"undefined"!=res.data&&(renderEnt(eval("("+res.data+")")),$(".day_selected").removeClass("day_selected").addClass("day"),"day"==$(selected_id).attr("class")&&$(selected_id).addClass("day_selected"),chope_get_time(current_date,base_url))})}).on("onCurrent",function(event){show_loading_bar();var d=new Date,month=d.getMonth()+1,current_date=d.getDate()+"-"+month+"-"+d.getFullYear();
1$("#date-field").val(d.getDate()+" "+month_names[month-1]+" "+d.getFullYear()),$("#datepicker_value").val(current_date);var selected_time=$("#time").val(),selected_id="#day_"+d.getDate(),rid=$("#rid").val(),d=new Date(d.getFullYear(),month,0),$day_="-"+d.getDate(),adults=$("#adults").val(),children=$("#children").val(),s_date=d.getFullYear()+"-"+month+"-1",e_date=d.getFullYear()+"-"+month+$day_,reservation_id=0,param=rid+"/"+s_date+"/"+e_date+"/"+adults+"/"+children+"/"+reservation_id;console.log(param,1212143),$.getJSON(base_url+"/categories/get_calendar_info/"+param,function(res){"undefined"!=res.data&&(renderEnt(eval("("+res.data+")")),$(".day_selected").removeClass().addClass("day"),"day"==$(selected_id).attr("class")&&$(selected_id).addClass("day_selected"),chope_get_time(current_date,base_url))}),$("#calendar-drop").hide()});var now_date=$.trim($("#datepicker_value").val()),date_arr=now_date.split("-"),d=new Date(date_arr[2],date_arr[1],0),$day_="-"+d.getDate(),rid=$("#rid").val(),adults=$("#adults").val(),reservation_id=$("#rez_id").val(),children=$("#children").val(),s_date=date_arr[2]+"-"+date_arr[1]+"-1",e_date=date_arr[2]+"-"+date_arr[1]+$day_,reservation_id=0,param=rid+"/"+s_date+"/"+e_date+"/"+adults+"/"+children+"/"+reservation_id;$.getJSON(base_url+"/categories/get_calendar_info/"+param,function(res){console.log(res,1212143),"undefined"!=res.data?(renderEnt(eval("("+res.data+")")),chope_set_time(base_url)):hide_loading_bar()})}function chope_set_time(e){$.trim($("#rid").val());chope_get_time($.trim($("#datepicker_value").val()),e)}function chope_get_time(e,t){var l="#day_"+e.split("-")[0],a=$.trim($("#rid").val()),o=$("#time-field").val(),s=$("#adults").val(),i=$("#children").val(),c=$.ajax({url:t+"/categories/get_times",type:"POST",data:{rid:a,date:e,selected_time:o,adults:s,children:i,reservation_id:0},dataType:"json"});c.done(function(e){200==e.code?(console.log(e,1212121),$("#time-field").empty().append(e.data),"day"==$(l).attr("class")&&$(l).addClass("day_selected"),hide_loading_bar()):($("#time-field").empty().append("<option>Not Available</option>"),hide_loading_bar());var t="";0==IsPC()&&($(".time_details_box").remove(),$(l).find("ul li").each(function(){t+=$(this).html()}),$("#calendar-box").after('<div class="time_details_box">'+t+"</div>"))}),c.fail(function(e,t){console.log(e,t,999888),$("#time-field").empty().append("<option>Not Available</option>"),hide_loading_bar()})}function renderEvents(s_date,e_date,base_url){var rid=$("#rid").val(),adults=$("#adults").val(),children=$("#children").val(),reservation_id=$("#rez_id").val(),reservation_id=0,param=rid+"/"+s_date+"/"+e_date+"/"+adults+"/"+children+"/"+reservation_id;console.log(param,1212143),$.getJSON(base_url+"/categories/get_calendar_info/"+param,function(res){"undefined"!=res.data&&renderEnt(eval("("+res.data+")"))})}function renderEnt(e){var t="";for(var l in e)t=""==e[l].event_note||void 0==e[l].event_note?e[l].note:e[l].event_note,render($("#"+l),e[l].status,t,l.substr(4))}function render(e,t,l,a){var o="";switch(0==IsPC()&&(o="hide"),t){case"open":""==l?e.removeClass().addClass("day").html('<div class="dropdown"><span class="icon icon-event">'+a+'</span><span class="dropdown-toggle" id="dd_'+a+'" data-toggle="dropdown"></span></div>'):e.removeClass().addClass("day").html('<div class="dropdown"><span class="icon icon-event">'+a+'</span><span class="dropdown-toggle" id="dd_'+a+'" data-toggle="dropdown"></span><ul class="dropdown-menu '+o+'" role="menu" aria-labelledby="dd_'+a+'"><li>'+l+"</li></ul></div>");break;case"full":""==l?e.removeClass().addClass("full").html('<div class="dropdown"><span class="icon icon-event">'+a+'</span><span class="dropdown-toggle" data-toggle="dropdown" id="dd_'+a+'" ></span></div>'):e.removeClass().addClass("full").html('<div class="dropdown"><span class="icon icon-event">'+a+'</span><span class="dropdown-toggle" data-toggle="dropdown" id="dd_'+a+'" ></span><ul class="dropdown-menu '+o+'" role="menu" aria-labelledby="dd_'+a+'"><li>'+l+"</li></ul></div>");break;case"closed":e.removeClass().addClass("closed").html('<div class="dropdown"><span>'+a+"</span></div>")}}function IsPC(){for(var e=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],l=!0,a=0;a<t.length;a++)if(e.indexOf(t[a])>0){l=!1;break}return l}function monthNameToid(e){for(var t in month_names)if(month_names[t]==e)return parseInt(t)+1;return 0}function RedemptionOverWritten(){var e=$.cookie("redemption_info");if(e){var t=JSON.parse(e);$.each({name:"#feedback-name",email:"#inputEmail3",mobile:"#tel_no",resuid:"#restaurant_name",redemption_option:"#redemption_option",address:"#address"},function(e,l){t[e]&&$(l).val(t[e])}
1),$.cookie("redemption_info",null,{path:"/user"})}}function RedemptionInfoCache(){var e={name:$.trim($("#feedback-name").val()),email:$.trim($("#inputEmail3").val()),mobile:$.trim($("#tel_no").val()),resuid:$("#restaurant_name").val(),resname:$("#restaurant_name").val(),redemption_option:$("#redemption_option").val(),address:$("#address").val()},t=JSON.stringify(e);$.cookie("redemption_info",t,{path:"/user"})}function maxSevenRows(){var e=$(".cuisine-filter li");if(e.length>7){for(var t=e.slice(0,7),l=0,a=0;a<t.length;a++)l+=t.eq(a).outerHeight(!0);console.log("height::"+l),$(".cuisine-filter ul").css("max-height",l),$(".cuisine-filter ul").css("overflow-y","scroll"),$(".cuisine-filter ul").css("overflow-x","hidden")}else $(".cuisine-filter ul").css("max-height","10px"),$(".cuisine-filter ul").css("overflow-y",""),$(".cuisine-filter ul").css("overflow-x","");var o=$(".location-filter li");if(o.length>7){for(var s=o.slice(0,7),i=0,c=0;c<s.length;c++)i+=s.eq(c).outerHeight(!0);$(".location-filter ul").css("max-height",i),$(".location-filter ul").css("overflow-y","scroll"),$(".location-filter ul").css("overflow-x","hidden")}else $(".location-filter ul").css("max-height",""),$(".location-filter ul").css("overflow-y",""),$(".location-filter ul").css("overflow-x","")}var isSG=!1,searchResName="";$(document).ready(function(){$("#verify-lnk").on("click",function(){var e=$
1(this);e.val(_("Email sending ... ")).attr("disabled","disabled"),$.get("/user/send_verify_email",function(t){1==t?(e.val(_("Email sent successfully")).attr("disabled","disabled"),$(".popover").hide(),alert(_("A verification email has been sent to your email address! If you have not received it, please email [email protected] for assistance. Thank you!"))):(alert(_("sent email failed, please try again.")),$(".popover").show(),e.val("Verify").removeAttr("disabled"))})}),$("input, textarea").placeholder(),$("a img").not("#sldr-next img, #partners_reel img, .section img, #hdr-logo img, #home_box img, #country_container img, .sidebar img").hover(function(){$(this).stop().animate({filter:"alpha(opacity=50)","-moz-opacity":"0.5","-khtml-opacity":"0.5",opacity:"0.5"},200)},function(){$(this).stop().animate({filter:"alpha(opacity=100)","-moz-opacity":"1","-khtml-opacity":"1",opacity:"1"},200)}),$("input[datepicker]").datepicker({numberOfMonths:2,minDate:0,dateFormat:"d M yy"}),$(".datepicker-icon").click(function(){$(this).siblings(".datepicker").datepicker("show")}),$(".datepicker-close").click(function(){$('[data-toggle="dropdown"]').parent().removeClass("open")}),$("#view-full").click(function(){});var e=0,t=$("#header").height();$(window).scroll(function(){var l=$(this).scrollTop();l>t&&(l>e||$("#header").css("top","0px")),e=l}),$("#reel .item").eq(Math.floor(Math.random()*$("#reel .item").length)).addClass("active"),$(".sb-top .close").click(function(){return $('[data-toggle="dropdown"]').parent().removeClass("open"),$("#diners-drop").toggle(),!1}),$(".dropdown-menu").click(function(e){e.stopPropagation()}),$(".sb-list input:checked").each(function(){$(this).closest("li").addClass("selected")}),$("#sel-restaurant").select2({width:"323px"}),$("#sb-sel-restaurant").select2({width:"195px"}),$("#mob-sel-restaurant").select2({width:"270px"});var l=_(" adults"),a=_(" children");
1$("#diners-drop #adults").on("change keyup",function(){var e=$("#diners-drop #children").val();l=1==$(this).val()?"adult":"adults",0==e?$("#diners-field").val($(this).val()+l):1==e?$("#diners-field").val($(this).val()+l+", "+e+" child"):$("#diners-field").val($(this).val()+l+", "+e+" children")}),$("#diners-drop #children").on("change keyup",function(){var e=$("#diners-drop #adults").val();a=1==$(this).val()?" child":" children",0==$(this).val()?$("#diners-field").val(e+l):$("#diners-field").val(e+l+", "+$(this).val()+a)}),$("#mob-diners-drop #mob-adults").on("change keyup",function(){var e=$("#mob-diners-drop #mob-children").val();l=1==$(this).val()?" adult":" adults",0==e?$("#mob-diners-field").val($(this).val()+l):1==e?$("#mob-diners-field").val($(this).val()+l+", "+e+" child"):$("#mob-diners-field").val($(this).val()+l+", "+e+" children")}),$("#mob-diners-drop #mob-children").on("change keyup",function(){var e=$("#mob-diners-drop #mob-adults").val();a=1==$(this).val()?" child":" children",0==$(this).val()?$("#mob-diners-field").val(e+l):$("#mob-diners-field").val(e+l+", "+$(this).val()+a)});var o=$("#foptions input[type=checkbox]"),s=$("#foptions label");$("#sb-res-search #toggle-cuisine").on("shown.bs.tab",function(e){o.attr("disabled",!1),s.removeClass("disabled"),$(".cla").show()}),$("#sb-res-search #toggle-restaurant").on("shown.bs.tab",function(e){o.attr("disabled",!0),s.addClass("disabled"),1!=isSG&&$(".cla").hide()}),$('a#mob-toggle-restaurant[data-toggle="tab"]').on("shown.bs.tab",function(e){$("#refine-reslt").hide()}),$('a#mob-toggle-cuisine[data-toggle="tab"]').on("shown.bs.tab",function(e){$("#refine-reslt").show(),$("#mob-sel-restaurant").select2("destroy").select2({width:"270px"})}
1),$("#cus-select-all").click(function(){var e=$("#cus-boxes input[type=checkbox]"),t=$("#cus-boxes input[type=checkbox]").length;e.prop("checked",!!$(this).is(":checked")),this.checked?($("#sel-cuisine").val(t+" Cuisines"),$("#cus-boxes li").addClass("selected")):($("#sel-cuisine").val("Any Cuisine"),$("#cus-boxes li").removeClass("selected"))}),$("#cus-boxes input[type=checkbox]").click(function(){var e="#cus-boxes input[type=checkbox]:checked",t=$(e).length,l=$(e).parent().contents(":not(span)").text();0==t?$("#sel-cuisine").val("Any Cuisine"):1==t?$("#sel-cuisine").val(l):$("#sel-cuisine").val(t+" Cuisines"),this.checked?$(this).closest("li").addClass("selected"):$(this).closest("li").removeClass("selected")}),$("#mob-cus-select-all").click(function(){var e=$("#mob-cus-boxes input[type=checkbox]"),t=$("#mob-cus-boxes input[type=checkbox]").length;e.prop("checked",!!$(this).is(":checked")),this.checked?($("#mob-sel-cuisine").val(t+" Cuisines"),$(".mob-sel-cus").text(t+" Cuisines"),$("#mob-cus-boxes li").addClass("selected"),$(".cuisine-filter :checkbox").prop("checked",!0)):($("#mob-sel-cuisine").val("Any Cuisine"),$(".mob-sel-cus").text("Any Cuisine"),$("#mob-cus-boxes li").removeClass("selected"),$(".cuisine-filter :checkbox").prop("checked",!1))}),$("#mob-cus-boxes input[type=checkbox]").click(function(){var e="#mob-cus-boxes input[type=checkbox]:checked",t=$(e).length,l=$(e).parent().contents(":not(span)").text();0==t?($("#mob-sel-cuisine").val("Any Cuisine"),$(".mob-sel-cus").text("Any Cuisine")):1==t?($("#mob-sel-cuisine").val(l),$(".mob-sel-cus").text(l)):($("#mob-sel-cuisine").val(t+" Cuisines"),$(".mob-sel-cus").text(t+" Cuisines")),this.checked?$(this).closest("li").addClass("selected"):$(this).closest("li").removeClass("selected")}
1),$("#loc-select-all").click(function(){var e=$("#loc-boxes input[type=checkbox]"),t=$("#loc-boxes input[type=checkbox]").length;e.prop("checked",!!$(this).is(":checked")),this.checked?($("#sel-location").val(t+" Locations"),$("#loc-boxes li").addClass("selected"),$(".location-filter :checkbox").prop("checked",!0)):($("#sel-location").val("Any Location"),$("#loc-boxes li").removeClass("selected"),$(".location-filter :checkbox").prop("checked",!1))}),$("#loc-boxes input[type=checkbox]").click(function(){var e="#loc-boxes input[type=checkbox]:checked",t=$(e).length,l=$(e).parent().contents(":not(span)").text();0==t?$("#sel-location").val("Any Location"):1==t?$("#sel-location").val(l):$("#sel-location").val(t+" Locations"),this.checked?$(this).closest("li").addClass("selected"):$(this).closest("li").removeClass("selected")}),$("#mob-loc-select-all").click(function(){var e=$("#mob-loc-boxes input[type=checkbox]"),t=$("#mob-loc-boxes input[type=checkbox]").length;e.prop("checked",!!$(this).is(":checked")),this.checked?($("#mob-sel-location").val(t+" Locations"),$(".mob-sel-loc").text(t+" Locations"),$("#mob-loc-boxes li").addClass("selected")):($("#mob-sel-location").val("Any Location"),$(".mob-sel-loc").text("Any Location"),$("#mob-loc-boxes li").removeClass("selected"))}),$("#mob-loc-boxes input[type=checkbox]").click(function(){var e="#mob-loc-boxes input[type=checkbox]:checked",t=$(e).length,l=$(e).parent().contents(":not(span)").text();0==t?($("#mob-sel-location").val("Any Location"),$(".mob-sel-loc").text("Any Location")):1==t?($("#mob-sel-location").val(l),$(".mob-sel-loc").text(l)):($("#mob-sel-location").val(t+" Locations"),$(".mob-sel-loc").text(t+" Locations")),this.checked?$(this).closest("li").addClass("selected"):$(this).closest("li").removeClass("selected")}),$(".booking .sel-btn").change(function(){$("#makebooking").modal("show")}),$("#return-top").localScroll({}),$("#a-z-list").localScroll({offset:-60}),$("#mob-a-z-affix").localScroll({offset:-130}),calculateBirthdayHeight()}),this.vtip=function(){this.xOffset=-10,this.yOffset=10,$(".vtip, .unavailable, .r-name a").unbind().hover(function(e){this.t=this.title,this.title="",this.top=e.pageY+yOffset,this.left=e.pageX+xOffset,$("body").append('<p id="vtip">'+this.t+"</p>"),$("p#vtip").css("top",this.top+"px").css("left",this.left+"px").fadeIn("fast")},function(){this.title=this.t,$("p#vtip").fadeOut("medium").remove()}).mousemove(function(e){this.top=e.pageY+yOffset,this.left=e.pageX+xOffset,$("p#vtip").css("top",this.top+"px").css("left",this.left+"px")})},jQuery(document).ready(function(e){vtip()}),$(document).ready(function(){$(".slideshow").before('<div id="sldr-nav"><ul class="sldr-opt"><li><a href="#" id="sldr-prev"></a></li></ul><ul id="sldr-btn" class="sldr-opt"></ul><ul class="sldr-opt"><li><a href="#" id="sldr-next"></a></li></ul> </div>'),$(".slideshow").cycle({fx:"fade",easing:"swing",speed:1e3,timeout:3e3,next:"#sldr-next",prev:"#sldr-prev",pause:1,height:"auto",width:"100%",pauseOnPagerHover:1,fit:1,fastOnEvent:350,containerResize:0,pager:"#sldr-btn",pagerAnchorBuilder:function(e,t){return'<li><a href="#"></a></li>'}}),$(".slideshow .item").click(function(){$(".slideshow").cycle("next")}),$(".hbx_slide").each(function(){$(this).before('<div class="hbx-sldr-nav"><ul class="sldr-opt"><li><a href="#" class="hbx-sldr-prev"></a></li></ul><ul class="hbx-sldr-btn" class="sldr-opt"></ul><ul class="sldr-opt"><li><a href="#" class="hbx-sldr-next"></a></li></ul> </div>');var e=$(this).parent().find(".hbx-sldr-next"),t=$(this).parent().find(".hbx-sldr-prev");$(this).cycle({fx:"fade",easing:"swing",speed:1e3,timeout:3e3,next:e,prev:t,pause:1,height:"auto",width:"100%",pauseOnPagerHover:1,fit:1,fastOnEvent:350,containerResize:0})});if("none"==$(".choose").css("display")||$(".choose").length<=0){isSG=!0,maxSevenRows(),$("#details-field").addClass("search-box-sg"),$("#mob-res-search").addClass("search-box-sg-mob");$("#time-field option:selected").text()==_("Time")?($("#time-field").addClass("pdt-placeholder-color"),$("#mob-time-field").addClass("pdt-placeholder-color"),$("#time-field-mob").addClass("pdt-placeholder-color")):($("#time-field").removeClass("pdt-placeholder-color"),$("#mob-time-field").removeClass("pdt-placeholder-color"),$("#time-field-mob").removeClass("pdt-placeholder-color"));var e="",t="",l="";if($("#diners-field").val()&&(e=$("#diners-field").val().replace(/[^0-9]/gi,"")),$("#date-field").val()&&(t=$("#date-field").val().replace(/[^0-9]/gi,"")),$("#time-field").val()&&(l=$("#t
1ime-field").val().replace(/[^0-9]/gi,"")),e.length<=0&&t.length<=0&&l.length<=0?($("#results-header .subtitle ").hide(),$("#content #results-header").css("min-height","0")):($("#results-header .subtitle ").show(),$("#content #results-header").css("min-height","40px")),$("#search_keyword").length>0){var a=$("#search_keyword").val();a.length>0?($("#select2-mob-sel-restaurant-container").text(a),$("#select2-sb-sel-restaurant-container").text(a),$("#select2-sb-sel-restaurant-container").removeClass("searchPlaceHolderColor"),$("#select2-mob-sel-restaurant-container").removeClass("searchPlaceHolderColor"),searchResName=a):($("#select2-mob-sel-restaurant-container").text(_("Find a Restaurant")),$("#select2-sb-sel-restaurant-container").text(_("Find a Restaurant")),searchResName="",$("#select2-sb-sel-restaurant-container").addClass("searchPlaceHolderColor"),$("#select2-mob-sel-restaurant-container").addClass("searchPlaceHolderColor"))}else $("#select2-mob-sel-restaurant-container").text(_("Find a Restaurant")),$("#select2-sb-sel-restaurant-container").text(_("Find a Restaurant")),$("#select2-sb-sel-restaurant-container").addClass("searchPlaceHolderColor"),$("#select2-mob-sel-restaurant-container").addClass("searchPlaceHolderColor"),searchResName=""}else isSG=!1});var month_names=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");$(function(){$("#cuisine-drop :checkbox").on("click",function(){var e=$
1(this),t=e.val(),l=$("#cus-boxes :checkbox:checked"),a=l.length,o=$("#sel-cuisine, #mob-sel-cuisine");0==t?e.prop("checked")?($("#mob-cuisine-drop :checkbox").prop("checked",!0),$("#mob-cuisine-drop li").addClass("selected"),o.val(a+" "+_("Cuisines"))):($("#mob-cuisine-drop :checkbox").prop("checked",!1),$("#mob-cuisine-drop li").removeClass("selected"),o.val(_("Any Cuisine"))):(e.prop("checked")?$('#mob-cuisine-drop :checkbox[value="'+t+'"]').prop("checked",!0).parents("li").addClass("selected"):$('#mob-cuisine-drop :checkbox[value="'+t+'"]').prop("checked",!1).parents("li").removeClass("selected"),0==a?o.val(_("Any Cuisine")):1==a?o.val(l.parents("label").text()):o.val(a+" "+_("Cuisines")))}),$("#location-drop :checkbox").on("click",function(){var e=$(this),t=e.val(),l=$("#loc-boxes :checkbox:checked"),a=l.length,o=$("#sel-location, #mob-sel-location");0==t?e.prop("checked")?($("#mob-location-drop :checkbox").prop("checked",!0),$("#mob-location-drop li").addClass("selected"),o.val(a+" "+_("Locations"))):($("#mob-location-drop :checkbox").prop("checked",!1),$("#mob-location-drop li").removeClass("selected"),o.val(_("Any Location"))):(e.prop("checked")?$('#mob-location-drop :checkbox[value="'+t+'"]').prop("checked",!0).parents("li").addClass("selected"):$('#mob-location-drop :checkbox[value="'+t+'"]').prop("checked",!1).parents("li").removeClass("selected"),0==a?o.val(_("Any Location")):1==a?o.val(l.parents("label").text()):o.val(a+" "+_("Locations")))}),$("#mob-cuisine-drop :checkbox").on("click",function(){var e=$
1(this),t=e.val(),l=$("#mob-cus-boxes :checkbox:checked"),a=l.length,o=$("#sel-cuisine, #mob-sel-cuisine");0==t?e.prop("checked")?($("#cuisine-drop :checkbox").prop("checked",!0),$("#cuisine-drop li").addClass("selected"),o.val(a+" "+_("Cuisines")),$(".cuisine-filter :checkbox").prop("checked",!0),$(".cuisine-filter li").addClass("selected")):($("#cuisine-drop :checkbox").prop("checked",!1),$("#cuisine-drop li").removeClass("selected"),o.val(_("Any Cuisine"))):(e.prop("checked")?($('#cuisine-drop :checkbox[value="'+t+'"]').prop("checked",!0).parents("li").addClass("selected"),$('.cuisine-filter :checkbox[value="'+t+'"]').prop("checked",!0).parents("li").addClass("selected")):($('#cuisine-drop :checkbox[value="'+t+'"]').prop("checked",!1).parents("li").removeClass("selected"),$('.cuisine-filter :checkbox[value="'+t+'"]').prop("checked",!1).parents("li").removeClass("selected")),0==a?o.val(_("Any Cuisine")):1==a?o.val(l.parents("label").text()):o.val(a+" "+_("Cuisines")))}),$("#mob-location-drop :checkbox").on("click",function(){var e=$
1(this),t=e.val(),l=$("#mob-loc-boxes :checkbox:checked"),a=l.length,o=$("#sel-location, #mob-sel-location");0==t?e.prop("checked")?($("#location-drop :checkbox").prop("checked",!0),$("#location-drop li").addClass("selected"),o.val(a+" "+_("Locations")),$(".location-filter :checkbox").prop("checked",!0),$(".location-filter li").addClass("selected")):($("#location-drop :checkbox").prop("checked",!1),$("#location-drop li").removeClass("selected"),o.val(_("Any Location")),$(".location-filter :checkbox").prop("checked",!1),$(".location-filter li").removeClass("selected")):(e.prop("checked")?($('#location-drop :checkbox[value="'+t+'"]').prop("checked",!0).parents("li").addClass("selected"),$('.location-filter :checkbox[value="'+t+'"]').prop("checked",!0).parents("li").addClass("selected")):($('#location-drop :checkbox[value="'+t+'"]').prop("checked",!1).parents("li").removeClass("selected"),$('.location-filter :checkbox[value="'+t+'"]').prop("checked",!1).parents("li").removeClass("selected")),0==a?o.val(_("Any Location")):1==a?o.val(l.parents("label").text()):o.val(a+" "+_("Locations")))}
1),$("#date-field").on("change",function(){var e=$(this).val().split(" "),t=monthNameToid(e[1]),l=e[2]+"-"+t+"-"+e[0];$("#mob-date-field").val(l)}),$("#mob-date-field").on("change",function(){var e=$(this).val().split("-"),t=e[2]+" "+month_names[parseInt(e[1])-1]+" "+e[0];$("#date-field").val(t)}),$("#time-field").on("change",function(){$("#time-field-mob > option").eq($(this)[0].selectedIndex).prop("selected",!0)}),$("#time-field-mob").on("change",function(){$("#time-field > option").eq($(this)[0].selectedIndex).prop("selected",!0)}),$("#adults").on("change",function(){console.log("adults changed:"+$("#adults").val());var e=$("#adults").val(),t=$("#children").val(),l=_("Adults");1==e&&(l=_("Adult"));var a=_("Children");1==t&&(a=_("Child"));var o=e+" "+l+(t>0?", "+t+" "+a:"");$("#diners-field,#diners-field-mob").val(o),$("#adults-mob > option").eq($(this)[0].selectedIndex).prop("selected",!0)}),$("#adults-mob").on("change",function(){var e=$("#adults-mob").val(),t=$("#children-mob").val(),l=_("Adults");1==e&&(l=_("Adult"));var a=_("Children");1==t&&(a=_("Child"));var o=e+" "+l+(t>0?", "+t+" "+a:"");$("#diners-field,#diners-field-mob").val(o),$("#adults > option").eq($(this)[0].selectedIndex).prop("selected",!0)}
1),$("#children").on("change",function(){var e=$("#adults").val(),t=$("#children").val(),l=_("Adults");1==e&&(l=_("Adult"));var a=_("Children");1==t&&(a=_("Child"));var o=e+" "+l+(t>0?", "+t+" "+a:"");$("#diners-field,#diners-field-mob").val(o),$("#children-mob > option").eq($(this)[0].selectedIndex).prop("selected",!0)}),$("#children-mob").on("change",function(){var e=$("#adults-mob").val(),t=$("#children-mob").val(),l=_("Adults");1==e&&(l=_("Adult"));var a=_("Children");1==t&&(a=_("Child"));var o=e+" "+l+(t>0?", "+t+" "+a:"");$("#diners-field,#diners-field-mob").val(o),$("#children > option").eq($(this)[0].selectedIndex).prop("selected",!0)}),$("#sel-cuisine, #sel-location, #mob-sel-cuisine, #mob-sel-location").on("click",function(){var e=_("Any Restaurant");1==isSG?e=_("Find a Restaurant"):($("#select2-sel-restaurant-container, #select2-sb-sel-restaurant-container, #select2-mob-sel-restaurant-container").html(e),$("#sb-sel-restaurant,#sel-restaurant,#mob-sel-restaurant").val(0));var t=$("#foptions input[type=checkbox],#foptions-mob input[type=checkbox]"),l=$("#foptions label");t.prop("disabled",!1),l.removeClass("disabled"),$(".cla").show(),$("#refine-reslt").show()}
1),$("#sb-sel-restaurant").on("change",function(){var e=$("#foptions input[type=checkbox],#foptions-mob input[type=checkbox]"),t=$("#foptions label"),l=$("#mob-sel-restaurant > option").eq($(this)[0].selectedIndex);l.prop("selected",!0),$("#select2-mob-sel-restaurant-container").text(l.text()),$(".select2-selection__rendered").removeClass("searchPlaceHolderColor"),$("#select2-mob-sel-restaurant-container").removeClass("searchPlaceHolderColor");var a=_("Any Restaurant");1==isSG&&(a=_("Find a Restaurant"),searchResName=l.text(),$(".select2-selection__rendered").text(searchResName),$("#search_keyword").val(searchResName)),$("#select2-sb-sel-restaurant-container").text()!=a?(1!=isSG?($(".select2-selection__rendered").removeClass(""),$("#cuisine-drop :checkbox").prop("checked",!1),$("#mob-cuisine-drop :checkbox").prop("checked",!1),$("#sel-cuisine,#mob-sel-cuisine").val(_("Any Cuisine")),$("#location-drop :checkbox").prop("checked",!1),$("#mob-location-drop :checkbox").prop("checked",!1),$("#sel-location,#mob-sel-location").val(_("Any Location")),$("#cuisine-drop li, #mob-cuisine-drop li").removeClass("selected"),$("#location-drop li, #mob-location-drop li").removeClass("selected"),e.attr("disabled",!0),t.addClass("disabled"),$(".cla").hide()):(e.attr("disabled",!1),t.removeClass("disabled")),$("#refine-reslt").hide()):(1==isSG&&($(".select2-selection__rendered").addClass("searchPlaceHolderColor"),$("#select2-mob-sel-restaurant-container").addClass("searchPlaceHolderColor")),e.attr("disabled",!1),t.removeClass("disabled"),$(".cla").show(),$("#refine-reslt").show())}
1),$("#mob-sel-restaurant").on("change",function(){var e=$("#foptions input[type=checkbox],#foptions-mob input[type=checkbox]"),t=$("#foptions label"),l=$("#sb-sel-restaurant > option").eq($(this)[0].selectedIndex);l.prop("selected",!0),$("#select2-sb-sel-restaurant-container").text(l.text()),$(".select2-selection__rendered").removeClass("searchPlaceHolderColor"),$("#select2-mob-sel-restaurant-container").removeClass("searchPlaceHolderColor");var a=_("Any Restaurant");1==isSG&&(a=_("Find a Restaurant"),searchResName=l.text(),$(".select2-selection__rendered").text(searchResName),$("#search_keyword").val(searchResName)),$("#select2-mob-sel-restaurant-container").text()!=a?1!=isSG?($("#cuisine-drop :checkbox").prop("checked",!1),$("#mob-cuisine-drop :checkbox").prop("checked",!1),$("#sel-cuisine,#mob-sel-cuisine").val(_("Any Cuisine")),$("#location-drop :checkbox").prop("checked",!1),$("#mob-location-drop :checkbox").prop("checked",!1),$("#sel-location,#mob-sel-location").val(_("Any Location")),$("#cuisine-drop li, #mob-cuisine-drop li").removeClass("selected"),$("#location-drop li, #mob-location-drop li").removeClass("selected"),e.attr("disabled",!0),t.addClass("disabled"),$(".cla").hide(),$("#refine-reslt").hide()):(e.attr("disabled",!1),t.removeClass("disabled"),$("#refine-reslt").show()):(1==isSG&&($(".select2-selection__rendered").addClass("searchPlaceHolderColor"),$("#select2-mob-sel-restaurant-container").addClass("searchPlaceHolderColor")),e.attr("disabled",!1),t.removeClass("disabled"),$(".cla").show(),$("#refine-reslt").show())}),$("#foptions :checkbox").on("click",function(){$('#foptions-mob :checkbox[value="'+$(this).val()+'"]').prop("checked",$(this).prop("checked"))}),$(".cuisine-filter :checkbox").on("click",function(){$('#mob-cuisine-drop :checkbox[value="'+$(this).val()+'"]').prop("checked",$(this).prop("checked"));var e=$(this),t=e.val(),l=$(".cuisine-filter :checkbox:checked"),a=l.length,o=$("#mob-sel-cuisine");if(0==t)if(e.prop("checked")){$("#mob-cuisine-drop :checkbox").prop("checked",!0),$("#mob-cuisine-drop li").addClass("selected");var s=$("#mob-cus-boxes :checkbox").length;o.val(s+" "+_("Cuisines"))}else $("#mob-cuisine-drop :checkbox").prop("checked",!1),$("#mob-cuisine-drop li").removeClass("selected"),o.val(_("Any Cuisines"));else 0==a?o.val(_("Any Cuisines")):1==a?o.val(l.parents("label").text()):o.val(a+" "+_("Cuisines")),e.prop("checked")?$('#mob-cuisine-drop :checkbox[value="'+$(this).val()+'"]').prop("checked",!0).parents("li").addClass("selected"):$('#mob-cuisine-drop :checkbox[value="'+$(this).val()+'"]').prop("checked",!0).parents("li").removeClass("selected");$(".mob-sel-cus").text(o.val())}),$(".location-filter :checkbox").on("click",function(){$('#mob-location-drop :checkbox[value="'+$(this).val()+'"]').prop("checked",$(this).prop("checked"));var e=$(this),t=e.val(),l=$(".location-filter :checkbox:checked"),a=l.length,o=$("#mob-sel-location");if(0==t)if(e.prop("checked")){$("#mob-location-drop :checkbox").prop("checked",!0),$("#mob-location-drop li").addClass("selected");var s=$("#mob-cus-boxes :checkbox").length;o.val(s+" "+_("Location"))}else $("#mob-location-drop :checkbox").prop("checked",!1),$("#mob-location-drop li").removeClass("selected"),o.val(_("Any Location"));else 0==a?o.val(_("Any Location")):1==a?o.val(l.parents("label").text()):o.val(a+" "+_("Location")),e.prop("checked")?$('#mob-location-drop :checkbox[value="'+$(this).val()+'"]').prop("checked",!0).parents("li").addClass("selected"):$('#mob-location-drop :checkbox[value="'+$(this).val()+'"]').prop("checked",!0).parents("li").removeClass("selected");$(".mob-sel-loc").text(o.val())}),$("#foptions-mob :checkbox").on("click",function(){$('#foptions :checkbox[value="'+$(this).val()+'"]').prop("checked",$(this).prop("checked"))}),$("#restaurant,#mob-restaurant").on("click",function(){$(".select2-search__field").attr("placeholder",_("Search Restaurant Name"))})}),$(document).on("click",".morebox-point",function(){$(".morebox-point").hide();var e=$("#page").val(),t=$("#month").val();$.ajax({url:"/inner_api/points_page",type:"POST",async:!1,data:{page:e,month:t},dataType:"json"}).done(function(e){""!=e.data.loadmore&&$(".morebox-point").show(),$(".pointbox").append(e.data.view_data),$("#month").val(e.data.last_month),$("#page").val(e.data.page)})}),$(function(){}),$(function(){$(".cuisine-select-all input").click(function(){var e=$
1(".cuisine-filter input[type=checkbox]");$(".cuisine-filter input[type=checkbox]").length;e.prop("checked",!!$(this).is(":checked")),this.checked?$(".cuisine-filter li").addClass("selected"):$(".cuisine-filter li").removeClass("selected")}),$(".location-select-all input").click(function(){var e=$(".location-filter input[type=checkbox]");$(".location-filter input[type=checkbox]").length;e.prop("checked",!!$(this).is(":checked")),this.checked?$(".location-filter li").addClass("selected"):$(".location-filter li").removeClass("selected")})}),$(function(){$(".search-box-sg .title span a").click(function(){$("#diners-field").attr("value",""),$("#mob-diners-field").attr("value",""),$("#diners-field").val(""),$("#mob-diners-field").val(""),$("#date-field").attr("value",""),$("#mob-date-field").attr("value",""),$("#date-field").val(""),$("#mob-date-field").val(""),$("#time-field").addClass("pdt-placeholder-color"),$("#mob-time-field").addClass("pdt-placeholder-color"),$("#time-field-mob").addClass("pdt-placeholder-color"),$("#adults option").eq(1).prop("selected",!0),$("#mob-adults option").eq(1).prop("selected",!0),$("#children option").eq(0).prop("selected",!0),$("#mob-children option").eq(0).prop("selected",!0),$("#time-field option").eq(0).prop("selected",!0),$("#mob-time-field option").eq(0).prop("selected",!0),$("#time-field-mob option").eq(0).prop("selected",!0)}),$(".search-box-sg-mob .title span a").click(function(){$("#diners-field").attr("value",""),$("#mob-diners-field").attr("value",""),$("#diners-field").val(""),$("#mob-diners-field").val(""),$("#diners-field-mob").attr("value",""),$("#diners-field-mob").val(""),$("#date-field").attr("value",""),$("#mob-date-field").attr("value",""),$("#date-field").val(""),$("#mob-date-field").val(""),$("#time-field").addClass("pdt-placeholder-color"),$("#mob-time-field").addClass("pdt-placeholder-color"),$("#time-field-mob").addClass("pdt-placeholder-color"),$("#adults option").eq(1).prop("selected",!0),$("#mob-adults option").eq(1).prop("selected",!0),$("#adults-mob option").eq(1).prop("selected",!0),$("#children option").eq(0).prop("selected",!0),$("#mob-children option").eq(0).prop("selected",!0),$("#time-field option").eq(0).prop("selected",!0),$("#mob-time-field option").eq(0).prop("selected",!0),$("#time-field-mob option").eq(0).prop("selected",!0)}),$("#diners-field").click(function(){console.log(2121212),$("#diners-drop").toggle(),(0==$("#diners-field").val().length||$("#diners-field-mob").val()&&0==$("#diners-field-mob").val().length)&&($("#diners-field").val($("#diners-drop #adults").val()+_(" adults")),$("#diners-field-mob").val($("#diners-drop-mob #adults-mob").val()+_(" adults")))}),$("#diners-field-mob").click(function(){0!=$("#diners-field").val().length&&0!=$("#diners-field-mob").val().length||($("#diners-field").val($("#diners-drop #adults").val()+_(" adults")),$("#diners-field-mob").val($("#diners-drop-mob #adults-mob").val()+_(" adults")))}),$("#time-field").change(function(){$("#time-field").removeClass("pdt-placeholder-color"),$("#mob-time-field").removeClass("pdt-placeholder-color"),$("#time-field-mob").removeClass("pdt-placeholder-color")}),$("#mob-time-field").change(function(){$("#time-field").removeClass("pdt-placeholder-color"),$("#mob-time-field").removeClass("pdt-placeholder-color"),$("#time-field-mob").removeClass("pdt-placeholder-color")}),$("#time-field-mob").change(function(){$("#time-field").removeClass("pdt-placeholder-color"),$("#mob-time-field").removeClass("pdt-placeholder-color"),$("#time-field-mob").removeClass("pdt-placeholder-color")}),$(".search-box-sg .select2-container--default").click(function(){isSG&&($(".select2-search__field").bind("input propertychange",function(){searchResName=$(".select2-search__field").val();var e=$(".select2-results__options").children("li:last-child");e.text()==_("No results found")&&e.hide()}),$(".select2-search__field").blur(function(){0==searchResName.length&&(searchResName=$(".select2-results__options").children("li:first-child").text()),$(".select2-selection__rendered").text(searchResName),$("#search_keyword").val(searchResName)}))}),$(".search-box-sg-mob .select2-container--default").click(function(){isSG&&($(".select2-search__field").bind("input propertychange",function(){searchResName=$(".select2-search__field").val();
1var e=$(".select2-results__options").children("li:last-child");e.text()==_("No results found")&&e.hide()}),$(".select2-search__field").blur(function(){0==searchResName.length&&(searchResName=$(".select2-results__options").children("li:first-child").text()),$(".select2-selection__rendered").text(searchResName)}))})}),$(window).resize(function(){maxSevenRows()});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.