]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frost/js/main.min.js
basic video playback support using VideoJS
[friendica.git] / view / theme / frost / js / main.min.js
index 9952000d5339ab09bbf7e778454e50f169fbec7b..1752563dcf9c889f8440021d0119e7dd0951480a 100644 (file)
@@ -1 +1 @@
-function openClose(e){document.getElementById(e).style.display=="block"?document.getElementById(e).style.display="none":document.getElementById(e).style.display="block"}function openMenu(e){document.getElementById(e).style.display="block"}function closeMenu(e){document.getElementById(e).style.display="none"}function NavUpdate(){if(!stopped){var e="ping"+(localUser!=0?"?f=&uid="+localUser:"");$j.get(e,function(e){$j(e).find("result").each(function(){$j("nav").trigger("nav-update",this),$j("#live-network").length&&(src="network",liveUpdate()),$j("#live-profile").length&&(src="profile",liveUpdate()),$j("#live-community").length&&(src="community",liveUpdate()),$j("#live-notes").length&&(src="notes",liveUpdate()),$j("#live-display").length&&(src="display",liveUpdate()),$j("#live-photos").length&&liking&&(liking=0,window.location.href=window.location.href)})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$j(".like-rotator").hide();return}if($j(".comment-edit-text-full").length||in_progress){livetime&&clearTimeout(livetime),livetime=setTimeout(liveUpdate,1e4);return}livetime!=null&&(livetime=null),prev="live-"+src,in_progress=!0;var e=netargs.length?"/"+netargs:"",t="update_"+src+e+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$j.get(t,function(e){in_progress=!1,$j(".toplevel_item",e).each(function(){var e=$j(this).attr("id");if($j("#"+e).length==0&&profile_page==1)$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("#"+prev).after($j(this));else{var t=$j(".hide-comments-total",this).attr("id");if(typeof t!="undefined"){t=t.split("-")[3];var n=$j("#collapsed-comments-"+t).is(":visible")}$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("html").height($j("html").height()),$j("#"+e).replaceWith($j(this)),typeof t!="undefined"&&n&&showHideComments(t),$j("html").height("auto")}prev=e}),$j(".like-rotator").hide(),commentBusy&&(commentBusy=!1,$j("body").css("cursor","auto")),$j(".comment-edit-form  textarea").contact_autocomplete(baseurl+"/acl");var t=$j(".wall-item-body > img").not(function(){return this.complete}),n=t.length;n?t.load(function(){n--,n||collapseHeight()}):collapseHeight()})}function collapseHeight(){$j(".wall-item-body").each(function(){$j(this).height()>410&&($j(this).hasClass("divmore")||($j(this).divgrow({initialHeight:400,showBrackets:!1,speed:300}),$j(this).addClass("divmore")))})}function imgbright(e){$j(e).removeClass("drophide").addClass("drop")}function imgdull(e){$j(e).removeClass("drop").addClass("drophide")}function dolike(e,t){unpause(),$j("#like-rotator-"+e.toString()).show(),$j.get("like/"+e.toString()+"?verb="+t,NavUpdate),liking=1}function dostar(e){e=e.toString(),$j.get("starred/"+e,function(t){t.match(/1/)?($j("#starred-"+e).addClass("starred"),$j("#starred-"+e).removeClass("unstarred"),$j("#star-"+e).addClass("hidden"),$j("#unstar-"+e).removeClass("hidden")):($j("#starred-"+e).addClass("unstarred"),$j("#starred-"+e).removeClass("starred"),$j("#star-"+e).removeClass("hidden"),$j("#unstar-"+e).addClass("hidden"))})}function getPosition(e){var t={x:0,y:0};if(e.pageX||e.pageY)t.x=e.pageX,t.y=e.pageY;else if(e.clientX||e.clientY)t.x=e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft,t.y=e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop;else if(e.x||e.y)t.x=e.x,t.y=e.y;return t}function lockview(e,t){e=e||window.event,cursor=getPosition(e),lockvisible?lockviewhide():(lockvisible=!0,$j.get("lockview/"+t,function(e){$j("#panel").html(e),$j("#panel").css({left:cursor.x+5,top:cursor.y+5}),$j("#panel").show()}))}function lockviewhide(){lockvisible=!1,$j("#panel").hide()}function post_comment(e){return unpause(),commentBusy=!0,$j("body").css("cursor","wait"),$j("#comment-preview-inp-"+e).val("0"),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){if(t.success){$j("#comment-edit-wrapper-"+e).hide(),$j("#comment-edit-text-"+e).val("");var n=document.getElementById("comment-edit-text-"+e);n&&commentClose(n,e),timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,10)}t.reload&&(window.location.href=t.reload)},"json"),!1}function preview_comment(e){return $j("#comment-preview-inp-"+e).val("1"),$j("#comment-edit-preview-"+e).show(),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){t.preview&&($j("#comment-edit-preview-"+e).html(t.preview),$j("#comment-edit-preview-"+e+" a").click(function(){return!1}))},"json"),!0}function showHideComments(e){$j("#collapsed-comments-"+e).is(":visible")?($j("#collapsed-comments-"+e).hide(),$j("#hide-comments-"+e).html(window.showMore)):($j("#collapsed-comments-"+e).show(),$j("#hide-comments-"+e).html(window.showFewer))}function preview_post(){return $j("#jot-preview").val("1"),$j("#jot-preview-content").show(),tinyMCE.triggerSave(),$j.post("item",$j("#profile-jot-form").serialize(),function(e){e.preview&&($j("#jot-preview-content").html(e.preview),$j("#jot-preview-content a").click(function(){return!1}))},"json"),$j("#jot-preview").val("0"),!0}function unpause(){totStopped=!1,stopped=!1,$j("#pause").html("")}function bin2hex(e){var t,n,r=0,i=[];e+="",r=e.length;for(n=0;n<r;n++)i[n]=e.charCodeAt(n).toString(16).replace(/^([\da-f])$/,"0$1");return i.join("")}function groupChangeMember(e,t,n){$j("body .fakelink").css("cursor","wait"),$j.get("group/"+e+"/"+t+"?t="+n,function(e){$j("#group-update-wrapper").html(e),$j("body .fakelink").css("cursor","auto")})}function profChangeMember(e,t){$j("body .fakelink").css("cursor","wait"),$j.get("profperm/"+e+"/"+t,function(e){$j("#prof-update-wrapper").html(e),$j("body .fakelink").css("cursor","auto")})}function contactgroupChangeMember(e,t){$j("body").css("cursor","wait"),$j.get("contactgroup/"+e+"/"+t,function(e){$j("body").css("cursor","auto")})}function checkboxhighlight(e){$j(e).is(":checked")?$j(e).addClass("checkeditem"):$j(e).removeClass("checkeditem")}function notifyMarkAll(){$j.get("notify/mark/all",function(e){timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,1e3)})}function fcFileBrowser(e,t,n,r){var i=baseurl+"/fbrowser/"+n+"/";return tinyMCE.activeEditor.windowManager.open({file:i,title:"File Browser",width:420,height:400,resizable:"yes",inline:"yes",close_previous:"no"},{window:r,input:e}),!1}function setupFieldRichtext(){tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:"fieldRichtext",plugins:"bbcode,paste, inlinepopups",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",convert_urls:!1,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:!1,file_browser_callback:"fcFileBrowser"})}function previewTheme(e){theme=$j(e).val(),$j.getJSON("pretheme?f=&theme="+theme,function(e){$j("#theme-preview").html('<div id="theme-desc">'+e.desc+'</div><div id="theme-version">'+e.version+'</div><div id="theme-credits">'+e.credits+'</div><a href="'+e.img+'"><img src="'+e.img+'" width="320" height="240" alt="'+theme+'" /></a>')})}var src=null,prev=null,livetime=null,msie=!1,stopped=!1,totStopped=!1,timer=null,pr=0,liking=0,in_progress=!1,langSelect=!1,commentBusy=!1,last_popup_menu=null,last_popup_button=null;$j(function(){function e(e){last_popup_menu&&"#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")&&(last_popup_menu.hide(),last_popup_button.removeClass("selected"),last_popup_menu=null,last_popup_button=null)}$j.ajaxSetup({cache:!1}),msie=$j.browser.msie,$j(".onoff input").each(function(){val=$j(this).val(),id=$j(this).attr("id"),$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")}),$j(".onoff > a").click(function(e){e.preventDefault();var t=$j(this).siblings("input"),n=1-t.val(),r=t.attr("id");$j("#"+r+"_onoff ."+(n==0?"on":"off")).addClass("hidden"),$j("#"+r+"_onoff ."+(n==1?"on":"off")).removeClass("hidden"),t.val(n)}),setupFieldRichtext(),$j("a[rel^=#]").click(function(t){return e(t),menu=$j($j(this).attr("rel")),t.preventDefault(),t.stopPropagation(),menu.attr("popup")=="false"?!1:($j(this).parent().toggleClass("selected"),menu.slideToggle("fast"),menu.css("display")=="none"?(last_popup_menu=null,last_popup_button=null):(last_popup_menu=menu,last_popup_button=$j(this).parent()),!1)}),$j("html").click(function(t){e(t)}),$j("a.popupbox").fancybox({transitionIn:"none",transitionOut:"none"});var t=unescape($j("#nav-notifications-template[rel=template]").html()),n=unescape($j("<div>").append($j("#nav-notifications-see-all").clone()).html()),r=unescape($j("<div>").append($j("#nav-notifications-mark-all").clone()).html()),i=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,s){var o=$j(s).find("invalid").text();o==1&&(window.location.href=window.location.href);var u=$j(s).find("net").text();u==0?(u="",$j("#net-update").removeClass("show")):$j("#net-update").addClass("show"),$j("#net-update").html(u);var a=$j(s).find("home").text();a==0?(a="",$j("#home-update").removeClass("show")):$j("#home-update").addClass("show"),$j("#home-update").html(a);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update").removeClass("show")):$j("#intro-update").addClass("show"),$j("#intro-update").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update").removeClass("show")):$j("#mail-update").addClass("show"),$j("#mail-update").html(l);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update-li").removeClass("show")):$j("#intro-update-li").addClass("show"),$j("#intro-update-li").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update-li").removeClass("show")):$j("#mail-update-li").addClass("show"),$j("#mail-update-li").html(l);var c=$j(s).find("notif");c.children("note").length==0?$j("#nav-notifications-menu").html(i):(nnm=$j("#nav-notifications-menu"),nnm.html(n+r),c.children("note").each(function(){e=$j(this),text=e.text().format("<span class='contactname'>"+e.attr("name")+"</span>"),html=t.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen")),nnm.append(html)})),notif=c.attr("count"),notif>0?$j("#nav-notifications-linkmenu").addClass("on"):$j("#nav-notifications-linkmenu").removeClass("on"),notif==0?(notif="",$j("#notify-update").removeClass("show")):$j("#notify-update").addClass("show"),$j("#notify-update").html(notif);var h=$j(s).find("sysmsgs");h.children("notice").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"notice",life:3e3})}),h.children("info").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"info",life:1e3})})}),NavUpdate(),$j(document).keydown(function(e){if(e.keyCode=="8"){var t=e.target||e.srcElement;if(!/input|textarea/i.test(t.nodeName))return!1}e.keyCode=="19"||e.ctrlKey&&e.which=="32"?(e.preventDefault(),stopped==0?(stopped=!0,e.ctrlKey&&(totStopped=!0),$j("#pause").html('<img src="images/pause.gif" alt="pause" style="border: 1px solid black;" />')):unpause()):totStopped||unpause()})});var lockvisible=!1;String.prototype.format=function(){var e=this;for(var t=0;t<arguments.length;t++){var n=new RegExp("\\{"+t+"\\}","gi");e=e.replace(n,arguments[t])}return e},Array.prototype.remove=function(e){to=undefined,from=this.indexOf(e);var t=this.slice((to||from)+1||this.length);return this.length=from<0?this.length+from:from,this.push.apply(this,t)};
\ No newline at end of file
+function openClose(listID){listID="#"+listID.replace(/:/g,"\\:");listID=listID.replace(/\./g,"\\.");listID=listID.replace(/@/g,"\\@");if($j(listID).is(":visible")){$j(listID).hide();$j(listID+"-wrapper").show()}else{$j(listID).show();$j(listID+"-wrapper").hide()}}function openMenu(theID){document.getElementById(theID).style.display="block"}function closeMenu(theID){document.getElementById(theID).style.display="none"}var src=null;var prev=null;var livetime=null;var msie=false;var stopped=false;var totStopped=false;var timer=null;var pr=0;var liking=0;var in_progress=false;var langSelect=false;var commentBusy=false;var last_popup_menu=null;var last_popup_button=null;$j(function(){$j.ajaxSetup({cache:false});msie=$j.browser.msie;collapseHeight();$j(".onoff input").each(function(){val=$j(this).val();id=$j(this).attr("id");$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")});$j(".onoff > a").click(function(event){event.preventDefault();var input=$j(this).siblings("input");var val=1-input.val();var id=input.attr("id");$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden");$j("#"+id+"_onoff ."+(val==1?"on":"off")).removeClass("hidden");input.val(val)});function close_last_popup_menu(e){if(last_popup_menu){if("#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")){last_popup_menu.hide();last_popup_button.removeClass("selected");last_popup_menu=null;last_popup_button=null}}}$j("a[rel^=#]").click(function(e){close_last_popup_menu(e);menu=$j($j(this).attr("rel"));e.preventDefault();e.stopPropagation();if(menu.attr("popup")=="false")return false;$j(this).parent().toggleClass("selected");menu.slideToggle("fast");if(menu.css("display")=="none"){last_popup_menu=null;last_popup_button=null}else{last_popup_menu=menu;last_popup_button=$j(this).parent()}return false});$j("html").click(function(e){close_last_popup_menu(e)});$j("a.popupbox").colorbox({inline:true,transition:"elastic"});var notifications_tpl=unescape($j("#nav-notifications-template[rel=template]").html());var notifications_all=unescape($j("<div>").append($j("#nav-notifications-see-all").clone()).html());var notifications_mark=unescape($j("<div>").append($j("#nav-notifications-mark-all").clone()).html());var notifications_empty=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,data){var invalid=$j(data).find("invalid").text();if(invalid==1){window.location.href=window.location.href}var net=$j(data).find("net").text();if(net==0){net="";$j("#net-update").removeClass("show")}else{$j("#net-update").addClass("show")}$j("#net-update").html(net);var home=$j(data).find("home").text();if(home==0){home="";$j("#home-update").removeClass("show")}else{$j("#home-update").addClass("show")}$j("#home-update").html(home);var intro=$j(data).find("intro").text();if(intro==0){intro="";$j("#intro-update").removeClass("show")}else{$j("#intro-update").addClass("show")}$j("#intro-update").html(intro);var mail=$j(data).find("mail").text();if(mail==0){mail="";$j("#mail-update").removeClass("show")}else{$j("#mail-update").addClass("show")}$j("#mail-update").html(mail);var intro=$j(data).find("intro").text();if(intro==0){intro="";$j("#intro-update-li").removeClass("show")}else{$j("#intro-update-li").addClass("show")}$j("#intro-update-li").html(intro);var mail=$j(data).find("mail").text();if(mail==0){mail="";$j("#mail-update-li").removeClass("show")}else{$j("#mail-update-li").addClass("show")}$j("#mail-update-li").html(mail);var eNotif=$j(data).find("notif");if(eNotif.children("note").length==0){$j("#nav-notifications-menu").html(notifications_empty)}else{nnm=$j("#nav-notifications-menu");nnm.html(notifications_all+notifications_mark);eNotif.children("note").each(function(){e=$j(this);text=e.text().format("<span class='contactname'>"+e.attr("name")+"</span>");html=notifications_tpl.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen"));nnm.append(html)});$j("img[data-src]",nnm).each(function(i,el){$j(el).attr("src",$j(el).data("src"))})}notif=eNotif.attr("count");if(notif>0){$j("#nav-notifications-linkmenu").addClass("on")}else{$j("#nav-notifications-linkmenu").removeClass("on")}if(notif==0){notif="";$j("#notify-update").removeClass("show")}else{$j("#notify-update").addClass("show")}$j("#notify-update").html(notif);var eSysmsg=$j(data).find("sysmsgs");eSysmsg.children("notice").each(function(){text=$j(this).text();$j.jGrowl(text,{sticky:false,theme:"notice",life:3e3})});eSysmsg.children("info").each(function(){text=$j(this).text();$j.jGrowl(text,{sticky:false,theme:"info",life:1e3})})});NavUpdate();$j(document).keydown(function(event){if(event.keyCode=="8"){var target=event.target||event.srcElement;if(!/input|textarea/i.test(target.nodeName)){return false}}if(event.keyCode=="19"||event.ctrlKey&&event.which=="32"){event.preventDefault();if(stopped==false){stopped=true;if(event.ctrlKey){totStopped=true}$j("#pause").html('<img src="images/pause.gif" alt="pause" style="border: 1px solid black;" />')}else{unpause()}}else{if(!totStopped){unpause()}}})});function NavUpdate(){if(!stopped){var pingCmd="ping"+(localUser!=0?"?f=&uid="+localUser:"");$j.get(pingCmd,function(data){$j(data).find("result").each(function(){$j("nav").trigger("nav-update",this);if($j("#live-network").length){src="network";liveUpdate()}if($j("#live-profile").length){src="profile";liveUpdate()}if($j("#live-community").length){src="community";liveUpdate()}if($j("#live-notes").length){src="notes";liveUpdate()}if($j("#live-display").length){src="display";liveUpdate()}if($j("#live-photos").length){if(liking){liking=0;window.location.href=window.location.href}}})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||typeof profile_uid=="undefined"||!profile_uid){$j(".like-rotator").hide();return}if($j(".comment-edit-text-full").length||in_progress){if(livetime){clearTimeout(livetime)}livetime=setTimeout(liveUpdate,1e4);return}if(livetime!=null)livetime=null;prev="live-"+src;in_progress=true;var udargs=netargs.length?"/"+netargs:"";var update_url="update_"+src+udargs+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$j.get(update_url,function(data){in_progress=false;$j(".toplevel_item",data).each(function(){var ident=$j(this).attr("id");if($j("#"+ident).length==0&&profile_page==1){$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))});$j("#"+prev).after($j(this))}else{var id=$j(".hide-comments-total",this).attr("id");if(typeof id!="undefined"){id=id.split("-")[3];var commentsOpen=$j("#collapsed-comments-"+id).is(":visible")}$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))});$j("html").height($j("html").height());$j("#"+ident).replaceWith($j(this));if(typeof id!="undefined"){if(commentsOpen)showHideComments(id)}$j("html").height("auto")}$j("#"+ident+" .wall-item-body a img").each(function(){var aElem=$j(this).parent();var imgHref=aElem.attr("href");if(imgHref.match(/\/photo\/[a-fA-F0-9]+(-[0-9]\.[\w]+?)?$/)){var cBoxClass=$j(this).closest(".wall-item-body").attr("id")+"-lightbox";$j(this).addClass(cBoxClass);aElem.colorbox({maxHeight:"90%",photo:true,rel:cBoxClass})}});prev=ident});$j(".like-rotator").hide();if(commentBusy){commentBusy=false;$j("body").css("cursor","auto")}$j(".comment-edit-form  textarea").contact_autocomplete(baseurl+"/acl");collapseHeight();_V_.autoSetup()})}function collapseHeight(elems){var elemName=".wall-item-body:not(.divmore)";if(typeof elems!="undefined"){elemName=elems+" "+elemName}$j(elemName).each(function(){if($j(this).height()>450){$j("html").height($j("html").height());$j(this).divgrow({initialHeight:400,showBrackets:false,speed:0});$j(this).addClass("divmore");$j("html").height("auto")}})}function dolike(ident,verb){unpause();$j("#like-rotator-"+ident.toString()).show();$j.get("like/"+ident.toString()+"?verb="+verb,NavUpdate);liking=1}function dostar(ident){ident=ident.toString();$j.get("starred/"+ident,function(data){if(data.match(/1/)){$j("#starred-"+ident).addClass("starred");$j("#starred-"+ident).removeClass("unstarred");$j("#star-"+ident).addClass("hidden");$j("#unstar-"+ident).removeClass("hidden")}else{$j("#starred-"+ident).addClass("unstarred");$j("#starred-"+ident).removeClass("starred");$j("#star-"+ident).removeClass("hidden");$j("#unstar-"+ident).addClass("hidden")}})}function getPosition(e){var cursor={x:0,y:0};if(e.pageX||e.pageY){cursor.x=e.pageX;cursor.y=e.pageY}else{if(e.clientX||e.clientY){cursor.x=e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;cursor.y=e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}else{if(e.x||e.y){cursor.x=e.x;cursor.y=e.y}}}return cursor}var lockvisible=false;function lockview(event,id){event=event||window.event;cursor=getPosition(event);if(lockvisible){lockviewhide()}else{lockvisible=true;$j.get("lockview/"+id,function(data){$j("#panel").html(data);$j("#panel").css({left:cursor.x+5,top:cursor.y+5});$j("#panel").show()})}}function lockviewhide(){lockvisible=false;$j("#panel").hide()}function post_comment(id){unpause();commentBusy=true;$j("body").css("cursor","wait");$j("#comment-preview-inp-"+id).val("0");$j.post("item",$j("#comment-edit-form-"+id).serialize(),function(data){if(data.success){$j("#comment-edit-wrapper-"+id).hide();$j("#comment-edit-text-"+id).val("");var tarea=document.getElementById("comment-edit-text-"+id);if(tarea)commentClose(tarea,id);if(timer)clearTimeout(timer);timer=setTimeout(NavUpdate,10)}if(data.reload){window.location.href=data.reload}},"json");return false}function preview_comment(id){$j("#comment-preview-inp-"+id).val("1");$j("#comment-edit-preview-"+id).show();$j.post("item",$j("#comment-edit-form-"+id).serialize(),function(data){if(data.preview){$j("#comment-edit-preview-"+id).html(data.preview);$j("#comment-edit-preview-"+id+" a").click(function(){return false})}},"json");return true}function showHideComments(id){if($j("#collapsed-comments-"+id).is(":visible")){$j("#collapsed-comments-"+id).hide();$j("#hide-comments-"+id).html(window.showMore)}else{$j("#collapsed-comments-"+id).show();$j("#hide-comments-"+id).html(window.showFewer);collapseHeight("#collapsed-comments-"+id)}}function preview_post(){$j("#jot-preview").val("1");$j("#jot-preview-content").show();tinyMCE.triggerSave();$j.post("item",$j("#profile-jot-form").serialize(),function(data){if(data.preview){$j("#jot-preview-content").html(data.preview);$j("#jot-preview-content"+" a").click(function(){return false})}},"json");$j("#jot-preview").val("0");return true}function unpause(){totStopped=false;stopped=false;$j("#pause").html("")}function bin2hex(s){var v,i,f=0,a=[];s+="";f=s.length;for(i=0;i<f;i++){a[i]=s.charCodeAt(i).toString(16).replace(/^([\da-f])$/,"0$1")}return a.join("")}function groupChangeMember(gid,cid,sec_token){$j("body .fakelink").css("cursor","wait");$j.get("group/"+gid+"/"+cid+"?t="+sec_token,function(data){$j("#group-update-wrapper").html(data);$j("body .fakelink").css("cursor","auto")})}function profChangeMember(gid,cid){$j("body .fakelink").css("cursor","wait");$j.get("profperm/"+gid+"/"+cid,function(data){$j("#prof-update-wrapper").html(data);$j("body .fakelink").css("cursor","auto")})}function contactgroupChangeMember(gid,cid){$j("body").css("cursor","wait");$j.get("contactgroup/"+gid+"/"+cid,function(data){$j("body").css("cursor","auto")})}function checkboxhighlight(box){if($j(box).is(":checked")){$j(box).addClass("checkeditem")}else{$j(box).removeClass("checkeditem")}}function notifyMarkAll(){$j.get("notify/mark/all",function(data){if(timer)clearTimeout(timer);timer=setTimeout(NavUpdate,1e3)})}function fcFileBrowser(field_name,url,type,win){var cmsURL=baseurl+"/fbrowser/"+type+"/";tinyMCE.activeEditor.windowManager.open({file:cmsURL,title:"File Browser",width:420,height:400,resizable:"yes",inline:"yes",close_previous:"no"},{window:win,input:field_name});return false}String.prototype.format=function(){var formatted=this;for(var i=0;i<arguments.length;i++){var regexp=new RegExp("\\{"+i+"\\}","gi");formatted=formatted.replace(regexp,arguments[i])}return formatted};Array.prototype.remove=function(item){to=undefined;from=this.indexOf(item);var rest=this.slice((to||from)+1||this.length);this.length=from<0?this.length+from:from;return this.push.apply(this,rest)};function previewTheme(elm){theme=$j(elm).val();$j.getJSON("pretheme?f=&theme="+theme,function(data){$j("#theme-preview").html('<div id="theme-desc">'+data.desc+'</div><div id="theme-version">'+data.version+'</div><div id="theme-credits">'+data.credits+'</div><a href="'+data.img+'"><img src="'+data.img+'" width="320" height="240" alt="'+theme+'" /></a>')})}
\ No newline at end of file