var isIE64 = navigator.userAgent.indexOf("Win64")>=0;

function closeTranslate()
{
	$("#google_translate_element").slideUp();
	$("#closeTranslate").hide();
	$("#translateFlags").fadeTo(100,.5);
	$("#translateFlags").mouseover(function()
	{
		$("#translateFlags").fadeTo(0,1);
	});
	$("#translateFlags").mouseout(function()
	{
		$("#translateFlags").fadeTo(0,.5);
	});
}

$(document).ready(function()
{
	$(".goog-te-combo").live("change",function()
	{
		closeTranslate();
	});
	$("#closeTranslate").click(function()
	{
		closeTranslate();
	});
	$("#translateFlags").click(function()
	{
		if(isIE64)
			createMessage("Translation not available in the 64-bit<br />edition of Internet Explorer 8 at this time.");
		else
		{
			$(this).fadeTo(0,1);
			$("#google_translate_element").slideDown();
			$("#translateFlags").unbind("mouseover");
			$("#translateFlags").unbind("mouseout");
			$("#closeTranslate").fadeIn();
		}
	});
});