﻿/// <reference path="jquery-1.3.2-vsdoc.js" />

jQuery.fn.defaultButton = function(buttonID) {
    /// <summary>
    /// Sets the default button to be clicked when the user hits the 'enter' button.
    /// </summary>
    /// <param name="buttonID" type="String">The button ID to be clicked.</param>
    
    this.keypress(
        function(e) {
            if(e.keyCode == 13) {
                $("#" + buttonID).click();
                return false;
            }
        }
    );
};

jQuery.fn.delay = function(time,func){
	this.each(function(){
		setTimeout(func,time);
	});
	
	return this;
};