 /*!

  #####  ######  ####### #     # #       #######
 #     # #     # #        #   #  #       #
 #       #     # #         # #   #       #
 #       ######  #####      #    #       #####
 #       #   #   #          #    #       #
 #     # #    #  #          #    #       #
  #####  #     # #######    #    ####### #######


Pati Pati Zexi  v@VERSION
 
 Copyright (c) 2010 Recruit Co ,LTD 
 Revision: @CREYLE_REVISION
 LastBuilt Date: @CREYLE_BUILT_DATE
 LastComitted Date: @CREYLE_COMMIT_DATE
 LastComitter: @CREYLE_COMMITER

*/

 window.FRAMEWORK_NAME = "pati2";

;(function(a,c){function e(){if(!h.isReady){try{y.documentElement.doScroll("left")}catch(m){setTimeout(e,1);return}h.ready()}}function f(m,x){x.src?h.ajax({url:x.src,async:false,dataType:"script"}):h.globalEval(x.text||x.textContent||x.innerHTML||"");x.parentNode&&x.parentNode.removeChild(x)}function d(m,x,A,E,D,V){var Z=m.length;if(typeof x==="object"){for(var ha in x)d(m,ha,x[ha],E,D,A);return m}if(A!==c){E=!V&&E&&h.isFunction(A);for(ha=0;ha<Z;ha++)D(m[ha],x,E?A.call(m[ha],ha,D(m[ha],x)):A,V);return m}return Z?
D(m[0],x):null}function g(){return(new Date).getTime()}function j(){return false}function k(){return true}function l(m,x,A){A[0].type=m;return h.event.handle.apply(x,A)}function r(m){var x,A=[],E=[],D=arguments,V,Z,ha,ia,ga,wa,Ca=h.extend({},h.data(this,"events").live);if(!(m.button&&m.type==="click")){for(ia in Ca){Z=Ca[ia];if(Z.live===m.type||Z.altLive&&h.inArray(m.type,Z.altLive)>-1){V=Z.data;V.beforeFilter&&V.beforeFilter[m.type]&&!V.beforeFilter[m.type](m)||E.push(Z.selector)}else delete Ca[ia]}V=
h(m.target).closest(E,m.currentTarget);ga=0;for(wa=V.length;ga<wa;ga++)for(ia in Ca){Z=Ca[ia];ha=V[ga].elem;E=null;if(V[ga].selector===Z.selector){if(Z.live==="mouseenter"||Z.live==="mouseleave")E=h(m.relatedTarget).closest(Z.selector)[0];if(!E||E!==ha)A.push({elem:ha,fn:Z})}}ga=0;for(wa=A.length;ga<wa;ga++){V=A[ga];m.currentTarget=V.elem;m.data=V.fn.data;if(V.fn.apply(V.elem,D)===false){x=false;break}}return x}}function t(m,x){return"live."+(m?m+".":"")+x.replace(/\./g,"`").replace(/ /g,"&")}function q(m){return!m||
!m.parentNode||m.parentNode.nodeType===11}function p(m,x){var A=0;x.each(function(){if(this.nodeName===(m[A]&&m[A].nodeName)){var E=h.data(m[A++]),D=h.data(this,E);if(E=E&&E.events){delete D.handle;D.events={};for(var V in E)for(var Z in E[V])h.event.add(this,V,E[V][Z],E[V][Z].data)}}})}function o(m,x,A){var E,D,V;if(m.length===1&&typeof m[0]==="string"&&m[0].length<512&&m[0].indexOf("<option")<0&&(h.support.checkClone||!eb.test(m[0]))){D=true;if(V=h.fragments[m[0]])if(V!==1)E=V}if(!E){x=x&&x[0]?
x[0].ownerDocument||x[0]:y;E=x.createDocumentFragment();h.clean(m,x,E,A)}if(D)h.fragments[m[0]]=V?E:1;return{fragment:E,cacheable:D}}function n(m,x){var A={};h.each(fb.concat.apply([],fb.slice(0,x)),function(){A[this]=m});return A}function u(m){return"scrollTo"in m&&m.document?m:m.nodeType===9?m.defaultView||m.parentWindow:false}var h=function(m,x){return new h.fn.init(m,x)},s=a.jQuery,v=a.$,y=a.document,B,z=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,C=/^.[^:#\[\.,]*$/,G=/\S/,I=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,
Y=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Q=navigator.userAgent,K=false,W=[],F,N=Object.prototype.toString,J=Object.prototype.hasOwnProperty,L=Array.prototype.push,ba=Array.prototype.slice,aa=Array.prototype.indexOf;h.fn=h.prototype={init:function(m,x){var A,E;if(!m)return this;if(m.nodeType){this.context=this[0]=m;this.length=1;return this}if(typeof m==="string")if((A=z.exec(m))&&(A[1]||!x))if(A[1]){E=x?x.ownerDocument||x:y;if(m=Y.exec(m))if(h.isPlainObject(x)){m=[y.createElement(m[1])];h.fn.attr.call(m,x,
true)}else m=[E.createElement(m[1])];else{m=o([A[1]],[E]);m=(m.cacheable?m.fragment.cloneNode(true):m.fragment).childNodes}}else{if(x=y.getElementById(A[2])){if(x.id!==A[2])return B.find(m);this.length=1;this[0]=x}this.context=y;this.selector=m;return this}else if(!x&&/^\w+$/.test(m)){this.selector=m;this.context=y;m=y.getElementsByTagName(m)}else return!x||x.jquery?(x||B).find(m):h(x).find(m);else if(h.isFunction(m))return B.ready(m);if(m.selector!==c){this.selector=m.selector;this.context=m.context}return h.isArray(m)?
this.setArray(m):h.makeArray(m,this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return ba.call(this,0)},get:function(m){return m==null?this.toArray():m<0?this.slice(m)[0]:this[m]},pushStack:function(m,x,A){m=h(m||null);m.prevObject=this;m.context=this.context;if(x==="find")m.selector=this.selector+(this.selector?" ":"")+A;else if(x)m.selector=this.selector+"."+x+"("+A+")";return m},setArray:function(m){this.length=0;L.apply(this,m);return this},each:function(m,
x){return h.each(this,m,x)},ready:function(m){h.bindReady();if(h.isReady)m.call(y,h);else W&&W.push(m);return this},eq:function(m){return m===-1?this.slice(m):this.slice(m,+m+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(ba.apply(this,arguments),"slice",ba.call(arguments).join(","))},map:function(m){return this.pushStack(h.map(this,function(x,A){return m.call(x,A,x)}))},end:function(){return this.prevObject||h(null)},push:L,sort:[].sort,
splice:[].splice};h.fn.init.prototype=h.fn;h.extend=h.fn.extend=function(){var m=arguments[0]||{},x=1,A=arguments.length,E=false,D,V,Z,ha;if(typeof m==="boolean"){E=m;m=arguments[1]||{};x=2}if(typeof m!=="object"&&!h.isFunction(m))m={};if(A===x){m=this;--x}for(;x<A;x++)if((D=arguments[x])!=null)for(V in D){Z=m[V];ha=D[V];if(m!==ha)if(E&&ha&&(h.isPlainObject(ha)||h.isArray(ha))){Z=Z&&(h.isPlainObject(Z)||h.isArray(Z))?Z:h.isArray(ha)?[]:{};m[V]=h.extend(E,Z,ha)}else if(ha!==c)m[V]=ha}return m};h.extend({noConflict:function(m){a.$=
v;if(m)a.jQuery=s;return h},isReady:false,ready:function(){if(!h.isReady){if(!y.body)return setTimeout(h.ready,13);h.isReady=true;if(W){for(var m,x=0;m=W[x++];)m.call(y,h);W=null}h.fn.triggerHandler&&h(y).triggerHandler("ready")}},bindReady:function(){if(!K){K=true;if(y.readyState==="complete")return h.ready();if(y.addEventListener){y.addEventListener("DOMContentLoaded",F,false);a.addEventListener("load",h.ready,false)}else if(y.attachEvent){y.attachEvent("onreadystatechange",F);a.attachEvent("onload",
h.ready);var m=false;try{m=a.frameElement==null}catch(x){}y.documentElement.doScroll&&m&&e()}}},isFunction:function(m){return N.call(m)==="[object Function]"},isArray:function(m){return N.call(m)==="[object Array]"},isPlainObject:function(m){if(!m||N.call(m)!=="[object Object]"||m.nodeType||m.setInterval)return false;if(m.constructor&&!J.call(m,"constructor")&&!J.call(m.constructor.prototype,"isPrototypeOf"))return false;var x;for(x in m);return x===c||J.call(m,x)},isEmptyObject:function(m){for(var x in m)return false;
return true},error:function(m){throw m;},parseJSON:function(m){if(typeof m!=="string"||!m)return null;if(/^[\],:{}\s]*$/.test(m.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(m):(new Function("return "+m))();else h.error("Invalid JSON: "+m)},noop:function(){},globalEval:function(m){if(m&&G.test(m)){var x=y.getElementsByTagName("head")[0]||
y.documentElement,A=y.createElement("script");A.type="text/javascript";if(h.support.scriptEval)A.appendChild(y.createTextNode(m));else A.text=m;x.insertBefore(A,x.firstChild);x.removeChild(A)}},nodeName:function(m,x){return m.nodeName&&m.nodeName.toUpperCase()===x.toUpperCase()},each:function(m,x,A){var E,D=0,V=m.length,Z=V===c||h.isFunction(m);if(A)if(Z)for(E in m){if(x.apply(m[E],A)===false)break}else for(;D<V;){if(x.apply(m[D++],A)===false)break}else if(Z)for(E in m){if(x.call(m[E],E,m[E])===false)break}else for(A=
m[0];D<V&&x.call(A,D,A)!==false;A=m[++D]);return m},trim:function(m){return(m||"").replace(I,"")},makeArray:function(m,x){x=x||[];if(m!=null)m.length==null||typeof m==="string"||h.isFunction(m)||typeof m!=="function"&&m.setInterval?L.call(x,m):h.merge(x,m);return x},inArray:function(m,x){if(x.indexOf)return x.indexOf(m);for(var A=0,E=x.length;A<E;A++)if(x[A]===m)return A;return-1},merge:function(m,x){var A=m.length,E=0;if(typeof x.length==="number")for(var D=x.length;E<D;E++)m[A++]=x[E];else for(;x[E]!==
c;)m[A++]=x[E++];m.length=A;return m},grep:function(m,x,A){for(var E=[],D=0,V=m.length;D<V;D++)!A!==!x(m[D],D)&&E.push(m[D]);return E},map:function(m,x,A){for(var E=[],D,V=0,Z=m.length;V<Z;V++){D=x(m[V],V,A);if(D!=null)E[E.length]=D}return E.concat.apply([],E)},guid:1,proxy:function(m,x,A){if(arguments.length===2)if(typeof x==="string"){A=m;m=A[x];x=c}else if(x&&!h.isFunction(x)){A=x;x=c}if(!x&&m)x=function(){return m.apply(A||this,arguments)};if(m)x.guid=m.guid=m.guid||x.guid||h.guid++;return x},
uaMatch:function(m){m=m.toLowerCase();m=/(webkit)[ \/]([\w.]+)/.exec(m)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(m)||/(msie) ([\w.]+)/.exec(m)||!/compatible/.test(m)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(m)||[];return{browser:m[1]||"",version:m[2]||"0"}},browser:{}});Q=h.uaMatch(Q);if(Q.browser){h.browser[Q.browser]=true;h.browser.version=Q.version}if(h.browser.webkit)h.browser.safari=true;if(aa)h.inArray=function(m,x){return aa.call(x,m)};B=h(y);if(y.addEventListener)F=function(){y.removeEventListener("DOMContentLoaded",
F,false);h.ready()};else if(y.attachEvent)F=function(){if(y.readyState==="complete"){y.detachEvent("onreadystatechange",F);h.ready()}};(function(){h.support={};var m=y.documentElement,x=y.createElement("script"),A=y.createElement("div"),E="script"+g();A.style.display="none";A.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var D=A.getElementsByTagName("*"),V=A.getElementsByTagName("a")[0];if(!(!D||!D.length||!V)){h.support=
{leadingWhitespace:A.firstChild.nodeType===3,tbody:!A.getElementsByTagName("tbody").length,htmlSerialize:!!A.getElementsByTagName("link").length,style:/red/.test(V.getAttribute("style")),hrefNormalized:V.getAttribute("href")==="/a",opacity:/^0.55$/.test(V.style.opacity),cssFloat:!!V.style.cssFloat,checkOn:A.getElementsByTagName("input")[0].value==="on",optSelected:y.createElement("select").appendChild(y.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};
x.type="text/javascript";try{x.appendChild(y.createTextNode("window."+E+"=1;"))}catch(Z){}m.insertBefore(x,m.firstChild);if(a[E]){h.support.scriptEval=true;delete a[E]}m.removeChild(x);if(A.attachEvent&&A.fireEvent){A.attachEvent("onclick",function ha(){h.support.noCloneEvent=false;A.detachEvent("onclick",ha)});A.cloneNode(true).fireEvent("onclick")}A=y.createElement("div");A.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";m=y.createDocumentFragment();m.appendChild(A.firstChild);
h.support.checkClone=m.cloneNode(true).cloneNode(true).lastChild.checked;h(function(){var ha=y.createElement("div");ha.style.width=ha.style.paddingLeft="1px";y.body.appendChild(ha);h.boxModel=h.support.boxModel=ha.offsetWidth===2;y.body.removeChild(ha).style.display="none"});m=function(ha){var ia=y.createElement("div");ha="on"+ha;var ga=ha in ia;if(!ga){ia.setAttribute(ha,"return;");ga=typeof ia[ha]==="function"}return ga};h.support.submitBubbles=m("submit");h.support.changeBubbles=m("change");m=
x=A=D=V=null}})();h.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var ca="jQuery"+g(),ua=0,ka={},ra={};h.extend({cache:{},expando:ca,noData:{embed:true,object:true,applet:true},data:function(m,x,A){if(!(m.nodeName&&h.noData[m.nodeName.toLowerCase()])){m=m==a?ka:m;var E=m[ca],D=h.cache;if(!x&&!E)return null;E||(E=++ua);if(typeof x==="object"){m[ca]=
E;D=D[E]=h.extend(true,{},x)}else D=D[E]?D[E]:typeof A==="undefined"?ra:(D[E]={});if(A!==c){m[ca]=E;D[x]=A}return typeof x==="string"?D[x]:D}},removeData:function(m,x){if(!(m.nodeName&&h.noData[m.nodeName.toLowerCase()])){m=m==a?ka:m;var A=m[ca],E=h.cache,D=E[A];if(x){if(D){delete D[x];h.isEmptyObject(D)&&h.removeData(m)}}else{try{delete m[ca]}catch(V){m.removeAttribute&&m.removeAttribute(ca)}delete E[A]}}}});h.fn.extend({data:function(m,x){if(typeof m==="undefined"&&this.length)return h.data(this[0]);
else if(typeof m==="object")return this.each(function(){h.data(this,m)});var A=m.split(".");A[1]=A[1]?"."+A[1]:"";if(x===c){var E=this.triggerHandler("getData"+A[1]+"!",[A[0]]);if(E===c&&this.length)E=h.data(this[0],m);return E===c&&A[1]?this.data(A[0]):E}else return this.trigger("setData"+A[1]+"!",[A[0],x]).each(function(){h.data(this,m,x)})},removeData:function(m){return this.each(function(){h.removeData(this,m)})}});h.extend({queue:function(m,x,A){if(m){x=(x||"fx")+"queue";var E=h.data(m,x);if(!A)return E||
[];if(!E||h.isArray(A))E=h.data(m,x,h.makeArray(A));else E.push(A);return E}},dequeue:function(m,x){x=x||"fx";var A=h.queue(m,x),E=A.shift();if(E==="inprogress")E=A.shift();if(E){x==="fx"&&A.unshift("inprogress");E.call(m,function(){h.dequeue(m,x)})}}});h.fn.extend({queue:function(m,x){if(typeof m!=="string"){x=m;m="fx"}if(x===c)return h.queue(this[0],m);return this.each(function(){var A=h.queue(this,m,x);m==="fx"&&A[0]!=="inprogress"&&h.dequeue(this,m)})},dequeue:function(m){return this.each(function(){h.dequeue(this,
m)})},delay:function(m,x){m=h.fx?h.fx.speeds[m]||m:m;x=x||"fx";return this.queue(x,function(){var A=this;setTimeout(function(){h.dequeue(A,x)},m)})},clearQueue:function(m){return this.queue(m||"fx",[])}});var ma=/[\n\t]/g,la=/\s+/,Da=/\r/g,za=/href|src|style/,R=/(button|input)/i,O=/(button|input|object|select|textarea)/i,H=/^(a|area)$/i,P=/radio|checkbox/;h.fn.extend({attr:function(m,x){return d(this,m,x,true,h.attr)},removeAttr:function(m){return this.each(function(){h.attr(this,m,"");this.nodeType===
1&&this.removeAttribute(m)})},addClass:function(m){if(h.isFunction(m))return this.each(function(ia){var ga=h(this);ga.addClass(m.call(this,ia,ga.attr("class")))});if(m&&typeof m==="string")for(var x=(m||"").split(la),A=0,E=this.length;A<E;A++){var D=this[A];if(D.nodeType===1)if(D.className)for(var V=" "+D.className+" ",Z=0,ha=x.length;Z<ha;Z++){if(V.indexOf(" "+x[Z]+" ")<0)D.className+=" "+x[Z]}else D.className=m}return this},removeClass:function(m){if(h.isFunction(m))return this.each(function(ia){var ga=
h(this);ga.removeClass(m.call(this,ia,ga.attr("class")))});if(m&&typeof m==="string"||m===c)for(var x=(m||"").split(la),A=0,E=this.length;A<E;A++){var D=this[A];if(D.nodeType===1&&D.className)if(m){for(var V=(" "+D.className+" ").replace(ma," "),Z=0,ha=x.length;Z<ha;Z++)V=V.replace(" "+x[Z]+" "," ");D.className=V.substring(1,V.length-1)}else D.className=""}return this},toggleClass:function(m,x){var A=typeof m,E=typeof x==="boolean";if(h.isFunction(m))return this.each(function(D){var V=h(this);V.toggleClass(m.call(this,
D,V.attr("class"),x),x)});return this.each(function(){if(A==="string")for(var D,V=0,Z=h(this),ha=x,ia=m.split(la);D=ia[V++];){ha=E?ha:!Z.hasClass(D);Z[ha?"addClass":"removeClass"](D)}else if(A==="undefined"||A==="boolean"){this.className&&h.data(this,"__className__",this.className);this.className=this.className||m===false?"":h.data(this,"__className__")||""}})},hasClass:function(m){m=" "+m+" ";for(var x=0,A=this.length;x<A;x++)if((" "+this[x].className+" ").replace(ma," ").indexOf(m)>-1)return true;
return false},val:function(m){if(m===c){var x=this[0];if(x){if(h.nodeName(x,"option"))return(x.attributes.value||{}).specified?x.value:x.text;if(h.nodeName(x,"select")){var A=x.selectedIndex,E=[],D=x.options;x=x.type==="select-one";if(A<0)return null;var V=x?A:0;for(A=x?A+1:D.length;V<A;V++){var Z=D[V];if(Z.selected){m=h(Z).val();if(x)return m;E.push(m)}}return E}if(P.test(x.type)&&!h.support.checkOn)return x.getAttribute("value")===null?"on":x.value;return(x.value||"").replace(Da,"")}return c}var ha=
h.isFunction(m);return this.each(function(ia){var ga=h(this),wa=m;if(this.nodeType===1){if(ha)wa=m.call(this,ia,ga.val());if(typeof wa==="number")wa+="";if(h.isArray(wa)&&P.test(this.type))this.checked=h.inArray(ga.val(),wa)>=0;else if(h.nodeName(this,"select")){var Ca=h.makeArray(wa);h("option",this).each(function(){this.selected=h.inArray(h(this).val(),Ca)>=0});if(!Ca.length)this.selectedIndex=-1}else this.value=wa}})}});h.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,
height:true,offset:true},attr:function(m,x,A,E){if(!m||m.nodeType===3||m.nodeType===8)return c;if(E&&x in h.attrFn)return h(m)[x](A);E=m.nodeType!==1||!h.isXMLDoc(m);var D=A!==c;x=E&&h.props[x]||x;if(m.nodeType===1){var V=za.test(x);if(x in m&&E&&!V){if(D){x==="type"&&R.test(m.nodeName)&&m.parentNode&&h.error("type property can't be changed");m[x]=A}if(h.nodeName(m,"form")&&m.getAttributeNode(x))return m.getAttributeNode(x).nodeValue;if(x==="tabIndex")return(x=m.getAttributeNode("tabIndex"))&&x.specified?
x.value:O.test(m.nodeName)||H.test(m.nodeName)&&m.href?0:c;return m[x]}if(!h.support.style&&E&&x==="style"){if(D)m.style.cssText=""+A;return m.style.cssText}D&&m.setAttribute(x,""+A);m=!h.support.hrefNormalized&&E&&V?m.getAttribute(x,2):m.getAttribute(x);return m===null?c:m}return h.style(m,x,A)}});var S=function(m){return m.replace(/[^\w\s\.\|`]/g,function(x){return"\\"+x})};h.event={add:function(m,x,A,E){if(!(m.nodeType===3||m.nodeType===8)){if(m.setInterval&&m!==a&&!m.frameElement)m=a;if(!A.guid)A.guid=
h.guid++;if(E!==c){A=h.proxy(A);A.data=E}var D=h.data(m,"events")||h.data(m,"events",{}),V=h.data(m,"handle"),Z;if(!V){Z=function(){return typeof h!=="undefined"&&!h.event.triggered?h.event.handle.apply(Z.elem,arguments):c};V=h.data(m,"handle",Z)}if(V){V.elem=m;x=x.split(/\s+/);for(var ha,ia=0;ha=x[ia++];){var ga=ha.split(".");ha=ga.shift();if(ia>1){A=h.proxy(A);if(E!==c)A.data=E}A.type=ga.slice(0).sort().join(".");var wa=D[ha],Ca=this.special[ha]||{};if(!wa){wa=D[ha]={};if(!Ca.setup||Ca.setup.call(m,
E,ga,A)===false)if(m.addEventListener)m.addEventListener(ha,V,false);else m.attachEvent&&m.attachEvent("on"+ha,V)}if(Ca.add)if((ga=Ca.add.call(m,A,E,ga,wa))&&h.isFunction(ga)){ga.guid=ga.guid||A.guid;ga.data=ga.data||A.data;ga.type=ga.type||A.type;A=ga}wa[A.guid]=A;this.global[ha]=true}m=null}}},global:{},remove:function(m,x,A){if(!(m.nodeType===3||m.nodeType===8)){var E=h.data(m,"events"),D,V,Z;if(E){if(x===c||typeof x==="string"&&x.charAt(0)===".")for(V in E)this.remove(m,V+(x||""));else{if(x.type){A=
x.handler;x=x.type}x=x.split(/\s+/);for(var ha=0;V=x[ha++];){var ia=V.split(".");V=ia.shift();var ga=!ia.length,wa=h.map(ia.slice(0).sort(),S);wa=new RegExp("(^|\\.)"+wa.join("\\.(?:.*\\.)?")+"(\\.|$)");var Ca=this.special[V]||{};if(E[V]){if(A){Z=E[V][A.guid];delete E[V][A.guid]}else for(var Ia in E[V])if(ga||wa.test(E[V][Ia].type))delete E[V][Ia];Ca.remove&&Ca.remove.call(m,ia,Z);for(D in E[V])break;if(!D){if(!Ca.teardown||Ca.teardown.call(m,ia)===false)if(m.removeEventListener)m.removeEventListener(V,
h.data(m,"handle"),false);else m.detachEvent&&m.detachEvent("on"+V,h.data(m,"handle"));D=null;delete E[V]}}}}for(D in E)break;if(!D){if(Ia=h.data(m,"handle"))Ia.elem=null;h.removeData(m,"events");h.removeData(m,"handle")}}}},trigger:function(m,x,A,E){var D=m.type||m;if(!E){m=typeof m==="object"?m[ca]?m:h.extend(h.Event(D),m):h.Event(D);if(D.indexOf("!")>=0){m.type=D=D.slice(0,-1);m.exclusive=true}if(!A){m.stopPropagation();this.global[D]&&h.each(h.cache,function(){this.events&&this.events[D]&&h.event.trigger(m,
x,this.handle.elem)})}if(!A||A.nodeType===3||A.nodeType===8)return c;m.result=c;m.target=A;x=h.makeArray(x);x.unshift(m)}m.currentTarget=A;(E=h.data(A,"handle"))&&E.apply(A,x);E=A.parentNode||A.ownerDocument;try{if(!(A&&A.nodeName&&h.noData[A.nodeName.toLowerCase()]))if(A["on"+D]&&A["on"+D].apply(A,x)===false)m.result=false}catch(V){}if(!m.isPropagationStopped()&&E)h.event.trigger(m,x,E,true);else if(!m.isDefaultPrevented()){A=m.target;var Z;if(!(h.nodeName(A,"a")&&D==="click")&&!(A&&A.nodeName&&
h.noData[A.nodeName.toLowerCase()])){try{if(A[D]){if(Z=A["on"+D])A["on"+D]=null;this.triggered=true;A[D]()}}catch(ha){}if(Z)A["on"+D]=Z;this.triggered=false}}},handle:function(m){var x,A;m=arguments[0]=h.event.fix(m||a.event);m.currentTarget=this;A=m.type.split(".");m.type=A.shift();x=!A.length&&!m.exclusive;var E=new RegExp("(^|\\.)"+A.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");A=(h.data(this,"events")||{})[m.type];for(var D in A){var V=A[D];if(x||E.test(V.type)){m.handler=V;m.data=V.data;
V=V.apply(this,arguments);if(V!==c){m.result=V;if(V===false){m.preventDefault();m.stopPropagation()}}if(m.isImmediatePropagationStopped())break}}return m.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(m){if(m[ca])return m;var x=m;m=h.Event(x);for(var A=this.props.length,E;A;){E=this.props[--A];m[E]=x[E]}if(!m.target)m.target=m.srcElement||y;if(m.target.nodeType===3)m.target=m.target.parentNode;if(!m.relatedTarget&&m.fromElement)m.relatedTarget=m.fromElement===m.target?m.toElement:m.fromElement;if(m.pageX==null&&m.clientX!=null){x=y.documentElement;A=y.body;m.pageX=m.clientX+(x&&x.scrollLeft||A&&A.scrollLeft||0)-(x&&x.clientLeft||A&&A.clientLeft||0);m.pageY=m.clientY+(x&&x.scrollTop||
A&&A.scrollTop||0)-(x&&x.clientTop||A&&A.clientTop||0)}if(!m.which&&(m.charCode||m.charCode===0?m.charCode:m.keyCode))m.which=m.charCode||m.keyCode;if(!m.metaKey&&m.ctrlKey)m.metaKey=m.ctrlKey;if(!m.which&&m.button!==c)m.which=m.button&1?1:m.button&2?3:m.button&4?2:0;return m},guid:1E8,proxy:h.proxy,special:{ready:{setup:h.bindReady,teardown:h.noop},live:{add:function(m,x){h.extend(m,x||{});m.guid+=x.selector+x.live;x.liveProxy=m;h.event.add(this,x.live,r,x)},remove:function(m){if(m.length){var x=
0,A=new RegExp("(^|\\.)"+m[0]+"(\\.|$)");h.each(h.data(this,"events").live||{},function(){A.test(this.type)&&x++});x<1&&h.event.remove(this,m[0],r)}},special:{}},beforeunload:{setup:function(m,x,A){if(this.setInterval)this.onbeforeunload=A;return false},teardown:function(m,x){if(this.onbeforeunload===x)this.onbeforeunload=null}}}};h.Event=function(m){if(!this.preventDefault)return new h.Event(m);if(m&&m.type){this.originalEvent=m;this.type=m.type}else this.type=m;this.timeStamp=g();this[ca]=true};
h.Event.prototype={preventDefault:function(){this.isDefaultPrevented=k;var m=this.originalEvent;if(m){m.preventDefault&&m.preventDefault();m.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=k;var m=this.originalEvent;if(m){m.stopPropagation&&m.stopPropagation();m.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=k;this.stopPropagation()},isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j};var U=function(m){for(var x=
m.relatedTarget;x&&x!==this;)try{x=x.parentNode}catch(A){break}if(x!==this){m.type=m.data;h.event.handle.apply(this,arguments)}},X=function(m){m.type=m.data;h.event.handle.apply(this,arguments)};h.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(m,x){h.event.special[m]={setup:function(A){h.event.add(this,x,A&&A.selector?X:U,m)},teardown:function(A){h.event.remove(this,x,A&&A.selector?X:U)}}});if(!h.support.submitBubbles)h.event.special.submit={setup:function(m,x,A){if(this.nodeName.toLowerCase()!==
"form"){h.event.add(this,"click.specialSubmit."+A.guid,function(E){var D=E.target,V=D.type;if((V==="submit"||V==="image")&&h(D).closest("form").length)return l("submit",this,arguments)});h.event.add(this,"keypress.specialSubmit."+A.guid,function(E){var D=E.target,V=D.type;if((V==="text"||V==="password")&&h(D).closest("form").length&&E.keyCode===13)return l("submit",this,arguments)})}else return false},remove:function(m,x){h.event.remove(this,"click.specialSubmit"+(x?"."+x.guid:""));h.event.remove(this,
"keypress.specialSubmit"+(x?"."+x.guid:""))}};if(!h.support.changeBubbles){var ea=/textarea|input|select/i;function oa(m){var x=m.type,A=m.value;if(x==="radio"||x==="checkbox")A=m.checked;else if(x==="select-multiple")A=m.selectedIndex>-1?h.map(m.options,function(E){return E.selected}).join("-"):"";else if(m.nodeName.toLowerCase()==="select")A=m.selectedIndex;return A}function ta(m,x){var A=m.target,E,D;if(!(!ea.test(A.nodeName)||A.readOnly)){E=h.data(A,"_change_data");D=oa(A);if(m.type!=="focusout"||
A.type!=="radio")h.data(A,"_change_data",D);if(!(E===c||D===E))if(E!=null||D){m.type="change";return h.event.trigger(m,x,A)}}}h.event.special.change={filters:{focusout:ta,click:function(m){var x=m.target,A=x.type;if(A==="radio"||A==="checkbox"||x.nodeName.toLowerCase()==="select")return ta.call(this,m)},keydown:function(m){var x=m.target,A=x.type;if(m.keyCode===13&&x.nodeName.toLowerCase()!=="textarea"||m.keyCode===32&&(A==="checkbox"||A==="radio")||A==="select-multiple")return ta.call(this,m)},beforeactivate:function(m){m=
m.target;m.nodeName.toLowerCase()==="input"&&m.type==="radio"&&h.data(m,"_change_data",oa(m))}},setup:function(m,x,A){for(var E in qa)h.event.add(this,E+".specialChange."+A.guid,qa[E]);return ea.test(this.nodeName)},remove:function(m,x){for(var A in qa)h.event.remove(this,A+".specialChange"+(x?"."+x.guid:""),qa[A]);return ea.test(this.nodeName)}};var qa=h.event.special.change.filters}y.addEventListener&&h.each({focus:"focusin",blur:"focusout"},function(m,x){function A(E){E=h.event.fix(E);E.type=x;
return h.event.handle.call(this,E)}h.event.special[x]={setup:function(){this.addEventListener(m,A,true)},teardown:function(){this.removeEventListener(m,A,true)}}});h.each(["bind","one"],function(m,x){h.fn[x]=function(A,E,D){if(typeof A==="object"){for(var V in A)this[x](V,E,A[V],D);return this}if(h.isFunction(E)){D=E;E=c}var Z=x==="one"?h.proxy(D,function(ha){h(this).unbind(ha,Z);return D.apply(this,arguments)}):D;return A==="unload"&&x!=="one"?this.one(A,E,D):this.each(function(){h.event.add(this,
A,Z,E)})}});h.fn.extend({unbind:function(m,x){if(typeof m==="object"&&!m.preventDefault){for(var A in m)this.unbind(A,m[A]);return this}return this.each(function(){h.event.remove(this,m,x)})},trigger:function(m,x){return this.each(function(){h.event.trigger(m,x,this)})},triggerHandler:function(m,x){if(this[0]){m=h.Event(m);m.preventDefault();m.stopPropagation();h.event.trigger(m,x,this[0]);return m.result}},toggle:function(m){for(var x=arguments,A=1;A<x.length;)h.proxy(m,x[A++]);return this.click(h.proxy(m,
function(E){var D=(h.data(this,"lastToggle"+m.guid)||0)%A;h.data(this,"lastToggle"+m.guid,D+1);E.preventDefault();return x[D].apply(this,arguments)||false}))},hover:function(m,x){return this.mouseenter(m).mouseleave(x||m)}});h.each(["live","die"],function(m,x){h.fn[x]=function(A,E,D){var V,Z=0;if(h.isFunction(E)){D=E;E=c}for(A=(A||"").split(/\s+/);(V=A[Z++])!=null;){V=V==="focus"?"focusin":V==="blur"?"focusout":V==="hover"?A.push("mouseleave")&&"mouseenter":V;x==="live"?h(this.context).bind(t(V,this.selector),
{data:E,selector:this.selector,live:V},D):h(this.context).unbind(t(V,this.selector),D?{guid:D.guid+this.selector+V}:null)}return this}});h.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".split(" "),function(m,x){h.fn[x]=function(A){return A?this.bind(x,A):this.trigger(x)};if(h.attrFn)h.attrFn[x]=true});a.attachEvent&&!a.addEventListener&&a.attachEvent("onunload",
function(){for(var m in h.cache)if(h.cache[m].handle)try{h.event.remove(h.cache[m].handle.elem)}catch(x){}});(function(){function m(M){for(var T="",da,fa=0;M[fa];fa++){da=M[fa];if(da.nodeType===3||da.nodeType===4)T+=da.nodeValue;else if(da.nodeType!==8)T+=m(da.childNodes)}return T}function x(M,T,da,fa,pa,na){pa=0;for(var ya=fa.length;pa<ya;pa++){var xa=fa[pa];if(xa){xa=xa[M];for(var Ea=false;xa;){if(xa.sizcache===da){Ea=fa[xa.sizset];break}if(xa.nodeType===1&&!na){xa.sizcache=da;xa.sizset=pa}if(xa.nodeName.toLowerCase()===
T){Ea=xa;break}xa=xa[M]}fa[pa]=Ea}}}function A(M,T,da,fa,pa,na){pa=0;for(var ya=fa.length;pa<ya;pa++){var xa=fa[pa];if(xa){xa=xa[M];for(var Ea=false;xa;){if(xa.sizcache===da){Ea=fa[xa.sizset];break}if(xa.nodeType===1){if(!na){xa.sizcache=da;xa.sizset=pa}if(typeof T!=="string"){if(xa===T){Ea=true;break}}else if(ia.filter(T,[xa]).length>0){Ea=xa;break}}xa=xa[M]}fa[pa]=Ea}}}var E=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
D=0,V=Object.prototype.toString,Z=false,ha=true;[0,0].sort(function(){ha=false;return 0});var ia=function(M,T,da,fa){da=da||[];var pa=T=T||y;if(T.nodeType!==1&&T.nodeType!==9)return[];if(!M||typeof M!=="string")return da;for(var na=[],ya,xa,Ea,Va,Ra=true,Ta=Ba(T),Sa=M;(E.exec(""),ya=E.exec(Sa))!==null;){Sa=ya[3];na.push(ya[1]);if(ya[2]){Va=ya[3];break}}if(na.length>1&&wa.exec(M))if(na.length===2&&ga.relative[na[0]])xa=Za(na[0]+na[1],T);else for(xa=ga.relative[na[0]]?[T]:ia(na.shift(),T);na.length;){M=
na.shift();if(ga.relative[M])M+=na.shift();xa=Za(M,xa)}else{if(!fa&&na.length>1&&T.nodeType===9&&!Ta&&ga.match.ID.test(na[0])&&!ga.match.ID.test(na[na.length-1])){ya=ia.find(na.shift(),T,Ta);T=ya.expr?ia.filter(ya.expr,ya.set)[0]:ya.set[0]}if(T){ya=fa?{expr:na.pop(),set:Ia(fa)}:ia.find(na.pop(),na.length===1&&(na[0]==="~"||na[0]==="+")&&T.parentNode?T.parentNode:T,Ta);xa=ya.expr?ia.filter(ya.expr,ya.set):ya.set;if(na.length>0)Ea=Ia(xa);else Ra=false;for(;na.length;){var Oa=na.pop();ya=Oa;if(ga.relative[Oa])ya=
na.pop();else Oa="";if(ya==null)ya=T;ga.relative[Oa](Ea,ya,Ta)}}else Ea=[]}Ea||(Ea=xa);Ea||ia.error(Oa||M);if(V.call(Ea)==="[object Array]")if(Ra)if(T&&T.nodeType===1)for(M=0;Ea[M]!=null;M++){if(Ea[M]&&(Ea[M]===true||Ea[M].nodeType===1&&Pa(T,Ea[M])))da.push(xa[M])}else for(M=0;Ea[M]!=null;M++)Ea[M]&&Ea[M].nodeType===1&&da.push(xa[M]);else da.push.apply(da,Ea);else Ia(Ea,da);if(Va){ia(Va,pa,da,fa);ia.uniqueSort(da)}return da};ia.uniqueSort=function(M){if(Ma){Z=ha;M.sort(Ma);if(Z)for(var T=1;T<M.length;T++)M[T]===
M[T-1]&&M.splice(T--,1)}return M};ia.matches=function(M,T){return ia(M,null,null,T)};ia.find=function(M,T,da){var fa,pa;if(!M)return[];for(var na=0,ya=ga.order.length;na<ya;na++){var xa=ga.order[na];if(pa=ga.leftMatch[xa].exec(M)){var Ea=pa[1];pa.splice(1,1);if(Ea.substr(Ea.length-1)!=="\\"){pa[1]=(pa[1]||"").replace(/\\/g,"");fa=ga.find[xa](pa,T,da);if(fa!=null){M=M.replace(ga.match[xa],"");break}}}}fa||(fa=T.getElementsByTagName("*"));return{set:fa,expr:M}};ia.filter=function(M,T,da,fa){for(var pa=
M,na=[],ya=T,xa,Ea,Va=T&&T[0]&&Ba(T[0]);M&&T.length;){for(var Ra in ga.filter)if((xa=ga.leftMatch[Ra].exec(M))!=null&&xa[2]){var Ta=ga.filter[Ra],Sa,Oa;Oa=xa[1];Ea=false;xa.splice(1,1);if(Oa.substr(Oa.length-1)!=="\\"){if(ya===na)na=[];if(ga.preFilter[Ra])if(xa=ga.preFilter[Ra](xa,ya,da,na,fa,Va)){if(xa===true)continue}else Ea=Sa=true;if(xa)for(var Wa=0;(Oa=ya[Wa])!=null;Wa++)if(Oa){Sa=Ta(Oa,xa,Wa,ya);var gb=fa^!!Sa;if(da&&Sa!=null)if(gb)Ea=true;else ya[Wa]=false;else if(gb){na.push(Oa);Ea=true}}if(Sa!==
c){da||(ya=na);M=M.replace(ga.match[Ra],"");if(!Ea)return[];break}}}if(M===pa)if(Ea==null)ia.error(M);else break;pa=M}return ya};ia.error=function(M){throw"Syntax error, unrecognized expression: "+M;};var ga=ia.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,
CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(M){return M.getAttribute("href")}},relative:{"+":function(M,T){var da=typeof T==="string",fa=da&&!/\W/.test(T);da=da&&!fa;if(fa)T=T.toLowerCase();fa=0;for(var pa=M.length,na;fa<pa;fa++)if(na=M[fa]){for(;(na=
na.previousSibling)&&na.nodeType!==1;);M[fa]=da||na&&na.nodeName.toLowerCase()===T?na||false:na===T}da&&ia.filter(T,M,true)},">":function(M,T){var da=typeof T==="string";if(da&&!/\W/.test(T)){T=T.toLowerCase();for(var fa=0,pa=M.length;fa<pa;fa++){var na=M[fa];if(na){da=na.parentNode;M[fa]=da.nodeName.toLowerCase()===T?da:false}}}else{fa=0;for(pa=M.length;fa<pa;fa++)if(na=M[fa])M[fa]=da?na.parentNode:na.parentNode===T;da&&ia.filter(T,M,true)}},"":function(M,T,da){var fa=D++,pa=A;if(typeof T==="string"&&
!/\W/.test(T)){var na=T=T.toLowerCase();pa=x}pa("parentNode",T,fa,M,na,da)},"~":function(M,T,da){var fa=D++,pa=A;if(typeof T==="string"&&!/\W/.test(T)){var na=T=T.toLowerCase();pa=x}pa("previousSibling",T,fa,M,na,da)}},find:{ID:function(M,T,da){if(typeof T.getElementById!=="undefined"&&!da)return(M=T.getElementById(M[1]))?[M]:[]},NAME:function(M,T){if(typeof T.getElementsByName!=="undefined"){var da=[];T=T.getElementsByName(M[1]);for(var fa=0,pa=T.length;fa<pa;fa++)T[fa].getAttribute("name")===M[1]&&
da.push(T[fa]);return da.length===0?null:da}},TAG:function(M,T){return T.getElementsByTagName(M[1])}},preFilter:{CLASS:function(M,T,da,fa,pa,na){M=" "+M[1].replace(/\\/g,"")+" ";if(na)return M;na=0;for(var ya;(ya=T[na])!=null;na++)if(ya)if(pa^(ya.className&&(" "+ya.className+" ").replace(/[\t\n]/g," ").indexOf(M)>=0))da||fa.push(ya);else if(da)T[na]=false;return false},ID:function(M){return M[1].replace(/\\/g,"")},TAG:function(M){return M[1].toLowerCase()},CHILD:function(M){if(M[1]==="nth"){var T=
/(-?)(\d*)n((?:\+|-)?\d*)/.exec(M[2]==="even"&&"2n"||M[2]==="odd"&&"2n+1"||!/\D/.test(M[2])&&"0n+"+M[2]||M[2]);M[2]=T[1]+(T[2]||1)-0;M[3]=T[3]-0}M[0]=D++;return M},ATTR:function(M,T,da,fa,pa,na){T=M[1].replace(/\\/g,"");if(!na&&ga.attrMap[T])M[1]=ga.attrMap[T];if(M[2]==="~=")M[4]=" "+M[4]+" ";return M},PSEUDO:function(M,T,da,fa,pa){if(M[1]==="not")if((E.exec(M[3])||"").length>1||/^\w/.test(M[3]))M[3]=ia(M[3],null,null,T);else{M=ia.filter(M[3],T,da,true^pa);da||fa.push.apply(fa,M);return false}else if(ga.match.POS.test(M[0])||
ga.match.CHILD.test(M[0]))return true;return M},POS:function(M){M.unshift(true);return M}},filters:{enabled:function(M){return M.disabled===false&&M.type!=="hidden"},disabled:function(M){return M.disabled===true},checked:function(M){return M.checked===true},selected:function(M){return M.selected===true},parent:function(M){return!!M.firstChild},empty:function(M){return!M.firstChild},has:function(M,T,da){return!!ia(da[3],M).length},header:function(M){return/h\d/i.test(M.nodeName)},text:function(M){return"text"===
M.type},radio:function(M){return"radio"===M.type},checkbox:function(M){return"checkbox"===M.type},file:function(M){return"file"===M.type},password:function(M){return"password"===M.type},submit:function(M){return"submit"===M.type},image:function(M){return"image"===M.type},reset:function(M){return"reset"===M.type},button:function(M){return"button"===M.type||M.nodeName.toLowerCase()==="button"},input:function(M){return/input|select|textarea|button/i.test(M.nodeName)}},setFilters:{first:function(M,T){return T===
0},last:function(M,T,da,fa){return T===fa.length-1},even:function(M,T){return T%2===0},odd:function(M,T){return T%2===1},lt:function(M,T,da){return T<da[3]-0},gt:function(M,T,da){return T>da[3]-0},nth:function(M,T,da){return da[3]-0===T},eq:function(M,T,da){return da[3]-0===T}},filter:{PSEUDO:function(M,T,da,fa){var pa=T[1],na=ga.filters[pa];if(na)return na(M,da,T,fa);else if(pa==="contains")return(M.textContent||M.innerText||m([M])||"").indexOf(T[3])>=0;else if(pa==="not"){T=T[3];da=0;for(fa=T.length;da<
fa;da++)if(T[da]===M)return false;return true}else ia.error("Syntax error, unrecognized expression: "+pa)},CHILD:function(M,T){var da=T[1],fa=M;switch(da){case "only":case "first":for(;fa=fa.previousSibling;)if(fa.nodeType===1)return false;if(da==="first")return true;fa=M;case "last":for(;fa=fa.nextSibling;)if(fa.nodeType===1)return false;return true;case "nth":da=T[2];var pa=T[3];if(da===1&&pa===0)return true;T=T[0];var na=M.parentNode;if(na&&(na.sizcache!==T||!M.nodeIndex)){var ya=0;for(fa=na.firstChild;fa;fa=
fa.nextSibling)if(fa.nodeType===1)fa.nodeIndex=++ya;na.sizcache=T}M=M.nodeIndex-pa;return da===0?M===0:M%da===0&&M/da>=0}},ID:function(M,T){return M.nodeType===1&&M.getAttribute("id")===T},TAG:function(M,T){return T==="*"&&M.nodeType===1||M.nodeName.toLowerCase()===T},CLASS:function(M,T){return(" "+(M.className||M.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(M,T){var da=T[1];M=ga.attrHandle[da]?ga.attrHandle[da](M):M[da]!=null?M[da]:M.getAttribute(da);da=M+"";var fa=T[2];T=T[4];return M==
null?fa==="!=":fa==="="?da===T:fa==="*="?da.indexOf(T)>=0:fa==="~="?(" "+da+" ").indexOf(T)>=0:!T?da&&M!==false:fa==="!="?da!==T:fa==="^="?da.indexOf(T)===0:fa==="$="?da.substr(da.length-T.length)===T:fa==="|="?da===T||da.substr(0,T.length+1)===T+"-":false},POS:function(M,T,da,fa){var pa=ga.setFilters[T[2]];if(pa)return pa(M,da,T,fa)}}},wa=ga.match.POS;for(var Ca in ga.match){ga.match[Ca]=new RegExp(ga.match[Ca].source+/(?![^\[]*\])(?![^\(]*\))/.source);ga.leftMatch[Ca]=new RegExp(/(^(?:.|\r|\n)*?)/.source+
ga.match[Ca].source.replace(/\\(\d+)/g,function(M,T){return"\\"+(T-0+1)}))}var Ia=function(M,T){M=Array.prototype.slice.call(M,0);if(T){T.push.apply(T,M);return T}return M};try{Array.prototype.slice.call(y.documentElement.childNodes,0)}catch(Ka){Ia=function(M,T){T=T||[];if(V.call(M)==="[object Array]")Array.prototype.push.apply(T,M);else if(typeof M.length==="number")for(var da=0,fa=M.length;da<fa;da++)T.push(M[da]);else for(da=0;M[da];da++)T.push(M[da]);return T}}var Ma;if(y.documentElement.compareDocumentPosition)Ma=
function(M,T){if(!M.compareDocumentPosition||!T.compareDocumentPosition){if(M==T)Z=true;return M.compareDocumentPosition?-1:1}M=M.compareDocumentPosition(T)&4?-1:M===T?0:1;if(M===0)Z=true;return M};else if("sourceIndex"in y.documentElement)Ma=function(M,T){if(!M.sourceIndex||!T.sourceIndex){if(M==T)Z=true;return M.sourceIndex?-1:1}M=M.sourceIndex-T.sourceIndex;if(M===0)Z=true;return M};else if(y.createRange)Ma=function(M,T){if(!M.ownerDocument||!T.ownerDocument){if(M==T)Z=true;return M.ownerDocument?
-1:1}var da=M.ownerDocument.createRange(),fa=T.ownerDocument.createRange();da.setStart(M,0);da.setEnd(M,0);fa.setStart(T,0);fa.setEnd(T,0);M=da.compareBoundaryPoints(Range.START_TO_END,fa);if(M===0)Z=true;return M};(function(){var M=y.createElement("div"),T="script"+(new Date).getTime();M.innerHTML="<a name='"+T+"'/>";var da=y.documentElement;da.insertBefore(M,da.firstChild);if(y.getElementById(T)){ga.find.ID=function(fa,pa,na){if(typeof pa.getElementById!=="undefined"&&!na)return(pa=pa.getElementById(fa[1]))?
pa.id===fa[1]||typeof pa.getAttributeNode!=="undefined"&&pa.getAttributeNode("id").nodeValue===fa[1]?[pa]:c:[]};ga.filter.ID=function(fa,pa){var na=typeof fa.getAttributeNode!=="undefined"&&fa.getAttributeNode("id");return fa.nodeType===1&&na&&na.nodeValue===pa}}da.removeChild(M);da=M=null})();(function(){var M=y.createElement("div");M.appendChild(y.createComment(""));if(M.getElementsByTagName("*").length>0)ga.find.TAG=function(T,da){da=da.getElementsByTagName(T[1]);if(T[1]==="*"){T=[];for(var fa=
0;da[fa];fa++)da[fa].nodeType===1&&T.push(da[fa]);da=T}return da};M.innerHTML="<a href='#'></a>";if(M.firstChild&&typeof M.firstChild.getAttribute!=="undefined"&&M.firstChild.getAttribute("href")!=="#")ga.attrHandle.href=function(T){return T.getAttribute("href",2)};M=null})();y.querySelectorAll&&function(){var M=ia,T=y.createElement("div");T.innerHTML="<p class='TEST'></p>";if(!(T.querySelectorAll&&T.querySelectorAll(".TEST").length===0)){ia=function(fa,pa,na,ya){pa=pa||y;if(!ya&&pa.nodeType===9&&
!Ba(pa))try{return Ia(pa.querySelectorAll(fa),na)}catch(xa){}return M(fa,pa,na,ya)};for(var da in M)ia[da]=M[da];T=null}}();(function(){var M=y.createElement("div");M.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!M.getElementsByClassName||M.getElementsByClassName("e").length===0)){M.lastChild.className="e";if(M.getElementsByClassName("e").length!==1){ga.order.splice(1,0,"CLASS");ga.find.CLASS=function(T,da,fa){if(typeof da.getElementsByClassName!=="undefined"&&!fa)return da.getElementsByClassName(T[1])};
M=null}}})();var Pa=y.compareDocumentPosition?function(M,T){return M.compareDocumentPosition(T)&16}:function(M,T){return M!==T&&(M.contains?M.contains(T):true)},Ba=function(M){return(M=(M?M.ownerDocument||M:0).documentElement)?M.nodeName!=="HTML":false},Za=function(M,T){var da=[],fa="",pa;for(T=T.nodeType?[T]:T;pa=ga.match.PSEUDO.exec(M);){fa+=pa[0];M=M.replace(ga.match.PSEUDO,"")}M=ga.relative[M]?M+"*":M;pa=0;for(var na=T.length;pa<na;pa++)ia(M,T[pa],da);return ia.filter(fa,da)};h.find=ia;h.expr=
ia.selectors;h.expr[":"]=h.expr.filters;h.unique=ia.uniqueSort;h.getText=m;h.isXMLDoc=Ba;h.contains=Pa})();var va=/Until$/,ja=/^(?:parents|prevUntil|prevAll)/,sa=/,/;ba=Array.prototype.slice;var Aa=function(m,x,A){if(h.isFunction(x))return h.grep(m,function(D,V){return!!x.call(D,V,D)===A});else if(x.nodeType)return h.grep(m,function(D){return D===x===A});else if(typeof x==="string"){var E=h.grep(m,function(D){return D.nodeType===1});if(C.test(x))return h.filter(x,E,!A);else x=h.filter(x,E)}return h.grep(m,
function(D){return h.inArray(D,x)>=0===A})};h.fn.extend({find:function(m){for(var x=this.pushStack("","find",m),A=0,E=0,D=this.length;E<D;E++){A=x.length;h.find(m,this[E],x);if(E>0)for(var V=A;V<x.length;V++)for(var Z=0;Z<A;Z++)if(x[Z]===x[V]){x.splice(V--,1);break}}return x},has:function(m){var x=h(m);return this.filter(function(){for(var A=0,E=x.length;A<E;A++)if(h.contains(this,x[A]))return true})},not:function(m){return this.pushStack(Aa(this,m,false),"not",m)},filter:function(m){return this.pushStack(Aa(this,
m,true),"filter",m)},is:function(m){return!!m&&h.filter(m,this).length>0},closest:function(m,x){if(h.isArray(m)){var A=[],E=this[0],D,V={},Z;if(E&&m.length){D=0;for(var ha=m.length;D<ha;D++){Z=m[D];V[Z]||(V[Z]=h.expr.match.POS.test(Z)?h(Z,x||this.context):Z)}for(;E&&E.ownerDocument&&E!==x;){for(Z in V){D=V[Z];if(D.jquery?D.index(E)>-1:h(E).is(D)){A.push({selector:Z,elem:E});delete V[Z]}}E=E.parentNode}}return A}var ia=h.expr.match.POS.test(m)?h(m,x||this.context):null;return this.map(function(ga,
wa){for(;wa&&wa.ownerDocument&&wa!==x;){if(ia?ia.index(wa)>-1:h(wa).is(m))return wa;wa=wa.parentNode}return null})},index:function(m){if(!m||typeof m==="string")return h.inArray(this[0],m?h(m):this.parent().children());return h.inArray(m.jquery?m[0]:m,this)},add:function(m,x){m=typeof m==="string"?h(m,x||this.context):h.makeArray(m);x=h.merge(this.get(),m);return this.pushStack(q(m[0])||q(x[0])?x:h.unique(x))},andSelf:function(){return this.add(this.prevObject)}});h.each({parent:function(m){return(m=
m.parentNode)&&m.nodeType!==11?m:null},parents:function(m){return h.dir(m,"parentNode")},parentsUntil:function(m,x,A){return h.dir(m,"parentNode",A)},next:function(m){return h.nth(m,2,"nextSibling")},prev:function(m){return h.nth(m,2,"previousSibling")},nextAll:function(m){return h.dir(m,"nextSibling")},prevAll:function(m){return h.dir(m,"previousSibling")},nextUntil:function(m,x,A){return h.dir(m,"nextSibling",A)},prevUntil:function(m,x,A){return h.dir(m,"previousSibling",A)},siblings:function(m){return h.sibling(m.parentNode.firstChild,
m)},children:function(m){return h.sibling(m.firstChild)},contents:function(m){return h.nodeName(m,"iframe")?m.contentDocument||m.contentWindow.document:h.makeArray(m.childNodes)}},function(m,x){h.fn[m]=function(A,E){var D=h.map(this,x,A);va.test(m)||(E=A);if(E&&typeof E==="string")D=h.filter(E,D);D=this.length>1?h.unique(D):D;if((this.length>1||sa.test(E))&&ja.test(m))D=D.reverse();return this.pushStack(D,m,ba.call(arguments).join(","))}});h.extend({filter:function(m,x,A){if(A)m=":not("+m+")";return h.find.matches(m,
x)},dir:function(m,x,A){var E=[];for(m=m[x];m&&m.nodeType!==9&&(A===c||m.nodeType!==1||!h(m).is(A));){m.nodeType===1&&E.push(m);m=m[x]}return E},nth:function(m,x,A){x=x||1;for(var E=0;m;m=m[A])if(m.nodeType===1&&++E===x)break;return m},sibling:function(m,x){for(var A=[];m;m=m.nextSibling)m.nodeType===1&&m!==x&&A.push(m);return A}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,Ga=/^\s+/,Ha=/(<([\w:]+)[^>]*?)\/>/g,Ja=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,Na=/<tbody/i,Xa=/<|&\w+;/,
eb=/checked\s*(?:[^=]|=\s*.checked.)/i,hb=function(m,x,A){return Ja.test(A)?m:x+"></"+A+">"},Qa={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,"",""]};Qa.optgroup=Qa.option;Qa.tbody=Qa.tfoot=Qa.colgroup=Qa.caption=Qa.thead;Qa.th=
Qa.td;if(!h.support.htmlSerialize)Qa._default=[1,"div<div>","</div>"];h.fn.extend({text:function(m){if(h.isFunction(m))return this.each(function(x){var A=h(this);A.text(m.call(this,x,A.text()))});if(typeof m!=="object"&&m!==c)return this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(m));return h.getText(this)},wrapAll:function(m){if(h.isFunction(m))return this.each(function(A){h(this).wrapAll(m.call(this,A))});if(this[0]){var x=h(m,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&
x.insertBefore(this[0]);x.map(function(){for(var A=this;A.firstChild&&A.firstChild.nodeType===1;)A=A.firstChild;return A}).append(this)}return this},wrapInner:function(m){if(h.isFunction(m))return this.each(function(x){h(this).wrapInner(m.call(this,x))});return this.each(function(){var x=h(this),A=x.contents();A.length?A.wrapAll(m):x.append(m)})},wrap:function(m){return this.each(function(){h(this).wrapAll(m)})},unwrap:function(){return this.parent().each(function(){h.nodeName(this,"body")||h(this).replaceWith(this.childNodes)}).end()},
append:function(){return this.domManip(arguments,true,function(m){this.nodeType===1&&this.appendChild(m)})},prepend:function(){return this.domManip(arguments,true,function(m){this.nodeType===1&&this.insertBefore(m,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(x){this.parentNode.insertBefore(x,this)});else if(arguments.length){var m=h(arguments[0]);m.push.apply(m,this.toArray());return this.pushStack(m,"before",arguments)}},after:function(){if(this[0]&&
this[0].parentNode)return this.domManip(arguments,false,function(x){this.parentNode.insertBefore(x,this.nextSibling)});else if(arguments.length){var m=this.pushStack(this,"after",arguments);m.push.apply(m,h(arguments[0]).toArray());return m}},clone:function(m){var x=this.map(function(){if(!h.support.noCloneEvent&&!h.isXMLDoc(this)){var A=this.outerHTML,E=this.ownerDocument;if(!A){A=E.createElement("div");A.appendChild(this.cloneNode(true));A=A.innerHTML}return h.clean([A.replace(Fa,"").replace(Ga,
"")],E)[0]}else return this.cloneNode(true)});if(m===true){p(this,x);p(this.find("*"),x.find("*"))}return x},html:function(m){if(m===c)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof m==="string"&&!/<script/i.test(m)&&(h.support.leadingWhitespace||!Ga.test(m))&&!Qa[(La.exec(m)||["",""])[1].toLowerCase()]){m=m.replace(Ha,hb);try{for(var x=0,A=this.length;x<A;x++)if(this[x].nodeType===1){h.cleanData(this[x].getElementsByTagName("*"));this[x].innerHTML=m}}catch(E){this.empty().append(m)}}else h.isFunction(m)?
this.each(function(D){var V=h(this),Z=V.html();V.empty().append(function(){return m.call(this,D,Z)})}):this.empty().append(m);return this},replaceWith:function(m){if(this[0]&&this[0].parentNode){if(h.isFunction(m))return this.each(function(x){var A=h(this),E=A.html();A.replaceWith(m.call(this,x,E))});else m=h(m).detach();return this.each(function(){var x=this.nextSibling,A=this.parentNode;h(this).remove();x?h(x).before(m):h(A).append(m)})}else return this.pushStack(h(h.isFunction(m)?m():m),"replaceWith",
m)},detach:function(m){return this.remove(m,true)},domManip:function(m,x,A){function E(wa){return h.nodeName(wa,"table")?wa.getElementsByTagName("tbody")[0]||wa.appendChild(wa.ownerDocument.createElement("tbody")):wa}var D,V,Z=m[0],ha=[];if(!h.support.checkClone&&arguments.length===3&&typeof Z==="string"&&eb.test(Z))return this.each(function(){h(this).domManip(m,x,A,true)});if(h.isFunction(Z))return this.each(function(wa){var Ca=h(this);m[0]=Z.call(this,wa,x?Ca.html():c);Ca.domManip(m,x,A)});if(this[0]){D=
m[0]&&m[0].parentNode&&m[0].parentNode.nodeType===11?{fragment:m[0].parentNode}:o(m,this,ha);if(V=D.fragment.firstChild){x=x&&h.nodeName(V,"tr");for(var ia=0,ga=this.length;ia<ga;ia++)A.call(x?E(this[ia],V):this[ia],D.cacheable||this.length>1||ia>0?D.fragment.cloneNode(true):D.fragment)}ha&&h.each(ha,f)}return this}});h.fragments={};h.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(m,x){h.fn[m]=function(A){var E=[];A=h(A);for(var D=
0,V=A.length;D<V;D++){var Z=(D>0?this.clone(true):this).get();h.fn[x].apply(h(A[D]),Z);E=E.concat(Z)}return this.pushStack(E,m,A.selector)}});h.each({remove:function(m,x){if(!m||h.filter(m,[this]).length){if(!x&&this.nodeType===1){h.cleanData(this.getElementsByTagName("*"));h.cleanData([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&h.cleanData(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},function(m,x){h.fn[m]=
function(){return this.each(x,arguments)}});h.extend({clean:function(m,x,A,E){x=x||y;if(typeof x.createElement==="undefined")x=x.ownerDocument||x[0]&&x[0].ownerDocument||y;var D=[];h.each(m,function(V,Z){if(typeof Z==="number")Z+="";if(Z){if(typeof Z==="string"&&!Xa.test(Z))Z=x.createTextNode(Z);else if(typeof Z==="string"){Z=Z.replace(Ha,hb);var ha=(La.exec(Z)||["",""])[1].toLowerCase(),ia=Qa[ha]||Qa._default,ga=ia[0];V=x.createElement("div");for(V.innerHTML=ia[1]+Z+ia[2];ga--;)V=V.lastChild;if(!h.support.tbody){ga=
Na.test(Z);ha=ha==="table"&&!ga?V.firstChild&&V.firstChild.childNodes:ia[1]==="<table>"&&!ga?V.childNodes:[];for(ia=ha.length-1;ia>=0;--ia)h.nodeName(ha[ia],"tbody")&&!ha[ia].childNodes.length&&ha[ia].parentNode.removeChild(ha[ia])}!h.support.leadingWhitespace&&Ga.test(Z)&&V.insertBefore(x.createTextNode(Ga.exec(Z)[0]),V.firstChild);Z=h.makeArray(V.childNodes)}if(Z.nodeType)D.push(Z);else D=h.merge(D,Z)}});if(A)for(m=0;D[m];m++)if(E&&h.nodeName(D[m],"script")&&(!D[m].type||D[m].type.toLowerCase()===
"text/javascript"))E.push(D[m].parentNode?D[m].parentNode.removeChild(D[m]):D[m]);else{D[m].nodeType===1&&D.splice.apply(D,[m+1,0].concat(h.makeArray(D[m].getElementsByTagName("script"))));A.appendChild(D[m])}return D},cleanData:function(m){for(var x=0,A;(A=m[x])!=null;x++){h.event.remove(A);h.removeData(A)}}});var lb=/z-?index|font-?weight|opacity|zoom|line-?height/i,ib=/alpha\([^)]*\)/,jb=/opacity=([^)]*)/,$a=/float/i,ab=/-([a-z])/ig,mb=/([A-Z])/g,nb=/^-?\d+(?:px)?$/i,ob=/^-?\d/,pb={position:"absolute",
visibility:"hidden",display:"block"},qb=["Left","Right"],rb=["Top","Bottom"],sb=y.defaultView&&y.defaultView.getComputedStyle,kb=h.support.cssFloat?"cssFloat":"styleFloat",bb=function(m,x){return x.toUpperCase()};h.fn.css=function(m,x){return d(this,m,x,true,function(A,E,D){if(D===c)return h.curCSS(A,E);if(typeof D==="number"&&!lb.test(E))D+="px";h.style(A,E,D)})};h.extend({style:function(m,x,A){if(!m||m.nodeType===3||m.nodeType===8)return c;if((x==="width"||x==="height")&&parseFloat(A)<0)A=c;var E=
m.style||m,D=A!==c;if(!h.support.opacity&&x==="opacity"){if(D){E.zoom=1;x=parseInt(A,10)+""==="NaN"?"":"alpha(opacity="+A*100+")";m=E.filter||h.curCSS(m,"filter")||"";E.filter=ib.test(m)?m.replace(ib,x):x}return E.filter&&E.filter.indexOf("opacity=")>=0?parseFloat(jb.exec(E.filter)[1])/100+"":""}if($a.test(x))x=kb;x=x.replace(ab,bb);if(D)E[x]=A;return E[x]},css:function(m,x,A,E){if(x==="width"||x==="height"){var D,V=x==="width"?qb:rb;function Z(){D=x==="width"?m.offsetWidth:m.offsetHeight;E!=="border"&&
h.each(V,function(){E||(D-=parseFloat(h.curCSS(m,"padding"+this,true))||0);if(E==="margin")D+=parseFloat(h.curCSS(m,"margin"+this,true))||0;else D-=parseFloat(h.curCSS(m,"border"+this+"Width",true))||0})}m.offsetWidth!==0?Z():h.swap(m,pb,Z);return Math.max(0,Math.round(D))}return h.curCSS(m,x,A)},curCSS:function(m,x,A){var E,D=m.style;if(!h.support.opacity&&x==="opacity"&&m.currentStyle){E=jb.test(m.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return E===""?"1":E}if($a.test(x))x=kb;if(!A&&
D&&D[x])E=D[x];else if(sb){if($a.test(x))x="float";x=x.replace(mb,"-$1").toLowerCase();D=m.ownerDocument.defaultView;if(!D)return null;if(m=D.getComputedStyle(m,null))E=m.getPropertyValue(x);if(x==="opacity"&&E==="")E="1"}else if(m.currentStyle){A=x.replace(ab,bb);E=m.currentStyle[x]||m.currentStyle[A];if(!nb.test(E)&&ob.test(E)){x=D.left;var V=m.runtimeStyle.left;m.runtimeStyle.left=m.currentStyle.left;D.left=A==="fontSize"?"1em":E||0;E=D.pixelLeft+"px";D.left=x;m.runtimeStyle.left=V}}return E},
swap:function(m,x,A){var E={};for(var D in x){E[D]=m.style[D];m.style[D]=x[D]}A.call(m);for(D in x)m.style[D]=E[D]}});if(h.expr&&h.expr.filters){h.expr.filters.hidden=function(m){var x=m.offsetWidth,A=m.offsetHeight,E=m.nodeName.toLowerCase()==="tr";return x===0&&A===0&&!E?true:x>0&&A>0&&!E?false:h.curCSS(m,"display")==="none"};h.expr.filters.visible=function(m){return!h.expr.filters.hidden(m)}}var tb=g(),ub=/<script(.|\s)*?\/script>/gi,vb=/select|textarea/i,wb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
Ua=/=\?(&|$)/,cb=/\?/,xb=/(\?|&)_=.*?(&|$)/,yb=/^(\w+:)?\/\/([^\/?#]+)/,zb=/%20/g;h.fn.extend({_load:h.fn.load,load:function(m,x,A){if(typeof m!=="string")return this._load(m);else if(!this.length)return this;var E=m.indexOf(" ");if(E>=0){var D=m.slice(E,m.length);m=m.slice(0,E)}E="GET";if(x)if(h.isFunction(x)){A=x;x=null}else if(typeof x==="object"){x=h.param(x,h.ajaxSettings.traditional);E="POST"}var V=this;h.ajax({url:m,type:E,dataType:"html",data:x,complete:function(Z,ha){if(ha==="success"||ha===
"notmodified")V.html(D?h("<div />").append(Z.responseText.replace(ub,"")).find(D):Z.responseText);A&&V.each(A,[Z.responseText,ha,Z])}});return this},serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?h.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||vb.test(this.nodeName)||wb.test(this.type))}).map(function(m,x){m=h(this).val();return m==null?null:h.isArray(m)?h.map(m,
function(A){return{name:x.name,value:A}}):{name:x.name,value:m}}).get()}});h.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(m,x){h.fn[x]=function(A){return this.bind(x,A)}});h.extend({get:function(m,x,A,E){if(h.isFunction(x)){E=E||A;A=x;x=null}return h.ajax({type:"GET",url:m,data:x,success:A,dataType:E})},getScript:function(m,x){return h.get(m,null,x,"script")},getJSON:function(m,x,A){return h.get(m,x,A,"json")},post:function(m,x,A,E){if(h.isFunction(x)){E=
E||A;A=x;x={}}return h.ajax({type:"POST",url:m,data:x,success:A,dataType:E})},ajaxSetup:function(m){h.extend(h.ajaxSettings,m)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:a.XMLHttpRequest&&(a.location.protocol!=="file:"||!a.ActiveXObject)?function(){return new a.XMLHttpRequest}:function(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(m){}},accepts:{xml:"application/xml, text/xml",html:"text/html",
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(m){function x(){D.success&&D.success.call(ia,ha,Z,Ba);D.global&&E("ajaxSuccess",[Ba,D])}function A(){D.complete&&D.complete.call(ia,Ba,Z);D.global&&E("ajaxComplete",[Ba,D]);D.global&&!--h.active&&h.event.trigger("ajaxStop")}function E(pa,na){(D.context?h(D.context):h.event).trigger(pa,na)}var D=h.extend(true,{},h.ajaxSettings,m),V,Z,ha,
ia=m&&m.context||D,ga=D.type.toUpperCase();if(D.data&&D.processData&&typeof D.data!=="string")D.data=h.param(D.data,D.traditional);if(D.dataType==="jsonp"){if(ga==="GET")Ua.test(D.url)||(D.url+=(cb.test(D.url)?"&":"?")+(D.jsonp||"callback")+"=?");else if(!D.data||!Ua.test(D.data))D.data=(D.data?D.data+"&":"")+(D.jsonp||"callback")+"=?";D.dataType="json"}if(D.dataType==="json"&&(D.data&&Ua.test(D.data)||Ua.test(D.url))){V=D.jsonpCallback||"jsonp"+tb++;if(D.data)D.data=(D.data+"").replace(Ua,"="+V+
"$1");D.url=D.url.replace(Ua,"="+V+"$1");D.dataType="script";a[V]=a[V]||function(pa){ha=pa;x();A();a[V]=c;try{delete a[V]}catch(na){}Ia&&Ia.removeChild(Ka)}}if(D.dataType==="script"&&D.cache===null)D.cache=false;if(D.cache===false&&ga==="GET"){var wa=g(),Ca=D.url.replace(xb,"$1_="+wa+"$2");D.url=Ca+(Ca===D.url?(cb.test(D.url)?"&":"?")+"_="+wa:"")}if(D.data&&ga==="GET")D.url+=(cb.test(D.url)?"&":"?")+D.data;D.global&&!h.active++&&h.event.trigger("ajaxStart");wa=(wa=yb.exec(D.url))&&(wa[1]&&wa[1]!==
location.protocol||wa[2]!==location.host);if(D.dataType==="script"&&ga==="GET"&&wa){var Ia=y.getElementsByTagName("head")[0]||y.documentElement,Ka=y.createElement("script");Ka.src=D.url;if(D.scriptCharset)Ka.charset=D.scriptCharset;if(!V){var Ma=false;Ka.onload=Ka.onreadystatechange=function(){if(!Ma&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){Ma=true;x();A();Ka.onload=Ka.onreadystatechange=null;Ia&&Ka.parentNode&&Ia.removeChild(Ka)}}}Ia.insertBefore(Ka,Ia.firstChild);
return c}var Pa=false,Ba=D.xhr();if(Ba){D.username?Ba.open(ga,D.url,D.async,D.username,D.password):Ba.open(ga,D.url,D.async);try{if(D.data||m&&m.contentType)Ba.setRequestHeader("Content-Type",D.contentType);if(D.ifModified){h.lastModified[D.url]&&Ba.setRequestHeader("If-Modified-Since",h.lastModified[D.url]);h.etag[D.url]&&Ba.setRequestHeader("If-None-Match",h.etag[D.url])}wa||Ba.setRequestHeader("X-Requested-With","XMLHttpRequest");Ba.setRequestHeader("Accept",D.dataType&&D.accepts[D.dataType]?D.accepts[D.dataType]+
", */*":D.accepts._default)}catch(Za){}if(D.beforeSend&&D.beforeSend.call(ia,Ba,D)===false){D.global&&!--h.active&&h.event.trigger("ajaxStop");Ba.abort();return false}D.global&&E("ajaxSend",[Ba,D]);var M=Ba.onreadystatechange=function(pa){if(!Ba||Ba.readyState===0||pa==="abort"){Pa||A();Pa=true;if(Ba)Ba.onreadystatechange=h.noop}else if(!Pa&&Ba&&(Ba.readyState===4||pa==="timeout")){Pa=true;Ba.onreadystatechange=h.noop;Z=pa==="timeout"?"timeout":!h.httpSuccess(Ba)?"error":D.ifModified&&h.httpNotModified(Ba,
D.url)?"notmodified":"success";var na;if(Z==="success")try{ha=h.httpData(Ba,D.dataType,D)}catch(ya){Z="parsererror";na=ya}if(Z==="success"||Z==="notmodified")V||x();else h.handleError(D,Ba,Z,na);A();pa==="timeout"&&Ba.abort();if(D.async)Ba=null}};try{var T=Ba.abort;Ba.abort=function(){Ba&&T.call(Ba);M("abort")}}catch(da){}D.async&&D.timeout>0&&setTimeout(function(){Ba&&!Pa&&M("timeout")},D.timeout);try{Ba.send(ga==="POST"||ga==="PUT"||ga==="DELETE"?D.data:null)}catch(fa){h.handleError(D,Ba,null,fa);
A()}D.async||M();return Ba}},handleError:function(m,x,A,E){if(m.error)m.error.call(m.context||m,x,A,E);if(m.global)(m.context?h(m.context):h.event).trigger("ajaxError",[x,m,E])},active:0,httpSuccess:function(m){try{return!m.status&&location.protocol==="file:"||m.status>=200&&m.status<300||m.status===304||m.status===1223||m.status===0}catch(x){}return false},httpNotModified:function(m,x){var A=m.getResponseHeader("Last-Modified"),E=m.getResponseHeader("Etag");if(A)h.lastModified[x]=A;if(E)h.etag[x]=
E;return m.status===304||m.status===0},httpData:function(m,x,A){var E=m.getResponseHeader("content-type")||"",D=x==="xml"||!x&&E.indexOf("xml")>=0;m=D?m.responseXML:m.responseText;D&&m.documentElement.nodeName==="parsererror"&&h.error("parsererror");if(A&&A.dataFilter)m=A.dataFilter(m,x);if(typeof m==="string")if(x==="json"||!x&&E.indexOf("json")>=0)m=h.parseJSON(m);else if(x==="script"||!x&&E.indexOf("javascript")>=0)h.globalEval(m);return m},param:function(m,x){function A(Z,ha){if(h.isArray(ha))h.each(ha,
function(ia,ga){x?E(Z,ga):A(Z+"["+(typeof ga==="object"||h.isArray(ga)?ia:"")+"]",ga)});else!x&&ha!=null&&typeof ha==="object"?h.each(ha,function(ia,ga){A(Z+"["+ia+"]",ga)}):E(Z,ha)}function E(Z,ha){ha=h.isFunction(ha)?ha():ha;D[D.length]=encodeURIComponent(Z)+"="+encodeURIComponent(ha)}var D=[];if(x===c)x=h.ajaxSettings.traditional;if(h.isArray(m)||m.jquery)h.each(m,function(){E(this.name,this.value)});else for(var V in m)A(V,m[V]);return D.join("&").replace(zb,"+")}});var db={},Ab=/toggle|show|hide/,
Bb=/^([+-]=)?([\d+-.]+)(.*)$/,Ya,fb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];h.fn.extend({show:function(m,x){if(m||m===0)return this.animate(n("show",3),m,x);else{m=0;for(x=this.length;m<x;m++){var A=h.data(this[m],"olddisplay");this[m].style.display=A||"";if(h.css(this[m],"display")==="none"){A=this[m].nodeName;var E;if(db[A])E=db[A];else{var D=h("<"+A+" />").appendTo("body");E=D.css("display");
if(E==="none")E="block";D.remove();db[A]=E}h.data(this[m],"olddisplay",E)}}m=0;for(x=this.length;m<x;m++)this[m].style.display=h.data(this[m],"olddisplay")||"";return this}},hide:function(m,x){if(m||m===0)return this.animate(n("hide",3),m,x);else{m=0;for(x=this.length;m<x;m++){var A=h.data(this[m],"olddisplay");!A&&A!=="none"&&h.data(this[m],"olddisplay",h.css(this[m],"display"))}m=0;for(x=this.length;m<x;m++)this[m].style.display="none";return this}},_toggle:h.fn.toggle,toggle:function(m,x){var A=
typeof m==="boolean";if(h.isFunction(m)&&h.isFunction(x))this._toggle.apply(this,arguments);else m==null||A?this.each(function(){var E=A?m:h(this).is(":hidden");h(this)[E?"show":"hide"]()}):this.animate(n("toggle",3),m,x);return this},fadeTo:function(m,x,A){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:x},m,A)},animate:function(m,x,A,E){var D=h.speed(x,A,E);if(h.isEmptyObject(m))return this.each(D.complete);return this[D.queue===false?"each":"queue"](function(){var V=
h.extend({},D),Z,ha=this.nodeType===1&&h(this).is(":hidden"),ia=this;for(Z in m){var ga=Z.replace(ab,bb);if(Z!==ga){m[ga]=m[Z];delete m[Z];Z=ga}if(m[Z]==="hide"&&ha||m[Z]==="show"&&!ha)return V.complete.call(this);if((Z==="height"||Z==="width")&&this.style){V.display=h.css(this,"display");V.overflow=this.style.overflow}if(h.isArray(m[Z])){(V.specialEasing=V.specialEasing||{})[Z]=m[Z][1];m[Z]=m[Z][0]}}if(V.overflow!=null)this.style.overflow="hidden";V.curAnim=h.extend({},m);h.each(m,function(wa,Ca){var Ia=
new h.fx(ia,V,wa);if(Ab.test(Ca))Ia[Ca==="toggle"?ha?"show":"hide":Ca](m);else{var Ka=Bb.exec(Ca),Ma=Ia.cur(true)||0;if(Ka){Ca=parseFloat(Ka[2]);var Pa=Ka[3]||"px";if(Pa!=="px"){ia.style[wa]=(Ca||1)+Pa;Ma=(Ca||1)/Ia.cur(true)*Ma;ia.style[wa]=Ma+Pa}if(Ka[1])Ca=(Ka[1]==="-="?-1:1)*Ca+Ma;Ia.custom(Ma,Ca,Pa)}else Ia.custom(Ma,Ca,"")}});return true})},stop:function(m,x){var A=h.timers;m&&this.queue([]);this.each(function(){for(var E=A.length-1;E>=0;E--)if(A[E].elem===this){x&&A[E](true);A.splice(E,1)}});
x||this.dequeue();return this}});h.each({slideDown:n("show",1),slideUp:n("hide",1),slideToggle:n("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(m,x){h.fn[m]=function(A,E){return this.animate(x,A,E)}});h.extend({speed:function(m,x,A){var E=m&&typeof m==="object"?m:{complete:A||!A&&x||h.isFunction(m)&&m,duration:m,easing:A&&x||x&&!h.isFunction(x)&&x};E.duration=h.fx.off?0:typeof E.duration==="number"?E.duration:h.fx.speeds[E.duration]||h.fx.speeds._default;E.old=E.complete;E.complete=
function(){E.queue!==false&&h(this).dequeue();h.isFunction(E.old)&&E.old.call(this)};return E},easing:{linear:function(m,x,A,E){return A+E*m},swing:function(m,x,A,E){return(-Math.cos(m*Math.PI)/2+0.5)*E+A}},timers:[],fx:function(m,x,A){this.options=x;this.elem=m;this.prop=A;if(!x.orig)x.orig={}}});h.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(h.fx.step[this.prop]||h.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display=
"block"},cur:function(m){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(m=parseFloat(h.css(this.elem,this.prop,m)))&&m>-10000?m:parseFloat(h.curCSS(this.elem,this.prop))||0},custom:function(m,x,A){function E(V){return D.step(V)}this.startTime=g();this.start=m;this.end=x;this.unit=A||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;E.elem=this.elem;if(E()&&h.timers.push(E)&&!Ya)Ya=setInterval(h.fx.tick,13)},
show:function(){this.options.orig[this.prop]=h.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());h(this.elem).show()},hide:function(){this.options.orig[this.prop]=h.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(m){var x=g(),A=true;if(m||x>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var E in this.options.curAnim)if(this.options.curAnim[E]!==
true)A=false;if(A){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;m=h.data(this.elem,"olddisplay");this.elem.style.display=m?m:this.options.display;if(h.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&h(this.elem).hide();if(this.options.hide||this.options.show)for(var D in this.options.curAnim)h.style(this.elem,D,this.options.orig[D]);this.options.complete.call(this.elem)}return false}else{D=x-this.startTime;this.state=D/this.options.duration;
m=this.options.easing||(h.easing.swing?"swing":"linear");this.pos=h.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||m](this.state,D,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};h.extend(h.fx,{tick:function(){for(var m=h.timers,x=0;x<m.length;x++)m[x]()||m.splice(x--,1);m.length||h.fx.stop()},stop:function(){clearInterval(Ya);Ya=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(m){h.style(m.elem,
"opacity",m.now)},_default:function(m){if(m.elem.style&&m.elem.style[m.prop]!=null)m.elem.style[m.prop]=(m.prop==="width"||m.prop==="height"?Math.max(0,m.now):m.now)+m.unit;else m.elem[m.prop]=m.now}}});if(h.expr&&h.expr.filters)h.expr.filters.animated=function(m){return h.grep(h.timers,function(x){return m===x.elem}).length};h.fn.offset="getBoundingClientRect"in y.documentElement?function(m){var x=this[0];if(m)return this.each(function(D){h.offset.setOffset(this,m,D)});if(!x||!x.ownerDocument)return null;
if(x===x.ownerDocument.body)return h.offset.bodyOffset(x);var A=x.getBoundingClientRect(),E=x.ownerDocument;x=E.body;E=E.documentElement;return{top:A.top+(self.pageYOffset||h.support.boxModel&&E.scrollTop||x.scrollTop)-(E.clientTop||x.clientTop||0),left:A.left+(self.pageXOffset||h.support.boxModel&&E.scrollLeft||x.scrollLeft)-(E.clientLeft||x.clientLeft||0)}}:function(m){var x=this[0];if(m)return this.each(function(wa){h.offset.setOffset(this,m,wa)});if(!x||!x.ownerDocument)return null;if(x===x.ownerDocument.body)return h.offset.bodyOffset(x);
h.offset.initialize();var A=x.offsetParent,E=x,D=x.ownerDocument,V,Z=D.documentElement,ha=D.body;E=(D=D.defaultView)?D.getComputedStyle(x,null):x.currentStyle;for(var ia=x.offsetTop,ga=x.offsetLeft;(x=x.parentNode)&&x!==ha&&x!==Z;){if(h.offset.supportsFixedPosition&&E.position==="fixed")break;V=D?D.getComputedStyle(x,null):x.currentStyle;ia-=x.scrollTop;ga-=x.scrollLeft;if(x===A){ia+=x.offsetTop;ga+=x.offsetLeft;if(h.offset.doesNotAddBorder&&!(h.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(x.nodeName))){ia+=
parseFloat(V.borderTopWidth)||0;ga+=parseFloat(V.borderLeftWidth)||0}E=A;A=x.offsetParent}if(h.offset.subtractsBorderForOverflowNotVisible&&V.overflow!=="visible"){ia+=parseFloat(V.borderTopWidth)||0;ga+=parseFloat(V.borderLeftWidth)||0}E=V}if(E.position==="relative"||E.position==="static"){ia+=ha.offsetTop;ga+=ha.offsetLeft}if(h.offset.supportsFixedPosition&&E.position==="fixed"){ia+=Math.max(Z.scrollTop,ha.scrollTop);ga+=Math.max(Z.scrollLeft,ha.scrollLeft)}return{top:ia,left:ga}};h.offset={initialize:function(){var m=
y.body,x=y.createElement("div"),A,E,D,V=parseFloat(h.curCSS(m,"marginTop",true))||0;h.extend(x.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});x.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
m.insertBefore(x,m.firstChild);A=x.firstChild;E=A.firstChild;D=A.nextSibling.firstChild.firstChild;this.doesNotAddBorder=E.offsetTop!==5;this.doesAddBorderForTableAndCells=D.offsetTop===5;E.style.position="fixed";E.style.top="20px";this.supportsFixedPosition=E.offsetTop===20||E.offsetTop===15;E.style.position=E.style.top="";A.style.overflow="hidden";A.style.position="relative";this.subtractsBorderForOverflowNotVisible=E.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=m.offsetTop!==V;m.removeChild(x);
h.offset.initialize=h.noop},bodyOffset:function(m){var x=m.offsetTop,A=m.offsetLeft;h.offset.initialize();if(h.offset.doesNotIncludeMarginInBodyOffset){x+=parseFloat(h.curCSS(m,"marginTop",true))||0;A+=parseFloat(h.curCSS(m,"marginLeft",true))||0}return{top:x,left:A}},setOffset:function(m,x,A){if(/static/.test(h.curCSS(m,"position")))m.style.position="relative";var E=h(m),D=E.offset(),V=parseInt(h.curCSS(m,"top",true),10)||0,Z=parseInt(h.curCSS(m,"left",true),10)||0;if(h.isFunction(x))x=x.call(m,
A,D);A={top:x.top-D.top+V,left:x.left-D.left+Z};"using"in x?x.using.call(m,A):E.css(A)}};h.fn.extend({position:function(){if(!this[0])return null;var m=this[0],x=this.offsetParent(),A=this.offset(),E=/^body|html$/i.test(x[0].nodeName)?{top:0,left:0}:x.offset();A.top-=parseFloat(h.curCSS(m,"marginTop",true))||0;A.left-=parseFloat(h.curCSS(m,"marginLeft",true))||0;E.top+=parseFloat(h.curCSS(x[0],"borderTopWidth",true))||0;E.left+=parseFloat(h.curCSS(x[0],"borderLeftWidth",true))||0;return{top:A.top-
E.top,left:A.left-E.left}},offsetParent:function(){return this.map(function(){for(var m=this.offsetParent||y.body;m&&!/^body|html$/i.test(m.nodeName)&&h.css(m,"position")==="static";)m=m.offsetParent;return m})}});h.each(["Left","Top"],function(m,x){var A="scroll"+x;h.fn[A]=function(E){var D=this[0],V;if(!D)return null;return E!==c?this.each(function(){if(V=u(this))V.scrollTo(!m?E:h(V).scrollLeft(),m?E:h(V).scrollTop());else this[A]=E}):(V=u(D))?"pageXOffset"in V?V[m?"pageYOffset":"pageXOffset"]:
h.support.boxModel&&V.document.documentElement[A]||V.document.body[A]:D[A]}});h.each(["Height","Width"],function(m,x){var A=x.toLowerCase();h.fn["inner"+x]=function(){return this[0]?h.css(this[0],A,false,"padding"):null};h.fn["outer"+x]=function(E){return this[0]?h.css(this[0],A,false,E?"margin":"border"):null};h.fn[A]=function(E){var D=this[0];if(!D)return E==null?null:this;if(h.isFunction(E))return this.each(function(V){var Z=h(this);Z[A](E.call(this,V,Z[A]()))});return"scrollTo"in D&&D.document?
D.document.compatMode==="CSS1Compat"&&D.document.documentElement["client"+x]||D.document.body["client"+x]:D.nodeType===9?Math.max(D.documentElement["client"+x],D.body["scroll"+x],D.documentElement["scroll"+x],D.body["offset"+x],D.documentElement["offset"+x]):E===c?h.css(D,A):this.css(A,typeof E==="string"?E:E+"px")}});a.jQuery=h})(window);
(function(a){a.fn.hitTest=function(c,e,f,d){f=f||0;d=d||0;var g=function(r){return Math.ceil(r)},j=this,k=j.offset(),l=g(k.left);k=g(k.top);f=g(j.innerWidth()+f);d=g(j.innerHeight()+d);g=l+f;d=k+d;return c>=l&&c<=g&&e>=k&&e<=d}})(jQuery);(function(a){function c(){var e=(this.attr("href")||"").split("#");if(!e[1])return null;return a("#"+e[1])}a.fn.extend({findAnchor:c})})(jQuery);
jQuery.cookie=function(a,c,e){if(typeof c!="undefined"){e=e||{};if(c===null){c="";e.expires=-1}var f="";if(e.expires&&(typeof e.expires=="number"||e.expires.toUTCString)){if(typeof e.expires=="number"){f=new Date;f.setTime(f.getTime()+e.expires*24*60*60*1E3)}else f=e.expires;f="; expires="+f.toUTCString()}var d=e.path?"; path="+e.path:"",g=e.domain?"; domain="+e.domain:"";e=e.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(c),f,d,g,e].join("")}else{c=null;if(document.cookie&&document.cookie!=
""){e=document.cookie.split(";");for(f=0;f<e.length;f++){d=jQuery.trim(e[f]);if(d.substring(0,a.length+1)==a+"="){c=decodeURIComponent(d.substring(a.length+1));break}}}return c}};
(function(a){a.fn.bgIframe=a.fn.bgiframe=function(c){if(a.browser.msie&&/6.0/.test(navigator.userAgent)){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var e=function(d){return d&&d.constructor==Number?d+"px":d},f='<iframe class="bbgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
e(c.top))+";left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":e(c.left))+";width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":e(c.width))+";height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":e(c.height))+';"/>';return this.each(function(){a("> iframe.bbgiframe",this).length==0&&this.insertBefore(document.createElement(f),this.firstChild)})}return this}})(jQuery);
(function(a){a.fn.bgMouseDown=function(c,e,f){function d(k){if(!j.hitTest(k.pageX,k.pageY,e,f)){c.apply(j,[k]);g.unbind("mousedown",d);return false}}var g=a("body"),j=this;g.bind("mousedown",d)}})(jQuery);
jQuery.ui||function(a){a.browser.mozilla&&parseFloat(a.browser.version);a.ui={version:"@VERSION",plugin:{add:function(c,e,f){c=a.ui[c].prototype;for(var d in f){c.plugins[d]=c.plugins[d]||[];c.plugins[d].push([e,f[d]])}},call:function(c,e,f){if((e=c.plugins[e])&&c.element[0].parentNode)for(var d=0;d<e.length;d++)c.options[e[d][0]]&&e[d][1].apply(c.element,f)}},contains:function(c,e){return document.compareDocumentPosition?c.compareDocumentPosition(e)&16:c!==e&&c.contains(e)},hasScroll:function(c,
e){if(a(c).css("overflow")=="hidden")return false;e=e&&e=="left"?"scrollLeft":"scrollTop";var f=false;if(c[e]>0)return true;c[e]=1;f=c[e]>0;c[e]=0;return f},isOverAxis:function(c,e,f){return c>e&&c<e+f},isOver:function(c,e,f,d,g,j){return a.ui.isOverAxis(c,f,g)&&a.ui.isOverAxis(e,d,j)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};a.fn.extend({_focus:a.fn.focus,focus:function(c,e){return typeof c==="number"?this.each(function(){var f=this;setTimeout(function(){a(f).focus();e&&e.call(f)},c)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",
function(){return false})},scrollParent:function(){var c;c=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,
"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?a(document):c},zIndex:function(c){if(c!==undefined)return this.css("zIndex",c);if(this.length){c=a(this[0]);for(var e;c.length&&c[0]!==document;){e=c.css("position");if(e=="absolute"||e=="relative"||e=="fixed"){e=parseInt(c.css("zIndex"));if(!isNaN(e)&&e!=0)return e}c=c.parent()}}return 0}});a.extend(a.expr[":"],{data:function(c,e,f){return!!a.data(c,f[3])},focusable:function(c){var e=c.nodeName.toLowerCase(),f=a.attr(c,
"tabindex");return(/input|select|textarea|button|object/.test(e)?!c.disabled:"a"==e||"area"==e?c.href||!isNaN(f):!isNaN(f))&&!a(c)["area"==e?"parents":"closest"](":hidden").length},tabbable:function(c){var e=a.attr(c,"tabindex");return(isNaN(e)||e>=0)&&a(c).is(":focusable")}})}(jQuery);
(function(a){var c=a.fn.remove;a.fn.remove=function(e,f){return this.each(function(){if(!f)if(!e||a.filter(e,[this]).length)a("*",this).add(this).each(function(){a(this).triggerHandler("remove")});return c.call(a(this),e,f)})};a.widget=function(e,f,d){var g=e.split(".")[0],j;e=e.split(".")[1];j=g+"-"+e;if(!d){d=f;f=a.Widget}a.expr[":"][j]=function(k){return!!a.data(k,e)};a[g]=a[g]||{};a[g][e]=function(k,l){arguments.length&&this._createWidget(k,l)};f=new f;f.options=a.extend({},f.options);a[g][e].prototype=
a.extend(true,f,{namespace:g,widgetName:e,widgetEventPrefix:a[g][e].prototype.widgetEventPrefix||e,widgetBaseClass:j},d);a.widget.bridge(e,a[g][e])};a.widget.bridge=function(e,f){a.fn[e]=function(d){var g=typeof d==="string",j=Array.prototype.slice.call(arguments,1),k=this;d=!g&&j.length?a.extend.apply(null,[true,d].concat(j)):d;if(g&&d.substring(0,1)==="_")return k;g?this.each(function(){var l=a.data(this,e),r=l&&a.isFunction(l[d])?l[d].apply(l,j):l;if(r!==l&&r!==undefined){k=r;return false}}):this.each(function(){var l=
a.data(this,e);if(l){d&&l.option(d);l._init()}else a.data(this,e,new f(d,this))});return k}};a.Widget=function(e,f){arguments.length&&this._createWidget(e,f)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(e,f){this.element=a(f).data(this.widgetName,this);this.options=a.extend(true,{},this.options,a.metadata&&a.metadata.get(f)[this.widgetName],e);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();
this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled")},widget:function(){return this.element},option:function(e,f){var d=e,g=this;if(arguments.length===0)return a.extend({},g.options);if(typeof e==="string"){if(f===undefined)return this.options[e];d={};d[e]=f}a.each(d,
function(j,k){g._setOption(j,k)});return g},_setOption:function(e,f){this.options[e]=f;if(e==="disabled")this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",f);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,d){var g=this.options[e];f=a.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();
d=d||{};if(f.originalEvent){e=a.event.props.length;for(var j;e;){j=a.event.props[--e];f[j]=f.originalEvent[j]}}this.element.trigger(f,d);return!(a.isFunction(g)&&g.call(this.element[0],f,d)===false||f.isDefaultPrevented())}}})(jQuery);
(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(e){return c._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(c._preventClickEvent){c._preventClickEvent=false;e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(c){c.originalEvent=c.originalEvent||{};if(!c.originalEvent.mouseHandled){this._mouseStarted&&
this._mouseUp(c);this._mouseDownEvent=c;var e=this,f=c.which==1,d=typeof this.options.cancel=="string"?a(c.target).parents().add(c.target).filter(this.options.cancel).length:false;if(!f||d||!this._mouseCapture(c))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=this._mouseStart(c)!==false;if(!this._mouseStarted){c.preventDefault();
return true}}this._mouseMoveDelegate=function(g){return e._mouseMove(g)};this._mouseUpDelegate=function(g){return e._mouseUp(g)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.browser.safari||c.preventDefault();return c.originalEvent.mouseHandled=true}},_mouseMove:function(c){if(a.browser.msie&&!c.button)return this._mouseUp(c);if(this._mouseStarted){this._mouseDrag(c);return c.preventDefault()}if(this._mouseDistanceMet(c)&&
this._mouseDelayMet(c))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==false)?this._mouseDrag(c):this._mouseUp(c);return!this._mouseStarted},_mouseUp:function(c){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=c.target==this._mouseDownEvent.target;this._mouseStop(c)}return false},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-
c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(c){var e=
this.options;if(this.helper||e.disabled||a(c.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(c);if(!this.handle)return false;return true},_mouseStart:function(c){var e=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(a.ui.ddmanager)a.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt);e.containment&&this._setContainment();if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions();
a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);return true},_mouseDrag:function(c,e){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!e){e=this._uiHash();if(this._trigger("drag",c,e)===false){this._mouseUp({});return false}this.position=e.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,c);return false},_mouseStop:function(c){var e=false;if(a.ui.ddmanager&&!this.options.dropBehaviour)e=a.ui.ddmanager.drop(this,c);if(this.dropped){e=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!e||this.options.revert=="valid"&&e||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,
e)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",c)!==false&&f._clear()})}else this._trigger("stop",c)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(c){var e=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
c.target)e=true});return e},_createHelper:function(c){var e=this.options;c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],[c])):e.helper=="clone"?this.element.clone():this.element;c.parents("body").length||c.appendTo(e.appendTo=="parent"?this.element[0].parentNode:e.appendTo);c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string")c=c.split(" ");if(a.isArray(c))c={left:+c[0],top:+c[1]||
0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],
this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c=this.options;if(c.containment==
"parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)&&
c.containment.constructor!=Array){var e=a(c.containment)[0];if(e){c=a(c.containment).offset();var f=a(e).css("overflow")!="hidden";this.containment=[c.left+(parseInt(a(e).css("borderLeftWidth"),10)||0)+(parseInt(a(e).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(e).css("borderTopWidth"),10)||0)+(parseInt(a(e).css("paddingTop"),10)||0)-this.margins.top,c.left+(f?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(a(e).css("borderLeftWidth"),10)||0)-(parseInt(a(e).css("paddingRight"),
10)||0)-this.helperProportions.width-this.margins.left,c.top+(f?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(a(e).css("borderTopWidth"),10)||0)-(parseInt(a(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(c.containment.constructor==Array)this.containment=c.containment},_convertPositionTo:function(c,e){if(!e)e=this.position;c=c=="absolute"?1:-1;var f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],
this.offsetParent[0]))?this.offsetParent:this.scrollParent,d=/(html|body)/i.test(f[0].tagName);return{top:e.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():d?0:f.scrollTop())*c),left:e.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
d?0:f.scrollLeft())*c)}},_generatePosition:function(c){var e=this.options,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,d=/(html|body)/i.test(f[0].tagName),g=c.pageX,j=c.pageY;if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.left<this.containment[0])g=this.containment[0]+this.offset.click.left;if(c.pageY-this.offset.click.top<this.containment[1])j=this.containment[1]+
this.offset.click.top;if(c.pageX-this.offset.click.left>this.containment[2])g=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])j=this.containment[3]+this.offset.click.top}if(e.grid){j=this.originalPageY+Math.round((j-this.originalPageY)/e.grid[1])*e.grid[1];j=this.containment?!(j-this.offset.click.top<this.containment[1]||j-this.offset.click.top>this.containment[3])?j:!(j-this.offset.click.top<this.containment[1])?j-e.grid[1]:j+e.grid[1]:j;g=this.originalPageX+
Math.round((g-this.originalPageX)/e.grid[0])*e.grid[0];g=this.containment?!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:!(g-this.offset.click.left<this.containment[0])?g-e.grid[0]:g+e.grid[0]:g}}return{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():d?0:f.scrollTop()),left:g-this.offset.click.left-
this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():d?0:f.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(c,e,f){f=f||this._uiHash();a.ui.plugin.call(this,c,[e,f]);if(c=="drag")this.positionAbs=
this._convertPositionTo("absolute");return a.Widget.prototype._trigger.call(this,c,e,f)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"@VERSION"});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var f=a(this).data("draggable"),d=f.options,g=a.extend({},e,{item:f.element});f.sortables=[];a(d.connectToSortable).each(function(){var j=a.data(this,"sortable");
if(j&&!j.options.disabled){f.sortables.push({instance:j,shouldRevert:j.options.revert});j._refreshItems();j._trigger("activate",c,g)}})},stop:function(c,e){var f=a(this).data("draggable"),d=a.extend({},e,{item:f.element});a.each(f.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;f.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;
f.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,d)}})},drag:function(c,e){var f=a(this).data("draggable"),d=this;a.each(f.sortables,function(){this.instance.positionAbs=f.positionAbs;this.instance.helperProportions=f.helperProportions;this.instance.offset.click=f.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=
1;this.instance.currentItem=a(d).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return e.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=f.offset.click.top;this.instance.offset.click.left=f.offset.click.left;this.instance.offset.parent.left-=f.offset.parent.left-this.instance.offset.parent.left;
this.instance.offset.parent.top-=f.offset.parent.top-this.instance.offset.parent.top;f._trigger("toSortable",c);f.dropped=this.instance.element;f.currentItem=f.element;this.instance.fromOutside=f}this.instance.currentItem&&this.instance._mouseDrag(c)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=
this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();f._trigger("fromSortable",c);f.dropped=false}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var c=a("body"),e=a(this).data("draggable").options;if(c.css("cursor"))e._cursor=c.css("cursor");c.css("cursor",e.cursor)},stop:function(){var c=a(this).data("draggable").options;c._cursor&&a("body").css("cursor",c._cursor)}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var c=
a(this).data("draggable").options;a(c.iframeFix===true?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(a(this).offset()).appendTo("body")})},stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,e){c=a(e.helper);e=a(this).data("draggable").options;
if(c.css("opacity"))e._opacity=c.css("opacity");c.css("opacity",e.opacity)},stop:function(c,e){c=a(this).data("draggable").options;c._opacity&&a(e.helper).css("opacity",c._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var c=a(this).data("draggable");if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML")c.overflowOffset=c.scrollParent.offset()},drag:function(c){var e=a(this).data("draggable"),f=e.options,d=false;if(e.scrollParent[0]!=document&&e.scrollParent[0].tagName!=
"HTML"){if(!f.axis||f.axis!="x")if(e.overflowOffset.top+e.scrollParent[0].offsetHeight-c.pageY<f.scrollSensitivity)e.scrollParent[0].scrollTop=d=e.scrollParent[0].scrollTop+f.scrollSpeed;else if(c.pageY-e.overflowOffset.top<f.scrollSensitivity)e.scrollParent[0].scrollTop=d=e.scrollParent[0].scrollTop-f.scrollSpeed;if(!f.axis||f.axis!="y")if(e.overflowOffset.left+e.scrollParent[0].offsetWidth-c.pageX<f.scrollSensitivity)e.scrollParent[0].scrollLeft=d=e.scrollParent[0].scrollLeft+f.scrollSpeed;else if(c.pageX-
e.overflowOffset.left<f.scrollSensitivity)e.scrollParent[0].scrollLeft=d=e.scrollParent[0].scrollLeft-f.scrollSpeed}else{if(!f.axis||f.axis!="x")if(c.pageY-a(document).scrollTop()<f.scrollSensitivity)d=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed);else if(a(window).height()-(c.pageY-a(document).scrollTop())<f.scrollSensitivity)d=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed);if(!f.axis||f.axis!="y")if(c.pageX-a(document).scrollLeft()<f.scrollSensitivity)d=a(document).scrollLeft(a(document).scrollLeft()-
f.scrollSpeed);else if(a(window).width()-(c.pageX-a(document).scrollLeft())<f.scrollSensitivity)d=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}d!==false&&a.ui.ddmanager&&!f.dropBehaviour&&a.ui.ddmanager.prepareOffsets(e,c)}});a.ui.plugin.add("draggable","snap",{start:function(){var c=a(this).data("draggable"),e=c.options;c.snapElements=[];a(e.snap.constructor!=String?e.snap.items||":data(draggable)":e.snap).each(function(){var f=a(this),d=f.offset();this!=c.element[0]&&c.snapElements.push({item:this,
width:f.outerWidth(),height:f.outerHeight(),top:d.top,left:d.left})})},drag:function(c,e){for(var f=a(this).data("draggable"),d=f.options,g=d.snapTolerance,j=e.offset.left,k=j+f.helperProportions.width,l=e.offset.top,r=l+f.helperProportions.height,t=f.snapElements.length-1;t>=0;t--){var q=f.snapElements[t].left,p=q+f.snapElements[t].width,o=f.snapElements[t].top,n=o+f.snapElements[t].height;if(q-g<j&&j<p+g&&o-g<l&&l<n+g||q-g<j&&j<p+g&&o-g<r&&r<n+g||q-g<k&&k<p+g&&o-g<l&&l<n+g||q-g<k&&k<p+g&&o-g<r&&
r<n+g){if(d.snapMode!="inner"){var u=Math.abs(o-r)<=g,h=Math.abs(n-l)<=g,s=Math.abs(q-k)<=g,v=Math.abs(p-j)<=g;if(u)e.position.top=f._convertPositionTo("relative",{top:o-f.helperProportions.height,left:0}).top-f.margins.top;if(h)e.position.top=f._convertPositionTo("relative",{top:n,left:0}).top-f.margins.top;if(s)e.position.left=f._convertPositionTo("relative",{top:0,left:q-f.helperProportions.width}).left-f.margins.left;if(v)e.position.left=f._convertPositionTo("relative",{top:0,left:p}).left-f.margins.left}var y=
u||h||s||v;if(d.snapMode!="outer"){u=Math.abs(o-l)<=g;h=Math.abs(n-r)<=g;s=Math.abs(q-j)<=g;v=Math.abs(p-k)<=g;if(u)e.position.top=f._convertPositionTo("relative",{top:o,left:0}).top-f.margins.top;if(h)e.position.top=f._convertPositionTo("relative",{top:n-f.helperProportions.height,left:0}).top-f.margins.top;if(s)e.position.left=f._convertPositionTo("relative",{top:0,left:q}).left-f.margins.left;if(v)e.position.left=f._convertPositionTo("relative",{top:0,left:p-f.helperProportions.width}).left-f.margins.left}if(!f.snapElements[t].snapping&&
(u||h||s||v||y))f.options.snap.snap&&f.options.snap.snap.call(f.element,c,a.extend(f._uiHash(),{snapItem:f.snapElements[t].item}));f.snapElements[t].snapping=u||h||s||v||y}else{f.snapElements[t].snapping&&f.options.snap.release&&f.options.snap.release.call(f.element,c,a.extend(f._uiHash(),{snapItem:f.snapElements[t].item}));f.snapElements[t].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var c=a(this).data("draggable").options;c=a.makeArray(a(c.stack)).sort(function(f,d){return(parseInt(a(f).css("zIndex"),
10)||0)-(parseInt(a(d).css("zIndex"),10)||0)});if(c.length){var e=parseInt(c[0].style.zIndex)||0;a(c).each(function(f){this.style.zIndex=e+f});this[0].style.zIndex=e+c.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(c,e){c=a(e.helper);e=a(this).data("draggable").options;if(c.css("zIndex"))e._zIndex=c.css("zIndex");c.css("zIndex",e.zIndex)},stop:function(c,e){c=a(this).data("draggable").options;c._zIndex&&a(e.helper).css("zIndex",c._zIndex)}})})(jQuery);
(function(a){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var c=this.options,e=c.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(e)?e:function(f){return f.is(e)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[c.scope]=a.ui.ddmanager.droppables[c.scope]||[];a.ui.ddmanager.droppables[c.scope].push(this);
c.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var c=a.ui.ddmanager.droppables[this.options.scope],e=0;e<c.length;e++)c[e]==this&&c.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(c,e){if(c=="accept")this.accept=a.isFunction(e)?e:function(f){return f.is(e)};a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(c){var e=a.ui.ddmanager.current;this.options.activeClass&&
this.element.addClass(this.options.activeClass);e&&this._trigger("activate",c,this.ui(e))},_deactivate:function(c){var e=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);e&&this._trigger("deactivate",c,this.ui(e))},_over:function(c){var e=a.ui.ddmanager.current;if(!(!e||(e.currentItem||e.element)[0]==this.element[0]))if(this.accept.call(this.element[0],e.currentItem||e.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
this._trigger("over",c,this.ui(e))}},_out:function(c){var e=a.ui.ddmanager.current;if(!(!e||(e.currentItem||e.element)[0]==this.element[0]))if(this.accept.call(this.element[0],e.currentItem||e.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",c,this.ui(e))}},_drop:function(c,e){var f=e||a.ui.ddmanager.current;if(!f||(f.currentItem||f.element)[0]==this.element[0])return false;var d=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
a.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==f.options.scope&&g.accept.call(g.element[0],f.currentItem||f.element)&&a.ui.intersect(f,a.extend(g,{offset:g.element.offset()}),g.options.tolerance)){d=true;return false}});if(d)return false;if(this.accept.call(this.element[0],f.currentItem||f.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
c,this.ui(f));return this.element}return false},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}}});a.extend(a.ui.droppable,{version:"@VERSION"});a.ui.intersect=function(c,e,f){if(!e.offset)return false;var d=(c.positionAbs||c.position.absolute).left,g=d+c.helperProportions.width,j=(c.positionAbs||c.position.absolute).top,k=j+c.helperProportions.height,l=e.offset.left,r=l+e.proportions.width,t=e.offset.top,q=t+e.proportions.height;
switch(f){case "fit":return l<d&&g<r&&t<j&&k<q;case "intersect":return l<d+c.helperProportions.width/2&&g-c.helperProportions.width/2<r&&t<j+c.helperProportions.height/2&&k-c.helperProportions.height/2<q;case "pointer":return a.ui.isOver((c.positionAbs||c.position.absolute).top+(c.clickOffset||c.offset.click).top,(c.positionAbs||c.position.absolute).left+(c.clickOffset||c.offset.click).left,t,l,e.proportions.height,e.proportions.width);case "touch":return(j>=t&&j<=q||k>=t&&k<=q||j<t&&k>q)&&(d>=l&&
d<=r||g>=l&&g<=r||d<l&&g>r);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(c,e){var f=a.ui.ddmanager.droppables[c.options.scope]||[],d=e?e.type:null,g=(c.currentItem||c.element).find(":data(droppable)").andSelf(),j=0;a:for(;j<f.length;j++)if(!(f[j].options.disabled||c&&!f[j].accept.call(f[j].element[0],c.currentItem||c.element))){for(var k=0;k<g.length;k++)if(g[k]==f[j].element[0]){f[j].proportions.height=0;continue a}f[j].visible=f[j].element.css("display")!=
"none";if(f[j].visible){f[j].offset=f[j].element.offset();f[j].proportions={width:f[j].element[0].offsetWidth,height:f[j].element[0].offsetHeight};d=="mousedown"&&f[j]._activate.call(f[j],e)}}},drop:function(c,e){var f=false;a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(c,this,this.options.tolerance))f=f||this._drop.call(this,e);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],c.currentItem||
c.element)){this.isout=1;this.isover=0;this._deactivate.call(this,e)}}});return f},drag:function(c,e){c.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(c,e);a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var f=a.ui.intersect(c,this,this.options.tolerance);if(f=!f&&this.isover==1?"isout":f&&this.isover==0?"isover":null){var d;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){d=
a.data(g[0],"droppable");d.greedyChild=f=="isover"?1:0}}if(d&&f=="isover"){d.isover=0;d.isout=1;d._out.call(d,e)}this[f]=1;this[f=="isout"?"isover":"isout"]=0;this[f=="isover"?"_over":"_out"].call(this,e);if(d&&f=="isout"){d.isout=0;d.isover=1;d._over.call(d,e)}}}})}}})(jQuery);
(function(a){a.ui=a.ui||{};var c=/left|center|right/,e=/top|center|bottom/,f=a.fn.position;a.fn.position=function(g){if(!g||!g.of)return f.apply(this,arguments);g=a.extend({},g);var j=a(g.of),k=(g.collision||"flip").split(" "),l=g.offset?g.offset.split(" "):[0,0],r,t,q;if(g.of.nodeType===9){r=j.width();t=j.height();q={top:0,left:0}}else if(g.of.scrollTo&&g.of.document){r=j.width();t=j.height();q={top:j.scrollTop(),left:j.scrollLeft()}}else if(g.of.preventDefault){g.at="left top";r=t=0;q={top:g.of.pageY,
left:g.of.pageX}}else{r=j.outerWidth();t=j.outerHeight();q=j.offset()}a.each(["my","at"],function(){var p=(g[this]||"").split(" ");if(p.length===1)p=c.test(p[0])?p.concat(["center"]):e.test(p[0])?["center"].concat(p):["center","center"];p[0]=c.test(p[0])?p[0]:"center";p[1]=e.test(p[1])?p[1]:"center";g[this]=p});if(k.length===1)k[1]=k[0];l[0]=parseInt(l[0],10)||0;if(l.length===1)l[1]=l[0];l[1]=parseInt(l[1],10)||0;if(g.at[0]==="right")q.left+=r;else if(g.at[0]==="center")q.left+=r/2;if(g.at[1]==="bottom")q.top+=
t;else if(g.at[1]==="center")q.top+=t/2;q.left+=l[0];q.top+=l[1];return this.each(function(){var p=a(this),o=p.outerWidth(),n=p.outerHeight(),u=a.extend({},q);if(g.my[0]==="right")u.left-=o;else if(g.my[0]==="center")u.left-=o/2;if(g.my[1]==="bottom")u.top-=n;else if(g.my[1]==="center")u.top-=n/2;a.each(["left","top"],function(h,s){a.ui.position[k[h]]&&a.ui.position[k[h]][s](u,{targetWidth:r,targetHeight:t,elemWidth:o,elemHeight:n,offset:l,my:g.my,at:g.at})});a.fn.bgiframe&&p.bgiframe();p.offset(a.extend(u,
{using:g.using}))})};a.ui.position={fit:{left:function(g,j){var k=a(window);j=g.left+j.elemWidth-k.width()-k.scrollLeft();g.left=j>0?g.left-j:Math.max(0,g.left)},top:function(g,j){var k=a(window);j=g.top+j.elemHeight-k.height()-k.scrollTop();g.top=j>0?g.top-j:Math.max(0,g.top)}},flip:{left:function(g,j){if(j.at[0]!=="center"){var k=a(window);k=g.left+j.elemWidth-k.width()-k.scrollLeft();var l=j.my[0]==="left"?-j.elemWidth:j.my[0]==="right"?j.elemWidth:0,r=-2*j.offset[0];g.left+=g.left<0?l+j.targetWidth+
r:k>0?l-j.targetWidth+r:0}},top:function(g,j){if(j.at[1]!=="center"){var k=a(window);k=g.top+j.elemHeight-k.height()-k.scrollTop();var l=j.my[1]==="top"?-j.elemHeight:j.my[1]==="bottom"?j.elemHeight:0,r=j.at[1]==="top"?j.targetHeight:-j.targetHeight,t=-2*j.offset[1];g.top+=g.top<0?l+j.targetHeight+t:k>0?l+r+t:0}}}};if(!a.offset.setOffset){a.offset.setOffset=function(g,j){if(/static/.test(jQuery.curCSS(g,"position")))g.style.position="relative";var k=jQuery(g),l=k.offset(),r=parseInt(jQuery.curCSS(g,
"top",true),10)||0,t=parseInt(jQuery.curCSS(g,"left",true),10)||0;l={top:j.top-l.top+r,left:j.left-l.left+t};"using"in j?j.using.call(g,l):k.css(l)};var d=a.fn.offset;a.fn.offset=function(g){var j=this[0];if(!j||!j.ownerDocument)return null;if(g)return this.each(function(){a.offset.setOffset(this,g)});return d.call(this)}}})(jQuery);
(function(a){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var f=this,d=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!d.aspectRatio,aspectRatio:d.aspectRatio,originalElement:this.element,
_proportionallyResizeElements:[],_helper:d.helper||d.ghost||d.animate?d.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&a.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=d.handles||(!a(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var g=this.handles.split(",");this.handles={};for(var j=0;j<g.length;j++){var k=a.trim(g[j]),l=a('<div class="ui-resizable-handle '+("ui-resizable-"+k)+'"></div>');/sw|se|ne|nw/.test(k)&&l.css({zIndex:++d.zIndex});"se"==k&&l.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[k]=".ui-resizable-"+k;this.element.append(l)}}this._renderAxis=function(r){r=r||this.element;for(var t in this.handles){if(this.handles[t].constructor==
String)this.handles[t]=a(this.handles[t],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var q=a(this.handles[t],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(t)?q.outerHeight():q.outerWidth();q=["padding",/ne|nw|n/.test(t)?"Top":/se|sw|s/.test(t)?"Bottom":/^e$/.test(t)?"Right":"Left"].join("");r.css(q,p);this._proportionallyResize()}a(this.handles[t])}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!f.resizing){if(this.className)var r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);f.axis=r&&r[1]?r[1]:"se"}});if(d.autoHide){this._handles.hide();a(this.element).addClass("ui-resizable-autohide").hover(function(){a(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(!f.resizing){a(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var f=function(g){a(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
if(this.elementIsWrapper){f(this.element);var d=this.element;d.after(this.originalElement.css({position:d.css("position"),width:d.outerWidth(),height:d.outerHeight(),top:d.css("top"),left:d.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);f(this.originalElement);return this},_mouseCapture:function(f){var d=false;for(var g in this.handles)if(a(this.handles[g])[0]==f.target)d=true;return!this.options.disabled&&d},_mouseStart:function(f){var d=this.options,g=this.element.position(),
j=this.element;this.resizing=true;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};if(j.is(".ui-draggable")||/absolute/.test(j.css("position")))j.css({position:"absolute",top:g.top,left:g.left});a.browser.opera&&/relative/.test(j.css("position"))&&j.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();g=c(this.helper.css("left"));var k=c(this.helper.css("top"));if(d.containment){g+=a(d.containment).scrollLeft()||0;k+=a(d.containment).scrollTop()||0}this.offset=
this.helper.offset();this.position={left:g,top:k};this.size=this._helper?{width:j.outerWidth(),height:j.outerHeight()}:{width:j.width(),height:j.height()};this.originalSize=this._helper?{width:j.outerWidth(),height:j.outerHeight()}:{width:j.width(),height:j.height()};this.originalPosition={left:g,top:k};this.sizeDiff={width:j.outerWidth()-j.width(),height:j.outerHeight()-j.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:
this.originalSize.width/this.originalSize.height||1;d=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",d=="auto"?this.axis+"-resize":d);j.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(f){var d=this.helper,g=this.originalMousePosition,j=this._change[this.axis];if(!j)return false;g=j.apply(this,[f,f.pageX-g.left||0,f.pageY-g.top||0]);if(this._aspectRatio||f.shiftKey)g=this._updateRatio(g,f);g=this._respectSize(g,f);this._propagate("resize",
f);d.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(g);this._trigger("resize",f,this.ui());return false},_mouseStop:function(f){this.resizing=false;var d=this.options,g=this;if(this._helper){var j=this._proportionallyResizeElements,k=j.length&&/textarea/i.test(j[0].nodeName);j=k&&a.ui.hasScroll(j[0],"left")?0:g.sizeDiff.height;
k={width:g.size.width-(k?0:g.sizeDiff.width),height:g.size.height-j};j=parseInt(g.element.css("left"),10)+(g.position.left-g.originalPosition.left)||null;var l=parseInt(g.element.css("top"),10)+(g.position.top-g.originalPosition.top)||null;d.animate||this.element.css(a.extend(k,{top:l,left:j}));g.helper.height(g.size.height);g.helper.width(g.size.width);this._helper&&!d.animate&&this._proportionallyResize()}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",
f);this._helper&&this.helper.remove();return false},_updateCache:function(f){this.offset=this.helper.offset();if(e(f.left))this.position.left=f.left;if(e(f.top))this.position.top=f.top;if(e(f.height))this.size.height=f.height;if(e(f.width))this.size.width=f.width},_updateRatio:function(f){var d=this.position,g=this.size,j=this.axis;if(f.height)f.width=g.height*this.aspectRatio;else if(f.width)f.height=g.width/this.aspectRatio;if(j=="sw"){f.left=d.left+(g.width-f.width);f.top=null}if(j=="nw"){f.top=
d.top+(g.height-f.height);f.left=d.left+(g.width-f.width)}return f},_respectSize:function(f){var d=this.options,g=this.axis,j=e(f.width)&&d.maxWidth&&d.maxWidth<f.width,k=e(f.height)&&d.maxHeight&&d.maxHeight<f.height,l=e(f.width)&&d.minWidth&&d.minWidth>f.width,r=e(f.height)&&d.minHeight&&d.minHeight>f.height;if(l)f.width=d.minWidth;if(r)f.height=d.minHeight;if(j)f.width=d.maxWidth;if(k)f.height=d.maxHeight;var t=this.originalPosition.left+this.originalSize.width,q=this.position.top+this.size.height,
p=/sw|nw|w/.test(g);g=/nw|ne|n/.test(g);if(l&&p)f.left=t-d.minWidth;if(j&&p)f.left=t-d.maxWidth;if(r&&g)f.top=q-d.minHeight;if(k&&g)f.top=q-d.maxHeight;if((d=!f.width&&!f.height)&&!f.left&&f.top)f.top=null;else if(d&&!f.top&&f.left)f.left=null;return f},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var f=this.helper||this.element,d=0;d<this._proportionallyResizeElements.length;d++){var g=this._proportionallyResizeElements[d];if(!this.borderDif){var j=[g.css("borderTopWidth"),
g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],k=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=a.map(j,function(l,r){l=parseInt(l,10)||0;r=parseInt(k[r],10)||0;return l+r})}a.browser.msie&&(a(f).is(":hidden")||a(f).parents(":hidden").length)||g.css({height:f.height()-this.borderDif[0]-this.borderDif[2]||0,width:f.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var f=this.options;this.elementOffset=
this.element.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var d=a.browser.msie&&a.browser.version<7,g=d?1:0;d=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+d,height:this.element.outerHeight()+d,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++f.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(f,d){return{width:this.originalSize.width+
d}},w:function(f,d){return{left:this.originalPosition.left+d,width:this.originalSize.width-d}},n:function(f,d,g){return{top:this.originalPosition.top+g,height:this.originalSize.height-g}},s:function(f,d,g){return{height:this.originalSize.height+g}},se:function(f,d,g){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,d,g]))},sw:function(f,d,g){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,d,g]))},ne:function(f,d,g){return a.extend(this._change.n.apply(this,
arguments),this._change.e.apply(this,[f,d,g]))},nw:function(f,d,g){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,d,g]))}},_propagate:function(f,d){a.ui.plugin.call(this,f,[d,this.ui()]);f!="resize"&&this._trigger(f,d,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.extend(a.ui.resizable,
{version:"@VERSION"});a.ui.plugin.add("resizable","alsoResize",{start:function(){var f=a(this).data("resizable").options,d=function(g){a(g).each(function(){a(this).data("resizable-alsoresize",{width:parseInt(a(this).width(),10),height:parseInt(a(this).height(),10),left:parseInt(a(this).css("left"),10),top:parseInt(a(this).css("top"),10)})})};if(typeof f.alsoResize=="object"&&!f.alsoResize.parentNode)if(f.alsoResize.length){f.alsoResize=f.alsoResize[0];d(f.alsoResize)}else a.each(f.alsoResize,function(g){d(g)});
else d(f.alsoResize)},resize:function(){var f=a(this).data("resizable"),d=f.options,g=f.originalSize,j=f.originalPosition,k={height:f.size.height-g.height||0,width:f.size.width-g.width||0,top:f.position.top-j.top||0,left:f.position.left-j.left||0},l=function(r,t){a(r).each(function(){var q=a(this),p=a(this).data("resizable-alsoresize"),o={};a.each((t&&t.length?t:["width","height","top","left"])||["width","height","top","left"],function(n,u){if((n=(p[u]||0)+(k[u]||0))&&n>=0)o[u]=n||null});if(/relative/.test(q.css("position"))&&
a.browser.opera){f._revertToRelativePosition=true;q.css({position:"absolute",top:"auto",left:"auto"})}q.css(o)})};typeof d.alsoResize=="object"&&!d.alsoResize.nodeType?a.each(d.alsoResize,function(r,t){l(r,t)}):l(d.alsoResize)},stop:function(){var f=a(this).data("resizable");if(f._revertToRelativePosition&&a.browser.opera){f._revertToRelativePosition=false;el.css({position:"relative"})}a(this).removeData("resizable-alsoresize-start")}});a.ui.plugin.add("resizable","animate",{stop:function(f){var d=
a(this).data("resizable"),g=d.options,j=d._proportionallyResizeElements,k=j.length&&/textarea/i.test(j[0].nodeName),l=k&&a.ui.hasScroll(j[0],"left")?0:d.sizeDiff.height;k={width:d.size.width-(k?0:d.sizeDiff.width),height:d.size.height-l};l=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null;var r=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(k,r&&l?{top:r,left:l}:{}),{duration:g.animateDuration,easing:g.animateEasing,
step:function(){var t={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};j&&j.length&&a(j[0]).css({width:t.width,height:t.height});d._updateCache(t);d._propagate("resize",f)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var f=a(this).data("resizable"),d=f.element,g=f.options.containment;if(d=g instanceof a?g.get(0):/parent/.test(g)?d.parent().get(0):g){f.containerElement=
a(d);if(/document/.test(g)||g==document){f.containerOffset={left:0,top:0};f.containerPosition={left:0,top:0};f.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{var j=a(d),k=[];a(["Top","Right","Left","Bottom"]).each(function(t,q){k[t]=c(j.css("padding"+q))});f.containerOffset=j.offset();f.containerPosition=j.position();f.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};g=f.containerOffset;
var l=f.containerSize.height,r=f.containerSize.width;r=a.ui.hasScroll(d,"left")?d.scrollWidth:r;l=a.ui.hasScroll(d)?d.scrollHeight:l;f.parentData={element:d,left:g.left,top:g.top,width:r,height:l}}}},resize:function(f){var d=a(this).data("resizable"),g=d.options,j=d.containerOffset,k=d.position;f=d._aspectRatio||f.shiftKey;var l={top:0,left:0},r=d.containerElement;if(r[0]!=document&&/static/.test(r.css("position")))l=j;if(k.left<(d._helper?j.left:0)){d.size.width+=d._helper?d.position.left-j.left:
d.position.left-l.left;if(f)d.size.height=d.size.width/g.aspectRatio;d.position.left=g.helper?j.left:0}if(k.top<(d._helper?j.top:0)){d.size.height+=d._helper?d.position.top-j.top:d.position.top;if(f)d.size.width=d.size.height*g.aspectRatio;d.position.top=d._helper?j.top:0}d.offset.left=d.parentData.left+d.position.left;d.offset.top=d.parentData.top+d.position.top;g=Math.abs((d._helper?d.offset.left-l.left:d.offset.left-l.left)+d.sizeDiff.width);j=Math.abs((d._helper?d.offset.top-l.top:d.offset.top-
j.top)+d.sizeDiff.height);k=d.containerElement.get(0)==d.element.parent().get(0);l=/relative|absolute/.test(d.containerElement.css("position"));if(k&&l)g-=d.parentData.left;if(g+d.size.width>=d.parentData.width){d.size.width=d.parentData.width-g;if(f)d.size.height=d.size.width/d.aspectRatio}if(j+d.size.height>=d.parentData.height){d.size.height=d.parentData.height-j;if(f)d.size.width=d.size.height*d.aspectRatio}},stop:function(){var f=a(this).data("resizable"),d=f.options,g=f.containerOffset,j=f.containerPosition,
k=f.containerElement,l=a(f.helper),r=l.offset(),t=l.outerWidth()-f.sizeDiff.width;l=l.outerHeight()-f.sizeDiff.height;f._helper&&!d.animate&&/relative/.test(k.css("position"))&&a(this).css({left:r.left-j.left-g.left,width:t,height:l});f._helper&&!d.animate&&/static/.test(k.css("position"))&&a(this).css({left:r.left-j.left-g.left,width:t,height:l})}});a.ui.plugin.add("resizable","ghost",{start:function(){var f=a(this).data("resizable"),d=f.options,g=f.size;f.ghost=f.originalElement.clone();f.ghost.css({opacity:0.25,
display:"block",position:"relative",height:g.height,width:g.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof d.ghost=="string"?d.ghost:"");f.ghost.appendTo(f.helper)},resize:function(){var f=a(this).data("resizable");f.ghost&&f.ghost.css({position:"relative",height:f.size.height,width:f.size.width})},stop:function(){var f=a(this).data("resizable");f.ghost&&f.helper&&f.helper.get(0).removeChild(f.ghost.get(0))}});a.ui.plugin.add("resizable","grid",{resize:function(){var f=
a(this).data("resizable"),d=f.options,g=f.size,j=f.originalSize,k=f.originalPosition,l=f.axis;d.grid=typeof d.grid=="number"?[d.grid,d.grid]:d.grid;var r=Math.round((g.width-j.width)/(d.grid[0]||1))*(d.grid[0]||1);d=Math.round((g.height-j.height)/(d.grid[1]||1))*(d.grid[1]||1);if(/^(se|s|e)$/.test(l)){f.size.width=j.width+r;f.size.height=j.height+d}else if(/^(ne)$/.test(l)){f.size.width=j.width+r;f.size.height=j.height+d;f.position.top=k.top-d}else{if(/^(sw)$/.test(l)){f.size.width=j.width+r;f.size.height=
j.height+d}else{f.size.width=j.width+r;f.size.height=j.height+d;f.position.top=k.top-d}f.position.left=k.left-r}}});var c=function(f){return parseInt(f,10)||0},e=function(f){return!isNaN(parseInt(f,10))}})(jQuery);
(function(a){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var e;this.refresh=function(){e=a(c.options.filter,c.element[0]);e.each(function(){var f=a(this),d=f.offset();a.data(this,"selectable-item",{element:this,$element:f,left:d.left,top:d.top,right:d.left+f.outerWidth(),bottom:d.top+f.outerHeight(),startselected:false,selected:f.hasClass("ui-selected"),
selecting:f.hasClass("ui-selecting"),unselecting:f.hasClass("ui-unselecting")})})};this.refresh();this.selectees=e.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},
_mouseStart:function(c){var e=this;this.opos=[c.pageX,c.pageY];if(!this.options.disabled){var f=this.options;this.selectees=a(f.filter,this.element[0]);this._trigger("start",c);a(f.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:c.clientX,top:c.clientY,width:0,height:0});f.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=true;if(!c.metaKey){d.$element.removeClass("ui-selected");
d.selected=false;d.$element.addClass("ui-unselecting");d.unselecting=true;e._trigger("unselecting",c,{unselecting:d.element})}});a(c.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){d.$element.removeClass("ui-unselecting").addClass("ui-selecting");d.unselecting=false;d.selecting=true;d.selected=true;e._trigger("selecting",c,{selecting:d.element});return false}})}},_mouseDrag:function(c){var e=this;this.dragged=true;if(!this.options.disabled){var f=this.options,
d=this.opos[0],g=this.opos[1],j=c.pageX,k=c.pageY;if(d>j){var l=j;j=d;d=l}if(g>k){l=k;k=g;g=l}this.helper.css({left:d,top:g,width:j-d,height:k-g});this.selectees.each(function(){var r=a.data(this,"selectable-item");if(!(!r||r.element==e.element[0])){var t=false;if(f.tolerance=="touch")t=!(r.left>j||r.right<d||r.top>k||r.bottom<g);else if(f.tolerance=="fit")t=r.left>d&&r.right<j&&r.top>g&&r.bottom<k;if(t){if(r.selected){r.$element.removeClass("ui-selected");r.selected=false}if(r.unselecting){r.$element.removeClass("ui-unselecting");
r.unselecting=false}if(!r.selecting){r.$element.addClass("ui-selecting");r.selecting=true;e._trigger("selecting",c,{selecting:r.element})}}else{if(r.selecting)if(c.metaKey&&r.startselected){r.$element.removeClass("ui-selecting");r.selecting=false;r.$element.addClass("ui-selected");r.selected=true}else{r.$element.removeClass("ui-selecting");r.selecting=false;if(r.startselected){r.$element.addClass("ui-unselecting");r.unselecting=true}e._trigger("unselecting",c,{unselecting:r.element})}if(r.selected)if(!c.metaKey&&
!r.startselected){r.$element.removeClass("ui-selected");r.selected=false;r.$element.addClass("ui-unselecting");r.unselecting=true;e._trigger("unselecting",c,{unselecting:r.element})}}}});return false}},_mouseStop:function(c){var e=this;this.dragged=false;a(".ui-unselecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");f.$element.removeClass("ui-unselecting");f.unselecting=false;f.startselected=false;e._trigger("unselected",c,{unselected:f.element})});a(".ui-selecting",this.element[0]).each(function(){var f=
a.data(this,"selectable-item");f.$element.removeClass("ui-selecting").addClass("ui-selected");f.selecting=false;f.selected=true;f.startselected=true;e._trigger("selected",c,{selected:f.element})});this._trigger("stop",c);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"@VERSION"})})(jQuery);
(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--)this.items[c].item.removeData("sortable-item");return this},_mouseCapture:function(c,e){if(this.reverting)return false;if(this.options.disabled||this.options.type==
"static")return false;this._refreshItems(c);var f=null,d=this;a(c.target).parents().each(function(){if(a.data(this,"sortable-item")==d){f=a(this);return false}});if(a.data(c.target,"sortable-item")==d)f=a(c.target);if(!f)return false;if(this.options.handle&&!e){var g=false;a(this.options.handle,f).find("*").andSelf().each(function(){if(this==c.target)g=true});if(!g)return false}this.currentItem=f;this._removeCurrentsFromItems();return true},_mouseStart:function(c,e,f){e=this.options;var d=this;this.currentContainer=
this;this.refreshPositions();this.helper=this._createHelper(c);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();e.containment&&this._setContainment();if(e.cursor){if(a("body").css("cursor"))this._storedCursor=a("body").css("cursor");a("body").css("cursor",e.cursor)}if(e.opacity){if(this.helper.css("opacity"))this._storedOpacity=
this.helper.css("opacity");this.helper.css("opacity",e.opacity)}if(e.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",e.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",c,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!f)for(f=this.containers.length-1;f>=0;f--)this.containers[f]._trigger("activate",c,d._uiHash(this));
if(a.ui.ddmanager)a.ui.ddmanager.current=this;a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,c);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(c);return true},_mouseDrag:function(c){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var e=this.options,f=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!=
"HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-c.pageY<e.scrollSensitivity)this.scrollParent[0].scrollTop=f=this.scrollParent[0].scrollTop+e.scrollSpeed;else if(c.pageY-this.overflowOffset.top<e.scrollSensitivity)this.scrollParent[0].scrollTop=f=this.scrollParent[0].scrollTop-e.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-c.pageX<e.scrollSensitivity)this.scrollParent[0].scrollLeft=f=this.scrollParent[0].scrollLeft+e.scrollSpeed;else if(c.pageX-this.overflowOffset.left<
e.scrollSensitivity)this.scrollParent[0].scrollLeft=f=this.scrollParent[0].scrollLeft-e.scrollSpeed}else{if(c.pageY-a(document).scrollTop()<e.scrollSensitivity)f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed);else if(a(window).height()-(c.pageY-a(document).scrollTop())<e.scrollSensitivity)f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed);if(c.pageX-a(document).scrollLeft()<e.scrollSensitivity)f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed);else if(a(window).width()-
(c.pageX-a(document).scrollLeft())<e.scrollSensitivity)f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed)}f!==false&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,c)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(e=this.items.length-1;e>=0;e--){f=this.items[e];var d=
f.item[0],g=this._intersectsWithPointer(f);if(g)if(d!=this.currentItem[0]&&this.placeholder[g==1?"next":"prev"]()[0]!=d&&!a.ui.contains(this.placeholder[0],d)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],d):true)){this.direction=g==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(c,f);else break;this._trigger("change",c,this._uiHash());break}}this._contactContainers(c);a.ui.ddmanager&&a.ui.ddmanager.drag(this,c);this._trigger("sort",
c,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,e){if(c){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,c);if(this.options.revert){var f=this;e=f.placeholder.offset();f.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-f.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-f.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},
parseInt(this.options.revert,10)||500,function(){f._clear(c)})}else this._clear(c,e);return false}},cancel:function(){var c=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--){this.containers[e]._trigger("deactivate",null,c._uiHash(this));if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",null,c._uiHash(this));this.containers[e].containerCache.over=
0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(c){var e=this._getItemsAsjQuery(c&&c.connected),f=[];c=c||{};a(e).each(function(){var d=
(a(c.item||this).attr(c.attribute||"id")||"").match(c.expression||/(.+)[-=_](.+)/);if(d)f.push((c.key||d[1]+"[]")+"="+(c.key&&c.expression?d[1]:d[2]))});return f.join("&")},toArray:function(c){var e=this._getItemsAsjQuery(c&&c.connected),f=[];c=c||{};e.each(function(){f.push(a(c.item||this).attr(c.attribute||"id")||"")});return f},_intersectsWith:function(c){var e=this.positionAbs.left,f=e+this.helperProportions.width,d=this.positionAbs.top,g=d+this.helperProportions.height,j=c.left,k=j+c.width,l=
c.top,r=l+c.height,t=this.offset.click.top,q=this.offset.click.left;t=d+t>l&&d+t<r&&e+q>j&&e+q<k;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>c[this.floating?"width":"height"]?t:j<e+this.helperProportions.width/2&&f-this.helperProportions.width/2<k&&l<d+this.helperProportions.height/2&&g-this.helperProportions.height/2<r},_intersectsWithPointer:function(c){var e=a.ui.isOverAxis(this.positionAbs.top+
this.offset.click.top,c.top,c.height);c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left,c.width);e=e&&c;c=this._getDragVerticalDirection();var f=this._getDragHorizontalDirection();if(!e)return false;return this.floating?f&&f=="right"||c=="down"?2:1:c&&(c=="down"?2:1)},_intersectsWithSides:function(c){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,c.top+c.height/2,c.height);c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left+c.width/2,c.width);
var f=this._getDragVerticalDirection(),d=this._getDragHorizontalDirection();return this.floating&&d?d=="right"&&c||d=="left"&&!c:f&&(f=="down"&&e||f=="up"&&!e)},_getDragVerticalDirection:function(){var c=this.positionAbs.top-this.lastPositionAbs.top;return c!=0&&(c>0?"down":"up")},_getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=
this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(c){var e=[],f=[],d=this._connectWith();if(d&&c)for(c=d.length-1;c>=0;c--)for(var g=a(d[c]),j=g.length-1;j>=0;j--){var k=a.data(g[j],"sortable");if(k&&k!=this&&!k.options.disabled)f.push([a.isFunction(k.options.items)?k.options.items.call(k.element):a(k.options.items,k.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),k])}f.push([a.isFunction(this.options.items)?this.options.items.call(this.element,
null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(c=f.length-1;c>=0;c--)f[c][0].each(function(){e.push(this)});return a(e)},_removeCurrentsFromItems:function(){for(var c=this.currentItem.find(":data(sortable-item)"),e=0;e<this.items.length;e++)for(var f=0;f<c.length;f++)c[f]==this.items[e].item[0]&&this.items.splice(e,1)},_refreshItems:function(c){this.items=[];this.containers=[this];var e=this.items,
f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],c,{item:this.currentItem}):a(this.options.items,this.element),this]],d=this._connectWith();if(d)for(var g=d.length-1;g>=0;g--)for(var j=a(d[g]),k=j.length-1;k>=0;k--){var l=a.data(j[k],"sortable");if(l&&l!=this&&!l.options.disabled){f.push([a.isFunction(l.options.items)?l.options.items.call(l.element[0],c,{item:this.currentItem}):a(l.options.items,l.element),l]);this.containers.push(l)}}for(g=f.length-1;g>=0;g--){c=f[g][1];
d=f[g][0];k=0;for(j=d.length;k<j;k++){l=a(d[k]);l.data("sortable-item",c);e.push({item:l,instance:c,width:0,height:0,left:0,top:0})}}},refreshPositions:function(c){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var e=this.items.length-1;e>=0;e--){var f=this.items[e],d=this.options.toleranceElement?a(this.options.toleranceElement,f.item):f.item;if(!c){f.width=d.outerWidth();f.height=d.outerHeight()}d=d.offset();f.left=d.left;f.top=d.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);
else for(e=this.containers.length-1;e>=0;e--){d=this.containers[e].element.offset();this.containers[e].containerCache.left=d.left;this.containers[e].containerCache.top=d.top;this.containers[e].containerCache.width=this.containers[e].element.outerWidth();this.containers[e].containerCache.height=this.containers[e].element.outerHeight()}return this},_createPlaceholder:function(c){var e=c||this,f=e.options;if(!f.placeholder||f.placeholder.constructor==String){var d=f.placeholder;f.placeholder={element:function(){var g=
a(document.createElement(e.currentItem[0].nodeName)).addClass(d||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!d)g.style.visibility="hidden";return g},update:function(g,j){if(!(d&&!f.forcePlaceholderSize)){j.height()||j.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10));j.width()||j.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||
0,10))}}}}e.placeholder=a(f.placeholder.element.call(e.element,e.currentItem));e.currentItem.after(e.placeholder);f.placeholder.update(e,e.placeholder)},_contactContainers:function(c){for(var e=null,f=null,d=this.containers.length-1;d>=0;d--)if(!a.ui.contains(this.currentItem[0],this.containers[d].element[0]))if(this._intersectsWith(this.containers[d].containerCache)){if(!(e&&a.ui.contains(this.containers[d].element[0],e.element[0]))){e=this.containers[d];f=d}}else if(this.containers[d].containerCache.over){this.containers[d]._trigger("out",
c,this._uiHash(this));this.containers[d].containerCache.over=0}if(e)if(this.currentContainer!=this.containers[f]){e=1E4;d=null;for(var g=this.positionAbs[this.containers[f].floating?"left":"top"],j=this.items.length-1;j>=0;j--)if(a.ui.contains(this.containers[f].element[0],this.items[j].item[0])){var k=this.items[j][this.containers[f].floating?"left":"top"];if(Math.abs(k-g)<e){e=Math.abs(k-g);d=this.items[j]}}if(d||this.options.dropOnEmpty){this.currentContainer=this.containers[f];d?this._rearrange(c,
d,null,true):this._rearrange(c,null,this.containers[f].element,true);this._trigger("change",c,this._uiHash());this.containers[f]._trigger("change",c,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[f]._trigger("over",c,this._uiHash(this));this.containers[f].containerCache.over=1}}},_createHelper:function(c){var e=this.options;c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],[c,this.currentItem])):e.helper=="clone"?this.currentItem.clone():
this.currentItem;c.parents("body").length||a(e.appendTo!="parent"?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(c[0]);if(c[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(c[0].style.width==""||e.forceHelperSize)c.width(this.currentItem.width());if(c[0].style.height==""||e.forceHelperSize)c.height(this.currentItem.height());
return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string")c=c.split(" ");if(a.isArray(c))c={left:+c[0],top:+c[1]||0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();
var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.currentItem.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions=
{width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c=this.options;if(c.containment=="parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(c.containment=="document"?document:window).height()||
document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)){var e=a(c.containment)[0];c=a(c.containment).offset();var f=a(e).css("overflow")!="hidden";this.containment=[c.left+(parseInt(a(e).css("borderLeftWidth"),10)||0)+(parseInt(a(e).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(e).css("borderTopWidth"),10)||0)+(parseInt(a(e).css("paddingTop"),10)||0)-this.margins.top,c.left+(f?Math.max(e.scrollWidth,
e.offsetWidth):e.offsetWidth)-(parseInt(a(e).css("borderLeftWidth"),10)||0)-(parseInt(a(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(f?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(a(e).css("borderTopWidth"),10)||0)-(parseInt(a(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(c,e){if(!e)e=this.position;c=c=="absolute"?1:-1;var f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=
document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,d=/(html|body)/i.test(f[0].tagName);return{top:e.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():d?0:f.scrollTop())*c),left:e.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
d?0:f.scrollLeft())*c)}},_generatePosition:function(c){var e=this.options,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,d=/(html|body)/i.test(f[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var g=c.pageX,j=c.pageY;if(this.originalPosition){if(this.containment){if(c.pageX-
this.offset.click.left<this.containment[0])g=this.containment[0]+this.offset.click.left;if(c.pageY-this.offset.click.top<this.containment[1])j=this.containment[1]+this.offset.click.top;if(c.pageX-this.offset.click.left>this.containment[2])g=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])j=this.containment[3]+this.offset.click.top}if(e.grid){j=this.originalPageY+Math.round((j-this.originalPageY)/e.grid[1])*e.grid[1];j=this.containment?!(j-this.offset.click.top<
this.containment[1]||j-this.offset.click.top>this.containment[3])?j:!(j-this.offset.click.top<this.containment[1])?j-e.grid[1]:j+e.grid[1]:j;g=this.originalPageX+Math.round((g-this.originalPageX)/e.grid[0])*e.grid[0];g=this.containment?!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:!(g-this.offset.click.left<this.containment[0])?g-e.grid[0]:g+e.grid[0]:g}}return{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&
this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():d?0:f.scrollTop()),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():d?0:f.scrollLeft())}},_rearrange:function(c,e,f,d){f?f[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?e.item[0]:e.item[0].nextSibling);this.counter=
this.counter?++this.counter:1;var g=this,j=this.counter;window.setTimeout(function(){j==g.counter&&g.refreshPositions(!d)},0)},_clear:function(c,e){this.reverting=false;var f=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var d in this._storedCSS)if(this._storedCSS[d]=="auto"||this._storedCSS[d]=="static")this._storedCSS[d]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();
this.fromOutside&&!e&&f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e)f.push(function(g){this._trigger("update",g,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){e||f.push(function(g){this._trigger("remove",g,this._uiHash())});for(d=this.containers.length-1;d>=0;d--)if(a.ui.contains(this.containers[d].element[0],
this.currentItem[0])&&!e){f.push(function(g){return function(j){g._trigger("receive",j,this._uiHash(this))}}.call(this,this.containers[d]));f.push(function(g){return function(j){g._trigger("update",j,this._uiHash(this))}}.call(this,this.containers[d]))}}for(d=this.containers.length-1;d>=0;d--){e||f.push(function(g){return function(j){g._trigger("deactivate",j,this._uiHash(this))}}.call(this,this.containers[d]));if(this.containers[d].containerCache.over){f.push(function(g){return function(j){g._trigger("out",
j,this._uiHash(this))}}.call(this,this.containers[d]));this.containers[d].containerCache.over=0}}this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",c,this._uiHash());for(d=0;d<f.length;d++)f[d].call(this,c);this._trigger("stop",c,this._uiHash())}return false}e||
this._trigger("beforeStop",c,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!e){for(d=0;d<f.length;d++)f[d].call(this,c);this._trigger("stop",c,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(c){var e=c||this;return{helper:e.helper,placeholder:e.placeholder||a([]),position:e.position,
originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:c?c.element:null}}});a.extend(a.ui.sortable,{version:"@VERSION"})})(jQuery);
(function(a){a.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");var c=this,e=c.options,f=e.title||c.originalTitle||"&#160;",d=a.ui.dialog.getTitleId(c.element),g=(c.uiDialog=a("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
e.dialogClass).css({zIndex:e.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(l){if(e.closeOnEscape&&l.keyCode&&l.keyCode==a.ui.keyCode.ESCAPE){c.close(l);l.preventDefault()}}).attr({role:"dialog","aria-labelledby":d}).mousedown(function(l){c.moveToTop(false,l)});c.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var j=(c.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),
k=a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){k.addClass("ui-state-hover")},function(){k.removeClass("ui-state-hover")}).focus(function(){k.addClass("ui-state-focus")}).blur(function(){k.removeClass("ui-state-focus")}).click(function(l){c.close(l);return false}).appendTo(j);(c.uiDialogTitlebarCloseText=a("<span></span>")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(k);a("<span></span>").addClass("ui-dialog-title").attr("id",
d).html(f).prependTo(j);if(a.isFunction(e.beforeclose)&&!a.isFunction(e.beforeClose))e.beforeClose=e.beforeclose;j.find("*").add(j).disableSelection();e.draggable&&a.fn.draggable&&c._makeDraggable();e.resizable&&a.fn.resizable&&c._makeResizable();c._createButtons(e.buttons);c._isOpen=false;a.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var c=this;c.overlay&&c.overlay.destroy();c.uiDialog.hide();c.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
c.uiDialog.remove();c.originalTitle&&c.element.attr("title",c.originalTitle);return c},widget:function(){return this.uiDialog},close:function(c){var e=this;if(false!==e._trigger("beforeClose",c)){e.overlay&&e.overlay.destroy();e.uiDialog.unbind("keypress.ui-dialog");e._isOpen=false;e.options.hide?e.uiDialog.hide(e.options.hide,function(){e._trigger("close",c)}):e.uiDialog.hide()&&e._trigger("close",c);a.ui.dialog.overlay.resize();if(e.options.modal){var f=0;a(".ui-dialog").each(function(){if(this!=
e.uiDialog[0])f=Math.max(f,a(this).css("z-index"))});a.ui.dialog.maxZ=f}return e}},isOpen:function(){return this._isOpen},moveToTop:function(c,e){var f=this,d=f.options;if(d.modal&&!c||!d.stack&&!d.modal)return f._trigger("focus",e);if(d.zIndex>a.ui.dialog.maxZ)a.ui.dialog.maxZ=d.zIndex;f.overlay&&f.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=++a.ui.dialog.maxZ);c={scrollTop:f.element.attr("scrollTop"),scrollLeft:f.element.attr("scrollLeft")};f.uiDialog.css("z-index",++a.ui.dialog.maxZ);f.element.attr(c);
f._trigger("focus",e);return f},open:function(){if(!this._isOpen){var c=this,e=c.options,f=c.uiDialog;c.overlay=e.modal?new a.ui.dialog.overlay(c):null;f.next().length&&f.appendTo("body");c._size();c._position(e.position);f.show(e.show);c.moveToTop(true);e.modal&&f.bind("keypress.ui-dialog",function(d){if(d.keyCode==a.ui.keyCode.TAB){var g=a(":tabbable",this),j=g.filter(":first");g=g.filter(":last");if(d.target==g[0]&&!d.shiftKey){j.focus(1);return false}else if(d.target==j[0]&&d.shiftKey){g.focus(1);
return false}}});a([]).add(f.find(".ui-dialog-content :tabbable:first")).add(f.find(".ui-dialog-buttonpane :tabbable:first")).add(f).filter(":first").focus();c._trigger("open");c._isOpen=true;return c}},_createButtons:function(c){var e=this,f=false,d=a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");e.uiDialog.find(".ui-dialog-buttonpane").remove();typeof c=="object"&&c!==null&&a.each(c,function(){return!(f=true)});if(f){a.each(c,function(g,j){g=a('<button type="button"></button>').text(g).click(function(){j.apply(e.element[0],
arguments)}).appendTo(d);a.fn.button&&g.button()});d.appendTo(e.uiDialog)}},_makeDraggable:function(){var c=this,e=c.options,f=a(document),d;c.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(g){d=e.height==="auto"?"auto":a(this).height();a(this).height(a(this).height()).addClass("ui-dialog-dragging");c._trigger("dragStart",g)},drag:function(g){c._trigger("drag",g)},stop:function(g,j){e.position=[j.position.left-
f.scrollLeft(),j.position.top-f.scrollTop()];a(this).removeClass("ui-dialog-dragging").height(d);c._trigger("dragStop",g);a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){c=c===undefined?this.options.resizable:c;var e=this,f=e.options,d=e.uiDialog.css("position");c=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";e.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:e.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:e._minHeight(),
handles:c,start:function(g){a(this).addClass("ui-dialog-resizing");e._trigger("resizeStart",g)},resize:function(g){e._trigger("resize",g)},stop:function(g){a(this).removeClass("ui-dialog-resizing");f.height=a(this).height();f.width=a(this).width();e._trigger("resizeStop",g);a.ui.dialog.overlay.resize()}}).css("position",d).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var c=this.options;return c.height=="auto"?c.minHeight:Math.min(c.minHeight,c.height)},
_position:function(c){var e=[],f=[0,0];c=c||a.ui.dialog.prototype.options.position;if(typeof c=="string"||typeof c=="object"&&"0"in c){e=c.split?c.split(" "):[c[0],c[1]];if(e.length==1)e[1]=e[0];a.each(["left","top"],function(d,g){if(+e[d]==e[d]){f[d]=e[d];e[d]=g}})}else if(typeof c=="object"){if("left"in c){e[0]="left";f[0]=c.left}else if("right"in c){e[0]="right";f[0]=-c.right}if("top"in c){e[1]="top";f[1]=c.top}else if("bottom"in c){e[1]="bottom";f[1]=-c.bottom}}(c=this.uiDialog.is(":visible"))||
this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position({my:e.join(" "),at:e.join(" "),offset:f.join(" "),of:window,collision:"fit",using:function(d){var g=a(this).css(d).offset().top;g<0&&a(this).css("top",d.top-g)}});c||this.uiDialog.hide()},_setOption:function(c,e){var f=this,d=f.uiDialog,g=d.is(":data(resizable)"),j=false;switch(c){case "beforeclose":c="beforeClose";break;case "buttons":f._createButtons(e);break;case "closeText":f.uiDialogTitlebarCloseText.text(""+e);break;case "dialogClass":d.removeClass(f.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
e);break;case "disabled":e?d.addClass("ui-dialog-disabled"):d.removeClass("ui-dialog-disabled");break;case "draggable":e?f._makeDraggable():d.draggable("destroy");break;case "height":j=true;break;case "maxHeight":g&&d.resizable("option","maxHeight",e);j=true;break;case "maxWidth":g&&d.resizable("option","maxWidth",e);j=true;break;case "minHeight":g&&d.resizable("option","minHeight",e);j=true;break;case "minWidth":g&&d.resizable("option","minWidth",e);j=true;break;case "position":f._position(e);break;
case "resizable":g&&!e&&d.resizable("destroy");g&&typeof e=="string"&&d.resizable("option","handles",e);g||e!==false&&f._makeResizable(e);break;case "title":a(".ui-dialog-title",f.uiDialogTitlebar).html(""+(e||"&#160;"));break;case "width":j=true;break}a.Widget.prototype._setOption.apply(f,arguments);j&&f._size()},_size:function(){var c=this.options;this.element.css("width","auto").hide();var e=this.uiDialog.css({height:"auto",width:c.width}).height();this.element.css(c.height=="auto"?{minHeight:Math.max(c.minHeight-
e,0),height:"auto"}:{minHeight:0,height:Math.max(c.height-e,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});a.extend(a.ui.dialog,{version:"@VERSION",uuid:0,maxZ:0,getTitleId:function(c){return"ui-dialog-title-"+(c.attr("id")||++this.uuid)},overlay:function(c){this.$el=a.ui.dialog.overlay.create(c)}});a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),
function(c){return c+".dialog-overlay"}).join(" "),create:function(c){if(this.instances.length===0){setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(f){return a(f.target).zIndex()>=a.ui.dialog.overlay.maxZ})},1);a(document).bind("keydown.dialog-overlay",function(f){if(c.options.closeOnEscape&&f.keyCode&&f.keyCode==a.ui.keyCode.ESCAPE){c.close(f);f.preventDefault()}});a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize)}var e=
(this.oldInstances.length?this.oldInstances.splice(0,1)[0]:a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});a.fn.bgiframe&&e.bgiframe();this.instances.push(e);return e},destroy:function(c){this.oldInstances.push(this.instances.splice(a.inArray(this.instances,c),1)[0]);this.instances.length===0&&a([document,window]).unbind(".dialog-overlay");c.remove();var e=0;a.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});
this.maxZ=e},height:function(){if(a.browser.msie&&a.browser.version<7){var c=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),e=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return c<e?a(window).height()+"px":c+"px"}else return a(document).height()+"px"},width:function(){if(a.browser.msie&&a.browser.version<7){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);
return c<e?a(window).width()+"px":c+"px"}else return a(document).width()+"px"},resize:function(){var c=a([]);a.each(a.ui.dialog.overlay.instances,function(){c=c.add(this)});c.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,e=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");e.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
this.range=a([]);if(e.range){if(e.range===true){this.range=a("<div></div>");if(!e.values)e.values=[this._valueMin(),this._valueMin()];if(e.values.length&&e.values.length!=2)e.values=[e.values[0],e.values[0]]}else this.range=a("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(e.range=="min"||e.range=="max")this.range.addClass("ui-slider-range-"+e.range);this.range.addClass("ui-widget-header")}a(".ui-slider-handle",this.element).length==0&&a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");
if(e.values&&e.values.length)for(;a(".ui-slider-handle",this.element).length<e.values.length;)a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(f){f.preventDefault()}).hover(function(){e.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(e.disabled)a(this).blur();
else{a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(f){a(this).data("index.ui-slider-handle",f)});this.handles.keydown(function(f){var d=true,g=a(this).data("index.ui-slider-handle");if(!c.options.disabled){switch(f.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:d=
false;if(!c._keySliding){c._keySliding=true;a(this).addClass("ui-state-active");c._start(f,g)}break}var j,k,l=c._step();j=c.options.values&&c.options.values.length?(k=c.values(g)):(k=c.value());switch(f.keyCode){case a.ui.keyCode.HOME:k=c._valueMin();break;case a.ui.keyCode.END:k=c._valueMax();break;case a.ui.keyCode.PAGE_UP:k=j+(c._valueMax()-c._valueMin())/5;break;case a.ui.keyCode.PAGE_DOWN:k=j-(c._valueMax()-c._valueMin())/5;break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(j==c._valueMax())return;
k=j+l;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(j==c._valueMin())return;k=j-l;break}c._slide(f,g,k);return d}}).keyup(function(f){var d=a(this).data("index.ui-slider-handle");if(c._keySliding){c._stop(f,d);c._change(f,d);c._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
this._mouseDestroy();return this},_mouseCapture:function(c){var e=this.options;if(e.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var f={x:c.pageX,y:c.pageY},d=this._normValueFromMouse(f),g=this._valueMax()-this._valueMin()+1,j,k=this,l;this.handles.each(function(r){var t=Math.abs(d-k.values(r));if(g>t){g=t;j=a(this);l=r}});if(e.range==true&&this.values(1)==e.min)j=a(this.handles[++l]);this._start(c,
l);this._mouseSliding=true;k._handleIndex=l;j.addClass("ui-state-active").focus();e=j.offset();this._clickOffset=!a(c.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:c.pageX-e.left-j.width()/2,top:c.pageY-e.top-j.height()/2-(parseInt(j.css("borderTopWidth"),10)||0)-(parseInt(j.css("borderBottomWidth"),10)||0)+(parseInt(j.css("marginTop"),10)||0)};d=this._normValueFromMouse(f);this._slide(c,l,d);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(c){var e=
this._normValueFromMouse({x:c.pageX,y:c.pageY});this._slide(c,this._handleIndex,e);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(c){var e;if("horizontal"==this.orientation){e=
this.elementSize.width;c=c.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{e=this.elementSize.height;c=c.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}e=c/e;if(e>1)e=1;if(e<0)e=0;if("vertical"==this.orientation)e=1-e;c=this._valueMax()-this._valueMin();c=e*c;e=c%this.options.step;c=this._valueMin()+c-e;if(e>this.options.step/2)c+=this.options.step;return parseFloat(c.toFixed(5))},_start:function(c,e){var f={handle:this.handles[e],value:this.value()};
if(this.options.values&&this.options.values.length){f.value=this.values(e);f.values=this.values()}this._trigger("start",c,f)},_slide:function(c,e,f){if(this.options.values&&this.options.values.length){var d=this.values(e?0:1);if(this.options.values.length==2&&this.options.range===true&&(e==0&&f>d||e==1&&f<d))f=d;if(f!=this.values(e)){d=this.values();d[e]=f;c=this._trigger("slide",c,{handle:this.handles[e],value:f,values:d});this.values(e?0:1);c!==false&&this.values(e,f,true)}}else if(f!=this.value()){c=
this._trigger("slide",c,{handle:this.handles[e],value:f});c!==false&&this.value(f)}},_stop:function(c,e){var f={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(e);f.values=this.values()}this._trigger("stop",c,f)},_change:function(c,e){if(!this._keySliding&&!this._mouseSliding){var f={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(e);f.values=this.values()}this._trigger("change",
c,f)}},value:function(c){if(arguments.length){this.options.value=this._trimValue(c);this._refreshValue();this._change(null,0)}return this._value()},values:function(c,e){if(arguments.length>1){this.options.values[c]=this._trimValue(e);this._refreshValue();this._change(null,c)}if(arguments.length)if(a.isArray(arguments[0])){for(var f=this.options.values,d=arguments[0],g=0,j=f.length;g<j;g++){f[g]=this._trimValue(d[g]);this._change(null,g)}this._refreshValue()}else return this.options.values&&this.options.values.length?
this._values(c):this.value();else return this._values()},_setOption:function(c,e){a.Widget.prototype._setOption.apply(this,arguments);switch(c){case "disabled":if(e){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}case "orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+
this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();this._animateOff=false;break}},_step:function(){return this.options.step},_value:function(){return this._trimValue(this.options.value)},_values:function(c){if(arguments.length){var e=this.options.values[c];return this._trimValue(e)}else{e=this.options.values.slice();for(var f=0,d=e.length;f<d;f++)e[f]=this._trimValue(e[f]);
return e}},_trimValue:function(c){if(c<this._valueMin())c=this._valueMin();if(c>this._valueMax())c=this._valueMax();return c},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var c=this.options.range,e=this.options,f=this,d=!this._animateOff?e.animate:false;if(this.options.values&&this.options.values.length)this.handles.each(function(l){var r=(f.values(l)-f._valueMin())/(f._valueMax()-f._valueMin())*100,t={};t[f.orientation=="horizontal"?
"left":"bottom"]=r+"%";a(this).stop(1,1)[d?"animate":"css"](t,e.animate);if(f.options.range===true)if(f.orientation=="horizontal"){l==0&&f.range.stop(1,1)[d?"animate":"css"]({left:r+"%"},e.animate);l==1&&f.range[d?"animate":"css"]({width:r-lastValPercent+"%"},{queue:false,duration:e.animate})}else{l==0&&f.range.stop(1,1)[d?"animate":"css"]({bottom:r+"%"},e.animate);l==1&&f.range[d?"animate":"css"]({height:r-lastValPercent+"%"},{queue:false,duration:e.animate})}lastValPercent=r});else{var g=this.value(),
j=this._valueMin(),k=this._valueMax();g=k!=j?(g-j)/(k-j)*100:0;j={};j[f.orientation=="horizontal"?"left":"bottom"]=g+"%";this.handle.stop(1,1)[d?"animate":"css"](j,e.animate);c=="min"&&this.orientation=="horizontal"&&this.range.stop(1,1)[d?"animate":"css"]({width:g+"%"},e.animate);c=="max"&&this.orientation=="horizontal"&&this.range[d?"animate":"css"]({width:100-g+"%"},{queue:false,duration:e.animate});c=="min"&&this.orientation=="vertical"&&this.range.stop(1,1)[d?"animate":"css"]({height:g+"%"},
e.animate);c=="max"&&this.orientation=="vertical"&&this.range[d?"animate":"css"]({height:100-g+"%"},{queue:false,duration:e.animate})}}});a.extend(a.ui.slider,{version:"@VERSION"})})(jQuery);
(function(a){function c(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
minDate:null,maxDate:null,duration:"_default",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};a.extend(this._defaults,this.regional[""]);this.dpDiv=a('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}function e(d,g){a.extend(d,
g);for(var j in g)if(g[j]==null||g[j]==undefined)d[j]=g[j];return d}a.extend(a.ui,{datepicker:{version:"@VERSION"}});var f=(new Date).getTime();a.extend(c.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(d){e(this._defaults,d||{});return this},_attachDatepicker:function(d,g){var j=null;for(var k in this._defaults){var l=d.getAttribute("date:"+k);if(l){j=j||{};try{j[k]=eval(l)}catch(r){j[k]=
l}}}k=d.nodeName.toLowerCase();l=k=="div"||k=="span";if(!d.id)d.id="dp"+ ++this.uuid;var t=this._newInst(a(d),l);t.settings=a.extend({},g||{},j||{});if(k=="input")this._connectDatepicker(d,t);else l&&this._inlineDatepicker(d,t)},_newInst:function(d,g){return{id:d[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1"),input:d,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:g,dpDiv:!g?this.dpDiv:a('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
_connectDatepicker:function(d,g){var j=a(d);g.append=a([]);g.trigger=a([]);if(!j.hasClass(this.markerClassName)){this._attachments(j,g);j.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(k,l,r){g.settings[l]=r}).bind("getData.datepicker",function(k,l){return this._get(g,l)});this._autoSize(g);a.data(d,"datepicker",g)}},_attachments:function(d,g){var j=this._get(g,"appendText"),k=this._get(g,"isRTL");g.append&&
g.append.remove();if(j){g.append=a('<span class="'+this._appendClass+'">'+j+"</span>");d[k?"before":"after"](g.append)}d.unbind("focus",this._showDatepicker);g.trigger&&g.trigger.remove();j=this._get(g,"showOn");if(j=="focus"||j=="both")d.focus(this._showDatepicker);if(j=="button"||j=="both"){j=this._get(g,"buttonText");var l=this._get(g,"buttonImage");g.trigger=a(this._get(g,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:l,alt:j,title:j}):a('<button type="button"></button>').addClass(this._triggerClass).html(l==
""?j:a("<img/>").attr({src:l,alt:j,title:j})));d[k?"before":"after"](g.trigger);g.trigger.click(function(){a.datepicker._datepickerShowing&&a.datepicker._lastInput==d[0]?a.datepicker._hideDatepicker():a.datepicker._showDatepicker(d[0]);return false})}},_autoSize:function(d){if(this._get(d,"autoSize")&&!d.inline){var g=new Date(2009,11,20),j=this._get(d,"dateFormat");if(j.match(/[DM]/)){var k=function(l){for(var r=0,t=0,q=0;q<l.length;q++)if(l[q].length>r){r=l[q].length;t=q}return t};g.setMonth(k(this._get(d,
j.match(/MM/)?"monthNames":"monthNamesShort")));g.setDate(k(this._get(d,j.match(/DD/)?"dayNames":"dayNamesShort"))+20-g.getDay())}d.input.attr("size",this._formatDate(d,g).length)}},_inlineDatepicker:function(d,g){var j=a(d);if(!j.hasClass(this.markerClassName)){j.addClass(this.markerClassName).append(g.dpDiv).bind("setData.datepicker",function(k,l,r){g.settings[l]=r}).bind("getData.datepicker",function(k,l){return this._get(g,l)});a.data(d,"datepicker",g);this._setDate(g,this._getDefaultDate(g),
true);this._updateDatepicker(g);this._updateAlternate(g)}},_dialogDatepicker:function(d,g,j,k,l){d=this._dialogInst;if(!d){d="dp"+ ++this.uuid;this._dialogInput=a('<input type="text" id="'+d+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);a("body").append(this._dialogInput);d=this._dialogInst=this._newInst(this._dialogInput,false);d.settings={};a.data(this._dialogInput[0],"datepicker",d)}e(d.settings,k||{});g=g&&g.constructor==Date?
this._formatDate(d,g):g;this._dialogInput.val(g);this._pos=l?l.length?l:[l.pageX,l.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");d.settings.onSelect=j;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);
a.blockUI&&a.blockUI(this.dpDiv);a.data(this._dialogInput[0],"datepicker",d);return this},_destroyDatepicker:function(d){var g=a(d),j=a.data(d,"datepicker");if(g.hasClass(this.markerClassName)){var k=d.nodeName.toLowerCase();a.removeData(d,"datepicker");if(k=="input"){j.append.remove();j.trigger.remove();g.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(k=="div"||k=="span")g.removeClass(this.markerClassName).empty()}},
_enableDatepicker:function(d){var g=a(d),j=a.data(d,"datepicker");if(g.hasClass(this.markerClassName)){var k=d.nodeName.toLowerCase();if(k=="input"){d.disabled=false;j.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(k=="div"||k=="span")g.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=a.map(this._disabledInputs,function(l){return l==d?null:l})}},_disableDatepicker:function(d){var g=
a(d),j=a.data(d,"datepicker");if(g.hasClass(this.markerClassName)){var k=d.nodeName.toLowerCase();if(k=="input"){d.disabled=true;j.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(k=="div"||k=="span")g.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=a.map(this._disabledInputs,function(l){return l==d?null:l});this._disabledInputs[this._disabledInputs.length]=d}},_isDisabledDatepicker:function(d){if(!d)return false;
for(var g=0;g<this._disabledInputs.length;g++)if(this._disabledInputs[g]==d)return true;return false},_getInst:function(d){try{return a.data(d,"datepicker")}catch(g){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(d,g,j){var k=this._getInst(d);if(arguments.length==2&&typeof g=="string")return g=="defaults"?a.extend({},a.datepicker._defaults):k?g=="all"?a.extend({},k.settings):this._get(k,g):null;var l=g||{};if(typeof g=="string"){l={};l[g]=j}if(k){this._curInst==k&&
this._hideDatepicker();var r=this._getDateDatepicker(d,true);e(k.settings,l);this._attachments(a(d),k);this._autoSize(k);this._setDateDatepicker(d,r);this._updateDatepicker(k)}},_changeDatepicker:function(d,g,j){this._optionDatepicker(d,g,j)},_refreshDatepicker:function(d){(d=this._getInst(d))&&this._updateDatepicker(d)},_setDateDatepicker:function(d,g){if(d=this._getInst(d)){this._setDate(d,g);this._updateDatepicker(d);this._updateAlternate(d)}},_getDateDatepicker:function(d,g){(d=this._getInst(d))&&
!d.inline&&this._setDateFromField(d,g);return d?this._getDate(d):null},_doKeyDown:function(d){var g=a.datepicker._getInst(d.target),j=true,k=g.dpDiv.is(".ui-datepicker-rtl");g._keyEvent=true;if(a.datepicker._datepickerShowing)switch(d.keyCode){case 9:a.datepicker._hideDatepicker();j=false;break;case 13:j=a("td."+a.datepicker._dayOverClass,g.dpDiv).add(a("td."+a.datepicker._currentClass,g.dpDiv));j[0]?a.datepicker._selectDay(d.target,g.selectedMonth,g.selectedYear,j[0]):a.datepicker._hideDatepicker();
return false;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(d.target,d.ctrlKey?-a.datepicker._get(g,"stepBigMonths"):-a.datepicker._get(g,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(d.target,d.ctrlKey?+a.datepicker._get(g,"stepBigMonths"):+a.datepicker._get(g,"stepMonths"),"M");break;case 35:if(d.ctrlKey||d.metaKey)a.datepicker._clearDate(d.target);j=d.ctrlKey||d.metaKey;break;case 36:if(d.ctrlKey||d.metaKey)a.datepicker._gotoToday(d.target);j=d.ctrlKey||
d.metaKey;break;case 37:if(d.ctrlKey||d.metaKey)a.datepicker._adjustDate(d.target,k?+1:-1,"D");j=d.ctrlKey||d.metaKey;if(d.originalEvent.altKey)a.datepicker._adjustDate(d.target,d.ctrlKey?-a.datepicker._get(g,"stepBigMonths"):-a.datepicker._get(g,"stepMonths"),"M");break;case 38:if(d.ctrlKey||d.metaKey)a.datepicker._adjustDate(d.target,-7,"D");j=d.ctrlKey||d.metaKey;break;case 39:if(d.ctrlKey||d.metaKey)a.datepicker._adjustDate(d.target,k?-1:+1,"D");j=d.ctrlKey||d.metaKey;if(d.originalEvent.altKey)a.datepicker._adjustDate(d.target,
d.ctrlKey?+a.datepicker._get(g,"stepBigMonths"):+a.datepicker._get(g,"stepMonths"),"M");break;case 40:if(d.ctrlKey||d.metaKey)a.datepicker._adjustDate(d.target,+7,"D");j=d.ctrlKey||d.metaKey;break;default:j=false}else if(d.keyCode==36&&d.ctrlKey)a.datepicker._showDatepicker(this);else j=false;if(j){d.preventDefault();d.stopPropagation()}},_doKeyPress:function(d){var g=a.datepicker._getInst(d.target);if(a.datepicker._get(g,"constrainInput")){g=a.datepicker._possibleChars(a.datepicker._get(g,"dateFormat"));
var j=String.fromCharCode(d.charCode==undefined?d.keyCode:d.charCode);return d.ctrlKey||j<" "||!g||g.indexOf(j)>-1}},_doKeyUp:function(d){d=a.datepicker._getInst(d.target);if(d.input.val()!=d.lastVal)try{if(a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.datepicker._getFormatConfig(d))){a.datepicker._setDateFromField(d);a.datepicker._updateAlternate(d);a.datepicker._updateDatepicker(d)}}catch(g){a.datepicker.log(g)}return true},_showDatepicker:function(d){d=d.target||
d;if(d.nodeName.toLowerCase()!="input")d=a("input",d.parentNode)[0];if(!(a.datepicker._isDisabledDatepicker(d)||a.datepicker._lastInput==d)){var g=a.datepicker._getInst(d);a.datepicker._curInst&&a.datepicker._curInst!=g&&a.datepicker._curInst.dpDiv.stop(true,true);var j=a.datepicker._get(g,"beforeShow");e(g.settings,j?j.apply(d,[d,g]):{});g.lastVal=null;a.datepicker._lastInput=d;a.datepicker._setDateFromField(g);if(a.datepicker._inDialog)d.value="";if(!a.datepicker._pos){a.datepicker._pos=a.datepicker._findPos(d);
a.datepicker._pos[1]+=d.offsetHeight}var k=false;a(d).parents().each(function(){k|=a(this).css("position")=="fixed";return!k});if(k&&a.browser.opera){a.datepicker._pos[0]-=document.documentElement.scrollLeft;a.datepicker._pos[1]-=document.documentElement.scrollTop}j={left:a.datepicker._pos[0],top:a.datepicker._pos[1]};a.datepicker._pos=null;g.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});a.datepicker._updateDatepicker(g);j=a.datepicker._checkOffset(g,j,k);g.dpDiv.css({position:a.datepicker._inDialog&&
a.blockUI?"static":k?"fixed":"absolute",display:"none",left:j.left+"px",top:j.top+"px"});if(!g.inline){j=a.datepicker._get(g,"showAnim");var l=a.datepicker._get(g,"duration"),r=function(){a.datepicker._datepickerShowing=true;var t=a.datepicker._getBorders(g.dpDiv);g.dpDiv.find("iframe.ui-datepicker-cover").css({left:-t[0],top:-t[1],width:g.dpDiv.outerWidth(),height:g.dpDiv.outerHeight()})};g.dpDiv.zIndex(a(d).zIndex()+1);a.effects&&a.effects[j]?g.dpDiv.show(j,a.datepicker._get(g,"showOptions"),l,
r):g.dpDiv[j||"show"](j?l:null,r);j||r();g.input.is(":visible")&&!g.input.is(":disabled")&&g.input.focus();a.datepicker._curInst=g}}},_updateDatepicker:function(d){var g=this,j=a.datepicker._getBorders(d.dpDiv);d.dpDiv.empty().append(this._generateHTML(d)).find("iframe.ui-datepicker-cover").css({left:-j[0],top:-j[1],width:d.dpDiv.outerWidth(),height:d.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){a(this).removeClass("ui-state-hover");
this.className.indexOf("ui-datepicker-prev")!=-1&&a(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&a(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!g._isDisabledDatepicker(d.inline?d.dpDiv.parent()[0]:d.input[0])){a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");a(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&a(this).addClass("ui-datepicker-prev-hover");
this.className.indexOf("ui-datepicker-next")!=-1&&a(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();j=this._getNumberOfMonths(d);var k=j[1];k>1?d.dpDiv.addClass("ui-datepicker-multi-"+k).css("width",17*k+"em"):d.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");d.dpDiv[(j[0]!=1||j[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");d.dpDiv[(this._get(d,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");
d==a.datepicker._curInst&&a.datepicker._datepickerShowing&&d.input&&d.input.is(":visible")&&!d.input.is(":disabled")&&d.input.focus()},_getBorders:function(d){var g=function(j){return{thin:1,medium:2,thick:3}[j]||j};return[parseFloat(g(d.css("border-left-width"))),parseFloat(g(d.css("border-top-width")))]},_checkOffset:function(d,g,j){var k=d.dpDiv.outerWidth(),l=d.dpDiv.outerHeight(),r=d.input?d.input.outerWidth():0,t=d.input?d.input.outerHeight():0,q=document.documentElement.clientWidth+a(document).scrollLeft(),
p=document.documentElement.clientHeight+a(document).scrollTop();g.left-=this._get(d,"isRTL")?k-r:0;g.left-=j&&g.left==d.input.offset().left?a(document).scrollLeft():0;g.top-=j&&g.top==d.input.offset().top+t?a(document).scrollTop():0;g.left-=Math.min(g.left,g.left+k>q&&q>k?Math.abs(g.left+k-q):0);g.top-=Math.min(g.top,g.top+l>p&&p>l?Math.abs(l+t):0);return g},_findPos:function(d){for(var g=this._get(this._getInst(d),"isRTL");d&&(d.type=="hidden"||d.nodeType!=1);)d=d[g?"previousSibling":"nextSibling"];
d=a(d).offset();return[d.left,d.top]},_hideDatepicker:function(d){var g=this._curInst;if(!(!g||d&&g!=a.data(d,"datepicker")))if(this._datepickerShowing){d=this._get(g,"showAnim");var j=this._get(g,"duration"),k=function(){a.datepicker._tidyDialog(g);this._curInst=null};a.effects&&a.effects[d]?g.dpDiv.hide(d,a.datepicker._get(g,"showOptions"),j,k):g.dpDiv[d=="slideDown"?"slideUp":d=="fadeIn"?"fadeOut":"hide"](d?j:null,k);d||k();if(d=this._get(g,"onClose"))d.apply(g.input?g.input[0]:null,[g.input?g.input.val():
"",g]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(a.blockUI){a.unblockUI();a("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(d){d.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(d){if(a.datepicker._curInst){d=a(d.target);d[0].id!=a.datepicker._mainDivId&&d.parents("#"+a.datepicker._mainDivId).length==0&&!d.hasClass(a.datepicker.markerClassName)&&
!d.hasClass(a.datepicker._triggerClass)&&a.datepicker._datepickerShowing&&!(a.datepicker._inDialog&&a.blockUI)&&a.datepicker._hideDatepicker()}},_adjustDate:function(d,g,j){d=a(d);var k=this._getInst(d[0]);if(!this._isDisabledDatepicker(d[0])){this._adjustInstDate(k,g+(j=="M"?this._get(k,"showCurrentAtPos"):0),j);this._updateDatepicker(k)}},_gotoToday:function(d){d=a(d);var g=this._getInst(d[0]);if(this._get(g,"gotoCurrent")&&g.currentDay){g.selectedDay=g.currentDay;g.drawMonth=g.selectedMonth=g.currentMonth;
g.drawYear=g.selectedYear=g.currentYear}else{var j=new Date;g.selectedDay=j.getDate();g.drawMonth=g.selectedMonth=j.getMonth();g.drawYear=g.selectedYear=j.getFullYear()}this._notifyChange(g);this._adjustDate(d)},_selectMonthYear:function(d,g,j){d=a(d);var k=this._getInst(d[0]);k._selectingMonthYear=false;k["selected"+(j=="M"?"Month":"Year")]=k["draw"+(j=="M"?"Month":"Year")]=parseInt(g.options[g.selectedIndex].value,10);this._notifyChange(k);this._adjustDate(d)},_clickMonthYear:function(d){d=this._getInst(a(d)[0]);
d.input&&d._selectingMonthYear&&!a.browser.msie&&d.input.focus();d._selectingMonthYear=!d._selectingMonthYear},_selectDay:function(d,g,j,k){var l=a(d);if(!(a(k).hasClass(this._unselectableClass)||this._isDisabledDatepicker(l[0]))){l=this._getInst(l[0]);l.selectedDay=l.currentDay=a("a",k).html();l.selectedMonth=l.currentMonth=g;l.selectedYear=l.currentYear=j;this._selectDate(d,this._formatDate(l,l.currentDay,l.currentMonth,l.currentYear))}},_clearDate:function(d){d=a(d);this._getInst(d[0]);this._selectDate(d,
"")},_selectDate:function(d,g){d=this._getInst(a(d)[0]);g=g!=null?g:this._formatDate(d);d.input&&d.input.val(g);this._updateAlternate(d);var j=this._get(d,"onSelect");if(j)j.apply(d.input?d.input[0]:null,[g,d]);else d.input&&d.input.trigger("change");if(d.inline)this._updateDatepicker(d);else{this._hideDatepicker();this._lastInput=d.input[0];typeof d.input[0]!="object"&&d.input.focus();this._lastInput=null}},_updateAlternate:function(d){var g=this._get(d,"altField");if(g){var j=this._get(d,"altFormat")||
this._get(d,"dateFormat"),k=this._getDate(d),l=this.formatDate(j,k,this._getFormatConfig(d));a(g).each(function(){a(this).val(l)})}},noWeekends:function(d){d=d.getDay();return[d>0&&d<6,""]},iso8601Week:function(d){d=new Date(d.getTime());d.setDate(d.getDate()+4-(d.getDay()||7));var g=d.getTime();d.setMonth(0);d.setDate(1);return Math.floor(Math.round((g-d)/864E5)/7)+1},parseDate:function(d,g,j){if(d==null||g==null)throw"Invalid arguments";g=typeof g=="object"?g.toString():g+"";if(g=="")return null;
for(var k=(j?j.shortYearCutoff:null)||this._defaults.shortYearCutoff,l=(j?j.dayNamesShort:null)||this._defaults.dayNamesShort,r=(j?j.dayNames:null)||this._defaults.dayNames,t=(j?j.monthNamesShort:null)||this._defaults.monthNamesShort,q=(j?j.monthNames:null)||this._defaults.monthNames,p=j=-1,o=-1,n=-1,u=false,h=function(G){(G=z+1<d.length&&d.charAt(z+1)==G)&&z++;return G},s=function(G){h(G);G=new RegExp("^\\d{1,"+(G=="@"?14:G=="!"?20:G=="y"?4:G=="o"?3:2)+"}");G=g.substring(B).match(G);if(!G)throw"Missing number at position "+
B;B+=G[0].length;return parseInt(G[0],10)},v=function(G,I,Y){G=h(G)?Y:I;for(I=0;I<G.length;I++)if(g.substr(B,G[I].length)==G[I]){B+=G[I].length;return I+1}throw"Unknown name at position "+B;},y=function(){if(g.charAt(B)!=d.charAt(z))throw"Unexpected literal at position "+B;B++},B=0,z=0;z<d.length;z++)if(u)if(d.charAt(z)=="'"&&!h("'"))u=false;else y();else switch(d.charAt(z)){case "d":o=s("d");break;case "D":v("D",l,r);break;case "o":n=s("o");break;case "m":p=s("m");break;case "M":p=v("M",t,q);break;
case "y":j=s("y");break;case "@":var C=new Date(s("@"));j=C.getFullYear();p=C.getMonth()+1;o=C.getDate();break;case "!":C=new Date((s("!")-this._ticksTo1970)/1E4);j=C.getFullYear();p=C.getMonth()+1;o=C.getDate();break;case "'":if(h("'"))y();else u=true;break;default:y()}if(j==-1)j=(new Date).getFullYear();else if(j<100)j+=(new Date).getFullYear()-(new Date).getFullYear()%100+(j<=k?0:-100);if(n>-1){p=1;o=n;do{k=this._getDaysInMonth(j,p-1);if(o<=k)break;p++;o-=k}while(1)}C=this._daylightSavingAdjust(new Date(j,
p-1,o));if(C.getFullYear()!=j||C.getMonth()+1!=p||C.getDate()!=o)throw"Invalid date";return C},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(d,g,j){if(!g)return"";var k=(j?j.dayNamesShort:null)||this._defaults.dayNamesShort,l=(j?
j.dayNames:null)||this._defaults.dayNames,r=(j?j.monthNamesShort:null)||this._defaults.monthNamesShort;j=(j?j.monthNames:null)||this._defaults.monthNames;var t=function(h){(h=u+1<d.length&&d.charAt(u+1)==h)&&u++;return h},q=function(h,s,v){s=""+s;if(t(h))for(;s.length<v;)s="0"+s;return s},p=function(h,s,v,y){return t(h)?y[s]:v[s]},o="",n=false;if(g)for(var u=0;u<d.length;u++)if(n)if(d.charAt(u)=="'"&&!t("'"))n=false;else o+=d.charAt(u);else switch(d.charAt(u)){case "d":o+=q("d",g.getDate(),2);break;
case "D":o+=p("D",g.getDay(),k,l);break;case "o":o+=q("o",(g.getTime()-(new Date(g.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":o+=q("m",g.getMonth()+1,2);break;case "M":o+=p("M",g.getMonth(),r,j);break;case "y":o+=t("y")?g.getFullYear():(g.getYear()%100<10?"0":"")+g.getYear()%100;break;case "@":o+=g.getTime();break;case "!":o+=g.getTime()*1E4+this._ticksTo1970;break;case "'":if(t("'"))o+="'";else n=true;break;default:o+=d.charAt(u)}return o},_possibleChars:function(d){for(var g="",j=false,
k=function(r){(r=l+1<d.length&&d.charAt(l+1)==r)&&l++;return r},l=0;l<d.length;l++)if(j)if(d.charAt(l)=="'"&&!k("'"))j=false;else g+=d.charAt(l);else switch(d.charAt(l)){case "d":case "m":case "y":case "@":g+="0123456789";break;case "D":case "M":return null;case "'":if(k("'"))g+="'";else j=true;break;default:g+=d.charAt(l)}return g},_get:function(d,g){return d.settings[g]!==undefined?d.settings[g]:this._defaults[g]},_setDateFromField:function(d,g){if(d.input.val()!=d.lastVal){var j=this._get(d,"dateFormat"),
k=d.lastVal=d.input?d.input.val():null,l,r;l=r=this._getDefaultDate(d);var t=this._getFormatConfig(d);try{l=this.parseDate(j,k,t)||r}catch(q){this.log(q);k=g?"":k}d.selectedDay=l.getDate();d.drawMonth=d.selectedMonth=l.getMonth();d.drawYear=d.selectedYear=l.getFullYear();d.currentDay=k?l.getDate():0;d.currentMonth=k?l.getMonth():0;d.currentYear=k?l.getFullYear():0;this._adjustInstDate(d)}},_getDefaultDate:function(d){return this._restrictMinMax(d,this._determineDate(d,this._get(d,"defaultDate"),new Date))},
_determineDate:function(d,g,j){var k=function(r){var t=new Date;t.setDate(t.getDate()+r);return t},l=function(r){try{return a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),r,a.datepicker._getFormatConfig(d))}catch(t){}var q=(r.toLowerCase().match(/^c/)?a.datepicker._getDate(d):null)||new Date,p=q.getFullYear(),o=q.getMonth();q=q.getDate();for(var n=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=n.exec(r);u;){switch(u[2]||"d"){case "d":case "D":q+=parseInt(u[1],10);break;case "w":case "W":q+=parseInt(u[1],
10)*7;break;case "m":case "M":o+=parseInt(u[1],10);q=Math.min(q,a.datepicker._getDaysInMonth(p,o));break;case "y":case "Y":p+=parseInt(u[1],10);q=Math.min(q,a.datepicker._getDaysInMonth(p,o));break}u=n.exec(r)}return new Date(p,o,q)};if(g=(g=g==null?j:typeof g=="string"?l(g):typeof g=="number"?isNaN(g)?j:k(g):g)&&g.toString()=="Invalid Date"?j:g){g.setHours(0);g.setMinutes(0);g.setSeconds(0);g.setMilliseconds(0)}return this._daylightSavingAdjust(g)},_daylightSavingAdjust:function(d){if(!d)return null;
d.setHours(d.getHours()>12?d.getHours()+2:0);return d},_setDate:function(d,g,j){var k=!g,l=d.selectedMonth,r=d.selectedYear;g=this._restrictMinMax(d,this._determineDate(d,g,new Date));d.selectedDay=d.currentDay=g.getDate();d.drawMonth=d.selectedMonth=d.currentMonth=g.getMonth();d.drawYear=d.selectedYear=d.currentYear=g.getFullYear();if((l!=d.selectedMonth||r!=d.selectedYear)&&!j)this._notifyChange(d);this._adjustInstDate(d);if(d.input)d.input.val(k?"":this._formatDate(d))},_getDate:function(d){return!d.currentYear||
d.input&&d.input.val()==""?null:this._daylightSavingAdjust(new Date(d.currentYear,d.currentMonth,d.currentDay))},_generateHTML:function(d){var g=new Date;g=this._daylightSavingAdjust(new Date(g.getFullYear(),g.getMonth(),g.getDate()));var j=this._get(d,"isRTL"),k=this._get(d,"showButtonPanel"),l=this._get(d,"hideIfNoPrevNext"),r=this._get(d,"navigationAsDateFormat"),t=this._getNumberOfMonths(d),q=this._get(d,"showCurrentAtPos"),p=this._get(d,"stepMonths"),o=t[0]!=1||t[1]!=1,n=this._daylightSavingAdjust(!d.currentDay?
new Date(9999,9,9):new Date(d.currentYear,d.currentMonth,d.currentDay)),u=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");q=d.drawMonth-q;var s=d.drawYear;if(q<0){q+=12;s--}if(h){var v=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth()-t[0]*t[1]+1,h.getDate()));for(v=u&&v<u?u:v;this._daylightSavingAdjust(new Date(s,q,1))>v;){q--;if(q<0){q=11;s--}}}d.drawMonth=q;d.drawYear=s;v=this._get(d,"prevText");v=!r?v:this.formatDate(v,this._daylightSavingAdjust(new Date(s,q-p,1)),this._getFormatConfig(d));
v=this._canAdjustMonth(d,-1,s,q)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+f+".datepicker._adjustDate('#"+d.id+"', -"+p+", 'M');\" title=\""+v+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"e":"w")+'">'+v+"</span></a>":l?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+v+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"e":"w")+'">'+v+"</span></a>";var y=this._get(d,"nextText");y=!r?y:this.formatDate(y,this._daylightSavingAdjust(new Date(s,
q+p,1)),this._getFormatConfig(d));l=this._canAdjustMonth(d,+1,s,q)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+f+".datepicker._adjustDate('#"+d.id+"', +"+p+", 'M');\" title=\""+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"w":"e")+'">'+y+"</span></a>":l?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"w":"e")+'">'+y+"</span></a>";p=this._get(d,"currentText");y=this._get(d,"gotoCurrent")&&
d.currentDay?n:g;p=!r?p:this.formatDate(p,y,this._getFormatConfig(d));r=!d.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+f+'.datepicker._hideDatepicker();">'+this._get(d,"closeText")+"</button>":"";k=k?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(j?r:"")+(this._isInRange(d,y)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
f+".datepicker._gotoToday('#"+d.id+"');\">"+p+"</button>":"")+(j?"":r)+"</div>":"";r=parseInt(this._get(d,"firstDay"),10);r=isNaN(r)?0:r;p=this._get(d,"showWeek");y=this._get(d,"dayNames");this._get(d,"dayNamesShort");var B=this._get(d,"dayNamesMin"),z=this._get(d,"monthNames"),C=this._get(d,"monthNamesShort"),G=this._get(d,"beforeShowDay"),I=this._get(d,"showOtherMonths"),Y=this._get(d,"selectOtherMonths");this._get(d,"calculateWeek");for(var Q=this._getDefaultDate(d),K="",W=0;W<t[0];W++){for(var F=
"",N=0;N<t[1];N++){var J=this._daylightSavingAdjust(new Date(s,q,d.selectedDay)),L=" ui-corner-all",ba="";if(o){ba+='<div class="ui-datepicker-group';if(t[1]>1)switch(N){case 0:ba+=" ui-datepicker-group-first";L=" ui-corner-"+(j?"right":"left");break;case t[1]-1:ba+=" ui-datepicker-group-last";L=" ui-corner-"+(j?"left":"right");break;default:ba+=" ui-datepicker-group-middle";L="";break}ba+='">'}ba+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+L+'">'+(/all|left/.test(L)&&
W==0?j?l:v:"")+(/all|right/.test(L)&&W==0?j?v:l:"")+this._generateMonthYearHeader(d,q,s,u,h,W>0||N>0,z,C)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var aa=p?'<th class="ui-datepicker-week-col">'+this._get(d,"weekHeader")+"</th>":"";for(L=0;L<7;L++){var ca=(L+r)%7;aa+="<th"+((L+r+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+y[ca]+'">'+B[ca]+"</span></th>"}ba+=aa+"</tr></thead><tbody>";aa=this._getDaysInMonth(s,q);if(s==d.selectedYear&&q==d.selectedMonth)d.selectedDay=
Math.min(d.selectedDay,aa);L=(this._getFirstDayOfMonth(s,q)-r+7)%7;aa=o?6:Math.ceil((L+aa)/7);ca=this._daylightSavingAdjust(new Date(s,q,1-L));for(var ua=0;ua<aa;ua++){ba+="<tr>";var ka=!p?"":'<td class="ui-datepicker-week-col">'+this._get(d,"calculateWeek")(ca)+"</td>";for(L=0;L<7;L++){var ra=G?G.apply(d.input?d.input[0]:null,[ca]):[true,""],ma=ca.getMonth()!=q,la=ma&&!Y||!ra[0]||u&&ca<u||h&&ca>h;ka+='<td class="'+((L+r+6)%7>=5?" ui-datepicker-week-end":"")+(ma?" ui-datepicker-other-month":"")+(ca.getTime()==
J.getTime()&&q==d.selectedMonth&&d._keyEvent||Q.getTime()==ca.getTime()&&Q.getTime()==J.getTime()?" "+this._dayOverClass:"")+(la?" "+this._unselectableClass+" ui-state-disabled":"")+(ma&&!I?"":" "+ra[1]+(ca.getTime()==n.getTime()?" "+this._currentClass:"")+(ca.getTime()==g.getTime()?" ui-datepicker-today":""))+'"'+((!ma||I)&&ra[2]?' title="'+ra[2]+'"':"")+(la?"":' onclick="DP_jQuery_'+f+".datepicker._selectDay('#"+d.id+"',"+ca.getMonth()+","+ca.getFullYear()+', this);return false;"')+">"+(ma&&!I?
"&#xa0;":la?'<span class="ui-state-default">'+ca.getDate()+"</span>":'<a class="ui-state-default'+(ca.getTime()==g.getTime()?" ui-state-highlight":"")+(ca.getTime()==n.getTime()?" ui-state-active":"")+(ma?" ui-priority-secondary":"")+'" href="#">'+ca.getDate()+"</a>")+"</td>";ca.setDate(ca.getDate()+1);ca=this._daylightSavingAdjust(ca)}ba+=ka+"</tr>"}q++;if(q>11){q=0;s++}ba+="</tbody></table>"+(o?"</div>"+(t[0]>0&&N==t[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");F+=ba}K+=F}K+=k+(a.browser.msie&&
parseInt(a.browser.version,10)<7&&!d.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");d._keyEvent=false;return K},_generateMonthYearHeader:function(d,g,j,k,l,r,t,q){var p=this._get(d,"changeMonth"),o=this._get(d,"changeYear"),n=this._get(d,"showMonthAfterYear"),u='<div class="ui-datepicker-title">',h="";if(r||!p)h+='<span class="ui-datepicker-month">'+t[g]+"</span>";else{t=k&&k.getFullYear()==j;var s=l&&l.getFullYear()==j;h+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+
f+".datepicker._selectMonthYear('#"+d.id+"', this, 'M');\" onclick=\"DP_jQuery_"+f+".datepicker._clickMonthYear('#"+d.id+"');\">";for(var v=0;v<12;v++)if((!t||v>=k.getMonth())&&(!s||v<=l.getMonth()))h+='<option value="'+v+'"'+(v==g?' selected="selected"':"")+">"+q[v]+"</option>";h+="</select>"}n||(u+=h+(r||!(p&&o)?"&#xa0;":""));if(r||!o)u+='<span class="ui-datepicker-year">'+j+"</span>";else{q=this._get(d,"yearRange").split(":");var y=(new Date).getFullYear();t=function(B){B=B.match(/c[+-].*/)?j+
parseInt(B.substring(1),10):B.match(/[+-].*/)?y+parseInt(B,10):parseInt(B,10);return isNaN(B)?y:B};g=t(q[0]);q=Math.max(g,t(q[1]||""));g=k?Math.max(g,k.getFullYear()):g;q=l?Math.min(q,l.getFullYear()):q;for(u+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+f+".datepicker._selectMonthYear('#"+d.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+f+".datepicker._clickMonthYear('#"+d.id+"');\">";g<=q;g++)u+='<option value="'+g+'"'+(g==j?' selected="selected"':"")+">"+g+"</option>";u+="</select>"}u+=
this._get(d,"yearSuffix");if(n)u+=(r||!(p&&o)?"&#xa0;":"")+h;u+="</div>";return u},_adjustInstDate:function(d,g,j){var k=d.drawYear+(j=="Y"?g:0),l=d.drawMonth+(j=="M"?g:0);g=Math.min(d.selectedDay,this._getDaysInMonth(k,l))+(j=="D"?g:0);k=this._restrictMinMax(d,this._daylightSavingAdjust(new Date(k,l,g)));d.selectedDay=k.getDate();d.drawMonth=d.selectedMonth=k.getMonth();d.drawYear=d.selectedYear=k.getFullYear();if(j=="M"||j=="Y")this._notifyChange(d)},_restrictMinMax:function(d,g){var j=this._getMinMaxDate(d,
"min");d=this._getMinMaxDate(d,"max");g=j&&g<j?j:g;return d&&g>d?d:g},_notifyChange:function(d){var g=this._get(d,"onChangeMonthYear");if(g)g.apply(d.input?d.input[0]:null,[d.selectedYear,d.selectedMonth+1,d])},_getNumberOfMonths:function(d){d=this._get(d,"numberOfMonths");return d==null?[1,1]:typeof d=="number"?[1,d]:d},_getMinMaxDate:function(d,g){return this._determineDate(d,this._get(d,g+"Date"),null)},_getDaysInMonth:function(d,g){return 32-(new Date(d,g,32)).getDate()},_getFirstDayOfMonth:function(d,
g){return(new Date(d,g,1)).getDay()},_canAdjustMonth:function(d,g,j,k){var l=this._getNumberOfMonths(d);j=this._daylightSavingAdjust(new Date(j,k+(g<0?g:l[0]*l[1]),1));g<0&&j.setDate(this._getDaysInMonth(j.getFullYear(),j.getMonth()));return this._isInRange(d,j)},_isInRange:function(d,g){var j=this._getMinMaxDate(d,"min");d=this._getMinMaxDate(d,"max");return(!j||g.getTime()>=j.getTime())&&(!d||g.getTime()<=d.getTime())},_getFormatConfig:function(d){var g=this._get(d,"shortYearCutoff");g=typeof g!=
"string"?g:(new Date).getFullYear()%100+parseInt(g,10);return{shortYearCutoff:g,dayNamesShort:this._get(d,"dayNamesShort"),dayNames:this._get(d,"dayNames"),monthNamesShort:this._get(d,"monthNamesShort"),monthNames:this._get(d,"monthNames")}},_formatDate:function(d,g,j,k){if(!g){d.currentDay=d.selectedDay;d.currentMonth=d.selectedMonth;d.currentYear=d.selectedYear}g=g?typeof g=="object"?g:this._daylightSavingAdjust(new Date(k,j,g)):this._daylightSavingAdjust(new Date(d.currentYear,d.currentMonth,d.currentDay));
return this.formatDate(this._get(d,"dateFormat"),g,this._getFormatConfig(d))}});a.fn.datepicker=function(d){if(!a.datepicker.initialized){a(document).mousedown(a.datepicker._checkExternalClick).find("body").append(a.datepicker.dpDiv);a.datepicker.initialized=true}var g=Array.prototype.slice.call(arguments,1);if(typeof d=="string"&&(d=="isDisabled"||d=="getDate"||d=="widget"))return a.datepicker["_"+d+"Datepicker"].apply(a.datepicker,[this[0]].concat(g));if(d=="option"&&arguments.length==2&&typeof arguments[1]==
"string")return a.datepicker["_"+d+"Datepicker"].apply(a.datepicker,[this[0]].concat(g));return this.each(function(){typeof d=="string"?a.datepicker["_"+d+"Datepicker"].apply(a.datepicker,[this].concat(g)):a.datepicker._attachDatepicker(this,d)})};a.datepicker=new c;a.datepicker.initialized=false;a.datepicker.uuid=(new Date).getTime();a.datepicker.version="@VERSION";window["DP_jQuery_"+f]=a})(jQuery);
jQuery.effects||function(a){function c(t){var q;if(t&&t.constructor==Array&&t.length==3)return t;if(q=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))return[parseInt(q[1],10),parseInt(q[2],10),parseInt(q[3],10)];if(q=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(t))return[parseFloat(q[1])*2.55,parseFloat(q[2])*2.55,parseFloat(q[3])*2.55];if(q=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))return[parseInt(q[1],
16),parseInt(q[2],16),parseInt(q[3],16)];if(q=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(t))return[parseInt(q[1]+q[1],16),parseInt(q[2]+q[2],16),parseInt(q[3]+q[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(t))return k.transparent;return k[a.trim(t).toLowerCase()]}function e(t,q){var p;do{p=a.curCSS(t,q);if(p!=""&&p!="transparent"||a.nodeName(t,"body"))break;q="backgroundColor"}while(t=t.parentNode);return c(p)}function f(){var t=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
q={},p,o;if(t&&t.length&&t[0]&&t[t[0]])for(var n=t.length;n--;){p=t[n];if(typeof t[p]=="string"){o=p.replace(/\-(\w)/g,function(u,h){return h.toUpperCase()});q[o]=t[p]}}else for(p in t)if(typeof t[p]==="string")q[p]=t[p];return q}function d(t){var q,p;for(q in t){p=t[q];if(p==null||a.isFunction(p)||q in r||/scrollbar/.test(q)||!/color/i.test(q)&&isNaN(parseFloat(p)))delete t[q]}return t}function g(t,q){var p={_:0},o;for(o in q)if(t[o]!=q[o])p[o]=q[o];return p}function j(t,q,p,o){if(typeof t=="object"){o=
q;p=null;q=t;t=q.effect}if(a.isFunction(q)){o=q;p=null;q={}}if(typeof q=="number"||a.fx.speeds[q]){o=p;p=q;q={}}q=q||{};p=p||q.duration;p=a.fx.off?0:typeof p=="number"?p:a.fx.speeds[p]||a.fx.speeds._default;o=o||q.complete;return[t,q,p,o]}a.effects={};a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(t,q){a.fx.step[q]=function(p){if(!p.colorInit){p.start=e(p.elem,q);p.end=c(p.end);p.colorInit=true}p.elem.style[q]="rgb("+
Math.max(Math.min(parseInt(p.pos*(p.end[0]-p.start[0])+p.start[0],10),255),0)+","+Math.max(Math.min(parseInt(p.pos*(p.end[1]-p.start[1])+p.start[1],10),255),0)+","+Math.max(Math.min(parseInt(p.pos*(p.end[2]-p.start[2])+p.start[2],10),255),0)+")"}});var k={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,
0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,
203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},l=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(t,q,p,o){if(a.isFunction(p)){o=p;p=null}return this.each(function(){var n=a(this),u=n.attr("style")||" ",h=d(f.call(this)),s,v=n.attr("className");a.each(l,function(y,B){t[B]&&n[B+"Class"](t[B])});
s=d(f.call(this));n.attr("className",v);n.animate(g(h,s),q,p,function(){a.each(l,function(y,B){t[B]&&n[B+"Class"](t[B])});if(typeof n.attr("style")=="object"){n.attr("style").cssText="";n.attr("style").cssText=u}else n.attr("style",u);o&&o.apply(this,arguments)})})};a.fn.extend({_addClass:a.fn.addClass,addClass:function(t,q,p,o){return q?a.effects.animateClass.apply(this,[{add:t},q,p,o]):this._addClass(t)},_removeClass:a.fn.removeClass,removeClass:function(t,q,p,o){return q?a.effects.animateClass.apply(this,
[{remove:t},q,p,o]):this._removeClass(t)},_toggleClass:a.fn.toggleClass,toggleClass:function(t,q,p,o,n){return typeof q=="boolean"||q===undefined?p?a.effects.animateClass.apply(this,[q?{add:t}:{remove:t},p,o,n]):this._toggleClass(t,q):a.effects.animateClass.apply(this,[{toggle:t},q,p,o])},switchClass:function(t,q,p,o,n){return a.effects.animateClass.apply(this,[{add:q,remove:t},p,o,n])}});a.extend(a.effects,{version:"@VERSION",save:function(t,q){for(var p=0;p<q.length;p++)q[p]!==null&&t.data("ec.storage."+
q[p],t[0].style[q[p]])},restore:function(t,q){for(var p=0;p<q.length;p++)q[p]!==null&&t.css(q[p],t.data("ec.storage."+q[p]))},setMode:function(t,q){if(q=="toggle")q=t.is(":hidden")?"show":"hide";return q},getBaseline:function(t,q){var p;switch(t[0]){case "top":p=0;break;case "middle":p=0.5;break;case "bottom":p=1;break;default:p=t[0]/q.height}switch(t[1]){case "left":t=0;break;case "center":t=0.5;break;case "right":t=1;break;default:t=t[1]/q.width}return{x:t,y:p}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();
var q={width:t.outerWidth(true),height:t.outerHeight(true),"float":t.css("float")},p=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});t.wrap(p);p=t.parent();if(t.css("position")=="static"){p.css({position:"relative"});t.css({position:"relative"})}else{a.extend(q,{position:t.css("position"),zIndex:t.css("z-index")});a.each(["top","left","bottom","right"],function(o,n){q[n]=t.css(n);if(isNaN(parseInt(q[n],10)))q[n]="auto"});
t.css({position:"relative",top:0,left:0})}return p.css(q).show()},removeWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent().replaceWith(t);return t},setTransition:function(t,q,p,o){o=o||{};a.each(q,function(n,u){unit=t.cssUnit(u);if(unit[0]>0)o[u]=unit[0]*p+unit[1]});return o}});a.fn.extend({effect:function(t){var q=j.apply(this,arguments);q={options:q[1],duration:q[2],callback:q[3]};var p=a.effects[t];return p&&!a.fx.off?p.call(this,q):this},_show:a.fn.show,show:function(t){if(!t||
typeof t=="number"||a.fx.speeds[t])return this._show.apply(this,arguments);else{var q=j.apply(this,arguments);q[1].mode="show";return this.effect.apply(this,q)}},_hide:a.fn.hide,hide:function(t){if(!t||typeof t=="number"||a.fx.speeds[t])return this._hide.apply(this,arguments);else{var q=j.apply(this,arguments);q[1].mode="hide";return this.effect.apply(this,q)}},__toggle:a.fn.toggle,toggle:function(t){if(!t||typeof t=="number"||a.fx.speeds[t]||typeof t=="boolean"||a.isFunction(t))return this.__toggle.apply(this,
arguments);else{var q=j.apply(this,arguments);q[1].mode="toggle";return this.effect.apply(this,q)}},cssUnit:function(t){var q=this.css(t),p=[];a.each(["em","px","%","pt"],function(o,n){if(q.indexOf(n)>0)p=[parseFloat(q),n]});return p}});a.easing.jswing=a.easing.swing;a.extend(a.easing,{def:"easeOutQuad",swing:function(t,q,p,o,n){return a.easing[a.easing.def](t,q,p,o,n)},easeInQuad:function(t,q,p,o,n){return o*(q/=n)*q+p},easeOutQuad:function(t,q,p,o,n){return-o*(q/=n)*(q-2)+p},easeInOutQuad:function(t,
q,p,o,n){if((q/=n/2)<1)return o/2*q*q+p;return-o/2*(--q*(q-2)-1)+p},easeInCubic:function(t,q,p,o,n){return o*(q/=n)*q*q+p},easeOutCubic:function(t,q,p,o,n){return o*((q=q/n-1)*q*q+1)+p},easeInOutCubic:function(t,q,p,o,n){if((q/=n/2)<1)return o/2*q*q*q+p;return o/2*((q-=2)*q*q+2)+p},easeInQuart:function(t,q,p,o,n){return o*(q/=n)*q*q*q+p},easeOutQuart:function(t,q,p,o,n){return-o*((q=q/n-1)*q*q*q-1)+p},easeInOutQuart:function(t,q,p,o,n){if((q/=n/2)<1)return o/2*q*q*q*q+p;return-o/2*((q-=2)*q*q*q-2)+
p},easeInQuint:function(t,q,p,o,n){return o*(q/=n)*q*q*q*q+p},easeOutQuint:function(t,q,p,o,n){return o*((q=q/n-1)*q*q*q*q+1)+p},easeInOutQuint:function(t,q,p,o,n){if((q/=n/2)<1)return o/2*q*q*q*q*q+p;return o/2*((q-=2)*q*q*q*q+2)+p},easeInSine:function(t,q,p,o,n){return-o*Math.cos(q/n*(Math.PI/2))+o+p},easeOutSine:function(t,q,p,o,n){return o*Math.sin(q/n*(Math.PI/2))+p},easeInOutSine:function(t,q,p,o,n){return-o/2*(Math.cos(Math.PI*q/n)-1)+p},easeInExpo:function(t,q,p,o,n){return q==0?p:o*Math.pow(2,
10*(q/n-1))+p},easeOutExpo:function(t,q,p,o,n){return q==n?p+o:o*(-Math.pow(2,-10*q/n)+1)+p},easeInOutExpo:function(t,q,p,o,n){if(q==0)return p;if(q==n)return p+o;if((q/=n/2)<1)return o/2*Math.pow(2,10*(q-1))+p;return o/2*(-Math.pow(2,-10*--q)+2)+p},easeInCirc:function(t,q,p,o,n){return-o*(Math.sqrt(1-(q/=n)*q)-1)+p},easeOutCirc:function(t,q,p,o,n){return o*Math.sqrt(1-(q=q/n-1)*q)+p},easeInOutCirc:function(t,q,p,o,n){if((q/=n/2)<1)return-o/2*(Math.sqrt(1-q*q)-1)+p;return o/2*(Math.sqrt(1-(q-=2)*
q)+1)+p},easeInElastic:function(t,q,p,o,n){var u=0,h=o;if(q==0)return p;if((q/=n)==1)return p+o;u||(u=n*0.3);if(h<Math.abs(o)){h=o;t=u/4}else t=u/(2*Math.PI)*Math.asin(o/h);return-(h*Math.pow(2,10*(q-=1))*Math.sin((q*n-t)*2*Math.PI/u))+p},easeOutElastic:function(t,q,p,o,n){var u=0,h=o;if(q==0)return p;if((q/=n)==1)return p+o;u||(u=n*0.3);if(h<Math.abs(o)){h=o;t=u/4}else t=u/(2*Math.PI)*Math.asin(o/h);return h*Math.pow(2,-10*q)*Math.sin((q*n-t)*2*Math.PI/u)+o+p},easeInOutElastic:function(t,q,p,o,n){var u=
0,h=o;if(q==0)return p;if((q/=n/2)==2)return p+o;u||(u=n*0.3*1.5);if(h<Math.abs(o)){h=o;t=u/4}else t=u/(2*Math.PI)*Math.asin(o/h);if(q<1)return-0.5*h*Math.pow(2,10*(q-=1))*Math.sin((q*n-t)*2*Math.PI/u)+p;return h*Math.pow(2,-10*(q-=1))*Math.sin((q*n-t)*2*Math.PI/u)*0.5+o+p},easeInBack:function(t,q,p,o,n,u){if(u==undefined)u=1.70158;return o*(q/=n)*q*((u+1)*q-u)+p},easeOutBack:function(t,q,p,o,n,u){if(u==undefined)u=1.70158;return o*((q=q/n-1)*q*((u+1)*q+u)+1)+p},easeInOutBack:function(t,q,p,o,n,u){if(u==
undefined)u=1.70158;if((q/=n/2)<1)return o/2*q*q*(((u*=1.525)+1)*q-u)+p;return o/2*((q-=2)*q*(((u*=1.525)+1)*q+u)+2)+p},easeInBounce:function(t,q,p,o,n){return o-a.easing.easeOutBounce(t,n-q,0,o,n)+p},easeOutBounce:function(t,q,p,o,n){return(q/=n)<1/2.75?o*7.5625*q*q+p:q<2/2.75?o*(7.5625*(q-=1.5/2.75)*q+0.75)+p:q<2.5/2.75?o*(7.5625*(q-=2.25/2.75)*q+0.9375)+p:o*(7.5625*(q-=2.625/2.75)*q+0.984375)+p},easeInOutBounce:function(t,q,p,o,n){if(q<n/2)return a.easing.easeInBounce(t,q*2,0,o,n)*0.5+p;return a.easing.easeOutBounce(t,
q*2-n,0,o,n)*0.5+o*0.5+p}})}(jQuery);if(!this.JSON)this.JSON={};
(function(){function a(r){return r<10?"0"+r:r}function c(r){d.lastIndex=0;return d.test(r)?'"'+r.replace(d,function(t){var q=k[t];return typeof q==="string"?q:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+r+'"'}function e(r,t){var q,p,o=g,n,u=t[r];if(u&&typeof u==="object"&&typeof u.toJSON==="function")u=u.toJSON(r);if(typeof l==="function")u=l.call(t,r,u);switch(typeof u){case "string":return c(u);case "number":return isFinite(u)?String(u):"null";case "boolean":case "null":return String(u);
case "object":if(!u)return"null";g+=j;n=[];if(Object.prototype.toString.apply(u)==="[object Array]"){p=u.length;for(r=0;r<p;r+=1)n[r]=e(r,u)||"null";t=n.length===0?"[]":g?"[\n"+g+n.join(",\n"+g)+"\n"+o+"]":"["+n.join(",")+"]";g=o;return t}if(l&&typeof l==="object"){p=l.length;for(r=0;r<p;r+=1){q=l[r];if(typeof q==="string")if(t=e(q,u))n.push(c(q)+(g?": ":":")+t)}}else for(q in u)if(Object.hasOwnProperty.call(u,q))if(t=e(q,u))n.push(c(q)+(g?": ":":")+t);t=n.length===0?"{}":g?"{\n"+g+n.join(",\n"+g)+
"\n"+o+"}":"{"+n.join(",")+"}";g=o;return t}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var f=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
d=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,j,k={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l;if(typeof JSON.stringify!=="function")JSON.stringify=function(r,t,q){var p;j=g="";if(typeof q==="number")for(p=0;p<q;p+=1)j+=" ";else if(typeof q==="string")j=q;if((l=t)&&typeof t!=="function"&&(typeof t!=="object"||typeof t.length!=="number"))throw new Error("JSON.stringify");return e("",
{"":r})};if(typeof JSON.parse!=="function")JSON.parse=function(r,t){function q(p,o){var n,u,h=p[o];if(h&&typeof h==="object")for(n in h)if(Object.hasOwnProperty.call(h,n)){u=q(h,n);if(u!==undefined)h[n]=u;else delete h[n]}return t.call(p,o,h)}f.lastIndex=0;if(f.test(r))r=r.replace(f,function(p){return"\\u"+("0000"+p.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(r.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){r=eval("("+r+")");return typeof t==="function"?q({"":r},""):r}throw new SyntaxError("JSON.parse");}})();
var Prototype={Version:"1.6.1",Browser:function(){var a=navigator.userAgent,c=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!c,Opera:c,WebKit:a.indexOf("AppleWebKit/")>-1,Gecko:a.indexOf("Gecko")>-1&&a.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(a)}}(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:function(){var a=window.Element||window.HTMLElement;return!!(a&&a.prototype)}(),
SpecificElementExtensions:function(){if(typeof window.HTMLDivElement!=="undefined")return true;var a=document.createElement("div"),c=document.createElement("form"),e=false;if(a.__proto__&&a.__proto__!==c.__proto__)e=true;return e}()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari)Prototype.BrowserFeatures.SpecificElementExtensions=false;
var Abstract={},Try={these:function(){for(var a,c=0,e=arguments.length;c<e;c++){var f=arguments[c];try{a=f();break}catch(d){}}return a}},Class=function(){function a(){}function c(){function f(){this.initialize.apply(this,arguments)}var d=null,g=$A(arguments);if(Object.isFunction(g[0]))d=g.shift();Object.extend(f,Class.Methods);f.superclass=d;f.subclasses=[];if(d){a.prototype=d.prototype;f.prototype=new a;d.subclasses.push(f)}for(d=0;d<g.length;d++)f.addMethods(g[d]);if(!f.prototype.initialize)f.prototype.initialize=
Prototype.emptyFunction;return f.prototype.constructor=f}function e(f){var d=this.superclass&&this.superclass.prototype,g=Object.keys(f);if(!Object.keys({toString:true}).length){f.toString!=Object.prototype.toString&&g.push("toString");f.valueOf!=Object.prototype.valueOf&&g.push("valueOf")}for(var j=0,k=g.length;j<k;j++){var l=g[j],r=f[l];if(d&&Object.isFunction(r)&&r.argumentNames().first()=="$super"){var t=r;r=function(q){return function(){return d[q].apply(this,arguments)}}(l).wrap(t);r.valueOf=
t.valueOf.bind(t);r.toString=t.toString.bind(t)}this.prototype[l]=r}return this}return{create:c,Methods:{addMethods:e}}}();
(function(){function a(h,s){for(var v in s)h[v]=s[v];return h}function c(h){try{if(n(h))return"undefined";if(h===null)return"null";return h.inspect?h.inspect():String(h)}catch(s){if(s instanceof RangeError)return"...";throw s;}}function e(h){switch(typeof h){case "undefined":case "function":case "unknown":return;case "boolean":return h.toString()}if(h===null)return"null";if(h.toJSON)return h.toJSON();if(!l(h)){var s=[];for(var v in h){var y=e(h[v]);n(y)||s.push(v.toJSON()+": "+y)}return"{"+s.join(", ")+
"}"}}function f(h){return $H(h).toQueryString()}function d(h){return h&&h.toHTML?h.toHTML():String.interpret(h)}function g(h){var s=[];for(var v in h)s.push(v);return s}function j(h){var s=[];for(var v in h)s.push(h[v]);return s}function k(h){return a({},h)}function l(h){return!!(h&&h.nodeType==1)}function r(h){return u.call(h)=="[object Array]"}function t(h){return h instanceof Hash}function q(h){return typeof h==="function"}function p(h){return u.call(h)=="[object String]"}function o(h){return u.call(h)==
"[object Number]"}function n(h){return typeof h==="undefined"}var u=Object.prototype.toString;a(Object,{extend:a,inspect:c,toJSON:e,toQueryString:f,toHTML:d,keys:g,values:j,clone:k,isElement:l,isArray:r,isHash:t,isFunction:q,isString:p,isNumber:o,isUndefined:n})})();
Object.extend(Function.prototype,function(){function a(q,p){for(var o=q.length,n=p.length;n--;)q[o+n]=p[n];return q}function c(q,p){q=t.call(q,0);return a(q,p)}function e(){var q=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return q.length==1&&!q[0]?[]:q}function f(q){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var p=this,o=t.call(arguments,1);return function(){var n=c(o,arguments);
return p.apply(q,n)}}function d(q){var p=this,o=t.call(arguments,1);return function(n){n=a([n||window.event],o);return p.apply(q,n)}}function g(){if(!arguments.length)return this;var q=this,p=t.call(arguments,0);return function(){var o=c(p,arguments);return q.apply(this,o)}}function j(q){var p=this,o=t.call(arguments,1);q*=1E3;return window.setTimeout(function(){return p.apply(p,o)},q)}function k(){return this.delay.apply(this,a([0.01],arguments))}function l(q){var p=this;return function(){var o=
a([p.bind(this)],arguments);return q.apply(this,o)}}function r(){if(this._methodized)return this._methodized;var q=this;return this._methodized=function(){var p=a([this],arguments);return q.apply(null,p)}}var t=Array.prototype.slice;return{argumentNames:e,bind:f,bindAsEventListener:d,curry:g,delay:j,defer:k,wrap:l,methodize:r}}());
Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};
var PeriodicalExecuter=Class.create({initialize:function(a,c){this.callback=a;this.frequency=c;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1E3)},execute:function(){this.callback(this)},stop:function(){if(this.timer){clearInterval(this.timer);this.timer=null}},onTimerEvent:function(){if(!this.currentlyExecuting)try{this.currentlyExecuting=true;this.execute();this.currentlyExecuting=false}catch(a){this.currentlyExecuting=
false;throw a;}}});Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r","\\":"\\\\"}});
Object.extend(String.prototype,function(){function a(J){if(Object.isFunction(J))return J;var L=new Template(J);return function(ba){return L.evaluate(ba)}}function c(J,L){var ba="",aa=this,ca;L=a(L);if(Object.isString(J))J=RegExp.escape(J);if(!(J.length||J.source)){L=L("");return L+aa.split("").join(L)+L}for(;aa.length>0;)if(ca=aa.match(J)){ba+=aa.slice(0,ca.index);ba+=String.interpret(L(ca));aa=aa.slice(ca.index+ca[0].length)}else{ba+=aa;aa=""}return ba}function e(J,L,ba){L=a(L);ba=Object.isUndefined(ba)?
1:ba;return this.gsub(J,function(aa){if(--ba<0)return aa[0];return L(aa)})}function f(J,L){this.gsub(J,L);return String(this)}function d(J,L){J=J||30;L=Object.isUndefined(L)?"...":L;return this.length>J?this.slice(0,J-L.length)+L:String(this)}function g(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}function j(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"")}function k(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")}function l(){var J=new RegExp(Prototype.ScriptFragment,
"img"),L=new RegExp(Prototype.ScriptFragment,"im");return(this.match(J)||[]).map(function(ba){return(ba.match(L)||["",""])[1]})}function r(){return this.extractScripts().map(function(J){return eval(J)})}function t(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function q(){return this.stripTags().replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function p(J){var L=this.strip().match(/([^?#]*)(#.*)?$/);if(!L)return{};return L[1].split(J||"&").inject({},
function(ba,aa){if((aa=aa.split("="))[0]){var ca=decodeURIComponent(aa.shift());aa=aa.length>1?aa.join("="):aa[0];if(aa!=undefined)aa=decodeURIComponent(aa);if(ca in ba){Object.isArray(ba[ca])||(ba[ca]=[ba[ca]]);ba[ca].push(aa)}else ba[ca]=aa}return ba})}function o(){return this.split("")}function n(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)}function u(J){return J<1?"":(new Array(J+1)).join(this)}function h(){var J=this.split("-"),L=J.length;if(L==1)return J[0];
for(var ba=this.charAt(0)=="-"?J[0].charAt(0).toUpperCase()+J[0].substring(1):J[0],aa=1;aa<L;aa++)ba+=J[aa].charAt(0).toUpperCase()+J[aa].substring(1);return ba}function s(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()}function v(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/-/g,"_").toLowerCase()}function y(){return this.replace(/_/g,"-")}function B(J){var L=this.replace(/[\x00-\x1f\\]/g,function(ba){if(ba in
String.specialChar)return String.specialChar[ba];return"\\u00"+ba.charCodeAt().toPaddedString(2,16)});if(J)return'"'+L.replace(/"/g,'\\"')+'"';return"'"+L.replace(/'/g,"\\'")+"'"}function z(){return this.inspect(true)}function C(J){return this.replace(J||Prototype.JSONFilter,"$1")}function G(){var J=this;if(J.blank())return false;J=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(J)}function I(J){var L=this.unfilterJSON();try{if(!J||L.isJSON())return eval("("+
L+")")}catch(ba){}throw new SyntaxError("Badly formed JSON string: "+this.inspect());}function Y(J){return this.indexOf(J)>-1}function Q(J){return this.indexOf(J)===0}function K(J){var L=this.length-J.length;return L>=0&&this.lastIndexOf(J)===L}function W(){return this==""}function F(){return/^\s*$/.test(this)}function N(J,L){return(new Template(this,L)).evaluate(J)}return{gsub:c,sub:e,scan:f,truncate:d,strip:String.prototype.trim?String.prototype.trim:g,stripTags:j,stripScripts:k,extractScripts:l,
evalScripts:r,escapeHTML:t,unescapeHTML:q,toQueryParams:p,parseQuery:p,toArray:o,succ:n,times:u,camelize:h,capitalize:s,underscore:v,dasherize:y,inspect:B,toJSON:z,unfilterJSON:C,isJSON:G,evalJSON:I,include:Y,startsWith:Q,endsWith:K,empty:W,blank:F,interpolate:N}}());
var Template=Class.create({initialize:function(a,c){this.template=a.toString();this.pattern=c||Template.Pattern},evaluate:function(a){if(a&&Object.isFunction(a.toTemplateReplacements))a=a.toTemplateReplacements();return this.template.gsub(this.pattern,function(c){if(a==null)return c[1]+"";var e=c[1]||"";if(e=="\\")return c[2];var f=a,d=c[3],g=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;c=g.exec(d);if(c==null)return e;for(;c!=null;){var j=c[1].startsWith("[")?c[2].replace(/\\\\]/g,"]"):c[1];f=f[j];if(null==
f||""==c[3])break;d=d.substring("["==c[3]?c[1].length:c[0].length);c=g.exec(d)}return e+String.interpret(f)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
var $break={},Enumerable=function(){function a(C,G){var I=0;try{this._each(function(Q){C.call(G,Q,I++)})}catch(Y){if(Y!=$break)throw Y;}return this}function c(C,G,I){var Y=-C,Q=[],K=this.toArray();if(C<1)return K;for(;(Y+=C)<K.length;)Q.push(K.slice(Y,Y+C));return Q.collect(G,I)}function e(C,G){C=C||Prototype.K;var I=true;this.each(function(Y,Q){I=I&&!!C.call(G,Y,Q);if(!I)throw $break;});return I}function f(C,G){C=C||Prototype.K;var I=false;this.each(function(Y,Q){if(I=!!C.call(G,Y,Q))throw $break;
});return I}function d(C,G){C=C||Prototype.K;var I=[];this.each(function(Y,Q){I.push(C.call(G,Y,Q))});return I}function g(C,G){var I;this.each(function(Y,Q){if(C.call(G,Y,Q)){I=Y;throw $break;}});return I}function j(C,G){var I=[];this.each(function(Y,Q){C.call(G,Y,Q)&&I.push(Y)});return I}function k(C,G,I){G=G||Prototype.K;var Y=[];if(Object.isString(C))C=new RegExp(RegExp.escape(C));this.each(function(Q,K){C.match(Q)&&Y.push(G.call(I,Q,K))});return Y}function l(C){if(Object.isFunction(this.indexOf))if(this.indexOf(C)!=
-1)return true;var G=false;this.each(function(I){if(I==C){G=true;throw $break;}});return G}function r(C,G){G=Object.isUndefined(G)?null:G;return this.eachSlice(C,function(I){for(;I.length<C;)I.push(G);return I})}function t(C,G,I){this.each(function(Y,Q){C=G.call(I,C,Y,Q)});return C}function q(C){var G=$A(arguments).slice(1);return this.map(function(I){return I[C].apply(I,G)})}function p(C,G){C=C||Prototype.K;var I;this.each(function(Y,Q){Y=C.call(G,Y,Q);if(I==null||Y>=I)I=Y});return I}function o(C,
G){C=C||Prototype.K;var I;this.each(function(Y,Q){Y=C.call(G,Y,Q);if(I==null||Y<I)I=Y});return I}function n(C,G){C=C||Prototype.K;var I=[],Y=[];this.each(function(Q,K){(C.call(G,Q,K)?I:Y).push(Q)});return[I,Y]}function u(C){var G=[];this.each(function(I){G.push(I[C])});return G}function h(C,G){var I=[];this.each(function(Y,Q){C.call(G,Y,Q)||I.push(Y)});return I}function s(C,G){return this.map(function(I,Y){return{value:I,criteria:C.call(G,I,Y)}}).sort(function(I,Y){I=I.criteria;Y=Y.criteria;return I<
Y?-1:I>Y?1:0}).pluck("value")}function v(){return this.map()}function y(){var C=Prototype.K,G=$A(arguments);if(Object.isFunction(G.last()))C=G.pop();var I=[this].concat(G).map($A);return this.map(function(Y,Q){return C(I.pluck(Q))})}function B(){return this.toArray().length}function z(){return"#<Enumerable:"+this.toArray().inspect()+">"}return{each:a,eachSlice:c,all:e,every:e,any:f,some:f,collect:d,map:d,detect:g,findAll:j,select:j,filter:j,grep:k,include:l,member:l,inGroupsOf:r,inject:t,invoke:q,
max:p,min:o,partition:n,pluck:u,reject:h,sortBy:s,toArray:v,entries:v,zip:y,size:B,inspect:z,find:g}}();function $A(a){if(!a)return[];if("toArray"in Object(a))return a.toArray();for(var c=a.length||0,e=new Array(c);c--;)e[c]=a[c];return e}function $w(a){if(!Object.isString(a))return[];return(a=a.strip())?a.split(/\s+/):[]}Array.from=$A;
(function(){function a(B){for(var z=0,C=this.length;z<C;z++)B(this[z])}function c(){this.length=0;return this}function e(){return this[0]}function f(){return this[this.length-1]}function d(){return this.select(function(B){return B!=null})}function g(){return this.inject([],function(B,z){if(Object.isArray(z))return B.concat(z.flatten());B.push(z);return B})}function j(){var B=v.call(arguments,0);return this.select(function(z){return!B.include(z)})}function k(B){return(B!==false?this:this.toArray())._reverse()}
function l(B){return this.inject([],function(z,C,G){if(0==G||(B?z.last()!=C:!z.include(C)))z.push(C);return z})}function r(B){return this.uniq().findAll(function(z){return B.detect(function(C){return z===C})})}function t(){return v.call(this,0)}function q(){return this.length}function p(){return"["+this.map(Object.inspect).join(", ")+"]"}function o(){var B=[];this.each(function(z){z=Object.toJSON(z);Object.isUndefined(z)||B.push(z)});return"["+B.join(", ")+"]"}function n(B,z){z||(z=0);var C=this.length;
if(z<0)z=C+z;for(;z<C;z++)if(this[z]===B)return z;return-1}function u(B,z){z=isNaN(z)?this.length:(z<0?this.length+z:z)+1;B=this.slice(0,z).reverse().indexOf(B);return B<0?B:z-B-1}function h(){for(var B=v.call(this,0),z,C=0,G=arguments.length;C<G;C++){z=arguments[C];if(Object.isArray(z)&&!("callee"in z))for(var I=0,Y=z.length;I<Y;I++)B.push(z[I]);else B.push(z)}return B}var s=Array.prototype,v=s.slice,y=s.forEach;y||(y=a);Object.extend(s,Enumerable);if(!s._reverse)s._reverse=s.reverse;Object.extend(s,
{_each:y,clear:c,first:e,last:f,compact:d,flatten:g,without:j,reverse:k,uniq:l,intersect:r,clone:t,toArray:t,size:q,inspect:p,toJSON:o});if(function(){return[].concat(arguments)[0][0]!==1}(1,2))s.concat=h;if(!s.indexOf)s.indexOf=n;if(!s.lastIndexOf)s.lastIndexOf=u})();function $H(a){return new Hash(a)}
var Hash=Class.create(Enumerable,function(){function a(h){this._object=Object.isHash(h)?h.toObject():Object.clone(h)}function c(h){for(var s in this._object){var v=this._object[s],y=[s,v];y.key=s;y.value=v;h(y)}}function e(h,s){return this._object[h]=s}function f(h){if(this._object[h]!==Object.prototype[h])return this._object[h]}function d(h){var s=this._object[h];delete this._object[h];return s}function g(){return Object.clone(this._object)}function j(){return this.pluck("key")}function k(){return this.pluck("value")}
function l(h){var s=this.detect(function(v){return v.value===h});return s&&s.key}function r(h){return this.clone().update(h)}function t(h){return(new Hash(h)).inject(this,function(s,v){s.set(v.key,v.value);return s})}function q(h,s){if(Object.isUndefined(s))return h;return h+"="+encodeURIComponent(String.interpret(s))}function p(){return this.inject([],function(h,s){var v=encodeURIComponent(s.key);if((s=s.value)&&typeof s=="object"){if(Object.isArray(s))return h.concat(s.map(q.curry(v)))}else h.push(q(v,
s));return h}).join("&")}function o(){return"#<Hash:{"+this.map(function(h){return h.map(Object.inspect).join(": ")}).join(", ")+"}>"}function n(){return Object.toJSON(this.toObject())}function u(){return new Hash(this)}return{initialize:a,_each:c,set:e,get:f,unset:d,toObject:g,toTemplateReplacements:g,keys:j,values:k,index:l,merge:r,update:t,toQueryString:p,inspect:o,toJSON:n,clone:u}}());Hash.from=$H;
Object.extend(Number.prototype,function(){function a(){return this.toPaddedString(2,16)}function c(){return this+1}function e(r,t){$R(0,this,true).each(r,t);return this}function f(r,t){t=this.toString(t||10);return"0".times(r-t.length)+t}function d(){return isFinite(this)?this.toString():"null"}function g(){return Math.abs(this)}function j(){return Math.round(this)}function k(){return Math.ceil(this)}function l(){return Math.floor(this)}return{toColorPart:a,succ:c,times:e,toPaddedString:f,toJSON:d,
abs:g,round:j,ceil:k,floor:l}}());function $R(a,c,e){return new ObjectRange(a,c,e)}
var ObjectRange=Class.create(Enumerable,function(){function a(f,d,g){this.start=f;this.end=d;this.exclusive=g}function c(f){for(var d=this.start;this.include(d);){f(d);d=d.succ()}}function e(f){if(f<this.start)return false;if(this.exclusive)return f<this.end;return f<=this.end}return{initialize:a,_each:c,include:e}}()),Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||
false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){this.include(a)||this.responders.push(a)},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(a,c,e,f){this.each(function(d){if(Object.isFunction(d[a]))try{d[a].apply(d,[c,e,f])}catch(g){}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});
Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters))this.options.parameters=this.options.parameters.toQueryParams();else if(Object.isHash(this.options.parameters))this.options.parameters=this.options.parameters.toObject()}});
Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,c,e){$super(e);this.transport=Ajax.getTransport();this.request(c)},request:function(a){this.url=a;this.method=this.options.method;a=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){a._method=this.method;this.method="post"}this.parameters=a;if(a=Object.toQueryString(a))if(this.method=="get")this.url+=(this.url.include("?")?"&":"?")+a;else if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))a+=
"&_=";try{var c=new Ajax.Response(this);this.options.onCreate&&this.options.onCreate(c);Ajax.Responders.dispatch("onCreate",this,c);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);this.options.asynchronous&&this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?this.options.postBody||a:null;this.transport.send(this.body);!this.options.asynchronous&&this.transport.overrideMimeType&&
this.onStateChange()}catch(e){this.dispatchException(e)}},onStateChange:function(){var a=this.transport.readyState;a>1&&!(a==4&&this._complete)&&this.respondToReadyState(this.transport.readyState)},setRequestHeaders:function(){var a={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){a["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:
"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)a.Connection="close"}if(typeof this.options.requestHeaders=="object"){var c=this.options.requestHeaders;if(Object.isFunction(c.push))for(var e=0,f=c.length;e<f;e+=2)a[c[e]]=c[e+1];else $H(c).each(function(g){a[g.key]=g.value})}for(var d in a)this.transport.setRequestHeader(d,a[d])},success:function(){var a=this.getStatus();return!a||a>=200&&a<300},getStatus:function(){try{return this.transport.status||
0}catch(a){return 0}},respondToReadyState:function(a){a=Ajax.Request.Events[a];var c=new Ajax.Response(this);if(a=="Complete"){try{this._complete=true;(this.options["on"+c.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(c,c.headerJSON)}catch(e){this.dispatchException(e)}var f=c.getHeader("Content-type");if(this.options.evalJS=="force"||this.options.evalJS&&this.isSameOrigin()&&f&&f.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))this.evalResponse()}try{(this.options["on"+
a]||Prototype.emptyFunction)(c,c.headerJSON);Ajax.Responders.dispatch("on"+a,this,c,c.headerJSON)}catch(d){this.dispatchException(d)}if(a=="Complete")this.transport.onreadystatechange=Prototype.emptyFunction},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return!a||a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""})},getHeader:function(a){try{return this.transport.getResponseHeader(a)||
null}catch(c){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(a){this.dispatchException(a)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Response=Class.create({initialize:function(a){this.request=a;a=this.transport=a.transport;var c=this.readyState=a.readyState;if(c>2&&!Prototype.Browser.IE||c==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(a.responseText);this.headerJSON=this._getHeaderJSON()}if(c==4){a=a.responseXML;this.responseXML=Object.isUndefined(a)?null:a;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,
getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a)return null;a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON||
!this.request.isSameOrigin())}catch(c){this.request.dispatchException(c)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json")||this.responseText.blank())return null;try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(c){this.request.dispatchException(c)}}});
Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,c,e,f){this.container={success:c.success||c,failure:c.failure||(c.success?null:c)};f=Object.clone(f);var d=f.onComplete;f.onComplete=function(g,j){this.updateContent(g.responseText);Object.isFunction(d)&&d(g,j)}.bind(this);$super(e,f)},updateContent:function(a){var c=this.container[this.success()?"success":"failure"],e=this.options;e.evalScripts||(a=a.stripScripts());if(c=$(c))if(e.insertion)if(Object.isString(e.insertion)){var f=
{};f[e.insertion]=a;c.insert(f)}else e.insertion(c,a);else c.update(a)}});
Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,c,e,f){$super(f);this.onComplete=this.options.onComplete;this.frequency=this.options.frequency||2;this.decay=this.options.decay||1;this.updater={};this.container=c;this.url=e;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},
updateComplete:function(a){if(this.options.decay){this.decay=a.responseText==this.lastText?this.decay*this.options.decay:1;this.lastText=a.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});
function $(a){if(arguments.length>1){for(var c=0,e=[],f=arguments.length;c<f;c++)e.push($(arguments[c]));return e}if(Object.isString(a))a=document.getElementById(a);return Element.extend(a)}if(Prototype.BrowserFeatures.XPath)document._getElementsByXPath=function(a,c){var e=[];a=document.evaluate(a,$(c)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);c=0;for(var f=a.snapshotLength;c<f;c++)e.push(Element.extend(a.snapshotItem(c)));return e};if(!window.Node)var Node={};
Node.ELEMENT_NODE||Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12});
(function(a){var c=function(){var f=document.createElement("form"),d=document.createElement("input"),g=document.documentElement;d.setAttribute("name","test");f.appendChild(d);g.appendChild(f);d=f.elements?typeof f.elements.test=="undefined":null;g.removeChild(f);return d}(),e=a.Element;a.Element=function(f,d){d=d||{};f=f.toLowerCase();var g=Element.cache;if(c&&d.name){f="<"+f+' name="'+d.name+'">';delete d.name;return Element.writeAttribute(document.createElement(f),d)}g[f]||(g[f]=Element.extend(document.createElement(f)));
return Element.writeAttribute(g[f].cloneNode(false),d)};Object.extend(a.Element,e||{});if(e)a.Element.prototype=e.prototype})(this);Element.cache={};Element.idCounter=1;
Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){a=$(a);Element[Element.visible(a)?"hide":"show"](a);return a},hide:function(a){a=$(a);a.style.display="none";return a},show:function(a){a=$(a);a.style.display="";return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(){function a(d,g){d=$(d);if(g&&g.toElement)g=g.toElement();if(Object.isElement(g))return d.update().insert(g);g=Object.toHTML(g);var j=d.tagName.toUpperCase();
if(j==="SCRIPT"&&f){d.text=g;return d}if(c||e)if(j in Element._insertionTranslations.tags){for(;d.firstChild;)d.removeChild(d.firstChild);Element._getContentFromAnonymousElement(j,g.stripScripts()).each(function(k){d.appendChild(k)})}else d.innerHTML=g.stripScripts();else d.innerHTML=g.stripScripts();g.evalScripts.bind(g).defer();return d}var c=function(){var d=document.createElement("select"),g=true;d.innerHTML='<option value="test">test</option>';if(d.options&&d.options[0])g=d.options[0].nodeName.toUpperCase()!==
"OPTION";return g}(),e=function(){try{var d=document.createElement("table");if(d&&d.tBodies){d.innerHTML="<tbody><tr><td>test</td></tr></tbody>";return typeof d.tBodies[0]=="undefined"}}catch(g){return true}}(),f=function(){var d=document.createElement("script"),g=false;try{d.appendChild(document.createTextNode(""));g=!d.firstChild||d.firstChild&&d.firstChild.nodeType!==3}catch(j){g=true}return g}();return a}(),replace:function(a,c){a=$(a);if(c&&c.toElement)c=c.toElement();else if(!Object.isElement(c)){c=
Object.toHTML(c);var e=a.ownerDocument.createRange();e.selectNode(a);c.evalScripts.bind(c).defer();c=e.createContextualFragment(c.stripScripts())}a.parentNode.replaceChild(c,a);return a},insert:function(a,c){a=$(a);if(Object.isString(c)||Object.isNumber(c)||Object.isElement(c)||c&&(c.toElement||c.toHTML))c={bottom:c};var e,f,d;for(var g in c){e=c[g];g=g.toLowerCase();f=Element._insertionTranslations[g];if(e&&e.toElement)e=e.toElement();if(Object.isElement(e))f(a,e);else{e=Object.toHTML(e);d=(g=="before"||
g=="after"?a.parentNode:a).tagName.toUpperCase();d=Element._getContentFromAnonymousElement(d,e.stripScripts());if(g=="top"||g=="after")d.reverse();d.each(f.curry(a));e.evalScripts.bind(e).defer()}}return a},wrap:function(a,c,e){a=$(a);if(Object.isElement(c))$(c).writeAttribute(e||{});else c=Object.isString(c)?new Element(c,e):new Element("div",c);a.parentNode&&a.parentNode.replaceChild(c,a);c.appendChild(a);return c},inspect:function(a){a=$(a);var c="<"+a.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(e){var f=
e.first();e=e.last();if(f=(a[f]||"").toString())c+=" "+e+"="+f.inspect(true)});return c+">"},recursivelyCollect:function(a,c){a=$(a);for(var e=[];a=a[c];)a.nodeType==1&&e.push(Element.extend(a));return e},ancestors:function(a){return Element.recursivelyCollect(a,"parentNode")},descendants:function(a){return Element.select(a,"*")},firstDescendant:function(a){for(a=$(a).firstChild;a&&a.nodeType!=1;)a=a.nextSibling;return $(a)},immediateDescendants:function(a){if(!(a=$(a).firstChild))return[];for(;a&&
a.nodeType!=1;)a=a.nextSibling;if(a)return[a].concat($(a).nextSiblings());return[]},previousSiblings:function(a){return Element.recursivelyCollect(a,"previousSibling")},nextSiblings:function(a){return Element.recursivelyCollect(a,"nextSibling")},siblings:function(a){a=$(a);return Element.previousSiblings(a).reverse().concat(Element.nextSiblings(a))},match:function(a,c){if(Object.isString(c))c=new Selector(c);return c.match($(a))},up:function(a,c,e){a=$(a);if(arguments.length==1)return $(a.parentNode);
var f=Element.ancestors(a);return Object.isNumber(c)?f[c]:Selector.findElement(f,c,e)},down:function(a,c,e){a=$(a);if(arguments.length==1)return Element.firstDescendant(a);return Object.isNumber(c)?Element.descendants(a)[c]:Element.select(a,c)[e||0]},previous:function(a,c,e){a=$(a);if(arguments.length==1)return $(Selector.handlers.previousElementSibling(a));var f=Element.previousSiblings(a);return Object.isNumber(c)?f[c]:Selector.findElement(f,c,e)},next:function(a,c,e){a=$(a);if(arguments.length==
1)return $(Selector.handlers.nextElementSibling(a));var f=Element.nextSiblings(a);return Object.isNumber(c)?f[c]:Selector.findElement(f,c,e)},select:function(a){var c=Array.prototype.slice.call(arguments,1);return Selector.findChildElements(a,c)},adjacent:function(a){var c=Array.prototype.slice.call(arguments,1);return Selector.findChildElements(a.parentNode,c).without(a)},identify:function(a){a=$(a);var c=Element.readAttribute(a,"id");if(c)return c;do c="anonymous_element_"+Element.idCounter++;while($(c));
Element.writeAttribute(a,"id",c);return c},readAttribute:function(a,c){a=$(a);if(Prototype.Browser.IE){var e=Element._attributeTranslations.read;if(e.values[c])return e.values[c](a,c);if(e.names[c])c=e.names[c];if(c.include(":"))return!a.attributes||!a.attributes[c]?null:a.attributes[c].value}return a.getAttribute(c)},writeAttribute:function(a,c,e){a=$(a);var f={},d=Element._attributeTranslations.write;if(typeof c=="object")f=c;else f[c]=Object.isUndefined(e)?true:e;for(var g in f){c=d.names[g]||
g;e=f[g];if(d.values[g])c=d.values[g](a,e);if(e===false||e===null)a.removeAttribute(c);else e===true?a.setAttribute(c,c):a.setAttribute(c,e)}return a},getHeight:function(a){return Element.getDimensions(a).height},getWidth:function(a){return Element.getDimensions(a).width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,c){if(a=$(a)){a=a.className;return a.length>0&&(a==c||(new RegExp("(^|\\s)"+c+"(\\s|$)")).test(a))}},addClassName:function(a,c){if(a=$(a)){Element.hasClassName(a,
c)||(a.className+=(a.className?" ":"")+c);return a}},removeClassName:function(a,c){if(a=$(a)){a.className=a.className.replace(new RegExp("(^|\\s+)"+c+"(\\s+|$)")," ").strip();return a}},toggleClassName:function(a,c){if(a=$(a))return Element[Element.hasClassName(a,c)?"removeClassName":"addClassName"](a,c)},cleanWhitespace:function(a){a=$(a);for(var c=a.firstChild;c;){var e=c.nextSibling;c.nodeType==3&&!/\S/.test(c.nodeValue)&&a.removeChild(c);c=e}return a},empty:function(a){return $(a).innerHTML.blank()},
descendantOf:function(a,c){a=$(a);c=$(c);if(a.compareDocumentPosition)return(a.compareDocumentPosition(c)&8)===8;if(c.contains)return c.contains(a)&&c!==a;for(;a=a.parentNode;)if(a==c)return true;return false},scrollTo:function(a){a=$(a);var c=Element.cumulativeOffset(a);window.scrollTo(c[0],c[1]);return a},getStyle:function(a,c){a=$(a);c=c=="float"?"cssFloat":c.camelize();var e=a.style[c];if(!e||e=="auto")e=(a=document.defaultView.getComputedStyle(a,null))?a[c]:null;if(c=="opacity")return e?parseFloat(e):
1;return e=="auto"?null:e},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(a,c){a=$(a);var e=a.style;if(Object.isString(c)){a.style.cssText+=";"+c;return c.include("opacity")?a.setOpacity(c.match(/opacity:\s*(\d?\.?\d*)/)[1]):a}for(var f in c)if(f=="opacity")a.setOpacity(c[f]);else e[f=="float"||f=="cssFloat"?Object.isUndefined(e.styleFloat)?"cssFloat":"styleFloat":f]=c[f];return a},setOpacity:function(a,c){a=$(a);a.style.opacity=c==1||c===""?"":c<1.0E-5?0:c;return a},getDimensions:function(a){a=
$(a);var c=Element.getStyle(a,"display");if(c!="none"&&c!=null)return{width:a.offsetWidth,height:a.offsetHeight};c=a.style;var e=c.visibility,f=c.position,d=c.display;c.visibility="hidden";if(f!="fixed")c.position="absolute";c.display="block";var g=a.clientWidth;a=a.clientHeight;c.display=d;c.position=f;c.visibility=e;return{width:g,height:a}},makePositioned:function(a){a=$(a);var c=Element.getStyle(a,"position");if(c=="static"||!c){a._madePositioned=true;a.style.position="relative";if(Prototype.Browser.Opera){a.style.top=
0;a.style.left=0}}return a},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=""}return a},makeClipping:function(a){a=$(a);if(a._overflow)return a;a._overflow=Element.getStyle(a,"overflow")||"auto";if(a._overflow!=="hidden")a.style.overflow="hidden";return a},undoClipping:function(a){a=$(a);if(!a._overflow)return a;a.style.overflow=a._overflow=="auto"?"":a._overflow;a._overflow=null;return a},
cumulativeOffset:function(a){var c=0,e=0;do{c+=a.offsetTop||0;e+=a.offsetLeft||0;a=a.offsetParent}while(a);return Element._returnOffset(e,c)},positionedOffset:function(a){var c=0,e=0;do{c+=a.offsetTop||0;e+=a.offsetLeft||0;if(a=a.offsetParent){if(a.tagName.toUpperCase()=="BODY")break;if(Element.getStyle(a,"position")!=="static")break}}while(a);return Element._returnOffset(e,c)},absolutize:function(a){a=$(a);if(Element.getStyle(a,"position")=="absolute")return a;var c=Element.positionedOffset(a),e=
c[1];c=c[0];var f=a.clientWidth,d=a.clientHeight;a._originalLeft=c-parseFloat(a.style.left||0);a._originalTop=e-parseFloat(a.style.top||0);a._originalWidth=a.style.width;a._originalHeight=a.style.height;a.style.position="absolute";a.style.top=e+"px";a.style.left=c+"px";a.style.width=f+"px";a.style.height=d+"px";return a},relativize:function(a){a=$(a);if(Element.getStyle(a,"position")=="relative")return a;a.style.position="relative";var c=parseFloat(a.style.top||0)-(a._originalTop||0),e=parseFloat(a.style.left||
0)-(a._originalLeft||0);a.style.top=c+"px";a.style.left=e+"px";a.style.height=a._originalHeight;a.style.width=a._originalWidth;return a},cumulativeScrollOffset:function(a){var c=0,e=0;do{c+=a.scrollTop||0;e+=a.scrollLeft||0;a=a.parentNode}while(a);return Element._returnOffset(e,c)},getOffsetParent:function(a){if(a.offsetParent)return $(a.offsetParent);if(a==document.body)return $(a);for(;(a=a.parentNode)&&a!=document.body;)if(Element.getStyle(a,"position")!="static")return $(a);return $(document.body)},
viewportOffset:function(a){var c=0,e=0,f=a;do{c+=f.offsetTop||0;e+=f.offsetLeft||0;if(f.offsetParent==document.body&&Element.getStyle(f,"position")=="absolute")break}while(f=f.offsetParent);f=a;do if(!Prototype.Browser.Opera||f.tagName&&f.tagName.toUpperCase()=="BODY"){c-=f.scrollTop||0;e-=f.scrollLeft||0}while(f=f.parentNode);return Element._returnOffset(e,c)},clonePosition:function(a,c,e){e=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},e||{});c=$(c);
var f=Element.viewportOffset(c);a=$(a);var d=[0,0],g=null;if(Element.getStyle(a,"position")=="absolute"){g=Element.getOffsetParent(a);d=Element.viewportOffset(g)}if(g==document.body){d[0]-=document.body.offsetLeft;d[1]-=document.body.offsetTop}if(e.setLeft)a.style.left=f[0]-d[0]+e.offsetLeft+"px";if(e.setTop)a.style.top=f[1]-d[1]+e.offsetTop+"px";if(e.setWidth)a.style.width=c.offsetWidth+"px";if(e.setHeight)a.style.height=c.offsetHeight+"px";return a}};
Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};
if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(a,c,e){switch(e){case "left":case "top":case "right":case "bottom":if(a(c,"position")==="static")return null;case "height":case "width":if(!Element.visible(c))return null;var f=parseInt(a(c,e),10);if(f!==c["offset"+e.capitalize()])return f+"px";return(e==="height"?["border-top-width","padding-top","padding-bottom","border-bottom-width"]:["border-left-width","padding-left","padding-right","border-right-width"]).inject(f,
function(d,g){g=a(c,g);return g===null?d:d-parseInt(g,10)})+"px";default:return a(c,e)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(a,c,e){if(e==="title")return c.title;return a(c,e)})}else if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(a,c){c=$(c);var e=c.getStyle("position");if(e!=="static")return a(c);c.setStyle({position:"relative"});a=a(c);c.setStyle({position:e});return a});$w("positionedOffset viewportOffset").each(function(a){Element.Methods[a]=
Element.Methods[a].wrap(function(c,e){e=$(e);var f=e.getStyle("position");if(f!=="static")return c(e);var d=e.getOffsetParent();d&&d.getStyle("position")==="fixed"&&d.setStyle({zoom:1});e.setStyle({position:"relative"});c=c(e);e.setStyle({position:f});return c})});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(a,c){return a(c)});Element.Methods.getStyle=function(a,c){a=$(a);c=c=="float"||c=="cssFloat"?"styleFloat":c.camelize();var e=a.style[c];if(!e&&a.currentStyle)e=
a.currentStyle[c];if(c=="opacity"){if(e=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/))if(e[1])return parseFloat(e[1])/100;return 1}if(e=="auto"){if((c=="width"||c=="height")&&a.getStyle("display")!="none")return a["offset"+c.capitalize()]+"px";return null}return e};Element.Methods.setOpacity=function(a,c){function e(g){return g.replace(/alpha\([^\)]*\)/gi,"")}a=$(a);var f=a.currentStyle;if(f&&!f.hasLayout||!f&&a.style.zoom=="normal")a.style.zoom=1;f=a.getStyle("filter");var d=a.style;
if(c==1||c===""){(f=e(f))?(d.filter=f):d.removeAttribute("filter");return a}else if(c<1.0E-5)c=0;d.filter=e(f)+"alpha(opacity="+c*100+")";return a};Element._attributeTranslations=function(){var a="className",c="for",e=document.createElement("div");e.setAttribute(a,"x");if(e.className!=="x"){e.setAttribute("class","x");if(e.className==="x")a="class"}e=null;e=document.createElement("label");e.setAttribute(c,"x");if(e.htmlFor!=="x"){e.setAttribute("htmlFor","x");if(e.htmlFor==="x")c="htmlFor"}e=null;
return{read:{names:{"class":a,className:a,"for":c,htmlFor:c},values:{_getAttr:function(f,d){return f.getAttribute(d)},_getAttr2:function(f,d){return f.getAttribute(d,2)},_getAttrNode:function(f,d){return(f=f.getAttributeNode(d))?f.value:""},_getEv:function(){var f=document.createElement("div");f.onclick=Prototype.emptyFunction;f=f.getAttribute("onclick");var d;if(String(f).indexOf("{")>-1)d=function(g,j){j=g.getAttribute(j);if(!j)return null;j=j.toString();j=j.split("{")[1];j=j.split("}")[0];return j.strip()};
else if(f==="")d=function(g,j){j=g.getAttribute(j);if(!j)return null;return j.strip()};f=null;return d}(),_flag:function(f,d){return $(f).hasAttribute(d)?d:null},style:function(f){return f.style.cssText.toLowerCase()},title:function(f){return f.title}}}}}();Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(a,c){a.checked=!!c},style:function(a,c){a.style.cssText=c?c:""}}};
Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=a;Element._attributeTranslations.has[a.toLowerCase()]=a});(function(a){Object.extend(a,{href:a._getAttr2,src:a._getAttr2,type:a._getAttr,action:a._getAttrNode,disabled:a._flag,checked:a._flag,readonly:a._flag,multiple:a._flag,onload:a._getEv,onunload:a._getEv,onclick:a._getEv,ondblclick:a._getEv,
onmousedown:a._getEv,onmouseup:a._getEv,onmouseover:a._getEv,onmousemove:a._getEv,onmouseout:a._getEv,onfocus:a._getEv,onblur:a._getEv,onkeypress:a._getEv,onkeydown:a._getEv,onkeyup:a._getEv,onsubmit:a._getEv,onreset:a._getEv,onselect:a._getEv,onchange:a._getEv})})(Element._attributeTranslations.read.values);Prototype.BrowserFeatures.ElementExtensions&&function(){function a(c){c=c.getElementsByTagName("*");for(var e=[],f=0,d;d=c[f];f++)d.tagName!=="!"&&e.push(d);return e}Element.Methods.down=function(c,
e,f){c=$(c);if(arguments.length==1)return c.firstDescendant();return Object.isNumber(e)?a(c)[e]:Element.select(c,e)[f||0]}}()}else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent))Element.Methods.setOpacity=function(a,c){a=$(a);a.style.opacity=c==1?0.999999:c===""?"":c<1.0E-5?0:c;return a};else if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(a,c){a=$(a);a.style.opacity=c==1||c===""?"":c<1.0E-5?0:c;if(c==1)if(a.tagName.toUpperCase()=="IMG"&&a.width){a.width++;a.width--}else try{var e=
document.createTextNode(" ");a.appendChild(e);a.removeChild(e)}catch(f){}return a};Element.Methods.cumulativeOffset=function(a){var c=0,e=0;do{c+=a.offsetTop||0;e+=a.offsetLeft||0;if(a.offsetParent==document.body)if(Element.getStyle(a,"position")=="absolute")break;a=a.offsetParent}while(a);return Element._returnOffset(e,c)}}
if("outerHTML"in document.documentElement)Element.Methods.replace=function(a,c){a=$(a);if(c&&c.toElement)c=c.toElement();if(Object.isElement(c)){a.parentNode.replaceChild(c,a);return a}c=Object.toHTML(c);var e=a.parentNode,f=e.tagName.toUpperCase();if(Element._insertionTranslations.tags[f]){var d=a.next();f=Element._getContentFromAnonymousElement(f,c.stripScripts());e.removeChild(a);d?f.each(function(g){e.insertBefore(g,d)}):f.each(function(g){e.appendChild(g)})}else a.outerHTML=c.stripScripts();
c.evalScripts.bind(c).defer();return a};Element._returnOffset=function(a,c){var e=[a,c];e.left=a;e.top=c;return e};Element._getContentFromAnonymousElement=function(a,c){var e=new Element("div");if(a=Element._insertionTranslations.tags[a]){e.innerHTML=a[0]+c+a[1];a[2].times(function(){e=e.firstChild})}else e.innerHTML=c;return $A(e.childNodes)};
Element._insertionTranslations={before:function(a,c){a.parentNode.insertBefore(c,a)},top:function(a,c){a.insertBefore(c,a.firstChild)},bottom:function(a,c){a.appendChild(c)},after:function(a,c){a.parentNode.insertBefore(c,a.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};
(function(){var a=Element._insertionTranslations.tags;Object.extend(a,{THEAD:a.TBODY,TFOOT:a.TBODY,TH:a.TD})})();Element.Methods.Simulated={hasAttribute:function(a,c){c=Element._attributeTranslations.has[c]||c;a=$(a).getAttributeNode(c);return!!(a&&a.specified)}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);
(function(a){if(!Prototype.BrowserFeatures.ElementExtensions&&a.__proto__){window.HTMLElement={};window.HTMLElement.prototype=a.__proto__;Prototype.BrowserFeatures.ElementExtensions=true}})(document.createElement("div"));
Element.extend=function(){function a(g){if(typeof window.Element!="undefined"){var j=window.Element.prototype;if(j){var k="_"+(Math.random()+"").slice(2);g=document.createElement(g);j[k]="x";g=g[k]!=="x";delete j[k];return g}}return false}function c(g,j){for(var k in j){var l=j[k];if(Object.isFunction(l)&&!(k in g))g[k]=l.methodize()}}var e=a("object");if(Prototype.BrowserFeatures.SpecificElementExtensions){if(e)return function(g){if(g&&typeof g._extendedByPrototype=="undefined"){var j=g.tagName;
if(j&&/^(?:object|applet|embed)$/i.test(j)){c(g,Element.Methods);c(g,Element.Methods.Simulated);c(g,Element.Methods.ByTag[j.toUpperCase()])}}return g};return Prototype.K}var f={},d=Element.Methods.ByTag;e=Object.extend(function(g){if(!g||typeof g._extendedByPrototype!="undefined"||g.nodeType!=1||g==window)return g;var j=Object.clone(f),k=g.tagName.toUpperCase();d[k]&&Object.extend(j,d[k]);c(g,j);g._extendedByPrototype=Prototype.emptyFunction;return g},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(f,
Element.Methods);Object.extend(f,Element.Methods.Simulated)}}});e.refresh();return e}();Element.hasAttribute=function(a,c){if(a.hasAttribute)return a.hasAttribute(c);return Element.Methods.Simulated.hasAttribute(a,c)};
Element.addMethods=function(a){function c(l){l=l.toUpperCase();Element.Methods.ByTag[l]||(Element.Methods.ByTag[l]={});Object.extend(Element.Methods.ByTag[l],a)}function e(l,r,t){t=t||false;for(var q in l){var p=l[q];if(Object.isFunction(p))if(!t||!(q in r))r[q]=p.methodize()}}function f(l){var r,t={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",
Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(t[l])r="HTML"+t[l]+"Element";if(window[r])return window[r];r="HTML"+l+"Element";if(window[r])return window[r];r="HTML"+l.capitalize()+"Element";if(window[r])return window[r];l=document.createElement(l);return l.__proto__||l.constructor.prototype}
var d=Prototype.BrowserFeatures,g=Element.Methods.ByTag;if(!a){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var j=a;a=arguments[1]}if(j)Object.isArray(j)?j.each(c):c(j);else Object.extend(Element.Methods,a||{});j=window.HTMLElement?HTMLElement.prototype:
Element.prototype;if(d.ElementExtensions){e(Element.Methods,j);e(Element.Methods.Simulated,j,true)}if(d.SpecificElementExtensions)for(var k in Element.Methods.ByTag){d=f(k);Object.isUndefined(d)||e(g[k],d.prototype)}Object.extend(Element,Element.Methods);delete Element.ByTag;Element.extend.refresh&&Element.extend.refresh();Element.cache={}};
document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()}},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};
(function(a){function c(){if(f.WebKit&&!d.evaluate)return document;if(f.Opera&&window.parseFloat(window.opera.version())<9.5)return document.body;return document.documentElement}function e(k){g||(g=c());j[k]="client"+k;a["get"+k]=function(){return g[j[k]]};return a["get"+k]()}var f=Prototype.Browser,d=document,g,j={};a.getWidth=e.curry("Width");a.getHeight=e.curry("Height")})(document.viewport);Element.Storage={UID:1};
Element.addMethods({getStorage:function(a){if(a=$(a)){if(a===window)a=0;else{if(typeof a._prototypeUID==="undefined")a._prototypeUID=[Element.Storage.UID++];a=a._prototypeUID[0]}Element.Storage[a]||(Element.Storage[a]=$H());return Element.Storage[a]}},store:function(a,c,e){if(a=$(a)){arguments.length===2?Element.getStorage(a).update(c):Element.getStorage(a).set(c,e);return a}},retrieve:function(a,c,e){if(a=$(a)){a=Element.getStorage(a);var f=a.get(c);if(Object.isUndefined(f)){a.set(c,e);f=e}return f}},
clone:function(a,c){if(a=$(a)){a=a.cloneNode(c);a._prototypeUID=void 0;if(c){c=Element.select(a,"*");for(var e=c.length;e--;)c[e]._prototypeUID=void 0}return Element.extend(a)}}});
var Selector=Class.create({initialize:function(a){this.expression=a.strip();if(this.shouldUseSelectorsAPI())this.mode="selectorsAPI";else if(this.shouldUseXPath()){this.mode="xpath";this.compileXPathMatcher()}else{this.mode="normal";this.compileMatcher()}},shouldUseXPath:function(){var a=function(){var c=false;if(document.evaluate&&window.XPathResult){c=document.createElement("div");c.innerHTML="<ul><li></li></ul><div><ul><li></li></ul></div>";c=document.evaluate(".//*[local-name()='ul' or local-name()='UL']//*[local-name()='li' or local-name()='LI']",
c,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength!==2}return c}();return function(){if(!Prototype.BrowserFeatures.XPath)return false;var c=this.expression;if(Prototype.Browser.WebKit&&(c.include("-of-type")||c.include(":empty")))return false;if(/(\[[\w-]*?:|:checked)/.test(c))return false;if(a)return false;return true}}(),shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI)return false;if(Selector.CASE_INSENSITIVE_CLASS_NAMES)return false;if(!Selector._div)Selector._div=
new Element("div");try{Selector._div.querySelector(this.expression)}catch(a){return false}return true},compileMatcher:function(){var a=this.expression,c=Selector.patterns,e=Selector.criteria,f,d,g=c.length,j;if(Selector._cache[a])this.matcher=Selector._cache[a];else{for(this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];a&&f!=a&&/\S/.test(a);){f=a;for(var k=0;k<g;k++){d=c[k].re;j=c[k].name;if(d=a.match(d)){this.matcher.push(Object.isFunction(e[j])?
e[j](d):(new Template(e[j])).evaluate(d));a=a.replace(d[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher}},compileXPathMatcher:function(){var a=this.expression,c=Selector.patterns,e=Selector.xpath,f,d,g=c.length,j;if(Selector._cache[a])this.xpath=Selector._cache[a];else{for(this.matcher=[".//*"];a&&f!=a&&/\S/.test(a);){f=a;for(var k=0;k<g;k++){j=c[k].name;if(d=a.match(c[k].re)){this.matcher.push(Object.isFunction(e[j])?
e[j](d):(new Template(e[j])).evaluate(d));a=a.replace(d[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath}},findElements:function(a){a=a||document;var c=this.expression;switch(this.mode){case "selectorsAPI":if(a!==document){var e=a.id,f=$(a).identify();f=f.replace(/([\.:])/g,"\\$1");c="#"+f+" "+c}c=$A(a.querySelectorAll(c)).map(Element.extend);a.id=e;return c;case "xpath":return document._getElementsByXPath(this.xpath,a);default:return this.matcher(a)}},match:function(a){this.tokens=
[];for(var c=this.expression,e=Selector.patterns,f=Selector.assertions,d,g,j=e.length,k;c&&d!==c&&/\S/.test(c);){d=c;for(var l=0;l<j;l++){g=e[l].re;k=e[l].name;if(g=c.match(g))if(f[k]){this.tokens.push([k,Object.clone(g)]);c=c.replace(g[0],"")}else return this.findElements(document).include(a)}}c=true;for(l=0;e=this.tokens[l];l++){k=e[0];e=e[1];if(!Selector.assertions[k](a,e)){c=false;break}}return c},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+
">"}});if(Prototype.BrowserFeatures.SelectorsAPI&&document.compatMode==="BackCompat")Selector.CASE_INSENSITIVE_CLASS_NAMES=function(){var a=document.createElement("div"),c=document.createElement("span");a.id="prototype_test_id";c.className="Test";a.appendChild(c);return a.querySelector("#prototype_test_id .test")!==null}();
Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){if(a[1]=="*")return"";return"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(a){a[1]=a[1].toLowerCase();return(new Template("[@#{1}]")).evaluate(a)},attr:function(a){a[1]=a[1].toLowerCase();a[3]=a[5]||a[6];
return(new Template(Selector.xpath.operators[a[2]])).evaluate(a)},pseudo:function(a){var c=Selector.xpath.pseudos[a[1]];if(!c)return"";if(Object.isFunction(c))return c(a);return(new Template(Selector.xpath.pseudos[a[1]])).evaluate(a)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},
pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(a){for(var c=a[6],e=Selector.patterns,f=Selector.xpath,d,g,j=e.length,k=[];c&&d!=c&&/\S/.test(c);){d=c;for(var l=0;l<j;l++){g=e[l].name;if(a=c.match(e[l].re)){g=
Object.isFunction(f[g])?f[g](a):(new Template(f[g])).evaluate(a);k.push("("+g.substring(1,g.length-1)+")");c=c.replace(a[0],"");break}}}return"[not("+k.join(" and ")+")]"},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a)},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a)},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a)},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",
a)},"first-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-of-type"](a)},"last-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](a)},"only-of-type":function(a){var c=Selector.xpath.pseudos;return c["first-of-type"](a)+c["last-of-type"](a)},nth:function(a,c){var e=c[6];if(e=="even")e="2n+0";if(e=="odd")e="2n+1";if(c=e.match(/^(\d+)$/))return"["+a+"= "+c[1]+"]";if(c=e.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(c[1]=="-")c[1]=-1;e=c[1]?Number(c[1]):1;c=c[2]?
Number(c[2]):0;return(new Template("[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]")).evaluate({fragment:a,a:e,b:c})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(a){a[3]=a[5]||a[6];return(new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;')).evaluate(a)},
pseudo:function(a){if(a[6])a[6]=a[6].replace(/"/g,'\\"');return(new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;')).evaluate(a)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:[{name:"laterSibling",re:/^\s*~\s*/},{name:"child",re:/^\s*>\s*/},{name:"adjacent",re:/^\s*\+\s*/},{name:"descendant",re:/^\s/},{name:"tagName",re:/^\s*(\*|[\w\-]+)(\b|$)?/},{name:"id",re:/^#([\w\-\*]+)(\b|$)/},{name:"className",re:/^\.([\w\-\*]+)(\b|$)/},
{name:"pseudo",re:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/},{name:"attrPresence",re:/^\[((?:[\w-]+:)?[\w-]+)\]/},{name:"attr",re:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/}],assertions:{tagName:function(a,c){return c[1].toUpperCase()==a.tagName.toUpperCase()},className:function(a,c){return Element.hasClassName(a,c[1])},id:function(a,c){return a.id===c[1]},attrPresence:function(a,c){return Element.hasAttribute(a,
c[1])},attr:function(a,c){return(a=Element.readAttribute(a,c[1]))&&Selector.operators[c[2]](a,c[5]||c[6])}},handlers:{concat:function(a,c){for(var e=0,f;f=c[e];e++)a.push(f);return a},mark:function(a){for(var c=Prototype.emptyFunction,e=0,f;f=a[e];e++)f._countedByPrototype=c;return a},unmark:function(){return function(){var a=document.createElement("div");a._countedByPrototype="x";return a.getAttribute("_countedByPrototype")==="x"}()?function(a){for(var c=0,e;e=a[c];c++)e.removeAttribute("_countedByPrototype");
return a}:function(a){for(var c=0,e;e=a[c];c++)e._countedByPrototype=void 0;return a}}(),index:function(a,c,e){a._countedByPrototype=Prototype.emptyFunction;if(c){a=a.childNodes;c=a.length-1;for(var f=1;c>=0;c--){var d=a[c];if(d.nodeType==1&&(!e||d._countedByPrototype))d.nodeIndex=f++}}else{c=0;f=1;for(a=a.childNodes;d=a[c];c++)if(d.nodeType==1&&(!e||d._countedByPrototype))d.nodeIndex=f++}},unique:function(a){if(a.length==0)return a;for(var c=[],e,f=0,d=a.length;f<d;f++)if(typeof(e=a[f])._countedByPrototype==
"undefined"){e._countedByPrototype=Prototype.emptyFunction;c.push(Element.extend(e))}return Selector.handlers.unmark(c)},descendant:function(a){for(var c=Selector.handlers,e=0,f=[],d;d=a[e];e++)c.concat(f,d.getElementsByTagName("*"));return f},child:function(a){for(var c=0,e=[],f;f=a[c];c++)for(var d=0,g;g=f.childNodes[d];d++)g.nodeType==1&&g.tagName!="!"&&e.push(g);return e},adjacent:function(a){for(var c=0,e=[],f;f=a[c];c++)(f=this.nextElementSibling(f))&&e.push(f);return e},laterSibling:function(a){for(var c=
Selector.handlers,e=0,f=[],d;d=a[e];e++)c.concat(f,Element.nextSiblings(d));return f},nextElementSibling:function(a){for(;a=a.nextSibling;)if(a.nodeType==1)return a;return null},previousElementSibling:function(a){for(;a=a.previousSibling;)if(a.nodeType==1)return a;return null},tagName:function(a,c,e,f){var d=e.toUpperCase(),g=[],j=Selector.handlers;if(a){if(f){if(f=="descendant"){for(c=0;f=a[c];c++)j.concat(g,f.getElementsByTagName(e));return g}else a=this[f](a);if(e=="*")return a}for(c=0;f=a[c];c++)f.tagName.toUpperCase()===
d&&g.push(f);return g}else return c.getElementsByTagName(e)},id:function(a,c,e,f){var d=$(e),g=Selector.handlers;if(c==document){if(!d)return[];if(!a)return[d]}else if(!c.sourceIndex||c.sourceIndex<1){a=c.getElementsByTagName("*");for(var j=0,k;k=a[j];j++)if(k.id===e)return[k]}if(a){if(f)if(f=="child")for(c=0;k=a[c];c++){if(d.parentNode==k)return[d]}else if(f=="descendant")for(c=0;k=a[c];c++){if(Element.descendantOf(d,k))return[d]}else if(f=="adjacent")for(c=0;k=a[c];c++){if(Selector.handlers.previousElementSibling(d)==
k)return[d]}else a=g[f](a);for(c=0;k=a[c];c++)if(k==d)return[d];return[]}return d&&Element.descendantOf(d,c)?[d]:[]},className:function(a,c,e,f){if(a&&f)a=this[f](a);return Selector.handlers.byClassName(a,c,e)},byClassName:function(a,c,e){a||(a=Selector.handlers.descendant([c]));c=" "+e+" ";for(var f=0,d=[],g,j;g=a[f];f++){j=g.className;if(j.length!=0)if(j==e||(" "+j+" ").include(c))d.push(g)}return d},attrPresence:function(a,c,e,f){a||(a=c.getElementsByTagName("*"));if(a&&f)a=this[f](a);c=[];f=0;
for(var d;d=a[f];f++)Element.hasAttribute(d,e)&&c.push(d);return c},attr:function(a,c,e,f,d,g){a||(a=c.getElementsByTagName("*"));if(a&&g)a=this[g](a);c=Selector.operators[d];d=[];g=0;for(var j;j=a[g];g++){var k=Element.readAttribute(j,e);k!==null&&c(k,f)&&d.push(j)}return d},pseudo:function(a,c,e,f,d){if(a&&d)a=this[d](a);a||(a=f.getElementsByTagName("*"));return Selector.pseudos[c](a,e,f)}},pseudos:{"first-child":function(a){for(var c=0,e=[],f;f=a[c];c++)Selector.handlers.previousElementSibling(f)||
e.push(f);return e},"last-child":function(a){for(var c=0,e=[],f;f=a[c];c++)Selector.handlers.nextElementSibling(f)||e.push(f);return e},"only-child":function(a){for(var c=Selector.handlers,e=0,f=[],d;d=a[e];e++)!c.previousElementSibling(d)&&!c.nextElementSibling(d)&&f.push(d);return f},"nth-child":function(a,c,e){return Selector.pseudos.nth(a,c,e)},"nth-last-child":function(a,c,e){return Selector.pseudos.nth(a,c,e,true)},"nth-of-type":function(a,c,e){return Selector.pseudos.nth(a,c,e,false,true)},
"nth-last-of-type":function(a,c,e){return Selector.pseudos.nth(a,c,e,true,true)},"first-of-type":function(a,c,e){return Selector.pseudos.nth(a,"1",e,false,true)},"last-of-type":function(a,c,e){return Selector.pseudos.nth(a,"1",e,true,true)},"only-of-type":function(a,c,e){var f=Selector.pseudos;return f["last-of-type"](f["first-of-type"](a,c,e),c,e)},getIndices:function(a,c,e){if(a==0)return c>0?[c]:[];return $R(1,e).inject([],function(f,d){0==(d-c)%a&&(d-c)/a>=0&&f.push(d);return f})},nth:function(a,
c,e,f,d){if(a.length==0)return[];if(c=="even")c="2n+0";if(c=="odd")c="2n+1";e=Selector.handlers;var g=[],j=[],k;e.mark(a);for(var l=0;k=a[l];l++)if(!k.parentNode._countedByPrototype){e.index(k.parentNode,f,d);j.push(k.parentNode)}if(c.match(/^\d+$/)){c=Number(c);for(l=0;k=a[l];l++)k.nodeIndex==c&&g.push(k)}else if(k=c.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(k[1]=="-")k[1]=-1;l=k[1]?Number(k[1]):1;k=k[2]?Number(k[2]):0;c=Selector.pseudos.getIndices(l,k,a.length);l=0;for(f=c.length;k=a[l];l++)for(d=0;d<
f;d++)k.nodeIndex==c[d]&&g.push(k)}e.unmark(a);e.unmark(j);return g},empty:function(a){for(var c=0,e=[],f;f=a[c];c++)f.tagName=="!"||f.firstChild||e.push(f);return e},not:function(a,c,e){var f=Selector.handlers;c=(new Selector(c)).findElements(e);f.mark(c);e=0;for(var d=[],g;g=a[e];e++)g._countedByPrototype||d.push(g);f.unmark(c);return d},enabled:function(a){for(var c=0,e=[],f;f=a[c];c++)if(!f.disabled&&(!f.type||f.type!=="hidden"))e.push(f);return e},disabled:function(a){for(var c=0,e=[],f;f=a[c];c++)f.disabled&&
e.push(f);return e},checked:function(a){for(var c=0,e=[],f;f=a[c];c++)f.checked&&e.push(f);return e}},operators:{"=":function(a,c){return a==c},"!=":function(a,c){return a!=c},"^=":function(a,c){return a==c||a&&a.startsWith(c)},"$=":function(a,c){return a==c||a&&a.endsWith(c)},"*=":function(a,c){return a==c||a&&a.include(c)},"~=":function(a,c){return(" "+a+" ").include(" "+c+" ")},"|=":function(a,c){return("-"+(a||"").toUpperCase()+"-").include("-"+(c||"").toUpperCase()+"-")}},split:function(a){var c=
[];a.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(e){c.push(e[1].strip())});return c},matchElements:function(a,c){c=$$(c);var e=Selector.handlers;e.mark(c);for(var f=0,d=[],g;g=a[f];f++)g._countedByPrototype&&d.push(g);e.unmark(c);return d},findElement:function(a,c,e){if(Object.isNumber(c)){e=c;c=false}return Selector.matchElements(a,c||"*")[e||0]},findChildElements:function(a,c){c=Selector.split(c.join(","));for(var e=[],f=Selector.handlers,d=0,g=c.length,j;d<g;d++){j=new Selector(c[d].strip());
f.concat(e,j.findElements(a))}return g>1?f.unique(e):e}});Prototype.Browser.IE&&Object.extend(Selector.handlers,{concat:function(a,c){for(var e=0,f;f=c[e];e++)f.tagName!=="!"&&a.push(f);return a}});function $$(){return Selector.findChildElements(document,$A(arguments))}
var Form={reset:function(a){a=$(a);a.reset();return a},serializeElements:function(a,c){if(typeof c!="object")c={hash:!!c};else if(Object.isUndefined(c.hash))c.hash=true;var e,f,d=false,g=c.submit;a=a.inject({},function(j,k){if(!k.disabled&&k.name){e=k.name;f=$(k).getValue();if(f!=null&&k.type!="file"&&(k.type!="submit"||!d&&g!==false&&(!g||e==g)&&(d=true)))if(e in j){Object.isArray(j[e])||(j[e]=[j[e]]);j[e].push(f)}else j[e]=f}return j});return c.hash?a:Object.toQueryString(a)}};
Form.Methods={serialize:function(a,c){return Form.serializeElements(Form.getElements(a),c)},getElements:function(a){a=$(a).getElementsByTagName("*");for(var c,e=[],f=Form.Element.Serializers,d=0;c=a[d];d++)e.push(c);return e.inject([],function(g,j){f[j.tagName.toLowerCase()]&&g.push(Element.extend(j));return g})},getInputs:function(a,c,e){a=$(a);a=a.getElementsByTagName("input");if(!c&&!e)return $A(a).map(Element.extend);for(var f=0,d=[],g=a.length;f<g;f++){var j=a[f];c&&j.type!=c||e&&j.name!=e||
d.push(Element.extend(j))}return d},disable:function(a){a=$(a);Form.getElements(a).invoke("disable");return a},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a},findFirstElement:function(a){a=$(a).getElements().findAll(function(e){return"hidden"!=e.type&&!e.disabled});var c=a.findAll(function(e){return e.hasAttribute("tabIndex")&&e.tabIndex>=0}).sortBy(function(e){return e.tabIndex}).first();return c?c:a.find(function(e){return/^(?:input|select|textarea)$/i.test(e.tagName)})},
focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a},request:function(a,c){a=$(a);c=Object.clone(c||{});var e=c.parameters,f=a.readAttribute("action")||"";if(f.blank())f=window.location.href;c.parameters=a.serialize(true);if(e){if(Object.isString(e))e=e.toQueryParams();Object.extend(c.parameters,e)}if(a.hasAttribute("method")&&!c.method)c.method=a.method;return new Ajax.Request(f,c)}};
Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};
Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var c=a.getValue();if(c!=undefined){var e={};e[a.name]=c;return Object.toQueryString(e)}}return""},getValue:function(a){a=$(a);var c=a.tagName.toLowerCase();return Form.Element.Serializers[c](a)},setValue:function(a,c){a=$(a);var e=a.tagName.toLowerCase();Form.Element.Serializers[e](a,c);return a},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus();
if(a.select&&(a.tagName.toLowerCase()!="input"||!/^(?:button|reset|submit)$/i.test(a.type)))a.select()}catch(c){}return a},disable:function(a){a=$(a);a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element,$F=Form.Element.Methods.getValue;
Form.Element.Serializers={input:function(a,c){switch(a.type.toLowerCase()){case "checkbox":case "radio":return Form.Element.Serializers.inputSelector(a,c);default:return Form.Element.Serializers.textarea(a,c)}},inputSelector:function(a,c){if(Object.isUndefined(c))return a.checked?a.value:null;else a.checked=!!c},textarea:function(a,c){if(Object.isUndefined(c))return a.value;else a.value=c},select:function(a,c){if(Object.isUndefined(c))return this[a.type=="select-one"?"selectOne":"selectMany"](a);
else for(var e,f,d=!Object.isArray(c),g=0,j=a.length;g<j;g++){e=a.options[g];f=this.optionValue(e);if(d){if(f==c){e.selected=true;return}}else e.selected=c.include(f)}},selectOne:function(a){var c=a.selectedIndex;return c>=0?this.optionValue(a.options[c]):null},selectMany:function(a){var c,e=a.length;if(!e)return null;var f=0;for(c=[];f<e;f++){var d=a.options[f];d.selected&&c.push(this.optionValue(d))}return c},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}};
Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,c,e,f){$super(f,e);this.element=$(c);this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a)){this.callback(this.element,a);this.lastValue=a}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});
Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});
Abstract.EventObserver=Class.create({initialize:function(a,c){this.element=$(a);this.callback=c;this.lastValue=this.getValue();this.element.tagName.toLowerCase()=="form"?this.registerFormCallbacks():this.registerCallback(this.element)},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type)switch(a.type.toLowerCase()){case "checkbox":case "radio":Event.observe(a,
"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this));break}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});
(function(){function a(G){return s(G,0)}function c(G){return s(G,1)}function e(G){return s(G,2)}function f(G){G=n.extend(G);var I=G.target,Y=G.type;if((G=G.currentTarget)&&G.tagName)if(Y==="load"||Y==="error"||Y==="click"&&G.tagName.toLowerCase()==="input"&&G.type==="radio")I=G;if(I.nodeType==Node.TEXT_NODE)I=I.parentNode;return Element.extend(I)}function d(G,I){G=n.element(G);if(!I)return G;G=[G].concat(G.ancestors());return Selector.findElement(G,I,0)}function g(G){return{x:j(G),y:k(G)}}function j(G){var I=
document.documentElement,Y=document.body||{scrollLeft:0};return G.pageX||G.clientX+(I.scrollLeft||Y.scrollLeft)-(I.clientLeft||0)}function k(G){var I=document.documentElement,Y=document.body||{scrollTop:0};return G.pageY||G.clientY+(I.scrollTop||Y.scrollTop)-(I.clientTop||0)}function l(G){n.extend(G);G.preventDefault();G.stopPropagation();G.stopped=true}function r(G,I,Y){var Q=Element.retrieve(G,"prototype_event_registry");if(Object.isUndefined(Q)){z.push(G);Q=Element.retrieve(G,"prototype_event_registry",
$H())}var K=Q.get(I);if(Object.isUndefined(K)){K=[];Q.set(I,K)}if(K.pluck("handler").include(Y))return false;var W;if(I.include(":"))W=function(F){if(Object.isUndefined(F.eventName))return false;if(F.eventName!==I)return false;n.extend(F,G);Y.call(G,F)};else if(!h&&(I==="mouseenter"||I==="mouseleave")){if(I==="mouseenter"||I==="mouseleave")W=function(F){n.extend(F,G);for(var N=F.relatedTarget;N&&N!==G;)try{N=N.parentNode}catch(J){N=G}N!==G&&Y.call(G,F)}}else W=function(F){n.extend(F,G);Y.call(G,F)};
W.handler=Y;K.push(W);return W}function t(){for(var G=0,I=z.length;G<I;G++){n.stopObserving(z[G]);z[G]=null}}function q(G,I,Y){G=$(G);Y=r(G,I,Y);if(!Y)return G;if(I.include(":"))if(G.addEventListener)G.addEventListener("dataavailable",Y,false);else{G.attachEvent("ondataavailable",Y);G.attachEvent("onfilterchange",Y)}else{I=C(I);G.addEventListener?G.addEventListener(I,Y,false):G.attachEvent("on"+I,Y)}return G}function p(G,I,Y){G=$(G);var Q=Element.retrieve(G,"prototype_event_registry");if(Object.isUndefined(Q))return G;
if(I&&!Y){var K=Q.get(I);if(Object.isUndefined(K))return G;K.each(function(N){Element.stopObserving(G,I,N.handler)});return G}else if(!I){Q.each(function(N){var J=N.key;N.value.each(function(L){Element.stopObserving(G,J,L.handler)})});return G}if(K=Q.get(I)){var W=K.find(function(N){return N.handler===Y});if(!W)return G;var F=C(I);if(I.include(":"))if(G.removeEventListener)G.removeEventListener("dataavailable",W,false);else{G.detachEvent("ondataavailable",W);G.detachEvent("onfilterchange",W)}else G.removeEventListener?
G.removeEventListener(F,W,false):G.detachEvent("on"+F,W);Q.set(I,K.without(W));return G}}function o(G,I,Y,Q){G=$(G);if(Object.isUndefined(Q))Q=true;if(G==document&&document.createEvent&&!G.dispatchEvent)G=document.documentElement;var K;if(document.createEvent){K=document.createEvent("HTMLEvents");K.initEvent("dataavailable",true,true)}else{K=document.createEventObject();K.eventType=Q?"ondataavailable":"onfilterchange"}K.eventName=I;K.memo=Y||{};document.createEvent?G.dispatchEvent(K):G.fireEvent(K.eventType,
K);return n.extend(K)}var n={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{}},u=document.documentElement,h="onmouseenter"in u&&"onmouseleave"in u,s;if(Prototype.Browser.IE){var v={0:1,1:4,2:2};s=function(G,I){return G.button===v[I]}}else s=Prototype.Browser.WebKit?function(G,I){switch(I){case 0:return G.which==1&&!G.metaKey;case 1:return G.which==1&&G.metaKey;
default:return false}}:function(G,I){return G.which?G.which===I+1:G.button===I};n.Methods={isLeftClick:a,isMiddleClick:c,isRightClick:e,element:f,findElement:d,pointer:g,pointerX:j,pointerY:k,stop:l};var y=Object.keys(n.Methods).inject({},function(G,I){G[I]=n.Methods[I].methodize();return G});if(Prototype.Browser.IE){function B(G){switch(G.type){case "mouseover":G=G.fromElement;break;case "mouseout":G=G.toElement;break;default:return null}return Element.extend(G)}Object.extend(y,{stopPropagation:function(){this.cancelBubble=
true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});n.extend=function(G,I){if(!G)return false;if(G._extendedByPrototype)return G;G._extendedByPrototype=Prototype.emptyFunction;var Y=n.pointer(G);Object.extend(G,{target:G.srcElement||I,relatedTarget:B(G),pageX:Y.x,pageY:Y.y});return Object.extend(G,y)}}else{n.prototype=window.Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(n.prototype,y);n.extend=Prototype.K}var z=[];Prototype.Browser.IE&&
window.attachEvent("onunload",t);Prototype.Browser.WebKit&&window.addEventListener("unload",Prototype.emptyFunction,false);var C=Prototype.K;h||(C=function(G){var I={mouseenter:"mouseover",mouseleave:"mouseout"};return G in I?I[G]:G});Object.extend(n,n.Methods);Object.extend(n,{fire:o,observe:q,stopObserving:p});Element.addMethods({fire:o,observe:q,stopObserving:p});Object.extend(document,{fire:o.methodize(),observe:q.methodize(),stopObserving:p.methodize(),loaded:false});if(window.Event)Object.extend(window.Event,
n);else window.Event=n})();
(function(){function a(){if(!document.loaded){f&&window.clearTimeout(f);document.loaded=true;document.fire("dom:loaded")}}function c(){if(document.readyState==="complete"){document.stopObserving("readystatechange",c);a()}}function e(){try{document.documentElement.doScroll("left")}catch(d){f=e.defer();return}a()}var f;if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,false);else{document.observe("readystatechange",c);if(window==top)f=e.defer()}Event.observe(window,"load",
a)})();Element.addMethods();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;
var Insertion={Before:function(a,c){return Element.insert(a,{before:c})},Top:function(a,c){return Element.insert(a,{top:c})},Bottom:function(a,c){return Element.insert(a,{bottom:c})},After:function(a,c){return Element.insert(a,{after:c})}},$continue=new Error('"throw $continue" is deprecated, use "return" instead'),Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||
document.documentElement.scrollTop||document.body.scrollTop||0},within:function(a,c,e){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets(a,c,e);this.xcomp=c;this.ycomp=e;this.offset=Element.cumulativeOffset(a);return e>=this.offset[1]&&e<this.offset[1]+a.offsetHeight&&c>=this.offset[0]&&c<this.offset[0]+a.offsetWidth},withinIncludingScrolloffsets:function(a,c,e){var f=Element.cumulativeScrollOffset(a);this.xcomp=c+f[0]-this.deltaX;this.ycomp=e+f[1]-this.deltaY;this.offset=Element.cumulativeOffset(a);
return this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+a.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+a.offsetWidth},overlap:function(a,c){if(!a)return 0;if(a=="vertical")return(this.offset[1]+c.offsetHeight-this.ycomp)/c.offsetHeight;if(a=="horizontal")return(this.offset[0]+c.offsetWidth-this.xcomp)/c.offsetWidth},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a)},
relativize:function(a){Position.prepare();return Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(a,c,e){e=e||{};return Element.clonePosition(c,a,e)}};
if(!document.getElementsByClassName)document.getElementsByClassName=function(a){function c(e){return e.blank()?null:"[contains(concat(' ', @class, ' '), ' "+e+" ')]"}a.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(e,f){f=f.toString().strip();return(f=/\s/.test(f)?$w(f).map(c).join(""):c(f))?document._getElementsByXPath(".//*"+f,e):[]}:function(e,f){f=f.toString().strip();var d=[],g=/\s/.test(f)?$w(f):null;if(!g&&!f)return d;e=$(e).getElementsByTagName("*");f=" "+f+" ";for(var j=
0,k,l;k=e[j];j++)if(k.className&&(l=" "+k.className+" ")&&(l.include(f)||g&&g.all(function(r){return!r.toString().blank()&&l.include(" "+r+" ")})))d.push(Element.extend(k));return d};return function(e,f){return $(f||document.body).getElementsByClassName(e)}}(Element.Methods);Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(c){return c.length>0})._each(a)},set:function(a){this.element.className=a},add:function(a){this.include(a)||this.set($A(this).concat(a).join(" "))},remove:function(a){this.include(a)&&this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);
Date.dayNames=["\u65e5\u66dc\u65e5","\u6708\u66dc\u65e5","\u706b\u66dc\u65e5","\u6c34\u66dc\u65e5","\u6728\u66dc\u65e5","\u91d1\u66dc\u65e5","\u571f\u66dc\u65e5"];Date.abbrDayNames=["\u65e5","\u6708","\u706b","\u6c34","\u6728","\u91d1","\u571f"];Date.monthNames=["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"];
Date.abbrMonthNames=["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"];Date.firstDayOfWeek=1;Date.format="yyyy/mm/dd";Date.fullYearStart="20";
(function(){function a(e,f){Date.prototype[e]||(Date.prototype[e]=f)}a("isLeapYear",function(){var e=this.getFullYear();return e%4==0&&e%100!=0||e%400==0});a("isWeekend",function(){return this.getDay()==0||this.getDay()==6});a("isWeekDay",function(){return!this.isWeekend()});a("getDaysInMonth",function(){return[31,this.isLeapYear()?29:28,31,30,31,30,31,31,30,31,30,31][this.getMonth()]});a("getDayName",function(e){return e?Date.abbrDayNames[this.getDay()]:Date.dayNames[this.getDay()]});a("getMonthName",
function(e){return e?Date.abbrMonthNames[this.getMonth()]:Date.monthNames[this.getMonth()]});a("getDayOfYear",function(){var e=new Date("1/1/"+this.getFullYear());return Math.floor((this.getTime()-e.getTime())/864E5)});a("getWeekOfYear",function(){return Math.ceil(this.getDayOfYear()/7)});a("setDayOfYear",function(e){this.setMonth(0);this.setDate(e);return this});a("addYears",function(e){this.setFullYear(this.getFullYear()+e);return this});a("addMonths",function(e){var f=this.getDate();this.setMonth(this.getMonth()+
e);f>this.getDate()&&this.addDays(-this.getDate());return this});a("addDays",function(e){this.setTime(this.getTime()+e*864E5);return this});a("addHours",function(e){this.setHours(this.getHours()+e);return this});a("addMinutes",function(e){this.setMinutes(this.getMinutes()+e);return this});a("addSeconds",function(e){this.setSeconds(this.getSeconds()+e);return this});a("isInvalid",function(){return/^invalid\sdate$/i.test(this)});a("zeroTime",function(){this.setMilliseconds(0);this.setSeconds(0);this.setMinutes(0);
this.setHours(0);return this});a("asString",function(e){e=e||Date.format;e=e.split("mm").length>1?e.split("mmmm").join(this.getMonthName(false)).split("mmm").join(this.getMonthName(true)).split("mm").join(c(this.getMonth()+1)):e.split("m").join(this.getMonth()+1);return e.split("yyyy").join(this.getFullYear()).split("yy").join((this.getFullYear()+"").substring(2)).split("dd").join(c(this.getDate())).split("d").join(this.getDate())});Date.fromString=function(e){var f=Date.format,d=new Date("01/01/1970");
if(e=="")return d;e=e.toLowerCase();for(var g="",j=[],k=/(dd?d?|mm?m?|yy?yy?)+([^(m|d|y)])?/g,l;(l=k.exec(f))!=null;){switch(l[1]){case "d":case "dd":case "m":case "mm":case "yy":case "yyyy":g+="(\\d+\\d?\\d?\\d?)+";j.push(l[1].substr(0,1));break;case "mmm":g+="([a-z]{3})";j.push("M");break}if(l[2])g+=l[2]}e=e.match(new RegExp(g));for(f=0;f<j.length;f++){g=e[f+1];switch(j[f]){case "d":d.setDate(g);break;case "m":d.setMonth(Number(g)-1);break;case "M":for(k=0;k<Date.abbrMonthNames.length;k++)if(Date.abbrMonthNames[k].toLowerCase()==
g)break;d.setMonth(k);break;case "y":d.setYear(g);break}}return d};var c=function(e){e="0"+e;return e.substring(e.length-2)}})();
var swfobject=function(){function a(){if(!ra){try{var O=K.getElementsByTagName("body")[0].appendChild(h("span"));O.parentNode.removeChild(O)}catch(H){return}ra=true;O=N.length;for(var P=0;P<O;P++)N[P]()}}function c(O){if(ra)O();else N[N.length]=O}function e(O){if(typeof Q.addEventListener!=C)Q.addEventListener("load",O,false);else if(typeof K.addEventListener!=C)K.addEventListener("load",O,false);else if(typeof Q.attachEvent!=C)s(Q,"onload",O);else if(typeof Q.onload=="function"){var H=Q.onload;Q.onload=
function(){H();O()}}else Q.onload=O}function f(){F?d():g()}function d(){var O=K.getElementsByTagName("body")[0],H=h(G);H.setAttribute("type",I);var P=O.appendChild(H);if(P){var S=0;(function(){if(typeof P.GetVariable!=C){var U=P.GetVariable("$version");if(U){U=U.split(" ")[1].split(",");R.pv=[parseInt(U[0],10),parseInt(U[1],10),parseInt(U[2],10)]}}else if(S<10){S++;setTimeout(arguments.callee,10);return}O.removeChild(H);P=null;g()})()}else g()}function g(){var O=J.length;if(O>0)for(var H=0;H<O;H++){var P=
J[H].id,S=J[H].callbackFn,U={success:false,id:P};if(R.pv[0]>0){var X=u(P);if(X)if(v(J[H].swfVersion)&&!(R.wk&&R.wk<312)){B(P,true);if(S){U.success=true;U.ref=j(P);S(U)}}else if(J[H].expressInstall&&k()){U={};U.data=J[H].expressInstall;U.width=X.getAttribute("width")||"0";U.height=X.getAttribute("height")||"0";if(X.getAttribute("class"))U.styleclass=X.getAttribute("class");if(X.getAttribute("align"))U.align=X.getAttribute("align");var ea={};X=X.getElementsByTagName("param");for(var oa=X.length,ta=
0;ta<oa;ta++)if(X[ta].getAttribute("name").toLowerCase()!="movie")ea[X[ta].getAttribute("name")]=X[ta].getAttribute("value");l(U,ea,P,S)}else{r(X);S&&S(U)}}else{B(P,true);if(S){if((P=j(P))&&typeof P.SetVariable!=C){U.success=true;U.ref=P}S(U)}}}}function j(O){var H=null;if((O=u(O))&&O.nodeName=="OBJECT")if(typeof O.SetVariable!=C)H=O;else if(O=O.getElementsByTagName(G)[0])H=O;return H}function k(){return!ma&&v("6.0.65")&&(R.win||R.mac)&&!(R.wk&&R.wk<312)}function l(O,H,P,S){ma=true;ua=S||null;ka=
{success:false,id:P};var U=u(P);if(U){if(U.nodeName=="OBJECT"){aa=t(U);ca=null}else{aa=U;ca=P}O.id=Y;if(typeof O.width==C||!/%$/.test(O.width)&&parseInt(O.width,10)<310)O.width="310";if(typeof O.height==C||!/%$/.test(O.height)&&parseInt(O.height,10)<137)O.height="137";K.title=K.title.slice(0,47)+" - Flash Player Installation";S=R.ie&&R.win?"ActiveX":"PlugIn";S="MMredirectURL="+Q.location.toString().replace(/&/g,"%26")+"&MMplayerType="+S+"&MMdoctitle="+K.title;if(typeof H.flashvars!=C)H.flashvars+=
"&"+S;else H.flashvars=S;if(R.ie&&R.win&&U.readyState!=4){S=h("div");P+="SWFObjectNew";S.setAttribute("id",P);U.parentNode.insertBefore(S,U);U.style.display="none";(function(){U.readyState==4?U.parentNode.removeChild(U):setTimeout(arguments.callee,10)})()}q(O,H,P)}}function r(O){if(R.ie&&R.win&&O.readyState!=4){var H=h("div");O.parentNode.insertBefore(H,O);H.parentNode.replaceChild(t(O),H);O.style.display="none";(function(){O.readyState==4?O.parentNode.removeChild(O):setTimeout(arguments.callee,10)})()}else O.parentNode.replaceChild(t(O),
O)}function t(O){var H=h("div");if(R.win&&R.ie)H.innerHTML=O.innerHTML;else if(O=O.getElementsByTagName(G)[0])if(O=O.childNodes)for(var P=O.length,S=0;S<P;S++)!(O[S].nodeType==1&&O[S].nodeName=="PARAM")&&O[S].nodeType!=8&&H.appendChild(O[S].cloneNode(true));return H}function q(O,H,P){var S,U=u(P);if(R.wk&&R.wk<312)return S;if(U){if(typeof O.id==C)O.id=P;if(R.ie&&R.win){var X="";for(var ea in O)if(O[ea]!=Object.prototype[ea])if(ea.toLowerCase()=="data")H.movie=O[ea];else if(ea.toLowerCase()=="styleclass")X+=
' class="'+O[ea]+'"';else if(ea.toLowerCase()!="classid")X+=" "+ea+'="'+O[ea]+'"';ea="";for(var oa in H)if(H[oa]!=Object.prototype[oa])ea+='<param name="'+oa+'" value="'+H[oa]+'" />';U.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+X+">"+ea+"</object>";L[L.length]=O.id;S=u(O.id)}else{oa=h(G);oa.setAttribute("type",I);for(X in O)if(O[X]!=Object.prototype[X])if(X.toLowerCase()=="styleclass")oa.setAttribute("class",O[X]);else X.toLowerCase()!="classid"&&oa.setAttribute(X,O[X]);
for(var ta in H)H[ta]!=Object.prototype[ta]&&ta.toLowerCase()!="movie"&&p(oa,ta,H[ta]);U.parentNode.replaceChild(oa,U);S=oa}}return S}function p(O,H,P){var S=h("param");S.setAttribute("name",H);S.setAttribute("value",P);O.appendChild(S)}function o(O){var H=u(O);if(H&&H.nodeName=="OBJECT")if(R.ie&&R.win){H.style.display="none";(function(){H.readyState==4?n(O):setTimeout(arguments.callee,10)})()}else H.parentNode.removeChild(H)}function n(O){if(O=u(O)){for(var H in O)if(typeof O[H]=="function")O[H]=
null;O.parentNode.removeChild(O)}}function u(O){var H=null;try{H=K.getElementById(O)}catch(P){}return H}function h(O){return K.createElement(O)}function s(O,H,P){O.attachEvent(H,P);ba[ba.length]=[O,H,P]}function v(O){var H=R.pv;O=O.split(".");O[0]=parseInt(O[0],10);O[1]=parseInt(O[1],10)||0;O[2]=parseInt(O[2],10)||0;return H[0]>O[0]||H[0]==O[0]&&H[1]>O[1]||H[0]==O[0]&&H[1]==O[1]&&H[2]>=O[2]?true:false}function y(O,H,P,S){if(!(R.ie&&R.mac)){var U=K.getElementsByTagName("head")[0];if(U){P=P&&typeof P==
"string"?P:"screen";if(S)Da=la=null;if(!la||Da!=P){S=h("style");S.setAttribute("type","text/css");S.setAttribute("media",P);la=U.appendChild(S);if(R.ie&&R.win&&typeof K.styleSheets!=C&&K.styleSheets.length>0)la=K.styleSheets[K.styleSheets.length-1];Da=P}if(R.ie&&R.win)la&&typeof la.addRule==G&&la.addRule(O,H);else la&&typeof K.createTextNode!=C&&la.appendChild(K.createTextNode(O+" {"+H+"}"))}}}function B(O,H){if(za){H=H?"visible":"hidden";if(ra&&u(O))u(O).style.visibility=H;else y("#"+O,"visibility:"+
H)}}function z(O){return/[\\\"<>\.;]/.exec(O)!=null&&typeof encodeURIComponent!=C?encodeURIComponent(O):O}var C="undefined",G="object",I="application/x-shockwave-flash",Y="SWFObjectExprInst",Q=window,K=document,W=navigator,F=false,N=[f],J=[],L=[],ba=[],aa,ca,ua,ka,ra=false,ma=false,la,Da,za=true,R=function(){var O=typeof K.getElementById!=C&&typeof K.getElementsByTagName!=C&&typeof K.createElement!=C,H=W.userAgent.toLowerCase(),P=W.platform.toLowerCase(),S=P?/win/.test(P):/win/.test(H);P=P?/mac/.test(P):
/mac/.test(H);H=/webkit/.test(H)?parseFloat(H.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var U=!+"\u000b1",X=[0,0,0],ea=null;if(typeof W.plugins!=C&&typeof W.plugins["Shockwave Flash"]==G){if((ea=W.plugins["Shockwave Flash"].description)&&!(typeof W.mimeTypes!=C&&W.mimeTypes[I]&&!W.mimeTypes[I].enabledPlugin)){F=true;U=false;ea=ea.replace(/^.*\s+(\S+\s+\S+$)/,"$1");X[0]=parseInt(ea.replace(/^(.*)\..*$/,"$1"),10);X[1]=parseInt(ea.replace(/^.*\.(.*)\s.*$/,"$1"),10);X[2]=/[a-zA-Z]/.test(ea)?
parseInt(ea.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof Q.ActiveXObject!=C)try{var oa=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(oa)if(ea=oa.GetVariable("$version")){U=true;ea=ea.split(" ")[1].split(",");X=[parseInt(ea[0],10),parseInt(ea[1],10),parseInt(ea[2],10)]}}catch(ta){}return{w3:O,pv:X,wk:H,ie:U,win:S,mac:P}}();(function(){if(R.w3){if(typeof K.readyState!=C&&K.readyState=="complete"||typeof K.readyState==C&&(K.getElementsByTagName("body")[0]||K.body))a();if(!ra){typeof K.addEventListener!=
C&&K.addEventListener("DOMContentLoaded",a,false);if(R.ie&&R.win){K.attachEvent("onreadystatechange",function(){if(K.readyState=="complete"){K.detachEvent("onreadystatechange",arguments.callee);a()}});Q==top&&function(){if(!ra){try{K.documentElement.doScroll("left")}catch(O){setTimeout(arguments.callee,0);return}a()}}()}R.wk&&function(){ra||(/loaded|complete/.test(K.readyState)?a():setTimeout(arguments.callee,0))}();e(a)}}})();(function(){R.ie&&R.win&&window.attachEvent("onunload",function(){for(var O=
ba.length,H=0;H<O;H++)ba[H][0].detachEvent(ba[H][1],ba[H][2]);O=L.length;for(H=0;H<O;H++)o(L[H]);for(var P in R)R[P]=null;R=null;for(var S in swfobject)swfobject[S]=null;swfobject=null})})();return{registerObject:function(O,H,P,S){if(R.w3&&O&&H){var U={};U.id=O;U.swfVersion=H;U.expressInstall=P;U.callbackFn=S;J[J.length]=U;B(O,false)}else S&&S({success:false,id:O})},getObjectById:function(O){if(R.w3)return j(O)},embedSWF:function(O,H,P,S,U,X,ea,oa,ta,qa){var va={success:false,id:H};if(R.w3&&!(R.wk&&
R.wk<312)&&O&&H&&P&&S&&U){B(H,false);c(function(){P+="";S+="";var ja={};if(ta&&typeof ta===G)for(var sa in ta)ja[sa]=ta[sa];ja.data=O;ja.width=P;ja.height=S;sa={};if(oa&&typeof oa===G)for(var Aa in oa)sa[Aa]=oa[Aa];if(ea&&typeof ea===G)for(var Fa in ea)if(typeof sa.flashvars!=C)sa.flashvars+="&"+Fa+"="+ea[Fa];else sa.flashvars=Fa+"="+ea[Fa];if(v(U)){Aa=q(ja,sa,H);ja.id==H&&B(H,true);va.success=true;va.ref=Aa}else if(X&&k()){ja.data=X;l(ja,sa,H,qa);return}else B(H,true);qa&&qa(va)})}else qa&&qa(va)},
switchOffAutoHideShow:function(){za=false},ua:R,getFlashPlayerVersion:function(){return{major:R.pv[0],minor:R.pv[1],release:R.pv[2]}},hasFlashPlayerVersion:v,createSWF:function(O,H,P){if(R.w3)return q(O,H,P)},showExpressInstall:function(O,H,P,S){R.w3&&k()&&l(O,H,P,S)},removeSWF:function(O){R.w3&&o(O)},createCSS:function(O,H,P,S){R.w3&&y(O,H,P,S)},addDomLoadEvent:c,addLoadEvent:e,getQueryParamValue:function(O){var H=K.location.search||K.location.hash;if(H){if(/\?/.test(H))H=H.split("?")[1];if(O==null)return z(H);
H=H.split("&");for(var P=0;P<H.length;P++)if(H[P].substring(0,H[P].indexOf("="))==O)return z(H[P].substring(H[P].indexOf("=")+1))}return""},expressInstallCallback:function(){if(ma){var O=u(Y);if(O&&aa){O.parentNode.replaceChild(aa,O);if(ca){B(ca,true);if(R.ie&&R.win)aa.style.display="block"}ua&&ua(ka)}ma=false}}}}();
function parseUri(a){var c=parseUri.options;a=c.parser[c.strictMode?"strict":"loose"].exec(a);for(var e={},f=14;f--;)e[c.key[f]]=a[f]||"";e[c.q.name]={};e[c.key[12]].replace(c.q.parser,function(d,g,j){if(g)e[c.q.name][g]=j});return e}
parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
(function(a){function c(r,t){r=String.fromCharCode(r);return t?r.toUpperCase():r.toLowerCase()}function e(r,t,q){for(var p="",o,n;p.length<r;){n=g+Math.floor((j-g)*Math.random())+(n>j?0:10);o=n>j?String(n-j-1):c(n,Math.random()<0.5);if(t)q||(o=o.toUpperCase());else o=o.toLowerCase();if(o&&p[p.length-1]!=o)p+=o}return p}function f(r,t,q,p,o){this.length=r||this.length;this.useCase=k.test(t)?t:l;if(q!=undefined)this.useSymbol=q;if(p!=undefined)this.useDigit=p;if(o!=undefined)this.unique=o;this.generate()}
var d={},g=65,j=90,k=/^(both|upper|lower)$/,l="both";f.BOTH=l;f.UPPER="upper";f.LOWER="lower";f.prototype={useSymbol:true,useDigit:true,unique:true,length:10,generate:function(){var r=true,t=true;switch(this.useCase){case "lower":r=false;break;case "upper":t=false;break}do var q=e(this.length,r,t,this.useSymbol);while(this.unique&&d[q]);if(this.unique)d[q]=1;return this._value=q},toString:function(){return this._value},equals:function(r){return r==this.toString()}};a.RandomString=f})(window);
var EventDispatcher=function(){};
Object.extend(EventDispatcher.prototype,{buildListenerChain:function(){if(!this.listenerChain)this.listenerChain={}},addEventListener:function(a,c){if(!c instanceof Function)throw{message:"Listener isn't a function"};this.buildListenerChain();if(this.listenerChain[a])this.listenerChain[a].push(c);else this.listenerChain[a]=[c]},hasEventListener:function(a){return typeof this.listenerChain[a]!="undefined"},removeEventListener:function(a,c){if(!this.hasEventListener(a))return false;for(var e=0;e<this.listenerChain[a].length;e++)this.listenerChain[a][e]==
c&&this.listenerChain[a].splice(e,1)},dispatchEvent:function(a,c){this.buildListenerChain();if(!this.hasEventListener(a))return false;this.listenerChain[a].any(function(e){return e.apply(e,c)==false?true:false})}});
(function(a){var c=/^\s*|\s*$/g,e={majorVersion:"3",minorVersion:"3.5.1",releaseDate:"2010-05-07",_init:function(){function f(q){if(q.src&&/tiny_mce(|_gzip|_jquery|_prototype)(_dev|_src)?.js/.test(q.src)){if(/_(src|dev)\.js/g.test(q.src))d.suffix="_src";if((r=q.src.indexOf("?"))!=-1)d.query=q.src.substring(r+1);d.baseURL=q.src.substring(0,q.src.lastIndexOf("/"));if(l&&d.baseURL.indexOf("://")==-1&&d.baseURL.indexOf("/")!==0)d.baseURL=l+d.baseURL;return d.baseURL}return null}var d=this,g=document,
j=navigator,k=j.userAgent,l,r,t;d.isOpera=a.opera&&opera.buildNumber;d.isWebKit=/WebKit/.test(k);d.isIE=!d.isWebKit&&!d.isOpera&&/MSIE/gi.test(k)&&/Explorer/gi.test(j.appName);d.isIE6=d.isIE&&/MSIE [56]/.test(k);d.isGecko=!d.isWebKit&&/Gecko/.test(k);d.isMac=k.indexOf("Mac")!=-1;d.isAir=/adobeair/i.test(k);d.isIDevice=/(iPad|iPhone)/.test(k);if(a.tinyMCEPreInit){d.suffix=tinyMCEPreInit.suffix;d.baseURL=tinyMCEPreInit.base;d.query=tinyMCEPreInit.query}else{d.suffix="";k=g.getElementsByTagName("base");
for(j=0;j<k.length;j++)if(t=k[j].href){if(/^https?:\/\/[^\/]+$/.test(t))t+="/";l=t?t.match(/.*\//)[0]:""}k=g.getElementsByTagName("script");for(j=0;j<k.length;j++)if(f(k[j]))return;if(g=g.getElementsByTagName("head")[0]){k=g.getElementsByTagName("script");for(j=0;j<k.length;j++)if(f(k[j]))return}}},is:function(f,d){if(!d)return f!==void 0;if(d=="array"&&f.hasOwnProperty&&f instanceof Array)return true;return typeof f==d},each:function(f,d,g){var j,k;if(!f)return 0;g=g||f;if(f.length!==void 0){j=0;
for(k=f.length;j<k;j++)if(d.call(g,f[j],j,f)===false)return 0}else for(j in f)if(f.hasOwnProperty(j))if(d.call(g,f[j],j,f)===false)return 0;return 1},map:function(f,d){var g=[];e.each(f,function(j){g.push(d(j))});return g},grep:function(f,d){var g=[];e.each(f,function(j){if(!d||d(j))g.push(j)});return g},inArray:function(f,d){var g,j;if(f){g=0;for(j=f.length;g<j;g++)if(f[g]===d)return g}return-1},extend:function(f,d){var g,j,k=arguments;g=1;for(j=k.length;g<j;g++){d=k[g];e.each(d,function(l,r){if(l!==
void 0)f[r]=l})}return f},trim:function(f){return(f?""+f:"").replace(c,"")},create:function(f,d){var g=this,j,k,l,r,t,q=0;f=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(f);l=f[3].match(/(^|\.)(\w+)$/i)[2];k=g.createNS(f[3].replace(/\.\w+$/,""));if(!k[l])if(f[2]=="static"){k[l]=d;this.onCreate&&this.onCreate(f[2],f[3],k[l])}else{if(!d[l]){d[l]=function(){};q=1}k[l]=d[l];g.extend(k[l].prototype,d);if(f[5]){j=g.resolve(f[5]).prototype;r=f[5].match(/\.(\w+)$/i)[1];t=k[l];k[l]=q?function(){return j[r].apply(this,
arguments)}:function(){this.parent=j[r];return t.apply(this,arguments)};k[l].prototype[l]=k[l];g.each(j,function(p,o){k[l].prototype[o]=j[o]});g.each(d,function(p,o){if(j[o])k[l].prototype[o]=function(){this.parent=j[o];return p.apply(this,arguments)};else if(o!=l)k[l].prototype[o]=p})}g.each(d["static"],function(p,o){k[l][o]=p});this.onCreate&&this.onCreate(f[2],f[3],k[l].prototype)}},walk:function(f,d,g,j){j=j||this;if(f){if(g)f=f[g];e.each(f,function(k,l){if(d.call(j,k,l,g)===false)return false;
e.walk(k,d,g,j)})}},createNS:function(f,d){var g,j;d=d||a;f=f.split(".");for(g=0;g<f.length;g++){j=f[g];d[j]||(d[j]={});d=d[j]}return d},resolve:function(f,d){var g,j;d=d||a;f=f.split(".");g=0;for(j=f.length;g<j;g++){d=d[f[g]];if(!d)break}return d},addUnload:function(f,d){var g=this;f={func:f,scope:d||this};if(g.unloads)g.unloads.push(f);else{function j(){var l=g.unloads,r,t;if(l){for(t in l)(r=l[t])&&r.func&&r.func.call(r.scope,1);if(a.detachEvent){a.detachEvent("onbeforeunload",k);a.detachEvent("onunload",
j)}else a.removeEventListener&&a.removeEventListener("unload",j,false);g.unloads=w=j=0;a.CollectGarbage&&CollectGarbage()}}function k(){var l=document;if(l.readyState=="interactive"){function r(){l.detachEvent("onstop",r);j&&j();l=0}l&&l.attachEvent("onstop",r);a.setTimeout(function(){l&&l.detachEvent("onstop",r)},0)}}if(a.attachEvent){a.attachEvent("onunload",j);a.attachEvent("onbeforeunload",k)}else a.addEventListener&&a.addEventListener("unload",j,false);g.unloads=[f]}return f},removeUnload:function(f){var d=
this.unloads,g=null;e.each(d,function(j,k){if(j&&j.func==f){d.splice(k,1);g=f;return false}});return g},explode:function(f,d){return f?e.map(f.split(d||","),e.trim):f},_addVer:function(f){var d;if(!this.query)return f;d=(f.indexOf("?")==-1?"?":"&")+this.query;if(f.indexOf("#")==-1)return f+d;return f.replace("#",d+"#")}};e._init();a.tinymce=a.tinyMCE=e})(window);
tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(a,c){this.listeners.push({cb:a,scope:c||this.scope});return a},addToTop:function(a,c){this.listeners.unshift({cb:a,scope:c||this.scope});return a},remove:function(a){var c=this.listeners,e=null;tinymce.each(c,function(f,d){if(a==f.cb){e=a;c.splice(d,1);return false}});return e},dispatch:function(){var a,c=arguments,e,f=this.listeners;for(e=0;e<f.length;e++){a=
f[e];a=a.cb.apply(a.scope,c);if(a===false)break}return a}});
(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(c,e){var f=this;c=tinymce.trim(c);e=f.settings=e||{};if(/^(mailto|tel|news|javascript|about|data):/i.test(c)||/^\s*#/.test(c))f.source=c;else{if(c.indexOf("/")===0&&c.indexOf("//")!==0)c=(e.base_uri?e.base_uri.protocol||"http":"http")+"://mce_host"+c;/^\w*:?\/\//.test(c)||(c=(e.base_uri.protocol||"http")+"://mce_host"+f.toAbsPath(e.base_uri.path,c));c=c.replace(/@@/g,"(mce_at)");c=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(c);
a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(d,g){if(g=c[g])g=g.replace(/\(mce_at\)/g,"@@");f[d]=g});if(e=e.base_uri){if(!f.protocol)f.protocol=e.protocol;if(!f.userInfo)f.userInfo=e.userInfo;if(!f.port&&f.host=="mce_host")f.port=e.port;if(!f.host||f.host=="mce_host")f.host=e.host;f.source=""}}},setPath:function(c){var e=this;c=/^(.*?)\/?(\w+)?$/.exec(c);e.path=c[0];e.directory=c[1];e.file=c[2];e.source=
"";e.getURI()},toRelative:function(c){var e=this;if(c==="./")return c;c=new tinymce.util.URI(c,{base_uri:e});if(c.host!="mce_host"&&e.host!=c.host&&c.host||e.port!=c.port||e.protocol!=c.protocol)return c.getURI();e=e.toRelPath(e.path,c.path);if(c.query)e+="?"+c.query;if(c.anchor)e+="#"+c.anchor;return e},toAbsolute:function(c,e){c=new tinymce.util.URI(c,{base_uri:this});return c.getURI(this.host==c.host&&this.protocol==c.protocol?e:0)},toRelPath:function(c,e){var f,d=0,g="",j,k;c=c.substring(0,c.lastIndexOf("/"));
c=c.split("/");f=e.split("/");if(c.length>=f.length){j=0;for(k=c.length;j<k;j++)if(j>=f.length||c[j]!=f[j]){d=j+1;break}}if(c.length<f.length){j=0;for(k=f.length;j<k;j++)if(j>=c.length||c[j]!=f[j]){d=j+1;break}}if(d==1)return e;j=0;for(k=c.length-(d-1);j<k;j++)g+="../";j=d-1;for(k=f.length;j<k;j++)g+=j!=d-1?"/"+f[j]:f[j];return g},toAbsPath:function(c,e){var f,d=0,g=[],j;j=/\/$/.test(e)?"/":"";c=c.split("/");e=e.split("/");a(c,function(k){k&&g.push(k)});c=g;f=e.length-1;for(g=[];f>=0;f--)if(!(e[f].length==
0||e[f]=="."))if(e[f]=="..")d++;else if(d>0)d--;else g.push(e[f]);f=c.length-d;c=f<=0?g.reverse().join("/"):c.slice(0,f).join("/")+"/"+g.reverse().join("/");if(c.indexOf("/")!==0)c="/"+c;if(j&&c.lastIndexOf("/")!==c.length-1)c+=j;return c},getURI:function(c){var e,f=this;if(!f.source||c){e="";if(!c){if(f.protocol)e+=f.protocol+"://";if(f.userInfo)e+=f.userInfo+"@";if(f.host)e+=f.host;if(f.port)e+=":"+f.port}if(f.path)e+=f.path;if(f.query)e+="?"+f.query;if(f.anchor)e+="#"+f.anchor;f.source=e}return f.source}})})();
(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(c){c=this.get(c);var e;c&&a(c.split("&"),function(f){f=f.split("=");e=e||{};e[unescape(f[0])]=unescape(f[1])});return e},setHash:function(c,e,f,d,g,j){var k="";a(e,function(l,r){k+=(!k?"":"&")+escape(r)+"="+escape(l)});this.set(c,k,f,d,g,j)},get:function(c){var e=document.cookie,f=c+"=",d;if(e){d=e.indexOf("; "+f);if(d==-1){d=e.indexOf(f);if(d!=0)return null}else d+=2;c=e.indexOf(";",d);if(c==-1)c=e.length;
return unescape(e.substring(d+f.length,c))}},set:function(c,e,f,d,g,j){document.cookie=c+"="+escape(e)+(f?"; expires="+f.toGMTString():"")+(d?"; path="+escape(d):"")+(g?"; domain="+g:"")+(j?"; secure":"")},remove:function(c,e){var f=new Date;f.setTime(f.getTime()-1E3);this.set(c,"",f,e,f)}})})();
tinymce.create("static tinymce.util.JSON",{serialize:function(a){var c,e,f=tinymce.util.JSON.serialize,d;if(a==null)return"null";d=typeof a;if(d=="string"){e="\u0008b\tt\nn\u000cf\rr\"\"''\\\\";return'"'+a.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(g,j){c=e.indexOf(j);if(c+1)return"\\"+e.charAt(c+1);g=j.charCodeAt().toString(16);return"\\u"+"0000".substring(g.length)+g})+'"'}if(d=="object"){if(a.hasOwnProperty&&a instanceof Array){c=0;for(e="[";c<a.length;c++)e+=(c>0?",":"")+f(a[c]);return e+
"]"}e="{";for(c in a)e+=typeof a[c]!="function"?(e.length>1?',"':'"')+c+'":'+f(a[c]):"";return e+"}"}return""+a},parse:function(a){try{return eval("("+a+")")}catch(c){}}});
tinymce.create("static tinymce.util.XHR",{send:function(a){function c(j){e=0;try{e=new ActiveXObject(j)}catch(k){}return e}var e,f=window,d=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===false?false:true;a.data=a.data||"";if(e=f.XMLHttpRequest?new XMLHttpRequest:c("Microsoft.XMLHTTP")||c("Msxml2.XMLHTTP")){e.overrideMimeType&&e.overrideMimeType(a.content_type);e.open(a.type||(a.data?"POST":"GET"),a.url,a.async);a.content_type&&
e.setRequestHeader("Content-Type",a.content_type);e.setRequestHeader("X-Requested-With","XMLHttpRequest");e.send(a.data);function g(){if(!a.async||e.readyState==4||d++>1E4){if(a.success&&d<1E4&&e.status==200)a.success.call(a.success_scope,""+e.responseText,e,a);else if(a.error)a.error.call(a.error_scope,d>1E4?"TIMED_OUT":"GENERAL",e,a);e=null}else f.setTimeout(g,10)}if(!a.async)return g();f.setTimeout(g,10)}}});
(function(){var a=tinymce.extend,c=tinymce.util.JSON,e=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(f){this.settings=a({},f);this.count=0},send:function(f){var d=f.error,g=f.success;f=a(this.settings,f);f.success=function(j,k){j=c.parse(j);if(typeof j=="undefined")j={error:"JSON Parse error."};j.error?d.call(f.error_scope||f.scope,j.error,k):g.call(f.success_scope||f.scope,j.result)};f.error=function(j,k){d.call(f.error_scope||f.scope,j,k)};f.data=c.serialize({id:f.id||
"c"+this.count++,method:f.method,params:f.params});f.content_type="application/json";e.send(f)},"static":{sendRPC:function(f){return(new tinymce.util.JSONRequest).send(f)}}})})();
(function(a){function c(n){var u={},h;n=n.split(",");for(h=n.length;h>=0;h--)u[n[h]]=1;return u}var e=a.each,f=a.is,d=a.isWebKit,g=a.isIE,j=/^(H[1-6R]|P|DIV|ADDRESS|PRE|FORM|T(ABLE|BODY|HEAD|FOOT|H|R|D)|LI|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|MENU|ISINDEX|SAMP)$/,k=c("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),l=c("src,href,style,coords,shape"),r={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"},t=/[<>&\"]/g,q=
/^([a-z0-9],?)+$/i,p=/<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)(\s*\/?)>/g,o=/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;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(n,u){var h=this;h.doc=n;h.win=window;h.files={};h.cssFlicker=false;h.counter=0;h.boxModel=!a.isIE||n.compatMode=="CSS1Compat";h.stdMode=n.documentMode===8;h.settings=u=a.extend({keep_values:false,hex_colors:1,process_html:1},u);if(a.isIE6)try{n.execCommand("BackgroundImageCache",false,true)}catch(s){h.cssFlicker=true}if(u.valid_styles){h._styles={};e(u.valid_styles,function(v,y){h._styles[y]=a.explode(v)})}a.addUnload(h.destroy,h)},getRoot:function(){var n=this,u=n.settings;
return u&&n.get(u.root_element)||n.doc.body},getViewPort:function(n){var u;n=!n?this.win:n;u=n.document;u=this.boxModel?u.documentElement:u.body;return{x:n.pageXOffset||u.scrollLeft,y:n.pageYOffset||u.scrollTop,w:n.innerWidth||u.clientWidth,h:n.innerHeight||u.clientHeight}},getRect:function(n){var u,h=this;n=h.get(n);u=h.getPos(n);n=h.getSize(n);return{x:u.x,y:u.y,w:n.w,h:n.h}},getSize:function(n){var u=this,h;n=u.get(n);h=u.getStyle(n,"width");u=u.getStyle(n,"height");if(h.indexOf("px")===-1)h=0;
if(u.indexOf("px")===-1)u=0;return{w:parseInt(h)||n.offsetWidth||n.clientWidth,h:parseInt(u)||n.offsetHeight||n.clientHeight}},getParent:function(n,u,h){return this.getParents(n,u,h,false)},getParents:function(n,u,h,s){var v=this,y,B=v.settings,z=[];n=v.get(n);s=s===undefined;if(B.strict_root)h=h||v.getRoot();if(f(u,"string")){y=u;u=u==="*"?function(C){return C.nodeType==1}:function(C){return v.is(C,y)}}for(;n;){if(n==h||!n.nodeType||n.nodeType===9)break;if(!u||u(n))if(s)z.push(n);else return n;n=
n.parentNode}return s?z:null},get:function(n){var u;if(n&&this.doc&&typeof n=="string"){u=n;if((n=this.doc.getElementById(n))&&n.id!==u)return this.doc.getElementsByName(u)[1]}return n},getNext:function(n,u){return this._findSib(n,u,"nextSibling")},getPrev:function(n,u){return this._findSib(n,u,"previousSibling")},select:function(n,u){var h=this;return a.dom.Sizzle(n,h.get(u)||h.get(h.settings.root_element)||h.doc,[])},is:function(n,u){var h;if(n.length===undefined){if(u==="*")return n.nodeType==
1;if(q.test(u)){u=u.toLowerCase().split(/,/);n=n.nodeName.toLowerCase();for(h=u.length-1;h>=0;h--)if(u[h]==n)return true;return false}}return a.dom.Sizzle.matches(u,n.nodeType?[n]:n).length>0},add:function(n,u,h,s,v){var y=this;return this.run(n,function(B){var z;z=f(u,"string")?y.doc.createElement(u):u;y.setAttribs(z,h);if(s)s.nodeType?z.appendChild(s):y.setHTML(z,s);return!v?B.appendChild(z):z})},create:function(n,u,h){return this.add(this.doc.createElement(n),n,u,h,1)},createHTML:function(n,u,
h){var s="",v=this,y;s+="<"+n;for(y in u)if(u.hasOwnProperty(y))s+=" "+y+'="'+v.encode(u[y])+'"';if(a.is(h))return s+">"+h+"</"+n+">";return s+" />"},remove:function(n,u){return this.run(n,function(h){var s,v;s=h.parentNode;if(!s)return null;if(u)for(;v=h.firstChild;)!a.isIE||v.nodeType!==3||v.nodeValue?s.insertBefore(v,h):h.removeChild(v);return s.removeChild(h)})},setStyle:function(n,u,h){var s=this;return s.run(n,function(v){var y;y=v.style;u=u.replace(/-(\D)/g,function(B,z){return z.toUpperCase()});
if(s.pixelStyles.test(u)&&(a.is(h,"number")||/^[\-0-9\.]+$/.test(h)))h+="px";switch(u){case "opacity":if(g){y.filter=h===""?"":"alpha(opacity="+h*100+")";if(!n.currentStyle||!n.currentStyle.hasLayout)y.display="inline-block"}y[u]=y["-moz-opacity"]=y["-khtml-opacity"]=h||"";break;case "float":g?(y.styleFloat=h):(y.cssFloat=h);break;default:y[u]=h||""}s.settings.update_styles&&s.setAttrib(v,"_mce_style")})},getStyle:function(n,u,h){n=this.get(n);if(!n)return false;if(this.doc.defaultView&&h){u=u.replace(/[A-Z]/g,
function(v){return"-"+v});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(u)}catch(s){return null}}u=u.replace(/-(\D)/g,function(v,y){return y.toUpperCase()});if(u=="float")u=g?"styleFloat":"cssFloat";if(n.currentStyle&&h)return n.currentStyle[u];return n.style[u]},setStyles:function(n,u){var h=this,s=h.settings,v;v=s.update_styles;s.update_styles=0;e(u,function(y,B){h.setStyle(n,B,y)});s.update_styles=v;s.update_styles&&h.setAttrib(n,s.cssText)},setAttrib:function(n,u,h){var s=
this;if(n&&u){if(s.settings.strict)u=u.toLowerCase();return this.run(n,function(v){var y=s.settings;switch(u){case "style":if(!f(h,"string")){e(h,function(B,z){s.setStyle(v,z,B)});return}if(y.keep_values)h&&!s._isRes(h)?v.setAttribute("_mce_style",h,2):v.removeAttribute("_mce_style",2);v.style.cssText=h;break;case "class":v.className=h||"";break;case "src":case "href":if(y.keep_values){if(y.url_converter)h=y.url_converter.call(y.url_converter_scope||s,h,u,v);s.setAttrib(v,"_mce_"+u,h,2)}break;case "shape":v.setAttribute("_mce_style",
h);break}f(h)&&h!==null&&h.length!==0?v.setAttribute(u,""+h,2):v.removeAttribute(u,2)})}},setAttribs:function(n,u){var h=this;return this.run(n,function(s){e(u,function(v,y){h.setAttrib(s,y,v)})})},getAttrib:function(n,u,h){var s,v=this;n=v.get(n);if(!n||n.nodeType!==1)return false;f(h)||(h="");if(/^(src|href|style|coords|shape)$/.test(u))if(s=n.getAttribute("_mce_"+u))return s;if(g&&v.props[u])s=(s=n[v.props[u]])&&s.nodeValue?s.nodeValue:s;s||(s=n.getAttribute(u,2));if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(u)){if(n[v.props[u]]===
true&&s==="")return u;return s?u:""}if(n.nodeName==="FORM"&&n.getAttributeNode(u))return n.getAttributeNode(u).nodeValue;if(u==="style")if(s=s||n.style.cssText){s=v.serializeStyle(v.parseStyle(s),n.nodeName);v.settings.keep_values&&!v._isRes(s)&&n.setAttribute("_mce_style",s)}if(d&&u==="class"&&s)s=s.replace(/(apple|webkit)\-[a-z\-]+/gi,"");if(g)switch(u){case "rowspan":case "colspan":if(s===1)s="";break;case "size":if(s==="+0"||s===20||s===0)s="";break;case "width":case "height":case "vspace":case "checked":case "disabled":case "readonly":if(s===
0)s="";break;case "hspace":if(s===-1)s="";break;case "maxlength":case "tabindex":if(s===32768||s===2147483647||s==="32768")s="";break;case "multiple":case "compact":case "noshade":case "nowrap":if(s===65535)return u;return h;case "shape":s=s.toLowerCase();break;default:if(u.indexOf("on")===0&&s)s=(""+s).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}return s!==undefined&&s!==null&&s!==""?""+s:h},getPos:function(n,u){var h=this,s=0,v=0,y=h.doc;n=h.get(n);u=u||y.body;if(n){if(g&&!h.stdMode){n=
n.getBoundingClientRect();u=h.boxModel?y.documentElement:y.body;s=h.getStyle(h.select("html")[0],"borderWidth");s=(s=="medium"||h.boxModel&&!h.isIE6)&&2||s;n.top+=h.win.self!=h.win.top?2:0;return{x:n.left+u.scrollLeft-s,y:n.top+u.scrollTop-s}}for(h=n;h&&h!=u&&h.nodeType;){s+=h.offsetLeft||0;v+=h.offsetTop||0;h=h.offsetParent}for(h=n.parentNode;h&&h!=u&&h.nodeType;){s-=h.scrollLeft||0;v-=h.scrollTop||0;h=h.parentNode}}return{x:s,y:v}},parseStyle:function(n){function u(B,z,C){var G,I;if(G=y[B+"-top"+
z]){I=y[B+"-right"+z];if(G==I){G=y[B+"-bottom"+z];if(I==G){I=y[B+"-left"+z];if(G==I){y[C]=I;delete y[B+"-top"+z];delete y[B+"-right"+z];delete y[B+"-bottom"+z];delete y[B+"-left"+z]}}}}}function h(B,z,C,G){if(y[z])if(y[C])if(y[G]){y[B]=y[z]+" "+y[C]+" "+y[G];delete y[z];delete y[C];delete y[G]}}var s=this,v=s.settings,y={};if(!n)return y;n=n.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");e(n.split(";"),function(B){var z,C=[];if(B){B=B.replace(/_MCE_SEMI_/g,";");B=B.replace(/url\([^\)]+\)/g,function(G){C.push(G);
return"url("+C.length+")"});B=B.split(":");z=a.trim(B[1]);z=z.replace(/url\(([^\)]+)\)/g,function(G,I){return C[parseInt(I)-1]});z=z.replace(/rgb\([^\)]+\)/g,function(G){return s.toHex(G)});if(v.url_converter)z=z.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(G,I){return"url("+v.url_converter.call(v.url_converter_scope||s,s.decode(I),"style",null)+")"});y[a.trim(B[0]).toLowerCase()]=z}});u("border","","border");u("border","-width","border-width");u("border","-color","border-color");u("border",
"-style","border-style");u("padding","","padding");u("margin","","margin");h("border","border-width","border-style","border-color");if(g)if(y.border=="medium none")y.border="";return y},serializeStyle:function(n,u){function h(y,B){if(B&&y)if(B.indexOf("-")!==0){switch(B){case "font-weight":if(y==700)y="bold";break;case "color":case "background-color":y=y.toLowerCase();break}v+=(v?" ":"")+B+": "+y+";"}}var s=this,v="";if(u&&s._styles){e(s._styles["*"],function(y){h(n[y],y)});e(s._styles[u.toLowerCase()],
function(y){h(n[y],y)})}else e(n,h);return v},loadCSS:function(n){var u=this,h=u.doc,s;n||(n="");s=u.select("head")[0];e(n.split(","),function(v){var y;if(!u.files[v]){u.files[v]=true;y=u.create("link",{rel:"stylesheet",href:a._addVer(v)});if(g&&h.documentMode)y.onload=function(){h.recalc();y.onload=null};s.appendChild(y)}})},addClass:function(n,u){return this.run(n,function(h){var s;if(!u)return 0;if(this.hasClass(h,u))return h.className;s=this.removeClass(h,u);return h.className=(s!=""?s+" ":"")+
u})},removeClass:function(n,u){var h=this,s;return h.run(n,function(v){var y;if(h.hasClass(v,u)){s||(s=new RegExp("(^|\\s+)"+u+"(\\s+|$)","g"));y=v.className.replace(s," ");y=a.trim(y!=" "?y:"");v.className=y;if(!y){v.removeAttribute("class");v.removeAttribute("className")}return y}return v.className})},hasClass:function(n,u){n=this.get(n);if(!n||!u)return false;return(" "+n.className+" ").indexOf(" "+u+" ")!==-1},show:function(n){return this.setStyle(n,"display","block")},hide:function(n){return this.setStyle(n,
"display","none")},isHidden:function(n){n=this.get(n);return!n||n.style.display=="none"||this.getStyle(n,"display")=="none"},uniqueId:function(n){return(!n?"mce_":n)+this.counter++},setHTML:function(n,u){var h=this;return this.run(n,function(s){var v,y,B,z,C;u=h.processHTML(u);if(g){function G(){for(;s.firstChild;)s.firstChild.removeNode();try{s.innerHTML="<br />"+u;s.removeChild(s.firstChild)}catch(I){v=h.create("div");v.innerHTML="<br />"+u;e(v.childNodes,function(Y,Q){Q&&s.appendChild(Y)})}}if(h.settings.fix_ie_paragraphs)u=
u.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 _mce_keep="true">&nbsp;</p>');G();if(h.settings.fix_ie_paragraphs){B=s.getElementsByTagName("p");y=B.length-1;for(v=0;y>=0;y--){z=B[y];if(!z.hasChildNodes()){if(!z._mce_keep){v=1;break}z.removeAttribute("_mce_keep")}}}if(v){u=u.replace(/<p ([^>]+)>|<p>/ig,'<div $1 _mce_tmp="1">');u=u.replace(/<\/p>/gi,"</div>");G();if(h.settings.fix_ie_paragraphs){B=s.getElementsByTagName("DIV");for(y=B.length-1;y>=0;y--){z=B[y];if(z._mce_tmp){C=h.doc.createElement("p");
z.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(I,Y){if(Y!=="_mce_tmp"){I=z.getAttribute(Y);if(!I&&Y==="class")I=z.className;C.setAttribute(Y,I)}});for(v=0;v<z.childNodes.length;v++)C.appendChild(z.childNodes[v].cloneNode(true));z.swapNode(C)}}}}}else s.innerHTML=u;return u})},processHTML:function(n){var u=this,h=u.settings,s=[];if(!h.process_html)return n;if(g){n=n.replace(/&apos;/g,"&#39;");n=n.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,"")}n=
n.replace(/<a( )([^>]+)\/>|<a\/>/gi,"<a$1$2></a>");if(h.keep_values){if(/<script|noscript|style/i.test(n)){function v(B){B=B.replace(/(<!--\[CDATA\[|\]\]--\>)/g,"\n");B=B.replace(/^[\r\n]*|[\r\n]*$/g,"");B=B.replace(/^\s*(\/\/\s*<!--|\/\/\s*<!\[CDATA\[|<!--|<!\[CDATA\[)[\r\n]*/g,"");return B.replace(/\s*(\/\/\s*\]\]>|\/\/\s*--\>|\]\]>|--\>|\]\]--\>)\s*$/g,"")}n=n.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/gi,function(B,z,C){z||(z=' type="text/javascript"');z=z.replace(/src=\"([^\"]+)\"?/i,function(G,
I){if(h.url_converter)I=u.encode(h.url_converter.call(h.url_converter_scope||u,u.decode(I),"src","script"));return'_mce_src="'+I+'"'});if(a.trim(C)){s.push(v(C));C="<!--\nMCE_SCRIPT:"+(s.length-1)+"\n// --\>"}return"<mce:script"+z+">"+C+"</mce:script>"});n=n.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/gi,function(B,z,C){if(C){s.push(v(C));C="<!--\nMCE_SCRIPT:"+(s.length-1)+"\n--\>"}return"<mce:style"+z+">"+C+"</mce:style><style "+z+' _mce_bogus="1">'+C+"</style>"});n=n.replace(/<noscript([^>]+|)>([\s\S]*?)<\/noscript>/g,
function(B,z,C){return"<mce:noscript"+z+"><!--"+u.encode(C).replace(/--/g,"&#45;&#45;")+"--\></mce:noscript>"})}n=n.replace(/<!\[CDATA\[([\s\S]+)\]\]>/g,"<!--[CDATA[$1]]--\>");function y(B){return B.replace(p,function(z,C,G,I){return"<"+C+G.replace(o,function(Y,Q,K,W,F){Q=Q.toLowerCase();K=K||W||F||"";if(k[Q]){if(K==="false"||K==="0")return;return Q+'="'+Q+'"'}if(l[Q]&&G.indexOf("_mce_"+Q)==-1){Y=u.decode(K);if(h.url_converter&&(Q=="src"||Q=="href"))Y=h.url_converter.call(h.url_converter_scope||u,
Y,Q,C);if(Q=="style")Y=u.serializeStyle(u.parseStyle(Y),Q);return Q+'="'+K+'" _mce_'+Q+'="'+u.encode(Y)+'"'}return Y})+I+">"})}n=y(n);n=n.replace(/MCE_SCRIPT:([0-9]+)/g,function(B,z){return s[z]})}return n},getOuterHTML:function(n){var u;n=this.get(n);if(!n)return null;if(n.outerHTML!==undefined)return n.outerHTML;u=(n.ownerDocument||this.doc).createElement("body");u.appendChild(n.cloneNode(true));return u.innerHTML},setOuterHTML:function(n,u,h){function s(y,B,z){z=z.createElement("body");z.innerHTML=
B;for(B=z.lastChild;B;){v.insertAfter(B.cloneNode(true),y);B=B.previousSibling}v.remove(y)}var v=this;return this.run(n,function(y){y=v.get(y);if(y.nodeType==1){h=h||y.ownerDocument||v.doc;if(g)try{if(g&&y.nodeType==1)y.outerHTML=u;else s(y,u,h)}catch(B){s(y,u,h)}else s(y,u,h)}})},decode:function(n){var u,h;if(/&[\w#]+;/.test(n)){u=this.doc.createElement("div");u.innerHTML=n;u=u.firstChild;h="";if(u){do h+=u.nodeValue;while(u=u.nextSibling)}return h||n}return n},encode:function(n){return(""+n).replace(t,
function(u){return r[u]})},insertAfter:function(n,u){u=this.get(u);return this.run(n,function(h){var s,v;s=u.parentNode;(v=u.nextSibling)?s.insertBefore(h,v):s.appendChild(h);return h})},isBlock:function(n){if(n.nodeType&&n.nodeType!==1)return false;n=n.nodeName||n;return j.test(n)},replace:function(n,u,h){var s=this;if(f(u,"array"))n=n.cloneNode(true);return s.run(u,function(v){h&&e(a.grep(v.childNodes),function(y){n.appendChild(y)});return v.parentNode.replaceChild(n,v)})},rename:function(n,u){var h=
this,s;if(n.nodeName!=u.toUpperCase()){s=h.create(u);e(h.getAttribs(n),function(v){h.setAttrib(s,v.nodeName,h.getAttrib(n,v.nodeName))});h.replace(s,n,1)}return s||n},findCommonAncestor:function(n,u){for(var h=n,s;h;){for(s=u;s&&h!=s;)s=s.parentNode;if(h==s)break;h=h.parentNode}if(!h&&n.ownerDocument)return n.ownerDocument.documentElement;return h},toHex:function(n){function u(s){s=parseInt(s).toString(16);return s.length>1?s:"0"+s}var h=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(n);
if(h)return n="#"+u(h[1])+u(h[2])+u(h[3]);return n},getClasses:function(){function n(z){e(z.imports,function(C){n(C)});e(z.cssRules||z.rules,function(C){switch(C.type||1){case 1:C.selectorText&&e(C.selectorText.split(","),function(G){G=G.replace(/^\s*|\s*$|^\s\./g,"");if(!(/\.mce/.test(G)||!/\.[\w\-]+$/.test(G))){y=G;G=G.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(!(v&&!(G=v(G,y))))if(!s[G]){h.push({"class":G});s[G]=1}}});break;case 3:n(C.styleSheet);break}})}var u=this,h=[],s={},v=u.settings.class_filter,
y;if(u.classes)return u.classes;try{e(u.doc.styleSheets,n)}catch(B){}if(h.length>0)u.classes=h;return h},run:function(n,u,h){var s=this,v;if(s.doc&&typeof n==="string")n=s.get(n);if(!n)return false;h=h||this;if(!n.nodeType&&(n.length||n.length===0)){v=[];e(n,function(y,B){if(y){if(typeof y=="string")y=s.doc.getElementById(y);v.push(u.call(h,y,B))}});return v}return u.call(h,n)},getAttribs:function(n){var u;n=this.get(n);if(!n)return[];if(g){u=[];if(n.nodeName=="OBJECT")return n.attributes;n.nodeName===
"OPTION"&&this.getAttrib(n,"selected")&&u.push({specified:1,nodeName:"selected"});n.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(h){u.push({specified:1,nodeName:h})});return u}return n.attributes},destroy:function(n){var u=this;u.events&&u.events.destroy();u.win=u.doc=u.root=u.events=null;n||a.removeUnload(u.destroy)},createRng:function(){var n=this.doc;return n.createRange?n.createRange():new a.dom.Range(this)},nodeIndex:function(n,
u){var h=0,s,v;if(n){s=n.nodeType;for(n=n.previousSibling;n;n=n.previousSibling){v=n.nodeType;if(u&&v==3)if(v==s||!n.nodeValue.length)continue;h++;s=v}}return h},split:function(n,u,h){function s(C){var G,I=C.childNodes;if(!(C.nodeType==1&&C.getAttribute("_mce_type")=="bookmark")){for(G=I.length-1;G>=0;G--)s(I[G]);if(C.nodeType!=9){if(C.nodeType==3&&C.nodeValue.length>0)return;if(C.nodeType==1){I=C.childNodes;I.length==1&&I[0]&&I[0].nodeType==1&&I[0].getAttribute("_mce_type")=="bookmark"&&C.parentNode.insertBefore(I[0],
C);if(I.length||/^(br|hr|input|img)$/i.test(C.nodeName))return}v.remove(C)}return C}}var v=this,y=v.createRng(),B,z;if(n&&u){y.setStart(n.parentNode,v.nodeIndex(n));y.setEnd(u.parentNode,v.nodeIndex(u));B=y.extractContents();y=v.createRng();y.setStart(u.parentNode,v.nodeIndex(u)+1);y.setEnd(n.parentNode,v.nodeIndex(n)+1);y=y.extractContents();z=n.parentNode;z.insertBefore(s(B),n);h?z.replaceChild(h,u):z.insertBefore(u,n);z.insertBefore(s(y),n);v.remove(n);return h||u}},bind:function(n,u,h,s){var v=
this;if(!v.events)v.events=new a.dom.EventUtils;return v.events.add(n,u,h,s||this)},unbind:function(n,u,h){var s=this;if(!s.events)s.events=new a.dom.EventUtils;return s.events.remove(n,u,h)},_findSib:function(n,u,h){var s=this,v=u;if(n){if(f(v,"string"))v=function(y){return s.is(y,u)};for(n=n[h];n;n=n[h])if(v(n))return n}return null},_isRes:function(n){return/^(top|left|bottom|right|width|height)/i.test(n)||/;\s*(top|left|bottom|right|width|height)/i.test(n)}});a.DOM=new a.dom.DOMUtils(document,
{process_html:0})})(tinymce);
(function(a){function c(e){function f(H,P){C(ka,H,P)}function d(H,P){C(ra,H,P)}function g(H){f(H.parentNode,O(H))}function j(H){f(H.parentNode,O(H)+1)}function k(H){d(H.parentNode,O(H))}function l(H){d(H.parentNode,O(H)+1)}function r(H){if(H){L[Da]=L[la];L[za]=L[ma]}else{L[la]=L[Da];L[ma]=L[za]}L.collapsed=ka}function t(H){g(H);l(H)}function q(H){f(H,0);d(H,H.nodeType===1?H.childNodes.length:H.nodeValue.length)}function p(H){var P=L[la],S=L[ma],U=L[Da],X=L[za];if(H===0)return z(P,S,P,S);if(H===1)return z(P,
S,U,X);if(H===2)return z(U,X,U,X);if(H===3)return z(U,X,P,S)}function o(){G(ua)}function n(){return G(aa)}function u(){return G(ca)}function h(H){var P=this[la],S=this[ma],U;if((P.nodeType===3||P.nodeType===4)&&P.nodeValue)if(S)if(S>=P.nodeValue.length)e.insertAfter(H,P);else{S=P.splitText(S);P.parentNode.insertBefore(H,S)}else P.parentNode.insertBefore(H,P);else{if(P.childNodes.length>0)U=P.childNodes[S];U?P.insertBefore(H,U):P.appendChild(H)}}function s(H){var P=L.extractContents();L.insertNode(H);
H.appendChild(P);L.selectNode(H)}function v(){return R(new c(e),{startContainer:L[la],startOffset:L[ma],endContainer:L[Da],endOffset:L[za],collapsed:L.collapsed,commonAncestorContainer:L.commonAncestorContainer})}function y(H,P){var S;if(H.nodeType==3)return H;if(P<0)return H;for(S=H.firstChild;S&&P>0;){--P;S=S.nextSibling}if(S)return S;return H}function B(){return L[la]==L[Da]&&L[ma]==L[za]}function z(H,P,S,U){var X,ea;if(H==S){if(P==U)return 0;if(P<U)return-1;return 1}for(X=S;X&&X.parentNode!=H;)X=
X.parentNode;if(X){ea=0;for(S=H.firstChild;S!=X&&ea<P;){ea++;S=S.nextSibling}if(P<=ea)return-1;return 1}for(X=H;X&&X.parentNode!=S;)X=X.parentNode;if(X){ea=0;for(S=S.firstChild;S!=X&&ea<U;){ea++;S=S.nextSibling}if(ea<U)return-1;return 1}P=e.findCommonAncestor(H,S);for(H=H;H&&H.parentNode!=P;)H=H.parentNode;H||(H=P);for(U=S;U&&U.parentNode!=P;)U=U.parentNode;U||(U=P);if(H==U)return 0;for(S=P.firstChild;S;){if(S==H)return-1;if(S==U)return 1;S=S.nextSibling}}function C(H,P,S){if(H){L[la]=P;L[ma]=S}else{L[Da]=
P;L[za]=S}for(P=L[Da];P.parentNode;)P=P.parentNode;for(S=L[la];S.parentNode;)S=S.parentNode;if(S==P)z(L[la],L[ma],L[Da],L[za])>0&&L.collapse(H);else L.collapse(H);L.collapsed=B();L.commonAncestorContainer=e.findCommonAncestor(L[la],L[Da])}function G(H){var P,S=0,U=0,X;if(L[la]==L[Da])return I(H);P=L[Da];for(X=P.parentNode;X;P=X,X=X.parentNode){if(X==L[la])return Y(P,H);++S}P=L[la];for(X=P.parentNode;X;P=X,X=X.parentNode){if(X==L[Da])return Q(P,H);++U}U-=S;for(P=L[la];U>0;){P=P.parentNode;U--}for(S=
L[Da];U<0;){S=S.parentNode;U++}U=P.parentNode;for(X=S.parentNode;U!=X;U=U.parentNode,X=X.parentNode){P=U;S=X}return K(P,S,H)}function I(H){var P,S,U,X;if(H!=ua)P=ba.createDocumentFragment();if(L[ma]==L[za])return P;if(L[la].nodeType==3){S=L[la].nodeValue;S=S.substring(L[ma],L[za]);if(H!=ca){L[la].deleteData(L[ma],L[za]-L[ma]);L.collapse(ka)}if(H==ua)return;P.appendChild(ba.createTextNode(S));return P}U=y(L[la],L[ma]);for(S=L[za]-L[ma];S>0;){X=U.nextSibling;U=J(U,H);P&&P.appendChild(U);--S;U=X}H!=
ca&&L.collapse(ka);return P}function Y(H,P){var S,U,X,ea;if(P!=ua)S=ba.createDocumentFragment();U=W(H,P);S&&S.appendChild(U);X=O(H)-L[ma];if(X<=0){if(P!=ca){L.setEndBefore(H);L.collapse(ra)}return S}for(U=H.previousSibling;X>0;){ea=U.previousSibling;U=J(U,P);S&&S.insertBefore(U,S.firstChild);--X;U=ea}if(P!=ca){L.setEndBefore(H);L.collapse(ra)}return S}function Q(H,P){var S,U,X,ea;if(P!=ua)S=ba.createDocumentFragment();X=F(H,P);S&&S.appendChild(X);U=O(H);++U;U=L[za]-U;for(X=H.nextSibling;U>0;){ea=
X.nextSibling;X=J(X,P);S&&S.appendChild(X);--U;X=ea}if(P!=ca){L.setStartAfter(H);L.collapse(ka)}return S}function K(H,P,S){var U,X,ea,oa;if(S!=ua)X=ba.createDocumentFragment();U=F(H,S);X&&X.appendChild(U);ea=O(H);oa=O(P);++ea;ea=oa-ea;for(U=H.nextSibling;ea>0;){oa=U.nextSibling;U=J(U,S);X&&X.appendChild(U);U=oa;--ea}U=W(P,S);X&&X.appendChild(U);if(S!=ca){L.setStartAfter(H);L.collapse(ka)}return X}function W(H,P){var S=y(L[Da],L[za]-1),U,X,ea,oa=S!=L[Da];if(S==H)return N(S,oa,ra,P);U=S.parentNode;
for(X=N(U,ra,ra,P);U;){for(;S;){ea=S.previousSibling;S=N(S,oa,ra,P);P!=ua&&X.insertBefore(S,X.firstChild);oa=ka;S=ea}if(U==H)return X;S=U.previousSibling;U=U.parentNode;ea=N(U,ra,ra,P);P!=ua&&ea.appendChild(X);X=ea}}function F(H,P){var S=y(L[la],L[ma]),U=S!=L[la],X,ea,oa;if(S==H)return N(S,U,ka,P);X=S.parentNode;for(ea=N(X,ra,ka,P);X;){for(;S;){oa=S.nextSibling;S=N(S,U,ka,P);P!=ua&&ea.appendChild(S);U=ka;S=oa}if(X==H)return ea;S=X.nextSibling;X=X.parentNode;oa=N(X,ra,ka,P);P!=ua&&oa.appendChild(ea);
ea=oa}}function N(H,P,S,U){var X;if(P)return J(H,U);if(H.nodeType==3){P=H.nodeValue;if(S){X=L[ma];S=P.substring(X);P=P.substring(0,X)}else{X=L[za];S=P.substring(0,X);P=P.substring(X)}if(U!=ca)H.nodeValue=P;if(U==ua)return;H=H.cloneNode(ra);H.nodeValue=S;return H}if(U!=ua)return H.cloneNode(ra)}function J(H,P){if(P!=ua)return P==ca?H.cloneNode(ka):H;H.parentNode.removeChild(H)}var L=this,ba=e.doc,aa=0,ca=1,ua=2,ka=true,ra=false,ma="startOffset",la="startContainer",Da="endContainer",za="endOffset",
R=tinymce.extend,O=e.nodeIndex;R(L,{startContainer:ba,startOffset:0,endContainer:ba,endOffset:0,collapsed:ka,commonAncestorContainer:ba,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:f,setEnd:d,setStartBefore:g,setStartAfter:j,setEndBefore:k,setEndAfter:l,collapse:r,selectNode:t,selectNodeContents:q,compareBoundaryPoints:p,deleteContents:o,extractContents:n,cloneContents:u,insertNode:h,surroundContents:s,cloneRange:v})}a.Range=c})(tinymce.dom);
(function(){function a(c){function e(){function j(t){var q,p,o,n=0,u,h,s,v;o=k.duplicate();o.collapse(t);q=g.create("a");s=o.parentElement();s.appendChild(q);p=tinymce.grep(s.childNodes);for(u=p.length-1;n<=u;){h=Math.floor((n+u)/2);s.insertBefore(q,p[h]);o.moveToElementText(q);v=k.compareEndPoints(t?"StartToStart":"EndToEnd",o);if(v>0)n=h+1;else if(v<0)u=h-1;else break}p=v>0||h==0?q.nextSibling:q.previousSibling;if(p.nodeType==1){g.remove(q);o=g.nodeIndex(p);p=p.parentNode;if(!t||h>0)o++}else{if(v>
0||h==0){o.setEndPoint(t?"StartToStart":"EndToEnd",k);o=o.text.length}else{o.setEndPoint(t?"StartToStart":"EndToEnd",k);o=p.nodeValue.length-o.text.length}g.remove(q)}l[t?"setStart":"setEnd"](p,o)}var k=c.getRng(),l=g.createRng(),r;r=k.item?k.item(0):k.parentElement();if(r.ownerDocument!=g.doc)return l;if(k.item||!r.hasChildNodes()){l.setStart(r.parentNode,g.nodeIndex(r));l.setEnd(l.startContainer,l.startOffset+1);return l}r=c.isCollapsed();j(true);r||j();return l}var f,d,g=c.dom;this.addRange=function(j){var k,
l,r=c.dom.doc;l=r.body;var t,q,p,o,n,u;this.destroy();t=j.startContainer;q=j.startOffset;p=j.endContainer;o=j.endOffset;l.createTextRange();if(t==r||p==r){k=l.createTextRange();k.collapse();k.select()}else{if(t.nodeType==1&&t.hasChildNodes()){k=t.childNodes.length-1;if(q>k){n=1;t=t.childNodes[k]}else t=t.childNodes[q];if(t.nodeType==3)q=0}if(p.nodeType==1&&p.hasChildNodes()){k=p.childNodes.length-1;if(o==0){u=1;p=p.childNodes[0]}else{p=p.childNodes[Math.min(k,o-1)];if(p.nodeType==3)o=p.nodeValue.length}}if(t==
p&&t.nodeType==1){if(/^(IMG|TABLE)$/.test(t.nodeName)&&q!=o){k=l.createControlRange();k.addElement(t)}else{k=l.createTextRange();if(!t.hasChildNodes()&&t.canHaveHTML)t.innerHTML="\ufeff";k.moveToElementText(t);if(t.innerHTML=="\ufeff"){k.collapse(true);t.removeChild(t.firstChild)}}q==o&&k.collapse(o<=j.endContainer.childNodes.length-1)}else{k=l.createTextRange();j=r.createElement("span");j.innerHTML=" ";if(t.nodeType==3){n?g.insertAfter(j,t):t.parentNode.insertBefore(j,t);k.moveToElementText(j);j.parentNode.removeChild(j);
k.move("character",q)}else{k.moveToElementText(t);n&&k.collapse(false)}if(t==p&&t.nodeType==3)k.moveEnd("character",o-q);else{l=l.createTextRange();if(p.nodeType==3){p.parentNode.insertBefore(j,p);l.moveToElementText(j);j.parentNode.removeChild(j);l.move("character",o);k.setEndPoint("EndToStart",l)}else{l.moveToElementText(p);l.collapse(!!u);k.setEndPoint("EndToEnd",l)}}}k.select();k.scrollIntoView()}};this.getRangeAt=function(){if(!f||!tinymce.dom.RangeUtils.compareRanges(d,c.getRng())){f=e();d=
c.getRng()}return f};this.destroy=function(){d=f=null};c.dom.boxModel&&function(){function j(o,n){var u=t.createTextRange();try{u.moveToPoint(o,n)}catch(h){u=null}return u}function k(o){if(o.button){if(o=j(o.x,o.y)){o.compareEndPoints("StartToStart",p)>0?o.setEndPoint("StartToStart",p):o.setEndPoint("EndToEnd",p);o.select()}}else l()}function l(){g.unbind(r,"mouseup",l);g.unbind(r,"mousemove",k);q=0}var r=g.doc,t=r.body,q,p;r.documentElement.unselectable=true;g.bind(r,"mousedown",function(o){if(o.target.nodeName===
"HTML"){q&&l();q=1;if(p=j(o.x,o.y)){g.bind(r,"mouseup",l);g.bind(r,"mousemove",k);p.select()}}})}()}tinymce.dom.TridentSelection=a})();
(function(){function a(h,s,v,y,B,z){B=h=="previousSibling"&&!z;for(var C=0,G=y.length;C<G;C++){var I=y[C];if(I){if(B&&I.nodeType===1){I.sizcache=v;I.sizset=C}I=I[h];for(var Y=false;I;){if(I.sizcache===v){Y=y[I.sizset];break}if(I.nodeType===1&&!z){I.sizcache=v;I.sizset=C}if(I.nodeName===s){Y=I;break}I=I[h]}y[C]=Y}}}function c(h,s,v,y,B,z){B=h=="previousSibling"&&!z;for(var C=0,G=y.length;C<G;C++){var I=y[C];if(I){if(B&&I.nodeType===1){I.sizcache=v;I.sizset=C}I=I[h];for(var Y=false;I;){if(I.sizcache===
v){Y=y[I.sizset];break}if(I.nodeType===1){if(!z){I.sizcache=v;I.sizset=C}if(typeof s!=="string"){if(I===s){Y=true;break}}else if(j.filter(s,[I]).length>0){Y=I;break}}I=I[h]}y[C]=Y}}}var e=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,f=0,d=Object.prototype.toString,g=false,j=function(h,s,v,y){v=v||[];var B=s=s||document;if(s.nodeType!==1&&s.nodeType!==9)return[];if(!h||typeof h!=="string")return v;var z=[],C,G,I,Y,Q=true,K=n(s);
for(e.lastIndex=0;(C=e.exec(h))!==null;){z.push(C[1]);if(C[2]){Y=RegExp.rightContext;break}}if(z.length>1&&l.exec(h))if(z.length===2&&k.relative[z[0]])G=u(z[0]+z[1],s);else for(G=k.relative[z[0]]?[s]:j(z.shift(),s);z.length;){h=z.shift();if(k.relative[h])h+=z.shift();G=u(h,G)}else{if(!y&&z.length>1&&s.nodeType===9&&!K&&k.match.ID.test(z[0])&&!k.match.ID.test(z[z.length-1])){C=j.find(z.shift(),s,K);s=C.expr?j.filter(C.expr,C.set)[0]:C.set[0]}if(s){C=y?{expr:z.pop(),set:t(y)}:j.find(z.pop(),z.length===
1&&(z[0]==="~"||z[0]==="+")&&s.parentNode?s.parentNode:s,K);G=C.expr?j.filter(C.expr,C.set):C.set;if(z.length>0)I=t(G);else Q=false;for(;z.length;){var W=z.pop();C=W;if(k.relative[W])C=z.pop();else W="";if(C==null)C=s;k.relative[W](I,C,K)}}else I=[]}I||(I=G);if(!I)throw"Syntax error, unrecognized expression: "+(W||h);if(d.call(I)==="[object Array]")if(Q)if(s&&s.nodeType===1)for(h=0;I[h]!=null;h++){if(I[h]&&(I[h]===true||I[h].nodeType===1&&o(s,I[h])))v.push(G[h])}else for(h=0;I[h]!=null;h++)I[h]&&
I[h].nodeType===1&&v.push(G[h]);else v.push.apply(v,I);else t(I,v);if(Y){j(Y,B,v,y);j.uniqueSort(v)}return v};j.uniqueSort=function(h){if(p){g=false;h.sort(p);if(g)for(var s=1;s<h.length;s++)h[s]===h[s-1]&&h.splice(s--,1)}};j.matches=function(h,s){return j(h,null,null,s)};j.find=function(h,s,v){var y,B;if(!h)return[];for(var z=0,C=k.order.length;z<C;z++){var G=k.order[z];if(B=k.match[G].exec(h)){var I=RegExp.leftContext;if(I.substr(I.length-1)!=="\\"){B[1]=(B[1]||"").replace(/\\/g,"");y=k.find[G](B,
s,v);if(y!=null){h=h.replace(k.match[G],"");break}}}}y||(y=s.getElementsByTagName("*"));return{set:y,expr:h}};j.filter=function(h,s,v,y){for(var B=h,z=[],C=s,G,I,Y=s&&s[0]&&n(s[0]);h&&s.length;){for(var Q in k.filter)if((G=k.match[Q].exec(h))!=null){var K=k.filter[Q],W,F;I=false;if(C==z)z=[];if(k.preFilter[Q])if(G=k.preFilter[Q](G,C,v,z,y,Y)){if(G===true)continue}else I=W=true;if(G)for(var N=0;(F=C[N])!=null;N++)if(F){W=K(F,G,N,C);var J=y^!!W;if(v&&W!=null)if(J)I=true;else C[N]=false;else if(J){z.push(F);
I=true}}if(W!==undefined){v||(C=z);h=h.replace(k.match[Q],"");if(!I)return[];break}}if(h==B)if(I==null)throw"Syntax error, unrecognized expression: "+h;else break;B=h}return C};var k=j.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(h){return h.getAttribute("href")}},relative:{"+":function(h,s,v){var y=typeof s==="string",B=y&&!/\W/.test(s);y=y&&!B;if(B&&!v)s=s.toUpperCase();v=0;B=h.length;for(var z;v<B;v++)if(z=h[v]){for(;(z=z.previousSibling)&&z.nodeType!==1;);h[v]=y||z&&z.nodeName===s?z||false:z===s}y&&
j.filter(s,h,true)},">":function(h,s,v){var y=typeof s==="string";if(y&&!/\W/.test(s)){s=v?s:s.toUpperCase();v=0;for(var B=h.length;v<B;v++){var z=h[v];if(z){y=z.parentNode;h[v]=y.nodeName===s?y:false}}}else{v=0;for(B=h.length;v<B;v++)if(z=h[v])h[v]=y?z.parentNode:z.parentNode===s;y&&j.filter(s,h,true)}},"":function(h,s,v){var y=f++,B=c;if(!s.match(/\W/)){var z=s=v?s:s.toUpperCase();B=a}B("parentNode",s,y,h,z,v)},"~":function(h,s,v){var y=f++,B=c;if(typeof s==="string"&&!s.match(/\W/)){var z=s=v?
s:s.toUpperCase();B=a}B("previousSibling",s,y,h,z,v)}},find:{ID:function(h,s,v){if(typeof s.getElementById!=="undefined"&&!v)return(h=s.getElementById(h[1]))?[h]:[]},NAME:function(h,s){if(typeof s.getElementsByName!=="undefined"){var v=[];s=s.getElementsByName(h[1]);for(var y=0,B=s.length;y<B;y++)s[y].getAttribute("name")===h[1]&&v.push(s[y]);return v.length===0?null:v}},TAG:function(h,s){return s.getElementsByTagName(h[1])}},preFilter:{CLASS:function(h,s,v,y,B,z){h=" "+h[1].replace(/\\/g,"")+" ";
if(z)return h;z=0;for(var C;(C=s[z])!=null;z++)if(C)if(B^(C.className&&(" "+C.className+" ").indexOf(h)>=0))v||y.push(C);else if(v)s[z]=false;return false},ID:function(h){return h[1].replace(/\\/g,"")},TAG:function(h,s){for(var v=0;s[v]===false;v++);return s[v]&&n(s[v])?h[1]:h[1].toUpperCase()},CHILD:function(h){if(h[1]=="nth"){var s=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(h[2]=="even"&&"2n"||h[2]=="odd"&&"2n+1"||!/\D/.test(h[2])&&"0n+"+h[2]||h[2]);h[2]=s[1]+(s[2]||1)-0;h[3]=s[3]-0}h[0]=f++;return h},ATTR:function(h,
s,v,y,B,z){s=h[1].replace(/\\/g,"");if(!z&&k.attrMap[s])h[1]=k.attrMap[s];if(h[2]==="~=")h[4]=" "+h[4]+" ";return h},PSEUDO:function(h,s,v,y,B){if(h[1]==="not")if(h[3].match(e).length>1||/^\w/.test(h[3]))h[3]=j(h[3],null,null,s);else{h=j.filter(h[3],s,v,true^B);v||y.push.apply(y,h);return false}else if(k.match.POS.test(h[0])||k.match.CHILD.test(h[0]))return true;return h},POS:function(h){h.unshift(true);return h}},filters:{enabled:function(h){return h.disabled===false&&h.type!=="hidden"},disabled:function(h){return h.disabled===
true},checked:function(h){return h.checked===true},selected:function(h){return h.selected===true},parent:function(h){return!!h.firstChild},empty:function(h){return!h.firstChild},has:function(h,s,v){return!!j(v[3],h).length},header:function(h){return/h\d/i.test(h.nodeName)},text:function(h){return"text"===h.type},radio:function(h){return"radio"===h.type},checkbox:function(h){return"checkbox"===h.type},file:function(h){return"file"===h.type},password:function(h){return"password"===h.type},submit:function(h){return"submit"===
h.type},image:function(h){return"image"===h.type},reset:function(h){return"reset"===h.type},button:function(h){return"button"===h.type||h.nodeName.toUpperCase()==="BUTTON"},input:function(h){return/input|select|textarea|button/i.test(h.nodeName)}},setFilters:{first:function(h,s){return s===0},last:function(h,s,v,y){return s===y.length-1},even:function(h,s){return s%2===0},odd:function(h,s){return s%2===1},lt:function(h,s,v){return s<v[3]-0},gt:function(h,s,v){return s>v[3]-0},nth:function(h,s,v){return v[3]-
0==s},eq:function(h,s,v){return v[3]-0==s}},filter:{PSEUDO:function(h,s,v,y){var B=s[1],z=k.filters[B];if(z)return z(h,v,s,y);else if(B==="contains")return(h.textContent||h.innerText||"").indexOf(s[3])>=0;else if(B==="not"){s=s[3];v=0;for(y=s.length;v<y;v++)if(s[v]===h)return false;return true}},CHILD:function(h,s){var v=s[1],y=h;switch(v){case "only":case "first":for(;y=y.previousSibling;)if(y.nodeType===1)return false;if(v=="first")return true;y=h;case "last":for(;y=y.nextSibling;)if(y.nodeType===
1)return false;return true;case "nth":v=s[2];var B=s[3];if(v==1&&B==0)return true;s=s[0];var z=h.parentNode;if(z&&(z.sizcache!==s||!h.nodeIndex)){var C=0;for(y=z.firstChild;y;y=y.nextSibling)if(y.nodeType===1)y.nodeIndex=++C;z.sizcache=s}h=h.nodeIndex-B;return v==0?h==0:h%v==0&&h/v>=0}},ID:function(h,s){return h.nodeType===1&&h.getAttribute("id")===s},TAG:function(h,s){return s==="*"&&h.nodeType===1||h.nodeName===s},CLASS:function(h,s){return(" "+(h.className||h.getAttribute("class"))+" ").indexOf(s)>
-1},ATTR:function(h,s){var v=s[1];h=k.attrHandle[v]?k.attrHandle[v](h):h[v]!=null?h[v]:h.getAttribute(v);v=h+"";var y=s[2];s=s[4];return h==null?y==="!=":y==="="?v===s:y==="*="?v.indexOf(s)>=0:y==="~="?(" "+v+" ").indexOf(s)>=0:!s?v&&h!==false:y==="!="?v!=s:y==="^="?v.indexOf(s)===0:y==="$="?v.substr(v.length-s.length)===s:y==="|="?v===s||v.substr(0,s.length+1)===s+"-":false},POS:function(h,s,v,y){var B=k.setFilters[s[2]];if(B)return B(h,v,s,y)}}},l=k.match.POS;for(var r in k.match)k.match[r]=new RegExp(k.match[r].source+
/(?![^\[]*\])(?![^\(]*\))/.source);var t=function(h,s){h=Array.prototype.slice.call(h);if(s){s.push.apply(s,h);return s}return h};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(q){t=function(h,s){s=s||[];if(d.call(h)==="[object Array]")Array.prototype.push.apply(s,h);else if(typeof h.length==="number")for(var v=0,y=h.length;v<y;v++)s.push(h[v]);else for(v=0;h[v];v++)s.push(h[v]);return s}}var p;if(document.documentElement.compareDocumentPosition)p=function(h,s){h=h.compareDocumentPosition(s)&
4?-1:h===s?0:1;if(h===0)g=true;return h};else if("sourceIndex"in document.documentElement)p=function(h,s){h=h.sourceIndex-s.sourceIndex;if(h===0)g=true;return h};else if(document.createRange)p=function(h,s){var v=h.ownerDocument.createRange(),y=s.ownerDocument.createRange();v.setStart(h,0);v.setEnd(h,0);y.setStart(s,0);y.setEnd(s,0);h=v.compareBoundaryPoints(Range.START_TO_END,y);if(h===0)g=true;return h};(function(){var h=document.createElement("div"),s="script"+(new Date).getTime();h.innerHTML=
"<a name='"+s+"'/>";var v=document.documentElement;v.insertBefore(h,v.firstChild);if(document.getElementById(s)){k.find.ID=function(y,B,z){if(typeof B.getElementById!=="undefined"&&!z)return(B=B.getElementById(y[1]))?B.id===y[1]||typeof B.getAttributeNode!=="undefined"&&B.getAttributeNode("id").nodeValue===y[1]?[B]:undefined:[]};k.filter.ID=function(y,B){var z=typeof y.getAttributeNode!=="undefined"&&y.getAttributeNode("id");return y.nodeType===1&&z&&z.nodeValue===B}}v.removeChild(h)})();(function(){var h=
document.createElement("div");h.appendChild(document.createComment(""));if(h.getElementsByTagName("*").length>0)k.find.TAG=function(s,v){v=v.getElementsByTagName(s[1]);if(s[1]==="*"){s=[];for(var y=0;v[y];y++)v[y].nodeType===1&&s.push(v[y]);v=s}return v};h.innerHTML="<a href='#'></a>";if(h.firstChild&&typeof h.firstChild.getAttribute!=="undefined"&&h.firstChild.getAttribute("href")!=="#")k.attrHandle.href=function(s){return s.getAttribute("href",2)}})();document.querySelectorAll&&function(){var h=
j,s=document.createElement("div");s.innerHTML="<p class='TEST'></p>";if(!(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0)){j=function(y,B,z,C){B=B||document;if(!C&&B.nodeType===9&&!n(B))try{return t(B.querySelectorAll(y),z)}catch(G){}return h(y,B,z,C)};for(var v in h)j[v]=h[v]}}();document.getElementsByClassName&&document.documentElement.getElementsByClassName&&function(){var h=document.createElement("div");h.innerHTML="<div class='test e'></div><div class='test'></div>";if(h.getElementsByClassName("e").length!==
0){h.lastChild.className="e";if(h.getElementsByClassName("e").length!==1){k.order.splice(1,0,"CLASS");k.find.CLASS=function(s,v,y){if(typeof v.getElementsByClassName!=="undefined"&&!y)return v.getElementsByClassName(s[1])}}}}();var o=document.compareDocumentPosition?function(h,s){return h.compareDocumentPosition(s)&16}:function(h,s){return h!==s&&(h.contains?h.contains(s):true)},n=function(h){return h.nodeType===9&&h.documentElement.nodeName!=="HTML"||!!h.ownerDocument&&h.ownerDocument.documentElement.nodeName!==
"HTML"},u=function(h,s){var v=[],y="",B;for(s=s.nodeType?[s]:s;B=k.match.PSEUDO.exec(h);){y+=B[0];h=h.replace(k.match.PSEUDO,"")}h=k.relative[h]?h+"*":h;B=0;for(var z=s.length;B<z;B++)j(h,s[B],v);return j.filter(y,v)};window.tinymce.dom.Sizzle=j})();
(function(a){var c=a.each,e=a.DOM,f=a.isIE,d;a.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[];this.events=[]},add:function(g,j,k,l){var r,t=this,q=t.events,p;if(j instanceof Array){p=[];c(j,function(o){p.push(t.add(g,o,k,l))});return p}if(g&&g.hasOwnProperty&&g instanceof Array){p=[];c(g,function(o){o=e.get(o);p.push(t.add(o,j,k,l))});return p}if(g=e.get(g)){r=function(o){if(!t.disabled){if((o=o||window.event)&&f){if(!o.target)o.target=o.srcElement;a.extend(o,t._stoppers)}if(!l)return k(o);
return k.call(l,o)}};if(j=="unload"){a.unloads.unshift({func:r});return r}if(j=="init"){t.domLoaded?r():t.inits.push(r);return r}q.push({obj:g,name:j,func:k,cfunc:r,scope:l});t._add(g,j,r);return k}},remove:function(g,j,k){var l=this,r=l.events,t=false,q;if(g&&g.hasOwnProperty&&g instanceof Array){q=[];c(g,function(p){p=e.get(p);q.push(l.remove(p,j,k))});return q}g=e.get(g);c(r,function(p,o){if(p.obj==g&&p.name==j&&(!k||p.func==k||p.cfunc==k)){r.splice(o,1);l._remove(g,j,p.cfunc);t=true;return false}});
return t},clear:function(g){var j=this,k=j.events,l,r;if(g){g=e.get(g);for(l=k.length-1;l>=0;l--){r=k[l];if(r.obj===g){j._remove(r.obj,r.name,r.cfunc);r.obj=r.cfunc=null;k.splice(l,1)}}}},cancel:function(g){if(!g)return false;this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation)g.stopPropagation();else g.cancelBubble=true;return false},prevent:function(g){if(g.preventDefault)g.preventDefault();else g.returnValue=false;return false},destroy:function(){var g=this;c(g.events,function(j){g._remove(j.obj,
j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(g,j,k){if(g.attachEvent)g.attachEvent("on"+j,k);else if(g.addEventListener)g.addEventListener(j,k,false);else g["on"+j]=k},_remove:function(g,j,k){if(g)try{if(g.detachEvent)g.detachEvent("on"+j,k);else if(g.removeEventListener)g.removeEventListener(j,k,false);else g["on"+j]=null}catch(l){}},_pageInit:function(){var g=this;if(!g.domLoaded){g.domLoaded=true;c(g.inits,function(j){j()});g.inits=[]}},_wait:function(g){var j=this,k=
g.document;if(g.tinyMCE_GZ&&tinyMCE_GZ.loaded)j.domLoaded=1;else{if(k.attachEvent){k.attachEvent("onreadystatechange",function(){if(k.readyState==="complete"){k.detachEvent("onreadystatechange",arguments.callee);j._pageInit(g)}});k.documentElement.doScroll&&g==g.top&&function(){if(!j.domLoaded){try{k.documentElement.doScroll("left")}catch(l){setTimeout(arguments.callee,0);return}j._pageInit(g)}}()}else k.addEventListener&&j._add(g,"DOMContentLoaded",function(){j._pageInit(g)});j._add(g,"load",function(){j._pageInit(g)})}},
_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});d=a.dom.Event=new a.dom.EventUtils;d._wait(window);a.addUnload(function(){d.destroy()})})(tinymce);
(function(a){a.dom.Element=function(c,e){var f=this,d;f.settings=e=e||{};f.id=c;f.dom=d=e.dom||a.DOM;a.isIE||d.get(f.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(g){f[g]=function(){var j=[c],k;for(k=0;k<arguments.length;k++)j.push(arguments[k]);j=d[g].apply(d,j);f.update(g);return j}});a.extend(f,{on:function(g,j,k){return a.dom.Event.add(f.id,
g,j,k)},getXY:function(){return{x:parseInt(f.getStyle("left")),y:parseInt(f.getStyle("top"))}},getSize:function(){var g=d.get(f.id);return{w:parseInt(f.getStyle("width")||g.clientWidth),h:parseInt(f.getStyle("height")||g.clientHeight)}},moveTo:function(g,j){f.setStyles({left:g,top:j})},moveBy:function(g,j){var k=f.getXY();f.moveTo(k.x+g,k.y+j)},resizeTo:function(g,j){f.setStyles({width:g,height:j})},resizeBy:function(g,j){var k=f.getSize();f.resizeTo(k.w+g,k.h+j)},update:function(g){if(a.isIE6&&e.blocker){g=
g||"";if(!(g.indexOf("get")===0||g.indexOf("has")===0||g.indexOf("is")===0))if(g=="remove")d.remove(f.blocker);else{if(f.blocker)g=d.get(f.blocker);else{f.blocker=d.uniqueId();g=d.add(e.container||d.getRoot(),"iframe",{id:f.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});d.setStyle(g,"opacity",0)}d.setStyles(g,{left:f.getStyle("left",1),top:f.getStyle("top",1),width:f.getStyle("width",1),height:f.getStyle("height",1),display:f.getStyle("display",1),zIndex:parseInt(f.getStyle("zIndex",
1)||0)-1})}}}})}})(tinymce);
(function(a){var c=a.is,e=a.each;a.create("tinymce.dom.Selection",{Selection:function(f,d,g){var j=this;j.dom=f;j.win=d;j.serializer=g;e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(k){j[k]=new a.util.Dispatcher(j)});if(!j.win.getSelection)j.tridentSel=new a.dom.TridentSelection(j);a.addUnload(j.destroy,j)},getContent:function(f){var d=this,g=d.getRng(),j=d.dom.create("body"),k=d.getSel(),l,r;f=f||{};l=r="";f.get=true;f.format=f.format||"html";d.onBeforeGetContent.dispatch(d,
f);if(f.format=="text")return d.isCollapsed()?"":g.text||(k.toString?k.toString():"");if(g.cloneContents)(g=g.cloneContents())&&j.appendChild(g);else j.innerHTML=c(g.item)||c(g.htmlText)?g.item?g.item(0).outerHTML:g.htmlText:g.toString();if(/^\s/.test(j.innerHTML))l=" ";if(/\s+$/.test(j.innerHTML))r=" ";f.getInner=true;f.content=d.isCollapsed()?"":l+d.serializer.serialize(j,f)+r;d.onGetContent.dispatch(d,f);return f.content},setContent:function(f,d){var g=this,j=g.getRng(),k=g.win.document;d=d||{format:"html"};
d.set=true;d.content=g.dom.processHTML(f);g.onBeforeSetContent.dispatch(g,d);f=d.content;if(j.insertNode){f+='<span id="__caret">_</span>';if(j.startContainer==k&&j.endContainer==k)k.body.innerHTML=f;else{j.deleteContents();j.insertNode(j.createContextualFragment(f))}f=g.dom.get("__caret");j=k.createRange();j.setStartBefore(f);j.setEndBefore(f);g.setRng(j);g.dom.remove("__caret")}else{if(j.item){k.execCommand("Delete",false,null);j=g.getRng()}j.pasteHTML(f)}g.onSetContent.dispatch(g,d)},getStart:function(){var f=
this.getRng(),d;if(f.duplicate||f.item){if(f.item)return f.item(0);f=f.duplicate();f.collapse(1);if((d=f.parentElement())&&d.nodeName=="BODY")return d.firstChild||d}else{d=f.startContainer;if(d.nodeType==1&&d.hasChildNodes())d=d.childNodes[Math.min(d.childNodes.length-1,f.startOffset)];if(d&&d.nodeType==3)return d.parentNode}return d},getEnd:function(){var f=this.getRng(),d;if(f.duplicate||f.item){if(f.item)return f.item(0);f=f.duplicate();f.collapse(0);if((d=f.parentElement())&&d.nodeName=="BODY")return d.lastChild||
d}else{d=f.endContainer;f=f.endOffset;if(d.nodeType==1&&d.hasChildNodes())d=d.childNodes[f>0?f-1:f];if(d&&d.nodeType==3)return d.parentNode}return d},getBookmark:function(f,d){function g(o,n){var u=0;e(k.select(o),function(h,s){if(h==n)u=s});return u}var j=this,k=j.dom,l,r,t,q;if(f==2){function p(){function o(s,v){var y=s[v?"startContainer":"endContainer"];s=s[v?"startOffset":"endOffset"];v=[];var B,z=0;if(y.nodeType==3){if(d)for(B=y.previousSibling;B&&B.nodeType==3;B=B.previousSibling)s+=B.nodeValue.length;
v.push(s)}else{B=y.childNodes;if(s>=B.length&&B.length){z=1;s=Math.max(0,B.length-1)}v.push(j.dom.nodeIndex(B[s],d)+z)}for(;y&&y!=u;y=y.parentNode)v.push(j.dom.nodeIndex(y,d));return v}var n=j.getRng(true),u=k.getRoot(),h={};h.start=o(n,true);if(!j.isCollapsed())h.end=o(n);return h}return p()}if(f)return{rng:j.getRng()};f=j.getRng();r=k.uniqueId();t=tinyMCE.activeEditor.selection.isCollapsed();if(f.duplicate||f.item)if(f.item){q=f.item(0);l=q.nodeName;return{name:l,index:g(l,q)}}else{l=f.duplicate();
f.collapse();f.pasteHTML('<span _mce_type="bookmark" id="'+r+'_start" style="overflow:hidden;line-height:0px">\ufeff</span>');if(!t){l.collapse(false);l.pasteHTML('<span _mce_type="bookmark" id="'+r+'_end" style="overflow:hidden;line-height:0px">\ufeff</span>')}}else{q=j.getNode();l=q.nodeName;if(l=="IMG")return{name:l,index:g(l,q)};l=f.cloneRange();if(!t){l.collapse(false);l.insertNode(k.create("span",{_mce_type:"bookmark",id:r+"_end",style:"overflow:hidden;line-height:0px"},"\ufeff"))}f.collapse(true);
f.insertNode(k.create("span",{_mce_type:"bookmark",id:r+"_start",style:"overflow:hidden;line-height:0px"},"\ufeff"))}j.moveToBookmark({id:r,keep:1});return{id:r}},moveToBookmark:function(f){var d=this,g=d.dom,j,k,l,r,t,q;d.tridentSel&&d.tridentSel.destroy();if(f)if(f.start){j=g.createRng();k=g.getRoot();function p(n){var u=f[n?"start":"end"],h,s;if(u){s=k;for(h=u.length-1;h>=1;h--)s=s.childNodes[u[h]];n?j.setStart(s,u[0]):j.setEnd(s,u[0])}}p(true);p();d.setRng(j)}else if(f.id){function o(n){var u=
g.get(f.id+"_"+n),h,s,v;v=f.keep;if(u){h=u.parentNode;if(n=="start"){if(v){h=u;s=1}else s=g.nodeIndex(u);l=r=h;t=q=s}else{if(v){h=u;s=1}else s=g.nodeIndex(u);r=h;q=s}if(!v){v=u.previousSibling;h=u.nextSibling;for(e(a.grep(u.childNodes),function(y){if(y.nodeType==3)y.nodeValue=y.nodeValue.replace(/\uFEFF/g,"")});u=g.get(f.id+"_"+n);)g.remove(u,1);if(v&&h&&v.nodeType==h.nodeType&&v.nodeType==3){s=v.nodeValue.length;v.appendData(h.nodeValue);g.remove(h);if(n=="start"){l=r=v;t=q=s}else{r=v;q=s}}}}}o("start");
o("end");j=g.createRng();j.setStart(l,t);j.setEnd(r,q);d.setRng(j)}else if(f.name)d.select(g.select(f.name)[f.index]);else f.rng&&d.setRng(f.rng)},select:function(f,d){var g=this,j=g.dom,k=j.createRng();j=j.nodeIndex(f);k.setStart(f.parentNode,j);k.setEnd(f.parentNode,j+1);if(d){function l(r,t){var q=new a.dom.TreeWalker(r,r);do{if(r.nodeType==3&&a.trim(r.nodeValue).length!=0){t?k.setStart(r,0):k.setEnd(r,r.nodeValue.length);return}if(r.nodeName=="BR"){t?k.setStartBefore(r):k.setEndBefore(r);return}}while(r=
t?q.next():q.prev())}l(f,1);l(f)}g.setRng(k);return f},isCollapsed:function(){var f=this,d=f.getRng();f=f.getSel();if(!d||d.item)return false;if(d.compareEndPoints)return d.compareEndPoints("StartToEnd",d)===0;return!f||d.collapsed},collapse:function(f){var d=this,g=d.getRng(),j;if(g.item){j=g.item(0);g=this.win.document.body.createTextRange();g.moveToElementText(j)}g.collapse(!!f);d.setRng(g)},getSel:function(){var f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(f){var d=
this,g,j;if(f&&d.tridentSel)return d.tridentSel.getRangeAt(0);try{if(g=d.getSel())j=g.rangeCount>0?g.getRangeAt(0):g.createRange?g.createRange():d.win.document.createRange()}catch(k){}j||(j=d.win.document.createRange?d.win.document.createRange():d.win.document.body.createTextRange());return j},setRng:function(f){var d;d=this;if(d.tridentSel)if(f.cloneRange)d.tridentSel.addRange(f);else try{f.select()}catch(g){}else if(d=d.getSel()){d.removeAllRanges();d.addRange(f)}},setNode:function(f){var d=this;
d.setContent(d.dom.getOuterHTML(f));return f},getNode:function(){var f=this,d=f.getRng(),g=f.getSel();if(d.setStart){if(!d)return f.dom.getRoot();f=d.commonAncestorContainer;if(!d.collapsed){if(d.startContainer==d.endContainer)if(d.startOffset-d.endOffset<2)if(d.startContainer.hasChildNodes())f=d.startContainer.childNodes[d.startOffset];if(a.isWebKit&&g.anchorNode&&g.anchorNode.nodeType==1)return g.anchorNode.childNodes[g.anchorOffset]}if(f&&f.nodeType==3)return f.parentNode;return f}return d.item?
d.item(0):d.parentElement()},getSelectedBlocks:function(f,d){var g=this,j=g.dom,k=[];f=j.getParent(f||g.getStart(),j.isBlock);d=j.getParent(d||g.getEnd(),j.isBlock);f&&k.push(f);if(f&&d&&f!=d)for(g=f;(g=g.nextSibling)&&g!=d;)j.isBlock(g)&&k.push(g);d&&f!=d&&k.push(d);return k},destroy:function(f){var d=this;d.win=null;d.tridentSel&&d.tridentSel.destroy();f||a.removeUnload(d.destroy)}})})(tinymce);
(function(a){a.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(){function c(){var e=document.implementation;if(!e||!e.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(f){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(d){}}else return e.createDocument("","",null)}this.doc=c();this.valid=a.isOpera||a.isWebKit;this.reset()},reset:function(){var c=this,e=c.doc;e.firstChild&&e.removeChild(e.firstChild);c.node=e.appendChild(e.createElement("html"))},writeStartElement:function(c){var e=
this;e.node=e.node.appendChild(e.doc.createElement(c))},writeAttribute:function(c,e){if(this.valid)e=e.replace(/>/g,"%MCGT%");this.node.setAttribute(c,e)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var c=this,e=c.node;e.appendChild(c.doc.createTextNode(""));c.node=e.parentNode},writeText:function(c){if(this.valid)c=c.replace(/>/g,"%MCGT%");this.node.appendChild(this.doc.createTextNode(c))},writeCDATA:function(c){this.node.appendChild(this.doc.createCDATASection(c))},
writeComment:function(c){if(a.isIE)c=c.replace(/^\-|\-$/g," ");this.node.appendChild(this.doc.createComment(c.replace(/\-\-/g," ")))},getContent:function(){var c;c=this.doc.xml||(new XMLSerializer).serializeToString(this.doc);c=c.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,"");c=c.replace(/ ?\/>/g," />");if(this.valid)c=c.replace(/\%MCGT%/g,"&gt;");return c}})})(tinymce);
(function(a){a.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(c){this.settings=a.extend({indent_char:" ",indentation:0},c);this.reset()},reset:function(){this.str=this.indent="";this.tags=[];this.count=0},writeStartElement:function(c){this._writeAttributesEnd();this.writeRaw("<"+c);this.tags.push(c);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(c,e){var f=this;f.writeRaw(" "+f.encode(c)+'="'+f.encode(e)+
'"')},writeEndElement:function(){var c;if(this.tags.length>0){c=this.tags.pop();this._writeAttributesEnd(1)&&this.writeRaw("</"+c+">");this.settings.indentation>0&&this.writeRaw("\n")}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("</"+this.tags.pop()+">");this.settings.indentation>0&&this.writeRaw("\n")}},writeText:function(c){this._writeAttributesEnd();this.writeRaw(this.encode(c));this.count++},writeCDATA:function(c){this._writeAttributesEnd();
this.writeRaw("<![CDATA["+c+"]]\>");this.count++},writeComment:function(c){this._writeAttributesEnd();this.writeRaw("<!-- "+c+"--\>");this.count++},writeRaw:function(c){this.str+=c},encode:function(c){return c.replace(/[<>&"]/g,function(e){switch(e){case "<":return"&lt;";case ">":return"&gt;";case "&":return"&amp;";case '"':return"&quot;"}return e})},getContent:function(){return this.str},_writeAttributesEnd:function(c){if(this.inAttr){this.inAttr=false;if(c&&this.elementCount==this.count){this.writeRaw(" />");
return false}this.writeRaw(">");return true}}})})(tinymce);
(function(a){function c(k){return k.replace(/([?+*])/g,".$1")}var e=a.extend,f=a.each,d=a.util.Dispatcher,g=a.isIE,j=a.isGecko;a.create("tinymce.dom.Serializer",{Serializer:function(k){var l=this;l.key=0;l.onPreProcess=new d(l);l.onPostProcess=new d(l);try{l.writer=new a.dom.XMLWriter}catch(r){l.writer=new a.dom.StringWriter}l.settings=k=e({dom:a.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(_mce_|_moz_|sizset|sizcache)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,entity_encoding:"named",
entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",
valid_elements:"*[*]",extended_valid_elements:0,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},k);l.dom=k.dom;l.schema=k.schema;if(k.entity_encoding=="named"&&!k.entities)k.entity_encoding="raw";k.remove_redundant_brs&&l.onPostProcess.add(function(t,q){q.content=
q.content.replace(/(<br \/>\s*)+<\/(p|h[1-6]|div|li)>/gi,function(p,o,n){if(/^<br \/>\s*<\//.test(p))return"</"+n+">";return p})});k.element_format=="html"&&l.onPostProcess.add(function(t,q){q.content=q.content.replace(/<([^>]+) \/>/g,"<$1>")});k.fix_list_elements&&l.onPreProcess.add(function(t,q){function p(B,z){z=z.split(",");for(var C;(B=B.previousSibling)!=null;)for(C=0;C<z.length;C++)if(B.nodeName==z[C])return B;return null}var o,n=["ol","ul"],u,h,s,v=/^(OL|UL)$/,y;for(o=0;o<n.length;o++){t=
l.dom.select(n[o],q.node);for(u=0;u<t.length;u++){h=t[u];s=h.parentNode;if(v.test(s.nodeName))if(y=p(h,"LI"))y.appendChild(h);else{y=l.dom.create("li");y.innerHTML="&nbsp;";y.appendChild(h);s.insertBefore(y,s.firstChild)}}}});k.fix_table_elements&&l.onPreProcess.add(function(t,q){if(!a.isOpera||opera.buildNumber()>=1767)f(l.dom.select("p table",q.node).reverse(),function(p){var o=l.dom.getParent(p.parentNode,"table,p");if(o.nodeName!="TABLE")try{l.dom.split(o,p)}catch(n){}})})},setEntities:function(k){var l=
this,r,t={},q;if(!l.entityLookup){k=k.split(",");for(r=0;r<k.length;r+=2){q=k[r];if(!(q==34||q==38||q==60||q==62)){t[String.fromCharCode(k[r])]=k[r+1];parseInt(k[r]).toString(16)}}l.entityLookup=t}},setRules:function(k){var l=this;l._setup();l.rules={};l.wildRules=[];l.validElements={};return l.addRules(k)},addRules:function(k){var l=this,r;if(k){l._setup();f(k.split(","),function(t){t=t.split(/\[|\]/);var q=t[0].split("/"),p,o,n,u=[];if(r)o=a.extend([],r.attribs);t.length>1&&f(t[1].split("|"),function(h){var s=
{},v;o=o||[];h=h.replace(/::/g,"~");h=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(h);h[2]=h[2].replace(/~/g,":");if(h[1]=="!"){p=p||[];p.push(h[2])}if(h[1]=="-")for(v=0;v<o.length;v++)if(o[v].name==h[2]){o.splice(v,1);return}switch(h[3]){case "=":s.defaultVal=h[4]||"";break;case ":":s.forcedVal=h[4];break;case "<":s.validVals=h[4].split("?");break}if(/[*.?]/.test(h[2])){n=n||[];s.nameRE=new RegExp("^"+c(h[2])+"$");n.push(s)}else{s.name=h[2];o.push(s)}u.push(h[2])});f(q,function(h,s){var v=h.charAt(0),
y=1,B={};if(r){if(r.noEmpty)B.noEmpty=r.noEmpty;if(r.fullEnd)B.fullEnd=r.fullEnd;if(r.padd)B.padd=r.padd}switch(v){case "-":B.noEmpty=true;break;case "+":B.fullEnd=true;break;case "#":B.padd=true;break;default:y=0}q[s]=h=h.substring(y);l.validElements[h]=1;if(/[*.?]/.test(q[0])){B.nameRE=new RegExp("^"+c(q[0])+"$");l.wildRules=l.wildRules||{};l.wildRules.push(B)}else{B.name=q[0];if(q[0]=="@")r=B;l.rules[h]=B}B.attribs=o;if(p)B.requiredAttribs=p;if(n){h="";f(u,function(z){if(h)h+="|";h+="("+c(z)+")"});
B.validAttribsRE=new RegExp("^"+h.toLowerCase()+"$");B.wildAttribs=n}})});k="";f(l.validElements,function(t,q){if(k)k+="|";if(q!="@")k+=q});l.validElementsRE=new RegExp("^("+c(k.toLowerCase())+")$")}},findRule:function(k){var l=this,r=l.rules;l._setup();if(r=r[k])return r;r=l.wildRules;for(l=0;l<r.length;l++)if(r[l].nameRE.test(k))return r[l];return null},findAttribRule:function(k,l){var r=k.wildAttribs;for(k=0;k<r.length;k++)if(r[k].nameRE.test(l))return r[k];return null},serialize:function(k,l){var r=
this,t,q,p,o;r._setup();l=l||{};l.format=l.format||"html";r.processObj=l;if(g){o=[];f(k.getElementsByTagName("option"),function(n){n=r.dom.getAttrib(n,"selected");o.push(n?n:null)})}k=k.cloneNode(true);g&&f(k.getElementsByTagName("option"),function(n,u){r.dom.setAttrib(n,"selected",o[u])});p=k.ownerDocument.implementation;if(p.createHTMLDocument&&a.isOpera&&opera.buildNumber()>=1767){t=p.createHTMLDocument("");f(k.nodeName=="BODY"?k.childNodes:[k],function(n){t.body.appendChild(t.importNode(n,true))});
k=k.nodeName!="BODY"?t.body.firstChild:t.body;q=r.dom.doc;r.dom.doc=t}r.key=""+(parseInt(r.key)+1);if(!l.no_events){l.node=k;r.onPreProcess.dispatch(r,l)}r.writer.reset();r._info=l;r._serializeNode(k,l.getInner);l.content=r.writer.getContent();if(q)r.dom.doc=q;l.no_events||r.onPostProcess.dispatch(r,l);r._postProcess(l);l.node=null;return a.trim(l.content)},_postProcess:function(k){var l=this,r=l.settings,t=k.content,q;if(k.format=="html"){q=l._protect({content:t,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},
{pattern:/(<noscript[^>]*>)(.*?)(<\/noscript>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/(<!--\[CDATA\[)(.*?)(\]\]--\>)/g}]});t=q.content;if(r.entity_encoding!=="raw")t=l._encode(t);if(!k.set){t=t.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,r.entity_encoding=="numeric"?"<p$1>&#160;</p>":"<p$1>&nbsp;</p>");if(r.remove_linebreaks){t=t.replace(/\r?\n|\r/g," ");t=t.replace(/(<[^>]+>)\s+/g,"$1 ");t=t.replace(/\s+(<\/[^>]+>)/g," $1");t=t.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,
"<$1 $2>");t=t.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>");t=t.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"</$1>")}if(r.apply_source_formatting&&r.indent_mode=="simple"){t=t.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");t=t.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,
"\n<$1$2>");t=t.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"</$1>\n");t=t.replace(/\n\n/g,"\n")}}t=l._unprotect(t,q);t=t.replace(/<!--\[CDATA\[([\s\S]+)\]\]--\>/g,"<![CDATA[$1]]\>");if(r.entity_encoding=="raw")t=t.replace(/<p>&nbsp;<\/p>|<p([^>]+)>&nbsp;<\/p>/g,"<p$1>\u00a0</p>");t=t.replace(/<noscript([^>]+|)>([\s\S]*?)<\/noscript>/g,function(p,o,n){return"<noscript"+o+">"+l.dom.decode(n.replace(/<!--|--\>/g,""))+"</noscript>"})}k.content=t},_serializeNode:function(k,
l){var r=this,t=r.settings,q=r.writer,p,o,n,u,h,s,v,y,B,z,C,G;if(!t.node_filter||t.node_filter(k))switch(k.nodeType){case 1:if(k.hasAttribute?k.hasAttribute("_mce_bogus"):k.getAttribute("_mce_bogus"))return;B=C=false;p=k.hasChildNodes();v=k.getAttribute("_mce_name")||k.nodeName.toLowerCase();if(G=k.getAttribute("_mce_type"))if(r._info.cleanup)C=1;else return;if(g)if(k.scopeName!=="HTML"&&k.scopeName!=="html")v=k.scopeName+":"+v;if(v.indexOf("mce:")===0)v=v.substring(4);if(!C)if(!r.validElementsRE||
!r.validElementsRE.test(v)||r.invalidElementsRE&&r.invalidElementsRE.test(v)||l){B=true;break}if(g){if(t.fix_content_duplication){if(k._mce_serialized==r.key)return;k._mce_serialized=r.key}if(v.charAt(0)=="/")v=v.substring(1)}else if(j)if(k.nodeName==="BR"&&k.getAttribute("type")=="_moz")return;if(t.validate_children){if(r.elementName&&!r.schema.isValid(r.elementName,v)){B=true;break}r.elementName=v}y=r.findRule(v);if(!y){B=true;break}v=y.name||v;z=t.closed.test(v);if(!p&&y.noEmpty||g&&!v){B=true;
break}if(y.requiredAttribs){u=y.requiredAttribs;for(l=u.length-1;l>=0;l--)if(this.dom.getAttrib(k,u[l])!=="")break;if(l==-1){B=true;break}}q.writeStartElement(v);if(y.attribs){l=0;h=y.attribs;for(n=h.length;l<n;l++){u=h[l];s=r._getAttrib(k,u);s!==null&&q.writeAttribute(u.name,s)}}if(y.validAttribsRE){h=r.dom.getAttribs(k);for(l=h.length-1;l>-1;l--){u=h[l];if(u.specified){u=u.nodeName.toLowerCase();if(!(t.invalid_attrs.test(u)||!y.validAttribsRE.test(u))){n=r.findAttribRule(y,u);s=r._getAttrib(k,n,
u);s!==null&&q.writeAttribute(u,s)}}}}G&&C&&q.writeAttribute("_mce_type",G);if(v==="script"&&a.trim(k.innerHTML)){q.writeText("// ");q.writeCDATA(k.innerHTML.replace(/<!--|--\>|<\[CDATA\[|\]\]>/g,""));p=false;break}if(y.padd)if(p&&(o=k.firstChild)&&o.nodeType===1&&k.childNodes.length===1){if(o.hasAttribute?o.hasAttribute("_mce_bogus"):o.getAttribute("_mce_bogus"))q.writeText("\u00a0")}else p||q.writeText("\u00a0");break;case 3:if(t.validate_children&&r.elementName&&!r.schema.isValid(r.elementName,
"#text"))return;return q.writeText(k.nodeValue);case 4:return q.writeCDATA(k.nodeValue);case 8:return q.writeComment(k.nodeValue)}else if(k.nodeType==1)p=k.hasChildNodes();if(p&&!z)for(o=k.firstChild;o;){r._serializeNode(o);r.elementName=v;o=o.nextSibling}B||(z?q.writeEndElement():q.writeFullEndElement())},_protect:function(k){function l(q){return q.replace(/[\r\n\\]/g,function(p){if(p==="\n")return"\\n";else if(p==="\\")return"\\\\";return"\\r"})}function r(q){return q.replace(/\\[\\rn]/g,function(p){if(p===
"\\n")return"\n";else if(p==="\\\\")return"\\";return"\r"})}var t=this;k.items=k.items||[];f(k.patterns,function(q){k.content=r(l(k.content).replace(q.pattern,function(p,o,n,u){n=r(n);if(q.encode)n=t._encode(n);k.items.push(n);return o+"<!--mce:"+(k.items.length-1)+"--\>"+u}))});return k},_unprotect:function(k,l){k=k.replace(/\<!--mce:([0-9]+)--\>/g,function(r,t){return l.items[parseInt(t)]});l.items=[];return k},_encode:function(k){var l=this,r=l.settings,t;if(r.entity_encoding!=="raw"){if(r.entity_encoding.indexOf("named")!=
-1){l.setEntities(r.entities);t=l.entityLookup;k=k.replace(/[\u007E-\uFFFF]/g,function(q){var p;if(p=t[q])q="&"+p+";";return q})}if(r.entity_encoding.indexOf("numeric")!=-1)k=k.replace(/[\u007E-\uFFFF]/g,function(q){return"&#"+q.charCodeAt(0)+";"})}return k},_setup:function(){var k=this,l=this.settings;if(!k.done){k.done=1;k.setRules(l.valid_elements);k.addRules(l.extended_valid_elements);if(l.invalid_elements)k.invalidElementsRE=new RegExp("^("+c(l.invalid_elements.replace(/,/g,"|").toLowerCase())+
")$");if(l.attrib_value_filter)k.attribValueFilter=l.attribValueFilter}},_getAttrib:function(k,l,r){var t;r=r||l.name;if(l.forcedVal&&(t=l.forcedVal)){if(t==="{$uid}")return this.dom.uniqueId();return t}t=this.dom.getAttrib(k,r);switch(r){case "rowspan":case "colspan":if(t=="1")t="";break}if(this.attribValueFilter)t=this.attribValueFilter(r,t,k);if(l.validVals){for(k=l.validVals.length-1;k>=0;k--)if(t==l.validVals[k])break;if(k==-1)return null}if(t===""&&typeof l.defaultVal!="undefined"){t=l.defaultVal;
if(t==="{$uid}")return this.dom.uniqueId();return t}else if(r=="class"&&this.processObj.get)t=t.replace(/\s?mceItem\w+\s?/g,"");if(t==="")return null;return t}})})(tinymce);
(function(a){a.dom.ScriptLoader=function(){function c(k,l){function r(){t.remove(n);if(q)q.onreadystatechange=q.onload=q=null;l()}var t=a.DOM,q,p,o,n;n=t.uniqueId();if(a.isIE6){p=new a.util.URI(k);o=location;if(p.host==o.hostname&&p.port==o.port&&p.protocol+":"==o.protocol){a.util.XHR.send({url:a._addVer(p.getURI()),success:function(u){var h=t.create("script",{type:"text/javascript"});h.text=u;document.getElementsByTagName("head")[0].appendChild(h);t.remove(h);r()}});return}}q=t.create("script",{id:n,
type:"text/javascript",src:a._addVer(k)});q.onload=r;q.onreadystatechange=function(){var u=q.readyState;if(u=="complete"||u=="loaded")r()};(document.getElementsByTagName("head")[0]||document.body).appendChild(q)}var e={},f=[],d={},g=[],j=0;this.isDone=function(k){return e[k]==2};this.markDone=function(k){e[k]=2};this.add=this.load=function(k,l,r){if(e[k]==void 0){f.push(k);e[k]=0}if(l){d[k]||(d[k]=[]);d[k].push({func:l,scope:r||this})}};this.loadQueue=function(k,l){this.loadScripts(f,k,l)};this.loadScripts=
function(k,l,r){function t(p){a.each(d[p],function(o){o.func.call(o.scope)});d[p]=void 0}var q;g.push({func:l,scope:r||this});q=function(){var p=a.grep(k);k.length=0;a.each(p,function(o){if(e[o]==2)t(o);else if(e[o]!=1){e[o]=1;j++;c(o,function(){e[o]=2;j--;t(o);q()})}});if(!j){a.each(g,function(o){o.func.call(o.scope)});g.length=0}};q()}};a.ScriptLoader=new a.dom.ScriptLoader})(tinymce);
tinymce.dom.TreeWalker=function(a,c){function e(d,g,j,k){if(d){if(!k&&d[g])return d[g];if(d!=c){if(g=d[j])return g;for(d=d.parentNode;d&&d!=c;d=d.parentNode)if(g=d[j])return g}}}var f=a;this.current=function(){return f};this.next=function(d){return f=e(f,"firstChild","nextSibling",d)};this.prev=function(d){return f=e(f,"lastChild","lastSibling",d)}};
(function(){function a(e,f){function d(j){return j.replace(/[A-Z]+/g,function(k){return d(e[k])})}var g;for(g in e)if(e.hasOwnProperty(g))e[g]=d(e[g]);d(f).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]/g,function(j,k,l){var r={};l=l.split(/\|/);for(j=l.length-1;j>=0;j--)r[l[j]]=1;c[k]=r})}var c={};a({Z:"#|H|K|N|O|P",Y:"#|X|form|R|Q",X:"p|T|div|U|W|isindex|fieldset|table",W:"pre|hr|blockquote|address|center|noframes",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"},"script[]style[]object[#|param|X|form|a|H|K|N|O|Q]param[]p[S]a[Z]br[]span[S]bdo[S]applet[#|param|X|form|a|H|K|N|O|Q]h1[S]img[]map[X|form|Q|area]h2[S]iframe[#|X|form|a|H|K|N|O|Q]h3[S]tt[S]i[S]b[S]u[S]s[S]strike[S]big[S]small[S]font[S]basefont[]em[S]strong[S]dfn[S]code[S]q[S]samp[S]kbd[S]var[S]cite[S]abbr[S]acronym[S]sub[S]sup[S]input[]select[optgroup|option]optgroup[option]option[]textarea[]label[S]button[#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[S]ins[#|X|form|a|H|K|N|O|Q]h5[S]del[#|X|form|a|H|K|N|O|Q]h6[S]div[#|X|form|a|H|K|N|O|Q]ul[li]li[#|X|form|a|H|K|N|O|Q]ol[li]dl[dt|dd]dt[S]dd[#|X|form|a|H|K|N|O|Q]menu[li]dir[li]pre[ZA]hr[]blockquote[#|X|form|a|H|K|N|O|Q]address[S|p]center[#|X|form|a|H|K|N|O|Q]noframes[#|X|form|a|H|K|N|O|Q]isindex[]fieldset[#|legend|X|form|a|H|K|N|O|Q]legend[S]table[caption|col|colgroup|thead|tfoot|tbody|tr]caption[S]col[]colgroup[col]thead[tr]tr[th|td]th[#|X|form|a|H|K|N|O|Q]form[#|X|a|H|K|N|O|Q]noscript[#|X|form|a|H|K|N|O|Q]td[#|X|form|a|H|K|N|O|Q]tfoot[tr]tbody[tr]area[]base[]body[#|X|form|a|H|K|N|O|Q]");
tinymce.dom.Schema=function(){var e=c;this.isValid=function(f,d){f=e[f];return!!(f&&(!d||f[d]))}}})();
(function(a){a.dom.RangeUtils=function(c){this.walk=function(e,f){function d(n,u,h){for(var s=[];n&&n!=h;n=n[u])s.push(n);return s}function g(n,u){do{if(n.parentNode==u)return n;n=n.parentNode}while(n)}function j(n,u,h){var s=h?"nextSibling":"previousSibling";t=n;for(q=t.parentNode;t&&t!=u;t=q){q=t.parentNode;p=d(t==n?t:t[s],s);if(p.length){h||p.reverse();f(p)}}}var k=e.startContainer,l=e.startOffset,r=e.endContainer;e=e.endOffset;var t,q,p,o;o=c.select("td.mceSelected,th.mceSelected");if(o.length>
0)a.each(o,function(n){f([n])});else{if(k.nodeType==1&&k.hasChildNodes())k=k.childNodes[l];if(r.nodeType==1&&r.hasChildNodes())r=r.childNodes[Math.min(l==e?e:e-1,r.childNodes.length-1)];e=c.findCommonAncestor(k,r);if(k==r)return f([k]);for(t=k;t;t=t.parentNode){if(t==r)return j(k,e,true);if(t==e)break}for(t=r;t;t=t.parentNode){if(t==k)return j(r,e);if(t==e)break}l=g(k,e)||k;e=g(r,e)||r;j(k,l,true);p=d(l==k?l:l.nextSibling,"nextSibling",e==r?e.nextSibling:e);p.length&&f(p);j(r,e)}}};a.dom.RangeUtils.compareRanges=
function(c,e){if(c&&e)if(c.item||c.duplicate){if(c.item&&e.item&&c.item(0)===e.item(0))return true;if(c.isEqual&&e.isEqual&&e.isEqual(c))return true}else return c.startContainer==e.startContainer&&c.startOffset==e.startOffset;return false}})(tinymce);
(function(a){var c=a.DOM,e=a.is;a.create("tinymce.ui.Control",{Control:function(f,d){this.id=f;this.settings=d=d||{};this.rendered=false;this.onRender=new a.util.Dispatcher(this);this.classPrefix="";this.scope=d.scope||this;this.active=this.disabled=0},setDisabled:function(f){var d;if(f!=this.disabled){if((d=c.get(this.id))&&this.settings.unavailable_prefix)if(f){this.prevTitle=d.title;d.title=this.settings.unavailable_prefix+": "+d.title}else d.title=this.prevTitle;this.setState("Disabled",f);this.setState("Enabled",
!f);this.disabled=f}},isDisabled:function(){return this.disabled},setActive:function(f){if(f!=this.active){this.setState("Active",f);this.active=f}},isActive:function(){return this.active},setState:function(f,d){var g=c.get(this.id);f=this.classPrefix+f;d?c.addClass(g,f):c.removeClass(g,f)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(f){c.setHTML(f,this.renderHTML())},postRender:function(){var f=this,d;if(e(f.disabled)){d=f.disabled;f.disabled=-1;f.setDisabled(d)}if(e(f.active)){d=
f.active;f.active=-1;f.setActive(d)}},remove:function(){c.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,c){this.parent(a,c);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});
tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(a,c){this.parent(a,c);this.classPrefix="mceSeparator"},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix})}});
(function(a){var c=a.is;a.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(e,f){this.parent(e,f);this.classPrefix="mceMenuItem"},setSelected:function(e){this.setState("Selected",e);this.selected=e},isSelected:function(){return this.selected},postRender:function(){var e=this;e.parent();c(e.selected)&&e.setSelected(e.selected)}})})(tinymce);
(function(a){var c=a.DOM,e=a.walk;a.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(f,d){var g=this;g.parent(f,d);g.items={};g.collapsed=false;g.menuCount=0;g.onAddItem=new a.util.Dispatcher(this)},expand:function(f){var d=this;f&&e(d,function(g){g.expand&&g.expand()},"items",d);d.collapsed=false},collapse:function(f){var d=this;f&&e(d,function(g){g.collapse&&g.collapse()},"items",d);d.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){f.settings||(f=new a.ui.MenuItem(f.id||
c.uniqueId(),f));this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){f.collapse||(f=this.createMenu(f));this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;e(f,function(d){d.removeAll?d.removeAll():d.remove();d.destroy()},"items",f);f.items={}},createMenu:function(f){f=new a.ui.Menu(f.id||c.uniqueId(),f);f.onAddItem.add(this.onAddItem.dispatch,
this.onAddItem);return f}})})(tinymce);
(function(a){var c=a.is,e=a.DOM,f=a.each,d=a.dom.Event,g=a.dom.Element;a.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(j,k){k=k||{};k.container=k.container||e.doc.body;k.offset_x=k.offset_x||0;k.offset_y=k.offset_y||0;k.vp_offset_x=k.vp_offset_x||0;k.vp_offset_y=k.vp_offset_y||0;if(c(k.icons)&&!k.icons)k["class"]+=" mceNoIcons";this.parent(j,k);this.onShowMenu=new a.util.Dispatcher(this);this.onHideMenu=new a.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var k=
this,l=k.settings;j.container=j.container||l.container;j.parent=k;j.constrain=j.constrain||l.constrain;j["class"]=j["class"]||l["class"];j.vp_offset_x=j.vp_offset_x||l.vp_offset_x;j.vp_offset_y=j.vp_offset_y||l.vp_offset_y;j=new a.ui.DropMenu(j.id||e.uniqueId(),j);j.onAddItem.add(k.onAddItem.dispatch,k.onAddItem);return j},update:function(){var j=this,k=j.settings,l=e.get("menu_"+j.id+"_tbl"),r=e.get("menu_"+j.id+"_co"),t,q;t=k.max_width?Math.min(l.clientWidth,k.max_width):l.clientWidth;q=k.max_height?
Math.min(l.clientHeight,k.max_height):l.clientHeight;e.boxModel?j.element.setStyles({width:t,height:q}):j.element.setStyles({width:t+2,height:q+2});k.max_width&&e.setStyle(r,"width",t);if(k.max_height){e.setStyle(r,"height",q);l.clientHeight<k.max_height&&e.setStyle(r,"overflow","hidden")}},showMenu:function(j,k,l){var r=this,t=r.settings,q,p=e.getViewPort(),o,n,u,h,s=r.classPrefix;r.collapse(1);if(!r.isMenuVisible){if(r.rendered)q=e.get("menu_"+r.id);else{q=e.add(r.settings.container,r.renderNode());
f(r.items,function(v){v.postRender()});r.element=new g("menu_"+r.id,{blocker:1,container:t.container})}a.isOpera||e.setStyles(q,{left:-65535,top:-65535});e.show(q);r.update();j+=t.offset_x||0;k+=t.offset_y||0;p.w-=4;p.h-=4;if(t.constrain){o=q.clientWidth-2;n=q.clientHeight-2;u=p.x+p.w;p=p.y+p.h;if(j+t.vp_offset_x+o>u)j=l?l-o:Math.max(0,u-t.vp_offset_x-o);if(k+t.vp_offset_y+n>p)k=Math.max(0,p-t.vp_offset_y-n)}e.setStyles(q,{left:j,top:k});r.element.update();r.isMenuVisible=1;r.mouseClickFunc=d.add(q,
"click",function(v){var y;if((v=v.target)&&(v=e.getParent(v,"tr"))&&!e.hasClass(v,s+"ItemSub")){y=r.items[v.id];if(!y.isDisabled()){for(h=r;h;){h.hideMenu&&h.hideMenu();h=h.settings.parent}y.settings.onclick&&y.settings.onclick(v);return d.cancel(v)}}});if(r.hasMenus())r.mouseOverFunc=d.add(q,"mouseover",function(v){var y;if((v=v.target)&&(v=e.getParent(v,"tr"))){y=r.items[v.id];r.lastMenu&&r.lastMenu.collapse(1);if(!y.isDisabled())if(v&&e.hasClass(v,s+"ItemSub")){v=e.getRect(v);y.showMenu(v.x+v.w-
2,v.y-2,v.x);r.lastMenu=y;e.addClass(e.get(y.id).firstChild,s+"ItemActive")}}});r.onShowMenu.dispatch(r);if(t.keyboard_focus){d.add(q,"keydown",r._keyHandler,r);e.select("a","menu_"+r.id)[0].focus();r._focusIdx=0}}},hideMenu:function(j){var k=this,l=e.get("menu_"+k.id);if(k.isMenuVisible){d.remove(l,"mouseover",k.mouseOverFunc);d.remove(l,"click",k.mouseClickFunc);d.remove(l,"keydown",k._keyHandler);e.hide(l);k.isMenuVisible=0;j||k.collapse(1);k.element&&k.element.hide();if(j=e.get(k.id))e.removeClass(j.firstChild,
k.classPrefix+"ItemActive");k.onHideMenu.dispatch(k)}},add:function(j){var k=this,l;j=k.parent(j);if(k.isRendered&&(l=e.get("menu_"+k.id)))k._add(e.select("tbody",l)[0],j);return j},collapse:function(j){this.parent(j);this.hideMenu(1)},remove:function(j){e.remove(j.id);this.destroy();return this.parent(j)},destroy:function(){var j=this,k=e.get("menu_"+j.id);d.remove(k,"mouseover",j.mouseOverFunc);d.remove(k,"click",j.mouseClickFunc);j.element&&j.element.remove();e.remove(k)},renderNode:function(){var j=
this,k=j.settings,l,r,t;t=e.create("div",{id:"menu_"+j.id,"class":k["class"],style:"position:absolute;left:0;top:0;z-index:200000"});r=e.add(t,"div",{id:"menu_"+j.id+"_co","class":j.classPrefix+(k["class"]?" "+k["class"]:"")});j.element=new g("menu_"+j.id,{blocker:1,container:k.container});k.menu_line&&e.add(r,"span",{"class":j.classPrefix+"Line"});k=e.add(r,"table",{id:"menu_"+j.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});l=e.add(k,"tbody");f(j.items,function(q){j._add(l,q)});j.rendered=true;
return t},_keyHandler:function(j){function k(r){r=l._focusIdx+r;var t=e.select("a","menu_"+l.id)[r];if(t){l._focusIdx=r;t.focus()}}var l=this;switch(j.keyCode){case 38:k(-1);return;case 40:k(1);return;case 13:return;case 27:return this.hideMenu()}},_add:function(j,k){var l,r=k.settings,t,q,p=this.classPrefix;if(r.separator){t=e.add(j,"tr",{id:k.id,"class":p+"ItemSeparator"});e.add(t,"td",{"class":p+"ItemSeparator"});if(l=t.previousSibling)e.addClass(l,"mceLast")}else{l=t=e.add(j,"tr",{id:k.id,"class":p+
"Item "+p+"ItemEnabled"});l=q=e.add(l,"td");l=e.add(l,"a",{href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});e.addClass(q,r["class"]);q=e.add(l,"span",{"class":"mceIcon"+(r.icon?" mce_"+r.icon:"")});r.icon_src&&e.add(q,"img",{src:r.icon_src});l=e.add(l,r.element||"span",{"class":"mceText",title:k.settings.title},k.settings.title);k.settings.style&&e.setAttrib(l,"style",k.settings.style);j.childNodes.length==1&&e.addClass(t,"mceFirst");if((l=t.previousSibling)&&e.hasClass(l,
p+"ItemSeparator"))e.addClass(t,"mceFirst");k.collapse&&e.addClass(t,p+"ItemSub");if(l=t.previousSibling)e.removeClass(l,"mceLast");e.addClass(t,"mceLast")}}})})(tinymce);
(function(a){var c=a.DOM;a.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,f){this.parent(e,f);this.classPrefix="mceButton"},renderHTML:function(){var e=this.classPrefix,f=this.settings,d,g;g=c.encode(f.label||"");d='<a id="'+this.id+'" href="javascript:;" class="'+e+" "+e+"Enabled "+f["class"]+(g?" "+e+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" title="'+c.encode(f.title)+'">';d+=f.image?'<img class="mceIcon" src="'+f.image+'" />'+g+"</a>":'<span class="mceIcon '+
f["class"]+'"></span>'+(g?'<span class="'+e+'Label">'+g+"</span>":"")+"</a>";return d},postRender:function(){var e=this,f=e.settings;a.dom.Event.add(e.id,"click",function(d){if(!e.isDisabled())return f.onclick.call(f.scope,d)})}})})(tinymce);
(function(a){var c=a.DOM,e=a.dom.Event,f=a.each,d=a.util.Dispatcher;a.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(g,j){var k=this;k.parent(g,j);k.items=[];k.onChange=new d(k);k.onPostRender=new d(k);k.onAdd=new d(k);k.onRenderMenu=new a.util.Dispatcher(this);k.classPrefix="mceListBox"},select:function(g){var j=this,k,l;if(g==undefined)return j.selectByIndex(-1);l=g&&g.call?g:function(r){return r==g};if(g!=j.selectedValue){f(j.items,function(r,t){if(l(r.value)){k=1;j.selectByIndex(t);
return false}});k||j.selectByIndex(-1)}},selectByIndex:function(g){var j=this,k,l;if(g!=j.selectedIndex){k=c.get(j.id+"_text");if(l=j.items[g]){j.selectedValue=l.value;j.selectedIndex=g;c.setHTML(k,c.encode(l.title));c.removeClass(k,"mceTitle")}else{c.setHTML(k,c.encode(j.settings.title));c.addClass(k,"mceTitle");j.selectedValue=j.selectedIndex=null}}},add:function(g,j,k){var l=this;k=k||{};k=a.extend(k,{title:g,value:j});l.items.push(k);l.onAdd.dispatch(l,k)},getLength:function(){return this.items.length},
renderHTML:function(){var g="",j=this;g=j.settings;var k=j.classPrefix;g='<table id="'+j.id+'" cellpadding="0" cellspacing="0" class="'+k+" "+k+"Enabled"+(g["class"]?" "+g["class"]:"")+'"><tbody><tr>';g+="<td>"+c.createHTML("a",{id:j.id+"_text",href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},c.encode(j.settings.title))+"</td>";g+="<td>"+c.createHTML("a",{id:j.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},
"<span></span>")+"</td>";g+="</tr></tbody></table>";return g},showMenu:function(){var g=this,j,k=c.get(this.id),l;if(!(g.isDisabled()||g.items.length==0)){if(g.menu&&g.menu.isMenuVisible)return g.hideMenu();if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}c.getPos(this.settings.menu_container);j=c.getPos(k);l=g.menu;l.settings.offset_x=j.x;l.settings.offset_y=j.y;l.settings.keyboard_focus=!a.isOpera;g.oldID&&l.items[g.oldID].setSelected(0);f(g.items,function(r){if(r.value===g.selectedValue){l.items[r.id].setSelected(1);
g.oldID=r.id}});l.showMenu(0,k.clientHeight);e.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")}},hideMenu:function(g){var j=this;if(j.menu&&j.menu.isMenuVisible)if(!(g&&g.type=="mousedown"&&(g.target.id==j.id+"_text"||g.target.id==j.id+"_open")))if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(j.id,j.classPrefix+"Selected");e.remove(c.doc,"mousedown",j.hideMenu,j);j.menu.hideMenu()}},renderMenu:function(){var g=this,j;j=g.settings.control_manager.createDropMenu(g.id+
"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});j.onHideMenu.add(g.hideMenu,g);j.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){g.settings.onselect("")!==false&&g.select("")}});f(g.items,function(k){if(k.value===undefined)j.add({title:k.title,"class":"mceMenuItemTitle",onclick:function(){g.settings.onselect("")!==false&&g.select("")}});else{k.id=c.uniqueId();k.onclick=function(){g.settings.onselect(k.value)!==false&&g.select(k.value)};
j.add(k)}});g.onRenderMenu.dispatch(g,j);g.menu=j},postRender:function(){var g=this,j=g.classPrefix;e.add(g.id,"click",g.showMenu,g);e.add(g.id+"_text","focus",function(){if(!g._focused)g.keyDownHandler=e.add(g.id+"_text","keydown",function(k){var l=-1,r,t=k.keyCode;f(g.items,function(q,p){if(g.selectedValue==q.value)l=p});if(t==38)r=g.items[l-1];else if(t==40)r=g.items[l+1];else if(t==13){r=g.selectedValue;g.selectedValue=null;g.settings.onselect(r);return e.cancel(k)}if(r){g.hideMenu();g.select(r.value)}});
g._focused=1});e.add(g.id+"_text","blur",function(){e.remove(g.id+"_text","keydown",g.keyDownHandler);g._focused=0});if(a.isIE6||!c.boxModel){e.add(g.id,"mouseover",function(){c.hasClass(g.id,j+"Disabled")||c.addClass(g.id,j+"Hover")});e.add(g.id,"mouseout",function(){c.hasClass(g.id,j+"Disabled")||c.removeClass(g.id,j+"Hover")})}g.onPostRender.dispatch(g,c.get(g.id))},destroy:function(){this.parent();e.clear(this.id+"_text");e.clear(this.id+"_open")}})})(tinymce);
(function(a){var c=a.DOM,e=a.dom.Event,f=a.each;a.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(d,g){this.parent(d,g);this.classPrefix="mceNativeListBox"},setDisabled:function(d){c.get(this.id).disabled=d},isDisabled:function(){return c.get(this.id).disabled},select:function(d){var g=this,j,k;if(d==undefined)return g.selectByIndex(-1);k=d&&d.call?d:function(l){return l==d};if(d!=g.selectedValue){f(g.items,function(l,r){if(k(l.value)){j=1;g.selectByIndex(r);return false}});
j||g.selectByIndex(-1)}},selectByIndex:function(d){c.get(this.id).selectedIndex=d+1;this.selectedValue=this.items[d]?this.items[d].value:null},add:function(d,g,j){var k=this;j=j||{};j.value=g;k.isRendered()&&c.add(c.get(this.id),"option",j,d);d={title:d,value:g,attribs:j};k.items.push(d);k.onAdd.dispatch(k,d)},getLength:function(){return this.items.length},renderHTML:function(){var d,g=this;d=c.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(j){d+=c.createHTML("option",
{value:j.value},j.title)});return d=c.createHTML("select",{id:g.id,"class":"mceNativeListBox"},d)},postRender:function(){function d(j){if((j=g.items[j.target.selectedIndex-1])&&(j=j.value)){g.onChange.dispatch(g,j);g.settings.onselect&&g.settings.onselect(j)}}var g=this;g.rendered=true;e.add(g.id,"change",d);e.add(g.id,"keydown",function(j){var k;e.remove(g.id,"change",void 0);k=e.add(g.id,"blur",function(){e.add(g.id,"change",d);e.remove(g.id,"blur",k)});if(j.keyCode==13||j.keyCode==32){d(j);return e.cancel(j)}});
g.onPostRender.dispatch(g,c.get(g.id))}})})(tinymce);
(function(a){var c=a.DOM,e=a.dom.Event;a.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(f,d){this.parent(f,d);this.onRenderMenu=new a.util.Dispatcher(this);d.menu_container=d.menu_container||c.doc.body},showMenu:function(){var f=this,d,g=c.get(f.id),j;if(!f.isDisabled()){if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible)return f.hideMenu();c.getPos(f.settings.menu_container);d=c.getPos(g);j=f.menu;j.settings.offset_x=d.x;j.settings.offset_y=d.y;j.settings.vp_offset_x=
d.x;j.settings.vp_offset_y=d.y;j.settings.keyboard_focus=f._focused;j.showMenu(0,g.clientHeight);e.add(c.doc,"mousedown",f.hideMenu,f);f.setState("Selected",1);f.isMenuVisible=1}},renderMenu:function(){var f=this,d;d=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});d.onHideMenu.add(f.hideMenu,f);f.onRenderMenu.dispatch(f,d);f.menu=d},hideMenu:function(f){var d=this;if(!(f&&f.type=="mousedown"&&c.getParent(f.target,function(g){return g.id===
d.id||g.id===d.id+"_open"}))){if(!f||!c.getParent(f.target,".mceMenu")){d.setState("Selected",0);e.remove(c.doc,"mousedown",d.hideMenu,d);d.menu&&d.menu.hideMenu()}d.isMenuVisible=0}},postRender:function(){var f=this,d=f.settings;e.add(f.id,"click",function(){if(!f.isDisabled()){d.onclick&&d.onclick(f.value);f.showMenu()}})}})})(tinymce);
(function(a){var c=a.DOM,e=a.dom.Event;a.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(f,d){this.parent(f,d);this.classPrefix="mceSplitButton"},renderHTML:function(){var f,d=this,g=d.settings,j;f="<tbody><tr>";j=g.image?c.createHTML("img ",{src:g.image,"class":"mceAction "+g["class"]}):c.createHTML("span",{"class":"mceAction "+g["class"]},"");f+="<td>"+c.createHTML("a",{id:d.id+"_action",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",
title:g.title},j)+"</td>";j=c.createHTML("span",{"class":"mceOpen "+g["class"]});f+="<td>"+c.createHTML("a",{id:d.id+"_open",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},j)+"</td>";f+="</tr></tbody>";return c.createHTML("table",{id:d.id,"class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",onmousedown:"return false;",title:g.title},f)},postRender:function(){var f=this,d=f.settings;d.onclick&&
e.add(f.id+"_action","click",function(){f.isDisabled()||d.onclick(f.value)});e.add(f.id+"_open","click",f.showMenu,f);e.add(f.id+"_open","focus",function(){f._focused=1});e.add(f.id+"_open","blur",function(){f._focused=0});if(a.isIE6||!c.boxModel){e.add(f.id,"mouseover",function(){c.hasClass(f.id,"mceSplitButtonDisabled")||c.addClass(f.id,"mceSplitButtonHover")});e.add(f.id,"mouseout",function(){c.hasClass(f.id,"mceSplitButtonDisabled")||c.removeClass(f.id,"mceSplitButtonHover")})}},destroy:function(){this.parent();
e.clear(this.id+"_action");e.clear(this.id+"_open")}})})(tinymce);
(function(a){var c=a.DOM,e=a.dom.Event,f=a.is,d=a.each;a.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(g,j){var k=this;k.parent(g,j);k.settings=j=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"},
k.settings);k.onShowMenu=new a.util.Dispatcher(k);k.onHideMenu=new a.util.Dispatcher(k);k.value=j.default_color},showMenu:function(){var g=this,j,k;if(!g.isDisabled()){if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible)return g.hideMenu();j=c.get(g.id);c.show(g.id+"_menu");c.addClass(j,"mceSplitButtonSelected");k=c.getPos(j);c.setStyles(g.id+"_menu",{left:k.x,top:k.y+j.clientHeight,zIndex:2E5});j=0;e.add(c.doc,"mousedown",g.hideMenu,g);g.onShowMenu.dispatch(g);if(g._focused){g._keyHandler=
e.add(g.id+"_menu","keydown",function(l){l.keyCode==27&&g.hideMenu()});c.select("a",g.id+"_menu")[0].focus()}g.isMenuVisible=1}},hideMenu:function(g){var j=this;if(!(g&&g.type=="mousedown"&&c.getParent(g.target,function(k){return k.id===j.id+"_open"}))){if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(j.id,"mceSplitButtonSelected");e.remove(c.doc,"mousedown",j.hideMenu,j);e.remove(j.id+"_menu","keydown",j._keyHandler);c.hide(j.id+"_menu")}j.onHideMenu.dispatch(j);j.isMenuVisible=
0}},renderMenu:function(){var g=this,j,k=0,l=g.settings,r,t,q,p;p=c.add(l.menu_container,"div",{id:g.id+"_menu","class":l.menu_class+" "+l["class"],style:"position:absolute;left:0;top:-1000px;"});j=c.add(p,"div",{"class":l["class"]+" mceSplitButtonMenu"});c.add(j,"span",{"class":"mceMenuLine"});r=c.add(j,"table",{"class":"mceColorSplitMenu"});t=c.add(r,"tbody");k=0;d(f(l.colors,"array")?l.colors:l.colors.split(","),function(o){o=o.replace(/^#/,"");if(!k--){q=c.add(t,"tr");k=l.grid_width-1}r=c.add(q,
"td");r=c.add(r,"a",{href:"javascript:;",style:{backgroundColor:"#"+o},_mce_color:"#"+o})});if(l.more_colors_func){r=c.add(t,"tr");r=c.add(r,"td",{colspan:l.grid_width,"class":"mceMoreColors"});r=c.add(r,"a",{id:g.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},l.more_colors_title);e.add(r,"click",function(o){l.more_colors_func.call(l.more_colors_scope||this);return e.cancel(o)})}c.addClass(j,"mceColorSplitMenu");e.add(g.id+"_menu","click",function(o){var n;o=o.target;
if(o.nodeName=="A"&&(n=o.getAttribute("_mce_color")))g.setColor(n);return e.cancel(o)});return p},setColor:function(g){var j=this;c.setStyle(j.id+"_preview","backgroundColor",g);j.value=g;j.hideMenu();j.settings.onselect(g)},postRender:function(){var g=this,j=g.id;g.parent();c.add(j+"_action","div",{id:j+"_preview","class":"mceColorPreview"});c.setStyle(g.id+"_preview","backgroundColor",g.value)},destroy:function(){this.parent();e.clear(this.id+"_menu");e.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);
tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var a=this,c="",e,f,d=tinymce.DOM,g=a.settings,j,k,l,r;r=a.controls;for(j=0;j<r.length;j++){f=r[j];k=r[j-1];l=r[j+1];if(j===0){e="mceToolbarStart";if(f.Button)e+=" mceToolbarStartButton";else if(f.SplitButton)e+=" mceToolbarStartSplitButton";else if(f.ListBox)e+=" mceToolbarStartListBox";c+=d.createHTML("td",{"class":e},d.createHTML("span",null,"<!-- IE --\>"))}if(k&&f.ListBox)if(k.Button||k.SplitButton)c+=d.createHTML("td",
{"class":"mceToolbarEnd"},d.createHTML("span",null,"<!-- IE --\>"));c+=d.stdMode?'<td style="position: relative">'+f.renderHTML()+"</td>":"<td>"+f.renderHTML()+"</td>";if(l&&f.ListBox)if(l.Button||l.SplitButton)c+=d.createHTML("td",{"class":"mceToolbarStart"},d.createHTML("span",null,"<!-- IE --\>"))}e="mceToolbarEnd";if(f.Button)e+=" mceToolbarEndButton";else if(f.SplitButton)e+=" mceToolbarEndSplitButton";else if(f.ListBox)e+=" mceToolbarEndListBox";c+=d.createHTML("td",{"class":e},d.createHTML("span",
null,"<!-- IE --\>"));return d.createHTML("table",{id:a.id,"class":"mceToolbar"+(g["class"]?" "+g["class"]:""),cellpadding:"0",cellspacing:"0",align:a.settings.align||""},"<tbody><tr>"+c+"</tr></tbody>")}});
(function(a){a.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new a.util.Dispatcher(this),get:function(c){return this.lookup[c]},requireLangPack:function(c){var e=a.settings;e&&e.language&&a.ScriptLoader.add(this.urls[c]+"/langs/"+e.language+".js")},add:function(c,e){this.items.push(e);this.lookup[c]=e;this.onAdd.dispatch(this,c,e);return e},load:function(c,e,f,d){var g=this;if(!g.urls[c]){if(e.indexOf("/")!=0&&e.indexOf("://")==-1)e=a.baseURL+"/"+e;g.urls[c]=e.substring(0,e.lastIndexOf("/"));
a.ScriptLoader.add(e,f,d)}}});a.PluginManager=new a.AddOnManager;a.ThemeManager=new a.AddOnManager})(tinymce);
(function(a){var c=a.each,e=a.extend,f=a.DOM,d=a.dom.Event,g=a.explode,j=a.util.Dispatcher,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 j(a);d.add(window,"beforeunload",function(l){a.onBeforeUnload.dispatch(a,l)});a.onAddEditor=new j(a);a.onRemoveEditor=new j(a);a.EditorManager=
e(a,{editors:[],i18n:{},activeEditor:null,init:function(l){function r(n,u,h){var s=n[u];if(s){if(a.is(s,"string")){h=(h=s.replace(/\.\w+$/,""))?a.resolve(h):0;s=a.resolve(s)}return s.apply(h||this,Array.prototype.slice.call(arguments,2))}}var t=this,q,p=[],o;l=e({theme:"simple",language:"en"},l);t.settings=l;d.add(document,"init",function(){var n,u;r(l,"onpageload");switch(l.mode){case "exact":n=l.elements||"";n.length>0&&c(g(n),function(s){if(f.get(s)){o=new a.Editor(s,l);p.push(o);o.render(1)}else c(document.forms,
function(v){c(v.elements,function(y){if(y.name===s){s="mce_editor_"+k++;f.setAttrib(y,"id",s);o=new a.Editor(s,l);p.push(o);o.render(1)}})})});break;case "textareas":case "specific_textareas":function h(s,v){return v.constructor===RegExp?v.test(s.className):f.hasClass(s,v)}c(f.select("textarea"),function(s){if(!(l.editor_deselector&&h(s,l.editor_deselector)))if(!l.editor_selector||h(s,l.editor_selector)){q=f.get(s.name);if(!s.id&&!q)s.id=s.name;if(!s.id||t.get(s.id))s.id=f.uniqueId();o=new a.Editor(s.id,
l);p.push(o);o.render(1)}});break}if(l.oninit){n=u=0;c(p,function(s){u++;if(s.initialized)n++;else s.onInit.add(function(){n++;n==u&&r(l,"oninit")});n==u&&r(l,"oninit")})}})},get:function(l){if(l===void 0)return this.editors;return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(l){var r=this,t=r.editors;t[l.id]=l;t.push(l);r._setActive(l);r.onAddEditor.dispatch(r,l);return l},remove:function(l){var r=this,t,q=r.editors;if(!q[l.id])return null;delete q[l.id];for(t=0;t<
q.length;t++)if(q[t]==l){q.splice(t,1);break}r.activeEditor==l&&r._setActive(q[0]);l.destroy();r.onRemoveEditor.dispatch(r,l);return l},execCommand:function(l,r,t){var q=this,p=q.get(t),o;switch(l){case "mceFocus":p.focus();return true;case "mceAddEditor":case "mceAddControl":q.get(t)||(new a.Editor(t,q.settings)).render();return true;case "mceAddFrameControl":o=t.window;o.tinyMCE=tinyMCE;o.tinymce=a;a.DOM.doc=o.document;a.DOM.win=o;p=new a.Editor(t.element_id,t);p.render();if(a.isIE){function n(){p.destroy();
o.detachEvent("onunload",n);o=o.tinyMCE=o.tinymce=null}o.attachEvent("onunload",n)}t.page_window=null;return true;case "mceRemoveEditor":case "mceRemoveControl":p&&p.remove();return true;case "mceToggleEditor":if(!p){q.execCommand("mceAddControl",0,t);return true}p.isHidden()?p.show():p.hide();return true}if(q.activeEditor)return q.activeEditor.execCommand(l,r,t);return false},execInstanceCommand:function(l,r,t,q){if(l=this.get(l))return l.execCommand(r,t,q);return false},triggerSave:function(){c(this.editors,
function(l){l.save()})},addI18n:function(l,r){var t=this.i18n;a.is(l,"string")?c(r,function(q,p){t[l+"."+p]=q}):c(l,function(q,p){c(q,function(o,n){c(o,function(u,h){if(n==="common")t[p+"."+h]=u;else t[p+"."+n+"."+h]=u})})})},_setActive:function(l){this.selectedInstance=this.activeEditor=l}})})(tinymce);
(function(a){var c=a.DOM,e=a.dom.Event,f=a.extend,d=a.util.Dispatcher,g=a.each,j=a.isGecko,k=a.isIE,l=a.is,r=a.ThemeManager,t=a.PluginManager,q=a.explode;a.create("tinymce.Editor",{Editor:function(p,o){var n=this;n.id=n.editorId=p;n.execCommands={};n.queryStateCommands={};n.queryValueCommands={};n.isNotDirty=false;n.plugins={};g(["onPreInit","onBeforeRenderUI","onPostRender","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"],function(u){n[u]=new d(n)});n.settings=o=f({id:p,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",
apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value|tabindex|accesskey],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big",
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:true},o);n.documentBaseURI=new a.util.URI(o.document_base_url||a.documentBaseURL,{base_uri:tinyMCE.baseURI});n.baseURI=a.baseURI;n.execCallback("setup",n)},render:function(){function p(){n.language&&h.add(a.baseURL+"/langs/"+n.language+".js");n.theme&&n.theme.charAt(0)!="-"&&!r.urls[n.theme]&&r.load(n.theme,"themes/"+n.theme+"/editor_template"+
a.suffix+".js");g(q(n.plugins),function(s){s&&s.charAt(0)!="-"&&!t.urls[s]&&s!="safari"&&t.load(s,"plugins/"+s+"/editor_plugin"+a.suffix+".js")});h.loadQueue(function(){o.removed||o.init()})}var o=this,n=o.settings,u=o.id,h=a.ScriptLoader;if(e.domLoaded){tinyMCE.settings=n;if(o.getElement())if(!a.isIDevice){!/TEXTAREA|INPUT/i.test(o.getElement().nodeName)&&n.hidden_input&&c.getParent(u,"form")&&c.insertAfter(c.create("input",{type:"hidden",name:u}),u);if(a.WindowManager)o.windowManager=new a.WindowManager(o);
n.encoding=="xml"&&o.onGetContent.add(function(s,v){if(v.save)v.content=c.encode(v.content)});n.add_form_submit_trigger&&o.onSubmit.addToTop(function(){if(o.initialized){o.save();o.isNotDirty=1}});if(n.add_unload_trigger)o._beforeUnload=tinyMCE.onBeforeUnload.add(function(){o.initialized&&!o.destroyed&&!o.isHidden()&&o.save({format:"raw",no_events:true})});a.addUnload(o.destroy,o);n.submit_patch&&o.onBeforeRenderUI.add(function(){var s=o.getElement().form;if(s)if(!s._mceOldSubmit){if(!s.submit.nodeType&&
!s.submit.length){o.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){a.triggerSave();o.isNotDirty=1;return o.formElement._mceOldSubmit(o.formElement)}}s=null}});p()}}else e.add(document,"init",function(){o.render()})},init:function(){var p,o=this,n=o.settings,u,h=o.getElement(),s,v,y;a.add(o);if(n.theme){n.theme=n.theme.replace(/-/,"");s=r.get(n.theme);o.theme=new s;if(o.theme.init&&n.init_theme)o.theme.init(o,r.urls[n.theme]||a.documentBaseURL.replace(/\/$/,""))}g(q(n.plugins.replace(/\-/g,
"")),function(z){var C=t.get(z),G=t.urls[z]||a.documentBaseURL.replace(/\/$/,"");if(C){C=new C(o,G);o.plugins[z]=C;C.init&&C.init(o,G)}});if(n.popup_css!==false)n.popup_css=n.popup_css?o.documentBaseURI.toAbsolute(n.popup_css):o.baseURI.toAbsolute("themes/"+n.theme+"/skins/"+n.skin+"/dialog.css");if(n.popup_css_add)n.popup_css+=","+o.documentBaseURI.toAbsolute(n.popup_css_add);o.controlManager=new a.ControlManager(o);if(n.custom_undo_redo){o.onBeforeExecCommand.add(function(z,C,G,I,Y){if(C!="Undo"&&
C!="Redo"&&C!="mceRepaint"&&(!Y||!Y.skip_undo))o.undoManager.hasUndo()||o.undoManager.add()});o.onExecCommand.add(function(z,C,G,I,Y){if(C!="Undo"&&C!="Redo"&&C!="mceRepaint"&&(!Y||!Y.skip_undo))o.undoManager.add()})}o.onExecCommand.add(function(z,C){/^(FontName|FontSize)$/.test(C)||o.nodeChanged()});if(j){function B(z,C){if(!C||!C.initial)o.execCommand("mceRepaint")}o.onUndo.add(B);o.onRedo.add(B);o.onSetContent.add(B)}o.onBeforeRenderUI.dispatch(o,o.controlManager);if(n.render_ui){u=n.width||h.style.width||
h.offsetWidth;p=n.height||h.style.height||h.offsetHeight;o.orgDisplay=h.style.display;y=/^[0-9\.]+(|px)$/i;if(y.test(""+u))u=Math.max(parseInt(u)+(s.deltaWidth||0),100);if(y.test(""+p))p=Math.max(parseInt(p)+(s.deltaHeight||0),100);s=o.theme.renderUI({targetNode:h,width:u,height:p,deltaWidth:n.delta_width,deltaHeight:n.delta_height});o.editorContainer=s.editorContainer}if(document.domain&&location.hostname!=document.domain)a.relaxedDomain=document.domain;c.setStyles(s.sizeContainer||s.editorContainer,
{width:u,height:p});p=(s.iframeHeight||p)+(typeof p=="number"?s.deltaHeight||0:"");if(p<100)p=100;o.iframeHTML=n.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(n.document_base_url!=a.documentBaseURL)o.iframeHTML+='<base href="'+o.documentBaseURI.getURI()+'" />';o.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';if(a.relaxedDomain)o.iframeHTML+='<script type="text/javascript">document.domain = "'+
a.relaxedDomain+'";<\/script>';u=n.body_id||"tinymce";if(u.indexOf("=")!=-1){u=o.getParam("body_id","","hash");u=u[o.id]||u}n=n.body_class||"";if(n.indexOf("=")!=-1){n=o.getParam("body_class","","hash");n=n[o.id]||""}o.iframeHTML+='</head><body id="'+u+'" class="mceContentBody '+n+'"></body></html>';if(a.relaxedDomain)if(k||a.isOpera&&parseFloat(opera.version())>=9.5)v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+o.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';
else if(a.isOpera)v='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';p=c.add(s.iframeContainer,"iframe",{id:o.id+"_ifr",src:v||'javascript:""',frameBorder:"0",style:{width:"100%",height:p}});o.contentAreaContainer=s.iframeContainer;c.get(s.editorContainer).style.display=o.orgDisplay;c.get(o.id).style.display="none";if(!k||!a.relaxedDomain)o.setupIframe();h=p=s=null},setupIframe:function(){var p=this,o=p.settings,n=c.get(p.id);n=
p.getDoc();var u;if(!k||!a.relaxedDomain){n.open();n.write(p.iframeHTML);n.close()}if(!k)try{if(!o.readonly)n.designMode="On"}catch(h){}if(k){u=p.getBody();c.hide(u);if(!o.readonly)u.contentEditable=true;c.show(u)}p.dom=new a.dom.DOMUtils(p.getDoc(),{keep_values:true,url_converter:p.convertURL,url_converter_scope:p,hex_colors:o.force_hex_style_colors,class_filter:o.class_filter,update_styles:1,fix_ie_paragraphs:1,valid_styles:o.valid_styles});p.schema=new a.dom.Schema;p.serializer=new a.dom.Serializer(f(o,
{valid_elements:o.verify_html===false?"*[*]":o.valid_elements,dom:p.dom,schema:p.schema}));p.selection=new a.dom.Selection(p.dom,p.getWin(),p.serializer);p.formatter=new a.Formatter(this);p.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},
{selector:"table",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",styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b"}],italic:[{inline:"em"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i"}],underline:[{inline:"span",styles:{textDecoration:"underline"},
exact:true},{inline:"u"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"u"}],forecolor:{inline:"span",styles:{color:"%value"}},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"}},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"},removeformat:[{selector:"b,strong,em,i,font,u,strike",
remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});g("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(B){p.formatter.register(B,{block:B,remove:"all"})});p.formatter.register(p.settings.formats);p.undoManager=new a.UndoManager(p);p.undoManager.onAdd.add(function(B,z){if(!z.initial)return p.onChange.dispatch(p,
z,B)});p.undoManager.onUndo.add(function(B,z){return p.onUndo.dispatch(p,z,B)});p.undoManager.onRedo.add(function(B,z){return p.onRedo.dispatch(p,z,B)});p.forceBlocks=new a.ForceBlocks(p,{forced_root_block:o.forced_root_block});p.editorCommands=new a.EditorCommands(p);p.serializer.onPreProcess.add(function(B,z){return p.onPreProcess.dispatch(p,z,B)});p.serializer.onPostProcess.add(function(B,z){return p.onPostProcess.dispatch(p,z,B)});p.onPreInit.dispatch(p);if(!o.gecko_spellcheck)p.getBody().spellcheck=
0;o.readonly||p._addEvents();p.controlManager.onPostRender.dispatch(p,p.controlManager);p.onPostRender.dispatch(p);if(o.directionality)p.getBody().dir=o.directionality;if(o.nowrap)p.getBody().style.whiteSpace="nowrap";if(o.custom_elements){function s(B,z){g(q(o.custom_elements),function(C){var G;if(C.indexOf("~")===0){C=C.substring(1);G="span"}else G="div";z.content=z.content.replace(new RegExp("<("+C+")([^>]*)>","g"),"<"+G+' _mce_name="$1"$2>');z.content=z.content.replace(new RegExp("</("+C+")>",
"g"),"</"+G+">")})}p.onBeforeSetContent.add(s);p.onPostProcess.add(function(B,z){z.set&&s(B,z)})}o.handle_node_change_callback&&p.onNodeChange.add(function(B,z,C){p.execCallback("handle_node_change_callback",p.id,C,-1,-1,true,p.selection.isCollapsed())});o.save_callback&&p.onSaveContent.add(function(B,z){if(B=p.execCallback("save_callback",p.id,z.content,p.getBody()))z.content=B});o.onchange_callback&&p.onChange.add(function(B,z){p.execCallback("onchange_callback",p,z)});o.convert_newlines_to_brs&&
p.onBeforeSetContent.add(function(B,z){if(z.initial)z.content=z.content.replace(/\r?\n/g,"<br />")});o.fix_nesting&&k&&p.onBeforeSetContent.add(function(B,z){z.content=p._fixNesting(z.content)});o.preformatted&&p.onPostProcess.add(function(B,z){z.content=z.content.replace(/^\s*<pre.*?>/,"");z.content=z.content.replace(/<\/pre>\s*$/,"");if(z.set)z.content='<pre class="mceItemHidden">'+z.content+"</pre>"});if(o.verify_css_classes)p.serializer.attribValueFilter=function(B,z){var C;if(B=="class"){if(!p.classesRE){B=
p.dom.getClasses();if(B.length>0){C="";g(B,function(G){C+=(C?"|":"")+G["class"]});p.classesRE=new RegExp("("+C+")","gi")}}return!p.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(z)||p.classesRE.test(z)?z:""}return z};if(o.cleanup_callback){p.onBeforeSetContent.add(function(B,z){z.content=p.execCallback("cleanup_callback","insert_to_editor",z.content,z)});p.onPreProcess.add(function(B,z){z.set&&p.execCallback("cleanup_callback","insert_to_editor_dom",z.node,z);z.get&&p.execCallback("cleanup_callback",
"get_from_editor_dom",z.node,z)});p.onPostProcess.add(function(B,z){if(z.set)z.content=p.execCallback("cleanup_callback","insert_to_editor",z.content,z);if(z.get)z.content=p.execCallback("cleanup_callback","get_from_editor",z.content,z)})}o.save_callback&&p.onGetContent.add(function(B,z){if(z.save)z.content=p.execCallback("save_callback",p.id,z.content,p.getBody())});o.handle_event_callback&&p.onEvent.add(function(B,z,C){p.execCallback("handle_event_callback",z,B,C)===false&&e.cancel(z)});p.onSetContent.add(function(){p.addVisual(p.getBody())});
o.padd_empty_editor&&p.onPostProcess.add(function(B,z){z.content=z.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")});if(j){function v(B){g(B.dom.select("a"),function(z){var C=z.parentNode;B.dom.isBlock(C)&&C.lastChild===z&&B.dom.add(C,"br",{_mce_bogus:1})})}p.onExecCommand.add(function(B,z){z==="CreateLink"&&v(B)});p.onSetContent.add(p.selection.onSetContent.add(v));if(!o.readonly)try{n.designMode="Off";n.designMode="On"}catch(y){}}setTimeout(function(){if(!p.removed){p.load({initial:true,
format:o.cleanup_on_startup?"html":"raw"});p.startContent=p.getContent({format:"raw"});p.initialized=true;p.onInit.dispatch(p);p.execCallback("setupcontent_callback",p.id,p.getBody(),p.getDoc());p.execCallback("init_instance_callback",p);p.focus(true);p.nodeChanged({initial:1});o.content_css&&a.each(q(o.content_css),function(B){p.dom.loadCSS(p.documentBaseURI.toAbsolute(B))});o.auto_focus&&setTimeout(function(){var B=a.get(o.auto_focus);B.selection.select(B.getBody(),1);B.selection.collapse(1);B.getWin().focus()},
100)}},1);n=null},focus:function(p){var o,n=this;o=n.settings.content_editable;var u;if(!p){p=n.selection.getRng();if(p.item)u=p.item(0);o||n.getWin().focus();if(u){p=n.getDoc().body.createControlRange();p.addElement(u);p.select()}}if(a.activeEditor!=n){if((o=a.activeEditor)!=null)o.onDeactivate.dispatch(o,n);n.onActivate.dispatch(n,o)}a._setActive(n)},execCallback:function(p){var o=this,n=o.settings[p],u;if(n){if(o.callbackLookup&&(u=o.callbackLookup[p])){n=u.func;u=u.scope}if(l(n,"string")){u=(u=
n.replace(/\.\w+$/,""))?a.resolve(u):0;n=a.resolve(n);o.callbackLookup=o.callbackLookup||{};o.callbackLookup[p]={func:n,scope:u}}return n.apply(u||o,Array.prototype.slice.call(arguments,1))}},translate:function(p){var o=this.settings.language||"en",n=a.i18n;if(!p)return"";return n[o+"."+p]||p.replace(/{\#([^}]+)\}/g,function(u,h){return n[o+"."+h]||"{#"+h+"}"})},getLang:function(p,o){return a.i18n[(this.settings.language||"en")+"."+p]||(l(o)?o:"{#"+p+"}")},getParam:function(p,o,n){var u=a.trim;p=
l(this.settings[p])?this.settings[p]:o;var h;if(n==="hash"){h={};if(l(p,"string"))g(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(s){s=s.split("=");if(s.length>1)h[u(s[0])]=u(s[1]);else h[u(s[0])]=u(s)});else h=p;return h}return p},nodeChanged:function(p){var o=this,n=o.selection,u=(k?n.getNode():n.getStart())||o.getBody();if(o.initialized){p=p||{};u=k&&u.ownerDocument!=o.getDoc()?o.getBody():u;p.parents=[];o.dom.getParent(u,function(h){if(h.nodeName=="BODY")return true;
p.parents.push(h)});o.onNodeChange.dispatch(o,p?p.controlManager||o.controlManager:o.controlManager,u,n.isCollapsed(),p)}},addButton:function(p,o){var n=this;n.buttons=n.buttons||{};n.buttons[p]=o},addCommand:function(p,o,n){this.execCommands[p]={func:o,scope:n||this}},addQueryStateHandler:function(p,o,n){this.queryStateCommands[p]={func:o,scope:n||this}},addQueryValueHandler:function(p,o,n){this.queryValueCommands[p]={func:o,scope:n||this}},addShortcut:function(p,o,n,u){var h=this,s;if(!h.settings.custom_shortcuts)return false;
h.shortcuts=h.shortcuts||{};if(l(n,"string")){s=n;n=function(){h.execCommand(s,false,null)}}if(l(n,"object")){s=n;n=function(){h.execCommand(s[0],s[1],s[2])}}g(q(p),function(v){var y={func:n,scope:u||this,desc:o,alt:false,ctrl:false,shift:false};g(q(v,"+"),function(B){switch(B){case "alt":case "ctrl":case "shift":y[B]=true;break;default:y.charCode=B.charCodeAt(0);y.keyCode=B.toUpperCase().charCodeAt(0)}});h.shortcuts[(y.ctrl?"ctrl":"")+","+(y.alt?"alt":"")+","+(y.shift?"shift":"")+","+y.keyCode]=
y});return true},execCommand:function(p,o,n,u){var h=this,s=0,v;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(p)&&(!u||!u.skip_focus))h.focus();v={};h.onBeforeExecCommand.dispatch(h,p,o,n,v);if(v.terminate)return false;if(h.execCallback("execcommand_callback",h.id,h.selection.getNode(),p,o,n)){h.onExecCommand.dispatch(h,p,o,n,u);return true}if(v=h.execCommands[p]){v=v.func.call(v.scope,o,n);if(v!==true){h.onExecCommand.dispatch(h,p,o,n,u);return v}}g(h.plugins,
function(y){if(y.execCommand&&y.execCommand(p,o,n)){h.onExecCommand.dispatch(h,p,o,n,u);s=1;return false}});if(s)return true;if(h.theme&&h.theme.execCommand&&h.theme.execCommand(p,o,n)){h.onExecCommand.dispatch(h,p,o,n,u);return true}if(a.GlobalCommands.execCommand(h,p,o,n)){h.onExecCommand.dispatch(h,p,o,n,u);return true}if(h.editorCommands.execCommand(p,o,n)){h.onExecCommand.dispatch(h,p,o,n,u);return true}h.getDoc().execCommand(p,o,n);h.onExecCommand.dispatch(h,p,o,n,u)},queryCommandState:function(p){var o=
this,n;if(!o._isHidden()){if(n=o.queryStateCommands[p]){n=n.func.call(n.scope);if(n!==true)return n}n=o.editorCommands.queryCommandState(p);if(n!==-1)return n;try{return this.getDoc().queryCommandState(p)}catch(u){}}},queryCommandValue:function(p){var o=this,n;if(!o._isHidden()){if(n=o.queryValueCommands[p]){n=n.func.call(n.scope);if(n!==true)return n}n=o.editorCommands.queryCommandValue(p);if(l(n))return n;try{return this.getDoc().queryCommandValue(p)}catch(u){}}},show:function(){var p=this;c.show(p.getContainer());
c.hide(p.id);p.load()},hide:function(){var p=this,o=p.getDoc();k&&o&&o.execCommand("SelectAll");p.save();c.hide(p.getContainer());c.setStyle(p.id,"display",p.orgDisplay)},isHidden:function(){return!c.isHidden(this.id)},setProgressState:function(p,o,n){this.onSetProgressState.dispatch(this,p,o,n);return p},load:function(p){var o=this,n=o.getElement(),u;if(n){p=p||{};p.load=true;u=o.setContent(l(n.value)?n.value:n.innerHTML,p);p.element=n;p.no_events||o.onLoadContent.dispatch(o,p);p.element=null;return u}},
save:function(p){var o=this,n=o.getElement(),u;if(n&&o.initialized){p=p||{};p.save=true;if(!p.no_events){o.undoManager.typing=0;o.undoManager.add()}p.element=n;u=p.content=o.getContent(p);p.no_events||o.onSaveContent.dispatch(o,p);u=p.content;if(/TEXTAREA|INPUT/i.test(n.nodeName))n.value=u;else{n.innerHTML=u;if(n=c.getParent(o.id,"form"))g(n.elements,function(h){if(h.name==o.id){h.value=u;return false}})}p.element=n=null;return u}},setContent:function(p,o){var n=this;o=o||{};o.format=o.format||"html";
o.set=true;o.content=p;o.no_events||n.onBeforeSetContent.dispatch(n,o);if(!a.isIE&&(p.length===0||/^\s+$/.test(p))){o.content=n.dom.setHTML(n.getBody(),'<br _mce_bogus="1" />');o.format="raw"}o.content=n.dom.setHTML(n.getBody(),a.trim(o.content));if(o.format!="raw"&&n.settings.cleanup){o.getInner=true;o.content=n.dom.setHTML(n.getBody(),n.serializer.serialize(n.getBody(),o))}o.no_events||n.onSetContent.dispatch(n,o);return o.content},getContent:function(p){var o=this,n;p=p||{};p.format=p.format||
"html";p.get=true;p.no_events||o.onBeforeGetContent.dispatch(o,p);if(p.format!="raw"&&o.settings.cleanup){p.getInner=true;n=o.serializer.serialize(o.getBody(),p)}else n=o.getBody().innerHTML;n=n.replace(/^\s*|\s*$/g,"");p.content=n;p.no_events||o.onGetContent.dispatch(o,p);return p.content},isDirty:function(){var p=this;return a.trim(p.startContent)!=a.trim(p.getContent({format:"raw",no_events:1}))&&!p.isNotDirty},getContainer:function(){var p=this;if(!p.container)p.container=c.get(p.editorContainer||
p.id+"_parent");return p.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return c.get(this.settings.content_element||this.id)},getWin:function(){var p=this,o;if(!p.contentWindow)if(o=c.get(p.id+"_ifr"))p.contentWindow=o.contentWindow;return p.contentWindow},getDoc:function(){var p=this,o;if(!p.contentDocument)if(o=p.getWin())p.contentDocument=o.document;return p.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(p,
o,n){var u=this,h=u.settings;if(h.urlconverter_callback)return u.execCallback("urlconverter_callback",p,n,true,o);if(!h.convert_urls||n&&n.nodeName=="LINK"||p.indexOf("file:")===0)return p;if(h.relative_urls)return u.documentBaseURI.toRelative(p);return u.documentBaseURI.toAbsolute(p,h.remove_script_host)},addVisual:function(p){var o=this,n=o.settings;p=p||o.getBody();if(!l(o.hasVisual))o.hasVisual=n.visual;g(o.dom.select("table,a",p),function(u){var h;switch(u.nodeName){case "TABLE":h=o.dom.getAttrib(u,
"border");if(!h||h=="0")o.hasVisual?o.dom.addClass(u,n.visual_table_class):o.dom.removeClass(u,n.visual_table_class);return;case "A":if(o.dom.getAttrib(u,"name"))o.hasVisual?o.dom.addClass(u,"mceItemAnchor"):o.dom.removeClass(u,"mceItemAnchor");return}});o.onVisualAid.dispatch(o,p,o.hasVisual)},remove:function(){var p=this,o=p.getContainer();p.removed=1;p.hide();p.execCallback("remove_instance_callback",p);p.onRemove.dispatch(p);p.onExecCommand.listeners=[];a.remove(p);c.remove(o)},destroy:function(p){var o=
this;if(!o.destroyed){if(!p){a.removeUnload(o.destroy);tinyMCE.onBeforeUnload.remove(o._beforeUnload);o.theme&&o.theme.destroy&&o.theme.destroy();o.controlManager.destroy();o.selection.destroy();o.dom.destroy();if(!o.settings.content_editable){e.clear(o.getWin());e.clear(o.getDoc())}e.clear(o.getBody());e.clear(o.formElement)}if(o.formElement){o.formElement.submit=o.formElement._mceOldSubmit;o.formElement._mceOldSubmit=null}o.contentAreaContainer=o.formElement=o.container=o.settings.content_element=
o.bodyElement=o.contentDocument=o.contentWindow=null;if(o.selection)o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null;o.destroyed=1}},_addEvents:function(){function p(B,z){if(!o.removed)if(o.onEvent.dispatch(o,B,z)!==false)o[h[B.fakeType||B.type]].dispatch(o,B,z)}var o=this,n,u=o.settings,h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",
paste:"onPaste"};g(h,function(B,z){switch(z){case "contextmenu":a.isOpera?o.dom.bind(o.getBody(),"mousedown",function(C){if(C.ctrlKey){C.fakeType="contextmenu";p(C)}}):o.dom.bind(o.getBody(),z,p);break;case "paste":o.dom.bind(o.getBody(),z,function(C){p(C)});break;case "submit":case "reset":o.dom.bind(o.getElement().form||c.getParent(o.id,"form"),z,p);break;default:o.dom.bind(u.content_editable?o.getBody():o.getDoc(),z,p)}});o.dom.bind(u.content_editable?o.getBody():j?o.getDoc():o.getWin(),"focus",
function(){o.focus(true)});a.isGecko&&o.dom.bind(o.getDoc(),"DOMNodeInserted",function(B){var z;B=B.target;if(B.nodeType===1&&B.nodeName==="IMG"&&(z=B.getAttribute("_mce_src")))B.src=o.documentBaseURI.toAbsolute(z)});if(j){function s(){var B=this,z=B.getDoc(),C=B.settings;if(j&&!C.readonly){if(B._isHidden())try{if(!C.content_editable)z.designMode="On"}catch(G){}try{z.execCommand("styleWithCSS",0,false)}catch(I){if(!B._isHidden())try{z.execCommand("useCSS",0,true)}catch(Y){}}if(!C.table_inline_editing)try{z.execCommand("enableInlineTableEditing",
false,false)}catch(Q){}if(!C.object_resizing)try{z.execCommand("enableObjectResizing",false,false)}catch(K){}}}o.onBeforeExecCommand.add(s);o.onMouseDown.add(s)}a.isWebKit&&o.onClick.add(function(B,z){z=z.target;if(z.nodeName=="IMG"||z.nodeName=="A"&&o.dom.hasClass(z,"mceItemAnchor"))o.selection.getSel().setBaseAndExtent(z,0,z,1)});o.onMouseUp.add(o.nodeChanged);o.onClick.add(o.nodeChanged);o.onKeyUp.add(function(B,z){B=z.keyCode;if(B>=33&&B<=36||B>=37&&B<=40||B==13||B==45||B==46||B==8||a.isMac&&
(B==91||B==93)||z.ctrlKey)o.nodeChanged()});o.onReset.add(function(){o.setContent(o.startContent,{format:"raw"})});if(u.custom_shortcuts){if(u.custom_undo_redo_keyboard_shortcuts){o.addShortcut("ctrl+z",o.getLang("undo_desc"),"Undo");o.addShortcut("ctrl+y",o.getLang("redo_desc"),"Redo")}o.addShortcut("ctrl+b",o.getLang("bold_desc"),"Bold");o.addShortcut("ctrl+i",o.getLang("italic_desc"),"Italic");o.addShortcut("ctrl+u",o.getLang("underline_desc"),"Underline");for(n=1;n<=6;n++)o.addShortcut("ctrl+"+
n,"",["FormatBlock",false,"h"+n]);o.addShortcut("ctrl+7","",["FormatBlock",false,"<p>"]);o.addShortcut("ctrl+8","",["FormatBlock",false,"<div>"]);o.addShortcut("ctrl+9","",["FormatBlock",false,"<address>"]);function v(B){var z=null;if(!B.altKey&&!B.ctrlKey&&!B.metaKey)return z;g(o.shortcuts,function(C){if(!(a.isMac&&C.ctrl!=B.metaKey))if(!(!a.isMac&&C.ctrl!=B.ctrlKey))if(C.alt==B.altKey)if(C.shift==B.shiftKey)if(B.keyCode==C.keyCode||B.charCode&&B.charCode==C.charCode){z=C;return false}});return z}
o.onKeyUp.add(function(B,z){if(v(z))return e.cancel(z)});o.onKeyPress.add(function(B,z){if(v(z))return e.cancel(z)});o.onKeyDown.add(function(B,z){if(B=v(z)){B.func.call(B.scope);return e.cancel(z)}})}if(a.isIE){o.dom.bind(o.getDoc(),"controlselect",function(B){var z=o.resizeInfo;B=B.target;if(B.nodeName==="IMG"){z&&o.dom.unbind(z.node,z.ev,z.cb);if(o.dom.hasClass(B,"mceItemNoResize")){ev="resizestart";z=o.dom.bind(B,"resizestart",e.cancel,e)}else{ev="resizeend";z=o.dom.bind(B,ev,function(C){var G;
C=C.target;if(G=o.dom.getStyle(C,"width")){o.dom.setAttrib(C,"width",G.replace(/[^0-9%]+/g,""));o.dom.setStyle(C,"width","")}if(G=o.dom.getStyle(C,"height")){o.dom.setAttrib(C,"height",G.replace(/[^0-9%]+/g,""));o.dom.setStyle(C,"height","")}})}z=o.resizeInfo={node:B,ev:ev,cb:z}}});o.onKeyDown.add(function(B,z){switch(z.keyCode){case 8:if(o.selection.getRng().item){B.dom.remove(o.selection.getRng().item(0));return e.cancel(z)}}})}a.isOpera&&o.onClick.add(function(B,z){e.prevent(z)});if(u.custom_undo_redo){function y(){o.undoManager.typing=
0;o.undoManager.add()}o.dom.bind(o.getDoc(),"focusout",function(){!o.removed&&o.undoManager.typing&&y()});o.onKeyUp.add(function(B,z){if(z.keyCode>=33&&z.keyCode<=36||z.keyCode>=37&&z.keyCode<=40||z.keyCode==13||z.keyCode==45||z.ctrlKey)y()});o.onKeyDown.add(function(B,z){if(z.keyCode>=33&&z.keyCode<=36||z.keyCode>=37&&z.keyCode<=40||z.keyCode==13||z.keyCode==45)o.undoManager.typing&&y();else if(!o.undoManager.typing){o.undoManager.add();o.undoManager.typing=1}});o.onMouseDown.add(function(){o.undoManager.typing&&
y()})}},_isHidden:function(){var p;if(!j)return 0;p=this.selection.getSel();return!p||!p.rangeCount||p.rangeCount==0},_fixNesting:function(p){var o=[],n;p=p.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(u,h,s){if(h==="/"){if(!o.length)return"";if(s!==o[o.length-1].tag){for(n=o.length-1;n>=0;n--)if(o[n].tag===s){o[n].close=1;break}return""}else{o.pop();if(o.length&&o[o.length-1].close){u=u+"</"+o[o.length-1].tag+">";o.pop()}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(s))return u;if(/\/>$/.test(u))return u;
o.push({tag:s})}return u});for(n=o.length-1;n>=0;n--)p+="</"+o[n].tag+">";return p}})})(tinymce);
(function(a){var c=a.each,e=true,f=false;a.EditorCommands=function(d){function g(y,B,z){var C;y=y.toLowerCase();if(C=h.exec[y]){C(y,B,z);return e}return f}function j(y){var B;y=y.toLowerCase();if(B=h.state[y])return B(y);return-1}function k(y){var B;y=y.toLowerCase();if(B=h.value[y])return B(y);return f}function l(y,B){B=B||"exec";c(y,function(z,C){c(C.toLowerCase().split(","),function(G){h[B][G]=z})})}function r(y,B,z){if(B===void 0)B=f;if(z===void 0)z=null;return d.getDoc().execCommand(y,B,z)}function t(y){return d.formatter.match(y)}
function q(y,B){d.formatter.toggle(y,B?{value:B}:void 0)}function p(y){v=u.getBookmark(y)}function o(){u.moveToBookmark(v)}var n=d.dom,u=d.selection,h={state:{},exec:{},value:{}},s=d.settings,v;a.extend(this,{execCommand:g,queryCommandState:j,queryCommandValue:k,addCommands:l});l({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){d.undoManager.add()},"Cut,Copy,Paste":function(y){var B=d.getDoc(),z;try{r(y)}catch(C){z=e}if(z||!B.queryCommandSupported(y))a.isGecko?
d.windowManager.confirm(d.getLang("clipboard_msg"),function(G){G&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):d.windowManager.alert(d.getLang("clipboard_no_support"))},unlink:function(y){u.isCollapsed()&&u.select(u.getNode());r(y);u.collapse(f)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(y){var B=y.substring(7);c("left,center,right,full".split(","),function(z){B!=z&&d.formatter.remove("align"+z)});q("align"+B)},"InsertUnorderedList,InsertOrderedList":function(y){var B;
r(y);if(y=n.getParent(u.getNode(),"ol,ul")){B=y.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(B.nodeName)){p();n.split(B,y);o()}}},"Bold,Italic,Underline,Strikethrough":function(y){q(y)},"ForeColor,HiliteColor,FontName":function(y,B,z){q(y,z)},FontSize:function(y,B,z){var C;if(z>=1&&z<=7){C=a.explode(s.font_size_style_values);z=(B=a.explode(s.font_size_classes))?B[z-1]||z:C[z-1]||z}q(y,z)},RemoveFormat:function(y){d.formatter.remove(y)},mceBlockQuote:function(){q("blockquote")},FormatBlock:function(y,
B,z){return q(z)},mceCleanup:function(){p();d.setContent(d.getContent({cleanup:e}),{cleanup:e});o()},mceRemoveNode:function(y,B,z){y=z||u.getNode();if(y!=d.getBody()){p();d.dom.remove(y,e);o()}},mceSelectNodeDepth:function(y,B,z){var C=0;n.getParent(u.getNode(),function(G){if(G.nodeType==1&&C++==z){u.select(G);return f}},d.getBody())},mceSelectNode:function(y,B,z){u.select(z)},mceInsertContent:function(y,B,z){u.setContent(z)},mceInsertRawHTML:function(y,B,z){u.setContent("tiny_mce_marker");d.setContent(d.getContent().replace(/tiny_mce_marker/g,
z))},mceSetContent:function(y,B,z){d.setContent(z)},"Indent,Outdent":function(y){var B,z,C;B=s.indentation;z=/[a-z%]+$/i.exec(B);B=parseInt(B);!j("InsertUnorderedList")&&!j("InsertOrderedList")?c(u.getSelectedBlocks(),function(G){if(y=="outdent"){C=Math.max(0,parseInt(G.style.paddingLeft||0)-B);n.setStyle(G,"paddingLeft",C?C+z:"")}else n.setStyle(G,"paddingLeft",parseInt(G.style.paddingLeft||0)+B+z)}):r(y)},mceRepaint:function(){if(a.isGecko)try{p(e);u.getSel()&&u.getSel().selectAllChildren(d.getBody());
u.collapse(e);o()}catch(y){}},mceToggleFormat:function(y,B,z){d.formatter.toggle(z)},InsertHorizontalRule:function(){u.setContent("<hr />")},mceToggleVisualAid:function(){d.hasVisual=!d.hasVisual;d.addVisual()},mceReplaceContent:function(y,B,z){u.setContent(z.replace(/\{\$selection\}/g,u.getContent({format:"text"})))},mceInsertLink:function(y,B,z){y=n.getParent(u.getNode(),"a");if(a.is(z,"string"))z={href:z};if(y)z.href?n.setAttribs(y,z):d.dom.remove(y,e);else{r("CreateLink",f,"javascript:mctmp(0);");
c(n.select("a[href=javascript:mctmp(0);]"),function(C){n.setAttribs(C,z)})}}});l({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(y){return t("align"+y.substring(7))},"Bold,Italic,Underline,Strikethrough":function(y){return t(y)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var y;if(s.inline_styles){if((y=n.getParent(u.getStart(),n.isBlock))&&parseInt(y.style.paddingLeft)>0)return e;if((y=n.getParent(u.getEnd(),n.isBlock))&&parseInt(y.style.paddingLeft)>0)return e}return j("InsertUnorderedList")||
j("InsertOrderedList")||!s.inline_styles&&!!n.getParent(u.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(y){return n.getParent(u.getNode(),y=="insertunorderedlist"?"UL":"OL")}},"state");l({"FontSize,FontName":function(y){var B=0,z;if(z=n.getParent(u.getNode(),"span"))B=y=="fontsize"?z.style.fontSize:z.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase();return B}},"value");s.custom_undo_redo&&l({Undo:function(){d.undoManager.undo()},Redo:function(){d.undoManager.redo()}})}})(tinymce);
(function(a){var c=a.util.Dispatcher;a.UndoManager=function(e){function f(){return a.trim(e.getContent({format:"raw",no_events:1}))}var d,g=0,j=[];return d={typing:0,onAdd:new c(d),onUndo:new c(d),onRedo:new c(d),add:function(k){var l;l=e.settings;var r;k=k||{};k.content=f();if((r=j[g])&&r.content==k.content)if(g>0||j.length==1)return null;if(l.custom_undo_redo_levels)if(j.length>l.custom_undo_redo_levels){for(l=0;l<j.length-1;l++)j[l]=j[l+1];j.length--;g=j.length}k.bookmark=e.selection.getBookmark(2,
true);if(g<j.length-1)if(g==0)j=[];else j.length=g+1;j.push(k);g=j.length-1;d.onAdd.dispatch(d,k);e.isNotDirty=0;return k},undo:function(){var k;if(d.typing){d.add();d.typing=0}if(g>0){k=j[--g];e.setContent(k.content,{format:"raw"});e.selection.moveToBookmark(k.bookmark);d.onUndo.dispatch(d,k)}return k},redo:function(){var k;if(g<j.length-1){k=j[++g];e.setContent(k.content,{format:"raw"});e.selection.moveToBookmark(k.bookmark);d.onRedo.dispatch(d,k)}return k},clear:function(){j=[];g=d.typing=0},hasUndo:function(){return g>
0||d.typing},hasRedo:function(){return g<j.length-1}}}})(tinymce);
(function(a){function c(q,p){var o=p.ownerDocument.createRange();o.setStart(q.endContainer,q.endOffset);o.setEndAfter(p);return o.cloneContents().textContent.length==0}function e(q){q=q.innerHTML;q=q.replace(/<(img|hr|table|input|select|textarea)[ \>]/gi,"-");q=q.replace(/<[^>]+>/g,"");return q.replace(/[ \u00a0\t\r\n]+/g,"")==""}function f(q,p,o){var n;if(e(o)){n=p.getParent(o,"ul,ol");if(!p.getParent(n.parentNode,"ul,ol")){p.split(n,o);n=p.create("p",0,'<br _mce_bogus="1" />');p.replace(n,o);q.select(n,
1)}return t}return r}var d=a.dom.Event,g=a.isIE,j=a.isGecko,k=a.isOpera,l=a.each,r=true,t=false;a.create("tinymce.ForceBlocks",{ForceBlocks:function(q){function p(h,s){if(k)s.content=s.content.replace(o.reOpera,"</"+u+">");s.content=s.content.replace(o.rePadd,"<"+u+"$1$2$3$4$5$6>\u00a0</"+u+">");if(!g&&!k&&s.set){s.content=s.content.replace(o.reNbsp2BR1,"<"+u+"$1$2><br /></"+u+">");s.content=s.content.replace(o.reNbsp2BR2,"<"+u+"$1$2><br /></"+u+">")}else s.content=s.content.replace(o.reBR2Nbsp,"<"+
u+"$1$2>\u00a0</"+u+">")}var o=this,n=q.settings,u;o.editor=q;o.dom=q.dom;u=(n.forced_root_block||"p").toLowerCase();n.element=u.toUpperCase();q.onPreInit.add(o.setup,o);o.reOpera=new RegExp("(\\u00a0|&#160;|&nbsp;)</"+u+">","gi");o.rePadd=new RegExp("<p( )([^>]+)><\\/p>|<p( )([^>]+)\\/>|<p( )([^>]+)>\\s+<\\/p>|<p><\\/p>|<p\\/>|<p>\\s+<\\/p>".replace(/p/g,u),"gi");o.reNbsp2BR1=new RegExp("<p( )([^>]+)>[\\s\\u00a0]+<\\/p>|<p>[\\s\\u00a0]+<\\/p>".replace(/p/g,u),"gi");o.reNbsp2BR2=new RegExp("<%p()([^>]+)>(&nbsp;|&#160;)<\\/%p>|<%p>(&nbsp;|&#160;)<\\/%p>".replace(/%p/g,
u),"gi");o.reBR2Nbsp=new RegExp("<p( )([^>]+)>\\s*<br \\/>\\s*<\\/p>|<p>\\s*<br \\/>\\s*<\\/p>".replace(/p/g,u),"gi");q.onBeforeSetContent.add(p);q.onPostProcess.add(p);if(n.forced_root_block){q.onInit.add(o.forceRoots,o);q.onSetContent.add(o.forceRoots,o);q.onBeforeGetContent.add(o.forceRoots,o)}},setup:function(){var q=this,p=q.editor,o=p.settings,n=p.dom,u=p.selection;if(o.forced_root_block){p.onBeforeExecCommand.add(q.forceRoots,q);p.onKeyUp.add(q.forceRoots,q);p.onPreProcess.add(q.forceRoots,
q)}o.force_br_newlines&&g&&p.onKeyPress.add(function(s,v){if(v.keyCode==13&&u.getNode().nodeName!="LI"){u.setContent('<br id="__" /> ',{format:"raw"});s=n.get("__");s.removeAttribute("id");u.select(s);u.collapse();return d.cancel(v)}});if(!g&&o.force_p_newlines){p.onKeyPress.add(function(s,v){v.keyCode==13&&!v.shiftKey&&!q.insertPara(v)&&d.cancel(v)});j&&p.onKeyDown.add(function(s,v){if((v.keyCode==8||v.keyCode==46)&&!v.shiftKey)q.backspaceDelete(v,v.keyCode==8)})}if(a.isWebKit){function h(s){var v=
u.getRng(),y,B=n.create("div",null," "),z=n.getViewPort(s.getWin()).h;v.insertNode(y=n.create("br"));v.setStartAfter(y);v.setEndAfter(y);u.setRng(v);if(u.getSel().focusNode==y.previousSibling){u.select(n.insertAfter(n.doc.createTextNode("\u00a0"),y));u.collapse(r)}n.insertAfter(B,y);v=n.getPos(B).y;n.remove(B);v>z&&s.getWin().scrollTo(0,v)}p.onKeyPress.add(function(s,v){if(v.keyCode==13&&(v.shiftKey||o.force_br_newlines&&!n.getParent(u.getNode(),"ol,ul"))){h(s);d.cancel(v)}})}p.onPreProcess.add(function(s,
v){l(n.select("p,h1,h2,h3,h4,h5,h6,div",v.node),function(y){e(y)&&l(n.select("span,em,strong,b,i",v.node),function(B){if(!B.hasChildNodes()){B.appendChild(s.getDoc().createTextNode("\u00a0"));return t}})})});if(g)if(o.element!="P"){p.onKeyPress.add(function(){q.lastElm=u.getNode().nodeName});p.onKeyUp.add(function(s,v){var y=u.getNode();if(s.getBody().childNodes.length===1&&y.nodeName=="P"){y=n.rename(y,o.element);u.select(y);u.collapse();s.nodeChanged()}else if(v.keyCode==13&&!v.shiftKey&&q.lastElm!=
"P")if(v=n.getParent(y,"p")){n.rename(v,o.element);s.nodeChanged()}})}},find:function(q,p,o){for(var n=this.editor.getDoc().createTreeWalker(q,4,null,t),u=-1;q=n.nextNode();){u++;if(p==0&&q==o)return u;if(p==1&&u==o)return q}return-1},forceRoots:function(q){var p=this;q=p.editor;var o=q.getBody(),n=q.getDoc(),u=q.selection,h=u.getSel(),s=u.getRng(),v=-2,y,B,z,C,G,I=o.childNodes,Y,Q,K;for(Y=I.length-1;Y>=0;Y--){G=I[Y];if(G.nodeType===1&&G.getAttribute("_mce_type"))C=null;else if(G.nodeType===3||!p.dom.isBlock(G)&&
G.nodeType!==8&&!/^(script|mce:script|style|mce:style)$/i.test(G.nodeName))if(C)C.hasChildNodes()?C.insertBefore(G,C.firstChild):C.appendChild(G);else{if(G.nodeType!=3||/[^\s]/g.test(G.nodeValue)){if(v==-2&&s)if(g){if(s.item){C=n.body.createTextRange();C.moveToElementText(s.item(0));s=C}C=n.body.createTextRange();C.moveToElementText(o);C.collapse(1);v=C.move("character",-16777215)*-1;C=s.duplicate();C.collapse(1);y=C.move("character",-16777215)*-1;C=s.duplicate();C.collapse(0);C=C.move("character",
-16777215)*-1-y;v=y-v;y=C}else if(s.startContainer.nodeType==1&&(Q=s.startContainer.childNodes[s.startOffset])&&Q.nodeType==1){K=Q.getAttribute("id");Q.setAttribute("id","__mce")}else if(q.dom.getParent(s.startContainer,function(F){return F===o})){B=s.startOffset;z=s.endOffset;v=p.find(o,0,s.startContainer);y=p.find(o,0,s.endContainer)}C=q.dom.create(q.settings.forced_root_block);G.parentNode.replaceChild(C,G);C.appendChild(G)}}else C=null}if(v!=-2)if(g)try{s=h.createRange();s.moveToElementText(o);
s.collapse(1);s.moveStart("character",v);s.moveEnd("character",y);s.select()}catch(W){}else{C=o.getElementsByTagName(q.settings.element)[0];s=n.createRange();v!=-1?s.setStart(p.find(o,1,v),B):s.setStart(C,0);y!=-1?s.setEnd(p.find(o,1,y),z):s.setEnd(C,0);if(h){h.removeAllRanges();h.addRange(s)}}else if(!g&&(Q=q.dom.get("__mce"))){K?Q.setAttribute("id",K):Q.removeAttribute("id");s=n.createRange();s.setStartBefore(Q);s.setEndBefore(Q);u.setRng(s)}},getParentBlock:function(q){var p=this.dom;return p.getParent(q,
p.isBlock)},insertPara:function(){function q(ua,ka){var ra=[],ma;ua.innerHTML="";if(s.keep_styles){ma=ka;do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(ma.nodeName)){ka=ma.cloneNode(t);u.setAttrib(ka,"id","");ra.push(ka)}while(ma=ma.parentNode)}if(ra.length>0){ma=ra.length-1;for(ka=ua;ma>=0;ma--)ka=ka.appendChild(ra[ma]);ra[0].innerHTML=k?"&nbsp;":"<br />";return ra[0]}else ua.innerHTML=k?"&nbsp;":"<br />"}function p(ua){return h.createTreeWalker(ua,NodeFilter.SHOW_TEXT,null,t).nextNode()||ua}
var o=this,n=o.editor,u=n.dom,h=n.getDoc(),s=n.settings,v=n.selection.getSel(),y=v.getRangeAt(0),B=h.body,z,C,G,I,Y,Q,K,W,F,N,J,L,ba=u.getViewPort(n.getWin()),aa;z=h.createRange();z.setStart(v.anchorNode,v.anchorOffset);z.collapse(r);C=h.createRange();C.setStart(v.focusNode,v.focusOffset);C.collapse(r);I=(G=z.compareBoundaryPoints(z.START_TO_END,C)<0)?v.anchorNode:v.focusNode;Y=G?v.anchorOffset:v.focusOffset;Q=G?v.focusNode:v.anchorNode;G=G?v.focusOffset:v.anchorOffset;if(I===Q&&/^(TD|TH)$/.test(I.nodeName)){I.firstChild.nodeName==
"BR"&&u.remove(I.firstChild);if(I.childNodes.length==0)n.dom.add(I,s.element,null,"<br />");else{L=I.innerHTML;I.innerHTML="";n.dom.add(I,s.element,null,L)}W=n.dom.add(I,s.element,null,"<br />");y=h.createRange();y.selectNodeContents(W);y.collapse(1);n.selection.setRng(y);return t}if(I==B&&Q==B&&B.firstChild&&n.dom.isBlock(B.firstChild)){I=Q=I.firstChild;Y=G=0;z=h.createRange();z.setStart(I,0);C=h.createRange();C.setStart(Q,0)}I=I.nodeName=="HTML"?h.body:I;I=I.nodeName=="BODY"?I.firstChild:I;Q=Q.nodeName==
"HTML"?h.body:Q;Q=Q.nodeName=="BODY"?Q.firstChild:Q;K=o.getParentBlock(I);W=o.getParentBlock(Q);F=K?K.nodeName:s.element;if(L=o.dom.getParent(K,"li,pre")){if(L.nodeName=="LI")return f(n.selection,o.dom,L);return r}if(K&&(K.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(u.getStyle(K,"position",1)))){F=s.element;K=null}if(W&&(W.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(u.getStyle(K,"position",1)))){F=s.element;W=null}if(/(TD|TABLE|TH|CAPTION)/.test(F)||K&&F=="DIV"&&/left|right/gi.test(u.getStyle(K,
"float",1))){F=s.element;K=W=null}N=K&&K.nodeName==F?K.cloneNode(0):n.dom.create(F);W=W&&W.nodeName==F?W.cloneNode(0):n.dom.create(F);W.removeAttribute("id");if(/^(H[1-6])$/.test(F)&&c(y,K))W=n.dom.create(s.element);L=K=I;do{if(L==B||L.nodeType==9||o.dom.isBlock(L)||/(TD|TABLE|TH|CAPTION)/.test(L.nodeName))break;K=L}while(L=L.previousSibling?L.previousSibling:L.parentNode);L=J=Q;do{if(L==B||L.nodeType==9||o.dom.isBlock(L)||/(TD|TABLE|TH|CAPTION)/.test(L.nodeName))break;J=L}while(L=L.nextSibling?L.nextSibling:
L.parentNode);K.nodeName==F?z.setStart(K,0):z.setStartBefore(K);z.setEnd(I,Y);N.appendChild(z.cloneContents()||h.createTextNode(""));try{C.setEndAfter(J)}catch(ca){}C.setStart(Q,G);W.appendChild(C.cloneContents()||h.createTextNode(""));y=h.createRange();if(!K.previousSibling&&K.parentNode.nodeName==F)y.setStartBefore(K.parentNode);else z.startContainer.nodeName==F&&z.startOffset==0?y.setStartBefore(z.startContainer):y.setStart(z.startContainer,z.startOffset);!J.nextSibling&&J.parentNode.nodeName==
F?y.setEndAfter(J.parentNode):y.setEnd(C.endContainer,C.endOffset);y.deleteContents();k&&n.getWin().scrollTo(0,ba.y);if(N.firstChild&&N.firstChild.nodeName==F)N.innerHTML=N.firstChild.innerHTML;if(W.firstChild&&W.firstChild.nodeName==F)W.innerHTML=W.firstChild.innerHTML;if(e(N))N.innerHTML="<br />";if(e(W))aa=q(W,Q);if(k&&parseFloat(opera.version())<9.5){y.insertNode(N);y.insertNode(W)}else{y.insertNode(W);y.insertNode(N)}W.normalize();N.normalize();y=h.createRange();y.selectNodeContents(j?p(aa||
W):aa||W);y.collapse(1);v.removeAllRanges();v.addRange(y);o=n.dom.getPos(W).y;v=W.clientHeight;if(o<ba.y||o+v>ba.y+ba.h)n.getWin().scrollTo(0,o<ba.y?o:o-ba.h+25);return t},backspaceDelete:function(q,p){function o(z){var C;if((z=z.target)&&z.parentNode&&z.nodeName=="BR"&&(s=n.getParentBlock(z))){C=z.previousSibling;d.remove(h,"DOMNodeInserted",o);if(!(C&&C.nodeType==3&&/\s+$/.test(C.nodeValue)))if(z.previousSibling||z.nextSibling)u.dom.remove(z)}}var n=this,u=n.editor,h=u.getBody(),s,v=u.selection,
y=v.getRng(),B=y.startContainer;if(B&&u.dom.isBlock(B)&&!/^(TD|TH)$/.test(B.nodeName)&&p)if(B.childNodes.length==0||B.childNodes.length==1&&B.firstChild.nodeName=="BR"){for(s=B;(s=s.previousSibling)&&!u.dom.isBlock(s););if(s){if(B!=h.firstChild){for(p=u.dom.doc.createTreeWalker(s,NodeFilter.SHOW_TEXT,null,t);y=p.nextNode();)s=y;y=u.getDoc().createRange();y.setStart(s,s.nodeValue?s.nodeValue.length:0);y.setEnd(s,s.nodeValue?s.nodeValue.length:0);v.setRng(y);u.dom.remove(B)}return d.cancel(q)}}d._add(h,
"DOMNodeInserted",o);window.setTimeout(function(){d._remove(h,"DOMNodeInserted",o)},1)}})})(tinymce);
(function(a){var c=a.dom.Event,e=a.each,f=a.extend;a.create("tinymce.ControlManager",{ControlManager:function(d,g){var j=this;g=g||{};j.editor=d;j.controls={};j.onAdd=new a.util.Dispatcher(j);j.onPostRender=new a.util.Dispatcher(j);j.prefix=g.prefix||d.id+"_";j._cls={};j.onPostRender.add(function(){e(j.controls,function(k){k.postRender()})})},get:function(d){return this.controls[this.prefix+d]||this.controls[d]},setActive:function(d,g){var j=null;if(j=this.get(d))j.setActive(g);return j},setDisabled:function(d,
g){var j=null;if(j=this.get(d))j.setDisabled(g);return j},add:function(d){var g=this;if(d){g.controls[d.id]=d;g.onAdd.dispatch(d,g)}return d},createControl:function(d){var g,j=this,k=j.editor;e(k.plugins,function(l){if(l.createControl)if(g=l.createControl(d,j))return false});switch(d){case "|":case "separator":return j.createSeparator()}if(!g&&k.buttons&&(g=k.buttons[d]))return j.createButton(d,g);return j.add(g)},createDropMenu:function(d,g,j){var k=this,l=k.editor,r,t,q;g=f({"class":"mceDropDown",
constrain:l.settings.constrain_menus},g);g["class"]=g["class"]+" "+l.getParam("skin")+"Skin";if(q=l.getParam("skin_variant"))g["class"]+=" "+l.getParam("skin")+"Skin"+q.substring(0,1).toUpperCase()+q.substring(1);d=k.prefix+d;r=k.controls[d]=new (j||k._cls.dropmenu||a.ui.DropMenu)(d,g);r.onAddItem.add(function(p,o){var n=o.settings;n.title=l.getLang(n.title,n.title);if(!n.onclick)n.onclick=function(){if(n.cmd)l.execCommand(n.cmd,n.ui||false,n.value)}});l.onRemove.add(function(){r.destroy()});if(a.isIE){r.onShowMenu.add(function(){l.focus();
t=l.selection.getBookmark(1)});r.onHideMenu.add(function(){if(t){l.selection.moveToBookmark(t);t=0}})}return k.add(r)},createListBox:function(d,g,j){var k=this,l=k.editor;if(k.get(d))return null;g.title=l.translate(g.title);g.scope=g.scope||l;if(!g.onselect)g.onselect=function(r){l.execCommand(g.cmd,g.ui||false,r||g.value)};g=f({title:g.title,"class":"mce_"+d,scope:g.scope,control_manager:k},g);d=k.prefix+d;if(l.settings.use_native_selects)j=new a.ui.NativeListBox(d,g);else{j=j||k._cls.listbox||a.ui.ListBox;
j=new j(d,g)}k.controls[d]=j;a.isWebKit&&j.onPostRender.add(function(r,t){c.add(t,"mousedown",function(){l.bookmark=l.selection.getBookmark(1)});c.add(t,"focus",function(){l.selection.moveToBookmark(l.bookmark);l.bookmark=null})});j.hideMenu&&l.onMouseDown.add(j.hideMenu,j);return k.add(j)},createButton:function(d,g,j){var k=this,l=k.editor;if(k.get(d))return null;g.title=l.translate(g.title);g.label=l.translate(g.label);g.scope=g.scope||l;if(!g.onclick&&!g.menu_button)g.onclick=function(){l.execCommand(g.cmd,
g.ui||false,g.value)};g=f({title:g.title,"class":"mce_"+d,unavailable_prefix:l.getLang("unavailable",""),scope:g.scope,control_manager:k},g);d=k.prefix+d;if(g.menu_button){j=j||k._cls.menubutton||a.ui.MenuButton;d=new j(d,g);l.onMouseDown.add(d.hideMenu,d)}else{j=k._cls.button||a.ui.Button;d=new j(d,g)}return k.add(d)},createMenuButton:function(d,g,j){g=g||{};g.menu_button=1;return this.createButton(d,g,j)},createSplitButton:function(d,g,j){var k=this,l=k.editor;if(k.get(d))return null;g.title=l.translate(g.title);
g.scope=g.scope||l;if(!g.onclick)g.onclick=function(r){l.execCommand(g.cmd,g.ui||false,r||g.value)};if(!g.onselect)g.onselect=function(r){l.execCommand(g.cmd,g.ui||false,r||g.value)};g=f({title:g.title,"class":"mce_"+d,scope:g.scope,control_manager:k},g);d=k.prefix+d;d=k.add(new (j||k._cls.splitbutton||a.ui.SplitButton)(d,g));l.onMouseDown.add(d.hideMenu,d);return d},createColorSplitButton:function(d,g,j){var k=this,l=k.editor,r,t;if(k.get(d))return null;g.title=l.translate(g.title);g.scope=g.scope||
l;if(!g.onclick)g.onclick=function(q){if(a.isIE)t=l.selection.getBookmark(1);l.execCommand(g.cmd,g.ui||false,q||g.value)};if(!g.onselect)g.onselect=function(q){l.execCommand(g.cmd,g.ui||false,q||g.value)};g=f({title:g.title,"class":"mce_"+d,menu_class:l.getParam("skin")+"Skin",scope:g.scope,more_colors_title:l.getLang("more_colors")},g);d=k.prefix+d;r=new (j||k._cls.colorsplitbutton||a.ui.ColorSplitButton)(d,g);l.onMouseDown.add(r.hideMenu,r);l.onRemove.add(function(){r.destroy()});if(a.isIE){r.onShowMenu.add(function(){l.focus();
t=l.selection.getBookmark(1)});r.onHideMenu.add(function(){if(t){l.selection.moveToBookmark(t);t=0}})}return k.add(r)},createToolbar:function(d,g,j){var k=this;d=k.prefix+d;g=new (j||k._cls.toolbar||a.ui.Toolbar)(d,g);if(k.get(d))return null;return k.add(g)},createSeparator:function(d){return new (d||this._cls.separator||a.ui.Separator)},setControlType:function(d,g){return this._cls[d.toLowerCase()]=g},destroy:function(){e(this.controls,function(d){d.destroy()});this.controls=null}})})(tinymce);
(function(a){var c=a.util.Dispatcher,e=a.each,f=a.isIE,d=a.isOpera;a.create("tinymce.WindowManager",{WindowManager:function(g){var j=this;j.editor=g;j.onOpen=new c(j);j.onClose=new c(j);j.params={};j.features={}},open:function(g,j){var k=this,l="",r=k.editor.settings.dialog_type=="modal",t,q,p;p=a.DOM.getViewPort();g=g||{};j=j||{};q=d?p.w:screen.width;p=d?p.h:screen.height;g.name=g.name||"mc_"+(new Date).getTime();g.width=parseInt(g.width||320);g.height=parseInt(g.height||240);g.resizable=true;g.left=
g.left||parseInt(q/2)-g.width/2;g.top=g.top||parseInt(p/2)-g.height/2;j.inline=false;j.mce_width=g.width;j.mce_height=g.height;j.mce_auto_focus=g.auto_focus;if(r)if(f){g.center=true;g.help=false;g.dialogWidth=g.width+"px";g.dialogHeight=g.height+"px";g.scroll=g.scrollbars||false}e(g,function(n,u){if(a.is(n,"boolean"))n=n?"yes":"no";/^(name|url)$/.test(u)||(l+=f&&r?(l?";":"")+u+":"+n:(l?",":"")+u+"="+n)});k.features=g;k.params=j;k.onOpen.dispatch(k,g,j);j=g.url||g.file;j=a._addVer(j);try{if(f&&r){t=
1;window.showModalDialog(j,window,l)}else t=window.open(j,g.name,l)}catch(o){}t||alert(k.editor.getLang("popup_blocked"))},close:function(g){g.close();this.onClose.dispatch(this)},createInstance:function(g,j,k,l,r,t){return new (a.resolve(g))(j,k,l,r,t)},confirm:function(g,j,k,l){l=l||window;j.call(k||this,l.confirm(this._decode(this.editor.getLang(g,g))))},alert:function(g,j,k,l){var r=this;l=l||window;l.alert(r._decode(r.editor.getLang(g,g)));if(j)j.call(k||r)},resizeBy:function(g,j,k){k.resizeBy(g,
j)},_decode:function(g){return a.DOM.decode(g).replace(/\\n/g,"\n")}})})(tinymce);
(function(a){function c(){function e(j,k,l,r){if(typeof k=="string")k=[k];a.each(k,function(t){j[t.toLowerCase()]={func:l,scope:r}})}var f={},d={},g={};a.extend(this,{add:function(j,k,l){e(f,j,k,l)},addQueryStateHandler:function(j,k,l){e(d,j,k,l)},addQueryValueHandler:function(j,k,l){e(g,j,k,l)},execCommand:function(j,k,l,r,t){if(k=f[k.toLowerCase()])if(k.func.call(j||k.scope,l,r,t)!==false)return true},queryCommandValue:function(){if(cmd=g[cmd.toLowerCase()])return cmd.func.call(scope||cmd.scope,
ui,value,args)},queryCommandState:function(){if(cmd=d[cmd.toLowerCase()])return cmd.func.call(scope||cmd.scope,ui,value,args)}})}a.GlobalCommands=new c})(tinymce);
(function(a){a.Formatter=function(c){function e(R,O){return N.getParents(R,O,N.getRoot())}function f(R){return R.nodeType===1&&(R.face==="mceinline"||R.style.fontFamily==="mceinline")}function d(R){return R?W[R]:W}function g(R,O){if(R)if(typeof R!=="string")F(R,function(H,P){g(P,H)});else{O=O.length?O:[O];F(O,function(H){if(H.deep===Da)H.deep=!H.selector;if(H.split===Da)H.split=!H.selector||H.inline;if(H.remove===Da&&H.selector&&!H.inline)H.remove="none";if(H.selector&&H.inline){H.mixed=true;H.block_expand=
true}if(typeof H.classes==="string")H.classes=H.classes.split(/\s+/)});W[R]=O}}function j(R,O,H){function P(ta){var qa=ta.startContainer,va=ta.startOffset;if(qa.nodeType==1||qa.nodeValue===""){qa=qa.nodeType==1?qa.childNodes[va]:qa;qa=new L(qa,qa.parentNode);for(va=qa.current();va;va=qa.next())if(va.nodeType==3&&!ca(va.parentNode)&&!s(va)){ta.setStart(va,0);break}}return ta}function S(ta,qa){qa=qa||ea;if(ta){F(qa.styles,function(va,ja){N.setStyle(ta,ja,h(va,O))});F(qa.attributes,function(va,ja){N.setAttrib(ta,
ja,h(va,O))});F(qa.classes,function(va){va=h(va,O);N.hasClass(ta,va)||N.addClass(ta,va)})}}function U(ta){var qa=[],va,ja;va=ea.inline||ea.block;ja=N.create(va);S(ja);ba.walk(ta,function(sa){function Aa(Ga){var Ha=Ga.nodeName.toLowerCase(),Ja=Ga.parentNode.nodeName.toLowerCase(),La;if(n(Ha,"br")){Fa=0;ea.block&&N.remove(Ga)}else if(ea.wrapper&&r(Ga,R,O))Fa=0;else if(ea.block&&!ea.wrapper&&Y(Ha)){Ga=N.rename(Ga,va);S(Ga);qa.push(Ga);Fa=0}else{if(ea.selector){F(X,function(Na){if(N.is(Ga,Na.selector)&&
!f(Ga)){S(Ga,Na);La=true}});if(!ea.inline||La){Fa=0;return}}if(aa(va,Ha)&&aa(Ja,va)){if(!Fa){Fa=ja.cloneNode(ma);Ga.parentNode.insertBefore(Fa,Ga);qa.push(Fa)}Fa.appendChild(Ga)}else{Fa=0;F(a.grep(Ga.childNodes),Aa);Fa=0}}}var Fa;F(sa,Aa)});F(qa,function(sa){function Aa(Ha){var Ja=0;F(Ha.childNodes,function(La){!s(La)&&!G(La)&&Ja++});return Ja}function Fa(Ha){var Ja,La;F(Ha.childNodes,function(Na){if(Na.nodeType==1&&!G(Na)&&!f(Na)){Ja=Na;return ma}});if(Ja&&o(Ja,ea)){La=Ja.cloneNode(ma);S(La);N.replace(La,
Ha,la);N.remove(Ja,1)}return La||Ha}var Ga;Ga=Aa(sa);if(Ga===0)N.remove(sa,1);else if(ea.inline||ea.wrapper){if(!ea.exact&&Ga===1)sa=Fa(sa);F(X,function(Ha){F(N.select(Ha.inline,sa),function(Ja){B(Ha,O,Ja,Ha.exact?Ja:null)})});if(r(sa.parentNode,R,O)){N.remove(sa,1);sa=0;return la}ea.merge_with_parents&&N.getParent(sa.parentNode,function(Ha){if(r(Ha,R,O)){N.remove(sa,1);sa=0;return la}});if(sa){sa=I(C(sa),sa);sa=I(sa,C(sa,la))}}})}var X=d(R),ea=X[0],oa;if(ea)if(H){oa=N.createRng();oa.setStartBefore(H);
oa.setEndAfter(H);U(oa)}else if(!J.isCollapsed()||!ea.inline){H=J.getBookmark();U(y(J.getRng(la),X));J.moveToBookmark(H);J.setRng(P(J.getRng(la)));c.nodeChanged()}else K("apply",R,O)}function k(R,O,H){function P(ja){var sa,Aa,Fa;sa=a.grep(ja.childNodes);Aa=0;for(Fa=ta.length;Aa<Fa;Aa++)if(B(ta[Aa],O,ja,ja))break;if(qa.deep){Aa=0;for(Fa=sa.length;Aa<Fa;Aa++)P(sa[Aa])}}function S(ja){var sa;F(e(ja.parentNode).reverse(),function(Aa){var Fa;if(!sa&&Aa.id!="_start"&&Aa.id!="_end")if((Fa=r(Aa,R,O))&&Fa.split!==
false)sa=Aa});return sa}function U(ja,sa,Aa,Fa){var Ga,Ha,Ja,La,Na,Xa;if(ja){Xa=ja.parentNode;for(Ga=sa.parentNode;Ga&&Ga!=Xa;Ga=Ga.parentNode){Ha=Ga.cloneNode(ma);for(Na=0;Na<ta.length;Na++)if(B(ta[Na],O,Ha,Ha)){Ha=0;break}if(Ha){Ja&&Ha.appendChild(Ja);La||(La=Ha);Ja=Ha}}if(Fa&&(!qa.mixed||!ca(ja)))sa=N.split(ja,sa);if(Ja){Aa.parentNode.insertBefore(Ja,Aa);La.appendChild(Aa)}}return sa}function X(ja){return U(S(ja),ja,ja,true)}function ea(ja){var sa=N.get(ja?"_start":"_end");ja=sa[ja?"firstChild":
"lastChild"];N.remove(sa,true);return ja}function oa(ja){var sa,Aa;ja=y(ja,ta,la);if(qa.split){sa=Q(ja,la);Aa=Q(ja);if(sa!=Aa){sa=v(sa,"span",{id:"_start",_mce_type:"bookmark"});Aa=v(Aa,"span",{id:"_end",_mce_type:"bookmark"});X(sa);X(Aa);sa=ea(la);Aa=ea()}else sa=Aa=X(sa);ja.startContainer=sa.parentNode;ja.startOffset=ka(sa);ja.endContainer=Aa.parentNode;ja.endOffset=ka(Aa)+1}ba.walk(ja,function(Fa){F(Fa,function(Ga){P(Ga)})})}var ta=d(R),qa=ta[0],va;if(H){va=N.createRng();va.setStartBefore(H);va.setEndAfter(H);
oa(va)}else if(!J.isCollapsed()||!qa.inline){H=J.getBookmark();oa(J.getRng(la));J.moveToBookmark(H);c.nodeChanged()}else K("remove",R,O)}function l(R,O,H){t(R,O,H)?k(R,O,H):j(R,O,H)}function r(R,O,H,P){function S(ea,oa,ta){var qa,va,ja=oa[ta];if(ja)if(ja.length===Da)for(qa in ja){if(ja.hasOwnProperty(qa)){va=ta==="attributes"?N.getAttrib(ea,qa):u(ea,qa);if(P&&!va&&!oa.exact)return;if((!P||oa.exact)&&!n(va,h(ja[qa],H)))return}}else for(qa=0;qa<ja.length;qa++)if(ta==="attributes"?N.getAttrib(ea,ja[qa]):
u(ea,ja[qa]))return oa;return oa}var U=d(O),X;if(U&&R)for(X=0;X<U.length;X++){O=U[X];if(o(R,O)&&S(R,O,"attributes")&&S(R,O,"styles")){if(U=O.classes)for(X=0;X<U.length;X++)if(!N.hasClass(R,U[X]))return;return O}}}function t(R,O,H){function P(U){U=N.getParent(U,function(X){return!!r(X,R,O,true)});return r(U,R,O)}var S;if(H)return P(H);if(J.isCollapsed()){for(H=za.apply.length-1;H>=0;H--)if(za.apply[H].name==R)return true;for(H=za.remove.length-1;H>=0;H--)if(za.remove[H].name==R)return false;return P(J.getNode())}H=
J.getNode();if(P(H))return la;S=J.getStart();if(S!=H)if(P(S))return la;return ma}function q(R,O){var H,P=[],S={},U,X;if(J.isCollapsed()){for(U=0;U<R.length;U++)for(H=za.remove.length-1;H>=0;H--){X=R[U];if(za.remove[H].name==X){S[X]=true;break}}for(H=za.apply.length-1;H>=0;H--)for(U=0;U<R.length;U++){X=R[U];if(!S[X]&&za.apply[H].name==X){S[X]=true;P.push(X)}}}H=J.getStart();N.getParent(H,function(ea){var oa,ta;for(oa=0;oa<R.length;oa++){ta=R[oa];if(!S[ta]&&r(ea,ta,O)){S[ta]=true;P.push(ta)}}});return P}
function p(R){R=d(R);var O,H,P,S;if(R){O=J.getStart();O=e(O);for(P=R.length-1;P>=0;P--){S=R[P].selector;if(!S)return la;for(H=O.length-1;H>=0;H--)if(N.is(O[H],S))return la}}return ma}function o(R,O){if(n(R,O.inline))return la;if(n(R,O.block))return la;if(O.selector)return N.is(R,O.selector)}function n(R,O){R=R||"";O=O||"";R=""+(R.nodeName||R);O=""+(O.nodeName||O);return R.toLowerCase()==O.toLowerCase()}function u(R,O){R=N.getStyle(R,O);if(O=="color"||O=="backgroundColor")R=N.toHex(R);if(O=="fontWeight"&&
R==700)R="bold";return""+R}function h(R,O){if(typeof R!="string")R=R(O);else if(O)R=R.replace(/%(\w+)/g,function(H,P){return O[P]||H});return R}function s(R){return R&&R.nodeType===3&&/^\s*$/.test(R.nodeValue)}function v(R,O,H){O=N.create(O,H);R.parentNode.insertBefore(O,R);O.appendChild(R);return O}function y(R,O){function H(qa,va,ja,sa){var Aa;for(sa=sa||N.getRoot();;){Aa=qa.parentNode;if(Aa==sa||!O[0].block_expand&&ca(Aa))return qa;for(X=Aa[va];X&&X!=qa;X=X[ja]){if(X.nodeType==1&&!G(X))return qa;
if(X.nodeType==3&&!s(X))return qa}qa=qa.parentNode}return qa}var P=R.startContainer,S=R.startOffset,U=R.endContainer;R=R.endOffset;var X,ea;if(P.nodeType==1&&P.hasChildNodes()){ea=P.childNodes.length-1;P=P.childNodes[S>ea?ea:S];if(P.nodeType==3)S=0}if(U.nodeType==1&&U.hasChildNodes()){ea=U.childNodes.length-1;U=U.childNodes[R>ea?ea:R-1];if(U.nodeType==3)R=U.nodeValue.length}if(G(P.parentNode))P=P.parentNode;if(G(P))P=P.nextSibling||P;if(G(U.parentNode))U=U.parentNode;if(G(U))U=U.previousSibling||
U;if(O[0].inline||O[0].block_expand){P=H(P,"firstChild","nextSibling");U=H(U,"lastChild","previousSibling")}if(O[0].selector&&O[0].expand!==ma&&!O[0].inline){function oa(qa,va){var ja,sa;if(qa.nodeType==3&&qa.nodeValue.length==0&&qa[va])qa=qa[va];va=e(qa);for(ja=0;ja<va.length;ja++)for(sa=0;sa<O.length;sa++)if(N.is(va[ja],O[sa].selector))return va[ja];return qa}P=oa(P,"previousSibling");U=oa(U,"nextSibling")}if(O[0].block||O[0].selector){function ta(qa,va){var ja;O[0].wrapper||(ja=N.getParent(qa,
O[0].block));ja||(ja=N.getParent(qa.nodeType==3?qa.parentNode:qa,ca));if(ja&&O[0].wrapper)ja=e(ja,"ul,ol").reverse()[0]||ja;if(!ja)for(ja=qa;ja[va]&&!ca(ja[va]);){ja=ja[va];if(n(ja,"br"))break}return ja||qa}P=ta(P,"previousSibling");U=ta(U,"nextSibling");if(O[0].block){ca(P)||(P=H(P,"firstChild","nextSibling"));ca(U)||(U=H(U,"lastChild","previousSibling"))}}if(P.nodeType==1){S=ka(P);P=P.parentNode}if(U.nodeType==1){R=ka(U)+1;U=U.parentNode}return{startContainer:P,startOffset:S,endContainer:U,endOffset:R}}
function B(R,O,H,P){var S,U,X;if(!o(H,R))return ma;if(R.remove!="all"){F(R.styles,function(ea,oa){ea=h(ea,O);if(typeof oa==="number"){oa=ea;P=0}if(!P||n(u(P,oa),ea))N.setStyle(H,oa,"");X=1});if(X&&N.getAttrib(H,"style")==""){H.removeAttribute("style");H.removeAttribute("_mce_style")}F(R.attributes,function(ea,oa){var ta;ea=h(ea,O);if(typeof oa==="number"){oa=ea;P=0}if(!P||n(N.getAttrib(P,oa),ea)){if(oa=="class")if(ea=N.getAttrib(H,oa)){ta="";F(ea.split(/\s+/),function(qa){if(/mce\w+/.test(qa))ta+=
(ta?" ":"")+qa});if(ta){N.setAttrib(H,oa,ta);return}}oa=="class"&&H.removeAttribute("className");ra.test(oa)&&H.removeAttribute("_mce_"+oa);H.removeAttribute(oa)}});F(R.classes,function(ea){ea=h(ea,O);if(!P||N.hasClass(P,ea))N.removeClass(H,ea)});U=N.getAttribs(H);for(S=0;S<U.length;S++)if(U[S].nodeName.indexOf("_")!==0)return ma}if(R.remove!="none"){z(H,R);return la}}function z(R,O){var H=R.parentNode,P;if(O.block)if(ua){if(H==N.getRoot())if(!O.list_block||!n(R,O.list_block))F(a.grep(R.childNodes),
function(U){if(aa(ua,U.nodeName.toLowerCase()))if(P)P.appendChild(U);else P=v(U,ua);else P=0})}else{function S(U,X,ea){U=C(U,X,ea);return!U||U.nodeName=="BR"||ca(U)}if(ca(R)&&!ca(H)){!S(R,ma)&&!S(R.firstChild,la,1)&&R.insertBefore(N.create("br"),R.firstChild);!S(R,la)&&!S(R.lastChild,ma,1)&&R.appendChild(N.create("br"))}}O.selector&&O.inline&&!n(O.inline,R)||N.remove(R,1)}function C(R,O,H){if(R){O=O?"nextSibling":"previousSibling";for(R=H?R:R[O];R;R=R[O])if(R.nodeType==1||!s(R))return R}}function G(R){return R&&
R.nodeType==1&&R.getAttribute("_mce_type")=="bookmark"}function I(R,O){function H(X,ea){function oa(qa){var va={};F(N.getAttribs(qa),function(ja){ja=ja.nodeName.toLowerCase();if(ja.indexOf("_")!==0&&ja!=="style")va[ja]=N.getAttrib(qa,ja)});return va}function ta(qa,va){var ja,sa;for(sa in qa)if(qa.hasOwnProperty(sa)){ja=va[sa];if(ja===Da)return ma;if(qa[sa]!=ja)return ma;delete va[sa]}for(sa in va)if(va.hasOwnProperty(sa))return ma;return la}if(X.nodeName!=ea.nodeName)return ma;if(!ta(oa(X),oa(ea)))return ma;
if(!ta(N.parseStyle(N.getAttrib(X,"style")),N.parseStyle(N.getAttrib(ea,"style"))))return ma;return la}var P,S;if(R&&O){function U(X,ea){for(P=X;P;P=P[ea]){if(P.nodeType==3&&!s(P))return X;if(P.nodeType==1&&!G(P))return P}return X}R=U(R,"previousSibling");O=U(O,"nextSibling");if(H(R,O)){for(P=R.nextSibling;P&&P!=O;){S=P;P=P.nextSibling;R.appendChild(S)}N.remove(O);F(a.grep(O.childNodes),function(X){R.appendChild(X)});return R}}return O}function Y(R){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(R)}
function Q(R,O){var H,P;H=R[O?"startContainer":"endContainer"];R=R[O?"startOffset":"endOffset"];if(H.nodeType==1){P=H.childNodes.length-1;!O&&R&&R--;H=H.childNodes[R>P?P:R]}return H}function K(R,O,H){function P(){return za.apply.length||za.remove.length}function S(){za.apply=[];za.remove=[]}function U(oa){F(za.apply.reverse(),function(ta){j(ta.name,ta.vars,oa)});F(za.remove.reverse(),function(ta){k(ta.name,ta.vars,oa)});N.remove(oa,1);S()}var X=za[R],ea=za[R=="apply"?"remove":"apply"];for(R=X.length-
1;R>=0;R--)if(X[R].name==O)return;X.push({name:O,vars:H});for(R=ea.length-1;R>=0;R--)ea[R].name==O&&ea.splice(R,1);if(P()){c.getDoc().execCommand("FontName",false,"mceinline");za.lastRng=J.getRng();F(N.select("font,span"),function(oa){var ta;if(f(oa)){ta=J.getBookmark();U(oa);J.moveToBookmark(ta);c.nodeChanged()}});if(!za.isListening&&P()){za.isListening=true;F("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(oa){c[oa].addToTop(function(ta,qa){if(P()&&!a.dom.RangeUtils.compareRanges(za.lastRng,
J.getRng())){F(N.select("font,span"),function(va){var ja;if(f(va)){ja=va.firstChild;U(va);va=N.createRng();va.setStart(ja,ja.nodeValue.length);va.setEnd(ja,ja.nodeValue.length);J.setRng(va);ta.nodeChanged()}});if(qa.type=="keyup"||qa.type=="mouseup")S()}})})}}}var W={},F=a.each,N=c.dom,J=c.selection,L=a.dom.TreeWalker,ba=new a.dom.RangeUtils(N),aa=c.schema.isValid,ca=N.isBlock,ua=c.settings.forced_root_block,ka=N.nodeIndex,ra=/^(src|href|style)$/,ma=false,la=true,Da,za={apply:[],remove:[]};a.extend(this,
{get:d,register:g,apply:j,remove:k,toggle:l,match:t,matchAll:q,matchNode:r,canApply:p})}})(tinymce);
tinymce.onAddEditor.add(function(a,c){var e,f,d,g=c.settings;if(g.inline_styles){f=a.explode(g.font_size_style_values);function j(l,r){d.replace(d.create("span",{style:r}),l,1)}e={font:function(l,r){j(r,{backgroundColor:r.style.backgroundColor,color:r.color,fontFamily:r.face,fontSize:f[parseInt(r.size)-1]})},u:function(l,r){j(r,{textDecoration:"underline"})},strike:function(l,r){j(r,{textDecoration:"line-through"})}};function k(l,r){d=l.dom;g.convert_fonts_to_spans&&a.each(d.select("font,u,strike",
r.node),function(t){e[t.nodeName.toLowerCase()](c.dom,t)})}c.onPreProcess.add(k);c.onInit.add(function(){c.selection.onSetContent.add(k)})}});
(function(a){var c=a.DOM,e=a.dom.Event,f=a.extend,d=a.each,g=a.util.Cookie,j,k=a.explode;a.ThemeManager.requireLangPack("advanced");a.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],
justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc",
"mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc",
"mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(l,r){var t=this,q,p,o;t.editor=l;t.url=r;t.onResolveName=new a.util.Dispatcher(this);t.settings=q=f({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:l.settings.readonly},l.settings);if(!q.font_size_style_values)q.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt";if(a.is(q.theme_advanced_font_sizes,"string")){q.font_size_style_values=a.explode(q.font_size_style_values);q.font_size_classes=a.explode(q.font_size_classes||"");o={};l.settings.theme_advanced_font_sizes=
q.theme_advanced_font_sizes;d(l.getParam("theme_advanced_font_sizes","","hash"),function(n,u){var h;if(u==n&&n>=1&&n<=7){u=n+" ("+t.sizes[n-1]+"pt)";h=q.font_size_classes[n-1];n=q.font_size_style_values[n-1]||t.sizes[n-1]+"pt"}if(/^\s*\./.test(n))h=n.replace(/\./g,"");o[u]=h?{"class":h}:{fontSize:n}});q.theme_advanced_font_sizes=o}if((p=q.theme_advanced_path_location)&&p!="none")q.theme_advanced_statusbar_location=q.theme_advanced_path_location;if(q.theme_advanced_statusbar_location=="none")q.theme_advanced_statusbar_location=
0;l.onInit.add(function(){l.settings.readonly||l.onNodeChange.add(t._nodeChanged,t);l.settings.content_css!==false&&l.dom.loadCSS(l.baseURI.toAbsolute("themes/advanced/skins/"+l.settings.skin+"/content.css"))});l.onSetProgressState.add(function(n,u,h){var s,v=n.id,y;if(u)t.progressTimer=setTimeout(function(){s=n.getContainer();s=s.insertBefore(c.create("DIV",{style:"position:relative"}),s.firstChild);y=c.get(n.id+"_tbl");c.add(s,"div",{id:v+"_blocker","class":"mceBlocker",style:{width:y.clientWidth+
2,height:y.clientHeight+2}});c.add(s,"div",{id:v+"_progress","class":"mceProgress",style:{left:y.clientWidth/2,top:y.clientHeight/2}})},h||0);else{c.remove(v+"_blocker");c.remove(v+"_progress");clearTimeout(t.progressTimer)}});c.loadCSS(q.editor_css?l.documentBaseURI.toAbsolute(q.editor_css):r+"/skins/"+l.settings.skin+"/ui.css");q.skin_variant&&c.loadCSS(r+"/skins/"+l.settings.skin+"/ui_"+q.skin_variant+".css")},createControl:function(l,r){var t;if(t=r.createControl(l))return t;switch(l){case "styleselect":return this._createStyleSelect();
case "formatselect":return this._createBlockFormats();case "fontselect":return this._createFontSelect();case "fontsizeselect":return this._createFontSizeSelect();case "forecolor":return this._createForeColorMenu();case "backcolor":return this._createBackColorMenu()}if(t=this.controls[l])return r.createButton(l,{title:"advanced."+t[0],cmd:t[1],ui:t[2],value:t[3]})},execCommand:function(l,r,t){if(l=this["_"+l]){l.call(this,r,t);return true}return false},_importClasses:function(){var l=this.editor,r=
l.controlManager.get("styleselect");r.getLength()==0&&d(l.dom.getClasses(),function(t,q){q="style_"+q;l.formatter.register(q,{inline:"span",attributes:{"class":t["class"]},selector:"*"});r.add(t["class"],q)})},_createStyleSelect:function(){var l=this,r=l.editor,t;t=r.controlManager.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var p=[];d(t.items,function(o){p.push(o.value)});r.focus();r.formatter.matchAll(p)[0]==q?r.formatter.remove(q):r.formatter.apply(q);return false}});
r.onInit.add(function(){var q=0,p=r.getParam("style_formats");p?d(p,function(o){var n,u=0;d(o,function(){u++});if(u>1){n=o.name=o.name||"style_"+q++;r.formatter.register(n,o);t.add(o.title,n)}else t.add(o.title)}):d(r.getParam("theme_advanced_styles","","hash"),function(o,n){var u;if(o){u="style_"+q++;r.formatter.register(u,{inline:"span",classes:o,selector:"*"});t.add(l.editor.translate(n),u)}})});t.getLength()==0&&t.onPostRender.add(function(q,p){if(t.NativeListBox)e.add(p.id,"focus",l._importClasses,
l);else{e.add(p.id+"_text","focus",l._importClasses,l);e.add(p.id+"_text","mousedown",l._importClasses,l);e.add(p.id+"_open","focus",l._importClasses,l);e.add(p.id+"_open","mousedown",l._importClasses,l)}});return t},_createFontSelect:function(){var l,r=this,t=r.editor;(l=t.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(q){t.execCommand("FontName",false,q);return false}}))&&d(t.getParam("theme_advanced_fonts",r.settings.theme_advanced_fonts,"hash"),function(q,
p){l.add(t.translate(p),q,{style:q.indexOf("dings")==-1?"font-family:"+q:""})});return l},_createFontSizeSelect:function(){var l=this,r=l.editor,t;(t=r.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(q){if(q["class"]){r.focus();r.formatter.toggle("fontsize_class",{value:q["class"]})}else r.execCommand("FontSize",false,q.fontSize);return false}}))&&d(l.settings.theme_advanced_font_sizes,function(q,p){t.add(p,q)});return t},_createBlockFormats:function(){var l,
r={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},t=this;(l=t.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"}))&&d(t.editor.getParam("theme_advanced_blockformats",t.settings.theme_advanced_blockformats,
"hash"),function(q,p){l.add(t.editor.translate(p!=q?p:r[q]),q,{"class":"mce_formatPreview mce_"+q})});return l},_createForeColorMenu:function(){var l,r=this,t=r.settings,q={},p;if(t.theme_advanced_more_colors)q.more_colors_func=function(){r._mceColorPicker(0,{color:l.value,func:function(o){l.setColor(o)}})};if(p=t.theme_advanced_text_colors)q.colors=p;if(t.theme_advanced_default_foreground_color)q.default_color=t.theme_advanced_default_foreground_color;q.title="advanced.forecolor_desc";q.cmd="ForeColor";
q.scope=this;return l=r.editor.controlManager.createColorSplitButton("forecolor",q)},_createBackColorMenu:function(){var l,r=this,t=r.settings,q={},p;if(t.theme_advanced_more_colors)q.more_colors_func=function(){r._mceColorPicker(0,{color:l.value,func:function(o){l.setColor(o)}})};if(p=t.theme_advanced_background_colors)q.colors=p;if(t.theme_advanced_default_background_color)q.default_color=t.theme_advanced_default_background_color;q.title="advanced.backcolor_desc";q.cmd="HiliteColor";q.scope=this;
return l=r.editor.controlManager.createColorSplitButton("backcolor",q)},renderUI:function(l){var r,t,q,p=this,o=p.editor,n=p.settings,u,h,s;r=h=c.create("span",{id:o.id+"_parent","class":"mceEditor "+o.settings.skin+"Skin"+(n.skin_variant?" "+o.settings.skin+"Skin"+p._ufirst(n.skin_variant):"")});c.boxModel||(r=c.add(r,"div",{"class":"mceOldBoxModel"}));r=u=c.add(r,"table",{id:o.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});r=q=c.add(r,"tbody");switch((n.theme_advanced_layout_manager||
"").toLowerCase()){case "rowlayout":t=p._rowLayout(n,q,l);break;case "customlayout":t=o.execCallback("theme_advanced_custom_layout",n,q,l,h);break;default:t=p._simpleLayout(n,q,l,h)}r=l.targetNode;s=c.stdMode?u.getElementsByTagName("tr"):u.rows;c.addClass(s[0],"mceFirst");c.addClass(s[s.length-1],"mceLast");d(c.select("tr",q),function(v){c.addClass(v.firstChild,"mceFirst");c.addClass(v.childNodes[v.childNodes.length-1],"mceLast")});c.get(n.theme_advanced_toolbar_container)?c.get(n.theme_advanced_toolbar_container).appendChild(h):
c.insertAfter(h,r);e.add(o.id+"_path_row","click",function(v){v=v.target;if(v.nodeName=="A"){p._sel(v.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return e.cancel(v)}});o.getParam("accessibility_focus")||e.add(c.add(h,"a",{href:"#"},"<!-- IE --\>"),"focus",function(){tinyMCE.get(o.id).focus()});if(n.theme_advanced_toolbar_location=="external")l.deltaHeight=0;p.deltaHeight=l.deltaHeight;l.targetNode=null;return{iframeContainer:t,editorContainer:o.id+"_parent",sizeContainer:u,deltaHeight:l.deltaHeight}},
getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:a.majorVersion+"."+a.minorVersion}},resizeBy:function(l,r){var t=c.get(this.editor.id+"_tbl");this.resizeTo(t.clientWidth+l,t.clientHeight+r)},resizeTo:function(l,r){var t=this.editor,q=this.settings,p=c.get(t.id+"_tbl");t=c.get(t.id+"_ifr");l=Math.max(q.theme_advanced_resizing_min_width||100,l);r=Math.max(q.theme_advanced_resizing_min_height||100,r);l=Math.min(q.theme_advanced_resizing_max_width||
65535,l);r=Math.min(q.theme_advanced_resizing_max_height||65535,r);c.setStyle(p,"height","");c.setStyle(t,"height",r);if(q.theme_advanced_resize_horizontal){c.setStyle(p,"width","");c.setStyle(t,"width",l);l<p.clientWidth&&c.setStyle(t,"width",p.clientWidth)}},destroy:function(){var l=this.editor.id;e.clear(l+"_resize");e.clear(l+"_path_row");e.clear(l+"_external_close")},_simpleLayout:function(l,r,t,q){var p=this,o=p.editor,n=l.theme_advanced_toolbar_location,u=l.theme_advanced_statusbar_location,
h,s,v;if(l.readonly){h=c.add(r,"tr");return h=s=c.add(h,"td",{"class":"mceIframeContainer"})}n=="top"&&p._addToolbars(r,t);if(n=="external"){h=v=c.create("div",{style:"position:relative"});h=c.add(h,"div",{id:o.id+"_external","class":"mceExternalToolbar"});c.add(h,"a",{id:o.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});h=c.add(h,"table",{id:o.id+"_tblext",cellSpacing:0,cellPadding:0});h=c.add(h,"tbody");q.firstChild.className=="mceOldBoxModel"?q.firstChild.appendChild(v):q.insertBefore(v,
q.firstChild);p._addToolbars(h,t);o.onMouseUp.add(function(){var y=c.get(o.id+"_external");c.show(y);c.hide(j);var B=e.add(o.id+"_external_close","click",function(){c.hide(o.id+"_external");e.remove(o.id+"_external_close","click",B)});c.show(y);c.setStyle(y,"top",0-c.getRect(o.id+"_tblext").h-1);c.hide(y);c.show(y);y.style.filter="";j=o.id+"_external";y=null})}u=="top"&&p._addStatusBar(r,t);if(!l.theme_advanced_toolbar_container){h=c.add(r,"tr");h=s=c.add(h,"td",{"class":"mceIframeContainer"})}n==
"bottom"&&p._addToolbars(r,t);u=="bottom"&&p._addStatusBar(r,t);return s},_rowLayout:function(l,r,t){var q=this,p,o,n=q.editor.controlManager,u,h,s,v;p=l.theme_advanced_containers_default_class||"";o=l.theme_advanced_containers_default_align||"center";d(k(l.theme_advanced_containers||""),function(y,B){var z=l["theme_advanced_container_"+y]||"";switch(z.toLowerCase()){case "mceeditor":u=c.add(r,"tr");u=h=c.add(u,"td",{"class":"mceIframeContainer"});break;case "mceelementpath":q._addStatusBar(r,t);
break;default:v=(l["theme_advanced_container_"+y+"_align"]||o).toLowerCase();v="mce"+q._ufirst(v);u=c.add(c.add(r,"tr"),"td",{"class":"mceToolbar "+(l["theme_advanced_container_"+y+"_class"]||p)+" "+v||o});s=n.createToolbar("toolbar"+B);q._addControls(z,s);c.setHTML(u,s.renderHTML());t.deltaHeight-=l.theme_advanced_row_height}});return h},_addControls:function(l,r){var t=this,q=t.settings,p,o=t.editor.controlManager;if(q.theme_advanced_disable&&!t._disabled){p={};d(k(q.theme_advanced_disable),function(n){p[n]=
1});t._disabled=p}else p=t._disabled;d(k(l),function(n){if(!(p&&p[n]))if(n=="tablecontrols")d(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(u){(u=t.createControl(u,o))&&r.add(u)});else(n=t.createControl(n,o))&&r.add(n)})},_addToolbars:function(l,r){var t=this,q,p=t.editor,o=t.settings,n,u=p.controlManager,h,s=[];q=o.theme_advanced_toolbar_align.toLowerCase();q="mce"+t._ufirst(q);h=
c.add(c.add(l,"tr"),"td",{"class":"mceToolbar "+q});p.getParam("accessibility_focus")||s.push(c.createHTML("a",{href:"#",onfocus:"tinyMCE.get('"+p.id+"').focus();"},"<!-- IE --\>"));s.push(c.createHTML("a",{href:"#",accesskey:"q",title:p.getLang("advanced.toolbar_focus")},"<!-- IE --\>"));for(l=1;n=o["theme_advanced_buttons"+l];l++){q=u.createToolbar("toolbar"+l,{"class":"mceToolbarRow"+l});if(o["theme_advanced_buttons"+l+"_add"])n+=","+o["theme_advanced_buttons"+l+"_add"];if(o["theme_advanced_buttons"+
l+"_add_before"])n=o["theme_advanced_buttons"+l+"_add_before"]+","+n;t._addControls(n,q);s.push(q.renderHTML());r.deltaHeight-=o.theme_advanced_row_height}s.push(c.createHTML("a",{href:"#",accesskey:"z",title:p.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+p.id+"').focus();"},"<!-- IE --\>"));c.setHTML(h,s.join(""))},_addStatusBar:function(l,r){var t=this,q=t.editor,p=t.settings,o;l=c.add(l,"tr");l=o=c.add(l,"td",{"class":"mceStatusbar"});l=c.add(l,"div",{id:q.id+"_path_row"},
p.theme_advanced_path?q.translate("advanced.path")+": ":"&#160;");c.add(l,"a",{href:"#",accesskey:"x"});if(p.theme_advanced_resizing){c.add(o,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});p.theme_advanced_resizing_use_cookie&&q.onPostRender.add(function(){var n=g.getHash("TinyMCE_"+q.id+"_size");c.get(q.id+"_tbl");n&&t.resizeTo(n.cw,n.ch)});q.onPostRender.add(function(){e.add(q.id+"_resize","mousedown",function(n){function u(K){Y=G+(K.screenX-z);Q=I+(K.screenY-
C);t.resizeTo(Y,Q)}function h(){e.remove(c.doc,"mousemove",s);e.remove(q.getDoc(),"mousemove",v);e.remove(c.doc,"mouseup",y);e.remove(q.getDoc(),"mouseup",B);p.theme_advanced_resizing_use_cookie&&g.setHash("TinyMCE_"+q.id+"_size",{cw:Y,ch:Q})}var s,v,y,B,z,C,G,I,Y,Q;n.preventDefault();z=n.screenX;C=n.screenY;n=c.get(t.editor.id+"_ifr");G=Y=n.clientWidth;I=Q=n.clientHeight;s=e.add(c.doc,"mousemove",u);v=e.add(q.getDoc(),"mousemove",u);y=e.add(c.doc,"mouseup",h);B=e.add(q.getDoc(),"mouseup",h)})})}r.deltaHeight-=
21;l=l=null},_nodeChanged:function(l,r,t,q,p){function o(I){var Y,Q=p.parents,K=I;if(typeof I=="string")K=function(W){return W.nodeName==I};for(Y=0;Y<Q.length;Y++)if(K(Q[Y]))return Q[Y]}var n=this,u,h=0,s,v,y=n.settings,B,z,C,G;a.each(n.stateControls,function(I){r.setActive(I,l.queryCommandState(n.controls[I][1]))});r.setActive("visualaid",l.hasVisual);r.setDisabled("undo",!l.undoManager.hasUndo()&&!l.typing);r.setDisabled("redo",!l.undoManager.hasRedo());r.setDisabled("outdent",!l.queryCommandState("Outdent"));
u=o("A");if(v=r.get("link"))if(!u||!u.name){v.setDisabled(!u&&q);v.setActive(!!u)}if(v=r.get("unlink")){v.setDisabled(!u&&q);v.setActive(!!u&&!u.name)}if(v=r.get("anchor"))v.setActive(!!u&&u.name);u=o("IMG");if(v=r.get("image"))v.setActive(!!u&&t.className.indexOf("mceItem")==-1);if(v=r.get("styleselect")){n._importClasses();G=[];d(v.items,function(I){G.push(I.value)});q=l.formatter.matchAll(G);v.select(q[0])}if(v=r.get("formatselect"))(u=o(c.isBlock))&&v.select(u.nodeName.toLowerCase());o(function(I){if(I.nodeName===
"SPAN"){if(!B&&I.className)B=I.className;if(!z&&I.style.fontSize)z=I.style.fontSize;if(!C&&I.style.fontFamily)C=I.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}return false});if(v=r.get("fontselect"))v.select(function(I){return I.replace(/^([^,]+).*/,"$1").toLowerCase()==C});if(v=r.get("fontsizeselect")){if(y.theme_advanced_runtime_fontsize&&!z&&!B)z=l.dom.getStyle(t,"fontSize",true);v.select(function(I){if(I.fontSize&&I.fontSize===z)return true;if(I["class"]&&I["class"]===
B)return true})}if(y.theme_advanced_path&&y.theme_advanced_statusbar_location){u=c.get(l.id+"_path")||c.add(l.id+"_path_row","span",{id:l.id+"_path"});c.setHTML(u,"");o(function(I){var Y=I.nodeName.toLowerCase(),Q="";if(!(I.nodeType!=1||I.nodeName==="BR"||c.hasClass(I,"mceItemHidden")||c.hasClass(I,"mceItemRemoved"))){if(s=c.getAttrib(I,"mce_name"))Y=s;if(a.isIE&&I.scopeName!=="HTML")Y=I.scopeName+":"+Y;Y=Y.replace(/mce\:/g,"");switch(Y){case "b":Y="strong";break;case "i":Y="em";break;case "img":if(s=
c.getAttrib(I,"src"))Q+="src: "+s+" ";break;case "a":if(s=c.getAttrib(I,"name")){Q+="name: "+s+" ";Y+="#"+s}if(s=c.getAttrib(I,"href"))Q+="href: "+s+" ";break;case "font":if(s=c.getAttrib(I,"face"))Q+="font: "+s+" ";if(s=c.getAttrib(I,"size"))Q+="size: "+s+" ";if(s=c.getAttrib(I,"color"))Q+="color: "+s+" ";break;case "span":if(s=c.getAttrib(I,"style"))Q+="style: "+s+" ";break}if(s=c.getAttrib(I,"id"))Q+="id: "+s+" ";if(s=I.className)if(s=s.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"")){Q+="class: "+
s+" ";if(c.isBlock(I)||Y=="img"||Y=="span")Y+="."+s}Y=Y.replace(/(html:)/g,"");Y={name:Y,node:I,title:Q};n.onResolveName.dispatch(n,Y);Q=Y.title;Y=Y.name;I=c.create("a",{href:"javascript:;",onmousedown:"return false;",title:Q,"class":"mcePath_"+h++},Y);if(u.hasChildNodes()){u.insertBefore(c.doc.createTextNode(" \u00bb "),u.firstChild);u.insertBefore(I,u.firstChild)}else u.appendChild(I)}},l.getBody())}},_sel:function(l){this.editor.execCommand("mceSelectNodeDepth",false,l)},_mceInsertAnchor:function(){var l=
this.editor;l.windowManager.open({url:a.baseURL+"/themes/advanced/anchor.htm",width:320+parseInt(l.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(l.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var l=this.editor;l.windowManager.open({url:a.baseURL+"/themes/advanced/charmap.htm",width:550+parseInt(l.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(l.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},
_mceHelp:function(){this.editor.windowManager.open({url:a.baseURL+"/themes/advanced/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,r){l=this.editor;r=r||{};l.windowManager.open({url:a.baseURL+"/themes/advanced/color_picker.htm",width:375+parseInt(l.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(l.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:r.color,func:r.func,theme_url:this.url})},
_mceCodeEditor:function(){var l=this.editor;l.windowManager.open({url:a.baseURL+"/themes/advanced/source_editor.htm",width:parseInt(l.getParam("theme_advanced_source_editor_width",720)),height:parseInt(l.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(){var l=this.editor;l.dom.getAttrib(l.selection.getNode(),"class").indexOf("mceItem")==-1&&l.windowManager.open({url:a.baseURL+"/themes/advanced/image.htm",width:355+
parseInt(l.getLang("advanced.image_delta_width",0)),height:275+parseInt(l.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(){var l=this.editor;l.windowManager.open({url:a.baseURL+"/themes/advanced/link.htm",width:310+parseInt(l.getLang("advanced.link_delta_width",0)),height:200+parseInt(l.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var l=this.editor;l.windowManager.confirm("advanced.newdocument",
function(r){r&&l.execCommand("mceSetContent",false,"")})},_mceForeColor:function(){var l=this;this._mceColorPicker(0,{color:l.fgColor,func:function(r){l.fgColor=r;l.editor.execCommand("ForeColor",false,r)}})},_mceBackColor:function(){var l=this;this._mceColorPicker(0,{color:l.bgColor,func:function(r){l.bgColor=r;l.editor.execCommand("HiliteColor",false,r)}})},_ufirst:function(l){return l.substring(0,1).toUpperCase()+l.substring(1)}});a.ThemeManager.add("advanced",a.themes.AdvancedTheme)})(tinymce);
(function(a){a=a.ui.slider.prototype;a.__normValueFromMouse=a._normValueFromMouse;a._normValueFromMouse=function(c){this._clickOffset=null;return this.__normValueFromMouse(c)}})(jQuery);
(function(a,c,e,f,d,g,j,k,l,r,t,q){function p(){var Q=e.FRAMEWORK_NAME||"c2";Q=$$("script[src*="+Q+".js],script[src*="+Q+".raw.js]")[0];if(!Q||!Q.src)throw new Error("Loaded script is not named 'c2.js' or 'c2.raw.js'");Q=new v.net.URI(Q.src||h);v.util.scriptInfo=Q;v.autoInit=(Q.queryParams||{}).autoinit=="1";v.logLevel=(Q.queryParams||{}).loglevel||h;Event.observe(e,"load",o);v.meta=v.getMeta();B.each(function(K){if(K&&typeof K[0]=="function")K[0].apply(K[1]||e)})}function o(Q){v.autoInit&&y.each(function(K){if(K&&
typeof K[0]=="function")K[0].apply(K[1]||e,[Q])})}function n(Q,K){y.push([Q,K])}var u="submit",h="",s="hidden",v={},y=[],B=[],z=e.document;v.service=v.service||{};v.net=v.net||{};v.events=v.events||{};v.meta=v.meta||{};v.getMeta=function(){var Q=/^X\-Creyle\-/;$$("meta").each(function(K){var W=K.httpEquiv||"";if(!Q.test(W))return $continue;W=W.replace(Q,"");K=K.content;if(W&&K)v.meta[W]=K});return v.meta};v.autoInit=false;v.logLevel=h;v.bindReady=n;var C=e.console,G={info:function(){try{if(typeof C!=
"undefined"&&/^(info|log|debug)$/i.test(v.logLevel))k.Browser.WebKit?C.info($A(arguments)):C.info.apply(this,arguments)}catch(Q){}},log:function(){try{if(typeof C!="undefined"&&/^(log|debug)$/i.test(v.logLevel))k.Browser.WebKit?C.log($A(arguments)):C.log.apply(this,arguments)}catch(Q){}},debug:function(){try{if(typeof C!="undefined"&&/^debug$/i.test(v.logLevel))k.Browser.WebKit?C.debug($A(arguments)):C.debug.apply(this,arguments)}catch(Q){}}};t.extend(v,G);v.StyleClass={HIDDEN:"hidden",EDIT:"edit",
HOVER:"hover",LOADING:"loading",STATUS_DRAFT:"status-draft",STATUS_PUBLIC:"status-public",NO_VALUE:"novalue"};v.util={scriptInfo:null,summarizeErrors:function(Q,K){G.log(Q);K=K||"<UNKNOW ERROR>";var W=[];Q.error&&W.push(Q.error);Q.errors=Q.errors||{};if(Q instanceof Array)Q.each(function(F){G.log(F);F.msg&&W.push(F.msg)});else Q.errors instanceof Array?Q.errors.each(function(F){F.msg&&W.push(F.msg)}):[Q.errors.entry||[],Q.errors.fields||[]].each(function(F){W.push(v.util.summarizeErrors(F,K))});return W.join("\n")},
flashUploadError2Message:function(Q){if(Q=="Error #2049")return"\u753b\u50cf\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f";else if(cd=="Error #2038")return"\u753b\u50cf\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3059\u304e\u307e\u3059";return Q},flatten:function(Q){var K={};for(var W in Q){var F=Q[W];if(F instanceof t)K[W+(F instanceof Array?"[]":"{}")]=t.toJSON(F);else K[W]=F}return K},post:function(Q,K,W){K=this.flatten(K);K.csrf_token=v.meta.CsrfToken;jQuery.post(Q+"?"+
new f(10),K,W)}};(function(Q){var K=l.create({initialize:function(N,J){this.type=N;this.bubbles=J;this.memo={}},type:"",bubbles:false,memo:null,target:null}),W=l.create(K,{initialize:function($super,J,L){$super(J,false);G.log(J,L);this.memo={message:L};this.message=L},message:""}),F=l.create(K,{initialize:function($super,J,L){$super(J,false);this.data=L},data:{}});t.extend(K,{SUBMIT:"creyle:submit",LOAD:"creyle:load",INIT:"creyle:init",EDIT:"creyle:edit",CANCEL:"creyle:cancel",SUCCESS:"creyle:success",
UPDATE:"creyle:update"});t.extend(W,{ERROR:"creyle:error",FLASH_VERSION_ERROR:"creyle:flashversionerror"});t.extend(F,{RECEIVE_DATA:"creyle:swf_receivedata",EMBED:"creyle:swf_embed",APPLICATION_COMPLETE:"creyle:swf_applicationComplete",TOKEN_RECEIVED:"creyle:swf_tokenReceived",TOKEN_FAILURE:"creyle:swf_tokenFailure",PROGRESS:"creyle:swf_progress",ERROR:"creyle:swf_error",OPEN_DIALOG:"creyle:swf_openDialog",CLOSE_DIALOG:"creyle:swf_closeDialog",SELECT_COLOR:"creyle:swf_selectColor",OPEN_PICKER:"creyle:swf_openPicker",
CLOSE_PICKER:"creyle:swf_closePicker",GEOCODE_SUCCESS:"creyle:swf_geocodeSuccess",GEOCODE_REQUEST:"creyle:swf_geocodeRequest",UPLOAD_COMPLETE:"creyle:swf_upload_complete",UPLOAD_CHUNK_COMPLETE:"creyle:swf_upload_chunk_complete",MAP_MOVE_START:"creyle:swf_mapMoveStart",MAP_MOVE_STEP:"creyle:swf_mapMoveStep",MAP_PIN_EDIT:"creyle:swf_mapPinEdit",MAP_MOVE_END:"creyle:swf_mapMoveEnd",MAP_ZOOM_CHANGED:"creyle:swf_mapZoomChanged",MAP_TYPE_CHANGED:"creyle:swf_mapTypeChanged"});Q.Event=K;Q.FlashEvent=F;Q.ErrorEvent=
W})(v.events);(function(Q){var K=l.create({initialize:function(){this.__dispatcher__=new EventDispatcher},addEventListener:function(W,F){this.__dispatcher__.addEventListener(W,F)},removeEventListener:function(W,F){this.__dispatcher__.removeEventListener(W,F)},dispatchEvent:function(W){if(W&&W.type){G.log(W);this.__dispatcher__.dispatchEvent(W.type,[W])}}});Q.EventDispatcher=K})(v.events);(function(Q){var K=l.create(v.events.EventDispatcher,{initialize:function($super,F){$super();this.sizzle=t.extend(t.clone(((this.__proto__||
this).constructor||{}).sizzle||{})||{},this.sizzle);if(this.apiLocation)this.apiLocation=t.clone(this.apiLocation);this.div=F},superMethod:function(W){var F=$A(arguments);F.shift();return this.constructor.superclass.prototype[W].apply(this,F)},getClassName:function(){throw new Error("Not inplemented getClassName. This method is abstract.");},initElements:function(){},getDelegate:function(){var W=this,F=W.div,N=W.getClassName();if(N){N=this.constructor[N];try{if(W instanceof N)return W;W=new N}catch(J){}}if(F){W.div=
F;a(F).data("instance",W)}return W},div:null,sizzle:null});t.extend(K,{sizzle:{},extendStatic:function(W,F){K.addStatic(W,F.__static__||{})},addStatic:function(W,F){for(var N in F)if(F[N])if(W[N]&&typeof W[N]=="object")t.extend(W[N]||{},F[N]);else W[N]=F[N];W.__static__=F}});Q.Component=K})(v);var I=v.Component;(function(Q){var K={},W=l.create(I,{initialize:function($super,J,L,ba,aa,ca,ua){$super();var ka=this;ka.swfUrl=J;ka.width=L||ka.width;ka.height=ba||ka.height;ka.flashvars=aa;ka.params=ca||
{};ka.params.wmode=ka.params.wmode||"opaque";ka.attributes=ua;do J="external_"+(new f(20)).toString();while(F[J]);F[J]=function(ra,ma){ra=new v.events.Event(ra);ra.memo=ma;G.log(ra);ka.dispatchEvent(ra)};ka.externalId=J;K[J]=ka},externalId:"",swfUrl:"",width:"100%",height:"100%",version:"9.0",expressInstallSwfurl:"",getObject:function(){return null},noPlayerMessage:"\u6700\u65b0\u306e Flash Player \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u4e0b\u3055\u3044",callbackToSWF:function(N){var J=
$A(arguments);N=J.shift();var L=this.getObject(),ba=[];J.each(function(ca){ca.toJSON&&ba.push(ca.toJSON())});if(!L[N])throw new Error("No such a method! :"+N+"("+ba.join(",")+")");try{return L[N].apply(L,J)}catch(aa){G.log(aa)}},dispatchSWFEvent:function(N,J){return this.callbackToSWF("callback",N,J)},render:function(N){var J=this;if(!(parent==null||J.div))if(c.hasFlashPlayerVersion(J.version)){J.div=N;var L="external_c2_"+J.externalId;G.log(N);a(N).append((new j('<div id="#{divId}"></div>')).evaluate({divId:L}));
N=J.flashvars||{};N.data=N.data||{};if(!N.data.meta)N.data.meta=v.meta;N.data.browser=a.browser;N.data=encodeURIComponent(r.stringify(N.data));var ba=J.attributes||{};ba.name=L;t.extend(N,{callbackNamespace:"creyle.Flash.__external__."+J.externalId});var aa=J.params||{};aa.allowScriptAccess=aa.allowScriptAccess||"always";c.embedSWF((new j(J.swfUrl)).evaluate(v.meta),L,J.width,J.height,J.version,J.expressInstallSwfurl,N,aa,ba,function(ca){G.log(ca)});J.getObject=function(){return e[L]||z[L]}}else setTimeout(function(){alert(J.noPlayerMessage);
var ca=v.events.ErrorEvent;J.dispatchEvent(new ca(ca.FLASH_VERSION_ERROR,J.noPlayerMessage))},99)}}),F=W.__external__={};Q.Flash=W})(v);(function(Q){var K=l.create(I,{initialize:function($super,F){$super(F)},getToken:function(W){W.apply(this,[{memo:{}}])},stored:false});Q.Service=K})(v.service);var Y=v.service.Service;(function(Q){var K=jQuery,W=l.create(Y,{initialize:function($super,N){$super(N);this.removed_field_ids=[];var J=this.getForm();a(N).data("entry",this);if(J.site_entry_id&&J.site_entry_id.value)this.id=
J.site_entry_id.value},sizzle:null,apiLocation:{create:"service/site_entry/create",update:"service/site_entry/update",delete_:"service/site_entry/delete"},edit:function(){var F=this;if(F.beforeEdit&&F.beforeEdit()==false)return false;K(F.sizzle.createFieldButton,F.div).click(function(){var J=K(this);if(!J.attr("rel").match(F.sizzle.createFieldRegExp))return alert("Field class error("+J.attr("rel")+")");F.createField(d.$1,J.hasClass("prepend"));return false});K(F.sizzle.fieldsWrapper,F.div).sortable({items:W.Field.sizzle.self,
opacity:0.5,cancel:".edit,textarea,input,select,.sort-cancel,object,embed",start:function(){F.beginSort()},stop:function(){F.endSort()}});var N=W.Field.idPrefix;K(W.Field.sizzle.self,F.div).each(function(){var J=K(this),L=J.attr("class").match(N+"([0-9A-Za-z_]+)")&&d.$1,ba=W.Field[L];if(!ba)return alert("Field class error("+J.attr("class")+")");L=new ba(L,this,F);if(J.attr("id").match("^"+N+"([0-9]+)$"))L.id=d.$1;L.prepareEdit()});F.afterEdit&&F.afterEdit()},createField:function(F,N){var J=this,L=
W.Field[F];if(!L)return alert("Field class error("+F+")");F=new L(F,K(W.Field.divTmpl.evaluate({"class":F})).get(0),J);J=K(J.sizzle.fieldsWrapper,J.div);N?J.prepend(F.div):J.append(F.div);F.prepareEdit()!=false&&F.loadEdit();return F},save:function(F){var N=this,J=v.meta.DocumentRoot+(N.id?N.apiLocation.update:N.apiLocation.create),L=N.getFormData();if(F!=q)L.status=F;if((F=K("."+W.Field.idPrefix+"Title",N.div).data("field"))&&(F.state==3||F.data))L.title=F.state==3?F.editingData().title:F.data.title;
var ba=L.fields=[],aa=0;N.$getFieldWrappers().each(function(){var ca=K(this).data("field"),ua=ca.state==3?ca.editingData():ca.data?K.extend({},ca.data):{};ua["class"]=ca._class_;ua.delete_ok=K(this).hasClass("delete_ok")?1:0;ca.id?(ua.id=ca.id):(ua._do="create");ua.sort_order=++aa;ba.push(ua)});K.each(N.removed_field_ids,function(){ba.push({_do:"delete",id:this})});v.util.post(J,L,function(ca){if(!ca)return alert("\u901a\u4fe1\u30a8\u30e9\u30fc");if(!ca.is_success||!ca.entry)return alert(N.err2str(ca));
N.id=ca.entry.id;N.getForm().lock_version.value=ca.entry.lock_version;N.afterSave&&N.afterSave()})},destroy:function(){var F=this;v.util.post(v.meta.DocumentRoot+F.apiLocation.delete_,F.getFormData(),function(N){if(!N)return alert("\u901a\u4fe1\u30a8\u30e9\u30fc");if(!N.is_success)return alert(F.err2str(N));F.afterDestroy&&F.afterDestroy()})},beginSort:function(){this.sorting=true;this.$getFieldWrappers().filter(":not(.ui-sortable-placeholder)").each(function(){K(this).data("field").beginSort()})},
endSort:function(){this.$getFieldWrappers().each(function(){K(this).data("field").endSort()});this.sorting=false},$getFieldWrappers:function(){return K(this.sizzle.fieldsWrapper,this.div).children(W.Field.sizzle.self)},getForm:function(){return K(this.sizzle.entryCommonForm,this.div).get(0)},getFormData:function(){var F=g.serialize(this.getForm(),{hash:true});F.id=F.site_entry_id;return F},err2str:function(F){var N=[],J=function(L,ba){if(L&&L.msg)N.push((ba||"")+L.msg)};F.error&&N.push(F.error);if(F.errors instanceof
Array)F.errors.each(J);else if(F.errors instanceof t){F.errors.entry instanceof Array&&F.errors.entry.each(J);F.errors.fields instanceof Array&&F.errors.fields.each(function(L){L.errors.each(function(ba){J(ba,"\u3010"+L.name+"\u3011 ")})})}return N.join("\n")}});I.addStatic(W,{sizzle:{createFieldButton:"a[rel^='create-field']",createFieldRegExp:"^create-field:([0-9A-Za-z_]+)$",fieldsWrapper:"div#entry-content",entryCommonForm:"form#entry-data"}});Q.SiteEntry=W})(v.service);(function(Q){var K=l.create(Y,
{initialize:function($super,F,N){$super(null);var J=this;if(!F)throw new Error("baseDir is not defined");if(!N)N=v.getMeta().SiteId;if(!N)throw new Error("siteId is not defined");J.siteId=N;J.baseDir=F;J.data={}},siteId:null,baseDir:"",set:function(W,F){var N=this,J={site_id:N.siteId,csrf_token:v.meta.CsrfToken};a.each(W,function(aa){if(this instanceof Array)J[aa+"[]"]=this.toJSON();else if(typeof this=="object")J[aa+"{}"]=t.toJSON(this);else J[aa]=this.toString()});var L=v.events.Event,ba=v.events.ErrorEvent;
N.getToken(function(aa){if(aa.memo.token)J.token=aa.memo.token;a.post((new j(v.meta.DocumentRoot+N.apiLocation.set)).evaluate({baseDir:N.baseDir}),J,function(ca){typeof F=="function"&&F.apply(F,[ca]);!ca||!ca.is_success?N.dispatchEvent(new ba(ba.ERROR,v.util.summarizeErrors(ca,"\u4fdd\u5b58\u306b\u5931\u6557\u3057\u307e\u3057\u305f"))):[L.SUCCESS,L.UPDATE].each(function(ua){ua=new L(ua);ua.memo.data=N.data;N.dispatchEvent(ua)})})})},data:null,get:function(W){var F=this,N={site_id:F.siteId,csrf_token:v.meta.CsrfToken},
J=v.events.Event,L=v.events.ErrorEvent;F.getToken(function(ba){if(ba.memo.token)N.token=ba.memo.token;a.post((new j(v.meta.DocumentRoot+F.apiLocation.get)).evaluate({baseDir:F.baseDir}),N,function(aa){if(typeof W=="function")W.apply(W,[(aa||{}).value]);if(!aa||!aa.is_success)F.dispatchEvent(new L(L.ERROR,v.util.summarizeErrors(aa,"\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f")));else{F.data=aa.value;var ca=new J(J.SUCCESS);ca.memo=ca.memo||{};ca.memo.data=aa.value;F.dispatchEvent(ca)}})})},
apiLocation:{set:"service/#{baseDir}/update_or_create",get:"service/#{baseDir}/get_info",delete_:"service/#{baseDir}/delete"}});Q.SiteKeyValue=K})(v.service);(function(Q){var K=jQuery,W=l.create(Y,{initialize:function($super,N,J,L){$super();this._class_=N;this.div=J;this.entry=L;this.state=0;K(J).data("field",this)},entry:null,id:h,apiLocation:{render:"api/field/_render_/"},changeState:function(F,N){if(this.state!=F)return false;this.state=N;return true},prepareEdit:function(){var F=this;if(F.changeState(0,
1)){var N=K("div.edit:first",F.div).get(0);if(N){var J=K(N).prevAll();K(F.div).prepend(K('<div class="edit-overlay" />').append(J).hide());F.div_edit=N;F.beginEdit()}else K(F.sizzle.overlay,F.div).length||K(F.div).wrapInner('<div class="edit-overlay" />');K(F.sizzle.overlay,F.div).prepend(F.naviSpanHtml()).mouseover(function(){K(this).parent().addClass("hover")}).mouseout(function(){K(this).parent().removeClass("hover")}).mouseup(function(){!F.entry.sorting&&F.changeState(1,2)&&F.loadEdit();K(this).parent().removeClass("hover")}).get(0).onselectstart=
function(){return false}}},loadEdit:function(){var F=this,N=v.meta.DocumentRoot+F.apiLocation.render+F._class_,J=F.entry.getFormData();if(F.id)J.field_id=F.id;if(F.data)J.data=F.data;J.mode="edit";v.util.post(N,J,function(L){K(F.sizzle.overlay,F.div).hide();K(F.div).append(F.div_edit=K('<div class="edit" />').get(0));K(F.div_edit).html(L.html);K("form",F.div_edit).submit(function(){return false});F.beginEdit()})},beginEdit:function(){var F=this;K(F.sizzle.endEditButton,F.div_edit).click(function(){F.endEdit();
return false});var N=K(F.sizzle.cancelButton,F.div_edit).click(function(){F.cancel();return false});!F.id&&!F.data&&N.hide();K(F.sizzle.destroyButton,F.div_edit).click(function(){F.destroy();return false});F.state=3},endEdit:function(){var F=this,N=v.meta.DocumentRoot+F.apiLocation.render+F._class_,J=F.entry.getFormData();if(F.id)J.field_id=F.id;J.data=F.editingData();J.validate=1;v.util.post(N,J,function(L){if(!L.is_success)return alert(F.entry.err2str(L));K(F.sizzle.overlay,F.div).html(F.naviSpanHtml()+
L.html);F.data=J.data;F.cancel()})},cancel:function(){var F=this;K(F.sizzle.overlay,F.div).show();K(F.div_edit).remove();F.div_edit=null;F.state=1},destroy:function(){if(!confirm("\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f"))return false;var F=this;F.id&&F.entry.removed_field_ids.push(F.id);K(F.div).remove()},beginSort:function(){},endSort:function(){},naviSpanHtml:function(){var F="\u30af\u30ea\u30c3\u30af\u3057\u3066\u7de8\u96c6";if(K(this.div).parents(".ui-sortable").length)F+=
" or \u30c9\u30e9\u30c3\u30b0\u3057\u3066\u79fb\u52d5";return'<span class="edit-field">'+F+"</span>"},editingData:function(){return g.serialize(this.getForm(),{hash:true})},getForm:function(){return K("form:first",this.div_edit).get(0)}});I.addStatic(W,{idPrefix:"site-entry-field-",divTmpl:new j('<div class="field-wrapper site-entry-field-#{class} delete_ok" />'),sizzle:{self:"div.field-wrapper",overlay:"div.edit-overlay:first",endEditButton:".endEditButton",cancelButton:".cancelButton",destroyButton:".destroyButton"}});
Q.Field=W})(v.service.SiteEntry);(function(Q){var K=jQuery,W=l.create(Q,{prepareEdit:function(){var F=this;K(F.div).show();F.superMethod("prepareEdit");F.entry.id||F.loadEdit()},beginEdit:function(){var F=this;F.input().val(F.h1().text());F.superMethod("beginEdit")},endEdit:function(){var F=this;F.data=F.editingData();F.h1().text(F.data.title);F.cancel()},h1:function(){return K("div.edit-overlay:first h1",this.div)},input:function(){return K("#site-entry-title",this.div_edit)}});I.extendStatic(W,
Q);Q.Title=W})(v.service.SiteEntry.Field);(function(Q){var K=l.create(Q,{});I.extendStatic(K,Q);Q.Header=K})(v.service.SiteEntry.Field);(function(Q){var K=jQuery,W=l.create(Q,{beginEdit:function(){var F=this,N=e.tinyMCE;N.initialized||F.initMce();var J=K(".link_dialog",F.div_edit).remove();N.$link_dialog||F.initMceLinkDialog(J);do J="entry_field_tiny_mce_"+new f(8);while(K("#"+J).size());F.mceId=J;K("textarea:first",F.div_edit).attr("id",J);N.execCommand("mceAddControl",false,F.mceId);F.superMethod("beginEdit")},
editingData:function(){return{html:tinyMCE.get(this.mceId).getContent()}},beginSort:function(){if(!(this.state<=1||!this.mceId)){tinyMCE.execCommand("mceToggleEditor",false,this.mceId);this.mceToggleEditor=true}},endSort:function(){if(this.mceToggleEditor){tinyMCE.execCommand("mceToggleEditor",false,this.mceId);this.mceToggleEditor=false}},initMce:function(){var F=this,N=e.tinyMCE;N.initialized=1;N.baseURL=v.meta.StaticRoot+"/core/js/tiny_mce";N.init({mode:"none",theme:"advanced",content_css:v.meta.StaticRoot+
"/css/entry_field_tiny_mce.css",language:"ja",plugins:"paste,noneditable,autoresize",theme_advanced_buttons1:"bold,forecolor,backcolor,fontsizeselect,removeformat,link,unlink",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_more_colors:0,forced_root_block:false,force_br_newlines:true,force_p_newlines:false});var J=N.themes.AdvancedTheme.prototype;J._init=J.init;J.init=function(L,ba){L.onInit.addToTop(function(){L.getBody().style.margin=
"0 2px";K("span.mce_removeformat:first",F.div_edit).parent().attr("title","\u30d5\u30a9\u30f3\u30c8\u6307\u793a\u89e3\u9664")});var aa=L.onInit.add;L.onInit.add=function(){};this._init(L,ba);L.onInit.add=aa;ba=tinymce.plugins.AutoResizePlugin.prototype;if(tinymce.isIE&&!ba._init){ba._init=ba.init;ba.init=function(ca,ua){this._init(ca,ua);if(this.editor){var ka=this,ra=function(){var ma=ca.getDoc(),la=ma.body,Da=ma.documentElement;ma=tinymce.DOM;var za=ka.autoresize_min_height;Da=tinymce.isIE?la.scrollHeight:
Da.offsetHeight;if(Da>ka.autoresize_min_height)za=Da;ma.setStyle(ma.get(ca.id+"_ifr"),"height",za+"px");ma.setStyle(la,"height",za+"px");if(ka.throbbing){ca.setProgressState(false);ca.setProgressState(true)}};K.each(["onChange","onSetContent","onPaste","onKeyUp","onPostRender"],function(){var ma=ca[this];ma.listeners[ma.listeners.length-1].cb=ra})}}}};J.__createFontSizeSelect=J._createFontSizeSelect;J._createFontSizeSelect=function(){var L=this.__createFontSizeSelect(),ba=this.editor;L.settings.onselect=
function(aa){if(aa["class"]){ba.focus();ba.formatter.toggle("fontsize_class",{value:aa["class"]})}else aa&&ba.execCommand("FontSize",false,aa.fontSize);return false};return L};J._mceLink=function(){var L=this.editor;if(N.isIE)L.windowManager.bookmark=L.selection.getBookmark(1);var ba=N.$link_dialog;if(ba){ba.editorId=L.editorId;ba.dialog("open")}if(ba=ba.find("form:first").get(0)){var aa=L.dom.getParent(L.selection.getNode(),"A");ba.href.value=aa?L.dom.getAttrib(aa,"href"):"";ba.target_list.value=
aa?L.dom.getAttrib(aa,"target"):"";ba.linktitle.value=aa?L.dom.getAttrib(aa,"title"):""}};if(tinymce.isIE&&/MSIE [67]/.test(navigator.userAgent)){J=tinymce.Editor.prototype;J.__addEvents=J._addEvents;J._addEvents=function(){this.__addEvents();this.onKeyDown.addToTop(function(L,ba){if(ba.keyCode==229)return false})}}},initMceLinkDialog:function(F){F=tinyMCE.$link_dialog=F.dialog({autoOpen:0,title:"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6",width:340,height:160,resizable:0,modal:1});F.parent().addClass("ui-dialog-h160");
F.set_link=function(N){var J=this,L=N.form;v.util.post(v.meta.DocumentRoot+"service/validator/validate",{value:L.href.value,options:["nn","url_or_mailto"]},function(ba){if(!ba)return alert("\u901a\u4fe1\u30a8\u30e9\u30fc");if(!ba.is_success)return alert("\u3010\u30ea\u30f3\u30afURL\u3011"+ba.errors.join("\n"));var aa=tinyMCE.get(J.editorId);tinyMCE.isIE&&aa.selection.moveToBookmark(aa.windowManager.bookmark);var ca=aa.dom.getParent(aa.selection.getNode(),"A");aa.execCommand("mceBeginUndoLevel");if(!L.href.value&&
ca){b=aa.selection.getBookmark();aa.dom.remove(ca,1);aa.selection.moveToBookmark(b)}else{if(!ca){aa.getDoc().execCommand("unlink",false,null);aa.execCommand("CreateLink",false,"#mce_temp_url#",{skip_undo:1});tinyMCE.each(aa.dom.select("a"),function(ua){if(!ca&&aa.dom.getAttrib(ua,"href")=="#mce_temp_url#")ca=ua})}ca&&aa.dom.setAttribs(ca,{href:L.href.value,title:L.linktitle.value,target:L.target_list.value})}aa.execCommand("mceEndUndoLevel");J.dialog("close")})}}});I.extendStatic(W,Q);Q.TinyMce=W})(v.service.SiteEntry.Field);
(function(Q){var K=jQuery,W=l.create(Q,{beginEdit:function(){var F=this,N=K("form:first",F.div_edit).get(0),J=K(".preview:first",F.div_edit),L=K(".slider:first",F.div_edit);if(!F.img_sfx)F.img_sfx=r.parse(L.attr("rel")||"{}");var ba=K(".options:first",F.div_edit);K("input:radio",F.div_edit).click(function(){J.parent().css("text-align",this.value)});K(".uploader",F.div_edit).each(function(){var aa=new v.net.ImageUploader(K("input:button",this).get(0)),ca=K("span",this);aa.render(this);aa.addEventListener(v.events.FlashEvent.TOKEN_RECEIVED,
function(){ca.width(0)});aa.addEventListener(v.events.FlashEvent.PROGRESS,function(ua){ca.animate({width:parseInt(ua.memo.progress*50)+"%"})});aa.addEventListener(v.events.FlashEvent.UPLOAD_COMPLETE,function(ua){ca.animate({width:"75%"});ba.show();var ka=ua.memo.uploaded;L.slider("value",100);ua="_"+F.img_sfx[F.img_sfx.length-1].suffix+".";J.removeAttr("style").removeAttr("width").removeAttr("height").attr("src",v.meta.UploadHost+ka.url+ua+ka.ext).load(function(){ca.animate({width:"100%"});N.uploaded.value=
t.toJSON(ka);N.max_width.value=N.width.value=J.get(0).width;N.max_height.value=N.height.value=J.get(0).height;L.slider("value",N.slider.value=100)})});aa.addEventListener(v.events.FlashEvent.ERROR,function(ua){ca.animate({width:0});alert(v.util.flashUploadError2Message(ua.memo.errorMessage))})});L.slider({min:10,step:5,value:100,slide:function(aa,ca){aa=(N.slider.value=ca.value)/100;J.get(0).style.width=(N.width.value=parseInt(N.max_width.value*aa))+"px";N.height.value=parseInt(N.max_height.value*
aa)}});if(N&&N.uploaded.value){ba.show();L.slider("value",N.slider.value)}else ba.hide();F.superMethod("beginEdit")},editingData:function(){var F=this,N=g.serialize(K("form:first",F.div_edit).get(0),{hash:true});if(N.uploaded)N.uploaded=r.parse(N.uploaded);K.each(F.img_sfx,function(){if(N.width<=this.width&&N.height<=this.height){N.suffix=this.suffix;return false}});return N}});I.extendStatic(W,Q);Q.Picture=W})(v.service.SiteEntry.Field);(function(Q){var K=jQuery,W=l.create(Q,{beginEdit:function(){var F=
this,N=K(".preset_name_dialog",F.div_edit).remove();if(!W.$dialog){W.$dialog=N.dialog({autoOpen:0,title:"\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u3057\u3066\u4fdd\u5b58",width:340,height:60,resizable:0,modal:1});W.$dialog.parent().addClass("ui-dialog-h60")}N=K(F.sizzle.rowTemplate,F.div_edit).remove();F.rowTemplate="<tr>"+N.html().replace(/\t|\n|\r/g,"")+"</tr>";N=[["",""]];try{N=K("input[name=rows]",F.div_edit).val().evalJSON()}catch(J){}N.each(function(ra){F.addRow(ra[0],ra[1])});K(F.sizzle.addRowButton,
F.div_edit).click(function(){F.addRow("","");return false});var L=new v.service.SiteKeyValue("site_entry_field_table_preset"),ba=K("table",F.div_edit).get(0),aa=K(".select-preset",F.div_edit).get(0),ca=K(".delete-preset",F.div_edit).get(0),ua=function(){aa.disabled=aa.options.length<=1;ca.disabled=aa.selectedIndex==0},ka=function(ra,ma){aa.disabled=ca.disabled=1;L.set({preset:ra},function(la){la.is_success&&ma(la);ua()})};ua();K(aa).change(function(){if(!(ca.disabled=!aa.selectedIndex)){var ra=K("textarea",
ba).map(function(){return this.value}).get();K("tr",ba).remove();this.value.evalJSON().each(function(ma){F.addRow(ma,ra.shift()||"")})}});K(".delete-preset",F.div_edit).click(function(){if(!confirm("\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f"))return false;var ra=F.getPreset(),ma=aa.selectedIndex;ra.splice(ma-1,1);aa.selectedIndex=0;ka(ra,function(){K(aa.options[ma]).remove()});return false});K("a[rel=addToPreset:self]",F.div_edit).click(function(){K("form",W.$dialog).get(0).onsubmit=
function(){var ra=this.name.value;if(!ra)return false;var ma=K(".th input",ba).map(function(){return this.value}).get(),la=F.getPreset();la.push({name:ra,items:ma});ka(la,function(){K(aa).append(K("<option />").val(t.toJSON(ma)).text(ra))});W.$dialog.dialog("close");return false};W.$dialog.dialog("open");return false});F.superMethod("beginEdit")},addRow:function(F,N){var J=this,L=K(J.rowTemplate).appendTo(J.getEditTable());K("input:first",L).val(F);K("textarea:first",L).val(N);K(J.sizzle.deleteRowButton,
L).click(function(){J.deleteRow(this);return false})},deleteRow:function(F){if(K(F).parents("table:first").get(0).rows.length==1){alert("\u8868\u3092\u7a7a\u306b\u3059\u308b\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093");return false}if(!confirm("\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f"))return false;K(F).parents("tr:first").remove()},getPreset:function(){var F=[],N=0;K(".select-preset option",this.div_edit).each(function(){N++&&F.push({name:K(this).text(),items:this.value.evalJSON()})});
return F},getEditTable:function(){return K(this.sizzle.editTable,this.div_edit).get(0)},rowTemplate:null,getRows:function(){var F=[];K("tr",this.getEditTable()).each(function(){F.push([K("input:first",this).val(),K("textarea:first",this).val()])});return F},editingData:function(){return{rows:this.getRows()}}});I.extendStatic(W,Q);I.addStatic(W,{sizzle:{addRowButton:"a[rel=self:addrow]",deleteRowButton:"a[rel=self:deleterow]",rowTemplate:"tr.--template--",editTable:".editField table"},presets:[]});
Q.Table=W})(v.service.SiteEntry.Field);(function(Q){var K=jQuery,W=v.events.FlashEvent,F=l.create(Q,{beginEdit:function(){function N(la){if(!ca){ca=a("<div class='googlemaps-input sort-cancel'><form action='.' onsubmit='return false;'><div style='padding-bottom:5px;'><input type='text' name='title' class='input-title' /></div><div><textarea name='text' class='input-text'></textarea></div><input type='submit' class='submit' style='display:none' /></form></div>");a(L.div).append(ca);ua=a(".input-text",
ca);ka=a(".input-title",ca);aa.addEventListener(W.OPEN_PICKER,function(){ca.addClass(s)});aa.addEventListener(W.CLOSE_PICKER,function(){ca.removeClass(s)});aa.addEventListener(W.SELECT_COLOR,function(Da){ra=Da.memo.color});a("form",ca).unbind(u).bind(u,function(){aa.callbackToSWF("closePopup",true)})}ka.val(la.memo.title||"");ua.val(la.memo.text||"");ra=la.memo.color;ca.removeClass(s)}function J(la){ca.addClass(s);la.memo.ok&&L.updateMarker(la.memo.index,ka.val(),ua.val(),ra)}var L=this,ba=K("form",
L.div_edit).get(0),aa=F.render(ba);aa.addEventListener(W.APPLICATION_COMPLETE,function(){aa.callbackToSWF("setEditing",true)});aa.addEventListener(W.GEOCODE_SUCCESS,function(la){try{var Da=la.memo.response.placemarks[0].address;Da&&K("input.geocode-text",L.div_edit).val(Da)}catch(za){}});var ca,ua,ka,ra;aa.addEventListener(W.OPEN_DIALOG,N);aa.addEventListener(W.CLOSE_DIALOG,J);aa.addEventListener(W.SELECT_COLOR,function(la){ra=la.memo.color});K(ba).submit(function(){aa.callbackToSWF("doGeocode",K("input.geocode-text",
L.div_edit).val());return false});K("a[rel=attachPin:self]",L.div_edit).click(function(){aa.callbackToSWF("attachPin");return false});var ma=function(la){la=la.memo;ba.lat.value=la.lat;ba.lng.value=la.lng;ba.zoom.value=la.zoom;ba.type.value=la.type;L.markers=la.markers};aa.addEventListener(W.MAP_MOVE_END,ma);aa.addEventListener(W.MAP_ZOOM_CHANGED,ma);aa.addEventListener(W.MAP_TYPE_CHANGED,ma);aa.addEventListener(W.MAP_PIN_EDIT,ma);L.flash=aa;L.superMethod("beginEdit")},updateMarker:function(N,J,L,
ba){this.flash.callbackToSWF("updateMarker",N,J,L,ba)},editingData:function(){var N=this,J=N.superMethod("editingData");J.markers=N.markers;return J}});I.extendStatic(F,Q);Q.GoogleMaps=F;F.render=function(N){if(typeof N=="string")N=K("#"+N).hide().get(0);if(!N.initialized){N.initialized=1;var J=g.serialize(N,{hash:true}),L=new v.Flash(v.meta.HTTPStaticRoot+"/core/swf/maps.swf");t.extend(J,{showMapTypeControl:true,showPositonControl:true,showScaleControl:true,showZoomControl:true});L.flashvars={data:J,
key:v.meta.GoogleMapsApiKey};J=K(N).parents(this.sizzle.self+":first");J.children(":first").attr("class")!="edit-overlay"&&J.wrapInner('<div class="edit-overlay" />');L.render(K('<div class="flash" />').appendTo(K(".map",N.parentNode)).get(0));return L}}})(v.service.SiteEntry.Field);(function(Q){var K=jQuery,W=function(){GlbsMap==q&&K.ajax({async:false,url:crelye.meta.ZenrinMapsApiUrl,dataType:"script",data:{key:v.meta.ZenrinMapsApiKey,enc:"utf8"}})},F=function(J,L,ba,aa){J.clearDoc();J.title=L;J.text=
ba;L&&J.appendDoc("<h5>"+L+"</h5>");ba&&J.appendDoc("<p>"+ba+"</p>");aa&&J.appendDoc(K(".zm-popup-ctrl").html())},N=l.create(Q,{beginEdit:function(){var J=this,L=K("form",J.div_edit).get(0),ba=N.render(L,true);J.map=ba[0];J.pin=ba[1];var aa=function(ka){if(ka){var ra=ka.getShape();L.markers.value=[{lng:ra.x,lat:ra.y,title:ka.title,text:ka.text}].toJSON()}else L.markers.value="[]"};J.map.addEventHandler("MapClick",function(ka){if(J.pin)J.pin.setShape(ka.pos);else{J.pin=new GlbsUserData(ka.pos);F(J.pin,
"","",true);J.map.addUserData(J.pin)}aa(J.pin)});K("a.zm-pin-del",J.div_edit).live("click",function(){J.map.removeUserData(J.pin.getId());J.pin=null;aa(null);return false});K("a.zm-pin-edit",J.div_edit).live("click",function(){if(!J.dialog)J.dialog=K("div.zm-input",J.div_edit).dialog({autoOpen:false,draggable:false,resizable:false,modal:true,title:"\u30d4\u30f3\u306e\u60c5\u5831\u3092\u7de8\u96c6",open:function(){var ka=K(this),ra=K("div.map",J.div_edit),ma=ra.offset(),la=K(e);ra=[ma.left-la.scrollLeft()+
ra.width()/2-ka.width()/2,ma.top-la.scrollTop()+ra.height()/2-ka.height()];ka.dialog("option","position",ra);K(".input-title",this).val(J.pin.title);K(".input-text",this).val(J.pin.text);J.map.selectUserData(null)},close:function(){J.map.selectUserData(J.pin.getId())},buttons:{"\u30ad\u30e3\u30f3\u30bb\u30eb":function(){K(this).dialog("close")},OK:function(){var ka=K(".input-title",this).val(),ra=K(".input-text",this).val();F(J.pin,ka,ra,true);aa(J.pin);K(this).dialog("close")}}});J.dialog.dialog("open");
return false});K("a[rel=attachPin:self]",J.div_edit).click(function(){if(!J.pin){J.pin=new GlbsUserData(J.map.getCenterPos());F(J.pin,"","",true);J.map.addUserData(J.pin);aa(J.pin)}return false});J.map.addEventHandler("MapExtentChange",function(ka){ka.newPos.toMs();L.lng.value=ka.newPos.x;L.lat.value=ka.newPos.y;L.zoom.value=ka.newLevel});var ca=function(ka){if(ka.result.status==100){i=ka.result.items[0];J.map.moveTo(new GlbsPoint(i.x,i.y),null)}else alert("["+ka.result.status+"] \u4f4f\u6240\u306e\u691c\u7d22\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002")},
ua=new GlbsAddressSearch;ua.addEventHandler("end",ca);K(L).submit(function(){var ka=K("input.geocode-text",J.div_edit).val();if(ka){var ra=new GlbsAddressSearchSettings;ra.freeWord=ka;ua.search(ra,ca)}return false});J.superMethod("beginEdit")},endEdit:function(){K(this.sizzle.overlay,this.div).html("").show();this.superMethod("endEdit")}});I.extendStatic(N,Q);Q.ZenrinMaps=N;N.render=function(J,L){if(typeof J=="string")J=K("#"+J).hide().get(0);if(!J.initialized){J.initialized=1;W();var ba=g.serialize(J,
{hash:true});ba.markers=r.parse(ba.markers);var aa=new GlbsProperties;aa.initPos=new GlbsPoint(ba.lng,ba.lat);aa.initZoomLevel=ba.zoom;aa.mapType=parseInt(ba.type);aa.size=new GlbsSize(730,480);aa.wheelZoom=true;aa.outerBorder=false;aa.mmpZoomToolPos=5;aa.mmpScaleBarPos=2;var ca=new GlbsMap(false);ca.initialize(K("div.map",K(J).parent()).get(0),aa);J=null;if(ba.markers.length){ba=ba.markers[0];J=new GlbsUserData(new GlbsPoint(ba.lng,ba.lat));F(J,ba.title,ba.text,L);ca.addUserData(J)}return[ca,J]}}})(v.service.SiteEntry.Field);
(function(Q){var K=l.create(Y,{initialize:function($super){$super()}});Q.Gadget=K})(v.service);(function(Q){var K=l.create({initialize:function(W){var F=parseUri(W),N=this;parseUri.options.key.each(function(J){N[J]=F[J]||""});N.queryParams=F.queryKey},source:"",protocol:"",authority:"",userInfo:"",user:"",password:"",host:"",port:"",relative:"",path:"",directory:"",file:"",query:"",anchor:"",queryParams:""});t.extend(K,{documentRoot:"/"});Q.URI=K;n(function(){if(v.getMeta().DocumentRoot)K.documentRoot=
v.getMeta().DocumentRoot})})(v.net);(function(Q){var K=l.create(v.Flash,{initialize:function($super,F,N){var J=this;J.swfUrl=N||J.swfUrl;J.button=F;$super(J.swfUrl,1,1,{},{},{})},multipleSelect:false,button:null,render:function(W){var F=this,N=F.projectId||v.meta.ProjectId;if(!N)throw new Error("No projectId");F.flashvars.data={projectId:N,multipleSelect:!!F.multipleSelect,maxFiles:F.maxFiles||-1,maxFilesErrorMessage:F.maxFilesErrorMessage,tokenExpires:F.tokenExpires||60};N=a(F.button);W=W||N.parent()[0];
F.attributes.style=["position:absolute;cursor:pointer;display:block;z-index:9999;outline:0;top:",F.button.offsetTop,"px;left:",F.button.offsetLeft,"px;width:",F.button.offsetWidth,"px;height:",F.button.offsetHeight,"px;"].join("");F.params.wmode="transparent";F.params.menu=false;a.browser.webkit&&F.addEventListener(v.events.FlashEvent.APPLICATION_COMPLETE,function(){F.getObject().focus()});F.superMethod("render",W)},swfUrl:"#{StaticRoot}/core/swf/creyle.uploader.swf",browse:function(){this.callbackToSWF("browse")},
projectId:""});Q.ImageUploader=K})(v.net);e.creyle=v;p()})(jQuery.noConflict(),swfobject,window,RandomString,RegExp,Form,Template,Prototype,Class,JSON,Object,undefined);
(function(a){function c(r){a(r).click(function(){e(this.title||this.name||null,this.href||this.alt,this.rel||false);this.blur();return false})}function e(r,t,q){try{if(typeof document.body.style.maxHeight==="undefined"){a("body","html").css({height:"100%",width:"100%"});a("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){a("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");a("#TB_overlay").click(d)}}else if(document.getElementById("TB_overlay")===
null){a("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");a("#TB_overlay").click(d)}l()?a("#TB_overlay").addClass("TB_overlayMacFFBGHack"):a("#TB_overlay").addClass("TB_overlayBG");if(r===null)r="";a("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");a("#TB_load").show();var p=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/,o=(t.indexOf("?")!==-1?t.substr(0,t.indexOf("?")):t).toLowerCase().match(p);if(o==".jpg"||o==".jpeg"||o==".png"||o==".gif"||o==".bmp"){TB_imageCount=
TB_NextHTML=TB_NextURL=TB_NextCaption=TB_PrevHTML=TB_PrevURL=TB_PrevCaption="";TB_FoundURL=false;if(q){TB_TempArray=a("a[@rel="+q+"]").get();for(TB_Counter=0;TB_Counter<TB_TempArray.length&&TB_NextHTML==="";TB_Counter++){TB_TempArray[TB_Counter].href.toLowerCase().match(p);if(TB_TempArray[TB_Counter].href!=t)if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"}else{TB_PrevCaption=
TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+TB_TempArray.length}}}imgPreloader=new Image;imgPreloader.onload=function(){imgPreloader.onload=null;var s=k(),v=s[0]-150;s=s[1]-150;var y=imgPreloader.width,B=imgPreloader.height;if(y>v){B*=v/y;y=v;if(B>s){y*=s/B;B=s}}else if(B>s){y*=s/B;B=s;if(y>v){B*=v/y;y=v}}TB_WIDTH=y+30;TB_HEIGHT=
B+60;a("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+t+"' width='"+y+"' height='"+B+"' alt='"+r+"'/></a><div id='TB_caption'>"+r+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");a(".TB_closeWindowButton").click(d);if(TB_PrevHTML!==""){function z(){a(document).unbind("click",z)&&a(document).unbind("click",z);a("#TB_window").remove();
a("body").append("<div id='TB_window'></div>");e(TB_PrevCaption,TB_PrevURL,q);return false}a("#TB_prev").click(z)}if(TB_NextHTML!==""){function C(){a("#TB_window").remove();a("body").append("<div id='TB_window'></div>");e(TB_NextCaption,TB_NextURL,q);return false}a("#TB_next").click(C)}document.onkeydown=function(G){keycode=G==null?event.keyCode:G.which;if(keycode==27)d();else if(keycode==190){if(TB_NextHTML!=""){document.onkeydown="";C()}}else if(keycode==188)if(TB_PrevHTML!=""){document.onkeydown=
"";z()}};g();a("#TB_load").remove();a("#TB_ImageOff").click(d);a("#TB_window").css({display:"block"})};imgPreloader.src=t}else{var n=t.replace(/^[^\?]+\??/,""),u=j(n);TB_WIDTH=u.width*1||630;TB_HEIGHT=u.height*1+40||440;ajaxContentW=TB_WIDTH;ajaxContentH=TB_HEIGHT-45;if(t.indexOf("TB_iframe")!=-1){urlNoQuery=t.split("TB_");a("#TB_iframeContent").remove();if(u.modal!="true")a("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+
Math.round(Math.random()*1E3)+"' onload='tb_showIframe()' style='width:"+ajaxContentW+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>");else{a("#TB_overlay").unbind();a("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1E3)+"' onload='tb_showIframe()' style='width:"+ajaxContentW+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else if(a("#TB_window").css("display")!="block")if(u.modal!="true")a("#TB_window").append("<div id='TB_ajaxContent' style='width:"+
ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");else{a("#TB_overlay").unbind();a("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}else{a("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";a("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";a("#TB_ajaxContent")[0].scrollTop=0;a("#TB_ajaxWindowTitle").html(r)}a(".TB_closeWindowButton").click(d);if(t.indexOf("TB_inline")!=-1){a("#TB_ajaxContent").append(a("#"+
u.inlineId).children());a("#TB_window").unload(function(){a("#"+u.inlineId).append(a("#TB_ajaxContent").children())});g();a("#TB_load").remove();a("#TB_window").css({display:"block"})}else if(t.indexOf("TB_iframe")!=-1){g();if(a.browser.safari){a("#TB_load").remove();a("#TB_window").css({display:"block"})}}else a("#TB_ajaxContent").load(t+="&random="+(new Date).getTime(),function(){g();a("#TB_load").remove();c("#TB_ajaxContent a.thickbox");a("#TB_window").css({display:"block"})})}if(!u.modal)document.onkeyup=
function(s){keycode=s==null?event.keyCode:s.which;keycode==27&&d()}}catch(h){}a(window).triggerHandler("tb_show")}function f(){a("#TB_load").remove();a("#TB_window").css({display:"block"})}function d(){a("#TB_imageOff").unbind("click");a(".TB_closeWindowButton").unbind("click");a("#TB_window").fadeOut("fast",function(){a("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});a("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){a("body","html").css({height:"auto",
width:"auto"});a("html").css("overflow","")}document.onkeydown="";document.onkeyup="";a(window).triggerHandler("tb_remove");return false}function g(){a("#TB_window").css({marginLeft:"-"+parseInt(TB_WIDTH/2,10)+"px",width:TB_WIDTH+"px"});jQuery.browser.msie&&jQuery.browser.version<7||a("#TB_window").css({marginTop:"-"+parseInt(TB_HEIGHT/2,10)+"px"})}function j(r){var t={};if(!r)return t;r=r.split(/[;&]/);for(var q=0;q<r.length;q++){var p=r[q].split("=");if(!(!p||p.length!=2)){var o=unescape(p[0]);
p=unescape(p[1]);p=p.replace(/\+/g," ");t[o]=p}}return t}function k(){var r=document.documentElement;return arrayPageSize=[window.innerWidth||self.innerWidth||r&&r.clientWidth||document.body.clientWidth,window.innerHeight||self.innerHeight||r&&r.clientHeight||document.body.clientHeight]}function l(){var r=navigator.userAgent.toLowerCase();if(r.indexOf("mac")!=-1&&r.indexOf("firefox")!=-1)return true}a(function(){c("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image;imgLoader.src=creyle.getMeta().StaticRoot+
"/project/img/loadingAnimation.gif"});a.extend(window,{tb_init:c,tb_show:e,tb_showIframe:f,tb_remove:d,tb_position:g,tb_parseQuery:j,tb_getPageSize:k,tb_detectMacXFF:l})})(jQuery);
(function(a){function c(f,d,g,j){if(!d.busy){var k=f[0].parentNode,l=f[d.currSlide],r=f[d.nextSlide];if(!(k.cycleTimeout===0&&!g)){if(g||!k.cyclePause){d.before.length&&a.each(d.before,function(t,q){q.apply(r,[l,r,d,j])});g=function(){a.browser.msie&&this.style.removeAttribute("filter");a.each(d.after,function(t,q){q.apply(r,[l,r,d,j])})};if(d.nextSlide!=d.currSlide){d.busy=1;a.fn.cycle.custom(l,r,d,g)}g=d.nextSlide+1==f.length;d.nextSlide=g?0:d.nextSlide+1;d.currSlide=g?f.length-1:d.nextSlide-1}if(d.timeout)k.cycleTimeout=
setTimeout(function(){c(f,d,0,!d.rev)},d.timeout)}}}function e(f,d,g){var j=f[0].parentNode,k=j.cycleTimeout;if(k){clearTimeout(k);j.cycleTimeout=0}d.nextSlide=d.currSlide+g;if(d.nextSlide<0)d.nextSlide=f.length-1;else if(d.nextSlide>=f.length)d.nextSlide=0;c(f,d,1,g>=0);return false}a.fn.cycle=function(f){return this.each(function(){f=f||{};this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cyclePause=this.cycleTimeout=0;var d=a(this),g=f.slideExpr?a(f.slideExpr,this):d.children(),j=g.get();
if(j.length<2)window.console&&window.console.log&&window.console.log("terminating; too few slides: "+j.length);else{var k=a.extend({},a.fn.cycle.defaults,f||{},a.metadata?d.metadata():a.meta?d.data():{});k.before=k.before?[k.before]:[];k.after=k.after?[k.after]:[];k.after.unshift(function(){k.busy=0});var l=this.className;k.width=parseInt((l.match(/w:(\d+)/)||[])[1])||k.width;k.height=parseInt((l.match(/h:(\d+)/)||[])[1])||k.height;k.timeout=parseInt((l.match(/t:(\d+)/)||[])[1])||k.timeout;d.css("position")==
"static"&&d.css("position","relative");k.width&&d.width(k.width);k.height&&k.height!="auto"&&d.height(k.height);g.css({position:"absolute",top:0,left:0}).hide().each(function(r){a(this).css("z-index",j.length-r)});a(j[0]).css("opacity",1).show();a.browser.msie&&j[0].style.removeAttribute("filter");k.fit&&k.width&&g.width(k.width);k.fit&&k.height&&k.height!="auto"&&g.height(k.height);k.pause&&d.hover(function(){this.cyclePause=1},function(){this.cyclePause=0});a.fn.cycle.transitions.fade(d,g,k);g.each(function(){var r=
a(this);this.cycleH=k.fit&&k.height?k.height:r.height();this.cycleW=k.fit&&k.width?k.width:r.width()});g.not(":eq(0)").css({opacity:0});k.cssFirst&&a(g[0]).css(k.cssFirst);if(k.timeout){if(k.speed.constructor==String)k.speed={slow:600,fast:200}[k.speed]||400;for(k.sync||(k.speed/=2);k.timeout-k.speed<250;)k.timeout+=k.speed}k.speedIn=k.speed;k.speedOut=k.speed;k.slideCount=j.length;k.currSlide=0;k.nextSlide=1;d=g[0];k.before.length&&k.before[0].apply(d,[d,d,k,true]);k.after.length>1&&k.after[1].apply(d,
[d,d,k,true]);if(k.click&&!k.next)k.next=k.click;k.next&&a(k.next).bind("click",function(){return e(j,k,k.rev?-1:1)});k.prev&&a(k.prev).bind("click",function(){return e(j,k,k.rev?1:-1)});if(k.timeout)this.cycleTimeout=setTimeout(function(){c(j,k,0,!k.rev)},k.timeout+(k.delay||0))}})};a.fn.cycle.custom=function(f,d,g,j){var k=a(f),l=a(d);l.css({opacity:0});var r=function(){l.animate({opacity:1},g.speedIn,g.easeIn,j)};k.animate({opacity:0},g.speedOut,g.easeOut,function(){k.css({display:"none"});g.sync||
r()});g.sync&&r()};a.fn.cycle.transitions={fade:function(f,d,g){d.not(":eq(0)").css("opacity",0);g.before.push(function(){a(this).show()})}};a.fn.cycle.ver=function(){return"Lite-1.0"};a.fn.cycle.defaults={timeout:4E3,speed:1E3,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery);
(function(a){function c(d){return d<10?"0"+d:d}Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+c(this.getUTCMonth())+"-"+c(this.getUTCDate())};var e=/["\\\x00-\x1f\x7f-\x9f]/g,f={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};a.quoteString=function(d){if(e.test(d))return'"'+d.replace(e,function(g){var j=f[g];if(typeof j==="string")return j;j=g.charCodeAt();return"\\u00"+Math.floor(j/16).toString(16)+(j%16).toString(16)})+'"';return'"'+d+'"'};
a.toJSON=function(d,g){var j=typeof d;if(j=="undefined")return"undefined";else if(j=="number"||j=="boolean")return d+"";else if(d===null)return"null";if(j=="string")return a.quoteString(d);if(j=="object"&&typeof d.toJSON=="function")return d.toJSON(g);if(j!="function"&&typeof d.length=="number"){for(var k=[],l=0;l<d.length;l++)k.push(a.toJSON(d[l],g));return g?"["+k.join(",")+"]":"["+k.join(", ")+"]"}if(j=="function")throw new TypeError("Unable to convert object of type 'function' to json.");k=[];
for(l in d){j=typeof l;if(j=="number")j='"'+l+'"';else if(j=="string")j=a.quoteString(l);else continue;var r=a.toJSON(d[l],g);if(typeof r=="string")g?k.push(j+":"+r):k.push(j+": "+r)}return"{"+k.join(", ")+"}"};a.compactJSON=function(d){return a.toJSON(d,true)};a.evalJSON=function(d){return eval("("+d+")")};a.secureEvalJSON=function(d){var g=d;g=g.replace(/\\["\\\/bfnrtu]/g,"@");g=g.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");g=g.replace(/(?:^|:|,)(?:\s*\[)+/g,
"");if(/^[\],:{}\s]*$/.test(g))return eval("("+d+")");else throw new SyntaxError("Error parsing JSON, source is not valid.");}})(jQuery);
jQuery.fn.formtips=function(a){settings=jQuery.extend({tippedClass:"tipped"},a);return this.each(function(){jQuery(this).each(function(){var c=jQuery(this),e=jQuery(c).attr("type");if(e=="file"||e=="checkbox"||e=="radio")return false;jQuery(c).bind("focus",function(){var f=jQuery(this).attr("title");jQuery(this).val()==f&&jQuery(this).val("").removeClass(settings.tippedClass);return false});jQuery(c).bind("blur",function(){var f=jQuery(this).attr("title");jQuery(this).val()==""&&jQuery(this).val(f).addClass(settings.tippedClass);
return false});e=jQuery(c).attr("title");jQuery(c).val()==""||jQuery(c).val()==jQuery(this).attr("title")?jQuery(c).val(e).addClass(settings.tippedClass):jQuery(c).removeClass(settings.tippedClass);jQuery(c).parentsUntil("form").parent().submit(function(){var f=jQuery(c).attr("title");jQuery(c).val()==f&&jQuery(c).val("").removeClass(settings.tippedClass)})})})};
(function(a){a.extend(a.fn,{validate:function(c){if(this.length){var e=a.data(this[0],"validator");if(e)return e;e=new a.validator(c,this[0]);a.data(this[0],"validator",e);if(e.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){e.cancelSubmit=true});e.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){e.submitButton=this});this.submit(function(f){function d(){if(e.settings.submitHandler){if(e.submitButton)var g=a("<input type='hidden'/>").attr("name",
e.submitButton.name).val(e.submitButton.value).appendTo(e.currentForm);e.settings.submitHandler.call(e,e.currentForm);e.submitButton&&g.remove();return false}return true}e.settings.debug&&f.preventDefault();if(e.cancelSubmit){e.cancelSubmit=false;return d()}if(e.form()){if(e.pendingRequest){e.formSubmitted=true;return false}return d()}else{e.focusInvalid();return false}})}return e}else c&&c.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(a(this[0]).is("form"))return this.validate().form();
else{var c=true,e=a(this[0].form).validate();this.each(function(){c&=e.element(this)});return c}},removeAttrs:function(c){var e={},f=this;a.each(c.split(/\s/),function(d,g){e[g]=f.attr(g);f.removeAttr(g)});return e},rules:function(c,e){var f=this[0];if(c){var d=a.data(f.form,"validator").settings,g=d.rules,j=a.validator.staticRules(f);switch(c){case "add":a.extend(j,a.validator.normalizeRule(e));g[f.name]=j;if(e.messages)d.messages[f.name]=a.extend(d.messages[f.name],e.messages);break;case "remove":if(!e){delete g[f.name];
return j}var k={};a.each(e.split(/\s/),function(l,r){k[r]=j[r];delete j[r]});return k}}c=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(f),a.validator.classRules(f),a.validator.attributeRules(f),a.validator.staticRules(f)),f);if(c.required){e=c.required;delete c.required;c=a.extend({required:e},c)}return c}});a.extend(a.expr[":"],{blank:function(c){return!a.trim(""+c.value)},filled:function(c){return!!a.trim(""+c.value)},unchecked:function(c){return!c.checked}});a.validator=function(c,
e){this.settings=a.extend(true,{},a.validator.defaults,c);this.currentForm=e;this.init()};a.validator.format=function(c,e){if(arguments.length==1)return function(){var f=a.makeArray(arguments);f.unshift(c);return a.validator.format.apply(this,f)};if(arguments.length>2&&e.constructor!=Array)e=a.makeArray(arguments).slice(1);if(e.constructor!=Array)e=[e];a.each(e,function(f,d){c=c.replace(new RegExp("\\{"+f+"\\}","g"),d)});return c};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(c){this.lastActive=c;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,c,this.settings.errorClass,this.settings.validClass);this.errorsFor(c).hide()}},onfocusout:function(c){if(!this.checkable(c)&&(c.name in this.submitted||!this.optional(c)))this.element(c)},onkeyup:function(c){if(c.name in
this.submitted||c==this.lastElement)this.element(c)},onclick:function(c){if(c.name in this.submitted)this.element(c);else c.parentNode.name in this.submitted&&this.element(c.parentNode)},highlight:function(c,e,f){a(c).addClass(e).removeClass(f)},unhighlight:function(c,e,f){a(c).removeClass(e).addClass(f)}},setDefaults:function(c){a.extend(a.validator.defaults,c)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",
date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),
range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function c(d){var g=a.data(this[0].form,"validator");d="on"+d.type.replace(/^validate/,"");g.settings[d]&&g.settings[d].call(g,this[0])}this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&
this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var e=this.groups={};a.each(this.settings.groups,function(d,g){a.each(g.split(/\s/),function(j,k){e[k]=d})});var f=this.settings.rules;a.each(f,function(d,g){f[d]=a.validator.normalizeRule(g)});a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea",
"focusin focusout keyup",c).validateDelegate(":radio, :checkbox, select, option","click",c);this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var c=0,e=this.currentElements=this.elements();e[c];c++)this.check(e[c]);
return this.valid()},element:function(c){this.lastElement=c=this.clean(c);this.prepareElement(c);this.currentElements=a(c);var e=this.check(c);if(e)delete this.invalid[c.name];else this.invalid[c.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return e},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var e in c)this.errorList.push({message:c[e],element:this.findByName(e)[0]});this.successList=a.grep(this.successList,
function(f){return!(f.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(c){var e=0;for(var f in c)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},
valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(c){}},findLastActive:function(){var c=this.lastActive;return c&&a.grep(this.errorList,function(e){return e.element.name==c.name}).length==1&&c},elements:function(){var c=this,e={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in e||!c.objectLength(a(this).rules()))return false;return e[this.name]=true})},clean:function(c){return a(c)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
prepareElement:function(c){this.reset();this.toHide=this.errorsFor(c)},check:function(c){c=this.clean(c);if(this.checkable(c))c=this.findByName(c.name)[0];var e=a(c).rules(),f=false;for(method in e){var d={method:method,parameters:e[method]};try{var g=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,d.parameters);if(g=="dependency-mismatch")f=true;else{f=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!g){this.formatAndAdd(c,d);return false}}}catch(j){this.settings.debug&&
window.console&&console.log("exception occured when checking element "+c.id+", check the '"+d.method+"' method",j);throw j;}}if(!f){this.objectLength(e)&&this.successList.push(c);return true}},customMetaMessage:function(c,e){if(a.metadata)return(c=this.settings.meta?a(c).metadata()[this.settings.meta]:a(c).metadata())&&c.messages&&c.messages[e]},customMessage:function(c,e){return(c=this.settings.messages[c])&&(c.constructor==String?c:c[e])},findDefined:function(){for(var c=0;c<arguments.length;c++)if(arguments[c]!==
undefined)return arguments[c]},defaultMessage:function(c,e){return this.findDefined(this.customMessage(c.name,e),this.customMetaMessage(c,e),!this.settings.ignoreTitle&&c.title||undefined,a.validator.messages[e],"<strong>Warning: No message defined for "+c.name+"</strong>")},formatAndAdd:function(c,e){var f=this.defaultMessage(c,e.method),d=/\$?\{(\d+)\}/g;if(typeof f=="function")f=f.call(this,e.parameters,c);else if(d.test(f))f=jQuery.format(f.replace(d,"{$1}"),e.parameters);this.errorList.push({message:f,
element:c});this.errorMap[c.name]=f;this.submitted[c.name]=f},addWrapper:function(c){if(this.settings.wrapper)c=c.add(c.parent(this.settings.wrapper));return c},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var e=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,e.element,this.settings.errorClass,this.settings.validClass);this.showLabel(e.element,e.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(c=
0;this.successList[c];c++)this.showLabel(this.successList[c]);if(this.settings.unhighlight){c=0;for(e=this.validElements();e[c];c++)this.settings.unhighlight.call(this,e[c],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,
e){var f=this.errorsFor(c);if(f.length){f.removeClass().addClass(this.settings.errorClass);f.attr("generated")&&f.html(e)}else{f=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(e||"");if(this.settings.wrapper)f=f.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(f).length||(this.settings.errorPlacement?this.settings.errorPlacement(f,a(c)):f.insertAfter(c))}if(!e&&this.settings.success){f.text("");
typeof this.settings.success=="string"?f.addClass(this.settings.success):this.settings.success(f)}this.toShow=this.toShow.add(f)},errorsFor:function(c){var e=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")==e})},idOrName:function(c){return this.groups[c.name]||(this.checkable(c)?c.name:c.id||c.name)},checkable:function(c){return/radio|checkbox/i.test(c.type)},findByName:function(c){var e=this.currentForm;return a(document.getElementsByName(c)).map(function(f,d){return d.form==
e&&d.name==c&&d||null})},getLength:function(c,e){switch(e.nodeName.toLowerCase()){case "select":return a("option:selected",e).length;case "input":if(this.checkable(e))return this.findByName(e.name).filter(":checked").length}return c.length},depend:function(c,e){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,e):true},dependTypes:{"boolean":function(c){return c},string:function(c,e){return!!a(c,e.form).length},"function":function(c,e){return c(e)}},optional:function(c){return!a.validator.methods.required.call(this,
a.trim(c.value),c)&&"dependency-mismatch"},startRequest:function(c){if(!this.pending[c.name]){this.pendingRequest++;this.pending[c.name]=true}},stopRequest:function(c,e){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[c.name];if(e&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else if(!e&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
false}},previousValue:function(c){return a.data(c,"previousValue")||a.data(c,"previousValue",{old:null,valid:true,message:this.defaultMessage(c,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(c,e){c.constructor==String?(this.classRuleSettings[c]=e):a.extend(this.classRuleSettings,
c)},classRules:function(c){var e={};(c=a(c).attr("class"))&&a.each(c.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(e,a.validator.classRuleSettings[this])});return e},attributeRules:function(c){var e={};c=a(c);for(method in a.validator.methods){var f=c.attr(method);if(f)e[method]=f}e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength;return e},metadataRules:function(c){if(!a.metadata)return{};var e=a.data(c.form,"validator").settings.meta;return e?a(c).metadata()[e]:
a(c).metadata()},staticRules:function(c){var e={},f=a.data(c.form,"validator");if(f.settings.rules)e=a.validator.normalizeRule(f.settings.rules[c.name])||{};return e},normalizeRules:function(c,e){a.each(c,function(f,d){if(d===false)delete c[f];else if(d.param||d.depends){var g=true;switch(typeof d.depends){case "string":g=!!a(d.depends,e.form).length;break;case "function":g=d.depends.call(e,e);break}if(g)c[f]=d.param!==undefined?d.param:true;else delete c[f]}});a.each(c,function(f,d){c[f]=a.isFunction(d)?
d(e):d});a.each(["minlength","maxlength","min","max"],function(){if(c[this])c[this]=Number(c[this])});a.each(["rangelength","range"],function(){if(c[this])c[this]=[Number(c[this][0]),Number(c[this][1])]});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}c.messages&&delete c.messages;return c},normalizeRule:function(c){if(typeof c=="string"){var e=
{};a.each(c.split(/\s/),function(){e[this]=true});c=e}return c},addMethod:function(c,e,f){a.validator.methods[c]=e;a.validator.messages[c]=f!=undefined?f:a.validator.messages[c];e.length<3&&a.validator.addClassRules(c,a.validator.normalizeRule(c))},methods:{required:function(c,e,f){if(!this.depend(f,e))return"dependency-mismatch";switch(e.nodeName.toLowerCase()){case "select":return(c=a(e).val())&&c.length>0;case "input":if(this.checkable(e))return this.getLength(c,e)>0;default:return a.trim(c).length>
0}},remote:function(c,e,f){if(this.optional(e))return"dependency-mismatch";var d=this.previousValue(e);this.settings.messages[e.name]||(this.settings.messages[e.name]={});d.originalMessage=this.settings.messages[e.name].remote;this.settings.messages[e.name].remote=d.message;f=typeof f=="string"&&{url:f}||f;if(d.old!==c){d.old=c;var g=this;this.startRequest(e);var j={};j[e.name]=c;a.ajax(a.extend(true,{url:f,mode:"abort",port:"validate"+e.name,dataType:"json",data:j,success:function(k){g.settings.messages[e.name].remote=
d.originalMessage;var l=k===true;if(l){var r=g.formSubmitted;g.prepareElement(e);g.formSubmitted=r;g.successList.push(e);g.showErrors()}else{r={};k=d.message=k||g.defaultMessage(e,"remote");r[e.name]=a.isFunction(k)?k(c):k;g.showErrors(r)}d.valid=l;g.stopRequest(e,l)}},f));return"pending"}else if(this.pending[e.name])return"pending";return d.valid},minlength:function(c,e,f){return this.optional(e)||this.getLength(a.trim(c),e)>=f},maxlength:function(c,e,f){return this.optional(e)||this.getLength(a.trim(c),
e)<=f},rangelength:function(c,e,f){c=this.getLength(a.trim(c),e);return this.optional(e)||c>=f[0]&&c<=f[1]},min:function(c,e,f){return this.optional(e)||c>=f},max:function(c,e,f){return this.optional(e)||c<=f},range:function(c,e,f){return this.optional(e)||c>=f[0]&&c<=f[1]},email:function(c,e){return this.optional(e)||/^([a-z]|\d|\.|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},
url:function(c,e){return this.optional(e)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},
date:function(c,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,e){return this.optional(e)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},number:function(c,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},digits:function(c,e){return this.optional(e)||/^\d+$/.test(c)},creditcard:function(c,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9-]+/.test(c))return false;var f=e=0,d=false;c=c.replace(/\D/g,"");for(var g=c.length-1;g>=
0;g--){f=c.charAt(g);f=parseInt(f,10);if(d)if((f*=2)>9)f-=9;e+=f;d=!d}return e%10==0},accept:function(c,e,f){f=typeof f=="string"?f.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(e)||c.match(new RegExp(".("+f+")$","i"))},equalTo:function(c,e,f){f=a(f).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(e).valid()});return c==f.val()}}});a.format=a.validator.format})(jQuery);
(function(a){var c=a.ajax,e={};a.ajax=function(f){f=a.extend(f,a.extend({},a.ajaxSettings,f));var d=f.port;if(f.mode=="abort"){e[d]&&e[d].abort();return e[d]=c.apply(this,arguments)}return c.apply(this,arguments)}})(jQuery);
(function(a){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&a.each({focus:"focusin",blur:"focusout"},function(c,e){function f(d){d=a.event.fix(d);d.type=e;return a.event.handle.call(this,d)}a.event.special[e]={setup:function(){this.addEventListener(c,f,true)},teardown:function(){this.removeEventListener(c,f,true)},handler:function(d){arguments[0]=a.event.fix(d);arguments[0].type=e;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{validateDelegate:function(c,
e,f){return this.bind(e,function(d){var g=a(d.target);if(g.is(c))return f.apply(g,arguments)})}})})(jQuery);


;(function(N,B,l,c,ka,la,ma,na,W,oa,pa,$,q){function aa(){c(ba)}function ba(){c("input#checkAll").bind("click",function(){c(".allCheckTarget").attr("checked",c(this).attr("checked"))});c("a#checkAll").bind("click",function(){c(".allCheckTarget").attr("checked",true);return false})}function ca(){Q||(Q=l.getMeta().StaticRoot+"/project/img/no_photo.png");return Q}function R(a,h){for(a=String(a);a.length<(h||2);)a="0"+a;return a}function S(a){return[a.getFullYear(),R(a.getMonth()+1),R(a.getDate())].join("/")}
function T(a){return(a=(a||"").match(/[^:]+:(.+)$/))&&a[1]?a[1].split(","):[]}function K(a,h,d){var i=l.getMeta();q.extend(h,{site_id:i.SiteId,csrf_token:i.CsrfToken});l.util.post(a,h,d)}function da(){c("*[src*='_off']").each(function(){var a=c(this),h=a.attr("src");if(/.+_off\.\w+/.test(h)){var d=h.replace(/(.+)_off(\.\w+)$/,"$1_on$2");a.hover(function(){a.attr("src",d)},function(){a.attr("src",h)})}})}function U(a){a.css({opacity:0,display:"none"})}function V(a){a.css({opacity:0});a.css({display:"none"})}
function X(a){a.animate({opacity:1},10);a.css({display:"block"})}function ea(a){a.animate({opacity:1},10);a.css({display:"block"})}function fa(a,h){a=a.val().split("\n");for(var d="",i=0;i<a.length;i++){var m=c("<div/>").text(a[i]).html();d+=m;d+="<br/>"}h.html(d)}var D={},Q;q.extend(D,{getNoPhotoURL:ca,util:{formatNumber:R,formatDate:S}});(function(a,h,d,i,m,n){function t(){var e=E.val();if(""==e){alert("\u30b3\u30e1\u30f3\u30c8\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044");return false}o(e);
return false}function r(e,j,F){var s=m.getMeta();q.extend(j,{csrf_token:s.CsrfToken});if(s.SiteEntryID)j.site_entry_id=s.SiteEntryID;else if(s.PhotoID)j.photo_id=s.PhotoID;else throw new Error("SiteEntryID or PhotoID is not set");m.util.post(e,j,F)}function o(e){r(x,{comment:e},y)}function y(e){if(!e)return alert("\u901a\u4fe1\u30a8\u30e9\u30fc");var j=e.comment;if((e.errors||[]).length)return alert(m.util.summarizeErrors(e));j.create_dateformatted=S(new Date(j.create_datetime));j.comment_html=j.comment.escapeHTML().replace(/\r|\n/g,
"<br />");j.user.photo_file=j.user.photo_file||i.getNoPhotoURL();E.val("");n.replace(String(n.href).replace(/#.*$/,""))}function G(){if(!confirm("\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f"))return false;var e=d(this),j=((e.attr("href")||"").match(/.*#comment-(\d+)/)||"")[1];e.findAnchor().fadeTo("normal",0.5);e.remove();g(j);return false}function g(e){r(C,{id:e},function(){d("#comment-"+e).animate({height:0},function(){d(this).remove()})})}function k(e){e=z.evaluate(e);H.append(e)}
function u(){var e=m.getMeta();p=d("#comment-input-form");if(e.SiteEntryID){x=I;C=O}else if(e.PhotoID){x=L;C=P}if(!(0==p.size()||!x||!C)){H=d("#comments");E=d("#comment-input-text");A=d("a[rel='submit']",p);p.bind("submit",t);A.bind("click",t);d("a[rel='delete']",H).unbind("click").bind("click",G)}}var I="/service/site_entry_comment/create",O="/service/site_entry_comment/delete",L="/service/photo_comment/create",P="/service/photo_comment/delete",z=new W('<div class="entryCommentBox" id="comment-#{id}"><a href="/profile/#{user.id}"><img src="#{user.photo_file}" alt="#{user.name}" /></a><ul><li class="title"><a href="#{user.photo_file}">#{user.name}</a></li><li>#{comment_html}</li><li>#{create_dateformatted}&nbsp;<a href="#comment-#{id}" onclick="return pati2.comment.onCommentDeleteButtonClick.apply(this,event)" rel="delete" class="iconDelete">\u524a\u9664\u3059\u308b</a></li></ul></div>'),
x,C,E,p,H,A;q.extend(i,{comment:{onCommentDeleteButtonClick:G,postComment:o,deleteComment:g,renderComment:k}});d(u)})(N,B,jQuery,D,l,B.location);(function(a,h,d,i){function m(){e=a("#album-upload-form");if(e.size()){p=a("#album-upload-progress-bar");A=a("#album-upload-dialog");j=a("input#uploaded-photos");F=a("#album-upload-progress");s=a("table#uploaded-thumbs");M=a("#album-upload-button");Y=a("#pc");o();j.val("");a("a[rel='submit']",A).unbind("click").bind("click",C)}}function n(b){alert(b);p.stop();
p.css({width:"0"});r(false)}function t(b){a(".uploadStatus",A).html(b)}function r(b){if(b){A.addClass("uploading");F.css({display:"block",height:"auto"});F.slideDown("fast")}else{A.removeClass("uploading");F.slideUp("slow");M.css("display","block");M.fadeTo("fast",1)}}function o(){v=new d(a("a",M)[0]);v.addEventListener("select",function(){p.css({width:"1px"});r(true);t("\u8a8d\u8a3c\u60c5\u5831\u3092\u78ba\u8a8d\u4e2d");M.fadeTo("fast",0.2)});v.addEventListener(i.TOKEN_RECEIVED,function(){p.animate({width:"1%"});
t("\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u4e2d")});v.addEventListener(i.PROGRESS,function(b){p.animate({width:parseInt(b.memo.progress*98)+1+"%"})});v.addEventListener(i.UPLOAD_COMPLETE,function(b){b=b.memo;b.totalFiles&&b.currentCue<b.totalFiles-1||p.animate({width:"100%"},"fast","linear",function(){t("\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f");setTimeout(function(){r(false)},500)});y(b.uploaded)});v.addEventListener(i.ERROR,function(b){b=
b.memo.errorMessage;n(/^error/i.test(b)?"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\n\u3057\u3070\u3089\u3057\u304f\u3066\u304b\u3089\u518d\u5ea6\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002":b)});v.addEventListener(i.TOKEN_FAILURE,function(){n("\u518d\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u304b\u3089\u304a\u8a66\u3057\u4e0b\u3055\u3044")});q.extend(v,{multipleSelect:true,maxFiles:20,
tokenExpires:180,maxFilesErrorMessage:ga});v.render()}function y(b){O(b);G(b)}function G(b){var f=I(b),w=a("tr:last",s),J=a("td.thumbnail-item",w).size();if(!w.size()||J==Z){s.append("<tr />");w=a("tr:last",s);J=0}f=a(f);a("a[rel='delete']",f).bind("click",function(){g(b);return false});w.append(f);k()}function g(b){if(!confirm("\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f"))return false;L(b);a("#"+u(b)).fadeOut("fast",function(){a(this).remove();k()})}function k(){var b=a("tr:last",
s),f=a("td.thumbnail-item",b).size();f=Z-f;a("td.spacer",b).remove();f>0&&b.append(['<td class="spacer" colspan="',f,'">&nbsp;</td>'].join(""))}function u(b){return ha+b.url.replace(/\//g,"-")}function I(b){return ia.evaluate(q.extend({uploadHost:h.getMeta().UploadHost,id:u(b),localFilename:b.local_filename.replace(/\.[^\.]+$/,"")},b))}function O(b){L(b);var f=z();f.push(b);x(f)}function L(b){b=P(b);if(-1==b)return false;var f=z();f.splice(b,1);x(f)}function P(b){var f=z();if(!f||!b||!f.length)return-1;
for(var w in f)if(b.url==(f[w]||{}).url)return w;return-1}function z(){return $.parse(j.val()||"[]")}function x(b){j.val(typeof b=="string"?b:q.toJSON(b))}function C(){if(H||!E())return false;var b={"photo[]":j.val(),taken_date:S(new Date)};K(ja,b,function(f){f.is_success?B.location.replace(h.getMeta().MainPage+"album/"):n(h.util.summarizeErrors(f))});H=true;return false}function E(){var b=[],f=eval(Y.val()),w=eval(z().length),J=500-f;if(J<0)J=0;if(f+w>500)b.push("\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306e\u4e0a\u9650\u679a\u6570\u306b\u9054\u3057\u307e\u3057\u305f\u3002\u6b8b\u308a "+
J+" \u679a\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002");else z().length==0&&b.push("\u5c11\u306a\u304f\u3068\u30821\u679a\u306e\u5199\u771f\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044");b.length&&alert(b.join("\n"));return b.length==0}var p,H=false,A,e,j,F,s,M,v,Y,ga="\u4e00\u5ea6\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u308b\u679a\u6570\u306f20\u679a\u307e\u3067\u3067\u3059\u3002",ia=new W('<td id="#{id}" class="thumbnail-item"><div style="width:100px"><img src="#{uploadHost}#{url}_s.#{ext}" alt="#{localFilename}" style="max-width:100px;width:auto;" /></div><p><a href="##{id}" class="iconDelete" rel="delete">\u524a\u9664</a></p></td>'),
ha="uploaded-asp",Z=8,ja="/service/photo/create";q.extend(D,{album:{getValue:z,setValue:x,addValue:O,removeValue:L,containsValue:P,submit:C,validate:E}});a(m)})(jQuery,l,l.net.ImageUploader,l.events.FlashEvent);(function(a,h,d,i){function m(){d("a[rel^=deleteEntry]").bind("click",function(){n.apply(this,T(d(this).attr("rel")));return false})}function n(o){confirm("\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f")&&K(r,{id:o},t)}function t(){var o=h.location,y=o.pathname;if(/^\/entry/.test(y))o.replace("/entry/");
else/^\/admin\/entry/.test(y)&&o.reload()}var r="/service/site_entry/delete";q.extend(i,{entry:{deleteEntry:n}});d(m)})(N,B,jQuery,D,l,B.location);(function(a,h,d,i){function m(){d("a[rel^=rotatePhoto]").bind("click",function(){n.apply(this,T(d(this).attr("rel")));return false});d("a[rel^=deletePhoto]").bind("click",function(){r.apply(this,T(d(this).attr("rel")));return false})}function n(g,k){K(y,{id:g,rotation:k%4},t)}function t(g){if(parseInt(g.is_success)!=1||!g.photo)alert("\u753b\u50cf\u306e\u56de\u8ee2\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002");
else{var k=g.photo;g=parseInt(k.rotation)||0;var u=d("img#photo-image-"+k.id),I=u.attr("src");if(I){u.attr("src",I.replace(/(\-r\d{2,3})?(\.\w+)$/,(g>0?"-r"+g*90:"")+"$2"));k="rotatePhoto:"+k.id;d("a[rel^="+k+"]").attr("rel",k+","+(g+1)%4)}}}function r(g){confirm("\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f")&&K(G,{id:g},o)}function o(){var g=h.location,k=(g.search||"").parseQuery(),u=parseInt(k.page);if(/^\/album\/view\/\d+$/.test(g.pathname))g.replace("/album/");else if(d(".adminPhoto tr,.photoList td").size()<=
1&&u>1){k.page=--u;g.search=q.toQueryString(k)}else g.reload()}var y="/service/photo/update",G="/service/photo/delete";q.extend(i,{photo:{rotatePhoto:n,deletePhoto:r}});d(m)})(N,B,jQuery,D,l,B.location);c(da);c(function(){c("#activityList").hide();c(".activityPastBtn").click(function(){c("#activityList").slideToggle()})});c(function(){c(".guide p.closeBtn a").click(function(){c(".guide").fadeOut()})});c(function(){c(".layout div[class$='Show'] p.tit").hover(function(){c(this).after("<p class='move'><img src='"+
l.getMeta().StaticRoot+"/img/site/layout_move.gif' width='9' height='22' alt='' /></p>")},function(){c(".layout p.move").remove()})});c(function(){c(".categorySetting div.category_movable").hover(function(){c(this).css("background","url("+l.getMeta().StaticRoot+"/img/site/bg_11.gif) 0 -40px no-repeat")},function(){c(this).css("background","url("+l.getMeta().StaticRoot+"/img/site/bg_11.gif) 0 0 no-repeat")})});c(function(){U(c("#inviteInput2"));U(c("#inviteInput3"));c("#inviteInput1").click(function(){U(c("#inviteInput1"));
V(c(this));X(c("#inviteInput2"),185)});c("#inviteTextSave").click(function(){fa(c("#inviteText"),c("#inviteInput3"));ea(c("#inviteInput3"),c("#inviteText"));V(c("#inviteInput2"))});c("#inviteInput3").click(function(){V(c(this));X(c("#inviteInput2"),185)});c("#inviteInput3").hover(function(){c(this).addClass("inviteInput3On")},function(){c(this).removeClass("inviteInput3On")})});c(function(){c("div.photoListThumb").hover(function(){c(this).find(".photoListMenu").fadeTo(50,1);c(this).find("img").fadeTo(50,
0.5)},function(){c(this).find(".photoListMenu").fadeTo(99,0);c(this).find("img").fadeTo(50,1)})});c(function(){c(".photo_prev a").hover(function(){c(".photo_prev a img").fadeTo(50,1)},function(){c(".photo_prev a img").fadeTo(50,0.6)})});c(function(){c(".photo_next a").hover(function(){c(".photo_next a img").fadeTo(50,1)},function(){c(".photo_next a img").fadeTo(50,0.6)})});(function(a){a.validator.messages.required="[!]\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\uff1a\u5165\u529b\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002";
a.validator.messages.email="[!]\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\uff1a\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3068\u3057\u3066\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002";a(function(){var h=l.getMeta();a("#inviteUrlForm").validate();a("#inviteSubmitLink").unbind("click").bind("click",function(d){d.preventDefault();a("#inviteUrlForm").submit()});a("#inviteUrlForm").unbind("submit").bind("submit",function(){if(!a("#inviteUrlForm").valid())return false;K(h.InviteApiUrl,{email:a('#inviteUrlForm input[name="email"]').val(),
".announce":a('#inviteUrlForm input[name=".announce"]').val()},function(){a("#TB_window div.dialog").remove();a("#openInviteUrlCompleteDialog").click();setTimeout(function(){tb_remove();location.reload()},1500)});return false})})})(jQuery);N.pati2=D;aa()})(window,document,creyle,jQuery.noConflict(),swfobject,RandomString,RegExp,Form,Template,Prototype,Class,JSON,Object,undefined);


