var messages = new Array();

messages.push("Who are the ad wizards who came up with this one?");

messages.push("Invent Baby, Invent !!");

messages.push("Hey, have you read our blog yet?!?");

messages.push("Bark.");

messages.push("Meow, baby.");

messages.push("I haven't moved from this position in AGES!");

messages.push("I need a bailout!");

messages.push("Is it just me or is it hot in here?");


var d = 0;
var dogTips;
function dogPhrases() {
	if ($('dog') && $('dogTip'))
	{
		//prelad the background images
		var dogTipImageObject = new Image();
		dogTipImageObject.src = "http://staging.sutter-group.com/images/about_us/dog_tip_top.png";
		dogTipImageObject.src = "http://staging.sutter-group.com/images/about_us/dog_tip_middle.png";
        dogTipImageObject.src = "http://staging.sutter-group.com/images/about_us/dog_tip_bottom.png";
		
//$('tip-top').setStyles({'height': 9, 'padding':0,'margin':0});

		$('dog').setStyle('behavior', 'url(/assets/iepngfix/iepngfix.htc)');
		$('dog').addEvent('mouseenter', function() {
			d = (d + 1 < messages.length) ? d + 1 : 0;
			$('tip').set('html', '<p>' + messages[d] + '</p>');
			$('dogTip').setStyle('display', 'block');
			var tipSize = $('tip').getSize();
			$('dogTip').setStyle('top', 165 - tipSize.y);
			
			if (Browser.Engine.trident4)
			{
				if  ( $('tip').getStyle('height').toInt() < 27 )
				{
					$('tip').setStyle('height', 27);
				}
				
				$('dogTip').setStyle('top', 150 - tipSize.y);
				$('tip-bottom').setStyle('behavior', 'url(/assets/iepngfix/iepngfix.htc)');
				$('tip-top').setStyles({'position':'relative', 'top':5, 'zIndex':102, 'behavior':'url(/assets/iepngfix/iepngfix.htc)'});
			}
			else
			{
				$('dogTip').setStyle('top', 165 - tipSize.y);	
			}
		});
		$('dog').addEvent('mouseleave', function() {
			$('dogTip').setStyle('display', 'none');
		});
	}
}

window.addEvent('domready', function()
{dogPhrases();});