ClickCease
Alberta homeowner who stopped foreclosure, standing in front of their home
Helping Homeowners Since 2015

Facing Foreclosure in Alberta? You Can Still Stop It.

Foreclosure is a court process with a redemption period โ€” time to reinstate or pay out your mortgage and keep your home. We approve on equity and fund in as little as 24โ€“72 hours.

โš–๏ธ Stop Foreclosureโšก Funded in 24โ€“72 hrs๐Ÿ  Up to 80% LTVโœ… Any Credit Score๐Ÿ† BBB Accreditedโ˜…โ˜…โ˜…โ˜…โ˜… 5.0
โšก 100% Digital ยท No Branch Visits

๐Ÿ  How much can you access to clear arrears?

$750,000
$450,000
Equity available (up to 80% LTV)
$150,000
Get Pre-Approved Now
Estimate only. Actual amount depends on appraisal, lender & province.
100% DigitalApply from home
24โ€“72 hrsEmergency funding
50+Lenders shopped for you
ON ยท AB ยท SKLicensed & serving
$250M+Funded for homeowners

Facing foreclosure in Alberta? It’s a process โ€” with off-ramps.

In Alberta, lenders enforce a defaulted mortgage through foreclosure in the Court of King’s Bench โ€” a court-supervised process, not the faster power of sale used in Ontario. That means more steps, more time, and a court-ordered redemption period during which you can reinstate or pay out the mortgage and keep your home. If you have equity, we can make that happen.

The foreclosure timeline (Alberta)

Court-driven and slower than Ontario โ€” but don’t wait, because equity solutions still close fastest.

1

Default & Demand

After missed payments, the lender issues a demand and prepares to file in court.

2

Statement of Claim

Foreclosure is started in the Court of King’s Bench; you file a defence or demand of notice.

3

Order Nisi

The court sets a redemption period โ€” in Alberta generally around six months under the Law of Property Act (the court can shorten or extend).

4

Redemption Window

Reinstate or pay out the mortgage to keep the home before the period ends.

5

Judicial Sale

If unredeemed, the court approves a sale or transfers title to the lender.

General information only, not legal advice. Consult a lawyer about your file.

Reinstate, redeem, or pay out โ€” built for court timelines

You can typically stop a foreclosure by reinstating (paying arrears plus costs), redeeming (paying the balance), or paying out the mortgage with new financing. We arrange second mortgages, refinances, and private loans approved on your equity โ€” not your credit โ€” and move fast so you’re ready well before the redemption period closes. The sooner you start, the cheaper and simpler it is.

Serving homeowners across Ontario, Alberta & Saskatchewan โ€” including Calgary Edmonton Red Deer Airdrie and many more.

How to Stop a Foreclosure in Alberta

To stop foreclosure in Alberta, you use the time the court process gives you โ€” and you use it early. Alberta’s judicial foreclosure moves through a statement of claim, a redemption period, and only then a sale, which leaves room to reinstate, redeem, or pay the mortgage out entirely with a new equity-based loan. That is the play we run: a replacement mortgage approved on the property, arrears cleared at closing. As of August 2026, private funding closes in 3โ€“5 business days once the appraisal is in โ€” well inside most redemption windows.

Facing Foreclosure? Start Here

Pick your city to see how we stop a foreclosure locally — or skip it and call. If you have been served a Statement of Claim you have 20 days to respond, so a phone call beats reading.

Not on the list? We act on files in Beaumont, Carstairs, Crossfield, Fort Saskatchewan, Grande Prairie, High River, Leduc, Lloydminster, Okotoks, Sherwood Park, Spruce Grove, St. Albert, Stony Plain, Strathmore and Sylvan Lake as well — and everywhere else in Alberta. The court process and the redemption period work the same way across the province.

Call 587-602-5702 now Start online →

Can your equity clear your arrears?

Move the sliders to see how much you could access โ€” and whether it covers what you’re behind.

Include missed mortgage payments, property tax arrears, CRA debt, and any other amounts you need to catch up.

โœ… You likely have enough equity
Available at 80% LTV$140,000
Arrears to clear$45,000

Remaining after clearing$95,000
See My Real Numbers โ†’
Estimate only. Private lenders may exceed 80% in some cases. Actual approval depends on appraisal, lender & province.

Your options compared

When you’re in arrears, doing nothing is the most expensive choice.

Do nothing

  • Penalties & interest keep growing
  • Legal action proceeds
  • Risk of losing the home
  • Major credit damage

