function getNotifCount(){$("#notification-anchor").load("/notification/GetNotificationCount",function(){var n=$("#notif-count tspan").text()==""?"0":$("#notif-count tspan").text(),t;$("input[name=notificationCount]").val(n);n>0?$("#notification-holder-erina").hasClass("notification-holder-erina-animation")||$("#notification-holder-erina").addClass("notification-holder-erina-animation"):$("#notification-holder-erina").hasClass("notification-holder-erina-animation")||$("#notification-holder-erina").removeClass("notification-holder-erina-animation");t=$("input[name=reloadCount]").val();$("input[name=reloadCount]").val(parseInt($("input[name=reloadCount]").val())+1);(t>6||n!=$("input[name=previousCount]").val())&&loadNotifications()})}function loadNotifications(){$("#notification-loading").css("display","block");$("#notification-box-holder").load("/notification/open",function(){$("#notification-loading").css("display","none");$("#notification-box-holder").find(".timeago").timeago();$("input[name=previousCount]").val($("input[name=notificationCount]").val());$("input[name=reloadCount]").val(0)})}function openNotifications(){$("input[name=notificationStatus]").val("1");loadNotifications();$("#notification-box").animate({height:"show"},200)}function toggleNotifications(){$("#notification-box").is(":visible")?closeNotifications():openNotifications()}function closeNotifications(){$("input[name=notificationStatus]").val("0");$("#notification-box").animate({height:"hide"},200)}function loadMoreNotifications(){$("#notification-more-loading").css("display","block");$("#viewmore-button").css("display","none");var n=$("#viewmore-button").attr("data-index");$("#viewmore-container-"+n).load("/notification/openmore?index="+n,function(){$("#viewmore-container-"+n).find(".timeago").timeago();$("#notification-more-loading").css("display","none")})}function readAllNotifications(){$.get("/notification/readall",function(){$(".notification-textbox-mask").css("display","none");$("#notification-anchor").html('<image id="notification-holder-erina" width="56" height="50" x="0" y="4" xlink:href="/images/interface/erina-hold-small.png"><\/image>');closeNotifications()})}$(document).click(function(){});$("body").keydown(function(n){n.keyCode==27&&(closeNotifications(),$("#sidemenu").animate({width:"hide"},350),$(".wysibb-toolbar").find(".wysibb-toolbar-content").hide("fast"))})