/*
 *  (c) 2000-2014 deviantART, Inc. All rights reserved.
 */
DWait.ready(["cssms/pages/deviation/groupmenu.css","jms/lib/jquery/plugins/jquery.noleakyscroll.js","jms/lib/gwebpage.js","jms/lib/difi.js","jms/lib/glbl.js","jms/legacy/modals.js","jms/lib/jquery/jquery.current.js","jms/lib/pubsub.js"],function(){var s={init:function(){PubSub.subscribe({eventname:"AllGroupsModal.prime",subscriber:this,callback:this.bind_click})},bind_click:function(s,l){$("#all_groups a").on("click",function(){var s=this,i=$("<h2>All groups for "+l.title+"</h2>"+'<div id="all_groups_container" class="main-scrollable group_featured_list">'+'<div class="all_groups_loading"></div>'+"</div>"),o=Modals.factory(i,{cssShadows:!0,showCloseButton:!0,showButtonsSeparator:!1});return o.addButton("Close","smbutton-lightgreen",function(){return Modals.pop("closed"),!1}),Glbl("Site.is_mobile")&&o.$content_node.width($(window).width()),Modals.push(o),DiFi.pushPublicGet("DeviationView","getAllGroups",[l.devid],function(l,i){gWebPage.update(i.response.content,null,s),$("#all_groups_container").html(i.response.content.html),$("#all_groups_container").noleakyscroll({leak_when_noscrollbar:!0})}),DiFi.send(),!1})}};s.init(),window.DWait&&DWait.run("jms/modals/all_groups_modal.js")});if(window.DWait){DWait.count()}