text: /*! WKeditor - v1.0 - 2013-10-24 5:14:01 PM
  * Copyright (c) 2013 changyuan.lcy; Licensed  */
  KISSY.add(function(a,b){function c(a){var b=this;b.options=a}var d=b.all;return c.prototype.tpl={wrap:'<div class="WKeditor_video_plate">            <table><tr><td width="80%">            <input key="toClear" title="\u8bf7\u7c98\u8d34\u89c6\u9891\u5730\u5740" placeholder="\u7c98\u5e16flash\u89c6\u9891\u5730\u5740"/>            </td><td width="20%"><a href="javascript:void(0);" class="btn-confirm wk-btn btn-bg-blue btn-large">\u786e\u8ba4\u4e0a\u4f20</a></td></tr></table>            <div class="close">\xd7</div></div>'},c.prototype.view=function(){var a=this;a.$video=d(a.tpl.wrap),d("body").append(a.$video),a.view.setVideoPlatePosition=function(){a.$video.width(a.ele.width()).show();var b=(d(window).height()-a.$video.outerHeight())/2+d(window).scrollTop(),c=(d(window).width()-a.$video.width())/2;0>b&&(b=5),a.$video.css({zIndex:100,left:c,top:b})},a.view.setVideoPlatePosition(),a.$overlay=a.tool.overlay({ele:a.$video}).$overlay,a.view.preview=function(a){var b=d("<p class='videoBox' style='text-align:center'></p>"),c=document.createElement("embed");return c.setAttribute("height","400"),c.setAttribute("width","480"),c.setAttribute("allowscriptaccess","never"),c.setAttribute("pluginspage","http://get.adobe.com/cn/flashplayer/"),c.setAttribute("allowfullscreen","true"),c.setAttribute("quality","high"),c.setAttribute("type","application/x-shockwave-flash"),c.setAttribute("wmode","transparent"),c.setAttribute("style","display:inline-block"),c.setAttribute("src",a),b.append(c),b},a.view.insertVideo=function(b){function c(b){var c=a.view.preview(b);a.$insertArea.before(c),a.$insertArea.remove(),a.$overlay.remove(),a.$video.remove(),a.tool.setCart(c[0],a.options.range)}return-1==b.indexOf(".swf")?(alert("\u53ea\u80fd\u652f\u6301swf\u683c\u5f0f\u5730\u5740"),void 0):(a.config.setUrl?c(a.config.setUrl(b)):c(b),void 0)},a.$insertArea=a.tool.insertArea()},c.prototype.event=function(){var a=this,b=a.$video.one(".btn-confirm");b.on("click",function(){var b=a.$video.one("input").val();a.view.insertVideo(b)}),d(window).on("resize",function(){a.view.setVideoPlatePosition()}),a.$video.one(".close").on("click",function(){a.$video.remove(),a.$overlay.remove(),a.$insertArea.remove(),a.$wrap.fire("blur")}),a.$video.one("input").fire("focus")},c.prototype.init=function(a){this.ele=this.options.ele,this.left=this.options.left,this.top=this.options.top,this.$wrap=this.options.$wrap,this.tool=this.options.tool,this.browser=this.tool.browser(),this.config=a,this.view(),this.event()},c},{requires:["node","./WKvideo.css"]});