(function(){tinyMCEPopup.requireLangPack();var PageBreakDialog={init:function(){var self=this,ed=tinyMCEPopup.editor,s=ed.selection,n=s.getNode(),action='insert';tinyMCEPopup.resizeToInnerSize();$('button#insert').click(function(e){self.insert();e.preventDefault()});$.Plugin.init();if(n.nodeName=='IMG'&&ed.dom.hasClass(n,'mceItemPageBreak')){action='update';$('#title').val(ed.dom.getAttrib(n,'title',''));$('#alt').val(ed.dom.getAttrib(n,'alt',''))}$('#insert').button('option','label',tinyMCEPopup.getLang(action,'Insert',true))},insert:function(){var d=document,ed=tinyMCEPopup.editor,s=ed.selection,n=s.getNode();var v={title:$('#title').val(),alt:$('#alt').val()};if(n&&n.nodeName=='IMG'&&ed.dom.hasClass(n,'mceItemPageBreak')){ed.dom.setAttribs(n,v)}else{tinyMCEPopup.execCommand('mcePageBreak',false,v)}tinyMCEPopup.close()}};tinyMCEPopup.onInit.add(PageBreakDialog.init,PageBreakDialog)})();