function initProductPhotos()
{
	$('div#overview p img').mouseover(changePhoto);	
}

function changePhoto()
{
	var newSrc = this.src.replace('_th.', '.');
	$('img#bigPhoto').attr('src', newSrc);
	
	var title = newSrc.substring(newSrc.lastIndexOf('/')+1).replace('_', ' - ');
	title = title.substring(0, title.lastIndexOf('.jpg'));
	title = ucWords(title);
	title = title.replace('%20', ' ');
	$('div#photoDesc h3').text(title);
}

function ucWords(str) {
   // split string on spaces
   arrStr = str.split(" ");

   var strOut = '';

   for (i=0;i<arrStr.length;i++)
   {
       // split string
       firstChar = arrStr[i].substring(0,1);
       remainChar = arrStr[i].substring(1);

       // convert case
       firstChar = firstChar.toUpperCase(); 

       strOut += firstChar + remainChar + ' ';
   }

   // return string, but drop the last space
   return strOut.substring(0, strOut.length - 1);
}