﻿var debug = true;
var log = function(str)
{
	if (debug && typeof (console) != 'undefined')
	{
		console.log(str);
	}
}
$(document).ready(function()
{
	$("p.failure, p.success").fadeIn(2000);
	// trackEvents on clicks of links.
	$("a").gaAddon({ trackInternal: true });

	// google translate effs up all the menus, need to do this to "fix" them.
	var href = window.location.href;
	if (href.indexOf('/translate_c?') != -1)
	{
		$("li > span").each(
			function()
			{
				if ($(this).attr("onmouseout") != 'undefined')
				{
					$(this).attr("style", "margin:0px;padding:0px;");
				}
			}
		);
		$("span.google-src-text").attr("style", "margin:0px;padding:0px;");
	}
});