Sell the home

  • You lose your home
  • Rushed sale = lower price
  • Moving costs & disruption
  • May still owe a shortfall

Bankruptcy / proposal

  • Severe credit damage (up to 7 yrs)
  • Trustee involvement
  • Doesn’t always save the home
  • Last resort if no equity
โœ… RECOMMENDED

Equity solution

  • Keep your home
  • Arrears paid, sale stopped
  • Funded in days, fully digital
  • Credit can start to recover

The solutions we use to clear arrears

The right fit depends on your equity, your existing mortgage, and how fast you need to move.

โœ… Keep your first mortgage

Second Mortgage

Pay the arrears without disturbing a good first-mortgage rate. Fast, equity-based approval.

โœ… Lump sum, any credit

Home Equity Loan

Clear arrears and consolidate other debt in one shot, secured by your equity.

โœ… One restructured payment

Refinance

Roll the arrears into a new mortgage and reset your payments around your situation.

โœ… Fastest funding

Private Mortgage

When time is critical, private lenders approve almost entirely on equity โ€” often in days.

Second Mortgage Home Equity Loan Refinance Private Mortgage

Trusted by homeowners across Ontario, Alberta & Saskatchewan

โ˜…โ˜…โ˜…โ˜…โ˜… 5.0 average โ€” real Google reviews from CreditReboot clients

โ˜…โ˜…โ˜…โ˜…โ˜…

“We were hit with an unexpected financial rough patch and our regular bank wasn’t wanting to help us. One quick email to CreditReboot resulted in an immediate response with options available to us. Parm quickly set us on the right path.”

Amanda C.Google Review
โ˜…โ˜…โ˜…โ˜…โ˜…

“Among all the brokers I’ve worked with over the years, Parm at CreditReboot is at the top. I was put into a tricky situation and other brokers had failed to deliver, but Parm helped me out of it and got me a better deal at every turn.”

Molly D.Google Review
โ˜…โ˜…โ˜…โ˜…โ˜…

“Parm was super knowledgeable and really helped us when we were in a pinch and needed a quick close. He made our stressful situation much more manageable. Would highly recommend!”

Elaiza I.Google Review
โ˜…โ˜…โ˜…โ˜…โ˜…

“I was in a total bind looking to get a home equity loan against my property in Alberta, even after letdowns from a couple of lenders and the banks. Parm worked tirelessly to find me a lender tailored to my needs โ€” by far the best I’ve worked with in a difficult situation.”

Harman J.Google Review ยท Alberta
โ˜…โ˜…โ˜…โ˜…โ˜…

“This review is way overdue. You will not be disappointed with Parm โ€” extremely friendly, very knowledgeable, always answering any questions or concerns. You’re always kept in the loop. I’d definitely work with him again.”

StephanieGoogle Review
โ˜…โ˜…โ˜…โ˜…โ˜…

“We value the quality of Parm’s service. He was very approachable, knowledgeable and professional. It was almost hard to believe it all went this smoothly. He was quick to respond when needed. We recommend him to everyone.”

CarmenGoogle Review

Honest guidance, not just a transaction

We arrange financing up to 80% loan-to-value and leave meaningful equity in place as a buffer. Every cost โ€” interest rate, lender fee, broker fee, legal and appraisal โ€” is disclosed in writing before you commit. And if a loan isn’t the right answer, we’ll tell you. Sometimes a payment arrangement with your lender or municipality serves you better.

From crisis to recovery

Right now
In arrears

Missed payments, mounting penalties, legal action looming.

Month 1
Stabilized

Arrears paid, sale stopped, one manageable payment. Credit starts to recover.

12โ€“24 months
~4โ€“5%

Back on track and eligible to refinance to prime A-lender rates.

Foreclosure has off-ramps. Let’s take one.

Apply online and we’ll review your equity and arrange financing to reinstate or pay out your mortgage โ€” often approved in as little as 24 hours. No obligation, no upfront fees.

Get Emergency Help Now โ†’
or call 587-602-5702

Related reading

Frequently Asked Questions

