$(document).ready(function() {

	
	get_cookie();
	if(get_cookie("visited"))
	{
		
		$("#important-news-callout-content").hide();
		$("#important-news-callout-bottom").addClass("hide-bottom");
	}
	else{

		set_cookie();
		$("#important-news-callout").addClass("highlight");
	}




$('#important-news-callout').click(function() {

	
	    $(this).toggleClass("highlight").next().slideToggle("normal", function() {
			   
				$(this).next().toggleClass("hide-bottom");
	    });
	  	
});


});


function set_cookie()
{

	var expiredays = 7;
	var cookiedate=new Date();
	cookiedate.setDate(cookiedate.getDate()+expiredays);
	document.cookie = "visited = true; expires=" + cookiedate.toGMTString();

}

function get_cookie(visited)
{
	
   
   var results = document.cookie.match ( '(^|;) ?' + visited + '=([^;]*)(;|$)' );

   if (results)
   {
		return ( unescape ( results[2] ) );
   }
   else
   {
	    return null;
   }

}
