Drupal.behaviors.bcac_registration=function(context){$('#edit-additional-cards-selection').change(function(){if($('#edit-additional-cards-selection').val()>3){$('a.fancybox-wrapper').trigger('click');}});function set_upload_element_visilibity(){$('input[type="radio"]').each(function(){if($(this).attr("checked")==true){$('.'+$(this).val()).show('slow');}else{$('.'+$(this).val()).hide('slow');$(this).prev('a').removeClass('jqTransformChecked');}});}
set_upload_element_visilibity();$('input[type="radio"]').live('change',function(){set_upload_element_visilibity();});$('#payment-moneris-form').css('visibility','hidden').submit();$('label','#bcac-registration-farmer-id-card-registration-cardholder-info-form').each(function(){if($.trim($(this).html())=="First Name:"||$.trim($(this).html())=="Last Name:"||$.trim($(this).html())=="Relationship to Farm:"||$.trim($(this).html())=="Email Address:"||$.trim($(this).html())=="Phone Number:"||$.trim($(this).html())=="Street Address:"||$.trim($(this).html())=="City:"||$.trim($(this).html())=="Postal Code:"||$.trim($(this).html())=="Farm Name:"){if($(this).parent('div').attr('id')=='edit-farm-info-postal-code-wrapper'||$(this).parent('div').attr('id')=='edit-farm-info-city-wrapper'){;}else{$(this).html($(this).html()+"<span title='This field is required.' class='form-required'>*</span>");}}});if($('#edit-authorized-user-cards-remove').length>0){$('#edit-authorized-user-cards-remove').val(' ');}
if($('#edit-current-environmental-farm-plan-discount-remove').length>0){$('#edit-current-environmental-farm-plan-discount-remove').val(' ');}
$('a.return-to-order').live('click',parent.$.fancybox.close);$(".fancy-wrapper-cc-update").fancybox({overlayShow:true,type:'iframe',autoDimensions:true,width:660,height:440,onClosed:function(){parent.location.reload(true);}});function set_uc_account_display(){$('input[name="choices"]','form#bcac-registration-farmer-id-card-user-registration-form').each(function(){if($(this).attr("checked")==true){if($(this).val()==1){$('.uc-account-details').show('slow');}else{$('.uc-account-details').hide('slow');}}});}
set_uc_account_display();$('input[name="choices"]','form#bcac-registration-farmer-id-card-user-registration-form').live('change',function(){set_uc_account_display();});}
