orbit-basic/public/assets/application.js

27 lines
359 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Mon Nov 21 21:11:03 2011 -0500
*/
function r_editor(a,b,c,d){d||(d=new Array),d.width||(d.width=400),d.height||(d.height=300);var e=this;e.filename=c,e.getUrl=a,e.postUrl=b,e.nodeToBeChanged="",e.width=d.width,e.height=d.height;var f="";e.init=function(){return code="<span id='file_editor' style='border:solid; width:"+e.width+"px;height:"+e.height+"px; float:right;' ><textarea style='height:87%;width:97%;resize:none;border:none;' ></textarea><input type='button' class='send' value='Send' ><input type='button' class='discard' value='Discard' ></span>",f=$(code),f.children("textarea").load(e.getUrl),f.children("input.discard").click(function(){e.destroy()}),f.children("input.send").click(function(){e.send()}),f},e.reload=function(){$.get(e.getUrl,function(a){f.children("textarea").text(a)})},e.send=function(){$.post(e.postUrl,{filename:e.filename,context:f.children("textarea").val(),authenticity_token:$("meta[name=csrf-token]").attr("content")},null,"script")},e.destroy=function(){f.remove()}}function resize(){viewportheight=$(window).height(),viewportwidth=$(window).width(),window.navigator.userAgent.indexOf("MSIE")>0&&(windH=document.clientHeight,windW=document.clientWidht)}function mainTablePosition(){var a=$("#main-wrap > .subnav").height(),b=$("#main-wrap > .table");b.stop().animate({marginTop:a},500)}function dropmenu(){if(!$(".rc_dm").length)return;$(".rc_dm").each(function(){$(this).find(".dm_ctrl").click(function(){var a=$(this).attr("rel"),b=$(this).outerWidth(),c=$(this).outerHeight(),d=$(this).position();return $(".dm_list").not("#"+a).hide(),$("#"+a).css({width:b,zIndex:999,left:d.left,top:d.top+c}).toggle(),!1})}),$(document).click(function(){$(".dm_list").hide()})}function tab(){if(!$(".rc_tab").length)return;$(".rc_tab").each(function(){$(this).find(".tab_ctrl:first").addClass("recent"),$(this).find(".tab_content:not(:first)").hide(),$(this).find(".tab_ctrl").click(function(){var a=$(this).attr("href");return $(this).parents(".rc_tab").find(".tab_content").hide().end().find(".tab_ctrl").removeClass("recent"),$(this).addClass("recent"),$(a).show(),!1})})}function tooltip(){if(!$(".rc_tip").length)return;$(".rc_tip").each(function(){$(this).css({position:"relative"});var a=$(this).data("tip");$(this).mouseover(function(){var b=$(this).find(".td").outerHeight(),c=$(this).offset();$(this).append('<span class="td">'+a+"</span>"),$(this).find(".td").show().css("display","inline-block"),$(document).mousemove(function(a){$(this).find(".td").css({left:a.pageX-c.left+16,top:a.pageY-c.top-b-20})})}).mouseout(function(){$(this).find(".td").hide().detach()})})}function accordion(){if(!$(".rc_accor").length)return;$(".rc_accor").each(function(){$(this).find(".ac_ctrl:first").addClass("recent"),$(this).find(".ac_content:not(:first)").hide();if($(this).hasClass("av"))$(this).find(".ac_ctrl").click(function(){var a=$(this).parents(".av").find(".ac_ctrl").index(this);return $(this).siblings(".ac_ctrl").removeClass("recent"),$(this).addClass("recent"),$(this).parents(".rc_accor").find(".ac_content:not(:eq("+a+"))").stop().slideUp(),$(this).parents(".rc_accor").find(".ac_content:eq("+a+")").stop().slideToggle(),!1});else if($(this).hasClass("ah")){var a=$(this).find(".ac_content").css("width");$(this).find(".ac_content:not(:eq(0))").css({width:0}),$(this).find(".ac_ctrl").click(function(){var b=$(this).parents(".ah").find(".ac_ctrl").index(this);return $(this).siblings(".ac_ctrl").removeClass("recent"),$(this).addClass("recent"),$(this).parents(".rc_accor").find(".ac_content:not(:eq("+b+"))").stop().animate({width:0}),$(this).parents(".rc_accor").find(".ac_content:eq("+b+")").stop().show().animate({width:a}),!1})}})}(function(a,b){function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function J(){return!1}function K(){return!0}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function bj(a,b){if(b.nodeType!==1||!f.hasData(a))return;var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}function bk(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bo(a){var b=c.createElement("div");return bh.appendChild(b),b.innerHTML=a.outerHTML,b.firstChild}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));return(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g)),l}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j)return j!==f[0]&&f.unshift(j),d[j]}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cs(){return setTimeout(ct,0),cr=f.now()}function ct(){cr=b}function cu(a,b){var c={};return f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a}),c}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(e.isReady)return;try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};return e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(a==="body"&&!d&&c.body)return this.context=c,this[0]=c.body,this.selector=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?g=[null,a,null]:g=i.exec(a);if(g&&(g[1]||!d)){if(g[1])return d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes),e.merge(this,a);h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}return this.context=c,this.selector=a,this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}return e.isFunction(a)?f.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),e.makeArray(a,this))},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();return e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return e.each(this,a,b)},ready:function(a){return e.bindReady(),A.add(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){return a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f),e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(A)return;A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":a.toString().replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];return a.length=d,a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};return g.guid=a.guid=a.guid||g.guid||e.guid++,g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){return f&&f instanceof e&&!(f instanceof a)&&(f=a(f)),e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())}),e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){return c=[],this},disable:function(){return c=d=e=b,this},disabled:function(){return!c},lock:function(){return d=b,(!e||e===!0)&&o.disable(),this},locked:function(){return!d},fireWith:function(b,c){return d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c)),this},fire:function(){return o.fireWith(this,arguments),this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){return i.done(a).fail(b).progress(c),this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments),this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;return i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i),i},when:function(a){function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}var b=i.call(arguments,0),c=0,d=b.length,e=new Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;return k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];if(!r)return;j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i)}),b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?f.cache[a[f.expando]]:a[f.expando],!!a&&!m(a)},data:function(a,c,d,e){if(!f.acceptData(a))return;var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);return g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d),o&&!h[c]?g.events:(k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h,i)},removeData:function(a,b,c){if(!f.acceptData(a))return;var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}return typeof a=="object"?this.each(function(){f.data(this,a)}):(d=a.split("."),d[1]=d[1]?"."+d[1]:"",c===b?(h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h)),h===b&&d[1]?this.data(d[0]):h):this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)}))},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){return typeof a!="string"&&(c=a,a="fx"),c===b?f.queue(this[0],a):this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){return a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);return m(),d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){return a=f.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return f.isFunction(a)?this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g)return c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type],c&&"get"in c&&(d=c.get(g,"value"))!==b?d:(d=g.value,typeof d=="string"?d.replace(q,""):d==null?"":d);return}return e=f.isFunction(a),this.each(function(d){var g=f(this),h;if(this.nodeType!==1)return;e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}return j&&!h.length&&i.length?f(i[g]).val():h},set:function(a,b){var c=f.makeArray(b);return f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return;if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}return h&&"set"in h&&i&&(g=h.set(a,d,c))!==b?g:(a.setAttribute(c,""+d),d)}return h&&"get"in h&&i&&(g=h.get(a,c))!==null?g:(g=a.getAttribute(c),g===null?b:g)},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1
){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return w&&f.nodeName(a,"button")?w.get(a,b):b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;return h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]),d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);return e||(e=c.createAttribute(d),a.setAttributeNode(e)),e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);return b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)")),b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))return;d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f=="undefined"||!!a&&f.event.triggered===a.type?b:f.event.dispatch.apply(i.elem,arguments)},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!g||!(o=g.events))return;b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();return c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n)),c.result}return},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;return a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];return a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey),h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return f.event.remove(this,"._change"),z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;return g===1&&(h=e,e=function(a){return f().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++)),this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;return f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler),this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=J),this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return f(this.context).on(a,this.selector,b,c),this},die:function(a,b){return f(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;return f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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(a,b){f.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){return i=!1,0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length!==1||w[0]!=="~"&&w[0]!=="+"||!d.parentNode?d:d.parentNode,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);return l&&(m(l,h,e,f),m.uniqueSort(e)),e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}return d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]),{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q){if(g!=null)break;m.error(a)}q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);return a[0]=e++,a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");return!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" "),a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not"){if(!((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))){var g=m.filter(b[3],c,d,!0^f);return d||e.push.apply(e,g),!1}b[3]=m(b[3],null,null,c)}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){return a.unshift(!0),a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}return j=a.nodeIndex-e,c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){return a===b?(h=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b)return h=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)return;m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!a.getElementsByClassName||a.getElementsByClassName("e").length===0)return;a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}return c=c.length>1?f.unique(c):c,this.pushStack(c,"closest",a)},index:function(a){return a?typeof a=="string"?f.inArray(this[0],f(a)):f.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);return L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this
.length>1||N.test(d))&&M.test(a)&&(e=e.reverse()),this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.isFunction(a)?this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))}):typeof a!="object"&&a!==b?this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a)):f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return f.isFunction(a)?this.each(function(b){f(this).wrapInner(a.call(this,b))}):this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);return a.push.apply(a,this.toArray()),this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);return a.push.apply(a,f.clean(arguments)),a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){return this[0]&&this[0].parentNode?f.isFunction(a)?this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=f(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})):this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];return b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1),{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1)return e[b](this[0]),this;for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}return d=e=null,h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){return arguments.length===2&&c===b?this:f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b)return k&&"get"in k&&(g=k.get(a,!1,e))!==b?g:j[c];h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c)return a.offsetWidth!==0?bC(a,b,d):(f.swap(a,bw,function(){e=bC(a,b,d)}),e)},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;return f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight}),c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;return b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;return f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d)),f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;return f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}}),this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){return f.isFunction(d)&&(g=g||e,e=d,d=b),f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b),a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s===2)return;s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return s||(d.mimeType=a),this},abort:function(a){return a=a||"abort",p&&p.abort(a),w(0,a),this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(!d.beforeSend||d.beforeSend.call(e,v,d)!==!1&&s!==2){for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(!(s<2))throw z;w(-1,z)}}return v}return v.abort(),!1},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";return b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){return g||f.error(h+" was not called"),g[0]},b.dataTypes[0]="json","script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return f.globalEval(a),a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";return f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c),this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);return f.isEmptyObject(a)?this.each(e.complete,[!1]):(a=f.extend({},a),e.queue===!1?this.each(g):this.queue(e.queue,g))},stop:function(a,c,d){return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)},d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a}return this.elem[this.prop]},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}return i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;return f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft)),{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;return c===b?(e=this[0],e?(g=cy(e),g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]):null):this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window),function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])"
,fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);return j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}return!1},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=!0;return e!==b&&e.submit!==b&&a.each(e.submit,function(a,b){if(typeof b.handler=="function")return f=b.handler(d)}),f},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(document).delegate(c.linkDisableSelector,"ajax:complete",function(){c.enableElement(a(this))}),a(document).delegate(c.linkClickSelector,"click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e)===!1&&c.enableElement(e),!1);if(e.data("method"))return c.handleMethod(e),!1}),a(document).delegate(c.inputChangeSelector,"change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(document).delegate(c.formInputClickSelector,"click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(document).delegate(c.formSubmitSelector,"ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(document).delegate(c.formSubmitSelector,"ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})}(jQuery),$("button.multi_files").live("click",function(){return $("#new_add_banner_file_holder").append("<li>"+$(this).val()+"Time:"+$(this).siblings(".ad_time").val()+"Link:"+$(this).siblings(".ad_out_link").val()+"</li>"),new_node=$(this).parent().clone(),$(this).parent().css("display","none"),new_node.children("input.multi_files").val(""),$(this).parent().before(new_node),!1}),$("a.remove_mark").live("click",function(){return $(this).prev("input").val("true"),$(this).parent().css("text-decoration","line-through"),$(this).parent().removeClass("r_snapshot"),$(this).next().remove(),$(this).remove(),!1}),function(a){function b(){if(!a.fn.ajaxSubmit.debug)return;var b="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(b):window.opera&&window.opera.postError&&window.opera.postError(b)}a.fn.ajaxSubmit=function(c){function w(b){var d=new FormData;for(var e=0;e<b.length;e++){if(b[e].type=="file")continue;d.append(b[e].name,b[e].value)}g.find("input:file:enabled").each(function(){var b=a(this).attr("name"),c=this.files;if(b)for(var e=0;e<c.length;e++)d.append(b,c[e])});if(c.extraData)for(var f in c.extraData)d.append(f,c.extraData[f]);c.data=null;var h=a.extend(!0,{},a.ajaxSettings,c,{contentType:!1,processData:!1,cache:!1,type:"POST"});h.context=h.context||h,h.data=null;var i=h.beforeSend;h.beforeSend=function(a,b){b.data=d,a.upload&&(a.upload.onprogress=function(a){b.progress(a.position,a.total)}),i&&i.call(b,a,c)},a.ajax(h)}function x(e){function w(a){var b=a.contentWindow?a.contentWindow.document:a.contentDocument?a.contentDocument:a.document;return b}function z(){function h(){try{var a=w(n).readyState;b("state = "+a),a.toLowerCase()=="uninitialized"&&setTimeout(h,50)}catch(c){b("Server abort: ",c," (",c.name,")"),E(v),s&&clearTimeout(s),s=undefined}}var c=g.attr("target"),e=g.attr("action");f.setAttribute("target",l),d||f.setAttribute("method","POST"),e!=j.url&&f.setAttribute("action",j.url),!j.skipEncodingOverride&&(!d||/post/i.test(d))&&g.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),j.timeout&&(s=setTimeout(function(){r=!0,E(u)},j.timeout));var i=[];try{if(j.extraData)for(var k in j.extraData)i.push(a('<input type="hidden" name="'+k+'">').attr("value",j.extraData[k]).appendTo(f)[0]);j.iframeTarget||(m.appendTo("body"),n.attachEvent?n.attachEvent("onload",E):n.addEventListener("load",E,!1)),setTimeout(h,15),f.submit()}finally{f.setAttribute("action",e),c?f.setAttribute("target",c):g.removeAttr("target"),a(i).remove()}}function E(c){if(o.aborted||D)return;try{B=w(n)}catch(d){b("cannot access response document: ",d),c=v}if(c===u&&o){o.abort("timeout");return}if(c==v&&o){o.abort("server abort");return}if(!B||B.location.href==j.iframeSrc)if(!r)return;n.detachEvent?n.detachEvent("onload",E):n.removeEventListener("load",E,!1);var e="success",f;try{if(r)throw"timeout";var g=j.dataType=="xml"||B.XMLDocument||a.isXMLDoc(B);b("isXml="+g);if(!g&&window.opera&&(B.body==null||B.body.innerHTML=="")&&--C){b("requeing onLoad callback, DOM not available"),setTimeout(E,250);return}var h=B.body?B.body:B.documentElement;o.responseText=h?h.innerHTML:null,o.responseXML=B.XMLDocument?B.XMLDocument:B,g&&(j.dataType="xml"),o.getResponseHeader=function(a){var b={"content-type":j.dataType};return b[a]},h&&(o.status=Number(h.getAttribute("status"))||o.status,o.statusText=h.getAttribute("statusText")||o.statusText);var i=(j.dataType||"").toLowerCase(),l=/(json|script|text)/.test(i);if(l||j.textarea){var p=B.getElementsByTagName("textarea")[0];if(p)o.responseText=p.value,o.status=Number(p.getAttribute("status"))||o.status,o.statusText=p.getAttribute("statusText")||o.statusText;else if(l){var q=B.getElementsByTagName("pre")[0],t=B.getElementsByTagName("body")[0];q?o.responseText=q.textContent?q.textContent:q.innerText:t&&(o.responseText=t.textContent?t.textContent:t.innerText)}}else i=="xml"&&!o.responseXML&&o.responseText!=null&&(o.responseXML=F(o.responseText));try{A=H(o,i,j)}catch(c){e="parsererror",o.error=f=c||e}}catch(c){b("error caught: ",c),e="error",o.error=f=c||e}o.aborted&&(b("upload aborted"),e=null),o.status&&(e=o.status>=200&&o.status<300||o.status===304?"success":"error"),e==="success"?(j.success&&j.success.call(j.context,A,"success",o),k&&a.event.trigger("ajaxSuccess",[o,j])):e&&(f==undefined&&(f=o.statusText),j.error&&j.error.call(j.context,o,e,f),k&&a.event.trigger("ajaxError",[o,j,f])),k&&a.event.trigger("ajaxComplete",[o,j]),k&&!--a.active&&a.event.trigger("ajaxStop"),j.complete&&j.complete.call(j.context,o,e),D=!0,j.timeout&&clearTimeout(s),setTimeout(function(){j.iframeTarget||m.remove(),o.responseXML=null},100)}var f=g[0],h,i,j,k,l,m,n,o,p,q,r,s,t=!!a.fn.prop;if(e)if(t)for(i=0;i<e.length;i++)h=a(f[e[i].name]),h.prop("disabled",!1);else for(i=0;i<e.length;i++)h=a(f[e[i].name]),h.removeAttr("disabled");if(a(":input[name=submit],:input[id=submit]",f).length){alert('Error: Form elements must not have name or id of "submit".');return}j=a.extend(!0,{},a.ajaxSettings,c),j.context=j.context||j,l="jqFormIO"+(new Date).getTime(),j.iframeTarget?(m=a(j.iframeTarget),q=m.attr("name"),q==null?m.attr("name",l):l=q):(m=a('<iframe name="'+l+'" src="'+j.iframeSrc+'" />'),m.css({position:"absolute",top:"-1000px",left:"-1000px"})),n=m[0],o={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(c){var d=c==="timeout"?"timeout":"aborted";b("aborting upload... "+d),this.aborted=1,m.attr("src",j.iframeSrc),o.error=d,j.error&&j.error.call(j.context,o,d,c),k&&a.event.trigger("ajaxError",[o,j,d]),j.complete&&j.complete.call(j.context,o,d)}},k=j.global,k&&!(a.active++)&&a.event.trigger("ajaxStart"),k&&a.event.trigger("ajaxSend",[o,j]);if(j.beforeSend&&j.beforeSend.call(j.context,o,j)===!1){j.global&&a.active--;return}if(o.aborted)return;p=f.clk,p&&(q=p.name,q&&!p.disabled&&(j.extraData=j.extraData||{},j.extraData[q]=p.value,p.type=="image"&&(j.extraData[q+".x"]=f.clk_x,j.extraData[q+".y"]=f.clk_y)));var u=1,v=2,x=a("meta[name=csrf-token]").attr("content"),y=a("meta[name=csrf-param]").attr("content");y&&x&&(j.extraData=j.extraData||{},j.extraData[y]=x),j.forceSync?z():setTimeout(z,10);var A,B,C=50,D,F=a.parseXML||function(a,b){return window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml"),b&&b.documentElement&&b.documentElement.nodeName!="parsererror"?b:null},G=a.parseJSON||function(a){return window.eval("("+a+")")},H=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f=c==="xml"||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;return f&&g.documentElement.nodeName==="parsererror"&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),typeof g=="string"&&(c==="json"||!c&&e.indexOf("json")>=0?g=G(g):(c==="script"||!c&&e.indexOf("javascript")>=0)&&a.globalEval(g)),g}}if(!this.length)return b("ajaxSubmit: skipping submit process - no element selected"),this;var d,e,f,g=this;typeof c=="function"&&(c={success:c}),d=this.attr("method"),e=this.attr("action"),f=typeof e=="string"?a.trim(e):"",f=f||window.location.href||"",f&&(f=(f.match(/^([^#]+)/)||[])[1]),c=a.extend(!0,{url:f,success:a.ajaxSettings.success,type:d||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},c);var h={};this.trigger("form-pre-serialize",[this,c,h]);if(h.veto)return b("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(c.beforeSerialize&&c.beforeSerialize(this,c)===!1)return b("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var i=c.traditional;i===undefined&&(i=a.ajaxSettings.traditional);var j,k,l,m=this.formToArray(c.semantic);c.data&&(c.extraData=c.data,j=a.param(c.data,i));if(c.beforeSubmit&&c.beforeSubmit(m,this,c)===!1)return b("ajaxSubmit: submit aborted via beforeSubmit callback"),this;this.trigger("form-submit-validate",[m,this,c,h]);if(h.veto)return b("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var n=a.param(m,i);j&&(n=n?n+"&"+j:j),c.type.toUpperCase()=="GET"?(c.url+=(c.url.indexOf("?")>=0?"&":"?")+n,c.data=null):c.data=n;var o=[];c.resetForm&&o.push(function(){g.resetForm()}),c.clearForm&&o.push(function(){g.clearForm(c.includeHidden)});if(!c.dataType&&c.target){var p=c.success||function(){};o.push(function(b){var d=c.replaceTarget?"replaceWith":"html";a(c.target)[d](b).each(p,arguments)})}else c.success&&o.push(c.success);c.success=function(a,b,d){var e=c.context||c;for(var f=0,h=o.length;f<h;f++)o[f].apply(e,[a,b,d||g,g])};var q=a("input:file:enabled[value]",this),r=q.length>0,s="multipart/form-data",t=g.attr("enctype")==s||g.attr("encoding")==s,u=!!(r&&q.get(0).files&&window.FormData);b("fileAPI :"+u);var v=(r||t)&&!u;return c.iframe!==!1&&(c.iframe||v)?c.closeKeepAlive?a.get(c.closeKeepAlive,function(){x(m)}):x(m):(r||t)&&u?(c.progress=c.progress||a.noop,w(m)):a.ajax(c),this.trigger("form-submit-notify",[this,c]),this},a.fn.ajaxForm=function(c){if(this.length===0){var d={s:this.selector,c:this.context};return!a.isReady&&d.s?(b("DOM not ready, queuing ajaxForm"),a(function(){a(d.s,d.c).ajaxForm(c)}),this):(b("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)")),this)}return this.ajaxFormUnbind().bind("submit.form-plugin",function(b){b.isDefaultPrevented()||(b.preventDefault(),a(this).ajaxSubmit(c))}).bind("click.form-plugin",function(b){var c=b.target,d=a(c);if(!d.is(":submit,input:image")){var e=d.closest(":submit");if(e.length==0)return;c=e[0]}var f=this;f.clk=c;if(c.type=="image")if(b.offsetX!=undefined)f.clk_x=b.offsetX,f.clk_y=b.offsetY;else if(typeof a.fn.offset=="function"){var g=d.offset();f.clk_x=b.pageX-g.left,f.clk_y=b.pageY-g.top}else f.clk_x=b.pageX-c.offsetLeft,f.clk_y=b.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)})},a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b){var c=[];if(this.length===0)return c;var d=this[0],e=b?d.getElementsByTagName("*"):d.elements;if(!e)return c;var f,g,h,i,j,k,l;for(f=0,k=e.length;f<k;f++){j=e[f],h=j.name;if(!h)continue;if(b&&d.clk&&j.type=="image"){!j.disabled&&d.clk==j&&(c.push({name:h,value:a(j).val(),type:j.type}),c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y}));continue}i=a.fieldValue(j,!0);if(i&&i.constructor==Array)for(g=0,l=i.length;g<l;g++)c.push({name:h,value:i[g]});else i!==null&&typeof i!="undefined"&&c.push({name:h,value:i,type:j.type})}if(!b&&d.clk){var m=a(d.clk),n=m[0];h=n.name,h&&!n.disabled&&n.type=="image"&&(c.push({name:h,value:m.val()}),c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y}))}return c},a.fn.formSerialize=function(b){return a.param(this.formToArray(b))},a.fn.fieldSerialize=function(b){var c=[];return this.each(function(){var d=this.name;if(!d)return;var e=a.fieldValue(this,b);if(e&&e.constructor==Array)for(var f=0,g=e.length;f<g;f++)c.push({name:d,value:e[f]});else e!==null&&typeof e!="undefined"&&c.push({name:this.name,value:e})}),a.param(c)},a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;d<e;d++){var f=this[d],g=a.fieldValue(f,b);if(g===null||typeof g=="undefined"||g.constructor==Array&&!g.length)continue;g.constructor==Array?a.merge(c,g):c.push(g)}return c},a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();c===undefined&&(c=!0);if(c&&(!d||b.disabled||e=="reset"||e=="button"||(e=="checkbox"||e=="radio")&&!b.checked||(e=="submit"||e=="image")&&b.form&&b.form.clk!=b||f=="select"&&b.selectedIndex==-1))return null;if(f=="select"){var g=b.selectedIndex;if(g<0)return null;var h=[],i=b.options,j=e=="select-one",k=j?g+1:i.length;for(var l=j?g:0;l<k;l++){var m=i[l];if(m.selected){var n=m.value;n||(n=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value);if(j)return n;h.push(n)}}return h}return a(b).val()},a.fn.clearForm=function(b){return this.each(function(){a("input,select,textarea",this).clearFields(b)})},a.fn.clearFields=a.fn.clearInputs=function(a){var b=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var c=this.type,d=this.tagName.toLowerCase();b.test(c)||d=="textarea"||a&&/hidden/.test(c)?this.value="":c=="checkbox"||c=="radio"?this.checked=!1:d=="select"&&(this.selectedIndex=-1)})},a.fn.resetForm=function(){return this.each(function(){(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)&&this.reset()})},a.fn.enable=function(a){return a===undefined&&(a=!0),this.each(function(){this.disabled=!a})},a.fn.selected=function(b){return b===undefined&&(b=!0),this.each(function(){var c=this.type;if(c=="checkbox"||c=="radio")this.checked=b;else if(this.tagName.toLowerCase()=="option"){var d=a(this).parent("select");b&&d[0]&&d[0].type=="select-one"&&d.find("option").selected(!1),this.selected=b}})},a.fn.ajaxSubmit.debug=!1}(jQuery),$rss=jQuery.noConflict();var rcom={insertDatePanel:function(a,b){b||(b=1901);if(a=="")return!1;domid=a.attr("id");var c=new Date;current_year=c.getFullYear();var d="Year: <select name='"+domid+"_year'>";for(i=current_year;i>=b;i--)d+="<option value='"+i+"'>"+i+"</option>";d+="</select> Date: <select name='"+domid+"_date'>";for(i=1;i<=31;i++)i<10?d+="<option value='0"+i+"'>"+i+"</option>":d+="<option value='"+i+"'>"+i+"</option>";d+="</select> Month: <select name='"+domid+"_month'>";var e=Array("","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");for(i=1;i<12;i++)i<10?d+="<option value='0"+i+"'>"+e[i]+"</option>":d+="<option value='"+i+"'>"+e[i]+"</option>";d+="</select>",a.html(d)},loadingWrapper:function(a,b){b?(a.prepend("<div id='loading_wrapper' class='loading'></div>"),$rss("#loading_wrapper").height(a.height()),$rss("#loading_wrapper").width(a.width())):(domId=a.attr("id"),$rss("#"+domId+" #loading_wrapper").remove())},validate:function(a,b,c){var d=a.val(),e=!1,f="",g="";switch(b){case"required":d==""&&(e=!0),g="Cannot be empty.";break;case"email":f=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/,g="Invalid Email Address.";break;case"number":f=/^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$/,g="Only numbers are accepted.";break;case"alphanumeric":f=/^\s*[a-zA-Z0-9,\s]+\s*$/,g="Only numbers, alphabets and spaces are allowed."}return domId=a.attr("name"),c==""&&(c=g),f!=""&&(f.test(d)||(e=!0)),e?($rss("#"+domId+"_error").remove(),a.after("<span id='"+domId+"_error' class='error'>"+c+"</span>"),!1):($rss("#"+domId+"_error").remove(),!0)},bindToSpinner:function(a,b,c){var d=a.attr("id"),e="",f=Array(),g=Array();$rss.each(b,function(a,c){$rss.each(b[a],function(a,b){f.push(b)})}),e="<select name='"+d+"'>";for(i=0,y=1,z=0;i<f.length/2;i++,y+=2,z+=2)e+="<option value='"+f[z]+"'>"+f[y]+"</option>";e+="</select>",a.html(e),typeof c=="function"&&c.call(this,e)},bindToTable:function(a,b,c,d,e,f){e||(e="");var g="<table width='100%' cellpadding='5' cellspacing='5' class='"+e+"' ><thead><tr>",h=a.attr("id");if(d){var i=Array(),j=Array();$rss.each(d,function(a,b){i.push(a),j.push(b)}),rcom.translate(i,function(d){i=d.slice(),rcom.translate(c,function(d){c=d;if(!b)return;$rss.each(c,function(a,b){g+="<th>"+b+"</th>"}),g+="</thead></tr>",b.length==0&&(g+="<tr><td colspan='"+c.length+"' align='center'>No Data</td></tr>"),$rss.each(b,function(a,b){var c="";a%2!=0&&(c="even"),g+="<tr id='"+h+"_"+b.id+"' class='"+c+"'>",$rss.each(b,function(a,b){a!="id"&&(b==null&&(b="Not Set"),g+="<td align='center'>"+b+"</td>")}),g+="<td align='center'>";for(x=0;x<i.length;x++)g+="<button onclick='"+j[x]+"("+b.id+")'>"+i[x]+"</button>";g+="</td>",g+="</tr>"}),g+="</table>",a.html(g)})})}else rcom.translate(c,function(d){c=d;if(!b)return;c.length>0&&$rss.each(c,function(a,b){g+="<th>"+b+"</th>"}),g+="</thead></tr>",b.length==0&&(g+="<tr><td colspan='"+c.length+"' align='center'>No Data</td></tr>"),$rss.each(b,function(a,b){var c="";a%2!=0&&(c="even"),g+="<tr id='"+h+"_"+b.id+"' class='"+c+"'>",$rss.each(b,function(a,b){a!="id"&&(b==null&&(b="Not Set"),g+="<td align='center'>"+b+"</td>")}),g+="</tr>"}),g+="</table>",a.html(g)});typeof f=="function"&&f.call(this,g)},convertToInsertableDate:function(a,b,c,d){var e="";b<10&&(b="0"+b),c<10&&(c="0"+c);switch(d){case"yyyy-mm-dd":e=a+"-"+b+"-"+c;break;case"dd-mm-yyyy":e=c+"-"+b+"-"+a;break;case"mm-dd-yyyy":e=b+"-"+c+"-"+a;break;default:e=a+"-"+b+"-"+c}return e},showDoms:function(a){$rss("body").find("div").each(function(){$rss(this).hide()}),$rss.each(a,function(a,b){b.show()})},translate:function(a,b){var c="",d=!0;a||(typeof b=="function"&&b.call(this,c),d=!1),a==""&&(typeof b=="function"&&b.call(this,c),d=!1),d&&$rss.getJSON("../../classes/translate.php",{fn:"translateThis",tData:a},function(a){typeof b=="function"&&b.call(this,a)})},bindToList:function(a,b,c){var d=a.attr("id"),e="",f=Array(),g=Array();$rss.each(b,function(a,c){$rss.each(b[a],function(a,b){f.push(b)})}),e="<ul id='"+d+"_list'>";for(i=0,y=1,z=0;i<f.length/2;i++,y+=2,z+=2)e+="<li id='li_"+f[z]+"'>"+f[y]+"</li>";e+="</ul>",a.html(e),typeof c=="function"&&c.call(this,e)},makeDraggable:function(a,b){a.css("position","absolute"),b.css("position","absolute");var c=0,d=0,e=0,f=0,g="",h=b.css("z-index");a.mousedown(function(a){c=a.clientX,e=a.clientY,g=b.offset(),$rss(this).mousemove(function(a){d=a.clientX-c,d+=g.left,f=a.clientY-e,f+=g.top,b.css({left:d+"px",top:f+"px","z-index":"9999"})})}).mouseup(function(){$rss(this).unbind("mousemove"),b.css("z-index",h)})},scrollToBottom:function(a){var b=a.attr("id"),c=document.getElementById(b);c.scrollTop+100>=c.scrollHeight-c.offsetHeight&&a.scrollTop(c.scrollHeight)},loadImages:function(settings,callbackFn){var dom=settings.dom,domid=dom.attr("id"),temp_array=Array(),starting=$rss("#"+domid+" img:last").attr("id");typeof starting!="undefined"?starting=starting.substr(4,starting.length-1):starting=0;var temp_var="",json="",dhtml="",extraparam="";typeof settings.extraParam!="undefined"&&(extraparam=settings.extraParam),$rss.getJSON(settings.url,{fn:settings.fn,id:settings.whereId,limit:settings.limit,start:starting,extra:extraparam},function(images){json=eval(images),$rss.each(images,function(a,b){var c=Array(),d=Array(),e="",f="";$rss.each(b,function(a,b){c.push(b)}),c.length>=4&&(e="<span class='"+settings.nameClass+"'>"+c[3]+"</span></div>"),c[2]==null?f="":f=c[2],typeof settings.bindTo!="undefined"?(d[1]="onclick='"+settings.bindTo+"("+c[0]+");return false;'",d[0]=""):(d[0]="?"+settings.urlKey+"="+c[0],d[1]=""),dhtml="<div class='"+settings.divClass+"' id='img_holder_"+c[0]+"' ><a href='"+d[0]+"' "+d[1]+" title='"+f+"'><img id='pic_"+c[0]+"' style='display:none' src='"+settings.imageSrc+c[1]+"' /></a>"+e,dom.delay(100).append(dhtml),$rss("#pic_"+b.id).delay(100).fadeIn(200)}),typeof callbackFn=="function"&&callbackFn.call(this,json)})},getUrlVars:function(){var a=[],b,c=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");for(var d=0;d<c.length;d++)b=c[d].split("="),a.push(b[0]),a[b[0]]=b[1];return a},modalWindow:function(a,b){function n(){h!="auto"?l=(f-h)/2:(h=$rss("#rgWindow").height(),h>j&&(h=j),l=(f-h)/2),i!="auto"?m=(g-i)/2:(i=$rss("#rgWindow").width(),i>k&&(i=k),m=(g-i)/2),i=parseInt(i)+25,$rss("#rgWindow").empty().show();var a="";e&&(a='<a href="" style="display:block; width:20px; height:20px; line-height:19px; text-align:center; position:absolute; right:-10px; top: -10px; font-family:Tahoma; font-weight:bold; border:solid 1px #000; border-radius: 10px;text-shadow:0px 1px 0 #DDD; background-color:#CCC; font-size:10px; text-decoration:none; color:#666; padding-left:1px; box-shadow: 0 0 5px #000000;" id="close_modal">X</a>'),$rss("#rgWindow").animate({width:i+"px",height:h+"px",top:l+"px",left:m+"px"},500,function(){$rss("#rgWindow").html(a+"<div id='rgContent' style='padding:5px; overflow:auto; overflow-x:none; height:"+h+"px;'>"+d+"</div>"),$rss("#close_modal").mouseover(function(){$rss(this).css("color","#999")}).mouseout(function(){$rss(this).css("color","#666")}),$rss("#close_modal").click(function(){$rss("#rgWindow").empty();var a=(f-20)/2,b=(g-20)/2;return $rss("#rgWindow").animate({top:a+"px",left:b+"px",width:"50px",height:"50px"},300,function(){$rss(this).fadeOut(100).remove(),$rss("#rgsheath").fadeOut(500).remove()}),!1}),c&&$rss("#rgsheath").click(function(){$rss("#rgWindow").empty();var a=(f-20)/2,b=(g-20)/2;$rss("#rgWindow").animate({top:a+"px",left:b+"px",width:"50px",height:"50px"},300,function(){$rss(this).fadeOut(100).remove(),$rss("#rgsheath").fadeOut(500).remove()})}),typeof b=="function"&&b.call(this,d)})}var c=a.envClose,d="";typeof c=="undefined"&&(c=!0);var e=a.closeBtn;typeof e=="undefined"&&(e=!0);var f=$rss(window).height(),g=$rss(window).width(),h=a.height,i=a.width,j=f*85/100,k=g*85/100;typeof h!="undefined"?(h.charAt(h.length-1)=="%"&&(h=f*parseInt(h.substr(0,h.length))/100),h>j&&(h=j)):h="auto",typeof i!="undefined"?(i.charAt(i.length-1)=="%"&&(i=g*parseInt(i.substr(0,i.length))/100),i>k&&(i=k)):i="auto",$rss("body").append('<div class="rgmask" id="rgsheath" style="height:'+f+'px"></div>'),$rss("#rgsheath").css({background:"#000",width:"100%",position:"fixed",top:0,left:0,opacity:.5,"z-index":199}),$rss("body").append('<div id="rgWindow"></div>'),$rss("#rgWindow").css({position:"fixed","z-index":"999",background:"#fff",border:"solid 1px #ccc",padding:"10px","border-radius":"5px","-webkit-border-radius":"5px","-moz-border-radius":"5px","-ms-border-radius":"5px","box-shadow":"0 0 20px rgba(0,0,0,0.7)","-webkit-box-shadow":"0 0 20px rgba(0,0,0,0.7)","-moz-box-shadow":"0 0 20px rgba(0,0,0,0.7)","-ms-box-shadow":"0 0 20px rgba(0,0,0,0.7)"});var l=(f-20)/2,m=(g-20)/2;$rss("#rgWindow").css({top:l+"px",left:m+"px"}),typeof a.loadDiv!="undefined"&&(d=$rss("#"+a.loadDiv).html(),$rss("#rgWindow").html(d).hide(),n()),typeof a.loadHtml!="undefined"&&(d=a.loadHtml,$rss("#rgWindow").html(d).hide(),n()),typeof a.loadPage!="undefined"&&$rss("#rgWindow").load(a.loadPage,function(){$rss(this).hide(),d=$rss(this).html(),n()})},modalWindowUpdate:function(a,b){function j(){e!="auto"?rgWTop=(c-e)/2:(e=$rss("#rgwindow_temp_div").height(),e>h&&(e=h),rgWTop=(c-e)/2),f!="auto"?rgWLeft=(d-f)/2:(f=$rss("#rgwindow_temp_div").width(),f>i&&(f=i),rgWLeft=(d-f)/2),f=parseInt(f)+25,$rss("#rgContent").empty(),$rss("#rgWindow").animate({width:f+"px",height:e+"px",top:rgWTop+"px",left:rgWLeft+"px"},500,function(){$rss("#rgContent").css("height",e+"px").html(g)}),$rss("#rgwindow_temp_div").remove()}var c=$rss(window).height(),d=$rss(window).width(),e=a.height,f=a.width,g="",h=c*85/100,i=d*85/100;typeof e!="undefined"?(e.charAt(e.length-1)=="%"&&(e=c*parseInt(e.substr(0,e.length))/100),e>h&&(e=h)):e="auto",typeof f!="undefined"?(f.charAt(f.length-1)=="%"&&(f=d*parseInt(f.substr(0,f.length))/100),f>i&&(f=i)):f="auto",$rss("body").append("<div id='rgwindow_temp_div'></div>"),typeof a.loadDiv!="undefined"&&(g=$rss("#"+a.loadDiv).html(),$rss("#rgwindow_temp_div").html(g).hide(),j()),typeof a.loadHtml!="undefined"&&(g=a.loadHtml,$rss("#rgwindow_temp_div").html(g).hide(),j()),typeof a.loadPage!="undefined"&&$rss("#rgwindow_temp_div").load(a.loadPage,function(){$rss(this).hide(),g=$rss(this).html(),j()})},modalWindowClose:function(a){if($rss("#rgWindow").length>0){$rss("#rgWindow").empty();var b=$rss(window).height(),c=$rss(window).width(),d=(b-20)/2,e=(c-20)/2;$rss("#rgWindow").animate({top:d+"px",left:e+"px",width:"50px",height:"50px"},300,function(){$rss(this).fadeOut(100).remove(),$rss("#rgsheath").fadeOut(500).remove()})}typeof a=="function"&&a.call(this,"harry")},bindDomToHead:function(a){var b=a.css("background"),c=a.offset(),d=a.width();$rss(window).scroll(function(){var e=$rss(window).scrollTop();if(e>c.top){var f={position:"fixed",top:0,width:d,background:b,"box-shadow":"0 1px 0 rgba(0,0,0,0.2)","z-index":99};a.css(f)}else a.attr("style","")})},progressBar:function(a,b){var c=a.prop("id");$rss("#rss_progressbar_div_"+c).length==0&&(typeof b.top=="undefined"&&(b.value=1),typeof b.top=="undefined"&&(b.top=(a.height()-12)/2),a.append("<div id='rss_progressbar_div_"+c+"' style='display:none;padding: 2px;background: #333;background: -webkit-linear-gradient(#111, #333);background: -moz-linear-gradient(#111, #333);background: -ms-linear-gradient(#111, #333);position: absolute;top: "+b.top+"px;left: 50%;margin-left: -45%;width: 84%;box-shadow: inset 0 0 2px #000;border-radius: 4px;'><div id='rss_progressbar_"+c+"' style='height: 8px;\tbackground: #36c;background: -webkit-linear-gradient(#7A98E7, #36c);background: -moz-linear-gradient(#7A98E7, #36c);background: -ms-linear-gradient(#7A98E7, #36c);border-radius: 2px; width: "+b.value+"%;'></div></div>"),$rss("#rss_progressbar_div_"+c).fadeIn(500))},progressBarValue:function(a,b){var c=a.prop("id");$rss("#rss_progressbar_div_"+c).length==1&&$rss("#rss_progressbar_"+c).animate({width:b+"%"},100)},progressBarClose:function(a){var b=a.prop("id");$rss("#rss_progressbar_div_"+b).fadeOut(500,function(){$(this).remove()})},getInternetExplorerVersion:function(){var a=-1;if(navigator.appName=="Microsoft Internet Explorer"){var b=navigator.userAgent,c=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");c.exec(b)!=null&&(a=parseFloat(RegExp.$1))}return a}};$=jQuery.noConflict(),$("#submit_button").live("click",function(){$("#ajaxForm").ajaxSubmit({beforeSubmit:function(a,b,c){c.dataType="script"}})}),$(".attributes_block a.delete").live("click",function(){$(this).parents(".list_item").remove()}),$(".action a.remove_existing_record").live("click",function(){$(this).next(".should_destroy").attr("value",1),$("#attribute_"+$(this).prev().attr("value")).hide()}),$(".action a.switch").live("click",function(){$(this).parent().toggleClass("disable");var a=$(this).next(".built_in_state");a.attr("value",a.attr("value")=="false"?"true":"false")}),$(".select_type select").live("change",function(){this.value=="select"?$(this).next().show():$(this).next().hide()}),!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.call(this),e.call
(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,typeof c=="object"&&c);e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.remove(),e.trigger("closed")}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){a(b.target).button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();c.parents("li").siblings().removeClass("active"),c.parents("li").toggleClass("active"),a(e).collapse(f)})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){a.stopPropagation(),a.preventDefault();switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:this.hide();break;default:this.lookup()}},keypress:function(a){a.stopPropagation();if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}},blur:function(a){var b=this;a.stopPropagation(),a.preventDefault(),setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery),$(".bulletin_links_block a.remove_existing_record").live("click",function(){$(this).parents("tr.list_item").remove()}),$(".bulletin_files_block a.remove_existing_record").live("click",function(){$(this).parents("tr.list_item").remove()}),$(".action a.remove_existing_record").live("click",function(){$(this).next(".should_destroy").attr("value",1),$("tr#bulletin_"+$(this).prev().attr("value")).hide()}),$(".r_edit").live("click",function(){new_editor=new r_editor($(this).attr("path"),"edit_file",$(this).attr("filename")),$(this).after(new_editor.init())}),$(".r_snapshot").live({mouseenter:function(){$(this).append($("<span></span>").html('<p class="z-preview"><img src="'+$(this).attr("path")+'"width="220" height="19" /></p>'))},mouseleave:function(){$(this).find("span:last").remove()}}),$("input.multi_files").live("change",function(){$(this).parent().prev("ul").append("<li>"+$(this).val()+"</li>"),new_node=$(this).parent().clone(),$(this).parent().css("display","none"),new_node.children("input.multi_files").val(""),$(this).parent().before(new_node)}),$("a.remove_mark").live("click",function(){return $(this).prev("input").val("true"),$(this).parent().css("text-decoration","line-through"),$(this).parent().removeClass("r_snapshot"),$(this).next().remove(),$(this).remove(),!1}),function(a,b,c){var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd",transitionProperty:"transitionEnd"}[j],r=h("transitionDuration"));var s=b.event,t;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",t&&clearTimeout(t),t=setTimeout(function(){jQuery.event.handle.apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var u=["overflow","position","width","height"],v=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!b.browser.opera,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};for(var d=0,e=u.length;d<e;d++){var f=u[d];this.originalStyle[f]=c[f]||""}this.element.css({overflow:"hidden",position:"relative"}),this._updateAnimationEngine(),this._updateUsingTransforms();var g={"original-order":function(a,b){return b.elemCount++,b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,g),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left"),10),top:parseInt(this.element.css("padding-top"),10)};var h=this;setTimeout(function(){h.element.addClass(h.options.containerClass)},0),this.options.resizable&&v.bind("smartresize.isotope",function(){h.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};return this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0),c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&e.csstransforms&&e.csstransitions&&!this.isUsingJQueryAnimation;a||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=a?this._translate:this._positionAbs},_filter:function(a){var b=this.options.filter===""?"*":this.options.filter;if(!b)return a;var c=this.options.hiddenClass,d="."+c,e=a.filter(d),f=e;if(b!=="*"){f=e.filter(b);var g=a.not(d).not(b).addClass(c);this.styleQueue.push({$el:g,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:f,style:this.options.visibleStyle}),f.removeClass(c),a.filter(b)},updateSortData:function(a,c){var d=this,e=this.options.getSortData,f,g;a.each(function(){f=b(this),g={};for(var a in e)!c&&a==="original-order"?g[a]=b.data(this,"isotope-sort-data")[a]:g[a]=e[a](f,d);b.data(this,"isotope-sort-data",g)})},_sort:function(){var a=this.options.sortBy,b=this._getSorter,c=this.options.sortAscending?1:-1,d=function(d,e){var f=b(d,a),g=b(e,a);return f===g&&a!=="original-order"&&(f=b(d,"original-order"),g=b(e,"original-order")),(f>g?1:f<g?-1:0)*c};this.$filteredAtoms.sort(d)},_getSorter:function(a,c){return b.data(a,"isotope-sort-data")[c]},_translate:function(a,b){return{translate:[a,b]}},_positionAbs:function(a,b){return{left:a,top:b}},_pushPosition:function(a,b,c){b+=this.offset.left,c+=this.offset.top;var d=this.getPositionStyles(b,c);this.styleQueue.push({$el:a,style:d}),this.options.itemPositionDataEnabled&&a.data("isotope-item-position",{x:b,y:c})},layout:function(a,b){var c=this.options.layoutMode;this["_"+c+"Layout"](a);if(this.options.resizesContainer){var d=this["_"+c+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:d})}this._processStyleQueue(a,b),this.isLaidOut=!0},_processStyleQueue:function(a,c){var d=this.isLaidOut?this.isUsingJQueryAnimation?"animate":"css":"css",f=this.options.animationOptions,g=this.options.onLayout,h,i,j,k;i=function(a,b){b.$el[d](b.style,f)};if(this._isInserting&&this.isUsingJQueryAnimation)i=function(a,b){h=b.$el.hasClass("no-transition")?"css":d,b.$el[h](b.style,f)};else if(c||g||f.complete){var l=!1,m=[c,g,f.complete],n=this;j=!0,k=function(){if(!l){var b;for(var c=0,d=m.length;c<d;c++)b=m[c],typeof b=="function"&&b.call(n.element,a);l=!0}};if(this.isUsingJQueryAnimation&&d==="animate")f.complete=k,j=!1;else if(e.csstransitions){var o=0,p=this.styleQueue[0].$el,s;while(!p.length){s=this.styleQueue[o++];if(!s)return;p=s.$el}var t=parseFloat(getComputedStyle(p[0])[r]);t>0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){var c=this,d=function(){c.$allAtoms=c.$allAtoms.not(a),a.remove()};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this.$filteredAtoms=this.$filteredAtoms.not(a),this._sort(),this.reLayout(d,b)):(d(),b&&b.call(this.element))},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d=0,e=u.length;d<e;d++){var f=u[d];c[f]=this.originalStyle[f]}this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),v.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.colYs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryPlaceBrick(a,g)}})},_masonryPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=this.masonry.columnWidth*d,h=c;this._pushPosition(a,g,h);var i=c+a.outerHeight(!0),j=this.masonry.cols+1-f;for(e=0;e<j;e++)this.masonry.colYs[d+e]=i},_masonryGetContainerSize:function(){var a=Math.max.apply(Math,this.masonry.colYs);return{height:a}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(a){var c=this,d=this.element.width(),e=this.fitRows;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.x!==0&&f+e.x>d&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=Math.round((e+.5)*d.columnWidth-a.outerWidth(!0)/2),h=Math.round((f+.5)*d.rowHeight-a.outerHeight(!0)/2);c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.rowXs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryHorizontalPlaceBrick(a,g)}})},_masonryHorizontalPlaceBrick:function(a,b){var c=Math
.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=c,h=this.masonryHorizontal.rowHeight*d;this._pushPosition(a,g,h);var i=c+a.outerWidth(!0),j=this.masonryHorizontal.rows+1-f;for(e=0;e<j;e++)this.masonryHorizontal.rowXs[d+e]=i},_masonryHorizontalGetContainerSize:function(){var a=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:a}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(a){var c=this,d=this.element.height(),e=this.fitColumns;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.y!==0&&g+e.y>d&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=Math.round((e+.5)*d.columnWidth-a.outerWidth(!0)/2),h=Math.round((f+.5)*d.rowHeight-a.outerHeight(!0)/2);c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function c(a){a.target.src!==h&&b.inArray(this,i)===-1&&(i.push(this),--g<=0&&(setTimeout(d),f.unbind(".imagesLoaded",c)))}function d(){a.call(e,f)}var e=this,f=e.find("img").add(e.filter("img")),g=f.length,h="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",i=[];return g||d(),f.bind("load.imagesLoaded error.imagesLoaded",c).each(function(){var a=this.src;this.src=h,this.src=a}),e};var w=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c)w("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");else{if(!b.isFunction(c[a])||a.charAt(0)==="_"){w("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)}})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}}(window,jQuery),function(a){function b(b,c){function d(a){return n.ratio>=1||(v.now=Math.min(p[c.axis]-q[c.axis],Math.max(0,v.start+((r?a.pageX:a.pageY)-w.start))),u=v.now*o.ratio,n.obj.css(s,-u),q.obj.css(s,v.now)),!1}function e(b){return a(document).unbind("mousemove",d),a(document).unbind("mouseup",e),q.obj.unbind("mouseup",e),document.ontouchmove=q.obj[0].ontouchend=document.ontouchend=null,!1}function f(b){if(!(n.ratio>=1)){var b=b||window.event,d=b.wheelDelta?b.wheelDelta/120:-b.detail/3;u-=d*c.wheel,u=Math.min(n[c.axis]-m[c.axis],Math.max(0,u)),q.obj.css(s,u/o.ratio),n.obj.css(s,-u),b=a.event.fix(b),b.preventDefault()}}function g(b){w.start=r?b.pageX:b.pageY;var c=parseInt(q.obj.css(s));return v.start=c=="auto"?0:c,a(document).bind("mousemove",d),document.ontouchmove=function(b){a(document).unbind("mousemove"),d(b.touches[0])},a(document).bind("mouseup",e),q.obj.bind("mouseup",e),q.obj[0].ontouchend=document.ontouchend=function(b){a(document).unbind("mouseup"),q.obj.unbind("mouseup"),e(b.touches[0])},!1}function h(){q.obj.bind("mousedown",g),q.obj[0].ontouchstart=function(a){return a.preventDefault(),q.obj.unbind("mousedown"),g(a.touches[0]),!1},p.obj.bind("mouseup",d),c.scroll&&this.addEventListener?(l[0].addEventListener("DOMMouseScroll",f,!1),l[0].addEventListener("mousewheel",f,!1)):c.scroll&&(l[0].onmousewheel=f)}function i(){q.obj.css(s,u/o.ratio),n.obj.css(s,-u),w.start=q.obj.offset()[s];var a=t.toLowerCase();o.obj.css(a,p[c.axis]),p.obj.css(a,p[c.axis]),q.obj.css(a,q[c.axis])}function j(){return k.update(),h(),k}var k=this,l=b,m={obj:a(".viewport",b)},n={obj:a(".overview",b)},o={obj:a(".scrollbar",b)},p={obj:a(".track",o.obj)},q={obj:a(".thumb",o.obj)},r=c.axis=="x",s=r?"left":"top",t=r?"Width":"Height",u,v={start:0,now:0},w={};return this.update=function(a){m[c.axis]=m.obj[0]["offset"+t],n[c.axis]=n.obj[0]["scroll"+t],n.ratio=m[c.axis]/n[c.axis],o.obj.toggleClass("disable",n.ratio>=1),p[c.axis]=c.size=="auto"?m[c.axis]:c.size,q[c.axis]=Math.min(p[c.axis],Math.max(0,c.sizethumb=="auto"?p[c.axis]*n.ratio:c.sizethumb)),o.ratio=c.sizethumb=="auto"?n[c.axis]/p[c.axis]:(n[c.axis]-m[c.axis])/(p[c.axis]-q[c.axis]),u=a=="relative"&&n.ratio<=1?Math.min(n[c.axis]-m[c.axis],Math.max(0,u)):0,u=a=="bottom"&&n.ratio<=1?n[c.axis]-m[c.axis]:isNaN(parseInt(a))?u:parseInt(a),i()},j()}a.tiny=a.tiny||{},a.tiny.scrollbar={options:{axis:"y",wheel:40,scroll:!0,size:"auto",sizethumb:"auto"}},a.fn.tinyscrollbar=function(c){var c=a.extend({},a.tiny.scrollbar.options,c);return this.each(function(){a(this).data("tsb",new b(a(this),c))}),this},a.fn.tinyscrollbar_update=function(b){return a(this).data("tsb").update(b)}}(jQuery);var viewportwidth,viewportheight;$(document).ready(function(){$(document).on("click",".orbit-bar-member",function(){return $(this).hasClass("open")?$(this).removeClass("open"):$(this).addClass("open"),$(".bar-login .dropdown-menu").toggle(),!1}),$(document).click(function(){$(".orbit-bar-member").removeClass("open"),$(".bar-login .dropdown-menu").hide()}),$(document).on("click",".bar-login .dropdown-menu",function(a){a.stopPropagation(),$(".bar-login .dropdown-menu").show()}),$(".tip").tooltip({placement:"left"}),$(document).on("click",".privacy",function(){switch($(this).val()){case"true":$(this).parents(".controls").children(".select-role").slideUp(300);break;case"false":$(this).parents(".controls").children(".select-role").slideDown(300)}}),$(document).on("click",".toggle-tr-edit",function(){$(this).parents("tr").next(".qe-block").removeClass("hide"),$(this).parents("tr").next(".qe-block").find(".qe-edit-div").addClass("hide"),$(this).parents("tr").next(".qe-block").find("#qe-"+$(this).attr("rel")).toggleClass("hide")}),$(document).on("click",".sort-header > .sort",function(){$.getScript($(this).attr("rel"))}),resize();var a=parseInt($("#main-wrap").css("margin-left"))-2;$("#main-sidebar").css("height",viewportheight-30),$("#main-sidebar .viewport").css("height",viewportheight-30),$(".post-title").css("width",viewportwidth-495),$("#main-wrap > .subnav").css("width",viewportwidth-a),$("#main-sidebar").tinyscrollbar(),$(".detal-list").tinyscrollbar(),$("#main-sidebar").tinyscrollbar({size:viewportheight-34}),mainTablePosition();var b=$("#isotope");b.isotope({itemSelector:".item",layoutMode:"masonry"})}),$(window).resize(function(){resize();var a=parseInt($("#main-wrap").css("margin-left"))-2;$("#main-sidebar").css("height",viewportheight-30),$("#main-sidebar .viewport").css("height",viewportheight-30),$(".post-title").css("width",viewportwidth-495),$("#main-wrap > .subnav").css("width",viewportwidth-a),$("#main-sidebar").tinyscrollbar({size:viewportheight-34}),mainTablePosition()}),$(window).scroll(function(){var a=$(window).scrollLeft();$(".table-label").css({left:a*-1})}),window.tinyMCEPreInit=window.tinyMCEPreInit||{base:"/assets/tinymce",query:"3.4.8",suffix:""},function(a){var b=/^\s*|\s*$/g,c,d="B".replace(/A(.)|B/,"$1")==="$1",e={majorVersion:"3",minorVersion:"4.8",releaseDate:"2012-02-02",_init:function(){function l(a){return a.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(a.src)?(/_(src|dev)\.js/g.test(a.src)&&(b.suffix="_src"),(j=a.src.indexOf("?"))!=-1&&(b.query=a.src.substring(j+1)),b.baseURL=a.src.substring(0,a.src.lastIndexOf("/")),i&&b.baseURL.indexOf("://")==-1&&b.baseURL.indexOf("/")!==0&&(b.baseURL=i+b.baseURL),b.baseURL):null}var b=this,c=document,d=navigator,e=d.userAgent,f,g,h,i,j,k;b.isOpera=a.opera&&opera.buildNumber,b.isWebKit=/WebKit/.test(e),b.isIE=!b.isWebKit&&!b.isOpera&&/MSIE/gi.test(e)&&/Explorer/gi.test(d.appName),b.isIE6=b.isIE&&/MSIE [56]/.test(e),b.isIE7=b.isIE&&/MSIE [7]/.test(e),b.isIE8=b.isIE&&/MSIE [8]/.test(e),b.isIE9=b.isIE&&/MSIE [9]/.test(e),b.isGecko=!b.isWebKit&&/Gecko/.test(e),b.isMac=e.indexOf("Mac")!=-1,b.isAir=/adobeair/i.test(e),b.isIDevice=/(iPad|iPhone)/.test(e),b.isIOS5=b.isIDevice&&e.match(/AppleWebKit\/(\d*)/)[1]>=534;if(a.tinyMCEPreInit){b.suffix=tinyMCEPreInit.suffix,b.baseURL=tinyMCEPreInit.base,b.query=tinyMCEPreInit.query;return}b.suffix="",g=c.getElementsByTagName("base");for(f=0;f<g.length;f++)if(k=g[f].href)/^https?:\/\/[^\/]+$/.test(k)&&(k+="/"),i=k?k.match(/.*\//)[0]:"";g=c.getElementsByTagName("script");for(f=0;f<g.length;f++)if(l(g[f]))return;h=c.getElementsByTagName("head")[0];if(h){g=h.getElementsByTagName("script");for(f=0;f<g.length;f++)if(l(g[f]))return}return},is:function(a,b){return b?b=="array"&&a.hasOwnProperty&&a instanceof Array?!0:typeof a==b:a!==c},makeMap:function(a,b,c){var d;a=a||[],b=b||",",typeof a=="string"&&(a=a.split(b)),c=c||{},d=a.length;while(d--)c[a[d]]={};return c},each:function(a,b,d){var e,f;if(!a)return 0;d=d||a;if(a.length!==c){for(e=0,f=a.length;e<f;e++)if(b.call(d,a[e],e,a)===!1)return 0}else for(e in a)if(a.hasOwnProperty(e)&&b.call(d,a[e],e,a)===!1)return 0;return 1},trim:function(a){return(a?""+a:"").replace(b,"")},create:function(a,b,c){var d=this,e,f,g,h,i,j=0;a=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(a),g=a[3].match(/(^|\.)(\w+)$/i)[2],f=d.createNS(a[3].replace(/\.\w+$/,""),c);if(f[g])return;if(a[2]=="static"){f[g]=b,this.onCreate&&this.onCreate(a[2],a[3],f[g]);return}b[g]||(b[g]=function(){},j=1),f[g]=b[g],d.extend(f[g].prototype,b),a[5]&&(e=d.resolve(a[5]).prototype,h=a[5].match(/\.(\w+)$/i)[1],i=f[g],j?f[g]=function(){return e[h].apply(this,arguments)}:f[g]=function(){return this.parent=e[h],i.apply(this,arguments)},f[g].prototype[g]=f[g],d.each(e,function(a,b){f[g].prototype[b]=e[b]}),d.each(b,function(a,b){e[b]?f[g].prototype[b]=function(){return this.parent=e[b],a.apply(this,arguments)}:b!=g&&(f[g].prototype[b]=a)})),d.each(b["static"],function(a,b){f[g][b]=a}),this.onCreate&&this.onCreate(a[2],a[3],f[g].prototype)},walk:function(a,b,c,d){d=d||this,a&&(c&&(a=a[c]),e.each(a,function(a,g){if(b.call(d,a,g,c)===!1)return!1;e.walk(a,b,c,d)}))},createNS:function(b,c){var d,e;c=c||a,b=b.split(".");for(d=0;d<b.length;d++)e=b[d],c[e]||(c[e]={}),c=c[e];return c},resolve:function(b,c){var d,e;c=c||a,b=b.split(".");for(d=0,e=b.length;d<e;d++){c=c[b[d]];if(!c)break}return c},addUnload:function(b,c){var d=this;b={func:b,scope:c||this};if(!d.unloads){function e(){var b=d.unloads,c,g;if(b){for(g in b)c=b[g],c&&c.func&&c.func.call(c.scope,1);a.detachEvent?(a.detachEvent("onbeforeunload",f),a.detachEvent("onunload",e)):a.removeEventListener&&a.removeEventListener("unload",e,!1),d.unloads=c=b=w=e=0,a.CollectGarbage&&CollectGarbage()}}function f(){var b=document;if(b.readyState=="interactive"){function c(){b.detachEvent("onstop",c),e&&e(),b=0}b&&b.attachEvent("onstop",c),a.setTimeout(function(){b&&b.detachEvent("onstop",c)},0)}}a.attachEvent?(a.attachEvent("onunload",e),a.attachEvent("onbeforeunload",f)):a.addEventListener&&a.addEventListener("unload",e,!1),d.unloads=[b]}else d.unloads.push(b);return b},removeUnload:function(a){var b=this.unloads,c=null;return e.each(b,function(d,e){if(d&&d.func==a)return b.splice(e,1),c=a,!1}),c},explode:function(a,b){return a?e.map(a.split(b||","),e.trim):a},_addVer:function(a){var b;return this.query?(b=(a.indexOf("?")==-1?"?":"&")+this.query,a.indexOf("#")==-1?a+b:a.replace("#",b+"#")):a},_replace:function(a,b,e){return d?e.replace(a,function(){var a=b,d=arguments,e;for(e=0;e<d.length-2;e++)d[e]===c?a=a.replace(new RegExp("\\$"+e,"g"),""):a=a.replace(new RegExp("\\$"+e,"g"),d[e]);return a}):e.replace(a,b)}};e._init(),a.tinymce=a.tinyMCE=e}(window),function(a,b){var c=b.is,d=/^(href|src|style)$/i,e;if(!a&&window.console)return console.log("Load jQuery first!");b.$=a,b.adapter={patchEditor:function(b){function f(a,b){var d=this;return b&&d.removeAttr("data-mce-style"),c.css.apply(d,arguments)}function g(a,f){var g=this;return d.test(a)?f!==e?(g.each(function(c,d){b.dom.setAttrib(d,a,f)}),g):g.attr("data-mce-"+a):c.attr.apply(g,arguments)}function h(a){return function(c){return c&&(c=b.dom.processHTML(c)),a.call(this,c)}}function i(a){return a.css!==f&&(a.css=f,a.attr=g,a.html=h(c.html),a.append=h(c.append),a.prepend=h(c.prepend),a.after=h(c.after),a.before=h(c.before),a.replaceWith=h(c.replaceWith),a.tinymce=b,a.pushStack=function(){return i(c.pushStack.apply(this,arguments))}),a}var c=a.fn;b.$=function(c,d){var e=b.getDoc();return i(a(c||e,e||d))}}},b.extend=a.extend,b.extend(b,{map:a.map,grep:function(b,c){return a.grep(b,c||function(){return 1})},inArray:function(b,c){return a.inArray(c,b||[])}});var f={"tinymce.dom.DOMUtils":{select:function(b,c){var d=this;return a.find(b,d.get(c)||d.get(d.settings.root_element)||d.doc,[])},is:function(b,c){return a(this.get(b)).is(c)}}};b.onCreate=function(a,c,d){b.extend(d,f[c])}}(window.jQuery,tinymce),tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(a){this.scope=a||this,this.listeners=[]},add:function(a,b){return this.listeners.push({cb:a,scope:b||this.scope}),a},addToTop:function(a,b){return this.listeners.unshift({cb:a,scope:b||this.scope}),a},remove:function(a){var b=this.listeners,c=null;return tinymce.each(b,function(d,e){if(a==d.cb)return c=a,b.splice(e,1),!1}),c},dispatch:function(){var a,b=arguments,c,d=this.listeners,e;for(c=0;c<d.length;c++){e=d[c],a=e.cb.apply(e.scope,b.length>0?b:[e.scope]);if(a===!1)break}return a}}),function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(b,c){var d=this,e,f,g,h;b=tinymce.trim(b),c=d.settings=c||{};if(/^([\w\-]+):([^\/]{2})/i.test(b)||/^\s*#/.test(b)){d.source=b;return}b.indexOf("/")===0&&b.indexOf("//")!==0&&(b=(c.base_uri?c.base_uri.protocol||"http":"http")+"://mce_host"+b),/^[\w-]*:?\/\//.test(b)||(h=c.base_uri?c.base_uri.path:(new tinymce.util.URI(location.href)).directory,b=(c.base_uri&&c.base_uri.protocol||"http")+"://mce_host"+d.toAbsPath(h,b)),b=b.replace(/@@/g,"(mce_at)"),b=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(b),a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(a,c){var e=b[c];e&&(e=e.replace(/\(mce_at\)/g,"@@")),d[a]=e});if(g=c.base_uri){d.protocol||(d.protocol=g.protocol),d.userInfo||(d.userInfo=g.userInfo),!d.port&&d.host=="mce_host"&&(d.port=g.port);if(!d.host||d.host=="mce_host")d.host=g.host;d.source=""}},setPath:function(a){var b=this;a=/^(.*?)\/?(\w+)?$/.exec(a),b.path=a[0],b.directory=a[1],b.file=a[2],b.source="",b.getURI()},toRelative:function(a){var b=this,c;return a==="./"?a:(a=new tinymce.util.URI(a,{base_uri:b}),a.host!="mce_host"&&b.host!=a.host&&a.host||b.port!=a.port||b.protocol!=a.protocol?a.getURI():(c=b.toRelPath(b.path,a.path),a.query&&(c+="?"+a.query),a.anchor&&(c+="#"+a.anchor),c))},toAbsolute:function(a,b){var a=new tinymce.util.URI(a,{base_uri:this});return a.getURI(this.host==a.host&&this.protocol==a.protocol?b:0)},toRelPath:function(a,b){var c,d=0,e="",f,g;a=a.substring(0,a.lastIndexOf("/")),a=a.split("/"),c=b.split("/");if(a.length>=c.length)for(f=0,g=a.length;f<g;f++)if(f>=c.length||a[f]!=c[f]){d=f+1;break}if(a.length<c.length)for(f=0,g=c.length;f<g;f++)if(f>=a.length||a[f]!=c[f]){d=f+1;break}if(d==1)return b;for(f=0,g=a.length-(d-1);f<g;f++)e+="../";for(f=d-1,g=c.length;f<g;f++)f!=d-1?e+="/"+c[f]:e+=c[f];return e},toAbsPath:function(b,c){var d,e=0,f=[],g,h;g=/\/$/.test(c)?"/":"",b=b.split("/"),c=c.split("/"),a(b,function(a){a&&f.push(a)}),b=f;for(d=c.length-1,f=[];d>=0;d--){if(c[d].length==0||c[d]==".")continue;if(c[d]==".."){e++;continue}if(e>0){e--;continue}f.push(c[d])}return d=b.length-e,d<=0?h=f.reverse().join("/"):h=b.slice(0,d).join("/")+"/"+f.reverse().join("/"),h.indexOf("/")!==0&&(h="/"+h),g&&h.lastIndexOf("/")!==h.length-1&&(h+=g),h},getURI:function(a){var b,c=this;if(!c.source||a)b="",a||(c.protocol&&(b+=c.protocol+"://"),c.userInfo&&(b+=c.userInfo+"@"),c.host&&(b+=c.host),c.port&&(b+=":"+c.port)),c.path&&(b+=c.path),c.query&&(b+="?"+c.query),c.anchor&&(b+="#"+c.anchor),c.source=b;return c.source}})}(),function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(b){var c=this.get(b),d;return c&&a(c.split("&"),function(a){a=a.split("="),d=d||{},d[unescape(a[0])]=unescape(a[1])}),d},setHash:function(b,c,d,e,f,g){var h="";a(c,function(a,b){h+=(h?"&":"")+escape(b)+"="+escape(a)}),this.set(b,h,d,e,f,g)},get:function(a){var b=document.cookie,c,d=a+"=",e;if(!b)return;e=b.indexOf("; "+d);if(e==-1){e=b.indexOf(d);if(e!=0)return null}else e+=2;return c=b.indexOf(";",e),c==-1&&(c=b.length),unescape(b.substring(e+d.length,c))},set:function(a,b,c,d,e,f){document.cookie=a+"="+escape(b)+(c?"; expires="+c.toGMTString():"")+(d?"; path="+escape(d):"")+(e?"; domain="+e:"")+(f?"; secure":"")},remove:function(a,b){var c=new Date;c.setTime(c.getTime()-1e3),this.set(a,"",c,b,c)}})}(),function(){function serialize(a,b){var c,d,e;b=b||'"';if(a==null)return"null";e=typeof a;if(e=="string")return d="\bb\tt\nn\ff\rr\"\"''\\\\",b+a.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,e){return b==='"'&&a==="'"?a:(c=d.indexOf(e),c+1?"\\"+d.charAt(c+1):(a=e.charCodeAt().toString(16),"\\u"+"0000".substring(a.length)+a))})+b;if(e=="object"){if(a.hasOwnProperty&&a instanceof Array){for(c=0,d="[";c<a.length;c++)d+=(c>0?",":"")+serialize(a[c],b);return d+"]"}d="{";for(c in a)a.hasOwnProperty(c)&&(d+=typeof a[c]!="function"?(d.length>1?","+b:b)+c+b+":"+serialize(a[c],b):"");return d+"}"}return""+a}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}}(),tinymce.create("static tinymce.util.XHR",{send:function(a){function f(a){b=0;try{b=new ActiveXObject(a)}catch(c){}return b}var b,c,d=window,e=0;a.scope=a.scope||this,a.success_scope=a.success_scope||a.scope,a.error_scope=a.error_scope||a.scope,a.async=a.async===!1?!1:!0,a.data=a.data||"",b=d.XMLHttpRequest?new XMLHttpRequest:f("Microsoft.XMLHTTP")||f("Msxml2.XMLHTTP");if(b){b.overrideMimeType&&b.overrideMimeType(a.content_type),b.open(a.type||(a.data?"POST":"GET"),a.url,a.async),a.content_type&&b.setRequestHeader("Content-Type",a.content_type),b.setRequestHeader("X-Requested-With","XMLHttpRequest"),b.send(a.data);function g(){!a.async||b.readyState==4||e++>1e4?(a.success&&e<1e4&&b.status==200?a.success.call(a.success_scope,""+b.responseText,b,a):a.error&&a.error.call(a.error_scope,e>1e4?"TIMED_OUT":"GENERAL",b,a),b=null):d.setTimeout(g,10)}if(!a.async)return g();c=d.setTimeout(g,10)}}}),function(){var a=tinymce.extend,b=tinymce.util.JSON,c=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(b){this.settings=a({},b),this.count=0},send:function(d){var e=d.error,f=d.success;d=a(this.settings,d),d.success=function(a,c){a=b.parse(a),typeof a=="undefined"&&(a={error:"JSON Parse error."}),a.error?e.call(d.error_scope||d.scope,a.error,c):f.call(d.success_scope||d.scope,a.result)},d.error=function(a,b){e&&e.call(d.error_scope||d.scope,a,b)},d.data=b.serialize({id:d.id||"c"+this.count++,method:d.method,params:d.params}),d.content_type="application/json",c.send(d)},"static":{sendRPC:function(a){return(new tinymce.util.JSONRequest).send(a)}}})}(),function(a){a.VK={DELETE:46,BACKSPACE:8,ENTER:13,TAB:9,SPACEBAR:32,UP:38,DOWN:40,modifierPressed:function(a){return a.shiftKey||a.ctrlKey||a.altKey}}}(tinymce),function(a){function e(e){var f=e.dom,g=e.selection;e.onKeyDown.add(function(e,h){var i,j,k,l,m;m=h.keyCode==d;if((m||h.keyCode==c)&&!b.modifierPressed(h)){h.preventDefault(),i=g.getRng(),j=f.getParent(i.startContainer,f.isBlock),m&&(j=f.getNext(j,f.isBlock));if(j){k=j.firstChild;while(k&&k.nodeType==3&&k.nodeValue.length==0)k=k.nextSibling;k&&k.nodeName==="SPAN"&&(l=k.cloneNode(!1))}e.getDoc().execCommand(m?"ForwardDelete":"Delete",!1,null),j=f.getParent(i.startContainer,f.isBlock),a.each(f.select("span.Apple-style-span,font.Apple-style-span",j),function(a){var b=g.getBookmark();l?f.replace(l.cloneNode(!1),a,!0):f.remove(a,!0),g.moveToBookmark(b)})}})}function f(a){a.onKeyUp.add(function(a,b){var e=b.keyCode;if(e==d||e==c)if(a.dom.isEmpty(a.getBody())){a.setContent("",{format:"raw"}),a.nodeChanged();return}})}function g(a){a.dom.bind(a.getDoc(),"focusin",function(){a.selection.setRng(a.selection.getRng())})}function h(b){b.onKeyDown.add(function(b,d){if(d.keyCode===c&&b.selection.isCollapsed()&&b.selection.getRng(!0).startOffset===0){var e=b.selection.getNode(),f=e.previousSibling;f&&f.nodeName&&f.nodeName.toLowerCase()==="hr"&&(b.dom.remove(f),a.dom.Event.cancel(d))}})}function i(a){Range.prototype.getClientRects||a.onMouseDown.add(function(a,b){if(b.target.nodeName==="HTML"){var c=a.getBody();c.blur(),setTimeout(function(){c.focus()},0)}})}function j(a){a.onClick.add(function(a,b){b=b.target,/^(IMG|HR)$/.test(b.nodeName)&&a.selection.getSel().setBaseAndExtent(b,0,b,1),b.nodeName=="A"&&a.dom.hasClass(b,"mceItemAnchor")&&a.selection.select(b),a.nodeChanged()})}function k(a){a.onKeyDown.add(function(a,c){function d(a){var b=a.selection.getNode(),c="h1,h2,h3,h4,h5,h6";return a.dom.is(b,c)||a.dom.getParent(b,c)!==null}c.keyCode===b.ENTER&&!b.modifierPressed(c)&&d(a)&&setTimeout(function(){var b=a.selection.getNode();a.dom.is(b,"p")&&(a.dom.setAttrib(b,"style",null),a.execCommand("mceCleanup"))},0)})}function l(b){var c,d;b.dom.bind(b.getDoc(),"selectionchange",function(){d&&(clearTimeout(d),d=0),d=window.setTimeout(function(){var d=b.selection.getRng();if(!c||!a.dom.RangeUtils.compareRanges(d,c))b.nodeChanged(),c=d},50)})}function m(a){document.body.setAttribute("role","application")}var b=a.VK,c=b.BACKSPACE,d=b.DELETE;a.create("tinymce.util.Quirks",{Quirks:function(b){a.isWebKit&&(e(b),f(b),g(b),j(b),a.isIDevice&&l(b)),a.isIE&&(h(b),f(b),m(b),k(b)),a.isGecko&&(h(b),i(b))}})}(tinymce),function(a){function j(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.textContent||b.innerText||a}function k(a,b){var d,e,f,g={};if(a){a=a.split(","),b=b||10;for(d=0;d<a.length;d+=2)e=String.fromCharCode(parseInt(a[d],b)),c[e]||(f="&"+a[d+1]+";",g[e]=f,g[f]=e);return g}}var b,c,d,e=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=/[<>&\"\']/g,h=/&(#x|#)?([\w]+);/g,i={128:"€",130:"",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"",140:"Œ",142:"Ž",145:"",146:"",147:"“",148:"”",149:"•",150:"",151:"—",152:"˜",153:"™",154:"š",155:"",156:"œ",158:"ž",159:"Ÿ"};c={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"},d={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},b=k("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),a.html=a.html||{},a.html.Entities={encodeRaw:function(a,b){return a.replace(b?e:f,function(a){return c[a]||a})},encodeAllRaw:function(a){return(""+a).replace(g,function(a){return c[a]||a})},encodeNumeric:function(a,b){return a.replace(b?e:f,function(a){return a.length>1?"&#"+((a.charCodeAt(0)-55296)*1024+(a.charCodeAt(1)-56320)+65536)+";":c[a]||"&#"+a.charCodeAt(0)+";"})},encodeNamed:function(a,d,g){return g=g||b,a.replace(d?e:f,function(a){return c[a]||g[a]||a})},getEncodeFunc:function(d,g){function i(a,b){return a.replace(b?e:f,function(a){return c[a]||g[a]||"&#"+a.charCodeAt(0)+";"||a})}function j(a,b){return h.encodeNamed(a,b,g)}var h=a.html.Entities;return g=k(g)||b,d=a.makeMap(d.replace(/\+/g,",")),d.named&&d.numeric?i:d.named?g?j:h.encodeNamed:d.numeric?h.encodeNumeric:h.encodeRaw},decode:function(a){return a.replace(h,function(a,c,e){return c?(e=parseInt(e,c.length===2?16:10),e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(e&1023))):i[e]||String.fromCharCode(e)):d[a]||b[a]||j(a)})}}}(tinymce),tinymce.html.Styles=function(a,b){function l(a,b,c,d){function e(a){return a=parseInt(a).toString(16),a.length>1?a:"0"+a}return"#"+e(b)+e(c)+e(d)}var c=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,d=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,e=/\s*([^:]+):\s*([^;]+);?/g,f=/\s+$/,g=/rgb/,h,i,j={},k;a=a||{},k="\\\" \\' \\; \\: ; : ".split(" ");for(i=0;i<k.length;i++)j[k[i]]=""+i,j[""+i]=k[i];return{toHex:function(a){return a.replace(c,l)},parse:function(b){function p(a,b){var c,d,e,f;c=g[a+"-top"+b];if(!c)return;d=g[a+"-right"+b];if(c!=d)return;e=g[a+"-bottom"+b];if(d!=e)return;f=g[a+"-left"+b];if(e!=f)return;g[a+b]=f,delete g[a+"-top"+b],delete g[a+"-right"+b],delete g[a+"-bottom"+b],delete g[a+"-left"+b]}function q(a){var b=g[a],c;if(!b||b.indexOf(" ")<0)return;b=b.split(" "),c=b.length;while(c--)if(b[c]!==b[0])return!1;return g[a]=b[0],!0}function r(a,b,c,d){if(!q(b))return;if(!q(c))return;if(!q(d))return;g[a]=g[b]+" "+g[c]+" "+g[d],delete g[b],delete g[c],delete g[d]}function s(a){return m=!0,j[a]}function t(a,b){return m&&(a=a.replace(/\uFEFF[0-9]/g,function(a){return j[a]})),b||(a=a.replace(/\\([\'\";:])/g,"$1")),a}var g={},h,i,k,m,n=a.url_converter,o=a.url_converter_scope||this;if(b){b=b.replace(/\\[\"\';:\uFEFF]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(a){return a.replace(/[;:]/g,s)});while(h=e.exec(b)){i=h[1].replace(f,"").toLowerCase(),k=h[2].replace(f,"");if(i&&k.length>0){if(i==="font-weight"&&k==="700")k="bold";else if(i==="color"||i==="background-color")k=k.toLowerCase();k=k.replace(c,l),k=k.replace(d,function(a,b,c,d,e,f){return e=e||f,e?(e=t(e),"'"+e.replace(/\'/g,"\\'")+"'"):(b=t(b||c||d),n&&(b=n.call(o,b,"style")),"url('"+b.replace(/\'/g,"\\'")+"')")}),g[i]=m?t(k,!0):k}e.lastIndex=h.index+h[0].length}p("border",""),p("border","-width"),p("border","-color"),p("border","-style"),p("padding",""),p("margin",""),r("border","border-width","border-style","border-color"),g.border==="medium none"&&delete g.border}return g},serialize:function(a,c){function g(c){var e,f,g,i;e=b.styles[c];if(e)for(f=0,g=e.length;f<g;f++)c=e[f],i=a[c],i!==h&&i.length>0&&(d+=(d.length>0?" ":"")+c+": "+i+";")}var d="",e,f;if(c&&b&&b.styles)g("*"),g(c);else for(e in a)f=a[e],f!==h&&f.length>0&&(d+=(d.length>0?" ":"")+e+": "+f+";");return d}}},function(a){function l(a,b){return a.split(b||",")}function m(a,b){function e(b){return b.replace(/[A-Z]+/g,function(b){return e(a[b])})}var c,d={};for(c in a)a.hasOwnProperty(c)&&(a[c]=e(a[c]));return e(b).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(a,b,c,e){c=l(c,"|"),d[b]={attributes:j(c),attributesOrder:c,children:j(e,"|",{"#comment":{}})}}),d}var b={},c,d,e,f,g={},h,i,j=a.makeMap,k=a.each;d="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup",d=j(d,",",j(d.toUpperCase())),b=m({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]"
),c=j("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls"),e=j("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source"),f=a.extend(j("td,th,iframe,video,audio,object"),e),h=j("pre,script,style,textarea"),i=j("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),a.html.Schema=function(m){function t(a){return new RegExp("^"+a.replace(/([?+*])/g,".$1")+"$")}function u(b){var c,d,e,f,g,h,i,k,m,n,p,r,s,u,v,w,x,y,z,A,B,C,D=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,E=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,F=/[*?+]/;if(b){b=l(b),o["@"]&&(x=o["@"].attributes,y=o["@"].attributesOrder);for(c=0,d=b.length;c<d;c++){h=D.exec(b[c]);if(h){v=h[1],n=h[2],w=h[3],m=h[4],s={},u=[],i={attributes:s,attributesOrder:u},v==="#"&&(i.paddEmpty=!0),v==="-"&&(i.removeEmpty=!0);if(x){for(A in x)s[A]=x[A];u.push.apply(u,y)}if(m){m=l(m,"|");for(e=0,f=m.length;e<f;e++){h=E.exec(m[e]);if(h){k={},r=h[1],p=h[2].replace(/::/g,":"),v=h[3],C=h[4],r==="!"&&(i.attributesRequired=i.attributesRequired||[],i.attributesRequired.push(p),k.required=!0);if(r==="-"){delete s[p],u.splice(a.inArray(u,p),1);continue}v&&(v==="="&&(i.attributesDefault=i.attributesDefault||[],i.attributesDefault.push({name:p,value:C}),k.defaultValue=C),v===":"&&(i.attributesForced=i.attributesForced||[],i.attributesForced.push({name:p,value:C}),k.forcedValue=C),v==="<"&&(k.validValues=j(C,"?"))),F.test(p)?(i.attributePatterns=i.attributePatterns||[],k.pattern=t(p),i.attributePatterns.push(k)):(s[p]||u.push(p),s[p]=k)}}}!x&&n=="@"&&(x=s,y=u),w&&(i.outputName=n,o[w]=i),F.test(n)?(i.pattern=t(n),q.push(i)):o[n]=i}}}}function v(a){o={},q=[],u(a),k(b,function(a,b){p[b]=a.children})}function w(a){var b=/^(~)?(.+)$/;a&&k(l(a),function(a){var c=b.exec(a),e=c[1]==="~",f=e?"span":"div",h=c[2];p[h]=p[f],g[h]=f,e||(d[h]={}),k(p,function(a,b){a[f]&&(a[h]=a[f])})})}function x(a){var b=/^([+\-]?)(\w+)\[([^\]]+)\]$/;a&&k(l(a),function(a){var c=b.exec(a),d,e;c&&(e=c[1],e?d=p[c[2]]:d=p[c[2]]={"#comment":{}},d=p[c[2]],k(l(c[3],"|"),function(a){e==="-"?delete d[a]:d[a]={}}))})}function y(a){var b=o[a],c;if(b)return b;c=q.length;while(c--){b=q[c];if(b.pattern.test(a))return b}}var n=this,o={},p={},q=[],r,s;m=m||{},m.verify_html===!1&&(m.valid_elements="*[*]"),m.valid_styles&&(r={},k(m.valid_styles,function(b,c){r[c]=a.explode(b)})),s=m.whitespace_elements?j(m.whitespace_elements):h,m.valid_elements?v(m.valid_elements):(k(b,function(a,b){o[b]={attributes:a.attributes,attributesOrder:a.attributesOrder},p[b]=a.children}),k(l("strong/b,em/i"),function(a){a=l(a,"/"),o[a[1]].outputName=a[0]}),o.img.attributesDefault=[{name:"alt",value:""}],k(l("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr"),function(a){o[a].removeEmpty=!0}),k(l("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(a){o[a].paddEmpty=!0})),w(m.custom_elements),x(m.valid_children),u(m.extended_valid_elements),x("+ol[ul|ol],+ul[ul|ol]"),y("span")||u("span[!data-mce-type|*]"),m.invalid_elements&&a.each(a.explode(m.invalid_elements),function(a){o[a]&&delete o[a]}),n.children=p,n.styles=r,n.getBoolAttrs=function(){return c},n.getBlockElements=function(){return d},n.getShortEndedElements=function(){return e},n.getSelfClosingElements=function(){return i},n.getNonEmptyElements=function(){return f},n.getWhiteSpaceElements=function(){return s},n.isValidChild=function(a,b){var c=p[a];return!!c&&!!c[b]},n.getElementRule=y,n.getCustomElements=function(){return g},n.addValidElements=u,n.setValidElements=v,n.addCustomElements=w,n.addValidChildren=x},a.html.Schema.boolAttrMap=c,a.html.Schema.blockElementsMap=d}(tinymce),function(a){a.html.SaxParser=function(b,c){var d=this,e=function(){};b=b||{},d.schema=c=c||new a.html.Schema,b.fix_self_closing!==!1&&(b.fix_self_closing=!0),a.each("comment cdata text start end pi doctype".split(" "),function(a){a&&(d[a]=b[a]||e)}),d.parse=function(d){function N(a){var b,c;b=j.length;while(b--)if(j[b].name===a)break;if(b>=0){for(c=j.length-1;c>=b;c--)a=j[c],a.valid&&e.end(a.name);j.length=b}}var e=this,f,g=0,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=0,K=a.html.Entities.decode,L,M;F=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/)>))","g"),G=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g,H={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi},q=c.getShortEndedElements(),E=c.getSelfClosingElements(),r=c.getBoolAttrs(),t=b.validate,p=b.remove_internals,L=b.fix_self_closing,M=a.isIE,y=/^:/;while(f=F.exec(d)){g<f.index&&e.text(K(d.substr(g,f.index-g)));if(h=f[6])h=h.toLowerCase(),M&&y.test(h)&&(h=h.substr(1)),N(h);else if(h=f[7]){h=h.toLowerCase(),M&&y.test(h)&&(h=h.substr(1)),s=h in q,L&&E[h]&&j.length>0&&j[j.length-1].name===h&&N(h);if(!t||(u=c.getElementRule(h))){v=!0,t&&(z=u.attributes,A=u.attributePatterns),(x=f[8])?(o=x.indexOf("data-mce-type")!==-1,o&&p&&(v=!1),k=[],k.map={},x.replace(G,function(a,b,c,d,e){var f,g;b=b.toLowerCase(),c=b in r?b:K(c||d||e||"");if(t&&!o&&b.indexOf("data-")!==0){f=z[b];if(!f&&A){g=A.length;while(g--){f=A[g];if(f.pattern.test(b))break}g===-1&&(f=null)}if(!f)return;if(f.validValues&&!(c in f.validValues))return}k.map[b]=c,k.push({name:b,value:c})})):(k=[],k.map={});if(t&&!o){B=u.attributesRequired,C=u.attributesDefault,D=u.attributesForced;if(D){l=D.length;while(l--)w=D[l],n=w.name,I=w.value,I==="{$uid}"&&(I="mce_"+J++),k.map[n]=I,k.push({name:n,value:I})}if(C){l=C.length;while(l--)w=C[l],n=w.name,n in k.map||(I=w.value,I==="{$uid}"&&(I="mce_"+J++),k.map[n]=I,k.push({name:n,value:I}))}if(B){l=B.length;while(l--)if(B[l]in k.map)break;l===-1&&(v=!1)}k.map["data-mce-bogus"]&&(v=!1)}v&&e.start(h,k,s)}else v=!1;if(i=H[h]){i.lastIndex=g=f.index+f[0].length,(f=i.exec(d))?(v&&(m=d.substr(g,f.index-g)),g=f.index+f[0].length):(m=d.substr(g),g=d.length),v&&m.length>0&&e.text(m,!0),v&&e.end(h),F.lastIndex=g;continue}s||(!x||x.indexOf("/")!=x.length-1?j.push({name:h,valid:v}):v&&e.end(h))}else(h=f[1])?e.comment(h):(h=f[2])?e.cdata(h):(h=f[3])?e.doctype(h):(h=f[4])&&e.pi(h,f[5]);g=f.index+f[0].length}g<d.length&&e.text(K(d.substr(g)));for(l=j.length-1;l>=0;l--)h=j[l],h.valid&&e.end(h.name)}}}(tinymce),function(a){function d(a,b,c){var d,e,f=c?"lastChild":"firstChild",g=c?"prev":"next";if(a[f])return a[f];if(a!==b){d=a[g];if(d)return d;for(e=a.parent;e&&e!==b;e=e.parent){d=e[g];if(d)return d}}}function e(a,b){this.name=a,this.type=b,b===1&&(this.attributes=[],this.attributes.map={})}var b=/^[ \t\r\n]*$/,c={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};a.extend(e.prototype,{replace:function(a){var b=this;return a.parent&&a.remove(),b.insert(a,b),b.remove(),b},attr:function(a,b){var c=this,d,e,f;if(typeof a!="string"){for(e in a)c.attr(e,a[e]);return c}if(d=c.attributes){if(b!==f){if(b===null){if(a in d.map){delete d.map[a],e=d.length;while(e--)if(d[e].name===a)return d=d.splice(e,1),c}return c}if(a in d.map){e=d.length;while(e--)if(d[e].name===a){d[e].value=b;break}}else d.push({name:a,value:b});return d.map[a]=b,c}return d.map[a]}},clone:function(){var a=this,b=new e(a.name,a.type),c,d,f,g,h;if(f=a.attributes){h=[],h.map={};for(c=0,d=f.length;c<d;c++)g=f[c],g.name!=="id"&&(h[h.length]={name:g.name,value:g.value},h.map[g.name]=g.value);b.attributes=h}return b.value=a.value,b.shortEnded=a.shortEnded,b},wrap:function(a){var b=this;return b.parent.insert(a,b),a.append(b),b},unwrap:function(){var a=this,b,c;for(b=a.firstChild;b;)c=b.next,a.insert(b,a,!0),b=c;a.remove()},remove:function(){var a=this,b=a.parent,c=a.next,d=a.prev;return b&&(b.firstChild===a?(b.firstChild=c,c&&(c.prev=null)):d.next=c,b.lastChild===a?(b.lastChild=d,d&&(d.next=null)):c.prev=d,a.parent=a.next=a.prev=null),a},append:function(a){var b=this,c;return a.parent&&a.remove(),c=b.lastChild,c?(c.next=a,a.prev=c,b.lastChild=a):b.lastChild=b.firstChild=a,a.parent=b,a},insert:function(a,b,c){var d;return a.parent&&a.remove(),d=b.parent||this,c?(b===d.firstChild?d.firstChild=a:b.prev.next=a,a.prev=b.prev,a.next=b,b.prev=a):(b===d.lastChild?d.lastChild=a:b.next.prev=a,a.next=b.next,a.prev=b,b.next=a),a.parent=d,a},getAll:function(a){var b=this,c,e=[];for(c=b.firstChild;c;c=d(c,b))c.name===a&&e.push(c);return e},empty:function(){var a=this,b,c,e;if(a.firstChild){b=[];for(e=a.firstChild;e;e=d(e,a))b.push(e);c=b.length;while(c--)e=b[c],e.parent=e.firstChild=e.lastChild=e.next=e.prev=null}return a.firstChild=a.lastChild=null,a},isEmpty:function(a){var c=this,e=c.firstChild,f,g;if(e)do{if(e.type===1){if(e.attributes.map["data-mce-bogus"])continue;if(a[e.name])return!1;f=e.attributes.length;while(f--){g=e.attributes[f].name;if(g==="name"||g.indexOf("data-")===0)return!1}}if(e.type===3&&!b.test(e.value))return!1}while(e=d(e,c));return!0},walk:function(a){return d(this,null,a)}}),a.extend(e,{create:function(a,b){var d,f;d=new e(a,c[a]||1);if(b)for(f in b)d.attr(f,b[f]);return d}}),a.html.Node=e}(tinymce),function(a){var b=a.html.Node;a.html.DomParser=function(c,d){function j(c){var f,g,h,i,j,k,l,m,n,o,p,q,r,s;q=a.makeMap("tr,td,th,tbody,thead,tfoot,table"),p=d.getNonEmptyElements();for(f=0;f<c.length;f++){g=c[f];if(!g.parent)continue;i=[g];for(h=g.parent;h&&!d.isValidChild(h.name,g.name)&&!q[h.name];h=h.parent)i.push(h);if(h&&i.length>1){i.reverse(),j=k=e.filterNode(i[0].clone());for(n=0;n<i.length-1;n++){d.isValidChild(k.name,i[n].name)?(l=e.filterNode(i[n].clone()),k.append(l)):l=k;for(m=i[n].firstChild;m&&m!=i[n+1];)s=m.next,l.append(m),m=s;k=l}j.isEmpty(p)?h.insert(g,i[0],!0):(h.insert(j,i[0],!0),h.insert(g,j)),h=i[0],(h.isEmpty(p)||h.firstChild===h.lastChild&&h.firstChild.name==="br")&&h.empty().remove()}else if(g.parent){if(g.name==="li"){r=g.prev;if(!r||r.name!=="ul"&&r.name!=="ul"){r=g.next;if(!r||r.name!=="ul"&&r.name!=="ul"){g.wrap(e.filterNode(new b("ul",1)));continue}r.insert(g,r.firstChild,!0);continue}r.append(g);continue}d.isValidChild(g.parent.name,"div")&&d.isValidChild("div",g.name)?g.wrap(e.filterNode(new b("div",1))):g.name==="style"||g.name==="script"?g.empty().remove():g.unwrap()}}}var e=this,f={},g=[],h={},i={};c=c||{},c.validate="validate"in c?c.validate:!0,c.root_name=c.root_name||"body",e.schema=d=d||new a.html.Schema,e.filterNode=function(a){var b,c,d;c in f&&(d=h[c],d?d.push(a):h[c]=[a]),b=g.length;while(b--)c=g[b].name,c in a.attributes.map&&(d=i[c],d?d.push(a):i[c]=[a]);return a},e.addNodeFilter=function(b,c){a.each(a.explode(b),function(a){var b=f[a];b||(f[a]=b=[]),b.push(c)})},e.addAttributeFilter=function(b,c){a.each(a.explode(b),function(a){var b;for(b=0;b<g.length;b++)if(g[b].name===a){g[b].callbacks.push(c);return}g.push({name:a,callbacks:[c]})})},e.parse=function(e,k){function F(){var a=m.firstChild,b,c;while(a)b=a.next,a.type==3||a.type==1&&a.name!=="p"&&!w[a.name]&&!a.attr("data-mce-type")?c?c.append(a):(c=G(E,1),m.insert(c,a),c.append(a)):c=null,a=b}function G(a,c){var d=new b(a,c),e;return a in f&&(e=h[a],e?e.push(d):h[a]=[d]),d}function H(a){var b,c,d;for(b=a.prev;b&&b.type===3;)c=b.value.replace(z,""),c.length>0?(b.value=c,b=b.prev):(d=b.prev,b.remove(),b=d)}var l,m,n,o,p,q,r,s,t,u,v,w,x,y=[],z,A,B,C,D,E;k=k||{},h={},i={},w=a.extend(a.makeMap("script,style,head,html,body,title,meta,param"),d.getBlockElements()),D=d.getNonEmptyElements(),C=d.children,v=c.validate,E="forced_root_block"in k?k.forced_root_block:c.forced_root_block,B=d.getWhiteSpaceElements(),x=/^[ \t\r\n]+/,z=/[ \t\r\n]+$/,A=/[ \t\r\n]+/g,l=new a.html.SaxParser({validate:v,fix_self_closing:!v,cdata:function(a){n.append(G("#cdata",4)).value=a},text:function(a,b){var c;B[n.name]||(a=a.replace(A," "),n.lastChild&&w[n.lastChild.name]&&(a=a.replace(x,""))),a.length!==0&&(c=G("#text",3),c.raw=!!b,n.append(c).value=a)},comment:function(a){n.append(G("#comment",8)).value=a},pi:function(a,b){n.append(G(a,7)).value=b,H(n)},doctype:function(a){var b;b=n.append(G("#doctype",10)),b.value=a,H(n)},start:function(a,b,c){var e,f,h,j,k,l,m,o;h=v?d.getElementRule(a):{};if(h){e=G(h.outputName||a,1),e.attributes=b,e.shortEnded=c,n.append(e),o=C[n.name],o&&C[e.name]&&!o[e.name]&&y.push(e),f=g.length;while(f--)k=g[f].name,k in b.map&&(t=i[k],t?t.push(e):i[k]=[e]);w[a]&&H(e),c||(n=e)}},end:function(a){var c,e,f,g,h;e=v?d.getElementRule(a):{};if(e){if(w[a]){if(!B[n.name]){for(c=n.firstChild;c&&c.type===3;)f=c.value.replace(x,""),f.length>0?(c.value=f,c=c.next):(g=c.next,c.remove(),c=g);for(c=n.lastChild;c&&c.type===3;)f=c.value.replace(z,""),f.length>0?(c.value=f,c=c.prev):(g=c.prev,c.remove(),c=g)}c=n.prev,c&&c.type===3&&(f=c.value.replace(x,""),f.length>0?c.value=f:c.remove())}if(e.removeEmpty||e.paddEmpty)if(n.isEmpty(D))if(e.paddEmpty)n.empty().append(new b("#text","3")).value=" ";else if(!n.attributes.map.name){h=n.parent,n.empty().remove(),n=h;return}n=n.parent}}},d),m=n=new b(k.context||c.root_name,11),l.parse(e),v&&y.length&&(k.context?k.invalid=!0:j(y)),E&&m.name=="body"&&F();if(!k.invalid){for(u in h){t=f[u],o=h[u],r=o.length;while(r--)o[r].parent||o.splice(r,1);for(p=0,q=t.length;p<q;p++)t[p](o,u,k)}for(p=0,q=g.length;p<q;p++){t=g[p];if(t.name in i){o=i[t.name],r=o.length;while(r--)o[r].parent||o.splice(r,1);for(r=0,s=t.callbacks.length;r<s;r++)t.callbacks[r](o,t.name,k)}}}return m},c.remove_trailing_brs&&e.addNodeFilter("br",function(b,c){var e,f=b.length,g,h=d.getBlockElements(),i=d.getNonEmptyElements(),j,k,l;h.body=1;for(e=0;e<f;e++){g=b[e],j=g.parent;if(h[g.parent.name]&&g===j.lastChild){k=g.prev;while(k){l=k.name;if(l!=="span"||k.attr("data-mce-type")!=="bookmark"){if(l!=="br")break;if(l==="br"){g=null;break}}k=k.prev}g&&(g.remove(),j.isEmpty(i)&&(elementRule=d.getElementRule(j.name),elementRule&&(elementRule.removeEmpty?j.remove():elementRule.paddEmpty&&(j.empty().append(new a.html.Node("#text",3)).value=" "))))}}})}}(tinymce),tinymce.html.Writer=function(a){var b=[],c,d,e,f,g;return a=a||{},c=a.indent,d=tinymce.makeMap(a.indent_before||""),e=tinymce.makeMap(a.indent_after||""),f=tinymce.html.Entities.getEncodeFunc(a.entity_encoding||"raw",a.entities),g=a.element_format=="html",{start:function(a,h,i){var j,k,l,m;c&&d[a]&&b.length>0&&(m=b[b.length-1],m.length>0&&m!=="\n"&&b.push("\n")),b.push("<",a);if(h)for(j=0,k=h.length;j<k;j++)l=h[j],b.push(" ",l.name,'="',f(l.value,!0),'"');!i||g?b[b.length]=">":b[b.length]=" />",i&&c&&e[a]&&b.length>0&&(m=b[b.length-1],m.length>0&&m!=="\n"&&b.push("\n"))},end:function(a){var d;b.push("</",a,">"),c&&e[a]&&b.length>0&&(d=b[b.length-1],d.length>0&&d!=="\n"&&b.push("\n"))},text:function(a,c){a.length>0&&(b[b.length]=c?a:f(a))},cdata:function(a){b.push("<![CDATA[",a,"]]>")},comment:function(a){b.push("<!--",a,"-->")},pi:function(a,d){d?b.push("<?",a," ",d,"?>"):b.push("<?",a,"?>"),c&&b.push("\n")},doctype:function(a){b.push("<!DOCTYPE",a,">",c?"\n":"")},reset:function(){b.length=0},getContent:function(){return b.join("").replace(/\n$/,"")}}},function(a){a.html.Serializer=function(b,c){var d=this,e=new a.html.Writer(b);b=b||{},b.validate="validate"in b?b.validate:!0,d.schema=c=c||new a.html.Schema,d.writer=e,d.serialize=function(a){function g(a){var b=d[a.type],h,i,j,k,l,m,n,o,p;if(!b){h=a.name,i=a.shortEnded,j=a.attributes;if(f&&j&&j.length>1){m=[],m.map={},p=c.getElementRule(a.name);for(n=0,o=p.attributesOrder.length;n<o;n++)k=p.attributesOrder[n],k in j.map&&(l=j.map[k],m.map[k]=l,m.push({name:k,value:l}));for(n=0,o=j.length;n<o;n++)k=j[n].name,k in m.map||(l=j.map[k],m.map[k]=l,m.push({name:k,value:l}));j=m}e.start(a.name,j,i);if(!i){if(a=a.firstChild)do g(a);while(a=a.next);e.end(h)}}else b(a)}var d,f;return f=b.validate,d={3:function(a,b){e.text(a.value,a.raw)},8:function(a){e.comment(a.value)},7:function(a){e.pi(a.name,a.value)},10:function(a){e.doctype(a.value)},4:function(a){e.cdata(a.value)},11:function(a){if(a=a.firstChild)do g(a);while(a=a.next)}},e.reset(),a.type==1&&!b.inner?g(a):d[11](a),e.getContent()}}}(tinymce),function(a){var b=a.each,c=a.is,d=a.isWebKit,e=a.isIE,f=a.html.Entities,g=/^([a-z0-9],?)+$/i,h=a.html.Schema.blockElementsMap,i=/^[ \t\r\n]*$/;a.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(b,c){var d=this,f,g;d.doc=b,d.win=window,d.files={},d.cssFlicker=!1,d.counter=0,d.stdMode=!a.isIE||b.documentMode>=8,d.boxModel=!a.isIE||b.compatMode=="CSS1Compat"||d.stdMode,d.hasOuterHTML="outerHTML"in b.createElement("a"),d.settings=c=a.extend({keep_values:!1,hex_colors:1},c),d.schema=c.schema,d.styles=new a.html.Styles({url_converter:c.url_converter,url_converter_scope:c.url_converter_scope},c.schema);if(a.isIE6)try{b.execCommand("BackgroundImageCache",!1,!0)}catch(h){d.cssFlicker=!0}if(e&&c.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(a){b.createElement(a)});for(g in c.schema.getCustomElements())b.createElement(g)}a.addUnload(d.destroy,d)},getRoot:function(){var a=this,b=a.settings;return b&&a.get(b.root_element)||a.doc.body},getViewPort:function(a){var b,c;return a=a?a:this.win,b=a.document,c=this.boxModel?b.documentElement:b.body,{x:a.pageXOffset||c.scrollLeft,y:a.pageYOffset||c.scrollTop,w:a.innerWidth||c.clientWidth,h:a.innerHeight||c.clientHeight}},getRect:function(a){var b,c=this,d;return a=c.get(a),b=c.getPos(a),d=c.getSize(a),{x:b.x,y:b.y,w:d.w,h:d.h}},getSize:function(a){var b=this,c,d;return a=b.get(a),c=b.getStyle(a,"width"),d=b.getStyle(a,"height"),c.indexOf("px")===-1&&(c=0),d.indexOf("px")===-1&&(d=0),{w:parseInt(c)||a.offsetWidth||a.clientWidth,h:parseInt(d)||a.offsetHeight||a.clientHeight}},getParent:function(a,b,c){return this.getParents(a,b,c,!1)},getParents:function(a,b,d,e){var f=this,g,h=f.settings,i=[];a=f.get(a),e=e===undefined,h.strict_root&&(d=d||f.getRoot()),c(b,"string")&&(g=b,b==="*"?b=function(a){return a.nodeType==1}:b=function(a){return f.is(a,g)});while(a){if(a==d||!a.nodeType||a.nodeType===9)break;if(!b||b(a)){if(!e)return a;i.push(a)}a=a.parentNode}return e?i:null},get:function(a){var b;if(a&&this.doc&&typeof a=="string"){b=a,a=this.doc.getElementById(a);if(a&&a.id!==b)return this.doc.getElementsByName(b)[1]}return a},getNext:function(a,b){return this._findSib(a,b,"nextSibling")},getPrev:function(a,b){return this._findSib(a,b,"previousSibling")},add:function(a,b,d,e,f){var g=this;return this.run(a,function(a){var h,i;return h=c(b,"string")?g.doc.createElement(b):b,g.setAttribs(h,d),e&&(e.nodeType?h.appendChild(e):g.setHTML(h,e)),f?h:a.appendChild(h)})},create:function(a,b,c){return this.add(this.doc.createElement(a),a,b,c,1)},createHTML:function(a,b,c){var d="",e=this,f;d+="<"+a;for(f in b)b.hasOwnProperty(f)&&(d+=" "+f+'="'+e.encode(b[f])+'"');return typeof c!="undefined"?d+">"+c+"</"+a+">":d+" />"},remove:function(b,c){return this.run(b,function(b){var d,e=b.parentNode;if(!e)return null;if(c)while(d=b.firstChild)!a.isIE||d.nodeType!==3||d.nodeValue?e.insertBefore(d,b):b.removeChild(d);return e.removeChild(b)})},setStyle:function(b,c,d){var f=this;return f.run(b,function(g){var h,i;h=g.style,c=c.replace(/-(\D)/g,function(a,b){return b.toUpperCase()}),f.pixelStyles.test(c)&&(a.is(d,"number")||/^[\-0-9\.]+$/.test(d))&&(d+="px");switch(c){case"opacity":if(e){h.filter=d===""?"":"alpha(opacity="+d*100+")";if(!b.currentStyle||!b.currentStyle.hasLayout)h.display="inline-block"}h[c]=h["-moz-opacity"]=h["-khtml-opacity"]=d||"";break;case"float":e?h.styleFloat=d:h.cssFloat=d;break;default:h[c]=d||""}f.settings.update_styles&&f.setAttrib(g,"data-mce-style")})},getStyle:function(a,b,c){a=this.get(a);if(!a)return;if(this.doc.defaultView&&c){b=b.replace(/[A-Z]/g,function(a){return"-"+a});try{return this.doc.defaultView.getComputedStyle(a,null).getPropertyValue(b)}catch(d){return null}}return b=b.replace(/-(\D)/g,function(a,b){return b.toUpperCase()}),b=="float"&&(b=e?"styleFloat":"cssFloat"),a.currentStyle&&c?a.currentStyle[b]:a.style?a.style[b]:undefined},setStyles:function(a,c){var d=this,e=d.settings,f;f=e.update_styles,e.update_styles=0,b(c,function(b,c){d.setStyle(a,c,b)}),e.update_styles=f,e.update_styles&&d.setAttrib(a,e.cssText)},removeAllAttribs:function(a){return this.run(a,function(a){var b,c=a.attributes;for(b=c.length-1;b>=0;b--)a.removeAttributeNode(c.item(b))})},setAttrib:function(a,d,e){var f=this;if(!a||!d)return;return f.settings.strict&&(d=d.toLowerCase()),this.run(a,function(a){var g=f.settings,h=a.getAttribute(d);if(e!==null)switch(d){case"style":if(!c(e,"string")){b(e,function(b,c){f.setStyle(a,c,b)});return}g.keep_values&&(e&&!f._isRes(e)?a.setAttribute("data-mce-style",e,2):a.removeAttribute("data-mce-style",2)),a.style.cssText=e;break;case"class":a.className=e||"";break;case"src":case"href":g.keep_values&&(g.url_converter&&(e=g.url_converter.call(g.url_converter_scope||f,e,d,a)),f.setAttrib(a,"data-mce-"+d,e,2));break;case"shape":a.setAttribute("data-mce-style",e)}c(e)&&e!==null&&e.length!==0?a.setAttribute(d,""+e,2):a.removeAttribute(d,2);if(tinyMCE.activeEditor&&h!=e){var i=tinyMCE.activeEditor;i.onSetAttrib.dispatch(i,a,d,e)}})},setAttribs:function(a,c){var d=this;return this.run(a,function(a){b(c,function(b,c){d.setAttrib(a,c,b)})})},getAttrib:function(b,f,g){var h,i=this,j;b=i.get(b);if(!b||b.nodeType!==1)return g===j?!1:g;c(g)||(g="");if(/^(src|href|style|coords|shape)$/.test(f)){h=b.getAttribute("data-mce-"+f);if(h)return h}e&&i.props[f]&&(h=b[i.props[f]],h=h&&h.nodeValue?h.nodeValue:h),h||(h=b.getAttribute(f,2));if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(f))return b[i.props[f]]===!0&&h===""?f:h?f:"";if(b.nodeName==="FORM"&&b.getAttributeNode(f))return b.getAttributeNode(f).nodeValue;f==="style"&&(h=h||b.style.cssText,h&&(h=i.serializeStyle(i.parseStyle(h),b.nodeName),i.settings.keep_values&&!i._isRes(h)&&b.setAttribute("data-mce-style",h))),d&&f==="class"&&h&&(h=h.replace(/(apple|webkit)\-[a-z\-]+/gi,""));if(e)switch(f){case"rowspan":case"colspan":h===1&&(h="");break;case"size":if(h==="+0"||h===20||h===0)h="";break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":h===0&&(h="");break;case"hspace":h===-1&&(h="");break;case"maxlength":case"tabindex":if(h===32768||h===2147483647||h==="32768")h="";break;case"multiple":case"compact":case"noshade":case"nowrap":if(h===65535)return f;return g;case"shape":h=h.toLowerCase();break;default:f.indexOf("on")===0&&h&&(h=a._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+h))}return h!==j&&h!==null&&h!==""?""+h:g},getPos:function(a,b){var c=this,d=0,e=0,f,g=c.doc,h;a=c.get(a),b=b||g.body;if(a){if(a.getBoundingClientRect)return a=a.getBoundingClientRect(),f=c.boxModel?g.documentElement:g.body,d=a.left+(g.documentElement.scrollLeft||g.body.scrollLeft)-f.clientTop,e=a.top+(g.documentElement.scrollTop||g.body.scrollTop)-f.clientLeft,{x:d,y:e};h=a;while(h&&h!=b&&h.nodeType)d+=h.offsetLeft||0,e+=h.offsetTop||0,h=h.offsetParent;h=a.parentNode;while(h&&h!=b&&h.nodeType)d-=h.scrollLeft||0,e-=h.scrollTop||0,h=h.parentNode}return{x:d,y:e}},parseStyle:function(a){return this.styles.parse(a)},serializeStyle:function(a,b){return this.styles.serialize(a,b)},loadCSS:function(c){var d=this,f=d.doc,g;c||(c=""),g=d.select("head")[0],b(c.split(","),function(b){var c;if(d.files[b])return;d.files[b]=!0,c=d.create("link",{rel:"stylesheet",href:a._addVer(b)}),e&&f.documentMode&&f.recalc&&(c.onload=function(){f.recalc&&f.recalc(),c.onload=null}),g.appendChild(c)})},addClass:function(a,b){return this.run(a,function(a){var c;return b?this.hasClass(a,b)?a.className:(c=this.removeClass(a,b),a.className=(c!=""?c+" ":"")+b):0})},removeClass:function(b,c){var d=this,e;return d.run(b,function(b){var f;return d.hasClass(b,c)?(e||(e=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g")),f=b.className.replace(e," "),f=a.trim(f!=" "?f:""),b.className=f,f||(b.removeAttribute("class"),b.removeAttribute("className")),f):b.className})},hasClass:function(a,b){return a=this.get(a),!a||!b?!1:(" "+a.className+" ").indexOf(" "+b+" ")!==-1},show:function(a){return this.setStyle(a,"display","block")},hide:function(a){return this.setStyle(a,"display","none")},isHidden:function(a){return a=this.get(a),!a||a.style.display=="none"||this.getStyle(a,"display")=="none"},uniqueId:function(a){return(a?a:"mce_")+this.counter++},setHTML:function(a,c){var d=this;return d.run(a,function(a){if(e){while(a.firstChild)a.removeChild(a.firstChild);try{a.innerHTML="<br />"+c,a.removeChild(a.firstChild)}catch(f){a=d.create("div"),a.innerHTML="<br />"+c,b(a.childNodes,function(b,c){c&&a.appendChild(b)})}}else a.innerHTML=c;return c})},getOuterHTML:function(a){var b,c=this;return a=c.get(a),a?a.nodeType===1&&c.hasOuterHTML?a.outerHTML:(b=(a.ownerDocument||c.doc).createElement("body"),b.appendChild(a.cloneNode(!0)),b.innerHTML):null},setOuterHTML:function(a,b,c){function f(a,b,c){var e,f;f=c.createElement("body"),f.innerHTML=b,e=f.lastChild;while(e)d.insertAfter(e.cloneNode(!0),a),e=e.previousSibling;d.remove(a)}var d=this;return this.run(a,function(a){a=d.get(a);if(a.nodeType==1){c=c||a.ownerDocument||d.doc;if(e)try{e&&a.nodeType==1?a.outerHTML=b:f(a,b,c)}catch(g){f(a,b,c)}else f(a,b,c)}})},decode:f.decode,encode:f.encodeAllRaw,insertAfter:function(a,b){return b=this.get(b),this.run(a,function(a){var c,d;return c=b.parentNode,d=b.nextSibling,d?c.insertBefore(a,d):c.appendChild(a),a})},isBlock:function(a){var b=a.nodeType;return b?b===1&&!!h[a.nodeName]:!!h[a]},replace:function(d,e,f){var g=this;return c(e,"array")&&(d=d.cloneNode(!0)),g.run(e,function(c){return f&&b(a.grep(c.childNodes),function(a){d.appendChild(a)}),c.parentNode.replaceChild(d,c)})},rename:function(a,c){var d=this,e;return a.nodeName!=c.toUpperCase()&&(e=d.create(c),b(d.getAttribs(a),function(b){d.setAttrib(e,b.nodeName,d.getAttrib(a,b.nodeName))}),d.replace(e,a,1)),e||a},findCommonAncestor:function(a,b){var c=a,d;while(c){d=b;while(d&&c!=d)d=d.parentNode;if(c==d)break;c=c.parentNode}return!c&&a.ownerDocument?a.ownerDocument.documentElement:c},toHex:function(a){function c(a){return a=parseInt(a).toString(16),a.length>1?a:"0"+a}var b=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(a);return b?(a="#"+c(b[1])+c(b[2])+c(b[3]),a):a},getClasses:function(){function i(c){b(c.imports,function(a){i(a)}),b(c.cssRules||c.rules,function(c){switch(c.type||1){case 1:c.selectorText&&b(c.selectorText.split(","),function(b){b=b.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(b)||!/\.[\w\-]+$/.test(b))return;h=b,b=a._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",b);if(g&&!(b=g(b,h)))return;f[b]||(d.push({"class":b}),f[b]=1)});break;case 3:i(c.styleSheet)}})}var c=this,d=[],e,f={},g=c.settings.class_filter,h;if(c.classes)return c.classes;try{b(c.doc.styleSheets,i)}catch(j){}return d.length>0&&(c.classes=d),d},run:function(a,c,d){var e=this,f;return e.doc&&typeof a=="string"&&(a=e.get(a)),a?(d=d||this,!a.nodeType&&(a.length||a.length===0)?(f=[],b(a,function(a,b){a&&(typeof a=="string"&&(a=e.doc.getElementById(a)),f.push(c.call(d,a,b)))}),f):c.call(d,a)):!1},getAttribs:function(a){var b;return a=this.get(a),a?e?(b=[],a.nodeName=="OBJECT"?a.attributes:(a.nodeName==="OPTION"&&this.getAttrib(a,"selected")&&b.push({specified:1,nodeName:"selected"}),a.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(a){b.push({specified:1,nodeName:a})}),b)):a.attributes:[]},isEmpty:function(b,c){var d=this,e,f,g,h,j,k;b=b.firstChild;if(b){h=new a.dom.TreeWalker(b),c=c||d.schema?d.schema.getNonEmptyElements():null;do{g=b.nodeType;if(g===1){if(b.getAttribute("data-mce-bogus"))continue;j=b.nodeName.toLowerCase();if(c&&c[j]){k=b.parentNode;if(j==="br"&&d.isBlock(k)&&k.firstChild===b&&k.lastChild===b)continue;return!1}f=d.getAttribs(b),e=b.attributes.length;while(e--){j=b.attributes[e].nodeName;if(j==="name"||j==="data-mce-bookmark")return!1}}if(g===3&&!i.test(b.nodeValue))return!1}while(b=h.next())}return!0},destroy:function(b){var c=this;c.events&&c.events.destroy(),c.win=c.doc=c.root=c.events=null,b||a.removeUnload(c.destroy)},createRng:function(){var b=this.doc;return b.createRange?b.createRange():new a.dom.Range(this)},nodeIndex:function(a,b){var c=0,d,e,f;if(a)for(d=a.nodeType,a=a.previousSibling,e=a;a;a=a.previousSibling){f=a.nodeType;if(b&&f==3)if(f==d||!a.nodeValue.length)continue;c++,d=f}return c},split:function(b,c,d){function j(b){function g(a){var b=a.previousSibling&&a.previousSibling.nodeName=="SPAN",c=a.nextSibling&&a.nextSibling.nodeName=="SPAN";return b&&c}var c,d=b.childNodes,f=b.nodeType;if(f==1&&b.getAttribute("data-mce-type")=="bookmark")return;for(c=d.length-1;c>=0;c--)j(d[c]);if(f!=9){if(f==3&&b.nodeValue.length>0){var h=a.trim(b.nodeValue).length;if(!e.isBlock(b.parentNode)||h>0||h==0&&g(b))return}else if(f==1){d=b.childNodes,d.length==1&&d[0]&&d[0].nodeType==1&&d[0].getAttribute("data-mce-type")=="bookmark"&&b.parentNode.insertBefore(d[0],b);if(d.length||/^(br|hr|input|img)$/i.test(b.nodeName))return}e.remove(b)}return b}var e=this,f=e.createRng(),g,h,i;if(b&&c)return f.setStart(b.parentNode,e.nodeIndex(b)),f.setEnd(c.parentNode,e.nodeIndex(c)),g=f.extractContents(),f=e.createRng(),f.setStart(c.parentNode,e.nodeIndex(c)+1),f.setEnd(b.parentNode,e.nodeIndex(b)+1),h=f.extractContents(),i=b.parentNode,i.insertBefore(j(g),b),d?i.replaceChild(d,c):i.insertBefore(c,b),i.insertBefore(j(h),b),e.remove(b),d||c},bind:function(b,c,d,e){var f=this;return f.events||(f.events=new a.dom.EventUtils),f.events.add(b,c,d,e||this)},unbind:function(b,c,d){var e=this;return e.events||(e.events=new a.dom.EventUtils),e.events.remove(b,c,d)},_findSib:function(a,b,d){var e=this,f=b;if(a){c(f,"string")&&(f=function(a){return e.is(a,b)});for(a=a[d];a;a=a[d])if(f(a))return a}return null},_isRes:function(a){return/^(top|left|bottom|right|width|height)/i.test(a)||/;\s*(top|left|bottom|right|width|height)/i.test(a)}}),a.DOM=new a.dom.DOMUtils(document,{process_html:0})}(tinymce),function(a){function b(a){function p(a,b){I(h,a,b)}function q(a,b){I(i,a,b)}function r(a){p(a.parentNode,o(a))}function s(a){p(a.parentNode,o(a)+1)}function t(a){q(a.parentNode,o(a))}function u(a){q(a.parentNode,o(a)+1)}function v(a){a?(c[l]=c[k],c[m]=c[j]):(c[k]=c[l],c[j]=c[m]),c.collapsed=h}function w(a){r(a),u(a)}function x(a){p(a,0),q(a,a.nodeType===1?a.childNodes.length:a.nodeValue.length)}function y(a,b){var d=c[k],e=c[j],f=c[l],g=c[m],h=b.startContainer,i=b.startOffset,n=b.endContainer,o=b.endOffset;if(a===0)return H(d,e,h,i);if(a===1)return H(f,g,h,i);if(a===2)return H(f,g,n,o);if(a===3)return H(d,e,n,o)}function z(){J(g)}function A(){return J(e)}function B(){return J(f)}function C(b){var c=this[k],d=this[j],e,f;c.nodeType!==3&&c.nodeType!==4||!c.nodeValue?(c.childNodes.length>0&&(f=c.childNodes[d]),f?c.insertBefore(b,f):c.appendChild(b)):d?d>=c.nodeValue.length?a.insertAfter(b,c):(e=c.splitText(d),c.parentNode.insertBefore(b,e)):c.parentNode.insertBefore(b,c)}function D(a){var b=c.extractContents();c.insertNode(a),a.appendChild(b),c.selectNode(a)}function E(){return n(new b(a),{startContainer:c[k],startOffset:c[j],endContainer:c[l],endOffset:c[m],collapsed:c.collapsed,commonAncestorContainer:c.commonAncestorContainer})}function F(a,b){var c;if(a.nodeType==3)return a;if(b<0)return a;c=a.firstChild;while(c&&b>0)--b,c=c.nextSibling;return c?c:a}function G(){return c[k]==c[l]&&c[j]==c[m]}function H(b,c,d,e){var f,g,h,i,j,k;if(b==d)return c==e?0:c<e?-1:1;f=d;while(f&&f.parentNode!=b)f=f.parentNode;if(f){g=0,h=b.firstChild;while(h!=f&&g<c)g++,h=h.nextSibling;return c<=g?-1:1}f=b;while(f&&f.parentNode!=d)f=f.parentNode;if(f){g=0,h=d.firstChild;while(h!=f&&g<e)g++,h=h.nextSibling;return g<e?-1:1}i=a.findCommonAncestor(b,d),j=b;while(j&&j.parentNode!=i)j=j.parentNode;j||(j=i),k=d;while(k&&k.parentNode!=i)k=k.parentNode;k||(k=i);if(j==k)return 0;h=i.firstChild;while(h){if(h==j)return-1;if(h==k)return 1;h=h.nextSibling}}function I(b,d,e){var f,g;b?(c[k]=d,c[j]=e):(c[l]=d,c[m]=e),f=c[l];while(f.parentNode)f=f.parentNode;g=c[k];while(g.parentNode)g=g.parentNode;g==f?H(c[k],c[j],c[l],c[m])>0&&c.collapse(b):c.collapse(b),c.collapsed=G(),c.commonAncestorContainer=a.findCommonAncestor(c[k],c[l])}function J(a){var b,d=0,e=0,f,g,h,i,j,m;if(c[k]==c[l])return K(a);for(b=c[l],f=b.parentNode;f;b=f,f=f.parentNode){if(f==c[k])return L(b,a);++d}for(b=c[k],f=b.parentNode;f;b=f,f=f.parentNode){if(
f==c[l])return M(b,a);++e}g=e-d,h=c[k];while(g>0)h=h.parentNode,g--;i=c[l];while(g<0)i=i.parentNode,g++;for(j=h.parentNode,m=i.parentNode;j!=m;j=j.parentNode,m=m.parentNode)h=j,i=m;return N(h,i,a)}function K(a){var b,e,i,l,n,o,p;a!=g&&(b=d.createDocumentFragment());if(c[j]==c[m])return b;if(c[k].nodeType==3){e=c[k].nodeValue,i=e.substring(c[j],c[m]),a!=f&&(c[k].deleteData(c[j],c[m]-c[j]),c.collapse(h));if(a==g)return;return b.appendChild(d.createTextNode(i)),b}l=F(c[k],c[j]),n=c[m]-c[j];while(n>0)o=l.nextSibling,p=R(l,a),b&&b.appendChild(p),--n,l=o;return a!=f&&c.collapse(h),b}function L(a,b){var e,h,k,l,m,n;b!=g&&(e=d.createDocumentFragment()),h=O(a,b),e&&e.appendChild(h),k=o(a),l=k-c[j];if(l<=0)return b!=f&&(c.setEndBefore(a),c.collapse(i)),e;h=a.previousSibling;while(l>0)m=h.previousSibling,n=R(h,b),e&&e.insertBefore(n,e.firstChild),--l,h=m;return b!=f&&(c.setEndBefore(a),c.collapse(i)),e}function M(a,b){var e,i,j,k,l,n;b!=g&&(e=d.createDocumentFragment()),j=P(a,b),e&&e.appendChild(j),i=o(a),++i,k=c[m]-i,j=a.nextSibling;while(k>0)l=j.nextSibling,n=R(j,b),e&&e.appendChild(n),--k,j=l;return b!=f&&(c.setStartAfter(a),c.collapse(h)),e}function N(a,b,e){var i,j,k,l,m,n,p,q;e!=g&&(j=d.createDocumentFragment()),i=P(a,e),j&&j.appendChild(i),k=a.parentNode,l=o(a),m=o(b),++l,n=m-l,p=a.nextSibling;while(n>0)q=p.nextSibling,i=R(p,e),j&&j.appendChild(i),p=q,--n;return i=O(b,e),j&&j.appendChild(i),e!=f&&(c.setStartAfter(a),c.collapse(h)),j}function O(a,b){var d=F(c[l],c[m]-1),e,f,j,k,n,o=d!=c[l];if(d==a)return Q(d,o,i,b);e=d.parentNode,f=Q(e,i,i,b);while(e){while(d)j=d.previousSibling,k=Q(d,o,i,b),b!=g&&f.insertBefore(k,f.firstChild),o=h,d=j;if(e==a)return f;d=e.previousSibling,e=e.parentNode,n=Q(e,i,i,b),b!=g&&n.appendChild(f),f=n}}function P(a,b){var d=F(c[k],c[j]),e=d!=c[k],f,l,m,n,o;if(d==a)return Q(d,e,h,b);f=d.parentNode,l=Q(f,i,h,b);while(f){while(d)m=d.nextSibling,n=Q(d,e,h,b),b!=g&&l.appendChild(n),e=h,d=m;if(f==a)return l;d=f.nextSibling,f=f.parentNode,o=Q(f,i,h,b),b!=g&&o.appendChild(l),l=o}}function Q(a,b,d,e){var h,k,l,n,o;if(b)return R(a,e);if(a.nodeType==3){h=a.nodeValue,d?(n=c[j],k=h.substring(n),l=h.substring(0,n)):(n=c[m],k=h.substring(0,n),l=h.substring(n)),e!=f&&(a.nodeValue=l);if(e==g)return;return o=a.cloneNode(i),o.nodeValue=k,o}if(e==g)return;return a.cloneNode(i)}function R(a,b){if(b!=g)return b==f?a.cloneNode(h):a;a.parentNode.removeChild(a)}var c=this,d=a.doc,e=0,f=1,g=2,h=!0,i=!1,j="startOffset",k="startContainer",l="endContainer",m="endOffset",n=tinymce.extend,o=a.nodeIndex;n(c,{startContainer:d,startOffset:0,endContainer:d,endOffset:0,collapsed:h,commonAncestorContainer:d,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:p,setEnd:q,setStartBefore:r,setStartAfter:s,setEndBefore:t,setEndAfter:u,collapse:v,selectNode:w,selectNodeContents:x,compareBoundaryPoints:y,deleteContents:z,extractContents:A,cloneContents:B,insertNode:C,surroundContents:D,cloneRange:E})}a.Range=b}(tinymce.dom),function(){function a(a){function f(b,c){var d,e=0,f,g,h,i,j,k,l=-1,m;d=b.duplicate(),d.collapse(c),m=d.parentElement();if(m.ownerDocument!==a.dom.doc)return;while(m.contentEditable==="false")m=m.parentNode;if(!m.hasChildNodes())return{node:m,inside:1};h=m.children,f=h.length-1;while(e<=f){k=Math.floor((e+f)/2),i=h[k],d.moveToElementText(i),l=d.compareEndPoints(c?"StartToStart":"EndToEnd",b);if(l>0)f=k-1;else{if(!(l<0))return{node:i};e=k+1}}if(l<0){i?d.collapse(!1):(d.moveToElementText(m),d.collapse(!0),i=m,g=!0),d.setEndPoint(c?"EndToStart":"EndToEnd",b);if(d.compareEndPoints(c?"StartToStart":"StartToEnd",b)>0){d=b.duplicate(),d.collapse(c),j=-1;while(m==d.parentElement()){if(d.move("character",-1)==0)break;j++}}j=j||d.text.replace("\r\n"," ").length}else d.collapse(!0),d.setEndPoint(c?"StartToStart":"StartToEnd",b),j=d.text.replace("\r\n"," ").length;return{node:i,position:l,offset:j,inside:g}}function g(){function m(a){var b=f(d,a),c,g,h=0,i,j,k;c=b.node,g=b.offset;if(b.inside&&!c.hasChildNodes()){e[a?"setStart":"setEnd"](c,0);return}if(g===j){e[a?"setStartBefore":"setEndAfter"](c);return}if(b.position<0){i=b.inside?c.firstChild:c.nextSibling;if(!i){e[a?"setStartAfter":"setEndAfter"](c);return}if(!g){i.nodeType==3?e[a?"setStart":"setEnd"](i,0):e[a?"setStartBefore":"setEndBefore"](i);return}while(i){k=i.nodeValue,h+=k.length;if(h>=g){c=i,h-=g,h=k.length-h;break}i=i.nextSibling}}else{i=c.previousSibling;if(!i)return e[a?"setStartBefore":"setEndBefore"](c);if(!g){c.nodeType==3?e[a?"setStart":"setEnd"](i,c.nodeValue.length):e[a?"setStartAfter":"setEndAfter"](i);return}while(i){h+=i.nodeValue.length;if(h>=g){c=i,h-=g;break}i=i.previousSibling}}e[a?"setStart":"setEnd"](c,h)}var d=a.getRng(),e=c.createRng(),g,h,i,j,k,l;g=d.item?d.item(0):d.parentElement();if(g.ownerDocument!=c.doc)return e;h=a.isCollapsed();if(d.item)return e.setStart(g.parentNode,c.nodeIndex(g)),e.setEnd(e.startContainer,e.startOffset+1),e;try{m(!0),h||m()}catch(n){if(n.number!=-2147024809)throw n;k=b.getBookmark(2),i=d.duplicate(),i.collapse(!0),g=i.parentElement(),h||(i=d.duplicate(),i.collapse(!1),j=i.parentElement(),j.innerHTML=j.innerHTML),g.innerHTML=g.innerHTML,b.moveToBookmark(k),d=a.getRng(),m(!0),h||m()}return e}var b=this,c=a.dom,d=!0,e=!1;this.getBookmark=function(b){function i(a){var a,b,d,e,f,g=[];b=a.parentNode,d=c.getRoot().parentNode;while(b!=d&&b.nodeType!==9){e=b.children,f=e.length;while(f--)if(a===e[f]){g.push(f);break}a=b,b=b.parentNode}return g}function j(a){var b;b=f(d,a);if(b)return{position:b.position,offset:b.offset,indexes:i(b.node),inside:b.inside}}var d=a.getRng(),e,g,h={};return b===2&&(d.item?h.start={ctrl:!0,indexes:i(d.item(0))}:(h.start=j(!0),a.isCollapsed()||(h.end=j()))),h},this.moveToBookmark=function(a){function e(a){var b,d,e,f;b=c.getRoot();for(d=a.length-1;d>=0;d--)f=b.children,e=a[d],e<=f.length-1&&(b=f[e]);return b}function f(c){var f=a[c?"start":"end"],g,h,i;f&&(g=f.position>0,h=d.createTextRange(),h.moveToElementText(e(f.indexes)),offset=f.offset,offset!==i?(h.collapse(f.inside||g),h.moveStart("character",g?-offset:offset)):h.collapse(c),b.setEndPoint(c?"StartToStart":"EndToStart",h),c&&b.collapse(!0))}var b,d=c.doc.body;a.start&&(a.start.ctrl?(b=d.createControlRange(),b.addElement(e(a.start.indexes)),b.select()):(b=d.createTextRange(),f(!0),f(),b.select()))},this.addRange=function(b){function m(a){var b,f,m,n,o;m=c.create("a"),b=a?g:i,f=a?h:j,n=e.duplicate();if(b==k||b==k.documentElement)b=l,f=0;b.nodeType==3?(b.parentNode.insertBefore(m,b),n.moveToElementText(m),n.moveStart("character",f),c.remove(m),e.setEndPoint(a?"StartToStart":"EndToEnd",n)):(o=b.childNodes,o.length?(f>=o.length?c.insertAfter(m,o[o.length-1]):b.insertBefore(m,o[f]),n.moveToElementText(m)):(m=k.createTextNode(""),b.appendChild(m),n.moveToElementText(m.parentNode),n.collapse(d)),e.setEndPoint(a?"StartToStart":"EndToEnd",n),c.remove(m))}var e,f,g,h,i,j,k=a.dom.doc,l=k.body;g=b.startContainer,h=b.startOffset,i=b.endContainer,j=b.endOffset,e=l.createTextRange();if(g==i&&g.nodeType==1&&h==j-1&&h==j-1)try{f=l.createControlRange(),f.addElement(g.childNodes[h]),f.select();return}catch(n){}m(!0),m(),e.select()},this.getRangeAt=g}tinymce.dom.TridentSelection=a}(),function(a){var b=a.each,c=a.DOM,d=a.isIE,e=a.isWebKit,f;a.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[],this.events=[]},add:function(e,f,g,h){var i,j=this,k=j.events,l;if(f instanceof Array)return l=[],b(f,function(a){l.push(j.add(e,a,g,h))}),l;if(e&&e.hasOwnProperty&&e instanceof Array)return l=[],b(e,function(a){a=c.get(a),l.push(j.add(a,f,g,h))}),l;e=c.get(e);if(!e)return;return i=function(b){if(j.disabled)return;return b=b||window.event,b&&d&&(b.target||(b.target=b.srcElement),a.extend(b,j._stoppers)),h?g.call(h,b):g(b)},f=="unload"?(a.unloads.unshift({func:i}),i):f=="init"?(j.domLoaded?i():j.inits.push(i),i):(k.push({obj:e,name:f,func:g,cfunc:i,scope:h}),j._add(e,f,i),g)},remove:function(a,d,e){var f=this,g=f.events,h=!1,i;return a&&a.hasOwnProperty&&a instanceof Array?(i=[],b(a,function(a){a=c.get(a),i.push(f.remove(a,d,e))}),i):(a=c.get(a),b(g,function(b,c){if(b.obj==a&&b.name==d&&(!e||b.func==e||b.cfunc==e))return g.splice(c,1),f._remove(a,d,b.cfunc),h=!0,!1}),h)},clear:function(a){var b=this,d=b.events,e,f;if(a){a=c.get(a);for(e=d.length-1;e>=0;e--)f=d[e],f.obj===a&&(b._remove(f.obj,f.name,f.cfunc),f.obj=f.cfunc=null,d.splice(e,1))}},cancel:function(a){return a?(this.stop(a),this.prevent(a)):!1},stop:function(a){return a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,!1},prevent:function(a){return a.preventDefault?a.preventDefault():a.returnValue=!1,!1},destroy:function(){var a=this;b(a.events,function(b,c){a._remove(b.obj,b.name,b.cfunc),b.obj=b.cfunc=null}),a.events=[],a=null},_add:function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener?a.addEventListener(b,c,!1):a["on"+b]=c},_remove:function(a,b,c){if(a)try{a.detachEvent?a.detachEvent("on"+b,c):a.removeEventListener?a.removeEventListener(b,c,!1):a["on"+b]=null}catch(d){}},_pageInit:function(a){var c=this;if(c.domLoaded)return;c.domLoaded=!0,b(c.inits,function(a){a()}),c.inits=[]},_wait:function(a){var b=this,c=a.document;if(a.tinyMCE_GZ&&tinyMCE_GZ.loaded){b.domLoaded=1;return}c.attachEvent?(c.attachEvent("onreadystatechange",function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",arguments.callee),b._pageInit(a))}),c.documentElement.doScroll&&a==a.top&&function(){if(b.domLoaded)return;try{c.documentElement.doScroll("left")}catch(d){setTimeout(arguments.callee,0);return}b._pageInit(a)}()):c.addEventListener&&b._add(a,"DOMContentLoaded",function(){b._pageInit(a)}),b._add(a,"load",function(){b._pageInit(a)})},_stoppers:{preventDefault:function(){this.returnValue=!1},stopPropagation:function(){this.cancelBubble=!0}}}),f=a.dom.Event=new a.dom.EventUtils,f._wait(window),a.addUnload(function(){f.destroy()})}(tinymce),function(a){a.dom.Element=function(b,c){var d=this,e,f;d.settings=c=c||{},d.id=b,d.dom=e=c.dom||a.DOM,a.isIE||(f=e.get(d.id)),a.each("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get".split(/,/),function(a){d[a]=function(){var c=[b],f;for(f=0;f<arguments.length;f++)c.push(arguments[f]);return c=e[a].apply(e,c),d.update(a),c}}),a.extend(d,{on:function(b,c,e){return a.dom.Event.add(d.id,b,c,e)},getXY:function(){return{x:parseInt(d.getStyle("left")),y:parseInt(d.getStyle("top"))}},getSize:function(){var a=e.get(d.id);return{w:parseInt(d.getStyle("width")||a.clientWidth),h:parseInt(d.getStyle("height")||a.clientHeight)}},moveTo:function(a,b){d.setStyles({left:a,top:b})},moveBy:function(a,b){var c=d.getXY();d.moveTo(c.x+a,c.y+b)},resizeTo:function(a,b){d.setStyles({width:a,height:b})},resizeBy:function(a,b){var c=d.getSize();d.resizeTo(c.w+a,c.h+b)},update:function(b){var f;if(a.isIE6&&c.blocker){b=b||"";if(b.indexOf("get")===0||b.indexOf("has")===0||b.indexOf("is")===0)return;if(b=="remove"){e.remove(d.blocker);return}d.blocker?f=e.get(d.blocker):(d.blocker=e.uniqueId(),f=e.add(c.container||e.getRoot(),"iframe",{id:d.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'}),e.setStyle(f,"opacity",0)),e.setStyles(f,{left:d.getStyle("left",1),top:d.getStyle("top",1),width:d.getStyle("width",1),height:d.getStyle("height",1),display:d.getStyle("display",1),zIndex:parseInt(d.getStyle("zIndex",1)||0)-1})}}})}}(tinymce),function(a){function b(a){return a.replace(/[\n\r]+/g,"")}var c=a.is,d=a.isIE,e=a.each;a.create("tinymce.dom.Selection",{Selection:function(b,c,d){var f=this;f.dom=b,f.win=c,f.serializer=d,e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(b){f[b]=new a.util.Dispatcher(f)}),f.win.getSelection||(f.tridentSel=new a.dom.TridentSelection(f)),a.isIE&&b.boxModel&&this._fixIESelection(),a.addUnload(f.destroy,f)},setCursorLocation:function(a,b){var c=this,d=c.dom.createRng();d.setStart(a,b),d.setEnd(a,b),c.setRng(d),c.collapse(!1)},getContent:function(a){var b=this,d=b.getRng(),e=b.dom.create("body"),f=b.getSel(),g,h,i;return a=a||{},g=h="",a.get=!0,a.format=a.format||"html",a.forced_root_block="",b.onBeforeGetContent.dispatch(b,a),a.format=="text"?b.isCollapsed()?"":d.text||(f.toString?f.toString():""):(d.cloneContents?(i=d.cloneContents(),i&&e.appendChild(i)):c(d.item)||c(d.htmlText)?(e.innerHTML="<br>"+(d.item?d.item(0).outerHTML:d.htmlText),e.removeChild(e.firstChild)):e.innerHTML=d.toString(),/^\s/.test(e.innerHTML)&&(g=" "),/\s+$/.test(e.innerHTML)&&(h=" "),a.getInner=!0,a.content=b.isCollapsed()?"":g+b.serializer.serialize(e,a)+h,b.onGetContent.dispatch(b,a),a.content)},setContent:function(a,b){var c=this,d=c.getRng(),e,f=c.win.document,g,h;b=b||{format:"html"},b.set=!0,a=b.content=a,b.no_events||c.onBeforeSetContent.dispatch(c,b),a=b.content;if(d.insertNode){a+='<span id="__caret">_</span>',d.startContainer==f&&d.endContainer==f?f.body.innerHTML=a:(d.deleteContents(),f.body.childNodes.length==0?f.body.innerHTML=a:d.createContextualFragment?d.insertNode(d.createContextualFragment(a)):(g=f.createDocumentFragment(),h=f.createElement("div"),g.appendChild(h),h.outerHTML=a,d.insertNode(g))),e=c.dom.get("__caret"),d=f.createRange(),d.setStartBefore(e),d.setEndBefore(e),c.setRng(d),c.dom.remove("__caret");try{c.setRng(d)}catch(i){}}else d.item&&(f.execCommand("Delete",!1,null),d=c.getRng()),/^\s+/.test(a)?(d.pasteHTML('<span id="__mce_tmp">_</span>'+a),c.dom.remove("__mce_tmp")):d.pasteHTML(a);b.no_events||c.onSetContent.dispatch(c,b)},getStart:function(){var a=this.getRng(),b,c,d,e;if(a.duplicate||a.item){if(a.item)return a.item(0);d=a.duplicate(),d.collapse(1),b=d.parentElement(),c=e=a.parentElement();while(e=e.parentNode)if(e==b){b=c;break}return b}return b=a.startContainer,b.nodeType==1&&b.hasChildNodes()&&(b=b.childNodes[Math.min(b.childNodes.length-1,a.startOffset)]),b&&b.nodeType==3?b.parentNode:b},getEnd:function(){var a=this,b=a.getRng(),c,d;return b.duplicate||b.item?b.item?b.item(0):(b=b.duplicate(),b.collapse(0),c=b.parentElement(),c&&c.nodeName=="BODY"?c.lastChild||c:c):(c=b.endContainer,d=b.endOffset,c.nodeType==1&&c.hasChildNodes()&&(c=c.childNodes[d>0?d-1:d]),c&&c.nodeType==3?c.parentNode:c)},getBookmark:function(a,b){function o(a,b){var c=0;return e(d.select(a),function(a,d){a==b&&(c=d)}),c}var c=this,d=c.dom,f,g,h,i,j,k,l,m="",n;if(a==2){function p(){function g(a,d){var f=a[d?"startContainer":"endContainer"],g=a[d?"startOffset":"endOffset"],h=[],i,j,k=0;if(f.nodeType==3){if(b)for(i=f.previousSibling;i&&i.nodeType==3;i=i.previousSibling)g+=i.nodeValue.length;h.push(g)}else j=f.childNodes,g>=j.length&&j.length&&(k=1,g=Math.max(0,j.length-1)),h.push(c.dom.nodeIndex(j[g],b)+k);for(;f&&f!=e;f=f.parentNode)h.push(c.dom.nodeIndex(f,b));return h}var a=c.getRng(!0),e=d.getRoot(),f={};return f.start=g(a,!0),c.isCollapsed()||(f.end=g(a)),f}return c.tridentSel?c.tridentSel.getBookmark(a):p()}if(a)return{rng:c.getRng()};f=c.getRng(),h=d.uniqueId(),i=tinyMCE.activeEditor.selection.isCollapsed(),n="overflow:hidden;line-height:0px";if(f.duplicate||f.item){if(!!f.item)return k=f.item(0),j=k.nodeName,{name:j,index:o(j,k)};g=f.duplicate();try{f.collapse(),f.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_start" style="'+n+'">'+m+"</span>"),i||(g.collapse(!1),f.moveToElementText(g.parentElement()),f.compareEndPoints("StartToEnd",g)==0&&g.move("character",-1),g.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_end" style="'+n+'">'+m+"</span>"))}catch(q){return null}}else{k=c.getNode(),j=k.nodeName;if(j=="IMG")return{name:j,index:o(j,k)};g=f.cloneRange(),i||(g.collapse(!1),g.insertNode(d.create("span",{"data-mce-type":"bookmark",id:h+"_end",style:n},m))),f.collapse(!0),f.insertNode(d.create("span",{"data-mce-type":"bookmark",id:h+"_start",style:n},m))}return c.moveToBookmark({id:h,keep:1}),{id:h}},moveToBookmark:function(b){var c=this,f=c.dom,g,h,i,j,k,l,m,n;if(b)if(b.start){i=f.createRng(),j=f.getRoot();function o(a){var c=b[a?"start":"end"],d,e,f,g;if(c){f=c[0];for(e=j,d=c.length-1;d>=1;d--){g=e.childNodes;if(c[d]>g.length-1)return;e=g[c[d]]}e.nodeType===3&&(f=Math.min(c[0],e.nodeValue.length)),e.nodeType===1&&(f=Math.min(c[0],e.childNodes.length)),a?i.setStart(e,f):i.setEnd(e,f)}return!0}if(c.tridentSel)return c.tridentSel.moveToBookmark(b);o(!0)&&o()&&c.setRng(i)}else if(b.id){function p(c){var d=f.get(b.id+"_"+c),g,h,i,j,o=b.keep;if(d){g=d.parentNode,c=="start"?(o?(g=d.firstChild,h=1):h=f.nodeIndex(d),k=l=g,m=n=h):(o?(g=d.firstChild,h=1):h=f.nodeIndex(d),l=g,n=h);if(!o){j=d.previousSibling,i=d.nextSibling,e(a.grep(d.childNodes),function(a){a.nodeType==3&&(a.nodeValue=a.nodeValue.replace(/\uFEFF/g,""))});while(d=f.get(b.id+"_"+c))f.remove(d,1);j&&i&&j.nodeType==i.nodeType&&j.nodeType==3&&!a.isOpera&&(h=j.nodeValue.length,j.appendData(i.nodeValue),f.remove(i),c=="start"?(k=l=j,m=n=h):(l=j,n=h))}}}function q(a){return f.isBlock(a)&&!a.innerHTML&&(a.innerHTML=d?" ":'<br data-mce-bogus="1" />'),a}p("start"),p("end"),k&&(i=f.createRng(),i.setStart(q(k),m),i.setEnd(q(l),n),c.setRng(i))}else b.name?c.select(f.select(b.name)[b.index]):b.rng&&c.setRng(b.rng)},select:function(b,c){var d=this,e=d.dom,f=e.createRng(),g;if(b){g=e.nodeIndex(b),f.setStart(b.parentNode,g),f.setEnd(b.parentNode,g+1);if(c){function h(b,c){var d=new a.dom.TreeWalker(b,b);do{if(b.nodeType==3&&a.trim(b.nodeValue).length!=0){c?f.setStart(b,0):f.setEnd(b,b.nodeValue.length);return}if(b.nodeName=="BR"){c?f.setStartBefore(b):f.setEndBefore(b);return}}while(b=c?d.next():d.prev())}h(b,1),h(b)}d.setRng(f)}return b},isCollapsed:function(){var a=this,b=a.getRng(),c=a.getSel();return!b||b.item?!1:b.compareEndPoints?b.compareEndPoints("StartToEnd",b)===0:!c||b.collapsed},collapse:function(a){var b=this,c=b.getRng(),d;c.item&&(d=c.item(0),c=b.win.document.body.createTextRange(),c.moveToElementText(d)),c.collapse(!!a),b.setRng(c)},getSel:function(){var a=this,b=this.win;return b.getSelection?b.getSelection():b.document.selection},getRng:function(b){var c=this,d,e,f,g=c.win.document;if(b&&c.tridentSel)return c.tridentSel.getRangeAt(0);try{if(d=c.getSel())e=d.rangeCount>0?d.getRangeAt(0):d.createRange?d.createRange():g.createRange()}catch(h){}return a.isIE&&e&&e.setStart&&g.selection.createRange().item&&(f=g.selection.createRange().item(0),e=g.createRange(),e.setStartBefore(f),e.setEndAfter(f)),e||(e=g.createRange?g.createRange():g.body.createTextRange()),c.selectedRange&&c.explicitRange&&(e.compareBoundaryPoints(e.START_TO_START,c.selectedRange)===0&&e.compareBoundaryPoints(e.END_TO_END,c.selectedRange)===0?e=c.explicitRange:(c.selectedRange=null,c.explicitRange=null)),e},setRng:function(a){var b,c=this;if(!c.tridentSel){b=c.getSel();if(b){c.explicitRange=a;try{b.removeAllRanges()}catch(d){}b.addRange(a),c.selectedRange=b.rangeCount>0?b.getRangeAt(0):null}}else{if(a.cloneRange){c.tridentSel.addRange(a);return}try{a.select()}catch(d){}}},setNode:function(a){var b=this;return b.setContent(b.dom.getOuterHTML(a)),a},getNode:function(){var a=this,b=a.getRng(),c=a.getSel(),d,e=b.startContainer,f=b.endContainer;if(!b)return a.dom.getRoot();if(b.setStart){d=b.commonAncestorContainer;if(!b.collapsed){b.startContainer==b.endContainer&&b.endOffset-b.startOffset<2&&b.startContainer.hasChildNodes()&&(d=b.startContainer.childNodes[b.startOffset]);if(e.nodeType===3&&f.nodeType===3){function g(a,b){var c=a;while(a&&a.nodeType===3&&a.length===0)a=b?a.nextSibling:a.previousSibling;return a||c}e.length===b.startOffset?e=g(e.nextSibling,!0):e=e.parentNode,b.endOffset===0?f=g(f.previousSibling,!1):f=f.parentNode;if(e&&e===f)return e}}return d&&d.nodeType==3?d.parentNode:d}return b.item?b.item(0):b.parentElement()},getSelectedBlocks:function(b,c){var d=this,e=d.dom,f,g,h,i=[];f=e.getParent(b||d.getStart(),e.isBlock),g=e.getParent(c||d.getEnd(),e.isBlock),f&&i.push(f);if(f&&g&&f!=g){h=f;var j=new a.dom.TreeWalker(f,e.getRoot());while((h=j.next())&&h!=g)e.isBlock(h)&&i.push(h)}return g&&f!=g&&i.push(g),i},normalize:function(){function e(e){var f,g,h,i=b.dom,j=i.getRoot(),k;f=c[(e?"start":"end")+"Container"],g=c[(e?"start":"end")+"Offset"],f.nodeType===9&&(f=f.body,g=0);if(f===j&&f.hasChildNodes()){f=f.childNodes[Math.min(!e&&g>0?g-1:g,f.childNodes.length-1)],g=0;if(f.hasChildNodes()){k=f,h=new a.dom.TreeWalker(f,j);do{if(k.nodeType===3){g=e?0:k.nodeValue.length-1,f=k,d=!0;break}if(/^(BR|IMG)$/.test(k.nodeName)){g=i.nodeIndex(k),f=k.parentNode,k.nodeName=="IMG"&&!e&&g++,d=!0;break}}while(k=e?h.next():h.prev())}}d&&c["set"+(e?"Start":"End")](f,g)}var b=this,c,d;if(a.isIE)return;c=b.getRng(),e(!0),c.collapsed||e(),d&&b.setRng(c)},destroy:function(b){var c=this;c.win=null,b||a.removeUnload(c.destroy)},_fixIESelection:function(){function g(a,b){var d=c.createTextRange();try{d.moveToPoint(a,b)}catch(e){d=null}return d}function h(a){var b;a.button?(b=g(a.x,a.y),b&&(b.compareEndPoints("StartToStart",e)>0?b.setEndPoint("StartToStart",e):b.setEndPoint("EndToEnd",e),b.select())):i()}function i(){var c=b.selection.createRange();e&&!c.item&&c.compareEndPoints("StartToEnd",c)===0&&e.select(),a.unbind(b,"mouseup",i),a.unbind(b,"mousemove",h),e=d=0}var a=this.dom,b=a.doc,c=b.body,d,e,f;b.documentElement.unselectable=!0,a.bind(b,["mousedown","contextmenu"],function(c){if(c.target.nodeName==="HTML"){d&&i(),f=b.documentElement;if(f.scrollHeight>f.clientHeight)return;d=1,e=g(c.x,c.y),e&&(a.bind(b,"mouseup",i),a.bind(b,"mousemove",h),a.win.focus(),e.select())}})}})}(tinymce),function(a){a.dom.Serializer=function(b,c,d){var e,f,g=a.isIE,h=a.each,i;return b.apply_source_formatting||(b.indent=!1),c=c||a.DOM,d=d||new a.html.Schema(b),b.entity_encoding=b.entity_encoding||"named",b.remove_trailing_brs="remove_trailing_brs"in b?b.remove_trailing_brs:!0,e=new a.util.Dispatcher(self),f=new a.util.Dispatcher(self),i=new a.html.DomParser(b,d),i.addAttributeFilter("src,href,style",function(a,d){var e=a.length,f,g,h="data-mce-"+d,i=b.url_converter,j=b.url_converter_scope,k;while(e--)f=a[e],g=f.attributes.map[h],g!==k?(f.attr(d,g.length>0?g:null),f.attr(h,null)):(g=f.attributes.map[d],d==="style"?g=c.serializeStyle(c.parseStyle(g),f.name):i&&(g=i.call(j,g,d,f.name)),f.attr(d,g.length>0?g:null))}),i.addAttributeFilter("class",function(a,b){var c=a.length,d,e;while(c--)d=a[c],e=d.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,""),d.attr("class",e.length>0?e:null)}),i.addAttributeFilter("data-mce-type",function(a,b,c){var d=a.length,e;while(d--)e=a[d],e.attributes.map["data-mce-type"]==="bookmark"&&!c.cleanup&&e.remove()}),i.addNodeFilter("script,style",function(a,b){function f(a){return a.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}var c=a.length,d,e;while(c--)d=a[c],e=d.firstChild?d.firstChild.value:"",b==="script"?(d.attr("type",(d.attr("type")||"text/javascript").replace(/^mce\-/,"")),e.length>0&&(d.firstChild.value="// <![CDATA[\n"+f(e)+"\n// ]]>")):e.length>0&&(d.firstChild.value="<!--\n"+f(e)+"\n-->")}),i.addNodeFilter("#comment",function(a,b){var c=a.length,d;while(c--)d=a[c],d.value.indexOf("[CDATA[")===0?(d.name="#cdata",d.type=4,d.value=d.value.replace(/^\[CDATA\[|\]\]$/g,"")):d.value.indexOf("mce:protected ")===0&&(d.name="#text",d.type=3,d.raw=!0,d.value=unescape(d.value).substr(14))}),i.addNodeFilter("xml:namespace,input",function(a,b){var c=a.length,d;while(c--)d=a[c],d.type===7?d.remove():d.type===1&&b==="input"&&!("type"in d.attributes.map)&&d.attr("type","text")}),b.fix_list_elements&&i.addNodeFilter("ul,ol",function(a,b){var c=a.length,d,e;while(c--)d=a[c],e=d.parent,(e.name==="ul"||e.name==="ol")&&d.prev&&d.prev.name==="li"&&d.prev.append(d)}),i.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(a,b){var c=a.length;while(c--)a[c].attr(b,null)}),{schema:d,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,onPreProcess:e,onPostProcess:f,serialize:function(j,k){var l,m,n,o,p;return g&&c.select("script,style,select,map").length>0?(p=j.innerHTML,j=j.cloneNode(!1),c.setHTML(j,p)):j=j.cloneNode(!0),l=j.ownerDocument.implementation,l.createHTMLDocument&&(m=l.createHTMLDocument(""),h(j.nodeName=="BODY"?j.childNodes:[j],function(a){m.body.appendChild(m.importNode(a,!0))}),j.nodeName!="BODY"?j=m.body.firstChild:j=m.body,n=c.doc,c.doc=m),k=k||{},k.format=k.format||"html",k.no_events||(k.node=j,e.dispatch(self,k)),o=new a.html.Serializer(b,d),k.content=o.serialize(i.parse(k.getInner?j.innerHTML:a.trim(c.getOuterHTML(j),k),k)),k.cleanup||(k.content=k.content.replace(/\uFEFF|\u200B/g,"")),k.no_events||f.dispatch(self,k),n&&(c.doc=n),k.node=null,k.content},addRules:function(a){d.addValidElements(a)},setRules:function(a){d.setValidElements(a)}}}}(tinymce),function(a){a.dom.ScriptLoader=function(b){function l(b,c){function j(){e.remove(i),f&&(f.onreadystatechange=f.onload=f=null),c()}function k(){typeof console!="undefined"&&console.log&&console.log("Failed to load: "+b)}var d=this,e=a.DOM,f,g,h,i;i=e.uniqueId();if(a.isIE6){g=new a.util.URI(b),h=location;if(g.host==h.hostname&&g.port==h.port&&g.protocol+":"==h.protocol&&g.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(g.getURI()),success:function(a){var b=e.create("script",{type:"text/javascript"});b.text=a,document.getElementsByTagName("head")[0].appendChild(b),e.remove(b),j()},error:k});return}}f=e.create("script",{id:i,type:"text/javascript",src:a._addVer(b)}),a.isIE||(f.onload=j),f.onerror=k,a.isOpera||(f.onreadystatechange=function(){var a=f.readyState;(a=="complete"||a=="loaded")&&j()}),(document.getElementsByTagName("head")[0]||document.body).appendChild(f)}var c=0,d=1,e=2,f={},g=[],h={},i=[],j=0,k;this.isDone=function(a){return f[a]==e},this.markDone=function(a){f[a]=e},this.add=this.load=function(a,b,d){var e,i=f[a];i==k&&(g.push(a),f[a]=c),b&&(h[a]||(h[a]=[]),h[a].push({func:b,scope:d||this}))},this.loadQueue=function(a,b){this.loadScripts(g,a,b)},this.loadScripts=function(b,c,g){function n(b){a.each(h[b],function(a){a.func.call(a.scope)}),h[b]=k}var m;i.push({func:c,scope:g||this}),m=function(){var c=a.grep(b);b.length=0,a.each(c,function(a){if(f[a]==e){n(a);return}f[a]!=d&&(f[a]=d,j++,l(a,function(){f[a]=e,j--,n(a),m()}))}),j||(a.each(i,function(a){a.func.call(a.scope)}),i.length=0)},m()}},a.ScriptLoader=new a.dom.ScriptLoader}(tinymce),tinymce.dom.TreeWalker=function(a,b){function d(a,c,d,e){var f,g;if(a){if(!e&&a[c])return a[c];if(a!=b){f=a[d];if(f)return f;for(g=a.parentNode;g&&g!=b;g=g.parentNode){f=g[d];if(f)return f}}}}var c=a;this.current=function(){return c},this.next=function(a){return c=d(c,"firstChild","nextSibling",a)},this.prev=function(a){return c=d(c,"lastChild","previousSibling",a)}},function(a){a.dom.RangeUtils=function(b){var c="";this.walk=function(c,d){function p(a){var b;return b=a[0],b.nodeType===3&&b===e&&f>=b.nodeValue.length&&a.splice(0,1),b=a[a.length-1],h===0&&a.length>0&&b===g&&b.nodeType===3&&a.splice(a.length-1,1),a}function q(a,b,c){var d=[];for(;a&&a!=c;a=a[b])d.push(a);return d}function r(a,b){do{if(a.parentNode==b)return a;a=a.parentNode}while(a)}function s(a,b,c){var e=c?"nextSibling":"previousSibling";for(l=a,m=l.parentNode;l&&l!=b;l=m)m=l.parentNode,n=q(l==a?l:l[e],e),n.length&&(c||n.reverse(),d(p(n)))}var e=c.startContainer,f=c.startOffset,g=c.endContainer,h=c.endOffset,i,j,k,l,m,n,o;o=b.select("td.mceSelected,th.mceSelected");if(o.length>0){a.each(o,function(a){d([a])});return}e.nodeType==1&&e.hasChildNodes()&&(e=e.childNodes[f]),g.nodeType==1&&g.hasChildNodes()&&(g=g.childNodes[Math.min(h-1,g.childNodes.length-1)]);if(e==g)return d(p([e]));i=b.findCommonAncestor(e,g);for(l=e;l;l=l.parentNode){if(l===g)return s(e,i,!0);if(l===i)break}for(l=g;l;l=l.parentNode){if(l===e)return s(g,i);if(l===i)break}j=r(e,i)||e,k=r(g,i)||g,s(e,j,!0),n=q(j==e?j:j.nextSibling,"nextSibling",k==g?k.nextSibling:k),n.length&&d(p(n)),s(g,k)},this.split=function(a){function f(a,b){return a.splitText(b)}var b=a.startContainer,c=a.startOffset,d=a.endContainer,e=a.endOffset;return b==d&&b.nodeType==3?c>0&&c<b.nodeValue.length&&(d=f(b,c),b=d.previousSibling,e>c?(e-=c,b=d=f(d,e).previousSibling,e=d.nodeValue.length,c=0):e=0):(b.nodeType==3&&c>0&&c<b.nodeValue.length&&(b=f(b,c),c=0),d.nodeType==3&&e>0&&e<d.nodeValue.length&&(d=f(d,e).previousSibling,e=d.nodeValue.length)),{startContainer:b,startOffset:c,endContainer:d,endOffset:e}}},a.dom.RangeUtils.compareRanges=function(a,b){if(a&&b){if(!a.item&&!a.duplicate)return a.startContainer==b.startContainer&&a.startOffset==b.startOffset;if(a.item&&b.item&&a.item(0)===b.item(0))return!0;if(a.isEqual&&b.isEqual&&b.isEqual(a))return!0}return!1}}(tinymce),function(a){var b=a.dom.Event,c=a.each;a.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(d,e){var f=this,g=d.root,h=d.items,i=d.enableUpDown,j=d.enableLeftRight||!d.enableUpDown,k=d.excludeFromTabOrder,l,m,n,o,p;e=e||a.DOM,l=function(a){p=a.target.id},m=function(a){e.setAttrib(a.target.id,"tabindex","-1")},o=function(a){var b=e.get(p);e.setAttrib(b,"tabindex","0"),b.focus()},f.focus=function(){e.get(p).focus()},f.destroy=function(){c(h,function(a){e.unbind(e.get(a.id),"focus",l),e.unbind(e.get(a.id),"blur",m)}),e.unbind(e.get(g),"focus",o),e.unbind(e.get(g),"keydown",n),h=e=g=f.focus=l=m=n=o=null,f.destroy=function(){}},f.moveFocus=function(a,g){var i=-1,j=f.controls,k;if(!p)return;c(h,function(a,b){if(a.id===p)return i=b,!1}),i+=a,i<0?i=h.length-1:i>=h.length&&(i=0),k=h[i],e.setAttrib(p,"tabindex","-1"),e.setAttrib(k.id,"tabindex","0"),e.get(k.id).focus(),d.actOnFocus&&d.onAction(k.id),g&&b.cancel(g)},n=function(a){var c=37,e=39,g=38,h=40,k=27,l=14,m=13,n=32;switch(a.keyCode){case c:j&&f.moveFocus(-1);break;case e:j&&f.moveFocus(1);break;case g:i&&f.moveFocus(-1);break;case h:i&&f.moveFocus(1);break;case k:d.onCancel&&(d.onCancel(),b.cancel(a));break;case l:case m:case n:d.onAction&&(d.onAction(p),b.cancel(a))}},c(h,function(a,b){var c;a.id||(a.id=e.uniqueId("_mce_item_")),k?(e.bind(a.id,"blur",m),c="-1"):c=b===0?"0":"-1",e.setAttrib(a.id,"tabindex",c),e.bind(e.get(a.id),"focus",l)}),h[0]&&(p=h[0].id),e.setAttrib(g,"tabindex","-1"),e.bind(e.get(g),"focus",o),e.bind(e.get(g),"keydown",n)}})}(tinymce),function(a){var b=a.DOM,c=a.is;a.create("tinymce.ui.Control",{Control:function(b,c,d){this.id=b,this.settings=c=c||{},this.rendered=!1,this.onRender=new a.util.Dispatcher(this),this.classPrefix="",this.scope=c.scope||this,this.disabled=0,this.active=0,this.editor=d},setAriaProperty:function(a,c){var d=b.get(this.id+"_aria")||b.get(this.id);d&&b.setAttrib(d,"aria-"+a,!!c)},focus:function(){b.get(this.id).focus()},setDisabled:function(a){a!=this.disabled&&(this.setAriaProperty("disabled",a),this.setState("Disabled",a),this.setState("Enabled",!a),this.disabled=a)},isDisabled:function(){return this.disabled},setActive:function(a){a!=this.active&&(this.setState("Active",a),this.active=a,this.setAriaProperty("pressed",a))},isActive:function(){return this.active},setState:function(a,c){var d=b.get(this.id);a=this.classPrefix+a,c?b.addClass(d,a):b.removeClass(d,a)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(a){b.setHTML(a,this.renderHTML())},postRender:function(){var a=this,b;c(a.disabled)&&(b=a.disabled,a.disabled=-1,a.setDisabled(b)),c(a.active)&&(b=a.active,a.active=-1,a.setActive(b))},remove:function(){b.remove(this.id),this.destroy()},destroy:function(){a.dom.Event.clear(this.id)}})}(tinymce),tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(a,b,c){this.parent(a,b,c),this.controls=[],this.lookup={}},add:function(a){return this.lookup[a.id]=a,this.controls.push(a),a},get:function(a){return this.lookup[a]}}),tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(a,b){this.parent(a,b),this.classPrefix="mceSeparator",this.setDisabled(!0)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}}),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.walk;a.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(a,b){this.parent(a,b),this.classPrefix="mceMenuItem"},setSelected:function(a){this.setState("Selected",a),this.setAriaProperty("checked",!!a),this.selected=a},isSelected:function(){return this.selected},postRender:function(){var a=this;a.parent(),b(a.selected)&&a.setSelected(a.selected)}})}(tinymce),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.walk;a.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(b,c){var d=this;d.parent(b,c),d.items={},d.collapsed=!1,d.menuCount=0,d.onAddItem=new
a.util.Dispatcher(this)},expand:function(a){var b=this;a&&e(b,function(a){a.expand&&a.expand()},"items",b),b.collapsed=!1},collapse:function(a){var b=this;a&&e(b,function(a){a.collapse&&a.collapse()},"items",b),b.collapsed=!0},isCollapsed:function(){return this.collapsed},add:function(b){return b.settings||(b=new a.ui.MenuItem(b.id||c.uniqueId(),b)),this.onAddItem.dispatch(this,b),this.items[b.id]=b},addSeparator:function(){return this.add({separator:!0})},addMenu:function(a){return a.collapse||(a=this.createMenu(a)),this.menuCount++,this.add(a)},hasMenus:function(){return this.menuCount!==0},remove:function(a){delete this.items[a.id]},removeAll:function(){var a=this;e(a,function(a){a.removeAll?a.removeAll():a.remove(),a.destroy()},"items",a),a.items={}},createMenu:function(b){var d=new a.ui.Menu(b.id||c.uniqueId(),b);return d.onAddItem.add(this.onAddItem.dispatch,this.onAddItem),d}})}(tinymce),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.dom.Event,f=a.dom.Element;a.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(d,e){e=e||{},e.container=e.container||c.doc.body,e.offset_x=e.offset_x||0,e.offset_y=e.offset_y||0,e.vp_offset_x=e.vp_offset_x||0,e.vp_offset_y=e.vp_offset_y||0,b(e.icons)&&!e.icons&&(e["class"]+=" mceNoIcons"),this.parent(d,e),this.onShowMenu=new a.util.Dispatcher(this),this.onHideMenu=new a.util.Dispatcher(this),this.classPrefix="mceMenu"},createMenu:function(b){var d=this,e=d.settings,f;return b.container=b.container||e.container,b.parent=d,b.constrain=b.constrain||e.constrain,b["class"]=b["class"]||e["class"],b.vp_offset_x=b.vp_offset_x||e.vp_offset_x,b.vp_offset_y=b.vp_offset_y||e.vp_offset_y,b.keyboard_focus=e.keyboard_focus,f=new a.ui.DropMenu(b.id||c.uniqueId(),b),f.onAddItem.add(d.onAddItem.dispatch,d.onAddItem),f},focus:function(){var a=this;a.keyboardNav&&a.keyboardNav.focus()},update:function(){var a=this,b=a.settings,d=c.get("menu_"+a.id+"_tbl"),e=c.get("menu_"+a.id+"_co"),f,g;f=b.max_width?Math.min(d.clientWidth,b.max_width):d.clientWidth,g=b.max_height?Math.min(d.clientHeight,b.max_height):d.clientHeight,c.boxModel?a.element.setStyles({width:f,height:g}):a.element.setStyles({width:f+2,height:g+2}),b.max_width&&c.setStyle(e,"width",f),b.max_height&&(c.setStyle(e,"height",g),d.clientHeight<b.max_height&&c.setStyle(e,"overflow","hidden"))},showMenu:function(b,g,h){var i=this,j=i.settings,k,l=c.getViewPort(),m,n,o,p,q=2,r,s,t=i.classPrefix;i.collapse(1);if(i.isMenuVisible)return;i.rendered?k=c.get("menu_"+i.id):(k=c.add(i.settings.container,i.renderNode()),d(i.items,function(a){a.postRender()}),i.element=new f("menu_"+i.id,{blocker:1,container:j.container})),a.isOpera||c.setStyles(k,{left:-65535,top:-65535}),c.show(k),i.update(),b+=j.offset_x||0,g+=j.offset_y||0,l.w-=4,l.h-=4,j.constrain&&(m=k.clientWidth-q,n=k.clientHeight-q,o=l.x+l.w,p=l.y+l.h,b+j.vp_offset_x+m>o&&(b=h?h-m:Math.max(0,o-j.vp_offset_x-m)),g+j.vp_offset_y+n>p&&(g=Math.max(0,p-j.vp_offset_y-n))),c.setStyles(k,{left:b,top:g}),i.element.update(),i.isMenuVisible=1,i.mouseClickFunc=e.add(k,"click",function(a){var b;a=a.target;if(a&&(a=c.getParent(a,"tr"))&&!c.hasClass(a,t+"ItemSub")){b=i.items[a.id];if(b.isDisabled())return;r=i;while(r)r.hideMenu&&r.hideMenu(),r=r.settings.parent;return b.settings.onclick&&b.settings.onclick(a),e.cancel(a)}}),i.hasMenus()&&(i.mouseOverFunc=e.add(k,"mouseover",function(a){var b,d,e;a=a.target;if(a&&(a=c.getParent(a,"tr"))){b=i.items[a.id],i.lastMenu&&i.lastMenu.collapse(1);if(b.isDisabled())return;a&&c.hasClass(a,t+"ItemSub")&&(d=c.getRect(a),b.showMenu(d.x+d.w-q,d.y-q,d.x),i.lastMenu=b,c.addClass(c.get(b.id).firstChild,t+"ItemActive"))}})),e.add(k,"keydown",i._keyHandler,i),i.onShowMenu.dispatch(i),j.keyboard_focus&&i._setupKeyboardNav()},hideMenu:function(a){var b=this,d=c.get("menu_"+b.id),f;if(!b.isMenuVisible)return;b.keyboardNav&&b.keyboardNav.destroy(),e.remove(d,"mouseover",b.mouseOverFunc),e.remove(d,"click",b.mouseClickFunc),e.remove(d,"keydown",b._keyHandler),c.hide(d),b.isMenuVisible=0,a||b.collapse(1),b.element&&b.element.hide(),(f=c.get(b.id))&&c.removeClass(f.firstChild,b.classPrefix+"ItemActive"),b.onHideMenu.dispatch(b)},add:function(a){var b=this,d;return a=b.parent(a),b.isRendered&&(d=c.get("menu_"+b.id))&&b._add(c.select("tbody",d)[0],a),a},collapse:function(a){this.parent(a),this.hideMenu(1)},remove:function(a){return c.remove(a.id),this.destroy(),this.parent(a)},destroy:function(){var a=this,b=c.get("menu_"+a.id);a.keyboardNav&&a.keyboardNav.destroy(),e.remove(b,"mouseover",a.mouseOverFunc),e.remove(c.select("a",b),"focus",a.mouseOverFunc),e.remove(b,"click",a.mouseClickFunc),e.remove(b,"keydown",a._keyHandler),a.element&&a.element.remove(),c.remove(b)},renderNode:function(){var a=this,b=a.settings,e,g,h,i;return i=c.create("div",{role:"listbox",id:"menu_"+a.id,"class":b["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"}),a.settings.parent&&c.setAttrib(i,"aria-parent","menu_"+a.settings.parent.id),h=c.add(i,"div",{role:"presentation",id:"menu_"+a.id+"_co","class":a.classPrefix+(b["class"]?" "+b["class"]:"")}),a.element=new f("menu_"+a.id,{blocker:1,container:b.container}),b.menu_line&&c.add(h,"span",{"class":a.classPrefix+"Line"}),e=c.add(h,"table",{role:"presentation",id:"menu_"+a.id+"_tbl",border:0,cellPadding:0,cellSpacing:0}),g=c.add(e,"tbody"),d(a.items,function(b){a._add(g,b)}),a.rendered=!0,i},_setupKeyboardNav:function(){var b,d,e=this;b=c.get("menu_"+e.id),d=c.select("a[role=option]","menu_"+e.id),d.splice(0,0,b),e.keyboardNav=new a.ui.KeyboardNavigation({root:"menu_"+e.id,items:d,onCancel:function(){e.hideMenu()},enableUpDown:!0}),b.focus()},_keyHandler:function(a){var b=this,c;switch(a.keyCode){case 37:b.settings.parent&&(b.hideMenu(),b.settings.parent.focus(),e.cancel(a));break;case 39:b.mouseOverFunc&&b.mouseOverFunc(a)}},_add:function(a,b){var d,e=b.settings,f,g,h,i=this.classPrefix,j;if(e.separator){g=c.add(a,"tr",{id:b.id,"class":i+"ItemSeparator"}),c.add(g,"td",{"class":i+"ItemSeparator"}),(d=g.previousSibling)&&c.addClass(d,"mceLast");return}d=g=c.add(a,"tr",{id:b.id,"class":i+"Item "+i+"ItemEnabled"}),d=h=c.add(d,e.titleItem?"th":"td"),d=f=c.add(d,"a",{id:b.id+"_aria",role:e.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"}),e.parent&&(c.setAttrib(f,"aria-haspopup","true"),c.setAttrib(f,"aria-owns","menu_"+b.id)),c.addClass(h,e["class"]),j=c.add(d,"span",{"class":"mceIcon"+(e.icon?" mce_"+e.icon:"")}),e.icon_src&&c.add(j,"img",{src:e.icon_src}),d=c.add(d,e.element||"span",{"class":"mceText",title:b.settings.title},b.settings.title),b.settings.style&&c.setAttrib(d,"style",b.settings.style),a.childNodes.length==1&&c.addClass(g,"mceFirst"),(d=g.previousSibling)&&c.hasClass(d,i+"ItemSeparator")&&c.addClass(g,"mceFirst"),b.collapse&&c.addClass(g,i+"ItemSub"),(d=g.previousSibling)&&c.removeClass(d,"mceLast"),c.addClass(g,"mceLast")}})}(tinymce),function(a){var b=a.DOM;a.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(a,b,c){this.parent(a,b,c),this.classPrefix="mceButton"},renderHTML:function(){var a=this.classPrefix,c=this.settings,d,e;return e=b.encode(c.label||""),d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+a+" "+a+"Enabled "+c["class"]+(e?" "+a+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+b.encode(c.title)+'">',c.image&&(!this.editor||!this.editor.forcedHighContrastMode)?d+='<img class="mceIcon" src="'+c.image+'" alt="'+b.encode(c.title)+'" />'+e:d+='<span class="mceIcon '+c["class"]+'"></span>'+(e?'<span class="'+a+'Label">'+e+"</span>":""),d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+c.title+"</span>",d+="</a>",d},postRender:function(){var b=this,c=b.settings,d;a.isIE&&b.editor&&a.dom.Event.add(b.id,"mousedown",function(a){d=b.editor.selection.getBookmark()}),a.dom.Event.add(b.id,"click",function(e){if(!b.isDisabled())return a.isIE&&b.editor&&d&&a.activeEditor.selection.moveToBookmark(d),c.onclick.call(c.scope,e)}),a.dom.Event.add(b.id,"keyup",function(d){if(!b.isDisabled()&&d.keyCode==a.VK.SPACEBAR)return c.onclick.call(c.scope,d)})}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each,e=a.util.Dispatcher;a.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(b,c,d){var f=this;f.parent(b,c,d),f.items=[],f.onChange=new e(f),f.onPostRender=new e(f),f.onAdd=new e(f),f.onRenderMenu=new a.util.Dispatcher(this),f.classPrefix="mceListBox"},select:function(a){var b=this,c,e;if(a==undefined)return b.selectByIndex(-1);a&&a.call?e=a:e=function(b){return b==a},a!=b.selectedValue&&(d(b.items,function(a,d){if(e(a.value))return c=1,b.selectByIndex(d),!1}),c||b.selectByIndex(-1))},selectByIndex:function(a){var c=this,d,e,f;a!=c.selectedIndex&&(d=b.get(c.id+"_text"),f=b.get(c.id+"_voiceDesc"),e=c.items[a],e?(c.selectedValue=e.value,c.selectedIndex=a,b.setHTML(d,b.encode(e.title)),b.setHTML(f,c.settings.title+" - "+e.title),b.removeClass(d,"mceTitle"),b.setAttrib(c.id,"aria-valuenow",e.title)):(b.setHTML(d,b.encode(c.settings.title)),b.setHTML(f,b.encode(c.settings.title)),b.addClass(d,"mceTitle"),c.selectedValue=c.selectedIndex=null,b.setAttrib(c.id,"aria-valuenow",c.settings.title)),d=0)},add:function(b,c,d){var e=this;d=d||{},d=a.extend(d,{title:b,value:c}),e.items.push(d),e.onAdd.dispatch(e,d)},getLength:function(){return this.items.length},renderHTML:function(){var a="",c=this,d=c.settings,e=c.classPrefix;return a='<span role="listbox" aria-haspopup="true" aria-labelledby="'+c.id+'_voiceDesc" aria-describedby="'+c.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+c.id+'" cellpadding="0" cellspacing="0" class="'+e+" "+e+"Enabled"+(d["class"]?" "+d["class"]:"")+'"><tbody><tr>',a+="<td>"+b.createHTML("span",{id:c.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},c.settings.title),a+=b.createHTML("a",{id:c.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},b.encode(c.settings.title))+"</td>",a+="<td>"+b.createHTML("a",{id:c.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span></span>')+"</td>",a+="</tr></tbody></table></span>",a},showMenu:function(){var e=this,f,g=b.get(this.id),h;if(e.isDisabled()||e.items.length==0)return;if(e.menu&&e.menu.isMenuVisible)return e.hideMenu();e.isMenuRendered||(e.renderMenu(),e.isMenuRendered=!0),f=b.getPos(g),h=e.menu,h.settings.offset_x=f.x,h.settings.offset_y=f.y,h.settings.keyboard_focus=!a.isOpera,e.oldID&&h.items[e.oldID].setSelected(0),d(e.items,function(a){a.value===e.selectedValue&&(h.items[a.id].setSelected(1),e.oldID=a.id)}),h.showMenu(0,g.clientHeight),c.add(b.doc,"mousedown",e.hideMenu,e),b.addClass(e.id,e.classPrefix+"Selected")},hideMenu:function(a){var d=this;if(d.menu&&d.menu.isMenuVisible){b.removeClass(d.id,d.classPrefix+"Selected");if(!(!a||a.type!="mousedown"||a.target.id!=d.id+"_text"&&a.target.id!=d.id+"_open"))return;if(!a||!b.getParent(a.target,".mceMenu"))b.removeClass(d.id,d.classPrefix+"Selected"),c.remove(b.doc,"mousedown",d.hideMenu,d),d.menu.hideMenu()}},renderMenu:function(){var a=this,c;c=a.settings.control_manager.createDropMenu(a.id+"_menu",{menu_line:1,"class":a.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150}),c.onHideMenu.add(function(){a.hideMenu(),a.focus()}),c.add({title:a.settings.title,"class":"mceMenuItemTitle",onclick:function(){a.settings.onselect("")!==!1&&a.select("")}}),d(a.items,function(d){d.value===undefined?c.add({title:d.title,role:"option","class":"mceMenuItemTitle",onclick:function(){a.settings.onselect("")!==!1&&a.select("")}}):(d.id=b.uniqueId(),d.role="option",d.onclick=function(){a.settings.onselect(d.value)!==!1&&a.select(d.value)},c.add(d))}),a.onRenderMenu.dispatch(a,c),a.menu=c},postRender:function(){var d=this,e=d.classPrefix;c.add(d.id,"click",d.showMenu,d),c.add(d.id,"keydown",function(a){a.keyCode==32&&(d.showMenu(a),c.cancel(a))}),c.add(d.id,"focus",function(){d._focused||(d.keyDownHandler=c.add(d.id,"keydown",function(a){a.keyCode==40&&(d.showMenu(),c.cancel(a))}),d.keyPressHandler=c.add(d.id,"keypress",function(a){var b;a.keyCode==13&&(b=d.selectedValue,d.selectedValue=null,c.cancel(a),d.settings.onselect(b))})),d._focused=1}),c.add(d.id,"blur",function(){c.remove(d.id,"keydown",d.keyDownHandler),c.remove(d.id,"keypress",d.keyPressHandler),d._focused=0});if(a.isIE6||!b.boxModel)c.add(d.id,"mouseover",function(){b.hasClass(d.id,e+"Disabled")||b.addClass(d.id,e+"Hover")}),c.add(d.id,"mouseout",function(){b.hasClass(d.id,e+"Disabled")||b.removeClass(d.id,e+"Hover")});d.onPostRender.dispatch(d,b.get(d.id))},destroy:function(){this.parent(),c.clear(this.id+"_text"),c.clear(this.id+"_open")}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each,e=a.util.Dispatcher;a.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(a,b){this.parent(a,b),this.classPrefix="mceNativeListBox"},setDisabled:function(a){b.get(this.id).disabled=a,this.setAriaProperty("disabled",a)},isDisabled:function(){return b.get(this.id).disabled},select:function(a){var b=this,c,e;if(a==undefined)return b.selectByIndex(-1);a&&a.call?e=a:e=function(b){return b==a},a!=b.selectedValue&&(d(b.items,function(a,d){if(e(a.value))return c=1,b.selectByIndex(d),!1}),c||b.selectByIndex(-1))},selectByIndex:function(a){b.get(this.id).selectedIndex=a+1,this.selectedValue=this.items[a]?this.items[a].value:null},add:function(a,c,d){var e,f=this;d=d||{},d.value=c,f.isRendered()&&b.add(b.get(this.id),"option",d,a),e={title:a,value:c,attribs:d},f.items.push(e),f.onAdd.dispatch(f,e)},getLength:function(){return this.items.length},renderHTML:function(){var a,c=this;return a=b.createHTML("option",{value:""},"-- "+c.settings.title+" --"),d(c.items,function(c){a+=b.createHTML("option",{value:c.value},c.title)}),a=b.createHTML("select",{id:c.id,"class":"mceNativeListBox","aria-labelledby":c.id+"_aria"},a),a+=b.createHTML("span",{id:c.id+"_aria",style:"display: none"},c.settings.title),a},postRender:function(){function g(a){var b=d.items[a.target.selectedIndex-1];b&&(b=b.value)&&(d.onChange.dispatch(d,b),d.settings.onselect&&d.settings.onselect(b))}var d=this,e,f=!0;d.rendered=!0,c.add(d.id,"change",g),c.add(d.id,"keydown",function(b){var h;c.remove(d.id,"change",e),f=!1,h=c.add(d.id,"blur",function(){if(f)return;f=!0,c.add(d.id,"change",g),c.remove(d.id,"blur",h)});if(!(!a.isWebKit||b.keyCode!=37&&b.keyCode!=39))return c.prevent(b);if(b.keyCode==13||b.keyCode==32)return g(b),c.cancel(b)}),d.onPostRender.dispatch(d,b.get(d.id))}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each;a.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(c,d,e){this.parent(c,d,e),this.onRenderMenu=new a.util.Dispatcher(this),d.menu_container=d.menu_container||b.doc.body},showMenu:function(){var a=this,d,e,f=b.get(a.id),g;if(a.isDisabled())return;a.isMenuRendered||(a.renderMenu(),a.isMenuRendered=!0);if(a.isMenuVisible)return a.hideMenu();d=b.getPos(a.settings.menu_container),e=b.getPos(f),g=a.menu,g.settings.offset_x=e.x,g.settings.offset_y=e.y,g.settings.vp_offset_x=e.x,g.settings.vp_offset_y=e.y,g.settings.keyboard_focus=a._focused,g.showMenu(0,f.clientHeight),c.add(b.doc,"mousedown",a.hideMenu,a),a.setState("Selected",1),a.isMenuVisible=1},renderMenu:function(){var a=this,b;b=a.settings.control_manager.createDropMenu(a.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:a.settings.icons}),b.onHideMenu.add(function(){a.hideMenu(),a.focus()}),a.onRenderMenu.dispatch(a,b),a.menu=b},hideMenu:function(a){var d=this;if(a&&a.type=="mousedown"&&b.getParent(a.target,function(a){return a.id===d.id||a.id===d.id+"_open"}))return;if(!a||!b.getParent(a.target,".mceMenu"))d.setState("Selected",0),c.remove(b.doc,"mousedown",d.hideMenu,d),d.menu&&d.menu.hideMenu();d.isMenuVisible=0},postRender:function(){var a=this,b=a.settings;c.add(a.id,"click",function(){a.isDisabled()||(b.onclick&&b.onclick(a.value),a.showMenu())})}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each;a.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(a,b,c){this.parent(a,b,c),this.classPrefix="mceSplitButton"},renderHTML:function(){var a,c=this,d=c.settings,e;return a="<tbody><tr>",d.image?e=b.createHTML("img ",{src:d.image,role:"presentation","class":"mceAction "+d["class"]}):e=b.createHTML("span",{"class":"mceAction "+d["class"]},""),e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:c.id+"_voice",style:"display:none;"},d.title),a+="<td >"+b.createHTML("a",{role:"button",id:c.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+d["class"],onclick:"return false;",onmousedown:"return false;",title:d.title},e)+"</td>",e=b.createHTML("span",{"class":"mceOpen "+d["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span>'),a+="<td >"+b.createHTML("a",{role:"button",id:c.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+d["class"],onclick:"return false;",onmousedown:"return false;",title:d.title},e)+"</td>",a+="</tr></tbody>",a=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+d["class"],cellpadding:"0",cellspacing:"0",title:d.title},a),b.createHTML("div",{id:c.id,role:"button",tabindex:"0","aria-labelledby":c.id+"_voice","aria-haspopup":"true"},a)},postRender:function(){var d=this,e=d.settings,f;e.onclick&&(f=function(a){d.isDisabled()||(e.onclick(d.value),c.cancel(a))},c.add(d.id+"_action","click",f),c.add(d.id,["click","keydown"],function(a){var b=32,e=14,g=13,h=38,i=40;if((a.keyCode===32||a.keyCode===13||a.keyCode===14)&&!a.altKey&&!a.ctrlKey&&!a.metaKey)f(),c.cancel(a);else if(a.type==="click"||a.keyCode===i)d.showMenu(),c.cancel(a)})),c.add(d.id+"_open","click",function(a){d.showMenu(),c.cancel(a)}),c.add([d.id,d.id+"_open"],"focus",function(){d._focused=1}),c.add([d.id,d.id+"_open"],"blur",function(){d._focused=0});if(a.isIE6||!b.boxModel)c.add(d.id,"mouseover",function(){b.hasClass(d.id,"mceSplitButtonDisabled")||b.addClass(d.id,"mceSplitButtonHover")}),c.add(d.id,"mouseout",function(){b.hasClass(d.id,"mceSplitButtonDisabled")||b.removeClass(d.id,"mceSplitButtonHover")})},destroy:function(){this.parent(),c.clear(this.id+"_action"),c.clear(this.id+"_open"),c.clear(this.id)}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.is,e=a.each;a.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(b,c,d){var e=this;e.parent(b,c,d),e.settings=c=a.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},e.settings),e.onShowMenu=new a.util.Dispatcher(e),e.onHideMenu=new a.util.Dispatcher(e),e.value=c.default_color},showMenu:function(){var a=this,d,e,f,g;if(a.isDisabled())return;a.isMenuRendered||(a.renderMenu(),a.isMenuRendered=!0);if(a.isMenuVisible)return a.hideMenu();f=b.get(a.id),b.show(a.id+"_menu"),b.addClass(f,"mceSplitButtonSelected"),g=b.getPos(f),b.setStyles(a.id+"_menu",{left:g.x,top:g.y+f.clientHeight,zIndex:2e5}),f=0,c.add(b.doc,"mousedown",a.hideMenu,a),a.onShowMenu.dispatch(a),a._focused&&(a._keyHandler=c.add(a.id+"_menu","keydown",function(b){b.keyCode==27&&a.hideMenu()}),b.select("a",a.id+"_menu")[0].focus()),a.isMenuVisible=1},hideMenu:function(a){var d=this;if(d.isMenuVisible){if(a&&a.type=="mousedown"&&b.getParent(a.target,function(a){return a.id===d.id+"_open"}))return;if(!a||!b.getParent(a.target,".mceSplitButtonMenu"))b.removeClass(d.id,"mceSplitButtonSelected"),c.remove(b.doc,"mousedown",d.hideMenu,d),c.remove(d.id+"_menu","keydown",d._keyHandler),b.hide(d.id+"_menu");d.isMenuVisible=0,d.onHideMenu.dispatch()}},renderMenu:function(){var f=this,g,h=0,i=f.settings,j,k,l,m,n;return m=b.add(i.menu_container,"div",{role:"listbox",id:f.id+"_menu","class":i.menu_class+" "+i["class"],style:"position:absolute;left:0;top:-1000px;"}),g=b.add(m,"div",{"class":i["class"]+" mceSplitButtonMenu"}),b.add(g,"span",{"class":"mceMenuLine"}),j=b.add(g,"table",{role:"presentation","class":"mceColorSplitMenu"}),k=b.add(j,"tbody"),h=0,e(d(i.colors,"array")?i.colors:i.colors.split(","),function(c){c=c.replace(/^#/,""),h--||(l=b.add(k,"tr"),h=i.grid_width-1),j=b.add(l,"td");var d={href:"javascript:;",style:{backgroundColor:"#"+c},title:f.editor.getLang("colors."+c,c),"data-mce-color":"#"+c};a.isIE||(d.role="option"),j=b.add(j,"a",d),f.editor.forcedHighContrastMode&&(j=b.add(j,"canvas",{width:16,height:16,"aria-hidden":"true"}),j.getContext&&(n=j.getContext("2d"))?(n.fillStyle="#"+c,n.fillRect(0,0,16,16)):b.remove(j))}),i.more_colors_func&&(j=b.add(k,"tr"),j=b.add(j,"td",{colspan:i.grid_width,"class":"mceMoreColors"}),j=b.add(j,"a",{role:"option",id:f.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},i.more_colors_title),c.add(j,"click",function(a){return i.more_colors_func.call(i.more_colors_scope||this),c.cancel(a)})),b.addClass(g,"mceColorSplitMenu"),new a.ui.KeyboardNavigation({root:f.id+"_menu",items:b.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu(),f.focus()}}),c.add(f.id+"_menu","mousedown",function(a){return c.cancel(a)}),c.add(f.id+"_menu","click",function(a){var d;return a=b.getParent(a.target,"a",k),a&&a.nodeName.toLowerCase()=="a"&&(d=a.getAttribute("data-mce-color"))&&f.setColor(d),c.cancel(a)}),m},setColor:function(a){this.displayColor(a),this.hideMenu(),this.settings.onselect(a)},displayColor:function(a){var c=this;b.setStyle(c.id+"_preview","backgroundColor",a),c.value=a},postRender:function(){var a=this,c=a.id;a.parent(),b.add(c+"_action","div",{id:c+"_preview","class":"mceColorPreview"}),b.setStyle(a.id+"_preview","backgroundColor",a.value)},destroy:function(){this.parent(),c.clear(this.id+"_menu"),c.clear(this.id+"_more"),b.remove(this.id+"_menu")}})}(tinymce),function(a){var b=a.DOM,c=a.each,d=a.dom.Event;a.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var c=this,d=[],e=c.controls,f=a.each,g=c.settings;return d.push('<div id="'+c.id+'" role="group" aria-labelledby="'+c.id+'_voice">'),d.push("<span role='application'>"),d.push('<span id="'+c.id+'_voice" class="mceVoiceLabel" style="display:none;">'+b.encode(g.name)+"</span>"),f(e,function(a){d.push(a.renderHTML())}),d.push("</span>"),d.push("</div>"),d.join("")},focus:function(){var a=this;b.get(a.id).focus()},postRender:function(){var d=this,e=[];c(d.controls,function(a){c(a.controls,function(a){a.id&&e.push(a)})}),d.keyNav=new a.ui.KeyboardNavigation({root:d.id,items:e,onCancel:function(){a.isWebKit&&b.get(d.editor.id+"_ifr").focus(),d.editor.focus()},excludeFromTabOrder:!d.settings.tab_focus_toolbar})},destroy:function(){var a=this;a.parent(),a.keyNav.destroy(),d.clear(a.id)}})}(tinymce),function(a){var b=a.DOM,c=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var a=this,c="",d,e,f=a.settings,g,h,i,j;j=a.controls;for(g=0;g<j.length;g++)e=j[g],h=j[g-1],i=j[g+1],g===0&&(d="mceToolbarStart",e.Button?d+=" mceToolbarStartButton":e.SplitButton?d+=" mceToolbarStartSplitButton":e.ListBox&&(d+=" mceToolbarStartListBox"),c+=b.createHTML("td",{"class":d},b.createHTML("span",null,"<!-- IE -->"))),h&&e.ListBox&&(h.Button||h.SplitButton)&&(c+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,"<!-- IE -->"))),b.stdMode?c+='<td style="position: relative">'+e.renderHTML()+"</td>":c+="<td>"+e.renderHTML()+"</td>",i&&e.ListBox&&(i.Button||i.SplitButton)&&(c+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,"<!-- IE -->")));return d="mceToolbarEnd",e.Button?d+=" mceToolbarEndButton":e.SplitButton?d+=" mceToolbarEndSplitButton":e.ListBox&&(d+=" mceToolbarEndListBox"),c+=b.createHTML("td",{"class":d},b.createHTML("span",null,"<!-- IE -->")),b.createHTML("table",{id:a.id,"class":"mceToolbar"+(f["class"]?" "+f["class"]:""),cellpadding:"0",cellspacing:"0",align:a.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+c+"</tr></tbody>")}})}(tinymce),function(a){var b=a.util.Dispatcher,c=a.each;a.create("tinymce.AddOnManager",{AddOnManager:function(){var a=this;a.items=[],a.urls={},a.lookup={},a.onAdd=new b(a)},get:function(a){return this.lookup[a]?this.lookup[a].instance:undefined},dependencies:function(a){var b;return this.lookup[a]&&(b=this.lookup[a].dependencies),b||[]},requireLangPack:function(b){var c=a.settings;c&&c.language&&c.language_load!==!1&&a.ScriptLoader.add(this.urls[b]+"/langs/"+c.language+".js")},add:function(a,b,c){return this.items.push(b),this.lookup[a]={instance:b,dependencies:c},this.onAdd.dispatch(this,a,b),b},createUrl:function(a,b){return typeof b=="object"?b:{prefix:a.prefix,resource:b,suffix:a.suffix}},addComponents:function(b,c){var d=this.urls[b];a.each(c,function(b){a.ScriptLoader.add(d+"/"+b)})},load:function(b,c,d,e){function h(){var g=f.dependencies(b);a.each(g,function(a){var b=f.createUrl(c,a);f.load(b.resource,b,undefined,undefined)}),d&&(e?d.call(e):d.call(a.ScriptLoader))}var f=this,g=c;if(f.urls[b])return;typeof c=="object"&&(g=c.prefix+c.resource+c.suffix),g.indexOf("/")!=0&&g.indexOf("://")==-1&&(g=a.baseURL+"/"+g),f.urls[b]=g.substring(0,g.lastIndexOf("/")),f.lookup[b]?h():a.ScriptLoader.add(g,h,e)}}),a.PluginManager=new a.AddOnManager,a.ThemeManager=new a.AddOnManager}(tinymce),function(a){var b=a.each,c=a.extend,d=a.DOM,e=a.dom.Event,f=a.ThemeManager,g=a.PluginManager,h=a.explode,i=a.util.Dispatcher,j,k=0;a.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(a.documentBaseURL)||(a.documentBaseURL+="/"),a.baseURL=(new a.util.URI(a.documentBaseURL)).toAbsolute(a.baseURL),a.baseURI=new a.util.URI(a.baseURL),a.onBeforeUnload=new i(a),e.add(window,"beforeunload",function(b){a.onBeforeUnload.dispatch(a,b)}),a.onAddEditor=new i(a),a.onRemoveEditor=new i(a),a.EditorManager=c(a,{editors:[],i18n:{},activeEditor:null,init:function(f){function o(b,c,d){var e=b[c];if(!e)return;return a.is(e,"string")&&(d=e.replace(/\.\w+$/,""),d=d?a.resolve(d):0,e=a.resolve(e)),e.apply(d||this,Array.prototype.slice.call(arguments,2))}var g=this,i,j=a.ScriptLoader,l,m=[],n;f=c({theme:"simple",language:"en"},f),g.settings=f,e.add(document,"init",function(){var c,e;o(f,"onpageload");switch(f.mode){case"exact":c=f.elements||"",c.length>0&&b(h(c),function(c){d.get(c)?(n=new a.Editor(c,f),m.push(n),n.render(1)):b(document.forms,function(e){b(e.elements,function(b){b.name===c&&(c="mce_editor_"+k++,d.setAttrib(b,"id",c),n=new a.Editor(c,f),m.push(n),n.render(1))})})});break;case"textareas":case"specific_textareas":function i(a,b){return b.constructor===RegExp?b.test(a.className):d.hasClass(a,b)}b(d.select("textarea"),function(b){if(f.editor_deselector&&i(b,f.editor_deselector))return;if(!f.editor_selector||i(b,f.editor_selector)){l=d.get(b.name),!b.id&&!l&&(b.id=b.name);if(!b.id||g.get(b.id))b.id=d.uniqueId();n=new a.Editor(b.id,f),m.push(n),n.render(1)}})}f.oninit&&(c=e=0,b(m,function(a){e++,a.initialized?c++:a.onInit.add(function(){c++,c==e&&o(f,"oninit")}),c==e&&o(f,"oninit")}))})},get:function(a){return a===j?this.editors:this.editors[a]},getInstanceById:function(a){return this.get(a)},add:function(b){var c=this,d=c.editors;return d[b.id]=b,d.push(b),c._setActive(b),c.onAddEditor.dispatch(c,b),a.adapter&&a.adapter.patchEditor(b),b},remove:function(a){var b=this,c,d=b.editors;if(!d[a.id])return null;delete d[a.id];for(c=0;c<d.length;c++)if(d[c]==a){d.splice(c,1);break}return b.activeEditor==a&&b._setActive(d[0]),a.destroy(),b.onRemoveEditor.dispatch(b,a),a},execCommand:function(b,c,d){var e=this,f=e.get(d),g;switch(b){case"mceFocus":return f.focus(),!0;case"mceAddEditor":case"mceAddControl":return e.get(d)||(new a.Editor(d,e.settings)).render(),!0;case"mceAddFrameControl":g=d.window,g.tinyMCE=tinyMCE,g.tinymce=a,a.DOM.doc=g.document,a.DOM.win=g,f=new a.Editor(d.element_id,d),f.render();if(a.isIE){function h(){f.destroy(),g.detachEvent("onunload",h),g=g.tinyMCE=g.tinymce=null}g.attachEvent("onunload",h)}return d.page_window=null,!0;case"mceRemoveEditor":case"mceRemoveControl":return f&&f.remove(),!0;case"mceToggleEditor":if(!f)return e.execCommand("mceAddControl",0,d),!0;return f.isHidden()?f.show():f.hide(),!0}return e.activeEditor?e.activeEditor.execCommand(b,c,d):!1},execInstanceCommand:function(a,b,c,d){var e=this.get(a);return e?e.execCommand(b,c,d):!1},triggerSave:function(){b(this.editors,function(a){a.save()})},addI18n:function(c,d){var e,f=this.i18n;a.is(c,"string")?b(d,function(a,b){f[c+"."+b]=a}):b(c,function(a,c){b(a,function(a,d){b(a,function(a,b){d==="common"?f[c+"."+b]=a:f[c+"."+d+"."+b]=a})})})},_setActive:function(a){this.selectedInstance=this.activeEditor=a}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.extend,e=a.util.Dispatcher,f=a.each,g=a.isGecko,h=a.isIE,i=a.isWebKit,j=a.is,k=a.ThemeManager,l=a.PluginManager,m=a.inArray,n=a.grep,o=a.explode,p=a.VK;a.create("tinymce.Editor",{Editor:function(b,c){var g=this;g.id=g.editorId=b,g.execCommands={},g.queryStateCommands={},g.queryValueCommands={},g.isNotDirty=!1,g.plugins={},f(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(a){g[a]=new e(g)}),g.settings=c=d({id:b,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:a.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:!0,entity_encoding:"named",url_converter:g.convertURL,url_converter_scope:g,ie7_compat:!0},c),g.documentBaseURI=new a.util.URI(c.document_base_url||a.documentBaseURL,{base_uri:tinyMCE.baseURI}),g.baseURI=a.baseURI,g.contentCSS=[],g.execCallback("setup",g)},render:function(d){function j(){g.language&&g.language_load!==!1&&i.add(a.baseURL+"/langs/"+g.language+".js"),g.theme&&g.theme.charAt(0)!="-"&&!k.urls[g.theme]&&k.load(g.theme,"themes/"+g.theme+"/editor_template"+a.suffix+".js"),f(o(g.plugins),function(b){if(b&&!l.urls[b])if(b.charAt(0)=="-"){b=b.substr(1,b.length);var c=l.dependencies(b);f(c,function(b){var c={prefix:"plugins/",resource:b,suffix:"/editor_plugin"+a.suffix+".js"},b=l.createUrl(c,b);l.load(b.resource,b)})}else{if(b=="safari")return;l.load(b,{prefix:"plugins/",resource:b,suffix:"/editor_plugin"+a.suffix+".js"})}}),i.loadQueue(function(){e.removed||e.init()})}var e=this,g=e.settings,h=e.id,i=a.ScriptLoader;if(!c.domLoaded){c.add(document,"init",function(){e.render()});return}tinyMCE.settings=g;if(!e.getElement())return;if(a.isIDevice&&!a.isIOS5)return;!/TEXTAREA|INPUT/i.test(e.getElement().nodeName)&&g.hidden_input&&b.getParent(h,"form")&&b.insertAfter(b.create("input",{type:"hidden",name:h}),h),a.WindowManager&&(e.windowManager=new a.WindowManager(e)),g.encoding=="xml"&&e.onGetContent.add(function(a,c){c.save&&(c.content=b.encode(c.content))}),g.add_form_submit_trigger&&e.onSubmit.addToTop(function(){e.initialized&&(e.save(),e.isNotDirty=1)}),g.add_unload_trigger&&(e._beforeUnload=tinyMCE.onBeforeUnload.add(function(){e.initialized&&!e.destroyed&&!
e.isHidden()&&e.save({format:"raw",no_events:!0})})),a.addUnload(e.destroy,e),g.submit_patch&&e.onBeforeRenderUI.add(function(){var b=e.getElement().form;if(!b)return;if(b._mceOldSubmit)return;!b.submit.nodeType&&!b.submit.length&&(e.formElement=b,b._mceOldSubmit=b.submit,b.submit=function(){return a.triggerSave(),e.isNotDirty=1,e.formElement._mceOldSubmit(e.formElement)}),b=null}),j()},init:function(){function w(b){var c=l.get(b),e=l.urls[b]||a.documentBaseURL.replace(/\/$/,""),g;c&&a.inArray(v,b)===-1&&(f(l.dependencies(b),function(a){w(a)}),g=new c(d,e),d.plugins[b]=g,g.init&&(g.init(d,e),v.push(b)))}var c,d=this,e=d.settings,i,j,m=d.getElement(),n,p,q,r,s,t,u,v=[];a.add(d),e.aria_label=e.aria_label||b.getAttrib(m,"aria-label",d.getLang("aria.rich_text_area")),e.theme&&(e.theme=e.theme.replace(/-/,""),n=k.get(e.theme),d.theme=new n,d.theme.init&&e.init_theme&&d.theme.init(d,k.urls[e.theme]||a.documentBaseURL.replace(/\/$/,""))),f(o(e.plugins.replace(/\-/g,"")),w),e.popup_css!==!1&&(e.popup_css?e.popup_css=d.documentBaseURI.toAbsolute(e.popup_css):e.popup_css=d.baseURI.toAbsolute("themes/"+e.theme+"/skins/"+e.skin+"/dialog.css")),e.popup_css_add&&(e.popup_css+=","+d.documentBaseURI.toAbsolute(e.popup_css_add)),d.controlManager=new a.ControlManager(d),e.custom_undo_redo&&(d.onBeforeExecCommand.add(function(a,b,c,e,f){b!="Undo"&&b!="Redo"&&b!="mceRepaint"&&(!f||!f.skip_undo)&&d.undoManager.beforeChange()}),d.onExecCommand.add(function(a,b,c,e,f){b!="Undo"&&b!="Redo"&&b!="mceRepaint"&&(!f||!f.skip_undo)&&d.undoManager.add()})),d.onExecCommand.add(function(a,b){/^(FontName|FontSize)$/.test(b)||d.nodeChanged()});if(g){function x(a,b){(!b||!b.initial)&&d.execCommand("mceRepaint")}d.onUndo.add(x),d.onRedo.add(x),d.onSetContent.add(x)}d.onBeforeRenderUI.dispatch(d,d.controlManager),e.render_ui&&(i=e.width||m.style.width||m.offsetWidth,j=e.height||m.style.height||m.offsetHeight,d.orgDisplay=m.style.display,t=/^[0-9\.]+(|px)$/i,t.test(""+i)&&(i=Math.max(parseInt(i)+(n.deltaWidth||0),100)),t.test(""+j)&&(j=Math.max(parseInt(j)+(n.deltaHeight||0),100)),n=d.theme.renderUI({targetNode:m,width:i,height:j,deltaWidth:e.delta_width,deltaHeight:e.delta_height}),d.editorContainer=n.editorContainer),document.domain&&location.hostname!=document.domain&&(a.relaxedDomain=document.domain),b.setStyles(n.sizeContainer||n.editorContainer,{width:i,height:j}),e.content_css&&a.each(o(e.content_css),function(a){d.contentCSS.push(d.documentBaseURI.toAbsolute(a))}),j=(n.iframeHeight||j)+(typeof j=="number"?n.deltaHeight||0:""),j<100&&(j=100),d.iframeHTML=e.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">',e.document_base_url!=a.documentBaseURL&&(d.iframeHTML+='<base href="'+d.documentBaseURI.getURI()+'" />'),e.ie7_compat?d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />':d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />',d.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(u=0;u<d.contentCSS.length;u++)d.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+d.contentCSS[u]+'" />';r=e.body_id||"tinymce",r.indexOf("=")!=-1&&(r=d.getParam("body_id","","hash"),r=r[d.id]||r),s=e.body_class||"",s.indexOf("=")!=-1&&(s=d.getParam("body_class","","hash"),s=s[d.id]||""),d.iframeHTML+='</head><body id="'+r+'" class="mceContentBody '+s+'" onload="window.parent.tinyMCE.get(\''+d.id+"').onLoad.dispatch();\"><br></body></html>",a.relaxedDomain&&(h||a.isOpera&&parseFloat(opera.version())<11)&&(q='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+d.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'),c=b.add(n.iframeContainer,"iframe",{id:d.id+"_ifr",src:q||'javascript:""',frameBorder:"0",allowTransparency:"true",title:e.aria_label,style:{width:"100%",height:j,display:"block"}}),d.contentAreaContainer=n.iframeContainer,b.get(n.editorContainer).style.display=d.orgDisplay,b.get(d.id).style.display="none",b.setAttrib(d.id,"aria-hidden",!0),(!a.relaxedDomain||!q)&&d.setupIframe(),m=c=n=null},setupIframe:function(){var d=this,e=d.settings,i=b.get(d.id),j=d.getDoc(),k,l;if(!h||!a.relaxedDomain)j.open(),j.write(d.iframeHTML),j.close(),a.relaxedDomain&&(j.domain=a.relaxedDomain);l=d.getBody(),l.disabled=!0,e.readonly||(l.contentEditable=!0),l.disabled=!1,d.schema=new a.html.Schema(e),d.dom=new a.dom.DOMUtils(d.getDoc(),{keep_values:!0,url_converter:d.convertURL,url_converter_scope:d,hex_colors:e.force_hex_style_colors,class_filter:e.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:d.schema}),d.parser=new a.html.DomParser(e,d.schema),d.settings.allow_html_in_named_anchor||d.parser.addAttributeFilter("name",function(a,b){var c=a.length,d,e,f,g;while(c--){g=a[c];if(g.name==="a"&&g.firstChild){f=g.parent,d=g.lastChild;do e=d.prev,f.insert(d,g),d=e;while(d)}}}),d.parser.addAttributeFilter("src,href,style",function(a,b){var c=a.length,e,f=d.dom,g,h;while(c--)e=a[c],g=e.attr(b),h="data-mce-"+b,e.attributes.map[h]||(b==="style"?e.attr(h,f.serializeStyle(f.parseStyle(g),e.name)):e.attr(h,d.convertURL(g,b,e.name)))}),d.parser.addNodeFilter("script",function(a,b){var c=a.length,d;while(c--)d=a[c],d.attr("type","mce-"+(d.attr("type")||"text/javascript"))}),d.parser.addNodeFilter("#cdata",function(a,b){var c=a.length,d;while(c--)d=a[c],d.type=8,d.name="#comment",d.value="[CDATA["+d.value+"]]"}),d.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(b,c){var e=b.length,f,g=d.schema.getNonEmptyElements();while(e--)f=b[e],f.isEmpty(g)&&(f.empty().append(new a.html.Node("br",1)).shortEnded=!0)}),d.serializer=new a.dom.Serializer(e,d.dom,d.schema),d.selection=new a.dom.Selection(d.dom,d.getWin(),d.serializer),d.formatter=new a.Formatter(this),d.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(a){return!0},onformat:function(a,b,c){f(c,function(b,c){d.dom.setAttrib(a,c,b)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),f("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(a){d.formatter.register(a,{block:a,remove:"all"})}),d.formatter.register(d.settings.formats),d.undoManager=new a.UndoManager(d),d.undoManager.onAdd.add(function(a,b){if(a.hasUndo())return d.onChange.dispatch(d,b,a)}),d.undoManager.onUndo.add(function(a,b){return d.onUndo.dispatch(d,b,a)}),d.undoManager.onRedo.add(function(a,b){return d.onRedo.dispatch(d,b,a)}),d.forceBlocks=new a.ForceBlocks(d,{forced_root_block:e.forced_root_block}),d.editorCommands=new a.EditorCommands(d),d.serializer.onPreProcess.add(function(a,b){return d.onPreProcess.dispatch(d,b,a)}),d.serializer.onPostProcess.add(function(a,b){return d.onPostProcess.dispatch(d,b,a)}),d.onPreInit.dispatch(d),e.gecko_spellcheck||(d.getBody().spellcheck=0),e.readonly||d._addEvents(),d.controlManager.onPostRender.dispatch(d,d.controlManager),d.onPostRender.dispatch(d),d.quirks=new a.util.Quirks(this),e.directionality&&(d.getBody().dir=e.directionality),e.nowrap&&(d.getBody().style.whiteSpace="nowrap"),e.handle_node_change_callback&&d.onNodeChange.add(function(a,b,c){d.execCallback("handle_node_change_callback",d.id,c,-1,-1,!0,d.selection.isCollapsed())}),e.save_callback&&d.onSaveContent.add(function(a,b){var c=d.execCallback("save_callback",d.id,b.content,d.getBody());c&&(b.content=c)}),e.onchange_callback&&d.onChange.add(function(a,b){d.execCallback("onchange_callback",d,b)}),e.protect&&d.onBeforeSetContent.add(function(a,b){e.protect&&f(e.protect,function(a){b.content=b.content.replace(a,function(a){return"<!--mce:protected "+escape(a)+"-->"})})}),e.convert_newlines_to_brs&&d.onBeforeSetContent.add(function(a,b){b.initial&&(b.content=b.content.replace(/\r?\n/g,"<br />"))}),e.preformatted&&d.onPostProcess.add(function(a,b){b.content=b.content.replace(/^\s*<pre.*?>/,""),b.content=b.content.replace(/<\/pre>\s*$/,""),b.set&&(b.content='<pre class="mceItemHidden">'+b.content+"</pre>")}),e.verify_css_classes&&(d.serializer.attribValueFilter=function(a,b){var c,e;return a=="class"?(d.classesRE||(e=d.dom.getClasses(),e.length>0&&(c="",f(e,function(a){c+=(c?"|":"")+a["class"]}),d.classesRE=new RegExp("("+c+")","gi"))),!d.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(b)||d.classesRE.test(b)?b:""):b}),e.cleanup_callback&&(d.onBeforeSetContent.add(function(a,b){b.content=d.execCallback("cleanup_callback","insert_to_editor",b.content,b)}),d.onPreProcess.add(function(a,b){b.set&&d.execCallback("cleanup_callback","insert_to_editor_dom",b.node,b),b.get&&d.execCallback("cleanup_callback","get_from_editor_dom",b.node,b)}),d.onPostProcess.add(function(a,b){b.set&&(b.content=d.execCallback("cleanup_callback","insert_to_editor",b.content,b)),b.get&&(b.content=d.execCallback("cleanup_callback","get_from_editor",b.content,b))})),e.save_callback&&d.onGetContent.add(function(a,b){b.save&&(b.content=d.execCallback("save_callback",d.id,b.content,d.getBody()))}),e.handle_event_callback&&d.onEvent.add(function(a,b,e){d.execCallback("handle_event_callback",b,a,e)===!1&&c.cancel(b)}),d.onSetContent.add(function(){d.addVisual(d.getBody())}),e.padd_empty_editor&&d.onPostProcess.add(function(a,b){b.content=b.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")});if(g){function m(a,b){f(a.dom.select("a"),function(b){var c=b.parentNode;a.dom.isBlock(c)&&c.lastChild===b&&a.dom.add(c,"br",{"data-mce-bogus":1})})}d.onExecCommand.add(function(a,b){b==="CreateLink"&&m(a)}),d.onSetContent.add(d.selection.onSetContent.add(m))}d.load({initial:!0,format:"html"}),d.startContent=d.getContent({format:"raw"}),d.undoManager.add(),d.initialized=!0,d.onInit.dispatch(d),d.execCallback("setupcontent_callback",d.id,d.getBody(),d.getDoc()),d.execCallback("init_instance_callback",d),d.focus(!0),d.nodeChanged({initial:1}),f(d.contentCSS,function(a){d.dom.loadCSS(a)}),e.auto_focus&&setTimeout(function(){var b=a.get(e.auto_focus);b.selection.select(b.getBody(),1),b.selection.collapse(1),b.getBody().focus(),b.getWin().focus()},100),i=null},focus:function(b){var c,d=this,e=d.selection,f=d.settings.content_editable,g,h,i=d.getDoc();b||(g=e.getRng(),g.item&&(h=g.item(0)),d._refreshContentEditable(),f||d.getWin().focus(),a.isGecko&&d.getBody().focus(),h&&h.ownerDocument==i&&(g=i.body.createControlRange(),g.addElement(h),g.select())),a.activeEditor!=d&&((c=a.activeEditor)!=null&&c.onDeactivate.dispatch(c,d),d.onActivate.dispatch(d,c)),a._setActive(d)},execCallback:function(b){var c=this,d=c.settings[b],e;if(!d)return;return c.callbackLookup&&(e=c.callbackLookup[b])&&(d=e.func,e=e.scope),j(d,"string")&&(e=d.replace(/\.\w+$/,""),e=e?a.resolve(e):0,d=a.resolve(d),c.callbackLookup=c.callbackLookup||{},c.callbackLookup[b]={func:d,scope:e}),d.apply(e||c,Array.prototype.slice.call(arguments,1))},translate:function(b){var c=this.settings.language||"en",d=a.i18n;return b?d[c+"."+b]||b.replace(/{\#([^}]+)\}/g,function(a,b){return d[c+"."+b]||"{#"+b+"}"}):""},getLang:function(b,c){return a.i18n[(this.settings.language||"en")+"."+b]||(j(c)?c:"{#"+b+"}")},getParam:function(b,c,d){var e=a.trim,g=j(this.settings[b])?this.settings[b]:c,h;return d==="hash"?(h={},j(g,"string")?f(g.indexOf("=")>0?g.split(/[;,](?![^=;,]*(?:[;,]|$))/):g.split(","),function(a){a=a.split("="),a.length>1?h[e(a[0])]=e(a[1]):h[e(a[0])]=e(a)}):h=g,h):g},nodeChanged:function(a){var b=this,c=b.selection,d=c.getStart()||b.getBody();b.initialized&&(a=a||{},d=h&&d.ownerDocument!=b.getDoc()?b.getBody():d,a.parents=[],b.dom.getParent(d,function(b){if(b.nodeName=="BODY")return!0;a.parents.push(b)}),b.onNodeChange.dispatch(b,a?a.controlManager||b.controlManager:b.controlManager,d,c.isCollapsed(),a))},addButton:function(a,b){var c=this;c.buttons=c.buttons||{},c.buttons[a]=b},addCommand:function(a,b,c){this.execCommands[a]={func:b,scope:c||this}},addQueryStateHandler:function(a,b,c){this.queryStateCommands[a]={func:b,scope:c||this}},addQueryValueHandler:function(a,b,c){this.queryValueCommands[a]={func:b,scope:c||this}},addShortcut:function(a,b,c,d){var e=this,g;return e.settings.custom_shortcuts?(e.shortcuts=e.shortcuts||{},j(c,"string")&&(g=c,c=function(){e.execCommand(g,!1,null)}),j(c,"object")&&(g=c,c=function(){e.execCommand(g[0],g[1],g[2])}),f(o(a),function(a){var g={func:c,scope:d||this,desc:b,alt:!1,ctrl:!1,shift:!1};f(o(a,"+"),function(a){switch(a){case"alt":case"ctrl":case"shift":g[a]=!0;break;default:g.charCode=a.charCodeAt(0),g.keyCode=a.toUpperCase().charCodeAt(0)}}),e.shortcuts[(g.ctrl?"ctrl":"")+","+(g.alt?"alt":"")+","+(g.shift?"shift":"")+","+g.keyCode]=g}),!0):!1},execCommand:function(a,b,c,d){var e=this,g=0,h,i;!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(a)&&(!d||!d.skip_focus)&&e.focus(),h={},e.onBeforeExecCommand.dispatch(e,a,b,c,h);if(h.terminate)return!1;if(e.execCallback("execcommand_callback",e.id,e.selection.getNode(),a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),!0;if(h=e.execCommands[a]){i=h.func.call(h.scope,b,c);if(i!==!0)return e.onExecCommand.dispatch(e,a,b,c,d),i}f(e.plugins,function(f){if(f.execCommand&&f.execCommand(a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),g=1,!1});if(g)return!0;if(e.theme&&e.theme.execCommand&&e.theme.execCommand(a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),!0;if(e.editorCommands.execCommand(a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),!0;e.getDoc().execCommand(a,b,c),e.onExecCommand.dispatch(e,a,b,c,d)},queryCommandState:function(a){var b=this,c,d;if(b._isHidden())return;if(c=b.queryStateCommands[a]){d=c.func.call(c.scope);if(d!==!0)return d}c=b.editorCommands.queryCommandState(a);if(c!==-1)return c;try{return this.getDoc().queryCommandState(a)}catch(e){}},queryCommandValue:function(a){var b=this,c,d;if(b._isHidden())return;if(c=b.queryValueCommands[a]){d=c.func.call(c.scope);if(d!==!0)return d}c=b.editorCommands.queryCommandValue(a);if(j(c))return c;try{return this.getDoc().queryCommandValue(a)}catch(e){}},show:function(){var a=this;b.show(a.getContainer()),b.hide(a.id),a.load()},hide:function(){var a=this,c=a.getDoc();h&&c&&c.execCommand("SelectAll"),a.save(),b.hide(a.getContainer()),b.setStyle(a.id,"display",a.orgDisplay)},isHidden:function(){return!b.isHidden(this.id)},setProgressState:function(a,b,c){return this.onSetProgressState.dispatch(this,a,b,c),a},load:function(a){var b=this,c=b.getElement(),d;if(c)return a=a||{},a.load=!0,d=b.setContent(j(c.value)?c.value:c.innerHTML,a),a.element=c,a.no_events||b.onLoadContent.dispatch(b,a),a.element=c=null,d},save:function(a){var c=this,d=c.getElement(),e,g;if(!d||!c.initialized)return;return a=a||{},a.save=!0,a.no_events||(c.undoManager.typing=!1,c.undoManager.add()),a.element=d,e=a.content=c.getContent(a),a.no_events||c.onSaveContent.dispatch(c,a),e=a.content,/TEXTAREA|INPUT/i.test(d.nodeName)?d.value=e:(d.innerHTML=e,(g=b.getParent(c.id,"form"))&&f(g.elements,function(a){if(a.name==c.id)return a.value=e,!1})),a.element=d=null,e},setContent:function(b,c){var d=this,e,f=d.getBody(),g;c=c||{},c.format=c.format||"html",c.set=!0,c.content=b,c.no_events||d.onBeforeSetContent.dispatch(d,c),b=c.content;if(!a.isIE&&(b.length===0||/^\s+$/.test(b))){g=d.settings.forced_root_block,g?b="<"+g+'><br data-mce-bogus="1"></'+g+">":b='<br data-mce-bogus="1">',f.innerHTML=b,d.selection.select(f,!0),d.selection.collapse(!0);return}return c.format!=="raw"&&(b=(new a.html.Serializer({},d.schema)).serialize(d.parser.parse(b))),c.content=a.trim(b),d.dom.setHTML(f,c.content),c.no_events||d.onSetContent.dispatch(d,c),d.selection.normalize(),c.content},getContent:function(b){var c=this,d;return b=b||{},b.format=b.format||"html",b.get=!0,b.no_events||c.onBeforeGetContent.dispatch(c,b),b.format=="raw"?d=c.getBody().innerHTML:d=c.serializer.serialize(c.getBody(),b),b.content=a.trim(d),b.no_events||c.onGetContent.dispatch(c,b),b.content},isDirty:function(){var b=this;return a.trim(b.startContent)!=a.trim(b.getContent({format:"raw",no_events:1}))&&!b.isNotDirty},getContainer:function(){var a=this;return a.container||(a.container=b.get(a.editorContainer||a.id+"_parent")),a.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return b.get(this.settings.content_element||this.id)},getWin:function(){var a=this,c;return a.contentWindow||(c=b.get(a.id+"_ifr"),c&&(a.contentWindow=c.contentWindow)),a.contentWindow},getDoc:function(){var a=this,b;return a.contentDocument||(b=a.getWin(),b&&(a.contentDocument=b.document)),a.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(a,b,c){var d=this,e=d.settings;return e.urlconverter_callback?d.execCallback("urlconverter_callback",a,c,!0,b):!e.convert_urls||c&&c.nodeName=="LINK"||a.indexOf("file:")===0?a:e.relative_urls?d.documentBaseURI.toRelative(a):(a=d.documentBaseURI.toAbsolute(a,e.remove_script_host),a)},addVisual:function(a){var b=this,c=b.settings;a=a||b.getBody(),j(b.hasVisual)||(b.hasVisual=c.visual),f(b.dom.select("table,a",a),function(a){var d;switch(a.nodeName){case"TABLE":d=b.dom.getAttrib(a,"border");if(!d||d=="0")b.hasVisual?b.dom.addClass(a,c.visual_table_class):b.dom.removeClass(a,c.visual_table_class);return;case"A":d=b.dom.getAttrib(a,"name"),d&&(b.hasVisual?b.dom.addClass(a,"mceItemAnchor"):b.dom.removeClass(a,"mceItemAnchor"));return}}),b.onVisualAid.dispatch(b,a,b.hasVisual)},remove:function(){var c=this,d=c.getContainer();c.removed=1,c.hide(),c.execCallback("remove_instance_callback",c),c.onRemove.dispatch(c),c.onExecCommand.listeners=[],a.remove(c),b.remove(d)},destroy:function(b){var d=this;if(d.destroyed)return;b||(a.removeUnload(d.destroy),tinyMCE.onBeforeUnload.remove(d._beforeUnload),d.theme&&d.theme.destroy&&d.theme.destroy(),d.controlManager.destroy(),d.selection.destroy(),d.dom.destroy(),d.settings.content_editable||(c.clear(d.getWin()),c.clear(d.getDoc())),c.clear(d.getBody()),c.clear(d.formElement)),d.formElement&&(d.formElement.submit=d.formElement._mceOldSubmit,d.formElement._mceOldSubmit=null),d.contentAreaContainer=d.formElement=d.container=d.settings.content_element=d.bodyElement=d.contentDocument=d.contentWindow=null,d.selection&&(d.selection=d.selection.win=d.selection.dom=d.selection.dom.doc=null),d.destroyed=1},_addEvents:function(){function k(a,b){var c=a.type;if(d.removed)return;d.onEvent.dispatch(d,a,b)!==!1&&d[j[a.fakeType||a.type]].dispatch(d,a,b)}var d=this,e,h=d.settings,i=d.dom,j={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};f(j,function(a,c){switch(c){case"contextmenu":i.bind(d.getDoc(),c,k);break;case"paste":i.bind(d.getBody(),c,function(a){k(a)});break;case"submit":case"reset":i.bind(d.getElement().form||b.getParent(d.id,"form"),c,k);break;default:i.bind(h.content_editable?d.getBody():d.getDoc(),c,k)}}),i.bind(h.content_editable?d.getBody():g?d.getDoc():d.getWin(),"focus",function(a){d.focus(!0)}),a.isGecko&&i.bind(d.getDoc(),"DOMNodeInserted",function(a){var b;a=a.target,a.nodeType===1&&a.nodeName==="IMG"&&(b=a.getAttribute("data-mce-src"))&&(a.src=d.documentBaseURI.toAbsolute(b))});if(g){function l(){var a=this,b=a.getDoc(),c=a.settings;if(g&&!c.readonly){a._refreshContentEditable();try{b.execCommand("styleWithCSS",0,!1)}catch(d){if(!a._isHidden())try{b.execCommand("useCSS",0,!0)}catch(d){}}if(!c.table_inline_editing)try{b.execCommand("enableInlineTableEditing",!1,!1)}catch(d){}if(!c.object_resizing)try{b.execCommand("enableObjectResizing",!1,!1)}catch(d){}}}d.onBeforeExecCommand.add(l),d.onMouseDown.add(l)}d.onMouseUp.add(d.nodeChanged),d.onKeyUp.add(function(b,c){var e=c.keyCode;(e>=33&&e<=36||e>=37&&e<=40||e==13||e==45||e==46||e==8||a.isMac&&(e==91||e==93)||c.ctrlKey)&&d.nodeChanged()}),d.onKeyDown.add(function(a,b){if(b.keyCode!=p.BACKSPACE)return;var c=a.selection.getRng();if(!c.collapsed)return;var d=c.startContainer,e=c.startOffset;while(d&&d.nodeType&&d.nodeType!=1&&d.parentNode)d=d.parentNode;d&&d.parentNode&&d.parentNode.tagName==="BLOCKQUOTE"&&d.parentNode.firstChild==d&&e==0&&(a.formatter.toggle("blockquote",null,d.parentNode),c.setStart(d,0),c.setEnd(d,0),a.selection.setRng(c),a.selection.collapse(!1))}),d.onReset.add(function(){d.setContent(d.startContent,{format:"raw"})});if(h.custom_shortcuts){h.custom_undo_redo_keyboard_shortcuts&&(d.addShortcut("ctrl+z",d.getLang("undo_desc"),"Undo"),d.addShortcut("ctrl+y",d.getLang("redo_desc"),"Redo")),d.addShortcut("ctrl+b",d.getLang("bold_desc"),"Bold"),d.addShortcut("ctrl+i",d.getLang("italic_desc"),"Italic"),d.addShortcut("ctrl+u",d.getLang("underline_desc"),"Underline");for(e=1;e<=6;e++)d.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);d.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),d.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),d.addShortcut("ctrl+9","",["FormatBlock",!1,"address"]);function m(b){var c=null;return!b.altKey&&!b.ctrlKey&&!b.metaKey?c:(f(d.shortcuts,function(d){if(a.isMac&&d.ctrl!=b.metaKey)return;if(!a.isMac&&d.ctrl!=b.ctrlKey)return;if(d.alt!=b.altKey)return;if(d.shift!=b.shiftKey)return;if(b.keyCode==d.keyCode||b.charCode&&b.charCode==d.charCode)return c=d,!1}),c)}d.onKeyUp.add(function(a,b){var d=m(b);if(d)return c.cancel(b)}),d.onKeyPress.add(function(a,b){var d=m(b);if(d)return c.cancel(b)}),d.onKeyDown.add(function(a,b){var d=m(b);if(d)return d.func.call(d.scope),c.cancel(b)})}a.isIE&&i.bind(d.getDoc(),"controlselect",function(a){var b=d.resizeInfo,e;a=a.target;if(a.nodeName!=="IMG")return;b&&i.unbind(b.node,b.ev,b.cb),i.hasClass(a,"mceItemNoResize")?(ev="resizestart",e=i.bind(a,"resizestart",c.cancel,c)):(ev="resizeend",e=i.bind(a,ev,function(a){var b;a=a.target;if(b=i.getStyle(a,"width"))i.setAttrib(a,"width",b.replace(/[^0-9%]+/g,"")),i.setStyle(a,"width","");if(b=i.getStyle(a,"height"))i.setAttrib(a,"height",b.replace(/[^0-9%]+/g,"")),i.setStyle(a,"height","")})),b=d.resizeInfo={node:a,ev:ev,cb:e}}),a.isOpera&&d.onClick.add(function(a,b){c.prevent(b)});if(h.custom_undo_redo){function n(){d.undoManager.typing=!1,d.undoManager.add()}i.bind(d.getDoc(),"focusout",function(a){!d.removed&&d.undoManager.typing&&n()}),d.dom.bind(d.dom.getRoot(),"dragend",function(a){n()}),d.onKeyUp.add(function(a,b){var c=b.keyCode;(c>=33&&c<=36||c>=37&&c<=40||c==13||c==45||b.ctrlKey)&&n()}),d.onKeyDown.add(function(b,e){var f=e.keyCode,g;if(f==8){g=d.getDoc().selection;if(g&&g.createRange&&g.createRange().item)return d.undoManager.beforeChange(),b.dom.remove(g.createRange().item(0)),n(),c.cancel(e)}if(f>=33&&f<=36||f>=37&&f<=40||f==13||f==45){a.isIE&&f==13&&d.undoManager.beforeChange(),d.undoManager.typing&&n();return}(f<16||f>20)&&f!=224&&f!=91&&!d.undoManager.typing&&(d.undoManager.beforeChange(),d.undoManager.typing=!0,d.undoManager.add())}),d.onMouseDown.add(function(){d.undoManager.typing&&n()})}if(a.isGecko){function o(){var a=d.dom.getAttribs(d.selection.getStart().cloneNode(!1));return function(){var b=d.selection.getStart();b!==d.getBody()&&(d.dom.setAttrib(b,"style",null),f(a,function(a){b.setAttributeNode(a.cloneNode(!0))}))}}function q(){var a=d.selection;return!a.isCollapsed()&&a.getStart()!=a.getEnd()}d.onKeyPress.add(function(a,b){var e;if((b.keyCode==8||b.keyCode==46)&&q())return e=o(),d.getDoc().execCommand("delete",!1,null),e(),c.cancel(b)}),d.dom.bind(d.getDoc(),"cut",function(a){var b;q()&&(b=o(),d.onKeyUp.addToTop(c.cancel,c),setTimeout(function(){b(),d.onKeyUp.remove(c.cancel,c)},0))})}},_refreshContentEditable:function(){var a=this,b,c;a._isHidden()&&(b=a.getBody(),c=b.parentNode,c.removeChild(b),c.appendChild(b),b.focus())},_isHidden:function(){var a;return g?(a=this.selection.getSel(),!a||!a.rangeCount||a.rangeCount==0):0}})}(tinymce),function(a){var b=a.each,c,d=!0,e=!1;a.EditorCommands=function(f){function m(a,b,c){var f;return a=a.toLowerCase(),(f=i.exec[a])?(f(a,b,c),d):e}function n(a){var b;return a=a.toLowerCase(),(b=i.state[a])?b(a):-1}function o(a){var b;return a=a.toLowerCase(),(b=i.value[a])?b(a):e}function p(a,c){c=c||"exec",b(a,function(a,d){b(d.toLowerCase().split(","),function(b){i[c][b]=a})})}function q(a,b,d){return b===c&&(b=e),d===c&&(d=null),f.getDoc().execCommand(a,b,d)}function r(a){return k.match(a)}function s(a,b){k.toggle(a,b?{value:b}:c)}function t(a){l=h.getBookmark(a)}function u(){h.moveToBookmark(l)}var g=f.dom,h=f.selection,i={state:{},exec:{},value:{}},j=f.settings,k=f.formatter,l;a.extend(this,{execCommand:m,queryCommandState:n,queryCommandValue:o,addCommands:p}),p({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){f.undoManager.add()},"Cut,Copy,Paste":function(b){var c=f.getDoc(),e;try{q(b)}catch(g){e=d}if(e||!c.queryCommandSupported(b))a.isGecko?f.windowManager.confirm(f.getLang("clipboard_msg"),function(a){a&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):f.windowManager.alert(f.getLang("clipboard_no_support"))},unlink:function(a){h.isCollapsed()&&h.select(h.getNode()),q(a),h.collapse(e)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(a){var c=a.substring(7);b("left,center,right,full".split(","),function(a){c!=a&&k.remove("align"+a)}),s("align"+c),m("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(a){var b,c;q(a),b=g.getParent(h.getNode(),"ol,ul"),b&&(c=b.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(c.nodeName)&&(t(),g.split(c,b),u()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(a){s(a)},"ForeColor,HiliteColor,FontName":function(a,b,c){s(a,c)},FontSize:function(b,c,d){var e,f;d>=1&&d<=7&&(f=a.explode(j.font_size_style_values),e=a.explode(j.font_size_classes),e?d=e[d-1]||d:d=f[d-1]||d),s(b,d)},RemoveFormat:function(a){k.remove(a)},mceBlockQuote:function(a){s("blockquote")},FormatBlock:function(a,b,c){return s(c||"p")},mceCleanup:function(){var a=h.getBookmark();f.setContent(f.getContent({cleanup:d}),{cleanup:d}),h.moveToBookmark(a)},mceRemoveNode:function(a,b,c){var e=c||h.getNode();e!=f.getBody()&&(t(),f.dom.remove(e,d),u())},mceSelectNodeDepth:function(a,b,c){var d=0;g.getParent(h.getNode(),function(a){if(a.nodeType==1&&d++==c)return h.select(a),e},f.getBody())},mceSelectNode:function(a,b,c){h.select(c)},mceInsertContent:function(b,c,d){var e,i,j,k,l,m,n,o,p,q,r,s,t,u;e=f.parser,i=new a.html.Serializer({},f.schema),t='<span id="mce_marker" data-mce-type="bookmark"></span>',m={content:d,format:"html"},h.onBeforeSetContent.dispatch(h,m),d=m.content,d.indexOf("{$caret}")==-1&&(d+="{$caret}"),d=d.replace(/\{\$caret\}/,t),h.isCollapsed()||f.getDoc().execCommand("Delete",!1,null),j=h.getNode(),m={context:j.nodeName.toLowerCase()},l=e.parse(d,m),r=l.lastChild;if(r.attr("id")=="mce_marker"){n=r;for(r=r.prev;r;r=r.walk(!0))if(r.type==3||!g.isBlock(r.name)){r.parent.insert(n,r,r.name==="br");break}}if(!m.invalid)d=i.serialize(l),r=j.firstChild,s=j.lastChild,!r||r===s&&r.nodeName==="BR"?g.setHTML(j,d):h.setContent(d);else{h.setContent(t),j=f.selection.getNode(),k=f.getBody(),j.nodeType==9?j=r=k:r=j;while(r!==k)j=r,r=r.parentNode;d=j==k?k.innerHTML:g.getOuterHTML(j),d=i.serialize(e.parse(d.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return i.serialize(l)}))),j==k?g.setHTML(k,d):g.setOuterHTML(j,d)}n=g.get("mce_marker"),o=g.getRect(n),p=g.getViewPort(f.getWin());if(o.y+o.h>p.y+p.h||o.y<p.y||o.x>p.x+p.w||o.x<p.x)u=a.isIE?f.getDoc().documentElement:f.getBody(),u.scrollLeft=o.x,u.scrollTop=o.y-p.h+25;q=g.createRng(),r=n.previousSibling,r&&r.nodeType==3?q.setStart(r,r.nodeValue.length):(q.setStartBefore(n),q.setEndBefore(n)),g.remove(n),h.setRng(q),h.onSetContent.dispatch(h,m),f.addVisual()},mceInsertRawHTML:function(a,b,c){h.setContent("tiny_mce_marker"),f.setContent(f.getContent().replace(/tiny_mce_marker/g,function(){return c}))},mceSetContent:function(a,b,c){f.setContent(c)},"Indent,Outdent":function(a){var c,d,e;c=j.indentation,d=/[a-z%]+$/i.exec(c),c=parseInt(c),!n("InsertUnorderedList")&&!n("InsertOrderedList")?b(h.getSelectedBlocks(),function(b){a=="outdent"?(e=Math.max(0,parseInt(b.style.paddingLeft||0)-c),g.setStyle(b,"paddingLeft",e?e+d:"")):g.setStyle(b,"paddingLeft",parseInt(b.style.paddingLeft||0)+c+d)}):q(a)},mceRepaint:function(){var b;if(a.isGecko)try{t(d),h.getSel()&&h.getSel().selectAllChildren(f.getBody()),h.collapse(d),u()}catch(c){}},mceToggleFormat:function(a,b,c){k.toggle(c)},InsertHorizontalRule:function(){f.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){f.hasVisual=!f.hasVisual,f.addVisual()},mceReplaceContent:function(a,b,c){f.execCommand("mceInsertContent",!1,c.replace(/\{\$selection\}/g,h.getContent({format:"text"})))},mceInsertLink:function(a,b,c){var d;typeof c=="string"&&(c={href:c}),d=g.getParent(h.getNode(),"a"),c.href=c.href.replace(" ","%20"),(!d||!c.href)&&k.remove("link"),c.href&&k.apply("link",c,d)},selectAll:function(){var a=g.getRoot(),b=g.createRng();b.setStart(a,0),b.setEnd(a,a.childNodes.length),f.selection.setRng(b)}}),p({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(b){var c="align"+b.substring(7),e=h.isCollapsed()?[h.getNode()]:h.getSelectedBlocks(),f=a.map(e,function(a){return!!k.matchNode(a,c)});return a.inArray(f,d)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(a){return r(a)},mceBlockQuote:function(){return r("blockquote")},Outdent:function(){var a;if(j.inline_styles){if((a=g.getParent(h.getStart(),g.isBlock))&&parseInt(a.style.paddingLeft)>0)return d;if((a=g.getParent(h.getEnd(),g.isBlock))&&parseInt(a.style.paddingLeft)>0)return d}return n("InsertUnorderedList")||n("InsertOrderedList")||!j.inline_styles&&!!g.getParent(h.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(a){return g.getParent(h.getNode(),a=="insertunorderedlist"?"UL":"OL")}},"state"),p({"FontSize,FontName":function(a){var b=0,c;if(c=g.getParent(h.getNode(),"span"))a=="fontsize"?b=c.style.fontSize:b=c.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase();return b}},"value"),j.custom_undo_redo&&p({Undo:function(){f.undoManager.undo()},Redo:function(){f.undoManager.redo()}})}}(tinymce),function(a){var b=a.util.Dispatcher;a.UndoManager=function(c){function h(){return a.trim(c.getContent({format:"raw",no_events:1}))}var d,e=0,f=[],g;return d={typing:!1,onAdd:new b(d),onUndo:new b(d),onRedo:new b(d),beforeChange:function(){g=c.selection.getBookmark(2,!0)},add:function(a){var b,i=c.settings,j;a=a||{},a.content=h(),j=f[e];if(j&&j.content==a.content)return null;f[e]&&(f[e].beforeBookmark=g);if(i.custom_undo_redo_levels&&f.length>i.custom_undo_redo_levels){for(b=0;b<f.length-1;b++)f[b]=f[b+1];f.length--,e=f.length}return a.bookmark=c.selection.getBookmark(2,!0),e<f.length-1&&(f.length=e+1),f.push(a),e=f.length-1,d.onAdd.dispatch(d,a),c.isNotDirty=0,a},undo:function(){var a,b;return d.typing&&(d.add(),d.typing=!1),e>0&&(a=f[--e],c.setContent(a.content,{format:"raw"}),c.selection.moveToBookmark(a.beforeBookmark),d.onUndo.dispatch(d,a)),a},redo:function(){var a;return e<f.length-1&&(a=f[++e],c.setContent(a.content,{format:"raw"}),c.selection
.moveToBookmark(a.bookmark),d.onRedo.dispatch(d,a)),a},clear:function(){f=[],e=0,d.typing=!1},hasUndo:function(){return e>0||this.typing},hasRedo:function(){return e<f.length-1&&!this.typing}}}}(tinymce),function(a){function j(a){var b,c,d;do/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(a.nodeName)&&(b?(c=a.cloneNode(!1),c.appendChild(b),b=c):b=d=a.cloneNode(!1),b.removeAttribute("id"));while(a=a.parentNode);if(b)return{wrapper:b,inner:d}}function k(a,b){var c=b.ownerDocument.createRange();return c.setStart(a.endContainer,a.endOffset),c.setEndAfter(b),c.cloneContents().textContent.length==0}function l(a,b,c){var d,e;return b.isEmpty(c)?(d=b.getParent(c,"ul,ol"),b.getParent(d.parentNode,"ul,ol")||(b.split(d,c),e=b.create("p",0,'<br data-mce-bogus="1" />'),b.replace(e,c),a.select(e,1)),i):h}var b=a.dom.Event,c=a.isIE,d=a.isGecko,e=a.isOpera,f=a.each,g=a.extend,h=!0,i=!1;a.create("tinymce.ForceBlocks",{ForceBlocks:function(a){var b=this,c=a.settings,d;b.editor=a,b.dom=a.dom,d=(c.forced_root_block||"p").toLowerCase(),c.element=d.toUpperCase(),a.onPreInit.add(b.setup,b)},setup:function(){var e=this,f=e.editor,g=f.settings,i=f.dom,k=f.selection,l=f.schema.getBlockElements();if(g.forced_root_block){function m(){var a=k.getStart(),b=f.getBody(),c,d,e,h,j,m,n,o=-16777215;if(!a||a.nodeType!==1)return;while(a!=b){if(l[a.nodeName])return;a=a.parentNode}c=k.getRng(),c.setStart?(d=c.startContainer,e=c.startOffset,h=c.endContainer,j=c.endOffset):(c.item&&(c=f.getDoc().body.createTextRange(),c.moveToElementText(c.item(0))),tmpRng=c.duplicate(),tmpRng.collapse(!0),e=tmpRng.move("character",o)*-1,tmpRng.collapsed||(tmpRng=c.duplicate(),tmpRng.collapse(!1),j=tmpRng.move("character",o)*-1-e));for(a=b.firstChild;a;a)a.nodeType===3||a.nodeType==1&&!l[a.nodeName]?(m||(m=i.create(g.forced_root_block),a.parentNode.insertBefore(m,a)),n=a,a=a.nextSibling,m.appendChild(n)):(m=null,a=a.nextSibling);if(c.setStart)c.setStart(d,e),c.setEnd(h,j),k.setRng(c);else try{c=f.getDoc().body.createTextRange(),c.moveToElementText(b),c.collapse(!0),c.moveStart("character",e),j>0&&c.moveEnd("character",j),c.select()}catch(p){}f.nodeChanged()}f.onKeyUp.add(m),f.onClick.add(m)}g.force_br_newlines&&c&&f.onKeyPress.add(function(a,c){var d;if(c.keyCode==13&&k.getNode().nodeName!="LI")return k.setContent('<br id="__" /> ',{format:"raw"}),d=i.get("__"),d.removeAttribute("id"),k.select(d),k.collapse(),b.cancel(c)}),g.force_p_newlines&&(c?(a.addUnload(function(){e._previousFormats=0}),f.onKeyPress.add(function(a,b){e._previousFormats=0,b.keyCode==13&&!b.shiftKey&&a.selection.isCollapsed()&&g.keep_styles&&(e._previousFormats=j(a.selection.getStart()))}),f.onKeyUp.add(function(a,b){if(b.keyCode==13&&!b.shiftKey){var c=a.selection.getStart(),d=e._previousFormats;!c.hasChildNodes()&&d&&(c=i.getParent(c,i.isBlock),c&&c.nodeName!="LI"&&(c.innerHTML="",e._previousFormats?(c.appendChild(d.wrapper),d.inner.innerHTML=""):c.innerHTML="",k.select(c,1),k.collapse(!0),a.getDoc().execCommand("Delete",!1,null),e._previousFormats=0))}})):f.onKeyPress.add(function(a,c){c.keyCode==13&&!c.shiftKey&&!e.insertPara(c)&&b.cancel(c)}),d&&f.onKeyDown.add(function(a,b){(b.keyCode==8||b.keyCode==46)&&!b.shiftKey&&e.backspaceDelete(b,b.keyCode==8)}));if(a.isWebKit){function n(a){var b=k.getRng(),c,d=i.create("div",null," "),e,f=i.getViewPort(a.getWin()).h;b.insertNode(c=i.create("br")),b.setStartAfter(c),b.setEndAfter(c),k.setRng(b),k.getSel().focusNode==c.previousSibling&&(k.select(i.insertAfter(i.doc.createTextNode(" "),c)),k.collapse(h)),i.insertAfter(d,c),e=i.getPos(d).y,i.remove(d),e>f&&a.getWin().scrollTo(0,e)}f.onKeyPress.add(function(a,c){c.keyCode==13&&(c.shiftKey||g.force_br_newlines&&!i.getParent(k.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul"))&&(n(a),b.cancel(c))})}c&&g.element!="P"&&(f.onKeyPress.add(function(a,b){e.lastElm=k.getNode().nodeName}),f.onKeyUp.add(function(a,b){var c,d=k.getNode(),f=a.getBody();f.childNodes.length===1&&d.nodeName=="P"?(d=i.rename(d,g.element),k.select(d),k.collapse(),a.nodeChanged()):b.keyCode==13&&!b.shiftKey&&e.lastElm!="P"&&(c=i.getParent(d,"p"),c&&(i.rename(c,g.element),a.nodeChanged()))}))},getParentBlock:function(a){var b=this.dom;return b.getParent(a,b.isBlock)},insertPara:function(a){function I(a,b){var c=[],f,h,j;a.innerHTML="";if(g.keep_styles){h=b;do/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(h.nodeName)&&(f=h.cloneNode(i),d.setAttrib(f,"id",""),c.push(f));while(h=h.parentNode)}if(c.length>0){for(j=c.length-1,f=a;j>=0;j--)f=f.appendChild(c[j]);return c[0].innerHTML=e?" ":"<br />",c[0]}a.innerHTML=e?" ":"<br />"}var b=this,c=b.editor,d=c.dom,f=c.getDoc(),g=c.settings,j=c.selection.getSel(),m=j.getRangeAt(0),n=f.body,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D=d.getViewPort(c.getWin()),E,F,G;c.undoManager.beforeChange(),o=f.createRange(),o.setStart(j.anchorNode,j.anchorOffset),o.collapse(h),p=f.createRange(),p.setStart(j.focusNode,j.focusOffset),p.collapse(h),q=o.compareBoundaryPoints(o.START_TO_END,p)<0,r=q?j.anchorNode:j.focusNode,s=q?j.anchorOffset:j.focusOffset,t=q?j.focusNode:j.anchorNode,u=q?j.focusOffset:j.anchorOffset;if(r===t&&/^(TD|TH)$/.test(r.nodeName))return r.firstChild.nodeName=="BR"&&d.remove(r.firstChild),r.childNodes.length==0?(c.dom.add(r,g.element,null,"<br />"),z=c.dom.add(r,g.element,null,"<br />")):(C=r.innerHTML,r.innerHTML="",c.dom.add(r,g.element,null,C),z=c.dom.add(r,g.element,null,"<br />")),m=f.createRange(),m.selectNodeContents(z),m.collapse(1),c.selection.setRng(m),i;r==n&&t==n&&n.firstChild&&c.dom.isBlock(n.firstChild)&&(r=t=r.firstChild,s=u=0,o=f.createRange(),o.setStart(r,0),p=f.createRange(),p.setStart(t,0)),f.body.hasChildNodes()||f.body.appendChild(d.create("br")),r=r.nodeName=="HTML"?f.body:r,r=r.nodeName=="BODY"?r.firstChild:r,t=t.nodeName=="HTML"?f.body:t,t=t.nodeName=="BODY"?t.firstChild:t,v=b.getParentBlock(r),w=b.getParentBlock(t),x=v?v.nodeName:g.element;if(C=b.dom.getParent(v,"li,pre"))return C.nodeName=="LI"?l(c.selection,b.dom,C):h;v&&(v.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(d.getStyle(v,"position",1)))&&(x=g.element,v=null),w&&(w.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(d.getStyle(v,"position",1)))&&(x=g.element,w=null);if(/(TD|TABLE|TH|CAPTION)/.test(x)||v&&x=="DIV"&&/left|right/gi.test(d.getStyle(v,"float",1)))x=g.element,v=w=null;y=v&&v.nodeName==x?v.cloneNode(0):c.dom.create(x),z=w&&w.nodeName==x?w.cloneNode(0):c.dom.create(x),z.removeAttribute("id"),/^(H[1-6])$/.test(x)&&k(m,v)&&(z=c.dom.create(g.element)),C=A=r;do{if(C==n||C.nodeType==9||b.dom.isBlock(C)||/(TD|TABLE|TH|CAPTION)/.test(C.nodeName))break;A=C}while(C=C.previousSibling?C.previousSibling:C.parentNode);C=B=t;do{if(C==n||C.nodeType==9||b.dom.isBlock(C)||/(TD|TABLE|TH|CAPTION)/.test(C.nodeName))break;B=C}while(C=C.nextSibling?C.nextSibling:C.parentNode);A.nodeName==x?o.setStart(A,0):o.setStartBefore(A),o.setEnd(r,s),y.appendChild(o.cloneContents()||f.createTextNode(""));try{p.setEndAfter(B)}catch(H){}return p.setStart(t,u),z.appendChild(p.cloneContents()||f.createTextNode("")),m=f.createRange(),!A.previousSibling&&A.parentNode.nodeName==x?m.setStartBefore(A.parentNode):o.startContainer.nodeName==x&&o.startOffset==0?m.setStartBefore(o.startContainer):m.setStart(o.startContainer,o.startOffset),!B.nextSibling&&B.parentNode.nodeName==x?m.setEndAfter(B.parentNode):m.setEnd(p.endContainer,p.endOffset),m.deleteContents(),e&&c.getWin().scrollTo(0,D.y),y.firstChild&&y.firstChild.nodeName==x&&(y.innerHTML=y.firstChild.innerHTML),z.firstChild&&z.firstChild.nodeName==x&&(z.innerHTML=z.firstChild.innerHTML),d.isEmpty(y)&&I(y,r),d.isEmpty(z)&&(G=I(z,t)),e&&parseFloat(opera.version())<9.5?(m.insertNode(y),m.insertNode(z)):(m.insertNode(z),m.insertNode(y)),z.normalize(),y.normalize(),c.selection.select(z,!0),c.selection.collapse(!0),E=c.dom.getPos(z).y,(E<D.y||E+25>D.y+D.h)&&c.getWin().scrollTo(0,E<D.y?E:E-D.h+25),c.undoManager.add(),i},backspaceDelete:function(c,d){var e=this,f=e.editor,g=f.getBody(),h=f.dom,j,k=f.selection,l=k.getRng(),m=l.startContainer,j,n,o,p;if(!d&&l.collapsed&&m.nodeType==1&&l.startOffset==m.childNodes.length){p=new a.dom.TreeWalker(m.lastChild,m);for(j=m.lastChild;j;j=p.prev())if(j.nodeType==3){l.setStart(j,j.nodeValue.length),l.collapse(!0),k.setRng(l);return}}if(m&&f.dom.isBlock(m)&&!/^(TD|TH)$/.test(m.nodeName)&&d)if(m.childNodes.length==0||m.childNodes.length==1&&m.firstChild.nodeName=="BR"){j=m;while((j=j.previousSibling)&&!f.dom.isBlock(j));if(j){if(m!=g.firstChild){n=f.dom.doc.createTreeWalker(j,NodeFilter.SHOW_TEXT,null,i);while(o=n.nextNode())j=o;l=f.getDoc().createRange(),l.setStart(j,j.nodeValue?j.nodeValue.length:0),l.setEnd(j,j.nodeValue?j.nodeValue.length:0),k.setRng(l),f.dom.remove(m)}return b.cancel(c)}}}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each,e=a.extend;a.create("tinymce.ControlManager",{ControlManager:function(b,c){var e=this,f;c=c||{},e.editor=b,e.controls={},e.onAdd=new a.util.Dispatcher(e),e.onPostRender=new a.util.Dispatcher(e),e.prefix=c.prefix||b.id+"_",e._cls={},e.onPostRender.add(function(){d(e.controls,function(a){a.postRender()})})},get:function(a){return this.controls[this.prefix+a]||this.controls[a]},setActive:function(a,b){var c=null;return(c=this.get(a))&&c.setActive(b),c},setDisabled:function(a,b){var c=null;return(c=this.get(a))&&c.setDisabled(b),c},add:function(a){var b=this;return a&&(b.controls[a.id]=a,b.onAdd.dispatch(a,b)),a},createControl:function(a){var b,c=this,e=c.editor;d(e.plugins,function(d){if(d.createControl){b=d.createControl(a,c);if(b)return!1}});switch(a){case"|":case"separator":return c.createSeparator()}return!b&&e.buttons&&(b=e.buttons[a])?c.createButton(a,b):c.add(b)},createDropMenu:function(b,c,d){var f=this,g=f.editor,h,i,j,k;c=e({"class":"mceDropDown",constrain:g.settings.constrain_menus},c),c["class"]=c["class"]+" "+g.getParam("skin")+"Skin";if(j=g.getParam("skin_variant"))c["class"]+=" "+g.getParam("skin")+"Skin"+j.substring(0,1).toUpperCase()+j.substring(1);return b=f.prefix+b,k=d||f._cls.dropmenu||a.ui.DropMenu,h=f.controls[b]=new k(b,c),h.onAddItem.add(function(a,b){var c=b.settings;c.title=g.getLang(c.title,c.title),c.onclick||(c.onclick=function(a){c.cmd&&g.execCommand(c.cmd,c.ui||!1,c.value)})}),g.onRemove.add(function(){h.destroy()}),a.isIE&&(h.onShowMenu.add(function(){g.focus(),i=g.selection.getBookmark(1)}),h.onHideMenu.add(function(){i&&(g.selection.moveToBookmark(i),i=0)})),f.add(h)},createListBox:function(b,d,f){function l(b){return b.settings.use_accessible_selects&&!a.isGecko}var g=this,h=g.editor,i,j,k;return g.get(b)?null:(d.title=h.translate(d.title),d.scope=d.scope||h,d.onselect||(d.onselect=function(a){h.execCommand(d.cmd,d.ui||!1,a||d.value)}),d=e({title:d.title,"class":"mce_"+b,scope:d.scope,control_manager:g},d),b=g.prefix+b,h.settings.use_native_selects||l(h)?j=new a.ui.NativeListBox(b,d):(k=f||g._cls.listbox||a.ui.ListBox,j=new k(b,d,h)),g.controls[b]=j,a.isWebKit&&j.onPostRender.add(function(a,b){c.add(b,"mousedown",function(){h.bookmark=h.selection.getBookmark(1)}),c.add(b,"focus",function(){h.selection.moveToBookmark(h.bookmark),h.bookmark=null})}),j.hideMenu&&h.onMouseDown.add(j.hideMenu,j),g.add(j))},createButton:function(b,c,d){var f=this,g=f.editor,h,i,j;return f.get(b)?null:(c.title=g.translate(c.title),c.label=g.translate(c.label),c.scope=c.scope||g,!c.onclick&&!c.menu_button&&(c.onclick=function(){g.execCommand(c.cmd,c.ui||!1,c.value)}),c=e({title:c.title,"class":"mce_"+b,unavailable_prefix:g.getLang("unavailable",""),scope:c.scope,control_manager:f},c),b=f.prefix+b,c.menu_button?(j=d||f._cls.menubutton||a.ui.MenuButton,i=new j(b,c,g),g.onMouseDown.add(i.hideMenu,i)):(j=f._cls.button||a.ui.Button,i=new j(b,c,g)),f.add(i))},createMenuButton:function(a,b,c){return b=b||{},b.menu_button=1,this.createButton(a,b,c)},createSplitButton:function(b,c,d){var f=this,g=f.editor,h,i,j;return f.get(b)?null:(c.title=g.translate(c.title),c.scope=c.scope||g,c.onclick||(c.onclick=function(a){g.execCommand(c.cmd,c.ui||!1,a||c.value)}),c.onselect||(c.onselect=function(a){g.execCommand(c.cmd,c.ui||!1,a||c.value)}),c=e({title:c.title,"class":"mce_"+b,scope:c.scope,control_manager:f},c),b=f.prefix+b,j=d||f._cls.splitbutton||a.ui.SplitButton,i=f.add(new j(b,c,g)),g.onMouseDown.add(i.hideMenu,i),i)},createColorSplitButton:function(b,c,d){var f=this,g=f.editor,h,i,j,k;return f.get(b)?null:(c.title=g.translate(c.title),c.scope=c.scope||g,c.onclick||(c.onclick=function(b){a.isIE&&(k=g.selection.getBookmark(1)),g.execCommand(c.cmd,c.ui||!1,b||c.value)}),c.onselect||(c.onselect=function(a){g.execCommand(c.cmd,c.ui||!1,a||c.value)}),c=e({title:c.title,"class":"mce_"+b,menu_class:g.getParam("skin")+"Skin",scope:c.scope,more_colors_title:g.getLang("more_colors")},c),b=f.prefix+b,j=d||f._cls.colorsplitbutton||a.ui.ColorSplitButton,i=new j(b,c,g),g.onMouseDown.add(i.hideMenu,i),g.onRemove.add(function(){i.destroy()}),a.isIE&&(i.onShowMenu.add(function(){g.focus(),k=g.selection.getBookmark(1)}),i.onHideMenu.add(function(){k&&(g.selection.moveToBookmark(k),k=0)})),f.add(i))},createToolbar:function(b,c,d){var e,f=this,g;return b=f.prefix+b,g=d||f._cls.toolbar||a.ui.Toolbar,e=new g(b,c,f.editor),f.get(b)?null:f.add(e)},createToolbarGroup:function(b,c,d){var e,f=this,g;return b=f.prefix+b,g=d||this._cls.toolbarGroup||a.ui.ToolbarGroup,e=new g(b,c,f.editor),f.get(b)?null:f.add(e)},createSeparator:function(b){var c=b||this._cls.separator||a.ui.Separator;return new c},setControlType:function(a,b){return this._cls[a.toLowerCase()]=b},destroy:function(){d(this.controls,function(a){a.destroy()}),this.controls=null}})}(tinymce),function(a){var b=a.util.Dispatcher,c=a.each,d=a.isIE,e=a.isOpera;a.create("tinymce.WindowManager",{WindowManager:function(a){var c=this;c.editor=a,c.onOpen=new b(c),c.onClose=new b(c),c.params={},c.features={}},open:function(b,f){var g=this,h="",i,j,k=g.editor.settings.dialog_type=="modal",l,m,n,o=a.DOM.getViewPort(),p;b=b||{},f=f||{},m=e?o.w:screen.width,n=e?o.h:screen.height,b.name=b.name||"mc_"+(new Date).getTime(),b.width=parseInt(b.width||320),b.height=parseInt(b.height||240),b.resizable=!0,b.left=b.left||parseInt(m/2)-b.width/2,b.top=b.top||parseInt(n/2)-b.height/2,f.inline=!1,f.mce_width=b.width,f.mce_height=b.height,f.mce_auto_focus=b.auto_focus,k&&d&&(b.center=!0,b.help=!1,b.dialogWidth=b.width+"px",b.dialogHeight=b.height+"px",b.scroll=b.scrollbars||!1),c(b,function(b,c){a.is(b,"boolean")&&(b=b?"yes":"no"),/^(name|url)$/.test(c)||(d&&k?h+=(h?";":"")+c+":"+b:h+=(h?",":"")+c+"="+b)}),g.features=b,g.params=f,g.onOpen.dispatch(g,b,f),p=b.url||b.file,p=a._addVer(p);try{d&&k?(l=1,window.showModalDialog(p,window,h)):l=window.open(p,b.name,h)}catch(q){}l||alert(g.editor.getLang("popup_blocked"))},close:function(a){a.close(),this.onClose.dispatch(this)},createInstance:function(b,c,d,e,f,g){var h=a.resolve(b);return new h(c,d,e,f,g)},confirm:function(a,b,c,d){d=d||window,b.call(c||this,d.confirm(this._decode(this.editor.getLang(a,a))))},alert:function(a,b,c,d){var e=this;d=d||window,d.alert(e._decode(e.editor.getLang(a,a))),b&&b.call(c||e)},resizeBy:function(a,b,c){c.resizeBy(a,b)},_decode:function(b){return a.DOM.decode(b).replace(/\\n/g,"\n")}})}(tinymce),function(a){a.Formatter=function(b){function r(a){return a instanceof Array}function s(a,b){return e.getParents(a,b,e.getRoot())}function t(a){return a.nodeType===1&&(a.face==="mceinline"||a.style.fontFamily==="mceinline")}function u(a){return a?c[a]:c}function v(a,b){a&&(typeof a!="string"?d(a,function(a,b){v(b,a)}):(b=b.length?b:[b],d(b,function(a){a.deep===q&&(a.deep=!a.selector),a.split===q&&(a.split=!a.selector||a.inline),a.remove===q&&a.selector&&!a.inline&&(a.remove="none"),a.selector&&a.inline&&(a.mixed=!0,a.block_expand=!0),typeof a.classes=="string"&&(a.classes=a.classes.split(/\s+/))}),c[a]=b))}function y(c,k,l){function w(a,b){b=b||n,a&&(b.onformat&&b.onformat(a,b,k,l),d(b.styles,function(b,c){e.setStyle(a,c,I(b,k))}),d(b.attributes,function(b,c){e.setAttrib(a,c,I(b,k))}),d(b.classes,function(b){b=I(b,k),e.hasClass(a,b)||e.addClass(a,b)}))}function y(){function a(a,b){var c=new g(b);for(l=c.current();l;l=c.prev())if(l.childNodes.length>1||l==a)return l}var c=b.selection.getRng(),d=c.startContainer,e=c.endContainer;if(d!=e&&c.endOffset==0){var f=a(d,e),h=f.nodeType==3?f.length:f.childNodes.length;c.setEnd(f,h)}return c}function z(b,c,f,g,h){var i=[],j=-1,k,l=-1,m=-1,n;return d(b.childNodes,function(a,b){if(a.nodeName==="UL"||a.nodeName==="OL")return j=b,k=a,!1}),d(b.childNodes,function(a,b){a.nodeName==="SPAN"&&e.getAttrib(a,"data-mce-type")=="bookmark"&&(a.id==c.id+"_start"?l=b:a.id==c.id+"_end"&&(m=b))}),j<=0||l<j&&m>j?(d(a.grep(b.childNodes),h),0):(n=f.cloneNode(o),d(a.grep(b.childNodes),function(a,b){if(l<j&&b<j||l>j&&b>j)i.push(a),a.parentNode.removeChild(a)}),l<j?b.insertBefore(n,k):l>j&&b.insertBefore(n,k.nextSibling),g.push(n),d(i,function(a){n.appendChild(a)}),n)}function A(b,f,g){var l=[],q,r;q=n.inline||n.block,r=e.create(q),w(r),h.walk(b,function(b){function j(b){var p=b.nodeName.toLowerCase(),s=b.parentNode.nodeName.toLowerCase(),u;if(G(p,"br")){h=0,n.block&&e.remove(b);return}if(n.wrapper&&B(b,c,k)){h=0;return}if(n.block&&!n.wrapper&&R(p)){b=e.rename(b,q),w(b),l.push(b),h=0;return}if(n.selector){d(m,function(a){if("collapsed"in a&&a.collapsed!==v)return;e.is(b,a.selector)&&!t(b)&&(w(b,a),u=!0)});if(!n.inline||u){h=0;return}}!i(q,p)||!i(s,q)||!g&&b.nodeType===3&&b.nodeValue.length===1&&b.nodeValue.charCodeAt(0)===65279||b.id==="_mce_caret"?p=="li"&&f?h=z(b,f,r,l,j):(h=0,d(a.grep(b.childNodes),j),h=0):(h||(h=r.cloneNode(o),b.parentNode.insertBefore(h,b),l.push(h)),h.appendChild(b))}var h;d(b,j)}),n.wrap_links===!1&&d(l,function(b){function c(b){var e,f,g;if(b.nodeName==="A"){f=r.cloneNode(o),l.push(f),g=a.grep(b.childNodes);for(e=0;e<g.length;e++)f.appendChild(g[e]);b.appendChild(f)}d(a.grep(b.childNodes),c)}c(b)}),d(l,function(a){function f(a){var b=0;return d(a.childNodes,function(a){!J(a)&&!P(a)&&b++}),b}function g(a){var b,c;return d(a.childNodes,function(a){if(a.nodeType==1&&!P(a)&&!t(a))return b=a,o}),b&&F(b,n)&&(c=b.cloneNode(o),w(c),e.replace(c,a,p),e.remove(b,1)),c||a}var b;b=f(a);if((l.length>1||!j(a))&&b===0){e.remove(a,1);return}if(n.inline||n.wrapper){!n.exact&&b===1&&(a=g(a)),d(m,function(b){d(e.select(b.inline,a),function(a){var c;if(b.wrap_links===!1){c=a.parentNode;do if(c.nodeName==="A")return;while(c=c.parentNode)}M(b,k,a,b.exact?a:null)})});if(B(a.parentNode,c,k))return e.remove(a,1),a=0,p;n.merge_with_parents&&e.getParent(a.parentNode,function(b){if(B(b,c,k))return e.remove(a,1),a=0,p}),a&&n.merge_siblings!==!1&&(a=Q(O(a),a),a=Q(a,O(a,p)))}})}var m=u(c),n=m[0],q,r,s,v=f.isCollapsed();if(n)if(l)l.nodeType?(r=e.createRng(),r.setStartBefore(l),r.setEndAfter(l),A(L(r,m),null,!0)):A(l,null,!0);else if(!v||!n.inline||e.select("td.mceSelected,th.mceSelected").length){var C=b.selection.getNode();b.selection.setRng(y()),q=f.getBookmark(),A(L(f.getRng(p),m),q),n.styles&&(n.styles.color||n.styles.textDecoration)&&(a.walk(C,x,"childNodes"),x(C)),f.moveToBookmark(q),U(f.getRng(p)),b.nodeChanged()}else T("apply",c,k)}function z(c,g,i){function t(b){var c,d,e;c=a.grep(b.childNodes);for(d=0,e=k.length;d<e;d++)if(M(k[d],g,b,b))break;if(m.deep)for(d=0,e=c.length;d<e;d++)t(c[d])}function v(a){var b;return d(s(a.parentNode).reverse(),function(a){var d;!b&&a.id!="_start"&&a.id!="_end"&&(d=B(a,c,g),d&&d.split!==!1&&(b=a))}),b}function x(a,b,c,d){var f,h,i,l,n,p;if(a){p=a.parentNode;for(f=b.parentNode;f&&f!=p;f=f.parentNode){h=f.cloneNode(o);for(n=0;n<k.length;n++)if(M(k[n],g,h,h)){h=0;break}h&&(i&&h.appendChild(i),l||(l=h),i=h)}d&&(!m.mixed||!j(a))&&(b=e.split(a,b)),i&&(c.parentNode.insertBefore(i,c),l.appendChild(c))}return b}function y(a){return x(v(a),a,a,!0)}function z(a){var b=e.get(a?"_start":"_end"),c=b[a?"firstChild":"lastChild"];return P(c)&&(c=c[a?"firstChild":"lastChild"]),e.remove(b,!0),c}function A(a){var c,e;a=L(a,k,p),m.split&&(c=S(a,p),e=S(a),c!=e?(c=K(c,"span",{id:"_start","data-mce-type":"bookmark"}),e=K(e,"span",{id:"_end","data-mce-type":"bookmark"}),y(c),y(e),c=z(p),e=z()):c=e=y(c),a.startContainer=c.parentNode,a.startOffset=l(c),a.endContainer=e.parentNode,a.endOffset=l(e)+1),h.walk(a,function(a){d(a,function(a){t(a),a.nodeType===1&&b.dom.getStyle(a,"text-decoration")==="underline"&&a.parentNode&&w(a.parentNode)==="underline"&&M({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,a)})})}var k=u(c),m=k[0],n,q,r;if(i){i.nodeType?(r=e.createRng(),r.setStartBefore(i),r.setEndAfter(i),A(r)):A(i);return}!f.isCollapsed()||!m.inline||e.select("td.mceSelected,th.mceSelected").length?(n=f.getBookmark(),A(f.getRng(p)),f.moveToBookmark(n),m.inline&&C(c,g,f.getStart())&&U(f.getRng(!0)),b.nodeChanged()):T("remove",c,g),a.isWebKit&&b.execCommand("mceCleanup")}function A(a,b,c){var d=u(a);!C(a,b,c)||"toggle"in d[0]&&!d[0].toggle?y(a,b,c):z(a,b,c)}function B(a,b,c,d){function j(a,b,f){var g,h,i=b[f],j;if(b.onmatch)return b.onmatch(a,b,f);if(i)if(i.length===q){for(g in i)if(i.hasOwnProperty(g)){f==="attributes"?h=e.getAttrib(a,g):h=H(a,g);if(d&&!h&&!b.exact)return;if((!d||b.exact)&&!G(h,I(i[g],c)))return}}else for(j=0;j<i.length;j++)if(f==="attributes"?e.getAttrib(a,i[j]):H(a,i[j]))return b;return b}var f=u(b),g,h,i;if(f&&a)for(h=0;h<f.length;h++){g=f[h];if(F(a,g)&&j(a,g,"attributes")&&j(a,g,"styles")){if(i=g.classes)for(h=0;h<i.length;h++)if(!e.hasClass(a,i[h]))return;return g}}}function C(a,b,c){function g(c){return c=e.getParent(c,function(c){return!!B(c,a,b,!0)}),B(c,a,b)}var d;return c?g(c):(c=f.getNode(),g(c)?p:(d=f.getStart(),d!=c&&g(d)?p:o))}function D(a,b){var c,d=[],g={},h,i,j;return c=f.getStart(),e.getParent(c,function(c){var e,f;for(e=0;e<a.length;e++)f=a[e],!g[f]&&B(c,f,b)&&(g[f]=!0,d.push(f))}),d}function E(a){var b=u(a),c,d,g,h,i;if(b){c=f.getStart(),d=s(c);for(h=b.length-1;h>=0;h--){i=b[h].selector;if(!i)return p;for(g=d.length-1;g>=0;g--)if(e.is(d[g],i))return p}}return o}function F(a,b){if(G(a,b.inline))return p;if(G(a,b.block))return p;if(b.selector)return e.is(a,b.selector)}function G(a,b){return a=a||"",b=b||"",a=""+(a.nodeName||a),b=""+(b.nodeName||b),a.toLowerCase()==b.toLowerCase()}function H(a,b){var c=e.getStyle(a,b);if(b=="color"||b=="backgroundColor")c=e.toHex(c);return b=="fontWeight"&&c==700&&(c="bold"),""+c}function I(a,b){return typeof a!="string"?a=a(b):b&&(a=a.replace(/%(\w+)/g,function(a,c){return b[c]||a})),a}function J(a){return a&&a.nodeType===3&&/^([\t \r\n]+|)$/.test(a.nodeValue)}function K(a,b,c){var d=e.create(b,c);return a.parentNode.insertBefore(d,a),d.appendChild(a),d}function L(a,c,d){function t(a){var b,d,g,l,m;b=d=a?f:i,m=a?"previousSibling":"nextSibling",root=e.getRoot();if(b.nodeType==3&&!J(b))if(a?h>0:k<b.nodeValue.length)return b;for(;;){if(d==root||!c[0].block_expand&&j(d))return d;for(l=d[m];l;l=l[m])if(!P(l)&&!J(l))return d;d=d.parentNode}return b}function u(a,b){b===q&&(b=a.nodeType===3?a.length:a.childNodes.length);while(a&&a.hasChildNodes())a=a.childNodes[b],a&&(b=a.nodeType===3?a.length:a.childNodes.length);return{node:a,offset:b}}var f=a.startContainer,h=a.startOffset,i=a.endContainer,k=a.endOffset,m,n,p,r;f.nodeType==1&&f.hasChildNodes()&&(n=f.childNodes.length-1,f=f.childNodes[h>n?n:h],f.nodeType==3&&(h=0)),i.nodeType==1&&i.hasChildNodes()&&(n=i.childNodes.length-1,i=i.childNodes[k>n?n:k-1],i.nodeType==3&&(k=i.nodeValue.length));if(P(f.parentNode)||P(f))f=P(f)?f:f.parentNode,f=f.nextSibling||f,f.nodeType==3&&(h=0);if(P(i.parentNode)||P(i))i=P(i)?i:i.parentNode,i=i.previousSibling||i,i.nodeType==3&&(k=i.length);if(c[0].inline){if(a.collapsed){function v(a,c,f){function m(a,b){var c,e,g=a.nodeValue;return typeof b=="undefined"&&(b=f?g.length:0),f?(c=g.lastIndexOf(" ",b),e=g.lastIndexOf(" ",b),c=c>e?c:e,c!==-1&&!d&&c++):(c=g.indexOf(" ",b),e=g.indexOf(" ",b),c=c!==-1&&(e===-1||c<e)?c:e),c}var h,i,k,l;if(a.nodeType===3){k=m(a,c);if(k!==-1)return{container:a,offset:k};l=a}h=new g(a,e.getParent(a,j)||b.getBody());while(i=h[f?"prev":"next"]())if(i.nodeType===3){l=i,k=m(i);if(k!==-1)return{container:i,offset:k}}else if(j(i))break;if(l)return f?c=0:c=l.length,{container:l,offset:c}}r=v(f,h,!0),r&&(f=r.container,h=r.offset),r=v(i,k),r&&(i=r.container,k=r.offset)}p=u(i,k);if(p.node){while(p.node&&p.offset===0&&p.node.previousSibling)p=u(p.node.previousSibling);p.node&&p.offset>0&&p.node.nodeType===3&&p.node.nodeValue.charAt(p.offset-1)===" "&&(p.offset>1?(i=p.node,i.splitText(p.offset-1)):!p.node.previousSibling)}}if(c[0].inline||c[0].block_expand){if(!c[0].inline||f.nodeType!=3||h===0)f=t(!0);if(!c[0].inline||i.nodeType!=3||k===i.nodeValue.length)i=t()}if(c[0].selector&&c[0].expand!==o&&!c[0].inline){function w(b,d){var f,g,h,i;b.nodeType==3&&b.nodeValue.length==0&&b[d]&&(b=b[d]),f=s(b);for(g=0;g<f.length;g++)for(h=0;h<c.length;h++){i=c[h];if("collapsed"in i&&i.collapsed!==a.collapsed)continue;if(e.is(f[g],i.selector))return f[g]}return b}f=w(f,"previousSibling"),i=w(i,"nextSibling")}if(c[0].block||c[0].selector){function x(a,b,d){var f;c[0].wrapper||(f=e.getParent(a,c[0].block)),f||(f=e.getParent(a.nodeType==3?a.parentNode:a,j)),f&&c[0].wrapper&&(f=s(f,"ul,ol").reverse()[0]||f);if(!f){f=a;while(f[b]&&!j(f[b])){f=f[b];if(G(f,"br"))break}}return f||a}f=x(f,"previousSibling"),i=x(i,"nextSibling"),c[0].block&&(j(f)||(f=t(!0)),j(i)||(i=t()))}return f.nodeType==1&&(h=l(f),f=f.parentNode),i.nodeType==1&&(k=l(i)+1,i=i.parentNode),{startContainer:f,startOffset:h,endContainer:i,endOffset:k}}function M(a,b,c,f){var g,h,i;if(!F(c,a))return o;if(a.remove!="all"){d(a.styles,function(a,d){a=I(a,b),typeof d=="number"&&(d=a,f=0),(!f||G(H(f,d),a))&&e.setStyle(c,d,""),i=1}),i&&e.getAttrib(c,"style")==""&&(c.removeAttribute("style"),c.removeAttribute("data-mce-style")),d(a.attributes,function(a,g){var h;a=I(a,b),typeof g=="number"&&(g=a,f=0);if(!f||G(e.getAttrib(f,g),a)){if(g=="class"){a=e.getAttrib(c,g);if(a){h="",d(a.split(/\s+/),function(a){/mce\w+/.test(a)&&(h+=(h?" ":"")+a)});if(h){e.setAttrib(c,g,h);return}}}g=="class"&&c.removeAttribute("className"),n.test(g)&&c.removeAttribute("data-mce-"+g),c.removeAttribute(g)}}),d(a.classes,function(a){a=I(a,b),(!f||e.hasClass(f,a))&&e.removeClass(c,a)}),h=e.getAttribs(c);for(g=0;g<h.length;g++)if(h[g].nodeName.indexOf("_")!==0)return o}if(a.remove!="none")return N(c,a),p}function N(b,c){var f=b.parentNode,g;if(c.block)if(!k){function h(a,b,c){return a=O(a,b,c),!a||a.nodeName=="BR"||j(a)}j(b)&&!j(f)&&(!h(b,o)&&!h(b.firstChild,p,1)&&b.insertBefore(e.create("br"),b.firstChild),!h(b,p)&&!h(b.lastChild,o,1)&&b.appendChild(e.create("br")))}else f==e.getRoot()&&(!c.list_block||!G(b,c.list_block))&&d(a.grep(b.childNodes),function(a){i(k,a.nodeName.toLowerCase())?g?g.appendChild(a):g=K(a,k):g=0});if(c.selector&&c.inline&&!G(c.inline,b))return;e.remove(b,1)}function O(a,b,c){if(a){b=b?"nextSibling":"previousSibling";for(a=c?a:a[b];a;a=a[b])if(a.nodeType==1||!J(a))return a}}function P(a){return a&&a.nodeType==1&&a.getAttribute("data-mce-type")=="bookmark"}function Q(b,c){function i(a,b){function c(a){var b={};return d(e.getAttribs(a),function(c){var d=c.nodeName.toLowerCase();d.indexOf("_")!==0&&d!=="style"&&(b[d]=e.getAttrib(a,d))}),b}function f(a,b){var c,d;for(d in a)if(a.hasOwnProperty(d)){c=b[d];if(c===q)return o;if(a[d]!=c)return o;delete b[d]}for(d in b)if(b.hasOwnProperty(d))return o;return p}return a.nodeName!=b.nodeName?o:f(c(a),c(b))?f(e.parseStyle(e.getAttrib(a,"style")),e.parseStyle(e.getAttrib(b,"style")))?p:o:o}var f,g,h;if(b&&c){function j(a,b){for(g=a;g;g=g[b]){if(g.nodeType==3&&g.nodeValue.length!==0)return a;if(g.nodeType==1&&!P(g))return g}return a}b=j(b,"previousSibling"),c=j(c,"nextSibling");if(i(b,c)){for(g=b.nextSibling;g&&g!=c;)h=g,g=g.nextSibling,b.appendChild(h);return e.remove(c),d(a.grep(c.childNodes),function(a){b.appendChild(a)}),b}}return c}function R(a){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(a)}function S(a,c){var d,e,f,h;return d=a[c?"startContainer":"endContainer"],e=a[c?"startOffset":"endOffset"],d.nodeType==1&&(f=d.childNodes.length-1,!c&&e&&e--,d=d.childNodes[e>f?f:e]),d.nodeType===3&&c&&e>=d.nodeValue.length&&(d=(new g(d,b.getBody())).next()||d),d.nodeType===3&&!c&&e==0&&(d=(new g(d,b.getBody())).prev()||d),d}function T(c,d,i){function n(a){var c=e.create("span",{id:k,"data-mce-bogus":!0,style:l?"color:red":""});return a&&c.appendChild(b.getDoc().createTextNode(j)),c}function o(a,b){while(a){if(a.nodeType===3&&a.nodeValue!==j||a.childNodes.length>1)return!1;b&&a.nodeType===1&&b.push(a),a=a.firstChild}return!0}function p(a){while(a){if(a.id===k)return a;a=a.parentNode}}function q(a){var b;if(a){b=new g(a,a);for(a=b.current();a;a=b.next())if(a.nodeType===3)return a}}function r(a,b){var c,d;if(!a){a=p(f.getStart());if(!a)while(a=e.get(k))r(a,!1)}else d=f.getRng(!0),o(a)?(b!==!1&&(d.setStartBefore(a),d.setEndBefore(a)),e.remove(a)):(c=q(a),c.nodeValue.charAt(0)===m&&(c=c.deleteData(0,1)),e.remove(a,1)),f.setRng(d)}function s(){var a,b,c,e,g,k,l;a=f.getRng(!0),e=a.startOffset,k=a.startContainer,l=k.nodeValue,b=p(f.getStart()),b&&(c=q(b)),l&&e>0&&e<l.length&&/\w/.test(l.charAt(e))&&/\w/.test(l.charAt(e-1))?(g=f.getBookmark(),a.collapse(!0),a=L(a,u(d)),a=h.split(a),y(d,i,a),f.moveToBookmark(g)):(!b||c.nodeValue!==j?(b=n(!0),c=b.firstChild,a.insertNode(b),e=1,y(d,i,b)):y(d,i,b),f.setCursorLocation(c,e))}function t(){var a=f.getRng(!0),b,c,g,k,l,m,o=[],p,q;b=a.startContainer,c=a.startOffset,l=b;if(b.nodeType==3){if(c!=b.nodeValue.length||b.nodeValue===j)k=!0;l=l.parentNode}while(l){if(B(l,d,i)){m=l;break}l.nextSibling&&(k=!0),o.push(l),l=l.parentNode}if(!m)return;if(k)g=f.getBookmark(),a.collapse(!0),a=L(a,u(d),!0),a=h.split(a),z(d,i,a),f.moveToBookmark(g);else{q=n(),l=q;for(p=o.length-1;p>=0;p--)l.appendChild(o[p].cloneNode(!1)),l=l.firstChild;l.appendChild(e.doc.createTextNode(j)),l=l.firstChild,e.insertAfter(q,m),f.setCursorLocation(l,1)}}var j,k="_mce_caret",l=b.settings.caret_debug;j=a.isGecko?"":m,self._hasCaretEvents||(b.onBeforeGetContent.addToTop(function(){var a=[],b;if(o(p(f.getStart()),a)){b=a.length;while(b--)e.setAttrib(a[b],"data-mce-bogus","1")}}),a.each("onMouseUp onKeyUp".split(" "),function(a){b[a].addToTop(function(){r()})}),b.onKeyDown.addToTop(function(a,b){var c=b.keyCode;(c==8||c==37||c==39)&&r(p(f.getStart()))}),self._hasCaretEvents=!0),c=="apply"?s():t()}function U(a){var b=a.startContainer,c=a.startOffset,d,h,i,j;b.nodeType==3&&c>=b.nodeValue.length-1&&(b=b.parentNode,c=l(b)+1);if(b.nodeType==1){i=b.childNodes,b=i[Math.min(c,i.length-1)],d=new g(b),c>i.length-1&&d.next();for(h=d.current();h;h=d.next())if(h.nodeType==3&&!J(h)){j=e.create("a",null,m),h.parentNode.insertBefore(j,h),a.setStart(h,0),f.setRng(a),e.remove(j);return}}}var c={},d=a.each,e=b.dom,f=b.selection,g=a.dom.TreeWalker,h=new a.dom.RangeUtils(e),i=b.schema.isValidChild,j=e.isBlock,k=b.settings.forced_root_block,l=e.nodeIndex,m="",n=/^(src|href|style)$/,o=!1,p=!0,q,w=function(a){var c;return b.dom.getParent(a,function(a){return c=b.dom.getStyle(a,"text-decoration"),c&&c!=="none"}),c},x=function(a){var c;a.nodeType===1&&a.parentNode&&a.parentNode.nodeType===1&&(c=w(a.parentNode),b.dom.getStyle(a,"color")&&c?b.dom.setStyle(a,"text-decoration",c):b.dom.getStyle(a,"textdecoration")===c&&b.dom.setStyle(a,"text-decoration",null))};a.extend(this,{get:u,register:v,apply:y,remove:z,toggle:A,match:C,matchAll:D,matchNode:B,canApply:E})}}(tinymce),tinymce.onAddEditor.add(function(a,b){var c,d,e,f=b.settings;if(f.inline_styles){d=a.explode(f.font_size_legacy_values);function g(b,c){a.each(c,function(a,c){a&&e.setStyle(b,c,a)}),e.rename(b,"span")}c={font:function(a,b){g(b,{backgroundColor:b.style.backgroundColor,color:b.color,fontFamily:b.face,fontSize:d[parseInt(b.size)-1]})},u:function(a,b){g(b,{textDecoration:"underline"})},strike:function(a,b){g(b,{textDecoration:"line-through"})}};function h(d,g){e=d.dom,f.convert_fonts_to_spans&&a.each(e.select("font,u,strike",g.node),function(a){c[a.nodeName.toLowerCase()](b.dom,a)})}b.onPreProcess.add(h),b.onSetContent.add(h),b.onInit.add(function(){b.selection.onSetContent.add(h)})}}),function(a){function f(){function c(a){a==="remove"&&this.each(function(a,b){var c=f(b);c&&c.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(a,b){var c=tinyMCE.get(b.id.replace(/_parent$/,""));c&&c.remove()})}function d(a){var d=this,e;if(a!==b)c.call(d),d.each(function(b,c){var d;(d=tinyMCE.get(c.id))&&d.setContent(a)});else if(d.length>0)if(e=tinyMCE.get(d[0].id))return e.getContent()}function f(a){var b=null;return a&&a.id&&e.tinymce&&(b=tinyMCE.get(a.id)),b}function g(a){return!!(a&&a.length&&e.tinymce&&a.is(":tinymce"))}var h={};a.each(["text","html","val"],function(c,e){var i=h[e]=a.fn[e],l=e==="text";a.fn[e]=function(c){var e=this;if(!g(e))return i.apply(e,arguments);if(c!==b)return d.call(e.filter(":tinymce"
),c),i.apply(e.not(":tinymce"),arguments),e;var h="",j=arguments;return(l?e:e.eq(0)).each(function(b,c){var d=f(c);h+=d?l?d.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):d.getContent():i.apply(a(c),j)}),h}}),a.each(["append","prepend"],function(c,d){var e=h[d]=a.fn[d],i=d==="prepend";a.fn[d]=function(a){var c=this;if(!g(c))return e.apply(c,arguments);if(a!==b)return c.filter(":tinymce").each(function(b,c){var d=f(c);d&&d.setContent(i?a+d.getContent():d.getContent()+a)}),e.apply(c.not(":tinymce"),arguments),c}}),a.each(["remove","replaceWith","replaceAll","empty"],function(b,d){var e=h[d]=a.fn[d];a.fn[d]=function(){return c.call(this,d),e.apply(this,arguments)}}),h.attr=a.fn.attr,a.fn.attr=function(c,e,i){var l=this;if(!c||c!=="value"||!g(l))return h.attr.call(l,c,e,i);if(e!==b)return d.call(l.filter(":tinymce"),e),h.attr.call(l.not(":tinymce"),c,e,i),l;var m=l[0],n=f(m);return n?n.getContent():h.attr.call(a(m),c,e,i)}}var b,c,d=[],e=window;a.fn.tinymce=function(b){function o(){var c=[],d=0;f&&(f(),f=null),g.each(function(a,e){var f,h=e.id,i=b.oninit;h||(e.id=h=tinymce.DOM.uniqueId()),f=new tinymce.Editor(h,b),c.push(f),f.onInit.add(function(){var a,b=i;g.css("visibility",""),i&&++d==c.length&&(tinymce.is(b,"string")&&(a=b.indexOf(".")===-1?null:tinymce.resolve(b.replace(/\.\w+$/,"")),b=tinymce.resolve(b)),b.apply(a||tinymce,c))})}),a.each(c,function(a,b){b.render()})}var g=this,h,i,j,k,l,m="",n="";return g.length?b?(g.css("visibility","hidden"),!e.tinymce&&!c&&(h=b.script_url)?(c=1,j=h.substring(0,h.lastIndexOf("/")),/_(src|dev)\.js/g.test(h)&&(n="_src"),k=h.lastIndexOf("?"),k!=-1&&(m=h.substring(k+1)),e.tinyMCEPreInit=e.tinyMCEPreInit||{base:j,suffix:n,query:m},h.indexOf("gzip")!=-1&&(l=b.language||"en",h=h+(/\?/.test(h)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(b.theme)+"&plugins="+escape(b.plugins)+"&languages="+l,e.tinyMCE_GZ||(tinyMCE_GZ={start:function(){function c(a){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(a))}tinymce.suffix=n,c("langs/"+l+".js"),c("themes/"+b.theme+"/editor_template"+n+".js"),c("themes/"+b.theme+"/langs/"+l+".js"),a.each(b.plugins.split(","),function(a,b){b&&(c("plugins/"+b+"/editor_plugin"+n+".js"),c("plugins/"+b+"/langs/"+l+".js"))})},end:function(){}})),a.ajax({type:"GET",url:h,dataType:"script",cache:!0,success:function(){tinymce.dom.Event.domLoaded=1,c=2,b.script_loaded&&b.script_loaded(),o(),a.each(d,function(a,b){b()})}})):c===1?d.push(o):o(),g):tinyMCE.get(g[0].id):g},a.extend(a.expr[":"],{tinymce:function(a){return!!a.id&&!!tinyMCE.get(a.id)}})}(jQuery),$(document).ready(function(){function y(){q.find("li").find(r).html(""),q.find("li").find(s).html(""),q.find("li").find(t).html(""),q.find("li").find(t).attr("href",""),q.find("li").find(u).html("")}function z(a){$.ajax({type:"GET",url:"/static/Other.xml",dataType:"xml",timeout:1e3,error:function(a){q.find(".links_next").addClass("disabled"),q.find(".error_mag").show(),q.find("ul").hide(),q.find(".error_mag").html("讀取錯誤")},success:function(j){k=$(j).find("entry").length,$(j).find("entry").slice(a,a+x).each(function(a){b=$(this).find("title").text(),c=$(this).find("link").attr("href"),d=$(this).find("summary").text(),l=d.indexOf("-"),m=d.indexOf(" "),n=d.indexOf("/"),d=jQuery.trim(d),b=b.slice(0,16),d.length==31?(e=d.slice(0,l),f=e.slice(n+1,n+3),g=e.slice(7),h=d.slice(l+1,m),i=d.slice(m+1)):(e=d.slice(0,m),f=e.slice(n+1,n+3),g=e.slice(7),h="",i=d.slice(m+1)),f.slice(0,1)=="0"?f=o[f.slice(1)-1]:f=o[f-1],q.find("li").eq(a).find(r).html(f),q.find("li").eq(a).find(s).html(g),q.find("li").eq(a).find(t).html(b+"…"),q.find("li").eq(a).find(t).attr("href",c),q.find("li").eq(a).find(u).html("時間:"+i)})}})}var a="",b="",c="",d="",e="",f="",g="",h="",i="",j=0,k="",l="",m="",n="",o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p=1,q=$(".events"),r=$(".events .mon"),s=$(".events .day"),t=$(".events .event_name"),u=$(".events .event_info"),v=$(".events .links_next"),w=$(".events .links_prev"),x=q.find("ul > li").length;v.on("click",function(){return p&&j<k&&($(".links_prev").removeClass("disabled"),j+=x,q.find("ul").fadeOut("fast",function(){y(),q.find("ul").fadeIn("fast",z(j))}),k-j==x?($(".links_next").addClass("disabled"),p=0):k-j<x&&($(".links_next").addClass("disabled"),p=0)),!1}),w.on("click",function(){return j>0&&($(".links_next").removeClass("disabled"),p=1,j-=x,q.find("ul").fadeOut("fast",function(){q.find("ul").fadeIn("fast",z(j))}),k-j==k&&$(".links_prev").addClass("disabled")),!1}),z(j)}),$(document).ready(function(){$("body").prepend("<div id='orbit_bar_temp'/>"),$("#orbit_bar_temp").load("/load_orbit_bar",function(){$("body").prepend($(this).html()),$(this).remove()})}),$("div.editable").live("mouseenter mouseleave",function(a){$(this).children(".edit_link").toggle()}),$("#page_design").live("change",function(){$.getScript($(this).attr("rel")+"/"+$(this).val()+"/reload_themes")}),$("#page_module_app_id").live("change",function(){var a=$(this).val();a!=""?$.getScript($(this).attr("rel")+"/"+$(this).val()+"/reload_frontend_pages",function(a,b){b=="success"&&$(this).after(a)}):$("#app_page_url").children().remove()}),$("#module_app_list select").live("change",function(){$.getScript($(this).attr("rel")+"/"+$(this).val()+"/reload_widgets")}),$(".part_kind").live("click",function(){$(".part_kind_partial").hide(),$("#part_"+$(this).attr("value")).show()}),$(function(){$(".engine_loading").load($(this).attr("widget_path"))}),$(document).ready(function(){dropmenu(),tab(),tooltip(),accordion()}),$(function(){$("#back_sidebar a, #back_main a.nav").live("click",function(){return $.getScript(this.href),history.pushState(null,document.title,this.href),history_edited=!0,!1}),$("#back_main a.reload").live("click",function(){return $.getScript(this.href),history.replaceState(null,document.title,this.href),history_edited=!0,!1}),$(".form").live("submit",function(){return $.post(this.action,$(this).serialize(),null,"script"),history_edited=!0,!1}),$(window).bind("popstate",function(){history_edited&&$.getScript(location.href)})}),$("div a.hide").live("click",function(){$(this).parent().next().hide(),$(this).replaceWith("<a href='#' class='show'><%= t(:show) %></a>")}),$("div a.show").live("click",function(){$(this).parent().next().show(),$(this).replaceWith("<a href='#' class='hide'><%= t(:hide) %></a>")}),$(document).ready(function(){$("#user_role_id").change(function(){$("#roles .attributes_block").hide(),$("#"+this.value+"_block").toggle()}),$(".sub_role_select").change(function(){$("#sub_role_"+this.value).toggle()})});