/** 
 * Apply form-styling CSS classes
 * v0.5
 */

;(function($) {
  // Plugin
  $.fn.applyFormCSS = function() {

    return this.each(function() {      
      // ----------------------
      // Give text-ish form fields a common class
      $(this).find('input[type=text], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=url] ').addClass('afc-text'); 
      // Buttons
      $(this).find('input[type=button], input[type=reset], input[type=submit]').addClass('afc-button'); 
      // Other field types
      $(this).find('input[type=radio]').addClass('afc-radio'); 
      $(this).find('input[type=checkbox]').addClass('afc-checkbox');
    // ----------------------
    });
  };
  
})(jQuery);


