var $isHomepage = true;
if( location.href.search("\.edu/.*/" ) > -1 )
{
	$isHomepage = false;
}
	

function showalert()
{
	if( !$.cookie("ucaalert") || $isHomepage )
	{
		$("#ucaalert").show("blind", {}, 1000);
		$("#ucaalertclose").click(closealert);
	}
	else
	{
		$("#ucaalertclosed").show(1000);
		$("#ucaalertclosed").click(reshowalert);
	}
}
function closealert()
{
	$("#ucaalert").hide("blind", {}, 1000);
	$("#ucaalertclosed").show(1000);
	$("#ucaalertclosed").click(reshowalert);
	setCookie("ucaalert","closed");
}
function reshowalert()
{
	$("#ucaalertclosed").hide(1000);
	setCookie("ucaalert","");
	showalert();
}
function setCookie(name, value)
{
	if( value == "" )
		value = null;
	//var expireDate = new Date("December 31, 2020 00:00:00");
	var expireDate = getExpDate(0,8,0);
	var cookieExpire = expireDate.toGMTString();
	var options = { expires: expireDate, path: '/' };
	$.cookie(name, value, options);
}
function getExpDate(days, hours, minutes)
{
    var expDate = new Date();
    if (typeof days == "number" && typeof hours == "number" && typeof hours == "number")
	{
        expDate.setDate(expDate.getDate() + parseInt(days));
        expDate.setHours(expDate.getHours() + parseInt(hours));
        expDate.setMinutes(expDate.getMinutes() + parseInt(minutes));
        return expDate;//.toGMTString();
    }
}

setTimeout('showalert()',500);
