· 8 years ago · Jul 10, 2018, 08:42 PM
1/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
2//@ sourceMappingURL=jquery-1.10.2.min.map
3*/
4(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
5}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
6u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
7-----
8/* SCEditor v1.4.4 | (C) 2011-2013, Sam Clarke | sceditor.com/license */
9!function(a,b,c){"use strict";var d={html:'<!DOCTYPE html><html><head><style>.ie * {min-height: auto !important}</style><meta http-equiv="Content-Type" content="text/html;charset={charset}" /><link rel="stylesheet" type="text/css" href="{style}" /></head><body contenteditable="true" {spellcheck}></body></html>',toolbarButton:'<a class="sceditor-button sceditor-button-{name}" data-sceditor-command="{name}" unselectable="on"><div unselectable="on">{dispName}</div></a>',emoticon:'<img src="{url}" data-sceditor-emoticon="{key}" alt="{key}" title="{tooltip}" />',fontOpt:'<a class="sceditor-font-option" href="#" data-font="{font}"><font face="{font}">{font}</font></a>',sizeOpt:'<a class="sceditor-fontsize-option" data-size="{size}" href="#"><font size="{size}">{size}</font></a>',pastetext:'<div><label for="txt">{label}</label> <textarea cols="20" rows="7" id="txt"></textarea></div><div><input type="button" class="button" value="{insert}" /></div>',table:'<div><label for="rows">{rows}</label><input type="text" id="rows" value="2" /></div><div><label for="cols">{cols}</label><input type="text" id="cols" value="2" /></div><div><input type="button" class="button" value="{insert}" /></div>',image:'<div><label for="link">{url}</label> <input type="text" id="image" value="http://" /></div><div><label for="width">{width}</label> <input type="text" id="width" size="2" /></div><div><label for="height">{height}</label> <input type="text" id="height" size="2" /></div><div><input type="button" class="button" value="{insert}" /></div>',email:'<div><label for="email">{label}</label> <input type="text" id="email" /></div><div><input type="button" class="button" value="{insert}" /></div>',link:'<div><label for="link">{url}</label> <input type="text" id="link" value="http://" /></div><div><label for="des">{desc}</label> <input type="text" id="des" /></div><div><input type="button" class="button" value="{ins}" /></div>',youtubeMenu:'<div><label for="link">{label}</label> <input type="text" id="link" value="http://" /></div><div><input type="button" class="button" value="{insert}" /></div>',youtube:'<iframe width="560" height="315" src="http://www.youtube.com/embed/{id}?wmode=opaque" data-youtube-id="{id}" frameborder="0" allowfullscreen></iframe>'},e=function(b,c,e){var f=d[b];return a.each(c,function(a,b){f=f.replace(new RegExp("\\{"+a+"\\}","g"),b)}),e&&(f=a(f)),f};a.sceditor=function(d,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb=this,hb=d.get?d.get(0):d,ib=a(hb),jb=[],kb=[],lb=[],mb=[],nb={},ob=[];gb.commands=a.extend(!0,{},f.commands||a.sceditor.commands),gb.opts=f=a.extend({},a.sceditor.defaultOptions,f),A=function(){ib.data("sceditor",gb),a.each(f,function(b,c){a.isPlainObject(c)&&(f[b]=a.extend(!0,{},c))}),f.locale&&"en"!==f.locale&&G(),g=a('<div class="sceditor-container" />').insertAfter(ib).css("z-index",f.zIndex),a.sceditor.ie&&g.addClass("ie ie"+a.sceditor.ie),y=!!ib.attr("required"),ib.removeAttr("required"),F(),M(),H(),E(),K(),I(),J(),a.sceditor.isWysiwygSupported||gb.toggleSourceMode();var d=function(){a(b).unbind("load",d),f.autofocus&&cb(),f.autoExpand&&gb.expandToContent(),X()};a(b).load(d),c.readyState&&"complete"===c.readyState&&d(),Z(),t.call("ready")},F=function(){var b=f.plugins;b=b?b.toString().split(","):[],t=new a.sceditor.PluginManager(gb),a.each(b,function(b,c){t.register(a.trim(c))})},G=function(){var b;a.sceditor.locale[f.locale]?q=a.sceditor.locale[f.locale]:(b=f.locale.split("-"),a.sceditor.locale[b[0]]&&(q=a.sceditor.locale[b[0]])),q&&q.dateFormat&&(f.dateFormat=q.dateFormat)},E=function(){var c,d;m=a("<textarea></textarea>").hide(),i=a('<iframe frameborder="0"></iframe>'),f.spellcheck||m.attr("spellcheck","false"),"https:"===b.location.protocol&&i.attr("src","javascript:false"),g.append(i).append(m),j=i[0],n=m[0],gb.width(f.width||ib.width()),gb.height(f.height||ib.height()),c=N(),c.open(),c.write(e("html",{spellcheck:f.spellcheck?"":'spellcheck="false"',charset:f.charset,style:f.style})),c.close(),l=a(c),k=a(c.body),gb.readOnly(!!f.readOnly),a.sceditor.ie&&l.find("html").addClass("ie ie"+a.sceditor.ie),(a.sceditor.ios||a.sceditor.ie)&&(k.height("100%"),a.sceditor.ie||k.bind("touchend",gb.focus)),r=new a.sceditor.rangeHelper(j.contentWindow),gb.val(ib.hide().val()),d=ib.attr("tabindex"),m.attr("tabindex",d),i.attr("tabindex",d)},I=function(){f.autoUpdate&&(k.bind("blur",gb.updateOriginal),m.bind("blur",gb.updateOriginal)),null===f.rtl&&(f.rtl="rtl"===m.css("direction")),gb.rtl(!!f.rtl),f.autoExpand&&l.bind("keyup",gb.expandToContent),f.resizeEnabled&&L(),g.attr("id",f.id),gb.emoticons(f.emoticonsEnabled)},J=function(){a(c).click(W),a(hb.form).bind("reset",T).submit(gb.updateOriginal),a(b).bind("resize orientationChanged",X),k.keypress(S).keydown(Q).keydown(R).keyup(_).bind("paste",O).bind(a.sceditor.ie?"selectionchange":"keyup focus blur contextmenu mouseup touchend click",ab).bind("keydown keyup keypress focus blur contextmenu",V),f.emoticonsCompat&&b.getSelection&&k.keyup(eb),m.bind("keydown keyup keypress focus blur contextmenu",V).keydown(Q),l.keypress(S).mousedown(U).bind(a.sceditor.ie?"selectionchange":"focus blur contextmenu mouseup click",ab).bind("beforedeactivate keyup",D).keyup(_).focus(function(){p=null}),g.bind("selectionchanged",bb).bind("selectionchanged",Z).bind("selectionchanged",V).bind("nodechanged",V)},H=function(){var b,c,d=(f.toolbarExclude||"").split(","),i=f.toolbar.split("|");h=a('<div class="sceditor-toolbar" unselectable="on" />'),a.each(i,function(f,g){b=a('<div class="sceditor-group" />'),a.each(g.split(","),function(f,g){!gb.commands[g]||a.inArray(g,d)>-1||(c=e("toolbarButton",{name:g,dispName:gb._(gb.commands[g].tooltip||g)},!0),c.data("sceditor-txtmode",!!gb.commands[g].txtExec),c.data("sceditor-wysiwygmode",!!gb.commands[g].exec),c.click(function(){var b=a(this);return b.hasClass("disabled")||C(b,gb.commands[g]),Z(),!1}),gb.commands[g].tooltip&&c.attr("title",gb._(gb.commands[g].tooltip)),gb.commands[g].exec||c.addClass("disabled"),gb.commands[g].shortcut&&gb.addShortcut(gb.commands[g].shortcut,g),b.append(c))}),b[0].firstChild&&h.append(b)}),a(f.toolbarContainer||g).append(h)},K=function(){a.each(gb.commands,function(b,c){c.keyPress&&jb.push(c.keyPress),c.forceNewLineAfter&&a.isArray(c.forceNewLineAfter)&&(lb=a.merge(lb,c.forceNewLineAfter)),c.state?mb.push({name:b,state:c.state}):"string"==typeof c.exec&&mb.push({name:b,state:c.exec})}),_()},L=function(){var d,e,h,i,j,k,l=a('<div class="sceditor-grip" />'),m=a('<div class="sceditor-resize-cover" />'),n=0,o=0,p=0,q=0,r=g.width(),s=g.height(),t=!1,u=gb.rtl();d=f.resizeMinHeight||s/1.5,e=f.resizeMaxHeight||2.5*s,h=f.resizeMinWidth||r/1.25,i=f.resizeMaxWidth||1.25*r,j=function(c){"touchmove"===c.type&&(c=b.event);var j=q+(c.pageY-o),k=u?p-(c.pageX-n):p+(c.pageX-n);i>0&&k>i&&(k=i),e>0&&j>e&&(j=e),(!f.resizeWidth||h>k||i>0&&k>i)&&(k=!1),(!f.resizeHeight||d>j||e>0&&j>e)&&(j=!1),(k||j)&&(gb.dimensions(k,j),a.sceditor.ie<7&&g.height(j)),c.preventDefault()},k=function(b){t&&(t=!1,m.hide(),g.removeClass("resizing").height("auto"),a(c).unbind("touchmove mousemove",j),a(c).unbind("touchend mouseup",k),b.preventDefault())},g.append(l),g.append(m.hide()),l.bind("touchstart mousedown",function(d){"touchstart"===d.type&&(d=b.event),n=d.pageX,o=d.pageY,p=g.width(),q=g.height(),t=!0,g.addClass("resizing"),m.show(),a(c).bind("touchmove mousemove",j),a(c).bind("touchend mouseup",k),a.sceditor.ie<7&&g.height(q),d.preventDefault()})},M=function(){var b,d=f.emoticons,e=f.emoticonsRoot;a.isPlainObject(d)&&f.emoticonsEnabled&&a.each(d,function(f,g){a.each(g,function(a,g){e&&(g={url:e+(g.url||g),tooltip:g.tooltip||a},d[f][a]=g),b=c.createElement("img"),b.src=g.url||g,kb.push(b)})})},cb=function(){var b,c,d,e=l[0],h=k[0],i=!!f.autofocusEnd;if(g.is(":visible")){if(gb.sourceMode())d=n.value.length,n.setSelectionRange?n.setSelectionRange(d,d):n.createTextRange&&(b=n.createTextRange(),b.moveEnd("character",d),b.moveStart("character",d),r.selectRange(b));else{if(a.sceditor.dom.removeWhiteSpace(h),i)for((c=h.lastChild)||k.append(c=e.createElement("div"));c.lastChild;)c=c.lastChild,/br/i.test(c.nodeName)&&c.previousSibling&&(c=c.previousSibling);else c=h.firstChild;e.createRange?(b=e.createRange(),/br/i.test(c.nodeName)?b.setStartBefore(c):b.selectNodeContents(c),b.collapse(!1)):(b=h.createTextRange(),b.moveToElementText(3!==c.nodeType?c:c.parentNode),b.collapse(!1)),r.selectRange(b),i&&(l.scrollTop(h.scrollHeight),k.scrollTop(h.scrollHeight))}gb.focus()}},gb.readOnly=function(a){return"boolean"!=typeof a?"readonly"===m.attr("readonly"):(k[0].contentEditable=!a,a?m.attr("readonly","readonly"):m.removeAttr("readonly"),Y(a),this)},gb.rtl=function(a){var b=a?"rtl":"ltr";return"boolean"!=typeof a?"rtl"===m.attr("dir"):(k.attr("dir",b),m.attr("dir",b),g.removeClass("rtl").removeClass("ltr").addClass(b),this)},Y=function(b){var c=gb.inSourceMode();h.find(".sceditor-button").removeClass("disabled").each(function(){var d=a(this);b===!0||c&&!d.data("sceditor-txtmode")?d.addClass("disabled"):c||d.data("sceditor-wysiwygmode")||d.addClass("disabled")})},gb.width=function(a,b){return a||0===a?(gb.dimensions(a,null,b),this):g.width()},gb.dimensions=function(b,d,e){var j=a.sceditor.ie<8||c.documentMode<8?2:0;return b=b||0===b?b:!1,d=d||0===d?d:!1,b===!1&&d===!1?{width:gb.width(),height:gb.height()}:("undefined"==typeof i.data("outerWidthOffset")&&gb.updateStyleCache(),b!==!1&&(e!==!1&&(f.width=b),d===!1&&(d=g.height(),e=!1),g.width(b),b&&b.toString().indexOf("%")>-1&&(b=g.width()),i.width(b-i.data("outerWidthOffset")),m.width(b-m.data("outerWidthOffset")),a.sceditor.ios&&k&&k.width(b-i.data("outerWidthOffset")-(k.outerWidth(!0)-k.width()))),d!==!1&&(e!==!1&&(f.height=d),d&&d.toString().indexOf("%")>-1&&(d=g.height(d).height(),g.height("auto")),d-=f.toolbarContainer?0:h.outerHeight(!0),i.height(d-i.data("outerHeightOffset")),m.height(d-j-m.data("outerHeightOffset"))),this)},gb.updateStyleCache=function(){i.data("outerWidthOffset",i.outerWidth(!0)-i.width()),m.data("outerWidthOffset",m.outerWidth(!0)-m.width()),i.data("outerHeightOffset",i.outerHeight(!0)-i.height()),m.data("outerHeightOffset",m.outerHeight(!0)-m.height())},gb.height=function(a,b){return a||0===a?(gb.dimensions(null,a,b),this):g.height()},gb.maximize=function(b){return"undefined"==typeof b?g.is(".sceditor-maximize"):(b=!!b,a.sceditor.ie<7&&a("html, body").toggleClass("sceditor-maximize",b),g.toggleClass("sceditor-maximize",b),gb.width(b?"100%":f.width,!1),gb.height(b?"100%":f.height,!1),this)},gb.expandToContent=function(a){var b=g.height(),c=k[0].scrollHeight||l[0].documentElement.scrollHeight,d=b-i.height(),e=f.resizeMaxHeight||2*(f.height||ib.height());c+=d,a!==!0&&c>e&&(c=e),c>b&&gb.height(c)},gb.destroy=function(){t.destroy(),r=null,p=null,t=null,a(c).unbind("click",W),a(b).unbind("resize orientationChanged",X),a(hb.form).unbind("reset",T).unbind("submit",gb.updateOriginal),k.unbind(),l.unbind().find("*").remove(),m.unbind().remove(),h.remove(),g.unbind().find("*").unbind().remove(),g.remove(),ib.removeData("sceditor").removeData("sceditorbbcode").show(),y&&ib.attr("required","required")},gb.createDropDown=function(b,c,d,e){var g,h=o&&o.is(".sceditor-"+c);gb.closeDropDown(),h||(e!==!1&&a(d).find(":not(input,textarea)").filter(function(){return 1===this.nodeType}).attr("unselectable","on"),g={top:b.offset().top,left:b.offset().left,marginTop:b.outerHeight()},a.extend(g,f.dropDownCss),o=a('<div class="sceditor-dropdown sceditor-'+c+'" />').css(g).append(d).appendTo(a("body")).click(function(a){a.stopPropagation()}))},W=function(a){3!==a.which&&gb.closeDropDown()},O=function(a){var b,d,e=k[0],g=l[0],h=0,i=c.createElement("div"),j=g.createDocumentFragment();if(f.disablePasting)return!1;if(f.enablePasteFiltering){if(r.saveRange(),c.body.appendChild(i),a&&a.clipboardData&&a.clipboardData.getData&&((b=a.clipboardData.getData("text/html"))||(b=a.clipboardData.getData("text/plain"))))return i.innerHTML=b,P(e,i),!1;for(;e.firstChild;)j.appendChild(e.firstChild);return d=function(a,b){if(a.childNodes.length>0){for(;a.firstChild;)b.appendChild(a.firstChild);for(;j.firstChild;)a.appendChild(j.firstChild);P(a,b)}else{if(h>25){for(;j.firstChild;)a.appendChild(j.firstChild);return r.restoreRange(),void 0}++h,setTimeout(function(){d(a,b)},20)}},d(e,i),gb.focus(),!0}},P=function(b,c){a.sceditor.dom.fixNesting(c);var d=c.innerHTML;t.hasHandler("toSource")&&(d=t.callOnlyFirst("toSource",d,a(c))),c.parentNode.removeChild(c),t.hasHandler("toWysiwyg")&&(d=t.callOnlyFirst("toWysiwyg",d,!0)),r.restoreRange(),gb.wysiwygEditorInsertHtml(d,null,!0)},gb.closeDropDown=function(a){o&&(o.unbind().remove(),o=null),a===!0&&gb.focus()},N=function(){return j.contentDocument?j.contentDocument:j.contentWindow&&j.contentWindow.document?j.contentWindow.document:j.document?j.document:null},gb.wysiwygEditorInsertHtml=function(b,c,d){var e,f,g='<span id="sceditor-cursor"> </span>';gb.focus(),(d||!a(v).is("code")&&0===a(v).parents("code").length)&&(c?c+=g:b+=g,r.insertHTML(b,c),f=k.find("#sceditor-cursor"),e=f.offset().top+2*f.outerHeight(!0)-i.height(),f.remove(),l.scrollTop(e),k.scrollTop(e),r.saveRange(),B(k[0]),r.restoreRange(),_())},gb.wysiwygEditorInsertText=function(b,c){gb.wysiwygEditorInsertHtml(a.sceditor.escapeEntities(b),a.sceditor.escapeEntities(c))},gb.insertText=function(a,b){return gb.inSourceMode()?gb.sourceEditorInsertText(a,b):gb.wysiwygEditorInsertText(a,b),this},gb.sourceEditorInsertText=function(a,b){var d,e,f,g,h;h=n.scrollTop,n.focus(),"undefined"!=typeof n.selectionStart?(e=n.selectionStart,f=n.selectionEnd,g=a.length,b&&(a+=n.value.substring(e,f)+b),n.value=n.value.substring(0,e)+a+n.value.substring(f,n.value.length),n.selectionStart=e+a.length-(b?b.length:0),n.selectionEnd=n.selectionStart):"undefined"!=typeof c.selection.createRange?(d=c.selection.createRange(),b&&(a+=d.text+b),d.text=a,b&&d.moveEnd("character",0-b.length),d.moveStart("character",d.End-d.Start),d.select()):n.value+=a+b,n.scrollTop=h,n.focus()},gb.getRangeHelper=function(){return r},gb.val=function(a,b){return"string"==typeof a?(gb.inSourceMode()?gb.setSourceEditorValue(a):(b!==!1&&t.hasHandler("toWysiwyg")&&(a=t.callOnlyFirst("toWysiwyg",a)),gb.setWysiwygEditorValue(a)),this):gb.inSourceMode()?gb.getSourceEditorValue(!1):gb.getWysiwygEditorValue()},gb.insert=function(b,c,d,e,f){if(gb.inSourceMode())gb.sourceEditorInsertText(b,c);else{if(c){var g=gb.getRangeHelper().selectedHtml(),h=a("<div>").appendTo(a("body")).hide().html(g);d!==!1&&t.hasHandler("toSource")&&(g=t.callOnlyFirst("toSource",g,h)),h.remove(),b+=g+c}d!==!1&&t.hasHandler("toWysiwyg")&&(b=t.callOnlyFirst("toWysiwyg",b,!0)),d!==!1&&f===!0&&(b=b.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")),gb.wysiwygEditorInsertHtml(b)}return this},gb.getWysiwygEditorValue=function(b){var c,d,e=r.hasSelection();return e?r.saveRange():p&&p.getBookmark&&(d=p.getBookmark()),a.sceditor.dom.fixNesting(k[0]),c=k.html(),b!==!1&&t.hasHandler("toSource")&&(c=t.callOnlyFirst("toSource",c,k)),e?(r.restoreRange(),p=null):d&&(p.moveToBookmark(d),p=null),c},gb.getBody=function(){return k},gb.getContentAreaContainer=function(){return i},gb.getSourceEditorValue=function(a){var b=m.val();return a!==!1&&t.hasHandler("toWysiwyg")&&(b=t.callOnlyFirst("toWysiwyg",b)),b},gb.setWysiwygEditorValue=function(b){b||(b="<p>"+(a.sceditor.ie?"":"<br />")+"</p>"),k[0].innerHTML=b,B(k[0]),_()},gb.setSourceEditorValue=function(a){m.val(a)},gb.updateOriginal=function(){ib.val(gb.val())},B=function(b){if(f.emoticonsEnabled&&!a(b).parents("code").length){var c=b.ownerDocument,d=[],g=[],h=a.extend({},f.emoticons.more,f.emoticons.dropdown,f.emoticons.hidden);a.each(h,function(b){f.emoticonsCompat&&(g[b]=new RegExp("(>|^|\\s| | | | | )"+a.sceditor.regexEscape(b)+"(\\s|$|<| | | | | )")),d.push(b)}),function i(b){for(b=b.firstChild;null!=b;){var j,k,l,m,n,o,p,q=b.parentNode,r=b.nodeValue;if(3!==b.nodeType)a(b).is("code")||i(b);else if(r)for(n=d.length;n--;)k=d[n],p=f.emoticonsCompat?r.search(g[k]):r.indexOf(k),p>-1&&(o=b.nextSibling,l=h[k],j=r.substr(p).split(k),r=r.substr(0,p)+j.shift(),b.nodeValue=r,m=a.sceditor.dom.parseHTML(e("emoticon",{key:k,url:l.url||l,tooltip:l.tooltip||k}),c),q.insertBefore(m[0],o),q.insertBefore(c.createTextNode(j.join(k)),o));b=b.nextSibling}}(b),f.emoticonsCompat&&(ob=k.find("img[data-sceditor-emoticon]"))}},gb.inSourceMode=function(){return g.hasClass("sourceMode")},gb.sourceMode=function(a){return"boolean"!=typeof a?gb.inSourceMode():((gb.inSourceMode()&&!a||!gb.inSourceMode()&&a)&&gb.toggleSourceMode(),this)},gb.toggleSourceMode=function(){(a.sceditor.isWysiwygSupported||!gb.inSourceMode())&&(gb.blur(),gb.inSourceMode()?gb.setWysiwygEditorValue(gb.getSourceEditorValue()):gb.setSourceEditorValue(gb.getWysiwygEditorValue()),p=null,m.toggle(),i.toggle(),gb.inSourceMode()?g.removeClass("sourceMode").addClass("wysiwygMode"):g.removeClass("wysiwygMode").addClass("sourceMode"),Y(),Z())},$=function(){return n.focus(),null!=n.selectionStart?n.value.substring(n.selectionStart,n.selectionEnd):c.selection.createRange?c.selection.createRange().text:void 0},C=function(b,c){return gb.inSourceMode()?(c.txtExec&&(a.isArray(c.txtExec)?gb.sourceEditorInsertText.apply(gb,c.txtExec):c.txtExec.call(gb,b,$())),void 0):(c.exec&&(a.isFunction(c.exec)?c.exec.call(gb,b):gb.execCommand(c.exec,c.hasOwnProperty("execParam")?c.execParam:null)),void 0)},D=function(){a.sceditor.ie&&(p=r.selectedRange())},gb.execCommand=function(b,c){var d=!1,e=a(r.parentNode());if(gb.focus(),!e.is("code")&&0===e.parents("code").length){try{d=l[0].execCommand(b,!1,c)}catch(f){}!d&&gb.commands[b]&&gb.commands[b].errorMessage&&alert(gb._(gb.commands[b].errorMessage))}},ab=function(){var b=function(){r&&!r.compare(w)&&(w=r.cloneSelected(),g.trigger(a.Event("selectionchanged"))),x=!1};x||(x=!0,a.sceditor.ie?b():setTimeout(b,100))},bb=function(){var b,c=r.parentNode();u!==c&&(b=u,u=c,v=r.getFirstBlockParent(c),g.trigger(a.Event("nodechanged",{oldNode:b,newNode:u})))},gb.currentNode=function(){return u},gb.currentBlockNode=function(){return v},Z=function(a){var b,c,d,e,f,g=l[0],i=mb.length,j=gb.sourceMode();if(gb.sourceMode()||gb.readOnly())h.find(".sceditor-button").removeClass("active");else for(f=a?a.newNode:r.parentNode(),d=r.getFirstBlockParent(f);i--;)if(b=0,c=mb[i],e=h.find(".sceditor-button-"+c.name),j&&!e.data("sceditor-txtmode"))e.addClass("disabled");else if(j||e.data("sceditor-wysiwygmode")){if("string"==typeof c.state)try{b=g.queryCommandEnabled(c.state)?0:-1,b>-1&&(b=g.queryCommandState(c.state)?1:0)}catch(k){}else b=c.state.call(gb,f,d);0>b?e.addClass("disabled"):e.removeClass("disabled"),b>0?e.addClass("active"):e.removeClass("active")}else e.addClass("disabled")},S=function(b){var c,d=jb.length;if(gb.closeDropDown(),c=a(u),13===b.which&&(c.is("code,blockquote,pre")||0!==c.parents("code,blockquote,pre").length))return p=null,gb.wysiwygEditorInsertHtml("<br />",null,!0),!1;if(!c.is("code")&&0===c.parents("code").length)for(;d--;)jb[d].call(gb,b,j,m)},_=function(){var b,c,d;a.sceditor.dom.rTraverse(k[0],function(e){return b=e.nodeName.toLowerCase(),a.inArray(b,lb)>-1&&(c=!0),3===e.nodeType&&!/^\s*$/.test(e.nodeValue)||"br"===b||a.sceditor.ie&&!e.firstChild&&!a.sceditor.dom.isInline(e,!1)?(c&&(d=k[0].ownerDocument.createElement("div"),d.className="sceditor-nlf",d.innerHTML=a.sceditor.ie?"":"<br />",k[0].appendChild(d)),!1):void 0})},T=function(){gb.val(ib.val())},U=function(){gb.closeDropDown(),p=null},X=function(){var a=f.height,b=f.width;gb.maximize()?gb.dimensions("100%","100%",!1):(a&&a.toString().indexOf("%")>-1&&gb.height(a),b&&b.toString().indexOf("%")>-1&&gb.width(b))},gb._=function(){var a=arguments;return q&&q[a[0]]&&(a[0]=q[a[0]]),a[0].replace(/\{(\d+)\}/g,function(b,c){return"undefined"!=typeof a[c-0+1]?a[c-0+1]:"{"+c+"}"})},V=function(b){var c,d=a.extend({},b);t.call(d.type+"Event",b,gb),delete d.type,c=a.Event((b.target===n?"scesrc":"scewys")+b.type,d),g.trigger.apply(g,[c,gb]),c.isDefaultPrevented()&&b.preventDefault(),c.isImmediatePropagationStopped()&&c.stopImmediatePropagation(),c.isPropagationStopped()&&c.stopPropagation()},gb.bind=function(b,c,d,e){var f=b.length;for(b=b.split(" ");f--;)a.isFunction(c)&&(d||g.bind("scewys"+b[f],c),e||g.bind("scesrc"+b[f],c));return this},gb.unbind=function(b,c,d,e){var f=b.length;for(b=b.split(" ");f--;)a.isFunction(c)&&(d||g.unbind("scewys"+b[f],c),e||g.unbind("scesrc"+b[f],c));return this},gb.blur=function(b,c,d){return a.isFunction(b)?gb.bind("blur",b,c,d):gb.sourceMode()?m.blur():(s||(s=a('<input style="position:absolute;width:0;height:0;opacity:0;border:0;padding:0;filter:alpha(opacity=0)" type="text" />').appendTo(g)),s.removeAttr("disabled").show().focus().blur().hide().attr("disabled","disabled")),this},gb.focus=function(b,c,d){return a.isFunction(b)?gb.bind("focus",b,c,d):gb.inSourceMode()?n.focus():(j.contentWindow.focus(),k[0].focus(),p&&(r.selectRange(p),p=null)),this},gb.keyDown=function(a,b,c){return gb.bind("keydown",a,b,c)},gb.keyPress=function(a,b,c){return gb.bind("keypress",a,b,c)},gb.keyUp=function(a,b,c){return gb.bind("keyup",a,b,c)},gb.nodeChanged=function(a){return gb.bind("nodechanged",a,!1,!0)},gb.selectionChanged=function(a){return gb.bind("selectionchanged",a,!1,!0)},db=function(b){var c=0,d=String.fromCharCode(b.which);if(!a(v).is("code")&&!a(v).parents("code").length)return gb.emoticonsCache||(gb.emoticonsCache=[],a.each(a.extend({},f.emoticons.more,f.emoticons.dropdown,f.emoticons.hidden),function(a,b){gb.emoticonsCache[c++]=[a,e("emoticon",{key:a,url:b.url||b,tooltip:b.tooltip||a})]}),gb.emoticonsCache.sort(function(a,b){return a[0].length-b[0].length}),gb.longestEmoticonCode=gb.emoticonsCache[gb.emoticonsCache.length-1][0].length),gb.getRangeHelper().raplaceKeyword(gb.emoticonsCache,!0,!0,gb.longestEmoticonCode,f.emoticonsCompat,d)?(f.emoticonsCompat&&(ob=k.find("img[data-sceditor-emoticon]")),/^\s$/.test(d)&&f.emoticonsCompat):void 0},eb=function(){if(ob.length){var b,c,d,e,f,g,h=gb.currentBlockNode(),i=!1,j=/[^\s\xA0\u2002\u2003\u2009]+/;ob=a.map(ob,function(k){return k&&k.parentNode?a.contains(h,k)?(b=k.previousSibling,c=k.nextSibling,f=b.nodeValue,null===f&&(f=b.innerText||""),b&&j.test(b.nodeValue.slice(-1))||c&&j.test((c.nodeValue||"")[0])?(d=k.parentNode,e=r.cloneSelected(),g=e.startContainer,f+=a(k).data("sceditor-emoticon"),g===c?i=f.length+e.startOffset:g===h&&h.childNodes[e.startOffset]===c?i=f.length:g===b&&(i=e.startOffset),c&&3===c.nodeType||(c=d.insertBefore(d.ownerDocument.createTextNode(""),c)),c.insertData(0,f),d.removeChild(b),d.removeChild(k),i!==!1&&(e.setStart(c,i),e.collapse(!0),r.selectRange(e)),null):k):k:null})}},gb.emoticons=function(b){return b||b===!1?(f.emoticonsEnabled=b,b?(k.keypress(db),gb.sourceMode()||(r.saveRange(),B(k[0]),ob=k.find("img[data-sceditor-emoticon]"),r.restoreRange())):(k.find("img[data-sceditor-emoticon]").replaceWith(function(){return a(this).data("sceditor-emoticon")}),ob=[],k.unbind("keypress",db)),this):f.emoticonsEnabled},gb.css=function(b){return z||(z=a('<style id="#inline" />').appendTo(l.find("head"))[0]),"string"!=typeof b?z.styleSheet?z.styleSheet.cssText:z.innerHTML:(z.styleSheet?z.styleSheet.cssText=b:z.innerHTML=b,this)},Q=function(a){var b=[],c={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|","[":"{","]":"}"},d={8:"backspace",9:"tab",13:"enter",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",91:"win",92:"win",93:"select",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scrolllock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},e={109:"-",110:"del",111:"/",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},f=a.which,g=d[f]||String.fromCharCode(f).toLowerCase();return a.ctrlKey&&b.push("ctrl"),a.altKey&&b.push("alt"),a.shiftKey&&(b.push("shift"),e[f]?g=e[f]:c[g]&&(g=c[g])),g&&(16>f||f>18)&&b.push(g),b=b.join("+"),nb[b]?nb[b].call(gb):void 0},gb.addShortcut=function(a,b){return a=a.toLowerCase(),nb[a]="string"==typeof b?function(){return C(h.find(".sceditor-button-"+b),gb.commands[b]),!1}:b,this},gb.removeShortcut=function(a){return delete nb[a.toLowerCase()],this},R=function(c){var d,e,g,h,i;if(!a.sceditor.ie&&!f.disableBlockRemove&&8===c.which&&(h=r.selectedRange())&&(b.getSelection?(d=h.startContainer,e=h.startOffset):(d=h.parentElement(),g=l[0].selection.createRange(),g.moveToElementText(d),g.setEndPoint("EndToStart",h),e=g.text.length),0===e&&(i=fb()))){for(;d!==i;){for(;d.previousSibling;)if(d=d.previousSibling,3!==d.nodeType||d.nodeValue)return;if(!(d=d.parentNode))return}if(i&&!a(i).is("body"))return gb.clearBlockFormatting(i),!1}},fb=function(){for(var b=v;!a.sceditor.dom.hasStyling(b);)if(!(b=b.parentNode)||a(b).is("body"))return;return b},gb.clearBlockFormatting=function(b){return b=b||fb(),!b||a(b).is("body")?this:(r.saveRange(),p=null,b.className="",a(b).attr("style",""),a(b).is("p,div")||a.sceditor.dom.convertElement(b,"p"),r.restoreRange(),this)},A()},a.sceditor.ie=function(){var a,d=3,e=c.createElement("div"),f=e.getElementsByTagName("i");do e.innerHTML="<!--[if gt IE "+ ++d+"]><i></i><![endif]-->";while(f[0]);return c.documentMode&&c.all&&b.atob&&(d=10),4===d&&c.documentMode&&(d=11),d>4?d:a}(),a.sceditor.ios=/iPhone|iPod|iPad| wosbrowser\//i.test(navigator.userAgent),a.sceditor.isWysiwygSupported=function(){var b,c,d=a('<div contenteditable="true">')[0].contentEditable,e="undefined"!=typeof d&&"inherit"!==d,f=navigator.userAgent;return e?(c=/Opera Mobi|Opera Mini/i.test(f),/Android/i.test(f)&&(c=!0,/Safari/.test(f)&&(b=/Safari\/(\d+)/.exec(f),c=b&&b[1]?b[1]<534:!0)),/ Silk\//i.test(f)&&(b=/AppleWebKit\/(\d+)/.exec(f),c=b&&b[1]?b[1]<534:!0),a.sceditor.ios&&(c=!/OS [5-9](_\d)+ like Mac OS X/i.test(f)),/fennec/i.test(f)&&(c=!1),/OneBrowser/i.test(f)&&(c=!1),"UCWEB"===navigator.vendor&&(c=!1),!c):!1}(),a.sceditor.regexEscape=function(a){return a.replace(/[\$\?\[\]\.\*\(\)\|\\]/g,"\\$&")},a.sceditor.escapeEntities=function(a){return a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ {2}/g," ").replace(/\r\n|\r/g,"\n").replace(/\n/g,"<br />"):a},a.sceditor.locale={},a.sceditor.commands={bold:{exec:"bold",tooltip:"Bold",shortcut:"ctrl+b"},italic:{exec:"italic",tooltip:"Italic",shortcut:"ctrl+i"},underline:{exec:"underline",tooltip:"Underline",shortcut:"ctrl+u"},strike:{exec:"strikethrough",tooltip:"Strikethrough"},subscript:{exec:"subscript",tooltip:"Subscript"},superscript:{exec:"superscript",tooltip:"Superscript"},left:{exec:"justifyleft",tooltip:"Align left"},center:{exec:"justifycenter",tooltip:"Center"},right:{exec:"justifyright",tooltip:"Align right"},justify:{exec:"justifyfull",tooltip:"Justify"},font:{_dropDown:function(b,c,d){for(var f=b.opts.fonts.split(","),g=a("<div />"),h=function(){return d(a(this).data("font")),b.closeDropDown(!0),!1},i=0;i<f.length;i++)g.append(e("fontOpt",{font:f[i]},!0).click(h));b.createDropDown(c,"font-picker",g)},exec:function(b){var c=this;a.sceditor.command.get("font")._dropDown(c,b,function(a){c.execCommand("fontname",a)})},tooltip:"Font Name"},size:{_dropDown:function(b,c,d){for(var f=a("<div />"),g=function(c){d(a(this).data("size")),b.closeDropDown(!0),c.preventDefault()},h=1;7>=h;h++)f.append(e("sizeOpt",{size:h},!0).click(g));b.createDropDown(c,"fontsize-picker",f)},exec:function(b){var c=this;a.sceditor.command.get("size")._dropDown(c,b,function(a){c.execCommand("fontsize",a)})},tooltip:"Font Size"},color:{_dropDown:function(b,c,d){var e,f,g,h,i={r:255,g:255,b:255},j=a("<div />"),k=b.opts.colors?b.opts.colors.split("|"):new Array(21),l=[],m=a.sceditor.command.get("color");if(!m._htmlCache){for(e=0;e<k.length;++e){for(h=k[e]?k[e].split(","):new Array(21),l.push('<div class="sceditor-color-column">'),f=0;f<h.length;++f)g=h[f]||"#"+i.r.toString(16)+i.g.toString(16)+i.b.toString(16),l.push('<a href="#" class="sceditor-color-option" style="background-color: '+g+'" data-color="'+g+'"></a>'),0===f%5?(i.g-=51,i.b=255):i.b-=51;l.push("</div>"),0===e%5?(i.r-=51,i.g=255,i.b=255):(i.g=255,i.b=255)}m._htmlCache=l.join("")}j.append(m._htmlCache).find("a").click(function(c){d(a(this).attr("data-color")),b.closeDropDown(!0),c.preventDefault()}),b.createDropDown(c,"color-picker",j)},exec:function(b){var c=this;a.sceditor.command.get("color")._dropDown(c,b,function(a){c.execCommand("forecolor",a)})},tooltip:"Font Color"},removeformat:{exec:"removeformat",tooltip:"Remove Formatting"},cut:{exec:"cut",tooltip:"Cut",errorMessage:"Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X"},copy:{exec:"copy",tooltip:"Copy",errorMessage:"Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C"},paste:{exec:"paste",tooltip:"Paste",errorMessage:"Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V"},pastetext:{exec:function(a){var b,c=this,d=e("pastetext",{label:c._("Paste your text inside the following box:"),insert:c._("Insert")},!0);d.find(".button").click(function(a){b=d.find("#txt").val(),b&&c.wysiwygEditorInsertText(b),c.closeDropDown(!0),a.preventDefault()}),c.createDropDown(a,"pastetext",d)},tooltip:"Paste Text"},bulletlist:{exec:"insertunorderedlist",tooltip:"Bullet list"},orderedlist:{exec:"insertorderedlist",tooltip:"Numbered list"},table:{exec:function(b){var c=this,d=e("table",{rows:c._("Rows:"),cols:c._("Cols:"),insert:c._("Insert")},!0);d.find(".button").click(function(b){var e=d.find("#rows").val()-0,f=d.find("#cols").val()-0,g="<table>";if(!(1>e||1>f)){for(var h=0;e>h;h++){g+="<tr>";for(var i=0;f>i;i++)g+="<td>"+(a.sceditor.ie?"":"<br />")+"</td>";g+="</tr>"}g+="</table>",c.wysiwygEditorInsertHtml(g),c.closeDropDown(!0),b.preventDefault()}}),c.createDropDown(b,"inserttable",d)},tooltip:"Insert a table"},horizontalrule:{exec:"inserthorizontalrule",tooltip:"Insert a horizontal rule"},code:{forceNewLineAfter:["code"],exec:function(){this.wysiwygEditorInsertHtml("<code>","<br /></code>")},tooltip:"Code"},image:{exec:function(a){var b=this,c=e("image",{url:b._("URL:"),width:b._("Width (optional):"),height:b._("Height (optional):"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#image").val(),e=c.find("#width").val(),f=c.find("#height").val(),g="";e&&(g+=' width="'+e+'"'),f&&(g+=' height="'+f+'"'),d&&"http://"!==d&&b.wysiwygEditorInsertHtml("<img"+g+' src="'+d+'" />'),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertimage",c)},tooltip:"Insert an image"},email:{exec:function(a){var b=this,c=e("email",{label:b._("E-mail:"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#email").val();d&&(b.focus(),b.getRangeHelper().selectedHtml()?b.execCommand("createlink","mailto:"+d):b.wysiwygEditorInsertHtml('<a href="mailto:'+d+'">'+d+"</a>")),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertemail",c)},tooltip:"Insert an email"},link:{exec:function(a){var b=this,c=e("link",{url:b._("URL:"),desc:b._("Description (optional):"),ins:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#link").val(),e=c.find("#des").val();d&&"http://"!==d&&(b.focus(),!b.getRangeHelper().selectedHtml()||e?(e||(e=d),b.wysiwygEditorInsertHtml('<a href="'+d+'">'+e+"</a>")):b.execCommand("createlink",d)),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertlink",c)},tooltip:"Insert a link"},unlink:{state:function(){var b=a(this.currentNode());return b.is("a")||b.parents("a").length>0?0:-1},exec:function(){var b=a(this.currentNode()),c=b.is("a")?b:b.parents("a").first();
10c.length&&c.replaceWith(c.contents())},tooltip:"Unlink"},quote:{forceNewLineAfter:["blockquote"],exec:function(b,c,d){var e="<blockquote>",f="</blockquote>";c?(d=d?"<cite>"+d+"</cite>":"",e=e+d+c+f,f=null):""===this.getRangeHelper().selectedHtml()&&(f=a.sceditor.ie?"":"<br />"+f),this.wysiwygEditorInsertHtml(e,f)},tooltip:"Insert a Quote"},emoticon:{exec:function(b){var c=this,d=function(e){var f=c.opts.emoticonsCompat,g=c.getRangeHelper(),h=f&&" "!==g.getOuterText(!0,1)?" ":"",i=f&&" "!==g.getOuterText(!1,1)?" ":"",j=a("<div />"),k=a("<div />").appendTo(j),l=a.extend({},c.opts.emoticons.dropdown,e?c.opts.emoticons.more:{}),m=0;return a.each(l,function(){m++}),m=Math.sqrt(m),a.each(l,function(b,d){k.append(a("<img />").attr({src:d.url||d,alt:b,title:d.tooltip||b}).click(function(){return c.insert(h+a(this).attr("alt")+i,null,!1).closeDropDown(!0),!1})),k.children().length>=m&&(k=a("<div />").appendTo(j))}),e||j.append(a(c._('<a class="sceditor-more">{0}</a>',c._("More"))).click(function(){return c.createDropDown(b,"more-emoticons",d(!0)),!1})),j};c.createDropDown(b,"emoticons",d(!1))},txtExec:function(b){a.sceditor.command.get("emoticon").exec.call(this,b)},tooltip:"Insert an emoticon"},youtube:{_dropDown:function(a,b,c){var d,f=e("youtubeMenu",{label:a._("Video URL:"),insert:a._("Insert")},!0);f.find(".button").click(function(b){var e=f.find("#link").val().replace("http://","");""!==e&&(d=e.match(/(?:v=|v\/|embed\/|youtu.be\/)(.{11})/),d&&(e=d[1]),/^[a-zA-Z0-9_\-]{11}$/.test(e)?c(e):alert("Invalid YouTube video")),a.closeDropDown(!0),b.preventDefault()}),a.createDropDown(b,"insertlink",f)},exec:function(b){var c=this;a.sceditor.command.get("youtube")._dropDown(c,b,function(a){c.wysiwygEditorInsertHtml(e("youtube",{id:a}))})},tooltip:"Insert a YouTube video"},date:{_date:function(a){var b=new Date,c=b.getYear(),d=b.getMonth()+1,e=b.getDate();return 2e3>c&&(c=1900+c),10>d&&(d="0"+d),10>e&&(e="0"+e),a.opts.dateFormat.replace(/year/i,c).replace(/month/i,d).replace(/day/i,e)},exec:function(){this.insertText(a.sceditor.command.get("date")._date(this))},txtExec:function(){this.insertText(a.sceditor.command.get("date")._date(this))},tooltip:"Insert current date"},time:{_time:function(){var a=new Date,b=a.getHours(),c=a.getMinutes(),d=a.getSeconds();return 10>b&&(b="0"+b),10>c&&(c="0"+c),10>d&&(d="0"+d),b+":"+c+":"+d},exec:function(){this.insertText(a.sceditor.command.get("time")._time())},txtExec:function(){this.insertText(a.sceditor.command.get("time")._time())},tooltip:"Insert current time"},ltr:{state:function(a,b){return b&&"ltr"===b.style.direction},exec:function(){var b=this,c=b.getRangeHelper().getFirstBlockParent(),d=a(c);b.focus(),(c&&!d.is("body")||(b.execCommand("formatBlock","p"),c=b.getRangeHelper().getFirstBlockParent(),d=a(c),c&&!d.is("body")))&&("ltr"===d.css("direction")?d.css("direction",""):d.css("direction","ltr"))},tooltip:"Left-to-Right"},rtl:{state:function(a,b){return b&&"rtl"===b.style.direction},exec:function(){var b=this,c=b.getRangeHelper().getFirstBlockParent(),d=a(c);b.focus(),(c&&!d.is("body")||(b.execCommand("formatBlock","p"),c=b.getRangeHelper().getFirstBlockParent(),d=a(c),c&&!d.is("body")))&&("rtl"===d.css("direction")?d.css("direction",""):d.css("direction","rtl"))},tooltip:"Right-to-Left"},print:{exec:"print",tooltip:"Print"},maximize:{state:function(){return this.maximize()},exec:function(){this.maximize(!this.maximize())},txtExec:function(){this.maximize(!this.maximize())},tooltip:"Maximize",shortcut:"ctrl+shift+m"},source:{exec:function(){this.toggleSourceMode()},txtExec:function(){this.toggleSourceMode()},tooltip:"View source",shortcut:"ctrl+shift+s"},ignore:{}},a.sceditor.rangeHelper=function(b,c){var d,e,f,g,h,i=!0,j="sceditor-start-marker",k="sceditor-end-marker",l="character",m=this;f=function(a,b){e=b||a.contentDocument||a.document,d=a,i=!!a.getSelection}(b,c),m.insertHTML=function(a,b){var c,d,f=m.selectedRange();if(b&&(a+=m.selectedHtml()+b),i){for(d=e.createElement("div"),c=e.createDocumentFragment(),d.innerHTML=a;d.firstChild;)c.appendChild(d.firstChild);m.insertNode(c)}else{if(!f)return!1;f.pasteHTML(a)}},m.insertNode=function(a,b){if(i){var c,d,f=e.createDocumentFragment(),g=m.selectedRange();if(!g)return!1;if(f.appendChild(a),b&&(f.appendChild(g.extractContents()),f.appendChild(b)),d=f.lastChild,!d)return;g.deleteContents(),g.insertNode(f),c=e.createRange(),c.setStartAfter(d),m.selectRange(c)}else m.insertHTML(a.outerHTML,b?b.outerHTML:null)},m.cloneSelected=function(){var a=m.selectedRange();return a?i?a.cloneRange():a.duplicate():void 0},m.selectedRange=function(){var a,b,c=i?d.getSelection():e.selection;if(c){if(c.getRangeAt&&c.rangeCount<=0){for(b=e.body;b.firstChild;)b=b.firstChild;a=e.createRange(),a.setStart(b,0),c.addRange(a)}return i&&(a=c.getRangeAt(0)),i||"Control"===c.type||(a=c.createRange()),h(a)?a:null}},h=function(a){var b;return a&&a.parentElement&&(b=a.parentElement())?b.ownerDocument===e:!0},m.hasSelection=function(){var a,b=i?d.getSelection():e.selection;return i||!b?b&&b.rangeCount>0:(a=b.createRange(),a&&h(a))},m.selectedHtml=function(){var a,b=m.selectedRange();return b?!i&&""!==b.text&&b.htmlText?b.htmlText:i?(a=e.createElement("div"),a.appendChild(b.cloneContents()),a.innerHTML):"":""},m.parentNode=function(){var a=m.selectedRange();return a?a.parentElement?a.parentElement():a.commonAncestorContainer:void 0},m.getFirstBlockParent=function(b){var c=function(b){return a.sceditor.dom.isInline(b,!0)?(b=b?b.parentNode:null,b?c(b):null):b};return c(b||m.parentNode())},m.insertNodeAt=function(a,b){var c=m.selectedRange(),d=m.cloneSelected();return d?(d.collapse(a),d.insertNode?d.insertNode(b):d.pasteHTML(b.outerHTML),m.selectRange(c),void 0):!1},g=function(a){m.removeMarker(a);var b=e.createElement("span");return b.id=a,b.style.lineHeight="0",b.style.display="none",b.className="sceditor-selection sceditor-ignore",b.innerHTML=" ",b},m.insertMarkers=function(){m.insertNodeAt(!0,g(j)),m.insertNodeAt(!1,g(k))},m.getMarker=function(a){return e.getElementById(a)},m.removeMarker=function(a){var b=m.getMarker(a);b&&b.parentNode.removeChild(b)},m.removeMarkers=function(){m.removeMarker(j),m.removeMarker(k)},m.saveRange=function(){m.insertMarkers()},m.selectRange=function(a){i?(d.getSelection().removeAllRanges(),d.getSelection().addRange(a)):a.select()},m.restoreRange=function(){var a,b=m.selectedRange(),c=m.getMarker(j),d=m.getMarker(k);return c&&d&&b?(i?(b=e.createRange(),b.setStartBefore(c),b.setEndAfter(d),m.selectRange(b)):(b=e.body.createTextRange(),a=e.body.createTextRange(),a.moveToElementText(c),b.setEndPoint("StartToStart",a),b.moveStart(l,0),a.moveToElementText(d),b.setEndPoint("EndToStart",a),b.moveEnd(l,0),m.selectRange(b)),m.removeMarkers(),void 0):!1},m.selectOuterText=function(a,b){var c=m.cloneSelected();return c?(c.collapse(!1),i?(c.setStart(c.startContainer,c.startOffset-a),c.setEnd(c.endContainer,c.endOffset+b)):(c.moveStart(l,0-a),c.moveEnd(l,b)),m.selectRange(c),void 0):!1},m.getOuterText=function(a,b){var c="",d=m.cloneSelected();return d?(d.collapse(!1),a?i?(c=d.startContainer.textContent.substr(0,d.startOffset),c=c.substr(Math.max(0,c.length-b))):(d.moveStart(l,0-b),c=d.text):i?c=d.startContainer.textContent.substr(d.startOffset,b):(d.moveEnd(l,b),c=d.text),c):""},m.raplaceKeyword=function(b,c,d,e,f,g){d||b.sort(function(a,b){return a.length-b.length});var h,j,k,l,n,o,p,q=b.length,r=e||b[q-1][0].length;if(f){if(!i)return!1;++r}for(h=m.getOuterText(!0,r),j=h+(null!=g?g:""),c&&(j+=m.getOuterText(!1,r));q--;)if(p=b[q][0],n=new RegExp("(?:[\\s    ])"+a.sceditor.regexEscape(p)+"(?=[\\s    ])"),o=h.length-1-p.length,f&&--o,o=Math.max(0,o),(k=f?j.substr(o).search(n):j.indexOf(p,o))>-1){if(f&&(k+=o+1),k>h.length||k+p.length+(f?1:0)<h.length)continue;return l=h.length-k,m.selectOuterText(l,p.length-l-(null!=g&&/^\S/.test(g)?1:0)),m.insertHTML(b[q][1]),!0}return!1},m.compare=function(a,b){return b||(b=m.selectedRange()),a&&b?i?0===a.compareBoundaryPoints(Range.END_TO_END,b)&&0===a.compareBoundaryPoints(Range.START_TO_START,b):h(a)&&h(b)&&0===a.compareEndPoints("EndToEnd",b)&&0===a.compareEndPoints("StartToStart",b):!a&&!b}},a.sceditor.dom={traverse:function(a,b,c,d,e){if(a)for(a=e?a.lastChild:a.firstChild;null!=a;){var f=e?a.previousSibling:a.nextSibling;if(!c&&b(a)===!1)return!1;if(!d&&this.traverse(a,b,c,d,e)===!1)return!1;if(c&&b(a)===!1)return!1;a=f}},rTraverse:function(a,b,c,d){this.traverse(a,b,c,d,!0)},parseHTML:function(b,d){var e=[],f=(d||c).createElement("div");return f.innerHTML=b,a.merge(e,f.childNodes),e},hasStyling:function(b){var c=a(b);return b&&(!c.is("p,div")||b.className||c.attr("style")||!a.isEmptyObject(c.data()))},convertElement:function(b,c){for(var d,e,f=b.attributes.length,g=b.ownerDocument.createElement(c);f--;)e=b.attributes[f],(!a.sceditor.ie||e.specified)&&(a.sceditor.ie<8&&/style/i.test(e.name)?b.style.cssText=b.style.cssText:g.setAttribute(e.name,e.value));for(;d=b.firstChild;)g.appendChild(d);return b.parentNode.replaceChild(g,b),g},blockLevelList:"|body|hr|p|div|h1|h2|h3|h4|h5|h6|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|blockquote|center|",isInline:function(b,c){return b&&1===b.nodeType?(b=b.tagName.toLowerCase(),"code"===b?!c:a.sceditor.dom.blockLevelList.indexOf("|"+b+"|")<0):!0},copyCSS:function(a,b){b.style.cssText=a.style.cssText+b.style.cssText},fixNesting:function(a){var b=this,c=function(a){for(;b.isInline(a.parentNode,!0);)a=a.parentNode;return a};b.traverse(a,function(a){if(1===a.nodeType&&!b.isInline(a,!0)&&b.isInline(a.parentNode,!0)){var d=c(a),e=d.parentNode,f=b.extractContents(d,a),g=a;b.copyCSS(d,g),e.insertBefore(f,d),e.insertBefore(g,d)}})},findCommonAncestor:function(b,c){return a(b).parents().has(a(c)).first()},getSibling:function(b,c){var d;return b?(d=b[c?"previousSibling":"nextSibling"])?d:a.sceditor.dom.getSibling(b.parentNode,c):null},removeWhiteSpace:function(b,c){for(var d,e,f,g,h,i,j,k,l=a.sceditor.dom.getSibling,m=a.sceditor.dom.isInline,n=b.firstChild,o=/[\t ]+/g,p=/[\t\n\r ]+/g;n;){if(i=n.nextSibling,d=n.nodeValue,e=n.nodeType,1===e&&n.firstChild&&(h=a(n).css("whiteSpace"),/pre(?:\-wrap)?$/i.test(h)||a.sceditor.dom.removeWhiteSpace(n,/line$/i.test(h))),3===e&&d){for(f=l(n),g=l(n,!0),k=g,j=!1;a(k).hasClass("sceditor-ignore");)k=l(k,!0);if(m(n)&&k){for(;k.lastChild;)k=k.lastChild;j=3===k.nodeType?/[\t\n\r ]$/.test(k.nodeValue):!m(k)}m(n)&&g&&m(g)&&!j||(d=d.replace(/^[\t\n\r ]+/,"")),m(n)&&f&&m(f)||(d=d.replace(/[\t\n\r ]+$/,"")),d.length?n.nodeValue=d.replace(c?o:p," "):b.removeChild(n)}n=i}},extractContents:function(a,b){var c=this,d=c.findCommonAncestor(a,b),e=d?d[0]:null,f=!1,g=!1;return function h(d){var e=a.ownerDocument.createDocumentFragment();return c.traverse(d,function(c){if(g||c===b&&f)return g=!0,!1;c===a&&(f=!0);var d,i;f?jQuery.contains(c,b)&&1===c.nodeType?(d=h(c),i=c.cloneNode(!1),i.appendChild(d),e.appendChild(i)):e.appendChild(c):jQuery.contains(c,a)&&1===c.nodeType&&(d=h(c),i=c.cloneNode(!1),i.appendChild(d),e.appendChild(i))},!1),e}(e)}},a.sceditor.plugins={},a.sceditor.PluginManager=function(b){var c=this,d=[],e=b,f=function(a){return"signal"+a.charAt(0).toUpperCase()+a.slice(1)},g=function(a,b){a=[].slice.call(a);for(var c=d.length,g=f(a.shift());c--;)if(g in d[c]){if(b)return d[c][g].apply(e,a);d[c][g].apply(e,a)}};c.call=function(){g(arguments,!1)},c.callOnlyFirst=function(){return g(arguments,!0)},c.iter=function(a){return a=f(a),function(){var b=d.length;return{callNext:function(c){for(;b--;)if(d[b]&&a in d[b])return d[b].apply(e,c)},hasNext:function(){for(var c=b;c--;)if(d[c]&&a in d[c])return!0;return!1}}}()},c.hasHandler=function(a){var b=d.length;for(a=f(a);b--;)if(a in d[b])return!0;return!1},c.exsists=function(b){return b in a.sceditor.plugins?(b=a.sceditor.plugins[b],"function"==typeof b&&"object"==typeof b.prototype):!1},c.isRegistered=function(b){var e=d.length;if(!c.exsists(b))return!1;for(;e--;)if(d[e]instanceof a.sceditor.plugins[b])return!0;return!1},c.register=function(b){return c.exsists(b)?(b=new a.sceditor.plugins[b],d.push(b),"init"in b&&b.init.apply(e),!0):!1},c.deregister=function(b){var f,g=d.length,h=!1;if(!c.isRegistered(b))return!1;for(;g--;)d[g]instanceof a.sceditor.plugins[b]&&(f=d.splice(g,1)[0],h=!0,"destroy"in f&&f.destroy.apply(e));return h},c.destroy=function(){for(var a=d.length;a--;)"destroy"in d[a]&&d[a].destroy.apply(e);d=null,e=null}},a.sceditor.command={get:function(b){return a.sceditor.commands[b]||null},set:function(b,c){return b&&c?(c=a.extend(a.sceditor.commands[b]||{},c),c.remove=function(){a.sceditor.command.remove(b)},a.sceditor.commands[b]=c,this):!1},remove:function(b){return a.sceditor.commands[b]&&delete a.sceditor.commands[b],this}},a.sceditor.defaultOptions={toolbar:"bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,paste,pastetext|bulletlist,orderedlist|table|code,quote|horizontalrule,image,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source",toolbarExclude:null,style:"jquery.sceditor.default.css",fonts:"Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana",colors:null,locale:"en",charset:"utf-8",emoticonsCompat:!1,emoticonsEnabled:!0,emoticonsRoot:"",emoticons:{dropdown:{":)":"emoticons/smile.png",":angel:":"emoticons/angel.png",":angry:":"emoticons/angry.png","8-)":"emoticons/cool.png",":'(":"emoticons/cwy.png",":ermm:":"emoticons/ermm.png",":D":"emoticons/grin.png","<3":"emoticons/heart.png",":(":"emoticons/sad.png",":O":"emoticons/shocked.png",":P":"emoticons/tongue.png",";)":"emoticons/wink.png"},more:{":alien:":"emoticons/alien.png",":blink:":"emoticons/blink.png",":blush:":"emoticons/blush.png",":cheerful:":"emoticons/cheerful.png",":devil:":"emoticons/devil.png",":dizzy:":"emoticons/dizzy.png",":getlost:":"emoticons/getlost.png",":happy:":"emoticons/happy.png",":kissing:":"emoticons/kissing.png",":ninja:":"emoticons/ninja.png",":pinch:":"emoticons/pinch.png",":pouty:":"emoticons/pouty.png",":sick:":"emoticons/sick.png",":sideways:":"emoticons/sideways.png",":silly:":"emoticons/silly.png",":sleeping:":"emoticons/sleeping.png",":unsure:":"emoticons/unsure.png",":woot:":"emoticons/w00t.png",":wassat:":"emoticons/wassat.png"},hidden:{":whistling:":"emoticons/whistling.png",":love:":"emoticons/wub.png"}},width:null,height:null,resizeEnabled:!0,resizeMinWidth:null,resizeMinHeight:null,resizeMaxHeight:null,resizeMaxWidth:null,resizeHeight:!0,resizeWidth:!0,getHtmlHandler:null,getTextHandler:null,dateFormat:"year-month-day",toolbarContainer:null,enablePasteFiltering:!1,disablePasting:!1,readOnly:!1,rtl:!1,autofocus:!1,autofocusEnd:!0,autoExpand:!1,autoUpdate:!1,spellcheck:!0,runWithoutWysiwygSupport:!1,id:null,plugins:"",zIndex:null,bbcodeTrim:!1,disableBlockRemove:!1,parserOptions:{},dropDownCss:{}},a.fn.sceditor=function(b){var c,d=[];return b=b||{},b.runWithoutWysiwygSupport||a.sceditor.isWysiwygSupported?(this.each(function(){c=this.jquery?this:a(this),c.parents(".sceditor-container").length>0||("state"===b?d.push(!!c.data("sceditor")):"instance"===b?d.push(c.data("sceditor")):c.data("sceditor")||new a.sceditor(this,b))}),d.length?1===d.length?d[0]:a(d):this):void 0}}(jQuery,window,document),function(a,b,c){"use strict";a.sceditor.BBCodeParser=function(b){if(!(this instanceof a.sceditor.BBCodeParser))return new a.sceditor.BBCodeParser(b);var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s=this,t={open:"open",content:"content",newline:"newline",close:"close"},u=function(a,b,c,d,e,f){var g=this;g.type=a,g.name=b,g.val=c,g.attrs=d||{},g.children=e||[],g.closing=f||null};u.prototype={clone:function(a){var b=this;return new u(b.type,b.name,b.val,b.attrs,a?b.children:[],b.closing?b.closing.clone():null)},splitAt:function(b){var c,d=this,e=0,f=d.children.length;if("number"!=typeof object&&(b=a.inArray(b,d.children)),0>b||b>f)return null;for(;f--;)f>=b?e++:f=0;return c=d.clone(),c.children=d.children.splice(b,e),c}},d=function(){s.opts=a.extend({},a.sceditor.BBCodeParser.defaults,b),s.bbcodes=a.sceditor.plugins.bbcode.bbcodes},s.tokenize=function(a){var b,c,d,f=[],g=[{type:"close",regex:/^\[\/[^\[\]]+\]/},{type:"open",regex:/^\[[^\[\]]+\]/},{type:"newline",regex:/^(\r\n|\r|\n)/},{type:"content",regex:/^([^\[\r\n]+|\[)/}];g.reverse();a:for(;a.length;){for(d=g.length;d--;)if(c=g[d].type,(b=a.match(g[d].regex))&&b[0]){f.push(e(c,b[0])),a=a.substr(b[0].length);continue a}a.length&&f.push(e(t.content,a)),a=""}return f},e=function(b,c){var d,e,g;return"open"===b&&(d=c.match(/\[([^\]\s=]+)(?:([^\]]+))?\]/))?(g=q(d[1]),d[2]&&(d[2]=a.trim(d[2]))&&(e=f(d[2]))):"close"===b&&(d=c.match(/\[\/([^\[\]]+)\]/))?g=q(d[1]):"newline"===b&&(g="#newline"),g&&("open"!==b&&"close"!==b||a.sceditor.plugins.bbcode.bbcodes[g])||(b="content",g="#"),new u(b,g,c,e)},f=function(b){var c,d=/([^\s=]+)=(?:(?:(["'])((?:\\\2|[^\2])*?)\2)|((?:.(?!\s\S+=))*.))/g,e=a.sceditor.plugins.bbcode.stripQuotes,f={};if("="===b.charAt(0)&&b.indexOf("=",1)<0)f.defaultattr=e(b.substr(1));else for("="===b.charAt(0)&&(b="defaultattr"+b);c=d.exec(b);)f[q(c[1])]=e(c[3])||c[4];return f},s.parse=function(a,b){var c=g(s.tokenize(a));return s.opts.fixInvalidChildren&&l(c),s.opts.removeEmptyTags&&k(c),s.opts.fixInvalidNesting&&i(c),h(c,null,b),s.opts.removeEmptyTags&&k(c),c},o=function(a,b,c){for(var d=c.length;d--;)if(c[d].type===b&&c[d].name===a)return!0;return!1},j=function(b,c){var d=b?s.bbcodes[b.name]:null,e=d?d.allowedChildren:null;return s.opts.fixInvalidChildren&&e?e&&a.inArray(c.name||"#",e)<0?!1:!0:!0},g=function(b){for(var c,d,e,f,g,h,i,j=[],k=[],l=[],m=function(){return r(l)},n=function(a){m()?m().children.push(a):k.push(a)},p=function(b){return m()&&(d=s.bbcodes[m().name])&&d.closedBy&&a.inArray(b,d.closedBy)>-1};c=b.shift();){switch(i=b[0],c.type){case t.open:p(c.name)&&l.pop(),n(c),d=s.bbcodes[c.name],d&&d.isSelfClosing||!d.closedBy&&!o(c.name,t.close,b)?d&&d.isSelfClosing||(c.type=t.content):l.push(c);break;case t.close:if(m()&&c.name!==m().name&&p("/"+c.name)&&l.pop(),m()&&c.name===m().name)m().closing=c,l.pop();else if(o(c.name,t.open,l)){for(;e=l.pop();){if(e.name===c.name){e.closing=c;break}f=e.clone(),j.length>1&&f.children.push(r(j)),j.push(f)}for(n(r(j)),g=j.length;g--;)l.push(j[g]);j.length=0}else c.type=t.content,n(c);break;case t.newline:m()&&i&&p((i.type===t.close?"/":"")+i.name)&&(i.type!==t.close||i.name!==m().name)&&(d=s.bbcodes[m().name],d&&d.breakAfter?l.pop():d&&d.isInline===!1&&s.opts.breakAfterBlock&&d.breakAfter!==!1&&l.pop()),n(c);break;default:n(c)}h=c}return k},h=function(a,b,c){var d,e,f,g,i,j,k,l,m=a.length,n=m;for(b&&(g=s.bbcodes[b.name]);n--;)if(d=a[n])if(d.type===t.newline){if(e=n>0?a[n-1]:null,f=m-1>n?a[n+1]:null,l=!1,!c&&g&&g.isSelfClosing!==!0&&(e?j||f||(g.isInline===!1&&s.opts.breakEndBlock&&g.breakEnd!==!1&&(l=!0),g.breakEnd&&(l=!0),j=l):(g.isInline===!1&&s.opts.breakStartBlock&&g.breakStart!==!1&&(l=!0),g.breakStart&&(l=!0))),e&&e.type===t.open&&(i=s.bbcodes[e.name])&&(c?i.isInline===!1&&(l=!0):(i.isInline===!1&&s.opts.breakAfterBlock&&i.breakAfter!==!1&&(l=!0),i.breakAfter&&(l=!0))),!c&&!k&&f&&f.type===t.open&&(i=s.bbcodes[f.name])&&(i.isInline===!1&&s.opts.breakBeforeBlock&&i.breakBefore!==!1&&(l=!0),i.breakBefore&&(l=!0),k=l,l)){a.splice(n,1);continue}l&&a.splice(n,1),k=!1}else d.type===t.open&&h(d.children,d,c)},i=function(b,c,d,e){var f,g,h,j,k,l,m=function(a){var b=s.bbcodes[a.name];return!b||b.isInline!==!1};for(c=c||[],e=e||b,g=0;g<b.length;g++)if((f=b[g])&&f.type===t.open){if(!m(f)&&d&&(h=r(c),l=h.splitAt(f),k=c.length>1?c[c.length-2].children:e,(j=a.inArray(h,k))>-1))return l.children.splice(a.inArray(f,l.children),1),k.splice(j+1,0,f,l),void 0;c.push(f),i(f.children,c,d||m(f),e),c.pop(f)}},l=function(a,b){for(var c,d,e=a.length;e--;)(c=a[e])&&(j(b,c)||(c.name=null,c.type=t.content,j(b,c)?(d=[e+1,0].concat(c.children),c.closing&&(c.closing.name=null,c.closing.type=t.content,d.push(c.closing)),e+=d.length-1,Array.prototype.splice.apply(a,d)):b.children.splice(e,1)),c.type===t.open&&l(c.children,c))},k=function(b){var c,d,e,f=b.length;for(e=function(a){for(var b=a.length;b--;){if(a[b].type===t.open)return!1;if(a[b].type===t.close)return!1;if(a[b].type===t.content&&a[b].val&&/\S|\u00A0/.test(a[b].val))return!1}return!0};f--;)(c=b[f])&&c.type===t.open&&(d=s.bbcodes[c.name],k(c.children),e(c.children)&&d&&!d.isSelfClosing&&!d.allowsEmpty&&b.splice.apply(b,a.merge([f,1],c.children)))},s.toHTML=function(a,b){return m(s.parse(a,b),!0)},m=function(b,d){var e,f,g,h,i,j,k,l,n=[];for(k=function(a){return(!a||("undefined"!=typeof a.isHtmlInline?a.isHtmlInline:a.isInline))!==!1};b.length>0;)if(e=b.shift()){if(e.type===t.open)l=e.children[e.children.length-1]||{},f=s.bbcodes[e.name],i=d&&k(f),g=m(e.children,!1),f&&f.html?(k(f)||!k(s.bbcodes[l.name])||f.isPreFormatted||f.skipLastLineBreak||a.sceditor.ie||(g+="<br />"),h=a.isFunction(f.html)?f.html.call(s,e,e.attrs,g):a.sceditor.plugins.bbcode.formatString(f.html,g)):h=e.val+g+(e.closing?e.closing.val:"");else{if(e.type===t.newline){if(!d){n.push("<br />");continue}j||(n.push("<div>"),(c.documentMode&&c.documentMode<8||a.sceditor.ie<8)&&n.push(" ")),a.sceditor.ie||n.push("<br />"),b.length||n.push("<br />"),n.push("</div>\n"),j=!1;continue}i=d,h=a.sceditor.escapeEntities(e.val)}i&&!j?(n.push("<div>"),j=!0):!i&&j&&(n.push("</div>\n"),j=!1),n.push(h)}return j&&n.push("</div>\n"),n.join("")},s.toBBCode=function(a,b){return n(s.parse(a,b))},n=function(b){for(var c,d,e,f,g,h,i,j,k,l,m=[];b.length>0;)if(c=b.shift())if(e=s.bbcodes[c.name],f=!(!e||e.isInline!==!1),g=e&&e.isSelfClosing,i=f&&s.opts.breakBeforeBlock&&e.breakBefore!==!1||e&&e.breakBefore,j=f&&!g&&s.opts.breakStartBlock&&e.breakStart!==!1||e&&e.breakStart,k=f&&s.opts.breakEndBlock&&e.breakEnd!==!1||e&&e.breakEnd,l=f&&s.opts.breakAfterBlock&&e.breakAfter!==!1||e&&e.breakAfter,h=(e?e.quoteType:null)||s.opts.quoteType||a.sceditor.BBCodeParser.QuoteType.auto,e||c.type!==t.open)if(c.type===t.open){if(i&&m.push("\n"),m.push("["+c.name),c.attrs){c.attrs.defaultattr&&(m.push("="+p(c.attrs.defaultattr,h,"defaultattr")),delete c.attrs.defaultattr);for(d in c.attrs)c.attrs.hasOwnProperty(d)&&m.push(" "+d+"="+p(c.attrs[d],h,d))}m.push("]"),j&&m.push("\n"),c.children&&m.push(n(c.children)),g||e.excludeClosing||(k&&m.push("\n"),m.push("[/"+c.name+"]")),l&&m.push("\n"),c.closing&&g&&m.push(c.closing.val)}else m.push(c.val);else m.push(c.val),c.children&&m.push(n(c.children)),c.closing&&m.push(c.closing.val);return m.join("")},p=function(b,c,d){var e=a.sceditor.BBCodeParser.QuoteType,f=/\s|=/.test(b);return a.isFunction(c)?c(b,d):c===e.never||c===e.auto&&!f?b:'"'+b.replace("\\","\\\\").replace('"','\\"')+'"'},r=function(a){return a.length?a[a.length-1]:null},q=function(a){return a.toLowerCase()},d()},a.sceditor.BBCodeParser.QuoteType={always:1,never:2,auto:3},a.sceditor.BBCodeParser.defaults={breakBeforeBlock:!1,breakStartBlock:!1,breakEndBlock:!1,breakAfterBlock:!0,removeEmptyTags:!0,fixInvalidNesting:!0,fixInvalidChildren:!0,quoteType:a.sceditor.BBCodeParser.QuoteType.auto},a.sceditorBBCodePlugin=a.sceditor.plugins.bbcode=function(){var b,d,e,f,g,h,i,j=this;f=a.sceditor.plugins.bbcode.formatString,j.bbcodes=a.sceditor.plugins.bbcode.bbcodes,j.stripQuotes=a.sceditor.plugins.bbcode.stripQuotes;var k={},l={},m={ul:["li","ol","ul"],ol:["li","ol","ul"],table:["tr"],tr:["td","th"],code:["br","p","div"]},n={};j.init=function(){j.opts=this.opts,b(),h(this),this.toBBCode=j.signalToSource,this.fromBBCode=j.signalToWysiwyg},h=function(b){var c=a.sceditor.command.get,d={bold:{txtExec:["[b]","[/b]"]},italic:{txtExec:["[i]","[/i]"]},underline:{txtExec:["[u]","[/u]"]},strike:{txtExec:["[s]","[/s]"]},subscript:{txtExec:["[sub]","[/sub]"]},superscript:{txtExec:["[sup]","[/sup]"]},left:{txtExec:["[left]","[/left]"]},center:{txtExec:["[center]","[/center]"]},right:{txtExec:["[right]","[/right]"]},justify:{txtExec:["[justify]","[/justify]"]},font:{txtExec:function(a){var b=this;c("font")._dropDown(b,a,function(a){b.insertText("[font="+a+"]","[/font]")})}},size:{txtExec:function(a){var b=this;c("size")._dropDown(b,a,function(a){b.insertText("[size="+a+"]","[/size]")})}},color:{txtExec:function(a){var b=this;c("color")._dropDown(b,a,function(a){b.insertText("[color="+a+"]","[/color]")})}},bulletlist:{txtExec:function(c,d){var e="";a.each(d.split(/\r?\n/),function(){e+=(e?"\n":"")+"[li]"+this+"[/li]"}),b.insertText("[ul]\n"+e+"\n[/ul]")}},orderedlist:{txtExec:function(c,d){var e="";a.each(d.split(/\r?\n/),function(){e+=(e?"\n":"")+"[li]"+this+"[/li]"}),a.sceditor.plugins.bbcode.bbcode.get(""),b.insertText("[ol]\n"+e+"\n[/ol]")}},table:{txtExec:["[table][tr][td]","[/td][/tr][/table]"]},horizontalrule:{txtExec:["[hr]"]},code:{txtExec:["[code]","[/code]"]},image:{txtExec:function(a,b){var c=prompt(this._("Enter the image URL:"),b);c&&this.insertText("[img]"+c+"[/img]")}},email:{txtExec:function(a,b){var c=b&&b.indexOf("@")>-1?null:b,d=prompt(this._("Enter the e-mail address:"),c?"":b),e=prompt(this._("Enter the displayed text:"),c||d)||d;d&&this.insertText("[email="+d+"]"+e+"[/email]")}},link:{txtExec:function(a,b){var c=b&&b.indexOf("http://")>-1?null:b,d=prompt(this._("Enter URL:"),c?"http://":b),e=prompt(this._("Enter the displayed text:"),c||d)||d;d&&this.insertText("[url="+d+"]"+e+"[/url]")}},quote:{txtExec:["[quote]","[/quote]"]},youtube:{txtExec:function(a){var b=this;c("youtube")._dropDown(b,a,function(a){b.insertText("[youtube]"+a+"[/youtube]")})}},rtl:{txtExec:["[rtl]","[/rtl]"]},ltr:{txtExec:["[ltr]","[/ltr]"]}};b.commands=a.extend(!0,{},d,b.commands)},b=function(){a.each(j.bbcodes,function(b){j.bbcodes[b].tags&&a.each(j.bbcodes[b].tags,function(a,c){var d=j.bbcodes[b].isInline===!1;k[a]=k[a]||{},k[a][d]=k[a][d]||{},k[a][d][b]=c}),j.bbcodes[b].styles&&a.each(j.bbcodes[b].styles,function(a,c){var d=j.bbcodes[b].isInline===!1;l[d]=l[d]||{},l[d][a]=l[d][a]||{},l[d][a][b]=c})})},g=function(b,c){var d,e,f,g,h,i=b.style;return i?(n[c]||(n[c]=a.camelCase(c)),h=n[c],"text-align"===c?(d=a(b),f=i.direction,g=i[h]||d.css(c),d.parent().css(c)===g||"block"!==d.css("display")||d.is("hr")||d.is("th")||(e=g),f&&e&&(/right/i.test(e)&&"rtl"===f||/left/i.test(e)&&"ltr"===f)?null:e):i[h]):null},d=function(b,c,d){var e;return d=!!d,l[d]?(a.each(l[d],function(d,h){e=g(b[0],d),e&&g(b.parent()[0],d)!==e&&a.each(h,function(d,g){(!g||a.inArray(e.toString(),g)>-1)&&(c=a.isFunction(j.bbcodes[d].format)?j.bbcodes[d].format.call(j,b,c):f(j.bbcodes[d].format,c))})}),c):c},e=function(b,c,d){var e,g=b[0],h=g.nodeName.toLowerCase();if(d=!!d,k[h]&&k[h][d]&&a.each(k[h][d],function(d,g){(!g||(e=!1,a.each(g,function(c,d){return!b.attr(c)||d&&a.inArray(b.attr(c),d)<0?void 0:(e=!0,!1)}),e))&&(c=a.isFunction(j.bbcodes[d].format)?j.bbcodes[d].format.call(j,b,c):f(j.bbcodes[d].format,c))}),d&&(!a.sceditor.dom.isInline(g,!0)||"br"===h)){for(var i=g.parentNode,l=i.lastChild,m=g.previousSibling,n=a.sceditor.dom.isInline(i,!0);m&&a(m).hasClass("sceditor-ignore");)m=m.previousSibling;for(;a(l).hasClass("sceditor-ignore");)l=l.previousSibling;(n||l!==g||"li"===h||"br"===h&&a.sceditor.ie)&&(c+="\n"),"br"!==h&&m&&"br"!==m.nodeName.toLowerCase()&&a.sceditor.dom.isInline(m,!0)&&(c="\n"+c)}return c},j.signalToSource=function(b,d){var e,f,g=new a.sceditor.BBCodeParser(j.opts.parserOptions);return d||("string"==typeof b?(e=a("<div />").css("visibility","hidden").appendTo(c.body).html(b),d=e):d=a(b)),d&&d.jquery?(a.sceditor.dom.removeWhiteSpace(d[0]),f=j.elementToBbcode(d),e&&e.remove(),f=g.toBBCode(f,!0),j.opts.bbcodeTrim&&(f=a.trim(f)),f):""},j.elementToBbcode=function(b){return function c(b,f){var g="";return a.sceditor.dom.traverse(b,function(b){var h=a(b),i="",j=b.nodeType,k=b.nodeName.toLowerCase(),l=m[k],n=b.firstChild,o=!0;if("object"==typeof f&&(o=a.inArray(k,f)>-1,h.is("img")&&h.data("sceditor-emoticon")&&(o=!0),o||(l=f)),3===j||1===j)if(1===j){if(h.hasClass("sceditor-ignore"))return;if(h.hasClass("sceditor-nlf")&&(!n||!a.sceditor.ie&&1===b.childNodes.length&&/br/i.test(n.nodeName)))return;"iframe"!==k&&(i=c(b,l)),o?("code"!==k&&(i=d(h,i),i=e(h,i),i=d(h,i,!0)),g+=e(h,i,!0)):g+=i}else!b.wholeText||b.previousSibling&&3===b.previousSibling.nodeType?b.wholeText||(g+=b.nodeValue):g+=0===h.parents("code").length?b.wholeText.replace(/ +/g," "):b.wholeText},!1,!0),g}(b[0])},j.signalToWysiwyg=function(b,c){var d=new a.sceditor.BBCodeParser(j.opts.parserOptions),e=d.toHTML(j.opts.bbcodeTrim?a.trim(b):b);return c?i(e):e},i=function(b){var d,e,f,g=a("<div />").hide().appendTo(c.body),h=g[0];return f=function(b,d){if(!a.sceditor.dom.hasStyling(b)){if(a.sceditor.ie||1!==b.childNodes.length||!a(b.firstChild).is("br"))for(;e=b.firstChild;)h.insertBefore(e,b);if(d){var f=h.lastChild;b!==f&&a(f).is("div")&&b.nextSibling===f&&h.insertBefore(c.createElement("br"),b)}h.removeChild(b)}},h.innerHTML=b.replace(/<\/div>\n/g,"</div>"),(d=h.firstChild)&&a(d).is("div")&&f(d,!0),(d=h.lastChild)&&a(d).is("div")&&f(d),h=h.innerHTML,g.remove(),h}},a.sceditor.plugins.bbcode.stripQuotes=function(a){return a?a.replace(/\\(.)/g,"$1").replace(/^(["'])(.*?)\1$/,"$2"):a},a.sceditor.plugins.bbcode.formatString=function(){var a=arguments;return a[0].replace(/\{(\d+)\}/g,function(b,c){return"undefined"!=typeof a[c-0+1]?a[c-0+1]:"{"+c+"}"})};var d=a.sceditor.plugins.bbcode.normaliseColour=function(a){var b,c;return c=function(a){return a=parseInt(a,10),isNaN(a)?"00":(a=Math.max(0,Math.min(a,255)).toString(16),a.length<2?"0"+a:a)},a=a||"#000",(b=a.match(/rgb\((\d{1,3}),\s*?(\d{1,3}),\s*?(\d{1,3})\)/i))?"#"+c(b[1])+c(b[2]-0)+c(b[3]-0):(b=a.match(/#([0-f])([0-f])([0-f])\s*?$/i))?"#"+b[1]+b[1]+b[2]+b[2]+b[3]+b[3]:a};a.sceditor.plugins.bbcode.bbcodes={b:{tags:{b:null,strong:null},styles:{"font-weight":["bold","bolder","401","700","800","900"]},format:"[b]{0}[/b]",html:"<strong>{0}</strong>"},i:{tags:{i:null,em:null},styles:{"font-style":["italic","oblique"]},format:"[i]{0}[/i]",html:"<em>{0}</em>"},u:{tags:{u:null},styles:{"text-decoration":["underline"]},format:"[u]{0}[/u]",html:"<u>{0}</u>"},s:{tags:{s:null,strike:null},styles:{"text-decoration":["line-through"]},format:"[s]{0}[/s]",html:"<s>{0}</s>"},sub:{tags:{sub:null},format:"[sub]{0}[/sub]",html:"<sub>{0}</sub>"},sup:{tags:{sup:null},format:"[sup]{0}[/sup]",html:"<sup>{0}</sup>"},font:{tags:{font:{face:null}},styles:{"font-family":null},quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(a,b){var c;return"font"===a[0].nodeName.toLowerCase()&&(c=a.attr("face"))||(c=a.css("font-family")),"[font="+this.stripQuotes(c)+"]"+b+"[/font]"},html:function(a,b,c){return'<font face="'+b.defaultattr+'">'+c+"</font>"}},size:{tags:{font:{size:null}},styles:{"font-size":null},format:function(a,b){var c=a.attr("size"),d=1;return c||(c=a.css("fontSize")),c.indexOf("px")>-1?(c=c.replace("px","")-0,c>12&&(d=2),c>15&&(d=3),c>17&&(d=4),c>23&&(d=5),c>31&&(d=6),c>47&&(d=7)):d=c,"[size="+d+"]"+b+"[/size]"},html:function(a,b,c){return'<font size="'+b.defaultattr+'">'+c+"</font>"}},color:{tags:{font:{color:null}},styles:{color:null},quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(a,b){var c,e=a[0];return"font"===e.nodeName.toLowerCase()&&(c=a.attr("color"))||(c=e.style.color||a.css("color")),"[color="+d(c)+"]"+b+"[/color]"},html:function(a,b,c){return'<font color="'+d(b.defaultattr)+'">'+c+"</font>"}},ul:{tags:{ul:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ul]{0}[/ul]",html:"<ul>{0}</ul>"},list:{breakStart:!0,isInline:!1,skipLastLineBreak:!0,html:"<ul>{0}</ul>"},ol:{tags:{ol:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ol]{0}[/ol]",html:"<ol>{0}</ol>"},li:{tags:{li:null},isInline:!1,closedBy:["/ul","/ol","/list","*","li"],format:"[li]{0}[/li]",html:"<li>{0}</li>"},"*":{isInline:!1,closedBy:["/ul","/ol","/list","*","li"],html:"<li>{0}</li>"},table:{tags:{table:null},isInline:!1,isHtmlInline:!0,skipLastLineBreak:!0,format:"[table]{0}[/table]",html:"<table>{0}</table>"},tr:{tags:{tr:null},isInline:!1,skipLastLineBreak:!0,format:"[tr]{0}[/tr]",html:"<tr>{0}</tr>"},th:{tags:{th:null},allowsEmpty:!0,isInline:!1,format:"[th]{0}[/th]",html:"<th>{0}</th>"},td:{tags:{td:null},allowsEmpty:!0,isInline:!1,format:"[td]{0}[/td]",html:"<td>{0}</td>"},emoticon:{allowsEmpty:!0,tags:{img:{src:null,"data-sceditor-emoticon":null}},format:function(a,b){return a.data("sceditor-emoticon")+b
11},html:"{0}"},hr:{tags:{hr:null},allowsEmpty:!0,isSelfClosing:!0,isInline:!1,format:"[hr]{0}",html:"<hr />"},img:{allowsEmpty:!0,tags:{img:{src:null}},quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(a,b){var c,d,e="",f=a[0],g=function(a){return f.style?f.style[a]:null};return a.attr("data-sceditor-emoticon")?b:(c=a.attr("width")||g("width"),d=a.attr("height")||g("height"),(f.complete&&(c||d)||c&&d)&&(e="="+a.width()+"x"+a.height()),"[img"+e+"]"+a.attr("src")+"[/img]")},html:function(a,b,c){var d,e="";return"undefined"!=typeof b.width&&(e+=' width="'+b.width+'"'),"undefined"!=typeof b.height&&(e+=' height="'+b.height+'"'),b.defaultattr&&(d=b.defaultattr.split(/x/i),e=' width="'+d[0]+'"'+' height="'+(2===d.length?d[1]:d[0])+'"'),"<img"+e+' src="'+c+'" />'}},url:{allowsEmpty:!0,tags:{a:{href:null}},quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(a,b){var c=a.attr("href");return"mailto:"===c.substr(0,7)?'[email="'+c.substr(7)+'"]'+b+"[/email]":"[url="+decodeURI(c)+"]"+b+"[/url]"},html:function(a,b,c){return'<a href="'+encodeURI(b.defaultattr||c)+'">'+c+"</a>"}},email:{quoteType:a.sceditor.BBCodeParser.QuoteType.never,html:function(a,b,c){return'<a href="mailto:'+(b.defaultattr||c)+'">'+c+"</a>"}},quote:{tags:{blockquote:null},isInline:!1,quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(b,c){var d="",e=a(b),f=e.children("cite").first();return(1===f.length||e.data("author"))&&(d=f.text()||e.data("author"),e.data("author",d),f.remove(),c=this.elementToBbcode(a(b)),d="="+d,e.prepend(f)),"[quote"+d+"]"+c+"[/quote]"},html:function(a,b,c){return b.defaultattr&&(c="<cite>"+b.defaultattr+"</cite>"+c),"<blockquote>"+c+"</blockquote>"}},code:{tags:{code:null},isInline:!1,allowedChildren:["#","#newline"],format:"[code]{0}[/code]",html:"<code>{0}</code>"},left:{styles:{"text-align":["left","-webkit-left","-moz-left","-khtml-left"]},isInline:!1,format:"[left]{0}[/left]",html:'<div align="left">{0}</div>'},center:{styles:{"text-align":["center","-webkit-center","-moz-center","-khtml-center"]},isInline:!1,format:"[center]{0}[/center]",html:'<div align="center">{0}</div>'},right:{styles:{"text-align":["right","-webkit-right","-moz-right","-khtml-right"]},isInline:!1,format:"[right]{0}[/right]",html:'<div align="right">{0}</div>'},justify:{styles:{"text-align":["justify","-webkit-justify","-moz-justify","-khtml-justify"]},isInline:!1,format:"[justify]{0}[/justify]",html:'<div align="justify">{0}</div>'},youtube:{allowsEmpty:!0,tags:{iframe:{"data-youtube-id":null}},format:function(a,b){return a=a.attr("data-youtube-id"),a?"[youtube]"+a+"[/youtube]":b},html:'<iframe width="560" height="315" src="http://www.youtube.com/embed/{0}?wmode=opaque" data-youtube-id="{0}" frameborder="0" allowfullscreen></iframe>'},rtl:{styles:{direction:["rtl"]},format:"[rtl]{0}[/rtl]",html:'<div style="direction: rtl">{0}</div>'},ltr:{styles:{direction:["ltr"]},format:"[ltr]{0}[/ltr]",html:'<div style="direction: ltr">{0}</div>'},ignore:{}},a.sceditor.plugins.bbcode.bbcode={get:function(b){return a.sceditor.plugins.bbcode.bbcodes[b]||null},set:function(b,c){return b&&c?(c=a.extend(a.sceditor.plugins.bbcode.bbcodes[b]||{},c),c.remove=function(){a.sceditor.plugins.bbcode.bbcode.remove(b)},a.sceditor.plugins.bbcode.bbcodes[b]=c,this):!1},rename:function(a,b){return this.hasOwnProperty(a)?(this[b]=this[a],this.remove(a),this):!1},remove:function(b){return a.sceditor.plugins.bbcode.bbcodes[b]&&delete a.sceditor.plugins.bbcode.bbcodes[b],this}},a.fn.sceditorBBCodePlugin=function(b){return b=b||{},a.isPlainObject(b)&&(b.plugins=(b.plugins?b.plugins:"")+"bbcode"),this.sceditor(b)}}(jQuery,window,document);/* SCEditor v1.4.4 | (C) 2011-2013, Sam Clarke | sceditor.com/license */
12!function(a,b,c){"use strict";var d={html:'<!DOCTYPE html><html><head><style>.ie * {min-height: auto !important}</style><meta http-equiv="Content-Type" content="text/html;charset={charset}" /><link rel="stylesheet" type="text/css" href="{style}" /></head><body contenteditable="true" {spellcheck}></body></html>',toolbarButton:'<a class="sceditor-button sceditor-button-{name}" data-sceditor-command="{name}" unselectable="on"><div unselectable="on">{dispName}</div></a>',emoticon:'<img src="{url}" data-sceditor-emoticon="{key}" alt="{key}" title="{tooltip}" />',fontOpt:'<a class="sceditor-font-option" href="#" data-font="{font}"><font face="{font}">{font}</font></a>',sizeOpt:'<a class="sceditor-fontsize-option" data-size="{size}" href="#"><font size="{size}">{size}</font></a>',pastetext:'<div><label for="txt">{label}</label> <textarea cols="20" rows="7" id="txt"></textarea></div><div><input type="button" class="button" value="{insert}" /></div>',table:'<div><label for="rows">{rows}</label><input type="text" id="rows" value="2" /></div><div><label for="cols">{cols}</label><input type="text" id="cols" value="2" /></div><div><input type="button" class="button" value="{insert}" /></div>',image:'<div><label for="link">{url}</label> <input type="text" id="image" value="http://" /></div><div><label for="width">{width}</label> <input type="text" id="width" size="2" /></div><div><label for="height">{height}</label> <input type="text" id="height" size="2" /></div><div><input type="button" class="button" value="{insert}" /></div>',email:'<div><label for="email">{label}</label> <input type="text" id="email" /></div><div><input type="button" class="button" value="{insert}" /></div>',link:'<div><label for="link">{url}</label> <input type="text" id="link" value="http://" /></div><div><label for="des">{desc}</label> <input type="text" id="des" /></div><div><input type="button" class="button" value="{ins}" /></div>',youtubeMenu:'<div><label for="link">{label}</label> <input type="text" id="link" value="http://" /></div><div><input type="button" class="button" value="{insert}" /></div>',youtube:'<iframe width="560" height="315" src="http://www.youtube.com/embed/{id}?wmode=opaque" data-youtube-id="{id}" frameborder="0" allowfullscreen></iframe>'},e=function(b,c,e){var f=d[b];return a.each(c,function(a,b){f=f.replace(new RegExp("\\{"+a+"\\}","g"),b)}),e&&(f=a(f)),f};a.sceditor=function(d,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb=this,hb=d.get?d.get(0):d,ib=a(hb),jb=[],kb=[],lb=[],mb=[],nb={},ob=[];gb.commands=a.extend(!0,{},f.commands||a.sceditor.commands),gb.opts=f=a.extend({},a.sceditor.defaultOptions,f),A=function(){ib.data("sceditor",gb),a.each(f,function(b,c){a.isPlainObject(c)&&(f[b]=a.extend(!0,{},c))}),f.locale&&"en"!==f.locale&&G(),g=a('<div class="sceditor-container" />').insertAfter(ib).css("z-index",f.zIndex),a.sceditor.ie&&g.addClass("ie ie"+a.sceditor.ie),y=!!ib.attr("required"),ib.removeAttr("required"),F(),M(),H(),E(),K(),I(),J(),a.sceditor.isWysiwygSupported||gb.toggleSourceMode();var d=function(){a(b).unbind("load",d),f.autofocus&&cb(),f.autoExpand&&gb.expandToContent(),X()};a(b).load(d),c.readyState&&"complete"===c.readyState&&d(),Z(),t.call("ready")},F=function(){var b=f.plugins;b=b?b.toString().split(","):[],t=new a.sceditor.PluginManager(gb),a.each(b,function(b,c){t.register(a.trim(c))})},G=function(){var b;a.sceditor.locale[f.locale]?q=a.sceditor.locale[f.locale]:(b=f.locale.split("-"),a.sceditor.locale[b[0]]&&(q=a.sceditor.locale[b[0]])),q&&q.dateFormat&&(f.dateFormat=q.dateFormat)},E=function(){var c,d;m=a("<textarea></textarea>").hide(),i=a('<iframe frameborder="0"></iframe>'),f.spellcheck||m.attr("spellcheck","false"),"https:"===b.location.protocol&&i.attr("src","javascript:false"),g.append(i).append(m),j=i[0],n=m[0],gb.width(f.width||ib.width()),gb.height(f.height||ib.height()),c=N(),c.open(),c.write(e("html",{spellcheck:f.spellcheck?"":'spellcheck="false"',charset:f.charset,style:f.style})),c.close(),l=a(c),k=a(c.body),gb.readOnly(!!f.readOnly),a.sceditor.ie&&l.find("html").addClass("ie ie"+a.sceditor.ie),(a.sceditor.ios||a.sceditor.ie)&&(k.height("100%"),a.sceditor.ie||k.bind("touchend",gb.focus)),r=new a.sceditor.rangeHelper(j.contentWindow),gb.val(ib.hide().val()),d=ib.attr("tabindex"),m.attr("tabindex",d),i.attr("tabindex",d)},I=function(){f.autoUpdate&&(k.bind("blur",gb.updateOriginal),m.bind("blur",gb.updateOriginal)),null===f.rtl&&(f.rtl="rtl"===m.css("direction")),gb.rtl(!!f.rtl),f.autoExpand&&l.bind("keyup",gb.expandToContent),f.resizeEnabled&&L(),g.attr("id",f.id),gb.emoticons(f.emoticonsEnabled)},J=function(){a(c).click(W),a(hb.form).bind("reset",T).submit(gb.updateOriginal),a(b).bind("resize orientationChanged",X),k.keypress(S).keydown(Q).keydown(R).keyup(_).bind("paste",O).bind(a.sceditor.ie?"selectionchange":"keyup focus blur contextmenu mouseup touchend click",ab).bind("keydown keyup keypress focus blur contextmenu",V),f.emoticonsCompat&&b.getSelection&&k.keyup(eb),m.bind("keydown keyup keypress focus blur contextmenu",V).keydown(Q),l.keypress(S).mousedown(U).bind(a.sceditor.ie?"selectionchange":"focus blur contextmenu mouseup click",ab).bind("beforedeactivate keyup",D).keyup(_).focus(function(){p=null}),g.bind("selectionchanged",bb).bind("selectionchanged",Z).bind("selectionchanged",V).bind("nodechanged",V)},H=function(){var b,c,d=(f.toolbarExclude||"").split(","),i=f.toolbar.split("|");h=a('<div class="sceditor-toolbar" unselectable="on" />'),a.each(i,function(f,g){b=a('<div class="sceditor-group" />'),a.each(g.split(","),function(f,g){!gb.commands[g]||a.inArray(g,d)>-1||(c=e("toolbarButton",{name:g,dispName:gb._(gb.commands[g].tooltip||g)},!0),c.data("sceditor-txtmode",!!gb.commands[g].txtExec),c.data("sceditor-wysiwygmode",!!gb.commands[g].exec),c.click(function(){var b=a(this);return b.hasClass("disabled")||C(b,gb.commands[g]),Z(),!1}),gb.commands[g].tooltip&&c.attr("title",gb._(gb.commands[g].tooltip)),gb.commands[g].exec||c.addClass("disabled"),gb.commands[g].shortcut&&gb.addShortcut(gb.commands[g].shortcut,g),b.append(c))}),b[0].firstChild&&h.append(b)}),a(f.toolbarContainer||g).append(h)},K=function(){a.each(gb.commands,function(b,c){c.keyPress&&jb.push(c.keyPress),c.forceNewLineAfter&&a.isArray(c.forceNewLineAfter)&&(lb=a.merge(lb,c.forceNewLineAfter)),c.state?mb.push({name:b,state:c.state}):"string"==typeof c.exec&&mb.push({name:b,state:c.exec})}),_()},L=function(){var d,e,h,i,j,k,l=a('<div class="sceditor-grip" />'),m=a('<div class="sceditor-resize-cover" />'),n=0,o=0,p=0,q=0,r=g.width(),s=g.height(),t=!1,u=gb.rtl();d=f.resizeMinHeight||s/1.5,e=f.resizeMaxHeight||2.5*s,h=f.resizeMinWidth||r/1.25,i=f.resizeMaxWidth||1.25*r,j=function(c){"touchmove"===c.type&&(c=b.event);var j=q+(c.pageY-o),k=u?p-(c.pageX-n):p+(c.pageX-n);i>0&&k>i&&(k=i),e>0&&j>e&&(j=e),(!f.resizeWidth||h>k||i>0&&k>i)&&(k=!1),(!f.resizeHeight||d>j||e>0&&j>e)&&(j=!1),(k||j)&&(gb.dimensions(k,j),a.sceditor.ie<7&&g.height(j)),c.preventDefault()},k=function(b){t&&(t=!1,m.hide(),g.removeClass("resizing").height("auto"),a(c).unbind("touchmove mousemove",j),a(c).unbind("touchend mouseup",k),b.preventDefault())},g.append(l),g.append(m.hide()),l.bind("touchstart mousedown",function(d){"touchstart"===d.type&&(d=b.event),n=d.pageX,o=d.pageY,p=g.width(),q=g.height(),t=!0,g.addClass("resizing"),m.show(),a(c).bind("touchmove mousemove",j),a(c).bind("touchend mouseup",k),a.sceditor.ie<7&&g.height(q),d.preventDefault()})},M=function(){var b,d=f.emoticons,e=f.emoticonsRoot;a.isPlainObject(d)&&f.emoticonsEnabled&&a.each(d,function(f,g){a.each(g,function(a,g){e&&(g={url:e+(g.url||g),tooltip:g.tooltip||a},d[f][a]=g),b=c.createElement("img"),b.src=g.url||g,kb.push(b)})})},cb=function(){var b,c,d,e=l[0],h=k[0],i=!!f.autofocusEnd;if(g.is(":visible")){if(gb.sourceMode())d=n.value.length,n.setSelectionRange?n.setSelectionRange(d,d):n.createTextRange&&(b=n.createTextRange(),b.moveEnd("character",d),b.moveStart("character",d),r.selectRange(b));else{if(a.sceditor.dom.removeWhiteSpace(h),i)for((c=h.lastChild)||k.append(c=e.createElement("div"));c.lastChild;)c=c.lastChild,/br/i.test(c.nodeName)&&c.previousSibling&&(c=c.previousSibling);else c=h.firstChild;e.createRange?(b=e.createRange(),/br/i.test(c.nodeName)?b.setStartBefore(c):b.selectNodeContents(c),b.collapse(!1)):(b=h.createTextRange(),b.moveToElementText(3!==c.nodeType?c:c.parentNode),b.collapse(!1)),r.selectRange(b),i&&(l.scrollTop(h.scrollHeight),k.scrollTop(h.scrollHeight))}gb.focus()}},gb.readOnly=function(a){return"boolean"!=typeof a?"readonly"===m.attr("readonly"):(k[0].contentEditable=!a,a?m.attr("readonly","readonly"):m.removeAttr("readonly"),Y(a),this)},gb.rtl=function(a){var b=a?"rtl":"ltr";return"boolean"!=typeof a?"rtl"===m.attr("dir"):(k.attr("dir",b),m.attr("dir",b),g.removeClass("rtl").removeClass("ltr").addClass(b),this)},Y=function(b){var c=gb.inSourceMode();h.find(".sceditor-button").removeClass("disabled").each(function(){var d=a(this);b===!0||c&&!d.data("sceditor-txtmode")?d.addClass("disabled"):c||d.data("sceditor-wysiwygmode")||d.addClass("disabled")})},gb.width=function(a,b){return a||0===a?(gb.dimensions(a,null,b),this):g.width()},gb.dimensions=function(b,d,e){var j=a.sceditor.ie<8||c.documentMode<8?2:0;return b=b||0===b?b:!1,d=d||0===d?d:!1,b===!1&&d===!1?{width:gb.width(),height:gb.height()}:("undefined"==typeof i.data("outerWidthOffset")&&gb.updateStyleCache(),b!==!1&&(e!==!1&&(f.width=b),d===!1&&(d=g.height(),e=!1),g.width(b),b&&b.toString().indexOf("%")>-1&&(b=g.width()),i.width(b-i.data("outerWidthOffset")),m.width(b-m.data("outerWidthOffset")),a.sceditor.ios&&k&&k.width(b-i.data("outerWidthOffset")-(k.outerWidth(!0)-k.width()))),d!==!1&&(e!==!1&&(f.height=d),d&&d.toString().indexOf("%")>-1&&(d=g.height(d).height(),g.height("auto")),d-=f.toolbarContainer?0:h.outerHeight(!0),i.height(d-i.data("outerHeightOffset")),m.height(d-j-m.data("outerHeightOffset"))),this)},gb.updateStyleCache=function(){i.data("outerWidthOffset",i.outerWidth(!0)-i.width()),m.data("outerWidthOffset",m.outerWidth(!0)-m.width()),i.data("outerHeightOffset",i.outerHeight(!0)-i.height()),m.data("outerHeightOffset",m.outerHeight(!0)-m.height())},gb.height=function(a,b){return a||0===a?(gb.dimensions(null,a,b),this):g.height()},gb.maximize=function(b){return"undefined"==typeof b?g.is(".sceditor-maximize"):(b=!!b,a.sceditor.ie<7&&a("html, body").toggleClass("sceditor-maximize",b),g.toggleClass("sceditor-maximize",b),gb.width(b?"100%":f.width,!1),gb.height(b?"100%":f.height,!1),this)},gb.expandToContent=function(a){var b=g.height(),c=k[0].scrollHeight||l[0].documentElement.scrollHeight,d=b-i.height(),e=f.resizeMaxHeight||2*(f.height||ib.height());c+=d,a!==!0&&c>e&&(c=e),c>b&&gb.height(c)},gb.destroy=function(){t.destroy(),r=null,p=null,t=null,a(c).unbind("click",W),a(b).unbind("resize orientationChanged",X),a(hb.form).unbind("reset",T).unbind("submit",gb.updateOriginal),k.unbind(),l.unbind().find("*").remove(),m.unbind().remove(),h.remove(),g.unbind().find("*").unbind().remove(),g.remove(),ib.removeData("sceditor").removeData("sceditorbbcode").show(),y&&ib.attr("required","required")},gb.createDropDown=function(b,c,d,e){var g,h=o&&o.is(".sceditor-"+c);gb.closeDropDown(),h||(e!==!1&&a(d).find(":not(input,textarea)").filter(function(){return 1===this.nodeType}).attr("unselectable","on"),g={top:b.offset().top,left:b.offset().left,marginTop:b.outerHeight()},a.extend(g,f.dropDownCss),o=a('<div class="sceditor-dropdown sceditor-'+c+'" />').css(g).append(d).appendTo(a("body")).click(function(a){a.stopPropagation()}))},W=function(a){3!==a.which&&gb.closeDropDown()},O=function(a){var b,d,e=k[0],g=l[0],h=0,i=c.createElement("div"),j=g.createDocumentFragment();if(f.disablePasting)return!1;if(f.enablePasteFiltering){if(r.saveRange(),c.body.appendChild(i),a&&a.clipboardData&&a.clipboardData.getData&&((b=a.clipboardData.getData("text/html"))||(b=a.clipboardData.getData("text/plain"))))return i.innerHTML=b,P(e,i),!1;for(;e.firstChild;)j.appendChild(e.firstChild);return d=function(a,b){if(a.childNodes.length>0){for(;a.firstChild;)b.appendChild(a.firstChild);for(;j.firstChild;)a.appendChild(j.firstChild);P(a,b)}else{if(h>25){for(;j.firstChild;)a.appendChild(j.firstChild);return r.restoreRange(),void 0}++h,setTimeout(function(){d(a,b)},20)}},d(e,i),gb.focus(),!0}},P=function(b,c){a.sceditor.dom.fixNesting(c);var d=c.innerHTML;t.hasHandler("toSource")&&(d=t.callOnlyFirst("toSource",d,a(c))),c.parentNode.removeChild(c),t.hasHandler("toWysiwyg")&&(d=t.callOnlyFirst("toWysiwyg",d,!0)),r.restoreRange(),gb.wysiwygEditorInsertHtml(d,null,!0)},gb.closeDropDown=function(a){o&&(o.unbind().remove(),o=null),a===!0&&gb.focus()},N=function(){return j.contentDocument?j.contentDocument:j.contentWindow&&j.contentWindow.document?j.contentWindow.document:j.document?j.document:null},gb.wysiwygEditorInsertHtml=function(b,c,d){var e,f,g='<span id="sceditor-cursor"> </span>';gb.focus(),(d||!a(v).is("code")&&0===a(v).parents("code").length)&&(c?c+=g:b+=g,r.insertHTML(b,c),f=k.find("#sceditor-cursor"),e=f.offset().top+2*f.outerHeight(!0)-i.height(),f.remove(),l.scrollTop(e),k.scrollTop(e),r.saveRange(),B(k[0]),r.restoreRange(),_())},gb.wysiwygEditorInsertText=function(b,c){gb.wysiwygEditorInsertHtml(a.sceditor.escapeEntities(b),a.sceditor.escapeEntities(c))},gb.insertText=function(a,b){return gb.inSourceMode()?gb.sourceEditorInsertText(a,b):gb.wysiwygEditorInsertText(a,b),this},gb.sourceEditorInsertText=function(a,b){var d,e,f,g,h;h=n.scrollTop,n.focus(),"undefined"!=typeof n.selectionStart?(e=n.selectionStart,f=n.selectionEnd,g=a.length,b&&(a+=n.value.substring(e,f)+b),n.value=n.value.substring(0,e)+a+n.value.substring(f,n.value.length),n.selectionStart=e+a.length-(b?b.length:0),n.selectionEnd=n.selectionStart):"undefined"!=typeof c.selection.createRange?(d=c.selection.createRange(),b&&(a+=d.text+b),d.text=a,b&&d.moveEnd("character",0-b.length),d.moveStart("character",d.End-d.Start),d.select()):n.value+=a+b,n.scrollTop=h,n.focus()},gb.getRangeHelper=function(){return r},gb.val=function(a,b){return"string"==typeof a?(gb.inSourceMode()?gb.setSourceEditorValue(a):(b!==!1&&t.hasHandler("toWysiwyg")&&(a=t.callOnlyFirst("toWysiwyg",a)),gb.setWysiwygEditorValue(a)),this):gb.inSourceMode()?gb.getSourceEditorValue(!1):gb.getWysiwygEditorValue()},gb.insert=function(b,c,d,e,f){if(gb.inSourceMode())gb.sourceEditorInsertText(b,c);else{if(c){var g=gb.getRangeHelper().selectedHtml(),h=a("<div>").appendTo(a("body")).hide().html(g);d!==!1&&t.hasHandler("toSource")&&(g=t.callOnlyFirst("toSource",g,h)),h.remove(),b+=g+c}d!==!1&&t.hasHandler("toWysiwyg")&&(b=t.callOnlyFirst("toWysiwyg",b,!0)),d!==!1&&f===!0&&(b=b.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")),gb.wysiwygEditorInsertHtml(b)}return this},gb.getWysiwygEditorValue=function(b){var c,d,e=r.hasSelection();return e?r.saveRange():p&&p.getBookmark&&(d=p.getBookmark()),a.sceditor.dom.fixNesting(k[0]),c=k.html(),b!==!1&&t.hasHandler("toSource")&&(c=t.callOnlyFirst("toSource",c,k)),e?(r.restoreRange(),p=null):d&&(p.moveToBookmark(d),p=null),c},gb.getBody=function(){return k},gb.getContentAreaContainer=function(){return i},gb.getSourceEditorValue=function(a){var b=m.val();return a!==!1&&t.hasHandler("toWysiwyg")&&(b=t.callOnlyFirst("toWysiwyg",b)),b},gb.setWysiwygEditorValue=function(b){b||(b="<p>"+(a.sceditor.ie?"":"<br />")+"</p>"),k[0].innerHTML=b,B(k[0]),_()},gb.setSourceEditorValue=function(a){m.val(a)},gb.updateOriginal=function(){ib.val(gb.val())},B=function(b){if(f.emoticonsEnabled&&!a(b).parents("code").length){var c=b.ownerDocument,d=[],g=[],h=a.extend({},f.emoticons.more,f.emoticons.dropdown,f.emoticons.hidden);a.each(h,function(b){f.emoticonsCompat&&(g[b]=new RegExp("(>|^|\\s| | | | | )"+a.sceditor.regexEscape(b)+"(\\s|$|<| | | | | )")),d.push(b)}),function i(b){for(b=b.firstChild;null!=b;){var j,k,l,m,n,o,p,q=b.parentNode,r=b.nodeValue;if(3!==b.nodeType)a(b).is("code")||i(b);else if(r)for(n=d.length;n--;)k=d[n],p=f.emoticonsCompat?r.search(g[k]):r.indexOf(k),p>-1&&(o=b.nextSibling,l=h[k],j=r.substr(p).split(k),r=r.substr(0,p)+j.shift(),b.nodeValue=r,m=a.sceditor.dom.parseHTML(e("emoticon",{key:k,url:l.url||l,tooltip:l.tooltip||k}),c),q.insertBefore(m[0],o),q.insertBefore(c.createTextNode(j.join(k)),o));b=b.nextSibling}}(b),f.emoticonsCompat&&(ob=k.find("img[data-sceditor-emoticon]"))}},gb.inSourceMode=function(){return g.hasClass("sourceMode")},gb.sourceMode=function(a){return"boolean"!=typeof a?gb.inSourceMode():((gb.inSourceMode()&&!a||!gb.inSourceMode()&&a)&&gb.toggleSourceMode(),this)},gb.toggleSourceMode=function(){(a.sceditor.isWysiwygSupported||!gb.inSourceMode())&&(gb.blur(),gb.inSourceMode()?gb.setWysiwygEditorValue(gb.getSourceEditorValue()):gb.setSourceEditorValue(gb.getWysiwygEditorValue()),p=null,m.toggle(),i.toggle(),gb.inSourceMode()?g.removeClass("sourceMode").addClass("wysiwygMode"):g.removeClass("wysiwygMode").addClass("sourceMode"),Y(),Z())},$=function(){return n.focus(),null!=n.selectionStart?n.value.substring(n.selectionStart,n.selectionEnd):c.selection.createRange?c.selection.createRange().text:void 0},C=function(b,c){return gb.inSourceMode()?(c.txtExec&&(a.isArray(c.txtExec)?gb.sourceEditorInsertText.apply(gb,c.txtExec):c.txtExec.call(gb,b,$())),void 0):(c.exec&&(a.isFunction(c.exec)?c.exec.call(gb,b):gb.execCommand(c.exec,c.hasOwnProperty("execParam")?c.execParam:null)),void 0)},D=function(){a.sceditor.ie&&(p=r.selectedRange())},gb.execCommand=function(b,c){var d=!1,e=a(r.parentNode());if(gb.focus(),!e.is("code")&&0===e.parents("code").length){try{d=l[0].execCommand(b,!1,c)}catch(f){}!d&&gb.commands[b]&&gb.commands[b].errorMessage&&alert(gb._(gb.commands[b].errorMessage))}},ab=function(){var b=function(){r&&!r.compare(w)&&(w=r.cloneSelected(),g.trigger(a.Event("selectionchanged"))),x=!1};x||(x=!0,a.sceditor.ie?b():setTimeout(b,100))},bb=function(){var b,c=r.parentNode();u!==c&&(b=u,u=c,v=r.getFirstBlockParent(c),g.trigger(a.Event("nodechanged",{oldNode:b,newNode:u})))},gb.currentNode=function(){return u},gb.currentBlockNode=function(){return v},Z=function(a){var b,c,d,e,f,g=l[0],i=mb.length,j=gb.sourceMode();if(gb.sourceMode()||gb.readOnly())h.find(".sceditor-button").removeClass("active");else for(f=a?a.newNode:r.parentNode(),d=r.getFirstBlockParent(f);i--;)if(b=0,c=mb[i],e=h.find(".sceditor-button-"+c.name),j&&!e.data("sceditor-txtmode"))e.addClass("disabled");else if(j||e.data("sceditor-wysiwygmode")){if("string"==typeof c.state)try{b=g.queryCommandEnabled(c.state)?0:-1,b>-1&&(b=g.queryCommandState(c.state)?1:0)}catch(k){}else b=c.state.call(gb,f,d);0>b?e.addClass("disabled"):e.removeClass("disabled"),b>0?e.addClass("active"):e.removeClass("active")}else e.addClass("disabled")},S=function(b){var c,d=jb.length;if(gb.closeDropDown(),c=a(u),13===b.which&&(c.is("code,blockquote,pre")||0!==c.parents("code,blockquote,pre").length))return p=null,gb.wysiwygEditorInsertHtml("<br />",null,!0),!1;if(!c.is("code")&&0===c.parents("code").length)for(;d--;)jb[d].call(gb,b,j,m)},_=function(){var b,c,d;a.sceditor.dom.rTraverse(k[0],function(e){return b=e.nodeName.toLowerCase(),a.inArray(b,lb)>-1&&(c=!0),3===e.nodeType&&!/^\s*$/.test(e.nodeValue)||"br"===b||a.sceditor.ie&&!e.firstChild&&!a.sceditor.dom.isInline(e,!1)?(c&&(d=k[0].ownerDocument.createElement("div"),d.className="sceditor-nlf",d.innerHTML=a.sceditor.ie?"":"<br />",k[0].appendChild(d)),!1):void 0})},T=function(){gb.val(ib.val())},U=function(){gb.closeDropDown(),p=null},X=function(){var a=f.height,b=f.width;gb.maximize()?gb.dimensions("100%","100%",!1):(a&&a.toString().indexOf("%")>-1&&gb.height(a),b&&b.toString().indexOf("%")>-1&&gb.width(b))},gb._=function(){var a=arguments;return q&&q[a[0]]&&(a[0]=q[a[0]]),a[0].replace(/\{(\d+)\}/g,function(b,c){return"undefined"!=typeof a[c-0+1]?a[c-0+1]:"{"+c+"}"})},V=function(b){var c,d=a.extend({},b);t.call(d.type+"Event",b,gb),delete d.type,c=a.Event((b.target===n?"scesrc":"scewys")+b.type,d),g.trigger.apply(g,[c,gb]),c.isDefaultPrevented()&&b.preventDefault(),c.isImmediatePropagationStopped()&&c.stopImmediatePropagation(),c.isPropagationStopped()&&c.stopPropagation()},gb.bind=function(b,c,d,e){var f=b.length;for(b=b.split(" ");f--;)a.isFunction(c)&&(d||g.bind("scewys"+b[f],c),e||g.bind("scesrc"+b[f],c));return this},gb.unbind=function(b,c,d,e){var f=b.length;for(b=b.split(" ");f--;)a.isFunction(c)&&(d||g.unbind("scewys"+b[f],c),e||g.unbind("scesrc"+b[f],c));return this},gb.blur=function(b,c,d){return a.isFunction(b)?gb.bind("blur",b,c,d):gb.sourceMode()?m.blur():(s||(s=a('<input style="position:absolute;width:0;height:0;opacity:0;border:0;padding:0;filter:alpha(opacity=0)" type="text" />').appendTo(g)),s.removeAttr("disabled").show().focus().blur().hide().attr("disabled","disabled")),this},gb.focus=function(b,c,d){return a.isFunction(b)?gb.bind("focus",b,c,d):gb.inSourceMode()?n.focus():(j.contentWindow.focus(),k[0].focus(),p&&(r.selectRange(p),p=null)),this},gb.keyDown=function(a,b,c){return gb.bind("keydown",a,b,c)},gb.keyPress=function(a,b,c){return gb.bind("keypress",a,b,c)},gb.keyUp=function(a,b,c){return gb.bind("keyup",a,b,c)},gb.nodeChanged=function(a){return gb.bind("nodechanged",a,!1,!0)},gb.selectionChanged=function(a){return gb.bind("selectionchanged",a,!1,!0)},db=function(b){var c=0,d=String.fromCharCode(b.which);if(!a(v).is("code")&&!a(v).parents("code").length)return gb.emoticonsCache||(gb.emoticonsCache=[],a.each(a.extend({},f.emoticons.more,f.emoticons.dropdown,f.emoticons.hidden),function(a,b){gb.emoticonsCache[c++]=[a,e("emoticon",{key:a,url:b.url||b,tooltip:b.tooltip||a})]}),gb.emoticonsCache.sort(function(a,b){return a[0].length-b[0].length}),gb.longestEmoticonCode=gb.emoticonsCache[gb.emoticonsCache.length-1][0].length),gb.getRangeHelper().raplaceKeyword(gb.emoticonsCache,!0,!0,gb.longestEmoticonCode,f.emoticonsCompat,d)?(f.emoticonsCompat&&(ob=k.find("img[data-sceditor-emoticon]")),/^\s$/.test(d)&&f.emoticonsCompat):void 0},eb=function(){if(ob.length){var b,c,d,e,f,g,h=gb.currentBlockNode(),i=!1,j=/[^\s\xA0\u2002\u2003\u2009]+/;ob=a.map(ob,function(k){return k&&k.parentNode?a.contains(h,k)?(b=k.previousSibling,c=k.nextSibling,f=b.nodeValue,null===f&&(f=b.innerText||""),b&&j.test(b.nodeValue.slice(-1))||c&&j.test((c.nodeValue||"")[0])?(d=k.parentNode,e=r.cloneSelected(),g=e.startContainer,f+=a(k).data("sceditor-emoticon"),g===c?i=f.length+e.startOffset:g===h&&h.childNodes[e.startOffset]===c?i=f.length:g===b&&(i=e.startOffset),c&&3===c.nodeType||(c=d.insertBefore(d.ownerDocument.createTextNode(""),c)),c.insertData(0,f),d.removeChild(b),d.removeChild(k),i!==!1&&(e.setStart(c,i),e.collapse(!0),r.selectRange(e)),null):k):k:null})}},gb.emoticons=function(b){return b||b===!1?(f.emoticonsEnabled=b,b?(k.keypress(db),gb.sourceMode()||(r.saveRange(),B(k[0]),ob=k.find("img[data-sceditor-emoticon]"),r.restoreRange())):(k.find("img[data-sceditor-emoticon]").replaceWith(function(){return a(this).data("sceditor-emoticon")}),ob=[],k.unbind("keypress",db)),this):f.emoticonsEnabled},gb.css=function(b){return z||(z=a('<style id="#inline" />').appendTo(l.find("head"))[0]),"string"!=typeof b?z.styleSheet?z.styleSheet.cssText:z.innerHTML:(z.styleSheet?z.styleSheet.cssText=b:z.innerHTML=b,this)},Q=function(a){var b=[],c={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|","[":"{","]":"}"},d={8:"backspace",9:"tab",13:"enter",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",91:"win",92:"win",93:"select",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scrolllock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},e={109:"-",110:"del",111:"/",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},f=a.which,g=d[f]||String.fromCharCode(f).toLowerCase();return a.ctrlKey&&b.push("ctrl"),a.altKey&&b.push("alt"),a.shiftKey&&(b.push("shift"),e[f]?g=e[f]:c[g]&&(g=c[g])),g&&(16>f||f>18)&&b.push(g),b=b.join("+"),nb[b]?nb[b].call(gb):void 0},gb.addShortcut=function(a,b){return a=a.toLowerCase(),nb[a]="string"==typeof b?function(){return C(h.find(".sceditor-button-"+b),gb.commands[b]),!1}:b,this},gb.removeShortcut=function(a){return delete nb[a.toLowerCase()],this},R=function(c){var d,e,g,h,i;if(!a.sceditor.ie&&!f.disableBlockRemove&&8===c.which&&(h=r.selectedRange())&&(b.getSelection?(d=h.startContainer,e=h.startOffset):(d=h.parentElement(),g=l[0].selection.createRange(),g.moveToElementText(d),g.setEndPoint("EndToStart",h),e=g.text.length),0===e&&(i=fb()))){for(;d!==i;){for(;d.previousSibling;)if(d=d.previousSibling,3!==d.nodeType||d.nodeValue)return;if(!(d=d.parentNode))return}if(i&&!a(i).is("body"))return gb.clearBlockFormatting(i),!1}},fb=function(){for(var b=v;!a.sceditor.dom.hasStyling(b);)if(!(b=b.parentNode)||a(b).is("body"))return;return b},gb.clearBlockFormatting=function(b){return b=b||fb(),!b||a(b).is("body")?this:(r.saveRange(),p=null,b.className="",a(b).attr("style",""),a(b).is("p,div")||a.sceditor.dom.convertElement(b,"p"),r.restoreRange(),this)},A()},a.sceditor.ie=function(){var a,d=3,e=c.createElement("div"),f=e.getElementsByTagName("i");do e.innerHTML="<!--[if gt IE "+ ++d+"]><i></i><![endif]-->";while(f[0]);return c.documentMode&&c.all&&b.atob&&(d=10),4===d&&c.documentMode&&(d=11),d>4?d:a}(),a.sceditor.ios=/iPhone|iPod|iPad| wosbrowser\//i.test(navigator.userAgent),a.sceditor.isWysiwygSupported=function(){var b,c,d=a('<div contenteditable="true">')[0].contentEditable,e="undefined"!=typeof d&&"inherit"!==d,f=navigator.userAgent;return e?(c=/Opera Mobi|Opera Mini/i.test(f),/Android/i.test(f)&&(c=!0,/Safari/.test(f)&&(b=/Safari\/(\d+)/.exec(f),c=b&&b[1]?b[1]<534:!0)),/ Silk\//i.test(f)&&(b=/AppleWebKit\/(\d+)/.exec(f),c=b&&b[1]?b[1]<534:!0),a.sceditor.ios&&(c=!/OS [5-9](_\d)+ like Mac OS X/i.test(f)),/fennec/i.test(f)&&(c=!1),/OneBrowser/i.test(f)&&(c=!1),"UCWEB"===navigator.vendor&&(c=!1),!c):!1}(),a.sceditor.regexEscape=function(a){return a.replace(/[\$\?\[\]\.\*\(\)\|\\]/g,"\\$&")},a.sceditor.escapeEntities=function(a){return a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ {2}/g," ").replace(/\r\n|\r/g,"\n").replace(/\n/g,"<br />"):a},a.sceditor.locale={},a.sceditor.commands={bold:{exec:"bold",tooltip:"Bold",shortcut:"ctrl+b"},italic:{exec:"italic",tooltip:"Italic",shortcut:"ctrl+i"},underline:{exec:"underline",tooltip:"Underline",shortcut:"ctrl+u"},strike:{exec:"strikethrough",tooltip:"Strikethrough"},subscript:{exec:"subscript",tooltip:"Subscript"},superscript:{exec:"superscript",tooltip:"Superscript"},left:{exec:"justifyleft",tooltip:"Align left"},center:{exec:"justifycenter",tooltip:"Center"},right:{exec:"justifyright",tooltip:"Align right"},justify:{exec:"justifyfull",tooltip:"Justify"},font:{_dropDown:function(b,c,d){for(var f=b.opts.fonts.split(","),g=a("<div />"),h=function(){return d(a(this).data("font")),b.closeDropDown(!0),!1},i=0;i<f.length;i++)g.append(e("fontOpt",{font:f[i]},!0).click(h));b.createDropDown(c,"font-picker",g)},exec:function(b){var c=this;a.sceditor.command.get("font")._dropDown(c,b,function(a){c.execCommand("fontname",a)})},tooltip:"Font Name"},size:{_dropDown:function(b,c,d){for(var f=a("<div />"),g=function(c){d(a(this).data("size")),b.closeDropDown(!0),c.preventDefault()},h=1;7>=h;h++)f.append(e("sizeOpt",{size:h},!0).click(g));b.createDropDown(c,"fontsize-picker",f)},exec:function(b){var c=this;a.sceditor.command.get("size")._dropDown(c,b,function(a){c.execCommand("fontsize",a)})},tooltip:"Font Size"},color:{_dropDown:function(b,c,d){var e,f,g,h,i={r:255,g:255,b:255},j=a("<div />"),k=b.opts.colors?b.opts.colors.split("|"):new Array(21),l=[],m=a.sceditor.command.get("color");if(!m._htmlCache){for(e=0;e<k.length;++e){for(h=k[e]?k[e].split(","):new Array(21),l.push('<div class="sceditor-color-column">'),f=0;f<h.length;++f)g=h[f]||"#"+i.r.toString(16)+i.g.toString(16)+i.b.toString(16),l.push('<a href="#" class="sceditor-color-option" style="background-color: '+g+'" data-color="'+g+'"></a>'),0===f%5?(i.g-=51,i.b=255):i.b-=51;l.push("</div>"),0===e%5?(i.r-=51,i.g=255,i.b=255):(i.g=255,i.b=255)}m._htmlCache=l.join("")}j.append(m._htmlCache).find("a").click(function(c){d(a(this).attr("data-color")),b.closeDropDown(!0),c.preventDefault()}),b.createDropDown(c,"color-picker",j)},exec:function(b){var c=this;a.sceditor.command.get("color")._dropDown(c,b,function(a){c.execCommand("forecolor",a)})},tooltip:"Font Color"},removeformat:{exec:"removeformat",tooltip:"Remove Formatting"},cut:{exec:"cut",tooltip:"Cut",errorMessage:"Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X"},copy:{exec:"copy",tooltip:"Copy",errorMessage:"Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C"},paste:{exec:"paste",tooltip:"Paste",errorMessage:"Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V"},pastetext:{exec:function(a){var b,c=this,d=e("pastetext",{label:c._("Paste your text inside the following box:"),insert:c._("Insert")},!0);d.find(".button").click(function(a){b=d.find("#txt").val(),b&&c.wysiwygEditorInsertText(b),c.closeDropDown(!0),a.preventDefault()}),c.createDropDown(a,"pastetext",d)},tooltip:"Paste Text"},bulletlist:{exec:"insertunorderedlist",tooltip:"Bullet list"},orderedlist:{exec:"insertorderedlist",tooltip:"Numbered list"},table:{exec:function(b){var c=this,d=e("table",{rows:c._("Rows:"),cols:c._("Cols:"),insert:c._("Insert")},!0);d.find(".button").click(function(b){var e=d.find("#rows").val()-0,f=d.find("#cols").val()-0,g="<table>";if(!(1>e||1>f)){for(var h=0;e>h;h++){g+="<tr>";for(var i=0;f>i;i++)g+="<td>"+(a.sceditor.ie?"":"<br />")+"</td>";g+="</tr>"}g+="</table>",c.wysiwygEditorInsertHtml(g),c.closeDropDown(!0),b.preventDefault()}}),c.createDropDown(b,"inserttable",d)},tooltip:"Insert a table"},horizontalrule:{exec:"inserthorizontalrule",tooltip:"Insert a horizontal rule"},code:{forceNewLineAfter:["code"],exec:function(){this.wysiwygEditorInsertHtml("<code>","<br /></code>")},tooltip:"Code"},image:{exec:function(a){var b=this,c=e("image",{url:b._("URL:"),width:b._("Width (optional):"),height:b._("Height (optional):"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#image").val(),e=c.find("#width").val(),f=c.find("#height").val(),g="";e&&(g+=' width="'+e+'"'),f&&(g+=' height="'+f+'"'),d&&"http://"!==d&&b.wysiwygEditorInsertHtml("<img"+g+' src="'+d+'" />'),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertimage",c)},tooltip:"Insert an image"},email:{exec:function(a){var b=this,c=e("email",{label:b._("E-mail:"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#email").val();d&&(b.focus(),b.getRangeHelper().selectedHtml()?b.execCommand("createlink","mailto:"+d):b.wysiwygEditorInsertHtml('<a href="mailto:'+d+'">'+d+"</a>")),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertemail",c)},tooltip:"Insert an email"},link:{exec:function(a){var b=this,c=e("link",{url:b._("URL:"),desc:b._("Description (optional):"),ins:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#link").val(),e=c.find("#des").val();d&&"http://"!==d&&(b.focus(),!b.getRangeHelper().selectedHtml()||e?(e||(e=d),b.wysiwygEditorInsertHtml('<a href="'+d+'">'+e+"</a>")):b.execCommand("createlink",d)),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertlink",c)},tooltip:"Insert a link"},unlink:{state:function(){var b=a(this.currentNode());return b.is("a")||b.parents("a").length>0?0:-1},exec:function(){var b=a(this.currentNode()),c=b.is("a")?b:b.parents("a").first();
13c.length&&c.replaceWith(c.contents())},tooltip:"Unlink"},quote:{forceNewLineAfter:["blockquote"],exec:function(b,c,d){var e="<blockquote>",f="</blockquote>";c?(d=d?"<cite>"+d+"</cite>":"",e=e+d+c+f,f=null):""===this.getRangeHelper().selectedHtml()&&(f=a.sceditor.ie?"":"<br />"+f),this.wysiwygEditorInsertHtml(e,f)},tooltip:"Insert a Quote"},emoticon:{exec:function(b){var c=this,d=function(e){var f=c.opts.emoticonsCompat,g=c.getRangeHelper(),h=f&&" "!==g.getOuterText(!0,1)?" ":"",i=f&&" "!==g.getOuterText(!1,1)?" ":"",j=a("<div />"),k=a("<div />").appendTo(j),l=a.extend({},c.opts.emoticons.dropdown,e?c.opts.emoticons.more:{}),m=0;return a.each(l,function(){m++}),m=Math.sqrt(m),a.each(l,function(b,d){k.append(a("<img />").attr({src:d.url||d,alt:b,title:d.tooltip||b}).click(function(){return c.insert(h+a(this).attr("alt")+i,null,!1).closeDropDown(!0),!1})),k.children().length>=m&&(k=a("<div />").appendTo(j))}),e||j.append(a(c._('<a class="sceditor-more">{0}</a>',c._("More"))).click(function(){return c.createDropDown(b,"more-emoticons",d(!0)),!1})),j};c.createDropDown(b,"emoticons",d(!1))},txtExec:function(b){a.sceditor.command.get("emoticon").exec.call(this,b)},tooltip:"Insert an emoticon"},youtube:{_dropDown:function(a,b,c){var d,f=e("youtubeMenu",{label:a._("Video URL:"),insert:a._("Insert")},!0);f.find(".button").click(function(b){var e=f.find("#link").val().replace("http://","");""!==e&&(d=e.match(/(?:v=|v\/|embed\/|youtu.be\/)(.{11})/),d&&(e=d[1]),/^[a-zA-Z0-9_\-]{11}$/.test(e)?c(e):alert("Invalid YouTube video")),a.closeDropDown(!0),b.preventDefault()}),a.createDropDown(b,"insertlink",f)},exec:function(b){var c=this;a.sceditor.command.get("youtube")._dropDown(c,b,function(a){c.wysiwygEditorInsertHtml(e("youtube",{id:a}))})},tooltip:"Insert a YouTube video"},date:{_date:function(a){var b=new Date,c=b.getYear(),d=b.getMonth()+1,e=b.getDate();return 2e3>c&&(c=1900+c),10>d&&(d="0"+d),10>e&&(e="0"+e),a.opts.dateFormat.replace(/year/i,c).replace(/month/i,d).replace(/day/i,e)},exec:function(){this.insertText(a.sceditor.command.get("date")._date(this))},txtExec:function(){this.insertText(a.sceditor.command.get("date")._date(this))},tooltip:"Insert current date"},time:{_time:function(){var a=new Date,b=a.getHours(),c=a.getMinutes(),d=a.getSeconds();return 10>b&&(b="0"+b),10>c&&(c="0"+c),10>d&&(d="0"+d),b+":"+c+":"+d},exec:function(){this.insertText(a.sceditor.command.get("time")._time())},txtExec:function(){this.insertText(a.sceditor.command.get("time")._time())},tooltip:"Insert current time"},ltr:{state:function(a,b){return b&&"ltr"===b.style.direction},exec:function(){var b=this,c=b.getRangeHelper().getFirstBlockParent(),d=a(c);b.focus(),(c&&!d.is("body")||(b.execCommand("formatBlock","p"),c=b.getRangeHelper().getFirstBlockParent(),d=a(c),c&&!d.is("body")))&&("ltr"===d.css("direction")?d.css("direction",""):d.css("direction","ltr"))},tooltip:"Left-to-Right"},rtl:{state:function(a,b){return b&&"rtl"===b.style.direction},exec:function(){var b=this,c=b.getRangeHelper().getFirstBlockParent(),d=a(c);b.focus(),(c&&!d.is("body")||(b.execCommand("formatBlock","p"),c=b.getRangeHelper().getFirstBlockParent(),d=a(c),c&&!d.is("body")))&&("rtl"===d.css("direction")?d.css("direction",""):d.css("direction","rtl"))},tooltip:"Right-to-Left"},print:{exec:"print",tooltip:"Print"},maximize:{state:function(){return this.maximize()},exec:function(){this.maximize(!this.maximize())},txtExec:function(){this.maximize(!this.maximize())},tooltip:"Maximize",shortcut:"ctrl+shift+m"},source:{exec:function(){this.toggleSourceMode()},txtExec:function(){this.toggleSourceMode()},tooltip:"View source",shortcut:"ctrl+shift+s"},ignore:{}},a.sceditor.rangeHelper=function(b,c){var d,e,f,g,h,i=!0,j="sceditor-start-marker",k="sceditor-end-marker",l="character",m=this;f=function(a,b){e=b||a.contentDocument||a.document,d=a,i=!!a.getSelection}(b,c),m.insertHTML=function(a,b){var c,d,f=m.selectedRange();if(b&&(a+=m.selectedHtml()+b),i){for(d=e.createElement("div"),c=e.createDocumentFragment(),d.innerHTML=a;d.firstChild;)c.appendChild(d.firstChild);m.insertNode(c)}else{if(!f)return!1;f.pasteHTML(a)}},m.insertNode=function(a,b){if(i){var c,d,f=e.createDocumentFragment(),g=m.selectedRange();if(!g)return!1;if(f.appendChild(a),b&&(f.appendChild(g.extractContents()),f.appendChild(b)),d=f.lastChild,!d)return;g.deleteContents(),g.insertNode(f),c=e.createRange(),c.setStartAfter(d),m.selectRange(c)}else m.insertHTML(a.outerHTML,b?b.outerHTML:null)},m.cloneSelected=function(){var a=m.selectedRange();return a?i?a.cloneRange():a.duplicate():void 0},m.selectedRange=function(){var a,b,c=i?d.getSelection():e.selection;if(c){if(c.getRangeAt&&c.rangeCount<=0){for(b=e.body;b.firstChild;)b=b.firstChild;a=e.createRange(),a.setStart(b,0),c.addRange(a)}return i&&(a=c.getRangeAt(0)),i||"Control"===c.type||(a=c.createRange()),h(a)?a:null}},h=function(a){var b;return a&&a.parentElement&&(b=a.parentElement())?b.ownerDocument===e:!0},m.hasSelection=function(){var a,b=i?d.getSelection():e.selection;return i||!b?b&&b.rangeCount>0:(a=b.createRange(),a&&h(a))},m.selectedHtml=function(){var a,b=m.selectedRange();return b?!i&&""!==b.text&&b.htmlText?b.htmlText:i?(a=e.createElement("div"),a.appendChild(b.cloneContents()),a.innerHTML):"":""},m.parentNode=function(){var a=m.selectedRange();return a?a.parentElement?a.parentElement():a.commonAncestorContainer:void 0},m.getFirstBlockParent=function(b){var c=function(b){return a.sceditor.dom.isInline(b,!0)?(b=b?b.parentNode:null,b?c(b):null):b};return c(b||m.parentNode())},m.insertNodeAt=function(a,b){var c=m.selectedRange(),d=m.cloneSelected();return d?(d.collapse(a),d.insertNode?d.insertNode(b):d.pasteHTML(b.outerHTML),m.selectRange(c),void 0):!1},g=function(a){m.removeMarker(a);var b=e.createElement("span");return b.id=a,b.style.lineHeight="0",b.style.display="none",b.className="sceditor-selection sceditor-ignore",b.innerHTML=" ",b},m.insertMarkers=function(){m.insertNodeAt(!0,g(j)),m.insertNodeAt(!1,g(k))},m.getMarker=function(a){return e.getElementById(a)},m.removeMarker=function(a){var b=m.getMarker(a);b&&b.parentNode.removeChild(b)},m.removeMarkers=function(){m.removeMarker(j),m.removeMarker(k)},m.saveRange=function(){m.insertMarkers()},m.selectRange=function(a){i?(d.getSelection().removeAllRanges(),d.getSelection().addRange(a)):a.select()},m.restoreRange=function(){var a,b=m.selectedRange(),c=m.getMarker(j),d=m.getMarker(k);return c&&d&&b?(i?(b=e.createRange(),b.setStartBefore(c),b.setEndAfter(d),m.selectRange(b)):(b=e.body.createTextRange(),a=e.body.createTextRange(),a.moveToElementText(c),b.setEndPoint("StartToStart",a),b.moveStart(l,0),a.moveToElementText(d),b.setEndPoint("EndToStart",a),b.moveEnd(l,0),m.selectRange(b)),m.removeMarkers(),void 0):!1},m.selectOuterText=function(a,b){var c=m.cloneSelected();return c?(c.collapse(!1),i?(c.setStart(c.startContainer,c.startOffset-a),c.setEnd(c.endContainer,c.endOffset+b)):(c.moveStart(l,0-a),c.moveEnd(l,b)),m.selectRange(c),void 0):!1},m.getOuterText=function(a,b){var c="",d=m.cloneSelected();return d?(d.collapse(!1),a?i?(c=d.startContainer.textContent.substr(0,d.startOffset),c=c.substr(Math.max(0,c.length-b))):(d.moveStart(l,0-b),c=d.text):i?c=d.startContainer.textContent.substr(d.startOffset,b):(d.moveEnd(l,b),c=d.text),c):""},m.raplaceKeyword=function(b,c,d,e,f,g){d||b.sort(function(a,b){return a.length-b.length});var h,j,k,l,n,o,p,q=b.length,r=e||b[q-1][0].length;if(f){if(!i)return!1;++r}for(h=m.getOuterText(!0,r),j=h+(null!=g?g:""),c&&(j+=m.getOuterText(!1,r));q--;)if(p=b[q][0],n=new RegExp("(?:[\\s    ])"+a.sceditor.regexEscape(p)+"(?=[\\s    ])"),o=h.length-1-p.length,f&&--o,o=Math.max(0,o),(k=f?j.substr(o).search(n):j.indexOf(p,o))>-1){if(f&&(k+=o+1),k>h.length||k+p.length+(f?1:0)<h.length)continue;return l=h.length-k,m.selectOuterText(l,p.length-l-(null!=g&&/^\S/.test(g)?1:0)),m.insertHTML(b[q][1]),!0}return!1},m.compare=function(a,b){return b||(b=m.selectedRange()),a&&b?i?0===a.compareBoundaryPoints(Range.END_TO_END,b)&&0===a.compareBoundaryPoints(Range.START_TO_START,b):h(a)&&h(b)&&0===a.compareEndPoints("EndToEnd",b)&&0===a.compareEndPoints("StartToStart",b):!a&&!b}},a.sceditor.dom={traverse:function(a,b,c,d,e){if(a)for(a=e?a.lastChild:a.firstChild;null!=a;){var f=e?a.previousSibling:a.nextSibling;if(!c&&b(a)===!1)return!1;if(!d&&this.traverse(a,b,c,d,e)===!1)return!1;if(c&&b(a)===!1)return!1;a=f}},rTraverse:function(a,b,c,d){this.traverse(a,b,c,d,!0)},parseHTML:function(b,d){var e=[],f=(d||c).createElement("div");return f.innerHTML=b,a.merge(e,f.childNodes),e},hasStyling:function(b){var c=a(b);return b&&(!c.is("p,div")||b.className||c.attr("style")||!a.isEmptyObject(c.data()))},convertElement:function(b,c){for(var d,e,f=b.attributes.length,g=b.ownerDocument.createElement(c);f--;)e=b.attributes[f],(!a.sceditor.ie||e.specified)&&(a.sceditor.ie<8&&/style/i.test(e.name)?b.style.cssText=b.style.cssText:g.setAttribute(e.name,e.value));for(;d=b.firstChild;)g.appendChild(d);return b.parentNode.replaceChild(g,b),g},blockLevelList:"|body|hr|p|div|h1|h2|h3|h4|h5|h6|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|blockquote|center|",isInline:function(b,c){return b&&1===b.nodeType?(b=b.tagName.toLowerCase(),"code"===b?!c:a.sceditor.dom.blockLevelList.indexOf("|"+b+"|")<0):!0},copyCSS:function(a,b){b.style.cssText=a.style.cssText+b.style.cssText},fixNesting:function(a){var b=this,c=function(a){for(;b.isInline(a.parentNode,!0);)a=a.parentNode;return a};b.traverse(a,function(a){if(1===a.nodeType&&!b.isInline(a,!0)&&b.isInline(a.parentNode,!0)){var d=c(a),e=d.parentNode,f=b.extractContents(d,a),g=a;b.copyCSS(d,g),e.insertBefore(f,d),e.insertBefore(g,d)}})},findCommonAncestor:function(b,c){return a(b).parents().has(a(c)).first()},getSibling:function(b,c){var d;return b?(d=b[c?"previousSibling":"nextSibling"])?d:a.sceditor.dom.getSibling(b.parentNode,c):null},removeWhiteSpace:function(b,c){for(var d,e,f,g,h,i,j,k,l=a.sceditor.dom.getSibling,m=a.sceditor.dom.isInline,n=b.firstChild,o=/[\t ]+/g,p=/[\t\n\r ]+/g;n;){if(i=n.nextSibling,d=n.nodeValue,e=n.nodeType,1===e&&n.firstChild&&(h=a(n).css("whiteSpace"),/pre(?:\-wrap)?$/i.test(h)||a.sceditor.dom.removeWhiteSpace(n,/line$/i.test(h))),3===e&&d){for(f=l(n),g=l(n,!0),k=g,j=!1;a(k).hasClass("sceditor-ignore");)k=l(k,!0);if(m(n)&&k){for(;k.lastChild;)k=k.lastChild;j=3===k.nodeType?/[\t\n\r ]$/.test(k.nodeValue):!m(k)}m(n)&&g&&m(g)&&!j||(d=d.replace(/^[\t\n\r ]+/,"")),m(n)&&f&&m(f)||(d=d.replace(/[\t\n\r ]+$/,"")),d.length?n.nodeValue=d.replace(c?o:p," "):b.removeChild(n)}n=i}},extractContents:function(a,b){var c=this,d=c.findCommonAncestor(a,b),e=d?d[0]:null,f=!1,g=!1;return function h(d){var e=a.ownerDocument.createDocumentFragment();return c.traverse(d,function(c){if(g||c===b&&f)return g=!0,!1;c===a&&(f=!0);var d,i;f?jQuery.contains(c,b)&&1===c.nodeType?(d=h(c),i=c.cloneNode(!1),i.appendChild(d),e.appendChild(i)):e.appendChild(c):jQuery.contains(c,a)&&1===c.nodeType&&(d=h(c),i=c.cloneNode(!1),i.appendChild(d),e.appendChild(i))},!1),e}(e)}},a.sceditor.plugins={},a.sceditor.PluginManager=function(b){var c=this,d=[],e=b,f=function(a){return"signal"+a.charAt(0).toUpperCase()+a.slice(1)},g=function(a,b){a=[].slice.call(a);for(var c=d.length,g=f(a.shift());c--;)if(g in d[c]){if(b)return d[c][g].apply(e,a);d[c][g].apply(e,a)}};c.call=function(){g(arguments,!1)},c.callOnlyFirst=function(){return g(arguments,!0)},c.iter=function(a){return a=f(a),function(){var b=d.length;return{callNext:function(c){for(;b--;)if(d[b]&&a in d[b])return d[b].apply(e,c)},hasNext:function(){for(var c=b;c--;)if(d[c]&&a in d[c])return!0;return!1}}}()},c.hasHandler=function(a){var b=d.length;for(a=f(a);b--;)if(a in d[b])return!0;return!1},c.exsists=function(b){return b in a.sceditor.plugins?(b=a.sceditor.plugins[b],"function"==typeof b&&"object"==typeof b.prototype):!1},c.isRegistered=function(b){var e=d.length;if(!c.exsists(b))return!1;for(;e--;)if(d[e]instanceof a.sceditor.plugins[b])return!0;return!1},c.register=function(b){return c.exsists(b)?(b=new a.sceditor.plugins[b],d.push(b),"init"in b&&b.init.apply(e),!0):!1},c.deregister=function(b){var f,g=d.length,h=!1;if(!c.isRegistered(b))return!1;for(;g--;)d[g]instanceof a.sceditor.plugins[b]&&(f=d.splice(g,1)[0],h=!0,"destroy"in f&&f.destroy.apply(e));return h},c.destroy=function(){for(var a=d.length;a--;)"destroy"in d[a]&&d[a].destroy.apply(e);d=null,e=null}},a.sceditor.command={get:function(b){return a.sceditor.commands[b]||null},set:function(b,c){return b&&c?(c=a.extend(a.sceditor.commands[b]||{},c),c.remove=function(){a.sceditor.command.remove(b)},a.sceditor.commands[b]=c,this):!1},remove:function(b){return a.sceditor.commands[b]&&delete a.sceditor.commands[b],this}},a.sceditor.defaultOptions={toolbar:"bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,paste,pastetext|bulletlist,orderedlist|table|code,quote|horizontalrule,image,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source",toolbarExclude:null,style:"jquery.sceditor.default.css",fonts:"Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana",colors:null,locale:"en",charset:"utf-8",emoticonsCompat:!1,emoticonsEnabled:!0,emoticonsRoot:"",emoticons:{dropdown:{":)":"emoticons/smile.png",":angel:":"emoticons/angel.png",":angry:":"emoticons/angry.png","8-)":"emoticons/cool.png",":'(":"emoticons/cwy.png",":ermm:":"emoticons/ermm.png",":D":"emoticons/grin.png","<3":"emoticons/heart.png",":(":"emoticons/sad.png",":O":"emoticons/shocked.png",":P":"emoticons/tongue.png",";)":"emoticons/wink.png"},more:{":alien:":"emoticons/alien.png",":blink:":"emoticons/blink.png",":blush:":"emoticons/blush.png",":cheerful:":"emoticons/cheerful.png",":devil:":"emoticons/devil.png",":dizzy:":"emoticons/dizzy.png",":getlost:":"emoticons/getlost.png",":happy:":"emoticons/happy.png",":kissing:":"emoticons/kissing.png",":ninja:":"emoticons/ninja.png",":pinch:":"emoticons/pinch.png",":pouty:":"emoticons/pouty.png",":sick:":"emoticons/sick.png",":sideways:":"emoticons/sideways.png",":silly:":"emoticons/silly.png",":sleeping:":"emoticons/sleeping.png",":unsure:":"emoticons/unsure.png",":woot:":"emoticons/w00t.png",":wassat:":"emoticons/wassat.png"},hidden:{":whistling:":"emoticons/whistling.png",":love:":"emoticons/wub.png"}},width:null,height:null,resizeEnabled:!0,resizeMinWidth:null,resizeMinHeight:null,resizeMaxHeight:null,resizeMaxWidth:null,resizeHeight:!0,resizeWidth:!0,getHtmlHandler:null,getTextHandler:null,dateFormat:"year-month-day",toolbarContainer:null,enablePasteFiltering:!1,disablePasting:!1,readOnly:!1,rtl:!1,autofocus:!1,autofocusEnd:!0,autoExpand:!1,autoUpdate:!1,spellcheck:!0,runWithoutWysiwygSupport:!1,id:null,plugins:"",zIndex:null,bbcodeTrim:!1,disableBlockRemove:!1,parserOptions:{},dropDownCss:{}},a.fn.sceditor=function(b){var c,d=[];return b=b||{},b.runWithoutWysiwygSupport||a.sceditor.isWysiwygSupported?(this.each(function(){c=this.jquery?this:a(this),c.parents(".sceditor-container").length>0||("state"===b?d.push(!!c.data("sceditor")):"instance"===b?d.push(c.data("sceditor")):c.data("sceditor")||new a.sceditor(this,b))}),d.length?1===d.length?d[0]:a(d):this):void 0}}(jQuery,window,document),function(a,b,c){"use strict";a.sceditor.BBCodeParser=function(b){if(!(this instanceof a.sceditor.BBCodeParser))return new a.sceditor.BBCodeParser(b);var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s=this,t={open:"open",content:"content",newline:"newline",close:"close"},u=function(a,b,c,d,e,f){var g=this;g.type=a,g.name=b,g.val=c,g.attrs=d||{},g.children=e||[],g.closing=f||null};u.prototype={clone:function(a){var b=this;return new u(b.type,b.name,b.val,b.attrs,a?b.children:[],b.closing?b.closing.clone():null)},splitAt:function(b){var c,d=this,e=0,f=d.children.length;if("number"!=typeof object&&(b=a.inArray(b,d.children)),0>b||b>f)return null;for(;f--;)f>=b?e++:f=0;return c=d.clone(),c.children=d.children.splice(b,e),c}},d=function(){s.opts=a.extend({},a.sceditor.BBCodeParser.defaults,b),s.bbcodes=a.sceditor.plugins.bbcode.bbcodes},s.tokenize=function(a){var b,c,d,f=[],g=[{type:"close",regex:/^\[\/[^\[\]]+\]/},{type:"open",regex:/^\[[^\[\]]+\]/},{type:"newline",regex:/^(\r\n|\r|\n)/},{type:"content",regex:/^([^\[\r\n]+|\[)/}];g.reverse();a:for(;a.length;){for(d=g.length;d--;)if(c=g[d].type,(b=a.match(g[d].regex))&&b[0]){f.push(e(c,b[0])),a=a.substr(b[0].length);continue a}a.length&&f.push(e(t.content,a)),a=""}return f},e=function(b,c){var d,e,g;return"open"===b&&(d=c.match(/\[([^\]\s=]+)(?:([^\]]+))?\]/))?(g=q(d[1]),d[2]&&(d[2]=a.trim(d[2]))&&(e=f(d[2]))):"close"===b&&(d=c.match(/\[\/([^\[\]]+)\]/))?g=q(d[1]):"newline"===b&&(g="#newline"),g&&("open"!==b&&"close"!==b||a.sceditor.plugins.bbcode.bbcodes[g])||(b="content",g="#"),new u(b,g,c,e)},f=function(b){var c,d=/([^\s=]+)=(?:(?:(["'])((?:\\\2|[^\2])*?)\2)|((?:.(?!\s\S+=))*.))/g,e=a.sceditor.plugins.bbcode.stripQuotes,f={};if("="===b.charAt(0)&&b.indexOf("=",1)<0)f.defaultattr=e(b.substr(1));else for("="===b.charAt(0)&&(b="defaultattr"+b);c=d.exec(b);)f[q(c[1])]=e(c[3])||c[4];return f},s.parse=function(a,b){var c=g(s.tokenize(a));return s.opts.fixInvalidChildren&&l(c),s.opts.removeEmptyTags&&k(c),s.opts.fixInvalidNesting&&i(c),h(c,null,b),s.opts.removeEmptyTags&&k(c),c},o=function(a,b,c){for(var d=c.length;d--;)if(c[d].type===b&&c[d].name===a)return!0;return!1},j=function(b,c){var d=b?s.bbcodes[b.name]:null,e=d?d.allowedChildren:null;return s.opts.fixInvalidChildren&&e?e&&a.inArray(c.name||"#",e)<0?!1:!0:!0},g=function(b){for(var c,d,e,f,g,h,i,j=[],k=[],l=[],m=function(){return r(l)},n=function(a){m()?m().children.push(a):k.push(a)},p=function(b){return m()&&(d=s.bbcodes[m().name])&&d.closedBy&&a.inArray(b,d.closedBy)>-1};c=b.shift();){switch(i=b[0],c.type){case t.open:p(c.name)&&l.pop(),n(c),d=s.bbcodes[c.name],d&&d.isSelfClosing||!d.closedBy&&!o(c.name,t.close,b)?d&&d.isSelfClosing||(c.type=t.content):l.push(c);break;case t.close:if(m()&&c.name!==m().name&&p("/"+c.name)&&l.pop(),m()&&c.name===m().name)m().closing=c,l.pop();else if(o(c.name,t.open,l)){for(;e=l.pop();){if(e.name===c.name){e.closing=c;break}f=e.clone(),j.length>1&&f.children.push(r(j)),j.push(f)}for(n(r(j)),g=j.length;g--;)l.push(j[g]);j.length=0}else c.type=t.content,n(c);break;case t.newline:m()&&i&&p((i.type===t.close?"/":"")+i.name)&&(i.type!==t.close||i.name!==m().name)&&(d=s.bbcodes[m().name],d&&d.breakAfter?l.pop():d&&d.isInline===!1&&s.opts.breakAfterBlock&&d.breakAfter!==!1&&l.pop()),n(c);break;default:n(c)}h=c}return k},h=function(a,b,c){var d,e,f,g,i,j,k,l,m=a.length,n=m;for(b&&(g=s.bbcodes[b.name]);n--;)if(d=a[n])if(d.type===t.newline){if(e=n>0?a[n-1]:null,f=m-1>n?a[n+1]:null,l=!1,!c&&g&&g.isSelfClosing!==!0&&(e?j||f||(g.isInline===!1&&s.opts.breakEndBlock&&g.breakEnd!==!1&&(l=!0),g.breakEnd&&(l=!0),j=l):(g.isInline===!1&&s.opts.breakStartBlock&&g.breakStart!==!1&&(l=!0),g.breakStart&&(l=!0))),e&&e.type===t.open&&(i=s.bbcodes[e.name])&&(c?i.isInline===!1&&(l=!0):(i.isInline===!1&&s.opts.breakAfterBlock&&i.breakAfter!==!1&&(l=!0),i.breakAfter&&(l=!0))),!c&&!k&&f&&f.type===t.open&&(i=s.bbcodes[f.name])&&(i.isInline===!1&&s.opts.breakBeforeBlock&&i.breakBefore!==!1&&(l=!0),i.breakBefore&&(l=!0),k=l,l)){a.splice(n,1);continue}l&&a.splice(n,1),k=!1}else d.type===t.open&&h(d.children,d,c)},i=function(b,c,d,e){var f,g,h,j,k,l,m=function(a){var b=s.bbcodes[a.name];return!b||b.isInline!==!1};for(c=c||[],e=e||b,g=0;g<b.length;g++)if((f=b[g])&&f.type===t.open){if(!m(f)&&d&&(h=r(c),l=h.splitAt(f),k=c.length>1?c[c.length-2].children:e,(j=a.inArray(h,k))>-1))return l.children.splice(a.inArray(f,l.children),1),k.splice(j+1,0,f,l),void 0;c.push(f),i(f.children,c,d||m(f),e),c.pop(f)}},l=function(a,b){for(var c,d,e=a.length;e--;)(c=a[e])&&(j(b,c)||(c.name=null,c.type=t.content,j(b,c)?(d=[e+1,0].concat(c.children),c.closing&&(c.closing.name=null,c.closing.type=t.content,d.push(c.closing)),e+=d.length-1,Array.prototype.splice.apply(a,d)):b.children.splice(e,1)),c.type===t.open&&l(c.children,c))},k=function(b){var c,d,e,f=b.length;for(e=function(a){for(var b=a.length;b--;){if(a[b].type===t.open)return!1;if(a[b].type===t.close)return!1;if(a[b].type===t.content&&a[b].val&&/\S|\u00A0/.test(a[b].val))return!1}return!0};f--;)(c=b[f])&&c.type===t.open&&(d=s.bbcodes[c.name],k(c.children),e(c.children)&&d&&!d.isSelfClosing&&!d.allowsEmpty&&b.splice.apply(b,a.merge([f,1],c.children)))},s.toHTML=function(a,b){return m(s.parse(a,b),!0)},m=function(b,d){var e,f,g,h,i,j,k,l,n=[];for(k=function(a){return(!a||("undefined"!=typeof a.isHtmlInline?a.isHtmlInline:a.isInline))!==!1};b.length>0;)if(e=b.shift()){if(e.type===t.open)l=e.children[e.children.length-1]||{},f=s.bbcodes[e.name],i=d&&k(f),g=m(e.children,!1),f&&f.html?(k(f)||!k(s.bbcodes[l.name])||f.isPreFormatted||f.skipLastLineBreak||a.sceditor.ie||(g+="<br />"),h=a.isFunction(f.html)?f.html.call(s,e,e.attrs,g):a.sceditor.plugins.bbcode.formatString(f.html,g)):h=e.val+g+(e.closing?e.closing.val:"");else{if(e.type===t.newline){if(!d){n.push("<br />");continue}j||(n.push("<div>"),(c.documentMode&&c.documentMode<8||a.sceditor.ie<8)&&n.push(" ")),a.sceditor.ie||n.push("<br />"),b.length||n.push("<br />"),n.push("</div>\n"),j=!1;continue}i=d,h=a.sceditor.escapeEntities(e.val)}i&&!j?(n.push("<div>"),j=!0):!i&&j&&(n.push("</div>\n"),j=!1),n.push(h)}return j&&n.push("</div>\n"),n.join("")},s.toBBCode=function(a,b){return n(s.parse(a,b))},n=function(b){for(var c,d,e,f,g,h,i,j,k,l,m=[];b.length>0;)if(c=b.shift())if(e=s.bbcodes[c.name],f=!(!e||e.isInline!==!1),g=e&&e.isSelfClosing,i=f&&s.opts.breakBeforeBlock&&e.breakBefore!==!1||e&&e.breakBefore,j=f&&!g&&s.opts.breakStartBlock&&e.breakStart!==!1||e&&e.breakStart,k=f&&s.opts.breakEndBlock&&e.breakEnd!==!1||e&&e.breakEnd,l=f&&s.opts.breakAfterBlock&&e.breakAfter!==!1||e&&e.breakAfter,h=(e?e.quoteType:null)||s.opts.quoteType||a.sceditor.BBCodeParser.QuoteType.auto,e||c.type!==t.open)if(c.type===t.open){if(i&&m.push("\n"),m.push("["+c.name),c.attrs){c.attrs.defaultattr&&(m.push("="+p(c.attrs.defaultattr,h,"defaultattr")),delete c.attrs.defaultattr);for(d in c.attrs)c.attrs.hasOwnProperty(d)&&m.push(" "+d+"="+p(c.attrs[d],h,d))}m.push("]"),j&&m.push("\n"),c.children&&m.push(n(c.children)),g||e.excludeClosing||(k&&m.push("\n"),m.push("[/"+c.name+"]")),l&&m.push("\n"),c.closing&&g&&m.push(c.closing.val)}else m.push(c.val);else m.push(c.val),c.children&&m.push(n(c.children)),c.closing&&m.push(c.closing.val);return m.join("")},p=function(b,c,d){var e=a.sceditor.BBCodeParser.QuoteType,f=/\s|=/.test(b);return a.isFunction(c)?c(b,d):c===e.never||c===e.auto&&!f?b:'"'+b.replace("\\","\\\\").replace('"','\\"')+'"'},r=function(a){return a.length?a[a.length-1]:null},q=function(a){return a.toLowerCase()},d()},a.sceditor.BBCodeParser.QuoteType={always:1,never:2,auto:3},a.sceditor.BBCodeParser.defaults={breakBeforeBlock:!1,breakStartBlock:!1,breakEndBlock:!1,breakAfterBlock:!0,removeEmptyTags:!0,fixInvalidNesting:!0,fixInvalidChildren:!0,quoteType:a.sceditor.BBCodeParser.QuoteType.auto},a.sceditorBBCodePlugin=a.sceditor.plugins.bbcode=function(){var b,d,e,f,g,h,i,j=this;f=a.sceditor.plugins.bbcode.formatString,j.bbcodes=a.sceditor.plugins.bbcode.bbcodes,j.stripQuotes=a.sceditor.plugins.bbcode.stripQuotes;var k={},l={},m={ul:["li","ol","ul"],ol:["li","ol","ul"],table:["tr"],tr:["td","th"],code:["br","p","div"]},n={};j.init=function(){j.opts=this.opts,b(),h(this),this.toBBCode=j.signalToSource,this.fromBBCode=j.signalToWysiwyg},h=function(b){var c=a.sceditor.command.get,d={bold:{txtExec:["[b]","[/b]"]},italic:{txtExec:["[i]","[/i]"]},underline:{txtExec:["[u]","[/u]"]},strike:{txtExec:["[s]","[/s]"]},subscript:{txtExec:["[sub]","[/sub]"]},superscript:{txtExec:["[sup]","[/sup]"]},left:{txtExec:["[left]","[/left]"]},center:{txtExec:["[center]","[/center]"]},right:{txtExec:["[right]","[/right]"]},justify:{txtExec:["[justify]","[/justify]"]},font:{txtExec:function(a){var b=this;c("font")._dropDown(b,a,function(a){b.insertText("[font="+a+"]","[/font]")})}},size:{txtExec:function(a){var b=this;c("size")._dropDown(b,a,function(a){b.insertText("[size="+a+"]","[/size]")})}},color:{txtExec:function(a){var b=this;c("color")._dropDown(b,a,function(a){b.insertText("[color="+a+"]","[/color]")})}},bulletlist:{txtExec:function(c,d){var e="";a.each(d.split(/\r?\n/),function(){e+=(e?"\n":"")+"[li]"+this+"[/li]"}),b.insertText("[ul]\n"+e+"\n[/ul]")}},orderedlist:{txtExec:function(c,d){var e="";a.each(d.split(/\r?\n/),function(){e+=(e?"\n":"")+"[li]"+this+"[/li]"}),a.sceditor.plugins.bbcode.bbcode.get(""),b.insertText("[ol]\n"+e+"\n[/ol]")}},table:{txtExec:["[table][tr][td]","[/td][/tr][/table]"]},horizontalrule:{txtExec:["[hr]"]},code:{txtExec:["[code]","[/code]"]},image:{txtExec:function(a,b){var c=prompt(this._("Enter the image URL:"),b);c&&this.insertText("[img]"+c+"[/img]")}},email:{txtExec:function(a,b){var c=b&&b.indexOf("@")>-1?null:b,d=prompt(this._("Enter the e-mail address:"),c?"":b),e=prompt(this._("Enter the displayed text:"),c||d)||d;d&&this.insertText("[email="+d+"]"+e+"[/email]")}},link:{txtExec:function(a,b){var c=b&&b.indexOf("http://")>-1?null:b,d=prompt(this._("Enter URL:"),c?"http://":b),e=prompt(this._("Enter the displayed text:"),c||d)||d;d&&this.insertText("[url="+d+"]"+e+"[/url]")}},quote:{txtExec:["[quote]","[/quote]"]},youtube:{txtExec:function(a){var b=this;c("youtube")._dropDown(b,a,function(a){b.insertText("[youtube]"+a+"[/youtube]")})}},rtl:{txtExec:["[rtl]","[/rtl]"]},ltr:{txtExec:["[ltr]","[/ltr]"]}};b.commands=a.extend(!0,{},d,b.commands)},b=function(){a.each(j.bbcodes,function(b){j.bbcodes[b].tags&&a.each(j.bbcodes[b].tags,function(a,c){var d=j.bbcodes[b].isInline===!1;k[a]=k[a]||{},k[a][d]=k[a][d]||{},k[a][d][b]=c}),j.bbcodes[b].styles&&a.each(j.bbcodes[b].styles,function(a,c){var d=j.bbcodes[b].isInline===!1;l[d]=l[d]||{},l[d][a]=l[d][a]||{},l[d][a][b]=c})})},g=function(b,c){var d,e,f,g,h,i=b.style;return i?(n[c]||(n[c]=a.camelCase(c)),h=n[c],"text-align"===c?(d=a(b),f=i.direction,g=i[h]||d.css(c),d.parent().css(c)===g||"block"!==d.css("display")||d.is("hr")||d.is("th")||(e=g),f&&e&&(/right/i.test(e)&&"rtl"===f||/left/i.test(e)&&"ltr"===f)?null:e):i[h]):null},d=function(b,c,d){var e;return d=!!d,l[d]?(a.each(l[d],function(d,h){e=g(b[0],d),e&&g(b.parent()[0],d)!==e&&a.each(h,function(d,g){(!g||a.inArray(e.toString(),g)>-1)&&(c=a.isFunction(j.bbcodes[d].format)?j.bbcodes[d].format.call(j,b,c):f(j.bbcodes[d].format,c))})}),c):c},e=function(b,c,d){var e,g=b[0],h=g.nodeName.toLowerCase();if(d=!!d,k[h]&&k[h][d]&&a.each(k[h][d],function(d,g){(!g||(e=!1,a.each(g,function(c,d){return!b.attr(c)||d&&a.inArray(b.attr(c),d)<0?void 0:(e=!0,!1)}),e))&&(c=a.isFunction(j.bbcodes[d].format)?j.bbcodes[d].format.call(j,b,c):f(j.bbcodes[d].format,c))}),d&&(!a.sceditor.dom.isInline(g,!0)||"br"===h)){for(var i=g.parentNode,l=i.lastChild,m=g.previousSibling,n=a.sceditor.dom.isInline(i,!0);m&&a(m).hasClass("sceditor-ignore");)m=m.previousSibling;for(;a(l).hasClass("sceditor-ignore");)l=l.previousSibling;(n||l!==g||"li"===h||"br"===h&&a.sceditor.ie)&&(c+="\n"),"br"!==h&&m&&"br"!==m.nodeName.toLowerCase()&&a.sceditor.dom.isInline(m,!0)&&(c="\n"+c)}return c},j.signalToSource=function(b,d){var e,f,g=new a.sceditor.BBCodeParser(j.opts.parserOptions);return d||("string"==typeof b?(e=a("<div />").css("visibility","hidden").appendTo(c.body).html(b),d=e):d=a(b)),d&&d.jquery?(a.sceditor.dom.removeWhiteSpace(d[0]),f=j.elementToBbcode(d),e&&e.remove(),f=g.toBBCode(f,!0),j.opts.bbcodeTrim&&(f=a.trim(f)),f):""},j.elementToBbcode=function(b){return function c(b,f){var g="";return a.sceditor.dom.traverse(b,function(b){var h=a(b),i="",j=b.nodeType,k=b.nodeName.toLowerCase(),l=m[k],n=b.firstChild,o=!0;if("object"==typeof f&&(o=a.inArray(k,f)>-1,h.is("img")&&h.data("sceditor-emoticon")&&(o=!0),o||(l=f)),3===j||1===j)if(1===j){if(h.hasClass("sceditor-ignore"))return;if(h.hasClass("sceditor-nlf")&&(!n||!a.sceditor.ie&&1===b.childNodes.length&&/br/i.test(n.nodeName)))return;"iframe"!==k&&(i=c(b,l)),o?("code"!==k&&(i=d(h,i),i=e(h,i),i=d(h,i,!0)),g+=e(h,i,!0)):g+=i}else!b.wholeText||b.previousSibling&&3===b.previousSibling.nodeType?b.wholeText||(g+=b.nodeValue):g+=0===h.parents("code").length?b.wholeText.replace(/ +/g," "):b.wholeText},!1,!0),g}(b[0])},j.signalToWysiwyg=function(b,c){var d=new a.sceditor.BBCodeParser(j.opts.parserOptions),e=d.toHTML(j.opts.bbcodeTrim?a.trim(b):b);return c?i(e):e},i=function(b){var d,e,f,g=a("<div />").hide().appendTo(c.body),h=g[0];return f=function(b,d){if(!a.sceditor.dom.hasStyling(b)){if(a.sceditor.ie||1!==b.childNodes.length||!a(b.firstChild).is("br"))for(;e=b.firstChild;)h.insertBefore(e,b);if(d){var f=h.lastChild;b!==f&&a(f).is("div")&&b.nextSibling===f&&h.insertBefore(c.createElement("br"),b)}h.removeChild(b)}},h.innerHTML=b.replace(/<\/div>\n/g,"</div>"),(d=h.firstChild)&&a(d).is("div")&&f(d,!0),(d=h.lastChild)&&a(d).is("div")&&f(d),h=h.innerHTML,g.remove(),h}},a.sceditor.plugins.bbcode.stripQuotes=function(a){return a?a.replace(/\\(.)/g,"$1").replace(/^(["'])(.*?)\1$/,"$2"):a},a.sceditor.plugins.bbcode.formatString=function(){var a=arguments;return a[0].replace(/\{(\d+)\}/g,function(b,c){return"undefined"!=typeof a[c-0+1]?a[c-0+1]:"{"+c+"}"})};var d=a.sceditor.plugins.bbcode.normaliseColour=function(a){var b,c;return c=function(a){return a=parseInt(a,10),isNaN(a)?"00":(a=Math.max(0,Math.min(a,255)).toString(16),a.length<2?"0"+a:a)},a=a||"#000",(b=a.match(/rgb\((\d{1,3}),\s*?(\d{1,3}),\s*?(\d{1,3})\)/i))?"#"+c(b[1])+c(b[2]-0)+c(b[3]-0):(b=a.match(/#([0-f])([0-f])([0-f])\s*?$/i))?"#"+b[1]+b[1]+b[2]+b[2]+b[3]+b[3]:a};a.sceditor.plugins.bbcode.bbcodes={b:{tags:{b:null,strong:null},styles:{"font-weight":["bold","bolder","401","700","800","900"]},format:"[b]{0}[/b]",html:"<strong>{0}</strong>"},i:{tags:{i:null,em:null},styles:{"font-style":["italic","oblique"]},format:"[i]{0}[/i]",html:"<em>{0}</em>"},u:{tags:{u:null},styles:{"text-decoration":["underline"]},format:"[u]{0}[/u]",html:"<u>{0}</u>"},s:{tags:{s:null,strike:null},styles:{"text-decoration":["line-through"]},format:"[s]{0}[/s]",html:"<s>{0}</s>"},sub:{tags:{sub:null},format:"[sub]{0}[/sub]",html:"<sub>{0}</sub>"},sup:{tags:{sup:null},format:"[sup]{0}[/sup]",html:"<sup>{0}</sup>"},font:{tags:{font:{face:null}},styles:{"font-family":null},quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(a,b){var c;return"font"===a[0].nodeName.toLowerCase()&&(c=a.attr("face"))||(c=a.css("font-family")),"[font="+this.stripQuotes(c)+"]"+b+"[/font]"},html:function(a,b,c){return'<font face="'+b.defaultattr+'">'+c+"</font>"}},size:{tags:{font:{size:null}},styles:{"font-size":null},format:function(a,b){var c=a.attr("size"),d=1;return c||(c=a.css("fontSize")),c.indexOf("px")>-1?(c=c.replace("px","")-0,c>12&&(d=2),c>15&&(d=3),c>17&&(d=4),c>23&&(d=5),c>31&&(d=6),c>47&&(d=7)):d=c,"[size="+d+"]"+b+"[/size]"},html:function(a,b,c){return'<font size="'+b.defaultattr+'">'+c+"</font>"}},color:{tags:{font:{color:null}},styles:{color:null},quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(a,b){var c,e=a[0];return"font"===e.nodeName.toLowerCase()&&(c=a.attr("color"))||(c=e.style.color||a.css("color")),"[color="+d(c)+"]"+b+"[/color]"},html:function(a,b,c){return'<font color="'+d(b.defaultattr)+'">'+c+"</font>"}},ul:{tags:{ul:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ul]{0}[/ul]",html:"<ul>{0}</ul>"},list:{breakStart:!0,isInline:!1,skipLastLineBreak:!0,html:"<ul>{0}</ul>"},ol:{tags:{ol:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ol]{0}[/ol]",html:"<ol>{0}</ol>"},li:{tags:{li:null},isInline:!1,closedBy:["/ul","/ol","/list","*","li"],format:"[li]{0}[/li]",html:"<li>{0}</li>"},"*":{isInline:!1,closedBy:["/ul","/ol","/list","*","li"],html:"<li>{0}</li>"},table:{tags:{table:null},isInline:!1,isHtmlInline:!0,skipLastLineBreak:!0,format:"[table]{0}[/table]",html:"<table>{0}</table>"},tr:{tags:{tr:null},isInline:!1,skipLastLineBreak:!0,format:"[tr]{0}[/tr]",html:"<tr>{0}</tr>"},th:{tags:{th:null},allowsEmpty:!0,isInline:!1,format:"[th]{0}[/th]",html:"<th>{0}</th>"},td:{tags:{td:null},allowsEmpty:!0,isInline:!1,format:"[td]{0}[/td]",html:"<td>{0}</td>"},emoticon:{allowsEmpty:!0,tags:{img:{src:null,"data-sceditor-emoticon":null}},format:function(a,b){return a.data("sceditor-emoticon")+b
14},html:"{0}"},hr:{tags:{hr:null},allowsEmpty:!0,isSelfClosing:!0,isInline:!1,format:"[hr]{0}",html:"<hr />"},img:{allowsEmpty:!0,tags:{img:{src:null}},quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(a,b){var c,d,e="",f=a[0],g=function(a){return f.style?f.style[a]:null};return a.attr("data-sceditor-emoticon")?b:(c=a.attr("width")||g("width"),d=a.attr("height")||g("height"),(f.complete&&(c||d)||c&&d)&&(e="="+a.width()+"x"+a.height()),"[img"+e+"]"+a.attr("src")+"[/img]")},html:function(a,b,c){var d,e="";return"undefined"!=typeof b.width&&(e+=' width="'+b.width+'"'),"undefined"!=typeof b.height&&(e+=' height="'+b.height+'"'),b.defaultattr&&(d=b.defaultattr.split(/x/i),e=' width="'+d[0]+'"'+' height="'+(2===d.length?d[1]:d[0])+'"'),"<img"+e+' src="'+c+'" />'}},url:{allowsEmpty:!0,tags:{a:{href:null}},quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(a,b){var c=a.attr("href");return"mailto:"===c.substr(0,7)?'[email="'+c.substr(7)+'"]'+b+"[/email]":"[url="+decodeURI(c)+"]"+b+"[/url]"},html:function(a,b,c){return'<a href="'+encodeURI(b.defaultattr||c)+'">'+c+"</a>"}},email:{quoteType:a.sceditor.BBCodeParser.QuoteType.never,html:function(a,b,c){return'<a href="mailto:'+(b.defaultattr||c)+'">'+c+"</a>"}},quote:{tags:{blockquote:null},isInline:!1,quoteType:a.sceditor.BBCodeParser.QuoteType.never,format:function(b,c){var d="",e=a(b),f=e.children("cite").first();return(1===f.length||e.data("author"))&&(d=f.text()||e.data("author"),e.data("author",d),f.remove(),c=this.elementToBbcode(a(b)),d="="+d,e.prepend(f)),"[quote"+d+"]"+c+"[/quote]"},html:function(a,b,c){return b.defaultattr&&(c="<cite>"+b.defaultattr+"</cite>"+c),"<blockquote>"+c+"</blockquote>"}},code:{tags:{code:null},isInline:!1,allowedChildren:["#","#newline"],format:"[code]{0}[/code]",html:"<code>{0}</code>"},left:{styles:{"text-align":["left","-webkit-left","-moz-left","-khtml-left"]},isInline:!1,format:"[left]{0}[/left]",html:'<div align="left">{0}</div>'},center:{styles:{"text-align":["center","-webkit-center","-moz-center","-khtml-center"]},isInline:!1,format:"[center]{0}[/center]",html:'<div align="center">{0}</div>'},right:{styles:{"text-align":["right","-webkit-right","-moz-right","-khtml-right"]},isInline:!1,format:"[right]{0}[/right]",html:'<div align="right">{0}</div>'},justify:{styles:{"text-align":["justify","-webkit-justify","-moz-justify","-khtml-justify"]},isInline:!1,format:"[justify]{0}[/justify]",html:'<div align="justify">{0}</div>'},youtube:{allowsEmpty:!0,tags:{iframe:{"data-youtube-id":null}},format:function(a,b){return a=a.attr("data-youtube-id"),a?"[youtube]"+a+"[/youtube]":b},html:'<iframe width="560" height="315" src="http://www.youtube.com/embed/{0}?wmode=opaque" data-youtube-id="{0}" frameborder="0" allowfullscreen></iframe>'},rtl:{styles:{direction:["rtl"]},format:"[rtl]{0}[/rtl]",html:'<div style="direction: rtl">{0}</div>'},ltr:{styles:{direction:["ltr"]},format:"[ltr]{0}[/ltr]",html:'<div style="direction: ltr">{0}</div>'},ignore:{}},a.sceditor.plugins.bbcode.bbcode={get:function(b){return a.sceditor.plugins.bbcode.bbcodes[b]||null},set:function(b,c){return b&&c?(c=a.extend(a.sceditor.plugins.bbcode.bbcodes[b]||{},c),c.remove=function(){a.sceditor.plugins.bbcode.bbcode.remove(b)},a.sceditor.plugins.bbcode.bbcodes[b]=c,this):!1},rename:function(a,b){return this.hasOwnProperty(a)?(this[b]=this[a],this.remove(a),this):!1},remove:function(b){return a.sceditor.plugins.bbcode.bbcodes[b]&&delete a.sceditor.plugins.bbcode.bbcodes[b],this}},a.fn.sceditorBBCodePlugin=function(b){return b=b||{},a.isPlainObject(b)&&(b.plugins=(b.plugins?b.plugins:"")+"bbcode"),this.sceditor(b)}}(jQuery,window,document);
15----
16/* SCEditor v1.4.4 | (C) 2011-2013, Sam Clarke | sceditor.com/license */
17!function(a,b,c){"use strict";var d={html:'<!DOCTYPE html><html><head><style>.ie * {min-height: auto !important}</style><meta http-equiv="Content-Type" content="text/html;charset={charset}" /><link rel="stylesheet" type="text/css" href="{style}" /></head><body contenteditable="true" {spellcheck}></body></html>',toolbarButton:'<a class="sceditor-button sceditor-button-{name}" data-sceditor-command="{name}" unselectable="on"><div unselectable="on">{dispName}</div></a>',emoticon:'<img src="{url}" data-sceditor-emoticon="{key}" alt="{key}" title="{tooltip}" />',fontOpt:'<a class="sceditor-font-option" href="#" data-font="{font}"><font face="{font}">{font}</font></a>',sizeOpt:'<a class="sceditor-fontsize-option" data-size="{size}" href="#"><font size="{size}">{size}</font></a>',pastetext:'<div><label for="txt">{label}</label> <textarea cols="20" rows="7" id="txt"></textarea></div><div><input type="button" class="button" value="{insert}" /></div>',table:'<div><label for="rows">{rows}</label><input type="text" id="rows" value="2" /></div><div><label for="cols">{cols}</label><input type="text" id="cols" value="2" /></div><div><input type="button" class="button" value="{insert}" /></div>',image:'<div><label for="link">{url}</label> <input type="text" id="image" value="http://" /></div><div><label for="width">{width}</label> <input type="text" id="width" size="2" /></div><div><label for="height">{height}</label> <input type="text" id="height" size="2" /></div><div><input type="button" class="button" value="{insert}" /></div>',email:'<div><label for="email">{label}</label> <input type="text" id="email" /></div><div><input type="button" class="button" value="{insert}" /></div>',link:'<div><label for="link">{url}</label> <input type="text" id="link" value="http://" /></div><div><label for="des">{desc}</label> <input type="text" id="des" /></div><div><input type="button" class="button" value="{ins}" /></div>',youtubeMenu:'<div><label for="link">{label}</label> <input type="text" id="link" value="http://" /></div><div><input type="button" class="button" value="{insert}" /></div>',youtube:'<iframe width="560" height="315" src="http://www.youtube.com/embed/{id}?wmode=opaque" data-youtube-id="{id}" frameborder="0" allowfullscreen></iframe>'},e=function(b,c,e){var f=d[b];return a.each(c,function(a,b){f=f.replace(new RegExp("\\{"+a+"\\}","g"),b)}),e&&(f=a(f)),f};a.sceditor=function(d,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb=this,hb=d.get?d.get(0):d,ib=a(hb),jb=[],kb=[],lb=[],mb=[],nb={},ob=[];gb.commands=a.extend(!0,{},f.commands||a.sceditor.commands),gb.opts=f=a.extend({},a.sceditor.defaultOptions,f),A=function(){ib.data("sceditor",gb),a.each(f,function(b,c){a.isPlainObject(c)&&(f[b]=a.extend(!0,{},c))}),f.locale&&"en"!==f.locale&&G(),g=a('<div class="sceditor-container" />').insertAfter(ib).css("z-index",f.zIndex),a.sceditor.ie&&g.addClass("ie ie"+a.sceditor.ie),y=!!ib.attr("required"),ib.removeAttr("required"),F(),M(),H(),E(),K(),I(),J(),a.sceditor.isWysiwygSupported||gb.toggleSourceMode();var d=function(){a(b).unbind("load",d),f.autofocus&&cb(),f.autoExpand&&gb.expandToContent(),X()};a(b).load(d),c.readyState&&"complete"===c.readyState&&d(),Z(),t.call("ready")},F=function(){var b=f.plugins;b=b?b.toString().split(","):[],t=new a.sceditor.PluginManager(gb),a.each(b,function(b,c){t.register(a.trim(c))})},G=function(){var b;a.sceditor.locale[f.locale]?q=a.sceditor.locale[f.locale]:(b=f.locale.split("-"),a.sceditor.locale[b[0]]&&(q=a.sceditor.locale[b[0]])),q&&q.dateFormat&&(f.dateFormat=q.dateFormat)},E=function(){var c,d;m=a("<textarea></textarea>").hide(),i=a('<iframe frameborder="0"></iframe>'),f.spellcheck||m.attr("spellcheck","false"),"https:"===b.location.protocol&&i.attr("src","javascript:false"),g.append(i).append(m),j=i[0],n=m[0],gb.width(f.width||ib.width()),gb.height(f.height||ib.height()),c=N(),c.open(),c.write(e("html",{spellcheck:f.spellcheck?"":'spellcheck="false"',charset:f.charset,style:f.style})),c.close(),l=a(c),k=a(c.body),gb.readOnly(!!f.readOnly),a.sceditor.ie&&l.find("html").addClass("ie ie"+a.sceditor.ie),(a.sceditor.ios||a.sceditor.ie)&&(k.height("100%"),a.sceditor.ie||k.bind("touchend",gb.focus)),r=new a.sceditor.rangeHelper(j.contentWindow),gb.val(ib.hide().val()),d=ib.attr("tabindex"),m.attr("tabindex",d),i.attr("tabindex",d)},I=function(){f.autoUpdate&&(k.bind("blur",gb.updateOriginal),m.bind("blur",gb.updateOriginal)),null===f.rtl&&(f.rtl="rtl"===m.css("direction")),gb.rtl(!!f.rtl),f.autoExpand&&l.bind("keyup",gb.expandToContent),f.resizeEnabled&&L(),g.attr("id",f.id),gb.emoticons(f.emoticonsEnabled)},J=function(){a(c).click(W),a(hb.form).bind("reset",T).submit(gb.updateOriginal),a(b).bind("resize orientationChanged",X),k.keypress(S).keydown(Q).keydown(R).keyup(_).bind("paste",O).bind(a.sceditor.ie?"selectionchange":"keyup focus blur contextmenu mouseup touchend click",ab).bind("keydown keyup keypress focus blur contextmenu",V),f.emoticonsCompat&&b.getSelection&&k.keyup(eb),m.bind("keydown keyup keypress focus blur contextmenu",V).keydown(Q),l.keypress(S).mousedown(U).bind(a.sceditor.ie?"selectionchange":"focus blur contextmenu mouseup click",ab).bind("beforedeactivate keyup",D).keyup(_).focus(function(){p=null}),g.bind("selectionchanged",bb).bind("selectionchanged",Z).bind("selectionchanged",V).bind("nodechanged",V)},H=function(){var b,c,d=(f.toolbarExclude||"").split(","),i=f.toolbar.split("|");h=a('<div class="sceditor-toolbar" unselectable="on" />'),a.each(i,function(f,g){b=a('<div class="sceditor-group" />'),a.each(g.split(","),function(f,g){!gb.commands[g]||a.inArray(g,d)>-1||(c=e("toolbarButton",{name:g,dispName:gb._(gb.commands[g].tooltip||g)},!0),c.data("sceditor-txtmode",!!gb.commands[g].txtExec),c.data("sceditor-wysiwygmode",!!gb.commands[g].exec),c.click(function(){var b=a(this);return b.hasClass("disabled")||C(b,gb.commands[g]),Z(),!1}),gb.commands[g].tooltip&&c.attr("title",gb._(gb.commands[g].tooltip)),gb.commands[g].exec||c.addClass("disabled"),gb.commands[g].shortcut&&gb.addShortcut(gb.commands[g].shortcut,g),b.append(c))}),b[0].firstChild&&h.append(b)}),a(f.toolbarContainer||g).append(h)},K=function(){a.each(gb.commands,function(b,c){c.keyPress&&jb.push(c.keyPress),c.forceNewLineAfter&&a.isArray(c.forceNewLineAfter)&&(lb=a.merge(lb,c.forceNewLineAfter)),c.state?mb.push({name:b,state:c.state}):"string"==typeof c.exec&&mb.push({name:b,state:c.exec})}),_()},L=function(){var d,e,h,i,j,k,l=a('<div class="sceditor-grip" />'),m=a('<div class="sceditor-resize-cover" />'),n=0,o=0,p=0,q=0,r=g.width(),s=g.height(),t=!1,u=gb.rtl();d=f.resizeMinHeight||s/1.5,e=f.resizeMaxHeight||2.5*s,h=f.resizeMinWidth||r/1.25,i=f.resizeMaxWidth||1.25*r,j=function(c){"touchmove"===c.type&&(c=b.event);var j=q+(c.pageY-o),k=u?p-(c.pageX-n):p+(c.pageX-n);i>0&&k>i&&(k=i),e>0&&j>e&&(j=e),(!f.resizeWidth||h>k||i>0&&k>i)&&(k=!1),(!f.resizeHeight||d>j||e>0&&j>e)&&(j=!1),(k||j)&&(gb.dimensions(k,j),a.sceditor.ie<7&&g.height(j)),c.preventDefault()},k=function(b){t&&(t=!1,m.hide(),g.removeClass("resizing").height("auto"),a(c).unbind("touchmove mousemove",j),a(c).unbind("touchend mouseup",k),b.preventDefault())},g.append(l),g.append(m.hide()),l.bind("touchstart mousedown",function(d){"touchstart"===d.type&&(d=b.event),n=d.pageX,o=d.pageY,p=g.width(),q=g.height(),t=!0,g.addClass("resizing"),m.show(),a(c).bind("touchmove mousemove",j),a(c).bind("touchend mouseup",k),a.sceditor.ie<7&&g.height(q),d.preventDefault()})},M=function(){var b,d=f.emoticons,e=f.emoticonsRoot;a.isPlainObject(d)&&f.emoticonsEnabled&&a.each(d,function(f,g){a.each(g,function(a,g){e&&(g={url:e+(g.url||g),tooltip:g.tooltip||a},d[f][a]=g),b=c.createElement("img"),b.src=g.url||g,kb.push(b)})})},cb=function(){var b,c,d,e=l[0],h=k[0],i=!!f.autofocusEnd;if(g.is(":visible")){if(gb.sourceMode())d=n.value.length,n.setSelectionRange?n.setSelectionRange(d,d):n.createTextRange&&(b=n.createTextRange(),b.moveEnd("character",d),b.moveStart("character",d),r.selectRange(b));else{if(a.sceditor.dom.removeWhiteSpace(h),i)for((c=h.lastChild)||k.append(c=e.createElement("div"));c.lastChild;)c=c.lastChild,/br/i.test(c.nodeName)&&c.previousSibling&&(c=c.previousSibling);else c=h.firstChild;e.createRange?(b=e.createRange(),/br/i.test(c.nodeName)?b.setStartBefore(c):b.selectNodeContents(c),b.collapse(!1)):(b=h.createTextRange(),b.moveToElementText(3!==c.nodeType?c:c.parentNode),b.collapse(!1)),r.selectRange(b),i&&(l.scrollTop(h.scrollHeight),k.scrollTop(h.scrollHeight))}gb.focus()}},gb.readOnly=function(a){return"boolean"!=typeof a?"readonly"===m.attr("readonly"):(k[0].contentEditable=!a,a?m.attr("readonly","readonly"):m.removeAttr("readonly"),Y(a),this)},gb.rtl=function(a){var b=a?"rtl":"ltr";return"boolean"!=typeof a?"rtl"===m.attr("dir"):(k.attr("dir",b),m.attr("dir",b),g.removeClass("rtl").removeClass("ltr").addClass(b),this)},Y=function(b){var c=gb.inSourceMode();h.find(".sceditor-button").removeClass("disabled").each(function(){var d=a(this);b===!0||c&&!d.data("sceditor-txtmode")?d.addClass("disabled"):c||d.data("sceditor-wysiwygmode")||d.addClass("disabled")})},gb.width=function(a,b){return a||0===a?(gb.dimensions(a,null,b),this):g.width()},gb.dimensions=function(b,d,e){var j=a.sceditor.ie<8||c.documentMode<8?2:0;return b=b||0===b?b:!1,d=d||0===d?d:!1,b===!1&&d===!1?{width:gb.width(),height:gb.height()}:("undefined"==typeof i.data("outerWidthOffset")&&gb.updateStyleCache(),b!==!1&&(e!==!1&&(f.width=b),d===!1&&(d=g.height(),e=!1),g.width(b),b&&b.toString().indexOf("%")>-1&&(b=g.width()),i.width(b-i.data("outerWidthOffset")),m.width(b-m.data("outerWidthOffset")),a.sceditor.ios&&k&&k.width(b-i.data("outerWidthOffset")-(k.outerWidth(!0)-k.width()))),d!==!1&&(e!==!1&&(f.height=d),d&&d.toString().indexOf("%")>-1&&(d=g.height(d).height(),g.height("auto")),d-=f.toolbarContainer?0:h.outerHeight(!0),i.height(d-i.data("outerHeightOffset")),m.height(d-j-m.data("outerHeightOffset"))),this)},gb.updateStyleCache=function(){i.data("outerWidthOffset",i.outerWidth(!0)-i.width()),m.data("outerWidthOffset",m.outerWidth(!0)-m.width()),i.data("outerHeightOffset",i.outerHeight(!0)-i.height()),m.data("outerHeightOffset",m.outerHeight(!0)-m.height())},gb.height=function(a,b){return a||0===a?(gb.dimensions(null,a,b),this):g.height()},gb.maximize=function(b){return"undefined"==typeof b?g.is(".sceditor-maximize"):(b=!!b,a.sceditor.ie<7&&a("html, body").toggleClass("sceditor-maximize",b),g.toggleClass("sceditor-maximize",b),gb.width(b?"100%":f.width,!1),gb.height(b?"100%":f.height,!1),this)},gb.expandToContent=function(a){var b=g.height(),c=k[0].scrollHeight||l[0].documentElement.scrollHeight,d=b-i.height(),e=f.resizeMaxHeight||2*(f.height||ib.height());c+=d,a!==!0&&c>e&&(c=e),c>b&&gb.height(c)},gb.destroy=function(){t.destroy(),r=null,p=null,t=null,a(c).unbind("click",W),a(b).unbind("resize orientationChanged",X),a(hb.form).unbind("reset",T).unbind("submit",gb.updateOriginal),k.unbind(),l.unbind().find("*").remove(),m.unbind().remove(),h.remove(),g.unbind().find("*").unbind().remove(),g.remove(),ib.removeData("sceditor").removeData("sceditorbbcode").show(),y&&ib.attr("required","required")},gb.createDropDown=function(b,c,d,e){var g,h=o&&o.is(".sceditor-"+c);gb.closeDropDown(),h||(e!==!1&&a(d).find(":not(input,textarea)").filter(function(){return 1===this.nodeType}).attr("unselectable","on"),g={top:b.offset().top,left:b.offset().left,marginTop:b.outerHeight()},a.extend(g,f.dropDownCss),o=a('<div class="sceditor-dropdown sceditor-'+c+'" />').css(g).append(d).appendTo(a("body")).click(function(a){a.stopPropagation()}))},W=function(a){3!==a.which&&gb.closeDropDown()},O=function(a){var b,d,e=k[0],g=l[0],h=0,i=c.createElement("div"),j=g.createDocumentFragment();if(f.disablePasting)return!1;if(f.enablePasteFiltering){if(r.saveRange(),c.body.appendChild(i),a&&a.clipboardData&&a.clipboardData.getData&&((b=a.clipboardData.getData("text/html"))||(b=a.clipboardData.getData("text/plain"))))return i.innerHTML=b,P(e,i),!1;for(;e.firstChild;)j.appendChild(e.firstChild);return d=function(a,b){if(a.childNodes.length>0){for(;a.firstChild;)b.appendChild(a.firstChild);for(;j.firstChild;)a.appendChild(j.firstChild);P(a,b)}else{if(h>25){for(;j.firstChild;)a.appendChild(j.firstChild);return r.restoreRange(),void 0}++h,setTimeout(function(){d(a,b)},20)}},d(e,i),gb.focus(),!0}},P=function(b,c){a.sceditor.dom.fixNesting(c);var d=c.innerHTML;t.hasHandler("toSource")&&(d=t.callOnlyFirst("toSource",d,a(c))),c.parentNode.removeChild(c),t.hasHandler("toWysiwyg")&&(d=t.callOnlyFirst("toWysiwyg",d,!0)),r.restoreRange(),gb.wysiwygEditorInsertHtml(d,null,!0)},gb.closeDropDown=function(a){o&&(o.unbind().remove(),o=null),a===!0&&gb.focus()},N=function(){return j.contentDocument?j.contentDocument:j.contentWindow&&j.contentWindow.document?j.contentWindow.document:j.document?j.document:null},gb.wysiwygEditorInsertHtml=function(b,c,d){var e,f,g='<span id="sceditor-cursor"> </span>';gb.focus(),(d||!a(v).is("code")&&0===a(v).parents("code").length)&&(c?c+=g:b+=g,r.insertHTML(b,c),f=k.find("#sceditor-cursor"),e=f.offset().top+2*f.outerHeight(!0)-i.height(),f.remove(),l.scrollTop(e),k.scrollTop(e),r.saveRange(),B(k[0]),r.restoreRange(),_())},gb.wysiwygEditorInsertText=function(b,c){gb.wysiwygEditorInsertHtml(a.sceditor.escapeEntities(b),a.sceditor.escapeEntities(c))},gb.insertText=function(a,b){return gb.inSourceMode()?gb.sourceEditorInsertText(a,b):gb.wysiwygEditorInsertText(a,b),this},gb.sourceEditorInsertText=function(a,b){var d,e,f,g,h;h=n.scrollTop,n.focus(),"undefined"!=typeof n.selectionStart?(e=n.selectionStart,f=n.selectionEnd,g=a.length,b&&(a+=n.value.substring(e,f)+b),n.value=n.value.substring(0,e)+a+n.value.substring(f,n.value.length),n.selectionStart=e+a.length-(b?b.length:0),n.selectionEnd=n.selectionStart):"undefined"!=typeof c.selection.createRange?(d=c.selection.createRange(),b&&(a+=d.text+b),d.text=a,b&&d.moveEnd("character",0-b.length),d.moveStart("character",d.End-d.Start),d.select()):n.value+=a+b,n.scrollTop=h,n.focus()},gb.getRangeHelper=function(){return r},gb.val=function(a,b){return"string"==typeof a?(gb.inSourceMode()?gb.setSourceEditorValue(a):(b!==!1&&t.hasHandler("toWysiwyg")&&(a=t.callOnlyFirst("toWysiwyg",a)),gb.setWysiwygEditorValue(a)),this):gb.inSourceMode()?gb.getSourceEditorValue(!1):gb.getWysiwygEditorValue()},gb.insert=function(b,c,d,e,f){if(gb.inSourceMode())gb.sourceEditorInsertText(b,c);else{if(c){var g=gb.getRangeHelper().selectedHtml(),h=a("<div>").appendTo(a("body")).hide().html(g);d!==!1&&t.hasHandler("toSource")&&(g=t.callOnlyFirst("toSource",g,h)),h.remove(),b+=g+c}d!==!1&&t.hasHandler("toWysiwyg")&&(b=t.callOnlyFirst("toWysiwyg",b,!0)),d!==!1&&f===!0&&(b=b.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")),gb.wysiwygEditorInsertHtml(b)}return this},gb.getWysiwygEditorValue=function(b){var c,d,e=r.hasSelection();return e?r.saveRange():p&&p.getBookmark&&(d=p.getBookmark()),a.sceditor.dom.fixNesting(k[0]),c=k.html(),b!==!1&&t.hasHandler("toSource")&&(c=t.callOnlyFirst("toSource",c,k)),e?(r.restoreRange(),p=null):d&&(p.moveToBookmark(d),p=null),c},gb.getBody=function(){return k},gb.getContentAreaContainer=function(){return i},gb.getSourceEditorValue=function(a){var b=m.val();return a!==!1&&t.hasHandler("toWysiwyg")&&(b=t.callOnlyFirst("toWysiwyg",b)),b},gb.setWysiwygEditorValue=function(b){b||(b="<p>"+(a.sceditor.ie?"":"<br />")+"</p>"),k[0].innerHTML=b,B(k[0]),_()},gb.setSourceEditorValue=function(a){m.val(a)},gb.updateOriginal=function(){ib.val(gb.val())},B=function(b){if(f.emoticonsEnabled&&!a(b).parents("code").length){var c=b.ownerDocument,d=[],g=[],h=a.extend({},f.emoticons.more,f.emoticons.dropdown,f.emoticons.hidden);a.each(h,function(b){f.emoticonsCompat&&(g[b]=new RegExp("(>|^|\\s| | | | | )"+a.sceditor.regexEscape(b)+"(\\s|$|<| | | | | )")),d.push(b)}),function i(b){for(b=b.firstChild;null!=b;){var j,k,l,m,n,o,p,q=b.parentNode,r=b.nodeValue;if(3!==b.nodeType)a(b).is("code")||i(b);else if(r)for(n=d.length;n--;)k=d[n],p=f.emoticonsCompat?r.search(g[k]):r.indexOf(k),p>-1&&(o=b.nextSibling,l=h[k],j=r.substr(p).split(k),r=r.substr(0,p)+j.shift(),b.nodeValue=r,m=a.sceditor.dom.parseHTML(e("emoticon",{key:k,url:l.url||l,tooltip:l.tooltip||k}),c),q.insertBefore(m[0],o),q.insertBefore(c.createTextNode(j.join(k)),o));b=b.nextSibling}}(b),f.emoticonsCompat&&(ob=k.find("img[data-sceditor-emoticon]"))}},gb.inSourceMode=function(){return g.hasClass("sourceMode")},gb.sourceMode=function(a){return"boolean"!=typeof a?gb.inSourceMode():((gb.inSourceMode()&&!a||!gb.inSourceMode()&&a)&&gb.toggleSourceMode(),this)},gb.toggleSourceMode=function(){(a.sceditor.isWysiwygSupported||!gb.inSourceMode())&&(gb.blur(),gb.inSourceMode()?gb.setWysiwygEditorValue(gb.getSourceEditorValue()):gb.setSourceEditorValue(gb.getWysiwygEditorValue()),p=null,m.toggle(),i.toggle(),gb.inSourceMode()?g.removeClass("sourceMode").addClass("wysiwygMode"):g.removeClass("wysiwygMode").addClass("sourceMode"),Y(),Z())},$=function(){return n.focus(),null!=n.selectionStart?n.value.substring(n.selectionStart,n.selectionEnd):c.selection.createRange?c.selection.createRange().text:void 0},C=function(b,c){return gb.inSourceMode()?(c.txtExec&&(a.isArray(c.txtExec)?gb.sourceEditorInsertText.apply(gb,c.txtExec):c.txtExec.call(gb,b,$())),void 0):(c.exec&&(a.isFunction(c.exec)?c.exec.call(gb,b):gb.execCommand(c.exec,c.hasOwnProperty("execParam")?c.execParam:null)),void 0)},D=function(){a.sceditor.ie&&(p=r.selectedRange())},gb.execCommand=function(b,c){var d=!1,e=a(r.parentNode());if(gb.focus(),!e.is("code")&&0===e.parents("code").length){try{d=l[0].execCommand(b,!1,c)}catch(f){}!d&&gb.commands[b]&&gb.commands[b].errorMessage&&alert(gb._(gb.commands[b].errorMessage))}},ab=function(){var b=function(){r&&!r.compare(w)&&(w=r.cloneSelected(),g.trigger(a.Event("selectionchanged"))),x=!1};x||(x=!0,a.sceditor.ie?b():setTimeout(b,100))},bb=function(){var b,c=r.parentNode();u!==c&&(b=u,u=c,v=r.getFirstBlockParent(c),g.trigger(a.Event("nodechanged",{oldNode:b,newNode:u})))},gb.currentNode=function(){return u},gb.currentBlockNode=function(){return v},Z=function(a){var b,c,d,e,f,g=l[0],i=mb.length,j=gb.sourceMode();if(gb.sourceMode()||gb.readOnly())h.find(".sceditor-button").removeClass("active");else for(f=a?a.newNode:r.parentNode(),d=r.getFirstBlockParent(f);i--;)if(b=0,c=mb[i],e=h.find(".sceditor-button-"+c.name),j&&!e.data("sceditor-txtmode"))e.addClass("disabled");else if(j||e.data("sceditor-wysiwygmode")){if("string"==typeof c.state)try{b=g.queryCommandEnabled(c.state)?0:-1,b>-1&&(b=g.queryCommandState(c.state)?1:0)}catch(k){}else b=c.state.call(gb,f,d);0>b?e.addClass("disabled"):e.removeClass("disabled"),b>0?e.addClass("active"):e.removeClass("active")}else e.addClass("disabled")},S=function(b){var c,d=jb.length;if(gb.closeDropDown(),c=a(u),13===b.which&&(c.is("code,blockquote,pre")||0!==c.parents("code,blockquote,pre").length))return p=null,gb.wysiwygEditorInsertHtml("<br />",null,!0),!1;if(!c.is("code")&&0===c.parents("code").length)for(;d--;)jb[d].call(gb,b,j,m)},_=function(){var b,c,d;a.sceditor.dom.rTraverse(k[0],function(e){return b=e.nodeName.toLowerCase(),a.inArray(b,lb)>-1&&(c=!0),3===e.nodeType&&!/^\s*$/.test(e.nodeValue)||"br"===b||a.sceditor.ie&&!e.firstChild&&!a.sceditor.dom.isInline(e,!1)?(c&&(d=k[0].ownerDocument.createElement("div"),d.className="sceditor-nlf",d.innerHTML=a.sceditor.ie?"":"<br />",k[0].appendChild(d)),!1):void 0})},T=function(){gb.val(ib.val())},U=function(){gb.closeDropDown(),p=null},X=function(){var a=f.height,b=f.width;gb.maximize()?gb.dimensions("100%","100%",!1):(a&&a.toString().indexOf("%")>-1&&gb.height(a),b&&b.toString().indexOf("%")>-1&&gb.width(b))},gb._=function(){var a=arguments;return q&&q[a[0]]&&(a[0]=q[a[0]]),a[0].replace(/\{(\d+)\}/g,function(b,c){return"undefined"!=typeof a[c-0+1]?a[c-0+1]:"{"+c+"}"})},V=function(b){var c,d=a.extend({},b);t.call(d.type+"Event",b,gb),delete d.type,c=a.Event((b.target===n?"scesrc":"scewys")+b.type,d),g.trigger.apply(g,[c,gb]),c.isDefaultPrevented()&&b.preventDefault(),c.isImmediatePropagationStopped()&&c.stopImmediatePropagation(),c.isPropagationStopped()&&c.stopPropagation()},gb.bind=function(b,c,d,e){var f=b.length;for(b=b.split(" ");f--;)a.isFunction(c)&&(d||g.bind("scewys"+b[f],c),e||g.bind("scesrc"+b[f],c));return this},gb.unbind=function(b,c,d,e){var f=b.length;for(b=b.split(" ");f--;)a.isFunction(c)&&(d||g.unbind("scewys"+b[f],c),e||g.unbind("scesrc"+b[f],c));return this},gb.blur=function(b,c,d){return a.isFunction(b)?gb.bind("blur",b,c,d):gb.sourceMode()?m.blur():(s||(s=a('<input style="position:absolute;width:0;height:0;opacity:0;border:0;padding:0;filter:alpha(opacity=0)" type="text" />').appendTo(g)),s.removeAttr("disabled").show().focus().blur().hide().attr("disabled","disabled")),this},gb.focus=function(b,c,d){return a.isFunction(b)?gb.bind("focus",b,c,d):gb.inSourceMode()?n.focus():(j.contentWindow.focus(),k[0].focus(),p&&(r.selectRange(p),p=null)),this},gb.keyDown=function(a,b,c){return gb.bind("keydown",a,b,c)},gb.keyPress=function(a,b,c){return gb.bind("keypress",a,b,c)},gb.keyUp=function(a,b,c){return gb.bind("keyup",a,b,c)},gb.nodeChanged=function(a){return gb.bind("nodechanged",a,!1,!0)},gb.selectionChanged=function(a){return gb.bind("selectionchanged",a,!1,!0)},db=function(b){var c=0,d=String.fromCharCode(b.which);if(!a(v).is("code")&&!a(v).parents("code").length)return gb.emoticonsCache||(gb.emoticonsCache=[],a.each(a.extend({},f.emoticons.more,f.emoticons.dropdown,f.emoticons.hidden),function(a,b){gb.emoticonsCache[c++]=[a,e("emoticon",{key:a,url:b.url||b,tooltip:b.tooltip||a})]}),gb.emoticonsCache.sort(function(a,b){return a[0].length-b[0].length}),gb.longestEmoticonCode=gb.emoticonsCache[gb.emoticonsCache.length-1][0].length),gb.getRangeHelper().raplaceKeyword(gb.emoticonsCache,!0,!0,gb.longestEmoticonCode,f.emoticonsCompat,d)?(f.emoticonsCompat&&(ob=k.find("img[data-sceditor-emoticon]")),/^\s$/.test(d)&&f.emoticonsCompat):void 0},eb=function(){if(ob.length){var b,c,d,e,f,g,h=gb.currentBlockNode(),i=!1,j=/[^\s\xA0\u2002\u2003\u2009]+/;ob=a.map(ob,function(k){return k&&k.parentNode?a.contains(h,k)?(b=k.previousSibling,c=k.nextSibling,f=b.nodeValue,null===f&&(f=b.innerText||""),b&&j.test(b.nodeValue.slice(-1))||c&&j.test((c.nodeValue||"")[0])?(d=k.parentNode,e=r.cloneSelected(),g=e.startContainer,f+=a(k).data("sceditor-emoticon"),g===c?i=f.length+e.startOffset:g===h&&h.childNodes[e.startOffset]===c?i=f.length:g===b&&(i=e.startOffset),c&&3===c.nodeType||(c=d.insertBefore(d.ownerDocument.createTextNode(""),c)),c.insertData(0,f),d.removeChild(b),d.removeChild(k),i!==!1&&(e.setStart(c,i),e.collapse(!0),r.selectRange(e)),null):k):k:null})}},gb.emoticons=function(b){return b||b===!1?(f.emoticonsEnabled=b,b?(k.keypress(db),gb.sourceMode()||(r.saveRange(),B(k[0]),ob=k.find("img[data-sceditor-emoticon]"),r.restoreRange())):(k.find("img[data-sceditor-emoticon]").replaceWith(function(){return a(this).data("sceditor-emoticon")}),ob=[],k.unbind("keypress",db)),this):f.emoticonsEnabled},gb.css=function(b){return z||(z=a('<style id="#inline" />').appendTo(l.find("head"))[0]),"string"!=typeof b?z.styleSheet?z.styleSheet.cssText:z.innerHTML:(z.styleSheet?z.styleSheet.cssText=b:z.innerHTML=b,this)},Q=function(a){var b=[],c={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|","[":"{","]":"}"},d={8:"backspace",9:"tab",13:"enter",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",91:"win",92:"win",93:"select",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scrolllock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},e={109:"-",110:"del",111:"/",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},f=a.which,g=d[f]||String.fromCharCode(f).toLowerCase();return a.ctrlKey&&b.push("ctrl"),a.altKey&&b.push("alt"),a.shiftKey&&(b.push("shift"),e[f]?g=e[f]:c[g]&&(g=c[g])),g&&(16>f||f>18)&&b.push(g),b=b.join("+"),nb[b]?nb[b].call(gb):void 0},gb.addShortcut=function(a,b){return a=a.toLowerCase(),nb[a]="string"==typeof b?function(){return C(h.find(".sceditor-button-"+b),gb.commands[b]),!1}:b,this},gb.removeShortcut=function(a){return delete nb[a.toLowerCase()],this},R=function(c){var d,e,g,h,i;if(!a.sceditor.ie&&!f.disableBlockRemove&&8===c.which&&(h=r.selectedRange())&&(b.getSelection?(d=h.startContainer,e=h.startOffset):(d=h.parentElement(),g=l[0].selection.createRange(),g.moveToElementText(d),g.setEndPoint("EndToStart",h),e=g.text.length),0===e&&(i=fb()))){for(;d!==i;){for(;d.previousSibling;)if(d=d.previousSibling,3!==d.nodeType||d.nodeValue)return;if(!(d=d.parentNode))return}if(i&&!a(i).is("body"))return gb.clearBlockFormatting(i),!1}},fb=function(){for(var b=v;!a.sceditor.dom.hasStyling(b);)if(!(b=b.parentNode)||a(b).is("body"))return;return b},gb.clearBlockFormatting=function(b){return b=b||fb(),!b||a(b).is("body")?this:(r.saveRange(),p=null,b.className="",a(b).attr("style",""),a(b).is("p,div")||a.sceditor.dom.convertElement(b,"p"),r.restoreRange(),this)},A()},a.sceditor.ie=function(){var a,d=3,e=c.createElement("div"),f=e.getElementsByTagName("i");do e.innerHTML="<!--[if gt IE "+ ++d+"]><i></i><![endif]-->";while(f[0]);return c.documentMode&&c.all&&b.atob&&(d=10),4===d&&c.documentMode&&(d=11),d>4?d:a}(),a.sceditor.ios=/iPhone|iPod|iPad| wosbrowser\//i.test(navigator.userAgent),a.sceditor.isWysiwygSupported=function(){var b,c,d=a('<div contenteditable="true">')[0].contentEditable,e="undefined"!=typeof d&&"inherit"!==d,f=navigator.userAgent;return e?(c=/Opera Mobi|Opera Mini/i.test(f),/Android/i.test(f)&&(c=!0,/Safari/.test(f)&&(b=/Safari\/(\d+)/.exec(f),c=b&&b[1]?b[1]<534:!0)),/ Silk\//i.test(f)&&(b=/AppleWebKit\/(\d+)/.exec(f),c=b&&b[1]?b[1]<534:!0),a.sceditor.ios&&(c=!/OS [5-9](_\d)+ like Mac OS X/i.test(f)),/fennec/i.test(f)&&(c=!1),/OneBrowser/i.test(f)&&(c=!1),"UCWEB"===navigator.vendor&&(c=!1),!c):!1}(),a.sceditor.regexEscape=function(a){return a.replace(/[\$\?\[\]\.\*\(\)\|\\]/g,"\\$&")},a.sceditor.escapeEntities=function(a){return a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ {2}/g," ").replace(/\r\n|\r/g,"\n").replace(/\n/g,"<br />"):a},a.sceditor.locale={},a.sceditor.commands={bold:{exec:"bold",tooltip:"Bold",shortcut:"ctrl+b"},italic:{exec:"italic",tooltip:"Italic",shortcut:"ctrl+i"},underline:{exec:"underline",tooltip:"Underline",shortcut:"ctrl+u"},strike:{exec:"strikethrough",tooltip:"Strikethrough"},subscript:{exec:"subscript",tooltip:"Subscript"},superscript:{exec:"superscript",tooltip:"Superscript"},left:{exec:"justifyleft",tooltip:"Align left"},center:{exec:"justifycenter",tooltip:"Center"},right:{exec:"justifyright",tooltip:"Align right"},justify:{exec:"justifyfull",tooltip:"Justify"},font:{_dropDown:function(b,c,d){for(var f=b.opts.fonts.split(","),g=a("<div />"),h=function(){return d(a(this).data("font")),b.closeDropDown(!0),!1},i=0;i<f.length;i++)g.append(e("fontOpt",{font:f[i]},!0).click(h));b.createDropDown(c,"font-picker",g)},exec:function(b){var c=this;a.sceditor.command.get("font")._dropDown(c,b,function(a){c.execCommand("fontname",a)})},tooltip:"Font Name"},size:{_dropDown:function(b,c,d){for(var f=a("<div />"),g=function(c){d(a(this).data("size")),b.closeDropDown(!0),c.preventDefault()},h=1;7>=h;h++)f.append(e("sizeOpt",{size:h},!0).click(g));b.createDropDown(c,"fontsize-picker",f)},exec:function(b){var c=this;a.sceditor.command.get("size")._dropDown(c,b,function(a){c.execCommand("fontsize",a)})},tooltip:"Font Size"},color:{_dropDown:function(b,c,d){var e,f,g,h,i={r:255,g:255,b:255},j=a("<div />"),k=b.opts.colors?b.opts.colors.split("|"):new Array(21),l=[],m=a.sceditor.command.get("color");if(!m._htmlCache){for(e=0;e<k.length;++e){for(h=k[e]?k[e].split(","):new Array(21),l.push('<div class="sceditor-color-column">'),f=0;f<h.length;++f)g=h[f]||"#"+i.r.toString(16)+i.g.toString(16)+i.b.toString(16),l.push('<a href="#" class="sceditor-color-option" style="background-color: '+g+'" data-color="'+g+'"></a>'),0===f%5?(i.g-=51,i.b=255):i.b-=51;l.push("</div>"),0===e%5?(i.r-=51,i.g=255,i.b=255):(i.g=255,i.b=255)}m._htmlCache=l.join("")}j.append(m._htmlCache).find("a").click(function(c){d(a(this).attr("data-color")),b.closeDropDown(!0),c.preventDefault()}),b.createDropDown(c,"color-picker",j)},exec:function(b){var c=this;a.sceditor.command.get("color")._dropDown(c,b,function(a){c.execCommand("forecolor",a)})},tooltip:"Font Color"},removeformat:{exec:"removeformat",tooltip:"Remove Formatting"},cut:{exec:"cut",tooltip:"Cut",errorMessage:"Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X"},copy:{exec:"copy",tooltip:"Copy",errorMessage:"Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C"},paste:{exec:"paste",tooltip:"Paste",errorMessage:"Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V"},pastetext:{exec:function(a){var b,c=this,d=e("pastetext",{label:c._("Paste your text inside the following box:"),insert:c._("Insert")},!0);d.find(".button").click(function(a){b=d.find("#txt").val(),b&&c.wysiwygEditorInsertText(b),c.closeDropDown(!0),a.preventDefault()}),c.createDropDown(a,"pastetext",d)},tooltip:"Paste Text"},bulletlist:{exec:"insertunorderedlist",tooltip:"Bullet list"},orderedlist:{exec:"insertorderedlist",tooltip:"Numbered list"},table:{exec:function(b){var c=this,d=e("table",{rows:c._("Rows:"),cols:c._("Cols:"),insert:c._("Insert")},!0);d.find(".button").click(function(b){var e=d.find("#rows").val()-0,f=d.find("#cols").val()-0,g="<table>";if(!(1>e||1>f)){for(var h=0;e>h;h++){g+="<tr>";for(var i=0;f>i;i++)g+="<td>"+(a.sceditor.ie?"":"<br />")+"</td>";g+="</tr>"}g+="</table>",c.wysiwygEditorInsertHtml(g),c.closeDropDown(!0),b.preventDefault()}}),c.createDropDown(b,"inserttable",d)},tooltip:"Insert a table"},horizontalrule:{exec:"inserthorizontalrule",tooltip:"Insert a horizontal rule"},code:{forceNewLineAfter:["code"],exec:function(){this.wysiwygEditorInsertHtml("<code>","<br /></code>")},tooltip:"Code"},image:{exec:function(a){var b=this,c=e("image",{url:b._("URL:"),width:b._("Width (optional):"),height:b._("Height (optional):"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#image").val(),e=c.find("#width").val(),f=c.find("#height").val(),g="";e&&(g+=' width="'+e+'"'),f&&(g+=' height="'+f+'"'),d&&"http://"!==d&&b.wysiwygEditorInsertHtml("<img"+g+' src="'+d+'" />'),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertimage",c)},tooltip:"Insert an image"},email:{exec:function(a){var b=this,c=e("email",{label:b._("E-mail:"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#email").val();d&&(b.focus(),b.getRangeHelper().selectedHtml()?b.execCommand("createlink","mailto:"+d):b.wysiwygEditorInsertHtml('<a href="mailto:'+d+'">'+d+"</a>")),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertemail",c)},tooltip:"Insert an email"},link:{exec:function(a){var b=this,c=e("link",{url:b._("URL:"),desc:b._("Description (optional):"),ins:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#link").val(),e=c.find("#des").val();d&&"http://"!==d&&(b.focus(),!b.getRangeHelper().selectedHtml()||e?(e||(e=d),b.wysiwygEditorInsertHtml('<a href="'+d+'">'+e+"</a>")):b.execCommand("createlink",d)),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertlink",c)},tooltip:"Insert a link"},unlink:{state:function(){var b=a(this.currentNode());return b.is("a")||b.parents("a").length>0?0:-1},exec:function(){var b=a(this.currentNode()),c=b.is("a")?b:b.parents("a").first();
18c.length&&c.replaceWith(c.contents())},tooltip:"Unlink"},quote:{forceNewLineAfter:["blockquote"],exec:function(b,c,d){var e="<blockquote>",f="</blockquote>";c?(d=d?"<cite>"+d+"</cite>":"",e=e+d+c+f,f=null):""===this.getRangeHelper().selectedHtml()&&(f=a.sceditor.ie?"":"<br />"+f),this.wysiwygEditorInsertHtml(e,f)},tooltip:"Insert a Quote"},emoticon:{exec:function(b){var c=this,d=function(e){var f=c.opts.emoticonsCompat,g=c.getRangeHelper(),h=f&&" "!==g.getOuterText(!0,1)?" ":"",i=f&&" "!==g.getOuterText(!1,1)?" ":"",j=a("<div />"),k=a("<div />").appendTo(j),l=a.extend({},c.opts.emoticons.dropdown,e?c.opts.emoticons.more:{}),m=0;return a.each(l,function(){m++}),m=Math.sqrt(m),a.each(l,function(b,d){k.append(a("<img />").attr({src:d.url||d,alt:b,title:d.tooltip||b}).click(function(){return c.insert(h+a(this).attr("alt")+i,null,!1).closeDropDown(!0),!1})),k.children().length>=m&&(k=a("<div />").appendTo(j))}),e||j.append(a(c._('<a class="sceditor-more">{0}</a>',c._("More"))).click(function(){return c.createDropDown(b,"more-emoticons",d(!0)),!1})),j};c.createDropDown(b,"emoticons",d(!1))},txtExec:function(b){a.sceditor.command.get("emoticon").exec.call(this,b)},tooltip:"Insert an emoticon"},youtube:{_dropDown:function(a,b,c){var d,f=e("youtubeMenu",{label:a._("Video URL:"),insert:a._("Insert")},!0);f.find(".button").click(function(b){var e=f.find("#link").val().replace("http://","");""!==e&&(d=e.match(/(?:v=|v\/|embed\/|youtu.be\/)(.{11})/),d&&(e=d[1]),/^[a-zA-Z0-9_\-]{11}$/.test(e)?c(e):alert("Invalid YouTube video")),a.closeDropDown(!0),b.preventDefault()}),a.createDropDown(b,"insertlink",f)},exec:function(b){var c=this;a.sceditor.command.get("youtube")._dropDown(c,b,function(a){c.wysiwygEditorInsertHtml(e("youtube",{id:a}))})},tooltip:"Insert a YouTube video"},date:{_date:function(a){var b=new Date,c=b.getYear(),d=b.getMonth()+1,e=b.getDate();return 2e3>c&&(c=1900+c),10>d&&(d="0"+d),10>e&&(e="0"+e),a.opts.dateFormat.replace(/year/i,c).replace(/month/i,d).replace(/day/i,e)},exec:function(){this.insertText(a.sceditor.command.get("date")._date(this))},txtExec:function(){this.insertText(a.sceditor.command.get("date")._date(this))},tooltip:"Insert current date"},time:{_time:function(){var a=new Date,b=a.getHours(),c=a.getMinutes(),d=a.getSeconds();return 10>b&&(b="0"+b),10>c&&(c="0"+c),10>d&&(d="0"+d),b+":"+c+":"+d},exec:function(){this.insertText(a.sceditor.command.get("time")._time())},txtExec:function(){this.insertText(a.sceditor.command.get("time")._time())},tooltip:"Insert current time"},ltr:{state:function(a,b){return b&&"ltr"===b.style.direction},exec:function(){var b=this,c=b.getRangeHelper().getFirstBlockParent(),d=a(c);b.focus(),(c&&!d.is("body")||(b.execCommand("formatBlock","p"),c=b.getRangeHelper().getFirstBlockParent(),d=a(c),c&&!d.is("body")))&&("ltr"===d.css("direction")?d.css("direction",""):d.css("direction","ltr"))},tooltip:"Left-to-Right"},rtl:{state:function(a,b){return b&&"rtl"===b.style.direction},exec:function(){var b=this,c=b.getRangeHelper().getFirstBlockParent(),d=a(c);b.focus(),(c&&!d.is("body")||(b.execCommand("formatBlock","p"),c=b.getRangeHelper().getFirstBlockParent(),d=a(c),c&&!d.is("body")))&&("rtl"===d.css("direction")?d.css("direction",""):d.css("direction","rtl"))},tooltip:"Right-to-Left"},print:{exec:"print",tooltip:"Print"},maximize:{state:function(){return this.maximize()},exec:function(){this.maximize(!this.maximize())},txtExec:function(){this.maximize(!this.maximize())},tooltip:"Maximize",shortcut:"ctrl+shift+m"},source:{exec:function(){this.toggleSourceMode()},txtExec:function(){this.toggleSourceMode()},tooltip:"View source",shortcut:"ctrl+shift+s"},ignore:{}},a.sceditor.rangeHelper=function(b,c){var d,e,f,g,h,i=!0,j="sceditor-start-marker",k="sceditor-end-marker",l="character",m=this;f=function(a,b){e=b||a.contentDocument||a.document,d=a,i=!!a.getSelection}(b,c),m.insertHTML=function(a,b){var c,d,f=m.selectedRange();if(b&&(a+=m.selectedHtml()+b),i){for(d=e.createElement("div"),c=e.createDocumentFragment(),d.innerHTML=a;d.firstChild;)c.appendChild(d.firstChild);m.insertNode(c)}else{if(!f)return!1;f.pasteHTML(a)}},m.insertNode=function(a,b){if(i){var c,d,f=e.createDocumentFragment(),g=m.selectedRange();if(!g)return!1;if(f.appendChild(a),b&&(f.appendChild(g.extractContents()),f.appendChild(b)),d=f.lastChild,!d)return;g.deleteContents(),g.insertNode(f),c=e.createRange(),c.setStartAfter(d),m.selectRange(c)}else m.insertHTML(a.outerHTML,b?b.outerHTML:null)},m.cloneSelected=function(){var a=m.selectedRange();return a?i?a.cloneRange():a.duplicate():void 0},m.selectedRange=function(){var a,b,c=i?d.getSelection():e.selection;if(c){if(c.getRangeAt&&c.rangeCount<=0){for(b=e.body;b.firstChild;)b=b.firstChild;a=e.createRange(),a.setStart(b,0),c.addRange(a)}return i&&(a=c.getRangeAt(0)),i||"Control"===c.type||(a=c.createRange()),h(a)?a:null}},h=function(a){var b;return a&&a.parentElement&&(b=a.parentElement())?b.ownerDocument===e:!0},m.hasSelection=function(){var a,b=i?d.getSelection():e.selection;return i||!b?b&&b.rangeCount>0:(a=b.createRange(),a&&h(a))},m.selectedHtml=function(){var a,b=m.selectedRange();return b?!i&&""!==b.text&&b.htmlText?b.htmlText:i?(a=e.createElement("div"),a.appendChild(b.cloneContents()),a.innerHTML):"":""},m.parentNode=function(){var a=m.selectedRange();return a?a.parentElement?a.parentElement():a.commonAncestorContainer:void 0},m.getFirstBlockParent=function(b){var c=function(b){return a.sceditor.dom.isInline(b,!0)?(b=b?b.parentNode:null,b?c(b):null):b};return c(b||m.parentNode())},m.insertNodeAt=function(a,b){var c=m.selectedRange(),d=m.cloneSelected();return d?(d.collapse(a),d.insertNode?d.insertNode(b):d.pasteHTML(b.outerHTML),m.selectRange(c),void 0):!1},g=function(a){m.removeMarker(a);var b=e.createElement("span");return b.id=a,b.style.lineHeight="0",b.style.display="none",b.className="sceditor-selection sceditor-ignore",b.innerHTML=" ",b},m.insertMarkers=function(){m.insertNodeAt(!0,g(j)),m.insertNodeAt(!1,g(k))},m.getMarker=function(a){return e.getElementById(a)},m.removeMarker=function(a){var b=m.getMarker(a);b&&b.parentNode.removeChild(b)},m.removeMarkers=function(){m.removeMarker(j),m.removeMarker(k)},m.saveRange=function(){m.insertMarkers()},m.selectRange=function(a){i?(d.getSelection().removeAllRanges(),d.getSelection().addRange(a)):a.select()},m.restoreRange=function(){var a,b=m.selectedRange(),c=m.getMarker(j),d=m.getMarker(k);return c&&d&&b?(i?(b=e.createRange(),b.setStartBefore(c),b.setEndAfter(d),m.selectRange(b)):(b=e.body.createTextRange(),a=e.body.createTextRange(),a.moveToElementText(c),b.setEndPoint("StartToStart",a),b.moveStart(l,0),a.moveToElementText(d),b.setEndPoint("EndToStart",a),b.moveEnd(l,0),m.selectRange(b)),m.removeMarkers(),void 0):!1},m.selectOuterText=function(a,b){var c=m.cloneSelected();return c?(c.collapse(!1),i?(c.setStart(c.startContainer,c.startOffset-a),c.setEnd(c.endContainer,c.endOffset+b)):(c.moveStart(l,0-a),c.moveEnd(l,b)),m.selectRange(c),void 0):!1},m.getOuterText=function(a,b){var c="",d=m.cloneSelected();return d?(d.collapse(!1),a?i?(c=d.startContainer.textContent.substr(0,d.startOffset),c=c.substr(Math.max(0,c.length-b))):(d.moveStart(l,0-b),c=d.text):i?c=d.startContainer.textContent.substr(d.startOffset,b):(d.moveEnd(l,b),c=d.text),c):""},m.raplaceKeyword=function(b,c,d,e,f,g){d||b.sort(function(a,b){return a.length-b.length});var h,j,k,l,n,o,p,q=b.length,r=e||b[q-1][0].length;if(f){if(!i)return!1;++r}for(h=m.getOuterText(!0,r),j=h+(null!=g?g:""),c&&(j+=m.getOuterText(!1,r));q--;)if(p=b[q][0],n=new RegExp("(?:[\\s    ])"+a.sceditor.regexEscape(p)+"(?=[\\s    ])"),o=h.length-1-p.length,f&&--o,o=Math.max(0,o),(k=f?j.substr(o).search(n):j.indexOf(p,o))>-1){if(f&&(k+=o+1),k>h.length||k+p.length+(f?1:0)<h.length)continue;return l=h.length-k,m.selectOuterText(l,p.length-l-(null!=g&&/^\S/.test(g)?1:0)),m.insertHTML(b[q][1]),!0}return!1},m.compare=function(a,b){return b||(b=m.selectedRange()),a&&b?i?0===a.compareBoundaryPoints(Range.END_TO_END,b)&&0===a.compareBoundaryPoints(Range.START_TO_START,b):h(a)&&h(b)&&0===a.compareEndPoints("EndToEnd",b)&&0===a.compareEndPoints("StartToStart",b):!a&&!b}},a.sceditor.dom={traverse:function(a,b,c,d,e){if(a)for(a=e?a.lastChild:a.firstChild;null!=a;){var f=e?a.previousSibling:a.nextSibling;if(!c&&b(a)===!1)return!1;if(!d&&this.traverse(a,b,c,d,e)===!1)return!1;if(c&&b(a)===!1)return!1;a=f}},rTraverse:function(a,b,c,d){this.traverse(a,b,c,d,!0)},parseHTML:function(b,d){var e=[],f=(d||c).createElement("div");return f.innerHTML=b,a.merge(e,f.childNodes),e},hasStyling:function(b){var c=a(b);return b&&(!c.is("p,div")||b.className||c.attr("style")||!a.isEmptyObject(c.data()))},convertElement:function(b,c){for(var d,e,f=b.attributes.length,g=b.ownerDocument.createElement(c);f--;)e=b.attributes[f],(!a.sceditor.ie||e.specified)&&(a.sceditor.ie<8&&/style/i.test(e.name)?b.style.cssText=b.style.cssText:g.setAttribute(e.name,e.value));for(;d=b.firstChild;)g.appendChild(d);return b.parentNode.replaceChild(g,b),g},blockLevelList:"|body|hr|p|div|h1|h2|h3|h4|h5|h6|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|blockquote|center|",isInline:function(b,c){return b&&1===b.nodeType?(b=b.tagName.toLowerCase(),"code"===b?!c:a.sceditor.dom.blockLevelList.indexOf("|"+b+"|")<0):!0},copyCSS:function(a,b){b.style.cssText=a.style.cssText+b.style.cssText},fixNesting:function(a){var b=this,c=function(a){for(;b.isInline(a.parentNode,!0);)a=a.parentNode;return a};b.traverse(a,function(a){if(1===a.nodeType&&!b.isInline(a,!0)&&b.isInline(a.parentNode,!0)){var d=c(a),e=d.parentNode,f=b.extractContents(d,a),g=a;b.copyCSS(d,g),e.insertBefore(f,d),e.insertBefore(g,d)}})},findCommonAncestor:function(b,c){return a(b).parents().has(a(c)).first()},getSibling:function(b,c){var d;return b?(d=b[c?"previousSibling":"nextSibling"])?d:a.sceditor.dom.getSibling(b.parentNode,c):null},removeWhiteSpace:function(b,c){for(var d,e,f,g,h,i,j,k,l=a.sceditor.dom.getSibling,m=a.sceditor.dom.isInline,n=b.firstChild,o=/[\t ]+/g,p=/[\t\n\r ]+/g;n;){if(i=n.nextSibling,d=n.nodeValue,e=n.nodeType,1===e&&n.firstChild&&(h=a(n).css("whiteSpace"),/pre(?:\-wrap)?$/i.test(h)||a.sceditor.dom.removeWhiteSpace(n,/line$/i.test(h))),3===e&&d){for(f=l(n),g=l(n,!0),k=g,j=!1;a(k).hasClass("sceditor-ignore");)k=l(k,!0);if(m(n)&&k){for(;k.lastChild;)k=k.lastChild;j=3===k.nodeType?/[\t\n\r ]$/.test(k.nodeValue):!m(k)}m(n)&&g&&m(g)&&!j||(d=d.replace(/^[\t\n\r ]+/,"")),m(n)&&f&&m(f)||(d=d.replace(/[\t\n\r ]+$/,"")),d.length?n.nodeValue=d.replace(c?o:p," "):b.removeChild(n)}n=i}},extractContents:function(a,b){var c=this,d=c.findCommonAncestor(a,b),e=d?d[0]:null,f=!1,g=!1;return function h(d){var e=a.ownerDocument.createDocumentFragment();return c.traverse(d,function(c){if(g||c===b&&f)return g=!0,!1;c===a&&(f=!0);var d,i;f?jQuery.contains(c,b)&&1===c.nodeType?(d=h(c),i=c.cloneNode(!1),i.appendChild(d),e.appendChild(i)):e.appendChild(c):jQuery.contains(c,a)&&1===c.nodeType&&(d=h(c),i=c.cloneNode(!1),i.appendChild(d),e.appendChild(i))},!1),e}(e)}},a.sceditor.plugins={},a.sceditor.PluginManager=function(b){var c=this,d=[],e=b,f=function(a){return"signal"+a.charAt(0).toUpperCase()+a.slice(1)},g=function(a,b){a=[].slice.call(a);for(var c=d.length,g=f(a.shift());c--;)if(g in d[c]){if(b)return d[c][g].apply(e,a);d[c][g].apply(e,a)}};c.call=function(){g(arguments,!1)},c.callOnlyFirst=function(){return g(arguments,!0)},c.iter=function(a){return a=f(a),function(){var b=d.length;return{callNext:function(c){for(;b--;)if(d[b]&&a in d[b])return d[b].apply(e,c)},hasNext:function(){for(var c=b;c--;)if(d[c]&&a in d[c])return!0;return!1}}}()},c.hasHandler=function(a){var b=d.length;for(a=f(a);b--;)if(a in d[b])return!0;return!1},c.exsists=function(b){return b in a.sceditor.plugins?(b=a.sceditor.plugins[b],"function"==typeof b&&"object"==typeof b.prototype):!1},c.isRegistered=function(b){var e=d.length;if(!c.exsists(b))return!1;for(;e--;)if(d[e]instanceof a.sceditor.plugins[b])return!0;return!1},c.register=function(b){return c.exsists(b)?(b=new a.sceditor.plugins[b],d.push(b),"init"in b&&b.init.apply(e),!0):!1},c.deregister=function(b){var f,g=d.length,h=!1;if(!c.isRegistered(b))return!1;for(;g--;)d[g]instanceof a.sceditor.plugins[b]&&(f=d.splice(g,1)[0],h=!0,"destroy"in f&&f.destroy.apply(e));return h},c.destroy=function(){for(var a=d.length;a--;)"destroy"in d[a]&&d[a].destroy.apply(e);d=null,e=null}},a.sceditor.command={get:function(b){return a.sceditor.commands[b]||null},set:function(b,c){return b&&c?(c=a.extend(a.sceditor.commands[b]||{},c),c.remove=function(){a.sceditor.command.remove(b)},a.sceditor.commands[b]=c,this):!1},remove:function(b){return a.sceditor.commands[b]&&delete a.sceditor.commands[b],this}},a.sceditor.defaultOptions={toolbar:"bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,paste,pastetext|bulletlist,orderedlist|table|code,quote|horizontalrule,image,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source",toolbarExclude:null,style:"jquery.sceditor.default.css",fonts:"Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana",colors:null,locale:"en",charset:"utf-8",emoticonsCompat:!1,emoticonsEnabled:!0,emoticonsRoot:"",emoticons:{dropdown:{":)":"emoticons/smile.png",":angel:":"emoticons/angel.png",":angry:":"emoticons/angry.png","8-)":"emoticons/cool.png",":'(":"emoticons/cwy.png",":ermm:":"emoticons/ermm.png",":D":"emoticons/grin.png","<3":"emoticons/heart.png",":(":"emoticons/sad.png",":O":"emoticons/shocked.png",":P":"emoticons/tongue.png",";)":"emoticons/wink.png"},more:{":alien:":"emoticons/alien.png",":blink:":"emoticons/blink.png",":blush:":"emoticons/blush.png",":cheerful:":"emoticons/cheerful.png",":devil:":"emoticons/devil.png",":dizzy:":"emoticons/dizzy.png",":getlost:":"emoticons/getlost.png",":happy:":"emoticons/happy.png",":kissing:":"emoticons/kissing.png",":ninja:":"emoticons/ninja.png",":pinch:":"emoticons/pinch.png",":pouty:":"emoticons/pouty.png",":sick:":"emoticons/sick.png",":sideways:":"emoticons/sideways.png",":silly:":"emoticons/silly.png",":sleeping:":"emoticons/sleeping.png",":unsure:":"emoticons/unsure.png",":woot:":"emoticons/w00t.png",":wassat:":"emoticons/wassat.png"},hidden:{":whistling:":"emoticons/whistling.png",":love:":"emoticons/wub.png"}},width:null,height:null,resizeEnabled:!0,resizeMinWidth:null,resizeMinHeight:null,resizeMaxHeight:null,resizeMaxWidth:null,resizeHeight:!0,resizeWidth:!0,getHtmlHandler:null,getTextHandler:null,dateFormat:"year-month-day",toolbarContainer:null,enablePasteFiltering:!1,disablePasting:!1,readOnly:!1,rtl:!1,autofocus:!1,autofocusEnd:!0,autoExpand:!1,autoUpdate:!1,spellcheck:!0,runWithoutWysiwygSupport:!1,id:null,plugins:"",zIndex:null,bbcodeTrim:!1,disableBlockRemove:!1,parserOptions:{},dropDownCss:{}},a.fn.sceditor=function(b){var c,d=[];return b=b||{},b.runWithoutWysiwygSupport||a.sceditor.isWysiwygSupported?(this.each(function(){c=this.jquery?this:a(this),c.parents(".sceditor-container").length>0||("state"===b?d.push(!!c.data("sceditor")):"instance"===b?d.push(c.data("sceditor")):c.data("sceditor")||new a.sceditor(this,b))}),d.length?1===d.length?d[0]:a(d):this):void 0}}(jQuery,window,document),function(a){"use strict";a.sceditor.XHTMLSerializer=function(){var b,c,d,e,f,g,h,i,j,k,l=this,m={indentStr:" "},n=[],o=0;b=function(a){var b={"&":"&","<":"<",">":">",'"':"""};return a?a.replace(/[&<>"]/g,function(a){return b[a]||a}):""},c=function(a){return a.replace(/[\r\n]/,"").replace(/[^\S|\u00A0]+/g," ")},l.serialize=function(a,b){if(n=[],b)for(a=a.firstChild;a;)d(a),a=a.nextSibling;else d(a);return n.join("")},d=function(a,b){switch(a.nodeType){case 1:var c=a.nodeName.toLowerCase();"!"===c?h(a):f(a,b);break;case 3:i(a,b);break;case 4:g(a);break;case 8:h(a);break;case 9:case 11:e(a);break;case 2:case 5:case 6:case 7:case 10:case 12:}},e=function(a){var b;for(b=a.firstChild;b;)d(b),b=b.nextSibling},f=function(c,e){var f,g,h,i=c.nodeName.toLowerCase(),l=c.attributes.length,m=e||/pre(?:\-wrap)?$/i.test(a(c).css("whiteSpace")),n=!c.firstChild&&a.sceditor.XHTMLSerializer.emptyTags.indexOf("|"+i+"|")>-1;if(!a(c).hasClass("sceditor-ignore")){for(j("<"+i,!e&&k(c));l--;)g=c.attributes[l],(!a.sceditor.ie||g.specified)&&(h=a.sceditor.ie<8&&/style/i.test(g.name)?c.style.cssText:g.value,j(" "+g.name.toLowerCase()+'="'+b(h)+'"',!1));for(j(n?" />":">",!1),f=c.firstChild;f;)o++,d(f,m),f=f.nextSibling,o--;n||j("</"+i+">",!m&&k(c)&&c.firstChild&&k(c.firstChild))}},g=function(a){j("<![CDATA["+b(a.nodeValue)+"]]>")},h=function(a){j("<!-- "+b(a.nodeValue)+" -->")},i=function(a,d){var e=a.nodeValue;d||(e=c(e)),e&&j(b(e),!d&&k(a))},j=function(a,b){var c=o;if(b!==!1)for(n.length&&n.push("\n");c--;)n.push(m.indentStr);n.push(a)},k=function(b){var c=b.previousSibling;return 1!==b.nodeType&&c?!a.sceditor.dom.isInline(c):c||a.sceditor.dom.isInline(b.parentNode)?!a.sceditor.dom.isInline(b):!0}},a.sceditor.XHTMLSerializer.emptyTags="|area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param|command|embed|keygen|source|track|wbr|",a.sceditor.plugins.xhtml=function(){var b,c,d,e,f,g,h,i=this,j={},k={};i.init=function(){a.isEmptyObject(a.sceditor.plugins.xhtml.converters||{})||a.each(a.sceditor.plugins.xhtml.converters,function(b,c){a.each(c.tags,function(a){j[a]||(j[a]=[]),j[a].push(c)})}),b(this)},b=function(b){var c={bold:{txtExec:["<strong>","</strong>"]},italic:{txtExec:["<em>","</em>"]},underline:{txtExec:['<span style="text-decoration: underline;">',"<span>"]},strike:{txtExec:['<span style="text-decoration: line-through;">',"<span>"]},subscript:{txtExec:["<sub>","</sub>"]},superscript:{txtExec:["<sup>","</sup>"]},left:{txtExec:['<div style="text-align: left;">',"<div>"]},center:{txtExec:['<div style="text-align: center;">',"<div>"]},right:{txtExec:['<div style="text-align: right;">',"<div>"]},justify:{txtExec:['<div style="text-align: justify;">',"<div>"]},font:{txtExec:function(b){var c=this;a.sceditor.command.get("font")._dropDown(c,b,function(a){c.insertText('<span style="font-family: '+a+';">',"</span>")})}},size:{txtExec:function(b){var c=this;a.sceditor.command.get("size")._dropDown(c,b,function(a){c.insertText('<span style="font-size: '+a+';">',"</span>")})}},color:{txtExec:function(b){var c=this;a.sceditor.command.get("color")._dropDown(c,b,function(a){c.insertText('<span style="color: '+a+';">',"</span>")})}},bulletlist:{txtExec:["<ul><li>","</li></ul>"]},orderedlist:{txtExec:["<ol><li>","</li></ol>"]},table:{txtExec:["<table><tr><td>","</td></tr></table>"]},horizontalrule:{txtExec:["<hr />"]},code:{txtExec:["<code>","</code>"]},image:{txtExec:function(a,b){var c=prompt(this._("Enter the image URL:"),b);c&&this.insertText('<img src="'+c+'" />')}},email:{txtExec:function(a,b){var c=b&&b.indexOf("@")>-1?null:b,d=prompt(this._("Enter the e-mail address:"),c?"":b),e=prompt(this._("Enter the displayed text:"),c||d)||d;d&&this.insertText('<a href="mailto:'+d+'">'+e+"</a>")}},link:{txtExec:function(a,b){var c=b&&b.indexOf("http://")>-1?null:b,d=prompt(this._("Enter URL:"),c?"http://":b),e=prompt(this._("Enter the displayed text:"),c||d)||d;d&&this.insertText('<a href="'+d+'">'+e+"</a>")}},quote:{txtExec:["<blockquote>","</blockquote>"]},youtube:{txtExec:function(b){var c=this;a.sceditor.command.get("youtube")._dropDown(c,b,function(a){c.insertText('<iframe width="560" height="315" src="http://www.youtube.com/embed/{id}?wmode=opaque" data-youtube-id="'+a+'" frameborder="0" allowfullscreen></iframe>')})}},rtl:{txtExec:['<div stlye="direction: rtl;">',"</div>"]},ltr:{txtExec:['<div stlye="direction: ltr;">',"</div>"]}};b.commands=a.extend(!0,{},c,b.commands)},i.signalToSource=function(b,d){return d=d.jquery?d[0]:d,c(d),f(d),h(d),(new a.sceditor.XHTMLSerializer).serialize(d,!0)},i.signalToWysiwyg=function(a){return a},i.convertTagTo=a.sceditor.dom.convertElement,d=function(b,c,d){j[b]&&a.each(j[b],function(e,f){f.tags[b]?a.each(f.tags[b],function(b,e){d.getAttributeNode&&(b=d.getAttributeNode(b),!b||a.sceditor.ie<8&&!b.specified||e&&a.inArray(b.value,e)<0||f.conv.call(i,d,c))}):f.conv&&f.conv.call(i,d,c)})},c=function(b){j&&a.sceditor.dom.traverse(b,function(b){var c=a(b),e=b.nodeName.toLowerCase();j&&(d("*",c,b),d(e,c,b))},!0)},e=function(b,c){var d=b.childNodes,f=b.nodeName.toLowerCase(),g=b.nodeValue,h=d.length;if(c&&"br"===f)return!0;if(a.sceditor.XHTMLSerializer.emptyTags.indexOf("|"+f+"|")>-1)return!1;if(g&&/\S|\u00A0/.test(g))return!1;for(;h--;)if(!e(d[h],!b.previousSibling&&!b.nextSibling))return!1;return!0},f=function(b){a.sceditor.dom.traverse(b,function(b){var c,d=e(b),f=b.nodeName.toLowerCase(),g=b.parentNode,h=b.nodeType,i=a.sceditor.plugins.xhtml.allowedTags,j=a.sceditor.plugins.xhtml.disallowedTags;if(3!==h&&(4===h?f="!cdata":("!"===f||8===h)&&(f="!comment"),d?c=!0:i&&i.length?c=a.inArray(f,i)<0:j&&j.length&&(c=a.inArray(f,j)>-1),c)){for(;!d&&b.lastChild;)g.insertBefore(b.lastChild,b.nextSibling);g.removeChild(b)}},!0)},g=function(b,c){var d={};return b&&a.extend(d,b),c?(a.each(c,function(b,c){a.isArray(c)?d[b]=a.merge(d[b]||[],c):d[b]||(d[b]=null)}),d):d},h=function(b){var c,d,e,f,h,i,j=a.sceditor.plugins.xhtml.allowedAttribs,l=j&&!a.isEmptyObject(j),m=a.sceditor.plugins.xhtml.disallowedAttribs,n=m&&!a.isEmptyObject(m);k={},a.sceditor.dom.traverse(b,function(b){if(b.attributes&&(c=b.nodeName.toLowerCase(),f=b.attributes.length))for(k[c]||(k[c]=l?g(j["*"],j[c]):g(m["*"],m[c]));f--;)d=b.attributes[f],e=d.name,h=k[c][e],i=!1,l?i=null!==h&&(!a.isArray(h)||a.inArray(d.value,h)<0):n&&(i=null===h||a.isArray(h)&&a.inArray(d.value,h)>-1),i&&b.removeAttribute(e)})}},a.sceditor.plugins.xhtml.converters=[{tags:{"*":{width:null}},conv:function(a,b){b.css("width",b.attr("width")).removeAttr("width")}},{tags:{"*":{height:null}},conv:function(a,b){b.css("height",b.attr("height")).removeAttr("height")}},{tags:{li:{value:null}},conv:function(a,b){b.removeAttr("value")}},{tags:{"*":{text:null}},conv:function(a,b){b.css("color",b.attr("text")).removeAttr("text")}},{tags:{"*":{color:null}},conv:function(a,b){b.css("color",b.attr("color")).removeAttr("color")}},{tags:{"*":{face:null}},conv:function(a,b){b.css("fontFamily",b.attr("face")).removeAttr("face")}},{tags:{"*":{align:null}},conv:function(a,b){b.css("textAlign",b.attr("align")).removeAttr("align")}},{tags:{"*":{border:null}},conv:function(a,b){b.css("borderWidth",b.attr("border")).removeAttr("border")}},{tags:{applet:{name:null},img:{name:null},layer:{name:null},map:{name:null},object:{name:null},param:{name:null}},conv:function(a,b){b.attr("id")||b.attr("id",b.attr("name")),b.removeAttr("name")}},{tags:{"*":{vspace:null}},conv:function(a,b){b.css("marginTop",b.attr("vspace")-0).css("marginBottom",b.attr("vspace")-0).removeAttr("vspace")}},{tags:{"*":{hspace:null}},conv:function(a,b){b.css("marginLeft",b.attr("hspace")-0).css("marginRight",b.attr("hspace")-0).removeAttr("hspace")}},{tags:{hr:{noshade:null}},conv:function(a,b){b.css("borderStyle","solid").removeAttr("noshade")}},{tags:{"*":{nowrap:null}},conv:function(a,b){b.css("white-space","nowrap").removeAttr("nowrap")}},{tags:{big:null},conv:function(b){a(this.convertTagTo(b,"span")).css("fontSize","larger")}},{tags:{small:null},conv:function(b){a(this.convertTagTo(b,"span")).css("fontSize","smaller")}},{tags:{b:null},conv:function(b){a(this.convertTagTo(b,"strong"))}},{tags:{u:null},conv:function(b){a(this.convertTagTo(b,"span")).css("textDecoration","underline")}},{tags:{i:null},conv:function(b){a(this.convertTagTo(b,"em"))}},{tags:{s:null,strike:null},conv:function(b){a(this.convertTagTo(b,"span")).css("textDecoration","line-through")}},{tags:{dir:null},conv:function(a){this.convertTagTo(a,"ul")}},{tags:{center:null},conv:function(b){a(this.convertTagTo(b,"div")).css("textAlign","center")}},{tags:{font:{size:null}},conv:function(a,b){b.css("fontSize",b.css("fontSize")).removeAttr("size")}},{tags:{font:null},conv:function(a){this.convertTagTo(a,"span")}},{tags:{"*":{type:["_moz"]}},conv:function(a,b){b.removeAttr("type")}},{tags:{"*":{_moz_dirty:null}},conv:function(a,b){b.removeAttr("_moz_dirty")}},{tags:{"*":{_moz_editor_bogus_node:null}},conv:function(a,b){b.remove()}}],a.sceditor.plugins.xhtml.allowedAttribs={},a.sceditor.plugins.xhtml.disallowedAttribs={},a.sceditor.plugins.xhtml.allowedTags=[],a.sceditor.plugins.xhtml.disallowedTags=[]}(jQuery);
19----
20jQuery( document ).ready(function() {
21 jQuery.sceditor.plugins.bbcode.bbcode
22 .set("list", {
23 html: function(element, attrs, content) {
24 var type = (attrs.defaultattr === '1' ? 'ol' : 'ul');
25
26 return '<' + type + '>' + content + '</' + type + '>';
27 },
28 breakAfter: false
29 })
30 .set("ul", { format: function($elm, content) { return '[list]' + content +'[/list]'; }})
31 .set("ol", { format: function($elm, content) { return '[list=1]' + content +'[/list]'; }})
32 .set("li", { format: function($elm, content) { return '[*]' + content; }})
33 .set("*", { excludeClosing: true, isInline: false });
34
35 jQuery.sceditor.command
36 .set("bulletlist", { txtExec: ["[list]\n[*]", "\n[/list]"] })
37 .set("orderedlist", { txtExec: ["[list=1]\n[*]", "\n[/list]"] });
38
39 jQuery(".scedit_bbcode").sceditor({
40 plugins: "bbcode",
41 style: "sceditor/Air_sceditor.css",
42 toolbar: "bold,italic,underline,strike|bulletlist,orderedlist|left,center,right,horizontalrule|color,font,size,removeformat|emoticon|link,email,image,quote|date,time|code|source",
43 emoticonsEnabled: true,
44 emoticons: {
45 dropdown: {
46 ':)': 'img/smilies/smile.png',
47 ':(': 'img/smilies/sad.png',
48 ':D': 'img/smilies/big_smile.png',
49 ':o': 'img/smilies/yikes.png',
50 ':p': 'img/smilies/tongue.png',
51 ':/': 'img/smilies/hmm.png',
52 ':|': 'img/smilies/neutral.png',
53 ':cool:': 'img/smilies/cool.png',
54 ':lol:': 'img/smilies/lol.png',
55 ':mad:': 'img/smilies/mad.png',
56 ':rolleyes:': 'img/smilies/roll.png',
57 ';)': 'img/smilies/wink.png'
58 },
59 hidden: {
60 '=)': 'img/smilies/smile.png',
61 '=(': 'img/smilies/sad.png',
62 '=D': 'img/smilies/big_smile.png',
63 ':O': 'img/smilies/yikes.png',
64 ':P': 'img/smilies/tongue.png',
65 '=|': 'img/smilies/neutral.png',
66 }
67 },
68 });
69
70 jQuery(".scedit_html").sceditor({
71 plugins: "xhtml",
72 style: "minified/jquery.sceditor.default.min.css",
73 emoticonsEnabled: true,
74 emoticons: {
75 dropdown: {
76 ':)': 'img/smilies/smile.png',
77 ':(': 'img/smilies/sad.png',
78 ':D': 'img/smilies/big_smile.png',
79 ':o': 'img/smilies/yikes.png',
80 ':p': 'img/smilies/tongue.png',
81 ':/': 'img/smilies/hmm.png',
82 ':|': 'img/smilies/neutral.png',
83 ':cool:': 'img/smilies/cool.png',
84 ':lol:': 'img/smilies/lol.png',
85 ':mad:': 'img/smilies/mad.png',
86 ':rolleyes:': 'img/smilies/roll.png',
87 ';)': 'img/smilies/wink.png'
88 },
89 hidden: {
90 '=)': 'img/smilies/smile.png',
91 '=(': 'img/smilies/sad.png',
92 '=D': 'img/smilies/big_smile.png',
93 ':O': 'img/smilies/yikes.png',
94 ':P': 'img/smilies/tongue.png',
95 '=|': 'img/smilies/neutral.png',
96 }
97 },
98 });
99
100});
101-----
102/*****************************************************************
1031. INITIAL SETTINGS
104*****************************************************************/
105
106/* Limited Reset
107----------------------------------------------------------------*/
108
109/*.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3,
110.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl,
111.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite {
112 margin: 0;
113 padding: 0;
114 border: 0;
115 }*/
116html, body, .pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, .pun h4, .pun h5, .pun pre, .pun blockquote,
117.pun ul, .pun ol, .pun li, .pun dl, .pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun legend .pun img,
118.pun abbr, .pun cite {
119 font-style: normal;
120 font-weight: normal;
121 margin: 0;
122 padding: 0;
123}
124
125.pun ul, .pun ol {
126 list-style: none
127 }
128
129
130/* Structural Settings
131----------------------------------------------------------------*/
132
133.pun .clearer, .pun .nosize {
134 height: 0;
135 width: 0;
136 line-height: 0;
137 font-size: 0;
138 overflow: hidden
139 }
140
141.pun .clearer, .pun .clearb {
142 clear: both
143 }
144
145.pun .nosize {
146 position: absolute;
147 left: -9999em;
148 text-indent: -9999em;
149 width: 0;
150 }
151
152* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox {
153 height: 1px
154 }
155
156.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox {
157 min-height: 1px
158 }
159
160.clearl {
161 clear: left;
162 }
163
164/* Hidden Elements
165----------------------------------------------------------------*/
166
167#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt,
168#modcontrols dt, #searchlinks dt, div.postright h3, span.closedtext,
169.pun .required strong span {
170 position: absolute;
171 display: block;
172 overflow: hidden;
173 width: 0;
174 left: -9999em;
175 text-indent: -9999em;
176 }
177
178/*****************************************************************
1792. TEXT & CONTENT
180*****************************************************************/
181
182/* Text Defaults
183----------------------------------------------------------------*/
184
185.pun {
186 font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif;
187 line-height: normal;
188 }
189
190.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun samp, .pun legend {
191 font-size: 10px;
192 font-family: verdana, helvetica, arial, sans-serif;
193 }
194
195.pun pre, .pun code {
196 font-size: 1.182em;
197 font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace
198 }
199
200.pun pre code {
201 font-size: 1em;
202 }
203
204.pun strong {
205 font-weight: bold;
206 }
207
208.pun em {
209 font-style: italic;
210 }
211
212.pun .forumdesc {
213 font-size: 10px;
214 color: #888;
215 }
216
217/* Content Defaults
218----------------------------------------------------------------*/
219
220.pun p, .pun ul, .pun ol, .pun dl {
221 font-size: 10px;
222 padding: 3px 0;
223 }
224
225.pun h2 {
226 font-size: 1em;
227 font-weight: normal;
228 padding: 4px 6px;
229 }
230
231.pun h3 {
232 font-size: 1.091em;
233 padding: 3px 0;
234 }
235
236.pun table p, .pun table h3 {
237 padding: 0;
238 }
239
240.pun span.warntext, .pun p.warntext {
241 font-weight: bold
242 }
243
244/* User Content (Announcements, Rules, Posts)
245----------------------------------------------------------------*/
246
247.pun .usercontent p, .pun .postmsg p {
248 padding: 0.75em 0
249 }
250
251.pun .usercontent ul, .pun .postmsg ul {
252 padding: 0.75em 1em 0.75em 2.5em;
253 list-style: disc
254 }
255
256.pun .usercontent ol, .pun .postmsg ol {
257 padding: 0.75em 1em 0.75em 2.5em;
258 list-style: decimal
259 }
260
261.pun .usercontent ol.alpha, .pun .postmsg ol.alpha {
262 list-style: lower-alpha
263 }
264
265.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul {
266 padding: 0.25em 1em 0.75em 2.5em
267 }
268
269.pun .usercontent li p, .pun .postmsg li p {
270 padding: 0
271 }
272
273.pun .usercontent h1 {
274 font-size: 1.4em;
275 font-weight: bold;
276 padding: 0.75em 0 0 0
277 }
278
279.pun .usercontent h2 {
280 font-size: 1.2em;
281 font-weight: bold;
282 padding: 0.75em 0 0 0
283 }
284
285.pun .usercontent h3 {
286 font-size: 1.1em;
287 font-weight: bold;
288 padding: 0.75em 0 0 0
289 }
290
291.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 {
292 font-size: 1em;
293 font-weight: bold;
294 padding: 0.75em 0 0 0
295 }
296
297.pun .quotebox cite {
298 font-weight: bold;
299 font-style: normal;
300 padding: 0.75em 0.75em 0 0.75em
301 }
302
303.pun span.bbu {
304 text-decoration: underline
305 }
306
307.pun span.bbs, .pun del {
308 text-decoration: line-through;
309 }
310
311.pun .postmsg ins, #punhelp samp ins {
312 text-decoration: none;
313 }
314
315.pun div.postmsg h5, #punhelp h5 {
316 font-size: 1.1em;
317 font-weight: bold;
318 padding: 0.75em 0 0 0;
319 }
320
321
322/*****************************************************************
3233. COMMON STYLES
324*****************************************************************/
325
326/* Page Layout
327----------------------------------------------------------------*/
328
329html, body {
330 margin: 0;
331 padding: 0
332 }
333
334.pun {
335 max-width: 1070px;
336 width: 95%;
337 margin: 0 auto;
338 padding: 12px 20px;
339 }
340
341#punredirect, #punmaint, #puninstall, #pundb_update {
342 margin: 50px 20% 12px 20%
343 }
344
345
346/* Vertical Element Spacing
347----------------------------------------------------------------*/
348
349#brdheader {
350 margin: 0 0 12px 0;
351 }
352
353#brdtitle p {
354 padding-top: 0px
355 }
356
357#announce, #brdstats {
358 margin: 12px 0 12px 0;
359 }
360
361.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview {
362 margin-bottom: 12px
363 }
364
365#punindex .blocktable, .pun .blockpost {
366 margin-bottom: 6px
367 }
368
369#postreview .blockpost {
370 margin-bottom: -1px;
371 }
372
373.pun .block2col .blockform, .pun .block2col .block {
374 margin-bottom: 0px
375 }
376
377.pun .linkst, .pun .linksb {
378 margin-top: -12px
379 }
380
381.pun .postlinksb {
382 margin-top: -6px
383 }
384
385
386/* External Borders
387----------------------------------------------------------------*/
388
389.pun .box {
390 border-style: solid;
391 border-width: 1px;
392 }
393
394#brdheader .box {
395 border-top-width: 4px;
396 border-radius: 4px;
397 }
398
399/* Default Internal Spacing
400----------------------------------------------------------------*/
401
402.pun .block .inbox, .pun .blockmenu .inbox {
403 padding: 3px 6px
404 }
405
406
407/*****************************************************************
4084. COMMON BOARD ELEMENTS
409*****************************************************************/
410
411/* Board Header
412----------------------------------------------------------------*/
413
414#brdtitle h1 {
415 font-size: 1.8em;
416 font-weight: normal;
417 padding: 3px 0 0 0;
418 font-family: 'Raleway', Verdana;
419 }
420
421#brdtitle h1 a {
422 color: #eaeaea;
423 }
424
425#brdtitle h1 a span {
426 color: #95b806;
427 }
428
429#brdmenu li {
430 display: inline;
431 margin-right: 12px;
432 }
433
434#brdmenu a:link, #brdmenu a:visited {
435 text-decoration: none
436 }
437
438#brdmenu a:hover, #brdmenu a:active {
439 text-decoration: underline
440 }
441
442#brdwelcome .conl {
443 float: left;
444 }
445
446#brdwelcome .conr {
447 float: right;
448 text-align: right;
449 }
450
451/* Breadcrumbs and Post Links
452----------------------------------------------------------------*/
453
454.pun .linkst {
455 padding: 8px 6px 3px 6px
456 }
457
458.pun .linksb, .pun .postlinksb {
459 padding: 3px 6px 8px 6px
460 }
461
462.pun .crumbs {
463 clear: both;
464 width: 100%;
465 overflow: hidden;
466 font-size: 11px;
467 }
468
469.pun .crumbs li {
470 display: inline;
471 white-space: nowrap;
472 font-weight: bold;
473 }
474
475.pun .pagelink {
476 float: left;
477 white-space: nowrap;
478 }
479
480.pun .postlink {
481 font-weight: bold;
482 white-space: nowrap;
483 }
484
485.pun .postlink, .pun .modbuttons {
486 float: right;
487 text-align: right;
488 }
489
490.pun .modbuttons {
491 padding: 1px 0;
492 white-space: nowrap;
493 }
494
495.pun .modbuttons input {
496 margin-left: 6px;
497 }
498
499.pun .postlink a:link, .pun .postlink a:visited {
500 text-decoration: none
501 }
502
503.pun .postlink a:hover, .pun .postlink a:active {
504 text-decoration: underline;
505 }
506
507.pun .topiclink {
508 font-size: 11px;
509 }
510
511#punindex .subscribelink {
512 margin-top: 6px;
513 }
514
515/* Board Footer
516----------------------------------------------------------------*/
517
518#brdfooter .conl {
519 float: left;
520 }
521
522#brdfooter .conr {
523 float: right;
524 text-align: right;
525 }
526
527#brdfooter #modcontrols {
528 border-bottom-style: solid;
529 border-bottom-width: 1px;
530 text-align: center;
531 }
532
533#brdfooter #modcontrols dd {
534 display: inline;
535 margin:0 6px;
536 }
537
538
539/* Board Stats
540----------------------------------------------------------------*/
541
542#brdstats .conl {
543 float: left;
544 }
545
546#brdstats .conr {
547 float: right;
548 text-align: right;
549 }
550
551#onlinelist dd, #onlinelist dt {
552 display: inline;
553 }
554
555
556/*****************************************************************
5575. MAIN TABLES
558*****************************************************************/
559
560.pun table {
561 width: 100%;
562 border-collapse: collapse;
563 border-spacing: 0;
564 empty-cells: show;
565 }
566
567.pun .blocktable table {
568 table-layout: fixed;
569 }
570
571.pun td, .pun th {
572 padding: 4px 6px;
573 text-align: left;
574 font-weight: normal;
575 }
576
577.pun tbody td, .pun tbody th {
578 border-style: solid none none solid;
579 border-width: 1px;
580 }
581
582.pun .tcl {
583 border-left: 0;
584 width: auto;
585 }
586
587.pun .tc2, .pun .tc3, .pun .tcmod {
588 width: 10%;
589 text-align: center;
590 padding: 4px 0;
591 }
592
593.pun .tcr {
594 width: 30%;
595 overflow-x: hidden;
596 white-space: nowrap;
597 text-overflow: ellipsis;
598 }
599
600.pun .tcl h3 {
601 font-size: 11px;
602 font-weight: bold;
603 }
604
605.pun .tcl h3 a {
606 color: #ccc;
607 }
608
609.pun .tcl h3 a:hover {
610 color: #b4e61e;
611}
612
613.pun .tcl h3 span.newtext {
614 font-size: 0.917em;
615 }
616
617.pun .tcl span.newtext, .pun .tcl span.pagestext {
618 white-space: nowrap;
619 font-weight: normal;
620 }
621
622.pun td span.byuser {
623 white-space: nowrap;
624 }
625
626.pun .tcl p {
627 padding: 5px 0 0 0
628 }
629
630#punsearch #vf .tc2 {
631 width: 18%;
632 text-align: left;
633 padding: 4px 6px;
634 }
635
636#users1 .tcr {
637 width: 25%
638 }
639
640#users1 .tc2 {
641 width: 25%;
642 text-align: left;
643 padding: 4px 6px;
644 }
645
646#debug .tcl {
647 width: 10%
648 }
649
650#debug .tcr {
651 width: 90%;
652 white-space: normal
653 }
654
655#punindex .tcr .byuser {
656 display: block
657 }
658
659.pun .blocktable .tclcon {
660 padding: 0 11px 0 12px;
661 overflow: hidden;
662 min-height: 1px;
663 position: relative;
664 }
665
666.pun .blocktable .tclcon div {
667 width: 100%;
668 overflow: hidden;
669 }
670
671.pun .icon {
672 margin: 0.3em 0 0 0.2em;
673 border-width: 0.4em;
674 border-style: solid;
675 border-radius: 2px;
676 height: 0;
677 width: 0;
678 overflow: hidden;
679 float: left;
680 }
681
682.pun .icon div {
683 position: absolute;
684 left: -9999em;
685 text-indent: -9999em;
686 height: 0;
687 }
688
689.pun .iposted .ipost {
690 position: absolute;
691 left: 0;
692 font-weight: bold;
693 width: 8px;
694 padding-left: 4px;
695 text-align: center;
696 top: 0;
697 }
698
699.pun .rowlist {
700 display: inline-block;
701 vertical-align: middle;
702 }
703
704/*****************************************************************
7056. MAIN FORMS
706*****************************************************************/
707
708.pun .blockform form, .pun .fakeform {
709 PADDING: 20px 20px 15px 20px
710 }
711
712.pun .forminfo {
713 margin-bottom: 12px;
714 padding: 9px 10px;
715 border-style: solid;
716 border-width: 1px;
717 }
718
719.pun .forminfo h3 {
720 font-weight: bold;
721 }
722
723.pun .inform {
724 padding-bottom: 12px
725 }
726
727.pun fieldset {
728 padding: 0px 12px 0px 12px;
729 border-style: solid;
730 border-width: 1px
731 }
732
733.pun legend {
734 padding: 0px 6px
735 }
736
737.pun .infldset {
738 padding: 9px 0px 12px 0
739 }
740
741.pun label {
742 display: block;
743 padding: 3px 0
744 }
745
746.pun label.conl {
747 float: left;
748 overflow: visible;
749 margin-right: 10px
750 }
751
752.pun fieldset .rbox br {
753 display: none;
754 }
755
756.pun fieldset .rbox label {
757 padding: 3px 0 3px 25px;
758 position: relative;
759 vertical-align: middle;
760 }
761
762.pun fieldset .rbox input {
763 margin: 0 9px 0 -25px;
764 padding: 0;
765 width: 16px;
766 position: relative;
767 vertical-align: middle;
768 }
769
770.pun .txtarea {
771 width: 75%
772 }
773
774.pun .txtarea textarea, .pun input.longinput {
775 width: 100%
776 }
777
778.pun .bblinks {
779 padding-bottom: 10px;
780 padding-left: 4px
781 }
782
783.pun .bblinks li {
784 display: inline;
785 padding-right: 20px
786 }
787
788.pun .blockform .buttons {
789 padding-left: 12px;
790 }
791
792.pun .blockform .buttons input {
793 margin-right: 8px;
794 }
795
796#posterror ul {
797 list-style: square;
798 padding: 3px 0 3px 24px;
799 }
800
801.pun .deletemsg {
802 border-style: solid;
803 border-width: 1px;
804 padding: 6px 15px;
805 }
806
807.pun p.actions span {
808 margin-right: 12px;
809 }
810
811.pun .multiselect {
812 float: left;
813 padding-bottom: 7px;
814 }
815
816.pun .checklist {
817 border-width: 1px;
818 border-style: solid;
819 max-height: 9em;
820 width: 20em;
821 overflow: auto;
822 padding: 0.3em 0.5em;
823 margin: 0.25em 16px 0 0.15em;
824 }
825
826.pun .checklist fieldset {
827 border: 0;
828 padding: 0;
829 }
830
831.pun .checklist legend {
832 padding: 0;
833 }
834
835.pun .checklist legend span {
836 width: auto;
837 max-width: 25em;
838 }
839
840/*****************************************************************
8417. PROFILES AND ADMIN
842*****************************************************************/
843
844.pun .block2col {
845 padding-bottom: 1px
846 }
847
848.pun .block2col .blockform, .pun .block2col .block {
849 margin-left: 14em
850 }
851
852.pun .blockmenu {
853 float:left;
854 width: 13em
855 }
856
857.pun .blockmenu li {
858 padding: 3px 0;
859 font-weight: bold;
860 }
861
862.pun .blockmenu a:link, .pun .blockmenu a:visited {
863 text-decoration: none
864 }
865
866.pun .blockmenu a:hover, .pun .blockmenu a:active {
867 text-decoration: underline
868 }
869
870#viewprofile dl {
871 float: left;
872 width: 100%;
873 overflow: hidden
874 }
875
876#viewprofile dd {
877 margin-left: 14em;
878 padding: 3px;
879 }
880
881#viewprofile dt {
882 float: left;
883 width: 13em;
884 margin: 3px 0;
885 }
886
887#profileavatar img {
888 float: right;
889 margin-left: 1em
890 }
891
892#adintro ul {
893 list-style-type: disc;
894 margin-left: 8px;
895 padding-left: 16px;
896 }
897
898/*****************************************************************
8998. MAIN POSTS
900*****************************************************************/
901
902.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited {
903 text-decoration: none;
904 }
905
906.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active {
907 text-decoration: underline;
908 }
909
910.pun .blockpost h2 .conr {
911 float: right;
912 text-align: right;
913 }
914
915#punsearch .blockpost h2 span {
916 white-space: nowrap;
917 }
918
919.pun .blockpost .box {
920 overflow: hidden;
921 }
922
923.pun .postleft, .pun .postfootleft {
924 float:left;
925 width: 18em;
926 position: relative;
927 overflow: hidden;
928 }
929
930.pun .postleft dl {
931 padding: 6px;
932 }
933
934.pun .postleft .usercontacts, .pun .postleft .icon {
935 margin-top: 6px
936 }
937
938.pun .postleft .postavatar, .pun .postleft .usertitle {
939 margin-bottom: 6px;
940 display: block;
941 }
942
943.pun .blockpost dt {
944 font-size: 1.091em;
945 font-weight: bold;
946 }
947
948.pun .blockpost dt a:link, .pun .blockpost dt a:visited {
949 text-decoration: none;
950 }
951
952.pun .blockpost dt a:hover, .pun .blockpost dt a:active {
953 text-decoration: underline;
954 }
955
956.pun .postright, .pun .postfootright {
957 border-left-width: 18em;
958 border-left-style: solid
959 }
960
961#postpreview .postright {
962 border-left: 0
963 }
964
965.pun .postright {
966 padding: 0 6px;
967 }
968
969.pun .postfootright, .pun .multidelete {
970 text-align: right
971 }
972
973.pun .postmsg {
974 width:98%;
975 overflow: hidden;
976 padding-bottom: 6px;
977 word-wrap: break-word;
978 }
979
980.pun .postmsg p {
981 font-size: 11px;
982 }
983
984.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p,
985.pun .postfootleft p {
986 padding: 10px 6px 5px 6px;
987 }
988
989.pun .postfootright li {
990 display: inline;
991 }
992
993.pun .postfootright li:before {
994 content: " | ";
995 }
996
997.pun .postfootright li:first-child:before {
998 content: "";
999 }
1000
1001.pun .postfootright a:link, .pun .postfootright a:visited {
1002 text-decoration: none
1003 }
1004
1005.pun .postfootright a:hover, .pun .postfootright a:active {
1006 text-decoration: underline
1007 }
1008
1009.pun .codebox {
1010 border-style: solid;
1011 border-width: 1px;
1012 margin: 0.75em 1em;
1013 padding: 0;
1014 }
1015
1016.pun .quotebox {
1017 border-style: solid;
1018 border-width: 1px;
1019 margin: 0.75em 1em;
1020 padding: 0 0.75em;
1021 }
1022
1023.pun .quotebox cite {
1024 display: block;
1025 padding: 0.75em 0 0 0;
1026 }
1027
1028.pun .quotebox blockquote {
1029 width: 100%;
1030 overflow: hidden
1031 }
1032
1033.pun .codebox pre {
1034 overflow: auto;
1035 width: 100%;
1036 overflow-y:hidden
1037 }
1038
1039* html .pun .codebox pre {
1040 padding-bottom: 10px;
1041 }
1042
1043*+html .pun .codebox pre {
1044 padding-bottom: 10px
1045 }
1046
1047.pun .codebox pre code {
1048 display: block;
1049 padding: 0.75em;
1050 }
1051
1052.pun .codebox pre.vscroll {
1053 height: 32em;
1054 overflow: auto;
1055 overflow-y: auto
1056 }
1057
1058.pun .postmsg img {
1059 vertical-align: bottom;
1060 }
1061
1062.pun .postsignature hr {
1063 margin-left: 0px;
1064 width: 200px;
1065 text-align: left;
1066 height: 1px;
1067 border:none
1068 }
1069
1070.pun .postmsg .postimg img {
1071 max-width: 98%;
1072 vertical-align: middle;
1073 margin: 7px 0.5em 7px 0;
1074 }
1075
1076.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img {
1077 border-style: solid;
1078 border-width: 2px;
1079 }
1080
1081.pun .blockpost label {
1082 padding: 3px 6px;
1083 border-style: solid;
1084 border-width: 1px;
1085 vertical-align: middle;
1086 display: inline-block;
1087 }
1088
1089.pun .blockpost label * {
1090 vertical-align: middle;
1091 margin: 0;
1092 padding: 0;
1093 }
1094
1095.pun input.pollchoice {
1096 display: table-cell;
1097 vertical-align: middle;
1098 margin: 5px 5px;
1099 }
1100
1101.pun .stickytext {
1102 font-size: 1.2em;
1103 color: #ffd200;
1104 }
1105
1106/****************************************************************/
1107/* 9. HELP FILES AND MISC. */
1108/****************************************************************/
1109
1110#punhelp h2 {
1111 margin-top: 12px
1112 }
1113
1114#punhelp div.box {
1115 padding: 10px
1116 }
1117
1118#debugtime {
1119 margin-top: -12px;
1120 text-align: center;
1121 }
1122
1123#brdwelcome, #brdfooter dl a, div.blockmenu li, div.rbox input {
1124 line-height: 1.4em
1125 }
1126
1127#announce div.inbox div {
1128 padding: 3px 0
1129 }
1130
1131.pun .inbox thead {
1132 color: #777;
1133 font-size: 10px;
1134 border-style: none;
1135 }
1136
1137.pun .inbox thead .tcl,
1138.pun .inbox thead .tc2,
1139.pun .inbox thead .tc3,
1140.pun .inbox thead .tcr {
1141 border-bottom: 1px solid #95b806;
1142 }
1143
1144/*****************************************************************
1145COLOUR SCHEME
1146*****************************************************************/
1147
1148/* Background / Text
1149----------------------------------------------------------------*/
1150
1151body {
1152 background-color: #020202;
1153 color: #d4d4d4
1154 }
1155
1156.punwrap {
1157 background-color: #131311;
1158 padding: 20px 20px !important;
1159 border-radius: 4px;
1160 }
1161
1162.pun {
1163 color: #d4d4d4
1164 }
1165
1166.pun .box {
1167 background-color: #272726
1168 }
1169
1170.pun #adminconsole fieldset th {
1171 background-color: #383838
1172 }
1173
1174.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo,
1175#brdfooter #modcontrols, #adminconsole fieldset td, .pun .blockmenu .box, #adstats dd {
1176 background-color: #303030
1177 }
1178
1179.pun h2 {
1180 border-top-left-radius: 4px;
1181 border-top-right-radius: 4px;
1182 background-image: -webkit-linear-gradient(top, #343433 0%, #272726 100%);
1183 background-image: -o-linear-gradient(top, #343433 0%, #272726 100%);
1184 background-image: -webkit-gradient(linear, left top, left bottom, from(#343433), to(#272726));
1185 background-image: linear-gradient(to bottom, #343433 0%, #272726 100%);
1186 filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff343433', endColorstr='#ff272726', GradientType=0);
1187 filter: progid: DXImageTransform.Microsoft.gradient(enabled false);
1188 background-repeat: repeat-x;
1189 border-top: 1px solid #4f4f4d;
1190 border-right: 1px solid #4f4f4d;
1191 border-left: 1px solid #4f4f4d;
1192 padding: 5px;
1193 text-transform: none;
1194 font-size: 11px;
1195 line-height: 1.4;
1196 font-weight: bold;
1197 position: relative;
1198 color: #bbb;
1199 }
1200
1201#brdmenu {
1202 background-color: #565656;
1203 color: #d4d4d4
1204 }
1205
1206.pun th {
1207 background-color: #272726
1208 }
1209
1210.pun legend {
1211 color: #60a0dc
1212 }
1213
1214.pun .blockmenu li.isactive a, #posterror li strong {
1215 color: #d4d4d4
1216 }
1217
1218.pun .usercontent * {
1219 background: transparent;
1220 color: #d4d4d4
1221 }
1222
1223.pun textarea, .pun input, .pun select {
1224 background-color: #212122;
1225 color: #ccc;
1226 border: 1px solid #3e3e3e;
1227 }
1228
1229.pun input:hover, .pun select:hover {
1230 background-color: #1b1b1b;
1231 border-color: #444;
1232 color: #aaa
1233 }
1234
1235.pun input:disabled, .pun select:disabled,
1236.pun input:disabled:hover, .pun select:disabled:hover {
1237 opacity: 0.5;
1238 background-color: #1b1b1b;
1239 color: #ccc;
1240 color: #ccc;
1241 border: 1px solid #3e3e3e;
1242 }
1243
1244.pun input:focus, .pun select:focus {
1245 outline: none;
1246 border-color: #666;
1247}
1248
1249.pun .multiselect, .pun .checklist {
1250 color: #D4D4D4;
1251 }
1252
1253.pun .checklist {
1254 border-color: #666;
1255 }
1256
1257.pun .rowodd {
1258 background-color: #1c1c1b;
1259 }
1260
1261.pun .roweven {
1262 background-color: #1d1d1c;
1263 }
1264
1265.pun .rowodd:hover,
1266.pun .roweven:hover {
1267 background-color: #20201f;
1268 }
1269
1270/* Posts
1271----------------------------------------------------------------*/
1272
1273.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg {
1274 background-color: #383838
1275 }
1276
1277.pun .postright, .pun .postfootright {
1278 border-left-color: #424242
1279 }
1280
1281.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox {
1282 background-color: #424242
1283 }
1284
1285.pun .blockpost h2 {
1286 background-color: #565656
1287 }
1288
1289.pun .blockpost h2 span.conr {
1290 color: #a19e96
1291 }
1292
1293.pun .postmsg ins, #punhelp samp ins {
1294 background-color: #ff0;
1295 }
1296
1297.pun hr {
1298 background-color: #606060;
1299 color: #606060
1300 }
1301
1302/* Borders
1303----------------------------------------------------------------*/
1304
1305.pun .box {
1306 border-color:#4f4f4d;
1307 }
1308
1309.pun .blocktable .box {
1310 border-top: none;
1311 }
1312
1313.pun td, #brdfooter #modcontrols {
1314 border-color: #333
1315 }
1316
1317.pun th {
1318 border-color: #292929
1319 }
1320
1321.pun fieldset {
1322 border-color: #606060
1323 }
1324
1325#adminconsole td, #adminconsole th {
1326 border-color: #383838
1327 }
1328
1329.pun .quotebox, .pun .codebox, .pun .forminfo,
1330.pun .blockpost label, .pun .deletemsg {
1331 border-color: #606060
1332 }
1333
1334/* Links
1335----------------------------------------------------------------*/
1336
1337.pun a:link, .pun a:visited {
1338 color: #60a0dc;
1339 text-decoration: none;
1340 }
1341
1342.pun a:hover, .pun a:active, .pun a:focus {
1343 color: #80d6ff
1344 }
1345
1346.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img {
1347 border-color: #60a0dc;
1348 }
1349
1350.pun .postmsg .postimg a:hover img, .pun .postmsg .postimg a:active img, .pun .postmsg .postimg a:focus img {
1351 border-color: #80d6ff;
1352 }
1353
1354.pun h2 a:link, .pun h2 a:visited,
1355#brdmenu a:link, #brdmenu a:visited {
1356 color: #d4d4d4
1357 }
1358
1359.pun h2 a:hover, .pun h2 a:active,
1360#brdmenu a:hover, #brdmenu a:active {
1361 color: #d4d4d4
1362 }
1363
1364.pun .postreport a:link, .pun .postreport a:visited,
1365.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited {
1366 color: #888
1367 }
1368
1369.pun .postreport a:hover, .pun .postreport a:active,
1370.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active {
1371 color: #aaa
1372 }
1373
1374.pun .maintenancelink a:link, .pun .maintenancelink a:visited {
1375 color: #ff4000
1376 }
1377
1378.pun .maintenancelink a:hover, .pun .maintenancelink a:active {
1379 color: #ff5010
1380 }
1381
1382/* Status Indicators
1383----------------------------------------------------------------*/
1384
1385.pun .icon {
1386 border-color: #333333;
1387 }
1388
1389.pun .iredirect .icon {
1390 border-color: #383838 #383838 #383838 #383838
1391 }
1392
1393.pun .inew .icon {
1394 border-color: #5496d8 #4b85c0 #4377ac #4f8dcb
1395 }
1396
1397
1398/* SCEditor WYSIWYG
1399----------------------------------------------------------------*/
1400
1401
1402
1403.postmsg hr {
1404 border: 0;
1405 height: 2px;
1406}
1407
1408
1409
1410/* Usergroup name colors
1411----------------------------------------------------------------*/
1412span.Administrators a:link, span.Administrators a:visited { /* Administrator */
1413 color: #b4e61e !important;
1414 font-weight: bold;
1415 }
1416
1417span.Administrators a:hover { /* Administrator */
1418 color: #e4ff5e !important;
1419 }
1420
1421span.Moderators a:link, span.Moderators a:visited { /* Moderator */
1422 color: #ff9933 !important;
1423 font-weight: bold;
1424 }
1425
1426span.Moderators a:hover { /* Moderator */
1427 color: #ffcc00 !important;
1428 }
1429
1430span.Premium a:link, span.Premium a:visited { /* Premium */
1431 color: #e61515 !important;
1432 font-weight: bold;
1433 }
1434
1435span.Premum a:hover { /* Premium */
1436 color: #ff4545 !important;
1437 }
1438
1439span.Banned a:link, span.Banned a:visited { /* Banned */
1440 font-weight: normal;
1441 }
1442
1443/* Notification bars
1444----------------------------------------------------------------*/
1445.pun .notice-bar {
1446 border: 1px solid #000;
1447 margin: 10px auto 10px auto;
1448 width: 100%;
1449 height: 20px;
1450 background: #9900cc linear-gradient(#9900cc, #660099);
1451 color: #eee;
1452 font-weight: bold;
1453 font-size: 11px;
1454 text-align: center;
1455 vertical-align: middle;
1456 text-shadow: 1px 1px #000;
1457 text-transform: uppercase;
1458 padding-top: 6px;
1459 }
1460
1461.pun .notice-bar a {
1462 color: #fff;
1463 }
1464
1465/* Payment form
1466----------------------------------------------------------------*/
1467#payment th {
1468 width: 15em;
1469 font-weight: bold
1470 }
1471
1472#payment fieldset td span {
1473 display: block;
1474 font-size: 1em;
1475 font-weight: normal;
1476 }
1477
1478#payment table.aligntop th, #paymenttable.aligntop td {
1479 vertical-align: top;
1480 }
1481
1482#payment .payment-icons img {
1483 width: 30px;
1484 margin-left: 2px;
1485 margin-top: 4px;
1486 opacity: 0.5;
1487 border: 1px solid #111;
1488 -webkit-filter: grayscale(0.5);
1489 -webkit-filter: grayscale(50%);
1490 filter: grayscale(50%);
1491 filter: url(#greyscale);
1492 filter: gray;
1493 }
1494
1495.contains-error {
1496 border: 1px solid #BA2323 !important;
1497 }
1498
1499/* Top navigation
1500----------------------------------------------------------------*/
1501nav {
1502 display: block;
1503 }
1504
1505.gs-nav-container {
1506 width: 1070px;
1507 margin: 0 auto;
1508 height: 60px;
1509 border-bottom: 1px solid #000000;
1510 }
1511
1512.gs-navbar {
1513 position: relative;
1514 min-height: 50px;
1515 border-radius: 4px;
1516 background-image: -webkit-linear-gradient(top, #303030 0%, #151515 100%);
1517 background-image: -o-linear-gradient(top, #303030 0%, #151515 100%);
1518 background-image: -webkit-gradient(linear, left top, left bottom, from(#303030), to(#151515));
1519 background-image: linear-gradient(to bottom, #303030 0%, #151515 100%);
1520 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff303030', endColorstr='#ff151515', GradientType=0);
1521 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
1522 background-repeat: repeat-x;
1523 }
1524
1525.gs-navbar ul {
1526 float: left;
1527 margin: 0;
1528 padding-left: 0;
1529 list-style: none;
1530 border-left: 1px solid #161616;
1531 border-right: 1px solid #333;
1532 border-bottom: 1px solid transparent;
1533 }
1534.gs-navbar li {
1535 float: left;
1536 margin-bottom: -1px;
1537 position: relative;
1538 display: block;
1539 height: 60px;
1540 border-left: 1px solid #333;
1541 border-right: 1px solid #161616;
1542 }
1543.gs-navbar li.active > a,
1544.gs-navbar li.active > a:hover,
1545.gs-navbar li.active > a:focus {
1546 color: #ffffff;
1547 cursor: default;
1548 }
1549.gs-navbar a {
1550 text-decoration: none;
1551 color: #888;
1552 margin-right: 2px;
1553 border: 1px solid transparent;
1554 border-radius: 4px 4px 0 0;
1555 transition: color 0.5s ease;
1556 position: relative;
1557 display: block;
1558 font-family: Impact, sans-serif;
1559 font-size: 18pt;
1560 padding-top: 20px;
1561 padding-bottom: 15px;
1562 padding-right: 15px;
1563 padding-left: 15px;
1564 line-height: 23px;
1565 }
1566.gs-navbar a:hover {
1567 color: #fff;
1568 }
1569.gs-divider {
1570 padding: 0;
1571 margin: 0;
1572 background: #1e5799;
1573 background: -moz-linear-gradient(left, #1e5799 0%, #f300ff 50%, #e0ff00 100%);
1574 background: -webkit-gradient(linear, left top, right top, color-stop(0%,#1e5799), color-stop(50%,#f300ff), color-stop(100%,#e0ff00));
1575 background: -webkit-linear-gradient(left, #1e5799 0%,#f300ff 50%,#e0ff00 100%);
1576 background: -o-linear-gradient(left, #1e5799 0%,#f300ff 50%,#e0ff00 100%);
1577 background: -ms-linear-gradient(left, #1e5799 0%,#f300ff 50%,#e0ff00 100%);
1578 background: linear-gradient(to right, #1e5799 0%,#f300ff 50%,#e0ff00 100%);
1579 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#e0ff00',GradientType=1 );
1580 height: 2px;
1581 border-bottom: 1px solid #000;
1582 }
1583
1584-----
1585
1586<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1587<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
1588<head>
1589<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1590<meta name="ROBOTS" content="NOINDEX, FOLLOW" />
1591<title>Info / infamous</title>
1592<link rel="stylesheet" type="text/css" href="style/gs.css" />
1593<link rel="stylesheet" href="sceditor/themes/square.min.css" type="text/css" media="all" />
1594<link href="https://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
1595<script type="text/javascript" src="sceditor/jquery-1.10.2.min.js"></script>
1596<script type="text/javascript" src="sceditor/jquery.sceditor.xhtml.min.js"></script>
1597<script type="text/javascript" src="sceditor/jquery.sceditor.bbcode.min.js"></script>
1598<script type="text/javascript" src="sceditor/sceditor.js"></script>
1599
1600<body>
1601<!--<nav class="gs-navbar">
1602 <div class="gs-nav-container">
1603 <ul>
1604 </ul>
1605 </div>
1606</nav>-->
1607<nav class="gs-navbar">
1608 <div class="gs-nav-container">
1609 <ul>
1610 <li><a href="/"><i class="fa fa-home"></i></a></li>
1611 <li class="active"><a href="https://infamous.pub">FORUMS</a></li>
1612 </ul>
1613 </div>
1614</nav>
1615<div class="gs-divider"></div>
1616</body>
1617<style type="text/css">.gid1 {color: #b4e61e; font-weight: bold} .gid2 {color: #ff9933; font-weight: bold} .gid4 {color: #60a0dc} .gid5 {color: #e61515; font-weight: bold} .gid6 {font-weight: bold} .gid7 {color: #b4e61e; font-weight: bold} .gid8 {color: #0d7a01; font-weight: bold} </style>
1618</head>
1619
1620<body>
1621
1622<div id="punindex" class="pun">
1623<div class="top-box"></div>
1624<div class="punwrap">
1625
1626<div id="brdheader" class="block">
1627 <div class="box">
1628 <div id="brdtitle" class="inbox">
1629 <h1><a href="index.php">infa<span>mous</span></a></h1>
1630 <div id="brddesc"><p><span>private hvh cheat.</span></p></div>
1631 </div>
1632 <div id="brdmenu" class="inbox">
1633 <ul>
1634 <li id="navindex" class="isactive"><a href="index.php">Index</a></li>
1635 <li id="navregister"><a href="register.php">Register</a></li>
1636 <li id="navlogin"><a href="login.php">Login</a></li>
1637 </ul>
1638 </div>
1639 <div id="brdwelcome" class="inbox">
1640 <p class="conl">You are not logged in.</p>
1641 <div class="clearer"></div>
1642 </div>
1643 </div>
1644</div>
1645
1646
1647
1648<div id="brdmain">
1649<div id="msg" class="block">
1650 <h2><span>Info</span></h2>
1651 <div class="box">
1652 <div class="inbox">
1653 <p>You do not have permission to view these forums.</p>
1654 <p><a href="javascript: history.go(-1)">Go back</a></p>
1655 </div>
1656 </div>
1657</div>
1658</div>
1659
1660<div id="brdfooter" class="block">
1661 <h2><span>Board footer</span></h2>
1662 <div class="box">
1663 <div id="brdfooternav" class="inbox">
1664 <div class="conl">
1665 </div>
1666 <!-- div id="brdfooternav" class="inbox">
1667 <p>infamous 2018</p>
1668 <ul>
1669 <li><span><a href="tos.php">Terms and Conditions / Privacy policy</a></span></li>
1670 </ul> -->
1671 <div class="conr">
1672
1673 <p id=""></p>
1674 </div>
1675 <p>Infamous 2018</p>
1676 <ul>
1677 <li><span><a href="http://www.infamous.pub/viewtopic.php?pid=3">Terms and Conditions / Privacy policy</a></span></li>
1678 </ul>
1679 <div class="clearer"></div>
1680 </div>
1681 </div>
1682</div>
1683
1684</div>
1685<div class="end-box"></div>
1686</div>
1687
1688</body>
1689</html>
1690-----
1691(function injected(eventName, injectedIntoContentWindow)
1692{
1693 let checkRequest;
1694
1695 /*
1696 * Frame context wrapper
1697 *
1698 * For some edge-cases Chrome will not run content scripts inside of frames.
1699 * Website have started to abuse this fact to access unwrapped APIs via a
1700 * frame's contentWindow (#4586, 5207). Therefore until Chrome runs content
1701 * scripts consistently for all frames we must take care to (re)inject our
1702 * wrappers when the contentWindow is accessed.
1703 */
1704 let injectedToString = Function.prototype.toString.bind(injected);
1705 let injectedFrames = new WeakSet();
1706 let injectedFramesAdd = WeakSet.prototype.add.bind(injectedFrames);
1707 let injectedFramesHas = WeakSet.prototype.has.bind(injectedFrames);
1708
1709 function injectIntoContentWindow(contentWindow)
1710 {
1711 if (contentWindow && !injectedFramesHas(contentWindow))
1712 {
1713 injectedFramesAdd(contentWindow);
1714 try
1715 {
1716 contentWindow[eventName] = checkRequest;
1717 contentWindow.eval(
1718 "(" + injectedToString() + ")('" + eventName + "', true);"
1719 );
1720 delete contentWindow[eventName];
1721 }
1722 catch (e) {}
1723 }
1724 }
1725
1726 for (let element of [HTMLFrameElement, HTMLIFrameElement, HTMLObjectElement])
1727 {
1728 let contentDocumentDesc = Object.getOwnPropertyDescriptor(
1729 element.prototype, "contentDocument"
1730 );
1731 let contentWindowDesc = Object.getOwnPropertyDescriptor(
1732 element.prototype, "contentWindow"
1733 );
1734
1735 // Apparently in HTMLObjectElement.prototype.contentWindow does not exist
1736 // in older versions of Chrome such as 42.
1737 if (!contentWindowDesc)
1738 continue;
1739
1740 let getContentDocument = Function.prototype.call.bind(
1741 contentDocumentDesc.get
1742 );
1743 let getContentWindow = Function.prototype.call.bind(
1744 contentWindowDesc.get
1745 );
1746
1747 contentWindowDesc.get = function()
1748 {
1749 let contentWindow = getContentWindow(this);
1750 injectIntoContentWindow(contentWindow);
1751 return contentWindow;
1752 };
1753 contentDocumentDesc.get = function()
1754 {
1755 injectIntoContentWindow(getContentWindow(this));
1756 return getContentDocument(this);
1757 };
1758 Object.defineProperty(element.prototype, "contentWindow",
1759 contentWindowDesc);
1760 Object.defineProperty(element.prototype, "contentDocument",
1761 contentDocumentDesc);
1762 }
1763
1764 /*
1765 * Shadow root getter wrapper
1766 *
1767 * After creating our shadowRoot we must wrap the getter to prevent the
1768 * website from accessing it (#4191, #4298). This is required as a
1769 * workaround for the lack of user style support in Chrome.
1770 * See https://bugs.chromium.org/p/chromium/issues/detail?id=632009&desc=2
1771 */
1772 if ("shadowRoot" in Element.prototype)
1773 {
1774 let ourShadowRoot = document.documentElement.shadowRoot;
1775 if (ourShadowRoot)
1776 {
1777 let desc = Object.getOwnPropertyDescriptor(Element.prototype,
1778 "shadowRoot");
1779 let shadowRoot = Function.prototype.call.bind(desc.get);
1780
1781 Object.defineProperty(Element.prototype, "shadowRoot", {
1782 configurable: true, enumerable: true, get()
1783 {
1784 let thisShadow = shadowRoot(this);
1785 return thisShadow == ourShadowRoot ? null : thisShadow;
1786 }
1787 });
1788 }
1789 }
1790
1791 /*
1792 * RTCPeerConnection wrapper
1793 *
1794 * The webRequest API in Chrome does not yet allow the blocking of
1795 * WebRTC connections.
1796 * See https://bugs.chromium.org/p/chromium/issues/detail?id=707683
1797 */
1798 let RealCustomEvent = window.CustomEvent;
1799
1800 // If we've been injected into a frame via contentWindow then we can simply
1801 // grab the copy of checkRequest left for us by the parent document. Otherwise
1802 // we need to set it up now, along with the event handling functions.
1803 if (injectedIntoContentWindow)
1804 checkRequest = window[eventName];
1805 else
1806 {
1807 let addEventListener = document.addEventListener.bind(document);
1808 let dispatchEvent = document.dispatchEvent.bind(document);
1809 let removeEventListener = document.removeEventListener.bind(document);
1810 checkRequest = (url, callback) =>
1811 {
1812 let incomingEventName = eventName + "-" + url;
1813
1814 function listener(event)
1815 {
1816 callback(event.detail);
1817 removeEventListener(incomingEventName, listener);
1818 }
1819 addEventListener(incomingEventName, listener);
1820
1821 dispatchEvent(new RealCustomEvent(eventName, {detail: {url}}));
1822 };
1823 }
1824
1825 // Only to be called before the page's code, not hardened.
1826 function copyProperties(src, dest, properties)
1827 {
1828 for (let name of properties)
1829 {
1830 if (src.hasOwnProperty(name))
1831 {
1832 Object.defineProperty(dest, name,
1833 Object.getOwnPropertyDescriptor(src, name));
1834 }
1835 }
1836 }
1837
1838 let RealRTCPeerConnection = window.RTCPeerConnection ||
1839 window.webkitRTCPeerConnection;
1840
1841 // Firefox has the option (media.peerconnection.enabled) to disable WebRTC
1842 // in which case RealRTCPeerConnection is undefined.
1843 if (typeof RealRTCPeerConnection != "undefined")
1844 {
1845 let closeRTCPeerConnection = Function.prototype.call.bind(
1846 RealRTCPeerConnection.prototype.close
1847 );
1848 let RealArray = Array;
1849 let RealString = String;
1850 let {create: createObject, defineProperty} = Object;
1851
1852 let normalizeUrl = url =>
1853 {
1854 if (typeof url != "undefined")
1855 return RealString(url);
1856 };
1857
1858 let safeCopyArray = (originalArray, transform) =>
1859 {
1860 if (originalArray == null || typeof originalArray != "object")
1861 return originalArray;
1862
1863 let safeArray = RealArray(originalArray.length);
1864 for (let i = 0; i < safeArray.length; i++)
1865 {
1866 defineProperty(safeArray, i, {
1867 configurable: false, enumerable: false, writable: false,
1868 value: transform(originalArray[i])
1869 });
1870 }
1871 defineProperty(safeArray, "length", {
1872 configurable: false, enumerable: false, writable: false,
1873 value: safeArray.length
1874 });
1875 return safeArray;
1876 };
1877
1878 // It would be much easier to use the .getConfiguration method to obtain
1879 // the normalized and safe configuration from the RTCPeerConnection
1880 // instance. Unfortunately its not implemented as of Chrome unstable 59.
1881 // See https://www.chromestatus.com/feature/5271355306016768
1882 let protectConfiguration = configuration =>
1883 {
1884 if (configuration == null || typeof configuration != "object")
1885 return configuration;
1886
1887 let iceServers = safeCopyArray(
1888 configuration.iceServers,
1889 iceServer =>
1890 {
1891 let {url, urls} = iceServer;
1892
1893 // RTCPeerConnection doesn't iterate through pseudo Arrays of urls.
1894 if (typeof urls != "undefined" && !(urls instanceof RealArray))
1895 urls = [urls];
1896
1897 return createObject(iceServer, {
1898 url: {
1899 configurable: false, enumerable: false, writable: false,
1900 value: normalizeUrl(url)
1901 },
1902 urls: {
1903 configurable: false, enumerable: false, writable: false,
1904 value: safeCopyArray(urls, normalizeUrl)
1905 }
1906 });
1907 }
1908 );
1909
1910 return createObject(configuration, {
1911 iceServers: {
1912 configurable: false, enumerable: false, writable: false,
1913 value: iceServers
1914 }
1915 });
1916 };
1917
1918 let checkUrl = (peerconnection, url) =>
1919 {
1920 checkRequest(url, blocked =>
1921 {
1922 if (blocked)
1923 {
1924 // Calling .close() throws if already closed.
1925 try
1926 {
1927 closeRTCPeerConnection(peerconnection);
1928 }
1929 catch (e) {}
1930 }
1931 });
1932 };
1933
1934 let checkConfiguration = (peerconnection, configuration) =>
1935 {
1936 if (configuration && configuration.iceServers)
1937 {
1938 for (let i = 0; i < configuration.iceServers.length; i++)
1939 {
1940 let iceServer = configuration.iceServers[i];
1941 if (iceServer)
1942 {
1943 if (iceServer.url)
1944 checkUrl(peerconnection, iceServer.url);
1945
1946 if (iceServer.urls)
1947 {
1948 for (let j = 0; j < iceServer.urls.length; j++)
1949 checkUrl(peerconnection, iceServer.urls[j]);
1950 }
1951 }
1952 }
1953 }
1954 };
1955
1956 // Chrome unstable (tested with 59) has already implemented
1957 // setConfiguration, so we need to wrap that if it exists too.
1958 // https://www.chromestatus.com/feature/5596193748942848
1959 if (RealRTCPeerConnection.prototype.setConfiguration)
1960 {
1961 let realSetConfiguration = Function.prototype.call.bind(
1962 RealRTCPeerConnection.prototype.setConfiguration
1963 );
1964
1965 RealRTCPeerConnection.prototype.setConfiguration = function(configuration)
1966 {
1967 configuration = protectConfiguration(configuration);
1968
1969 // Call the real method first, so that validates the configuration for
1970 // us. Also we might as well since checkRequest is asynchronous anyway.
1971 realSetConfiguration(this, configuration);
1972 checkConfiguration(this, configuration);
1973 };
1974 }
1975
1976 let WrappedRTCPeerConnection = function(...args)
1977 {
1978 if (!(this instanceof WrappedRTCPeerConnection))
1979 return RealRTCPeerConnection();
1980
1981 let configuration = protectConfiguration(args[0]);
1982
1983 // Since the old webkitRTCPeerConnection constructor takes an optional
1984 // second argument we need to take care to pass that through. Necessary
1985 // for older versions of Chrome such as 49.
1986 let constraints = undefined;
1987 if (args.length > 1)
1988 constraints = args[1];
1989
1990 let peerconnection = new RealRTCPeerConnection(configuration,
1991 constraints);
1992 checkConfiguration(peerconnection, configuration);
1993 return peerconnection;
1994 };
1995
1996 WrappedRTCPeerConnection.prototype = RealRTCPeerConnection.prototype;
1997
1998 let boundWrappedRTCPeerConnection = WrappedRTCPeerConnection.bind();
1999 copyProperties(RealRTCPeerConnection, boundWrappedRTCPeerConnection,
2000 ["generateCertificate", "name", "prototype"]);
2001 RealRTCPeerConnection.prototype.constructor = boundWrappedRTCPeerConnection;
2002
2003 if ("RTCPeerConnection" in window)
2004 window.RTCPeerConnection = boundWrappedRTCPeerConnection;
2005 if ("webkitRTCPeerConnection" in window)
2006 window.webkitRTCPeerConnection = boundWrappedRTCPeerConnection;
2007 }
2008})('abp-request-mb8oghsrbq');
2009----
2010/*!
2011 * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
2012 * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
2013 */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.1.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}
2014-----