FGoogleForceConversionPage = '';

window.addEvent('domready', function()
{
	// Enable click on logo
    if($('logo'))
    {
    	$('logo').addEvent('click', function() {
				window.location = '';
				return false;
		});
    }

	// External Links to new window
	$$('a[href^="http://"]').each(function(aLink)
	{
		var aHref = aLink.get('href');
		if (!aHref.contains(window.location.host)) aLink.setProperty('target', '_blank');
	});

	/* Portfolio back link */
	if($('pfbacklink'))
    {
    	$('pfbacklink').addEvent('click', function() {
			history.back();
			return false;
		});
	}

	/* Main menu */
	$$('#mainmenu li').each(function(aLi)
	{
		if (aLi.getElements('ul').length > 0)
		{
			aLi.addEvent('mouseover', function(){this.className = 'hover';});
			aLi.addEvent('mouseout', function(){this.className = '';});
		}
	});

	/* Email marketing form(s) */
	$$('#signupform input, #signupformlarge input').each(function(aInput)
	{
		aInput.addEvent('focus', function(){if(this.value == this.defaultValue || this.value == defaultValue) this.value = '';});
		aInput.addEvent('blur', function(){if(this.value == '') this.value = this.defaultValue;});
	});

	/* Landing Pages activate boxes */
	$$('ul.boxlinks li').each(function(aLi)
	{
		aLi.addEvent('click', function(e)
		{
			aAssociatedLinks = $(this).getElements('a');
			window.location = aAssociatedLinks[0].get('href');
		});
	});
});
