Selecting Top X records per group SQL Server 2005

Selecting top x number of records per group is something I needed to implement recently, using the build in functions of SQL Server 2005, it can be done quite easily.
Selecting top x records per group basically divides the data into groups based onĀ  a particular field, and then order the records only in that group [...]