$(document).ready(function() {
  $.jGrowl.defaults.position = 'center';

  if ($("body").is(":has('#notice')"))
  {
    $.jGrowl($("#notice").html(),{
      corners: "10px",
      life: 3000,
      speed: "normal"
      //theme: $("#notice").attr('class')
    });
    
  }
  if ($("body").is(":has('#notice_sticky')"))
  {
    $.jGrowl($("#notice_sticky").html(),{
      sticky: true,
      corners: "10px",
      speed: "normal"
      //theme: $("#notice_sticky").attr('class')
    });
    
  }

  if ($("body").is(":has('#notice_err')"))
  {
    $.jGrowl($("#notice_err").html(),{
      sticky: true,
      corners: "10px",
      speed: "normal"
      //theme: $("#notice_sticky").attr('class')
    });
    
  }

/*
  $("#login-form").dialog({
    bgiframe: true,
    autoOpen: false,
    resizable: false,
    width:300,
    height:200,
    modal: true,
    overlay: {
        backgroundColor: '#000',
        opacity: 0.7
    },
  });
*/
  
});




function needLogin()
{

  tb_remove();
  
  $.jGrowl('<a href="/login">ログイン</a>してください。<br /><a href="/signup">メンバー登録はこちらです</a>',{
    sticky: false,
    corners: "10px",
    life: 3000,
    speed: "normal"
    //theme: $("#notice").attr('class')
  });
  //tb_show('ログイン', '#TB_inline?height=180&amp;width=320&amp;inlineId=login-form', false);
  
  //$('#login-form').dialog('open');
}
