/* KindEditor 4.1.5 (2013-01-20), Copyright (C) kindsoft.net, Licence: http://www.kindsoft.net/license.php */(function(b,c){function g(a){if(!a)return!1;return Object.prototype.toString.call(a)==="[object Array]"}function l(a){if(!a)return!1;return Object.prototype.toString.call(a)==="[object Function]"}function f(a,d){for(var e=0,b=d.length;e=0}function o(a,d){d=d||"px";return a&&/^\d+$/.test(a)?a+d:a}function j(a){var d;return a&&(d=/(\d+)/.exec(a))?parseInt(d[1],10):0}function q(a){return a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function s(a){return a.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&/g,"&")}function r(a){var d=a.split("-"),a="";i(d,function(d,b){a+=d>0?b.charAt(0).toUpperCase()+
b.substr(1):b});return a}function v(a){function d(a){a=parseInt(a,10).toString(16).toUpperCase();return a.length>1?a:"0"+a}return a.replace(/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/ig,function(a,b,c,k){return"#"+d(b)+d(c)+d(k)})}function z(a,d){var d=d===c?",":d,e={},b=g(a)?a:a.split(d),u;i(b,function(a,d){if(u=/^(\d+)\.\.(\d+)$/.exec(d))for(var b=parseInt(u[1],10);b<=parseInt(u[2],10);b++)e[b.toString()]=!0;else e[d]=!0});return e}function D(a,d){return Array.prototype.slice.call(a,d||0)}function p(a,
d){return a===c?d:a}function B(a,d,e){e||(e=d,d=null);var b;if(d){var c=function(){};c.prototype=d.prototype;b=new c;i(e,function(a,d){b[a]=d})}else b=e;b.constructor=a;a.prototype=b;a.parent=d?d.prototype:null}function A(a){var d;if(d=/\{[\s\S]*\}|\[[\s\S]*\]/.exec(a))a=d[0];d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));
if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return eval("("+a+")");throw"JSON parse error";}function F(a,d,e){a.addEventListener?a.addEventListener(d,e,cb):a.attachEvent&&a.attachEvent("on"+d,e)}function w(a,d,e){a.removeEventListener?a.removeEventListener(d,e,cb):a.detachEvent&&a.detachEvent("on"+d,e)}function E(a,d){this.init(a,d)}function G(a){try{delete a[ka]}catch(d){a.removeAttribute&&
a.removeAttribute(ka)}}function R(a,d,e){if(d.indexOf(",")>=0)i(d.split(","),function(){R(a,this,e)});else{var b=a[ka]||null;b||(a[ka]=++db,b=db);L[b]===c&&(L[b]={});var u=L[b][d];u&&u.length>0?w(a,d,u[0]):(L[b][d]=[],L[b].el=a);u=L[b][d];u.length===0&&(u[0]=function(d){var e=d?new E(a,d):c;i(u,function(d,b){d>0&&b&&b.call(a,e)})});f(e,u)<0&&u.push(e);F(a,d,u[0])}}function U(a,d,e){if(d&&d.indexOf(",")>=0)i(d.split(","),function(){U(a,this,e)});else{var b=a[ka]||null;if(b)if(d===c)b in L&&(i(L[b],
function(d,e){d!="el"&&e.length>0&&w(a,d,e[0])}),delete L[b],G(a));else if(L[b]){var u=L[b][d];if(u&&u.length>0){e===c?(w(a,d,u[0]),delete L[b][d]):(i(u,function(a,d){a>0&&d===e&&u.splice(a,1)}),u.length==1&&(w(a,d,u[0]),delete L[b][d]));var k=0;i(L[b],function(){k++});k<2&&(delete L[b],G(a))}}}}function aa(a,d){if(d.indexOf(",")>=0)i(d.split(","),function(){aa(a,this)});else{var e=a[ka]||null;if(e){var b=L[e][d];if(L[e]&&b&&b.length>0)b[0]()}}}function P(a,d,e){d=/^\d{2,}$/.test(d)?d:d.toUpperCase().charCodeAt(0);
R(a,"keydown",function(b){b.ctrlKey&&b.which==d&&!b.shiftKey&&!b.altKey&&(e.call(a),b.stop())})}function O(a){for(var d={},e=/\s*([\w\-]+)\s*:([^;]*)(;|$)/g,b;b=e.exec(a);){var c=n(b[1].toLowerCase());b=n(v(b[2]));d[c]=b}return d}function H(a){for(var d={},e=/\s+(?:([\w\-:]+)|(?:([\w\-:]+)=([^\s"'<>]+))|(?:([\w\-:"]+)="([^"]*)")|(?:([\w\-:"]+)='([^']*)'))(?=(?:\s|\/|>)+)/g,b;b=e.exec(a);){var c=(b[1]||b[2]||b[4]||b[6]).toLowerCase();d[c]=(b[2]?b[3]:b[4]?b[5]:b[7])||""}return d}function S(a,d){return a=
/\s+class\s*=/.test(a)?a.replace(/(\s+class=["']?)([^"']*)(["']?[\s>])/,function(a,b,c,k){return(" "+c+" ").indexOf(" "+d+" ")<0?c===""?b+d+k:b+c+" "+d+k:a}):a.substr(0,a.length-1)+' class="'+d+'">'}function Y(a){var d="";i(O(a),function(a,b){d+=a+":"+b+";"});return d}function I(a,d,e,b){function u(a){for(var a=a.split("/"),d=[],e=0,b=a.length;e0&&d.pop():c!==""&&c!="."&&d.push(c)}return"/"+d.join("/")}function k(d,e){if(a.substr(0,d.length)===d){for(var c=[],u=
0;u