Yes, you can deduct both the state taxes paid on your schedule A. This is a very common occurence for NJ residents who commute to NY.
The federal return is very simple, the problem is filing the individual state returns.
You will be required to fill a multi-state tax return, and I would recommend you find a good CPA or tax preparer who is experienced in preparing multi-state tax returns. It will be well worth the money.