(function(a,b){a.toCurrency=function(a,c){if(typeof c=="undefined"||c==null)c=true;a=a.toString().replace(/\$|\,/g,"");if(isNaN(a))a="0";sign=a==(a=Math.abs(a));a=Math.floor(a*100+.50000000001);cents=a%100;a=Math.floor(a/100).toString();if(cents<10)cents="0"+cents;for(var b=0;b<Math.floor((a.length-(1+b))/3);b++)a=a.substring(0,a.length-(4*b+3))+","+a.substring(a.length-(4*b+3));var d=(sign?"":"-")+"$"+a;if(c)d+="."+cents;return d};a.getQueryString=function(a){var c={};if(typeof a==="undefined")a=b.location.href;a.replace(new RegExp("([^?=&]+)(=([^&#]*))?","g"),function(d,a,e,b){c[a]=b});return c};a(document).ready(function(){a("#header .nav > ul > li").mouseenter(function(){a(this).addClass("hover")}).mouseleave(function(){a(this).removeClass("hover")});var p=a("#page a.link-register").overlay({top:"center",close:".link-close",mask:{color:"#000",loadSpeed:200,opacity:.7}}),q=a("#page a.link-login").overlay({top:"center",close:".link-close",mask:{color:"#000",loadSpeed:200,opacity:.7}});a("#page a.link-login-faqs").overlay({top:"center",close:".link-close",mask:{color:"#000",loadSpeed:200,opacity:.7}});a("input").attr("autocomplete","off");a("#btn-login, #btn-nav-login").click(k);a("#form-login .link-login-with-email, #form-nav-login .link-login-with-email").click(e);a("#input-username, #input-password, #input-nav-username, #input-nav-password").keypress(g);a("#btn-register-submit").click(h);a("#btn-nav-search").click(j);a("#input-nav-search").keypress(f);var l=a.getQueryString(),i="";if(typeof l.regErr!=="undefined"){switch(l.regErr){case "-1":i="The registration service is unavailable at this time. Please try again later.";break;case "1":i="We could not find that account number in our records. Please check the number and re-enter it.";break;case "2":i="That account number is already in use. To manage your account online, please log in."}a("#nav-register-error").html('<div class="error-message">'+i+"</div>");p.eq(0).data("overlay").load()}else if(typeof l.loginErr!=="undefined"&&typeof l.ref!=="undefined"){switch(l.loginErr){case "-1":i="The login service is unavailable at this time. Please try again later.";break;case "1":i="Invalid Login"}switch(l.ref){case "login-form":a("#login-error").html('<div class="error-message">'+i+"</div>");break;case "login-form-layer":a("#nav-login-error").html('<div class="error-message">'+i+"</div>");q.eq(0).data("overlay").load();break;case "sq":var n=a("#mod-security-question"),r=a("#hidSkip").val(),o=n.find(".skip-message, #btn-skip-security-question");if(r=="false")o.show();else o.hide();n.overlay({top:"center",close:".link-close",mask:{color:"#000",loadSpeed:200,opacity:.7},closeOnClick:false,load:true});a("#btn-skip-security-question").click(d);a("#btn-update-security-question").click(c)}}if(typeof l.loginErr!=="undefined"){var m=a("#input-login-count").val();if(m==null)m=0;m>2&&b.open("/ForgotPasswordSQ/Default.aspx?id=3","popupforgotpassword","width=573,height=380,scrollbars=yes")}});function d(e){e.preventDefault();var c={};c.username=a.cookie("UserName");c.UNTypeFlag=a.cookie("UNTypeFlag");a.ajax({url:"/authenticate/UpdateSecuritySkip.ashx",type:"GET",data:c,async:false});var d=a("#hidLoginOkUrl").val();b.location.href=d}function c(h){h.preventDefault();var f=a("#form-security-question .field").length>1?false:true,e=[];a("#form-security-question .field-error").removeClass("field-error");a("#form-security-question .error-messages").empty().hide();a("#form-security-question input").each(function(){var b=a(this),c=a.trim(b.val()),d=b.closest(".field").find("select option:selected").val();if(c==""||d==""){if(f)e[0]="You must set up and answer the question.";else e[0]="You must set up and answer all questions.";b.closest(".field").addClass("field-error")}else if(!/^([a-zA-Z0-9\s]+)$/.test(c)){e[1]="Answer must use the following characters a-z, A-Z, 0-9, space, and must be 1-50 characters in length.";b.closest(".field").addClass("field-error")}});if(e.length>0)a("#form-security-question .error-messages").show().html('<div class="error-message">'+e.join('</div><div class="error-message">')+"</div>");else{var c={};c.username=a.cookie("UserName");c.UNTypeFlag=a.cookie("UNTypeFlag");c.IsFinance=f?"true":"false";c.eUserident=a("#hideUserId").val();var d=a("#form-security-question .field");c.SecurityQuestionOne=d.eq(0).find("select option:selected").val();c.SecurityAnswerOne=d.eq(0).find("input").val();if(!f){c.SecurityQuestionTwo=d.eq(1).find("select option:selected").val();c.SecurityAnswerTwo=d.eq(1).find("input").val();c.SecurityQuestionThree=d.eq(2).find("select option:selected").val();c.SecurityAnswerThree=d.eq(2).find("input").val()}a.ajax({url:"/authenticate/UpdateSecurityQuestions.ashx",type:"GET",data:c,async:false});var g=a("#hidLoginOkUrl").val();b.location.href=g}}function g(b){var c=b.keyCode||b.which;switch(c){case 13:a(this).closest("form").find(".form-actions a").click();return false}}function j(e){e.preventDefault();var c=a("#input-nav-search"),d=c.val();c.closest(".field").removeClass("field-error");if(a.trim(d)=="")c.closest(".field").addClass("field-error");else b.location.href="/search?q="+encodeURIComponent(d)}function f(b){var c=b.keyCode||b.which;switch(c){case 13:a("#btn-nav-search").click();return false}}function k(i){i.preventDefault();var c=a(this).closest("form"),e=c.find("input.login-username"),d=c.find("input.login-password");c.find(".field-error").removeClass("field-error");var f=false,h=e.val();if(e.hasClass("default-text")||a.trim(h)==""){e.closest(".field").addClass("field-error");f=true}var g=d.val();if(d.hasClass("default-text")||a.trim(g)==""){d.closest(".field").addClass("field-error");f=true}if(!f){a.omniture.trigger({data:{pageName:b.s.pageName,prop16:"LOG IN"}});c.submit()}}function e(e){e.preventDefault();var f=a(this),d=a("#form-login, #form-nav-login"),b=d.find("input.landing-login-type"),c=b.val();if(c=="U")b.val("E");else b.val("U");i()}function i(){var b=a("#form-login, #form-nav-login");b.each(function(){var c=a(this),e=c.find("input.login-username"),f=e.closest(".field").find("label"),d=c.find(".link-login-with-email"),g=c.find("input.landing-login-type"),h=g.val(),b;if(h=="E"){b="Email Address";d.text("Log in with Username")}else{b="Username";d.text("Log in with Email Address")}f.text(b+":");e.data("defaultText",b).addClass("default-text").val(b)})}function h(g){g.preventDefault();var c=a(this).closest("form"),d=c.find("#input-account-number");c.find(".field-error").removeClass("field-error");var e=false,f=d.val();if(a.trim(f)==""){d.closest(".field").addClass("field-error");e=true}if(!e){a.omniture.trigger({data:{pageName:b.s.pageName,prop16:"REGISTRATION"}});c.submit()}}})(jQuery,this);(function(a){function c(){for(var d=[{selector:"#leasing #ReadyToApplypdf",props:{data:{prop24:"LEASING LANDING",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-new-vehicles #ReadyToApplypdf",props:{data:{prop24:"LEASING NEW VEHICLES",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-new-vehicles #Brochures-link-click",props:{data:{prop24:"LEASING NEW VEHICLES",prop11:"PDF",fileName:"Acura_Luxury_Lease.pdf"}},type:"d"},{selector:"#leasing-certified-pre-owned #ReadyToApplypdf",props:{data:{prop24:"LEASING CERTIFIED PRE-OWNED",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-college-grad-program #ReadyToApplypdf",props:{data:{prop24:"LEASING COLLEGE GRAD PROGRAM",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-college-grad-program #GradProgrampdf",props:{data:{prop24:"LEASING COLLEGE GRAD PROGRAM",prop11:"PDF",fileName:"Acura_Graduate_Program.pdf"}},type:"d"},{selector:"#leasing-applying #Download-Application-pdf",props:{data:{prop24:"LEASING APPLYING",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-faqs #ReadyToApplypdf",props:{data:{prop24:"LEASING LEASE FAQS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-one-pay-lease #ReadyToApplypdf",props:{data:{prop24:"LEASING ONE PAY LEASE",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-one-pay-lease-faqs #ReadyToApplypdf",props:{data:{prop24:"ONE PAY LEASE FAQS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-vehicle-inspection #ReadyToApplypdf",props:{data:{prop24:"LEASING VEHICLE INSPECTION",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-printable-forms #ReadyToApplypdf",props:{data:{prop24:"LEASING PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-end-of-lease-faqs #ReadyToApplypdf",props:{data:{prop24:"LEASING END OF LEASE FAQS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#lease-maturity-contacts #ReadyToApplypdf",props:{data:{prop24:"LEASE MATURITY CONTACTS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-return-your-leased-vehicle #ReadyToApplypdf",props:{data:{prop24:"LEASING END RETURN",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-return-and-lease-new #ReadyToApplypdf",props:{data:{prop24:"LEASING END NEW",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-purchase-your-lease #ReadyToApplypdf",props:{data:{prop24:"LEASING END PURCHASE",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},{selector:"#leasing-service-contracts #Service-Brochures-brand-link-click",props:{data:{fileName:"ACURA_CARE_COVERAGE_DETAILS.PDF",prop24:"LEASING SERVICE CONTRACTS",prop11:"PDF"}},type:"d"},{selector:"#leasing-service-contracts #Service-Brochures-nonbrand-link-click",props:{data:{fileName:"ACURA_CARE_NONACURA_COVERAGE_DETAILS.PDF",prop24:"LEASING SERVICE CONTRACTS",prop11:"PDF"}},type:"d"},{selector:"#leasing-service-contracts #Service-Brochures-powertrain-link-click",props:{data:{fileName:"ACURA_CARE_POWERTRAIN_VEHICLE_SERVICE_CONTRACT.PDF",prop24:"LEASING SERVICE CONTRACTS",prop11:"PDF",type:"d"},"_#Missing_Field#_0":{selector:"#leasing-service-contracts-faqs #ReadyToApplypdf",props:{data:{prop24:"LEASING SERVICE CONTRACTS FAQ",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_1":{selector:"#leasing-end-of-lease #ReadyToApplypdf",props:{data:{prop24:"LEASING END OF LEASE PROCESS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_2":{selector:"#finance-college-grad-program #ReadyToApplypdf",props:{data:{prop24:"FINANCING COLLEGE GRAD PROGRAM",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_3":{selector:"#finance-college-grad-program #GradProgrampdf",props:{data:{prop24:"FINANCING COLLEGE GRAD PROGRAM",prop11:"PDF",fileName:"Acura_Graduate_Program.pdf"}},type:"d"},"_#Missing_Field#_4":{selector:"#finance #ReadyToApplypdf",props:{data:{prop24:"FINANCING LANDING",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_5":{selector:"#finance-new-vehicles #ReadyToApplypdf",props:{data:{prop24:"FINANCING NEW VEHICLES",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_6":{selector:"#finance-certified-pre-owned #ReadyToApplypdf",props:{data:{prop24:"FINANCING CERTIFIED PRE-OWNED",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_7":{selector:"#finance-applying #ReadyToApplypdf",props:{data:{prop24:"FINANCING APPLYING",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_8":{selector:"#finance-applying-faqs #ReadyToApplypdf",props:{data:{prop24:"FINANCING APPLYING FAQ",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_9":{selector:"#finance-service-contracts #ReadyToApplypdf",props:{data:{prop24:"FINANCING SERVICE CONTRACTS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_10":{selector:"#finance-service-contracts #Service-Brochures-brand-link-click",props:{data:{fileName:"ACURA_CARE_COVERAGE_DETAILS.PDF",prop24:"FINANCING SERVICE CONTRACTS",prop11:"PDF"}},type:"d"},"_#Missing_Field#_11":{selector:"#finance-service-contracts #Service-Brochures-nonbrand-link-click",props:{data:{fileName:"ACURA_CARE_NONACURA_COVERAGE_DETAILS.PDF",prop24:"FINANCING SERVICE CONTRACTS",prop11:"PDF"}},type:"d"},"_#Missing_Field#_12":{selector:"#finance-service-contracts #Service-Brochures-powertrain-link-click",props:{data:{fileName:"ACURA_CARE_POWERTRAIN_VEHICLE_SERVICE_CONTRACT.PDF",prop24:"FINANCING SERVICE CONTRACTS",prop11:"PDF",type:"d"},"_#Missing_Field#_13":{selector:"#finance-end-of-financing #ReadyToApplypdf",props:{data:{prop24:"END OF FINANCING",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_14":{selector:"#finance-financing-faqs #ReadyToApplypdf",props:{data:{prop24:"FINANCING FINANCE FAQS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_15":{selector:"#finance-gap-insurance #ReadyToApplypdf",props:{data:{prop24:"FINANCING GAP INSURANCE",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_16":{selector:"#finance-leadership-purchase-plan #ReadyToApplypdf",props:{data:{prop24:"FINANCING LEADERSHIP PURCHASE PLAN",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_17":{selector:"#finance-completing-purchase-plan #ReadyToApplypdf",props:{data:{prop24:"FINANCING END OF LEADERSHIP PURCHASE PLAN",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_18":{selector:"#acct-payment-addresses #btn-payment-addresse-submit",props:{data:{prop16:"PAYMENT ADDRESSES SUBMIT BUTTON",prop23:"PAYMENT ADDRESSES"}},type:"o"},"_#Missing_Field#_19":{selector:"#acct-printable-forms #Credit-Pre-Approval-Application-pdf",props:{data:{prop24:"ACCOUNT MANAGEMENT PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_20":{selector:"#acct-printable-forms #EasyPay-Authorization-Agreement-pdf",props:{data:{prop24:"ACCOUNT MANAGEMENT PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_EasyPay_Registration.pdf"}},type:"d"},"_#Missing_Field#_21":{selector:"#acct-printable-forms #EasyPay-Third-Party-Authorization-pdf",props:{data:{prop24:"ACCOUNT MANAGEMENT PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_3rd_party_auth.pdf"}},type:"d"},"_#Missing_Field#_22":{selector:"#acct-printable-forms #Odometer-Disclosure-pdf",props:{data:{prop24:"ACCOUNT MANAGEMENT PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_Odometer_Disclosure.pdf"}},type:"d"},"_#Missing_Field#_23":{selector:"#acct-printable-forms #Return-Receipt-Lease-pdf",props:{data:{prop24:"ACCOUNT MANAGEMENT PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_Vehicle_return_receipt_lease.pdf"}},type:"d"},"_#Missing_Field#_24":{selector:"#acct-printable-forms #Retail-PowerOfAttorney-pdf",props:{data:{prop24:"ACCOUNT MANAGEMENT PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_RetailPowerOfAttorney.pdf"}},type:"d"},"_#Missing_Field#_25":{selector:"#acct-printable-forms #Privacy-Policy-pdf",props:{data:{prop24:"ACCOUNT MANAGEMENT PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_Privacy_Policy.pdf"}},type:"d"},"_#Missing_Field#_26":{selector:"#acct-account-faqs #chg-bank-info",props:{data:{prop25:"MY ACURA",prop24:"Acura Online Account Management - FAQS"}},type:"e"},"_#Missing_Field#_27":{selector:"#acct-select-account #Ownerlinkclick",props:{data:{prop25:"OWNER LINK",prop24:"MANAGE YOUR FINANCE ACCOUNTS"}},type:"e"},"_#Missing_Field#_28":{selector:"#acct-select-account #MyAcuraclick",props:{data:{prop25:"MY ACURA",prop24:"MANAGE YOUR FINANCE ACCOUNTS"}},type:"e"},"_#Missing_Field#_29":{selector:'#header .link-nav" #link-brand',props:{data:{prop25:"ACURA.COM",prop24:omniData.pageName}},type:"e"},"_#Missing_Field#_30":{selector:'#header .link-nav" #link-owner',props:{data:{prop25:"MY ACURA",prop24:omniData.pageName}},type:"e"},"_#Missing_Field#_31":{selector:'#header .link-nav" #link-investor',props:{data:{prop25:"INVESTOR RELATIONS GLOBAL NAV",prop24:omniData.pageName}},type:"e"},"_#Missing_Field#_32":{selector:"#page-tools .link-email",props:{data:{pageName:"EMAIL PAGE",channel:omniData.channel,prop11:"LAYERS"}}},"_#Missing_Field#_33":{selector:"#page-tools .link-print",props:{data:{pageName:"PRINT PAGE",channel:omniData.channel,prop11:"LAYERS"}}},"_#Missing_Field#_34":{selector:"#contact-client-services #btn-submit",props:{data:{prop16:"CLIENT SERVICES CONTACTS SUBMIT BUTTON"}},type:"o"},"_#Missing_Field#_35":{selector:"#contact-payment-addresses #btn-payment-addresse-submit",props:{data:{prop16:"PAYMENT ADDRESS SUBMIT"}},type:"o"},"_#Missing_Field#_36":{selector:"#tools-locate-a-dealer #btn-request-quote",props:{data:{prop14:"DEALER LOCATOR SEARCH RESULTS",prop16:"RAQ BUTTON",prop24:"DEALER LOCATOR SEARCH RESULTS",prop25:"ACURA.COM"}},type:"e"},"_#Missing_Field#_37":{selector:"#help-printable-forms #Credit-Pre-Approval-Application-pdf",props:{data:{prop24:"HELP PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"},"_#Missing_Field#_38":{selector:"#help-printable-forms #Credit-Pre-Approval-Application-NonAuto-pdf",props:{data:{prop24:"HELP PRINTABLE FORMS",prop11:"PDF"}},type:"d"},"_#Missing_Field#_39":{selector:"#help-printable-forms #EasyPay-Authorization-Agreement-pdf",props:{data:{prop24:"HELP PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_EasyPay_Registration.pdf"}},type:"d"},"_#Missing_Field#_40":{selector:"#help-printable-forms #EasyPay-Third-Party-Authorization-pdf",props:{data:{prop24:"HELP PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_3rd_party_auth.pdf"}},type:"d"},"_#Missing_Field#_41":{selector:"#help-printable-forms #Odometer-Disclosure-pdf",props:{data:{prop24:"HELP PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_Odometer_Disclosure.pdf"}},type:"d"},"_#Missing_Field#_42":{selector:"#help-printable-forms #damage-card-pdf",props:{data:{prop24:"HELP PRINTABLE FORMS",prop11:"PDF"}},type:"d"},"_#Missing_Field#_43":{selector:"#help-printable-forms #Return-Receipt-Lease-pdf",props:{data:{prop24:"HELP PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_Vehicle_return_receipt_lease.pdf"}},type:"d"},"_#Missing_Field#_44":{selector:"#help-printable-forms #Retail-PowerOfAttorney-pdf",props:{data:{prop24:"HELP PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_RetailPowerOfAttorney.pdf"}},type:"d"},"_#Missing_Field#_45":{selector:"#help-printable-forms #Privacy-Policy-pdf",props:{data:{prop24:"HELP PRINTABLE FORMS",prop11:"PDF",fileName:"AFS_Privacy_Policy.pdf"}},type:"d"},"_#Missing_Field#_46":{selector:"#form-calculate-lease .link-kbb, #form-calculate-finance .link-kbb, #link-estimate-lease-trade-in, #link-estimate-finance-trade-in",props:{data:{prop25:"KELLEY BLUE BOOK",prop24:omniData.pageName}},type:"e"},"_#Missing_Field#_47":{selector:"#home #ReadyToApplypdf",props:{data:{prop24:"FINANCING APPLYING",prop11:"PDF",fileName:"AFS_Lease_Loan_application.pdf"}},type:"d"}}}}}],c=0,e=d.length;c<e;c++)a(d[c].selector).click(a.proxy(b,d[c]))}function b(b){a.omniture.trigger(this.props,b.currentTarget,this.type)}a(window).load(c)})(jQuery);(function(a,b){var d=null,c=null;a(document).ready(function(){a("#input-email-page-url").val(b.location.href);a("#page a.link-print").live("click",e);a("#mod-print-friendly a.link-print").click(f);a("#page a.link-email").overlay({top:"center",close:".link-close, #btn-mail-page-cancel",mask:{color:"#000",loadSpeed:200,opacity:.7}});var g=a("#page a.link-email").data("overlay");a("#btn-mail-page-send").click(function(j){j.preventDefault();var g=a("#input-email-page-from-name"),f=a("#input-email-page-from-email"),h=a("#input-email-page-to-email"),k=a("#input-email-page-comments");a("#form-email-page .field-error").removeClass("field-error");var e=false;if(g.val()==""){g.closest(".field").addClass("field-error");e=true}if(!d(f.val())){f.closest(".field").addClass("field-error");e=true}if(!d(h.val())){h.closest(".field").addClass("field-error");e=true}if(!e){var i=a("#form-email-page").serialize();i+="&url="+encodeURIComponent(b.location.href);a("#form-email-page").loading(true);a.ajax({type:"POST",url:"/shopping-tools/SendMail",data:i,success:function(e){a("#form-email-page").loading(false);var d=a("#mod-email-thanks");if(e.Status=="success"){d.find("p").text("Thank you! Your Message was sent.");a("#form-email-page input, #form-email-page textarea").val("")}else d.find("p").text(e.Error);if(c==null)c=d.overlay({top:"center",close:".link-close",mask:{color:"#000",loadSpeed:200,opacity:.7},load:true});else c.data("overlay").load();a.omniture.trigger({data:{pageName:b.s.pageName,prop16:"EMAIL SEND"}})},error:function(b){a("#form-email-page").loading(false);alert("There was a problem with the request: "+b)}})}});function d(a){return /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(a)}});function f(c){c.preventDefault();a.omniture.trigger({data:{pageName:b.s.pageName,prop16:"PRINT"}});b.print()}function e(c){c.preventDefault();var b=623;if(a(document.body).hasClass("template-3"))b=911;a("#page").printArea({mode:"iframe",selector:"#print-preview",iframeWidth:b});if(d==null)d=a("#page-tools a.link-print").overlay({top:"center",close:".link-close",fixed:false,mask:{color:"#000",loadSpeed:200,opacity:.7},load:true});else d.data("overlay").load()}})(jQuery,this)