How does foreclosure work in Alberta?
Foreclosure in Alberta is a court-supervised process: after default the lender files a statement of claim, the court issues an Order Nisi setting the amount owed and a redemption period, and only if you do not redeem does it move toward a judicial sale or transfer of title.
How do I stop a foreclosure in Alberta?
You stop it by reinstating the arrears or paying out the mortgage during the redemption period set by the Order Nisi โ€” refinancing with equity is the most common way. Acting early gives you the widest set of options.
What is an Order Nisi in an Alberta foreclosure?
The Order Nisi is the court order that confirms the balance owing and grants you a redemption period to pay before the lender can take the next step. It is effectively your deadline, and your opportunity, to save the home.
What is the redemption period in an Alberta foreclosure?
Courts commonly grant a redemption period of about six months, though it can be shortened or extended depending on equity and circumstances. During that time you can redeem the mortgage and keep your home.
Can I still save my home after foreclosure has started?
Yes โ€” as long as you are within the redemption period, you can reinstate or pay out the mortgage and stop the process. We have funded homeowners well into a foreclosure to keep them in their homes.
How long does the foreclosure process take in Alberta?
A typical Alberta judicial foreclosure runs roughly nine to fifteen months from filing to title transfer, with the redemption period after the Order Nisi giving motivated homeowners room to act. The sooner you move, the more options you have.
What is the difference between foreclosure and power of sale?
Foreclosure, used in Alberta, is court-driven and can transfer title to the lender. Power of sale, used in Ontario, lets the lender sell without taking title and return any surplus. Both can be stopped by redeeming before the deadline.
How many mortgage payments can I miss before foreclosure in Alberta?
Lenders usually begin foreclosure after about three missed payments, around 90 days, though it varies by lender. The court process then adds months โ€” but it is best to act at the first signs of trouble.
Can I refinance to stop foreclosure with bad credit?
Yes. Our private and alternative lenders approve on home equity rather than credit score, so they can refinance and pay out your lender even with damaged credit or active arrears.
Can a second or private mortgage stop a foreclosure in Alberta?
Yes โ€” a second or private mortgage can deliver the lump sum needed to redeem during the Order Nisi period, often funding in days. Speed is frequently what saves the home.
What is a judicial sale in Alberta?
A judicial sale is a court-approved sale of the property used in Alberta foreclosures, where the court oversees the listing and sale rather than the lender selling directly. Redeeming before it happens keeps the home in your hands.
Can the lender come after me for the shortfall in Alberta?
For many residential mortgages in Alberta, the lender's recovery is limited to the property itself and they generally cannot pursue you personally for a shortfall โ€” an important protection. Your situation can vary, so confirm the details with us or a lawyer.
Will foreclosure affect my credit score?
Yes โ€” missed payments and the foreclosure itself significantly damage your credit, but resolving the mortgage stops the bleeding and lets your credit begin to recover. Keeping the home and getting current is the best outcome.
Can I get my home back after an Order Nisi?
Yes โ€” the Order Nisi grants a redemption period precisely so you can pay and keep the home. As long as you redeem within that window, the foreclosure stops.

Stop Foreclosure by City

Alberta foreclosure runs through the Court of King’s Bench. Each page covers the local process and the redemption period.

Alberta

