Firemediii nailed it.
Each contract is specific. In my area we have X days in the inspection period and X is whatever is negotiated between the parties. The contact can be cancelled at buyers sole discretion during the inspection period - for any reason. But your contract form is different (I'm in Florida and I know NJ uses different forms).
Have your agent go over each part of the contract and ask all your questions before you sign until you are comfortable in signing or deciding against the property.