function AddAntiForgeryToken(n){return n===undefined&&(n={}),n.__RequestVerificationToken=$("input[name='__RequestVerificationToken']").val(),n}function displayErrorMsg(){alert("error")}function formatModelDes(n,t){var i=n;return t!=undefined&&t!=null&&t.length>0&&(i=n+"-"+t),i=i.replace(/\s/g,"-").replace(/\./g,"-").replace(/,/g,"-").replace(/&/g,"and").replace(/\+/g,"PLUS"),i.replace("----","-").replace("---","-").replace("--","-")}function sortMeBy(n,t,i,r){var u=$(t),f=u.children(i);f.sort(function(t,i){var u=parseInt(t.getAttribute(n)),f=parseInt(i.getAttribute(n));if(r=="asc"){if(u>f)return 1;if(u<f)return-1}else if(r=="desc"){if(u<f)return 1;if(u>f)return-1}return 0});f.detach().appendTo(u)}function insertBanners(n){$(".listing-banner").remove();$(n).each(function(n){(n+1)%5==0&&$('<div class="listing-banner"><a href="https://www.globalair.com/banmanpro/ad.aspx?ZoneID=92&amp;Task=Click&amp;Mode=HTML&amp;SiteID=1&amp;PageID=78750" target="_blank" rel="noreferrer"><img id="imgAd0" class="img-fluid" width="728" height="93" zoneid="0" src="https://www.globalair.com/banmanpro/ad.aspx?ZoneID=92&amp;Task=Get&amp;Mode=HTML&amp;SiteID=1&amp;PageID=78750" border="0" alt=""><\/a><\/div>').insertAfter($(this))})}function saveSalesLead(n,t,i,r,u){!function(n,t,i,r,u,f,e){n.fbq||(u=n.fbq=function(){u.callMethod?u.callMethod.apply(u,arguments):u.queue.push(arguments)},n._fbq||(n._fbq=u),u.push=u,u.loaded=!0,u.version="2.0",u.queue=[],f=t.createElement(i),f.async=!0,f.defer=!0,f.src=r,e=t.getElementsByTagName(i)[0],e.parentNode.insertBefore(f,e))}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js");fbq("init","128491507700639");fbq("track","Inquiry");$.post("/aircraft-for-sale/SaveSalesLead",{AdID:n,InqComments:r,Subject:u,BrokerID:t,InqSource:i})}var inquiryType;window.addEventListener("load",function(){$(".comp-box span").click(function(){if($(this).parent().hasClass("selected")){var n=[];$.each($("input:checked"),function(){n.push($(this).data("adid"))});n.length>0&&(location="/aircraft-for-sale/CompareAircraft?AdIdArgs="+n.join(","))}});$(".comp-box input").click(function(){var n=$(this).closest(".comp-box"),i=n.find("span"),t;if(n.hasClass("selected"))i.html("COMPARE"),n.toggleClass("comp-box-background"),n.toggleClass("selected");else{if(t=[],$.each($("input:checked"),function(){t.push($(this).data("adid"))}),t.length>3)return showMessage("You can only compare three aircrafts at a time.",!0,"Sorry!"),!1;n.toggleClass("comp-box-background");n.toggleClass("selected");i.html("Click to COMPARE")}})})