function setupPopupClickHandlers(n,t){function u(n){var r=n.offset().left,t=n.closest(".main-container"),u=t.offset().left,f=n.width(),i=n.parent().next().find(".popup-icon"),e=i.width(),o=parseFloat(window.getComputedStyle(t[0]).paddingLeft),s=r-u;i.css({left:s-e/2+f/2-o})}var r="popup-trigger",i=null;t==null&&(t=""),$("[id|="+t+r+"]").click(function(f){var s=$(this),l=s.attr("id"),h=l.substring(r.length+t.length+1),e,o,c;$(".popup").hide(),i!==h?(e=$("#popup-"+h),e.toggle(),o={standard:{commissions:e.find("tr[name=commissions]"),commissionInfo:e.find("small[name=commission-info]")},alternative:{commissions:e.find("tr[name=alternative-buyers-premium]"),commissionInfo:e.find("small[name=short-commission-info]")}},s.data("loaded")?i=h:(c=s.data("url"),$.ajax({url:c,dataType:"json",type:"GET",success:function(n){s.data("loaded",!0);var t=n.commissions,r=o.alternative,u=o.standard;t.AltBuyersPremiumLabel?(r=o.standard,u=o.alternative,o.alternative.commissions.find("td").html(t.AltBuyersPremiumLabel)):(e.find(".commissions-ex-vat").html(t.CommissionsExVat?t.CommissionsExVat.toFixed(2):0),e.find(".commissions-with-vat").html(t.CommissionsWithVat?t.CommissionsWithVat.toFixed(2):0),e.find(".buyers-premium-rate-with-vat").html(t.BuyersPremiumRateWithVat?t.BuyersPremiumRateWithVat:0)),r.commissions.hide(),r.commissionInfo.hide(),u.commissions.show(),u.commissionInfo.show(),n.artistResaleRights?e.find(".artist-resale-rights").show():e.find(".artist-resale-rights").hide(),n.vatRate>0?(e.find(".vat-rate-row").show(),e.find(".vat-rate").html(n.vatRate)):e.find(".vat-rate-row").hide(),e.find(".hammer-excess").html(n.hammerExcess),i=h,e.find(".results-loader").hide(),e.find(".popup-main-content").show(),e.find(".popup-main-content").removeClass("hide")}}))):i=null,n&&u(s),f.stopPropagation()}),$(document).click(function(){$(".popup").hide(),i=null})}function bindTriggers(){$("#results .lot").each(function(n,t){$(t).mouseenter(function(n){var t=$(n.currentTarget).children(".lotUrl")[0],i=$(t).attr("href").match(/([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/i)[1];$("#results").attr("class")=="grid"&&n.currentTarget!=n.fromElement&&n.currentTarget.nodeName=="ARTICLE"&&(showDelayTimer&&(clearTimeout(showDelayTimer),showDelayTimer=null),showDelayTimer=setTimeout(function(){hideDelayTimer&&(clearTimeout(hideDelayTimer),hideDelayTimer=null),showDelayTimer&&(clearTimeout(showDelayTimer),showDelayTimer=null),info.css("opacity",0),populatePopup(info,n.currentTarget,i);var t=getPopupPostion(n.currentTarget);info.css({top:t.top,left:t.left,display:"block"}).animate({opacity:1},time,"swing")},showDelay))}),$(t).mouseleave(function(){showDelayTimer&&(clearTimeout(showDelayTimer),showDelayTimer=null)})})}function populatePopup(n,t,i){var r,u;typeof lotCollectionsManager!="undefined"&&(r=lotCollectionsManager.get("LotCollection").findWhere({LotId:i}),renderLotViews&&typeof(renderLotViews==="function")&&renderLotViews({model:r,multiple:!0,popUp:!0}),n.find(".bids").css("display","block"),n.find(".bidInfo").show()),(typeof lotCollectionsManager=="undefined"||typeof r=="undefined")&&(n.find(".bids").css("display","none"),n.find(".bidInfo").hide(),$(t).find(".bidInfo").clone().insertBefore(n.find(".blurb"))),n.find(".lotUrl").attr("href",$(t).find(".lotUrl").attr("href")),n.find(".lotImage").html($(t).find(".lotImage").html()),n.find(".auctionHouse").text($(t).find(".auctionHouse").text()),n.find(".lotNumber").html($(t).find(".lotNumber").html()),n.find(".quantity").text($(t).find(".quantity").text()),n.find(".estimate").text($(t).find(".estimate").text()),n.find(".blurb").text($(t).find(".blurb").text().substring(0,110)),n.find(".buttons").html($(t).find(".buttons").clone()),u="popup_"+n.find(".watch").attr("id"),n.find(".watch").attr("id",u)}function updateTimerDynamically(n,t){/\d+[m]/.test(t)&&/\d+[s]/.test(t)&&n.find(".bidInfo .date .popup_countdown").Countdown(calculateSecondsFromFormattedTime(t),{DisplayFunction:CountdownTimerDisplay},null,!0)}function calculateSecondsFromFormattedTime(n){var t=n,i=/\d+[d]/.exec(t)!==null?parseInt(/\d+[d]/.exec(t)):0,r=/\d+[h]/.exec(t)!==null?parseInt(/\d+[h]/.exec(t)):0,u=/\d+[m]/.exec(t)!==null?parseInt(/\d+[m]/.exec(t)):0,f=/\d+[s]/.exec(t)!==null?parseInt(/\d+[s]/.exec(t)):0;return i*86400+r*3600+u*60+f}function getPopupPostion(n){var r=getWindowSize(),u=getPopupSize(),t=$(n).position().top-5,i=$(n).position().left-5;return{top:t,left:i}}function getWindowSize(){return{scrollLeft:$(window).scrollLeft(),scrollTop:$(window).scrollTop(),width:$(window).width(),height:$(window).height()}}function getPopupSize(){return{width:$("#popup").width(),height:$("#popup").height()}}function ToggleImportantSalesInfo(){$("#importantSaleInfo").toggleClass("closeInfo"),$("#importantSaleInfo .content").slideToggle()}function getHasUserViewedBefore(n){var t=GetCookie(Gap.Portal.UI.LotListProperties.visitedBeforeCookieName);return t.contains(n)}function loadWishList(){var n=Gap.Portal.UI.LotListWishListProperties.urlWishList;$.ajax({type:"GET",url:n,success:setWishListItemStates})}function setWishListItemStates(n){$(".wishlistLink").removeClass("wishListRemove").addClass("wishListAdd"),$(n.WishListItems).each(function(n,t){var i=$("[id$="+t+"].wishlistLink");i.length>0&&i.removeClass("wishListAdd").addClass("wishListRemove")})}function onPdfExportClick(){var n=new XMLHttpRequest;n.open("GET",Gap.Portal.UI.AuctionDetailsProperties.saleDetailsUrlPdfExport),n.responseType="blob",n.onload=function(){var i,t,n;this.readyState===XMLHttpRequest.DONE&&this.status===200&&(i=window.navigator.userAgent.indexOf("MSIE"),i>0?window.navigator.msSaveBlob(this.response,"Lots.pdf"):(t=window.URL.createObjectURL(this.response),n=document.createElement("a"),document.body.appendChild(n),n.href=t,n.download="Lots.pdf",n.click())),RestorePrintBtn()},n.onerror=function(){RestorePrintBtn()},n.send()}function RestorePrintBtn(){$("#pdfExport").show(),$("#pdfExportLoading").hide()}function WishlistAddRemove(n,t,i,r,u,f,e,o,s,h,c){var l=$("#wishList"+n+" > i");if(!l.hasClass("wait")){var a=l.hasClass("empty")?"Add":"Remove",v=typeof wishListConfig!="undefined"?wishListConfig.tokenElementId:null,y=wishlistAjaxURL,p={lotId:n,auctionId:t,action:a,auctionReference:i};l.addClass("wait"),$.ajax({type:"POST",url:y,data:$.param(p),headers:Gap.Common.Ajax.GetAntiForgeryTokenHeader(v),success:function(i){wishListSuccess(i),a==="Add"?pushWatchedUnwatchedEvent("WatchedItem",t,s,n,r,u,f,e,o,h,c):pushWatchedUnwatchedEvent("UnwatchedItem",t,s,n,r,u,f,e,o,h,c)},error:wishListFailed,timeout:1e5})}}function pushWatchedUnwatchedEvent(n,t,i,r,u,f,e,o,s,h,c){window.dataLayer&&window.dataLayer.push(ReplaceUndefinedToNull({event:n,catalogueId:t,auctioneerId:i,lotId:r,lotName:u,categoryCode:h||window.dataLayer[0].categoryCode,lotCategory:c||window.dataLayer[0].lotCategory,catalogueName:f,auctioneerName:e,lotPrimaryCategory:window.dataLayer[0].lotPrimaryCategory,lotItemType:window.dataLayer[0].lotItemType,lotBrand:window.dataLayer[0].lotBrand,auctionType:o,userId:s||window.dataLayer[0].userId,globalId:window.dataLayer[0].globalId}))}function wishListSuccess(n){var r;if(n.Success){var t=$("#wishList"+n.Data.lotID+" > i"),i=$("#wishList"+n.Data.lotID+" > span"),u=$("#wishList"+n.Data.lotID);if(t.removeClass("wait"),n.Data.action=="Add"?(t.removeClass("empty"),i.text(portalScriptResources.Remove_from_watch_list)):(t.addClass("empty"),i.text(portalScriptResources.Add_to_watch_list)),n.Data.action==="Add"?$(".watchlist-register").removeClass("hide"):$(".watchlist-register").addClass("hide"),typeof wishListConfig!="undefined"&&wishListConfig.isInWishlistPage&&n.Data.action!="Add"&&(r=u.parents("article.lot").eq(0),r.effect("clip",{},500,function(){if(typeof wishListConfig.totalResults!="undefined"){wishListConfig.totalResults--;var n=wishListConfig.totalResults>1?"s":"",t=wishListConfig.wishListHeaderText.replace("$TotalResults$",wishListConfig.totalResults).replace("$plural$",n),i=t.replace("{0}",wishListConfig.totalResults);$("div#auctionCatalogues h1").replaceWith(i)}})),mustUpdatePanel)try{UpdateWishListPanel()}catch(f){}}else wishListFailed(n)}function wishListFailed(n){if($("[id^=wishList].wait").removeClass("wait"),n.Data&&n.Data.ErrorCode&&n.Data.ErrorCode=="401")showLoginBox();else{var t=n.message=n.Message;ShowNotification("error","Error",t)}}function UpdateWishListPanel(){var n=wishlistAjaxURL+"/update-panel";$.ajax({url:n,cache:!1,dataType:"html",headers:Gap.Common.Ajax.GetAntiForgeryTokenHeader(),success:function(n){$("#miniWishList").replaceWith(n)},error:function(){alert(portalScriptResources.WishListUpdateFailure)}})}var mustUpdatePanel;(function(){setupPopupClickHandlers(!1)})(jQuery);var time=250,hideDelay=750,showDelay=500,hideDelayTimer=null,showDelayTimer=null,info=$("#popup").css("opacity",0);$(function(){bindTriggers(),$(info.get(0)).mouseleave(function(){showDelayTimer&&(clearTimeout(showDelayTimer),showDelayTimer=null),hideDelayTimer=setTimeout(function(){hideDelayTimer&&(clearTimeout(hideDelayTimer),hideDelayTimer=null),info.animate({opacity:0},time,"swing",function(){info.css("display","none")})},hideDelay)})}),function(){window.Gap=window.Gap||{},Gap.Portal=Gap.Portal||{},Gap.Portal.UI=Gap.Portal.UI||{},Gap.Portal.UI.LotListProperties=null,Gap.Portal.UI.LotListWishListProperties=null}(),$(document).ready(function(){if(wireUpTooltips("fieldName","helpPopupBox"),wireUpTooltips("withPopup","registered"),Gap.Portal.UI.LotListProperties&&Gap.Portal.UI.LotListProperties.auctionReference){var n=getHasUserViewedBefore(Gap.Portal.UI.LotListProperties.auctionReference);$("#importantSaleInfo h3").click(function(){ToggleImportantSalesInfo(),n||Gap.Common.Ajax.Post(Gap.Portal.UI.LotListProperties.setHasUserViewedBeforeCookie,{auctionReference:Gap.Portal.UI.LotListProperties.auctionReference})}),n||ToggleImportantSalesInfo()}}),$(document).ready(function(){Gap.Portal.UI.LotListWishListProperties&&!Gap.Portal.UI.LotListWishListProperties.userIsAuthenticated&&$("buttonsAndCategoryLinks .wishlistLink").click(function(){return window.showLoginBox(),!1})}),function(n){function d(n){var t={},i;return n.selectionStart===undefined?(n.focus(),i=document.selection.createRange(),t.length=i.text.length,i.moveStart("character",-n.value.length),t.end=i.text.length,t.start=t.end-t.length):(t.start=n.selectionStart,t.end=n.selectionEnd,t.length=t.end-t.start),t}function b(n,t,i){if(n.selectionStart===undefined){n.focus();var r=n.createTextRange();r.collapse(!0),r.moveEnd("character",i),r.moveStart("character",t),r.select()}else n.selectionStart=t,n.selectionEnd=i}function p(t,i){n.each(i,function(r,u){var f,e;typeof u=="function"?i[r]=u(t,i,r):typeof u=="string"&&(f=u.substr(0,4),f==="fun:"?(e=n.autoNumeric[u.substr(4)],i[r]=typeof e=="function"?n.autoNumeric[u.substr(4)](t,i,r):null):f==="css:"&&(i[r]=n(u.substr(4)).val()))})}function c(n,t){typeof n[t]=="string"&&(n[t]*=1)}function r(t,i){var r=n.extend({},n.fn.autoNumeric.defaults,i),f,e,u,o;return n.metadata&&t&&(r=n.extend(r,t.metadata())),t&&p(t,r),f=r.vMax.toString().split("."),e=!r.vMin&&r.vMin!==0?[]:r.vMin.toString().split("."),c(r,"vMax"),c(r,"vMin"),c(r,"mDec"),r.aNeg=r.vMin<0?"-":"",typeof r.mDec!="number"&&(r.mDec=Math.max((f[1]?f[1]:"").length,(e[1]?e[1]:"").length)),r.altDec===null&&r.mDec>0&&(r.aDec==="."&&r.aSep!==","?r.altDec=",":r.aDec===","&&r.aSep!=="."&&(r.altDec=".")),u=r.aNeg?"([-\\"+r.aNeg+"]?)":"(-?)",r._aNegReg=u,r._skipFirst=new RegExp(u+"[^-"+(r.aNeg?"\\"+r.aNeg:"")+"\\"+r.aDec+"\\d].*?(\\d|\\"+r.aDec+"\\d)"),r._skipLast=new RegExp("(\\d\\"+r.aDec+"?)[^\\"+r.aDec+"\\d]\\D*$"),o=(r.aNeg?r.aNeg:"-")+r.aNum+"\\"+r.aDec,r.altDec&&r.altDec!==r.aSep&&(o+=r.altDec),r._allowed=new RegExp("[^"+o+"]","gi"),r._numReg=new RegExp(u+"(?:\\"+r.aDec+"?(\\d+\\"+r.aDec+"\\d+)|(\\d*(?:\\"+r.aDec+"\\d*)?))"),r}function t(n,t,i){var r,u;if(t.aSign)while(n.indexOf(t.aSign)>-1)n=n.replace(t.aSign,"");return n=n.replace(t._skipFirst,"$1$2"),n=n.replace(t._skipLast,"$1"),n=n.replace(t._allowed,""),t.altDec&&(n=n.replace(t.altDec,t.aDec)),r=n.match(t._numReg),n=r?[r[1],r[2],r[3]].join(""):"",i&&(u="^"+t._aNegReg+"0*(\\d"+(i==="leading"?")":"|$)"),u=new RegExp(u),n=n.replace(u,"$1$2")),n}function y(n,t,i){if(t&&i){var r=n.split(t);r[1]&&r[1].length>i&&(i>0?(r[1]=r[1].substring(0,i),n=r.join(t)):n=r[0])}return n}function o(n,t,i){return t&&t!=="."&&(n=n.replace(t,".")),i&&i!=="-"&&(n=n.replace(i,"-")),n.match(/\d/)||(n+="0"),n}function h(n,t,i){return i&&i!=="-"&&(n=n.replace("-",i)),t&&t!=="."&&(n=n.replace(".",t)),n}function e(n,i){n=t(n,i),n=y(n,i.aDec,i.mDec),n=o(n,i.aDec,i.aNeg);var r=+n;return r>=i.vMin&&r<=i.vMax}function f(n,t,i){return n===""||n===t.aNeg?t.wEmpty==="zero"?n+"0":t.wEmpty==="sign"||i?n+t.aSign:n:null}function s(n,i){var o,u,r,e,s;if(n=t(n,i),o=f(n,i,!0),o!==null)return o;if(u="",u=i.dGroup===2?/(\d)((\d)(\d{2}?)+)$/:i.dGroup===4?/(\d)((\d{4}?)+)$/:/(\d)((\d{3}?)+)$/,r=n.split(i.aDec),i.altDec&&r.length===1&&(r=n.split(i.altDec)),e=r[0],i.aSep)while(u.test(e))e=e.replace(u,"$1"+i.aSep+"$2");return i.mDec!==0&&r.length>1?(r[1].length>i.mDec&&(r[1]=r[1].substring(0,i.mDec)),n=e+i.aDec+r[1]):n=e,i.aSign&&(s=n.indexOf(i.aNeg)!==-1,n=n.replace(i.aNeg,""),n=i.pSign==="p"?i.aSign+n:n+i.aSign,s&&(n=i.aNeg+n)),n}function u(n,t,i,r){var v,y;n=n===""?"0":n.toString();var e="",s=0,u="",o=typeof r=="boolean"||r===null?r?t:0:+r;n!=parseInt(n,10)&&(o=2),v=function(n){var t=o===0?/(\.[1-9]*)0*$/:o===1?/(\.\d[1-9]*)0*$/:new RegExp("(\\.\\d{"+o+"}[1-9]*)0*$");return n=n.replace(t,"$1"),o===0&&(n=n.replace(/\.$/,"")),n},n.charAt(0)==="-"&&(u="-",n=n.replace("-","")),n.match(/^\d/)||(n="0"+n),u==="-"&&+n==0&&(u=""),+n>0&&(n=n.replace(/^0*(\d)/,"$1"));var a=n.lastIndexOf("."),p=a===-1?n.length-1:a,c=n.length-1-p;if(c<=t){if(e=n,c<o)for(a===-1&&(e+=".");c<o;)y="000000".substring(0,o-c),e+=y,c+=y.length;else c>o?e=v(e):c===0&&o===0&&(e=e.replace(/\.$/,""));return u+e}var l=a+t,f=+n.charAt(l+1),h=n.substring(0,l+1).split(""),w=n.charAt(l)==="."?n.charAt(l-1)%2:n.charAt(l)%2;if(f>4&&i==="S"||f>4&&i==="A"&&u===""||f>5&&i==="A"&&u==="-"||f>5&&i==="s"||f>5&&i==="a"&&u===""||f>4&&i==="a"&&u==="-"||f>5&&i==="B"||f===5&&i==="B"&&w===1||f>0&&i==="C"&&u===""||f>0&&i==="F"&&u==="-"||f>0&&i==="U")for(s=h.length-1;s>=0;s-=1)if(h[s]!==".")if(h[s]=+h[s]+1,h[s]<10)break;else s>0&&(h[s]="0");return h=h.slice(0,l+1),e=v(h.join("")),u+e}function a(t,i){this.options=i,this.that=t,this.$that=n(t),this.formatted=!1,this.io=r(this.$that,this.options),this.value=t.value}function k(n){var t=n.data("autoNumeric");return t||(t={},n.data("autoNumeric",t)),t}function i(n,t){var r=k(n),i=r.holder;return i===undefined&&t&&(i=new a(n.get(0),t),r.holder=i),i}function v(n){var t=n.data("autoNumeric");return t&&t.holder?t.holder.options:{}}function g(t){t=t||{};var r=n(this),u=i(r,t);u.io.aForm&&(this.value||u.io.wEmpty!=="empty")&&r.autoNumericSet(r.autoNumericGet(t),t)}function nt(t){var u=n(t.target),r=i(u);return(r.init(t),r.skipAllways(t))?(r.processed=!0,!0):r.processAllways()?(r.processed=!0,r.formatQuick(),t.preventDefault(),!1):(r.formatted=!1,!0)}function tt(t){var u=n(t.target),r=i(u),f=r.processed;if(r.init(t),r.skipAllways(t))return!0;if(f)return t.preventDefault(),!1;if(r.processAllways()||r.processKeypress())return r.formatQuick(),t.preventDefault(),!1;r.formatted=!1}function it(t){var f=n(t.target),r=i(f),u;if((r.init(t),u=r.skipAllways(t),r.kdCode=0,delete r.valuePartsBeforePaste,u)||this.value==="")return!0;r.formatted||r.formatQuick()}function rt(t){var r=n(t.target),u=i(r),e;u.inVal=r.val(),e=f(u.inVal,u.io,!0),e!==null&&r.val(e)}function w(r){var v=n(r.target),y=i(v),l=y.io,c=v.val(),p=c,a;c!==""&&(c=t(c,l),f(c,l)===null&&e(c,l)?(c=o(c,l.aDec,l.aNeg),c=u(c,l.mDec,l.mRound,l.aPad),c=h(c,l.aDec,l.aNeg)):c=""),a=f(c,l,!1),a===null&&(a=s(c,l)),a!==p&&v.val(a),a!==y.inVal&&(v.change(),delete y.inVal)}function l(t){return typeof t=="string"&&(t=t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),t="#"+t.replace(/(:|\.)/g,"\\$1")),n(t)}a.prototype={init:function(n){this.value=this.that.value,this.io=r(this.$that,this.options),this.ctrlKey=n.ctrlKey,this.cmdKey=n.metaKey,this.shiftKey=n.shiftKey,this.selection=d(this.that),(n.type==="keydown"||n.type==="keyup")&&(this.kdCode=n.keyCode),this.which=n.which,this.processed=!1,this.formatted=!1},setSelection:function(n,t,i){n=Math.max(n,0),t=Math.min(t,this.that.value.length),this.selection={start:n,end:t,length:t-n},(i===undefined||i)&&b(this.that,n,t)},setPosition:function(n,t){this.setSelection(n,n,t)},getBeforeAfter:function(){var n=this.value,t=n.substring(0,this.selection.start),i=n.substring(this.selection.end,n.length);return[t,i]},getBeforeAfterStriped:function(){var n=this.getBeforeAfter();return n[0]=t(n[0],this.io),n[1]=t(n[1],this.io),n},normalizeParts:function(n,i){var r=this.io,e,u,f;return i=t(i,r),e=i.match(/^\d/)?!0:"leading",n=t(n,r,e),(n===""||n===r.aNeg)&&i>""&&(i=i.replace(/^0*(\d)/,"$1")),u=n+i,r.aDec&&(f=u.match(new RegExp("^"+r._aNegReg+"\\"+r.aDec)),f&&(n=n.replace(f[1],f[1]+"0"),u=n+i)),r.wEmpty==="zero"&&(u===r.aNeg||u==="")&&(n+="0"),[n,i]},setValueParts:function(n,t){var r=this.io,f=this.normalizeParts(n,t),i=f.join(""),u=f[0].length;return e(i,r)?(i=y(i,r.aDec,r.mDec),u>i.length&&(u=i.length),this.value=i,this.setPosition(u,!1),!0):!1},signPosition:function(){var n=this.io,u=n.aSign,i=this.that,t,f,r;return u?(t=u.length,n.pSign==="p"?(f=n.aNeg&&i.value&&i.value.charAt(0)===n.aNeg,f?[1,t+1]:[0,t]):(r=i.value.length,[r-t,r])):[1e3,-1]},expandSelectionOnSign:function(n){var t=this.signPosition(),i=this.selection;i.start<t[1]&&i.end>t[0]&&((i.start<t[0]||i.end>t[1])&&this.value.substring(Math.max(i.start,t[0]),Math.min(i.end,t[1])).match(/^\s*$/)?i.start<t[0]?this.setSelection(i.start,t[0],n):this.setSelection(t[1],i.end,n):this.setSelection(Math.min(i.start,t[0]),Math.max(i.end,t[1]),n))},checkPaste:function(){if(this.valuePartsBeforePaste!==undefined){var n=this.getBeforeAfter(),i=this.valuePartsBeforePaste;delete this.valuePartsBeforePaste,n[0]=n[0].substr(0,i[0].length)+t(n[0].substr(i[0].length),this.io),this.setValueParts(n[0],n[1])||(this.value=i.join(""),this.setPosition(i[0].length,!1))}},skipAllways:function(n){var t=this.kdCode,e=this.which,r=this.ctrlKey,u=this.cmdKey;if(t===17&&n.type==="keyup"&&this.valuePartsBeforePaste!==undefined)return this.checkPaste(),!1;if(t>=112&&t<=123||t>=91&&t<=93||t>=9&&t<=31||t<8&&(e===0||e===t)||t===144||t===145||t===45||(r||u)&&t===65)return!0;if((r||u)&&(t===67||t===86||t===88))return n.type==="keydown"&&this.expandSelectionOnSign(),t===86&&(n.type==="keydown"||n.type==="keypress"?this.valuePartsBeforePaste===undefined&&(this.valuePartsBeforePaste=this.getBeforeAfter()):this.checkPaste()),n.type==="keydown"||n.type==="keypress"||t===67;if(r||u)return!0;if(t===37||t===39){var f=this.io.aSep,i=this.selection.start,o=this.that.value;return n.type==="keydown"&&f&&!this.shiftKey&&(t===37&&o.charAt(i-2)===f?this.setPosition(i-1):t===39&&o.charAt(i)===f&&this.setPosition(i+1)),!0}return t>=34&&t<=40?!0:!1},processAllways:function(){var n;return this.kdCode===8||this.kdCode===46?(this.selection.length?(this.expandSelectionOnSign(!1),n=this.getBeforeAfterStriped(),this.setValueParts(n[0],n[1])):(n=this.getBeforeAfterStriped(),this.kdCode===8?n[0]=n[0].substring(0,n[0].length-1):n[1]=n[1].substring(1,n[1].length),this.setValueParts(n[0],n[1])),!0):!1},processKeypress:function(){var n=this.io,r=String.fromCharCode(this.which),u=this.getBeforeAfterStriped(),i=u[0],t=u[1];return r===n.aDec||n.altDec&&r===n.altDec||(r==="."||r===",")&&this.kdCode===110?!n.mDec||!n.aDec?!0:n.aNeg&&t.indexOf(n.aNeg)>-1?!0:i.indexOf(n.aDec)>-1?!0:t.indexOf(n.aDec)>0?!0:(t.indexOf(n.aDec)===0&&(t=t.substr(1)),this.setValueParts(i+n.aDec,t),!0):r==="-"||r==="+"?n.aNeg?(i===""&&t.indexOf(n.aNeg)>-1&&(i=n.aNeg,t=t.substring(1,t.length)),i=i.charAt(0)===n.aNeg?i.substring(1,i.length):r==="-"?n.aNeg+i:i,this.setValueParts(i,t),!0):!0:r>="0"&&r<="9"?(n.aNeg&&i===""&&t.indexOf(n.aNeg)>-1&&(i=n.aNeg,t=t.substring(1,t.length)),this.setValueParts(i+r,t),!0):!0},formatQuick:function(){var n=this.io,o=this.getBeforeAfterStriped(),t=s(this.value,this.io),i=t.length,r,u,e,f;if(t){for(r=o[0].split(""),u=0;u<r.length;u+=1)r[u].match("\\d")||(r[u]="\\"+r[u]);e=new RegExp("^.*?"+r.join(".*?")),f=t.match(e),f?(i=f[0].length,(i===0&&t.charAt(0)!==n.aNeg||i===1&&t.charAt(0)===n.aNeg)&&n.aSign&&n.pSign==="p"&&(i=this.io.aSign.length+(t.charAt(0)==="-"?1:0))):n.aSign&&n.pSign==="s"&&(i-=n.aSign.length)}this.that.value=t,this.setPosition(i),this.formatted=!0}},n.fn.autoNumeric=function(n){return this.each(function(){g.call(this,n)}).unbind(".autoNumeric").bind({"keydown.autoNumeric":nt,"keypress.autoNumeric":tt,"keyup.autoNumeric":it,"focusin.autoNumeric":rt,"focusout.autoNumeric":w})},n.autoNumeric={},n.autoNumeric.Strip=function(i){var s=l(i),e=v(s),f,u;return arguments[1]&&typeof arguments[1]=="object"&&(e=n.extend({},e,arguments[1])),f=r(s,e),u=l(i).val(),u=t(u,f),u=o(u,f.aDec,f.aNeg),+u==0&&(u="0"),u},n.autoNumeric.Format=function(t,i){var c=l(t),o=v(c),f;return arguments[2]&&typeof arguments[2]=="object"&&(o=n.extend({},o,arguments[2])),i.toString(),f=r(c,o),i=u(i,f.mDec,f.mRound,f.aPad),i=h(i,f.aDec,f.aNeg),e(i,f)||(i=u("",f.mDec,f.mRound,f.aPad)),s(i,f)},n.fn.autoNumericGet=function(){return arguments[0]?n.autoNumeric.Strip(this,arguments[0]):n.autoNumeric.Strip(this)},n.fn.autoNumericSet=function(t){return arguments[1]?this.val(n.autoNumeric.Format(this,t,arguments[1])):this.val(n.fn.autoNumeric.Format(this,t))},n.autoNumeric.FormatAmount=function(t,i){var o=n.extend({},n.autoNumeric.defaults,i),f;return t.toString(),f=r(null,o),t=u(t,f.mDec,f.mRound,f.aPad),t=h(t,f.aDec,f.aNeg),e(t,f)||(t=u("",f.mDec,f.mRound,f.aPad)),s(t,f)},n.autoNumeric.GetValue=function(i,u){var s=n.extend({},n.autoNumeric.defaults,u),e=r(null,s),f=i;return f=t(f,e),f=o(f,e.aDec,e.aNeg),+f==0&&(f="0"),f},n.autoNumeric.defaults={aNum:"0123456789",aSep:",",dGroup:"3",aDec:".",altDec:null,aSign:"",pSign:"p",vMax:"999999999.99",vMin:"0.00",mDec:null,mRound:"S",aPad:!1,wEmpty:"empty",aForm:!0},n.fn.autoNumeric.defaults=n.autoNumeric.defaults,n.fn.autoNumeric.Strip=n.autoNumeric.Strip,n.fn.autoNumeric.Format=n.autoNumeric.Format}(jQuery),function(){"use strict";var n=999999999999.99;$.autoNumeric.defaults.vMax=n,$.autoNumeric.defaults.aDec=Gap.Portal.UI.DecimalSeparator||".",$.autoNumeric.defaults.aSep=Gap.Portal.UI.NumberGroupSeparator||","}(),$(function(){if($.fn.popup){var n=function(n){return function(t){return $("#lot-locations-popup-"+n+" "+t)}};$("a.lot-location-header").popup({on:"click",popup:$("#popup-lot"),position:"bottom left",exclusive:!0,onShow:function(){var u=$(this).data("ajaxUrl"),f=$(this).data("auctionRef"),i=n(f),r=function(){i("#lot-locations-popup-loader").hide(),i("#lot-locations-popup-content").show()},e=i("#lot-locations-popup-content-list").children().length;if(e){r();return}$.ajax({url:u,type:"GET",dataType:"html",success:function(n){r(),i("#lot-locations-popup-content-list").html(n)},error:function(){r(),i("#lot-locations-popup-error").show()}})}})}}),function(){window.Gap=window.Gap||{},Gap.Portal=Gap.Portal||{},Gap.Portal.UI=Gap.Portal.UI||{},Gap.Portal.UI.AuctionDetailsProperties=null}(),$("#pdfExport a").click(function(){$("#pdfExport").hide(),$("#pdfExportLoading").show(),onPdfExportClick()}),function(){window.Gap=window.Gap||{},Gap.Portal=Gap.Portal||{},Gap.Portal.UI=Gap.Portal.UI||{},Gap.Portal.UI.WishlistProperties=null}(),mustUpdatePanel=!1