function inWindow() {
	var start   = Date.parse('05/20/2011 8:00:00 PM GMT-0400 '); 
	var end     = Date.parse('05/20/2011 10:00:00 PM GMT-0400 '); 
	var current = new Date();
	
	if((current <= end && current >= start))
		return true

	return false
}

if (inWindow()) {
  if(document.createStyleSheet)
      try { document.createStyleSheet("/css/maintenance.css"); } catch (e) { }
  else
    $('<link />').attr({
        rel: "stylesheet"
      , type: "text/css"
      , media: "screen"
      , href: "/css/maintenance.css"
    }).appendTo('head')
  

  var message = '<div id="message">' +
    '<h2>Arcadia Campus-wide <br /> System Maintenance</h2>' +
    '<p>Currently, Arcadia\'s IT department is performing critical updates on some of the core systems that support the University\'s daily operations. During this time a large number of services will be inaccessible, including <strong>this website (Arcadia.edu)</strong>, <strong>Blackboard</strong>, <strong>Self-Service</strong>, <strong>the Library\'s online databases and catalog</strong> and a number of others. This outage should be completed no later than <strong>3am on Saturday, May 21st</strong>. Thank you for your patience while we work. </p>'+
    '<img class="love_lit" src="/img/love-lit.png" />' +
    '<h3 class="commencement_reminder">P.S. Looking for a video <br />of 2011 Commencement?</h3>' +
    '<img class="commencement_reminder" src="/img/commencement_reminder.png" />' +
  	'<p class="commencement_reminder">Look no further! Here they are: <a href="http://gargoyle.arcadia.edu/ur/2011ugc-webcast.html">Undergraduate Commencement</a> &amp; <a href="http://gargoyle.arcadia.edu/ur/2011gc-webcast.html">Graduate Commencement</a></p>' +
  '</div>'
  
  jQuery(document).ready(function($) {
    $('<div id="curtain"></div>').appendTo('body')
    $('#curtain').prepend(message).height($('body').outerHeight()).fadeIn(250);
  });
}
