Sorry! We had trouble sending your notice. The servers are overloaded. Please try again, and contact the site administrator if this problem persists.
'); } else { if ($('.'+SN.C.S.Error, xhr.responseXML).length > 0) { form.append(document._importNode($('.'+SN.C.S.Error, xhr.responseXML)[0], true)); } else { if (parseInt(xhr.status) === 0 || jQuery.inArray(parseInt(xhr.status), SN.C.I.HTTP20x30x) >= 0) { $('#'+form_id).resetForm(); $('#'+form_id+' #'+SN.C.S.NoticeDataAttachSelected).remove(); SN.U.FormNoticeEnhancements($('#'+form_id)); } else { form.append('(Sorry! We had trouble sending your notice ('+xhr.status+' '+xhr.statusText+'). Please report the problem to the site administrator if this happens again.
'); } } } }, success: function(data, textStatus) { $('#'+form_id+' .form_response').remove(); var result; if ($('#'+SN.C.S.Error, data).length > 0) { result = document._importNode($('p', data)[0], true); result = result.textContent || result.innerHTML; form.append(''+result+'
'); } else { if($('body')[0].id == 'bookmarklet') { self.close(); } if ($('#'+SN.C.S.CommandResult, data).length > 0) { result = document._importNode($('p', data)[0], true); result = result.textContent || result.innerHTML; form.append(''+result+'
'); } else { var notices = $('#notices_primary .notices'); if (notices.length > 0) { var notice = document._importNode($('li', data)[0], true); if ($('#'+notice.id).length === 0) { var notice_irt_value = $('#'+SN.C.S.NoticeInReplyTo).val(); var notice_irt = '#notices_primary #notice-'+notice_irt_value; if($('body')[0].id == 'conversation') { if(notice_irt_value.length > 0 && $(notice_irt+' .notices').length < 1) { $(notice_irt).append(''+result_title+'
'); } } $('#'+form_id).resetForm(); $('#'+form_id+' #'+SN.C.S.NoticeDataAttachSelected).remove(); SN.U.FormNoticeEnhancements($('#'+form_id)); } }, complete: function(xhr, textStatus) { form.removeClass(SN.C.S.Processing); $('#'+form_id+' #'+SN.C.S.NoticeActionSubmit).removeAttr(SN.C.S.Disabled); $('#'+form_id+' #'+SN.C.S.NoticeActionSubmit).removeClass(SN.C.S.Disabled); } }); }, NoticeReply: function() { if ($('#'+SN.C.S.NoticeDataText).length > 0 && $('#content .notice_reply').length > 0) { $('#content .notice').each(function() { SN.U.NoticeReplyTo($(this)); }); } }, NoticeReplyTo: function(notice_item) { var notice = notice_item[0]; var notice_reply = $('.notice_reply', notice)[0]; if (jQuery.data(notice_reply, "ElementData") === undefined) { jQuery.data(notice_reply, "ElementData", {Bind:'submit'}); $(notice_reply).bind('click', function() { var nickname = ($('.author .nickname', notice).length > 0) ? $($('.author .nickname', notice)[0]) : $('.author .nickname.uid'); SN.U.NoticeReplySet(nickname.text(), $($('.notice_id', notice)[0]).text()); return false; }); } }, NoticeReplySet: function(nick,id) { if (nick.match(SN.C.I.PatternUsername)) { var text = $('#'+SN.C.S.NoticeDataText); if (text.length > 0) { replyto = '@' + nick + ' '; text.val(replyto + text.val().replace(RegExp(replyto, 'i'), '')); $('#'+SN.C.S.FormNotice+' #'+SN.C.S.NoticeInReplyTo).val(id); text[0].focus(); if (text[0].setSelectionRange) { var len = text.val().length; text[0].setSelectionRange(len,len); } } } }, NoticeFavor: function() { $('.form_favor').each(function() { SN.U.FormXHR($(this)); }); $('.form_disfavor').each(function() { SN.U.FormXHR($(this)); }); }, NoticeRepeat: function() { $('.form_repeat').each(function() { SN.U.FormXHR($(this)); SN.U.NoticeRepeatConfirmation($(this)); }); }, NoticeRepeatConfirmation: function(form) { function NRC() { form.closest('.notice-options').addClass('opaque'); form.addClass('dialogbox'); form.append(''); form.find('button.close').click(function(){ $(this).remove(); form.closest('.notice-options').removeClass('opaque'); form.removeClass('dialogbox'); form.find('.submit_dialogbox').remove(); form.find('.submit').show(); return false; }); }; form.find('.submit').bind('click', function(e) { e.preventDefault(); var submit = form.find('.submit').clone(); submit.addClass('submit_dialogbox'); submit.removeClass('submit'); form.append(submit); $(this).hide(); NRC(); }); }, NoticeAttachments: function() { $('.notice a.attachment').each(function() { SN.U.NoticeWithAttachment($(this).closest('.notice')); }); }, NoticeWithAttachment: function(notice) { if ($('.attachment', notice).length === 0) { return; } var notice_id = notice.attr('id'); $.fn.jOverlay.options = { method : 'GET', data : '', url : '', color : '#000', opacity : '0.6', zIndex : 9999, center : false, imgLoading : $('address .url')[0].href+'theme/base/images/illustrations/illu_progress_loading-01.gif', bgClickToClose : true, success : function() { $('#jOverlayContent').append(''); $('#jOverlayContent button').click($.closeOverlay); }, timeout : 0, autoHide : true, css : {'max-width':'542px', 'top':'5%', 'left':'32.5%'} }; $('#'+notice_id+' a.attachment').click(function() { $().jOverlay({url: $('address .url')[0].href+'attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'}); return false; }); var t; $("body:not(#shownotice) #"+notice_id+" a.thumbnail").hover( function() { var anchor = $(this); $("a.thumbnail").children('img').hide(); anchor.closest(".entry-title").addClass('ov'); if (anchor.children('img').length === 0) { t = setTimeout(function() { $.get($('address .url')[0].href+'attachment/' + (anchor.attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) { anchor.append(data); }); }, 500); } else { anchor.children('img').show(); } }, function() { clearTimeout(t); $("a.thumbnail").children('img').hide(); $(this).closest(".entry-title").removeClass('ov'); } ); }, NoticeDataAttach: function() { NDA = $('#'+SN.C.S.NoticeDataAttach); NDA.change(function() { S = ''+$(this).val()+'