: Bot protection: honeypot + submits through ActiveCampaign's own embed (reCAPTCHA + all hidden tracking fields). Never posts a naked request. ===================================================================== */ (function () { if (window.__crafLoaded) return; window.__crafLoaded = true; // ---- CONFIG (edit here) ---- var GOALS = [ ['๐Ÿ›‘', 'Stop Power of Sale'], ['โš–๏ธ', 'Stop Foreclosure'], ['๐Ÿ›๏ธ', 'Clear Property Tax Arrears'], ['๐Ÿงพ', 'Pay Off CRA'], ['๐Ÿ’ฐ', 'Catch Up Mortgage Arrears'], ['๐Ÿ“‹', 'Other'] ]; // Submits to CreditReboot's DC lead handler (Code Snippet #135: cr_lead_dc): // emails parmsmehmi@gmail.com + saves a DB backup + relays to ActiveCampaign via the secure proxy (#125). // Bot protection = honeypot field "cr_website" (+ required field[100] on the proxy relay). // To switch to source-accurate-only (no admin email) later, set FORM_ACTION = 'cr_form_submit'. var AJAX_URL = '/wp-admin/admin-ajax.php'; var FORM_ACTION = 'cr_lead_dc'; var PHONE = '587-602-5702', PHONE_TEL = '15876025702'; var CSS = '\ .craf-applygrid{display:grid;grid-template-columns:.9fr 1.1fr;gap:34px;align-items:start}\ @media(max-width:880px){.craf-applygrid{grid-template-columns:1fr}}\ .craf-copy h2{text-align:left;color:var(--navy,#0A1628);font-family:Inter,Roboto,sans-serif}\ .craf-copy p{color:var(--muted,#5a6b7e)}\ .craf-list{list-style:none;padding:0;margin:14px 0 18px}\ .craf-list li{padding-left:28px;position:relative;margin-bottom:10px;font-weight:600;color:var(--navy,#0A1628)}\ .craf-list li:before{content:"\\2713";position:absolute;left:0;color:var(--green2,#16A34A);font-weight:800}\ .craf-process{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:24px 0 34px}\ @media(max-width:760px){.craf-process{grid-template-columns:1fr}}\ .craf-pc{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:20px;text-align:center}\ .craf-pc .n{width:34px;height:34px;border-radius:50%;background:var(--green,#2D8A4E);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;margin:0 auto 10px}\ .craf-pc h3{font-size:17px;margin:0 0 4px;color:var(--navy,#0A1628)}.craf-pc p{font-size:13.5px;color:var(--muted,#5a6b7e);margin:0}\ .craf-headline{text-align:center;color:var(--navy,#0A1628);font-family:Inter,Roboto,sans-serif;font-size:clamp(23px,3vw,32px);margin:0 0 6px}\ .craf-wrap{background:var(--navy,#0A1628);border-radius:24px;padding:8px;box-shadow:0 20px 50px rgba(10,22,40,.22)}\ .craf-card{background:#fff;border-radius:18px;padding:32px;font-family:Roboto,sans-serif}\ .craf-kick{text-align:center;color:var(--green2,#16A34A);font-weight:800;font-size:13px;letter-spacing:1px;text-transform:uppercase}\ .craf-card h2{text-align:center;font-size:26px;margin:6px 0 4px;color:var(--navy,#0A1628);font-family:Inter,Roboto,sans-serif}\ .craf-sub{text-align:center;color:var(--muted,#5a6b7e);margin-bottom:18px}\ .craf-progress{height:8px;background:#eef1f4;border-radius:999px;overflow:hidden;margin-bottom:6px}\ .craf-progress>i{display:block;height:100%;background:var(--green,#2D8A4E);width:9%;transition:.3s}\ .craf-pstep{font-size:12px;color:var(--muted,#5a6b7e);text-align:right;margin-bottom:18px}\ .craf-step{display:none}.craf-step.active{display:block}\ .craf-step h3{font-size:21px;text-align:center;margin:0 0 18px;color:var(--navy,#0A1628);font-family:Inter,Roboto,sans-serif}\ .craf-opts{display:grid;gap:12px}.craf-opts.two{grid-template-columns:1fr 1fr}.craf-opts.goals{grid-template-columns:1fr 1fr}\ @media(max-width:520px){.craf-opts.goals,.craf-opts.two{grid-template-columns:1fr}}\ .craf-opt{border:2px solid #e5e7eb;border-radius:12px;padding:16px;font-size:16px;font-weight:600;background:#fff;cursor:pointer;text-align:left;font-family:inherit}\ .craf-opt:hover,.craf-opt.sel{border-color:var(--green,#2D8A4E);background:var(--green-bg2,#F0FDF4)}\ .craf-field{margin-bottom:14px}.craf-field label{font-weight:700;font-size:14px;display:block;margin-bottom:6px;color:var(--navy,#0A1628)}\ .craf-field input{width:100%;padding:13px;border:2px solid #e5e7eb;border-radius:10px;font-size:16px;font-family:inherit}\ .craf-field input:focus{outline:0;border-color:var(--green,#2D8A4E)}\ .craf-num{font-size:30px;font-weight:800;text-align:center;color:var(--navy,#0A1628)}\ .craf-slider{width:100%;accent-color:var(--green,#2D8A4E)}\ .craf-nav{display:flex;justify-content:space-between;margin-top:20px;gap:10px}\ .craf-back{background:none;border:0;color:var(--muted,#5a6b7e);font-weight:600;cursor:pointer;font-size:15px}\ .craf-btn{display:inline-block;background:var(--green,#2D8A4E);color:#fff;font-weight:700;font-family:Inter,sans-serif;border:0;padding:14px 26px;border-radius:10px;font-size:16px;cursor:pointer;text-decoration:none;text-align:center}\ .craf-btn:hover{background:var(--green-d,#247141)}\ .craf-err{color:#dc2626;font-size:13px;font-weight:600;text-align:center;margin-top:10px;min-height:18px}\ .craf-screen{display:none;text-align:center}.craf-screen.show{display:block}\ .craf-qual{font-size:42px;font-weight:800;color:var(--green2,#16A34A);margin:6px 0}\ .craf-trust{text-align:center;font-size:12px;color:var(--muted,#5a6b7e);margin-top:14px}\ .craf-hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}\ '; function sliderStep(title, cls, numCls, min, max, step, val) { return '

' + title + '

' + '
$' + (+val).toLocaleString() + '
' + '
' + '
' + '
'; } function yesno(title, key) { return '

' + title + '

' + '' + '
'; } function textStep(title, fields, lastAct) { var f = fields.map(function (x) { return '
' + (x.label ? '' : '') + '
'; }).join(''); return '

' + title + '

' + f + '
' + '
'; } function template() { var goals = GOALS.map(function (g) { return ''; }).join(''); return '' + '

The Digital CreditReboot Process

' + '

No branch visits. No waiting in line. Just a simple digital process.

' + '
' + '
1

Pre-Approval

Fill the form, speak to the broker, get your quote.

' + '
2

Application & Approval

We shop the deal to 50+ lenders, you choose your approval.

' + '
3

Funding

Sign the broker & legal docs, arrears cleared, funds released.

' + '
' + '
' + '
' + '

Stop the sale โ€” start your application

' + '

It takes about 60 seconds. No credit check to begin, no upfront fees, and you\'ll speak with a licensed broker who handles arrears every day.

' + '' + '
In a hurry? Call ' + PHONE + ' โ€” we can often start the same day.
' + '
' + '
' + '
Apply in 60 Seconds ยท 100% Digital
' + '

Pre-Approved in Minutes. Funded in Days.

' + '

Canada\'s trusted digital mortgage broker

' + '
' + '
Step 1 of 11
' + '
' + '' + yesno('Do you currently own the home?', 'own') + sliderStep('What is your home\'s estimated value?', 'craf-hv', 'craf-hvn', 200000, 2000000, 10000, 750000) + sliderStep('What is your current mortgage balance?', 'craf-mb', 'craf-mbn', 0, 1500000, 10000, 450000) + yesno('Do you have a HELOC or 2nd mortgage?', 'heloc') + sliderStep('How much do you need to borrow?', 'craf-la', 'craf-lan', 10000, 500000, 5000, 50000) + '

