text: /*!
   * Start Bootstrap - Freelancer v5.0.3 (https://startbootstrap.com/template-overviews/freelancer)
   * Copyright 2013-2021 Start Bootstrap
   * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-freelancer/blob/master/LICENSE)
   */
  
  $(function(){const q={build:{text:"Build a website for your project",pages:{type:["About us","Blog","Category","Checkout","Contact us","FAQ","Home","Landing","Login/create account","Press","Privacy policy","Product/service details","Product/service listings","Returns","Reviews","Search and listing results","Shipping","Shopping cart","Sitemap","Terms and conditions","Testimonials","Thank you"],customized:800,templated:200,include:["Home"]},features:{type:["Blog/news","Book appointments","Contact form","Customer/guest login","Database integration","Discount codes","Drop ship","Email newsletter","Easy-to-use checkout","Event calendar","Image slider","Location map","Receive testimonials","Search bar","Search engine optimization","Shipping options","Social sharing tool","Subscription service","Take surveys","User-friendly navigation","User interface/user experience design"],customized:2e3,templated:600,include:["Database integration","Search engine optimization","User-friendly navigation","User interface/user experience design"]}},redesign:{text:"Redesign and add new features to your current website",question:["Why do you want a website redesign, or what are you trying to accomplish?","What do you love and hate about your current website?"],customized:3e3,templated:1500},repair:{text:"Repair your current website",perComponent:400}},B=[{type:"customized",text:"100% customized from scratch website"},{type:"templated",text:"Website using templates like Shopify or WordPress"}],j={text:["Yes, involves the selling of products or services"],include:{pages:["Product/service listings","Shopping cart","Checkout","Thank you"],features:["Customer/guest login","Easy-to-use checkout","Multiple payment options"]}};function T(t,n,o){for(let e=0;e<n.length;e++){const r=$("<div class='mx-4 py-3'></div>");t.append(r),e!==n.length-1&&r.addClass("border-bottom");const s=$("<label class='lead mb-0 radio'></label>").attr({for:n[e].type});r.append(s);const i=$("<span class='radio__input'></span>");s.append(i);var a=$("<input type='radio' required='required'>").attr({id:n[e].type,value:n[e].type,name:o,"data-validation-required-message":"Please select an option."});i.append(a);a=$("<span class='radio__control'></span>");i.append(a);a=$("<span class='radio__label'></span>").text(n[e].text);s.append(a)}}function A(e,t){e=$("<form action='js/quote.js' method='post' enctype='text/plain' novalidate></form>").attr({name:e+"Form",id:e+"Form"});t.append(e)}function O(t,n,o,a,r){for(let e=0;e<n.length;e++){const i=$("<div class='mx-5 py-1'></div>");t.append(i);var s=n[e].split(" ").join("_");const p=$("<label class='lead mb-0 radio'></label>").attr({for:s});i.append(p);const d=$("<span class='radio__input'></span>");p.append(d);s=$("<input type='checkbox'>").attr({id:s,value:n[e],name:o+"[]",minchecked:a,"data-validation-minchecked-message":r});d.append(s);s=$("<span class='radio__control checkbox__border'></span>");d.append(s);s=$("<span class='radio__label'></span>").text(n[e]);p.append(s)}}function D(e,t){const n=$("<div class='row justify-content-center'></div>");e.append(n);t=$("<input type='button' class='btn btn-outline-secondary' disabled>").attr({id:"addFieldButtonFor"+(t.charAt(0).toUpperCase()+t.slice(1)),value:"Add another "+t});n.append(t)}function N(e,t,n,o=!1){t=$("<input type='text' class='form-control text-primary'>").attr({name:t+"[]",id:"other"+(t.charAt(0).toUpperCase()+t.slice(1))+"Input",placeholder:n,required:o,"data-validation-required-message":o?"Please enter at least one "+t+".":null});e.append(t)}function z(t,n,o){for(let e=0;e<t.length;e++)-1<n.type.indexOf(t[e])&&$("input[type=checkbox][value='"+t[e]+"']").attr({checked:o,disabled:o})}function U(o,e,a){o.on("change",e,function(){var e,t,n;$(this).val()?(0===$(this).siblings("#deleteInputButton").length&&(e=o,t=$(this),n=$("<span type='button' id='deleteInputButton'></span>").html("&times;").on("click",function(){t.parents()[1].remove()}),e.append(n)),$(a).prop("disabled",!1)):($(a).prop("disabled",!0),$(this).siblings("#deleteInputButton").remove())})}function W(e,t,n,o,a){const r=$("<section class='control-group border-bottom py-0'></section>");$(e).append(r);const s=$("<div class='form-group floating-label-form-group controls mb-0 pb-2'></div>");r.append(s);var i=t.split(" ").join("_"),e=$("<label></label>").attr("for",i).text(t.split(" ").map(e=>e[0].toUpperCase()+e.substr(1).toLowerCase()).join(" "));s.append(e);const p=$(n).attr({class:"form-control text-primary",name:i,id:i,type:o,required:a,placeholder:t.split(" ").map(e=>e[0].toUpperCase()+e.substr(1).toLowerCase()).join(" "),value:""});"tel"===o&&p.on({keydown:function(e){backspacerDOWN(this,e)},keyup:function(e){backspacerUP(this,e)}}),"email"===o?p.attr({"data-validation-email-message":"Not a valid email address.","data-validation-required-message":"Please enter your email address."}):p.attr("data-validation-required-message",a?"Please enter your "+t+".":null),s.append(p);t=$("<p class='help-block text-danger'></p>");s.append(t),$("[type='email']")||(t=$("<p class='help-block text-danger'></p>"),s.append(t))}function n(e,t,n){t=$("<button></button>").attr({type:t,name:t,class:n,id:t}).text(t.charAt(0).toUpperCase()+t.slice(1));$(e).append(t)}function E(e){W(e,"full name","<input>","text",!0),W(e,"email address","<input>","email",!0),W(e,"phone number","<input>","tel",!1);var t=$("<div id='success'></div>");$(e).append(t),$(e).append("<br>");t=$("<div class='form-group row px-3'></div>");$(e).append(t),n(t,"submit","btn btn-primary btn-outline-secondary btn-lg"),n(t,"reset","btn btn-outline-secondary btn-lg ml-2")}function I(e){const t=e.split(" ");2<=t.length&&!t.some(e=>""===e)?(0<$("input#full_name ~ p.help-block.text-danger > ul").children().length&&$("input#full_name ~ p.help-block.text-danger > ul").remove(),$("#submit").prop("disabled",!1)):($("input#full_name ~ p.help-block.text-danger:last-child").html('<ul role="alert"><li>'+$("input#full_name").attr("data-validation-required-message")+"</li></ul>"),$("input#full_name ~ p.help-block.text-danger:last-child > ul").append("<li>Names cannot have empty spaces.</li>"),$("#submit").prop("disabled",!0))}function R(){$("#serviceType").empty(),$("input[name=serviceType]").prop("checked",!1),$("#quote .control-group:first-child").removeClass("border-bottom")}function L(e){return $("input[name='"+e+"[]']:checked").length+$("input[type='text'][name='"+e+"[]']").filter(function(){return 0<this.value.length}).length}function V(e,t){let n=t.get("full_name");0<=n.indexOf(" ")&&(n=n.split(" ").slice(0,-1).join(" ")),$("#submit").prop("disabled",!0),$.ajax({url:"././mail/"+e+".php",type:"POST",data:t,processData:!1,contentType:!1,cache:!1,success:function(){$("#success").html("<div class='alert alert-success mt-3'>"),$("#success > .alert-success").html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;").append("</button>"),$("#success > .alert-success").append($("<strong>").text("Thank you "+n+" for signing up for a "+e+" quote! You'll receive an email shortly.")),$("#success > .alert-success").append("</div>")},error:function(){$("#success").html("<div class='alert alert-danger mt-3'>"),$("#success > .alert-danger").html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;").append("</button>"),$("#success > .alert-danger").append($("<strong>").text("Sorry "+n+", it seems that my mail server is not responding. Please try again later!")),$("#success > .alert-danger").append("</div>")},complete:function(){setTimeout(R,1e4)}})}const e=$("<div class='col-12 col-sm-12 col-md-10 col-lg-8 col-xl-6 mx-auto text-primary'></div>");$("#quote .container").append(e);const H=$("<section class='control-group border-top py-5'></section>");e.append(H);const t=$("<fieldset></fieldset>");H.append(t);var o=$("<legend class='lead text-secondary text-center'>What type of service do you need? Select one option:</legend>");t.append(o);let a=0;for(const s in q)if(q.hasOwnProperty(s)){const i=$("<div class='mx-4 py-3'></div>");t.append(i),a!==Object.keys(q).length-1&&i.addClass("border-bottom");const p=$("<label class='lead mb-0 radio'></label>").attr({for:s});i.append(p);const d=$("<span class='radio__input'></span>");p.append(d);var r=$("<input type='radio' required='required'>").attr({id:s,value:s,name:"serviceType","data-validation-required-message":"Please select an option."});d.append(r);r=$("<span class='radio__control'></span>");d.append(r);r=$("<span class='radio__label'></span>").text(q[s].text);p.append(r),a++}const G=$("<div id='serviceType'></div>");e.append(G),$("input[name=serviceType]").on("change",function(){var e=$(this).val();if("build"===e){G.empty(),H.addClass("border-bottom"),A("build",G),W("#buildForm","project name","<input>","text",!0),W("#buildForm","project details","<textarea>","text",!0);const a=$("<section class='control-group border-bottom py-5'></section>");$("#buildForm").append(a);const r=$("<fieldset></fieldset>");a.append(r);var t=$("<legend class='lead text-secondary text-center'>How do you want your website to be built? Select one option:</legend>");r.append(t);t=$("<p class='help-block text-danger'></p>");r.append(t),T(r,B,"techniqueType");const s=$("<section class='control-group border-bottom py-5'></section>");$("#buildForm").append(s);const i=$("<fieldset></fieldset>");s.append(i);t=$("<legend class='lead text-secondary text-center'>Is your project considered e-commerce? (Optional)</legend>");i.append(t),O(i,j.text,"ecomm",null,null),$("input[name='ecomm[]']").on("change",function(){$("input[name='ecomm[]']").is(":checked")?(z(j.include.pages,q.build.pages,!0),z(j.include.features,q.build.features,!0)):(z(j.include.pages,q.build.pages,!1),z(j.include.features,q.build.features,!1))});const p=$("<section class='control-group border-bottom py-5'></section>");$("#buildForm").append(p);const d=$("<fieldset></fieldset>");p.append(d);t=$("<legend class='lead text-secondary text-center'>What pages do you want to display in your website? Select all that apply:</legend>");d.append(t);t=$("<p class='help-block text-danger'></p>");d.append(t),O(d,q.build.pages.type,"page",1,"Choose at least one."),z(q.build.pages.include,q.build.pages,!0);const l=$("<div class='mt-3 mx-5'></div>");d.append(l);const c=$("<div class='control-group mb-2'></div>");l.append(c);t=$("<div class='form-group controls mb-0 border-top border-bottom'></div>");c.append(t),N(t,"page","Add a different page",!1),U(t,"input","#addFieldButtonForPage"),D(d,"page"),$("#addFieldButtonForPage").on("click",function(){const e=$("<div class='control-group mb-2'></div>");l.append(e);var t=$("<div class='form-group controls mb-0 border-top border-bottom'></div>");e.append(t),N(t,"page","Add a different page",!1),$("#addFieldButtonForPage").prop("disabled",!0),U(t,"input","#addFieldButtonForPage")});const u=$("<section class='control-group border-bottom py-5'></section>");$("#buildForm").append(u);const m=$("<fieldset></fieldset>");u.append(m);t=$("<legend class='lead text-secondary text-center'>What features do you want your website to perform? Select all that apply:</legend>");m.append(t);t=$("<p class='help-block text-danger'></p>");m.append(t),O(m,q.build.features.type,"feature",1,"Choose at least one."),z(q.build.features.include,q.build.features,!0);const b=$("<div class='mt-3 mx-5'></div>");m.append(b);const g=$("<div class='control-group mb-2'></div>");b.append(g);t=$("<div class='form-group controls mb-0 border-top border-bottom'></div>");g.append(t),N(t,"feature","Add a different feature",!1),U(t,"input","#addFieldButtonForFeature"),D(m,"feature"),$("#addFieldButtonForFeature").on("click",function(){const e=$("<div class='control-group mb-2'></div>");b.append(e);var t=$("<div class='form-group controls mb-0 border-top border-bottom'></div>");e.append(t),N(t,"feature","Add a different feature",!1),$("#addFieldButtonForFeature").prop("disabled",!0),U(t,"input","#addFieldButtonForFeature")}),E("#buildForm"),$("input#full_name").on("change",function(){I($(this).val())}),$("button[type='reset']").on("click",R),$("#buildForm input, #buildForm textarea").jqBootstrapValidation({preventSubmit:!0,submitError:function(e,t,n){},submitSuccess:function(e,t){t.preventDefault(),""===$("input[type='text'][name='page[]']").val()&&$("input[type='text'][name='page[]']").prop("disabled",!0),""===$("input[type='text'][name='feature[]']").val()&&$("input[type='text'][name='feature[]']").prop("disabled",!0),$.each($("input[type='checkbox']:disabled"),function(){$(this).prop("disabled",!1)});const n=new FormData(t.target);var o=n.get("techniqueType"),a=L("page");n.append("pageCount",a);t=q.build.pages[o];n.append("pricePerPage",t);t*=a;n.append("pageSubtotal",t);a=L("feature");n.append("featureCount",a);o=q.build.features[o];n.append("pricePerFeature",o);a*=o;n.append("featureSubtotal",a),n.append("estimateTotal",t+a),V("build",n)},filter:function(){return $(this).is(":visible")}}),$("#full_name").on("focus",function(){$("#success").html("")})}else if("redesign"===e){G.empty(),H.addClass("border-bottom"),A("redesign",G),W("#redesignForm","project name","<input>","text",!0),W("#redesignForm","project details","<textarea>","text",!0);const f=$("<section class='control-group border-bottom py-5'></section>");$("#redesignForm").append(f);const v=$("<fieldset></fieldset>");f.append(v);var n=$("<legend class='lead text-secondary text-center'>How is your website built? Select one option:</legend>");v.append(n);n=$("<p class='help-block text-danger'></p>");v.append(n),T(v,B,"techniqueType");for(let e=0;e<q.redesign.question.length;e++){const k=$("<section class='control-group border-bottom py-5'></section>");$("#redesignForm").append(k);var o=$("<p class='lead text-secondary text-center'></p>").text(q.redesign.question[e]);k.append(o);const w=$("<div class='control-group mb-2'></div>");k.append(w);o=$("<p class='help-block text-danger'></p>");w.append(o);const P=$("<div class='form-group controls mb-0 border-top border-bottom mx-5'></div>");w.append(P);o=$("<textarea type='text' class='form-control text-primary' required='required'>").attr({"data-validation-required-message":"Please answer this question.",name:"redesignAnswer"+e});P.append(o)}const h=$("<section class='control-group border-bottom py-5'></section>");$("#redesignForm").append(h);const y=$("<fieldset></fieldset>");h.append(y);n=$("<legend class='lead text-secondary text-center'>(Optional) What new features do you want to add to your website? Select all that apply:</legend>");y.append(n);n=$("<p class='help-block text-danger'></p>");y.append(n),O(y,q.build.features.type,"feature",0,null);const x=$("<div class='mt-3 mx-5'></div>");y.append(x);const F=$("<div class='control-group mb-2'></div>");x.append(F);n=$("<div class='form-group controls mb-0 border-top border-bottom'></div>");F.append(n),N(n,"feature","Add a different feature",!1),U(n,"input","#addFieldButtonForFeature"),D(y,"feature"),$("#addFieldButtonForFeature").on("click",function(){const e=$("<div class='control-group mb-2'></div>");x.append(e);var t=$("<div class='form-group controls mb-0 border-top border-bottom'></div>");e.append(t),N(t,"feature","Add a different feature",!1),$("#addFieldButtonForFeature").prop("disabled",!0),U(t,"input","#addFieldButtonForFeature")}),E("#redesignForm"),$("input#full_name").on("change",function(){I($(this).val())}),$("button[type='reset']").on("click",R),$("#redesignForm input, #redesignForm textarea").jqBootstrapValidation({preventSubmit:!0,submitError:function(e,t,n){},submitSuccess:function(e,t){t.preventDefault(),""===$("input[type='text'][name='feature[]']").val()&&$("input[type='text'][name='feature[]']").prop("disabled",!0);const n=new FormData(t.target);for(let e=0;e<q.redesign.question.length;e++)n.append("redesignQuestion"+e,q.redesign.question[e]);let o=0;var a=n.get("techniqueType"),t=q.redesign[a];n.append("redesign",t),o+=t,n.has("feature[]")&&(t=L("feature"),n.append("featureCount",t),a=q.build.features[a],n.append("pricePerFeature",a),a=t*a,n.append("featureSubtotal",a),o+=a),n.append("estimateTotal",o),V("redesign",n)},filter:function(){return $(this).is(":visible")}}),$("#full_name").on("focus",function(){$("#success").html("")})}else{G.empty(),H.addClass("border-bottom"),A("repair",G),W("#repairForm","project name","<input>","text",!0),W("#repairForm","project details","<textarea>","text",!0);const C=$("<section class='control-group border-bottom py-5'></section>");$("#repairForm").append(C);n=$("<p class='lead text-secondary text-center'>What problems occur on your website? Enter a problem per line:</p>");C.append(n);const S=$("<div class='mt-3 mx-5'></div>");C.append(S);const _=$("<div class='control-group mb-2'></div>");S.append(_);n=$("<p class='help-block text-danger'></p>");_.append(n);n=$("<div class='form-group controls mb-0 border-top border-bottom'></div>");_.append(n),N(n,"problem","Add a problem",!0),U(n,"input","#addFieldButtonForProblem"),D(C,"problem"),$("#addFieldButtonForProblem").prop("disabled",!0),$("#addFieldButtonForProblem").on("click",function(){const e=$("<div class='control-group mb-2'></div>");S.append(e);var t=$("<div class='form-group controls mb-0 border-top border-bottom'></div>");e.append(t),N(t,"problem","Add a problem"),$("#addFieldButtonForProblem").prop("disabled",!0),U(t,"input","#addFieldButtonForProblem")}),E("#repairForm"),$("input#full_name").on("change",function(){I($(this).val())}),$("button[type='reset']").on("click",R),$("#repairForm input, #repairForm textarea").jqBootstrapValidation({preventSubmit:!0,submitError:function(e,t,n){},submitSuccess:function(e,t){t.preventDefault();const n=new FormData(t.target);var o=L("problem");n.append("problemCount",o);t=q.repair.perComponent;n.append("pricePerProblem",t),n.append("estimateTotal",o*t),V("repair",n)},filter:function(){return $(this).is(":visible")}}),$("#full_name").on("focus",function(){$("#success").html("")})}})});var phonevalue1,phonevalue2,cursorposition,zChar=new Array(" ","(",")","-","."),maxphonelength=13;function ParseForNumber1(e){phonevalue1=ParseChar(e.value,zChar)}function ParseForNumber2(e){phonevalue2=ParseChar(e.value,zChar)}function backspacerUP(e,t){t=(t=t||window.event).which||t.keyCode,ParseForNumber1(e),48<=t&&ValidatePhone(e)}function backspacerDOWN(e,t){(t=t||window.event).which||t.keyCode,ParseForNumber2(e)}function GetCursorPosition(){var e=phonevalue1,t=phonevalue2,n=!1;for(i=0;i<e.length;i++)e.substring(i,1)!=t.substring(i,1)&&(n||(cursorposition=i,n=!0))}function ValidatePhone(e){var t=phonevalue1;(t=t.replace(/[^\d]*/gi,"")).length<3?e.value=t:3==t.length?(pp=t,d4=t.indexOf("("),d5=t.indexOf(")"),-1==d4&&(pp="("+pp),-1==d5&&(pp+=")"),e.value=pp):3<t.length&&t.length<7?(l30=(t="("+t).length,p30=t.substring(0,4),p30+=")",p31=t.substring(4,l30),pp=p30+p31,e.value=pp):7<=t.length&&(l30=(t="("+t).length,p30=t.substring(0,4),p30+=")",p31=t.substring(4,l30),pp=p30+p31,l40=pp.length,p40=pp.substring(0,8),p40+="-",p41=pp.substring(8,l40),ppp=p40+p41,e.value=ppp.substring(0,maxphonelength)),GetCursorPosition(),0<=cursorposition&&(0==cursorposition?cursorposition=2:cursorposition<=2?cursorposition+=1:cursorposition<=5||6==cursorposition?cursorposition+=2:7==cursorposition?(cursorposition+=4,e1=e.value.indexOf(")"),e2=e.value.indexOf("-"),-1<e1&&-1<e2&&e2-e1==4&&(cursorposition-=1)):cursorposition<11?cursorposition+=3:11==cursorposition&&(cursorposition+=1),e=document.getElementById("phone_number"),12===cursorposition&&13===e.value.length&&(e.blur(),e.setSelectionRange(0,13),phone=e.value))}function ParseChar(e,t){for(zChar=null==t.length?new Array(t):t,i=0;i<zChar.length;i++){sNewStr="";for(var n=0,o=e.indexOf(t[i]);-1!=o;)sNewStr+=e.substring(n,o),n=o+1,o=e.indexOf(t[i],n);sNewStr+=e.substring(e.lastIndexOf(t[i])+1,e.length),e=sNewStr}return sNewStr}