You can file an affidavit in opposition up to 5 days prior to the hearing or 2 days if it is physically delivered prior to 5 PM.
Please note that the above is not intended as legal advice, it is for educational purposes only. No attorney-client relationship is created or is intended to be created hereby. You should contact a local attorney to discuss and to obtain legal advice.
Margery Golant is correct. Pay attention also to another requirement: You must be give at least 20-days notice of the Motion for Summary Judgment ("MSJ") before a hearing can be held by the Court about the MSJ. For example, if you received the MSJ on October 1, 2013 and a hearing is held on October 11, 2013 (a mere 10 days later), you have not been given enough time to respond to the MSJ.
With that being said, you can defeat a Motion for Summary Judgment, but a lawyer can really help you significantly at this stage of the game. If you wait much longer, you will may not give a lawyer enough time to prepare a defense for you. Good luck.