What is your primary goal?

' + goals + '
' + textStep('What city is your property in?', [{ cls: 'craf-city', label: 'City', ph: 'e.g. Toronto, Calgary, Regina' }], 'cont') + textStep('What\'s your name?', [{ cls: 'craf-first', label: 'First name' }, { cls: 'craf-last', label: 'Last name' }], 'cont') + textStep('What\'s your email address?', [{ cls: 'craf-email', type: 'email', label: 'Email address', ph: 'you@email.com' }], 'cont') + textStep('Best phone number to reach you?', [{ cls: 'craf-phone', type: 'tel', label: 'Phone number', ph: '(___) ___-____' }], 'cont') + textStep('Property street address?', [{ cls: 'craf-street', label: 'Street address' }, { cls: 'craf-prov', label: 'Province', ph: 'ON / AB / SK' }, { cls: 'craf-postal', label: 'Postal code' }], 'finish') + '
' + '
' + '
โœ…

Received โ€” thank you.

' + '

You\'ll get a text & email shortly to schedule a time to discuss your options.

' + '
You may qualify for up to
' + '
$0
' + '
Based on 80% LTV โ€” subject to application, property & lender approval.
' + '
๐Ÿ 
' + '

Refi & Equity solutions are for homeowners only.

' + '

If you\'re looking to purchase a home, you can apply using the online application button.

