$().ready(function() {

  var alertClose = function(hash){
	  $.cookie('alert_closed', false, {expires: 50});
	  hash.w.fadeOut('1000',function(){ 
		  hash.o.remove(); 
	  }); 
  }; 

  if (!$.cookie('alert_closed')){
	$('#launcher').jqm({
		overlay: 0,
		onHide: alertClose
	}).jqmShow();
  }
  
  $('.jqmAlertWindow').click(function(){
	  $.cookie('alert_closed', false, {expires: 50});
	  window.location.href = $('#goto').attr('href');
  });
  
  if($.browser.msie) {
  $('div.jqmAlert .jqmClose')
  .hover(
    function(){ $(this).addClass('jqmCloseHover'); }, 
    function(){ $(this).removeClass('jqmCloseHover'); });
  }

});
