Roth 401k rollover rules?

Roth 401k rollover rules?

I have been contributing to my Roth 401k for the last year and am now considering looking for a new job so that I can make even more money and contribute even more to my retirement.  When I leave my current employer I plan on rolling over both my Traditional 401k balance to a Traditional IRA and my Roth 401k balance to a Roth IRA.

Now seeing as how a Roth 401k is so new and so few companies have it I’m guessing I’m probably one of the leading pioneers here.  My question revolves around how my Roth 401k rollover will be viewed by Uncle Sam.  Seeing as how in a Roth IRA you can withdraw your contributions without penalty, when I roll over my Roth 401k will that just be considered one big contribution OR will they take them time to sort out investment gains from contributions in my Roth 401k and somehow relay this onto my new Roth IRA custodian?

I only have maybe $1500 in investment gains this year so its not a huge deal, but was wondering if this may be some sort of loophole for the Retire early crowd having access to more of your Roth IRA balance before age 59.5.