// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults


function select_debit() {
  
    // payments = document.getElementsByClassName('payment_company_debit');
    //     payments[0].checked = true;  
    payment = $('.payment_company_debit:first');
    
    payment.attr('checked',true);

}

function select_credit() {
  
   // credits = document.getElementsByClassName('payment_company_credit');
   // credits[0].checked = true;

   credit = $('.payment_company_credit:first');
   credit.attr('checked', true);
}

function goToAnchor(nameAnchor){
  window.location.hash=nameAnchor;
}

function show_credit() { 
  $('#credit').show();
  $('#debit').hide();
}

function show_debit() { 
  $('#credit').hide();
  $('#debit').show();
}