Skip to content
Browse files

bump version

  • Loading branch information...
1 parent 35f3648 commit 2a76407c72a55324234880222586641a9cf430c4 @em em committed Jan 31, 2012
Showing with 9 additions and 5 deletions.
  1. +1 −1 bin/compile.js
  2. +2 −2 build/recurly.js
  3. +1 −1 build/recurly.min.js
  4. +4 −0 changelog.md
  5. +1 −1 version
View
2 bin/compile.js
@@ -21,7 +21,7 @@ var VERSION = '0';
async.series([prepare].concat(headerPart).concat(argParts).concat(footerPart));
function prepare(done) {
- VERSION = fs.readFileSync('version');
+ VERSION = fs.readFileSync('version').toString().trim();
done();
}
View
4 build/recurly.js
@@ -1,4 +1,4 @@
-// Recurly.js - v2.0.0
+// Recurly.js - v2.0.1
//
// Communicates with Recurly <https://recurly.com> via a JSONP API,
// generates UI, handles user error, and passes control to the client
@@ -50,7 +50,7 @@ R.settings = {
, oneErrorPerField: true
};
-R.version = '2.0.0';
+R.version = '2.0.1';
R.dom = {};
View
2 build/recurly.min.js
@@ -1 +1 @@
-(function(f){function t(B){function A(){}A.prototype=B||this;return new A()}var h={};h.settings={enableGeoIP:true,acceptedCards:["american_express","discover","mastercard","visa"],oneErrorPerField:true};h.version="2.0.0";h.dom={};h.Error={toString:function(){return"RecurlyJS Error: "+this.message}};h.raiseError=function(A){var B=t(h.Error);B.message=A;throw B};h.config=function(A){f.extend(true,h.settings,A);if(!A.baseURL){h.settings.baseURL="https://api.recurly.com/jsonp/";var B=h.settings.subdomain||h.raiseError("company subdomain not configured");h.settings.baseURL+=B+"/"}};function s(B,A){if(B==1){return A.substr(0,A.length-1)}return""+B+" "+A}(h.Cost=function(A){this._cents=A||0}).prototype={toString:function(){return h.formatCurrency(this.dollars())},cents:function(A){if(A===undefined){return this._cents}return new Cost(A)},dollars:function(A){if(A===undefined){return this._cents/100}return new h.Cost(A*100)},mult:function(A){return new h.Cost(this._cents*A)},add:function(A){if(A.cents){A=A.cents()}return new h.Cost(this._cents+A)},sub:function(A){if(A.cents){A=A.cents()}return new h.Cost(this._cents-A)}};h.Cost.FREE=new h.Cost(0);(h.TimePeriod=function(B,A){this.length=B;this.unit=A}).prototype={toString:function(){return""+s(this.length,this.unit)},toDate:function(){var A=new Date();switch(this.unit){case"month":A.setMonth(A.getMonth()+this.length);break;case"day":A.setDay(A.getDay()+this.length);break}return A},clone:function(){return new h.TimePeriod(this.length,this.unit)}};(h.RecurringCost=function(B,A){this.cost=B;this.interval=A}).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(A,B){this.recurringCost=A;this.duration=B}).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 q(A,B){var D=h.locale.currencies[A]=t(h.locale.currency);for(var C in B){D[C]=B[C]}}q("USD",{symbol:"$"});q("AUD",{symbol:"$"});q("CAD",{symbol:"$"});q("EUR",{symbol:"\u20ac"});q("GBP",{symbol:"\u00a3"});q("CZK",{symbol:"\u004b"});q("DKK",{symbol:"\u006b\u0072"});q("HUF",{symbol:"Ft"});q("JPY",{symbol:"\u00a5"});q("NOK",{symbol:"kr"});q("NZD",{symbol:"$"});q("PLN",{symbol:"\u007a"});q("SGD",{symbol:"$"});q("SEK",{symbol:"kr"});q("CHF",{symbol:"Fr"});q("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"},solo:{prefixes:[6334,6767],name:"Solo"},"switch":{prefixes:[4903,4905,4911,4936,564182,633110,6333,6759],name:"Switch"},maestro:{prefixes:[5018,5020,5038,6304,6759,6761],name:"Maestro"},visa_electron:{prefixes:[417500,4917,4913,4508,4844],name:"Visa Electron"},laser:{prefixes:[6304,6706,6771,6709],name:"Laser"}};h.detectCardType=function(C){C=C.replace(/\D/g,"");var F=h.knownCards;for(var A in F){if(F.hasOwnProperty(A)){var G=F[A];for(var E=0,B=G.prefixes.length;E<B;++E){if(G.prefixes.hasOwnProperty(E)){var D=G.prefixes[E];if(new RegExp("^"+D.toString()).test(C)){return A}}}}}return false};h.formatCurrency=function(D,H){if(D<0){D=-D;var C=true}else{var C=false}H=H||h.settings.currency||h.raiseError("currency not configured");var G=h.locale.currency;var B=h.locale.currencies[H];var F=D.toFixed(B.precision);if(G.separator!="."){F=F.replace(/\./g,G.separator)}function A(J){var I=new RegExp("(-?[0-9]+)([0-9]{3})");while(I.test(J)){J=J.replace(I,"$1"+G.delimiter+"$2")}return J}F=A(F);var E=G.format;E=E.replace(/%u/g,B.symbol);E=E.replace(/%n/g,F);F=E;if(C){F="-"+F}return F};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(A){return f.inArray(A,m)!==-1};h.isVATNumberApplicable=function(B,A){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(B)){return false}return true};h.isVATChargeApplicable=function(B,C){if(!h.isVATNumberApplicable(B)){return false}var A=h.settings.country;return(A==B||!C)};h.flattenErrors=function(H,B){var A=[];var E=["base","account_id"];var B=B||"";if(typeof H=="string"||typeof H=="number"||typeof H=="boolean"){if(f.inArray(E,B)){return[H]}return[""+B+" "+H]}for(var D in H){if(H.hasOwnProperty(D)){B=(parseInt(D).toString()==D)?B:D;var G=h.flattenErrors(H[D],B);for(var F=0,C=G.length;F<C;++F){A.push(G[F])}}}return A};h.replaceVars=function(D,C){for(var B in C){if(C.hasOwnProperty(B)){var A=encodeURIComponent(C[B]);D=D.replace(new RegExp("\\{"+B+"\\}","g"),A)}}return D};h.post=function(B,F,A){var C=A.resultNamespace||"recurly_result";var G={};G[C]=F;F=G;var D=f("<form />").hide();D.attr("action",B).attr("method","POST").attr("enctype","application/x-www-form-urlencoded");function E(I,L,K){var H=(K.length>0?(K+"["+I+"]"):I);if(typeof L==="object"){for(var J in L){if(L.hasOwnProperty(J)){E(J,L[J],H)}}}else{f('<input type="hidden" />').attr({name:H,value:L}).appendTo(D)}}E("",F,"");f("body").append(D);D.submit()};function k(D){var C=f("<select>");for(var B in D){if(D.hasOwnProperty(B)){var A=D[B];C.append("<option value="+B+">"+A+"</option>")}}return C}h.enforce=function(A){return{enforced:A,hidden:false,hide:function(){this.hidden=true;return this}}};function p(B){B=B||this;if(typeof B=="string"){return B.replace(/([a-z])([A-Z])/g,function(D,C,E){return C+"_"+E}).toLowerCase()}else{for(var A in B){if(B.hasOwnProperty(A)){}}}}h.ajax=function(A){A.data=f.extend({js_version:h.version},A.data);return f.ajax(A)};function u(A){f("body").append(h.dom.error_dialog)}(h.isValidCC=function(G){var B=G.val();B=B.replace(/\D/g,"");if(B==""){return false}var E=0,D=0,A=false;for(var F=B.length-1;F>=0;F--){var C=B.charAt(F);var D=parseInt(C,10);if(A){if((D*=2)>9){D-=9}}E+=D;A=!A}return(E%10)==0}).defaultErrorKey="invalidCC";(h.isValidEmail=function(B){var A=B.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(A)}).defaultErrorKey="invalidEmail";function b(A){return/^[0-9]+$/.test(A)}(h.isValidCVV=function(B){var A=B.val();return(A.length==3||A.length==4)&&b(A)}).defaultErrorKey="invalidCVV";(h.isNotEmpty=function(B){var A=B.val();if(B.is("select")){if(A=="-"||A=="--"){return false}}return !!A}).defaultErrorKey="emptyField";(h.isChecked=function(A){return A.is(":checked")}).defaultErrorKey="acceptTOS";(h.isValidQuantity=function(A){return/^[0-9]*$/.test(A.val())}).defaultErrorKey="invalidQuantity";h.Plan={create:t,fromJSON:function(D){var E=this.create();E.name=D.name;E.code=D.plan_code;E.cost=new h.Cost(D.unit_amount_in_cents);E.displayQuantity=D.display_quantity;E.interval=new h.TimePeriod(D.plan_interval_length,D.plan_interval_unit);if(D.trial_interval_length){E.trial=new h.TimePeriod(D.trial_interval_length,D.trial_interval_unit)}if(D.setup_fee_in_cents){E.setupFee=new h.Cost(D.setup_fee_in_cents)}E.addOns=[];if(D.add_ons){for(var B=D.add_ons.length,C=0;C<B;++C){var A=D.add_ons[C];E.addOns.push(h.AddOn.fromJSON(A))}}return E},get:function(A,B){f.ajax({url:h.settings.baseURL+"plans/"+A,dataType:"jsonp",jsonp:"callback",timeout:10000,success:function(C){var D=h.Plan.fromJSON(C);B(D)}})},createSubscription:function(){var A=t(h.Subscription);A.plan=t(this);A.plan.quantity=1;A.addOns=[];return A}};h.AddOn={fromJSON:function(B){var A=t(h.AddOn);A.name=B.name;A.code=B.add_on_code;A.cost=new h.Cost(B.default_unit_amount_in_cents);A.displayQuantity=B.display_quantity;return A},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:t,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:t,toJSON:function(){return{first_name:this.firstName,last_name:this.lastName,month:this.month,year:this.year,number:this.number,verification_value:this.cvv,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}},save:function(A){var B={billing_info:this.toJSON(),signature:A.signature};if(!A.distinguishContactFromBillingInfo){B.account={account_code:A.accountCode,first_name:this.firstName,last_name:this.lastName}}h.ajax({url:h.settings.baseURL+"accounts/"+A.accountCode+"/billing_info/update",data:B,dataType:"jsonp",jsonp:"callback",timeout:60000,success:function(C){if(C.success&&A.success){A.success(C.success)}else{if(C.errors&&A.error){A.error(h.flattenErrors(C.errors))}}},error:function(){if(A.error){A.error(["Unknown error processing transaction. Please try again later."])}},complete:A.complete||f.noop})}};h.Subscription={create:t,plan:h.Plan,addOns:[],calculateTotals:function(){var D={stages:{}};D.plan=this.plan.cost.mult(this.plan.quantity);D.allAddOns=new h.Cost(0);D.addOns={};for(var B=this.addOns.length,C=0;C<B;++C){var A=this.addOns[C],G=A.cost.mult(A.quantity);D.addOns[A.code]=G;D.allAddOns=D.allAddOns.add(G)}D.stages.recurring=D.plan.add(D.allAddOns);D.stages.now=D.plan.add(D.allAddOns);if(this.plan.trial){D.stages.now=h.Cost.FREE}if(this.coupon){var E=D.stages.now;var F=D.stages.now.discount(this.coupon);D.coupon=F.sub(E);D.stages.now=F}if(this.plan.setupFee){D.stages.now=D.stages.now.add(this.plan.setupFee)}if(this.billingInfo&&h.isVATChargeApplicable(this.billingInfo.country,this.billingInfo.vatNumber)){D.vat=D.stages.now.mult((h.settings.VATPercent/100));D.stages.now=D.stages.now.add(D.vat)}return D},redeemAddOn:function(B){var A=B.createRedemption();this.addOns.push(A);return A},removeAddOn:function(D){for(var B=this.addOns,A=B.length,C=0;C<A;++C){if(B[C].code==D){return B.splice(C,1)}}},findAddOnByCode:function(C){for(var A=this.addOns.length,B=0;B<A;++B){if(this.addOns[B].code==C){return this.addOns[B]}}return false},toJSON:function(){var E={plan_code:this.plan.code,quantity:this.plan.quantity,coupon_code:this.coupon?this.coupon.code:undefined,add_ons:[]};for(var D=0,C=this.addOns.length,B=E.add_ons,A=this.addOns;D<C;++D){B.push({add_on_code:A[D].code,quantity:A[D].quantity})}return E},save:function(A){var B={subscription:this.toJSON(),account:this.account.toJSON(),billing_info:this.billingInfo.toJSON(),signature:A.signature};h.ajax({url:h.settings.baseURL+"subscribe",data:B,dataType:"jsonp",jsonp:"callback",timeout:60000,success:function(C){if(C.success&&A.success){A.success(C.success)}else{if(C.errors&&A.error){var D=C.errors.error_code;delete C.errors.error_code;A.error(h.flattenErrors(C.errors),D)}}},error:function(){if(A.error){A.error(["Unknown error processing transaction. Please try again later."])}},complete:A.complete})}};h.AddOn.createRedemption=function(B){var A=t(this);A.quantity=B||1;return A};h.Coupon={fromJSON:function(A){var B=t(h.Coupon);if(A.discount_in_cents){B.discountCost=new h.Cost(-A.discount_in_cents)}else{if(A.discount_percent){B.discountRatio=A.discount_percent/100}}B.description=A.description;return B},toJSON:function(){}};h.Cost.prototype.discount=function(A){if(A.discountCost){return this.add(A.discountCost)}var B=this.sub(this.mult(A.discountRatio));if(B.cents()<0){return h.Cost.FREE}return B};h.Subscription.getCoupon=function(C,A,B){if(!h.settings.baseURL){h.raiseError("Company subdomain not configured")}return h.ajax({url:h.settings.baseURL+"plans/"+this.plan.code+"/coupons/"+C,dataType:"jsonp",jsonp:"callback",timeout:10000,success:function(E){if(E.valid){var D=h.Coupon.fromJSON(E);D.code=C;A(D)}else{B()}},error:function(){B()}})};h.Transaction={toJSON:function(){return{currency:this.currency,amount_in_cents:this.cost.cents(),description:this.description,accounting_code:this.accountingCode}},create:t,save:function(A){var B={transaction:this.toJSON(),account:this.account?this.account.toJSON():undefined,billing_info:this.billingInfo.toJSON(),signature:A.signature};h.ajax({url:h.settings.baseURL+"transactions/create",data:B,dataType:"jsonp",jsonp:"callback",timeout:60000,success:function(C){if(C.success&&A.success){A.success(C.success)}else{if(C.errors&&A.error){A.error(h.flattenErrors(C.errors))}}},error:function(){if(A.error){A.error(["Unknown error processing transaction. Please try again later."])}},complete:A.complete||f.noop})}};h.UserError={};function r(A,B){var C=t(h.UserError);C.validation=A;C.element=B;throw C}function v(E){var F=E.element;var D=h.locale.errors[E.validation.errorKey];var B=E.validation.validator;var A=f('<div class="error">');A.text(D);A.appendTo(F.parent());F.addClass("invalid");F.bind("change keyup",function C(G){if(B(F)){F.removeClass("invalid");A.remove();F.unbind(G)}})}function z(C,E){var B=false;var A={field:function(F,H,G){G=Array.prototype.slice.call(arguments,2);return x(F,H,G,function I(J){if(!B){J.element.focus()}v(J);B=true;if(h.settings.oneErrorPerForm){throw {stopPulling:true}}})}};try{C(A)}catch(D){if(!D.stopPulling){throw D}}if(!B){E()}}function x(I,D,B,F){var G=I.find(D+" input");if(G.length==0){G=I.find(D+" select")}if(G.length==0){return undefined}var A=G.val();for(var E=0,C=B.length;E<C;++E){var H=B[E];if(!H.validator(G)){F({element:G,validation:H});if(h.settings.oneErrorPerField){break}}}return A}function c(B,A){return{validator:B,errorKey:A||B.defaultErrorKey}}function a(A){var B=A.find(".server_errors");B.removeClass("any").addClass("none");B.empty()}function o(B,F){var D=B.find(".server_errors");a(B);var A=F.length;if(A){D.removeClass("none").addClass("any");for(var E=0;E<A;++E){var C=f('<div class="error">');C.text(F[E]);D.append(C)}}}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 .card_number > input",CVV:".billing_info .cvv > input"}};function n(A,B,D){(function C(F,E,I){if(!F){return}for(var H in F){if(F.hasOwnProperty(H)&&E.hasOwnProperty(H)){var L=F[H];var G=E[H];var M=p(H);var J=I?(I+"."+M):M;if(typeof G=="string"){var K=A.find(G);K.val(L).change();if(B.signature.match("\\+"+J+"[+$]")){K.attr("disabled",true).addClass("signed")}}else{if(typeof G=="object"){C(L,G,J)}}}}})(B,D)}function l(A,B){if(!B.collectPhone){A.find(".phone").remove()}if(!B.collectCompany){A.find(".company_name").remove()}A.delegate(".placeholder","click",function(){var C=f(this);var D=f(this).parent();D.find("input").focus()});A.delegate("input","change keyup",function(){var D=f(this);var C=f(this).parent();if(D.val().length>0){C.find(".placeholder").hide()}else{C.find(".placeholder").show()}});A.delegate("input","focus",function(){f(this).parent().addClass("focus")});A.delegate("input","blur",function(){f(this).parent().removeClass("focus")});A.delegate("input","keydown",function(C){if(C.keyCode>=48&&C.keyCode<=90){f(this).parent().find(".placeholder").hide()}});n(A,B,j)}function g(C,D){if(D.distinguishContactFromBillingInfo){var B=C.find(".contact_info .first_name input");var E=C.find(".contact_info .last_name input");var F=B.val();var A=E.val();C.find(".contact_info .first_name input").change(function(){var G=C.find(".billing_info .first_name input");if(G.val()==F){G.val(f(this).val()).change()}F=B.val()});C.find(".contact_info .last_name input").change(function(){var G=C.find(".billing_info .last_name input");if(G.val()==A){G.val(f(this).val()).change()}A=E.val()})}else{C.find(".billing_info .first_name, .billing_info .last_name").remove()}}function e(I,E){var B=I.find(".country select");var V=I.find(".state");var Z=V.find("input");var Q=V.children();var M={};var K=h.states;var J=B.val();function O(af,ad){var ae=K[af];ad=ad.toUpperCase().trim();if(ae.hasOwnProperty(ad)){return ad}for(var ac in ae){if(ae.hasOwnProperty(ac)){var ab=ae[ac];if(ad==ab.toUpperCase()){return ac}}}return false}function aa(ae,ab){var ad=V.hasClass("select_mode");if(ae=="US"||ae=="CA"){if(!ad||J!=ae){var ac=V.find("input").val();if(ac!=undefined&&ac!=""){ab=O(ae,ac);if(!ab){return false}}V.addClass("select_mode");V.children().detach();M[ae]=M[ae]||k(K[ae]);V.append(M[ae]);if(ab){V.find("select").val(ab)}}}else{if(ad){V.empty().append(Q).removeClass("select_mode")}}}Z.bind("change keyup",function(){aa(J)});B.change(function(){var ab=f(this).val();aa(ab);J=ab});function G(ad,ab){var ac=ad.val();if(!ab||ab==""){return false}if(ac&&ac!=""&&ac!="-"){return false}return ad.val(ab)}if(E.enableGeoIP){f.ajax({url:h.settings.baseURL+"location",dataType:"jsonp",jsonp:"callback",success:function(ab){if(ab.country){G(B,ab.country);aa(ab.country,ab.state)}}})}else{if(h.settings.country){var S=I.find(".country option[value="+h.settings.country+"]");if(S.length){S.attr("selected",true).change()}}}var D=new Date();var L=D.getFullYear();var W=D.getMonth();var U=I.find(".year select");var A=I.find(".month select");for(var R=L;R<=L+10;++R){var F=f('<option name="'+R+'">'+R+"</option>");F.appendTo(U)}U.val(L+1);function T(){if(U.val()==L){var ab=false;if(A.val()>W){ab=true}A.find("option").each(function(){if(f(this).val()<=W){f(this).attr("disabled",true)}else{f(this).removeAttr("disabled");if(!ab){f(this).attr("selected",true);ab=true}}})}else{A.find("option").removeAttr("disabled")}}T();U.change(T);if(E.addressRequirement=="none"){I.find(".address").remove()}else{if(E.addressRequirement=="zip"){I.find(".address").addClass("only_zip");I.find(".address1, .address2, .city, .state").remove();if(!h.settings.VATPercent){I.find(".country").remove()}}else{if(E.addressRequirement=="zipstreet"){I.find(".address").addClass("only_zipstreet");I.find(".city, .state").remove();if(!h.settings.VATPercent){I.find(".country").remove()}}else{if(E.addressRequirement=="full"){I.find(".address").addClass("full")}}}}var N=I.find(".accepted_cards");if(E.acceptedCards){var X=E.acceptedCards,P=X.length;for(var R=0;R<P;++R){var Y=X[R];var H=f('<div class="card '+Y+'">');var C=h.knownCards[Y];if(C&&C.name){H.text(C.name)}N.append(H)}}I.find(".card_number input").bind("change keyup",function(){var ab=h.detectCardType(f(this).val());if(ab){N.find(".card").each(function(){f(this).toggleClass("match",f(this).hasClass(ab));f(this).toggleClass("no_match",!f(this).hasClass(ab))})}else{N.find(".card").removeClass("match no_match")}})}function i(A,D,B,C){D.firstName=C.field(A,".contact_info .first_name",c(h.isNotEmpty));D.lastName=C.field(A,".contact_info .last_name",c(h.isNotEmpty));D.companyName=C.field(A,".contact_info .company_name");D.email=C.field(A,".email",c(h.isNotEmpty),c(h.isValidEmail));D.code=B.accountCode}function d(A,D,B,C){D.firstName=C.field(A,".billing_info .first_name",c(h.isNotEmpty));D.lastName=C.field(A,".billing_info .last_name",c(h.isNotEmpty));D.number=C.field(A,".card_number",c(h.isNotEmpty),c(h.isValidCC));D.cvv=C.field(A,".cvv",c(h.isNotEmpty),c(h.isValidCVV));D.month=C.field(A,".month");D.year=C.field(A,".year");D.phone=C.field(A,".phone");D.address1=C.field(A,".address1",c(h.isNotEmpty));D.address2=C.field(A,".address2");D.city=C.field(A,".city",c(h.isNotEmpty));D.state=C.field(A,".state",c(h.isNotEmpty));D.zip=C.field(A,".zip",c(h.isNotEmpty));D.country=C.field(A,".country",c(h.isNotEmpty))}function w(A,B){B.field(A,".accept_tos",c(h.isChecked))}h.buildBillingInfoUpdateForm=h.buildBillingInfoForm=function(B){var C={addressRequirement:"full",distinguishContactFromBillingInfo:true};B=f.extend(t(h.settings),C,B);if(!B.accountCode){h.raiseError("accountCode missing")}if(!B.signature){h.raiseError("signature missing")}var D=h.BillingInfo.create();var A=f(h.dom.update_billing_info_form);A.find(".billing_info").html(h.dom.billing_info_fields);l(A,B);e(A,B);A.submit(function(E){E.preventDefault();a(A);A.find(".error").remove();A.find(".invalid").removeClass("invalid");z(function(F){d(A,D,B,F)},function(){A.addClass("submitting");A.find("button.submit").attr("disabled",true).text("Please Wait");D.save({signature:B.signature,distinguishContactFromBillingInfo:B.distinguishContactFromBillingInfo,accountCode:B.accountCode,success:function(F){if(B.afterUpdate){B.afterUpdate(F)}if(B.successURL){var G=B.successURL;h.post(G,F,B)}},error:function(F){if(!B.onError||!B.onError(F)){o(A,F)}},complete:function(){A.removeClass("submitting");A.find("button.submit").removeAttr("disabled").text("Update")}})})});if(B.beforeInject){B.beforeInject(A.get(0))}f(function(){var E=f(B.target);E.html(A);if(B.afterInject){B.afterInject(A.get(0))}})};function y(A,B){if(B.termsOfServiceURL||B.privacyPolicyURL){var C=A.find(".accept_tos").html(h.dom.terms_of_service);if(!(B.termsOfServiceURL&&B.privacyPolicyURL)){C.find("span.and").remove()}if(B.termsOfServiceURL){C.find("a.tos_link").attr("href",B.termsOfServiceURL)}else{C.find("a.tos_link").remove()}if(B.privacyPolicyURL){C.find("a.pp_link").attr("href",B.privacyPolicyURL)}else{C.find("a.pp_link").remove()}}else{A.find(".accept_tos").remove()}}h.buildTransactionForm=function(B){var D={addressRequirement:"full",distinguishContactFromBillingInfo:true,collectContactInfo:true};B=f.extend(t(h.settings),D,B);if(!B.collectContactInfo&&!B.accountCode){h.raiseError("collectContactInfo is false, but no accountCode provided")}if(!B.signature){h.raiseError("signature missing")}var F=h.BillingInfo.create(),C=h.Account.create(),E=h.Transaction.create();E.account=C;E.billingInfo=F;E.currency=B.currency;E.description=B.description;E.accountingCode=B.accountingCode;E.cost=new h.Cost(B.amountInCents);var A=f(h.dom.one_time_transaction_form);A.find(".billing_info").html(h.dom.billing_info_fields);if(B.collectContactInfo){A.find(".contact_info").html(h.dom.contact_info_fields)}else{A.find(".contact_info").remove()}l(A,B);g(A,B);e(A,B);y(A,B);A.submit(function(G){G.preventDefault();a(A);A.find(".error").remove();A.find(".invalid").removeClass("invalid");z(function(H){i(A,C,B,H);d(A,F,B,H);w(A,H)},function(){A.addClass("submitting");A.find("button.submit").attr("disabled",true).text("Please Wait");E.save({signature:B.signature,accountCode:B.accountCode,success:function(H){if(B.afterPay){B.afterPay(H)}if(B.successURL){var I=B.successURL;h.post(I,H,B)}},error:function(H){if(!B.onError||!B.onError(H)){o(A,H)}},complete:function(){A.removeClass("submitting");A.find("button.submit").removeAttr("disabled").text("Pay")}})})});if(B.beforeInject){B.beforeInject(A.get(0))}f(function(){var G=f(B.target);G.html(A);if(B.afterInject){B.afterInject(A.get(0))}})};h.buildSubscriptionForm=function(B){var D={enableAddOns:true,enableCoupons:true,addressRequirement:"full",distinguishContactFromBillingInfo:false};B=f.extend(t(h.settings),D,B);if(!B.signature){h.raiseError("signature missing")}var A=f(h.dom.subscribe_form);A.find(".contact_info").html(h.dom.contact_info_fields);A.find(".billing_info").html(h.dom.billing_info_fields);l(A,B);g(A,B);e(A,B);y(A,B);if(B.planCode){h.Plan.get(B.planCode,C)}else{if(B.plan){C(B.plan)}}function C(E){if(B.filterPlan){E=B.filterPlan(E)||E}var T=E.createSubscription(),F=h.Account.create(),M=h.BillingInfo.create();T.account=F;T.billingInfo=M;if(B.filterSubscription){T=B.filterSubscription(T)||T}if(!E.displayQuantity){A.find(".plan .quantity").remove()}if(E.setupFee){A.find(".subscription").addClass("with_setup_fee");A.find(".plan .setup_fee .cost").text(""+E.setupFee)}else{A.find(".plan .setup_fee").remove()}if(E.trial){A.find(".subscription").addClass("with_trial");A.find(".plan .free_trial").text("First "+E.trial+" free")}else{A.find(".plan .free_trial").remove()}function K(){var W=T.calculateTotals();A.find(".plan .recurring_cost .cost").text(""+W.plan);A.find(".due_now .cost").text(""+W.stages.now);A.find(".coupon .discount").text(""+(W.coupon||""));A.find(".vat .cost").text(""+(W.vat||""));A.find(".add_ons .add_on").each(function(){var X=f(this).data("add_on");if(f(this).hasClass("selected")){var Y=W.addOns[X.code];f(this).find(".cost").text("+ "+Y)}else{f(this).find(".cost").text("+ "+X.cost)}})}A.find(".plan .quantity input").bind("change keyup",function(){T.plan.quantity=parseInt(f(this).val(),10)||1;K()});A.find(".plan .name").text(E.name);A.find(".plan .recurring_cost .cost").text(""+E.cost);A.find(".plan .recurring_cost .interval").text("every "+E.interval);var I=A.find(".add_ons");if(B.enableAddOns){var Q=E.addOns.length;if(Q){I.removeClass("none").addClass("any");for(var R=0;R<Q;++R){var N=E.addOns[R];var S="add_on add_on_"+N.code+(R%2?" even":" odd");if(R==0){S+=" first"}if(R==Q-1){S+=" last"}var H=f('<div class="'+S+'"><div class="name">'+N.name+'</div><div class="field quantity"><div class="placeholder">Qty</div><input type="text"></div><div class="cost"/></div>');if(!N.displayQuantity){H.find(".quantity").remove()}H.data("add_on",N);H.appendTo(I)}I.delegate(".add_ons .quantity input","change keyup",function(Z){var W=f(this).closest(".add_on");var Y=W.data("add_on");var X=parseInt(f(this).val(),10)||1;T.findAddOnByCode(Y.code).quantity=X;K()});I.bind("selectstart",function(W){if(f(W.target).is(".add_on")){W.preventDefault()}});I.delegate(".add_ons .add_on","click",function(aa){if(f(aa.target).closest(".quantity").length){return}var Y=!f(this).hasClass("selected");f(this).toggleClass("selected",Y);var Z=f(this).data("add_on");if(Y){var W=T.redeemAddOn(Z);var X=f(this).find(".quantity input");W.quantity=parseInt(X.val(),10)||1;X.focus()}else{T.removeAddOn(Z.code)}K()})}}else{I.remove()}var L=A.find(".coupon");var P=null;function U(){var W=L.find("input").val();if(W==P){return}P=W;if(!W){L.removeClass("invalid").removeClass("valid");L.find(".description").text("");T.coupon=undefined;K();return}L.addClass("checking");T.getCoupon(W,function(X){L.removeClass("checking");T.coupon=X;L.removeClass("invalid").addClass("valid");L.find(".description").text(X.description);K()},function(){T.coupon=undefined;L.removeClass("checking");L.removeClass("valid").addClass("invalid");L.find(".description").text("Not Found");K()})}if(B.enableCoupons){L.find("input").bind("keyup change",function(W){});L.find("input").keypress(function(W){if(W.charCode==13){W.preventDefault();U()}});L.find(".check").click(function(){U()});L.find("input").blur(function(){L.find(".check").click()})}else{L.remove()}var G=A.find(".vat");var V=A.find(".vat_number");var O=V.find("input");G.find(".title").text("VAT at "+h.settings.VATPercent+"%");function J(){var X=A.find(".country select").val();var Z=h.isVATNumberApplicable(X);V.toggleClass("applicable",Z);V.toggleClass("inapplicable",!Z);var Y=O.val();var W=h.isVATChargeApplicable(X,Y);G.toggleClass("applicable",W);G.toggleClass("inapplicable",!W)}A.find(".country select").change(function(){M.country=f(this).val();K();J()}).change();O.bind("keyup change",function(){M.vatNumber=f(this).val();K();J()});A.submit(function(W){W.preventDefault();a(A);A.find(".error").remove();A.find(".invalid").removeClass("invalid");z(function(X){T.plan.quantity=X.field(A,".plan .quantity",c(h.isValidQuantity));i(A,F,B,X);d(A,M,B,X);w(A,X)},function(){A.addClass("submitting");A.find("button.submit").attr("disabled",true).text("Please Wait");T.save({signature:B.signature,success:function(X){if(B.afterSubscribe){B.afterSubscribe(X)}if(B.successURL){var Y=B.successURL;h.post(Y,X,B)}},error:function(X){if(!B.onError||!B.onError(X)){o(A,X)}},complete:function(){A.removeClass("submitting");A.find("button.submit").removeAttr("disabled").text("Subscribe")}})})});K();if(B.beforeInject){B.beforeInject(A.get(0))}f(function(){var W=f(B.target);W.html(A);if(B.afterInject){B.afterInject(A.get(0))}})}};h.states={};h.states.US={"-":"Select State","--":"------------",AK:"Alaska",AL:"Alabama",AP:"Armed Forces Pacific",AR:"Arkansas",AS:"American Samoa",AZ:"Arizona",CA:"California",CO:"Colorado",CT:"Connecticut",DC:"District of Columbia",DE:"Delaware",FL:"Florida",FM:"Federated States of Micronesia",GA:"Georgia",GU:"Guam",HI:"Hawaii",IA:"Iowa",ID:"Idaho",IL:"Illinois",IN:"Indiana",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",MA:"Massachusetts",MD:"Maryland",ME:"Maine",MH:"Marshall Islands",MI:"Michigan",MN:"Minnesota",MO:"Missouri",MP:"Northern Mariana Islands",MS:"Mississippi",MT:"Montana",NC:"North Carolina",ND:"North Dakota",NE:"Nebraska",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NV:"Nevada",NY:"New York",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",PR:"Puerto Rico",PW:"Palau",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VA:"Virginia",VI:"Virgin Islands",VT:"Vermont",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",NS:"Nova Scotia",NU:"Nunavut",ON:"Ontario",PE:"Prince Edward Island",QC:"Quebec",SK:"Saskatchewan",NT:"Northwest Territories",YT:"Yukon Territory",AA:"Armed Forces Americas",AE:"Armed Forces Europe, Middle East, &amp; Canada"};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="accepted_cards"></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="BY">Belarus</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="CG">Congo [Republic]</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="DD">East Germany</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="GQ">Equatorial Guinea</option><option value="ER">Eritrea</option><option value="EE">Estonia</option><option value="ET">Ethiopia</option><option value="EU">European Union</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="GN">Guinea</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="IR">Iran</option><option value="IQ">Iraq</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="CI">Ivory Coast</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="LB">Lebanon</option><option value="LS">Lesotho</option><option value="LR">Liberia</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="MM">Myanmar [Burma]</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="KP">North Korea</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="PG">Papua New Guinea</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="SO">Somalia</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="SD">Sudan</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="SY">Syria</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="SU">Union(of Soviet Socialist Republics</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="ZW">Zimbabwe</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>';h.dom.subscribe_form='<form class="recurly subscribe"><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="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);
+(function(f){function t(B){function A(){}A.prototype=B||this;return new A()}var h={};h.settings={enableGeoIP:true,acceptedCards:["american_express","discover","mastercard","visa"],oneErrorPerField:true};h.version="2.0.1";h.dom={};h.Error={toString:function(){return"RecurlyJS Error: "+this.message}};h.raiseError=function(A){var B=t(h.Error);B.message=A;throw B};h.config=function(A){f.extend(true,h.settings,A);if(!A.baseURL){h.settings.baseURL="https://api.recurly.com/jsonp/";var B=h.settings.subdomain||h.raiseError("company subdomain not configured");h.settings.baseURL+=B+"/"}};function s(B,A){if(B==1){return A.substr(0,A.length-1)}return""+B+" "+A}(h.Cost=function(A){this._cents=A||0}).prototype={toString:function(){return h.formatCurrency(this.dollars())},cents:function(A){if(A===undefined){return this._cents}return new Cost(A)},dollars:function(A){if(A===undefined){return this._cents/100}return new h.Cost(A*100)},mult:function(A){return new h.Cost(this._cents*A)},add:function(A){if(A.cents){A=A.cents()}return new h.Cost(this._cents+A)},sub:function(A){if(A.cents){A=A.cents()}return new h.Cost(this._cents-A)}};h.Cost.FREE=new h.Cost(0);(h.TimePeriod=function(B,A){this.length=B;this.unit=A}).prototype={toString:function(){return""+s(this.length,this.unit)},toDate:function(){var A=new Date();switch(this.unit){case"month":A.setMonth(A.getMonth()+this.length);break;case"day":A.setDay(A.getDay()+this.length);break}return A},clone:function(){return new h.TimePeriod(this.length,this.unit)}};(h.RecurringCost=function(B,A){this.cost=B;this.interval=A}).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(A,B){this.recurringCost=A;this.duration=B}).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 q(A,B){var D=h.locale.currencies[A]=t(h.locale.currency);for(var C in B){D[C]=B[C]}}q("USD",{symbol:"$"});q("AUD",{symbol:"$"});q("CAD",{symbol:"$"});q("EUR",{symbol:"\u20ac"});q("GBP",{symbol:"\u00a3"});q("CZK",{symbol:"\u004b"});q("DKK",{symbol:"\u006b\u0072"});q("HUF",{symbol:"Ft"});q("JPY",{symbol:"\u00a5"});q("NOK",{symbol:"kr"});q("NZD",{symbol:"$"});q("PLN",{symbol:"\u007a"});q("SGD",{symbol:"$"});q("SEK",{symbol:"kr"});q("CHF",{symbol:"Fr"});q("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"},solo:{prefixes:[6334,6767],name:"Solo"},"switch":{prefixes:[4903,4905,4911,4936,564182,633110,6333,6759],name:"Switch"},maestro:{prefixes:[5018,5020,5038,6304,6759,6761],name:"Maestro"},visa_electron:{prefixes:[417500,4917,4913,4508,4844],name:"Visa Electron"},laser:{prefixes:[6304,6706,6771,6709],name:"Laser"}};h.detectCardType=function(C){C=C.replace(/\D/g,"");var F=h.knownCards;for(var A in F){if(F.hasOwnProperty(A)){var G=F[A];for(var E=0,B=G.prefixes.length;E<B;++E){if(G.prefixes.hasOwnProperty(E)){var D=G.prefixes[E];if(new RegExp("^"+D.toString()).test(C)){return A}}}}}return false};h.formatCurrency=function(D,H){if(D<0){D=-D;var C=true}else{var C=false}H=H||h.settings.currency||h.raiseError("currency not configured");var G=h.locale.currency;var B=h.locale.currencies[H];var F=D.toFixed(B.precision);if(G.separator!="."){F=F.replace(/\./g,G.separator)}function A(J){var I=new RegExp("(-?[0-9]+)([0-9]{3})");while(I.test(J)){J=J.replace(I,"$1"+G.delimiter+"$2")}return J}F=A(F);var E=G.format;E=E.replace(/%u/g,B.symbol);E=E.replace(/%n/g,F);F=E;if(C){F="-"+F}return F};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(A){return f.inArray(A,m)!==-1};h.isVATNumberApplicable=function(B,A){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(B)){return false}return true};h.isVATChargeApplicable=function(B,C){if(!h.isVATNumberApplicable(B)){return false}var A=h.settings.country;return(A==B||!C)};h.flattenErrors=function(H,B){var A=[];var E=["base","account_id"];var B=B||"";if(typeof H=="string"||typeof H=="number"||typeof H=="boolean"){if(f.inArray(E,B)){return[H]}return[""+B+" "+H]}for(var D in H){if(H.hasOwnProperty(D)){B=(parseInt(D).toString()==D)?B:D;var G=h.flattenErrors(H[D],B);for(var F=0,C=G.length;F<C;++F){A.push(G[F])}}}return A};h.replaceVars=function(D,C){for(var B in C){if(C.hasOwnProperty(B)){var A=encodeURIComponent(C[B]);D=D.replace(new RegExp("\\{"+B+"\\}","g"),A)}}return D};h.post=function(B,F,A){var C=A.resultNamespace||"recurly_result";var G={};G[C]=F;F=G;var D=f("<form />").hide();D.attr("action",B).attr("method","POST").attr("enctype","application/x-www-form-urlencoded");function E(I,L,K){var H=(K.length>0?(K+"["+I+"]"):I);if(typeof L==="object"){for(var J in L){if(L.hasOwnProperty(J)){E(J,L[J],H)}}}else{f('<input type="hidden" />').attr({name:H,value:L}).appendTo(D)}}E("",F,"");f("body").append(D);D.submit()};function k(D){var C=f("<select>");for(var B in D){if(D.hasOwnProperty(B)){var A=D[B];C.append("<option value="+B+">"+A+"</option>")}}return C}h.enforce=function(A){return{enforced:A,hidden:false,hide:function(){this.hidden=true;return this}}};function p(B){B=B||this;if(typeof B=="string"){return B.replace(/([a-z])([A-Z])/g,function(D,C,E){return C+"_"+E}).toLowerCase()}else{for(var A in B){if(B.hasOwnProperty(A)){}}}}h.ajax=function(A){A.data=f.extend({js_version:h.version},A.data);return f.ajax(A)};function u(A){f("body").append(h.dom.error_dialog)}(h.isValidCC=function(G){var B=G.val();B=B.replace(/\D/g,"");if(B==""){return false}var E=0,D=0,A=false;for(var F=B.length-1;F>=0;F--){var C=B.charAt(F);var D=parseInt(C,10);if(A){if((D*=2)>9){D-=9}}E+=D;A=!A}return(E%10)==0}).defaultErrorKey="invalidCC";(h.isValidEmail=function(B){var A=B.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(A)}).defaultErrorKey="invalidEmail";function b(A){return/^[0-9]+$/.test(A)}(h.isValidCVV=function(B){var A=B.val();return(A.length==3||A.length==4)&&b(A)}).defaultErrorKey="invalidCVV";(h.isNotEmpty=function(B){var A=B.val();if(B.is("select")){if(A=="-"||A=="--"){return false}}return !!A}).defaultErrorKey="emptyField";(h.isChecked=function(A){return A.is(":checked")}).defaultErrorKey="acceptTOS";(h.isValidQuantity=function(A){return/^[0-9]*$/.test(A.val())}).defaultErrorKey="invalidQuantity";h.Plan={create:t,fromJSON:function(D){var E=this.create();E.name=D.name;E.code=D.plan_code;E.cost=new h.Cost(D.unit_amount_in_cents);E.displayQuantity=D.display_quantity;E.interval=new h.TimePeriod(D.plan_interval_length,D.plan_interval_unit);if(D.trial_interval_length){E.trial=new h.TimePeriod(D.trial_interval_length,D.trial_interval_unit)}if(D.setup_fee_in_cents){E.setupFee=new h.Cost(D.setup_fee_in_cents)}E.addOns=[];if(D.add_ons){for(var B=D.add_ons.length,C=0;C<B;++C){var A=D.add_ons[C];E.addOns.push(h.AddOn.fromJSON(A))}}return E},get:function(A,B){f.ajax({url:h.settings.baseURL+"plans/"+A,dataType:"jsonp",jsonp:"callback",timeout:10000,success:function(C){var D=h.Plan.fromJSON(C);B(D)}})},createSubscription:function(){var A=t(h.Subscription);A.plan=t(this);A.plan.quantity=1;A.addOns=[];return A}};h.AddOn={fromJSON:function(B){var A=t(h.AddOn);A.name=B.name;A.code=B.add_on_code;A.cost=new h.Cost(B.default_unit_amount_in_cents);A.displayQuantity=B.display_quantity;return A},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:t,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:t,toJSON:function(){return{first_name:this.firstName,last_name:this.lastName,month:this.month,year:this.year,number:this.number,verification_value:this.cvv,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}},save:function(A){var B={billing_info:this.toJSON(),signature:A.signature};if(!A.distinguishContactFromBillingInfo){B.account={account_code:A.accountCode,first_name:this.firstName,last_name:this.lastName}}h.ajax({url:h.settings.baseURL+"accounts/"+A.accountCode+"/billing_info/update",data:B,dataType:"jsonp",jsonp:"callback",timeout:60000,success:function(C){if(C.success&&A.success){A.success(C.success)}else{if(C.errors&&A.error){A.error(h.flattenErrors(C.errors))}}},error:function(){if(A.error){A.error(["Unknown error processing transaction. Please try again later."])}},complete:A.complete||f.noop})}};h.Subscription={create:t,plan:h.Plan,addOns:[],calculateTotals:function(){var D={stages:{}};D.plan=this.plan.cost.mult(this.plan.quantity);D.allAddOns=new h.Cost(0);D.addOns={};for(var B=this.addOns.length,C=0;C<B;++C){var A=this.addOns[C],G=A.cost.mult(A.quantity);D.addOns[A.code]=G;D.allAddOns=D.allAddOns.add(G)}D.stages.recurring=D.plan.add(D.allAddOns);D.stages.now=D.plan.add(D.allAddOns);if(this.plan.trial){D.stages.now=h.Cost.FREE}if(this.coupon){var E=D.stages.now;var F=D.stages.now.discount(this.coupon);D.coupon=F.sub(E);D.stages.now=F}if(this.plan.setupFee){D.stages.now=D.stages.now.add(this.plan.setupFee)}if(this.billingInfo&&h.isVATChargeApplicable(this.billingInfo.country,this.billingInfo.vatNumber)){D.vat=D.stages.now.mult((h.settings.VATPercent/100));D.stages.now=D.stages.now.add(D.vat)}return D},redeemAddOn:function(B){var A=B.createRedemption();this.addOns.push(A);return A},removeAddOn:function(D){for(var B=this.addOns,A=B.length,C=0;C<A;++C){if(B[C].code==D){return B.splice(C,1)}}},findAddOnByCode:function(C){for(var A=this.addOns.length,B=0;B<A;++B){if(this.addOns[B].code==C){return this.addOns[B]}}return false},toJSON:function(){var E={plan_code:this.plan.code,quantity:this.plan.quantity,coupon_code:this.coupon?this.coupon.code:undefined,add_ons:[]};for(var D=0,C=this.addOns.length,B=E.add_ons,A=this.addOns;D<C;++D){B.push({add_on_code:A[D].code,quantity:A[D].quantity})}return E},save:function(A){var B={subscription:this.toJSON(),account:this.account.toJSON(),billing_info:this.billingInfo.toJSON(),signature:A.signature};h.ajax({url:h.settings.baseURL+"subscribe",data:B,dataType:"jsonp",jsonp:"callback",timeout:60000,success:function(C){if(C.success&&A.success){A.success(C.success)}else{if(C.errors&&A.error){var D=C.errors.error_code;delete C.errors.error_code;A.error(h.flattenErrors(C.errors),D)}}},error:function(){if(A.error){A.error(["Unknown error processing transaction. Please try again later."])}},complete:A.complete})}};h.AddOn.createRedemption=function(B){var A=t(this);A.quantity=B||1;return A};h.Coupon={fromJSON:function(A){var B=t(h.Coupon);if(A.discount_in_cents){B.discountCost=new h.Cost(-A.discount_in_cents)}else{if(A.discount_percent){B.discountRatio=A.discount_percent/100}}B.description=A.description;return B},toJSON:function(){}};h.Cost.prototype.discount=function(A){if(A.discountCost){return this.add(A.discountCost)}var B=this.sub(this.mult(A.discountRatio));if(B.cents()<0){return h.Cost.FREE}return B};h.Subscription.getCoupon=function(C,A,B){if(!h.settings.baseURL){h.raiseError("Company subdomain not configured")}return h.ajax({url:h.settings.baseURL+"plans/"+this.plan.code+"/coupons/"+C,dataType:"jsonp",jsonp:"callback",timeout:10000,success:function(E){if(E.valid){var D=h.Coupon.fromJSON(E);D.code=C;A(D)}else{B()}},error:function(){B()}})};h.Transaction={toJSON:function(){return{currency:this.currency,amount_in_cents:this.cost.cents(),description:this.description,accounting_code:this.accountingCode}},create:t,save:function(A){var B={transaction:this.toJSON(),account:this.account?this.account.toJSON():undefined,billing_info:this.billingInfo.toJSON(),signature:A.signature};h.ajax({url:h.settings.baseURL+"transactions/create",data:B,dataType:"jsonp",jsonp:"callback",timeout:60000,success:function(C){if(C.success&&A.success){A.success(C.success)}else{if(C.errors&&A.error){A.error(h.flattenErrors(C.errors))}}},error:function(){if(A.error){A.error(["Unknown error processing transaction. Please try again later."])}},complete:A.complete||f.noop})}};h.UserError={};function r(A,B){var C=t(h.UserError);C.validation=A;C.element=B;throw C}function v(E){var F=E.element;var D=h.locale.errors[E.validation.errorKey];var B=E.validation.validator;var A=f('<div class="error">');A.text(D);A.appendTo(F.parent());F.addClass("invalid");F.bind("change keyup",function C(G){if(B(F)){F.removeClass("invalid");A.remove();F.unbind(G)}})}function z(C,E){var B=false;var A={field:function(F,H,G){G=Array.prototype.slice.call(arguments,2);return x(F,H,G,function I(J){if(!B){J.element.focus()}v(J);B=true;if(h.settings.oneErrorPerForm){throw {stopPulling:true}}})}};try{C(A)}catch(D){if(!D.stopPulling){throw D}}if(!B){E()}}function x(I,D,B,F){var G=I.find(D+" input");if(G.length==0){G=I.find(D+" select")}if(G.length==0){return undefined}var A=G.val();for(var E=0,C=B.length;E<C;++E){var H=B[E];if(!H.validator(G)){F({element:G,validation:H});if(h.settings.oneErrorPerField){break}}}return A}function c(B,A){return{validator:B,errorKey:A||B.defaultErrorKey}}function a(A){var B=A.find(".server_errors");B.removeClass("any").addClass("none");B.empty()}function o(B,F){var D=B.find(".server_errors");a(B);var A=F.length;if(A){D.removeClass("none").addClass("any");for(var E=0;E<A;++E){var C=f('<div class="error">');C.text(F[E]);D.append(C)}}}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 .card_number > input",CVV:".billing_info .cvv > input"}};function n(A,B,D){(function C(F,E,I){if(!F){return}for(var H in F){if(F.hasOwnProperty(H)&&E.hasOwnProperty(H)){var L=F[H];var G=E[H];var M=p(H);var J=I?(I+"."+M):M;if(typeof G=="string"){var K=A.find(G);K.val(L).change();if(B.signature.match("\\+"+J+"[+$]")){K.attr("disabled",true).addClass("signed")}}else{if(typeof G=="object"){C(L,G,J)}}}}})(B,D)}function l(A,B){if(!B.collectPhone){A.find(".phone").remove()}if(!B.collectCompany){A.find(".company_name").remove()}A.delegate(".placeholder","click",function(){var C=f(this);var D=f(this).parent();D.find("input").focus()});A.delegate("input","change keyup",function(){var D=f(this);var C=f(this).parent();if(D.val().length>0){C.find(".placeholder").hide()}else{C.find(".placeholder").show()}});A.delegate("input","focus",function(){f(this).parent().addClass("focus")});A.delegate("input","blur",function(){f(this).parent().removeClass("focus")});A.delegate("input","keydown",function(C){if(C.keyCode>=48&&C.keyCode<=90){f(this).parent().find(".placeholder").hide()}});n(A,B,j)}function g(C,D){if(D.distinguishContactFromBillingInfo){var B=C.find(".contact_info .first_name input");var E=C.find(".contact_info .last_name input");var F=B.val();var A=E.val();C.find(".contact_info .first_name input").change(function(){var G=C.find(".billing_info .first_name input");if(G.val()==F){G.val(f(this).val()).change()}F=B.val()});C.find(".contact_info .last_name input").change(function(){var G=C.find(".billing_info .last_name input");if(G.val()==A){G.val(f(this).val()).change()}A=E.val()})}else{C.find(".billing_info .first_name, .billing_info .last_name").remove()}}function e(I,E){var B=I.find(".country select");var V=I.find(".state");var Z=V.find("input");var Q=V.children();var M={};var K=h.states;var J=B.val();function O(af,ad){var ae=K[af];ad=ad.toUpperCase().trim();if(ae.hasOwnProperty(ad)){return ad}for(var ac in ae){if(ae.hasOwnProperty(ac)){var ab=ae[ac];if(ad==ab.toUpperCase()){return ac}}}return false}function aa(ae,ab){var ad=V.hasClass("select_mode");if(ae=="US"||ae=="CA"){if(!ad||J!=ae){var ac=V.find("input").val();if(ac!=undefined&&ac!=""){ab=O(ae,ac);if(!ab){return false}}V.addClass("select_mode");V.children().detach();M[ae]=M[ae]||k(K[ae]);V.append(M[ae]);if(ab){V.find("select").val(ab)}}}else{if(ad){V.empty().append(Q).removeClass("select_mode")}}}Z.bind("change keyup",function(){aa(J)});B.change(function(){var ab=f(this).val();aa(ab);J=ab});function G(ad,ab){var ac=ad.val();if(!ab||ab==""){return false}if(ac&&ac!=""&&ac!="-"){return false}return ad.val(ab)}if(E.enableGeoIP){f.ajax({url:h.settings.baseURL+"location",dataType:"jsonp",jsonp:"callback",success:function(ab){if(ab.country){G(B,ab.country);aa(ab.country,ab.state)}}})}else{if(h.settings.country){var S=I.find(".country option[value="+h.settings.country+"]");if(S.length){S.attr("selected",true).change()}}}var D=new Date();var L=D.getFullYear();var W=D.getMonth();var U=I.find(".year select");var A=I.find(".month select");for(var R=L;R<=L+10;++R){var F=f('<option name="'+R+'">'+R+"</option>");F.appendTo(U)}U.val(L+1);function T(){if(U.val()==L){var ab=false;if(A.val()>W){ab=true}A.find("option").each(function(){if(f(this).val()<=W){f(this).attr("disabled",true)}else{f(this).removeAttr("disabled");if(!ab){f(this).attr("selected",true);ab=true}}})}else{A.find("option").removeAttr("disabled")}}T();U.change(T);if(E.addressRequirement=="none"){I.find(".address").remove()}else{if(E.addressRequirement=="zip"){I.find(".address").addClass("only_zip");I.find(".address1, .address2, .city, .state").remove();if(!h.settings.VATPercent){I.find(".country").remove()}}else{if(E.addressRequirement=="zipstreet"){I.find(".address").addClass("only_zipstreet");I.find(".city, .state").remove();if(!h.settings.VATPercent){I.find(".country").remove()}}else{if(E.addressRequirement=="full"){I.find(".address").addClass("full")}}}}var N=I.find(".accepted_cards");if(E.acceptedCards){var X=E.acceptedCards,P=X.length;for(var R=0;R<P;++R){var Y=X[R];var H=f('<div class="card '+Y+'">');var C=h.knownCards[Y];if(C&&C.name){H.text(C.name)}N.append(H)}}I.find(".card_number input").bind("change keyup",function(){var ab=h.detectCardType(f(this).val());if(ab){N.find(".card").each(function(){f(this).toggleClass("match",f(this).hasClass(ab));f(this).toggleClass("no_match",!f(this).hasClass(ab))})}else{N.find(".card").removeClass("match no_match")}})}function i(A,D,B,C){D.firstName=C.field(A,".contact_info .first_name",c(h.isNotEmpty));D.lastName=C.field(A,".contact_info .last_name",c(h.isNotEmpty));D.companyName=C.field(A,".contact_info .company_name");D.email=C.field(A,".email",c(h.isNotEmpty),c(h.isValidEmail));D.code=B.accountCode}function d(A,D,B,C){D.firstName=C.field(A,".billing_info .first_name",c(h.isNotEmpty));D.lastName=C.field(A,".billing_info .last_name",c(h.isNotEmpty));D.number=C.field(A,".card_number",c(h.isNotEmpty),c(h.isValidCC));D.cvv=C.field(A,".cvv",c(h.isNotEmpty),c(h.isValidCVV));D.month=C.field(A,".month");D.year=C.field(A,".year");D.phone=C.field(A,".phone");D.address1=C.field(A,".address1",c(h.isNotEmpty));D.address2=C.field(A,".address2");D.city=C.field(A,".city",c(h.isNotEmpty));D.state=C.field(A,".state",c(h.isNotEmpty));D.zip=C.field(A,".zip",c(h.isNotEmpty));D.country=C.field(A,".country",c(h.isNotEmpty))}function w(A,B){B.field(A,".accept_tos",c(h.isChecked))}h.buildBillingInfoUpdateForm=h.buildBillingInfoForm=function(B){var C={addressRequirement:"full",distinguishContactFromBillingInfo:true};B=f.extend(t(h.settings),C,B);if(!B.accountCode){h.raiseError("accountCode missing")}if(!B.signature){h.raiseError("signature missing")}var D=h.BillingInfo.create();var A=f(h.dom.update_billing_info_form);A.find(".billing_info").html(h.dom.billing_info_fields);l(A,B);e(A,B);A.submit(function(E){E.preventDefault();a(A);A.find(".error").remove();A.find(".invalid").removeClass("invalid");z(function(F){d(A,D,B,F)},function(){A.addClass("submitting");A.find("button.submit").attr("disabled",true).text("Please Wait");D.save({signature:B.signature,distinguishContactFromBillingInfo:B.distinguishContactFromBillingInfo,accountCode:B.accountCode,success:function(F){if(B.afterUpdate){B.afterUpdate(F)}if(B.successURL){var G=B.successURL;h.post(G,F,B)}},error:function(F){if(!B.onError||!B.onError(F)){o(A,F)}},complete:function(){A.removeClass("submitting");A.find("button.submit").removeAttr("disabled").text("Update")}})})});if(B.beforeInject){B.beforeInject(A.get(0))}f(function(){var E=f(B.target);E.html(A);if(B.afterInject){B.afterInject(A.get(0))}})};function y(A,B){if(B.termsOfServiceURL||B.privacyPolicyURL){var C=A.find(".accept_tos").html(h.dom.terms_of_service);if(!(B.termsOfServiceURL&&B.privacyPolicyURL)){C.find("span.and").remove()}if(B.termsOfServiceURL){C.find("a.tos_link").attr("href",B.termsOfServiceURL)}else{C.find("a.tos_link").remove()}if(B.privacyPolicyURL){C.find("a.pp_link").attr("href",B.privacyPolicyURL)}else{C.find("a.pp_link").remove()}}else{A.find(".accept_tos").remove()}}h.buildTransactionForm=function(B){var D={addressRequirement:"full",distinguishContactFromBillingInfo:true,collectContactInfo:true};B=f.extend(t(h.settings),D,B);if(!B.collectContactInfo&&!B.accountCode){h.raiseError("collectContactInfo is false, but no accountCode provided")}if(!B.signature){h.raiseError("signature missing")}var F=h.BillingInfo.create(),C=h.Account.create(),E=h.Transaction.create();E.account=C;E.billingInfo=F;E.currency=B.currency;E.description=B.description;E.accountingCode=B.accountingCode;E.cost=new h.Cost(B.amountInCents);var A=f(h.dom.one_time_transaction_form);A.find(".billing_info").html(h.dom.billing_info_fields);if(B.collectContactInfo){A.find(".contact_info").html(h.dom.contact_info_fields)}else{A.find(".contact_info").remove()}l(A,B);g(A,B);e(A,B);y(A,B);A.submit(function(G){G.preventDefault();a(A);A.find(".error").remove();A.find(".invalid").removeClass("invalid");z(function(H){i(A,C,B,H);d(A,F,B,H);w(A,H)},function(){A.addClass("submitting");A.find("button.submit").attr("disabled",true).text("Please Wait");E.save({signature:B.signature,accountCode:B.accountCode,success:function(H){if(B.afterPay){B.afterPay(H)}if(B.successURL){var I=B.successURL;h.post(I,H,B)}},error:function(H){if(!B.onError||!B.onError(H)){o(A,H)}},complete:function(){A.removeClass("submitting");A.find("button.submit").removeAttr("disabled").text("Pay")}})})});if(B.beforeInject){B.beforeInject(A.get(0))}f(function(){var G=f(B.target);G.html(A);if(B.afterInject){B.afterInject(A.get(0))}})};h.buildSubscriptionForm=function(B){var D={enableAddOns:true,enableCoupons:true,addressRequirement:"full",distinguishContactFromBillingInfo:false};B=f.extend(t(h.settings),D,B);if(!B.signature){h.raiseError("signature missing")}var A=f(h.dom.subscribe_form);A.find(".contact_info").html(h.dom.contact_info_fields);A.find(".billing_info").html(h.dom.billing_info_fields);l(A,B);g(A,B);e(A,B);y(A,B);if(B.planCode){h.Plan.get(B.planCode,C)}else{if(B.plan){C(B.plan)}}function C(E){if(B.filterPlan){E=B.filterPlan(E)||E}var T=E.createSubscription(),F=h.Account.create(),M=h.BillingInfo.create();T.account=F;T.billingInfo=M;if(B.filterSubscription){T=B.filterSubscription(T)||T}if(!E.displayQuantity){A.find(".plan .quantity").remove()}if(E.setupFee){A.find(".subscription").addClass("with_setup_fee");A.find(".plan .setup_fee .cost").text(""+E.setupFee)}else{A.find(".plan .setup_fee").remove()}if(E.trial){A.find(".subscription").addClass("with_trial");A.find(".plan .free_trial").text("First "+E.trial+" free")}else{A.find(".plan .free_trial").remove()}function K(){var W=T.calculateTotals();A.find(".plan .recurring_cost .cost").text(""+W.plan);A.find(".due_now .cost").text(""+W.stages.now);A.find(".coupon .discount").text(""+(W.coupon||""));A.find(".vat .cost").text(""+(W.vat||""));A.find(".add_ons .add_on").each(function(){var X=f(this).data("add_on");if(f(this).hasClass("selected")){var Y=W.addOns[X.code];f(this).find(".cost").text("+ "+Y)}else{f(this).find(".cost").text("+ "+X.cost)}})}A.find(".plan .quantity input").bind("change keyup",function(){T.plan.quantity=parseInt(f(this).val(),10)||1;K()});A.find(".plan .name").text(E.name);A.find(".plan .recurring_cost .cost").text(""+E.cost);A.find(".plan .recurring_cost .interval").text("every "+E.interval);var I=A.find(".add_ons");if(B.enableAddOns){var Q=E.addOns.length;if(Q){I.removeClass("none").addClass("any");for(var R=0;R<Q;++R){var N=E.addOns[R];var S="add_on add_on_"+N.code+(R%2?" even":" odd");if(R==0){S+=" first"}if(R==Q-1){S+=" last"}var H=f('<div class="'+S+'"><div class="name">'+N.name+'</div><div class="field quantity"><div class="placeholder">Qty</div><input type="text"></div><div class="cost"/></div>');if(!N.displayQuantity){H.find(".quantity").remove()}H.data("add_on",N);H.appendTo(I)}I.delegate(".add_ons .quantity input","change keyup",function(Z){var W=f(this).closest(".add_on");var Y=W.data("add_on");var X=parseInt(f(this).val(),10)||1;T.findAddOnByCode(Y.code).quantity=X;K()});I.bind("selectstart",function(W){if(f(W.target).is(".add_on")){W.preventDefault()}});I.delegate(".add_ons .add_on","click",function(aa){if(f(aa.target).closest(".quantity").length){return}var Y=!f(this).hasClass("selected");f(this).toggleClass("selected",Y);var Z=f(this).data("add_on");if(Y){var W=T.redeemAddOn(Z);var X=f(this).find(".quantity input");W.quantity=parseInt(X.val(),10)||1;X.focus()}else{T.removeAddOn(Z.code)}K()})}}else{I.remove()}var L=A.find(".coupon");var P=null;function U(){var W=L.find("input").val();if(W==P){return}P=W;if(!W){L.removeClass("invalid").removeClass("valid");L.find(".description").text("");T.coupon=undefined;K();return}L.addClass("checking");T.getCoupon(W,function(X){L.removeClass("checking");T.coupon=X;L.removeClass("invalid").addClass("valid");L.find(".description").text(X.description);K()},function(){T.coupon=undefined;L.removeClass("checking");L.removeClass("valid").addClass("invalid");L.find(".description").text("Not Found");K()})}if(B.enableCoupons){L.find("input").bind("keyup change",function(W){});L.find("input").keypress(function(W){if(W.charCode==13){W.preventDefault();U()}});L.find(".check").click(function(){U()});L.find("input").blur(function(){L.find(".check").click()})}else{L.remove()}var G=A.find(".vat");var V=A.find(".vat_number");var O=V.find("input");G.find(".title").text("VAT at "+h.settings.VATPercent+"%");function J(){var X=A.find(".country select").val();var Z=h.isVATNumberApplicable(X);V.toggleClass("applicable",Z);V.toggleClass("inapplicable",!Z);var Y=O.val();var W=h.isVATChargeApplicable(X,Y);G.toggleClass("applicable",W);G.toggleClass("inapplicable",!W)}A.find(".country select").change(function(){M.country=f(this).val();K();J()}).change();O.bind("keyup change",function(){M.vatNumber=f(this).val();K();J()});A.submit(function(W){W.preventDefault();a(A);A.find(".error").remove();A.find(".invalid").removeClass("invalid");z(function(X){T.plan.quantity=X.field(A,".plan .quantity",c(h.isValidQuantity));i(A,F,B,X);d(A,M,B,X);w(A,X)},function(){A.addClass("submitting");A.find("button.submit").attr("disabled",true).text("Please Wait");T.save({signature:B.signature,success:function(X){if(B.afterSubscribe){B.afterSubscribe(X)}if(B.successURL){var Y=B.successURL;h.post(Y,X,B)}},error:function(X){if(!B.onError||!B.onError(X)){o(A,X)}},complete:function(){A.removeClass("submitting");A.find("button.submit").removeAttr("disabled").text("Subscribe")}})})});K();if(B.beforeInject){B.beforeInject(A.get(0))}f(function(){var W=f(B.target);W.html(A);if(B.afterInject){B.afterInject(A.get(0))}})}};h.states={};h.states.US={"-":"Select State","--":"------------",AK:"Alaska",AL:"Alabama",AP:"Armed Forces Pacific",AR:"Arkansas",AS:"American Samoa",AZ:"Arizona",CA:"California",CO:"Colorado",CT:"Connecticut",DC:"District of Columbia",DE:"Delaware",FL:"Florida",FM:"Federated States of Micronesia",GA:"Georgia",GU:"Guam",HI:"Hawaii",IA:"Iowa",ID:"Idaho",IL:"Illinois",IN:"Indiana",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",MA:"Massachusetts",MD:"Maryland",ME:"Maine",MH:"Marshall Islands",MI:"Michigan",MN:"Minnesota",MO:"Missouri",MP:"Northern Mariana Islands",MS:"Mississippi",MT:"Montana",NC:"North Carolina",ND:"North Dakota",NE:"Nebraska",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NV:"Nevada",NY:"New York",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",PR:"Puerto Rico",PW:"Palau",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VA:"Virginia",VI:"Virgin Islands",VT:"Vermont",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",NS:"Nova Scotia",NU:"Nunavut",ON:"Ontario",PE:"Prince Edward Island",QC:"Quebec",SK:"Saskatchewan",NT:"Northwest Territories",YT:"Yukon Territory",AA:"Armed Forces Americas",AE:"Armed Forces Europe, Middle East, &amp; Canada"};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="accepted_cards"></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="BY">Belarus</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="CG">Congo [Republic]</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="DD">East Germany</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="GQ">Equatorial Guinea</option><option value="ER">Eritrea</option><option value="EE">Estonia</option><option value="ET">Ethiopia</option><option value="EU">European Union</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="GN">Guinea</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="IR">Iran</option><option value="IQ">Iraq</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="CI">Ivory Coast</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="LB">Lebanon</option><option value="LS">Lesotho</option><option value="LR">Liberia</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="MM">Myanmar [Burma]</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="KP">North Korea</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="PG">Papua New Guinea</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="SO">Somalia</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="SD">Sudan</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="SY">Syria</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="SU">Union(of Soviet Socialist Republics</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="ZW">Zimbabwe</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>';h.dom.subscribe_form='<form class="recurly subscribe"><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="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);
View
4 changelog.md
@@ -1,5 +1,9 @@
#Recurly.js CHANGELOG
+##Version 2.0.1 (January 31, 2011)
+
+- Minor bug fixes
+
##Version 2.0.0 (January 17, 2011)
- buildSubscriptionForm() now requires a signature (breaks backwards compatibility)
View
2 version
@@ -1 +1 @@
-2.0.0
+2.0.1

0 comments on commit 2a76407

Please sign in to comment.
Something went wrong with that request. Please try again.