1$(function() { 2 3 $(".tip").tooltip(); 4 5 $('#header_title img').on('click', function(){ 6 window.location.href = '/'; 7 }); 8 9 $('.issue_link').hover(function(){ 10 $(this).addClass('active'); 11 }, function(){ 12 $(this).removeClass('active'); 13 }); 14 15 var winWidth = $(window).width(); 16 $('.poem_image img').css('width', winWidth - 15); 17 18 $(window).on('resize', function(){ 19 var winWidth = $(window).width(); 20 $('.poem_image img').css('width', winWidth - 15); 21 }); 22 23 24 25 26 27 if($("#register_form").length) { 28 29 setTimeout(function(){ 30 $('.subscription_type').eq(1).click(); 31 $('.subscription_type').eq(0).click(); 32 }, 100); 33 34 $("#register_form").validate({ 35 debug: false, 36 ignore: [], 37 rules: { 38 email: { 39 required: true, 40 email: true, 41 remote: { 42 url: "#", 43 type: "post", 44 data: { action: function() { return 'check_email'; } } 45 } 46 }, 47 login_pass: { 48 required: true, 49 minlength: 8 50 }, 51 confirm_pass: { 52 required: true, 53 minlength: 8, 54 equalTo: "#login_pass" 55 }, 56 'card-number': { required: true }, 57 'card-cvc': { required: true }, 58 'card-expiry-month': { required: true }, 59 'card-expiry-year': { required: true } 60 61 }, 62 messages: { 63 email: { 64 required: "*", 65 email: "Invalid", 66 remote: jQuery.validator.format("This email is already associated with an account. Did you <a href='/reset-password'>forget your password</a>?") 67 }, 68 login_pass: { 69 required: "*", 70 minlength: jQuery.validator.format("Must be at least {0} chars") 71 }, 72 confirm_pass: { 73 required: "*", 74 minlength: jQuery.validator.format("Must be at least {0} chars"), 75 equalTo: "Passwords must match" 76 }, 77 78 'card-number': { required: "*" }, 79 'card-cvc': { required: "*" }, 80 'card-expiry-month': { required: "*" }, 81 'card-expiry-year': { required: "*" } 82 83 }, 84 submitHandler: function(form) { 85 86 $("#register_submit").attr('value','Please wait...'); 87 $("#register_submit").attr('disabled', 'disabled'); 88 89 Stripe.card.createToken({ 90 number: $('.card-number').val(), 91 cvc: $('.card-cvc').val(), 92 exp_month: $('.card-expiry-month').val(), 93 exp_year: $('.card-expiry-year').val(), 94 name: $('#first_name').val() + " " + $('#last_name').val(), 95 address_line1: $('#shipping_address_1').val(), 96 address_line2: $('#shipping_address_2').val(), 97 address_city: $('#shipping_city').val(), 98 address_state: $('#shipping_state').val(), 99 address_zip: $('#shipping_zip').val(), 100 address_country: $('#shipping_country').val() 101 }, stripeComplete); 102 } 103 }); 104 } 105 106 107 // if($("#login_form").length) { 108 109 // $("#login_form").validate({ 110 // debug: true, 111 // ignore: [], 112 // rules: { 113 // email: { 114 // required: true 115 // }, 116 // pass: { 117 // required: true 118 // } 119 // }, 120 121 // submitHandler: function(form) { 122 // return true; 123 // $.post('#', $("#login_form").serialize(), function(data) { 124 // if (data == 'success') { 125 // var url = "/profile/"; 126 // $(location).attr('href', url); 127 // } else { 128 // $("#register_form").prepend( 129 // $(data).hide().fadeIn('slow') 130 // ); 131 // $(".error").fadeOut(5000); 132 // $("#register_submit").attr('value', 'Submit'); 133 // $("#register_submit").removeAttr('disabled'); 134 // } 135 // }); 136 // } 137 // }); 138 // } 139 140});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.