mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 02:15:13 -05:00
1 line
No EOL
48 KiB
JavaScript
Executable file
1 line
No EOL
48 KiB
JavaScript
Executable file
(function(f){function v(D){function C(){}C.prototype=D||this;return new C()}var h={};h.settings={enableGeoIP:true,acceptedCards:["visa","mastercard","discover","american_express"],oneErrorPerField:true};h.version="2.2.9";h.dom={};h.Error={toString:function(){return"RecurlyJS Error: "+this.message}};h.raiseError=function(C){var D=v(h.Error);D.message=C;throw D};h.config=function(C){f.extend(true,h.settings,C);if(!C.baseURL){var D=h.settings.subdomain||h.raiseError("company subdomain not configured");h.settings.baseURL="https://"+D+".recurly.com/jsonp/"+D+"/"}};function u(D,C){if(D==1){return C.substr(0,C.length-1)}return""+D+" "+C}(h.Cost=function(C){this._cents=C||0}).prototype={toString:function(){return h.formatCurrency(this.dollars())},cents:function(C){if(C===undefined){return this._cents}return new h.Cost(C)},dollars:function(C){if(C===undefined){return this._cents/100}return new h.Cost(C*100)},mult:function(C){return new h.Cost(this._cents*C)},add:function(C){if(C.cents){C=C.cents()}return new h.Cost(this._cents+C)},sub:function(C){if(C.cents){C=C.cents()}return new h.Cost(this._cents-C)}};h.Cost.FREE=new h.Cost(0);(h.TimePeriod=function(D,C){this.length=D;this.unit=C}).prototype={toString:function(){return""+u(this.length,this.unit)},toDate:function(){var C=new Date();switch(this.unit){case"month":C.setMonth(C.getMonth()+this.length);break;case"day":C.setDay(C.getDay()+this.length);break}return C},clone:function(){return new h.TimePeriod(this.length,this.unit)}};(h.RecurringCost=function(D,C){this.cost=D;this.interval=C}).prototype={toString:function(){return""+this.cost+" every "+this.interval},clone:function(){return new h.TimePeriod(this.length,this.unit)}};h.RecurringCost.FREE=new h.RecurringCost(0,null);(h.RecurringCostStage=function(C,D){this.recurringCost=C;this.duration=D}).prototype={toString:function(){this.recurringCost.toString()+" for "+this.duration.toString()}};h.locale={};h.locale.errors={emptyField:"Required field",missingFullAddress:"Please enter your full address.",invalidEmail:"Invalid",invalidCC:"Invalid",invalidCVV:"Invalid",invalidCoupon:"Invalid",cardDeclined:"Transaction declined",acceptTOS:"Please accept the Terms of Service.",invalidQuantity:"Invalid quantity"};h.locale.currencies={};h.locale.currency={format:"%u%n",separator:".",delimiter:",",precision:2};function s(C,D){var F=h.locale.currencies[C]=v(h.locale.currency);for(var E in D){F[E]=D[E]}}s("USD",{symbol:"$"});s("AUD",{symbol:"$"});s("CAD",{symbol:"$"});s("EUR",{symbol:"\u20ac"});s("GBP",{symbol:"\u00a3"});s("CZK",{symbol:"\u004b"});s("DKK",{symbol:"\u006b\u0072"});s("HUF",{symbol:"Ft"});s("JPY",{symbol:"\u00a5"});s("NOK",{symbol:"kr"});s("NZD",{symbol:"$"});s("PLN",{symbol:"\u007a"});s("SGD",{symbol:"$"});s("SEK",{symbol:"kr"});s("CHF",{symbol:"Fr"});s("ZAR",{symbol:"R"});h.settings.locale=h.locale;h.knownCards={visa:{prefixes:[4],name:"Visa"},mastercard:{prefixes:[51,52,53,54,55],name:"MasterCard"},american_express:{prefixes:[34,37],name:"American Express"},discover:{prefixes:[6011,62,64,65],name:"Discover"},diners_club:{prefixes:[305,36,38],name:"Diners Club"},carte_blanche:{prefixes:[300,301,302,303,304,305]},jcb:{prefixes:[35],name:"JCB"},enroute:{prefixes:[2014,2149],name:"EnRoute"},maestro:{prefixes:[5018,5020,5038,6304,6759,6761],name:"Maestro"},laser:{prefixes:[6304,6706,6771,6709],name:"Laser"}};h.detectCardType=function(E){E=E.replace(/\D/g,"");var H=h.knownCards;for(var C in H){if(H.hasOwnProperty(C)){var I=H[C];for(var G=0,D=I.prefixes.length;G<D;++G){if(I.prefixes.hasOwnProperty(G)){var F=I.prefixes[G];if(new RegExp("^"+F.toString()).test(E)){return C}}}}}return false};h.formatCurrency=function(F,J){if(F<0){F=-F;var E=true}else{var E=false}J=J||h.settings.currency||h.raiseError("currency not configured");var I=h.locale.currency;var D=h.locale.currencies[J];var H=F.toFixed(D.precision);if(I.separator!="."){H=H.replace(/\./g,I.separator)}function C(L){var K=new RegExp("(-?[0-9]+)([0-9]{3})");while(K.test(L)){L=L.replace(K,"$1"+I.delimiter+"$2")}return L}H=C(H);var G=I.format;G=G.replace(/%u/g,D.symbol);G=G.replace(/%n/g,H);H=G;if(E){H="-"+H}return H};var m=["AT","BE","BG","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB"];h.isCountryInEU=function(C){return f.inArray(C,m)!==-1};h.isVATNumberApplicable=function(D,C){if(!h.settings.VATPercent){return false}if(!h.settings.country){h.raiseError("you must configure a country for VAT to work")}if(!h.isCountryInEU(h.settings.country)){h.raiseError("you cannot charge VAT outside of the EU")}if(!h.isCountryInEU(D)){return false}return true};h.isVATChargeApplicable=function(D,E){if(!h.isVATNumberApplicable(D)){return false}var C=h.settings.country;return(C==D||!E)};h.flattenErrors=function(I,D){var C=[];var D=D||"";if(typeof I=="string"||typeof I=="number"||typeof I=="boolean"){if(D=="base"){return[I]}return[""+D+" "+I]}for(var F in I){if(I.hasOwnProperty(F)){D=(parseInt(F).toString()==F)?D:F;var H=h.flattenErrors(I[F],D);for(var G=0,E=H.length;G<E;++G){C.push(H[G])}}}return C};h.getToken=function(C){var D=C.token||"INVALIDTOKEN";return D};h.postResult=function(D,G,C){var E=h.getToken(G);var F=f("<form />").hide();F.attr("action",D).attr("method","POST").attr("enctype","application/x-www-form-urlencoded");f('<input type="hidden" />').attr({name:"recurly_token",value:E}).appendTo(F);f("body").append(F);F.submit()};function k(F){var E=f("<select>");for(var D in F){if(F.hasOwnProperty(D)){var C=F[D];E.append("<option value="+D+">"+C+"</option>")}}return E}h.enforce=function(C){return{enforced:C,hidden:false,hide:function(){this.hidden=true;return this}}};function r(D){D=D||this;if(typeof D=="string"){return D.replace(/([a-z])([A-Z])/g,function(F,E,G){return E+"_"+G}).toLowerCase()}else{for(var C in D){if(D.hasOwnProperty(C)){}}}}function n(F){var E={};for(var D in F){var C=F[D];if(f.isPlainObject(C)){E[D]=n(C)}else{if(typeof C!=="undefined"){E[D]=C}}}return E}h.ajax=function(C){C.data=f.extend({js_version:h.version},C.data);C.data=n(C.data);if(C.data.billing_info&&C.data.billing_info.payment_method=="paypal"){return h.paypal.start(C)}return f.ajax(C)};function w(C){f("body").append(h.dom.error_dialog)}(h.isValidCC=function(I){var D=I.val();D=D.replace(/\D/g,"");if(D==""){return false}var G=0,F=0,C=false;for(var H=D.length-1;H>=0;H--){var E=D.charAt(H);var F=parseInt(E,10);if(C){if((F*=2)>9){F-=9}}G+=F;C=!C}return(G%10)==0}).defaultErrorKey="invalidCC";(h.isValidEmail=function(D){var C=D.val();return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(C)}).defaultErrorKey="invalidEmail";function b(C){return/^[0-9]+$/.test(C)}(h.isValidCVV=function(D){var C=D.val();return(C.length==3||C.length==4)&&b(C)}).defaultErrorKey="invalidCVV";(h.isNotEmpty=function(D){var C=D.val();if(D.is("select")){if(C=="-"||C=="--"){return false}}return !!C}).defaultErrorKey="emptyField";(h.isNotEmptyState=function(D){var C=D.val();if(D.is("select")){if(C=="-"||C=="--"){return false}}return true}).defaultErrorKey="emptyField";(h.isChecked=function(C){return C.is(":checked")}).defaultErrorKey="acceptTOS";(h.isValidQuantity=function(C){return/^[0-9]*$/.test(C.val())}).defaultErrorKey="invalidQuantity";h.Plan={create:v,fromJSON:function(F){var G=this.create();G.name=F.name;G.code=F.plan_code;G.currency=F.currency;G.cost=new h.Cost(F.unit_amount_in_cents);G.displayQuantity=F.display_quantity;G.interval=new h.TimePeriod(F.plan_interval_length,F.plan_interval_unit);if(F.trial_interval_length){G.trial=new h.TimePeriod(F.trial_interval_length,F.trial_interval_unit)}if(F.setup_fee_in_cents){G.setupFee=new h.Cost(F.setup_fee_in_cents)}if(F.vat_percentage){h.settings.VATPercent=parseFloat(F.vat_percentage)}if(F.merchant_country){h.settings.country=F.merchant_country}G.addOns=[];if(F.add_ons){for(var D=F.add_ons.length,E=0;E<D;++E){var C=F.add_ons[E];G.addOns.push(h.AddOn.fromJSON(C))}}return G},get:function(D,C,E){f.ajax({url:h.settings.baseURL+"plans/"+D+"?currency="+C,dataType:"jsonp",jsonp:"callback",timeout:10000,success:function(F){var G=h.Plan.fromJSON(F);E(G)}})},createSubscription:function(){var C=v(h.Subscription);C.plan=v(this);C.plan.quantity=1;C.addOns=[];return C}};h.AddOn={fromJSON:function(D){var C=v(h.AddOn);C.name=D.name;C.code=D.add_on_code;C.cost=new h.Cost(D.default_unit_amount_in_cents);C.displayQuantity=D.display_quantity;return C},toJSON:function(){return{name:this.name,add_on_code:this.code,default_unit_amount_in_cents:this.default_unit_amount_in_cents}}};h.Account={create:v,toJSON:function(){return{first_name:this.firstName,last_name:this.lastName,company_name:this.companyName,account_code:this.code,email:this.email}}};h.BillingInfo={create:v,toJSON:function(){var C={first_name:this.firstName||this.account.firstName,last_name:this.lastName||this.account.lastName,address1:this.address1,address2:this.address2,city:this.city,state:this.state,zip:this.zip,country:this.country,phone:this.phone,vat_number:this.vatNumber};if(this.paymentMethod=="paypal"){C.payment_method="paypal"}else{f.extend(C,{number:this.number,verification_value:this.cvv,month:this.month,year:this.year})}return C},save:function(C){var D={account:this.account?this.account.toJSON():undefined,billing_info:this.toJSON(),signature:C.signature};h.ajax({url:h.settings.baseURL+"accounts/"+C.accountCode+"/billing_info/update",data:D,dataType:"jsonp",jsonp:"callback",timeout:60000,success:function(E){if(E.success&&C.success){C.success(E.success)}else{if(E.errors&&C.error){C.error(h.flattenErrors(E.errors))}}},error:function(){if(C.error){C.error(["Unknown error processing transaction. Please try again later."])}},complete:C.complete||f.noop})}};h.Subscription={create:v,plan:h.Plan,addOns:[],calculateTotals:function(){var F={stages:{}};F.plan=this.plan.cost.mult(this.plan.quantity);F.allAddOns=new h.Cost(0);F.addOns={};for(var D=this.addOns.length,E=0;E<D;++E){var C=this.addOns[E],J=C.cost.mult(C.quantity);F.addOns[C.code]=J;F.allAddOns=F.allAddOns.add(J)}F.stages.recurring=F.plan.add(F.allAddOns);F.stages.now=F.plan.add(F.allAddOns);if(this.plan.trial){F.stages.now=h.Cost.FREE}if(this.plan.setupFee){F.stages.now=F.stages.now.add(this.plan.setupFee)}if(this.coupon){var G=F.stages.now;var I;if(this.coupon.discountFixed){I=this.coupon.discountFixed}else{I=G.sub(this.plan.setupFee||0).mult(this.coupon.discountRatio)}var H=G.sub(I);if(H.cents()<0){H=h.Cost.FREE}F.coupon=H.sub(G);F.stages.now=H}if(this.billingInfo&&h.isVATChargeApplicable(this.billingInfo.country,this.billingInfo.vatNumber)){F.vat=F.stages.now.mult((h.settings.VATPercent/100));F.stages.now=F.stages.now.add(F.vat)}return F},redeemAddOn:function(D){var C=D.createRedemption();this.addOns.push(C);return C},removeAddOn:function(F){for(var D=this.addOns,C=D.length,E=0;E<C;++E){if(D[E].code==F){return D.splice(E,1)}}},findAddOnByCode:function(E){for(var C=this.addOns.length,D=0;D<C;++D){if(this.addOns[D].code==E){return this.addOns[D]}}return false},toJSON:function(){var G={plan_code:this.plan.code,quantity:this.plan.quantity,currency:this.plan.currency,coupon_code:this.coupon?this.coupon.code:undefined,add_ons:[]};for(var F=0,E=this.addOns.length,D=G.add_ons,C=this.addOns;F<E;++F){D.push({add_on_code:C[F].code,quantity:C[F].quantity})}return G},save:function(C){var D={subscription:this.toJSON(),account:this.account.toJSON(),billing_info:this.billingInfo.toJSON(),signature:C.signature};h.ajax({url:h.settings.baseURL+"subscribe",data:D,dataType:"jsonp",jsonp:"callback",timeout:60000,success:function(E){if(E.success&&C.success){C.success(E.success)}else{if(E.errors&&C.error){var F=E.errors.error_code;delete E.errors.error_code;C.error(h.flattenErrors(E.errors),F)}}},error:function(){if(C.error){C.error(["Unknown error processing transaction. Please try again later."])}},complete:C.complete})}};h.AddOn.createRedemption=function(D){var C=v(this);C.quantity=D||1;return C};h.Coupon={fromJSON:function(C){var D=v(h.Coupon);if(C.discount_in_cents){D.discountFixed=new h.Cost(C.discount_in_cents)}else{if(C.discount_percent){D.discountRatio=C.discount_percent/100}}D.description=C.description||"";return D},toJSON:function(){}};h.Subscription.getCoupon=function(E,C,D){if(!h.settings.baseURL){h.raiseError("Company subdomain not configured")}var F=(h.settings.currency!==undefined?"?currency="+h.settings.currency:"");return h.ajax({url:h.settings.baseURL+"plans/"+this.plan.code+"/coupons/"+E+F,dataType:"jsonp",jsonp:"callback",timeout:10000,success:function(H){if(H.valid){var G=h.Coupon.fromJSON(H);G.code=E;C(G)}else{D()}},error:function(){D()}})};h.Transaction={create:v,save:function(C){var D={account:this.account?this.account.toJSON():undefined,billing_info:this.billingInfo.toJSON(),signature:C.signature};h.ajax({url:h.settings.baseURL+"transactions/create",data:D,dataType:"jsonp",jsonp:"callback",timeout:60000,success:function(E){if(E.success&&C.success){C.success(E.success)}else{if(E.errors&&C.error){C.error(h.flattenErrors(E.errors))}}},error:function(){if(C.error){C.error(["Unknown error processing transaction. Please try again later."])}},complete:C.complete||f.noop})}};h.UserError={};function t(C,D){var E=v(h.UserError);E.validation=C;E.element=D;throw E}function x(G){var H=G.element;var F=h.locale.errors[G.validation.errorKey];var D=G.validation.validator;var C=f('<div class="error">');C.text(F);C.appendTo(H.parent());H.addClass("invalid");H.bind("change keyup",function E(I){if(D(H)){H.removeClass("invalid");C.remove();H.unbind(I)}})}function B(E,G){var D=false;var C={field:function(H,J,I){I=Array.prototype.slice.call(arguments,2);return z(H,J,I,function K(L){if(!D){L.element.focus()}x(L);D=true;if(h.settings.oneErrorPerForm){throw {stopPulling:true}}})}};try{E(C)}catch(F){if(!F.stopPulling){throw F}}if(!D){G()}}function z(K,F,D,H){var I=K.find(F+" input");if(I.length==0){I=K.find(F+" select")}if(I.length==0){return undefined}var C=I.val();for(var G=0,E=D.length;G<E;++G){var J=D[G];if(!J.validator(I)){H({element:I,validation:J});if(h.settings.oneErrorPerField){break}}}return C}function c(D,C){return{validator:D,errorKey:C||D.defaultErrorKey}}function a(C){var D=C.find(".server_errors");D.removeClass("any").addClass("none");D.empty()}function p(D,H){var F=D.find(".server_errors");a(D);var C=H.length;if(C){F.removeClass("none").addClass("any");for(var G=0;G<C;++G){var E=f('<div class="error">');E.text(H[G]);F.append(E)}}}var j={account:{firstName:".contact_info > .full_name > .first_name > input",lastName:".contact_info > .full_name > .last_name > input",email:".contact_info > .email > input",phone:".contact_info > .phone > input",companyName:".contact_info > .company_name > input"},billingInfo:{firstName:".billing_info > .credit_card > .first_name > input",lastName:".billing_info > .credit_card > .last_name > input",address1:".billing_info > .address > .address1 > input",address2:".billing_info > .address > .address2 > input",country:".billing_info > .address > .country > select",city:".billing_info > .address > .city > input",state:".billing_info > .address > .state_zip > .state > input",zip:".billing_info > .address > .state_zip > .zip > input",vatNumber:".billing_info > .vat_number > input",cardNumber:".billing_info > .credit_card > .card_cvv > .card_number > input",CVV:".billing_info > .credit_card > .card_cvv > .cvv > input"},subscription:{couponCode:".subscription > .coupon > .coupon_code > input",quantity:".subscription > .plan > .quantity > input"}};function o(C,D,F){(function E(H,G,K){if(!H){return}for(var J in H){if(H.hasOwnProperty(J)&&G.hasOwnProperty(J)){var N=H[J];var I=G[J];var O=r(J);var L=K?(K+"."+O):O;if(typeof I=="string"){var M=C.find(I);M.val(N).change()}else{if(typeof I=="object"){E(N,I,L)}}}}})(D,F)}function l(C,D){if(!D.collectPhone){C.find(".phone").remove()}if(!D.collectCompany){C.find(".company_name").remove()}C.delegate(".placeholder","click",function(){var E=f(this);var F=f(this).parent();F.find("input").focus()});C.delegate("input","change keyup init",function(){var F=f(this);var E=f(this).parent();if(F.val().length>0){E.find(".placeholder").css({display:"none"})}else{E.find(".placeholder").css({display:"block"})}});C.delegate("input","focus",function(){f(this).parent().addClass("focus")});C.delegate("input","blur",function(){f(this).parent().removeClass("focus")});C.delegate("input","keydown",function(E){if(E.keyCode>=48&&E.keyCode<=90){f(this).parent().find(".placeholder").hide()}});o(C,D,j)}function g(E,F){if(F.distinguishContactFromBillingInfo){var D=E.find(".contact_info .first_name input");var G=E.find(".contact_info .last_name input");var H=D.val();var C=G.val();E.find(".contact_info .first_name input").change(function(){var I=E.find(".billing_info .first_name input");if(I.val()==H){I.val(f(this).val()).change()}H=D.val()});E.find(".contact_info .last_name input").change(function(){var I=E.find(".billing_info .last_name input");if(I.val()==C){I.val(f(this).val()).change()}C=G.val()})}else{E.find(".billing_info .first_name, .billing_info .last_name").remove()}}function e(M,I){var E=M.find(".country select");var ab=M.find(".state");var af=ab.find("input");var W=ab.children();var R={};var P=h.states;var O=E.val();if(I.acceptedCards&&I.acceptPaypal){var N=M.find(".payment_method");var G=N.find("input");var V=M.find("button.submit");var D=V.text();N.on("click",".payment_option",function(){var ah=f(this);N.find(".selected").removeClass("selected");ah.addClass("selected");N.find("input[type=radio]:checked").prop("checked",false);ah.find("input[type=radio]").prop("checked",true);if(ah.is(".card_option")){M.find(".credit_card").css({display:"block"});M.find(".paypal").css({display:"none"});G.val("");V.text(D)}else{if(ah.is(".paypal_option")){M.find(".credit_card").css({display:"none"});M.find(".paypal").css({display:"block"});G.val("paypal");V.text(D+" with PayPal")}}});M.find(".payment_option").first().click()}else{M.find(".payment_method").removeClass("multiple");if(I.acceptedCards){M.find(".paypal_option").remove();M.find(".paypal").remove()}else{if(I.acceptPaypal){M.find(".payment_method input").val("paypal");M.find(".card_option").remove();M.find(".credit_card").remove()}}}function T(al,aj){var ak=P[al];aj=f.trim(aj.toUpperCase());if(ak.hasOwnProperty(aj)){return aj}for(var ai in ak){if(ak.hasOwnProperty(ai)){var ah=ak[ai];if(aj==ah.toUpperCase()){return ai}}}return false}function ag(ak,ah){var aj=ab.hasClass("select_mode");if(ak=="US"||ak=="CA"){if(!aj||O!=ak){var ai=ab.find("input").val();if(ai!=undefined&&ai!=""){ah=T(ak,ai);if(!ah){return false}}ab.addClass("select_mode");ab.children().detach();R[ak]=R[ak]||k(P[ak]);ab.append(R[ak]);if(ah){ab.find("select").val(ah)}}}else{if(aj){ab.empty().append(W).removeClass("select_mode")}}}af.bind("change keyup",function(){ag(O)});E.change(function(){var ah=f(this).val();ag(ah);O=ah});function K(aj,ah){var ai=aj.val();if(!ah||ah==""){return false}if(ai&&ai!=""&&ai!="-"){return false}return aj.val(ah).change()}if(I.enableGeoIP){f.ajax({url:h.settings.baseURL+"location",dataType:"jsonp",jsonp:"callback",success:function(ah){if(ah.country){K(E,ah.country);ag(ah.country,ah.state)}}})}else{if(h.settings.country){var Y=M.find(".country option[value="+h.settings.country+"]");if(Y.length){Y.attr("selected",true).change()}}}var H=new Date();var Q=H.getFullYear();var ac=H.getMonth();var aa=M.find(".year select");var C=M.find(".month select");for(var X=Q;X<=Q+10;++X){var J=f('<option name="'+X+'">'+X+"</option>");J.appendTo(aa)}aa.val(Q+1);function Z(){if(aa.val()==Q){var ah=false;if(C.val()>ac){ah=true}C.find("option").each(function(){if(f(this).val()<=ac){f(this).attr("disabled",true)}else{f(this).removeAttr("disabled");if(!ah){f(this).attr("selected",true);ah=true}}})}else{C.find("option").removeAttr("disabled")}}Z();aa.change(Z);if(I.addressRequirement=="none"){M.find(".address").remove()}else{if(I.addressRequirement=="zip"){M.find(".address").addClass("only_zip");M.find(".address1, .address2, .city, .state").remove();if(!h.settings.VATPercent){M.find(".country").remove()}}else{if(I.addressRequirement=="zipstreet"){M.find(".address").addClass("only_zipstreet");M.find(".city, .state").remove();if(!h.settings.VATPercent){M.find(".country").remove()}}else{if(I.addressRequirement=="full"){M.find(".address").addClass("full")}else{if(I.addressRequirement=="only_country"){M.find(".address").addClass("only_country")}}}}}var S=M.find(".accepted_cards");if(I.acceptedCards){var ad=I.acceptedCards,U=ad.length;for(var X=0;X<U;++X){var ae=ad[X];var L=f('<div class="card '+ae+'">');var F=h.knownCards[ae];if(F&&F.name){L.text(F.name)}S.append(L)}}M.find(".card_number input").bind("change keyup",function(){var ah=h.detectCardType(f(this).val());if(ah){S.find(".card").each(function(){f(this).toggleClass("match",f(this).hasClass(ah));f(this).toggleClass("no_match",!f(this).hasClass(ah))})}else{S.find(".card").removeClass("match no_match")}})}function i(C,F,D,E){F.firstName=E.field(C,".contact_info .first_name",c(h.isNotEmpty));F.lastName=E.field(C,".contact_info .last_name",c(h.isNotEmpty));F.companyName=E.field(C,".contact_info .company_name");F.email=E.field(C,".email",c(h.isNotEmpty),c(h.isValidEmail));F.code=D.accountCode||(D.account&&(D.account.code||D.account.accountCode))}function d(C,F,D,E){F.paymentMethod=E.field(C,".payment_method");if(F.paymentMethod!=="paypal"){F.firstName=E.field(C,".billing_info .first_name",c(h.isNotEmpty));F.lastName=E.field(C,".billing_info .last_name",c(h.isNotEmpty));F.number=E.field(C,".card_number",c(h.isNotEmpty),c(h.isValidCC));F.cvv=E.field(C,".cvv",c(h.isNotEmpty),c(h.isValidCVV));F.month=E.field(C,".month");F.year=E.field(C,".year")}F.phone=E.field(C,".phone");F.address1=E.field(C,".address1",c(h.isNotEmpty));F.address2=E.field(C,".address2");F.city=E.field(C,".city",c(h.isNotEmpty));F.state=E.field(C,".state",c(h.isNotEmptyState));F.zip=E.field(C,".zip",c(h.isNotEmpty));F.country=E.field(C,".country",c(h.isNotEmpty))}function q(C,F,D,E){var G=E.field(C,".plan .quantity",c(h.isValidQuantity));F.quantity=G||1}function y(C,D){D.field(C,".accept_tos",c(h.isChecked))}h.buildBillingInfoForm=h.buildBillingInfoUpdateForm=function(D){var F={addressRequirement:"full",collectContactInfo:false,distinguishContactFromBillingInfo:true};D.successHandler=D.successHandler||D.afterUpdate;D=f.extend(v(h.settings),F,D);if(!D.accountCode){h.raiseError("accountCode missing")}if(!D.signature){h.raiseError("signature missing")}var G=h.BillingInfo.create(),E=h.Account.create();G.account=E;var C=f(h.dom.update_billing_info_form);if(D.collectContactInfo){C.find(".contact_info").html(h.dom.contact_info_fields)}else{C.find(".contact_info").remove()}C.find(".billing_info").html(h.dom.billing_info_fields);l(C,D);g(C,D);e(C,D);C.submit(function(H){H.preventDefault();a(C);C.find(".error").remove();C.find(".invalid").removeClass("invalid");B(function(I){d(C,G,D,I);i(C,E,D,I)},function(){C.addClass("submitting");var I=C.find("button.submit").text();C.find("button.submit").attr("disabled",true).text("Please Wait");G.save({signature:D.signature,distinguishContactFromBillingInfo:D.distinguishContactFromBillingInfo,accountCode:D.accountCode,success:function(J){if(D.successHandler){D.successHandler(h.getToken(J))}if(D.successURL){var K=D.successURL;h.postResult(K,J,D)}},error:function(J){if(!D.onError||!D.onError(J)){p(C,J)}},complete:function(){C.removeClass("submitting");C.find("button.submit").removeAttr("disabled").text(I)}})})});if(D.beforeInject){D.beforeInject(C.get(0))}f(function(){var H=f(D.target);H.html(C);if(D.afterInject){D.afterInject(C.get(0))}})};function A(C,D){if(D.termsOfServiceURL||D.privacyPolicyURL){var E=C.find(".accept_tos").html(h.dom.terms_of_service);if(!(D.termsOfServiceURL&&D.privacyPolicyURL)){E.find("span.and").remove()}if(D.termsOfServiceURL){E.find("a.tos_link").attr("href",D.termsOfServiceURL)}else{E.find("a.tos_link").remove()}if(D.privacyPolicyURL){E.find("a.pp_link").attr("href",D.privacyPolicyURL)}else{E.find("a.pp_link").remove()}}else{C.find(".accept_tos").remove()}}h.buildTransactionForm=function(D){var F={addressRequirement:"full",distinguishContactFromBillingInfo:true,collectContactInfo:true};D.successHandler=D.successHandler||D.afterPay;D=f.extend(v(h.settings),F,D);if(!D.collectContactInfo&&!D.accountCode){h.raiseError("collectContactInfo is false, but no accountCode provided")}if(!D.signature){h.raiseError("signature missing")}var H=h.BillingInfo.create(),E=h.Account.create(),G=h.Transaction.create();H.account=E;G.account=E;G.billingInfo=H;G.currency=D.currency;G.cost=new h.Cost(D.amountInCents);var C=f(h.dom.one_time_transaction_form);if(D.collectContactInfo){C.find(".contact_info").html(h.dom.contact_info_fields)}else{C.find(".contact_info").remove()}C.find(".billing_info").html(h.dom.billing_info_fields);l(C,D);e(C,D);g(C,D);A(C,D);C.submit(function(I){I.preventDefault();a(C);C.find(".error").remove();C.find(".invalid").removeClass("invalid");B(function(J){i(C,E,D,J);d(C,H,D,J);y(C,J)},function(){C.addClass("submitting");var J=C.find("button.submit").text();C.find("button.submit").attr("disabled",true).text("Please Wait");G.save({signature:D.signature,accountCode:D.accountCode,success:function(K){if(D.successHandler){D.successHandler(h.getToken(K))}if(D.successURL){var L=D.successURL;h.postResult(L,K,D)}},error:function(K){if(!D.onError||!D.onError(K)){p(C,K)}},complete:function(){C.removeClass("submitting");C.find("button.submit").removeAttr("disabled").text(J)}})})});if(D.beforeInject){D.beforeInject(C.get(0))}f(function(){var I=f(D.target);I.html(C);if(D.afterInject){D.afterInject(C.get(0))}})};h.buildSubscriptionForm=function(D){var F={enableAddOns:true,enableCoupons:true,addressRequirement:"full",collectContactInfo:true,distinguishContactFromBillingInfo:false};D.successHandler=D.successHandler||D.afterSubscribe;D=f.extend(v(h.settings),F,D);if(!D.signature){h.raiseError("signature missing")}var C=f(h.dom.subscribe_form);if(D.collectContactInfo){C.find(".contact_info").html(h.dom.contact_info_fields)}else{C.find(".contact_info").remove()}C.find(".billing_info").html(h.dom.billing_info_fields);if(D.planCode){h.Plan.get(D.planCode,D.currency,E)}else{if(D.plan){E(D.plan)}}l(C,D);g(C,D);e(C,D);A(C,D);function E(G){if(D.filterPlan){G=D.filterPlan(G)||G}var V=G.createSubscription(),H=h.Account.create(),O=h.BillingInfo.create();V.account=H;V.billingInfo=O;O.account=H;O.subscription=V;if(D.filterSubscription){V=D.filterSubscription(V)||V}if(!G.displayQuantity){C.find(".plan .quantity").remove()}if(G.setupFee){C.find(".subscription").addClass("with_setup_fee");C.find(".plan .setup_fee .cost").text(""+G.setupFee)}else{C.find(".plan .setup_fee").remove()}if(G.trial){C.find(".subscription").addClass("with_trial");C.find(".plan .free_trial").text("First "+G.trial+" free")}else{C.find(".plan .free_trial").remove()}function M(){var Y=V.calculateTotals();C.find(".plan .recurring_cost .cost").text(""+Y.plan);C.find(".due_now .cost").text(""+Y.stages.now);C.find(".coupon .discount").text(""+(Y.coupon||""));C.find(".vat .cost").text(""+(Y.vat||""));C.find(".add_ons .add_on").each(function(){var Z=f(this).data("add_on");if(f(this).hasClass("selected")){var aa=Y.addOns[Z.code];f(this).find(".cost").text("+ "+aa)}else{f(this).find(".cost").text("+ "+Z.cost)}})}C.find(".plan .quantity input").bind("change keyup",function(){V.plan.quantity=parseInt(f(this).val(),10)||1;M()});C.find(".plan .name").text(G.name);C.find(".plan .recurring_cost .cost").text(""+G.cost);C.find(".plan .recurring_cost .interval").text("every "+G.interval);var K=C.find(".add_ons");if(D.enableAddOns){var S=G.addOns.length;if(S){K.removeClass("none").addClass("any");for(var T=0;T<S;++T){var P=G.addOns[T];var U="add_on add_on_"+P.code+(T%2?" even":" odd");if(T==0){U+=" first"}if(T==S-1){U+=" last"}var J=f('<div class="'+U+'"><div class="name">'+P.name+'</div><div class="field quantity"><div class="placeholder">Qty</div><input type="text" value="1"></div><div class="cost"/></div>');if(!P.displayQuantity){J.find(".quantity").remove()}J.data("add_on",P);J.appendTo(K)}K.delegate(".quantity input","change keyup recalculate",function(ac){var Y=f(this);var Z=Y.closest(".add_on");var ab=Z.data("add_on");var aa=Y.val()===""?1:parseInt(Y.val(),10);V.findAddOnByCode(ab.code).quantity=aa>0?aa:0;M()});K.delegate(".quantity input","blur",function(ab){var Y=f(this);var Z=Y.closest(".add_on");var aa=parseInt(Y.val(),10);if(aa<1){Y.trigger("recalculate")}if(aa===0){Z.trigger("actuate")}});K.bind("selectstart",function(Y){if(f(Y.target).is(".add_on")){Y.preventDefault()}});K.delegate(".add_on","click actuate",function(ac){if(f(ac.target).closest(".quantity").length){return}var aa=!f(this).hasClass("selected");f(this).toggleClass("selected",aa);var ab=f(this).data("add_on");if(aa){var Y=V.redeemAddOn(ab);var Z=f(this).find(".quantity input");var ad=parseInt(Z.val(),10);if(ad<1||isNaN(ad)){ad=1;Z.val(ad)}Y.quantity=ad;Z.focus()}else{V.removeAddOn(ab.code)}M()});K.find("input").trigger("init")}}else{K.remove()}var N=C.find(".coupon");var R=null;function W(){var Y=N.find("input").val();if(Y==R){return}R=Y;if(!Y){N.removeClass("invalid").removeClass("valid");N.find(".description").text("");V.coupon=undefined;M();return}N.addClass("checking");V.getCoupon(Y,function(Z){N.removeClass("checking");V.coupon=Z;N.removeClass("invalid").addClass("valid");N.find(".description").text(Z.description);M()},function(){V.coupon=undefined;N.removeClass("checking");N.removeClass("valid").addClass("invalid");N.find(".description").text(h.locale.errors.invalidCoupon);M()})}if(D.enableCoupons){N.find("input").bind("keyup change",function(Y){});N.find("input").keypress(function(Y){if(Y.charCode==13){Y.preventDefault();W()}});N.find(".check").click(function(){W()});N.find("input").blur(function(){N.find(".check").click()})}else{N.remove()}var I=C.find(".vat");var X=C.find(".vat_number");var Q=X.find("input");I.find(".title").text("VAT at "+h.settings.VATPercent+"%");function L(){var Z=C.find(".country select").val();var ab=h.isVATNumberApplicable(Z);X.toggleClass("applicable",ab);X.toggleClass("inapplicable",!ab);var aa=Q.val();var Y=h.isVATChargeApplicable(Z,aa);I.toggleClass("applicable",Y);I.toggleClass("inapplicable",!Y)}C.find(".country select").change(function(){O.country=f(this).val();M();L()}).change();Q.bind("keyup change",function(){O.vatNumber=f(this).val();M();L()});C.submit(function(Y){Y.preventDefault();a(C);C.find(".error").remove();C.find(".invalid").removeClass("invalid");B(function(Z){q(C,V.plan,D,Z);i(C,H,D,Z);d(C,O,D,Z);y(C,Z)},function(){C.addClass("submitting");var Z=C.find("button.submit").text();C.find("button.submit").attr("disabled",true).text("Please Wait");V.save({signature:D.signature,success:function(aa){if(D.successHandler){D.successHandler(h.getToken(aa))}if(D.successURL){var ab=D.successURL;h.postResult(ab,aa,D)}},error:function(aa){if(!D.onError||!D.onError(aa)){p(C,aa)}},complete:function(){C.removeClass("submitting");C.find("button.submit").removeAttr("disabled").text(Z)}})})});W();M();if(D.beforeInject){D.beforeInject(C.get(0))}f(function(){var Y=f(D.target);Y.html(C);if(D.afterInject){D.afterInject(C.get(0))}})}};h.paypal={start:function(G){var J=window.name;if(J.indexOf("recurly_result")>-1){window.name="";J=""}var H=f.extend(G.data,{post_message:true,referer:window.location.href}),E=G.url+"?"+f.param(H),C=window.open(E,"recurly_paypal","menubar=1,resizable=1");window.popup=C;f(window).on("message",I);var D=setInterval(function(){var L=decodeURIComponent(window.name),M=L.match(/recurly_result=(.*)[&$]?/),K=M&&f.parseJSON(M[1]);if(K){F(K);window.name=J}},1000);function F(K){try{C.close()}finally{G.success(K);G.complete();f(window).unbind("message",I);clearInterval(D)}}function I(M){var L=document.createElement("a");L.href=h.settings.baseURL;var K=L.protocol+"//"+L.host.replace(/:\d+$/,"");if(M.originalEvent.origin==K){F(M.originalEvent.data)}}}};h.states={};h.states.US={"-":"Select State","--":"------------",AL:"Alabama",AK:"Alaska",AS:"American Samoa",AZ:"Arizona",AR:"Arkansas",AA:"Armed Forces Americas",AE:"Armed Forces Europe, Middle East, & Canada",AP:"Armed Forces Pacific",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FM:"Federated States of Micronesia",FL:"Florida",GA:"Georgia",GU:"Guam",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MH:"Marshall Islands",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",MP:"Northern Mariana Islands",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PW:"Palau",PA:"Pennsylvania",PR:"Puerto Rico",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VI:"Virgin Islands",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"};h.states.CA={"-":"Select State","--":"------------",AB:"Alberta",BC:"British Columbia",MB:"Manitoba",NB:"New Brunswick",NL:"Newfoundland",NT:"Northwest Territories",NS:"Nova Scotia",NU:"Nunavut",ON:"Ontario",PE:"Prince Edward Island",QC:"Quebec",SK:"Saskatchewan",YT:"Yukon Territory"};h.dom.contact_info_fields='<div class="title">Contact Info</div><div class="full_name"><div class="field first_name"><div class="placeholder">First Name </div><input type="text"/></div><div class="field last_name"><div class="placeholder">Last Name </div><input type="text"/></div></div><div class="field email"><div class="placeholder">Email </div><input type="text"/></div><div class="field phone"><div class="placeholder">Phone Number</div><input type="text"/></div><div class="field company_name"><div class="placeholder">Company/Organization Name</div><input type="text"/></div>';h.dom.billing_info_fields='<div class="title">Billing Info</div><div class="payment_method multiple"><input type="hidden"/><div class="payment_option card_option selected"><input type="radio" name="payment_method" value=""/><div class="accepted_cards"></div></div><div class="payment_option paypal_option"><input type="radio" name="payment_method" value="paypal"/><div class="logo"></div></div></div><div class="credit_card"><div class="field first_name"><div class="placeholder">First Name</div><input type="text"/></div><div class="field last_name"><div class="placeholder">Last Name</div><input type="text"/></div><div class="card_cvv"><div class="field card_number"><div class="placeholder">Credit Card Number</div><input type="text"/></div><div class="field cvv"><div class="placeholder">CVV </div><input type="text"/></div></div><div class="field expires"><div class="title">Expires</div><div class="month"><select><option value="1">01 - January</option><option value="2">02 - February</option><option value="3">03 - March</option><option value="4">04 - April</option><option value="5">05 - May</option><option value="6">06 - June</option><option value="7">07 - July</option><option value="8">08 - August</option><option value="9">09 - September</option><option value="10">10 - October</option><option value="11">11 - November</option><option value="12">12 - December</option></select></div><div class="year"><select></select></div></div></div><div class="address"><div class="field address1"><div class="placeholder">Address</div><input type="text"/></div><div class="field address2"><div class="placeholder">Apt/Suite</div><input type="text"/></div><div class="field city"><div class="placeholder">City</div><input type="text"/></div><div class="state_zip"><div class="field state"><div class="placeholder">State/Province</div><input type="text"/></div><div class="field zip"><div class="placeholder">Zip/Postal</div><input type="text"/></div></div><div class="field country"><select><option value="-">Select Country</option><option value="-">--------------</option><option value="AF">Afghanistan</option><option value="AL">Albania</option><option value="DZ">Algeria</option><option value="AS">American Samoa</option><option value="AD">Andorra</option><option value="AO">Angola</option><option value="AI">Anguilla</option><option value="AQ">Antarctica</option><option value="AG">Antigua and Barbuda</option><option value="AR">Argentina</option><option value="AM">Armenia</option><option value="AW">Aruba</option><option value="AC">Ascension Island</option><option value="AU">Australia</option><option value="AT">Austria</option><option value="AZ">Azerbaijan</option><option value="BS">Bahamas</option><option value="BH">Bahrain</option><option value="BD">Bangladesh</option><option value="BB">Barbados</option><option value="BE">Belgium</option><option value="BZ">Belize</option><option value="BJ">Benin</option><option value="BM">Bermuda</option><option value="BT">Bhutan</option><option value="BO">Bolivia</option><option value="BA">Bosnia and Herzegovina</option><option value="BW">Botswana</option><option value="BV">Bouvet Island</option><option value="BR">Brazil</option><option value="BQ">British Antarctic Territory</option><option value="IO">British Indian Ocean Territory</option><option value="VG">British Virgin Islands</option><option value="BN">Brunei</option><option value="BG">Bulgaria</option><option value="BF">Burkina Faso</option><option value="BI">Burundi</option><option value="KH">Cambodia</option><option value="CM">Cameroon</option><option value="CA">Canada</option><option value="IC">Canary Islands</option><option value="CT">Canton and Enderbury Islands</option><option value="CV">Cape Verde</option><option value="KY">Cayman Islands</option><option value="CF">Central African Republic</option><option value="EA">Ceuta and Melilla</option><option value="TD">Chad</option><option value="CL">Chile</option><option value="CN">China</option><option value="CX">Christmas Island</option><option value="CP">Clipperton Island</option><option value="CC">Cocos [Keeling] Islands</option><option value="CO">Colombia</option><option value="KM">Comoros</option><option value="CD">Congo [DRC]</option><option value="CK">Cook Islands</option><option value="CR">Costa Rica</option><option value="HR">Croatia</option><option value="CU">Cuba</option><option value="CY">Cyprus</option><option value="CZ">Czech Republic</option><option value="DK">Denmark</option><option value="DG">Diego Garcia</option><option value="DJ">Djibouti</option><option value="DM">Dominica</option><option value="DO">Dominican Republic</option><option value="NQ">Dronning Maud Land</option><option value="TL">East Timor</option><option value="EC">Ecuador</option><option value="EG">Egypt</option><option value="SV">El Salvador</option><option value="EE">Estonia</option><option value="ET">Ethiopia</option><option value="FK">Falkland Islands [Islas Malvinas]</option><option value="FO">Faroe Islands</option><option value="FJ">Fiji</option><option value="FI">Finland</option><option value="FR">France</option><option value="GF">French Guiana</option><option value="PF">French Polynesia</option><option value="TF">French Southern Territories</option><option value="FQ">French Southern and Antarctic Territories</option><option value="GA">Gabon</option><option value="GM">Gambia</option><option value="GE">Georgia</option><option value="DE">Germany</option><option value="GH">Ghana</option><option value="GI">Gibraltar</option><option value="GR">Greece</option><option value="GL">Greenland</option><option value="GD">Grenada</option><option value="GP">Guadeloupe</option><option value="GU">Guam</option><option value="GT">Guatemala</option><option value="GG">Guernsey</option><option value="GW">Guinea-Bissau</option><option value="GY">Guyana</option><option value="HT">Haiti</option><option value="HM">Heard Island and McDonald Islands</option><option value="HN">Honduras</option><option value="HK">Hong Kong</option><option value="HU">Hungary</option><option value="IS">Iceland</option><option value="IN">India</option><option value="ID">Indonesia</option><option value="IE">Ireland</option><option value="IM">Isle of Man</option><option value="IL">Israel</option><option value="IT">Italy</option><option value="JM">Jamaica</option><option value="JP">Japan</option><option value="JE">Jersey</option><option value="JT">Johnston Island</option><option value="JO">Jordan</option><option value="KZ">Kazakhstan</option><option value="KE">Kenya</option><option value="KI">Kiribati</option><option value="KW">Kuwait</option><option value="KG">Kyrgyzstan</option><option value="LA">Laos</option><option value="LV">Latvia</option><option value="LS">Lesotho</option><option value="LY">Libya</option><option value="LI">Liechtenstein</option><option value="LT">Lithuania</option><option value="LU">Luxembourg</option><option value="MO">Macau</option><option value="MK">Macedonia [FYROM]</option><option value="MG">Madagascar</option><option value="MW">Malawi</option><option value="MY">Malaysia</option><option value="MV">Maldives</option><option value="ML">Mali</option><option value="MT">Malta</option><option value="MH">Marshall Islands</option><option value="MQ">Martinique</option><option value="MR">Mauritania</option><option value="MU">Mauritius</option><option value="YT">Mayotte</option><option value="FX">Metropolitan France</option><option value="MX">Mexico</option><option value="FM">Micronesia</option><option value="MI">Midway Islands</option><option value="MD">Moldova</option><option value="MC">Monaco</option><option value="MN">Mongolia</option><option value="ME">Montenegro</option><option value="MS">Montserrat</option><option value="MA">Morocco</option><option value="MZ">Mozambique</option><option value="NA">Namibia</option><option value="NR">Nauru</option><option value="NP">Nepal</option><option value="NL">Netherlands</option><option value="AN">Netherlands Antilles</option><option value="NT">Neutral Zone</option><option value="NC">New Caledonia</option><option value="NZ">New Zealand</option><option value="NI">Nicaragua</option><option value="NE">Niger</option><option value="NG">Nigeria</option><option value="NU">Niue</option><option value="NF">Norfolk Island</option><option value="VD">North Vietnam</option><option value="MP">Northern Mariana Islands</option><option value="NO">Norway</option><option value="OM">Oman</option><option value="QO">Outlying Oceania</option><option value="PC">Pacific Islands Trust Territory</option><option value="PK">Pakistan</option><option value="PW">Palau</option><option value="PS">Palestinian Territories</option><option value="PA">Panama</option><option value="PZ">Panama Canal Zone</option><option value="PY">Paraguay</option><option value="YD">People\'s Democratic Republic of Yemen</option><option value="PE">Peru</option><option value="PH">Philippines</option><option value="PN">Pitcairn Islands</option><option value="PL">Poland</option><option value="PT">Portugal</option><option value="PR">Puerto Rico</option><option value="QA">Qatar</option><option value="RO">Romania</option><option value="RU">Russia</option><option value="RW">Rwanda</option><option value="RE">R\u00e9union</option><option value="BL">Saint Barth\u00e9lemy</option><option value="SH">Saint Helena</option><option value="KN">Saint Kitts and Nevis</option><option value="LC">Saint Lucia</option><option value="MF">Saint Martin</option><option value="PM">Saint Pierre and Miquelon</option><option value="VC">Saint Vincent and the Grenadines</option><option value="WS">Samoa</option><option value="SM">San Marino</option><option value="SA">Saudi Arabia</option><option value="SN">Senegal</option><option value="RS">Serbia</option><option value="CS">Serbia and Montenegro</option><option value="SC">Seychelles</option><option value="SL">Sierra Leone</option><option value="SG">Singapore</option><option value="SK">Slovakia</option><option value="SI">Slovenia</option><option value="SB">Solomon Islands</option><option value="ZA">South Africa</option><option value="GS">South Georgia and the South Sandwich Islands</option><option value="KR">South Korea</option><option value="ES">Spain</option><option value="LK">Sri Lanka</option><option value="SR">Suriname</option><option value="SJ">Svalbard and Jan Mayen</option><option value="SZ">Swaziland</option><option value="SE">Sweden</option><option value="CH">Switzerland</option><option value="ST">S\u00e3o Tom\u00e9 and Pr\u00edncipe</option><option value="TW">Taiwan</option><option value="TJ">Tajikistan</option><option value="TZ">Tanzania</option><option value="TH">Thailand</option><option value="TG">Togo</option><option value="TK">Tokelau</option><option value="TO">Tonga</option><option value="TT">Trinidad and Tobago</option><option value="TA">Tristan da Cunha</option><option value="TN">Tunisia</option><option value="TR">Turkey</option><option value="TM">Turkmenistan</option><option value="TC">Turks and Caicos Islands</option><option value="TV">Tuvalu</option><option value="UM">U.S. Minor Outlying Islands</option><option value="PU">U.S. Miscellaneous Pacific Islands</option><option value="VI">U.S. Virgin Islands</option><option value="UG">Uganda</option><option value="UA">Ukraine</option><option value="AE">United Arab Emirates</option><option value="GB">United Kingdom</option><option value="US">United States</option><option value="UY">Uruguay</option><option value="UZ">Uzbekistan</option><option value="VU">Vanuatu</option><option value="VA">Vatican City</option><option value="VE">Venezuela</option><option value="VN">Vietnam</option><option value="WK">Wake Island</option><option value="WF">Wallis and Futuna</option><option value="EH">Western Sahara</option><option value="YE">Yemen</option><option value="ZM">Zambia</option><option value="AX">\u00c5land Islands</option></select></div></div><div class="field vat_number"><div class="placeholder">VAT Number</div><input type="text"/></div><div class="paypal"><div class="paypal_message">You will be taken to PayPal to authorize a billing agreement.<br><br>Please make sure pop-ups aren\'t blocked.</div></div>';h.dom.subscribe_form='<form class="recurly subscribe"><!--[if lt IE 7]><div class="iefail"><div class="chromeframe"><p class="blast">Your browser is not supported by Recurly.js.</p><p><a href="http://browsehappy.com/">Upgrade to a different browser</a></p><p>or</p><p><a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a></p><p>to use this site.</p></div></div><![endif]--><div class="subscription"><div class="plan"><div class="name"></div><div class="field quantity"><div class="placeholder">Qty</div><input type="text"/></div><div class="recurring_cost"><div class="cost"></div><div class="interval"></div></div><div class="free_trial"></div><div class="setup_fee"><div class="title">Setup Fee</div><div class="cost"></div></div></div><div class="add_ons none"></div><div class="coupon"><div class="coupon_code field"><div class="placeholder">Coupon Code</div><input type="text" class="coupon_code"/></div><div class="check"></div><div class="description"></div><div class="discount"></div></div><div class="vat"><div class="title">VAT</div><div class="cost"></div></div></div><div class="due_now"><div class="title">Order Total</div><div class="cost"></div></div><div class="server_errors none"></div><div class="contact_info"></div><div class="billing_info"></div><div class="accept_tos"></div><div class="footer"><button type="submit" class="submit">Subscribe</button></div></form>';h.dom.update_billing_info_form='<form class="recurly update_billing_info"><div class="server_errors none"></div><div class="contact_info"></div><div class="billing_info"></div><div class="footer"><button type="submit" class="submit">Update</button></div></form>';h.dom.one_time_transaction_form='<form class="recurly update_billing_info"><div class="server_errors none"></div><div class="contact_info"></div><div class="billing_info"></div><div class="accept_tos"></div><div class="footer"><button type="submit" class="submit">Pay</button></div></form>';h.dom.terms_of_service='<input id="tos_check" type="checkbox"/><label id="accept_tos" for="tos_check">I accept the <a target="_blank" class="tos_link">Terms of Service</a><span class="and"> and </span><a target="_blank" class="pp_link">Privacy Policy</a></label>';window.Recurly=h})(jQuery); |