This snippet wraps around your homepage-specific code in order to only display when on the homepage of your store.
<?php
// IF WE ARE ON HOMEPAGE
if(
Mage::getSingleton('cms/page')->getIdentifier() == 'home' &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms'
) : ?>
// Put your homepage-only code in here.
<?php endif; ?>
The ‘home’ identifier may be different for your site so amend as necessary.