' + 'Online Application' + '
' + '
๐Ÿ”’ No upfront fees ยท No credit check without consent ยท 100% digital & confidential
' + '
' + '
'; } function fmt(n) { return '$' + Math.round(n).toLocaleString(); } function wire(mount, source) { var $ = function (s) { return mount.querySelector(s); }; var steps = mount.querySelectorAll('.craf-step'); var total = steps.length, idx = 0, lead = {}; var bar = $('.craf-bar'), ps = $('.craf-pstep'), err = $('.craf-err'), form = $('.craf-form'); function val(s) { var el = $(s); return el ? (el.value || '').trim() : ''; } function render() { for (var i = 0; i < steps.length; i++) steps[i].classList.toggle('active', i === idx); bar.style.width = ((idx + 1) / total * 100) + '%'; ps.textContent = 'Step ' + (idx + 1) + ' of ' + total; err.textContent = ''; } function go(n) { idx = Math.max(0, Math.min(total - 1, n)); render(); } function showErr(m) { err.textContent = m; } function cont() { if (idx === 1) lead.homeValue = +$('.craf-hv').value; else if (idx === 2) lead.mortgageBalance = +$('.craf-mb').value; else if (idx === 4) lead.loanAmount = +$('.craf-la').value; else if (idx === 6) { if (!val('.craf-city')) return showErr('Please enter your city.'); lead.city = val('.craf-city'); } else if (idx === 7) { if (!val('.craf-first') || !val('.craf-last')) return showErr('Please enter your first and last name.'); lead.first = val('.craf-first'); lead.last = val('.craf-last'); } else if (idx === 8) { if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(val('.craf-email'))) return showErr('Please enter a valid email address.'); lead.email = val('.craf-email'); } else if (idx === 9) { if (val('.craf-phone').replace(/\D/g, '').length < 10) return showErr('Please enter a valid phone number.'); lead.phone = val('.craf-phone'); } go(idx + 1); } function notOwner() { form.style.display = 'none'; ps.style.display = 'none'; $('.craf-notowner').classList.add('show'); } function finish() { if (!val('.craf-street') || !val('.craf-prov') || !val('.craf-postal')) return showErr('Please complete your property address.'); lead.street = val('.craf-street'); lead.prov = val('.craf-prov'); lead.postal = val('.craf-postal'); lead.address = lead.street + ', ' + lead.prov + ' ' + lead.postal; if ($('.craf-hp').value) return; // honeypot tripped -> drop (bot) submitLead(); form.style.display = 'none'; ps.style.display = 'none'; bar.style.width = '100%'; $('.craf-qual').textContent = fmt(Math.max(0, (lead.homeValue || 0) * 0.8 - (lead.mortgageBalance || 0))); $('.craf-success').classList.add('show'); } function submitLead() { // Matches creditreboot.ca DC handler (Snippet #135: cr_lead_dc) โ€” direct keys; it builds the AC field[] map, // emails the admin, saves a DB backup, then relays to the secure proxy (#125) for ActiveCampaign. var fd = new FormData(); fd.append('action', FORM_ACTION); fd.append('fname', lead.first || ''); fd.append('lname', lead.last || ''); fd.append('email', lead.email || ''); fd.append('phone', lead.phone || ''); fd.append('city', lead.city || ''); fd.append('province', lead.prov || ''); fd.append('postal', lead.postal || ''); fd.append('street', lead.street || ''); fd.append('propVal', lead.homeValue || ''); fd.append('mtgBal', lead.mortgageBalance || ''); fd.append('borrowAmt', lead.loanAmount || ''); fd.append('goal', lead.goal || ''); fd.append('lead_source', source); // which page the lead came from (handler uses this) fd.append('field[100]', source); // page source (kept for the cr_form_submit fallback) fd.append('cr_website', ($('.craf-hp') || {}).value || ''); // honeypot try { fetch(AJAX_URL, { method: 'POST', body: fd, credentials: 'same-origin' }); } catch (e) {} } // delegated clicks mount.addEventListener('click', function (e) { var t = e.target.closest('[data-act],[data-key]'); if (!t || !mount.contains(t)) return; if (t.dataset.key) { lead[t.dataset.key] = t.dataset.val; var sib = t.parentNode.querySelectorAll('.craf-opt'); for (var i = 0; i < sib.length; i++) sib[i].classList.remove('sel'); t.classList.add('sel'); if (t.dataset.key === 'own' && t.dataset.val === 'No') { setTimeout(notOwner, 140); return; } setTimeout(function () { go(idx + 1); }, 140); return; } var a = t.dataset.act; if (a === 'back') go(idx - 1); else if (a === 'cont') cont(); else if (a === 'finish') finish(); else if (a === 'goback') { $('.craf-notowner').classList.remove('show'); form.style.display = ''; ps.style.display = ''; idx = 0; render(); } }); // sliders mount.querySelectorAll('.craf-slider').forEach(function (sl) { var num = mount.querySelector('.' + sl.dataset.num); function upd() { num.textContent = fmt(+sl.value); } sl.addEventListener('input', upd); upd(); }); render(); } function init(mount) { mount.innerHTML = template(); wire(mount, mount.getAttribute('data-source') || 'website'); } function boot() { var st = document.createElement('style'); st.textContent = CSS; document.head.appendChild(st); var mounts = document.querySelectorAll('.craf-mount'); for (var i = 0; i < mounts.length; i++) init(mounts[i]); } if (document.readyState !== 'loading') boot(); else document.addEventListener('DOMContentLoaded', boot); })();