Then find the OS X install disk for the original iMac (more on using that after the transfer) and then use the fastest port common on both Mac and cable between the old iMac and the new Mac. Then on the new Mac open /Applications/Utilities/Migration assistant. Then use that to transfer anything you want (iTunes music, pictures/documents you want) and then let that run at night to transfer to the new Mac.
Then the next day if you are satisfied with the transfer, log into the OLD iMac and open iTunes and in the iTunes menu items click on the 'Store' menu item and select to "Deauthorize This computer" so the iTunes Music Store will not count that computer to your account anymore.
Lastly on the old iMac boot with the OS X install disk and do wipe and fresh install. This way on you new Mac's iTunes account go back to the iTunes menu item Store and add the computer to your iTunes account.