My good buddy Ted Pattison just published an article with the MSDN Magazine entitled “Automated SharePoint Site Branding”. He discusses many different ways to programmatically activate SharePoint branding such as master pages, images, alternate CSS and more. He even discusses switching out the application master pages as well.