// 新闻页导航 begin
KindEditor.plugin('nsynewsnavigation', function(K) {
			var self = this, name = 'nsynewsnavigation',lang = self.lang(name + '.');
			self.plugin.nsynewsnavigation = {
	            edit : function() {
		            var html = [
			            '<div style="padding:20px;">',
			            //width
			            '<div class="ke-dialog-row">',
			            '<label for="keWidth" style="width:60px;">'+lang.width+'</label>',
			            '<input type="text" id="keWidth" class="ke-input-text ke-input-number" name="width" value="450" maxlength="4" /> ',
			            '</div>',
			            //height
			            '<div class="ke-dialog-row">',
			            '<label for="keHeight" style="width:60px;">'+lang.height + '</label>',
			            '<input type="text" id="keHeight" class="ke-input-text ke-input-number" name="height" value="25" maxlength="4" /> ',
			            '</div>',
			            '</div>'
		            ].join('');
		            var dialog = self.createDialog({
			            name : name,
			            width : 300,
			            title : self.lang(name),
			            body : html,
			            yesBtn : {
				            name : self.lang('yes'),
				            click : function(e) {
        						var width = widthBox.val(),height = heightBox.val();
					            if (!/^\d*$/.test(width)) {
						            alert(self.lang('invalidWidth'));
						            widthBox[0].focus();
						            return;
					            }
					            if (!/^\d*$/.test(height)) {
						            alert(self.lang('invalidHeight'));
						            heightBox[0].focus();
						            return;
					            }
					            var html = "<button id=\"QXNSY2005\" name=\"100?width="+width+"@height="+height+"\" style=\"WIDTH: "+width+"px; HEIGHT: "+height+"px\" >"+lang.show+" "+lang.width+"="+width+" "+lang.height+"="+height+"</button>";
					            self.insertHtml(html).hideDialog().focus();
				            }
			            }
		            }),
		            div = dialog.div,
		            widthBox = K('[name="width"]', div),
		            heightBox = K('[name="height"]', div);
		            //加载右键菜单
		            var img = self.plugin.getSelectedNsynewsnavigation();
		            
			        if (img) {
				        widthBox.val(K.removeUnit(img.css('width')) ||  0);
				        heightBox.val(K.removeUnit(img.css('height')) || 0);
			        }
			        widthBox[0].focus();
			        widthBox[0].select();
		            
	            }
	            
            };
	    //加载控件
	    self.clickToolbar(name, self.plugin.nsynewsnavigation.edit);
		});

// 新闻页导航 end