").attr("type","hidden").attr("name","command.SpecializationIds").attr("value",n).appendTo("#myFilterForm"),$("#"+n+"-spec-btn").css("font-weight","900"))}function changeContestType(n){var t=contestTypeValue.findIndex(t=>t==n);t!=-1?(contestTypeValue.splice(t),$('input[name="command.ContestTypeId"][value="'+n+'"]').remove(),$("#"+n+"-btn").css("font-weight","300")):(contestTypeValue.push(n),$("").attr("type","hidden").attr("name","command.ContestTypeId").attr("value",n).appendTo("#myFilterForm"),$("#"+n+"-btn").css("font-weight","900"))}var SpecificationsValue,contestTypeValue;let specializationValue=[];const filterType=null;$(document).ready(function(){$(".input").change(function(){$("#pageNumber").val("");$("#myFilterForm").trigger("submit")});$("#cityId").change(function(){$("#pageNumber").val("");$("#myFilterForm").trigger("submit")});$(".input").click(function(){$("#pageNumber").val("");var n=$(this);n.data("waschecked")==!0?(n.prop("checked",!1),n.data("waschecked",!1)):n.data("waschecked",!0);n.siblings('input[type="radio"]').data("waschecked",!1);$("#myFilterForm").trigger("submit")});$(".fa-arrow-circle-right").click(function(){$("#pageNumber").val("");$("#myFilterForm").trigger("submit")});$(".fa-arrow-right").click(function(){$("#pageNumber").val("");$("#myFilterForm").trigger("submit")});$("#myFilterForm").submit(function(n){if(n.preventDefault(),validate(filterType)&&validate("year")&&validate("date")){$("#priceValidation").hide();$("#yearValidation").hide();$("#dateValidation").hide();var t=$(this).serialize();$.post("",t,function(n){$("#bodySide").html(n)})}else filterType==3&&$("#yearValidation").show(),filterType==4?$("#dateValidation").show():filterType!=4&&filterType!=3&&$("#priceValidation").show()});$("#isUsedInput").change(function(){$("#pageNumber").val("");cb=$(this);cb.val(cb.prop("checked"));$("#myFilterForm").trigger("submit");$("#bookstatus").show()});$("#freeInput").click(function(){$("#pageNumber").val("");cb=$(this);cb.data("waschecked")==!0?(cb.prop("checked",!1),cb.data("waschecked",!1)):cb.data("waschecked",!0);cb.val(cb.prop("checked"));cb.siblings('input[type="radio"]').data("waschecked",!1);$("#myFilterForm").trigger("submit")});$("#freeCancellationInput").click(function(){$("#pageNumber").val("");cb=$(this);cb.data("waschecked")==!0?(cb.prop("checked",!1),cb.data("waschecked",!1)):cb.data("waschecked",!0);cb.val(cb.prop("checked"));cb.siblings('input[type="radio"]').data("waschecked",!1);$("#myFilterForm").trigger("submit")})});SpecificationsValue=[];contestTypeValue=[]