If you look at the heading 'Parental Leave' under this link:
http://www.ers.dol.govt.nz/factsheets/#pl
you should see a whole raft of stuff that will be useful to you. as far as I'm aware you can start your parental leave up to six weeks before you're due, and if you have a medical reason all the better. (The 'general entitlements' factsheet has a good summary of everything, but i would suggest checking them all out, even better if you have a printer?)
as far as applying for it, you can apply anytime, as long as it gives your employer three months notice. luckily now the regulations have changed so that the entitlement for working for someone for 12 months, and then for only 6 months, are now the same.
you'll probably have to check with your companys HR department about whether or not you'd be eligible for unpaid leave of up to 52 weeks, and then perhaps need to go into further discussion with a manager about whether they'd offer you flexible hours upon return, top up your entitlement during the paid part of your leave, or anything like that.
luckily i will just scrape in for the 14 weeks paid, but no unpaid is available to me, and no top up either

anyway, i won't moan at y'all about it
hope all of that helps !