﻿$(document).ready(function()
{        
    
    //*************************************************************************
    //Created By:   Jeff Richmond
    //Created Date: 2008.06.12
    //Section Name: Default Form Buttons
    //Description:  Associates the enter key with a default button for each
    //              sub form
    //*************************************************************************
        $('.SubForm').each( function()
            {
                $(this).keypress( function(e)
                    {
                        if (((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) && e.target.type != 'textarea')
                        {
                            $(this).find('.Default').click();
                            return false;
                        } 
                        else return true;
                    }
                );
            }
        ); //End Default Buttons
});