jQuery(document).ready(function(l){var e,t,i,n,o=!1;e=function(){l("#media-items").sortable({items:"div.media-item",placeholder:"sorthelper",axis:"y",distance:2,handle:"div.filename",stop:function(){var e=l("#media-items").sortable("toArray"),n=e.length;l.each(e,function(e,t){var i=o?n-e:1+e;l("#"+t+" .menu_order input").val(i)})}})},t=function(){var e=l(".menu_order_input"),i=e.length;e.each(function(e){var t=o?i-e:1+e;l(this).val(t)})},i=function(e){e=e||0,l(".menu_order_input").each(function(){"0"!==this.value&&!e||(this.value="")})},l("#asc").click(function(e){e.preventDefault(),o=!1,t()}),l("#desc").click(function(e){e.preventDefault(),o=!0,t()}),l("#clear").click(function(e){e.preventDefault(),i(1)}),l("#showall").click(function(e){e.preventDefault(),l("#sort-buttons span a").toggle(),l("a.describe-toggle-on").hide(),l("a.describe-toggle-off, table.slidetoggle").show(),l("img.pinkynail").toggle(!1)}),l("#hideall").click(function(e){e.preventDefault(),l("#sort-buttons span a").toggle(),l("a.describe-toggle-on").show(),l("a.describe-toggle-off, table.slidetoggle").hide(),l("img.pinkynail").toggle(!0)}),e(),i(),1*").length&&(n=wpgallery.getWin(),l("#save-all, #gallery-settings").show(),void 0!==n.tinyMCE&&n.tinyMCE.activeEditor&&!n.tinyMCE.activeEditor.isHidden()?(wpgallery.mcemode=!0,wpgallery.init()):l("#insert-gallery").show())}),jQuery(window).unload(function(){window.tinymce=window.tinyMCE=window.wpgallery=null}),window.tinymce=null,window.wpgallery={mcemode:!1,editor:{},dom:{},is_update:!1,el:{},I:function(e){return document.getElementById(e)},init:function(){var e,t,i,n,l=this,o=l.getWin();if(l.mcemode){for(e=(""+document.location.search).replace(/^\?/,"").split("&"),t={},i=0;i